Commit b6b44366 authored by suhuiguang's avatar suhuiguang

1.工作流终止接口扩展适配修改

parent ca24d0ec
...@@ -19,7 +19,8 @@ public interface ICmWorkflowService { ...@@ -19,7 +19,8 @@ public interface ICmWorkflowService {
/** /**
* 终止流程 * 终止流程
* @param processInstanceId 流程实例id * @param processInstanceId 流程实例id
* @param stopReason 作废原因
* @return ProcessInstanceDTO * @return ProcessInstanceDTO
*/ */
ProcessInstanceDTO stopProcess(String processInstanceId); ProcessInstanceDTO stopProcess(String processInstanceId, String stopReason);
} }
...@@ -122,11 +122,11 @@ public class CmWorkflowServiceImpl implements ICmWorkflowService { ...@@ -122,11 +122,11 @@ public class CmWorkflowServiceImpl implements ICmWorkflowService {
@Override @Override
public ProcessInstanceDTO stopProcess(String processInstanceId) { public ProcessInstanceDTO stopProcess(String processInstanceId, String stopReason) {
ProcessInstanceDTO processTaskDTO = new ProcessInstanceDTO(); ProcessInstanceDTO processTaskDTO = new ProcessInstanceDTO();
try { try {
log.info("开始请求工作流终止流程接口:/stopProcess/{processInstanceId},请求参数:{}", processInstanceId); log.info("开始请求工作流终止流程接口:/stopProcess/{processInstanceId},请求参数:{},{}", processInstanceId, stopReason);
processTaskDTO = Workflow.taskV2Client.stopProcess(processInstanceId).getResult(); processTaskDTO = Workflow.taskV2Client.stopProcess(processInstanceId, stopReason).getResult();
} catch (InnerInvokException e) { } catch (InnerInvokException e) {
//拦截无审核人异常信息 //拦截无审核人异常信息
String devMessage = getErrorMessage(e); String devMessage = getErrorMessage(e);
......
...@@ -1293,7 +1293,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN ...@@ -1293,7 +1293,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
// 1.待办任务更新为已完成 // 1.待办任务更新为已完成
this.finishedTask(installationNotice); this.finishedTask(installationNotice);
// 2.终止流程-工作流报错暂时注释掉 // 2.终止流程-工作流报错暂时注释掉
// iCmWorkflowService.stopProcess(installationNotice.getInstanceId()); iCmWorkflowService.stopProcess(installationNotice.getInstanceId(), installationNotice.getCancelReason());
// 3.写入历史表 // 3.写入历史表
this.saveHisDataBeforeUpdate(installationNotice); this.saveHisDataBeforeUpdate(installationNotice);
// 4.清空redis(缓存的流程中及已完成安装告知的设备) // 4.清空redis(缓存的流程中及已完成安装告知的设备)
......
...@@ -1649,7 +1649,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD ...@@ -1649,7 +1649,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
// 1.待办任务更新为已完成 // 1.待办任务更新为已完成
this.finishedTask(jgUseRegistration); this.finishedTask(jgUseRegistration);
// 2.终止流程-工作流报错暂时注释掉 // 2.终止流程-工作流报错暂时注释掉
// iCmWorkflowService.stopProcess(jgUseRegistration.getInstanceId()); cmWorkflowService.stopProcess(jgUseRegistration.getInstanceId(), jgUseRegistration.getCancelReason());
// 3.清空redis(缓存的流程中及已完成使用登记的设备) // 3.清空redis(缓存的流程中及已完成使用登记的设备)
this.clearDataForCheckEquipRepeatUsed(jgUseRegistration); this.clearDataForCheckEquipRepeatUsed(jgUseRegistration);
...@@ -1706,7 +1706,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD ...@@ -1706,7 +1706,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
idxBizJgRegisterInfoService.update(updateWrapper); idxBizJgRegisterInfoService.update(updateWrapper);
} }
private void rollBackUseInfo(String record) { private void rollBackUseInfo(String record) {
LambdaUpdateWrapper<IdxBizJgUseInfo> updateWrapper = new LambdaUpdateWrapper<>(); LambdaUpdateWrapper<IdxBizJgUseInfo> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.eq(IdxBizJgUseInfo::getRecord, record); updateWrapper.eq(IdxBizJgUseInfo::getRecord, record);
updateWrapper.set(IdxBizJgUseInfo::getCity, null); updateWrapper.set(IdxBizJgUseInfo::getCity, null);
......
...@@ -1092,7 +1092,7 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform ...@@ -1092,7 +1092,7 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
// 1.待办任务更新为已完成 // 1.待办任务更新为已完成
this.finishedTask(vehicleInformation); this.finishedTask(vehicleInformation);
// 2.终止流程-工作流报错暂时注释掉 // 2.终止流程-工作流报错暂时注释掉
// iCmWorkflowService.stopProcess(vehicleInformation.getInstanceId()); cmWorkflowService.stopProcess(vehicleInformation.getInstanceId(), vehicleInformation.getCancelReason());
} }
} }
......
...@@ -256,7 +256,7 @@ ...@@ -256,7 +256,7 @@
<dependency> <dependency>
<groupId>com.yeejoin</groupId> <groupId>com.yeejoin</groupId>
<artifactId>amos-feign-workflow</artifactId> <artifactId>amos-feign-workflow</artifactId>
<version>1.10.5</version> <version>1.10.8</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.yeejoin</groupId> <groupId>com.yeejoin</groupId>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment