| @@ -500,46 +500,14 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||
| throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | |||
| } | |||
| //生成预览账单(补录第二步,第三步走编辑) | |||
| // if (record.getReceivePeriod() != null && record.getLease() != null && record.getPrice() != null | |||
| // && !record.getReceivePeriod().equals(0) && !record.getLease().equals(0) && !record.getPrice().equals(0l)) { | |||
| // wxBillRentMapper.deletePreviewBill(record); | |||
| // //重新生成 | |||
| // List<WxBillRent> resultList = buildRent(null, record, EnumIsPreview.YES.getCode(),true); | |||
| // record.setPreviewBillRentList(resultList); | |||
| // } | |||
| if (record.getReceivePeriod() != null && record.getLease() != null && record.getPrice() != null | |||
| && !record.getReceivePeriod().equals(0) && !record.getLease().equals(0) && !record.getPrice().equals(0l)) { | |||
| wxBillRentMapper.deletePreviewBill(record); | |||
| //重新生成 | |||
| List<WxBillRent> resultList = buildRent(null, record, EnumIsPreview.YES.getCode(),true); | |||
| record.setPreviewBillRentList(resultList); | |||
| } | |||
| //创建预览账单 | |||
| // List<WxBillRent> resultList = buildRent(null, record, EnumIsPreview.YES.getCode(),true); | |||
| @@ -590,30 +558,17 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||
| return resultData; | |||
| } | |||
| if(CollectionUtils.isEmpty(record.getPreviewBillRentList())) { | |||
| if (record.getReceivePeriod() != null && record.getLease() != null | |||
| && !record.getReceivePeriod().equals(0) && !record.getLease().equals(0)) { | |||
| //删除预账单,重新生成 | |||
| wxBillRentMapper.deletePreviewBill(record); | |||
| resultList = buildRent(null, record, EnumIsPreview.YES.getCode(),true); | |||
| } | |||
| } | |||
| // if(CollectionUtils.isEmpty(record.getPreviewBillRentList())) { | |||
| // if (record.getReceivePeriod() != null && record.getLease() != null | |||
| // && !record.getReceivePeriod().equals(0) && !record.getLease().equals(0)) { | |||
| // //删除预账单,重新生成 | |||
| // wxBillRentMapper.deletePreviewBill(record); | |||
| // resultList = buildRent(null, record, EnumIsPreview.YES.getCode(),true); | |||
| // } | |||
| // } | |||
| // | |||
| // //保存调整金额(预账单调整) | |||
| // savePreviewBill(record); | |||
| //保存调整金额(预账单调整) | |||
| savePreviewBill(record); | |||
| WxRentContract wxRentContract = (WxRentContract)resultData.data; | |||
| wxRentContract.setPreviewBillRentList(resultList); | |||
| @@ -1015,7 +970,7 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||
| Date rentalStartDate = wxRentContract.getRentalStartDate(); | |||
| Long price = wxRentContract.getPrice(); | |||
| if(EnumContractOperationType.JINMAO.getCode().equals(wxRentContract.getOperationType())){ | |||
| rentList = buildRentJinmao(userId, wxRentContract, receivePeriod, lease, rentalStartDate, price, isPreview,saveDb); | |||
| // rentList = buildRentJinmao(userId, wxRentContract, receivePeriod, lease, rentalStartDate, price, isPreview,saveDb); | |||
| }else{ | |||
| //按月计租 | |||