|
|
|
@@ -583,6 +583,30 @@ public class WxRentContractServiceImpl implements WxRentContractService { |
|
|
|
return rentContractList; |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public void updateInvalidContract(Long rentContractId) { |
|
|
|
WxRentContract wxRentContract = wxRentContractMapper.selectByPrimaryKey(rentContractId); |
|
|
|
if (wxRentContract.getRentShopType().equals(EnumRentShopType.SHOP.getCode())) { |
|
|
|
String rentInfo = wxRentContract.getRentInfo(); |
|
|
|
JSONArray rentInfoArray = JSONArray.parseArray(rentInfo); |
|
|
|
WxRentContract record = new WxRentContract(); |
|
|
|
for (int i = 0, size = rentInfoArray.size(); i < size; i++) { |
|
|
|
JSONObject rentInfoObject = rentInfoArray.getJSONObject(i); |
|
|
|
Long shopId = rentInfoObject.getLong("shopId"); |
|
|
|
record.setShopId(shopId); |
|
|
|
record.setTenantId(wxRentContract.getTenantId()); |
|
|
|
record.setStatus(EnumRentContractStatus.INVALID.getCode()); |
|
|
|
wxRentContractMapper.updateInvalidContract(record); |
|
|
|
} |
|
|
|
} else { |
|
|
|
WxRentContract record = new WxRentContract(); |
|
|
|
record.setTenantId(wxRentContract.getTenantId()); |
|
|
|
record.setRentShopType(wxRentContract.getRentShopType()); |
|
|
|
record.setStatus(EnumRentContractStatus.INVALID.getCode()); |
|
|
|
wxRentContractMapper.updateRentInvalidStatus(record); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
@Transactional(rollbackFor = {Exception.class}) |
|
|
|
public List<WxBillRent> buildRent(WxMerchant wxMerchant, Long userId,WxRentContract rentContract,Integer isPreview) { |
|
|
|
@@ -1050,16 +1074,8 @@ public class WxRentContractServiceImpl implements WxRentContractService { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//把状态为意见而商户未关联的数据改为待签约状态 |
|
|
|
//wxRentContractMapper.updateStatusForUnsign(wxRentContract); |
|
|
|
|
|
|
|
//作废合同 |
|
|
|
wxRentContract.setStatus(EnumRentContractStatus.INVALID.getCode()); |
|
|
|
wxRentContractMapper.updateRentInvalidStatus(wxRentContract); |
|
|
|
|
|
|
|
//待签约 |
|
|
|
wxRentContract.setStatus(EnumRentContractStatus.WAIT_SIGN.getCode()); |
|
|
|
//wxRentContractMapper.updateRentWaitSignStatus(wxRentContract); |
|
|
|
int waitSignCount = wxRentContractMapper.queryRentContractWaitSignStatus(wxRentContract); |
|
|
|
resultData.put("waitSignCount", waitSignCount); |
|
|
|
|
|
|
|
@@ -1271,6 +1287,8 @@ public class WxRentContractServiceImpl implements WxRentContractService { |
|
|
|
buildDeposit(wxMerchant, null,id); |
|
|
|
// } |
|
|
|
} |
|
|
|
//作废合同 |
|
|
|
updateInvalidContract(id); |
|
|
|
return new ResultData(Result.SUCCESS, "操作成功"); |
|
|
|
} |
|
|
|
|
|
|
|
|