Browse Source

[审批流][修改][预览账单逻辑]

release_toaliyun_real
luozukai 7 years ago
parent
commit
a524903d17
1 changed files with 18 additions and 11 deletions
  1. +18
    -11
      mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java

+ 18
- 11
mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java View File

@@ -155,10 +155,12 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService
@Transactional(rollbackFor = {Exception.class})
public ResultData saveOrUpdate(WxPropertyContract record, Long userId,String userName) {
// 保存调整金额(预账单调整)
boolean haspreview = false;
if(!CollectionUtils.isEmpty(record.getPreviewBillRentList())){
for (WxBillProperty wxBillProperty:record.getPreviewBillRentList()) {
wxBillPropertyMapper.update(wxBillProperty);
}
haspreview = true;
}

if (record.getRentShopType().equals(EnumRentShopType.POINT.getCode()) && null == record.getShopId()) {
@@ -296,18 +298,22 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService
// ||!wxPropertyContract.getAdjustPeriod().equals(record.getAdjustPeriod())
// || !DateUtils.date2String(wxPropertyContract.getRentalStartDate(),"yyyy-MM-dd").equals(DateUtils.date2String(record.getRentalStartDate(),"yyyy-MM-dd"))
// )){
if (record.getReceivePeriod() != null && record.getLease() != null && record.getPrice() != null
&& !record.getReceivePeriod().equals(0) && !record.getLease().equals(0) && !record.getPrice().equals(0)) {
//删除预账单,重新生成
wxBillPropertyMapper.deletePreviewBill(record);
//重新生成
wxPropertyContract.setPrice(record.getPrice());
wxPropertyContract.setDeposit(record.getDeposit());
wxPropertyContract.setReceivePeriod(record.getReceivePeriod());
wxPropertyContract.setPayAccount(record.getPayAccount());
billList = buildProperty(new WxMerchant(),userId,wxPropertyContract,EnumIsPreview.YES.getCode());
record.setPreviewBillRentList(billList);

if(!haspreview){
if (record.getReceivePeriod() != null && record.getLease() != null && record.getPrice() != null
&& !record.getReceivePeriod().equals(0) && !record.getLease().equals(0) && !record.getPrice().equals(0)) {
//删除预账单,重新生成
wxBillPropertyMapper.deletePreviewBill(record);
//重新生成
wxPropertyContract.setPrice(record.getPrice());
wxPropertyContract.setDeposit(record.getDeposit());
wxPropertyContract.setReceivePeriod(record.getReceivePeriod());
wxPropertyContract.setPayAccount(record.getPayAccount());
billList = buildProperty(new WxMerchant(),userId,wxPropertyContract,EnumIsPreview.YES.getCode());
record.setPreviewBillRentList(billList);
}
}

message = "更新物业合同信息成功";
}

@@ -1017,3 +1023,4 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService

}



Loading…
Cancel
Save