|
|
@ -69,6 +69,9 @@ public class RentContractInfoServiceImpl extends BaseServiceImpl<RentContractInf |
|
|
|
@Override |
|
|
|
public PageData<RentContractInfoDTO> page(Map<String, Object> params) { |
|
|
|
params.put("customerId", loginUserUtil.getLoginUserCustomerId()); |
|
|
|
if (StringUtils.isNotBlank((String) params.get("dataFlag"))) { |
|
|
|
params.put("createdBy", loginUserUtil.getLoginUserId()); |
|
|
|
} |
|
|
|
IPage<RentContractInfoDTO> page = getPage(params); |
|
|
|
List<RentContractInfoDTO> list = baseDao.getContractInfoList(params); |
|
|
|
return new PageData<>(list, page.getTotal()); |
|
|
@ -157,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 |
|
|
@ -244,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); |
|
|
@ -327,7 +331,6 @@ public class RentContractInfoServiceImpl extends BaseServiceImpl<RentContractInf |
|
|
|
}); |
|
|
|
rentContractFileService.insertBatch(fileList); |
|
|
|
} |
|
|
|
return new Result(); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|