| @@ -131,7 +131,7 @@ public class WxBillAllController extends BaseController { | |||||
| WxBillSum rentDepositSum = billAllHelper.getBillDeposit(wxMerchant, starttime, enttime); | WxBillSum rentDepositSum = billAllHelper.getBillDeposit(wxMerchant, starttime, enttime); | ||||
| WxBillSum propertySum = billAllHelper.getBillProperty(wxMerchant, starttime, enttime); | WxBillSum propertySum = billAllHelper.getBillProperty(wxMerchant, starttime, enttime); | ||||
| WxBillSum propertyDepositSum = billAllHelper.getBillPropertyDeposit(wxMerchant, starttime, enttime); | WxBillSum propertyDepositSum = billAllHelper.getBillPropertyDeposit(wxMerchant, starttime, enttime); | ||||
| WxBillSum dailySum = billAllHelper.getBillDaily(wxMerchant, starttime, enttime); | |||||
| WxBillSum dailySum = billAllHelper.getBillDaily(wxMerchant, starttime, enttime,null); | |||||
| WxBillSum otherSum = billAllHelper.getBillOther(wxMerchant, starttime, enttime); | WxBillSum otherSum = billAllHelper.getBillOther(wxMerchant, starttime, enttime); | ||||
| WxBillSum otherDepositSum = billAllHelper.getBillOtherDeposit(wxMerchant, starttime, enttime); | WxBillSum otherDepositSum = billAllHelper.getBillOtherDeposit(wxMerchant, starttime, enttime); | ||||
| @@ -195,7 +195,7 @@ public class WxBillAllController extends BaseController { | |||||
| WxBillSum rentDepositSum = billAllHelper.getBillDeposit(wxMerchant, starttime, enttime); | WxBillSum rentDepositSum = billAllHelper.getBillDeposit(wxMerchant, starttime, enttime); | ||||
| WxBillSum propertySum = billAllHelper.getBillProperty(wxMerchant, starttime, enttime); | WxBillSum propertySum = billAllHelper.getBillProperty(wxMerchant, starttime, enttime); | ||||
| WxBillSum propertyDepositSum = billAllHelper.getBillPropertyDeposit(wxMerchant, starttime, enttime); | WxBillSum propertyDepositSum = billAllHelper.getBillPropertyDeposit(wxMerchant, starttime, enttime); | ||||
| WxBillSum dailySum = billAllHelper.getBillDaily(wxMerchant, starttime, enttime); | |||||
| WxBillSum dailySum = billAllHelper.getBillDaily(wxMerchant, starttime, enttime,null); | |||||
| WxBillSum otherSum = billAllHelper.getBillOther(wxMerchant, starttime, enttime); | WxBillSum otherSum = billAllHelper.getBillOther(wxMerchant, starttime, enttime); | ||||
| WxBillSum otherDepositSum = billAllHelper.getBillOtherDeposit(wxMerchant, starttime, enttime); | WxBillSum otherDepositSum = billAllHelper.getBillOtherDeposit(wxMerchant, starttime, enttime); | ||||
| @@ -35,7 +35,7 @@ public class WxBillDaily extends TenantEntity { | |||||
| @Excel(name = "费用类型*", replace = {"水费_1", "电费_2"}, width = 20, orderNum = "2") | @Excel(name = "费用类型*", replace = {"水费_1", "电费_2"}, width = 20, orderNum = "2") | ||||
| @NotNull | @NotNull | ||||
| @io.swagger.annotations.ApiModelProperty(value="账单类型",name="type") | |||||
| @io.swagger.annotations.ApiModelProperty(value="账单类型EnumBillDailyType",name="type") | |||||
| private Integer type; | private Integer type; | ||||
| @io.swagger.annotations.ApiModelProperty(value="实际应收金额",name="receivePay") | @io.swagger.annotations.ApiModelProperty(value="实际应收金额",name="receivePay") | ||||
| @@ -42,9 +42,11 @@ public class WxBillOther extends TenantEntity { | |||||
| private String comments; | private String comments; | ||||
| @io.swagger.annotations.ApiModelProperty(value="实际应收金额",name="receivePay") | @io.swagger.annotations.ApiModelProperty(value="实际应收金额",name="receivePay") | ||||
| private Long receivePay; | |||||
| private String receivePay; | |||||
| @Excel(name = "实收金额(元)", orderNum = "5", width = 20) | |||||
| @io.swagger.annotations.ApiModelProperty(value="实收金额",name="pay") | @io.swagger.annotations.ApiModelProperty(value="实收金额",name="pay") | ||||
| private Long pay; | |||||
| private String pay; | |||||
| @Excel(name = "缴款截止日期", orderNum = "7", width = 20, format = "yyyy-MM-dd") | @Excel(name = "缴款截止日期", orderNum = "7", width = 20, format = "yyyy-MM-dd") | ||||
| @io.swagger.annotations.ApiModelProperty(value="截止收款日期",name="receiveDate") | @io.swagger.annotations.ApiModelProperty(value="截止收款日期",name="receiveDate") | ||||
| @@ -61,8 +63,9 @@ public class WxBillOther extends TenantEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value="逾期天数",name="expiredDay") | @io.swagger.annotations.ApiModelProperty(value="逾期天数",name="expiredDay") | ||||
| private Long expiredDay; | private Long expiredDay; | ||||
| @Excel(name = "欠缴金额(元)", orderNum = "6", width = 20) | |||||
| @io.swagger.annotations.ApiModelProperty(value="欠缴",name="owe") | @io.swagger.annotations.ApiModelProperty(value="欠缴",name="owe") | ||||
| private Long owe; | |||||
| private String owe; | |||||
| @Excel(name = "状态", replace = {"欠缴_1", "待缴_2", "已结清_3", "未到期_4", "已退还_5", "失效_6"}, width = 20, orderNum = "9") | @Excel(name = "状态", replace = {"欠缴_1", "待缴_2", "已结清_3", "未到期_4", "已退还_5", "失效_6"}, width = 20, orderNum = "9") | ||||
| @io.swagger.annotations.ApiModelProperty(value = "账单状态1欠缴2待缴3已结清4未到期", name = "status") | @io.swagger.annotations.ApiModelProperty(value = "账单状态1欠缴2待缴3已结清4未到期", name = "status") | ||||
| private Integer status; | private Integer status; | ||||
| @@ -105,34 +108,12 @@ public class WxBillOther extends TenantEntity { | |||||
| @Excel(name = "商铺号", width = 20, orderNum = "1") | @Excel(name = "商铺号", width = 20, orderNum = "1") | ||||
| private String shopName; | private String shopName; | ||||
| @TableField(exist = false) | |||||
| private String receivePayStr; | |||||
| @TableField(exist = false) | |||||
| @Excel(name = "实收金额(元)", orderNum = "5", width = 20) | |||||
| private String payStr; | |||||
| @TableField(exist = false) | |||||
| @Excel(name = "欠缴金额(元)", orderNum = "6", width = 20) | |||||
| private String oweStr; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "开始时间", name = "starttime") | @io.swagger.annotations.ApiModelProperty(value = "开始时间", name = "starttime") | ||||
| private Date starttime; | private Date starttime; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "结束时间", name = "endtime") | @io.swagger.annotations.ApiModelProperty(value = "结束时间", name = "endtime") | ||||
| private Date endtime; | private Date endtime; | ||||
| public String getReceivePayStr() { | |||||
| return new BigDecimal(receivePay == null ? 0 : receivePay).divide(new BigDecimal(100)).toPlainString(); | |||||
| } | |||||
| public String getPayStr() { | |||||
| return new BigDecimal(pay == null ? 0 : pay).divide(new BigDecimal(100)).toPlainString(); | |||||
| } | |||||
| public String getOweStr() { | |||||
| return new BigDecimal(owe == null ? 0 : owe).divide(new BigDecimal(100)).toPlainString(); | |||||
| } | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private WxMerchant merchant; | private WxMerchant merchant; | ||||
| @@ -141,26 +122,17 @@ public class WxBillOther 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; | |||||
| @io.swagger.annotations.ApiModelProperty(value="实际应收金额",name="realReceivePay") | |||||
| private String serviceChargePay; | |||||
| @Excel(name = "实际应收总金额(元)", width = 20, orderNum = "4") | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private Long realReceivePay; | |||||
| private String realReceivePay; | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private String serviceChargePayBefore; | private String serviceChargePayBefore; | ||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private String serviceChargePayUpdate; | private String serviceChargePayUpdate; | ||||
| @Excel(name = "实际应收总金额(元)", width = 20, orderNum = "4") | |||||
| @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="账单类型名称",name="billTypeName") | @io.swagger.annotations.ApiModelProperty(value="账单类型名称",name="billTypeName") | ||||
| private String billTypeName; | private String billTypeName; | ||||
| @@ -37,10 +37,11 @@ public class WxBillOtherDeposit extends TenantEntity { | |||||
| private String comments; | private String comments; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "实际应收金额", name = "receivePay") | @io.swagger.annotations.ApiModelProperty(value = "实际应收金额", name = "receivePay") | ||||
| private Long receivePay; | |||||
| private String receivePay; | |||||
| @Excel(name = "实收金额(元)", orderNum = "5", width = 20) | |||||
| @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; | ||||
| @@ -56,7 +57,7 @@ public class WxBillOtherDeposit 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; | |||||
| @Excel(name = "状态", replace = {"欠缴_1", "待缴_2", "已结清_3", "未到期_4", "已退还_5", "失效_6"}, width = 20, orderNum = "8") | @Excel(name = "状态", replace = {"欠缴_1", "待缴_2", "已结清_3", "未到期_4", "已退还_5", "失效_6"}, width = 20, orderNum = "8") | ||||
| @io.swagger.annotations.ApiModelProperty(value = "账单状态1欠缴2待缴3已结清4未到期5已退还", name = "status") | @io.swagger.annotations.ApiModelProperty(value = "账单状态1欠缴2待缴3已结清4未到期5已退还", name = "status") | ||||
| @@ -103,22 +104,6 @@ public class WxBillOtherDeposit extends TenantEntity { | |||||
| @Excel(name = "商铺号", width = 20, orderNum = "1") | @Excel(name = "商铺号", width = 20, orderNum = "1") | ||||
| private String shopName; | private String shopName; | ||||
| @TableField(exist = false) | |||||
| private String receivePayStr; | |||||
| @TableField(exist = false) | |||||
| @Excel(name = "实收金额(元)", orderNum = "5", width = 20) | |||||
| private String payStr; | |||||
| public String getReceivePayStr() { | |||||
| return new BigDecimal(receivePay == null ? 0 : receivePay).divide(new BigDecimal(100)).toPlainString(); | |||||
| } | |||||
| public String getPayStr() { | |||||
| return new BigDecimal(pay == null ? 0 : pay).divide(new BigDecimal(100)).toPlainString(); | |||||
| } | |||||
| public Date getReturnDate() { | public Date getReturnDate() { | ||||
| if (status == null) { | if (status == null) { | ||||
| return null; | return null; | ||||
| @@ -145,25 +130,17 @@ public class WxBillOtherDeposit 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") | |||||
| @Excel(name = "实际应收总金额(元)", width = 20, orderNum = "4") | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private Long realReceivePay; | |||||
| private String realReceivePay; | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private String serviceChargePayBefore; | private String serviceChargePayBefore; | ||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private String serviceChargePayUpdate; | private String serviceChargePayUpdate; | ||||
| @Excel(name = "实际应收总金额(元)", width = 20, orderNum = "4") | |||||
| @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="账单类型名称",name="billTypeName") | @io.swagger.annotations.ApiModelProperty(value="账单类型名称",name="billTypeName") | ||||
| private String billTypeName; | private String billTypeName; | ||||
| @@ -26,6 +26,7 @@ import com.iformall.domain.po.base.TenantEntity; | |||||
| import com.iformall.domain.vo.WxBillSum; | import com.iformall.domain.vo.WxBillSum; | ||||
| import com.iformall.domain.vo.WxShopVo; | import com.iformall.domain.vo.WxShopVo; | ||||
| import com.iformall.enums.EnumBillAllType; | import com.iformall.enums.EnumBillAllType; | ||||
| import com.iformall.enums.EnumBillDailyType; | |||||
| import com.iformall.enums.EnumBillType; | import com.iformall.enums.EnumBillType; | ||||
| import com.iformall.enums.EnumRentContractManageFeeType; | import com.iformall.enums.EnumRentContractManageFeeType; | ||||
| import com.iformall.enums.EnumYesOrNo; | import com.iformall.enums.EnumYesOrNo; | ||||
| @@ -116,13 +117,15 @@ public class WxBillAllHelper { | |||||
| return rentManageSum; | return rentManageSum; | ||||
| } | } | ||||
| public List<Long> getBillRentManageMerchantIds(WxMerchant wxMerchant,Date starttime, Date enttime,Integer manageFeeType) { | |||||
| public List<Long> getBillRentManageMerchantIds(WxMerchant wxMerchant,Date starttime, Date enttime,EnumRentContractManageFeeType manageFeeType) { | |||||
| WxBillRentManage brm = new WxBillRentManage(); | WxBillRentManage brm = new WxBillRentManage(); | ||||
| brm.updateTenantInfo(wxMerchant); | brm.updateTenantInfo(wxMerchant); | ||||
| brm.setStarttime(starttime); | brm.setStarttime(starttime); | ||||
| brm.setEndtime(enttime); | brm.setEndtime(enttime); | ||||
| brm.setOnlyOwe(wxMerchant.getOnlyOwe()); | brm.setOnlyOwe(wxMerchant.getOnlyOwe()); | ||||
| brm.setManageFeeType(manageFeeType); | |||||
| if (null != manageFeeType) { | |||||
| brm.setManageFeeType(manageFeeType.getCode()); | |||||
| } | |||||
| brm.setMerchantId(wxMerchant.getId()); | brm.setMerchantId(wxMerchant.getId()); | ||||
| return wxBillRentManageService.getMerchantIds(brm); | return wxBillRentManageService.getMerchantIds(brm); | ||||
| } | } | ||||
| @@ -202,28 +205,38 @@ public class WxBillAllHelper { | |||||
| return wxBillPropertyDepositService.getMerchantIds(pd); | return wxBillPropertyDepositService.getMerchantIds(pd); | ||||
| } | } | ||||
| public WxBillSum getBillDaily(WxMerchant wxMerchant,Date starttime, Date enttime) { | |||||
| public WxBillSum getBillDaily(WxMerchant wxMerchant,Date starttime, Date enttime,EnumBillDailyType dailyType) { | |||||
| WxBillDaily bdd = new WxBillDaily(); | WxBillDaily bdd = new WxBillDaily(); | ||||
| bdd.updateTenantInfo(wxMerchant); | bdd.updateTenantInfo(wxMerchant); | ||||
| bdd.setStarttime(starttime); | bdd.setStarttime(starttime); | ||||
| bdd.setEndtime(enttime); | bdd.setEndtime(enttime); | ||||
| bdd.setOnlyOwe(wxMerchant.getOnlyOwe()); | bdd.setOnlyOwe(wxMerchant.getOnlyOwe()); | ||||
| bdd.setMerchantId(wxMerchant.getId()); | bdd.setMerchantId(wxMerchant.getId()); | ||||
| if (null != dailyType) { | |||||
| bdd.setType(dailyType.getCode()); | |||||
| } | |||||
| WxBillSum dailySum = wxBillDailyService.getBillMonthSum(bdd); | WxBillSum dailySum = wxBillDailyService.getBillMonthSum(bdd); | ||||
| if (null == dailySum) { | if (null == dailySum) { | ||||
| dailySum = new WxBillSum(); | dailySum = new WxBillSum(); | ||||
| } | } | ||||
| dailySum.setBillName("日藏水电空调费用"); | |||||
| if (null != dailyType) { | |||||
| dailySum.setBillName(dailyType.getMessage()); | |||||
| }else { | |||||
| dailySum.setBillName("日藏水电空调费用"); | |||||
| } | |||||
| return dailySum; | return dailySum; | ||||
| } | } | ||||
| public List<Long> getBillDailyMerchantIds(WxMerchant wxMerchant,Date starttime, Date enttime) { | |||||
| public List<Long> getBillDailyMerchantIds(WxMerchant wxMerchant,Date starttime, Date enttime,EnumBillDailyType dailyType) { | |||||
| WxBillDaily bdd = new WxBillDaily(); | WxBillDaily bdd = new WxBillDaily(); | ||||
| bdd.updateTenantInfo(wxMerchant); | bdd.updateTenantInfo(wxMerchant); | ||||
| bdd.setStarttime(starttime); | bdd.setStarttime(starttime); | ||||
| bdd.setEndtime(enttime); | bdd.setEndtime(enttime); | ||||
| bdd.setOnlyOwe(wxMerchant.getOnlyOwe()); | bdd.setOnlyOwe(wxMerchant.getOnlyOwe()); | ||||
| bdd.setMerchantId(wxMerchant.getId()); | bdd.setMerchantId(wxMerchant.getId()); | ||||
| if (null != dailyType) { | |||||
| bdd.setType(dailyType.getCode()); | |||||
| } | |||||
| return wxBillDailyService.getMerchantIds(bdd); | return wxBillDailyService.getMerchantIds(bdd); | ||||
| } | } | ||||
| @@ -311,7 +324,7 @@ public class WxBillAllHelper { | |||||
| List<Long> rentDepositMids = this.getBillDepositMerchantIds(wxMerchant, starttime, enttime); | List<Long> rentDepositMids = this.getBillDepositMerchantIds(wxMerchant, starttime, enttime); | ||||
| List<Long> propertyMids = this.getBillPropertyMerchantIds(wxMerchant, starttime, enttime); | List<Long> propertyMids = this.getBillPropertyMerchantIds(wxMerchant, starttime, enttime); | ||||
| List<Long> propertyDepositMids = this.getBillPropertyDepositMerchantIds(wxMerchant, starttime, enttime); | List<Long> propertyDepositMids = this.getBillPropertyDepositMerchantIds(wxMerchant, starttime, enttime); | ||||
| List<Long> dailyMids = this.getBillDailyMerchantIds(wxMerchant, starttime, enttime); | |||||
| List<Long> dailyMids = this.getBillDailyMerchantIds(wxMerchant, starttime, enttime,null); | |||||
| List<Long> otherMids = this.getBillOtherMerchantIds(wxMerchant, starttime, enttime); | List<Long> otherMids = this.getBillOtherMerchantIds(wxMerchant, starttime, enttime); | ||||
| List<Long> otherDepositMids = this.getBillOtherDepositMerchantIds(wxMerchant, starttime, enttime); | List<Long> otherDepositMids = this.getBillOtherDepositMerchantIds(wxMerchant, starttime, enttime); | ||||
| return getUnionIds(rentMids,rentManageMids,rentDepositMids,propertyMids,propertyDepositMids,dailyMids,otherMids,otherDepositMids); | return getUnionIds(rentMids,rentManageMids,rentDepositMids,propertyMids,propertyDepositMids,dailyMids,otherMids,otherDepositMids); | ||||
| @@ -558,7 +558,7 @@ public class WxBillAllServiceImpl implements WxBillAllService { | |||||
| wxBillOtherDeposit.setPayDate(date); | wxBillOtherDeposit.setPayDate(date); | ||||
| Long owe = (Long) bill.get("owe"); | Long owe = (Long) bill.get("owe"); | ||||
| wxBillOtherDeposit.setPay(wxBillOtherDeposit.getPay() + owe); | wxBillOtherDeposit.setPay(wxBillOtherDeposit.getPay() + owe); | ||||
| wxBillOtherDeposit.setOwe(0L); | |||||
| wxBillOtherDeposit.setOwe("0"); | |||||
| wxBillOtherDeposit.setStatus(EnumBillDailyStatus.PAID.getCode()); | wxBillOtherDeposit.setStatus(EnumBillDailyStatus.PAID.getCode()); | ||||
| wxBillOtherDeposit.setPayDate(date); | wxBillOtherDeposit.setPayDate(date); | ||||
| wxBillOtherDeposit.setUpdatetime(date); | wxBillOtherDeposit.setUpdatetime(date); | ||||
| @@ -602,7 +602,7 @@ public class WxBillAllServiceImpl implements WxBillAllService { | |||||
| wxBillOther.setPayDate(date); | wxBillOther.setPayDate(date); | ||||
| Long owe = (Long) bill.get("owe"); | Long owe = (Long) bill.get("owe"); | ||||
| wxBillOther.setPay(wxBillOther.getPay() + owe); | wxBillOther.setPay(wxBillOther.getPay() + owe); | ||||
| wxBillOther.setOwe(0L); | |||||
| wxBillOther.setOwe("0"); | |||||
| wxBillOther.setStatus(EnumBillDailyStatus.PAID.getCode()); | wxBillOther.setStatus(EnumBillDailyStatus.PAID.getCode()); | ||||
| wxBillOther.setPayDate(date); | wxBillOther.setPayDate(date); | ||||
| wxBillOther.setUpdatetime(date); | wxBillOther.setUpdatetime(date); | ||||
| @@ -151,13 +151,12 @@ public class WxBillOtherDepositServiceImpl implements WxBillOtherDepositService | |||||
| } else { | } else { | ||||
| servicePay = new BigDecimal(e.getReceivePay()).multiply(new BigDecimal(wxPayAccountBill.getServiceChargeRate())).divide(new BigDecimal(10000), 2, BigDecimal.ROUND_HALF_UP); | servicePay = new BigDecimal(e.getReceivePay()).multiply(new BigDecimal(wxPayAccountBill.getServiceChargeRate())).divide(new BigDecimal(10000), 2, BigDecimal.ROUND_HALF_UP); | ||||
| } | } | ||||
| Long realReceivePay = servicePay.longValue() + e.getReceivePay(); | |||||
| e.setRealReceivePay(realReceivePay); | |||||
| e.setServiceChargePay(servicePay.intValue()); | |||||
| e.setRealReceivePay(servicePay.add(new BigDecimal(e.getReceivePay())).toPlainString()); | |||||
| e.setServiceChargePay(servicePay.toPlainString()); | |||||
| if (!e.getStatus().equals(EnumBillRentStatus.NOT_PAID.getCode())) { | if (!e.getStatus().equals(EnumBillRentStatus.NOT_PAID.getCode())) { | ||||
| e.setOwe(0L); | |||||
| e.setOwe("0"); | |||||
| } else { | } else { | ||||
| e.setOwe(realReceivePay - e.getPay()); | |||||
| e.setOwe(servicePay.add(new BigDecimal(e.getReceivePay())).subtract(new BigDecimal(e.getPay())).toPlainString()); | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| @@ -208,7 +207,7 @@ public class WxBillOtherDepositServiceImpl implements WxBillOtherDepositService | |||||
| record.setId(id); | record.setId(id); | ||||
| record.updateTenantInfo(tenantEntity); | record.updateTenantInfo(tenantEntity); | ||||
| WxBillOtherDeposit wxBillOther = getBillRentPropertyList(1, 10000, record, wxPayAccountBill).getList().get(0); | WxBillOtherDeposit wxBillOther = getBillRentPropertyList(1, 10000, record, wxPayAccountBill).getList().get(0); | ||||
| wxBillOther.setOwe(wxBillOther.getRealReceivePay() - wxBillOther.getPay()); | |||||
| wxBillOther.setOwe(new BigDecimal(wxBillOther.getRealReceivePay()).subtract(new BigDecimal(wxBillOther.getPay())).toPlainString()); | |||||
| wxBillOther.setMerchant(wxMerchantMapper.selectById(wxBillOther.getMerchantId())); | wxBillOther.setMerchant(wxMerchantMapper.selectById(wxBillOther.getMerchantId())); | ||||
| // if (wxBillOther.getShopId() != null) { | // if (wxBillOther.getShopId() != null) { | ||||
| // WxShop shop = new WxShop(); | // WxShop shop = new WxShop(); | ||||
| @@ -223,9 +222,15 @@ public class WxBillOtherDepositServiceImpl implements WxBillOtherDepositService | |||||
| @Override | @Override | ||||
| public ResultData saveOrUpdate(WxBillOtherDeposit record, MallUserInfo user) { | public ResultData saveOrUpdate(WxBillOtherDeposit record, MallUserInfo user) { | ||||
| int receivepay = record.getRealReceivePay() == null ? 0 : record.getRealReceivePay().intValue(); | |||||
| int pay = record.getPay()==null?0:record.getPay().intValue(); | |||||
| if (pay > receivepay) { | |||||
| String receivepay = "0"; | |||||
| if (StringUtils.isNotBlank(record.getRealReceivePay())) { | |||||
| receivepay = record.getRealReceivePay(); | |||||
| } | |||||
| String pay = "0"; | |||||
| if (StringUtils.isNotBlank(record.getPay())) { | |||||
| pay = record.getPay(); | |||||
| } | |||||
| if (new BigDecimal(pay).compareTo(new BigDecimal(receivepay)) > 0 ) { | |||||
| return new ResultData(ErrorCode.BILL_PAY_ERROR.getCode(), "实收金额不能大于实际应收总金额"); | return new ResultData(ErrorCode.BILL_PAY_ERROR.getCode(), "实收金额不能大于实际应收总金额"); | ||||
| } | } | ||||
| Date date = new Date(); | Date date = new Date(); | ||||
| @@ -249,7 +254,7 @@ public class WxBillOtherDepositServiceImpl implements WxBillOtherDepositService | |||||
| record.setCreatetime(date); | record.setCreatetime(date); | ||||
| record.setUpdatetime(date); | record.setUpdatetime(date); | ||||
| record.setExpiredDay(0L); | record.setExpiredDay(0L); | ||||
| record.setOwe(record.getRealReceivePay() - record.getPay()); | |||||
| record.setOwe(new BigDecimal(record.getRealReceivePay()).subtract(new BigDecimal(record.getPay())).toPlainString()); | |||||
| record.setIsDel(EnumDelStatus.NOT_DEL.getCode()); | record.setIsDel(EnumDelStatus.NOT_DEL.getCode()); | ||||
| try { | try { | ||||
| wxBillOtherDepositMapper.insert(record); | wxBillOtherDepositMapper.insert(record); | ||||
| @@ -267,15 +272,14 @@ public class WxBillOtherDepositServiceImpl implements WxBillOtherDepositService | |||||
| String message = ""; | String message = ""; | ||||
| String price = ""; | String price = ""; | ||||
| if(record.getServiceChargePayUpdate() != null){ | if(record.getServiceChargePayUpdate() != null){ | ||||
| Double l = Double.valueOf(record.getServiceChargePayUpdate())*100; | |||||
| wxBillOtherDeposit.setServiceChargePay(l.intValue()); | |||||
| wxBillOtherDeposit.setOwe(wxBillOtherDeposit.getReceivePay() + wxBillOtherDeposit.getServiceChargePay() - wxBillOtherDeposit.getPay()); | |||||
| wxBillOtherDeposit.setServiceChargePay(record.getServiceChargePayUpdate()); | |||||
| wxBillOtherDeposit.setOwe(new BigDecimal(wxBillOtherDeposit.getReceivePay()).add(new BigDecimal(wxBillOtherDeposit.getServiceChargePay())).subtract(new BigDecimal(wxBillOtherDeposit.getPay())).toPlainString()); | |||||
| }else{ | }else{ | ||||
| Long addpay = wxBillOtherDeposit.getPay(); | |||||
| String addpay = wxBillOtherDeposit.getPay(); | |||||
| wxBillOtherDeposit.setPayDate(record.getPayDate()); | wxBillOtherDeposit.setPayDate(record.getPayDate()); | ||||
| wxBillOtherDeposit.setPay(record.getPay()); | wxBillOtherDeposit.setPay(record.getPay()); | ||||
| wxBillOtherDeposit.setReceivePay(record.getReceivePay()); | wxBillOtherDeposit.setReceivePay(record.getReceivePay()); | ||||
| wxBillOtherDeposit.setOwe(record.getRealReceivePay() - record.getPay()); | |||||
| wxBillOtherDeposit.setOwe(new BigDecimal(record.getRealReceivePay()).subtract(new BigDecimal(record.getPay())).toPlainString()); | |||||
| if (record.getPay().equals(record.getRealReceivePay())) { | if (record.getPay().equals(record.getRealReceivePay())) { | ||||
| wxBillOtherDeposit.setStatus(EnumBillRentStatus.PAID.getCode()); | wxBillOtherDeposit.setStatus(EnumBillRentStatus.PAID.getCode()); | ||||
| Date payDate = record.getPayDate(); | Date payDate = record.getPayDate(); | ||||
| @@ -291,7 +295,7 @@ public class WxBillOtherDepositServiceImpl implements WxBillOtherDepositService | |||||
| wxBillOtherDeposit.setPayWay(record.getPayWay()); | wxBillOtherDeposit.setPayWay(record.getPayWay()); | ||||
| wxBillOtherDeposit.setComments(record.getComments()); | wxBillOtherDeposit.setComments(record.getComments()); | ||||
| message = EnumBillPayWay.getEnum(record.getPayWay()).getMessage(); | message = EnumBillPayWay.getEnum(record.getPayWay()).getMessage(); | ||||
| price = new BigDecimal(record.getPay() - addpay).divide(new BigDecimal(100)).toPlainString(); | |||||
| price = new BigDecimal(record.getPay()).subtract(new BigDecimal(addpay)).toPlainString(); | |||||
| } | } | ||||
| try { | try { | ||||
| @@ -397,7 +401,7 @@ public class WxBillOtherDepositServiceImpl implements WxBillOtherDepositService | |||||
| return new ResultData(ErrorCode.BILL_OTHER_DEPOSIT_IS_NOT_FOUND); | return new ResultData(ErrorCode.BILL_OTHER_DEPOSIT_IS_NOT_FOUND); | ||||
| } | } | ||||
| wxBillDeposit.setReceivePay(record.getReceivePay()); | wxBillDeposit.setReceivePay(record.getReceivePay()); | ||||
| wxBillDeposit.setOwe(record.getReceivePay() - record.getPay()); | |||||
| wxBillDeposit.setOwe(new BigDecimal(record.getReceivePay()).subtract(new BigDecimal(record.getPay())).toPlainString()); | |||||
| wxBillDeposit.setUpdatetime(new Date()); | wxBillDeposit.setUpdatetime(new Date()); | ||||
| try { | try { | ||||
| wxBillOtherDepositMapper.updateById(wxBillDeposit); | wxBillOtherDepositMapper.updateById(wxBillDeposit); | ||||
| @@ -151,13 +151,12 @@ public class WxBillOtherServiceImpl implements WxBillOtherService { | |||||
| } else { | } else { | ||||
| servicePay = new BigDecimal(e.getReceivePay()).multiply(new BigDecimal(wxPayAccountBill.getServiceChargeRate())).divide(new BigDecimal(10000), 2, BigDecimal.ROUND_HALF_UP); | servicePay = new BigDecimal(e.getReceivePay()).multiply(new BigDecimal(wxPayAccountBill.getServiceChargeRate())).divide(new BigDecimal(10000), 2, BigDecimal.ROUND_HALF_UP); | ||||
| } | } | ||||
| Long realReceivePay = servicePay.longValue() + e.getReceivePay(); | |||||
| e.setRealReceivePay(realReceivePay); | |||||
| e.setServiceChargePay(servicePay.intValue()); | |||||
| e.setRealReceivePay(servicePay.add(new BigDecimal(e.getReceivePay())).toPlainString()); | |||||
| e.setServiceChargePay(servicePay.toPlainString()); | |||||
| if (!e.getStatus().equals(EnumBillRentStatus.NOT_PAID.getCode())) { | if (!e.getStatus().equals(EnumBillRentStatus.NOT_PAID.getCode())) { | ||||
| e.setOwe(0L); | |||||
| e.setOwe("0"); | |||||
| } else { | } else { | ||||
| e.setOwe(realReceivePay - e.getPay()); | |||||
| e.setOwe(servicePay.add(new BigDecimal(e.getReceivePay())).subtract(new BigDecimal(e.getPay())).toPlainString()); | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| @@ -208,7 +207,7 @@ public class WxBillOtherServiceImpl implements WxBillOtherService { | |||||
| record.setId(id); | record.setId(id); | ||||
| record.updateTenantInfo(tenantEntity); | record.updateTenantInfo(tenantEntity); | ||||
| WxBillOther wxBillOther = getBillOtherPropertyList(1, 1, record, wxPayAccountBill).getList().get(0); | WxBillOther wxBillOther = getBillOtherPropertyList(1, 1, record, wxPayAccountBill).getList().get(0); | ||||
| wxBillOther.setOwe(wxBillOther.getRealReceivePay() - wxBillOther.getPay()); | |||||
| wxBillOther.setOwe(new BigDecimal(wxBillOther.getRealReceivePay()).subtract(new BigDecimal(wxBillOther.getPay())).toPlainString()); | |||||
| wxBillOther.setMerchant(wxMerchantMapper.selectById(wxBillOther.getMerchantId())); | wxBillOther.setMerchant(wxMerchantMapper.selectById(wxBillOther.getMerchantId())); | ||||
| // if (wxBillOther.getShopId() != null) { | // if (wxBillOther.getShopId() != null) { | ||||
| // WxShop shop = new WxShop(); | // WxShop shop = new WxShop(); | ||||
| @@ -224,9 +223,15 @@ public class WxBillOtherServiceImpl implements WxBillOtherService { | |||||
| @Override | @Override | ||||
| public ResultData saveOrUpdate(WxBillOther record, MallUserInfo user) { | public ResultData saveOrUpdate(WxBillOther record, MallUserInfo user) { | ||||
| int receivepay = record.getRealReceivePay() == null ? 0 : record.getRealReceivePay().intValue(); | |||||
| int pay = record.getPay()==null?0:record.getPay().intValue(); | |||||
| if(pay>receivepay){ | |||||
| String receivepay = "0"; | |||||
| if (StringUtils.isNotBlank(record.getRealReceivePay())) { | |||||
| receivepay = record.getRealReceivePay(); | |||||
| } | |||||
| String pay = "0"; | |||||
| if (StringUtils.isNotBlank(record.getPay())) { | |||||
| pay = record.getPay(); | |||||
| } | |||||
| if(new BigDecimal(pay).compareTo(new BigDecimal(receivepay)) > 0){ | |||||
| return new ResultData(ErrorCode.BILL_PAY_ERROR.getCode(), "实收金额不能大于实际应收总金额"); | return new ResultData(ErrorCode.BILL_PAY_ERROR.getCode(), "实收金额不能大于实际应收总金额"); | ||||
| } | } | ||||
| Date date = new Date(); | Date date = new Date(); | ||||
| @@ -248,7 +253,7 @@ public class WxBillOtherServiceImpl implements WxBillOtherService { | |||||
| record.setCreatetime(date); | record.setCreatetime(date); | ||||
| record.setUpdatetime(date); | record.setUpdatetime(date); | ||||
| record.setExpiredDay(0L); | record.setExpiredDay(0L); | ||||
| record.setOwe(record.getRealReceivePay() - record.getPay()); | |||||
| record.setOwe(new BigDecimal(record.getRealReceivePay()).subtract(new BigDecimal(record.getPay())).toPlainString()); | |||||
| record.setIsDel(EnumDelStatus.NOT_DEL.getCode()); | record.setIsDel(EnumDelStatus.NOT_DEL.getCode()); | ||||
| try { | try { | ||||
| wxBillOtherMapper.insert(record); | wxBillOtherMapper.insert(record); | ||||
| @@ -267,15 +272,14 @@ public class WxBillOtherServiceImpl implements WxBillOtherService { | |||||
| String message = ""; | String message = ""; | ||||
| String price = ""; | String price = ""; | ||||
| if(record.getServiceChargePayUpdate() != null){ | if(record.getServiceChargePayUpdate() != null){ | ||||
| Double l = Double.valueOf(record.getServiceChargePayUpdate())*100; | |||||
| wxBillOther.setServiceChargePay(l.intValue()); | |||||
| wxBillOther.setOwe(wxBillOther.getReceivePay() + wxBillOther.getServiceChargePay() - wxBillOther.getPay()); | |||||
| wxBillOther.setServiceChargePay(record.getServiceChargePayUpdate()); | |||||
| wxBillOther.setOwe(new BigDecimal(wxBillOther.getReceivePay()).add(new BigDecimal(wxBillOther.getServiceChargePay())).subtract(new BigDecimal(wxBillOther.getPay())).toPlainString()); | |||||
| }else{ | }else{ | ||||
| Long addpay = wxBillOther.getPay(); | |||||
| String addpay = wxBillOther.getPay(); | |||||
| wxBillOther.setPayDate(record.getPayDate()); | wxBillOther.setPayDate(record.getPayDate()); | ||||
| wxBillOther.setPay(record.getPay()); | wxBillOther.setPay(record.getPay()); | ||||
| wxBillOther.setReceivePay(record.getReceivePay()); | wxBillOther.setReceivePay(record.getReceivePay()); | ||||
| wxBillOther.setOwe(record.getRealReceivePay() - record.getPay()); | |||||
| wxBillOther.setOwe(new BigDecimal(record.getRealReceivePay()).subtract(new BigDecimal(record.getPay())).toPlainString()); | |||||
| if (record.getPay().equals(record.getRealReceivePay())) { | if (record.getPay().equals(record.getRealReceivePay())) { | ||||
| wxBillOther.setStatus(EnumBillRentStatus.PAID.getCode()); | wxBillOther.setStatus(EnumBillRentStatus.PAID.getCode()); | ||||
| Date payDate = record.getPayDate(); | Date payDate = record.getPayDate(); | ||||
| @@ -292,7 +296,7 @@ public class WxBillOtherServiceImpl implements WxBillOtherService { | |||||
| wxBillOther.setComments(record.getComments()); | wxBillOther.setComments(record.getComments()); | ||||
| wxBillOther.setName(record.getName()); | wxBillOther.setName(record.getName()); | ||||
| message = EnumBillPayWay.getEnum(record.getPayWay()).getMessage(); | message = EnumBillPayWay.getEnum(record.getPayWay()).getMessage(); | ||||
| price = new BigDecimal(record.getPay() - addpay).divide(new BigDecimal(100)).toPlainString(); | |||||
| price = new BigDecimal(record.getPay()).subtract(new BigDecimal(addpay)).toPlainString(); | |||||
| } | } | ||||
| try { | try { | ||||
| @@ -242,8 +242,8 @@ public class WxBillSettleServiceImpl implements WxBillSettleService { | |||||
| wxBillOtherDeposit.setPayDate(new Date()); | wxBillOtherDeposit.setPayDate(new Date()); | ||||
| WxBillOtherDeposit dbBill = wxBillOtherDepositMapper.selectById(wxBillRent.getId()); | WxBillOtherDeposit dbBill = wxBillOtherDepositMapper.selectById(wxBillRent.getId()); | ||||
| if(dbBill!=null) { | if(dbBill!=null) { | ||||
| if(dbBill.getPay() == null) dbBill.setPay(0l); | |||||
| if(dbBill.getReceivePay() == null) dbBill.setReceivePay(0l); | |||||
| if(StringUtils.isBlank(dbBill.getPay())) dbBill.setPay("0"); | |||||
| if(StringUtils.isBlank(dbBill.getReceivePay())) dbBill.setReceivePay("0"); | |||||
| wxBillOtherDeposit.setPay(dbBill.getPay()+ dbBill.getReceivePay()); | wxBillOtherDeposit.setPay(dbBill.getPay()+ dbBill.getReceivePay()); | ||||
| wxBillOtherDeposit.setPayDate(new Date()); | wxBillOtherDeposit.setPayDate(new Date()); | ||||
| if(EnumSettleBillType.R.getCode().equals(bill.getType())){ | if(EnumSettleBillType.R.getCode().equals(bill.getType())){ | ||||
| @@ -362,8 +362,8 @@ public class WxBillSettleServiceImpl implements WxBillSettleService { | |||||
| wxBillRent.setPayDate(new Date()); | wxBillRent.setPayDate(new Date()); | ||||
| WxBillOther dbBill = wxBillOtherMapper.selectById(wxBillRent.getId()); | WxBillOther dbBill = wxBillOtherMapper.selectById(wxBillRent.getId()); | ||||
| if(dbBill!=null) { | if(dbBill!=null) { | ||||
| if(dbBill.getPay() == null) dbBill.setPay(0l); | |||||
| if(dbBill.getOwe() == null) dbBill.setOwe(0l); | |||||
| if(StringUtils.isBlank(dbBill.getPay())) dbBill.setPay("0"); | |||||
| if(StringUtils.isBlank(dbBill.getOwe())) dbBill.setOwe("0"); | |||||
| wxBillRent.setPay(dbBill.getPay()+dbBill.getOwe()); | wxBillRent.setPay(dbBill.getPay()+dbBill.getOwe()); | ||||
| wxBillRent.setPayDate(new Date()); | wxBillRent.setPayDate(new Date()); | ||||
| addBillAction(bill.getBillId(), String.valueOf(dbBill.getOwe())); | addBillAction(bill.getBillId(), String.valueOf(dbBill.getOwe())); | ||||
| @@ -388,8 +388,8 @@ public class WxBillSettleServiceImpl implements WxBillSettleService { | |||||
| wxBillRent.setPayDate(new Date()); | wxBillRent.setPayDate(new Date()); | ||||
| WxBillOtherDeposit dbBill = wxBillOtherDepositMapper.selectById(wxBillRent.getId()); | WxBillOtherDeposit dbBill = wxBillOtherDepositMapper.selectById(wxBillRent.getId()); | ||||
| if(dbBill!=null) { | if(dbBill!=null) { | ||||
| if(dbBill.getPay() == null) dbBill.setPay(0l); | |||||
| if(dbBill.getReceivePay() == null) dbBill.setReceivePay(0l); | |||||
| if(StringUtils.isBlank(dbBill.getPay())) dbBill.setPay("0"); | |||||
| if(StringUtils.isBlank(dbBill.getReceivePay())) dbBill.setReceivePay("0"); | |||||
| wxBillRent.setPay(dbBill.getPay()+dbBill.getReceivePay()); | wxBillRent.setPay(dbBill.getPay()+dbBill.getReceivePay()); | ||||
| wxBillRent.setPayDate(new Date()); | wxBillRent.setPayDate(new Date()); | ||||
| if(EnumSettleBillType.R.getCode().equals(bill.getType())){ | if(EnumSettleBillType.R.getCode().equals(bill.getType())){ | ||||
| @@ -427,8 +427,8 @@ public class WxBillSettleServiceImpl implements WxBillSettleService { | |||||
| wxBillRent.setPayDate(new Date()); | wxBillRent.setPayDate(new Date()); | ||||
| WxBillOtherDeposit dbBill = wxBillOtherDepositMapper.selectById(wxBillRent.getId()); | WxBillOtherDeposit dbBill = wxBillOtherDepositMapper.selectById(wxBillRent.getId()); | ||||
| if(dbBill!=null) { | if(dbBill!=null) { | ||||
| if(dbBill.getPay() == null) dbBill.setPay(0l); | |||||
| if(dbBill.getReceivePay() == null) dbBill.setReceivePay(0l); | |||||
| if(StringUtils.isBlank(dbBill.getPay())) dbBill.setPay("0"); | |||||
| if(StringUtils.isBlank(dbBill.getReceivePay())) dbBill.setReceivePay("0"); | |||||
| wxBillRent.setPay(dbBill.getPay()+dbBill.getReceivePay()); | wxBillRent.setPay(dbBill.getPay()+dbBill.getReceivePay()); | ||||
| wxBillRent.setPayDate(new Date()); | wxBillRent.setPayDate(new Date()); | ||||
| if(EnumSettleBillType.R.getCode().equals(bill.getType())){ | if(EnumSettleBillType.R.getCode().equals(bill.getType())){ | ||||
| @@ -484,8 +484,8 @@ public class WxBillSettleServiceImpl implements WxBillSettleService { | |||||
| wxBillRent.setPayDate(new Date()); | wxBillRent.setPayDate(new Date()); | ||||
| WxBillOther dbBill = wxBillOtherMapper.selectById(wxBillRent.getId()); | WxBillOther dbBill = wxBillOtherMapper.selectById(wxBillRent.getId()); | ||||
| if(dbBill!=null) { | if(dbBill!=null) { | ||||
| if(dbBill.getPay() == null) dbBill.setPay(0l); | |||||
| if(dbBill.getOwe() == null) dbBill.setOwe(0l); | |||||
| if(StringUtils.isBlank(dbBill.getPay())) dbBill.setPay("0"); | |||||
| if(StringUtils.isBlank(dbBill.getOwe())) dbBill.setOwe("0"); | |||||
| wxBillRent.setPay(dbBill.getPay()+dbBill.getOwe()); | wxBillRent.setPay(dbBill.getPay()+dbBill.getOwe()); | ||||
| wxBillRent.setPayDate(new Date()); | wxBillRent.setPayDate(new Date()); | ||||
| addBillAction(bill.getBillId(), String.valueOf(dbBill.getOwe())); | addBillAction(bill.getBillId(), String.valueOf(dbBill.getOwe())); | ||||
| @@ -38,7 +38,8 @@ | |||||
| <sql id="allColumns"> | <sql id="allColumns"> | ||||
| `id`,`receive_pay`,`pay`,`receive_date`,`pay_date`,`createtime`,`expired_day`,`apply_status`,`apply_pay_img`,`apply_update_time`, | `id`,`receive_pay`,`pay`,`receive_date`,`pay_date`,`createtime`,`expired_day`,`apply_status`,`apply_pay_img`,`apply_update_time`, | ||||
| `tenant_id`,`parent_tenant_id`,`owe`,`status`,`is_del`,`merchant_id`,`user_id`,`shop_id`,`shop_name`,`updatetime`,`type`, | `tenant_id`,`parent_tenant_id`,`owe`,`status`,`is_del`,`merchant_id`,`user_id`,`shop_id`,`shop_name`,`updatetime`,`type`, | ||||
| `rent_shop_type`,`pay_way`,`price_detail`,`starttime`,`endtime`,freeze,build_way,service_charge_pay,'日常费用' bill_type_name | |||||
| `rent_shop_type`,`pay_way`,`price_detail`,`starttime`,`endtime`,freeze,build_way,service_charge_pay, | |||||
| case type when 1 then '水费' when 2 then '电费' when 3 then '空调费' else '日常费用' end bill_type_name | |||||
| </sql> | </sql> | ||||
| <sql id="dynamicWhereConditions"> | <sql id="dynamicWhereConditions"> | ||||
| @@ -118,7 +119,8 @@ | |||||
| select br.`id`,br.`receive_pay`,br.`pay`,br.`receive_date`,br.`pay_date`,br.`createtime`,br.`expired_day` , | select br.`id`,br.`receive_pay`,br.`pay`,br.`receive_date`,br.`pay_date`,br.`createtime`,br.`expired_day` , | ||||
| case when br.status=1 then br.owe else 0 end owe,br.`status`,br.`updatetime`,br.`merchant_id`,br.shop_id, | case when br.status=1 then br.owe else 0 end owe,br.`status`,br.`updatetime`,br.`merchant_id`,br.shop_id, | ||||
| br.shop_name,br.type,br.`rent_shop_type`,br.pay_way,br.price_detail,br.`starttime`,br.`endtime`,br.`build_way`, | br.shop_name,br.type,br.`rent_shop_type`,br.pay_way,br.price_detail,br.`starttime`,br.`endtime`,br.`build_way`, | ||||
| br.freeze,br.service_charge_pay,br.`apply_status`,br.`apply_pay_img`,br.`apply_update_time`,'日常费用' bill_type_name | |||||
| br.freeze,br.service_charge_pay,br.`apply_status`,br.`apply_pay_img`,br.`apply_update_time`, | |||||
| case type when 1 then '水费' when 2 then '电费' when 3 then '空调费' else '日常费用' end bill_type_name | |||||
| from wx_bill_daily br | from wx_bill_daily br | ||||
| <include refid="queryBillDailyListConditions" /> | <include refid="queryBillDailyListConditions" /> | ||||
| <if test=" null != sortColumns"> order by ${sortColumns} </if> | <if test=" null != sortColumns"> order by ${sortColumns} </if> | ||||
| @@ -5,13 +5,13 @@ | |||||
| <id column="id" jdbcType="BIGINT" property="id"/> | <id column="id" jdbcType="BIGINT" property="id"/> | ||||
| <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="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"/> | ||||
| @@ -5,13 +5,13 @@ | |||||
| <id column="id" jdbcType="BIGINT" property="id" /> | <id column="id" jdbcType="BIGINT" property="id" /> | ||||
| <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="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"/> | ||||