diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java index 316050bc9..8d577d801 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java @@ -276,9 +276,10 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService message = "更新物业合同信息成功"; } - try { - record.getFlowParams().put("businessId",record.getId().toString()); - wxFlowService.start(record.getFlowParams(),userId,userName,record.getTenantId()); + //启动审批流 + if(!CollectionUtils.isEmpty(record.getFlowParams())) { + record.getFlowParams().put("businessId", record.getId().toString()); + wxFlowService.start(record.getFlowParams(), userId, userName, record.getTenantId()); // 合同状态改成待签约 WxPropertyContract updateRentContract = new WxPropertyContract(); @@ -286,10 +287,6 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService updateRentContract.setStatus(EnumRentContractStatus.WAIT_SIGN.getCode()); wxPropertyContractMapper.updateStatus(updateRentContract); logger.info("id:{},启动审批流成功",record.getId().toString()); - } catch (Exception e) { - e.printStackTrace(); - logger.error("启动审批流失败,e:" + e.getMessage()); - throw new MallinkException(ErrorCode.FLOW_FAIL.getCode(), "FLOW FAILD " + e.getMessage()); } // 保存调整金额(预账单调整) diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java index 046551d57..98643ff0b 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java @@ -217,25 +217,20 @@ public class WxRentContractServiceImpl implements WxRentContractService { throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); } - try { - // 启动审批流 - if(record.getFlowParams() != null){ - record.getFlowParams().put("businessId",record.getId().toString()); - if(record.getMerchantId() != null) { - record.getFlowParams().put("supplement", true); //设置补录 - } - wxFlowService.start(record.getFlowParams(),userId,userName,record.getTenantId()); - - // 合同状态改成待签约 - WxRentContract updateRentContract = new WxRentContract(); - updateRentContract.setId(record.getId()); - updateRentContract.setStatus(EnumRentContractStatus.WAIT_SIGN.getCode()); - wxRentContractMapper.updateStatus(updateRentContract); - logger.info("id:{},启动审批流成功, 是否补录:{}",record.getId().toString(),record.getMerchantId() != null); + // 启动审批流 + if(record.getFlowParams() != null){ + record.getFlowParams().put("businessId",record.getId().toString()); + if(record.getMerchantId() != null) { + record.getFlowParams().put("supplement", true); //设置补录 } - } catch (Exception e) { - logger.error("启动审批流失败,e:" + e.getMessage()); - throw new MallinkException(ErrorCode.FLOW_FAIL.getCode(), "FLOW FAILD " + e.getMessage()); + wxFlowService.start(record.getFlowParams(),userId,userName,record.getTenantId()); + + // 合同状态改成待签约 + WxRentContract updateRentContract = new WxRentContract(); + updateRentContract.setId(record.getId()); + updateRentContract.setStatus(EnumRentContractStatus.WAIT_SIGN.getCode()); + wxRentContractMapper.updateStatus(updateRentContract); + logger.info("id:{},启动审批流成功, 是否补录:{}",record.getId().toString(),record.getMerchantId() != null); } //生成预览账单(补录第二步,第三步走编辑) @@ -928,32 +923,27 @@ public class WxRentContractServiceImpl implements WxRentContractService { @Transactional(rollbackFor = {Exception.class}) public ResultData updateFile(WxRentContract record, Long userId,String userName) { ResultData resultData = getResultDataForUpdate(record, userId); - try { - // 启动审批流 - if(record.getFlowParams() != null){ - record.getFlowParams().put("businessId",record.getId().toString()); - if(record.getMerchantId() != null) { - record.getFlowParams().put("supplement", true); //设置补录 - } - wxFlowService.start(record.getFlowParams(),userId,userName,record.getTenantId()); - - // 合同状态改成待签约 - WxRentContract updateRentContract = new WxRentContract(); - updateRentContract.setId(record.getId()); - updateRentContract.setStatus(EnumRentContractStatus.WAIT_SIGN.getCode()); - wxRentContractMapper.updateStatus(updateRentContract); - logger.info("id:{},启动审批流成功,是否补录:{}",record.getId().toString(),record.getMerchantId() != null); + // 启动审批流 + if(record.getFlowParams() != null){ + record.getFlowParams().put("businessId",record.getId().toString()); + if(record.getMerchantId() != null) { + record.getFlowParams().put("supplement", true); //设置补录 } + wxFlowService.start(record.getFlowParams(),userId,userName,record.getTenantId()); - // 保存调整金额(预账单调整) - if(!CollectionUtils.isEmpty(record.getPreviewBillRentList())){ - for (WxBillRent wxBillRent:record.getPreviewBillRentList()) { - wxBillRentMapper.update(wxBillRent); - } + // 合同状态改成待签约 + WxRentContract updateRentContract = new WxRentContract(); + updateRentContract.setId(record.getId()); + updateRentContract.setStatus(EnumRentContractStatus.WAIT_SIGN.getCode()); + wxRentContractMapper.updateStatus(updateRentContract); + logger.info("id:{},启动审批流成功,是否补录:{}",record.getId().toString(),record.getMerchantId() != null); + } + + // 保存调整金额(预账单调整) + if(!CollectionUtils.isEmpty(record.getPreviewBillRentList())){ + for (WxBillRent wxBillRent:record.getPreviewBillRentList()) { + wxBillRentMapper.update(wxBillRent); } - } catch (Exception e) { - logger.error("启动审批流失败,e:" + e.getMessage()); - throw new MallinkException(ErrorCode.FLOW_FAIL.getCode(), "FLOW FAILD " + e.getMessage()); } return resultData; }