租赁推送到bms合同查询查不到就查通用

This commit is contained in:
zhou-hongcheng
2026-03-17 16:53:34 +08:00
parent 86a2151330
commit 9b5075a6a9
6 changed files with 79 additions and 23 deletions
@@ -119,15 +119,31 @@ public class CostCalculationApplicationService {
private BillingRulesPO chooseBillingParams(CostCalculationDTO costCalculationDTO,TaskFlowRecordsDO taskFlowRecordsDO) {
//获取合同信息
AjaxResult ajaxResult = systemServiceFeign.getInfoByCode(costCalculationDTO.getContractNumber());
if (!"200".equals(String.valueOf(ajaxResult.get("code")))) {
throw new ServiceException("合同信息未找到");
}
ContractManagePO contractPO = JSONObject.parseObject(JSONObject.toJSONString(ajaxResult.get("data")), ContractManagePO.class);
if (null == contractPO) {
throw new ServiceException("合同信息未找到");
}
if(contractPO.getContractManageDetailPOList() == null || contractPO.getContractManageDetailPOList().size() == 0){
throw new ServiceException("合同详情列表为空,无法进行计算");
ContractManagePO contractPO = null;
try {
if (!"200".equals(String.valueOf(ajaxResult.get("code")))) {
throw new ServiceException("合同信息未找到");
}
contractPO = JSONObject.parseObject(JSONObject.toJSONString(ajaxResult.get("data")), ContractManagePO.class);
if (null == contractPO) {
throw new ServiceException("合同信息未找到");
}
if(contractPO.getContractManageDetailPOList() == null || contractPO.getContractManageDetailPOList().size() == 0){
throw new ServiceException("合同详情列表为空,无法进行计算");
}
} catch (ServiceException e) {
//查询通用合同
AjaxResult generalContract = systemServiceFeign.getGeneralContract();
if (!"200".equals(String.valueOf(generalContract.get("code")))) {
throw new ServiceException("通用合同信息未找到");
}
contractPO = JSONObject.parseObject(JSONObject.toJSONString(generalContract.get("data")), ContractManagePO.class);
if (null == contractPO) {
throw new ServiceException("通用合同信息未找到");
}
if(contractPO.getContractManageDetailPOList() == null || contractPO.getContractManageDetailPOList().size() == 0){
throw new ServiceException("通用合同详情列表为空,无法进行计算");
}
}
//查询单据信息