|
|
|
@@ -2015,7 +2015,7 @@ public class WxRentContractServiceImpl implements WxRentContractService { |
|
|
|
|
|
|
|
@Override
|
|
|
|
@Transactional(rollbackFor = {Exception.class})
|
|
|
|
public void renewal(WxRentContract rentContract,MallUserInfo user) {
|
|
|
|
public void renewal(WxRentContract rentContract,WxPropertyContract propertyContract,MallUserInfo user) {
|
|
|
|
final IdWorker idWorker = IdWorker.get();
|
|
|
|
Long newContractId = idWorker.nextId();
|
|
|
|
//拷贝
|
|
|
|
@@ -2074,14 +2074,7 @@ public class WxRentContractServiceImpl implements WxRentContractService { |
|
|
|
//rentContract.set
|
|
|
|
wxRentContractMapper.insert(rentContract);
|
|
|
|
|
|
|
|
if (rentContract.getOperationType().intValue() == EnumContractOperationType.WHOLE.getCode().intValue()) {
|
|
|
|
WxPropertyContract pq = new WxPropertyContract();
|
|
|
|
pq.updateTenantInfo(rentContract);
|
|
|
|
pq.setOperationType(EnumContractOperationType.WHOLE.getCode());
|
|
|
|
pq.setRentContractId(oldId);
|
|
|
|
List<WxPropertyContract> pclist = wxPropertyContractService.findList(pq);
|
|
|
|
if (null != pclist && pclist.size() > 0 ) {
|
|
|
|
WxPropertyContract propertyContract = pclist.get(0);
|
|
|
|
if (rentContract.getOperationType().intValue() == EnumContractOperationType.WHOLE.getCode().intValue() && null != propertyContract) {
|
|
|
|
propertyContract.setRentalStartDate(rentContract.getRentalStartDate());
|
|
|
|
propertyContract.setRentalEndDate(rentContract.getRentalEndDate());
|
|
|
|
propertyContract.setSignDate(rentContract.getSignDate());
|
|
|
|
@@ -2089,9 +2082,7 @@ public class WxRentContractServiceImpl implements WxRentContractService { |
|
|
|
propertyContract.setEndDate(rentContract.getStartDate());
|
|
|
|
propertyContract.setRentContractId(newContractId);
|
|
|
|
wxPropertyContractService.renewal(propertyContract, user,true);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@Transactional(rollbackFor = {Exception.class})
|
|
|
|
|