|
@@ -2403,7 +2403,6 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
|
|
|
if (examTask.getUserId() == null) {
|
|
|
examTask.setStatus(ExamStatusEnum.DRAFT);
|
|
|
} else if (Objects.nonNull(examTask.getReview()) && examTask.getReview()) {
|
|
|
- examTask.setStatus(ExamStatusEnum.STAGE);
|
|
|
Map<String, Object> map = SystemConstant.buildFlowVar(examTask.getId(),
|
|
|
examTask,
|
|
|
TFCustomTypeEnum.ELECTRON_FLOW,
|
|
@@ -2413,7 +2412,10 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
|
|
|
map.put("schoolId", schoolId);
|
|
|
map.put("orgId", examTask.getTeachingRoomId());
|
|
|
map = activitiService.customFlowStart(map);
|
|
|
- examTask.setFlowId(SystemConstant.convertIdToLong((String) map.get(SystemConstant.FLOW_ID)));
|
|
|
+ Long flowId = SystemConstant.convertIdToLong((String) map.get(SystemConstant.FLOW_ID));
|
|
|
+ examTask.setFlowId(flowId);
|
|
|
+ // 创建流程后,更新状态为待命题
|
|
|
+ examTask.setStatus(Objects.nonNull(flowId) ? ExamStatusEnum.STAGE : ExamStatusEnum.DRAFT);
|
|
|
map.computeIfAbsent(SystemConstant.FLOW_JOIN_TYPE, v -> FlowJoinTypeEnum.NEW);
|
|
|
tfFlowJoinService.saveOrUpdate(map);
|
|
|
} else if (Objects.nonNull(examTask.getReview()) && !examTask.getReview()) {
|