| @@ -13,6 +13,7 @@ import com.iformall.service.WxFlowService; | |||||
| import org.springframework.beans.factory.annotation.Autowired; | import org.springframework.beans.factory.annotation.Autowired; | ||||
| import org.springframework.web.bind.annotation.RestController; | import org.springframework.web.bind.annotation.RestController; | ||||
| import java.math.BigDecimal; | |||||
| import java.util.ArrayList; | import java.util.ArrayList; | ||||
| import java.util.HashMap; | import java.util.HashMap; | ||||
| import java.util.List; | import java.util.List; | ||||
| @@ -118,4 +119,5 @@ public class WxContractBaseController extends BaseController{ | |||||
| } | } | ||||
| return false; | return false; | ||||
| } | } | ||||
| } | } | ||||
| @@ -93,68 +93,68 @@ public class WxRentContractController extends WxContractBaseController { | |||||
| } | } | ||||
| } | } | ||||
| wrc.setFlowHas(hasFlow); | wrc.setFlowHas(hasFlow); | ||||
| String renInfo = wrc.getRentInfo(); | |||||
| if (!StringUtils.isBlank(renInfo)) { | |||||
| String floorName = ""; | |||||
| String buildingName = ""; | |||||
| String shopNumber = ""; | |||||
| JSONArray arrays = JSONArray.parseArray(renInfo); | |||||
| if ( null != arrays) { | |||||
| // List<Long> floorIds = new ArrayList<Long>(); | |||||
| // List<Long> buildIds = new ArrayList<Long>(); | |||||
| // List<Long> shopIds = new ArrayList<Long>(); | |||||
| // for (int i = 0 ; i < arrays.size(); i ++) { | |||||
| // JSONObject o = arrays.getJSONObject(i); | |||||
| // try { | |||||
| // floorIds.add(Long.parseLong(o.getString("floor"))); | |||||
| // }catch(Exception e) { | |||||
| // floorName = floorName +","+o.getString("floor"); | |||||
| // } | |||||
| // try { | |||||
| // buildIds.add(Long.parseLong(o.getString("building"))); | |||||
| // }catch(Exception e) { | |||||
| // buildingName = buildingName + ","+ o.getString("building"); | |||||
| // } | |||||
| // try { | |||||
| // shopIds.add(Long.parseLong(o.getString("id"))); | |||||
| // }catch(Exception e) { | |||||
| // shopNumber = shopNumber +","+o.getString("id"); | |||||
| // } | |||||
| // } | |||||
| // | |||||
| // WxMallBuilding bq = new WxMallBuilding(); | |||||
| // bq.setIds(buildIds); | |||||
| // PageInfo<WxMallBuilding> bpage = buildingService.listAsPage(bq, 1, 1000); | |||||
| // if (null != bpage && null != bpage.getList()) { | |||||
| // for (WxMallBuilding wmb : bpage.getList()) { | |||||
| // buildingName = buildingName +"," + wmb.getBuildingName(); | |||||
| // } | |||||
| // } | |||||
| // String renInfo = wrc.getRentInfo(); | |||||
| // if (!StringUtils.isBlank(renInfo)) { | |||||
| // String floorName = ""; | |||||
| // String buildingName = ""; | |||||
| // String shopNumber = ""; | |||||
| // JSONArray arrays = JSONArray.parseArray(renInfo); | |||||
| // if ( null != arrays) { | |||||
| //// List<Long> floorIds = new ArrayList<Long>(); | |||||
| //// List<Long> buildIds = new ArrayList<Long>(); | |||||
| //// List<Long> shopIds = new ArrayList<Long>(); | |||||
| //// for (int i = 0 ; i < arrays.size(); i ++) { | |||||
| //// JSONObject o = arrays.getJSONObject(i); | |||||
| //// try { | |||||
| //// floorIds.add(Long.parseLong(o.getString("floor"))); | |||||
| //// }catch(Exception e) { | |||||
| //// floorName = floorName +","+o.getString("floor"); | |||||
| //// } | |||||
| //// try { | |||||
| //// buildIds.add(Long.parseLong(o.getString("building"))); | |||||
| //// }catch(Exception e) { | |||||
| //// buildingName = buildingName + ","+ o.getString("building"); | |||||
| //// } | |||||
| //// try { | |||||
| //// shopIds.add(Long.parseLong(o.getString("id"))); | |||||
| //// }catch(Exception e) { | |||||
| //// shopNumber = shopNumber +","+o.getString("id"); | |||||
| //// } | |||||
| //// } | |||||
| //// | |||||
| //// WxMallBuilding bq = new WxMallBuilding(); | |||||
| //// bq.setIds(buildIds); | |||||
| //// PageInfo<WxMallBuilding> bpage = buildingService.listAsPage(bq, 1, 1000); | |||||
| //// if (null != bpage && null != bpage.getList()) { | |||||
| //// for (WxMallBuilding wmb : bpage.getList()) { | |||||
| //// buildingName = buildingName +"," + wmb.getBuildingName(); | |||||
| //// } | |||||
| //// } | |||||
| //// | |||||
| //// WxMallFloor fq = new WxMallFloor(); | |||||
| //// fq.setIds(floorIds); | |||||
| //// PageInfo<WxMallFloor> fpage = floorService.listAsPage(fq, 1, 1000); | |||||
| //// if (null != fpage && null != fpage.getList()) { | |||||
| //// for (WxMallFloor wmf : fpage.getList()) { | |||||
| //// floorName = floorName +"," + wmf.getFloorName(); | |||||
| //// } | |||||
| //// } | |||||
| //// | |||||
| //// WxShop ws = new WxShop(); | |||||
| //// ws.setIds(shopIds); | |||||
| //// PageInfo<WxShop> spage = wxShopService.listAsPage(ws, 1, 1000); | |||||
| //// if (null != spage && null != spage.getList()) { | |||||
| //// for (WxShop shop : spage.getList()) { | |||||
| //// shopNumber = shopNumber+","+shop.getShopNumber(); | |||||
| //// } | |||||
| //// } | |||||
| // | // | ||||
| // WxMallFloor fq = new WxMallFloor(); | |||||
| // fq.setIds(floorIds); | |||||
| // PageInfo<WxMallFloor> fpage = floorService.listAsPage(fq, 1, 1000); | |||||
| // if (null != fpage && null != fpage.getList()) { | |||||
| // for (WxMallFloor wmf : fpage.getList()) { | |||||
| // floorName = floorName +"," + wmf.getFloorName(); | |||||
| // } | |||||
| // } | |||||
| // | |||||
| // WxShop ws = new WxShop(); | |||||
| // ws.setIds(shopIds); | |||||
| // PageInfo<WxShop> spage = wxShopService.listAsPage(ws, 1, 1000); | |||||
| // if (null != spage && null != spage.getList()) { | |||||
| // for (WxShop shop : spage.getList()) { | |||||
| // shopNumber = shopNumber+","+shop.getShopNumber(); | |||||
| // } | |||||
| // } | |||||
| wrc.setFloorName(floorName); | |||||
| wrc.setBuildingName(buildingName); | |||||
| wrc.setShopNumber(shopNumber); | |||||
| } | |||||
| } | |||||
| // wrc.setFloorName(floorName); | |||||
| // wrc.setBuildingName(buildingName); | |||||
| // wrc.setShopNumber(shopNumber); | |||||
| // } | |||||
| // | |||||
| // } | |||||
| } | } | ||||
| } | } | ||||
| @@ -0,0 +1,35 @@ | |||||
| ALTER TABLE `wx_rent_contract` ADD COLUMN decimal_size INT(11) NOT NULL DEFAULT 2 COMMENT '金额小数点位数' AFTER `scope_metre`; | |||||
| ALTER TABLE `wx_property_contract` ADD COLUMN decimal_size INT(11) NOT NULL DEFAULT 2 COMMENT '金额小数点位数' AFTER `merchant_id`; | |||||
| ALTER TABLE `wx_rent_contract` modify COLUMN price varchar(30); | |||||
| ALTER TABLE `wx_rent_contract` MODIFY COLUMN `deposit` VARCHAR(30); | |||||
| ALTER TABLE `wx_rent_contract` MODIFY COLUMN `revenue` VARCHAR(30); | |||||
| ALTER TABLE wx_bill_rent MODIFY COLUMN `receive_pay` VARCHAR(30); | |||||
| ALTER TABLE wx_bill_rent MODIFY COLUMN `pay` VARCHAR(30); | |||||
| ALTER TABLE wx_bill_rent MODIFY COLUMN `owe` VARCHAR(30); | |||||
| ALTER TABLE wx_bill_rent MODIFY COLUMN `need_pay` VARCHAR(30); | |||||
| ALTER TABLE wx_bill_rent MODIFY COLUMN `bussiness_manage_fee_need_pay` VARCHAR(30); | |||||
| ALTER TABLE wx_bill_rent MODIFY COLUMN `operating_manage_fee_need_pay` VARCHAR(30); | |||||
| ALTER TABLE wx_bill_rent MODIFY COLUMN `revenue` VARCHAR(30); | |||||
| ALTER TABLE wx_bill_rent MODIFY COLUMN `late_pay_price` VARCHAR(30); | |||||
| ALTER TABLE wx_bill_rent MODIFY COLUMN `join_rent_price` VARCHAR(30); | |||||
| ALTER TABLE wx_bill_rent MODIFY COLUMN `service_charge_pay` VARCHAR(30); | |||||
| ALTER TABLE wx_bill_rent MODIFY COLUMN `service_charge_pay` VARCHAR(30); | |||||
| ALTER TABLE wx_bill_rent_deposit MODIFY COLUMN `receive_pay` VARCHAR(30); | |||||
| ALTER TABLE wx_bill_rent_deposit MODIFY COLUMN `pay` VARCHAR(30); | |||||
| ALTER TABLE wx_bill_rent_deposit MODIFY COLUMN `owe` VARCHAR(30); | |||||
| ALTER TABLE wx_bill_rent_deposit MODIFY COLUMN `need_pay` VARCHAR(30); | |||||
| ALTER TABLE wx_bill_rent_deposit MODIFY COLUMN `return_price` VARCHAR(30); | |||||
| ALTER TABLE wx_bill_rent_deposit MODIFY COLUMN `service_charge_pay` VARCHAR(30); | |||||
| ALTER TABLE wx_bill_rent_manage MODIFY COLUMN `receive_pay` VARCHAR(30); | |||||
| ALTER TABLE wx_bill_rent_manage MODIFY COLUMN `pay` VARCHAR(30); | |||||
| ALTER TABLE wx_bill_rent_manage MODIFY COLUMN `owe` VARCHAR(30); | |||||
| ALTER TABLE wx_bill_rent_manage MODIFY COLUMN `need_pay` VARCHAR(30); | |||||
| ALTER TABLE wx_bill_rent_manage MODIFY COLUMN `late_pay_price` VARCHAR(30); | |||||
| ALTER TABLE wx_bill_rent_manage MODIFY COLUMN `service_charge_pay` VARCHAR(30); | |||||
| @@ -28,9 +28,9 @@ public class WxBillDeposit extends TenantEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value="租金合同ID",name="rentContractId") | @io.swagger.annotations.ApiModelProperty(value="租金合同ID",name="rentContractId") | ||||
| private Long rentContractId; | private Long rentContractId; | ||||
| @io.swagger.annotations.ApiModelProperty(value="实际应收金额",name="receivePay") | @io.swagger.annotations.ApiModelProperty(value="实际应收金额",name="receivePay") | ||||
| private Long receivePay; | |||||
| private String receivePay; | |||||
| @io.swagger.annotations.ApiModelProperty(value="实收金额",name="pay") | @io.swagger.annotations.ApiModelProperty(value="实收金额",name="pay") | ||||
| private Long pay; | |||||
| private String pay; | |||||
| @io.swagger.annotations.ApiModelProperty(value="收款日期",name="receiveDate") | @io.swagger.annotations.ApiModelProperty(value="收款日期",name="receiveDate") | ||||
| private Date receiveDate; | private Date receiveDate; | ||||
| @io.swagger.annotations.ApiModelProperty(value="到账日期",name="payDate") | @io.swagger.annotations.ApiModelProperty(value="到账日期",name="payDate") | ||||
| @@ -41,7 +41,7 @@ public class WxBillDeposit extends TenantEntity { | |||||
| private Long expiredDay; | private Long expiredDay; | ||||
| @io.swagger.annotations.ApiModelProperty(value="欠缴",name="owe") | @io.swagger.annotations.ApiModelProperty(value="欠缴",name="owe") | ||||
| private Long owe; | |||||
| private String owe; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "账单状态1欠缴2待缴3已结清4未到期5已退还", name = "status") | @io.swagger.annotations.ApiModelProperty(value = "账单状态1欠缴2待缴3已结清4未到期5已退还", name = "status") | ||||
| private Integer status; | private Integer status; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "账单审核状态EnumBillRentApplyStatus", name = "applyStatus") | @io.swagger.annotations.ApiModelProperty(value = "账单审核状态EnumBillRentApplyStatus", name = "applyStatus") | ||||
| @@ -53,7 +53,7 @@ public class WxBillDeposit extends TenantEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value="是否删除 是1否0 未到期不显示",name="isDel") | @io.swagger.annotations.ApiModelProperty(value="是否删除 是1否0 未到期不显示",name="isDel") | ||||
| private Integer isDel; | private Integer isDel; | ||||
| @io.swagger.annotations.ApiModelProperty(value="应收金额",name="needPay") | @io.swagger.annotations.ApiModelProperty(value="应收金额",name="needPay") | ||||
| private Long needPay; | |||||
| private String needPay; | |||||
| @io.swagger.annotations.ApiModelProperty(value="商户ID",name="merchantId") | @io.swagger.annotations.ApiModelProperty(value="商户ID",name="merchantId") | ||||
| private Long merchantId; | private Long merchantId; | ||||
| @io.swagger.annotations.ApiModelProperty(value="账号ID",name="userId") | @io.swagger.annotations.ApiModelProperty(value="账号ID",name="userId") | ||||
| @@ -73,7 +73,7 @@ public class WxBillDeposit extends TenantEntity { | |||||
| private Integer rentShopType; | private Integer rentShopType; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "退还金额", name = "returnPrice") | @io.swagger.annotations.ApiModelProperty(value = "退还金额", name = "returnPrice") | ||||
| private Integer returnPrice; | |||||
| private String returnPrice; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "商铺信息", name = "shopInfo") | @io.swagger.annotations.ApiModelProperty(value = "商铺信息", name = "shopInfo") | ||||
| private String shopInfo; | private String shopInfo; | ||||
| @@ -85,11 +85,11 @@ public class WxBillDeposit extends TenantEntity { | |||||
| private Integer freeze; | private Integer freeze; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "手续费", name = "serviceChargePay") | @io.swagger.annotations.ApiModelProperty(value = "手续费", name = "serviceChargePay") | ||||
| private Integer serviceChargePay; | |||||
| private String serviceChargePay; | |||||
| @io.swagger.annotations.ApiModelProperty(value="实际应收金额",name="realReceivePay") | @io.swagger.annotations.ApiModelProperty(value="实际应收金额",name="realReceivePay") | ||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private Long realReceivePay; | |||||
| private String realReceivePay; | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private String serviceChargePayBefore; | private String serviceChargePayBefore; | ||||
| @@ -35,25 +35,25 @@ public class WxBillRent extends TenantEntity { | |||||
| private Long rentContractId; | private Long rentContractId; | ||||
| @io.swagger.annotations.ApiModelProperty(value="应收金额",name="receivePay") | @io.swagger.annotations.ApiModelProperty(value="应收金额",name="receivePay") | ||||
| private Long receivePay; | |||||
| private String receivePay; | |||||
| public String getReceivePayStr() { | |||||
| return new BigDecimal(receivePay == null ? 0 : receivePay).divide(new BigDecimal(100)).toPlainString(); | |||||
| } | |||||
| // public String getReceivePayStr() { | |||||
| // return new BigDecimal(receivePay == null ? 0 : receivePay).divide(new BigDecimal(100)).toPlainString(); | |||||
| // } | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private String receivePayStr; | private String receivePayStr; | ||||
| public String getPayStr() { | |||||
| return new BigDecimal(pay == null ? 0 : pay).divide(new BigDecimal(100)).toPlainString(); | |||||
| } | |||||
| // public String getPayStr() { | |||||
| // return new BigDecimal(pay == null ? 0 : pay).divide(new BigDecimal(100)).toPlainString(); | |||||
| // } | |||||
| @Excel(name = "实收账款(元)", width = 20, orderNum = "9") | @Excel(name = "实收账款(元)", width = 20, orderNum = "9") | ||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private String payStr; | private String payStr; | ||||
| @io.swagger.annotations.ApiModelProperty(value="实收金额",name="pay") | @io.swagger.annotations.ApiModelProperty(value="实收金额",name="pay") | ||||
| private Long pay; | |||||
| private String pay; | |||||
| @Excel(name = "缴款截止日期", format = "yyyy-MM-dd", width = 20, orderNum = "13") | @Excel(name = "缴款截止日期", format = "yyyy-MM-dd", width = 20, orderNum = "13") | ||||
| @io.swagger.annotations.ApiModelProperty(value="收款日期",name="receiveDate") | @io.swagger.annotations.ApiModelProperty(value="收款日期",name="receiveDate") | ||||
| @@ -71,11 +71,11 @@ public class WxBillRent extends TenantEntity { | |||||
| private Long expiredDay; | private Long expiredDay; | ||||
| @io.swagger.annotations.ApiModelProperty(value="欠缴",name="owe") | @io.swagger.annotations.ApiModelProperty(value="欠缴",name="owe") | ||||
| private Long owe; | |||||
| private String owe; | |||||
| public String getOweStr() { | |||||
| return new BigDecimal(owe == null ? 0 : owe).divide(new BigDecimal(100)).toPlainString(); | |||||
| } | |||||
| // public String getOweStr() { | |||||
| // return new BigDecimal(owe == null ? 0 : owe).divide(new BigDecimal(100)).toPlainString(); | |||||
| // } | |||||
| @Excel(name = "欠缴金额(元)", width = 20, orderNum = "11") | @Excel(name = "欠缴金额(元)", width = 20, orderNum = "11") | ||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| @@ -102,9 +102,9 @@ public class WxBillRent extends TenantEntity { | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private String contractNeedPayStr; | private String contractNeedPayStr; | ||||
| public String getContractNeedPayStr() { | |||||
| return new BigDecimal(contractNeedPay == null ? 0 : contractNeedPay).divide(new BigDecimal(100)).toPlainString(); | |||||
| } | |||||
| // public String getContractNeedPayStr() { | |||||
| // return new BigDecimal(contractNeedPay == null ? 0 : contractNeedPay).divide(new BigDecimal(100)).toPlainString(); | |||||
| // } | |||||
| @io.swagger.annotations.ApiModelProperty(value = "合同应收明细", name = "rentPriceInfo") | @io.swagger.annotations.ApiModelProperty(value = "合同应收明细", name = "rentPriceInfo") | ||||
| private String rentPriceInfo; | private String rentPriceInfo; | ||||
| @@ -130,13 +130,13 @@ public class WxBillRent extends TenantEntity { | |||||
| } | } | ||||
| @io.swagger.annotations.ApiModelProperty(value="应收金额",name="needPay") | @io.swagger.annotations.ApiModelProperty(value="应收金额",name="needPay") | ||||
| private Long needPay; | |||||
| private String needPay; | |||||
| @io.swagger.annotations.ApiModelProperty(value="商业管理费应收金额",name="bussinessManageFeeNeedPay") | @io.swagger.annotations.ApiModelProperty(value="商业管理费应收金额",name="bussinessManageFeeNeedPay") | ||||
| private Long bussinessManageFeeNeedPay; | |||||
| private String bussinessManageFeeNeedPay; | |||||
| @io.swagger.annotations.ApiModelProperty(value="运营管理费应收金额",name="operatingManageFeeNeedPay") | @io.swagger.annotations.ApiModelProperty(value="运营管理费应收金额",name="operatingManageFeeNeedPay") | ||||
| private Long operatingManageFeeNeedPay; | |||||
| private String operatingManageFeeNeedPay; | |||||
| @io.swagger.annotations.ApiModelProperty(value="商户ID",name="merchantId") | @io.swagger.annotations.ApiModelProperty(value="商户ID",name="merchantId") | ||||
| private Long merchantId; | private Long merchantId; | ||||
| @@ -166,7 +166,7 @@ public class WxBillRent extends TenantEntity { | |||||
| private Integer rentShopType; | private Integer rentShopType; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "营业额", name = "revenue") | @io.swagger.annotations.ApiModelProperty(value = "营业额", name = "revenue") | ||||
| private Long revenue; | |||||
| private String revenue; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "滞纳金费率", name = "latePayRatio") | @io.swagger.annotations.ApiModelProperty(value = "滞纳金费率", name = "latePayRatio") | ||||
| private Integer latePayRatio; | private Integer latePayRatio; | ||||
| @@ -175,11 +175,11 @@ public class WxBillRent extends TenantEntity { | |||||
| private Date latePayTime; | private Date latePayTime; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "滞纳金总额", name = "latePayPrice") | @io.swagger.annotations.ApiModelProperty(value = "滞纳金总额", name = "latePayPrice") | ||||
| private Long latePayPrice; | |||||
| private String latePayPrice; | |||||
| public String getLatePayPriceStr() { | |||||
| return new BigDecimal(latePayPrice == null ? 0 : latePayPrice).divide(new BigDecimal(100)).toPlainString(); | |||||
| } | |||||
| // public String getLatePayPriceStr() { | |||||
| // return new BigDecimal(latePayPrice == null ? 0 : latePayPrice).divide(new BigDecimal(100)).toPlainString(); | |||||
| // } | |||||
| @Excel(name = "滞纳金(元)", width = 20, orderNum = "12") | @Excel(name = "滞纳金(元)", width = 20, orderNum = "12") | ||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| @@ -220,7 +220,7 @@ public class WxBillRent extends TenantEntity { | |||||
| private Integer rentType; | private Integer rentType; | ||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private Long deposit; | |||||
| private String deposit; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "联营费率", name = "payRatio") | @io.swagger.annotations.ApiModelProperty(value = "联营费率", name = "payRatio") | ||||
| private Long payRatio; | private Long payRatio; | ||||
| @@ -244,7 +244,7 @@ public class WxBillRent extends TenantEntity { | |||||
| private Integer freeze; | private Integer freeze; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "联营租金", name = "joinRentPrice") | @io.swagger.annotations.ApiModelProperty(value = "联营租金", name = "joinRentPrice") | ||||
| private Long joinRentPrice; | |||||
| private String joinRentPrice; | |||||
| @@ -254,19 +254,19 @@ public class WxBillRent extends TenantEntity { | |||||
| private String serviceChargePayUpdate; | private String serviceChargePayUpdate; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "手续费", name = "serviceChargePay") | @io.swagger.annotations.ApiModelProperty(value = "手续费", name = "serviceChargePay") | ||||
| private Integer serviceChargePay; | |||||
| private String serviceChargePay; | |||||
| @io.swagger.annotations.ApiModelProperty(value="实际应收金额",name="realReceivePay") | @io.swagger.annotations.ApiModelProperty(value="实际应收金额",name="realReceivePay") | ||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private Long realReceivePay; | |||||
| private String realReceivePay; | |||||
| @Excel(name = "实际应收总金额(元)", width = 20, orderNum = "8") | @Excel(name = "实际应收总金额(元)", width = 20, orderNum = "8") | ||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private String realReceivePayStr; | private String realReceivePayStr; | ||||
| public String getRealReceivePayStr() { | |||||
| return new BigDecimal(realReceivePay == null ? 0 : realReceivePay).divide(new BigDecimal(100)).toPlainString(); | |||||
| } | |||||
| // public String getRealReceivePayStr() { | |||||
| // return new BigDecimal(realReceivePay == null ? 0 : realReceivePay).divide(new BigDecimal(100)).toPlainString(); | |||||
| // } | |||||
| @io.swagger.annotations.ApiModelProperty(value="楼座号",name="building") | @io.swagger.annotations.ApiModelProperty(value="楼座号",name="building") | ||||
| @@ -36,25 +36,26 @@ public class WxBillRentManage extends TenantEntity { | |||||
| private Long rentContractId; | private Long rentContractId; | ||||
| @io.swagger.annotations.ApiModelProperty(value="应收金额",name="receivePay") | @io.swagger.annotations.ApiModelProperty(value="应收金额",name="receivePay") | ||||
| private Long receivePay; | |||||
| private String receivePay; | |||||
| public String getReceivePayStr() { | |||||
| return new BigDecimal(receivePay == null ? 0 : receivePay).divide(new BigDecimal(100)).toPlainString(); | |||||
| } | |||||
| // public String getReceivePayStr() { | |||||
| // return new BigDecimal(receivePay == null ? 0 : receivePay).divide(new BigDecimal(100)).toPlainString(); | |||||
| // } | |||||
| @TableField(exist = false) | |||||
| private String receivePayStr; | |||||
| // @TableField(exist = false) | |||||
| // private String receivePayStr; | |||||
| public String getPayStr() { | |||||
| return new BigDecimal(pay == null ? 0 : pay).divide(new BigDecimal(100)).toPlainString(); | |||||
| } | |||||
| @Excel(name = "实收账款(元)", width = 20, orderNum = "9") | |||||
| @TableField(exist = false) | |||||
| private String payStr; | |||||
| // public String getPayStr() { | |||||
| // return new BigDecimal(pay == null ? 0 : pay).divide(new BigDecimal(100)).toPlainString(); | |||||
| // } | |||||
| // | |||||
| // @Excel(name = "实收账款(元)", width = 20, orderNum = "9") | |||||
| // @TableField(exist = false) | |||||
| // private String payStr; | |||||
| @io.swagger.annotations.ApiModelProperty(value="实收金额",name="pay") | @io.swagger.annotations.ApiModelProperty(value="实收金额",name="pay") | ||||
| private Long pay; | |||||
| @Excel(name = "实收账款(元)", width = 20, orderNum = "9") | |||||
| private String pay; | |||||
| @Excel(name = "缴款截止日期", format = "yyyy-MM-dd", width = 20, orderNum = "13") | @Excel(name = "缴款截止日期", format = "yyyy-MM-dd", width = 20, orderNum = "13") | ||||
| @io.swagger.annotations.ApiModelProperty(value="收款日期",name="receiveDate") | @io.swagger.annotations.ApiModelProperty(value="收款日期",name="receiveDate") | ||||
| @@ -72,15 +73,16 @@ public class WxBillRentManage extends TenantEntity { | |||||
| private Long expiredDay; | private Long expiredDay; | ||||
| @io.swagger.annotations.ApiModelProperty(value="欠缴",name="owe") | @io.swagger.annotations.ApiModelProperty(value="欠缴",name="owe") | ||||
| private Long owe; | |||||
| public String getOweStr() { | |||||
| return new BigDecimal(owe == null ? 0 : owe).divide(new BigDecimal(100)).toPlainString(); | |||||
| } | |||||
| @Excel(name = "欠缴金额(元)", width = 20, orderNum = "11") | @Excel(name = "欠缴金额(元)", width = 20, orderNum = "11") | ||||
| @TableField(exist = false) | |||||
| private String oweStr; | |||||
| private String owe; | |||||
| // public String getOweStr() { | |||||
| // return new BigDecimal(owe == null ? 0 : owe).divide(new BigDecimal(100)).toPlainString(); | |||||
| // } | |||||
| // | |||||
| // @Excel(name = "欠缴金额(元)", width = 20, orderNum = "11") | |||||
| // @TableField(exist = false) | |||||
| // private String oweStr; | |||||
| @Excel(name = "状态", replace = {"欠缴_1", "待缴_2", "已结清_3", "未到期_4", "已退还_5", "失效_6"}, width = 20, orderNum = "10") | @Excel(name = "状态", replace = {"欠缴_1", "待缴_2", "已结清_3", "未到期_4", "已退还_5", "失效_6"}, width = 20, orderNum = "10") | ||||
| @io.swagger.annotations.ApiModelProperty(value = "账单状态1欠缴2待缴3已结清4未到期", name = "status") | @io.swagger.annotations.ApiModelProperty(value = "账单状态1欠缴2待缴3已结清4未到期", name = "status") | ||||
| @@ -97,7 +99,7 @@ public class WxBillRentManage extends TenantEntity { | |||||
| private Integer isDel; | private Integer isDel; | ||||
| @io.swagger.annotations.ApiModelProperty(value="应收金额",name="needPay") | @io.swagger.annotations.ApiModelProperty(value="应收金额",name="needPay") | ||||
| private Long needPay; | |||||
| private String needPay; | |||||
| @io.swagger.annotations.ApiModelProperty(value="商户ID",name="merchantId") | @io.swagger.annotations.ApiModelProperty(value="商户ID",name="merchantId") | ||||
| private Long merchantId; | private Long merchantId; | ||||
| @@ -129,15 +131,16 @@ public class WxBillRentManage extends TenantEntity { | |||||
| private Date latePayTime; | private Date latePayTime; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "滞纳金总额", name = "latePayPrice") | @io.swagger.annotations.ApiModelProperty(value = "滞纳金总额", name = "latePayPrice") | ||||
| private Long latePayPrice; | |||||
| public String getLatePayPriceStr() { | |||||
| return new BigDecimal(latePayPrice == null ? 0 : latePayPrice).divide(new BigDecimal(100)).toPlainString(); | |||||
| } | |||||
| @Excel(name = "滞纳金(元)", width = 20, orderNum = "12") | @Excel(name = "滞纳金(元)", width = 20, orderNum = "12") | ||||
| @TableField(exist = false) | |||||
| private String latePayPriceStr; | |||||
| private String latePayPrice; | |||||
| // public String getLatePayPriceStr() { | |||||
| // return new BigDecimal(latePayPrice == null ? 0 : latePayPrice).divide(new BigDecimal(100)).toPlainString(); | |||||
| // } | |||||
| // | |||||
| // @Excel(name = "滞纳金(元)", width = 20, orderNum = "12") | |||||
| // @TableField(exist = false) | |||||
| // private String latePayPriceStr; | |||||
| @SortColumn(column = "period") | @SortColumn(column = "period") | ||||
| @io.swagger.annotations.ApiModelProperty(value = "账期", name = "period") | @io.swagger.annotations.ApiModelProperty(value = "账期", name = "period") | ||||
| @@ -172,19 +175,20 @@ public class WxBillRentManage extends TenantEntity { | |||||
| private String serviceChargePayUpdate; | private String serviceChargePayUpdate; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "手续费", name = "serviceChargePay") | @io.swagger.annotations.ApiModelProperty(value = "手续费", name = "serviceChargePay") | ||||
| private Integer serviceChargePay; | |||||
| private String serviceChargePay; | |||||
| @io.swagger.annotations.ApiModelProperty(value="实际应收金额",name="realReceivePay") | @io.swagger.annotations.ApiModelProperty(value="实际应收金额",name="realReceivePay") | ||||
| @TableField(exist = false) | |||||
| private Long realReceivePay; | |||||
| @Excel(name = "实际应收总金额(元)", width = 20, orderNum = "8") | @Excel(name = "实际应收总金额(元)", width = 20, orderNum = "8") | ||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private String realReceivePayStr; | |||||
| private String realReceivePay; | |||||
| public String getRealReceivePayStr() { | |||||
| return new BigDecimal(realReceivePay == null ? 0 : realReceivePay).divide(new BigDecimal(100)).toPlainString(); | |||||
| } | |||||
| // @Excel(name = "实际应收总金额(元)", width = 20, orderNum = "8") | |||||
| // @TableField(exist = false) | |||||
| // private String realReceivePayStr; | |||||
| // | |||||
| // public String getRealReceivePayStr() { | |||||
| // return new BigDecimal(realReceivePay == null ? 0 : realReceivePay).divide(new BigDecimal(100)).toPlainString(); | |||||
| // } | |||||
| @io.swagger.annotations.ApiModelProperty(value="管理费类型,EnumRentContractManageFeeType",name="manageFeeType") | @io.swagger.annotations.ApiModelProperty(value="管理费类型,EnumRentContractManageFeeType",name="manageFeeType") | ||||
| private Integer manageFeeType; | private Integer manageFeeType; | ||||
| @@ -39,6 +39,8 @@ public class WxPropertyContract extends TenantEntity { | |||||
| private String brandName; | private String brandName; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "金额小数点位数", name = "decimalSize") | |||||
| private Integer decimalSize; | |||||
| @io.swagger.annotations.ApiModelProperty(value="商户",name="merchantId") | @io.swagger.annotations.ApiModelProperty(value="商户",name="merchantId") | ||||
| private Long merchantId; | private Long merchantId; | ||||
| /*月租金/分成(分)**/ | /*月租金/分成(分)**/ | ||||
| @@ -53,25 +53,25 @@ public class WxRentContract extends TenantEntity { | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private String buildArea; | private String buildArea; | ||||
| @TableField(exist = false) | |||||
| private String priceStr; | |||||
| public String getPriceStr() { | |||||
| if(price!=null) { | |||||
| priceStr = new BigDecimal(price).divide(new BigDecimal(100)).toString(); | |||||
| } | |||||
| return priceStr; | |||||
| } | |||||
| @TableField(exist = false) | |||||
| private String depositStr; | |||||
| public String getDepositStr() { | |||||
| if(deposit!=null) { | |||||
| depositStr = new BigDecimal(deposit).divide(new BigDecimal(100)).toString(); | |||||
| } | |||||
| return depositStr; | |||||
| } | |||||
| // @TableField(exist = false) | |||||
| // private String priceStr; | |||||
| // public String getPriceStr() { | |||||
| // if(price!=null) { | |||||
| // priceStr = new BigDecimal(price).divide(new BigDecimal(100)).toString(); | |||||
| // } | |||||
| // return priceStr; | |||||
| // } | |||||
| // @TableField(exist = false) | |||||
| // private String depositStr; | |||||
| // | |||||
| // public String getDepositStr() { | |||||
| // if(deposit!=null) { | |||||
| // depositStr = new BigDecimal(deposit).divide(new BigDecimal(100)).toString(); | |||||
| // } | |||||
| // return depositStr; | |||||
| // } | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| @SortColumn(column = "allPeriod") | @SortColumn(column = "allPeriod") | ||||
| @@ -216,11 +216,12 @@ public class WxRentContract extends TenantEntity { | |||||
| // // 乙方税务登记地址 | // // 乙方税务登记地址 | ||||
| // private String taxpayerAdress; | // private String taxpayerAdress; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "金额小数点位数", name = "decimalSize") | |||||
| private Integer decimalSize = 2 ; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "商户", name = "merchantId") | @io.swagger.annotations.ApiModelProperty(value = "商户", name = "merchantId") | ||||
| private Long merchantId; | private Long merchantId; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "月租金/分成(分)", name = "price") | |||||
| private Long price; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "月租金/分成(元)", name = "price") | |||||
| private String price; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "起租开始时间", name = "rentalStartDate") | @io.swagger.annotations.ApiModelProperty(value = "起租开始时间", name = "rentalStartDate") | ||||
| private Date rentalStartDate; | private Date rentalStartDate; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "", name = "rentalEndDate") | @io.swagger.annotations.ApiModelProperty(value = "", name = "rentalEndDate") | ||||
| @@ -237,7 +238,7 @@ public class WxRentContract extends TenantEntity { | |||||
| private List<Integer> statuss; | private List<Integer> statuss; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "押金", name = "deposit") | @io.swagger.annotations.ApiModelProperty(value = "押金", name = "deposit") | ||||
| private Long deposit; | |||||
| private String deposit; | |||||
| // @io.swagger.annotations.ApiModelProperty(value = "押金详细", name = "depositInfo") | // @io.swagger.annotations.ApiModelProperty(value = "押金详细", name = "depositInfo") | ||||
| // private String depositInfo; | // private String depositInfo; | ||||
| @@ -298,7 +299,7 @@ public class WxRentContract extends TenantEntity { | |||||
| private Integer payRatio; | private Integer payRatio; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "保底营业额", name = "revenue") | @io.swagger.annotations.ApiModelProperty(value = "保底营业额", name = "revenue") | ||||
| private Long revenue; | |||||
| private String revenue; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "是否设置保底营业额", name = "revenueRatio") | @io.swagger.annotations.ApiModelProperty(value = "是否设置保底营业额", name = "revenueRatio") | ||||
| private Integer revenueRatio; | private Integer revenueRatio; | ||||
| @@ -350,8 +351,8 @@ public class WxRentContract extends TenantEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value = "审批时带的物业合同编号,租金+物业时用", name = "propertyId") | @io.swagger.annotations.ApiModelProperty(value = "审批时带的物业合同编号,租金+物业时用", name = "propertyId") | ||||
| private Long propertyId; | private Long propertyId; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "租金信息", name = "rentInfo") | |||||
| private String rentInfo; | |||||
| // @io.swagger.annotations.ApiModelProperty(value = "租金信息", name = "rentInfo") | |||||
| // private String rentInfo; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "上传文件名", name = "fileNames") | @io.swagger.annotations.ApiModelProperty(value = "上传文件名", name = "fileNames") | ||||
| private String fileNames; | private String fileNames; | ||||
| @@ -441,13 +442,11 @@ public class WxRentContract extends TenantEntity { | |||||
| } | } | ||||
| } | } | ||||
| public void setRentPriceHandle() { | |||||
| if(StringUtils.isNotBlank(rentPrice)) { | |||||
| rentPrice = new BigDecimal(rentPrice).multiply(new BigDecimal(100)).toPlainString(); | |||||
| } else { | |||||
| rentPrice = "0"; | |||||
| } | |||||
| } | |||||
| // public void setRentPriceHandle() { | |||||
| // if(StringUtils.isBlank(rentPrice)) { | |||||
| // rentPrice = "0"; | |||||
| // } | |||||
| // } | |||||
| @io.swagger.annotations.ApiModelProperty(value = "合同类型", name = "contractType") | @io.swagger.annotations.ApiModelProperty(value = "合同类型", name = "contractType") | ||||
| @@ -7,7 +7,7 @@ public class RatioVo { | |||||
| //扣点率 | //扣点率 | ||||
| private Integer ratio = 0; | private Integer ratio = 0; | ||||
| //金额 | //金额 | ||||
| private Long price = 0l; | |||||
| private String price = "0"; | |||||
| private String useRatio = ""; | private String useRatio = ""; | ||||
| } | } | ||||
| @@ -25,7 +25,7 @@ import java.util.List; | |||||
| public class WxRentContractHelper { | public class WxRentContractHelper { | ||||
| //计算商业管理费 | //计算商业管理费 | ||||
| public static long[] calcuteBussinessManagementFee(WxRentContract wxRentContract) { | |||||
| public static String[] calcuteBussinessManagementFee(WxRentContract wxRentContract) { | |||||
| if ("[]".equals(StringUtils.trimToEmpty(wxRentContract.getBussinessManagementFeeRatio()))) { | if ("[]".equals(StringUtils.trimToEmpty(wxRentContract.getBussinessManagementFeeRatio()))) { | ||||
| return null; | return null; | ||||
| } | } | ||||
| @@ -34,7 +34,7 @@ public class WxRentContractHelper { | |||||
| } | } | ||||
| //计算营业管理费 | //计算营业管理费 | ||||
| public static long[] calcuteOperatingManagementFee(WxRentContract wxRentContract) { | |||||
| public static String[] calcuteOperatingManagementFee(WxRentContract wxRentContract) { | |||||
| if ("[]".equals(StringUtils.trimToEmpty(wxRentContract.getOperatingManagementFeeRatio()))) { | if ("[]".equals(StringUtils.trimToEmpty(wxRentContract.getOperatingManagementFeeRatio()))) { | ||||
| return null; | return null; | ||||
| } | } | ||||
| @@ -43,13 +43,13 @@ public class WxRentContractHelper { | |||||
| } | } | ||||
| //计算除租金外其他可调整费项(按面积计算) | //计算除租金外其他可调整费项(按面积计算) | ||||
| private static long[] calcuteOtherCanAdjustFeeByArea(WxRentContract wxRentContract,String fee,Integer ratioWay,String ratio,String feeField,String feeRatioField) { | |||||
| private static String[] calcuteOtherCanAdjustFeeByArea(WxRentContract wxRentContract,String fee,Integer ratioWay,String ratio,String feeField,String feeRatioField) { | |||||
| if (wxRentContract.getType().equals(EnumRentContractType.RENT_BY_AREA.getCode()) || | if (wxRentContract.getType().equals(EnumRentContractType.RENT_BY_AREA.getCode()) || | ||||
| wxRentContract.getType().equals(EnumRentContractType.RENT_BY_AREA_AND_JOINT.getCode())) { | wxRentContract.getType().equals(EnumRentContractType.RENT_BY_AREA_AND_JOINT.getCode())) { | ||||
| if (wxRentContract.getRentInputWay().equals(EnumRentContractRentInputWay.PART.getCode())) { | if (wxRentContract.getRentInputWay().equals(EnumRentContractRentInputWay.PART.getCode())) { | ||||
| //第一年,根据面积来计算 | //第一年,根据面积来计算 | ||||
| JSONArray rentInfoArray = JSONArray.parseArray(wxRentContract.getRentInfo()); | JSONArray rentInfoArray = JSONArray.parseArray(wxRentContract.getRentInfo()); | ||||
| long[] priceArr = new long[rentInfoArray.size()]; | |||||
| String[] priceArr = new String[rentInfoArray.size()]; | |||||
| for (int i = 0; i < rentInfoArray.size(); i++) { | for (int i = 0; i < rentInfoArray.size(); i++) { | ||||
| JSONObject rentInfoObject = rentInfoArray.getJSONObject(i); | JSONObject rentInfoObject = rentInfoArray.getJSONObject(i); | ||||
| //商业管理费单价 | //商业管理费单价 | ||||
| @@ -62,9 +62,10 @@ public class WxRentContractHelper { | |||||
| if (rentArea == null || rentArea.equalsIgnoreCase("NaN")) { | if (rentArea == null || rentArea.equalsIgnoreCase("NaN")) { | ||||
| rentArea = "0"; | rentArea = "0"; | ||||
| } | } | ||||
| priceArr[i] = new BigDecimal(priceStr).multiply(new BigDecimal(rentArea)).multiply(new BigDecimal(100)).longValue(); | |||||
| priceArr[i] = new BigDecimal(priceStr).multiply(new BigDecimal(rentArea)).toPlainString(); | |||||
| } | } | ||||
| List<long[]> priceList = computeRatioByShop(rentInfoArray,wxRentContract.getBussinessManagementFeeRatioWay(),priceArr,feeRatioField); | |||||
| List<String[]> priceList = computeRatioByShop(wxRentContract.getDecimalSize(),rentInfoArray,wxRentContract.getBussinessManagementFeeRatioWay(),priceArr,feeRatioField); | |||||
| if (null != priceList) { | if (null != priceList) { | ||||
| return calcuteRatioByPart(priceList, feeRatioField); | return calcuteRatioByPart(priceList, feeRatioField); | ||||
| }else { | }else { | ||||
| @@ -78,8 +79,8 @@ public class WxRentContractHelper { | |||||
| if (rentArea == null || rentArea.equalsIgnoreCase("NaN")) { | if (rentArea == null || rentArea.equalsIgnoreCase("NaN")) { | ||||
| rentArea = "0"; | rentArea = "0"; | ||||
| } | } | ||||
| Long ratioFirstYearPrice = new BigDecimal(fee).multiply(new BigDecimal(100)).multiply(new BigDecimal(rentArea)).longValue(); | |||||
| return calcuteRatioByJoin(ratioWay, ratio, ratioFirstYearPrice); | |||||
| String ratioFirstYearPrice = new BigDecimal(fee).multiply(new BigDecimal(rentArea)).toPlainString(); | |||||
| return calcuteRatioByJoin(wxRentContract.getDecimalSize(),ratioWay, ratio, ratioFirstYearPrice); | |||||
| } | } | ||||
| } | } | ||||
| return null; | return null; | ||||
| @@ -87,13 +88,13 @@ public class WxRentContractHelper { | |||||
| //计算年租金 | //计算年租金 | ||||
| public static long[] calcuteRentPrice(WxRentContract wxRentContract) { | |||||
| public static String[] calcuteRentPrice(WxRentContract wxRentContract) { | |||||
| if (wxRentContract.getType().equals(EnumRentContractType.RENT_BY_AREA.getCode()) || | if (wxRentContract.getType().equals(EnumRentContractType.RENT_BY_AREA.getCode()) || | ||||
| wxRentContract.getType().equals(EnumRentContractType.RENT_BY_AREA_AND_JOINT.getCode())) { | wxRentContract.getType().equals(EnumRentContractType.RENT_BY_AREA_AND_JOINT.getCode())) { | ||||
| if (wxRentContract.getRentInputWay().equals(EnumRentContractRentInputWay.PART.getCode())) { | if (wxRentContract.getRentInputWay().equals(EnumRentContractRentInputWay.PART.getCode())) { | ||||
| //计算每年租金基数(按面积,分铺录入) | //计算每年租金基数(按面积,分铺录入) | ||||
| //第一年 | //第一年 | ||||
| List<long[]> priceList = computeRentPriceByShop(wxRentContract); | |||||
| List<String[]> priceList = computeRentPriceByShop(wxRentContract); | |||||
| return calcuteRatioByPart(priceList, "adjustRatio"); | return calcuteRatioByPart(priceList, "adjustRatio"); | ||||
| }else { | }else { | ||||
| return calcuteRentPriceByJoin(wxRentContract); | return calcuteRentPriceByJoin(wxRentContract); | ||||
| @@ -103,27 +104,27 @@ public class WxRentContractHelper { | |||||
| } | } | ||||
| //计算单个店铺每年租金基数(分铺录入) | //计算单个店铺每年租金基数(分铺录入) | ||||
| public static List<long[]> computeRentPriceByShop(WxRentContract wxRentContract) { | |||||
| public static List<String[]> computeRentPriceByShop(WxRentContract wxRentContract) { | |||||
| JSONArray rentInfoArray = JSONArray.parseArray(wxRentContract.getRentInfo()); | JSONArray rentInfoArray = JSONArray.parseArray(wxRentContract.getRentInfo()); | ||||
| long[] priceArr = new long[rentInfoArray.size()]; | |||||
| String[] priceArr = new String[rentInfoArray.size()]; | |||||
| for (int i = 0; i < rentInfoArray.size(); i++) { | for (int i = 0; i < rentInfoArray.size(); i++) { | ||||
| JSONObject rentInfoObject = rentInfoArray.getJSONObject(i); | JSONObject rentInfoObject = rentInfoArray.getJSONObject(i); | ||||
| String priceStr = rentInfoObject.getString("price"); | String priceStr = rentInfoObject.getString("price"); | ||||
| if (priceStr == null || priceStr.equalsIgnoreCase("NaN")) { | if (priceStr == null || priceStr.equalsIgnoreCase("NaN")) { | ||||
| priceStr = "0"; | priceStr = "0"; | ||||
| } | } | ||||
| priceArr[i] = new BigDecimal(priceStr).multiply(new BigDecimal(100)).longValue(); | |||||
| priceArr[i] = priceStr; | |||||
| } | } | ||||
| return computeRatioByShop(rentInfoArray,wxRentContract.getAdjustRatioWay(),priceArr,"adjustRatio"); | |||||
| return computeRatioByShop(wxRentContract.getDecimalSize(),rentInfoArray,wxRentContract.getAdjustRatioWay(),priceArr,"adjustRatio"); | |||||
| } | } | ||||
| //计算每年租金基数(合铺录入) | //计算每年租金基数(合铺录入) | ||||
| private static long[] calcuteRentPriceByJoin(WxRentContract wxRentContract) { | |||||
| private static String[] calcuteRentPriceByJoin(WxRentContract wxRentContract) { | |||||
| String adjustRatio = wxRentContract.getAdjustRatio(); | String adjustRatio = wxRentContract.getAdjustRatio(); | ||||
| List<Integer> integers = JSONArray.parseArray(adjustRatio, Integer.class); | List<Integer> integers = JSONArray.parseArray(adjustRatio, Integer.class); | ||||
| integers.add(0, 0); | integers.add(0, 0); | ||||
| int size = integers.size(); | int size = integers.size(); | ||||
| long[] priceArrs = new long[size]; | |||||
| String[] priceArrs = new String[size]; | |||||
| priceArrs[0] = wxRentContract.getPrice(); | priceArrs[0] = wxRentContract.getPrice(); | ||||
| BigDecimal priceD = new BigDecimal(wxRentContract.getPrice()); | BigDecimal priceD = new BigDecimal(wxRentContract.getPrice()); | ||||
| @@ -138,32 +139,34 @@ public class WxRentContractHelper { | |||||
| revenueYears.add(0,0L); | revenueYears.add(0,0L); | ||||
| //联营扣点取高单独计算联营扣点调整。 | //联营扣点取高单独计算联营扣点调整。 | ||||
| long[] revenuePriceArrs = calcuteRevenuePriceByRentAreaJoint(wxRentContract,revenueYears,size); | |||||
| String[] revenuePriceArrs = calcuteRevenuePriceByRentAreaJoint(wxRentContract,revenueYears,size); | |||||
| if (wxRentContract.getAdjustRatioWay().equals(EnumRentContractAdjustRatioWay.RATIO.getCode())) { | if (wxRentContract.getAdjustRatioWay().equals(EnumRentContractAdjustRatioWay.RATIO.getCode())) { | ||||
| for (int i = 1; i < size; i++) { | for (int i = 1; i < size; i++) { | ||||
| BigDecimal divide = priceD.multiply(new BigDecimal(integers.get(i))).divide(new BigDecimal(10000)); | BigDecimal divide = priceD.multiply(new BigDecimal(integers.get(i))).divide(new BigDecimal(10000)); | ||||
| priceD = priceD.add(divide); | priceD = priceD.add(divide); | ||||
| priceArrs[i] = priceD.setScale(0, RoundingMode.HALF_EVEN).longValue(); | |||||
| priceArrs[i] = priceD.setScale(wxRentContract.getDecimalSize(), RoundingMode.HALF_EVEN).toPlainString(); | |||||
| } | } | ||||
| } else if (wxRentContract.getAdjustRatioWay().equals(EnumRentContractAdjustRatioWay.MONEY.getCode())) { | } else if (wxRentContract.getAdjustRatioWay().equals(EnumRentContractAdjustRatioWay.MONEY.getCode())) { | ||||
| for (int i = 1; i < size; i++) { | for (int i = 1; i < size; i++) { | ||||
| priceD = priceD.add(new BigDecimal(integers.get(i))); | priceD = priceD.add(new BigDecimal(integers.get(i))); | ||||
| priceArrs[i] = priceD.setScale(0, RoundingMode.HALF_EVEN).longValue(); | |||||
| priceArrs[i] = priceD.setScale(wxRentContract.getDecimalSize(), RoundingMode.HALF_EVEN).toPlainString(); | |||||
| } | } | ||||
| } else if (wxRentContract.getAdjustRatioWay().equals(EnumRentContractAdjustRatioWay.CUSTOM.getCode())){ | } else if (wxRentContract.getAdjustRatioWay().equals(EnumRentContractAdjustRatioWay.CUSTOM.getCode())){ | ||||
| for (int i = 1; i < size; i++) { | for (int i = 1; i < size; i++) { | ||||
| if (wxRentContract.getType().equals(EnumRentContractType.RENT_BY_JOINT.getCode())) { | if (wxRentContract.getType().equals(EnumRentContractType.RENT_BY_JOINT.getCode())) { | ||||
| if (EnumMissTimeType.YEAR.getCode().equals(wxRentContract.getBusDiscountTime())) { | if (EnumMissTimeType.YEAR.getCode().equals(wxRentContract.getBusDiscountTime())) { | ||||
| priceArrs[i] = new BigDecimal(integers.get(i)).multiply(new BigDecimal(12)).setScale(0, RoundingMode.HALF_EVEN).longValue(); | |||||
| priceArrs[i] = new BigDecimal(integers.get(i)).multiply(new BigDecimal(12)) | |||||
| .setScale(wxRentContract.getDecimalSize(), RoundingMode.HALF_EVEN).toPlainString(); | |||||
| continue; | continue; | ||||
| } | } | ||||
| if (EnumMissTimeType.PERIOD.getCode().equals(wxRentContract.getBusDiscountTime())) { | if (EnumMissTimeType.PERIOD.getCode().equals(wxRentContract.getBusDiscountTime())) { | ||||
| priceArrs[i] = new BigDecimal(integers.get(i)).multiply(new BigDecimal(wxRentContract.getReceivePeriod())).setScale(0, RoundingMode.HALF_EVEN).longValue(); | |||||
| priceArrs[i] = new BigDecimal(integers.get(i)).multiply(new BigDecimal(wxRentContract.getReceivePeriod())) | |||||
| .setScale(wxRentContract.getDecimalSize(), RoundingMode.HALF_EVEN).toPlainString(); | |||||
| continue; | continue; | ||||
| } | } | ||||
| } | } | ||||
| priceArrs[i] = new BigDecimal(integers.get(i)).setScale(0, RoundingMode.HALF_EVEN).longValue(); | |||||
| priceArrs[i] = new BigDecimal(integers.get(i)).setScale(wxRentContract.getDecimalSize(), RoundingMode.HALF_EVEN).toPlainString(); | |||||
| } | } | ||||
| }else if (wxRentContract.getAdjustRatioWay().equals(EnumRentContractAdjustRatioWay.FIX_RATIO.getCode())){ | }else if (wxRentContract.getAdjustRatioWay().equals(EnumRentContractAdjustRatioWay.FIX_RATIO.getCode())){ | ||||
| for (int i = 1; i < size; i++) { | for (int i = 1; i < size; i++) { | ||||
| @@ -176,22 +179,23 @@ public class WxRentContractHelper { | |||||
| } | } | ||||
| if (wxRentContract.getType().equals(EnumRentContractType.RENT_BY_JOINT.getCode())) { | if (wxRentContract.getType().equals(EnumRentContractType.RENT_BY_JOINT.getCode())) { | ||||
| if (EnumMissTimeType.YEAR.getCode().equals(wxRentContract.getBusDiscountTime())) { | if (EnumMissTimeType.YEAR.getCode().equals(wxRentContract.getBusDiscountTime())) { | ||||
| priceArrs[i] = _p.multiply(new BigDecimal(12)).setScale(0, RoundingMode.HALF_EVEN).longValue(); | |||||
| priceArrs[i] = _p.multiply(new BigDecimal(12)).setScale(wxRentContract.getDecimalSize(), RoundingMode.HALF_EVEN).toPlainString(); | |||||
| continue; | continue; | ||||
| } | } | ||||
| if (EnumMissTimeType.PERIOD.getCode().equals(wxRentContract.getBusDiscountTime())) { | if (EnumMissTimeType.PERIOD.getCode().equals(wxRentContract.getBusDiscountTime())) { | ||||
| priceArrs[i] = _p.multiply(new BigDecimal(wxRentContract.getReceivePeriod())).setScale(0, RoundingMode.HALF_EVEN).longValue(); | |||||
| priceArrs[i] = _p.multiply(new BigDecimal(wxRentContract.getReceivePeriod())) | |||||
| .setScale(wxRentContract.getDecimalSize(), RoundingMode.HALF_EVEN).toPlainString(); | |||||
| continue; | continue; | ||||
| } | } | ||||
| } | } | ||||
| priceArrs[i] = _p.setScale(0, RoundingMode.HALF_EVEN).longValue(); | |||||
| priceArrs[i] = _p.setScale(wxRentContract.getDecimalSize(), RoundingMode.HALF_EVEN).toPlainString(); | |||||
| } | } | ||||
| } | } | ||||
| //租金和联营取高 | //租金和联营取高 | ||||
| if (wxRentContract.getType().equals(EnumRentContractType.RENT_BY_AREA_AND_JOINT.getCode())) { | if (wxRentContract.getType().equals(EnumRentContractType.RENT_BY_AREA_AND_JOINT.getCode())) { | ||||
| for (int i = 0 ; i < priceArrs.length; i ++) { | for (int i = 0 ; i < priceArrs.length; i ++) { | ||||
| if (priceArrs[i] < revenuePriceArrs[i]) { | |||||
| if (new BigDecimal(priceArrs[i]).compareTo(new BigDecimal(revenuePriceArrs[i])) < 0) { | |||||
| priceArrs[i] = revenuePriceArrs[i]; | priceArrs[i] = revenuePriceArrs[i]; | ||||
| } | } | ||||
| } | } | ||||
| @@ -201,11 +205,12 @@ public class WxRentContractHelper { | |||||
| } | } | ||||
| //联营面积取高计算联营扣点调整。 | //联营面积取高计算联营扣点调整。 | ||||
| private static long[] calcuteRevenuePriceByRentAreaJoint(WxRentContract wxRentContract,List<Long> revenueYears,int size) { | |||||
| private static String[] calcuteRevenuePriceByRentAreaJoint(WxRentContract wxRentContract,List<Long> revenueYears,int size) { | |||||
| //联营面积取高时,联营扣点调整比率设置 | //联营面积取高时,联营扣点调整比率设置 | ||||
| long[] revenuePriceArrs = new long[size]; | |||||
| String[] revenuePriceArrs = new String[size]; | |||||
| if (wxRentContract.getType().equals(EnumRentContractType.RENT_BY_AREA_AND_JOINT.getCode())) { | if (wxRentContract.getType().equals(EnumRentContractType.RENT_BY_AREA_AND_JOINT.getCode())) { | ||||
| long _revenuePriceD = wxRentContract.getRevenue()*wxRentContract.getPayRatio()/10000; | |||||
| String _revenuePriceD = new BigDecimal(wxRentContract.getRevenue()).multiply(new BigDecimal(wxRentContract.getPayRatio())) | |||||
| .divide(new BigDecimal(100)).setScale(wxRentContract.getDecimalSize(), RoundingMode.HALF_EVEN).toPlainString(); | |||||
| revenuePriceArrs[0] = _revenuePriceD; | revenuePriceArrs[0] = _revenuePriceD; | ||||
| BigDecimal revenuePriceD = new BigDecimal(_revenuePriceD); | BigDecimal revenuePriceD = new BigDecimal(_revenuePriceD); | ||||
| //联营扣点调整比率 | //联营扣点调整比率 | ||||
| @@ -225,28 +230,31 @@ public class WxRentContractHelper { | |||||
| BigDecimal _p = new BigDecimal(revenueYears.get(i)).multiply(new BigDecimal(revenueRationSets.get(i))).divide(new BigDecimal(10000)); | BigDecimal _p = new BigDecimal(revenueYears.get(i)).multiply(new BigDecimal(revenueRationSets.get(i))).divide(new BigDecimal(10000)); | ||||
| revenuePriceD = revenuePriceD.add(_p); | revenuePriceD = revenuePriceD.add(_p); | ||||
| } | } | ||||
| revenuePriceArrs[i] = revenuePriceD.setScale(0, RoundingMode.HALF_EVEN).longValue(); | |||||
| revenuePriceArrs[i] = revenuePriceD.setScale(wxRentContract.getDecimalSize(), RoundingMode.HALF_EVEN).toPlainString(); | |||||
| } | } | ||||
| } else if (wxRentContract.getRevenueRatioWay().equals(EnumRentContractAdjustRatioWay.MONEY.getCode())) { | } else if (wxRentContract.getRevenueRatioWay().equals(EnumRentContractAdjustRatioWay.MONEY.getCode())) { | ||||
| for (int i = 1; i < size; i++) { | for (int i = 1; i < size; i++) { | ||||
| if (revenueYears.size() == size && revenueRationSets.size() == size) { | if (revenueYears.size() == size && revenueRationSets.size() == size) { | ||||
| revenuePriceD = revenuePriceD.add(new BigDecimal(revenueRationSets.get(i))); | revenuePriceD = revenuePriceD.add(new BigDecimal(revenueRationSets.get(i))); | ||||
| } | } | ||||
| revenuePriceArrs[i] = revenuePriceD.setScale(0, RoundingMode.HALF_EVEN).longValue(); | |||||
| revenuePriceArrs[i] = revenuePriceD.setScale(wxRentContract.getDecimalSize(), RoundingMode.HALF_EVEN).toPlainString(); | |||||
| } | } | ||||
| } else if (wxRentContract.getRevenueRatioWay().equals(EnumRentContractAdjustRatioWay.CUSTOM.getCode())){ | } else if (wxRentContract.getRevenueRatioWay().equals(EnumRentContractAdjustRatioWay.CUSTOM.getCode())){ | ||||
| for (int i = 1; i < size; i++) { | for (int i = 1; i < size; i++) { | ||||
| if (wxRentContract.getType().equals(EnumRentContractType.RENT_BY_JOINT.getCode())) { | if (wxRentContract.getType().equals(EnumRentContractType.RENT_BY_JOINT.getCode())) { | ||||
| if (EnumMissTimeType.YEAR.getCode().equals(wxRentContract.getBusDiscountTime())) { | if (EnumMissTimeType.YEAR.getCode().equals(wxRentContract.getBusDiscountTime())) { | ||||
| revenuePriceArrs[i] = new BigDecimal(revenueRationSets.get(i)).multiply(new BigDecimal(12)).setScale(0, RoundingMode.HALF_EVEN).longValue(); | |||||
| revenuePriceArrs[i] = new BigDecimal(revenueRationSets.get(i)).multiply(new BigDecimal(12)) | |||||
| .setScale(wxRentContract.getDecimalSize(), RoundingMode.HALF_EVEN).toPlainString(); | |||||
| continue; | continue; | ||||
| } | } | ||||
| if (EnumMissTimeType.PERIOD.getCode().equals(wxRentContract.getBusDiscountTime())) { | if (EnumMissTimeType.PERIOD.getCode().equals(wxRentContract.getBusDiscountTime())) { | ||||
| revenuePriceArrs[i] = new BigDecimal(revenueRationSets.get(i)).multiply(new BigDecimal(wxRentContract.getReceivePeriod())).setScale(0, RoundingMode.HALF_EVEN).longValue(); | |||||
| revenuePriceArrs[i] = new BigDecimal(revenueRationSets.get(i)).multiply(new BigDecimal(wxRentContract.getReceivePeriod())) | |||||
| .setScale(wxRentContract.getDecimalSize(), RoundingMode.HALF_EVEN).toPlainString(); | |||||
| continue; | continue; | ||||
| } | } | ||||
| } | } | ||||
| revenuePriceArrs[i] = new BigDecimal(revenueRationSets.get(i)).setScale(0, RoundingMode.HALF_EVEN).longValue(); | |||||
| revenuePriceArrs[i] = new BigDecimal(revenueRationSets.get(i)) | |||||
| .setScale(wxRentContract.getDecimalSize(), RoundingMode.HALF_EVEN).toPlainString(); | |||||
| } | } | ||||
| }else if (wxRentContract.getRevenueRatioWay().equals(EnumRentContractAdjustRatioWay.FIX_RATIO.getCode())){ | }else if (wxRentContract.getRevenueRatioWay().equals(EnumRentContractAdjustRatioWay.FIX_RATIO.getCode())){ | ||||
| for (int i = 1; i < size; i++) { | for (int i = 1; i < size; i++) { | ||||
| @@ -256,15 +264,17 @@ public class WxRentContractHelper { | |||||
| } | } | ||||
| if (wxRentContract.getType().equals(EnumRentContractType.RENT_BY_JOINT.getCode())) { | if (wxRentContract.getType().equals(EnumRentContractType.RENT_BY_JOINT.getCode())) { | ||||
| if (EnumMissTimeType.YEAR.getCode().equals(wxRentContract.getBusDiscountTime())) { | if (EnumMissTimeType.YEAR.getCode().equals(wxRentContract.getBusDiscountTime())) { | ||||
| revenuePriceArrs[i] = _p.multiply(new BigDecimal(12)).setScale(0, RoundingMode.HALF_EVEN).longValue(); | |||||
| revenuePriceArrs[i] = _p.multiply(new BigDecimal(12)) | |||||
| .setScale(wxRentContract.getDecimalSize(), RoundingMode.HALF_EVEN).toPlainString(); | |||||
| continue; | continue; | ||||
| } | } | ||||
| if (EnumMissTimeType.PERIOD.getCode().equals(wxRentContract.getBusDiscountTime())) { | if (EnumMissTimeType.PERIOD.getCode().equals(wxRentContract.getBusDiscountTime())) { | ||||
| revenuePriceArrs[i] = _p.multiply(new BigDecimal(wxRentContract.getReceivePeriod())).setScale(0, RoundingMode.HALF_EVEN).longValue(); | |||||
| revenuePriceArrs[i] = _p.multiply(new BigDecimal(wxRentContract.getReceivePeriod())) | |||||
| .setScale(wxRentContract.getDecimalSize(), RoundingMode.HALF_EVEN).toPlainString(); | |||||
| continue; | continue; | ||||
| } | } | ||||
| } | } | ||||
| revenuePriceArrs[i] = _p.setScale(0, RoundingMode.HALF_EVEN).longValue(); | |||||
| revenuePriceArrs[i] = _p.setScale(wxRentContract.getDecimalSize(), RoundingMode.HALF_EVEN).toPlainString(); | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| @@ -273,33 +283,33 @@ public class WxRentContractHelper { | |||||
| //合铺计算某项计费 | //合铺计算某项计费 | ||||
| private static long[] calcuteRatioByJoin(Integer ratioWay,String ratio,Long ratioFirstYearPrice) { | |||||
| private static String[] calcuteRatioByJoin(Integer decimalSize,Integer ratioWay,String ratio,String ratioFirstYearPrice) { | |||||
| List<Integer> integers = JSONArray.parseArray(ratio, Integer.class); | List<Integer> integers = JSONArray.parseArray(ratio, Integer.class); | ||||
| integers.add(0, 0); | integers.add(0, 0); | ||||
| int size = integers.size(); | int size = integers.size(); | ||||
| long[] priceArrs = new long[size]; | |||||
| String[] priceArrs = new String[size]; | |||||
| priceArrs[0] = ratioFirstYearPrice; | priceArrs[0] = ratioFirstYearPrice; | ||||
| BigDecimal priceD = new BigDecimal(ratioFirstYearPrice); | BigDecimal priceD = new BigDecimal(ratioFirstYearPrice); | ||||
| if (ratioWay.equals(EnumRentContractAdjustRatioWay.RATIO.getCode())) { | if (ratioWay.equals(EnumRentContractAdjustRatioWay.RATIO.getCode())) { | ||||
| for (int i = 1; i < size; i++) { | for (int i = 1; i < size; i++) { | ||||
| BigDecimal divide = priceD.multiply(new BigDecimal(integers.get(i))).divide(new BigDecimal(10000)); | |||||
| BigDecimal divide = priceD.multiply(new BigDecimal(integers.get(i))).divide(new BigDecimal(100)); | |||||
| priceD = priceD.add(divide); | priceD = priceD.add(divide); | ||||
| priceArrs[i] = priceD.setScale(0, RoundingMode.HALF_EVEN).longValue(); | |||||
| priceArrs[i] = priceD.setScale(decimalSize, RoundingMode.HALF_EVEN).toPlainString(); | |||||
| } | } | ||||
| } else if (ratioWay.equals(EnumRentContractAdjustRatioWay.MONEY.getCode())) { | } else if (ratioWay.equals(EnumRentContractAdjustRatioWay.MONEY.getCode())) { | ||||
| for (int i = 1; i < size; i++) { | for (int i = 1; i < size; i++) { | ||||
| priceD = priceD.add(new BigDecimal(integers.get(i))); | priceD = priceD.add(new BigDecimal(integers.get(i))); | ||||
| priceArrs[i] = priceD.setScale(0, RoundingMode.HALF_EVEN).longValue(); | |||||
| priceArrs[i] = priceD.setScale(decimalSize, RoundingMode.HALF_EVEN).toPlainString(); | |||||
| } | } | ||||
| } else if (ratioWay.equals(EnumRentContractAdjustRatioWay.CUSTOM.getCode())){ | } else if (ratioWay.equals(EnumRentContractAdjustRatioWay.CUSTOM.getCode())){ | ||||
| for (int i = 1; i < size; i++) { | for (int i = 1; i < size; i++) { | ||||
| priceArrs[i] = new BigDecimal(integers.get(i)).setScale(0, RoundingMode.HALF_EVEN).longValue(); | |||||
| priceArrs[i] = new BigDecimal(integers.get(i)).setScale(decimalSize, RoundingMode.HALF_EVEN).toPlainString(); | |||||
| } | } | ||||
| }else if (ratioWay.equals(EnumRentContractAdjustRatioWay.FIX_RATIO.getCode())){ | }else if (ratioWay.equals(EnumRentContractAdjustRatioWay.FIX_RATIO.getCode())){ | ||||
| for (int i = 1; i < size; i++) { | for (int i = 1; i < size; i++) { | ||||
| BigDecimal _p = priceD.multiply(new BigDecimal(integers.get(i))).divide(new BigDecimal(10000)); | |||||
| priceArrs[i] = _p.setScale(0, RoundingMode.HALF_EVEN).longValue(); | |||||
| BigDecimal _p = priceD.multiply(new BigDecimal(integers.get(i))).divide(new BigDecimal(100)); | |||||
| priceArrs[i] = _p.setScale(decimalSize, RoundingMode.HALF_EVEN).toPlainString(); | |||||
| } | } | ||||
| } | } | ||||
| return priceArrs; | return priceArrs; | ||||
| @@ -307,38 +317,38 @@ public class WxRentContractHelper { | |||||
| //分铺汇总计算某项计费 | //分铺汇总计算某项计费 | ||||
| private static long[] calcuteRatioByPart(List<long[]> priceList,String ratioKey){ | |||||
| private static String[] calcuteRatioByPart(List<String[]> priceList,String ratioKey){ | |||||
| //通过rentInfo里面分别计算各商铺的金额 | //通过rentInfo里面分别计算各商铺的金额 | ||||
| long[] priceArrs = new long[priceList.size()]; | |||||
| String[] priceArrs = new String[priceList.size()]; | |||||
| for (int i = 0; i < priceList.size(); i++) { | for (int i = 0; i < priceList.size(); i++) { | ||||
| long[] priceInt = priceList.get(i); | |||||
| long sum = 0; | |||||
| for (long p : priceInt) { | |||||
| sum += p; | |||||
| String[] priceInt = priceList.get(i); | |||||
| BigDecimal sum = new BigDecimal(0); | |||||
| for (String p : priceInt) { | |||||
| sum = sum.add(new BigDecimal(p)); | |||||
| } | } | ||||
| priceArrs[i] = sum; | |||||
| priceArrs[i] = sum.toPlainString(); | |||||
| } | } | ||||
| return priceArrs; | return priceArrs; | ||||
| } | } | ||||
| //计算某项金额,每年-每个店铺金额 | //计算某项金额,每年-每个店铺金额 | ||||
| public static List<long[]> computeRatioByShop(JSONArray rentInfoArray, Integer ratioWayType,long[] firstYearPrces,String ratioKey) { | |||||
| List<long[]> priceList = new ArrayList<>(); | |||||
| public static List<String[]> computeRatioByShop(Integer decimalSize,JSONArray rentInfoArray, Integer ratioWayType,String[] firstYearPrces,String ratioKey) { | |||||
| List<String[]> priceList = new ArrayList<>(); | |||||
| priceList.add(firstYearPrces); //每个店铺每月租金 | priceList.add(firstYearPrces); //每个店铺每月租金 | ||||
| //大于一年 | //大于一年 | ||||
| JSONObject rentInfoObject = rentInfoArray.getJSONObject(0); | JSONObject rentInfoObject = rentInfoArray.getJSONObject(0); | ||||
| JSONArray adjustRatio = rentInfoObject.getJSONArray(ratioKey);//[100,200] | JSONArray adjustRatio = rentInfoObject.getJSONArray(ratioKey);//[100,200] | ||||
| if (null != adjustRatio) { | if (null != adjustRatio) { | ||||
| return computeRatioFromRentInfo(priceList, rentInfoArray, ratioWayType, adjustRatio.size(), ratioKey); | |||||
| return computeRatioFromRentInfo(decimalSize,priceList, rentInfoArray, ratioWayType, adjustRatio.size(), ratioKey); | |||||
| } | } | ||||
| return null; | return null; | ||||
| } | } | ||||
| //计算年调整后的某项计费 | //计算年调整后的某项计费 | ||||
| private static List<long[]> computeRatioFromRentInfo(List<long[]> priceList,JSONArray rentInfoArray, Integer ratioWayType,int ratioYears,String ratioKey ) { | |||||
| private static List<String[]> computeRatioFromRentInfo(Integer decimalSize,List<String[]> priceList,JSONArray rentInfoArray, Integer ratioWayType,int ratioYears,String ratioKey ) { | |||||
| //循环多年的调整比例,如3年。[10,20,30] | //循环多年的调整比例,如3年。[10,20,30] | ||||
| for (int i = 0; i < ratioYears; i++) { | for (int i = 0; i < ratioYears; i++) { | ||||
| long[] priceArrs = new long[rentInfoArray.size()]; | |||||
| String[] priceArrs = new String[rentInfoArray.size()]; | |||||
| //按每个商铺循环 | //按每个商铺循环 | ||||
| for (int j = 0; j < rentInfoArray.size(); j++) { | for (int j = 0; j < rentInfoArray.size(); j++) { | ||||
| JSONObject rentInfoObject = rentInfoArray.getJSONObject(j); | JSONObject rentInfoObject = rentInfoArray.getJSONObject(j); | ||||
| @@ -346,16 +356,16 @@ public class WxRentContractHelper { | |||||
| if (ratioWayType.equals(EnumRentContractAdjustRatioWay.RATIO.getCode())) { | if (ratioWayType.equals(EnumRentContractAdjustRatioWay.RATIO.getCode())) { | ||||
| BigDecimal multiply = new BigDecimal(priceList.get(i)[j]).multiply(new BigDecimal(adjustRatio.getString(i)).divide(new BigDecimal(100))); | BigDecimal multiply = new BigDecimal(priceList.get(i)[j]).multiply(new BigDecimal(adjustRatio.getString(i)).divide(new BigDecimal(100))); | ||||
| BigDecimal price = new BigDecimal(priceList.get(i)[j]).add(multiply); | BigDecimal price = new BigDecimal(priceList.get(i)[j]).add(multiply); | ||||
| priceArrs[j] = price.setScale(0, RoundingMode.HALF_EVEN).longValue(); | |||||
| priceArrs[j] = price.setScale(decimalSize, RoundingMode.HALF_EVEN).toPlainString(); | |||||
| }else if (ratioWayType.equals(EnumRentContractAdjustRatioWay.MONEY.getCode())) { | }else if (ratioWayType.equals(EnumRentContractAdjustRatioWay.MONEY.getCode())) { | ||||
| BigDecimal price = new BigDecimal(priceList.get(i)[j]).add(new BigDecimal(adjustRatio.getString(i)).multiply(new BigDecimal(100))); | BigDecimal price = new BigDecimal(priceList.get(i)[j]).add(new BigDecimal(adjustRatio.getString(i)).multiply(new BigDecimal(100))); | ||||
| priceArrs[j] = price.setScale(0, RoundingMode.HALF_EVEN).longValue(); | |||||
| priceArrs[j] = price.setScale(decimalSize, RoundingMode.HALF_EVEN).toPlainString(); | |||||
| }else if (ratioWayType.equals(EnumRentContractAdjustRatioWay.CUSTOM.getCode())) { | }else if (ratioWayType.equals(EnumRentContractAdjustRatioWay.CUSTOM.getCode())) { | ||||
| BigDecimal price = new BigDecimal(adjustRatio.getString(i)).multiply(new BigDecimal(100)); | BigDecimal price = new BigDecimal(adjustRatio.getString(i)).multiply(new BigDecimal(100)); | ||||
| priceArrs[j] = price.setScale(0, RoundingMode.HALF_EVEN).longValue(); | |||||
| priceArrs[j] = price.setScale(decimalSize, RoundingMode.HALF_EVEN).toPlainString(); | |||||
| }else if (ratioWayType.equals(EnumRentContractAdjustRatioWay.FIX_RATIO.getCode())) { | }else if (ratioWayType.equals(EnumRentContractAdjustRatioWay.FIX_RATIO.getCode())) { | ||||
| BigDecimal price = new BigDecimal(priceList.get(i)[j]).multiply(new BigDecimal(adjustRatio.getString(i)).divide(new BigDecimal(100))); | BigDecimal price = new BigDecimal(priceList.get(i)[j]).multiply(new BigDecimal(adjustRatio.getString(i)).divide(new BigDecimal(100))); | ||||
| priceArrs[j] = price.setScale(0, RoundingMode.HALF_EVEN).longValue(); | |||||
| priceArrs[j] = price.setScale(decimalSize, RoundingMode.HALF_EVEN).toPlainString(); | |||||
| } | } | ||||
| } | } | ||||
| priceList.add(priceArrs); | priceList.add(priceArrs); | ||||
| @@ -179,11 +179,11 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||||
| JSONObject rentInfoObject = rentInfoArray.getJSONObject(i); | JSONObject rentInfoObject = rentInfoArray.getJSONObject(i); | ||||
| Double rentPrice = rentInfoObject.getDouble("rentPrice"); | Double rentPrice = rentInfoObject.getDouble("rentPrice"); | ||||
| //wxRentContract.setShopId(rentInfoObject.getLong("shopId")); | //wxRentContract.setShopId(rentInfoObject.getLong("shopId")); | ||||
| Long price = wxRentContract.getPrice()/100; | |||||
| String price = wxRentContract.getPrice(); | |||||
| if(rentPrice == null){ | if(rentPrice == null){ | ||||
| if(StringUtils.isNotBlank(wxRentContract.getRentArea()) && !"0".equals(wxRentContract.getRentArea()) && !"0.00".equals(wxRentContract.getRentArea()) && !"0.0".equals(wxRentContract.getRentArea()) ) { | if(StringUtils.isNotBlank(wxRentContract.getRentArea()) && !"0".equals(wxRentContract.getRentArea()) && !"0.00".equals(wxRentContract.getRentArea()) && !"0.0".equals(wxRentContract.getRentArea()) ) { | ||||
| Double rentArea = Double.parseDouble(wxRentContract.getRentArea()); | Double rentArea = Double.parseDouble(wxRentContract.getRentArea()); | ||||
| rentPrice = new BigDecimal((float) price / rentArea).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue(); | |||||
| rentPrice = new BigDecimal(price).divide(new BigDecimal(rentArea)).setScale(wxRentContract.getDecimalSize(), BigDecimal.ROUND_HALF_UP).doubleValue(); | |||||
| rentInfoObject.put("rentPrice", rentPrice); | rentInfoObject.put("rentPrice", rentPrice); | ||||
| } | } | ||||
| } | } | ||||
| @@ -192,9 +192,9 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||||
| }else{ | }else{ | ||||
| if(wxRentContract.getRentPrice() == null || "0".equals(wxRentContract.getRentPrice())){ | if(wxRentContract.getRentPrice() == null || "0".equals(wxRentContract.getRentPrice())){ | ||||
| if(StringUtils.isNotBlank(wxRentContract.getRentArea()) && !"0".equals(wxRentContract.getRentArea()) && !"0.00".equals(wxRentContract.getRentArea()) && !"0.0".equals(wxRentContract.getRentArea()) ) { | if(StringUtils.isNotBlank(wxRentContract.getRentArea()) && !"0".equals(wxRentContract.getRentArea()) && !"0.00".equals(wxRentContract.getRentArea()) && !"0.0".equals(wxRentContract.getRentArea()) ) { | ||||
| Long price = wxRentContract.getPrice()/100; | |||||
| String price = wxRentContract.getPrice(); | |||||
| Double rentArea = Double.parseDouble(wxRentContract.getRentArea()); | Double rentArea = Double.parseDouble(wxRentContract.getRentArea()); | ||||
| Double rentPrice = new BigDecimal((float)price/rentArea).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue(); | |||||
| Double rentPrice = new BigDecimal(price).divide(new BigDecimal(rentArea)).setScale(wxRentContract.getDecimalSize(), BigDecimal.ROUND_HALF_UP).doubleValue(); | |||||
| if(rentPrice > 0){ | if(rentPrice > 0){ | ||||
| wxRentContract.setRentPrice(rentPrice.toString()); | wxRentContract.setRentPrice(rentPrice.toString()); | ||||
| }else{ | }else{ | ||||
| @@ -219,8 +219,8 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||||
| if (!mallList.isEmpty()) { | if (!mallList.isEmpty()) { | ||||
| result.put("mall", mallList.get(0)); | result.put("mall", mallList.get(0)); | ||||
| } | } | ||||
| wxRentContract.setPrice(wxRentContract.getPrice() != null ? wxRentContract.getPrice() : 0); | |||||
| wxRentContract.setDeposit(wxRentContract.getDeposit() != null ? wxRentContract.getDeposit() : 0); | |||||
| wxRentContract.setPrice(StringUtils.isNotBlank(wxRentContract.getPrice()) ? wxRentContract.getPrice() : "0"); | |||||
| wxRentContract.setDeposit(StringUtils.isNotBlank(wxRentContract.getDeposit()) ? wxRentContract.getDeposit() : "0"); | |||||
| result.put("wxRentContract", wxRentContract); | result.put("wxRentContract", wxRentContract); | ||||
| //关联的商户 | //关联的商户 | ||||
| @@ -285,26 +285,28 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||||
| * @param revenueLong | * @param revenueLong | ||||
| * @return | * @return | ||||
| */ | */ | ||||
| public static Long countPrice(Integer ratio,Long revenueLong,int timeType,int period,int from){ | |||||
| BigDecimal hundred = new BigDecimal(100); | |||||
| BigDecimal revenue = new BigDecimal(revenueLong == null ? 0 : revenueLong).divide(hundred); | |||||
| public static BigDecimal countPrice(Integer decimalSize,Integer ratio,String revenueLong,int timeType,int period,int from){ | |||||
| if (StringUtils.isBlank(revenueLong)) { | |||||
| revenueLong = "0"; | |||||
| } | |||||
| BigDecimal revenue = new BigDecimal(revenueLong); | |||||
| BigDecimal payRatio = new BigDecimal(ratio == null ? 0 : ratio).divide(new BigDecimal(10000)); | BigDecimal payRatio = new BigDecimal(ratio == null ? 0 : ratio).divide(new BigDecimal(10000)); | ||||
| BigDecimal price; | BigDecimal price; | ||||
| if(EnumMissTimeType.YEAR.getCode().equals(timeType) && EnumGetRatioFrom.RENT.getCode().equals(from)){ | if(EnumMissTimeType.YEAR.getCode().equals(timeType) && EnumGetRatioFrom.RENT.getCode().equals(from)){ | ||||
| price = revenue.multiply(new BigDecimal(12)).multiply(payRatio).setScale(2, RoundingMode.HALF_EVEN);;; | |||||
| price = revenue.multiply(new BigDecimal(12)).multiply(payRatio).setScale(decimalSize, RoundingMode.HALF_EVEN); | |||||
| }else if(EnumMissTimeType.PERIOD.getCode().equals(timeType) && EnumGetRatioFrom.RENT.getCode().equals(from)){ | }else if(EnumMissTimeType.PERIOD.getCode().equals(timeType) && EnumGetRatioFrom.RENT.getCode().equals(from)){ | ||||
| price = revenue.multiply(new BigDecimal(period)).multiply(payRatio).setScale(2, RoundingMode.HALF_EVEN);; | |||||
| price = revenue.multiply(new BigDecimal(period)).multiply(payRatio).setScale(decimalSize, RoundingMode.HALF_EVEN);; | |||||
| }else{ | }else{ | ||||
| price = revenue.multiply(payRatio).setScale(2, RoundingMode.HALF_EVEN); | |||||
| price = revenue.multiply(payRatio).setScale(decimalSize, RoundingMode.HALF_EVEN); | |||||
| } | } | ||||
| return price.multiply(hundred).longValue(); | |||||
| return price; | |||||
| } | } | ||||
| /** | /** | ||||
| * 获取设置的跳点率 | * 获取设置的跳点率 | ||||
| * ["1000-1200:10",">3000:20"] | * ["1000-1200:10",">3000:20"] | ||||
| */ | */ | ||||
| public static RatioVo getPayRatio(int from,Long revenueLong,String busDiscountRatio,int timeType,long dayCount,int period){ | |||||
| public static RatioVo getPayRatio(Integer decimalSize,int from,String revenueLong,String busDiscountRatio,int timeType,long dayCount,int period){ | |||||
| RatioVo ratioVo = new RatioVo(); | RatioVo ratioVo = new RatioVo(); | ||||
| if(StringUtils.isBlank(busDiscountRatio)){ | if(StringUtils.isBlank(busDiscountRatio)){ | ||||
| return ratioVo; | return ratioVo; | ||||
| @@ -313,7 +315,8 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||||
| ratioVo.setUseRatio(busDiscountRatio); | ratioVo.setUseRatio(busDiscountRatio); | ||||
| for (int i = 0; i < ratioList.size(); i++) { | for (int i = 0; i < ratioList.size(); i++) { | ||||
| BigDecimal revenue = new BigDecimal(revenueLong).divide(new BigDecimal(1000000)).setScale(8, RoundingMode.HALF_EVEN); | |||||
| //BigDecimal revenue = new BigDecimal(revenueLong).divide(new BigDecimal(1000000)).setScale(8, RoundingMode.HALF_EVEN); | |||||
| BigDecimal revenue = new BigDecimal(revenueLong); | |||||
| String e = ratioList.get(i); | String e = ratioList.get(i); | ||||
| String[] array = e.split(":"); | String[] array = e.split(":"); | ||||
| Integer ratio = Integer.parseInt(array[1]); | Integer ratio = Integer.parseInt(array[1]); | ||||
| @@ -345,7 +348,7 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||||
| if (revenue.compareTo(start) >= 0 && revenue.compareTo(end)<= 0){ | if (revenue.compareTo(start) >= 0 && revenue.compareTo(end)<= 0){ | ||||
| ratioVo.setRatio(ratio); | ratioVo.setRatio(ratio); | ||||
| ratioVo.setPrice(countPrice(ratioVo.getRatio(),revenueLong,timeType,period,from)); | |||||
| ratioVo.setPrice(countPrice(decimalSize,ratioVo.getRatio(),revenueLong,timeType,period,from).toPlainString()); | |||||
| break; | break; | ||||
| } | } | ||||
| }else if(e.indexOf(">") >= 0){ | }else if(e.indexOf(">") >= 0){ | ||||
| @@ -376,7 +379,7 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||||
| //计算超出部分 | //计算超出部分 | ||||
| BigDecimal payRatio = new BigDecimal(ratio).divide(new BigDecimal(10000)); | BigDecimal payRatio = new BigDecimal(ratio).divide(new BigDecimal(10000)); | ||||
| BigDecimal balance = revenue.subtract(end).multiply(new BigDecimal(1000000)); | BigDecimal balance = revenue.subtract(end).multiply(new BigDecimal(1000000)); | ||||
| BigDecimal price = balance.multiply(payRatio).setScale(2, RoundingMode.HALF_EVEN); | |||||
| BigDecimal price = balance.multiply(payRatio).setScale(decimalSize, RoundingMode.HALF_EVEN); | |||||
| array = ratioList.get(i-1).split(":"); | array = ratioList.get(i-1).split(":"); | ||||
| Integer frontatio = Integer.parseInt(array[1]); | Integer frontatio = Integer.parseInt(array[1]); | ||||
| @@ -396,16 +399,16 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||||
| } | } | ||||
| BigDecimal frontRatio = new BigDecimal(frontatio).divide(new BigDecimal(10000)); | BigDecimal frontRatio = new BigDecimal(frontatio).divide(new BigDecimal(10000)); | ||||
| BigDecimal frontPrice = frontEnd.multiply(new BigDecimal(1000000).multiply(frontRatio).setScale(2, RoundingMode.HALF_EVEN)); | |||||
| BigDecimal frontPrice = frontEnd.multiply(new BigDecimal(1000000).multiply(frontRatio).setScale(decimalSize, RoundingMode.HALF_EVEN)); | |||||
| ratioVo.setPrice(price.add(frontPrice).longValue()); | |||||
| ratioVo.setPrice(price.add(frontPrice).toPlainString()); | |||||
| break; | break; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| return ratioVo; | return ratioVo; | ||||
| } | } | ||||
| @Transactional(rollbackFor = {Exception.class}) | @Transactional(rollbackFor = {Exception.class}) | ||||
| @Override | @Override | ||||
| public ResultData save(WxRentContract record,Long userId,String userName,Date oldRentStartDate) { | public ResultData save(WxRentContract record,Long userId,String userName,Date oldRentStartDate) { | ||||
| @@ -429,29 +432,29 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||||
| } | } | ||||
| if (null != record.getType() && record.getType().equals(EnumRentContractType.RENT_BY_JOINT.getCode())) { | if (null != record.getType() && record.getType().equals(EnumRentContractType.RENT_BY_JOINT.getCode())) { | ||||
| if(record.getRevenue() == null || record.getRevenue().longValue() <= 0){ | |||||
| record.setPrice(0l); | |||||
| if(StringUtils.isBlank(record.getRevenue())){ | |||||
| record.setPrice("0"); | |||||
| }else{ | }else{ | ||||
| if(record.getPayRatio()!=null && record.getPayRatio().intValue() > 0){ | if(record.getPayRatio()!=null && record.getPayRatio().intValue() > 0){ | ||||
| record.setPrice(countPrice(record.getPayRatio(),record.getRevenue(),EnumMissTimeType.OTHER.getCode(),record.getAdjustPeriod(),EnumGetRatioFrom.RENT.getCode())); | |||||
| record.setPrice(countPrice(record.getDecimalSize(),record.getPayRatio(),record.getRevenue(),EnumMissTimeType.OTHER.getCode(),record.getAdjustPeriod(),EnumGetRatioFrom.RENT.getCode()).toPlainString()); | |||||
| }else{ | }else{ | ||||
| int dayCount = record.getReceivePeriod() * 30; | int dayCount = record.getReceivePeriod() * 30; | ||||
| RatioVo ratioVo = getPayRatio(EnumGetRatioFrom.RENT.getCode(),record.getRevenue(),record.getBusDiscountRatio(),record.getBusDiscountTime(),dayCount,record.getReceivePeriod()); | |||||
| RatioVo ratioVo = getPayRatio(record.getDecimalSize(),EnumGetRatioFrom.RENT.getCode(),record.getRevenue(),record.getBusDiscountRatio(),record.getBusDiscountTime(),dayCount,record.getReceivePeriod()); | |||||
| //record.setPayRatio(ratioVo.getRatio()); | //record.setPayRatio(ratioVo.getRatio()); | ||||
| record.setPrice(ratioVo.getPrice()); | record.setPrice(ratioVo.getPrice()); | ||||
| } | } | ||||
| } | } | ||||
| } else { | } else { | ||||
| if (StringUtils.isNotEmpty(record.getPriceStr())) { | |||||
| record.setPrice(new BigDecimal(record.getPriceStr()).multiply(new BigDecimal(100)).longValue()); | |||||
| if (StringUtils.isNotEmpty(record.getPrice())) { | |||||
| //record.setPrice(new BigDecimal(record.getPriceStr()).multiply(new BigDecimal(100)).longValue()); | |||||
| } else { | } else { | ||||
| record.setPrice(0L); | |||||
| record.setPrice("0"); | |||||
| } | } | ||||
| } | } | ||||
| if (StringUtils.isNotEmpty(record.getDepositStr())) { | |||||
| record.setDeposit(new BigDecimal(record.getDepositStr()).multiply(new BigDecimal(100)).longValue()); | |||||
| if (StringUtils.isNotEmpty(record.getDeposit())) { | |||||
| //record.setDeposit(new BigDecimal(record.getDepositStr()).multiply(new BigDecimal(100)).longValue()); | |||||
| } else { | } else { | ||||
| record.setDeposit(0L); | |||||
| record.setDeposit("0"); | |||||
| } | } | ||||
| Date date = new Date(); | Date date = new Date(); | ||||
| @@ -663,9 +666,9 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||||
| bill.setPeriod(count); | bill.setPeriod(count); | ||||
| bill.setIsPreview(EnumIsPreview.YES.getCode()); | bill.setIsPreview(EnumIsPreview.YES.getCode()); | ||||
| bill.setShopInfo(getShopInfoStr(record)); | bill.setShopInfo(getShopInfoStr(record)); | ||||
| bill.setRevenue(0L); | |||||
| bill.setRevenue("0"); | |||||
| bill.setLatePayRatio(0); | bill.setLatePayRatio(0); | ||||
| bill.setPay(0L); | |||||
| bill.setPay("0"); | |||||
| bill.setIsDel(EnumDelStatus.NOT_DEL.getCode()); | bill.setIsDel(EnumDelStatus.NOT_DEL.getCode()); | ||||
| bill.setMerchantId(record.getMerchantId()); | bill.setMerchantId(record.getMerchantId()); | ||||
| if (null != shopIds && shopIds.size() == 1) { | if (null != shopIds && shopIds.size() == 1) { | ||||
| @@ -677,8 +680,8 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||||
| bill.setPayDate(date); | bill.setPayDate(date); | ||||
| } | } | ||||
| //计算手续费 | //计算手续费 | ||||
| BigDecimal servicePay = new BigDecimal(bill.getReceivePay()).multiply(new BigDecimal(wxPayAccountBill.getServiceChargeRate())).divide(new BigDecimal(10000), 2, BigDecimal.ROUND_HALF_UP); | |||||
| bill.setServiceChargePay(servicePay.intValue()); | |||||
| BigDecimal servicePay = new BigDecimal(bill.getReceivePay()).multiply(new BigDecimal(wxPayAccountBill.getServiceChargeRate())).divide(new BigDecimal(10000), record.getDecimalSize(), BigDecimal.ROUND_HALF_UP); | |||||
| bill.setServiceChargePay(servicePay.toPlainString()); | |||||
| bill.setOwe(bill.getReceivePay() + bill.getServiceChargePay()); | bill.setOwe(bill.getReceivePay() + bill.getServiceChargePay()); | ||||
| count++; | count++; | ||||
| } | } | ||||
| @@ -702,17 +705,17 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||||
| List<Long> shopIds = record.shopIdsByRentInfo(); | List<Long> shopIds = record.shopIdsByRentInfo(); | ||||
| List<WxBillRentManage> billList = new ArrayList<WxBillRentManage>(); | List<WxBillRentManage> billList = new ArrayList<WxBillRentManage>(); | ||||
| for (WxBillRent _bi:record.getPreviewBillRentList()) { | for (WxBillRent _bi:record.getPreviewBillRentList()) { | ||||
| Long needPay = 0L; | |||||
| BigDecimal needPay = new BigDecimal("0"); | |||||
| if (feeType.getCode() == EnumRentContractManageFeeType.RENT_BUSSINESS_MANAGE_FEE.getCode()) { | if (feeType.getCode() == EnumRentContractManageFeeType.RENT_BUSSINESS_MANAGE_FEE.getCode()) { | ||||
| if (null != _bi.getBussinessManageFeeNeedPay()) { | if (null != _bi.getBussinessManageFeeNeedPay()) { | ||||
| needPay = _bi.getBussinessManageFeeNeedPay(); | |||||
| needPay = new BigDecimal(_bi.getBussinessManageFeeNeedPay()); | |||||
| } | } | ||||
| }else if (feeType.getCode() == EnumRentContractManageFeeType.RENT_OPERATING_MANAGE_FEE.getCode()) { | }else if (feeType.getCode() == EnumRentContractManageFeeType.RENT_OPERATING_MANAGE_FEE.getCode()) { | ||||
| if (null != _bi.getOperatingManageFeeNeedPay()) { | if (null != _bi.getOperatingManageFeeNeedPay()) { | ||||
| needPay = _bi.getOperatingManageFeeNeedPay(); | |||||
| needPay = new BigDecimal(_bi.getOperatingManageFeeNeedPay()); | |||||
| } | } | ||||
| } | } | ||||
| if (needPay <= 0) { | |||||
| if (needPay.compareTo(new BigDecimal(0)) <= 0) { | |||||
| continue; | continue; | ||||
| } | } | ||||
| WxBillRentManage bill = new WxBillRentManage(); | WxBillRentManage bill = new WxBillRentManage(); | ||||
| @@ -723,14 +726,14 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||||
| bill.setCreatetime(date); | bill.setCreatetime(date); | ||||
| bill.updateTenantInfo(record); | bill.updateTenantInfo(record); | ||||
| bill.setManageFeeType(feeType.getCode()); | bill.setManageFeeType(feeType.getCode()); | ||||
| bill.setNeedPay(needPay); | |||||
| bill.setReceivePay(needPay); | |||||
| bill.setNeedPay(needPay.toPlainString()); | |||||
| bill.setReceivePay(needPay.toPlainString()); | |||||
| bill.setUpdatetime(date); | bill.setUpdatetime(date); | ||||
| bill.setRentShopType(record.getRentShopType()); | bill.setRentShopType(record.getRentShopType()); | ||||
| bill.setPeriod(count); | bill.setPeriod(count); | ||||
| bill.setShopInfo(getShopInfoStr(record)); | bill.setShopInfo(getShopInfoStr(record)); | ||||
| bill.setLatePayRatio(0); | bill.setLatePayRatio(0); | ||||
| bill.setPay(0L); | |||||
| bill.setPay("0"); | |||||
| bill.setIsDel(EnumDelStatus.NOT_DEL.getCode()); | bill.setIsDel(EnumDelStatus.NOT_DEL.getCode()); | ||||
| bill.setMerchantId(record.getMerchantId()); | bill.setMerchantId(record.getMerchantId()); | ||||
| if (null != shopIds && shopIds.size() == 1) { | if (null != shopIds && shopIds.size() == 1) { | ||||
| @@ -742,8 +745,8 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||||
| bill.setPayDate(date); | bill.setPayDate(date); | ||||
| } | } | ||||
| //计算手续费 | //计算手续费 | ||||
| BigDecimal servicePay = new BigDecimal(bill.getReceivePay()).multiply(new BigDecimal(wxPayAccountBill.getServiceChargeRate())).divide(new BigDecimal(10000), 2, BigDecimal.ROUND_HALF_UP); | |||||
| bill.setServiceChargePay(servicePay.intValue()); | |||||
| BigDecimal servicePay = new BigDecimal(bill.getReceivePay()).multiply(new BigDecimal(wxPayAccountBill.getServiceChargeRate())).divide(new BigDecimal(10000), record.getDecimalSize(), BigDecimal.ROUND_HALF_UP); | |||||
| bill.setServiceChargePay(servicePay.toPlainString()); | |||||
| bill.setOwe(bill.getReceivePay() + bill.getServiceChargePay()); | bill.setOwe(bill.getReceivePay() + bill.getServiceChargePay()); | ||||
| count++; | count++; | ||||
| billList.add(bill); | billList.add(bill); | ||||
| @@ -773,26 +776,26 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||||
| if(!EnumFromType.SWITCH.getCode().equals(from)){ | if(!EnumFromType.SWITCH.getCode().equals(from)){ | ||||
| if (record.getType() != null && record.getType().equals(EnumRentContractType.RENT_BY_JOINT.getCode())) { | if (record.getType() != null && record.getType().equals(EnumRentContractType.RENT_BY_JOINT.getCode())) { | ||||
| if(record.getPayRatio()!=null && record.getPayRatio().intValue() > 0){ | if(record.getPayRatio()!=null && record.getPayRatio().intValue() > 0){ | ||||
| record.setPrice(countPrice(record.getPayRatio(),record.getRevenue(),EnumMissTimeType.OTHER.getCode(),record.getAdjustPeriod(),from)); | |||||
| record.setPrice(countPrice(record.getDecimalSize(),record.getPayRatio(),record.getRevenue(),EnumMissTimeType.OTHER.getCode(),record.getAdjustPeriod(),from).toPlainString()); | |||||
| }else{ | }else{ | ||||
| int dayCount = record.getReceivePeriod() * 30; | int dayCount = record.getReceivePeriod() * 30; | ||||
| RatioVo ratioVo = getPayRatio(EnumGetRatioFrom.RENT.getCode(),record.getRevenue(),record.getBusDiscountRatio(),record.getBusDiscountTime(),dayCount,record.getReceivePeriod()); | |||||
| RatioVo ratioVo = getPayRatio(record.getDecimalSize(),EnumGetRatioFrom.RENT.getCode(),record.getRevenue(),record.getBusDiscountRatio(),record.getBusDiscountTime(),dayCount,record.getReceivePeriod()); | |||||
| //record.setPayRatio(ratioVo.getRatio()); | //record.setPayRatio(ratioVo.getRatio()); | ||||
| record.setPrice(ratioVo.getPrice()); | record.setPrice(ratioVo.getPrice()); | ||||
| } | } | ||||
| } else { | } else { | ||||
| if (StringUtils.isNotEmpty(record.getPriceStr())) { | |||||
| record.setPrice(new BigDecimal(record.getPriceStr()).multiply(new BigDecimal(100)).longValue()); | |||||
| if (StringUtils.isNotEmpty(record.getPrice())) { | |||||
| //record.setPrice(new BigDecimal(record.getPriceStr()).multiply(new BigDecimal(100)).longValue()); | |||||
| } else { | } else { | ||||
| record.setPrice(0L); | |||||
| record.setPrice("0"); | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| if (StringUtils.isNotEmpty(record.getDepositStr())) { | |||||
| record.setDeposit(new BigDecimal(record.getDepositStr()).multiply(new BigDecimal(100)).longValue()); | |||||
| if (StringUtils.isNotEmpty(record.getDeposit())) { | |||||
| //record.setDeposit(new BigDecimal(record.getDepositStr()).multiply(new BigDecimal(100)).longValue()); | |||||
| } else { | } else { | ||||
| record.setDeposit(0L); | |||||
| record.setDeposit("0"); | |||||
| } | } | ||||
| List<Long> shopList = Lists.newArrayList(); | List<Long> shopList = Lists.newArrayList(); | ||||
| record.setUpdatetime(new Date()); | record.setUpdatetime(new Date()); | ||||
| @@ -891,13 +894,14 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||||
| @Override | @Override | ||||
| public void buildDeposit( Long userId,Long rentContractId) { | public void buildDeposit( Long userId,Long rentContractId) { | ||||
| WxRentContract wxRentContract = wxRentContractMapper.selectById(rentContractId); | WxRentContract wxRentContract = wxRentContractMapper.selectById(rentContractId); | ||||
| if (wxRentContract != null && wxRentContract.getDeposit() > 0) { | |||||
| if (wxRentContract != null && StringUtils.isNotBlank(wxRentContract.getDeposit()) | |||||
| && new BigDecimal(wxRentContract.getDeposit()).compareTo(new BigDecimal(0)) > 0 ) { | |||||
| final IdWorker idWorker = IdWorker.get(); | final IdWorker idWorker = IdWorker.get(); | ||||
| WxBillDeposit wxBillDeposit = new WxBillDeposit(); | WxBillDeposit wxBillDeposit = new WxBillDeposit(); | ||||
| wxBillDeposit.setId(idWorker.nextId()); | wxBillDeposit.setId(idWorker.nextId()); | ||||
| wxBillDeposit.setRentContractId(wxRentContract.getId()); | wxBillDeposit.setRentContractId(wxRentContract.getId()); | ||||
| wxBillDeposit.setPay(0L); | |||||
| long needpay = wxRentContract.getDeposit(); | |||||
| wxBillDeposit.setPay("0"); | |||||
| String needpay = wxRentContract.getDeposit(); | |||||
| wxBillDeposit.setReceivePay(needpay); | wxBillDeposit.setReceivePay(needpay); | ||||
| wxBillDeposit.setNeedPay(needpay); | wxBillDeposit.setNeedPay(needpay); | ||||
| wxBillDeposit.setOwe(needpay); | wxBillDeposit.setOwe(needpay); | ||||
| @@ -1108,7 +1112,7 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||||
| int receivePeriod = wxRentContract.getReceivePeriod().intValue(); | int receivePeriod = wxRentContract.getReceivePeriod().intValue(); | ||||
| Integer lease = wxRentContract.getLease(); | Integer lease = wxRentContract.getLease(); | ||||
| Date rentalStartDate = wxRentContract.getRentalStartDate(); | Date rentalStartDate = wxRentContract.getRentalStartDate(); | ||||
| Long price = wxRentContract.getPrice(); | |||||
| String price = wxRentContract.getPrice(); | |||||
| if(EnumContractOperationType.JINMAO.getCode().equals(wxRentContract.getOperationType())){ | if(EnumContractOperationType.JINMAO.getCode().equals(wxRentContract.getOperationType())){ | ||||
| Date startDate = wxRentContract.getStartDate(); | Date startDate = wxRentContract.getStartDate(); | ||||
| rentList = buildRentJinmao(userId, wxRentContract, receivePeriod, lease, startDate, price, isPreview,saveDb); | rentList = buildRentJinmao(userId, wxRentContract, receivePeriod, lease, startDate, price, isPreview,saveDb); | ||||
| @@ -1135,14 +1139,14 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||||
| public List<WxBillRent> buildRentMonth(Long userId, WxRentContract wxRentContract, int receivePeriod, Integer lease, Date rentalStartDate, Long price, Integer isPreview, boolean saveDb) { | |||||
| public List<WxBillRent> buildRentMonth(Long userId, WxRentContract wxRentContract, int receivePeriod, Integer lease, Date rentalStartDate, String price, Integer isPreview, boolean saveDb) { | |||||
| int years = 0; | int years = 0; | ||||
| //计算租金每年的计费基数 | //计算租金每年的计费基数 | ||||
| long[] priceArrs = WxRentContractHelper.calcuteRentPrice(wxRentContract); | |||||
| String[] priceArrs = WxRentContractHelper.calcuteRentPrice(wxRentContract); | |||||
| //计算商业管理费 | //计算商业管理费 | ||||
| long[] bussinessManagerPriceArrs = WxRentContractHelper.calcuteBussinessManagementFee(wxRentContract); | |||||
| String[] bussinessManagerPriceArrs = WxRentContractHelper.calcuteBussinessManagementFee(wxRentContract); | |||||
| //计算运营管理费 | //计算运营管理费 | ||||
| long[] operationManagerPriceArrs = WxRentContractHelper.calcuteOperatingManagementFee(wxRentContract); | |||||
| String[] operationManagerPriceArrs = WxRentContractHelper.calcuteOperatingManagementFee(wxRentContract); | |||||
| int month = 12; | int month = 12; | ||||
| int billcount = 0; | int billcount = 0; | ||||
| List<WxBillRent> resultList = new ArrayList<>(); | List<WxBillRent> resultList = new ArrayList<>(); | ||||
| @@ -1175,9 +1179,9 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||||
| return resultList; | return resultList; | ||||
| } | } | ||||
| public List<WxBillRent> buildRentJinmao(Long userId, WxRentContract wxRentContract, int receivePeriod, Integer lease, Date rentalStartDate, Long price, Integer isPreview, boolean saveDb) { | |||||
| public List<WxBillRent> buildRentJinmao(Long userId, WxRentContract wxRentContract, int receivePeriod, Integer lease, Date rentalStartDate, String price, Integer isPreview, boolean saveDb) { | |||||
| int size = 0; | int size = 0; | ||||
| long[] priceArrs = null; | |||||
| String[] priceArrs = null; | |||||
| if (wxRentContract.getType().equals(EnumRentContractType.RENT_BY_AREA.getCode())){ | if (wxRentContract.getType().equals(EnumRentContractType.RENT_BY_AREA.getCode())){ | ||||
| String adjustRatio = wxRentContract.getAdjustRatio(); | String adjustRatio = wxRentContract.getAdjustRatio(); | ||||
| @@ -1197,37 +1201,37 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||||
| } | } | ||||
| integers.add(0, 0); | integers.add(0, 0); | ||||
| size = integers.size(); | size = integers.size(); | ||||
| priceArrs = new long[size]; | |||||
| priceArrs = new String[size]; | |||||
| priceArrs[0] = price; | priceArrs[0] = price; | ||||
| BigDecimal priceD = new BigDecimal(price); | BigDecimal priceD = new BigDecimal(price); | ||||
| if (wxRentContract.getAdjustRatioWay().equals(EnumRentContractAdjustRatioWay.RATIO.getCode())) { | if (wxRentContract.getAdjustRatioWay().equals(EnumRentContractAdjustRatioWay.RATIO.getCode())) { | ||||
| for (int i = 1; i < size; i++) { | for (int i = 1; i < size; i++) { | ||||
| BigDecimal divide = priceD.multiply(new BigDecimal(integers.get(i))).divide(new BigDecimal(10000)); | |||||
| BigDecimal divide = priceD.multiply(new BigDecimal(integers.get(i))).divide(new BigDecimal(100)); | |||||
| logger.info("价格算法------递增前价格:"+priceD.doubleValue()+" 递增率:"+integers.get(i)+" 递增价格:"+divide.doubleValue()); | logger.info("价格算法------递增前价格:"+priceD.doubleValue()+" 递增率:"+integers.get(i)+" 递增价格:"+divide.doubleValue()); | ||||
| priceD = priceD.add(divide); | priceD = priceD.add(divide); | ||||
| priceArrs[i] = priceD.setScale(0, RoundingMode.HALF_EVEN).longValue(); | |||||
| priceArrs[i] = priceD.setScale(wxRentContract.getDecimalSize(), RoundingMode.HALF_EVEN).toPlainString(); | |||||
| } | } | ||||
| } | } | ||||
| }else if (wxRentContract.getType().equals(EnumRentContractType.RENT_BY_CUSTOMIZE.getCode())) { | }else if (wxRentContract.getType().equals(EnumRentContractType.RENT_BY_CUSTOMIZE.getCode())) { | ||||
| String adjustRatio = wxRentContract.getAdjustRatio(); | String adjustRatio = wxRentContract.getAdjustRatio(); | ||||
| JSONArray array = JSONArray.parseArray(adjustRatio); | JSONArray array = JSONArray.parseArray(adjustRatio); | ||||
| if(array != null && array.size() > 0){ | if(array != null && array.size() > 0){ | ||||
| priceArrs = new long[array.size()]; | |||||
| priceArrs = new String[array.size()]; | |||||
| size = array.size(); | size = array.size(); | ||||
| for (int i=0;i<array.size();i++){ | for (int i=0;i<array.size();i++){ | ||||
| JSONObject jsonObject = array.getJSONObject(i); | JSONObject jsonObject = array.getJSONObject(i); | ||||
| String perMonthMoney = jsonObject.getString("perMonthMoney"); | String perMonthMoney = jsonObject.getString("perMonthMoney"); | ||||
| if(StringUtils.isNotBlank(perMonthMoney) && !"0".equals(perMonthMoney)){ | if(StringUtils.isNotBlank(perMonthMoney) && !"0".equals(perMonthMoney)){ | ||||
| BigDecimal priceD = new BigDecimal(perMonthMoney).multiply(new BigDecimal(100)); | |||||
| priceArrs[i] = priceD.setScale(0, RoundingMode.HALF_EVEN).longValue(); | |||||
| BigDecimal priceD = new BigDecimal(perMonthMoney); | |||||
| priceArrs[i] = priceD.setScale(wxRentContract.getDecimalSize(), RoundingMode.HALF_EVEN).toPlainString(); | |||||
| }else{ | }else{ | ||||
| priceArrs[i] = 0; | |||||
| priceArrs[i] = "0"; | |||||
| } | } | ||||
| } | } | ||||
| }else { | }else { | ||||
| size = 1; | size = 1; | ||||
| priceArrs = new long[size]; | |||||
| priceArrs[0] = 0; | |||||
| priceArrs = new String[size]; | |||||
| priceArrs[0] = "0"; | |||||
| } | } | ||||
| }else{ | }else{ | ||||
| return new ArrayList<>(); | return new ArrayList<>(); | ||||
| @@ -1413,7 +1417,7 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||||
| return calendar.getTime(); | return calendar.getTime(); | ||||
| } | } | ||||
| public Map<String, Object> buildRent(int receivePeriod, long[] priceArrs,long[] bussinessManagerPriceArrs,long[] operationManagerPriceArrs, List<Date> yearList, int dayType, WxRentContract wxRentContract, Long userId, int billcount, Integer isPreview, String shopInfoStr,boolean saveDb) { | |||||
| public Map<String, Object> buildRent(int receivePeriod, String[] priceArrs,String[] bussinessManagerPriceArrs,String[] operationManagerPriceArrs, List<Date> yearList, int dayType, WxRentContract wxRentContract, Long userId, int billcount, Integer isPreview, String shopInfoStr,boolean saveDb) { | |||||
| WxPayAccountBill wxPayAccountBill = wxPayAccountBillService.getByTenantInfo(wxRentContract); | WxPayAccountBill wxPayAccountBill = wxPayAccountBillService.getByTenantInfo(wxRentContract); | ||||
| SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd"); | SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd"); | ||||
| Map<String,Object> resultMap = new HashedMap(); | Map<String,Object> resultMap = new HashedMap(); | ||||
| @@ -1444,11 +1448,11 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||||
| for (int i = 0; i < billTimeVoList.size(); i++) { | for (int i = 0; i < billTimeVoList.size(); i++) { | ||||
| BillTimeVo billTimeVo = billTimeVoList.get(i); | BillTimeVo billTimeVo = billTimeVoList.get(i); | ||||
| //计算金额 | //计算金额 | ||||
| long needpay = 0; | |||||
| BigDecimal needpay = new BigDecimal(0); | |||||
| //商业管理费 | //商业管理费 | ||||
| long bussinessManageFeeNeedpay = 0; | |||||
| BigDecimal bussinessManageFeeNeedpay = new BigDecimal(0); | |||||
| //营业管理费 | //营业管理费 | ||||
| long operatingManageFeeNeedpay = 0; | |||||
| BigDecimal operatingManageFeeNeedpay = new BigDecimal(0); | |||||
| boolean flag = false; | boolean flag = false; | ||||
| //此处逻辑处理这一年和下一年交接那一期账单。 | //此处逻辑处理这一年和下一年交接那一期账单。 | ||||
| @@ -157,5 +157,16 @@ public class PriceUtilV2 { | |||||
| BigDecimal numberOfMoney = new BigDecimal(22200000020.109); | BigDecimal numberOfMoney = new BigDecimal(22200000020.109); | ||||
| System.out.println(numberOfMoney.toString()); | System.out.println(numberOfMoney.toString()); | ||||
| System.out.println(number2CNMontrayUnit(numberOfMoney)); | System.out.println(number2CNMontrayUnit(numberOfMoney)); | ||||
| BigDecimal a = new BigDecimal(10); | |||||
| a = a.add(new BigDecimal(10)); | |||||
| System.out.println(a); | |||||
| } | } | ||||
| public static double getPowerNumber(Integer decimalSize) { | |||||
| return Math.pow(10, decimalSize); | |||||
| } | |||||
| } | } | ||||
| @@ -6,25 +6,25 @@ | |||||
| <result column="tenant_id" jdbcType="VARCHAR" property="tenantId" /> | <result column="tenant_id" jdbcType="VARCHAR" property="tenantId" /> | ||||
| <result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId" /> | <result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId" /> | ||||
| <result column="rent_contract_id" jdbcType="BIGINT" property="rentContractId" /> | <result column="rent_contract_id" jdbcType="BIGINT" property="rentContractId" /> | ||||
| <result column="receive_pay" jdbcType="BIGINT" property="receivePay"/> | |||||
| <result column="pay" jdbcType="BIGINT" property="pay"/> | |||||
| <result column="receive_pay" jdbcType="VARCHAR" property="receivePay"/> | |||||
| <result column="pay" jdbcType="VARCHAR" property="pay"/> | |||||
| <result column="receive_date" jdbcType="TIMESTAMP" property="receiveDate" /> | <result column="receive_date" jdbcType="TIMESTAMP" property="receiveDate" /> | ||||
| <result column="pay_date" jdbcType="TIMESTAMP" property="payDate" /> | <result column="pay_date" jdbcType="TIMESTAMP" property="payDate" /> | ||||
| <result column="createtime" jdbcType="TIMESTAMP" property="createtime" /> | <result column="createtime" jdbcType="TIMESTAMP" property="createtime" /> | ||||
| <result column="expired_day" jdbcType="BIGINT" property="expiredDay" /> | <result column="expired_day" jdbcType="BIGINT" property="expiredDay" /> | ||||
| <result column="owe" jdbcType="BIGINT" property="owe"/> | |||||
| <result column="owe" jdbcType="VARCHAR" property="owe"/> | |||||
| <result column="status" jdbcType="INTEGER" property="status" /> | <result column="status" jdbcType="INTEGER" property="status" /> | ||||
| <result column="apply_status" jdbcType="INTEGER" property="applyStatus"/> | <result column="apply_status" jdbcType="INTEGER" property="applyStatus"/> | ||||
| <result column="apply_pay_img" jdbcType="INTEGER" property="applyPayImg"/> | <result column="apply_pay_img" jdbcType="INTEGER" property="applyPayImg"/> | ||||
| <result column="apply_update_time" jdbcType="INTEGER" property="applyUpdateTime"/> | <result column="apply_update_time" jdbcType="INTEGER" property="applyUpdateTime"/> | ||||
| <result column="is_del" jdbcType="INTEGER" property="isDel" /> | <result column="is_del" jdbcType="INTEGER" property="isDel" /> | ||||
| <result column="need_pay" jdbcType="BIGINT" property="needPay"/> | |||||
| <result column="need_pay" jdbcType="VARCHAR" property="needPay"/> | |||||
| <result column="merchant_id" jdbcType="BIGINT" property="merchantId" /> | <result column="merchant_id" jdbcType="BIGINT" property="merchantId" /> | ||||
| <result column="user_id" jdbcType="BIGINT" property="userId" /> | <result column="user_id" jdbcType="BIGINT" property="userId" /> | ||||
| <result column="shop_id" jdbcType="BIGINT" property="shopId" /> | <result column="shop_id" jdbcType="BIGINT" property="shopId" /> | ||||
| <result column="updatetime" jdbcType="TIMESTAMP" property="updatetime" /> | <result column="updatetime" jdbcType="TIMESTAMP" property="updatetime" /> | ||||
| <result column="rent_shop_type" jdbcType="INTEGER" property="rentShopType"/> | <result column="rent_shop_type" jdbcType="INTEGER" property="rentShopType"/> | ||||
| <result column="return_price" jdbcType="BIGINT" property="returnPrice"/> | |||||
| <result column="return_price" jdbcType="VARCHAR" property="returnPrice"/> | |||||
| <result column="pay_way" jdbcType="INTEGER" property="payWay"/> | <result column="pay_way" jdbcType="INTEGER" property="payWay"/> | ||||
| <result column="service_charge_pay" property="serviceChargePay"/> | <result column="service_charge_pay" property="serviceChargePay"/> | ||||
| <result column="shop_info" property="shopInfo"/> | <result column="shop_info" property="shopInfo"/> | ||||
| @@ -6,19 +6,19 @@ | |||||
| <result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/> | <result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/> | ||||
| <result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId" /> | <result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId" /> | ||||
| <result column="rent_contract_id" jdbcType="BIGINT" property="rentContractId"/> | <result column="rent_contract_id" jdbcType="BIGINT" property="rentContractId"/> | ||||
| <result column="receive_pay" jdbcType="BIGINT" property="receivePay"/> | |||||
| <result column="pay" jdbcType="BIGINT" property="pay"/> | |||||
| <result column="receive_pay" jdbcType="VARCHAR" property="receivePay"/> | |||||
| <result column="pay" jdbcType="VARCHAR" property="pay"/> | |||||
| <result column="receive_date" jdbcType="TIMESTAMP" property="receiveDate"/> | <result column="receive_date" jdbcType="TIMESTAMP" property="receiveDate"/> | ||||
| <result column="pay_date" jdbcType="TIMESTAMP" property="payDate"/> | <result column="pay_date" jdbcType="TIMESTAMP" property="payDate"/> | ||||
| <result column="createtime" jdbcType="TIMESTAMP" property="createtime"/> | <result column="createtime" jdbcType="TIMESTAMP" property="createtime"/> | ||||
| <result column="expired_day" jdbcType="INTEGER" property="expiredDay"/> | <result column="expired_day" jdbcType="INTEGER" property="expiredDay"/> | ||||
| <result column="owe" jdbcType="BIGINT" property="owe"/> | |||||
| <result column="owe" jdbcType="VARCHAR" property="owe"/> | |||||
| <result column="status" jdbcType="INTEGER" property="status"/> | <result column="status" jdbcType="INTEGER" property="status"/> | ||||
| <result column="apply_status" jdbcType="INTEGER" property="applyStatus"/> | <result column="apply_status" jdbcType="INTEGER" property="applyStatus"/> | ||||
| <result column="apply_pay_img" jdbcType="INTEGER" property="applyPayImg"/> | <result column="apply_pay_img" jdbcType="INTEGER" property="applyPayImg"/> | ||||
| <result column="apply_update_time" jdbcType="INTEGER" property="applyUpdateTime"/> | <result column="apply_update_time" jdbcType="INTEGER" property="applyUpdateTime"/> | ||||
| <result column="is_del" jdbcType="INTEGER" property="isDel"/> | <result column="is_del" jdbcType="INTEGER" property="isDel"/> | ||||
| <result column="need_pay" jdbcType="BIGINT" property="needPay"/> | |||||
| <result column="need_pay" jdbcType="VARCHAR" property="needPay"/> | |||||
| <result column="merchant_id" jdbcType="BIGINT" property="merchantId"/> | <result column="merchant_id" jdbcType="BIGINT" property="merchantId"/> | ||||
| <result column="user_id" jdbcType="BIGINT" property="userId"/> | <result column="user_id" jdbcType="BIGINT" property="userId"/> | ||||
| <result column="shop_id" jdbcType="BIGINT" property="shopId"/> | <result column="shop_id" jdbcType="BIGINT" property="shopId"/> | ||||
| @@ -26,7 +26,7 @@ | |||||
| <result column="rent_shop_type" jdbcType="INTEGER" property="rentShopType"/> | <result column="rent_shop_type" jdbcType="INTEGER" property="rentShopType"/> | ||||
| <result column="late_pay_ratio" jdbcType="INTEGER" property="latePayRatio"/> | <result column="late_pay_ratio" jdbcType="INTEGER" property="latePayRatio"/> | ||||
| <result column="late_pay_time" jdbcType="TIMESTAMP" property="latePayTime"/> | <result column="late_pay_time" jdbcType="TIMESTAMP" property="latePayTime"/> | ||||
| <result column="late_pay_price" jdbcType="BIGINT" property="latePayPrice"/> | |||||
| <result column="late_pay_price" jdbcType="VARCHAR" property="latePayPrice"/> | |||||
| <result column="period" jdbcType="INTEGER" property="period"/> | <result column="period" jdbcType="INTEGER" property="period"/> | ||||
| <result column="shop_info" jdbcType="VARCHAR" property="shopInfo"/> | <result column="shop_info" jdbcType="VARCHAR" property="shopInfo"/> | ||||
| <result column="pay_way" jdbcType="INTEGER" property="payWay"/> | <result column="pay_way" jdbcType="INTEGER" property="payWay"/> | ||||
| @@ -6,13 +6,13 @@ | |||||
| <result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/> | <result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/> | ||||
| <result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId" /> | <result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId" /> | ||||
| <result column="rent_contract_id" jdbcType="BIGINT" property="rentContractId"/> | <result column="rent_contract_id" jdbcType="BIGINT" property="rentContractId"/> | ||||
| <result column="receive_pay" jdbcType="BIGINT" property="receivePay"/> | |||||
| <result column="pay" jdbcType="BIGINT" property="pay"/> | |||||
| <result column="receive_pay" jdbcType="VARCHAR" property="receivePay"/> | |||||
| <result column="pay" jdbcType="VARCHAR" property="pay"/> | |||||
| <result column="receive_date" jdbcType="TIMESTAMP" property="receiveDate"/> | <result column="receive_date" jdbcType="TIMESTAMP" property="receiveDate"/> | ||||
| <result column="pay_date" jdbcType="TIMESTAMP" property="payDate"/> | <result column="pay_date" jdbcType="TIMESTAMP" property="payDate"/> | ||||
| <result column="createtime" jdbcType="TIMESTAMP" property="createtime"/> | <result column="createtime" jdbcType="TIMESTAMP" property="createtime"/> | ||||
| <result column="expired_day" jdbcType="INTEGER" property="expiredDay"/> | <result column="expired_day" jdbcType="INTEGER" property="expiredDay"/> | ||||
| <result column="owe" jdbcType="BIGINT" property="owe"/> | |||||
| <result column="owe" jdbcType="VARCHAR" property="owe"/> | |||||
| <result column="status" jdbcType="INTEGER" property="status"/> | <result column="status" jdbcType="INTEGER" property="status"/> | ||||
| <result column="apply_status" jdbcType="INTEGER" property="applyStatus"/> | <result column="apply_status" jdbcType="INTEGER" property="applyStatus"/> | ||||
| <result column="apply_pay_img" jdbcType="INTEGER" property="applyPayImg"/> | <result column="apply_pay_img" jdbcType="INTEGER" property="applyPayImg"/> | ||||
| @@ -20,18 +20,18 @@ | |||||
| <result column="is_del" jdbcType="INTEGER" property="isDel"/> | <result column="is_del" jdbcType="INTEGER" property="isDel"/> | ||||
| <result column="contract_need_pay" jdbcType="BIGINT" property="contractNeedPay"/> | <result column="contract_need_pay" jdbcType="BIGINT" property="contractNeedPay"/> | ||||
| <result column="rent_price_info" jdbcType="VARCHAR" property="rentPriceInfo"/> | <result column="rent_price_info" jdbcType="VARCHAR" property="rentPriceInfo"/> | ||||
| <result column="need_pay" jdbcType="BIGINT" property="needPay"/> | |||||
| <result column="bussiness_manage_fee_need_pay" jdbcType="BIGINT" property="bussinessManageFeeNeedPay"/> | |||||
| <result column="operating_manage_fee_need_pay" jdbcType="BIGINT" property="operatingManageFeeNeedPay"/> | |||||
| <result column="need_pay" jdbcType="VARCHAR" property="needPay"/> | |||||
| <result column="bussiness_manage_fee_need_pay" jdbcType="VARCHAR" property="bussinessManageFeeNeedPay"/> | |||||
| <result column="operating_manage_fee_need_pay" jdbcType="VARCHAR" property="operatingManageFeeNeedPay"/> | |||||
| <result column="merchant_id" jdbcType="BIGINT" property="merchantId"/> | <result column="merchant_id" jdbcType="BIGINT" property="merchantId"/> | ||||
| <result column="user_id" jdbcType="BIGINT" property="userId"/> | <result column="user_id" jdbcType="BIGINT" property="userId"/> | ||||
| <result column="shop_id" jdbcType="BIGINT" property="shopId"/> | <result column="shop_id" jdbcType="BIGINT" property="shopId"/> | ||||
| <result column="updatetime" jdbcType="TIMESTAMP" property="updatetime"/> | <result column="updatetime" jdbcType="TIMESTAMP" property="updatetime"/> | ||||
| <result column="rent_shop_type" jdbcType="INTEGER" property="rentShopType"/> | <result column="rent_shop_type" jdbcType="INTEGER" property="rentShopType"/> | ||||
| <result column="revenue" jdbcType="INTEGER" property="revenue"/> | |||||
| <result column="revenue" jdbcType="VARCHAR" property="revenue"/> | |||||
| <result column="late_pay_ratio" jdbcType="INTEGER" property="latePayRatio"/> | <result column="late_pay_ratio" jdbcType="INTEGER" property="latePayRatio"/> | ||||
| <result column="late_pay_time" jdbcType="TIMESTAMP" property="latePayTime"/> | <result column="late_pay_time" jdbcType="TIMESTAMP" property="latePayTime"/> | ||||
| <result column="late_pay_price" jdbcType="BIGINT" property="latePayPrice"/> | |||||
| <result column="late_pay_price" jdbcType="VARCHAR" property="latePayPrice"/> | |||||
| <result column="period" jdbcType="INTEGER" property="period"/> | <result column="period" jdbcType="INTEGER" property="period"/> | ||||
| <result column="is_preview" property="isPreview"/> | <result column="is_preview" property="isPreview"/> | ||||
| <result column="shop_info" jdbcType="VARCHAR" property="shopInfo"/> | <result column="shop_info" jdbcType="VARCHAR" property="shopInfo"/> | ||||
| @@ -4,6 +4,7 @@ | |||||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxPropertyContract"> | <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxPropertyContract"> | ||||
| <id column="id" jdbcType="BIGINT" property="id"/> | <id column="id" jdbcType="BIGINT" property="id"/> | ||||
| <result column="merchant_id" jdbcType="BIGINT" property="merchantId"/> | <result column="merchant_id" jdbcType="BIGINT" property="merchantId"/> | ||||
| <result column="decimal_size" jdbcType="INTEGER" property="decimalSize"/> | |||||
| <result column="price" jdbcType="INTEGER" property="price"/> | <result column="price" jdbcType="INTEGER" property="price"/> | ||||
| <result column="rental_start_date" jdbcType="TIMESTAMP" property="rentalStartDate"/> | <result column="rental_start_date" jdbcType="TIMESTAMP" property="rentalStartDate"/> | ||||
| <result column="rental_end_date" jdbcType="TIMESTAMP" property="rentalEndDate"/> | <result column="rental_end_date" jdbcType="TIMESTAMP" property="rentalEndDate"/> | ||||
| @@ -56,7 +57,7 @@ | |||||
| </resultMap> | </resultMap> | ||||
| <sql id="allColumns"> | <sql id="allColumns"> | ||||
| `id`,`merchant_id`,`price`,`rental_start_date`,`rental_end_date`, | |||||
| `id`,`merchant_id`,`decimal_size`,`price`,`rental_start_date`,`rental_end_date`, | |||||
| `sign_date`,`receive_period`,`tenant_id`,`parent_tenant_id`,`filepath`,`status`,`contract_number`, | `sign_date`,`receive_period`,`tenant_id`,`parent_tenant_id`,`filepath`,`status`,`contract_number`, | ||||
| `deposit`,`pay_date`,`is_del`,`merchant_name`,`brand`,`business_id`, | `deposit`,`pay_date`,`is_del`,`merchant_name`,`brand`,`business_id`, | ||||
| `shop_type`,`updatetime`,`createtime`,`rent_area`,`rent_shop_type`, | `shop_type`,`updatetime`,`createtime`,`rent_area`,`rent_shop_type`, | ||||
| @@ -13,8 +13,8 @@ | |||||
| <result column="opening_date" jdbcType="TIMESTAMP" property="openingDate"/> | <result column="opening_date" jdbcType="TIMESTAMP" property="openingDate"/> | ||||
| <result column="business_hours" jdbcType="VARCHAR" property="businessHours"/> | <result column="business_hours" jdbcType="VARCHAR" property="businessHours"/> | ||||
| <result column="scope_metre" jdbcType="INTEGER" property="scopeMetre"/> | <result column="scope_metre" jdbcType="INTEGER" property="scopeMetre"/> | ||||
| <result column="price" jdbcType="INTEGER" property="price"/> | |||||
| <result column="decimal_size" jdbcType="INTEGER" property="decimalSize"/> | |||||
| <result column="price" jdbcType="VARCHAR" property="price"/> | |||||
| <result column="rental_start_date" jdbcType="TIMESTAMP" property="rentalStartDate"/> | <result column="rental_start_date" jdbcType="TIMESTAMP" property="rentalStartDate"/> | ||||
| <result column="rental_end_date" jdbcType="TIMESTAMP" property="rentalEndDate"/> | <result column="rental_end_date" jdbcType="TIMESTAMP" property="rentalEndDate"/> | ||||
| <result column="sign_date" jdbcType="TIMESTAMP" property="signDate"/> | <result column="sign_date" jdbcType="TIMESTAMP" property="signDate"/> | ||||
| @@ -35,7 +35,7 @@ | |||||
| <result column="water_fee" jdbcType="INTEGER" property="waterFee"/> | <result column="water_fee" jdbcType="INTEGER" property="waterFee"/> | ||||
| <result column="electricity_fees" jdbcType="INTEGER" property="electricityFees"/> | <result column="electricity_fees" jdbcType="INTEGER" property="electricityFees"/> | ||||
| <result column="deposit" jdbcType="INTEGER" property="deposit"/> | |||||
| <result column="deposit" jdbcType="VARCHAR" property="deposit"/> | |||||
| <!--<result column="deposit_info" jdbcType="VARCHAR" property="depositInfo"/>--> | <!--<result column="deposit_info" jdbcType="VARCHAR" property="depositInfo"/>--> | ||||
| <result column="cashtype_content_lsit" jdbcType="VARCHAR" property="cashtypeContentLsit"/> | <result column="cashtype_content_lsit" jdbcType="VARCHAR" property="cashtypeContentLsit"/> | ||||
| @@ -59,7 +59,7 @@ | |||||
| <result column="filename" jdbcType="VARCHAR" property="filename"/> | <result column="filename" jdbcType="VARCHAR" property="filename"/> | ||||
| <result column="lease" jdbcType="INTEGER" property="lease"/> | <result column="lease" jdbcType="INTEGER" property="lease"/> | ||||
| <result column="type" jdbcType="INTEGER" property="type"/> | <result column="type" jdbcType="INTEGER" property="type"/> | ||||
| <result column="revenue" jdbcType="INTEGER" property="revenue"/> | |||||
| <result column="revenue" jdbcType="VARCHAR" property="revenue"/> | |||||
| <result column="revenue_ratio" jdbcType="INTEGER" property="revenueRatio"/> | <result column="revenue_ratio" jdbcType="INTEGER" property="revenueRatio"/> | ||||
| <result column="revenue_year" jdbcType="VARCHAR" property="revenueYear"/> | <result column="revenue_year" jdbcType="VARCHAR" property="revenueYear"/> | ||||
| <result column="revenue_ratio_way" jdbcType="INTEGER" property="revenueRatioWay"/> | <result column="revenue_ratio_way" jdbcType="INTEGER" property="revenueRatioWay"/> | ||||
| @@ -133,7 +133,7 @@ | |||||
| <sql id="allColumns"> | <sql id="allColumns"> | ||||
| `id`,`merchant_id`, | `id`,`merchant_id`, | ||||
| `shop_type_sub`,`lease_purpose`,`contractual_rules`,`delivery_date`,`delivery_grace_period`,`opening_date`,`business_hours`,`scope_metre`, | `shop_type_sub`,`lease_purpose`,`contractual_rules`,`delivery_date`,`delivery_grace_period`,`opening_date`,`business_hours`,`scope_metre`, | ||||
| `price`,`rental_start_date`,`rental_end_date`,`sign_date`,`receive_period`, | |||||
| `decimal_size`,`price`,`rental_start_date`,`rental_end_date`,`sign_date`,`receive_period`, | |||||
| `tenant_id`,`parent_tenant_id`,`filepath`,`status`,`contract_number`, | `tenant_id`,`parent_tenant_id`,`filepath`,`status`,`contract_number`, | ||||
| `first_party_bank_info`,`second_party_bank_info`,`second_party_tax_info`, | `first_party_bank_info`,`second_party_bank_info`,`second_party_tax_info`, | ||||
| `property_name`,`property_fee`,`fee_cycle`,`water_fee`,`electricity_fees`, | `property_name`,`property_fee`,`fee_cycle`,`water_fee`,`electricity_fees`, | ||||