| @@ -193,25 +193,20 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||||
| throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | 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); | |||||
| } | } | ||||
| return new ResultData(Result.SUCCESS, "保存租赁合同信息成功", record); | return new ResultData(Result.SUCCESS, "保存租赁合同信息成功", record); | ||||
| @@ -221,25 +216,20 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||||
| @Override | @Override | ||||
| public ResultData update(WxRentContract record, Long userId,String userName) { | public ResultData update(WxRentContract record, Long userId,String userName) { | ||||
| ResultData resultData = getResultDataForUpdate(record, userId); | 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); //设置补录 | |||||
| } | } | ||||
| } 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); | |||||
| } | } | ||||
| return resultData; | return resultData; | ||||
| } | } | ||||
| @@ -832,25 +822,20 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||||
| @Transactional(rollbackFor = {Exception.class}) | @Transactional(rollbackFor = {Exception.class}) | ||||
| public ResultData updateFile(WxRentContract record, Long userId,String userName) { | public ResultData updateFile(WxRentContract record, Long userId,String userName) { | ||||
| ResultData resultData = getResultDataForUpdate(record, userId); | 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); //设置补录 | |||||
| } | } | ||||
| } 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); | |||||
| } | } | ||||
| return resultData; | return resultData; | ||||
| } | } | ||||