| @@ -115,4 +115,9 @@ public class WxBillDaily extends BaseEntity { | |||
| @io.swagger.annotations.ApiModelProperty(value="实际应收金额",name="realReceivePay") | |||
| @TableField(exist = false) | |||
| private Long realReceivePay; | |||
| @TableField(exist = false) | |||
| private String serviceChargePayBefore; | |||
| @TableField(exist = false) | |||
| private String serviceChargePayUpdate; | |||
| } | |||
| @@ -83,4 +83,9 @@ public class WxBillDeposit extends BaseEntity { | |||
| @io.swagger.annotations.ApiModelProperty(value="实际应收金额",name="realReceivePay") | |||
| @TableField(exist = false) | |||
| private Long realReceivePay; | |||
| @TableField(exist = false) | |||
| private String serviceChargePayBefore; | |||
| @TableField(exist = false) | |||
| private String serviceChargePayUpdate; | |||
| } | |||
| @@ -137,4 +137,9 @@ public class WxBillOther extends BaseEntity { | |||
| @io.swagger.annotations.ApiModelProperty(value="实际应收金额",name="realReceivePay") | |||
| @TableField(exist = false) | |||
| private Long realReceivePay; | |||
| @TableField(exist = false) | |||
| private String serviceChargePayBefore; | |||
| @TableField(exist = false) | |||
| private String serviceChargePayUpdate; | |||
| } | |||
| @@ -146,4 +146,9 @@ public class WxBillOtherDeposit extends BaseEntity { | |||
| @io.swagger.annotations.ApiModelProperty(value="实际应收金额",name="realReceivePay") | |||
| @TableField(exist = false) | |||
| private Long realReceivePay; | |||
| @TableField(exist = false) | |||
| private String serviceChargePayBefore; | |||
| @TableField(exist = false) | |||
| private String serviceChargePayUpdate; | |||
| } | |||
| @@ -81,4 +81,9 @@ public class WxBillPropertyDeposit extends BaseEntity { | |||
| @io.swagger.annotations.ApiModelProperty(value="实际应收金额",name="realReceivePay") | |||
| @TableField(exist = false) | |||
| private Long realReceivePay; | |||
| @TableField(exist = false) | |||
| private String serviceChargePayBefore; | |||
| @TableField(exist = false) | |||
| private String serviceChargePayUpdate; | |||
| } | |||
| @@ -210,4 +210,6 @@ public class WxBillRent extends BaseEntity { | |||
| @io.swagger.annotations.ApiModelProperty(value="实际应收金额",name="realReceivePay") | |||
| @TableField(exist = false) | |||
| private Long realReceivePay; | |||
| } | |||
| @@ -180,26 +180,34 @@ public class WxBillDailyServiceImpl implements WxBillDailyService { | |||
| if(wxBillDaily==null){ | |||
| return new ResultData(ErrorCode.BILL_ROUTINE_IS_NOT_FOUND); | |||
| } | |||
| Long addpay = wxBillDaily.getPay(); | |||
| wxBillDaily.setPayDate(record.getPayDate()); | |||
| wxBillDaily.setPay(record.getPay()); | |||
| wxBillDaily.setReceivePay(record.getReceivePay()); | |||
| wxBillDaily.setOwe(record.getReceivePay()-record.getPay()); | |||
| if (record.getPay().equals(record.getReceivePay())) { | |||
| wxBillDaily.setStatus(EnumBillRentStatus.PAID.getCode()); | |||
| Date payDate = record.getPayDate(); | |||
| Date receiveDate = wxBillDaily.getReceiveDate(); | |||
| wxBillDaily.setExpiredDay(0L); | |||
| if (payDate.after(receiveDate)) { | |||
| int expiredDay = DateUtils.daysBetween(receiveDate, payDate); | |||
| wxBillDaily.setExpiredDay((long) expiredDay); | |||
| String price = ""; | |||
| String message = ""; | |||
| if(record.getServiceChargePayUpdate() != null){ | |||
| wxBillDaily.setServiceChargePay(Integer.parseInt(record.getServiceChargePayUpdate()) * 100); | |||
| }else{ | |||
| Long addpay = wxBillDaily.getPay(); | |||
| wxBillDaily.setPayDate(record.getPayDate()); | |||
| wxBillDaily.setPay(record.getPay()); | |||
| wxBillDaily.setReceivePay(record.getReceivePay()); | |||
| wxBillDaily.setOwe(record.getReceivePay()-record.getPay()); | |||
| if (record.getPay().equals(record.getReceivePay())) { | |||
| wxBillDaily.setStatus(EnumBillRentStatus.PAID.getCode()); | |||
| Date payDate = record.getPayDate(); | |||
| Date receiveDate = wxBillDaily.getReceiveDate(); | |||
| wxBillDaily.setExpiredDay(0L); | |||
| if (payDate.after(receiveDate)) { | |||
| int expiredDay = DateUtils.daysBetween(receiveDate, payDate); | |||
| wxBillDaily.setExpiredDay((long) expiredDay); | |||
| } | |||
| } | |||
| wxBillDaily.setPayDate(record.getPayDate()); | |||
| wxBillDaily.setUpdatetime(date); | |||
| wxBillDaily.setPayWay(record.getPayWay()); | |||
| wxBillDaily.setPriceDetail(record.getPriceDetail()); | |||
| message = EnumBillPayWay.getEnum(record.getPayWay()).getMessage(); | |||
| price = new BigDecimal(record.getPay() - addpay).divide(new BigDecimal(100)).toPlainString(); | |||
| } | |||
| wxBillDaily.setPayDate(record.getPayDate()); | |||
| wxBillDaily.setUpdatetime(date); | |||
| wxBillDaily.setPayWay(record.getPayWay()); | |||
| wxBillDaily.setPriceDetail(record.getPriceDetail()); | |||
| wxBillDaily.setServiceChargePay(record.getServiceChargePay()); | |||
| try { | |||
| wxBillDailyMapper.updateById(wxBillDaily); | |||
| } catch (Exception e) { | |||
| @@ -209,10 +217,8 @@ public class WxBillDailyServiceImpl implements WxBillDailyService { | |||
| //日志 | |||
| WxBillAction wxBillAction = new WxBillAction(); | |||
| wxBillAction.setBillId(wxBillDaily.getId()); | |||
| String message = EnumBillPayWay.getEnum(record.getPayWay()).getMessage(); | |||
| String price = new BigDecimal(record.getPay() - addpay).divide(new BigDecimal(100)).toPlainString(); | |||
| wxBillAction.setDetails(message + price + "元"); | |||
| if(record.getServiceChargePay() != null){ | |||
| if(record.getServiceChargePayUpdate() != null){ | |||
| wxBillAction.setAction(EnumBillAction.UPDATE_SERVICE_MONEY.getCode()); | |||
| }else{ | |||
| wxBillAction.setAction(EnumBillAction.OFFLINE_PAY.getCode()); | |||
| @@ -164,7 +164,7 @@ public class WxBillDepositServiceImpl implements WxBillDepositService { | |||
| wxBillDeposit.setPayDate(date); | |||
| wxBillDeposit.setUpdatetime(date); | |||
| wxBillDeposit.setPayWay(record.getPayWay()); | |||
| wxBillDeposit.setServiceChargePay(record.getServiceChargePay()); | |||
| //wxBillDeposit.setServiceChargePay(record.getServiceChargePay()); | |||
| try { | |||
| wxBillDepositMapper.updateById(wxBillDeposit); | |||
| } catch (Exception e) { | |||
| @@ -177,11 +177,7 @@ public class WxBillDepositServiceImpl implements WxBillDepositService { | |||
| String message = EnumBillPayWay.getEnum(record.getPayWay()).getMessage(); | |||
| String price = new BigDecimal(record.getPay() - addpay).divide(new BigDecimal(100)).toPlainString(); | |||
| wxBillAction.setDetails(message + price + "元"); | |||
| if(record.getServiceChargePay() != null){ | |||
| wxBillAction.setAction(EnumBillAction.UPDATE_SERVICE_MONEY.getCode()); | |||
| }else{ | |||
| wxBillAction.setAction(EnumBillAction.OFFLINE_PAY.getCode()); | |||
| } | |||
| wxBillAction.setAction(EnumBillAction.OFFLINE_PAY.getCode()); | |||
| wxBillAction.setUserId(user.getId()); | |||
| wxBillAction.setUserName(user.getName()); | |||
| wxBillAction.setPhone(user.getPhone()); | |||
| @@ -176,26 +176,34 @@ public class WxBillOtherDepositServiceImpl implements WxBillOtherDepositService | |||
| if (wxBillOtherDeposit == null) { | |||
| return new ResultData(ErrorCode.BILL_ROUTINE_IS_NOT_FOUND); | |||
| } | |||
| Long addpay = wxBillOtherDeposit.getPay(); | |||
| wxBillOtherDeposit.setPayDate(record.getPayDate()); | |||
| wxBillOtherDeposit.setPay(record.getPay()); | |||
| wxBillOtherDeposit.setReceivePay(record.getReceivePay()); | |||
| wxBillOtherDeposit.setOwe(record.getReceivePay() - record.getPay()); | |||
| if (record.getPay().equals(record.getReceivePay())) { | |||
| wxBillOtherDeposit.setStatus(EnumBillRentStatus.PAID.getCode()); | |||
| Date payDate = record.getPayDate(); | |||
| Date receiveDate = wxBillOtherDeposit.getReceiveDate(); | |||
| wxBillOtherDeposit.setExpiredDay(0L); | |||
| if (payDate.after(receiveDate)) { | |||
| int expiredDay = DateUtils.daysBetween(receiveDate, payDate); | |||
| wxBillOtherDeposit.setExpiredDay((long) expiredDay); | |||
| String message = ""; | |||
| String price = ""; | |||
| if(record.getServiceChargePayUpdate() != null){ | |||
| wxBillOtherDeposit.setServiceChargePay(Integer.parseInt(record.getServiceChargePayUpdate()) * 100); | |||
| }else{ | |||
| Long addpay = wxBillOtherDeposit.getPay(); | |||
| wxBillOtherDeposit.setPayDate(record.getPayDate()); | |||
| wxBillOtherDeposit.setPay(record.getPay()); | |||
| wxBillOtherDeposit.setReceivePay(record.getReceivePay()); | |||
| wxBillOtherDeposit.setOwe(record.getReceivePay() - record.getPay()); | |||
| if (record.getPay().equals(record.getReceivePay())) { | |||
| wxBillOtherDeposit.setStatus(EnumBillRentStatus.PAID.getCode()); | |||
| Date payDate = record.getPayDate(); | |||
| Date receiveDate = wxBillOtherDeposit.getReceiveDate(); | |||
| wxBillOtherDeposit.setExpiredDay(0L); | |||
| if (payDate.after(receiveDate)) { | |||
| int expiredDay = DateUtils.daysBetween(receiveDate, payDate); | |||
| wxBillOtherDeposit.setExpiredDay((long) expiredDay); | |||
| } | |||
| } | |||
| wxBillOtherDeposit.setPayDate(record.getPayDate()); | |||
| wxBillOtherDeposit.setUpdatetime(date); | |||
| wxBillOtherDeposit.setPayWay(record.getPayWay()); | |||
| wxBillOtherDeposit.setComments(record.getComments()); | |||
| message = EnumBillPayWay.getEnum(record.getPayWay()).getMessage(); | |||
| price = new BigDecimal(record.getPay() - addpay).divide(new BigDecimal(100)).toPlainString(); | |||
| } | |||
| wxBillOtherDeposit.setPayDate(record.getPayDate()); | |||
| wxBillOtherDeposit.setUpdatetime(date); | |||
| wxBillOtherDeposit.setPayWay(record.getPayWay()); | |||
| wxBillOtherDeposit.setComments(record.getComments()); | |||
| wxBillOtherDeposit.setServiceChargePay(record.getServiceChargePay()); | |||
| try { | |||
| wxBillOtherDepositMapper.updateById(wxBillOtherDeposit); | |||
| } catch (Exception e) { | |||
| @@ -205,10 +213,8 @@ public class WxBillOtherDepositServiceImpl implements WxBillOtherDepositService | |||
| //日志 | |||
| WxBillAction wxBillAction = new WxBillAction(); | |||
| wxBillAction.setBillId(wxBillOtherDeposit.getId()); | |||
| String message = EnumBillPayWay.getEnum(record.getPayWay()).getMessage(); | |||
| String price = new BigDecimal(record.getPay() - addpay).divide(new BigDecimal(100)).toPlainString(); | |||
| wxBillAction.setDetails(message + price + "元"); | |||
| if(record.getServiceChargePay() != null){ | |||
| if(record.getServiceChargePayUpdate() != null){ | |||
| wxBillAction.setAction(EnumBillAction.UPDATE_SERVICE_MONEY.getCode()); | |||
| }else{ | |||
| wxBillAction.setAction(EnumBillAction.OFFLINE_PAY.getCode()); | |||
| @@ -176,27 +176,36 @@ public class WxBillOtherServiceImpl implements WxBillOtherService { | |||
| if(wxBillOther==null){ | |||
| return new ResultData(ErrorCode.BILL_ROUTINE_IS_NOT_FOUND); | |||
| } | |||
| Long addpay = wxBillOther.getPay(); | |||
| wxBillOther.setPayDate(record.getPayDate()); | |||
| wxBillOther.setPay(record.getPay()); | |||
| wxBillOther.setReceivePay(record.getReceivePay()); | |||
| wxBillOther.setOwe(record.getReceivePay()-record.getPay()); | |||
| if (record.getPay().equals(record.getReceivePay())) { | |||
| wxBillOther.setStatus(EnumBillRentStatus.PAID.getCode()); | |||
| Date payDate = record.getPayDate(); | |||
| Date receiveDate = wxBillOther.getReceiveDate(); | |||
| wxBillOther.setExpiredDay(0L); | |||
| if (payDate.after(receiveDate)) { | |||
| int expiredDay = DateUtils.daysBetween(receiveDate, payDate); | |||
| wxBillOther.setExpiredDay((long) expiredDay); | |||
| String message = ""; | |||
| String price = ""; | |||
| if(record.getServiceChargePayUpdate() != null){ | |||
| wxBillOther.setServiceChargePay(Integer.parseInt(record.getServiceChargePayUpdate()) * 100); | |||
| }else{ | |||
| Long addpay = wxBillOther.getPay(); | |||
| wxBillOther.setPayDate(record.getPayDate()); | |||
| wxBillOther.setPay(record.getPay()); | |||
| wxBillOther.setReceivePay(record.getReceivePay()); | |||
| wxBillOther.setOwe(record.getReceivePay()-record.getPay()); | |||
| if (record.getPay().equals(record.getReceivePay())) { | |||
| wxBillOther.setStatus(EnumBillRentStatus.PAID.getCode()); | |||
| Date payDate = record.getPayDate(); | |||
| Date receiveDate = wxBillOther.getReceiveDate(); | |||
| wxBillOther.setExpiredDay(0L); | |||
| if (payDate.after(receiveDate)) { | |||
| int expiredDay = DateUtils.daysBetween(receiveDate, payDate); | |||
| wxBillOther.setExpiredDay((long) expiredDay); | |||
| } | |||
| } | |||
| wxBillOther.setPayDate(record.getPayDate()); | |||
| wxBillOther.setUpdatetime(date); | |||
| wxBillOther.setPayWay(record.getPayWay()); | |||
| wxBillOther.setComments(record.getComments()); | |||
| wxBillOther.setName(record.getName()); | |||
| message = EnumBillPayWay.getEnum(record.getPayWay()).getMessage(); | |||
| price = new BigDecimal(record.getPay() - addpay).divide(new BigDecimal(100)).toPlainString(); | |||
| } | |||
| wxBillOther.setPayDate(record.getPayDate()); | |||
| wxBillOther.setUpdatetime(date); | |||
| wxBillOther.setPayWay(record.getPayWay()); | |||
| wxBillOther.setComments(record.getComments()); | |||
| wxBillOther.setName(record.getName()); | |||
| wxBillOther.setServiceChargePay(record.getServiceChargePay()); | |||
| try { | |||
| wxBillOtherMapper.updateById(wxBillOther); | |||
| } catch (Exception e) { | |||
| @@ -206,10 +215,8 @@ public class WxBillOtherServiceImpl implements WxBillOtherService { | |||
| //日志 | |||
| WxBillAction wxBillAction = new WxBillAction(); | |||
| wxBillAction.setBillId(wxBillOther.getId()); | |||
| String message = EnumBillPayWay.getEnum(record.getPayWay()).getMessage(); | |||
| String price = new BigDecimal(record.getPay() - addpay).divide(new BigDecimal(100)).toPlainString(); | |||
| wxBillAction.setDetails(message + price + "元"); | |||
| if(record.getServiceChargePay() != null){ | |||
| if(record.getServiceChargePayUpdate() != null){ | |||
| wxBillAction.setAction(EnumBillAction.UPDATE_SERVICE_MONEY.getCode()); | |||
| }else{ | |||
| wxBillAction.setAction(EnumBillAction.OFFLINE_PAY.getCode()); | |||
| @@ -163,7 +163,6 @@ public class WxBillPropertyDepositServiceImpl implements WxBillPropertyDepositSe | |||
| wxBillDeposit.setPayDate(date); | |||
| wxBillDeposit.setUpdatetime(date); | |||
| wxBillDeposit.setPayWay(record.getPayWay()); | |||
| wxBillDeposit.setServiceChargePay(record.getServiceChargePay()); | |||
| try { | |||
| wxBillPropertyDepositMapper.updateById(wxBillDeposit); | |||
| } catch (Exception e) { | |||
| @@ -176,11 +175,7 @@ public class WxBillPropertyDepositServiceImpl implements WxBillPropertyDepositSe | |||
| String message = EnumBillPayWay.getEnum(record.getPayWay()).getMessage(); | |||
| String price = new BigDecimal(record.getPay() - addpay).divide(new BigDecimal(100)).toPlainString(); | |||
| wxBillAction.setDetails(message + price + "元"); | |||
| if(record.getServiceChargePay() != null){ | |||
| wxBillAction.setAction(EnumBillAction.UPDATE_SERVICE_MONEY.getCode()); | |||
| }else{ | |||
| wxBillAction.setAction(EnumBillAction.OFFLINE_PAY.getCode()); | |||
| } | |||
| wxBillAction.setAction(EnumBillAction.OFFLINE_PAY.getCode()); | |||
| wxBillAction.setUserId(user.getId()); | |||
| wxBillAction.setUserName(user.getName()); | |||
| wxBillAction.setPhone(user.getPhone()); | |||
| @@ -157,29 +157,38 @@ public class WxBillPropertyServiceImpl implements WxBillPropertyService { | |||
| if(property==null){ | |||
| return new ResultData(ErrorCode.BILL_PROPERTY_IS_NOT_FOUND); | |||
| } | |||
| Long addpay = property.getPay(); | |||
| property.setRevenue(record.getRevenue()); | |||
| property.setLatePayRatio(record.getLatePayRatio()); | |||
| property.setLatePayTime(record.getLatePayTime()); | |||
| property.setLatePayStatus(record.getLatePayStatus()); | |||
| property.setPayDate(record.getPayDate()); | |||
| property.setPay(record.getPay()); | |||
| property.setReceivePay(record.getReceivePay()); | |||
| property.setOwe(record.getReceivePay()-record.getPay()); | |||
| if (record.getPay().equals(record.getReceivePay())) { | |||
| property.setStatus(EnumBillRentStatus.PAID.getCode()); | |||
| Date payDate = record.getPayDate(); | |||
| Date receiveDate = property.getReceiveDate(); | |||
| property.setExpiredDay(0L); | |||
| if (payDate.after(receiveDate)) { | |||
| int expiredDay = DateUtils.daysBetween(receiveDate, payDate); | |||
| property.setExpiredDay((long) expiredDay); | |||
| String message = ""; | |||
| String price = ""; | |||
| if(record.getServiceChargePayUpdate() != null){ | |||
| property.setServiceChargePay(Integer.parseInt(record.getServiceChargePayUpdate()) * 100); | |||
| }else{ | |||
| Long addpay = property.getPay(); | |||
| property.setRevenue(record.getRevenue()); | |||
| property.setLatePayRatio(record.getLatePayRatio()); | |||
| property.setLatePayTime(record.getLatePayTime()); | |||
| property.setLatePayStatus(record.getLatePayStatus()); | |||
| property.setPayDate(record.getPayDate()); | |||
| property.setPay(record.getPay()); | |||
| property.setReceivePay(record.getReceivePay()); | |||
| property.setOwe(record.getReceivePay()-record.getPay()); | |||
| if (record.getPay().equals(record.getReceivePay())) { | |||
| property.setStatus(EnumBillRentStatus.PAID.getCode()); | |||
| Date payDate = record.getPayDate(); | |||
| Date receiveDate = property.getReceiveDate(); | |||
| property.setExpiredDay(0L); | |||
| if (payDate.after(receiveDate)) { | |||
| int expiredDay = DateUtils.daysBetween(receiveDate, payDate); | |||
| property.setExpiredDay((long) expiredDay); | |||
| } | |||
| } | |||
| property.setPayDate(record.getPayDate()); | |||
| property.setUpdatetime(date); | |||
| property.setPayWay(record.getPayWay()); | |||
| message = EnumBillPayWay.getEnum(record.getPayWay()).getMessage(); | |||
| price = new BigDecimal(record.getPay() - addpay).divide(new BigDecimal(100)).toPlainString(); | |||
| } | |||
| property.setPayDate(record.getPayDate()); | |||
| property.setUpdatetime(date); | |||
| property.setPayWay(record.getPayWay()); | |||
| property.setServiceChargePay(record.getServiceChargePay()); | |||
| try { | |||
| wxBillPropertyMapper.updateById(property); | |||
| } catch (Exception e) { | |||
| @@ -189,10 +198,9 @@ public class WxBillPropertyServiceImpl implements WxBillPropertyService { | |||
| //日志 | |||
| WxBillAction wxBillAction = new WxBillAction(); | |||
| wxBillAction.setBillId(property.getId()); | |||
| String message = EnumBillPayWay.getEnum(record.getPayWay()).getMessage(); | |||
| String price = new BigDecimal(record.getPay() - addpay).divide(new BigDecimal(100)).toPlainString(); | |||
| wxBillAction.setDetails(message + price + "元"); | |||
| if(record.getServiceChargePay() != null){ | |||
| if(record.getServiceChargePayUpdate() != null){ | |||
| wxBillAction.setDetails(record.getServiceChargePayBefore()+"元变更为" +record.getServiceChargePayUpdate()+"元"); | |||
| wxBillAction.setAction(EnumBillAction.UPDATE_SERVICE_MONEY.getCode()); | |||
| }else{ | |||
| @@ -161,28 +161,36 @@ public class WxBillRentServiceImpl implements WxBillRentService { | |||
| if(wxBillRent==null){ | |||
| return new ResultData(ErrorCode.BILL_RENT_IS_NOT_FOUND); | |||
| } | |||
| Long addpay = wxBillRent.getPay(); | |||
| wxBillRent.setRevenue(record.getRevenue()); | |||
| wxBillRent.setLatePayRatio(record.getLatePayRatio()); | |||
| wxBillRent.setLatePayTime(record.getLatePayTime()); | |||
| wxBillRent.setLatePayStatus(record.getLatePayStatus()); | |||
| wxBillRent.setPay(record.getPay()); | |||
| wxBillRent.setReceivePay(record.getReceivePay()); | |||
| wxBillRent.setOwe(record.getReceivePay()-record.getPay()); | |||
| if (record.getPay().equals(record.getReceivePay())) { | |||
| wxBillRent.setStatus(EnumBillRentStatus.PAID.getCode()); | |||
| Date payDate = record.getPayDate(); | |||
| Date receiveDate = wxBillRent.getReceiveDate(); | |||
| wxBillRent.setExpiredDay(0L); | |||
| if (payDate.after(receiveDate)) { | |||
| int expiredDay = DateUtils.daysBetween(receiveDate, payDate); | |||
| wxBillRent.setExpiredDay((long) expiredDay); | |||
| String price = ""; | |||
| String message =""; | |||
| if(record.getServiceChargePayUpdate() != null){ | |||
| wxBillRent.setServiceChargePay(Integer.parseInt(record.getServiceChargePayUpdate()) * 100); | |||
| }else{ | |||
| Long addpay = wxBillRent.getPay(); | |||
| wxBillRent.setRevenue(record.getRevenue()); | |||
| wxBillRent.setLatePayRatio(record.getLatePayRatio()); | |||
| wxBillRent.setLatePayTime(record.getLatePayTime()); | |||
| wxBillRent.setLatePayStatus(record.getLatePayStatus()); | |||
| wxBillRent.setPay(record.getPay()); | |||
| wxBillRent.setReceivePay(record.getReceivePay()); | |||
| wxBillRent.setOwe(record.getReceivePay()-record.getPay()); | |||
| if (record.getPay().equals(record.getReceivePay())) { | |||
| wxBillRent.setStatus(EnumBillRentStatus.PAID.getCode()); | |||
| Date payDate = record.getPayDate(); | |||
| Date receiveDate = wxBillRent.getReceiveDate(); | |||
| wxBillRent.setExpiredDay(0L); | |||
| if (payDate.after(receiveDate)) { | |||
| int expiredDay = DateUtils.daysBetween(receiveDate, payDate); | |||
| wxBillRent.setExpiredDay((long) expiredDay); | |||
| } | |||
| } | |||
| wxBillRent.setPayDate(record.getPayDate()); | |||
| wxBillRent.setUpdatetime(date); | |||
| wxBillRent.setPayWay(record.getPayWay()); | |||
| price = new BigDecimal(record.getPay() - addpay).divide(new BigDecimal(100)).toPlainString(); | |||
| } | |||
| wxBillRent.setPayDate(record.getPayDate()); | |||
| wxBillRent.setUpdatetime(date); | |||
| wxBillRent.setPayWay(record.getPayWay()); | |||
| wxBillRent.setServiceChargePay(record.getServiceChargePay()); | |||
| try { | |||
| wxBillRentMapper.updateById(wxBillRent); | |||
| } catch (Exception e) { | |||
| @@ -192,15 +200,14 @@ public class WxBillRentServiceImpl implements WxBillRentService { | |||
| //日志 | |||
| WxBillAction wxBillAction = new WxBillAction(); | |||
| wxBillAction.setBillId(wxBillRent.getId()); | |||
| String message = EnumBillPayWay.getEnum(record.getPayWay()).getMessage(); | |||
| String price = new BigDecimal(record.getPay() - addpay).divide(new BigDecimal(100)).toPlainString(); | |||
| wxBillAction.setDetails(message + price + "元"); | |||
| if(record.getServiceChargePay() != null){ | |||
| if(record.getServiceChargePayUpdate() != null){ | |||
| wxBillAction.setDetails(record.getServiceChargePayBefore()+"元变更为" +record.getServiceChargePayUpdate()+"元"); | |||
| wxBillAction.setAction(EnumBillAction.UPDATE_SERVICE_MONEY.getCode()); | |||
| }else{ | |||
| wxBillAction.setAction(EnumBillAction.OFFLINE_PAY.getCode()); | |||
| message = EnumBillPayWay.getEnum(record.getPayWay()).getMessage(); | |||
| } | |||
| wxBillAction.setDetails(message + price + "元"); | |||
| wxBillAction.setUserId(user.getId()); | |||
| wxBillAction.setUserName(user.getName()); | |||
| wxBillAction.setPhone(user.getPhone()); | |||