diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxEnergyFees.java b/mallinkService/src/main/java/com/iformall/domain/po/WxEnergyFees.java index f77b56e93..27953bad0 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxEnergyFees.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxEnergyFees.java @@ -123,6 +123,11 @@ public class WxEnergyFees extends TenantEntity { return ""; } + + @io.swagger.annotations.ApiModelProperty(value = "是否押金类,押金类是需要退回的", name = "isDespoit") + private Integer isDespoit; + + public String calcuteTotalMoney(Integer decimalSize,Date start,Date end,String count,boolean isFixed,EnumRentDayPriceCalcute priceCalcute,Integer monthDays, EnumContractReceivePeriodUnit dayType,Integer receivePeriod ) { if (StringUtils.isBlank(count)) { diff --git a/mallinkService/src/main/java/com/iformall/domain/vo/WxBillFeesStandardsListVo.java b/mallinkService/src/main/java/com/iformall/domain/vo/WxBillFeesStandardsListVo.java index ff0da3d61..aa1a3261c 100644 --- a/mallinkService/src/main/java/com/iformall/domain/vo/WxBillFeesStandardsListVo.java +++ b/mallinkService/src/main/java/com/iformall/domain/vo/WxBillFeesStandardsListVo.java @@ -16,5 +16,6 @@ public class WxBillFeesStandardsListVo implements Serializable { private Date receiveDate; private WxEnergyFees feeStandards; private Long parentBillId; + private boolean isDeposit; } diff --git a/mallinkService/src/main/java/com/iformall/service/helper/WxRentContractHelper.java b/mallinkService/src/main/java/com/iformall/service/helper/WxRentContractHelper.java index 175808558..5be5f72b5 100644 --- a/mallinkService/src/main/java/com/iformall/service/helper/WxRentContractHelper.java +++ b/mallinkService/src/main/java/com/iformall/service/helper/WxRentContractHelper.java @@ -477,6 +477,12 @@ public class WxRentContractHelper { vo.setTotal(fees.calcuteTotalMoney(decimalSize, billStartDate, billEndDate, count,true,null,null,null,null)); vo.setReceiveDate(DateUtils.getDaySet(billStartDate,Calendar.DATE,-1)); vo.setFeeStandards(fees); + + if(fees.getIsDespoit().intValue() == EnumYesOrNo.YES.getCode().intValue()) { + vo.setDeposit(true); + }else { + vo.setDeposit(false); + } retList.add(vo); } }else { diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java index 498a3016c..4bb7a6818 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java @@ -768,7 +768,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService ++billcount; //物业主账单 - WxAllBill wxBillProperty = generateBillProperty(wxPayAccountBill,wxPropertyContract,isPreview,billTimeVo.getStartDate(),billTimeVo.getEndDate(),billTimeVo.getReceiveDate(),needpay,user,billcount,shopInfo,standarsTotal,"",null,null); + WxAllBill wxBillProperty = generateBillProperty(wxPayAccountBill,wxPropertyContract,isPreview,billTimeVo.getStartDate(),billTimeVo.getEndDate(),billTimeVo.getReceiveDate(),needpay,user,billcount,shopInfo,standarsTotal,"",null,null,false); //设置物业科目 wxBillProperty.setEnergyFeesId(EnumBillAllType.PROPERTY.getEnergyFeesId()); //非一次性账单 @@ -818,11 +818,12 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService private WxAllBill generateBillPropertyByBillStandards(WxPayAccountBill wxPayAccountBill,WxPropertyContract wxPropertyContract,Integer isPreview,MallUserInfo user,WxBillFeesStandardsListVo svo, Integer billcount,Map shopInfo) { Long feesStandardsId = svo.getFeeStandards().getId(); - return generateBillProperty(wxPayAccountBill,wxPropertyContract,isPreview,svo.getStart(),svo.getEnd(),svo.getReceiveDate(),svo.getTotal(),user,billcount,shopInfo,"0",svo.getBillName(),svo.getParentBillId(),feesStandardsId); + boolean isDeposit = svo.isDeposit(); + return generateBillProperty(wxPayAccountBill,wxPropertyContract,isPreview,svo.getStart(),svo.getEnd(),svo.getReceiveDate(),svo.getTotal(),user,billcount,shopInfo,"0",svo.getBillName(),svo.getParentBillId(),feesStandardsId,isDeposit); } private WxAllBill generateBillProperty(WxPayAccountBill wxPayAccountBill,WxPropertyContract wxPropertyContract,Integer isPreview,Date start,Date end,Date receiveDate,String needpay, - MallUserInfo user,Integer billcount,Map shopInfo,String standarsTotal,String remark,Long parentBillId,Long feesStandardsId) { + MallUserInfo user,Integer billcount,Map shopInfo,String standarsTotal,String remark,Long parentBillId,Long feesStandardsId,boolean isDeposit) { if (StringUtils.isBlank(needpay)) { needpay = "0"; }else { @@ -832,7 +833,11 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService WxAllBill wxBillProperty = new WxAllBill(); wxBillProperty.setIsPreview(isPreview); wxBillProperty.setId(idWorker.nextId()); - wxBillProperty.setBillType(EnumBillAllType.PROPERTY.getCode()); + if (isDeposit) { + wxBillProperty.setBillType(EnumBillAllType.PROPERTY_DEPOSIT.getCode()); + }else { + wxBillProperty.setBillType(EnumBillAllType.PROPERTY.getCode()); + } wxBillProperty.setPropertyContractId(wxPropertyContract.getId()); wxBillProperty.setPay("0"); wxBillProperty.setStarttime(start); diff --git a/mallinkService/src/main/resources/mapper/WxEnergyFeesMapper.xml b/mallinkService/src/main/resources/mapper/WxEnergyFeesMapper.xml index 743daa54b..f560a428e 100644 --- a/mallinkService/src/main/resources/mapper/WxEnergyFeesMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxEnergyFeesMapper.xml @@ -18,11 +18,12 @@ + `id`,`tenant_id`,`parent_tenant_id`,`create_time`,`update_time`,`is_del`,`name`,`price`,`public_calcute`,`type`,`bill_type`,`is_system`, - `fixed_price`,`calcute_unit`,`time_unit`,`tax_rate` + `fixed_price`,`calcute_unit`,`time_unit`,`tax_rate`,`is_despoit` @@ -45,7 +46,7 @@ and `calcute_unit` = #{calcuteUnit} and `time_unit` = #{timeUnit} and name like concat('%', #{name},'%') - + and `is_despoit` = #{isDespoit} and id in