Browse Source

Merge branch 'dev_v3.0.0' of http://git.qmth.com.cn/wangliang/distributed-print-service into dev_v3.0.0

xiaof 3 years ago
parent
commit
f05d2dcc92

+ 58 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/activiti/custom/listener/ProcessEventListener.java

@@ -1,25 +1,36 @@
 package com.qmth.distributed.print.business.activiti.custom.listener;
 
+import com.google.gson.Gson;
+import com.google.gson.reflect.TypeToken;
 import com.qmth.distributed.print.business.entity.ExamTask;
 import com.qmth.distributed.print.business.entity.TFFlowLog;
+import com.qmth.distributed.print.business.enums.CustomFlowMultipleUserApproveTypeEnum;
+import com.qmth.distributed.print.business.enums.MessageEnum;
 import com.qmth.distributed.print.business.enums.TFCustomTypeEnum;
+import com.qmth.distributed.print.business.service.BasicMessageService;
 import com.qmth.distributed.print.business.service.ExamTaskService;
 import com.qmth.distributed.print.business.service.PrintCommonService;
+import com.qmth.teachcloud.common.bean.params.ApproveUserResult;
 import com.qmth.teachcloud.common.contant.SpringContextHolder;
 import com.qmth.teachcloud.common.contant.SystemConstant;
 import com.qmth.teachcloud.common.entity.SysUser;
 import com.qmth.teachcloud.common.enums.ExceptionResultEnum;
+import com.qmth.teachcloud.common.enums.FlowApproveOperationEnum;
 import com.qmth.teachcloud.common.service.SysUserService;
+import com.qmth.teachcloud.common.util.JacksonUtil;
 import org.activiti.engine.HistoryService;
+import org.activiti.engine.TaskService;
 import org.activiti.engine.delegate.event.ActivitiEvent;
 import org.activiti.engine.delegate.event.ActivitiEventListener;
 import org.activiti.engine.history.HistoricVariableInstance;
+import org.activiti.engine.task.Task;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.stereotype.Component;
 
 import java.io.IOException;
 import java.io.Serializable;
+import java.util.ArrayList;
 import java.util.List;
 import java.util.Objects;
 import java.util.Optional;
@@ -45,6 +56,7 @@ public class ProcessEventListener implements ActivitiEventListener, Serializable
             case PROCESS_COMPLETED:
                 // 流程结束
                 log.info("流程结束_PROCESS_COMPLETED:ProcessInstanceId:{},ExecutionId:{},ProcessDefinitionId:{}", event.getProcessInstanceId(), event.getExecutionId(), event.getProcessDefinitionId());
+                TaskService taskService = SpringContextHolder.getBean(TaskService.class);
                 HistoryService historyService = SpringContextHolder.getBean(HistoryService.class);
                 SysUserService sysUserService = SpringContextHolder.getBean(SysUserService.class);
                 ExamTaskService examTaskService = SpringContextHolder.getBean(ExamTaskService.class);
@@ -164,6 +176,52 @@ public class ProcessEventListener implements ActivitiEventListener, Serializable
             case TASK_COMPLETED:
                 // 任务被完成了。它会在ENTITY_DELETE事件之前触发。当任务是流程一部分时,事件会在流程继续运行之前, 后续事件将是ACTIVITY_COMPLETE,对应着完成任务的节点。
                 log.info("流程任务完成_TASK_COMPLETED:ProcessInstanceId:{},ExecutionId:{},ProcessDefinitionId:{}", event.getProcessInstanceId(), event.getExecutionId(), event.getProcessDefinitionId());
+                taskService = SpringContextHolder.getBean(TaskService.class);
+                sysUserService = SpringContextHolder.getBean(SysUserService.class);
+                examTaskService = SpringContextHolder.getBean(ExamTaskService.class);
+                BasicMessageService basicMessageService = SpringContextHolder.getBean(BasicMessageService.class);
+
+                Task task = taskService.createTaskQuery().executionId(event.getExecutionId()).singleResult();
+                if (Objects.nonNull(task)) {
+                    TFFlowLog tfFlowLog = (TFFlowLog) taskService.getVariable(task.getId(), SystemConstant.APPROVE_TF_FLOW_LOG);
+                    Object o = null;
+                    if (Objects.nonNull(tfFlowLog.getObjectTable()) && Objects.equals(tfFlowLog.getObjectTable(), TFCustomTypeEnum.ELECTRON_FLOW.getTable())) {
+                        o = examTaskService.getById(tfFlowLog.getObjectId());
+                    }
+                    if (Objects.nonNull(tfFlowLog) && (tfFlowLog.getApproveOperation() != FlowApproveOperationEnum.SUBMIT
+                            && tfFlowLog.getApproveOperation() != FlowApproveOperationEnum.END
+                            && tfFlowLog.getApproveOperation() != FlowApproveOperationEnum.FINISH)) {
+                        if (Objects.nonNull(tfFlowLog.getPendApproveId())) {
+                            String[] strs = tfFlowLog.getPendApproveId().split(",");
+                            List<Long> userIds = new ArrayList<>();
+                            for (String s : strs) {
+                                userIds.add(SystemConstant.convertIdToLong(s.trim()));
+                            }
+                            List<SysUser> sysUsers = sysUserService.listByIds(userIds);
+                            List<ApproveUserResult> sysUserList = new Gson().fromJson(JacksonUtil.parseJson(sysUsers), new TypeToken<List<ApproveUserResult>>() {
+                            }.getType());
+
+                            List<ApproveUserResult> nextApproverPeopleList = new ArrayList<>();
+                            nextApproverPeopleList.addAll(sysUserList);
+                            if (Objects.nonNull(tfFlowLog.getApproveUserApproveType()) && tfFlowLog.getApproveUserApproveType() == CustomFlowMultipleUserApproveTypeEnum.ORDER) {
+                                nextApproverPeopleList.clear();
+                                nextApproverPeopleList.add(sysUserList.get(0));
+                            }
+
+                            if (Objects.nonNull(nextApproverPeopleList) && (tfFlowLog.getApproveOperation() == FlowApproveOperationEnum.APPROVE
+                                    || tfFlowLog.getApproveOperation() == FlowApproveOperationEnum.EXCHANGE)) {
+                                if (Objects.nonNull(o) && o instanceof ExamTask) {
+                                    basicMessageService.sendNoticeTaskAuditFlow((ExamTask) o, nextApproverPeopleList, MessageEnum.NOTICE_OF_AUDIT_CREATED);
+                                }
+                            } else if (Objects.nonNull(nextApproverPeopleList) && (tfFlowLog.getApproveOperation() == FlowApproveOperationEnum.REJECT
+                                    || tfFlowLog.getApproveOperation() == FlowApproveOperationEnum.CANCEL)) {
+                                if (Objects.nonNull(o) && o instanceof ExamTask) {
+                                    basicMessageService.sendNoticeTaskAuditFlow((ExamTask) o, nextApproverPeopleList, MessageEnum.NOTICE_OF_AUDIT_REJECT);
+                                }
+                            }
+                        }
+                    }
+                }
                 break;
 //            case TIMER_FIRED:
 //                // 触发了定时器。job包含在事件中。

+ 9 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/TFFlowLogService.java

@@ -1,6 +1,7 @@
 package com.qmth.distributed.print.business.service;
 
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.qmth.distributed.print.business.bean.dto.approvalForm.ApprovalInfo;
 import com.qmth.distributed.print.business.bean.result.TFFlowLogResult;
 import com.qmth.distributed.print.business.entity.TFFlowLog;
 import com.qmth.teachcloud.common.enums.FlowApproveOperationEnum;
@@ -43,4 +44,12 @@ public interface TFFlowLogService extends IService<TFFlowLog> {
      * @return
      */
     TFFlowLog findByLast(Long flowId, Long schoolId, FlowApproveOperationEnum flowApproveOperationEnum);
+
+    /**
+     * 根据流程id查询审批表
+     *
+     * @param flowId 流程id
+     * @return 审批表
+     */
+    List<ApprovalInfo> findApprovalInfoByFlowId(Long flowId);
 }

+ 4 - 44
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamTaskServiceImpl.java

@@ -169,6 +169,8 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
 
     @Resource
     BasicPrintConfigService basicPrintConfigService;
+    @Resource
+    TFFlowLogService tfFlowLogService;
 
     @Override
     public List<ExamTask> listByCourseCode(Long schoolId, String code) {
@@ -988,7 +990,6 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
             if (Objects.nonNull(task)) {
                 Map<String, Object> map = new HashMap<>();
                 map.computeIfAbsent(SystemConstant.FLOW_TASK_ID, v -> task.getId());
-//                map.computeIfAbsent(SystemConstant.APPROVE_USER_IDS, v -> examTaskDetail.getApproveUserIds());
                 map.computeIfAbsent(SystemConstant.PAPAER_ATTACHMENT_IDS, v -> examTaskDetail.getPaperAttachmentIds());
                 map.computeIfAbsent(SystemConstant.APPROVE_OPERATION, v -> FlowApprovePassEnum.PASS);
                 activitiService.taskApprove(map);
@@ -1056,8 +1057,6 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
         map.computeIfAbsent(SystemConstant.APPROVE_OPERATION, v -> FlowApprovePassEnum.CANCEL);
         map.computeIfAbsent(SystemConstant.APPROVE_REMARK, v -> "命题" + FlowApprovePassEnum.CANCEL.getTitle());
         map.computeIfAbsent(SystemConstant.APPROVE_SETUP, v -> FlowApproveSetupEnum.SUBMIT.getSetup());
-//        map.computeIfAbsent(SystemConstant.APPROVE_CANCEL, v -> FlowApprovePassEnum.CANCEL);
-//        map.computeIfAbsent(SystemConstant.APPROVE_CANCEL_USER, v -> SystemConstant.APPROVE_CANCEL_USER_ID);
         activitiService.taskApprove(map);
         return true;
     }
@@ -1544,7 +1543,6 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
                     if (Objects.nonNull(task)) {
                         Map<String, Object> map = new HashMap<>();
                         map.computeIfAbsent(SystemConstant.FLOW_TASK_ID, v -> task.getId());
-//                        map1.computeIfAbsent(SystemConstant.APPROVE_USER_IDS, v -> examTaskApplyParam.getApproveUserIds());
                         map.computeIfAbsent(SystemConstant.PAPAER_ATTACHMENT_IDS, v -> examTaskDetail.getPaperAttachmentIds());
                         map.computeIfAbsent(SystemConstant.APPROVE_OPERATION, v -> FlowApprovePassEnum.PASS);
                         activitiService.taskApprove(map);
@@ -1774,7 +1772,6 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
                 if (Objects.nonNull(task)) {
                     Map<String, Object> map = new HashMap<>();
                     map.computeIfAbsent(SystemConstant.FLOW_TASK_ID, v -> task.getId());
-//                    map1.computeIfAbsent(SystemConstant.APPROVE_USER_IDS, v -> examTaskApplyTemp.getApproveUserIds());
                     map.computeIfAbsent(SystemConstant.APPROVE_OPERATION, v -> FlowApprovePassEnum.PASS);
                     map.computeIfAbsent(SystemConstant.PAPAER_ATTACHMENT_IDS, v -> examTaskDetail.getPaperAttachmentIds());
                     activitiService.taskApprove(map);
@@ -1833,51 +1830,19 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
         final String link = ",";
         List<ApprovalInfo> approvalInfoList = new ArrayList<>();
         if (review) {
-            //TODO 主任和院长审核需修改
-//            ApprovalInfo second = examTaskReviewLogService.findOnePassBySetUp(flowId, 2);
-//            if (Objects.isNull(second)) {
-//                throw ExceptionResultEnum.ERROR.exception("未找到主任级审核记录");
-//            }
-//            ApprovalInfo third = examTaskReviewLogService.findOnePassBySetUp(flowId, 3);
-//            if (Objects.isNull(third)) {
-//                throw ExceptionResultEnum.ERROR.exception("未找到院长级审核记录");
-//            }
-//            String secondRemark = second.getRemark();
-//            if (SystemConstant.strNotNull(secondRemark)) {
-//                secondRemark = remark + link + secondRemark;
-//            } else {
-//                secondRemark = remark;
-//            }
-//
-//            String thirdRemark = third.getRemark();
-//            if (SystemConstant.strNotNull(thirdRemark)) {
-//                thirdRemark = remark + link + thirdRemark;
-//            } else {
-//                thirdRemark = remark;
-//            }
-//            second.setRemark(secondRemark);
-//            third.setRemark(thirdRemark);
-//            approvalInfoList.add(second);
-//            approvalInfoList.add(third);
+            approvalInfoList = tfFlowLogService.findApprovalInfoByFlowId(flowId);
         }
 
         // 2.ExamRoomInfo 部分
         List<PrintPlanStatusEnum> printPlanStatusEnumList = new ArrayList<>();
         printPlanStatusEnumList.add(PrintPlanStatusEnum.PRINTING);
         printPlanStatusEnumList.add(PrintPlanStatusEnum.PRINT_FINISH);
-        List<ExamPackageDetail> examPackageDetailDatasource = this.baseMapper.findExamPackageDetailByPaperNumber(schoolId, examTask.getCourseCode(), paperNumber, printPlanStatusEnumList);
+        List<ExamPackageDetail> examPackageDetailDatasource = this.baseMapper.findExamPackageDetailByPaperNumber(schoolId, examTask.getCourseCode(), paperNumber, null);
         if (examPackageDetailDatasource.size() == 0) {
             throw ExceptionResultEnum.ERROR.exception("任务处理中,请稍后查看!");
         }
-        for (ExamPackageDetail packageDetail : examPackageDetailDatasource) {
-            ExamDetailStatusEnum examDetailStatusEnum = packageDetail.getExamDetailStatus();
-            if (ExamDetailStatusEnum.NEW.equals(examDetailStatusEnum) || ExamDetailStatusEnum.READY.equals(examDetailStatusEnum)) {
-                throw ExceptionResultEnum.ERROR.exception("任务处理中,请稍后查看!");
-            }
-        }
         ExamObjectDto examObjectDto = this.buildExamObjectDtoByPackageDatasource(examPackageDetailDatasource);
 
-
         // ---- 组装Dto
         ExamTaskApprovalFormDto examTaskApprovalFormDto = new ExamTaskApprovalFormDto();
         BasicInfo basicInfo = new BasicInfo();
@@ -1892,11 +1857,9 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
         basicInfo.setExamEndTime(examObjectDto.getExamEndTime());
         basicInfo.setCourseName(examTask.getCourseName());
 
-
         examTaskApprovalFormDto.setBasicInfo(basicInfo);
         examTaskApprovalFormDto.setExamRoomInfoList(examObjectDto.getExamRoomInfoList());
         examTaskApprovalFormDto.setApprovalInfoList(approvalInfoList);
-
         return examTaskApprovalFormDto;
     }
 
@@ -1938,11 +1901,9 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
         if (Objects.isNull(examTask)) {
             throw ExceptionResultEnum.ERROR.exception("未找到命题任务");
         }
-
         List<ExamPackageDetail> examPackageDetailDatasource = this.baseMapper.findExamPackageDetailByPaperNumber(schoolId, examTask.getCourseCode(), paperNumber, null);
         ExamObjectDto examObjectDto = this.buildExamObjectDtoByPackageDatasource(examPackageDetailDatasource);
 
-
         examObjectDto.setPaperName(examTask.getPaperName());
         examObjectDto.setPaperNumber(examTask.getPaperNumber());
         return examObjectDto;
@@ -2067,7 +2028,6 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
                     packageCode = packageCodeList.get(0);
                 }
 
-
                 List<BackupMethodEnum> backupMethodEnums = examPackageDetailCell.stream().map(ExamPackageDetail::getBackupMethod).distinct().collect(Collectors.toList());
                 if (backupMethodEnums.size() != 1 && backupMethodEnums.get(0) != BackupMethodEnum.ROOM) {
                     throw ExceptionResultEnum.ERROR.exception("印刷计划试卷备份方式必须按考场");

+ 24 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/TFFlowLogServiceImpl.java

@@ -1,14 +1,18 @@
 package com.qmth.distributed.print.business.service.impl;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.qmth.distributed.print.business.bean.dto.approvalForm.ApprovalInfo;
 import com.qmth.distributed.print.business.bean.result.TFFlowLogResult;
 import com.qmth.distributed.print.business.entity.TFFlowLog;
 import com.qmth.distributed.print.business.mapper.TFFlowLogMapper;
 import com.qmth.distributed.print.business.service.TFFlowLogService;
 import com.qmth.teachcloud.common.enums.FlowApproveOperationEnum;
+import com.qmth.teachcloud.common.service.SysUserService;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
+import java.util.ArrayList;
 import java.util.List;
 import java.util.Objects;
 
@@ -25,6 +29,8 @@ public class TFFlowLogServiceImpl extends ServiceImpl<TFFlowLogMapper, TFFlowLog
 
     @Resource
     TFFlowLogMapper tfFlowLogMapper;
+    @Resource
+    SysUserService sysUserService;
 
     /**
      * 根据流程id查询流程状态
@@ -61,4 +67,22 @@ public class TFFlowLogServiceImpl extends ServiceImpl<TFFlowLogMapper, TFFlowLog
     public TFFlowLog findByLast(Long flowId, Long schoolId, FlowApproveOperationEnum flowApproveOperationEnum) {
         return tfFlowLogMapper.findByLast(flowId, schoolId, Objects.nonNull(flowApproveOperationEnum) ? flowApproveOperationEnum.name() : null);
     }
+
+    @Override
+    public List<ApprovalInfo> findApprovalInfoByFlowId(Long flowId) {
+        List<ApprovalInfo> approvalInfoList = new ArrayList<>();
+        List<TFFlowLog> tfFlowLogList = this.list(new QueryWrapper<TFFlowLog>().lambda()
+                .eq(TFFlowLog::getFlowId,flowId)
+                .ne(TFFlowLog::getApproveOperation,FlowApproveOperationEnum.SUBMIT));
+        for (TFFlowLog tfFlowLog : tfFlowLogList) {
+            ApprovalInfo approvalInfo = new ApprovalInfo();
+            Long approveId = tfFlowLog.getApproveId();
+            approvalInfo.setApproveId(approveId);
+            approvalInfo.setApproveName(sysUserService.getById(approveId).getRealName());
+            approvalInfo.setTime(tfFlowLog.getUpdateTime());
+            approvalInfo.setRemark(tfFlowLog.getApproveRemark());
+            approvalInfoList.add(approvalInfo);
+        }
+        return approvalInfoList;
+    }
 }

+ 15 - 4
distributed-print-business/src/main/resources/mapper/TFFlowApproveMapper.xml

@@ -71,10 +71,21 @@
             <if test="teachingRoomId != null and teachingRoomId != ''">
                 and et.teaching_room_id = #{teachingRoomId}
             </if>
-             and (tffa.status <![CDATA[ <> ]]> 'START'
-            <if test="status != null and status != ''">
-                 or tffa.status = #{status}
-            </if>)
+            <choose>
+                <when test="status != null and status != ''">
+                    <choose>
+                        <when test="status == 'START'">
+                            and tffa.status = #{status}
+                        </when>
+                        <otherwise>
+                            and (tffa.status <![CDATA[ <> ]]> 'START' and tffa.status = #{status})
+                        </otherwise>
+                    </choose>
+                </when>
+                <otherwise>
+                    and tffa.status <![CDATA[ <> ]]> 'START'
+                </otherwise>
+            </choose>
             <if test="startTime != null and startTime != ''">
                 and tffa.create_time <![CDATA[ >= ]]> #{startTime}
             </if>

+ 1 - 14
distributed-print/src/main/java/com/qmth/distributed/print/api/ExamTaskController.java

@@ -467,22 +467,9 @@ public class ExamTaskController {
                         Map<String, Object> map = new HashMap<>();
                         map.computeIfAbsent(SystemConstant.FLOW_TASK_ID, v -> task.getId());
                         map.computeIfAbsent(SystemConstant.APPROVE_OPERATION, v -> FlowApprovePassEnum.PASS);
-                        Map<String, Object> objectMap = activitiService.taskApprove(map);
+                        activitiService.taskApprove(map);
                     }
                 }
-//                if (Objects.nonNull(objectMap)) {
-//                    TFFlowApprove tfFlowApprove = (TFFlowApprove) objectMap.get("tfFlowApprove");
-//                    //审核通过,生成pdf
-//                    if (Objects.nonNull(tfFlowApprove) && FlowApproveSetupEnum.FINISH.getSetup() == tfFlowApprove.getSetup()) {
-////                        ExamTask examTask = (ExamTask) objectMap.get("examTask");
-//                        SysUser sysUser = (SysUser) objectMap.get("sysUser");
-//                        try {
-//                            printCommonService.checkData(examTask.getSchoolId(), examTask.getCourseCode(), examTask.getPaperNumber(), sysUser);
-//                        } catch (IOException e) {
-//                            throw ExceptionResultEnum.ERROR.exception("生成pdf失败");
-//                        }
-//                    }
-//                }
             }
         }
         /*SysUser sysUser = (SysUser) ServletUtil.getRequestUser();

+ 2 - 26
distributed-print/src/main/java/com/qmth/distributed/print/api/TFCustomFlowController.java

@@ -145,21 +145,6 @@ public class TFCustomFlowController {
         return ResultUtil.ok(true);
     }
 
-//    @ApiOperation(value = "测试启动流程")
-//    @ApiResponses({@ApiResponse(code = 200, message = "常规信息", response = ResultUtil.class)})
-//    @RequestMapping(value = "/testStart", method = RequestMethod.POST)
-//    @Transactional
-//    public Result testStart(@ApiParam(value = "实体id", required = true) @RequestParam String objectId,
-//                            @ApiParam(value = "命题老师id", required = true) @RequestParam String approveId,
-//                            @ApiParam(value = "实体表", required = true) @RequestParam TFCustomTypeEnum flowType) {
-//        Map<String, Object> map = new HashMap<>();
-//        map.computeIfAbsent(SystemConstant.OBJECT_ID, v -> SystemConstant.convertIdToLong(objectId));
-//        map.computeIfAbsent(SystemConstant.APPROVE_ID, v -> SystemConstant.convertIdToLong(approveId));
-//        map.computeIfAbsent(SystemConstant.FLOW_TYPE, v -> flowType);
-//        activitiService.customFlowStart(map);
-//        return ResultUtil.ok(true);
-//    }
-
     @ApiOperation(value = "审批流程")
     @ApiResponses({@ApiResponse(code = 200, message = "常规信息", response = ResultUtil.class)})
     @RequestMapping(value = "/task/approve", method = RequestMethod.POST)
@@ -173,15 +158,6 @@ public class TFCustomFlowController {
         map.computeIfAbsent(SystemConstant.APPROVE_REMARK, v -> flowTaskApproveParam.getRemark());
         map.computeIfAbsent(SystemConstant.APPROVE_SETUP, v -> flowTaskApproveParam.getSetup());
         activitiService.taskApprove(map);
-//            // 驳回短信(驳回给提交老师)
-//            if (tfFlowApprove.getStatus() == FlowStatusEnum.REJECT
-//                    && (tfFlowApprove.getSetup().intValue() == FlowApproveSetupEnum.SUBMIT.getSetup())
-//                    || tfFlowApprove.getSetup().intValue() == FlowApproveSetupEnum.THREE_APPROVE.getSetup()) {
-//                List<SysUser> sysUsers = sysUserService.listByIds(Arrays.asList(examTask.getUserId()));
-//                List<ApproveUserResult> sysUserList = new Gson().fromJson(JacksonUtil.parseJson(sysUsers), new TypeToken<List<ApproveUserResult>>() {
-//                }.getType());
-//                basicMessageService.sendNoticeTaskAuditFlow(examTask, sysUserList, MessageEnum.NOTICE_OF_AUDIT_REJECT);
-//            }
         return ResultUtil.ok(true);
     }
 
@@ -197,7 +173,7 @@ public class TFCustomFlowController {
                                   @ApiParam(value = "页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
                                   @ApiParam(value = "数量", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
         SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
-        return ResultUtil.ok(tfFlowApproveService.findApproveList(new Page<>(pageNumber, pageSize), status, createUserName, SystemConstant.convertIdToLong(teachingRoomId), startTime, endTime, pendApproveUserName, sysUser.getSchoolId(), sysUser.getOrgId()));
+        return ResultUtil.ok(tfFlowApproveService.findApproveList(new Page<>(pageNumber, pageSize), status, createUserName, SystemConstant.convertIdToLong(teachingRoomId), startTime, endTime, pendApproveUserName, sysUser.getSchoolId(), null));
     }
 
     @ApiOperation(value = "流程列表")
@@ -207,7 +183,7 @@ public class TFCustomFlowController {
                        @ApiParam(value = "页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
                        @ApiParam(value = "数量", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
         SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
-        return ResultUtil.ok(tfCustomFlowService.list(new Page<>(pageNumber, pageSize), name, SystemConstant.getHeadOrUserSchoolId(), null));
+        return ResultUtil.ok(tfCustomFlowService.list(new Page<>(pageNumber, pageSize), name, sysUser.getSchoolId(), null));
     }
 
     @ApiOperation(value = "流程编辑")

+ 0 - 119
distributed-print/src/main/resources/processes/GdykdxPaperApprove.bpmn

@@ -1,119 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
-  <process id="GdykdxPaperApprove" name="GdykdxPaperApprove" isExecutable="true">
-    <startEvent id="startevent1" name="Start"></startEvent>
-    <userTask id="usertask1" name="提交试卷" activiti:assignee="${approveId}"></userTask>
-    <sequenceFlow id="flow1" sourceRef="startevent1" targetRef="usertask1"></sequenceFlow>
-    <userTask id="usertask2" name="审核试卷">
-      <extensionElements>
-        <activiti:taskListener event="create" class="com.qmth.distributed.print.business.activiti.DirectorApproveListener"></activiti:taskListener>
-      </extensionElements>
-    </userTask>
-    <sequenceFlow id="flow2" sourceRef="usertask1" targetRef="usertask2"></sequenceFlow>
-    <endEvent id="endevent1" name="End"></endEvent>
-    <exclusiveGateway id="exclusivegateway1" name="审批"></exclusiveGateway>
-    <sequenceFlow id="flow3" sourceRef="usertask2" targetRef="exclusivegateway1"></sequenceFlow>
-    <userTask id="usertask3" name="审核试卷">
-      <extensionElements>
-        <activiti:taskListener event="create" class="com.qmth.distributed.print.business.activiti.PresidentApproveListener"></activiti:taskListener>
-      </extensionElements>
-    </userTask>
-    <sequenceFlow id="flow4" name="通过" sourceRef="exclusivegateway1" targetRef="usertask3">
-      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${approve == 1}]]></conditionExpression>
-    </sequenceFlow>
-    <sequenceFlow id="flow5" name="驳回" sourceRef="exclusivegateway1" targetRef="usertask1">
-      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${approve == 0}]]></conditionExpression>
-    </sequenceFlow>
-    <exclusiveGateway id="exclusivegateway2" name="审批"></exclusiveGateway>
-    <sequenceFlow id="flow6" sourceRef="usertask3" targetRef="exclusivegateway2"></sequenceFlow>
-    <sequenceFlow id="flow7" name="通过" sourceRef="exclusivegateway2" targetRef="endevent1">
-      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${approve == 2}]]></conditionExpression>
-    </sequenceFlow>
-    <sequenceFlow id="flow8" name="驳回" sourceRef="exclusivegateway2" targetRef="usertask2">
-      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${approve == 1}]]></conditionExpression>
-    </sequenceFlow>
-    <sequenceFlow id="flow9" name="驳回" sourceRef="exclusivegateway2" targetRef="usertask1">
-      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${approve == 0}]]></conditionExpression>
-    </sequenceFlow>
-  </process>
-  <bpmndi:BPMNDiagram id="BPMNDiagram_GdykdxPaperApprove">
-    <bpmndi:BPMNPlane bpmnElement="GdykdxPaperApprove" id="BPMNPlane_GdykdxPaperApprove">
-      <bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">
-        <omgdc:Bounds height="35.0" width="35.0" x="43.0" y="46.0"></omgdc:Bounds>
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1">
-        <omgdc:Bounds height="55.0" width="105.0" x="151.0" y="36.0"></omgdc:Bounds>
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape bpmnElement="usertask2" id="BPMNShape_usertask2">
-        <omgdc:Bounds height="55.0" width="105.0" x="350.0" y="36.0"></omgdc:Bounds>
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">
-        <omgdc:Bounds height="35.0" width="35.0" x="385.0" y="400.0"></omgdc:Bounds>
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape bpmnElement="exclusivegateway1" id="BPMNShape_exclusivegateway1">
-        <omgdc:Bounds height="40.0" width="40.0" x="382.0" y="110.0"></omgdc:Bounds>
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape bpmnElement="usertask3" id="BPMNShape_usertask3">
-        <omgdc:Bounds height="55.0" width="105.0" x="350.0" y="190.0"></omgdc:Bounds>
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape bpmnElement="exclusivegateway2" id="BPMNShape_exclusivegateway2">
-        <omgdc:Bounds height="40.0" width="40.0" x="382.0" y="300.0"></omgdc:Bounds>
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
-        <omgdi:waypoint x="78.0" y="63.0"></omgdi:waypoint>
-        <omgdi:waypoint x="151.0" y="63.0"></omgdi:waypoint>
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
-        <omgdi:waypoint x="256.0" y="63.0"></omgdi:waypoint>
-        <omgdi:waypoint x="350.0" y="63.0"></omgdi:waypoint>
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
-        <omgdi:waypoint x="402.0" y="91.0"></omgdi:waypoint>
-        <omgdi:waypoint x="402.0" y="110.0"></omgdi:waypoint>
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">
-        <omgdi:waypoint x="402.0" y="150.0"></omgdi:waypoint>
-        <omgdi:waypoint x="402.0" y="190.0"></omgdi:waypoint>
-        <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="16.0" width="22.0" x="402.0" y="150.0"></omgdc:Bounds>
-        </bpmndi:BPMNLabel>
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">
-        <omgdi:waypoint x="382.0" y="130.0"></omgdi:waypoint>
-        <omgdi:waypoint x="203.0" y="130.0"></omgdi:waypoint>
-        <omgdi:waypoint x="203.0" y="91.0"></omgdi:waypoint>
-        <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="16.0" width="22.0" x="382.0" y="130.0"></omgdc:Bounds>
-        </bpmndi:BPMNLabel>
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">
-        <omgdi:waypoint x="402.0" y="245.0"></omgdi:waypoint>
-        <omgdi:waypoint x="402.0" y="300.0"></omgdi:waypoint>
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge bpmnElement="flow7" id="BPMNEdge_flow7">
-        <omgdi:waypoint x="402.0" y="340.0"></omgdi:waypoint>
-        <omgdi:waypoint x="402.0" y="400.0"></omgdi:waypoint>
-        <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="16.0" width="22.0" x="402.0" y="340.0"></omgdc:Bounds>
-        </bpmndi:BPMNLabel>
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge bpmnElement="flow8" id="BPMNEdge_flow8">
-        <omgdi:waypoint x="422.0" y="320.0"></omgdi:waypoint>
-        <omgdi:waypoint x="546.0" y="319.0"></omgdi:waypoint>
-        <omgdi:waypoint x="546.0" y="63.0"></omgdi:waypoint>
-        <omgdi:waypoint x="455.0" y="63.0"></omgdi:waypoint>
-        <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="16.0" width="22.0" x="422.0" y="320.0"></omgdc:Bounds>
-        </bpmndi:BPMNLabel>
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge bpmnElement="flow9" id="BPMNEdge_flow9">
-        <omgdi:waypoint x="382.0" y="320.0"></omgdi:waypoint>
-        <omgdi:waypoint x="203.0" y="321.0"></omgdi:waypoint>
-        <omgdi:waypoint x="203.0" y="91.0"></omgdi:waypoint>
-        <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="16.0" width="22.0" x="382.0" y="320.0"></omgdc:Bounds>
-        </bpmndi:BPMNLabel>
-      </bpmndi:BPMNEdge>
-    </bpmndi:BPMNPlane>
-  </bpmndi:BPMNDiagram>
-</definitions>

+ 0 - 132
distributed-print/src/main/resources/processes/GdykdxPaperApprove2.2.2.bpmn

@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
-  <process id="GdykdxPaperApprove" name="GdykdxPaperApprove" isExecutable="true">
-    <startEvent id="startevent1" name="Start"></startEvent>
-    <userTask id="usertask1" name="提交试卷" activiti:assignee="${approveId}"></userTask>
-    <sequenceFlow id="flow1" sourceRef="startevent1" targetRef="usertask1"></sequenceFlow>
-    <userTask id="usertask2" name="审核试卷">
-      <extensionElements>
-        <activiti:taskListener event="create" class="com.qmth.distributed.print.business.activiti.DirectorApproveListener"></activiti:taskListener>
-      </extensionElements>
-    </userTask>
-    <sequenceFlow id="flow2" sourceRef="usertask1" targetRef="usertask2"></sequenceFlow>
-    <endEvent id="endevent1" name="End"></endEvent>
-    <exclusiveGateway id="exclusivegateway1" name="审批"></exclusiveGateway>
-    <sequenceFlow id="flow3" sourceRef="usertask2" targetRef="exclusivegateway1"></sequenceFlow>
-    <userTask id="usertask3" name="审核试卷">
-      <extensionElements>
-        <activiti:taskListener event="create" class="com.qmth.distributed.print.business.activiti.PresidentApproveListener"></activiti:taskListener>
-      </extensionElements>
-    </userTask>
-    <sequenceFlow id="flow4" name="通过" sourceRef="exclusivegateway1" targetRef="usertask3">
-      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${approve == 1}]]></conditionExpression>
-    </sequenceFlow>
-    <sequenceFlow id="flow5" name="驳回" sourceRef="exclusivegateway1" targetRef="usertask1">
-      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${approve == 0}]]></conditionExpression>
-    </sequenceFlow>
-    <exclusiveGateway id="exclusivegateway2" name="审批"></exclusiveGateway>
-    <sequenceFlow id="flow6" sourceRef="usertask3" targetRef="exclusivegateway2"></sequenceFlow>
-    <sequenceFlow id="flow8" name="驳回" sourceRef="exclusivegateway2" targetRef="usertask2">
-      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${approve == 1}]]></conditionExpression>
-    </sequenceFlow>
-    <sequenceFlow id="flow9" name="驳回" sourceRef="exclusivegateway2" targetRef="usertask1">
-      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${approve == 0}]]></conditionExpression>
-    </sequenceFlow>
-    <callActivity id="GdykdxPrintSubActivity" name="印刷员审核子流程" calledElement="GdykdxPaperSubPrintApprove">
-      <extensionElements>
-        <activiti:in source="approveId" target="approveId"></activiti:in>
-      </extensionElements>
-    </callActivity>
-    <sequenceFlow id="flow10" name="通过" sourceRef="exclusivegateway2" targetRef="GdykdxPrintSubActivity">
-      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${approve == 2}]]></conditionExpression>
-    </sequenceFlow>
-    <sequenceFlow id="flow11" sourceRef="GdykdxPrintSubActivity" targetRef="endevent1"></sequenceFlow>
-  </process>
-  <bpmndi:BPMNDiagram id="BPMNDiagram_GdykdxPaperApprove">
-    <bpmndi:BPMNPlane bpmnElement="GdykdxPaperApprove" id="BPMNPlane_GdykdxPaperApprove">
-      <bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">
-        <omgdc:Bounds height="35.0" width="35.0" x="43.0" y="46.0"></omgdc:Bounds>
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1">
-        <omgdc:Bounds height="55.0" width="105.0" x="151.0" y="36.0"></omgdc:Bounds>
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape bpmnElement="usertask2" id="BPMNShape_usertask2">
-        <omgdc:Bounds height="55.0" width="105.0" x="350.0" y="36.0"></omgdc:Bounds>
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">
-        <omgdc:Bounds height="35.0" width="35.0" x="385.0" y="490.0"></omgdc:Bounds>
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape bpmnElement="exclusivegateway1" id="BPMNShape_exclusivegateway1">
-        <omgdc:Bounds height="40.0" width="40.0" x="382.0" y="110.0"></omgdc:Bounds>
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape bpmnElement="usertask3" id="BPMNShape_usertask3">
-        <omgdc:Bounds height="55.0" width="105.0" x="350.0" y="190.0"></omgdc:Bounds>
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape bpmnElement="exclusivegateway2" id="BPMNShape_exclusivegateway2">
-        <omgdc:Bounds height="40.0" width="40.0" x="382.0" y="300.0"></omgdc:Bounds>
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape bpmnElement="GdykdxPrintSubActivity" id="BPMNShape_GdykdxPrintSubActivity">
-        <omgdc:Bounds height="55.0" width="105.0" x="350.0" y="390.0"></omgdc:Bounds>
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
-        <omgdi:waypoint x="78.0" y="63.0"></omgdi:waypoint>
-        <omgdi:waypoint x="151.0" y="63.0"></omgdi:waypoint>
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
-        <omgdi:waypoint x="256.0" y="63.0"></omgdi:waypoint>
-        <omgdi:waypoint x="350.0" y="63.0"></omgdi:waypoint>
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
-        <omgdi:waypoint x="402.0" y="91.0"></omgdi:waypoint>
-        <omgdi:waypoint x="402.0" y="110.0"></omgdi:waypoint>
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">
-        <omgdi:waypoint x="402.0" y="150.0"></omgdi:waypoint>
-        <omgdi:waypoint x="402.0" y="190.0"></omgdi:waypoint>
-        <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="16.0" width="22.0" x="402.0" y="150.0"></omgdc:Bounds>
-        </bpmndi:BPMNLabel>
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">
-        <omgdi:waypoint x="382.0" y="130.0"></omgdi:waypoint>
-        <omgdi:waypoint x="203.0" y="130.0"></omgdi:waypoint>
-        <omgdi:waypoint x="203.0" y="91.0"></omgdi:waypoint>
-        <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="16.0" width="22.0" x="382.0" y="130.0"></omgdc:Bounds>
-        </bpmndi:BPMNLabel>
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">
-        <omgdi:waypoint x="402.0" y="245.0"></omgdi:waypoint>
-        <omgdi:waypoint x="402.0" y="300.0"></omgdi:waypoint>
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge bpmnElement="flow8" id="BPMNEdge_flow8">
-        <omgdi:waypoint x="422.0" y="320.0"></omgdi:waypoint>
-        <omgdi:waypoint x="546.0" y="319.0"></omgdi:waypoint>
-        <omgdi:waypoint x="546.0" y="63.0"></omgdi:waypoint>
-        <omgdi:waypoint x="455.0" y="63.0"></omgdi:waypoint>
-        <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="16.0" width="22.0" x="422.0" y="320.0"></omgdc:Bounds>
-        </bpmndi:BPMNLabel>
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge bpmnElement="flow9" id="BPMNEdge_flow9">
-        <omgdi:waypoint x="382.0" y="320.0"></omgdi:waypoint>
-        <omgdi:waypoint x="203.0" y="321.0"></omgdi:waypoint>
-        <omgdi:waypoint x="203.0" y="91.0"></omgdi:waypoint>
-        <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="16.0" width="22.0" x="382.0" y="320.0"></omgdc:Bounds>
-        </bpmndi:BPMNLabel>
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge bpmnElement="flow10" id="BPMNEdge_flow10">
-        <omgdi:waypoint x="402.0" y="340.0"></omgdi:waypoint>
-        <omgdi:waypoint x="402.0" y="390.0"></omgdi:waypoint>
-        <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="16.0" width="22.0" x="402.0" y="340.0"></omgdc:Bounds>
-        </bpmndi:BPMNLabel>
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge bpmnElement="flow11" id="BPMNEdge_flow11">
-        <omgdi:waypoint x="402.0" y="445.0"></omgdi:waypoint>
-        <omgdi:waypoint x="402.0" y="490.0"></omgdi:waypoint>
-      </bpmndi:BPMNEdge>
-    </bpmndi:BPMNPlane>
-  </bpmndi:BPMNDiagram>
-</definitions>

+ 0 - 77
distributed-print/src/main/resources/processes/GdykdxPaperApproveSubByPrint.bpmn

@@ -1,77 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
-  <process id="GdykdxPaperSubPrintApprove" name="GdykdxPaperSubPrintApprove" isExecutable="true">
-    <startEvent id="startevent1" name="Start">
-      <extensionElements>
-        <activiti:executionListener event="start" class="com.qmth.distributed.print.business.activiti.StartApproveSubListener"></activiti:executionListener>
-      </extensionElements>
-    </startEvent>
-    <userTask id="usertask4" name="提交人" activiti:assignee="${approveId}"></userTask>
-    <sequenceFlow id="flow1" sourceRef="startevent1" targetRef="usertask4"></sequenceFlow>
-    <userTask id="usertask5" name="印刷员审核">
-      <extensionElements>
-        <activiti:taskListener event="create" class="com.qmth.distributed.print.business.activiti.PrintApproveSubListener"></activiti:taskListener>
-      </extensionElements>
-    </userTask>
-    <sequenceFlow id="flow2" sourceRef="usertask4" targetRef="usertask5"></sequenceFlow>
-    <endEvent id="endevent1" name="End"></endEvent>
-    <exclusiveGateway id="exclusivegateway1" name="审批"></exclusiveGateway>
-    <sequenceFlow id="flow3" sourceRef="usertask5" targetRef="exclusivegateway1"></sequenceFlow>
-    <sequenceFlow id="flow5" name="驳回" sourceRef="exclusivegateway1" targetRef="usertask4">
-      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${approve == 0}]]></conditionExpression>
-    </sequenceFlow>
-    <endEvent id="endevent2" name="End"></endEvent>
-    <sequenceFlow id="flow9" name="通过" sourceRef="exclusivegateway1" targetRef="endevent2">
-      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${approve == 1}]]></conditionExpression>
-    </sequenceFlow>
-  </process>
-  <bpmndi:BPMNDiagram id="BPMNDiagram_GdykdxPaperSubPrintApprove">
-    <bpmndi:BPMNPlane bpmnElement="GdykdxPaperSubPrintApprove" id="BPMNPlane_GdykdxPaperSubPrintApprove">
-      <bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">
-        <omgdc:Bounds height="35.0" width="35.0" x="43.0" y="46.0"></omgdc:Bounds>
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape bpmnElement="usertask4" id="BPMNShape_usertask4">
-        <omgdc:Bounds height="55.0" width="105.0" x="151.0" y="36.0"></omgdc:Bounds>
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape bpmnElement="usertask5" id="BPMNShape_usertask5">
-        <omgdc:Bounds height="55.0" width="105.0" x="350.0" y="36.0"></omgdc:Bounds>
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">
-        <omgdc:Bounds height="35.0" width="35.0" x="385.0" y="760.0"></omgdc:Bounds>
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape bpmnElement="exclusivegateway1" id="BPMNShape_exclusivegateway1">
-        <omgdc:Bounds height="40.0" width="40.0" x="382.0" y="110.0"></omgdc:Bounds>
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape bpmnElement="endevent2" id="BPMNShape_endevent2">
-        <omgdc:Bounds height="35.0" width="35.0" x="385.0" y="200.0"></omgdc:Bounds>
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
-        <omgdi:waypoint x="78.0" y="63.0"></omgdi:waypoint>
-        <omgdi:waypoint x="151.0" y="63.0"></omgdi:waypoint>
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
-        <omgdi:waypoint x="256.0" y="63.0"></omgdi:waypoint>
-        <omgdi:waypoint x="350.0" y="63.0"></omgdi:waypoint>
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
-        <omgdi:waypoint x="402.0" y="91.0"></omgdi:waypoint>
-        <omgdi:waypoint x="402.0" y="110.0"></omgdi:waypoint>
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">
-        <omgdi:waypoint x="382.0" y="130.0"></omgdi:waypoint>
-        <omgdi:waypoint x="203.0" y="130.0"></omgdi:waypoint>
-        <omgdi:waypoint x="203.0" y="91.0"></omgdi:waypoint>
-        <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="16.0" width="22.0" x="382.0" y="130.0"></omgdc:Bounds>
-        </bpmndi:BPMNLabel>
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge bpmnElement="flow9" id="BPMNEdge_flow9">
-        <omgdi:waypoint x="402.0" y="150.0"></omgdi:waypoint>
-        <omgdi:waypoint x="402.0" y="200.0"></omgdi:waypoint>
-        <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="16.0" width="22.0" x="402.0" y="150.0"></omgdc:Bounds>
-        </bpmndi:BPMNLabel>
-      </bpmndi:BPMNEdge>
-    </bpmndi:BPMNPlane>
-  </bpmndi:BPMNDiagram>
-</definitions>

+ 0 - 69
distributed-print/src/main/resources/processes/JxzyydxPaperApprove.bpmn

@@ -1,69 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
-  <process id="JxzyyPaperApprove" name="JxzyyPaperApprove" isExecutable="true">
-    <startEvent id="startevent1" name="Start"></startEvent>
-    <userTask id="usertask1" name="提交试卷" activiti:assignee="${approveId}"></userTask>
-    <sequenceFlow id="flow1" sourceRef="startevent1" targetRef="usertask1"></sequenceFlow>
-    <endEvent id="endevent1" name="End"></endEvent>
-    <userTask id="usertask2" name="审核试卷">
-      <extensionElements>
-        <activiti:taskListener event="create" class="com.qmth.distributed.print.business.activiti.DirectorApproveByJxzyyListener"></activiti:taskListener>
-      </extensionElements>
-    </userTask>
-    <sequenceFlow id="flow2" sourceRef="usertask1" targetRef="usertask2"></sequenceFlow>
-    <exclusiveGateway id="exclusivegateway1" name="审批"></exclusiveGateway>
-    <sequenceFlow id="flow3" sourceRef="usertask2" targetRef="exclusivegateway1"></sequenceFlow>
-    <sequenceFlow id="flow4" name="通过" sourceRef="exclusivegateway1" targetRef="endevent1">
-      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${approve == 1}]]></conditionExpression>
-    </sequenceFlow>
-    <sequenceFlow id="flow5" name="驳回" sourceRef="exclusivegateway1" targetRef="usertask1">
-      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${approve == 0}]]></conditionExpression>
-    </sequenceFlow>
-  </process>
-  <bpmndi:BPMNDiagram id="BPMNDiagram_JxzyyPaperApprove">
-    <bpmndi:BPMNPlane bpmnElement="JxzyyPaperApprove" id="BPMNPlane_JxzyyPaperApprove">
-      <bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">
-        <omgdc:Bounds height="35.0" width="35.0" x="80.0" y="80.0"></omgdc:Bounds>
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1">
-        <omgdc:Bounds height="55.0" width="105.0" x="160.0" y="70.0"></omgdc:Bounds>
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">
-        <omgdc:Bounds height="35.0" width="35.0" x="345.0" y="270.0"></omgdc:Bounds>
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape bpmnElement="usertask2" id="BPMNShape_usertask2">
-        <omgdc:Bounds height="55.0" width="105.0" x="310.0" y="70.0"></omgdc:Bounds>
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNShape bpmnElement="exclusivegateway1" id="BPMNShape_exclusivegateway1">
-        <omgdc:Bounds height="40.0" width="40.0" x="342.0" y="180.0"></omgdc:Bounds>
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
-        <omgdi:waypoint x="115.0" y="97.0"></omgdi:waypoint>
-        <omgdi:waypoint x="160.0" y="97.0"></omgdi:waypoint>
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
-        <omgdi:waypoint x="265.0" y="97.0"></omgdi:waypoint>
-        <omgdi:waypoint x="310.0" y="97.0"></omgdi:waypoint>
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
-        <omgdi:waypoint x="362.0" y="125.0"></omgdi:waypoint>
-        <omgdi:waypoint x="362.0" y="180.0"></omgdi:waypoint>
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">
-        <omgdi:waypoint x="362.0" y="220.0"></omgdi:waypoint>
-        <omgdi:waypoint x="362.0" y="270.0"></omgdi:waypoint>
-        <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="16.0" width="22.0" x="362.0" y="220.0"></omgdc:Bounds>
-        </bpmndi:BPMNLabel>
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">
-        <omgdi:waypoint x="342.0" y="200.0"></omgdi:waypoint>
-        <omgdi:waypoint x="212.0" y="199.0"></omgdi:waypoint>
-        <omgdi:waypoint x="212.0" y="125.0"></omgdi:waypoint>
-        <bpmndi:BPMNLabel>
-          <omgdc:Bounds height="16.0" width="22.0" x="342.0" y="200.0"></omgdc:Bounds>
-        </bpmndi:BPMNLabel>
-      </bpmndi:BPMNEdge>
-    </bpmndi:BPMNPlane>
-  </bpmndi:BPMNDiagram>
-</definitions>

+ 0 - 13
teachcloud-common/src/main/java/com/qmth/teachcloud/common/contant/SystemConstant.java

@@ -204,13 +204,10 @@ public class SystemConstant {
     /**
      * activiti
      */
-    public static final String PROCESSES = "processes";
     public static final String GDYKDX_FLOW_KEY = "GdykdxPaperApprove";//广药流程key
-    public static final String GDYKDX_SUB_FLOW_KEY = "GdykdxPaperSubPrintApprove";//广药子流程key
     public static final String JXZYY_FLOW_KEY = "JxzyyPaperApprove";//江西流程key
     public static final String APPROVE_ID = "approveId";//审批id
     public static final String FLOW_TYPE = "flowType";//流程类型
-//    public static final String TEACHING_ROOM_ID = "teachingRoomId";//教研室机构id
     public static final String FLOW_ID = "flowId";//流程id
     public static final String FLOW_TASK_ID = "flowTaskId";//流程任务id
     public static final String APPROVE = "approve";//流程审核变量
@@ -219,19 +216,9 @@ public class SystemConstant {
     public static final String APPROVE_REJECT_MAP = "approveRejectMap";//流程审批驳回变量
     public static final String SETUP_MAP = "setupMap";//流程步骤变量
     public static final String APPROVE_SETUP = "approveSetup";//流程节点
-//    public static final String APPROVE_USER_IDS = "approveUserIds";//流程审批人列表
-//    public static final String APPROVE_DIRECTOR_USER_IDS = "approveDirectorUserIds";//流程主任审批人列表
-//    public static final String APPROVE_PRESIDENT_USER_IDS = "approvePresidentUserIds";//流程院长审批人列表
-//    public static final String APPROVE_PRINT_USER_IDS = "approvePrintUserIds";//印刷人员审批人列表
     public static final String APPROVE_OPERATION = "approveOperation";//流程操作
-//    public static final String APPROVE_CANCEL = "cancel";//流程撤销操作
-//    public static final String APPROVE_CANCEL_USER = "approveCancelUserId";//流程撤销用户id操作
-//    public static final Long APPROVE_CANCEL_USER_ID = -1L;//流程撤销用户id操作
-//    public static final String APPROVE_EXCHANGE_USER_ID = "approveExchangeUserId:";//转审审批人列表
     public static final String FLOW_STATUS = "flowStatus";//流程状态
     public static final String APPROVE_REMARK = "approveRemark";//流程审批意见
-//    public static final String APPROVE_PRESIDENT_SYSTEM = "presidentApprove";//流程院长自动审批
-//    public static final String EXAM_TASK_ID = "examTaskId";
     public static final String OBJECT_ID = "objectId";
     public static final String APPROVE_TF_FLOW_LOG = "TFFlowLog";//流程院长自动审批
     public static final String PAPAER_ATTACHMENT_IDS = "paperAttachmentIds";//命题附件ids

+ 0 - 76
teachcloud-common/src/main/java/com/qmth/teachcloud/common/enums/FlowApproveVariableEnum.java

@@ -1,76 +0,0 @@
-//package com.qmth.teachcloud.common.enums;
-//
-//import java.util.Objects;
-//
-///**
-// * @Description: 流程审批变量 enum
-// * @Param:
-// * @return:
-// * @Author: wangliang
-// * @Date: 2021/8/2
-// */
-//public enum FlowApproveVariableEnum {
-//
-//    PRIMARY_APPROVE("一级审核通过", "1"),
-//
-//    PRIMARY_REJECT("一级审核驳回", "0"),
-//
-//    SECOND_APPROVE("二级审核通过", "2"),
-//
-//    SECOND_REJECT_ONE("二级审核驳回至第一节点", "0"),
-//
-//    SECOND_REJECT_TWO("二级审核驳回至第二节点", "1"),
-//
-//    THREE_APPROVE("三级审核通过", "3"),
-//
-//    FOUR_APPROVE("四级审核通过", "1"),
-//
-//    FOUR_REJECT("四级审核驳回", "0");
-//
-//    private String title;
-//
-//    private String id;
-//
-//    private FlowApproveVariableEnum(String title, String id) {
-//        this.title = title;
-//        this.id = id;
-//    }
-//
-//    public String getTitle() {
-//        return title;
-//    }
-//
-//    public String getId() {
-//        return id;
-//    }
-//
-//    /**
-//     * 状态转换 toName
-//     *
-//     * @param title
-//     * @return
-//     */
-//    public static String convertToName(String title) {
-//        for (FlowApproveVariableEnum e : FlowApproveVariableEnum.values()) {
-//            if (Objects.equals(title, e.getTitle())) {
-//                return e.name();
-//            }
-//        }
-//        return null;
-//    }
-//
-//    /**
-//     * 状态转换 toInstance
-//     *
-//     * @param id
-//     * @return
-//     */
-//    public static FlowApproveVariableEnum convertToInstance(String id) {
-//        for (FlowApproveVariableEnum e : FlowApproveVariableEnum.values()) {
-//            if (Objects.equals(id, e.getTitle())) {
-//                return e;
-//            }
-//        }
-//        return null;
-//    }
-//}

+ 7 - 1
teachcloud-common/src/main/resources/mapper/SysUserMapper.xml

@@ -185,7 +185,13 @@
     </select>
 
     <select id="findByIds" resultType="com.qmth.teachcloud.common.bean.params.ApproveUserResult">
-        select group_concat(su.real_name,'(',so.name,')' order by field(su.id,#{ids})) as pendApproveUsers from sys_user su left join sys_org so on so.id = su.org_id
+        select group_concat(su.real_name,'(',so.name,')' order by field(su.id,
+            <if test="ids != null">
+                <foreach collection="ids" item="item" index="index" separator=",">
+                    #{item}
+                </foreach>
+            </if>
+            )) as pendApproveUsers from sys_user su left join sys_org so on so.id = su.org_id
         <where>
             <if test="ids != null">
                 AND su.id IN