|
|
|
@@ -521,13 +521,13 @@ public class WxRentContractServiceImpl implements WxRentContractService { |
|
|
|
} |
|
|
|
|
|
|
|
//生成预览账单(补录第二步,第三步走编辑) |
|
|
|
if (record.getReceivePeriod() != null && record.getLease() != null && record.getPrice() != null |
|
|
|
&& !record.getReceivePeriod().equals(0) && !record.getLease().equals(0)) { |
|
|
|
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)) { |
|
|
|
// 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); |
|
|
|
@@ -618,6 +618,26 @@ public class WxRentContractServiceImpl implements WxRentContractService { |
|
|
|
wxRentContract.setPreviewBillRentList(resultList); |
|
|
|
return new ResultData(wxRentContract); |
|
|
|
} |
|
|
|
|
|
|
|
@Transactional(rollbackFor = {Exception.class}) |
|
|
|
@Override |
|
|
|
public ResultData updateOneStep(WxRentContract record, Long userId,String userName,int from,Date oldRentStartDate,boolean writeComplate) { |
|
|
|
//查询预账单用于展示 |
|
|
|
WxBillRent wxBillRent = new WxBillRent(); |
|
|
|
wxBillRent.setRentContractId(record.getId()); |
|
|
|
wxBillRent.setSortColumns(BaseEntity.SortField.Period_ASC); |
|
|
|
wxBillRent.setIsPreview(EnumIsPreview.YES.getCode()); |
|
|
|
List<WxBillRent> resultList = wxBillRentMapper.findList(wxBillRent); |
|
|
|
|
|
|
|
//更新 |
|
|
|
ResultData resultData = getResultDataForUpdate(record, userId,from,oldRentStartDate,writeComplate); |
|
|
|
if (resultData.code != Result.SUCCESS) { |
|
|
|
return resultData; |
|
|
|
} |
|
|
|
WxRentContract wxRentContract = (WxRentContract)resultData.data; |
|
|
|
wxRentContract.setPreviewBillRentList(resultList); |
|
|
|
return new ResultData(wxRentContract); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 重新生成账单(预账单调整) |
|
|
|
|