|
@@ -266,11 +266,11 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
|
|
|
|
|
|
if (Objects.nonNull(examTask.getUserId())) {
|
|
|
examStatusEnum = ExamStatusEnum.STAGE;
|
|
|
- Map<String, Object> map = new HashMap<>();
|
|
|
- map.computeIfAbsent(SystemConstant.OBJECT_ID, v -> examTask.getId());
|
|
|
- map.computeIfAbsent(SystemConstant.FLOW_TYPE, v -> TFCustomTypeEnum.ELECTRON_FLOW);
|
|
|
- map.computeIfAbsent(SystemConstant.APPROVE_ID, v -> examTask.getUserId());
|
|
|
- map.computeIfAbsent(SystemConstant.FLOW_SUBMIT, v -> examTask);
|
|
|
+ Map<String, Object> map = SystemConstant.buildFlowVar(examTask.getId(),
|
|
|
+ examTask,
|
|
|
+ TFCustomTypeEnum.ELECTRON_FLOW,
|
|
|
+ examTask.getUserId(),
|
|
|
+ true);
|
|
|
map = activitiService.customFlowStart(map);
|
|
|
flowId = SystemConstant.convertIdToLong((String) map.get(SystemConstant.FLOW_ID));
|
|
|
map.computeIfAbsent(SystemConstant.FLOW_JOIN_TYPE, v -> FlowJoinTypeEnum.NEW);
|
|
@@ -289,10 +289,11 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
|
|
|
examStatusEnum = ExamStatusEnum.STAGE;
|
|
|
|
|
|
if (examTask.getUserId().longValue() != task.getUserId().longValue()) {
|
|
|
- Map<String, Object> map = new HashMap<>();
|
|
|
- map.computeIfAbsent(SystemConstant.OBJECT_ID, v -> examTask.getId());
|
|
|
- map.computeIfAbsent(SystemConstant.FLOW_TYPE, v -> TFCustomTypeEnum.ELECTRON_FLOW);
|
|
|
- map.computeIfAbsent(SystemConstant.APPROVE_ID, v -> examTask.getUserId());
|
|
|
+ Map<String, Object> map = SystemConstant.buildFlowVar(examTask.getId(),
|
|
|
+ examTask,
|
|
|
+ TFCustomTypeEnum.ELECTRON_FLOW,
|
|
|
+ examTask.getUserId(),
|
|
|
+ true);
|
|
|
map = activitiService.customFlowStart(map);
|
|
|
map.computeIfAbsent(SystemConstant.FLOW_JOIN_TYPE, v -> FlowJoinTypeEnum.NEW);
|
|
|
tfFlowJoinService.saveOrUpdate(map);
|
|
@@ -422,11 +423,11 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
|
|
|
examTask.setStatus(ExamStatusEnum.DRAFT);
|
|
|
} else if (examTask.getReview()) {
|
|
|
examTask.setStatus(ExamStatusEnum.STAGE);
|
|
|
- Map<String, Object> map = new HashMap<>();
|
|
|
- map.computeIfAbsent(SystemConstant.OBJECT_ID, v -> examTask.getId());
|
|
|
- map.computeIfAbsent(SystemConstant.FLOW_TYPE, v -> TFCustomTypeEnum.ELECTRON_FLOW);
|
|
|
- map.computeIfAbsent(SystemConstant.APPROVE_ID, v -> examTask.getUserId());
|
|
|
- map.computeIfAbsent(SystemConstant.FLOW_SUBMIT, v -> examTask);
|
|
|
+ Map<String, Object> map = SystemConstant.buildFlowVar(examTask.getId(),
|
|
|
+ examTask,
|
|
|
+ TFCustomTypeEnum.ELECTRON_FLOW,
|
|
|
+ examTask.getUserId(),
|
|
|
+ true);
|
|
|
map = activitiService.customFlowStart(map);
|
|
|
examTask.setFlowId(SystemConstant.convertIdToLong((String) map.get(SystemConstant.FLOW_ID)));
|
|
|
map.computeIfAbsent(SystemConstant.FLOW_JOIN_TYPE, v -> FlowJoinTypeEnum.NEW);
|
|
@@ -726,12 +727,11 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
|
|
|
this.saveBatch(list);
|
|
|
for (ExamTask examTask : list) {
|
|
|
if (examTask.getReview() && Objects.nonNull(examTask.getUserId()) && Objects.isNull(examTask.getFlowId())) {
|
|
|
- Map<String, Object> map = new HashMap<>();
|
|
|
- map.computeIfAbsent(SystemConstant.OBJECT_ID, v -> examTask.getId());
|
|
|
- map.computeIfAbsent(SystemConstant.FLOW_TYPE, v -> TFCustomTypeEnum.ELECTRON_FLOW);
|
|
|
- map.computeIfAbsent(SystemConstant.APPROVE_ID, v -> examTask.getUserId());
|
|
|
- map.computeIfAbsent(SystemConstant.FLOW_SUBMIT, v -> examTask);
|
|
|
-
|
|
|
+ Map<String, Object> map = SystemConstant.buildFlowVar(examTask.getId(),
|
|
|
+ examTask,
|
|
|
+ TFCustomTypeEnum.ELECTRON_FLOW,
|
|
|
+ examTask.getUserId(),
|
|
|
+ true);
|
|
|
map = activitiService.customFlowStart(map);
|
|
|
examTask.setFlowId(SystemConstant.convertIdToLong((String) map.get(SystemConstant.FLOW_ID)));
|
|
|
map.computeIfAbsent(SystemConstant.FLOW_JOIN_TYPE, v -> FlowJoinTypeEnum.NEW);
|
|
@@ -1518,10 +1518,11 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
|
|
|
examTask.setStatus(ExamStatusEnum.valueOf(examTaskDetail.getOperateType()));
|
|
|
if (Objects.isNull(examTask.getFlowId())) {
|
|
|
if (basicExamRule.getReview()) {
|
|
|
- Map<String, Object> map = new HashMap<>();
|
|
|
- map.computeIfAbsent(SystemConstant.OBJECT_ID, v -> examTask.getId());
|
|
|
- map.computeIfAbsent(SystemConstant.FLOW_TYPE, v -> TFCustomTypeEnum.ELECTRON_FLOW);
|
|
|
- map.computeIfAbsent(SystemConstant.APPROVE_ID, v -> examTask.getUserId());
|
|
|
+ Map<String, Object> map = SystemConstant.buildFlowVar(examTask.getId(),
|
|
|
+ examTask,
|
|
|
+ TFCustomTypeEnum.ELECTRON_FLOW,
|
|
|
+ examTask.getUserId(),
|
|
|
+ false);
|
|
|
map = activitiService.customFlowStart(map);
|
|
|
examTask.setFlowId(SystemConstant.convertIdToLong((String) map.get(SystemConstant.FLOW_ID)));
|
|
|
map.computeIfAbsent(SystemConstant.FLOW_JOIN_TYPE, v -> FlowJoinTypeEnum.NEW);
|
|
@@ -1660,10 +1661,11 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
|
|
|
|
|
|
if (Objects.isNull(examTask.getFlowId())) {
|
|
|
if (basicExamRule.getReview()) {
|
|
|
- Map<String, Object> map = new HashMap<>();
|
|
|
- map.computeIfAbsent(SystemConstant.OBJECT_ID, v -> examTask.getId());
|
|
|
- map.computeIfAbsent(SystemConstant.FLOW_TYPE, v -> TFCustomTypeEnum.ELECTRON_FLOW);
|
|
|
- map.computeIfAbsent(SystemConstant.APPROVE_ID, v -> examTask.getUserId());
|
|
|
+ Map<String, Object> map = SystemConstant.buildFlowVar(examTask.getId(),
|
|
|
+ examTask,
|
|
|
+ TFCustomTypeEnum.ELECTRON_FLOW,
|
|
|
+ examTask.getUserId(),
|
|
|
+ false);
|
|
|
map = activitiService.customFlowStart(map);
|
|
|
examTask.setFlowId(SystemConstant.convertIdToLong((String) map.get(SystemConstant.FLOW_ID)));
|
|
|
map.computeIfAbsent(SystemConstant.FLOW_JOIN_TYPE, v -> FlowJoinTypeEnum.NEW);
|