|
|
@ -160,11 +160,12 @@ public class RentContractInfoServiceImpl extends BaseServiceImpl<RentContractInf |
|
|
|
|
|
|
|
@Override |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public Result save(RentContractInfoDTO dto) { |
|
|
|
public void save(RentContractInfoDTO dto) { |
|
|
|
RentContractInfoEntity entity = ConvertUtils.sourceToTarget(dto, RentContractInfoEntity.class); |
|
|
|
entity.setCustomerId(loginUserUtil.getLoginUserCustomerId()); |
|
|
|
insert(entity); |
|
|
|
return updateTenantAndFile(entity.getId(), dto); |
|
|
|
// 处理租客信息和合同信息
|
|
|
|
updateTenantAndFile(entity.getId(), dto); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
@ -247,7 +248,7 @@ public class RentContractInfoServiceImpl extends BaseServiceImpl<RentContractInf |
|
|
|
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|
|
|
} |
|
|
|
|
|
|
|
private Result updateTenantAndFile(String contractId, RentContractInfoDTO dto) { |
|
|
|
private void updateTenantAndFile(String contractId, RentContractInfoDTO dto) { |
|
|
|
Map<String, Object> params = new HashMap<>(8); |
|
|
|
params.put("contractId", contractId); |
|
|
|
params.put("referenceId", contractId); |
|
|
@ -330,7 +331,6 @@ public class RentContractInfoServiceImpl extends BaseServiceImpl<RentContractInf |
|
|
|
}); |
|
|
|
rentContractFileService.insertBatch(fileList); |
|
|
|
} |
|
|
|
return new Result(); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|