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 524ff5c6e..fbf0aa513 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java @@ -331,11 +331,10 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService } //启动审批流 - if(!CollectionUtils.isEmpty(record.getFlowParams())) { - Integer flowType = (Integer)record.getFlowParams().get("businessType"); - if(wxFlowService.getModelByType(flowType.intValue(),record.getTenantId()) == null){ - updatePropertyContractStatus(record.getId()); - }else{ + if(record.getFlowParams()==null || wxFlowService.getModelByType((Integer)record.getFlowParams().get("businessType"),record.getTenantId()) == null){ + updatePropertyContractStatus(record.getId()); + }else{ + if(!CollectionUtils.isEmpty(record.getFlowParams())) { record.getFlowParams().put("businessId", record.getId().toString()); wxFlowService.start(record.getFlowParams(), userId, userName, record.getTenantId()); @@ -344,7 +343,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService updateRentContract.setId(record.getId()); updateRentContract.setStatus(EnumRentContractStatus.WAIT_SIGN.getCode()); wxPropertyContractMapper.updateStatus(updateRentContract); - logger.info("id:{},启动审批流成功",record.getId().toString()); + logger.info("id:{},启动审批流成功", record.getId().toString()); } } return new ResultData(Result.SUCCESS, message, record); 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 436066ff9..0a4ffe4d2 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java @@ -355,23 +355,22 @@ public class WxRentContractServiceImpl implements WxRentContractService { } // 启动审批流 - if(record.getFlowParams() != null){ - Integer flowType = (Integer)record.getFlowParams().get("businessType"); - if(wxFlowService.getModelByType(flowType.intValue(),record.getTenantId()) == null){ - updateRentContractStatus(record.getId()); - }else{ - record.getFlowParams().put("businessId",record.getId().toString()); - if(record.getMerchantId() != null) { + if(record.getFlowParams()==null || wxFlowService.getModelByType((Integer)record.getFlowParams().get("businessType"),record.getTenantId()) == null){ + updateRentContractStatus(record.getId()); + }else{ + 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()); + 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); + logger.info("id:{},启动审批流成功, 是否补录:{}", record.getId().toString(), record.getMerchantId() != null); } } @@ -412,23 +411,22 @@ public class WxRentContractServiceImpl implements WxRentContractService { } //启动审批流 - if(record.getFlowParams() != null){ - Integer flowType = (Integer)record.getFlowParams().get("businessType"); - if(wxFlowService.getModelByType(flowType.intValue(),record.getTenantId()) == null){ - updateRentContractStatus(record.getId()); - }else{ - record.getFlowParams().put("businessId",record.getId().toString()); - if(record.getMerchantId() != null) { + if(record.getFlowParams()==null || wxFlowService.getModelByType((Integer)record.getFlowParams().get("businessType"),record.getTenantId()) == null){ + updateRentContractStatus(record.getId()); + }else{ + 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()); + 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); + logger.info("id:{},启动审批流成功 ,是否补录:{}", record.getId().toString(), record.getMerchantId() != null); } } @@ -1299,25 +1297,24 @@ public class WxRentContractServiceImpl implements WxRentContractService { if (resultData.code != Result.SUCCESS) { return resultData; } - // 启动审批流 - if(record.getFlowParams() != null){ - //判断是否配置模板 - Integer flowType = (Integer)record.getFlowParams().get("businessType"); - if(wxFlowService.getModelByType(flowType.intValue(),record.getTenantId())==null){ - updateRentContractStatus(record.getId()); - }else{ - record.getFlowParams().put("businessId",record.getId().toString()); - if(record.getMerchantId() != null) { + //启动审批流 + //判断是否配置模板 + if(record.getFlowParams()==null || wxFlowService.getModelByType((Integer)record.getFlowParams().get("businessType"),record.getTenantId()) == null){ + updateRentContractStatus(record.getId()); + }else{ + 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()); + 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); + logger.info("id:{},启动审批流成功,是否补录:{}", record.getId().toString(), record.getMerchantId() != null); } } return resultData;