|
|
|
@@ -1075,20 +1075,22 @@ public class WxAgileContractServiceImpl implements WxAgileContractService { |
|
|
|
|
|
|
|
@Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class}) |
|
|
|
@Override |
|
|
|
public void copyContractConfig(Long destId,WxRentContract orgContract,MallUserInfo user,boolean isReBuildUnDeposit) { |
|
|
|
public void copyContractConfig(boolean copyContractShop,Long destId,WxRentContract orgContract,MallUserInfo user,boolean isReBuildUnDeposit) { |
|
|
|
final IdWorker idWorker = IdWorker.get(); |
|
|
|
WxContractShop csq = new WxContractShop(); |
|
|
|
csq.updateTenantInfo(user); |
|
|
|
csq.setContractId(orgContract.getId()); |
|
|
|
List<WxContractShop> csqlist = wxContractShopMapper.findList(csq); |
|
|
|
if (null != csqlist && csqlist.size() > 0 ){ |
|
|
|
for ( int i = 0 ; i< csqlist.size() ; i ++) { |
|
|
|
WxContractShop cs = csqlist.get(i); |
|
|
|
cs.setId(idWorker.nextId()); |
|
|
|
cs.setContractId(destId); |
|
|
|
cs.setCreateDate(new Date()); |
|
|
|
cs.setUpdateDate(new Date()); |
|
|
|
wxContractShopMapper.insert(cs); |
|
|
|
if (copyContractShop) { |
|
|
|
WxContractShop csq = new WxContractShop(); |
|
|
|
csq.updateTenantInfo(user); |
|
|
|
csq.setContractId(orgContract.getId()); |
|
|
|
List<WxContractShop> csqlist = wxContractShopMapper.findList(csq); |
|
|
|
if (null != csqlist && csqlist.size() > 0 ){ |
|
|
|
for ( int i = 0 ; i< csqlist.size() ; i ++) { |
|
|
|
WxContractShop cs = csqlist.get(i); |
|
|
|
cs.setId(idWorker.nextId()); |
|
|
|
cs.setContractId(destId); |
|
|
|
cs.setCreateDate(new Date()); |
|
|
|
cs.setUpdateDate(new Date()); |
|
|
|
wxContractShopMapper.insert(cs); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@@ -1270,7 +1272,7 @@ public class WxAgileContractServiceImpl implements WxAgileContractService { |
|
|
|
rentContract.setLease(array[0]); |
|
|
|
wxRentContractMapper.insert(rentContract); |
|
|
|
|
|
|
|
copyContractConfig(newContractId, rentContract, user, true); |
|
|
|
copyContractConfig(true,newContractId, rentContract, user, true); |
|
|
|
} |
|
|
|
|
|
|
|
private WxRentContractAgileRenevueItem generateRenevueItem(IdWorker idWorker,WxRentContract rentContract,Long newContractId,Long renevueId) { |
|
|
|
|