|
|
|
@@ -702,6 +702,9 @@ public class WxRentContractServiceImpl implements WxRentContractService { |
|
|
|
|
|
|
|
@Override |
|
|
|
public ResultData updateRentContractStatus(Long id) { |
|
|
|
if(id == null) { |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR); |
|
|
|
} |
|
|
|
//更新合同状态为签约 |
|
|
|
WxRentContract wxRentContract = new WxRentContract(); |
|
|
|
wxRentContract.setId(id); |
|
|
|
@@ -709,8 +712,12 @@ public class WxRentContractServiceImpl implements WxRentContractService { |
|
|
|
wxRentContractMapper.updateByPrimaryKeySelective(wxRentContract); |
|
|
|
//建立账单 |
|
|
|
WxRentContract record = wxRentContractMapper.selectByPrimaryKey(id); |
|
|
|
if (record.getMerchantId() != null && record.getStatus().equals(EnumRentContractStatus.SIGNED_RENT_UNPAID.getCode()) |
|
|
|
&& record.getReceivePeriod() != null && record.getDeposit() > 0 && record.getPrice() > 0) { |
|
|
|
if (record != null && |
|
|
|
record.getMerchantId() != null && |
|
|
|
record.getStatus().equals(EnumRentContractStatus.SIGNED_RENT_UNPAID.getCode()) && |
|
|
|
record.getReceivePeriod() != null && |
|
|
|
record.getDeposit() > 0 && |
|
|
|
record.getPrice() > 0) { |
|
|
|
WxBillRent wxBillRent = new WxBillRent(); |
|
|
|
wxBillRent.setMerchantId(record.getMerchantId()); |
|
|
|
List<Map<String, Object>> billRentList = wxBillRentMapper.queryBillRentList(wxBillRent); |
|
|
|
|