瀏覽代碼

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

xiaof 3 年之前
父節點
當前提交
25274fda1c
共有 26 個文件被更改,包括 169 次插入2726 次删除
  1. 0 107
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/activiti/DirectorApproveByJxzyyListener.java
  2. 0 105
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/activiti/DirectorApproveListener.java
  3. 0 109
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/activiti/PresidentApproveListener.java
  4. 0 106
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/activiti/PrintApproveSubListener.java
  5. 0 39
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/activiti/StartApproveSubListener.java
  6. 2 0
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/ExamTaskDetailCardDto.java
  7. 0 170
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/result/FlowApproveResult.java
  8. 12 0
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/result/WorkResult.java
  9. 1 4
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/mapper/ExamTaskReviewLogMapper.java
  10. 0 24
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/mapper/TFFlowApproveLogMapper.java
  11. 0 60
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/mapper/TFFlowMapper.java
  12. 3 83
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/ActivitiService.java
  13. 2 6
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/ExamTaskReviewLogService.java
  14. 0 24
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/TFFlowApproveLogService.java
  15. 0 67
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/TFFlowService.java
  16. 2 976
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ActivitiServiceImpl.java
  17. 8 11
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamTaskReviewLogServiceImpl.java
  18. 26 25
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamTaskServiceImpl.java
  19. 0 35
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/TFFlowApproveLogServiceImpl.java
  20. 0 145
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/TFFlowServiceImpl.java
  21. 4 2
      distributed-print-business/src/main/resources/mapper/ExamTaskMapper.xml
  22. 47 47
      distributed-print-business/src/main/resources/mapper/ExamTaskReviewLogMapper.xml
  23. 62 59
      distributed-print/src/main/java/com/qmth/distributed/print/api/ExamTaskController.java
  24. 0 299
      distributed-print/src/main/java/com/qmth/distributed/print/api/TFFlowController.java
  25. 0 54
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/SysUserService.java
  26. 0 169
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/SysUserServiceImpl.java

+ 0 - 107
distributed-print-business/src/main/java/com/qmth/distributed/print/business/activiti/DirectorApproveByJxzyyListener.java

@@ -1,107 +0,0 @@
-//package com.qmth.distributed.print.business.activiti;
-//
-//import com.google.common.reflect.TypeToken;
-//import com.google.gson.Gson;
-//import com.qmth.distributed.print.business.entity.ExamTask;
-//import com.qmth.distributed.print.business.entity.TFFlowApprove;
-//import com.qmth.distributed.print.business.entity.TFFlowLog;
-//import com.qmth.distributed.print.business.enums.MessageEnum;
-//import com.qmth.distributed.print.business.service.BasicMessageService;
-//import com.qmth.distributed.print.business.service.ExamTaskService;
-//import com.qmth.distributed.print.business.service.TFFlowApproveService;
-//import com.qmth.distributed.print.business.service.TFFlowLogService;
-//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.FlowApproveNameEnum;
-//import com.qmth.teachcloud.common.enums.FlowApproveSetupEnum;
-//import com.qmth.teachcloud.common.enums.FlowStatusEnum;
-//import com.qmth.teachcloud.common.service.SysUserService;
-//import com.qmth.teachcloud.common.util.JacksonUtil;
-//import org.activiti.bpmn.model.BpmnModel;
-//import org.activiti.bpmn.model.FlowNode;
-//import org.activiti.bpmn.model.UserTask;
-//import org.activiti.engine.RepositoryService;
-//import org.activiti.engine.delegate.DelegateTask;
-//import org.activiti.engine.delegate.TaskListener;
-//import org.slf4j.Logger;
-//import org.slf4j.LoggerFactory;
-//
-//import java.util.ArrayList;
-//import java.util.List;
-//import java.util.Objects;
-//import java.util.stream.Collectors;
-//
-///**
-// * @Description: 教研室主任审批
-// * @Param:
-// * @return:
-// * @Author: wangliang
-// * @Date: 2021/11/10
-// */
-//public class DirectorApproveByJxzyyListener implements TaskListener {
-//    private final static Logger log = LoggerFactory.getLogger(DirectorApproveByJxzyyListener.class);
-//
-//    /**
-//     * 查找同级和以上人员
-//     *
-//     * @param delegateTask
-//     */
-//    @Override
-//    public void notify(DelegateTask delegateTask) {
-//        SysUserService sysUserService = SpringContextHolder.getBean(SysUserService.class);
-//        ExamTaskService examTaskService = SpringContextHolder.getBean(ExamTaskService.class);
-//        BasicMessageService basicMessageService = SpringContextHolder.getBean(BasicMessageService.class);
-//        TFFlowApproveService tfFlowApproveService = SpringContextHolder.getBean(TFFlowApproveService.class);
-//        TFFlowLogService tfFlowLogService = SpringContextHolder.getBean(TFFlowLogService.class);
-//        RepositoryService repositoryService = SpringContextHolder.getBean(RepositoryService.class);
-//
-//        List<Long> approveUserIds = (List<Long>) delegateTask.getVariable(SystemConstant.APPROVE_DIRECTOR_USER_IDS);
-//        Long flowId = SystemConstant.convertIdToLong(delegateTask.getProcessInstanceId());
-//        ExamTask examTask = examTaskService.findByFlowId(flowId);
-//        TFFlowApprove tfFlowApprove = tfFlowApproveService.findByFlowId(flowId, examTask.getSchoolId());
-//        TFFlowLog tfFlowLog = (TFFlowLog) delegateTask.getVariable(SystemConstant.APPROVE_TF_FLOW_LOG);
-//
-//        String currActivityId = delegateTask.getTaskDefinitionKey();
-//        BpmnModel bpmnModel = repositoryService.getBpmnModel(delegateTask.getProcessDefinitionId());
-//        FlowNode currFlow = (UserTask) bpmnModel.getMainProcess().getFlowElement(currActivityId);
-//        UserTask userTask = (UserTask) currFlow;
-//        String approveExchangeUserId = (String) delegateTask.getVariable(SystemConstant.APPROVE_EXCHANGE_USER_ID + userTask.getId());
-//        List<ApproveUserResult> sysUserList = new ArrayList<>();
-//
-//        if (tfFlowApprove.getStatus() == FlowStatusEnum.REJECT && Objects.nonNull(approveExchangeUserId)) {
-//            sysUserList.addAll(sysUserService.findById(Long.parseLong(approveExchangeUserId)));
-//            delegateTask.addCandidateUsers(sysUserList.stream().map(s -> String.valueOf(s.getId())).collect(Collectors.toList()));
-//            tfFlowLog.setPendApproveId(approveExchangeUserId);
-//        } else {
-//            if (Objects.nonNull(approveUserIds) && approveUserIds.size() > 0) {
-//                List<SysUser> sysUsers = sysUserService.listByIds(approveUserIds);
-//                sysUserList = new Gson().fromJson(JacksonUtil.parseJson(sysUsers), new TypeToken<List<ApproveUserResult>>() {
-//                }.getType());
-//                List<String> userIdList = approveUserIds.stream().map(x -> String.valueOf(x)).collect(Collectors.toList());
-//                delegateTask.addCandidateUsers(userIdList);
-//                tfFlowLog.setPendApproveId(String.join(", ", userIdList));
-//            } else {
-//                sysUserList = sysUserService.findByJxzyyDirectorApprove(null, FlowApproveNameEnum.DIRECTOR);
-//                if (Objects.nonNull(sysUserList) && sysUserList.size() > 0) {
-//                    List<String> ids = sysUserList.stream().map(s -> String.valueOf(s.getId())).collect(Collectors.toList());
-//                    //添加或签的人员,一人通过即可进入下一环节
-//                    delegateTask.addCandidateUsers(ids);
-//                    tfFlowLog.setPendApproveId(String.join(", ", ids));
-//                }
-//            }
-//        }
-//        tfFlowLogService.updateById(tfFlowLog);
-//
-//        // 发送审核短信
-//        if (tfFlowApprove.getStatus().equals(FlowStatusEnum.AUDITING)
-//                && tfFlowApprove.getSetup().equals(FlowApproveSetupEnum.PRIMARY_APPROVE.getSetup())) {
-//            basicMessageService.sendNoticeTaskAuditFlow(examTask, sysUserList, MessageEnum.NOTICE_OF_AUDIT_CREATED);
-//        }// 驳回短信(驳回给主任)
-//        else if (tfFlowApprove.getStatus().equals(FlowStatusEnum.REJECT)
-//                && tfFlowApprove.getSetup().equals(FlowApproveSetupEnum.PRIMARY_APPROVE.getSetup())) {
-//            basicMessageService.sendNoticeTaskAuditFlow(examTask, sysUserList, MessageEnum.NOTICE_OF_AUDIT_REJECT);
-//        }
-//    }
-//}

+ 0 - 105
distributed-print-business/src/main/java/com/qmth/distributed/print/business/activiti/DirectorApproveListener.java

@@ -1,105 +0,0 @@
-//package com.qmth.distributed.print.business.activiti;
-//
-//import com.google.common.reflect.TypeToken;
-//import com.google.gson.Gson;
-//import com.qmth.distributed.print.business.entity.ExamTask;
-//import com.qmth.distributed.print.business.entity.TFFlowApprove;
-//import com.qmth.distributed.print.business.entity.TFFlowLog;
-//import com.qmth.distributed.print.business.enums.MessageEnum;
-//import com.qmth.distributed.print.business.service.BasicMessageService;
-//import com.qmth.distributed.print.business.service.ExamTaskService;
-//import com.qmth.distributed.print.business.service.TFFlowApproveService;
-//import com.qmth.distributed.print.business.service.TFFlowLogService;
-//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.FlowApproveSetupEnum;
-//import com.qmth.teachcloud.common.enums.FlowStatusEnum;
-//import com.qmth.teachcloud.common.service.SysUserService;
-//import com.qmth.teachcloud.common.util.JacksonUtil;
-//import org.activiti.bpmn.model.BpmnModel;
-//import org.activiti.bpmn.model.FlowNode;
-//import org.activiti.bpmn.model.UserTask;
-//import org.activiti.engine.RepositoryService;
-//import org.activiti.engine.delegate.DelegateTask;
-//import org.activiti.engine.delegate.TaskListener;
-//import org.slf4j.Logger;
-//import org.slf4j.LoggerFactory;
-//
-//import java.util.ArrayList;
-//import java.util.List;
-//import java.util.Objects;
-//import java.util.stream.Collectors;
-//
-///**
-// * @Description: 教研室主任审批
-// * @Param:
-// * @return:
-// * @Author: wangliang
-// * @Date: 2021/7/29
-// */
-//public class DirectorApproveListener implements TaskListener {
-//    private final static Logger log = LoggerFactory.getLogger(DirectorApproveListener.class);
-//
-//    /**
-//     * 查找同级和以下人员
-//     *
-//     * @param delegateTask
-//     */
-//    @Override
-//    public void notify(DelegateTask delegateTask) {
-//        SysUserService sysUserService = SpringContextHolder.getBean(SysUserService.class);
-//        ExamTaskService examTaskService = SpringContextHolder.getBean(ExamTaskService.class);
-//        BasicMessageService basicMessageService = SpringContextHolder.getBean(BasicMessageService.class);
-//        TFFlowApproveService tfFlowApproveService = SpringContextHolder.getBean(TFFlowApproveService.class);
-//        TFFlowLogService tfFlowLogService = SpringContextHolder.getBean(TFFlowLogService.class);
-//        RepositoryService repositoryService = SpringContextHolder.getBean(RepositoryService.class);
-//
-//        Long flowId = SystemConstant.convertIdToLong(delegateTask.getProcessInstanceId());
-//        ExamTask examTask = examTaskService.findByFlowId(flowId);
-//        TFFlowApprove tfFlowApprove = tfFlowApproveService.findByFlowId(flowId, examTask.getSchoolId());
-//        TFFlowLog tfFlowLog = (TFFlowLog) delegateTask.getVariable(SystemConstant.APPROVE_TF_FLOW_LOG);
-//
-//        List<Long> approveUserIds = (List<Long>) delegateTask.getVariable(SystemConstant.APPROVE_DIRECTOR_USER_IDS);
-//        String currActivityId = delegateTask.getTaskDefinitionKey();
-//        BpmnModel bpmnModel = repositoryService.getBpmnModel(delegateTask.getProcessDefinitionId());
-//        FlowNode currFlow = (FlowNode) bpmnModel.getMainProcess().getFlowElement(currActivityId);
-//        UserTask userTask = (UserTask) currFlow;
-//        String approveExchangeUserId = (String) delegateTask.getVariable(SystemConstant.APPROVE_EXCHANGE_USER_ID + userTask.getId());
-//        List<ApproveUserResult> sysUserList = new ArrayList<>();
-//        if (tfFlowApprove.getStatus() == FlowStatusEnum.REJECT && Objects.nonNull(approveExchangeUserId)) {
-//            sysUserList.addAll(sysUserService.findById(Long.parseLong(approveExchangeUserId)));
-//            delegateTask.addCandidateUsers(sysUserList.stream().map(s -> String.valueOf(s.getId())).collect(Collectors.toList()));
-//            tfFlowLog.setPendApproveId(approveExchangeUserId);
-//        } else {
-//            if (Objects.nonNull(approveUserIds) && approveUserIds.size() > 0) {
-//                List<SysUser> sysUsers = sysUserService.listByIds(approveUserIds);
-//                sysUserList = new Gson().fromJson(JacksonUtil.parseJson(sysUsers), new TypeToken<List<ApproveUserResult>>() {
-//                }.getType());
-//                List<String> userIdList = approveUserIds.stream().map(x -> String.valueOf(x)).collect(Collectors.toList());
-//                delegateTask.addCandidateUsers(userIdList);
-//                tfFlowLog.setPendApproveId(String.join(", ", userIdList));
-//            } else {
-//                sysUserList = sysUserService.findByDirectorApprove(examTask.getCourseCode(), null);
-//                if (Objects.nonNull(sysUserList) && sysUserList.size() > 0) {
-//                    List<String> ids = sysUserList.stream().map(s -> String.valueOf(s.getId())).collect(Collectors.toList());
-//                    //添加或签的人员,一人通过即可进入下一环节
-//                    delegateTask.addCandidateUsers(ids);
-//                    tfFlowLog.setPendApproveId(String.join(", ", ids));
-//                }
-//            }
-//        }
-//        tfFlowLogService.updateById(tfFlowLog);
-//
-//        // 发送审核短信
-//        if (tfFlowApprove.getStatus().equals(FlowStatusEnum.AUDITING)
-//                && tfFlowApprove.getSetup().equals(FlowApproveSetupEnum.PRIMARY_APPROVE.getSetup())) {
-//            basicMessageService.sendNoticeTaskAuditFlow(examTask, sysUserList, MessageEnum.NOTICE_OF_AUDIT_CREATED);
-//        }// 驳回短信(驳回给主任)
-//        else if (tfFlowApprove.getStatus().equals(FlowStatusEnum.REJECT)
-//                && tfFlowApprove.getSetup().equals(FlowApproveSetupEnum.PRIMARY_APPROVE.getSetup())) {
-//            basicMessageService.sendNoticeTaskAuditFlow(examTask, sysUserList, MessageEnum.NOTICE_OF_AUDIT_REJECT);
-//        }
-//    }
-//}

+ 0 - 109
distributed-print-business/src/main/java/com/qmth/distributed/print/business/activiti/PresidentApproveListener.java

@@ -1,109 +0,0 @@
-//package com.qmth.distributed.print.business.activiti;
-//
-//import com.google.common.reflect.TypeToken;
-//import com.google.gson.Gson;
-//import com.qmth.distributed.print.business.entity.ExamTask;
-//import com.qmth.distributed.print.business.entity.TFFlowApprove;
-//import com.qmth.distributed.print.business.entity.TFFlowLog;
-//import com.qmth.distributed.print.business.enums.MessageEnum;
-//import com.qmth.distributed.print.business.service.BasicMessageService;
-//import com.qmth.distributed.print.business.service.ExamTaskService;
-//import com.qmth.distributed.print.business.service.TFFlowApproveService;
-//import com.qmth.distributed.print.business.service.TFFlowLogService;
-//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.FlowApproveSetupEnum;
-//import com.qmth.teachcloud.common.enums.FlowStatusEnum;
-//import com.qmth.teachcloud.common.service.SysUserService;
-//import com.qmth.teachcloud.common.util.JacksonUtil;
-//import com.qmth.teachcloud.common.util.ServletUtil;
-//import org.activiti.bpmn.model.BpmnModel;
-//import org.activiti.bpmn.model.FlowNode;
-//import org.activiti.bpmn.model.UserTask;
-//import org.activiti.engine.RepositoryService;
-//import org.activiti.engine.delegate.DelegateTask;
-//import org.activiti.engine.delegate.TaskListener;
-//import org.slf4j.Logger;
-//import org.slf4j.LoggerFactory;
-//
-//import java.util.ArrayList;
-//import java.util.Arrays;
-//import java.util.List;
-//import java.util.Objects;
-//import java.util.stream.Collectors;
-//
-///**
-// * @Description: 教学院长审批
-// * @Param:
-// * @return:
-// * @Author: wangliang
-// * @Date: 2021/7/29
-// */
-//public class PresidentApproveListener implements TaskListener {
-//    private final static Logger log = LoggerFactory.getLogger(PresidentApproveListener.class);
-//
-//    /**
-//     * 查找同级和以上人员
-//     *
-//     * @param delegateTask
-//     */
-//    @Override
-//    public void notify(DelegateTask delegateTask) {
-//        SysUserService sysUserService = SpringContextHolder.getBean(SysUserService.class);
-//        ExamTaskService examTaskService = SpringContextHolder.getBean(ExamTaskService.class);
-//        BasicMessageService basicMessageService = SpringContextHolder.getBean(BasicMessageService.class);
-//        TFFlowApproveService tfFlowApproveService = SpringContextHolder.getBean(TFFlowApproveService.class);
-//        TFFlowLogService tfFlowLogService = SpringContextHolder.getBean(TFFlowLogService.class);
-//        RepositoryService repositoryService = SpringContextHolder.getBean(RepositoryService.class);
-//
-//        Long flowId = SystemConstant.convertIdToLong(delegateTask.getProcessInstanceId());
-//        ExamTask examTask = examTaskService.findByFlowId(flowId);
-//        TFFlowApprove tfFlowApprove = tfFlowApproveService.findByFlowId(flowId, examTask.getSchoolId());
-//        TFFlowLog tfFlowLog = (TFFlowLog) delegateTask.getVariable(SystemConstant.APPROVE_TF_FLOW_LOG);
-//
-//        List<Long> approveUserIds = (List<Long>) delegateTask.getVariable(SystemConstant.APPROVE_PRESIDENT_USER_IDS);
-//        String currActivityId = delegateTask.getTaskDefinitionKey();
-//        BpmnModel bpmnModel = repositoryService.getBpmnModel(delegateTask.getProcessDefinitionId());
-//        FlowNode currFlow = (FlowNode) bpmnModel.getMainProcess().getFlowElement(currActivityId);
-//        UserTask userTask = (UserTask) currFlow;
-//        String approveExchangeUserId = (String) delegateTask.getVariable(SystemConstant.APPROVE_EXCHANGE_USER_ID + userTask.getId());
-//
-//        List<ApproveUserResult> sysUserList = new ArrayList<>();
-//        if (tfFlowApprove.getStatus() == FlowStatusEnum.REJECT && Objects.nonNull(approveExchangeUserId)) {
-//            sysUserList.addAll(sysUserService.findById(Long.parseLong(approveExchangeUserId)));
-//            delegateTask.addCandidateUsers(sysUserList.stream().map(s -> String.valueOf(s.getId())).collect(Collectors.toList()));
-//            tfFlowLog.setPendApproveId(approveExchangeUserId);
-//        } else {
-//            if (Objects.nonNull(approveUserIds) && approveUserIds.size() > 0) {
-//                List<SysUser> sysUsers = sysUserService.listByIds(approveUserIds);
-//                sysUserList = new Gson().fromJson(JacksonUtil.parseJson(sysUsers), new TypeToken<List<ApproveUserResult>>() {
-//                }.getType());
-//                List<String> userIdList = approveUserIds.stream().map(x -> String.valueOf(x)).collect(Collectors.toList());
-//                delegateTask.addCandidateUsers(userIdList);
-//                tfFlowLog.setPendApproveId(String.join(", ", userIdList));
-//            } else {
-//                SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
-//                if (Objects.isNull(sysUser.getOrgId())) {
-//                    throw ExceptionResultEnum.ERROR.exception("审批人机构为空");
-//                }
-//                sysUserList = sysUserService.findByPresidentApprove(Arrays.asList(sysUser.getOrgId()), null);
-//                if (Objects.nonNull(sysUserList) && sysUserList.size() > 0) {
-//                    List<String> ids = sysUserList.stream().map(s -> String.valueOf(s.getId())).collect(Collectors.toList());
-//                    //添加或签的人员,一人通过即可进入下一环节
-//                    delegateTask.addCandidateUsers(ids);
-//                    tfFlowLog.setPendApproveId(String.join(", ", ids));
-//                }
-//            }
-//        }
-//        tfFlowLogService.updateById(tfFlowLog);
-//
-//        // 发送审核短信
-//        if (tfFlowApprove.getStatus().equals(FlowStatusEnum.AUDITING)
-//                && tfFlowApprove.getSetup().equals(FlowApproveSetupEnum.SECOND_APPROVE.getSetup())) {
-//            basicMessageService.sendNoticeTaskAuditFlow(examTask, sysUserList, MessageEnum.NOTICE_OF_AUDIT_CREATED);
-//        }
-//    }
-//}

+ 0 - 106
distributed-print-business/src/main/java/com/qmth/distributed/print/business/activiti/PrintApproveSubListener.java

@@ -1,106 +0,0 @@
-//package com.qmth.distributed.print.business.activiti;
-//
-//import com.google.common.reflect.TypeToken;
-//import com.google.gson.Gson;
-//import com.qmth.distributed.print.business.entity.ExamTask;
-//import com.qmth.distributed.print.business.entity.TFFlowApprove;
-//import com.qmth.distributed.print.business.entity.TFFlowLog;
-//import com.qmth.distributed.print.business.enums.MessageEnum;
-//import com.qmth.distributed.print.business.service.*;
-//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.FlowApproveSetupEnum;
-//import com.qmth.teachcloud.common.enums.FlowStatusEnum;
-//import com.qmth.teachcloud.common.service.SysUserService;
-//import com.qmth.teachcloud.common.util.JacksonUtil;
-//import com.qmth.teachcloud.common.util.ServletUtil;
-//import org.activiti.bpmn.model.BpmnModel;
-//import org.activiti.bpmn.model.FlowNode;
-//import org.activiti.bpmn.model.UserTask;
-//import org.activiti.engine.RepositoryService;
-//import org.activiti.engine.delegate.DelegateTask;
-//import org.activiti.engine.delegate.TaskListener;
-//import org.slf4j.Logger;
-//import org.slf4j.LoggerFactory;
-//
-//import java.util.ArrayList;
-//import java.util.List;
-//import java.util.Objects;
-//import java.util.stream.Collectors;
-//
-///**
-// * @Description: 印刷人员审批(子流程)
-// * @Param:
-// * @return:
-// * @Author: wangliang
-// * @Date: 2021/11/19
-// */
-//public class PrintApproveSubListener implements TaskListener {
-//    private final static Logger log = LoggerFactory.getLogger(PrintApproveSubListener.class);
-//
-//    /**
-//     * 查找印刷人员
-//     *
-//     * @param delegateTask
-//     */
-//    @Override
-//    public void notify(DelegateTask delegateTask) {
-//        SysUserService sysUserService = SpringContextHolder.getBean(SysUserService.class);
-//        ExamTaskService examTaskService = SpringContextHolder.getBean(ExamTaskService.class);
-//        BasicMessageService basicMessageService = SpringContextHolder.getBean(BasicMessageService.class);
-//        TFFlowApproveService tfFlowApproveService = SpringContextHolder.getBean(TFFlowApproveService.class);
-//        ActivitiService activitiService = SpringContextHolder.getBean(ActivitiService.class);
-//        TFFlowLogService tfFlowLogService = SpringContextHolder.getBean(TFFlowLogService.class);
-//        RepositoryService repositoryService = SpringContextHolder.getBean(RepositoryService.class);
-//
-//        Long flowId = SystemConstant.convertIdToLong(delegateTask.getProcessInstanceId());
-//        ExamTask examTask = examTaskService.findByFlowId(flowId);
-//        TFFlowApprove tfFlowApprove = tfFlowApproveService.findByFlowId(flowId, examTask.getSchoolId());
-//        TFFlowLog tfFlowLog = (TFFlowLog) delegateTask.getVariable(SystemConstant.APPROVE_TF_FLOW_LOG);
-//
-//        List<Long> approveUserIds = (List<Long>) delegateTask.getVariable(SystemConstant.APPROVE_PRINT_USER_IDS);
-//        String currActivityId = delegateTask.getTaskDefinitionKey();
-//        BpmnModel bpmnModel = repositoryService.getBpmnModel(delegateTask.getProcessDefinitionId());
-//        FlowNode currFlow = (FlowNode) bpmnModel.getMainProcess().getFlowElement(currActivityId);
-//        UserTask userTask = (UserTask) currFlow;
-//        String approveExchangeUserId = (String) delegateTask.getVariable(SystemConstant.APPROVE_EXCHANGE_USER_ID + userTask.getId());
-//
-//        List<ApproveUserResult> sysUserList = new ArrayList<>();
-//        if (tfFlowApprove.getStatus() == FlowStatusEnum.REJECT && Objects.nonNull(approveExchangeUserId)) {
-//            sysUserList.addAll(sysUserService.findById(Long.parseLong(approveExchangeUserId)));
-//            delegateTask.addCandidateUsers(sysUserList.stream().map(s -> String.valueOf(s.getId())).collect(Collectors.toList()));
-//            tfFlowLog.setPendApproveId(approveExchangeUserId);
-//        } else {
-//            if (Objects.nonNull(approveUserIds) && approveUserIds.size() > 0) {
-//                List<SysUser> sysUsers = sysUserService.listByIds(approveUserIds);
-//                sysUserList = new Gson().fromJson(JacksonUtil.parseJson(sysUsers), new TypeToken<List<ApproveUserResult>>() {
-//                }.getType());
-//                List<String> userIdList = approveUserIds.stream().map(x -> String.valueOf(x)).collect(Collectors.toList());
-//                delegateTask.addCandidateUsers(userIdList);
-//                tfFlowLog.setPendApproveId(String.join(", ", userIdList));
-//            } else {
-//                SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
-//                if (Objects.isNull(sysUser.getOrgId())) {
-//                    throw ExceptionResultEnum.ERROR.exception("审批人机构为空");
-//                }
-//                sysUserList = activitiService.findByPrintApprove(flowId);
-//                if (Objects.nonNull(sysUserList) && sysUserList.size() > 0) {
-//                    List<String> ids = sysUserList.stream().map(s -> String.valueOf(s.getId())).collect(Collectors.toList());
-//                    //添加或签的人员,一人通过即可进入下一环节
-//                    delegateTask.addCandidateUsers(ids);
-//                    tfFlowLog.setPendApproveId(String.join(", ", ids));
-//                }
-//            }
-//        }
-//        tfFlowLogService.updateById(tfFlowLog);
-//
-//        // 发送审核短信
-//        if (tfFlowApprove.getStatus().equals(FlowStatusEnum.AUDITING)
-//                && tfFlowApprove.getSetup().equals(FlowApproveSetupEnum.FOUR_APPROVE.getSetup())) {
-//            basicMessageService.sendNoticeTaskAuditFlow(examTask, sysUserList, MessageEnum.NOTICE_OF_AUDIT_CREATED);
-//        }
-//    }
-//}

+ 0 - 39
distributed-print-business/src/main/java/com/qmth/distributed/print/business/activiti/StartApproveSubListener.java

@@ -1,39 +0,0 @@
-//package com.qmth.distributed.print.business.activiti;
-//
-//import com.qmth.distributed.print.business.entity.ExamTask;
-//import com.qmth.distributed.print.business.service.ExamTaskService;
-//import com.qmth.distributed.print.business.service.TExamTaskFlowService;
-//import com.qmth.teachcloud.common.contant.SpringContextHolder;
-//import com.qmth.teachcloud.common.contant.SystemConstant;
-//import org.activiti.engine.delegate.DelegateExecution;
-//import org.activiti.engine.delegate.ExecutionListener;
-//import org.slf4j.Logger;
-//import org.slf4j.LoggerFactory;
-//import org.springframework.transaction.annotation.Transactional;
-//
-//import java.util.HashMap;
-//import java.util.Map;
-//
-///**
-// * @Description: 子流程启动监听
-// * @Param:
-// * @return:
-// * @Author: wangliang
-// * @Date: 2021/11/19
-// */
-//public class StartApproveSubListener implements ExecutionListener {
-//    private final static Logger log = LoggerFactory.getLogger(StartApproveSubListener.class);
-//
-//    @Override
-//    @Transactional
-//    public void notify(DelegateExecution delegateExecution) {
-//        ExamTaskService examTaskService = SpringContextHolder.getBean(ExamTaskService.class);
-//        TExamTaskFlowService tExamTaskFlowService = SpringContextHolder.getBean(TExamTaskFlowService.class);
-//        ExamTask examTask = examTaskService.findByFlowId(SystemConstant.convertIdToLong(delegateExecution.getRootProcessInstanceId()));
-//        Map<String, Object> texamTaskFlowMap = new HashMap<>();
-//        texamTaskFlowMap.computeIfAbsent(SystemConstant.SCHOOL_ID, v -> examTask.getSchoolId());
-//        texamTaskFlowMap.computeIfAbsent(SystemConstant.EXAM_TASK_ID, v -> examTask.getId());
-//        texamTaskFlowMap.computeIfAbsent(SystemConstant.FLOW_ID, v -> SystemConstant.convertIdToLong(delegateExecution.getProcessInstanceId()));
-//        tExamTaskFlowService.saveOrUpdate(texamTaskFlowMap);
-//    }
-//}

+ 2 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/ExamTaskDetailCardDto.java

@@ -2,6 +2,8 @@ package com.qmth.distributed.print.business.bean.dto;
 
 import io.swagger.annotations.ApiModelProperty;
 
+import java.util.List;
+
 /**
  * @Date: 2021/3/31.
  */

+ 0 - 170
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/result/FlowApproveResult.java

@@ -1,170 +0,0 @@
-//package com.qmth.distributed.print.business.bean.result;
-//
-//import com.fasterxml.jackson.annotation.JsonInclude;
-//import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-//import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
-//import com.qmth.distributed.print.business.entity.TFFlowApproveLog;
-//import com.qmth.teachcloud.common.enums.FlowApproveSetupEnum;
-//import com.qmth.teachcloud.common.enums.FlowStatusEnum;
-//import io.swagger.annotations.ApiModelProperty;
-//
-//import java.io.Serializable;
-//import java.util.Objects;
-//
-///**
-// * @Description: 流程审批列表result
-// * @Param:
-// * @return:
-// * @Author: wangliang
-// * @Date: 2021/8/5
-// */
-//@JsonInclude(JsonInclude.Include.NON_NULL)
-//public class FlowApproveResult extends TFFlowApproveLog implements Serializable {
-//
-//    @ApiModelProperty(value = "发起人名称")
-//    private String startName;
-//
-//    @ApiModelProperty(value = "一级审核人名称")
-//    private String primaryApproveName;
-//
-//    @ApiModelProperty(value = "二级审核人名称")
-//    private String secondApproveName;
-//
-//    @ApiModelProperty(value = "三级审核人名称")
-//    private String threeApproveName;
-//
-//    @ApiModelProperty(value = "四级审核人名称")
-//    private String fourApproveName;
-//
-//    @ApiModelProperty(value = "流程状态")
-//    private FlowStatusEnum status;
-//
-//    @ApiModelProperty(value = "流程状态")
-//    private String statusStr;
-//
-//    @ApiModelProperty(value = "当前节点")
-//    private int setup;
-//
-//    @ApiModelProperty(value = "当前节点")
-//    private String setupStr;
-//
-//    @ApiModelProperty(value = "当前处理人")
-//    private String currentApproveUserName;
-//
-//    @ApiModelProperty(value = "科目代码")
-//    private String courseCode;
-//
-//    @ApiModelProperty(value = "科目名称")
-//    private String courseName;
-//
-//    @ApiModelProperty(value = "试卷编号")
-//    private String paperNumber;
-//
-//    public String getThreeApproveName() {
-//        return threeApproveName;
-//    }
-//
-//    public void setThreeApproveName(String threeApproveName) {
-//        this.threeApproveName = threeApproveName;
-//    }
-//
-//    public String getFourApproveName() {
-//        return fourApproveName;
-//    }
-//
-//    public void setFourApproveName(String fourApproveName) {
-//        this.fourApproveName = fourApproveName;
-//    }
-//
-//    public FlowStatusEnum getStatus() {
-//        return status;
-//    }
-//
-//    public void setStatus(FlowStatusEnum status) {
-//        this.status = status;
-//    }
-//
-//    public String getStartName() {
-//        return startName;
-//    }
-//
-//    public void setStartName(String startName) {
-//        this.startName = startName;
-//    }
-//
-//    public String getPrimaryApproveName() {
-//        return primaryApproveName;
-//    }
-//
-//    public void setPrimaryApproveName(String primaryApproveName) {
-//        this.primaryApproveName = primaryApproveName;
-//    }
-//
-//    public String getSecondApproveName() {
-//        return secondApproveName;
-//    }
-//
-//    public void setSecondApproveName(String secondApproveName) {
-//        this.secondApproveName = secondApproveName;
-//    }
-//
-//    public String getStatusStr() {
-//        if (Objects.nonNull(status)) {
-//            return status.getTitle();
-//        } else {
-//            return statusStr;
-//        }
-//    }
-//
-//    public void setStatusStr(String statusStr) {
-//        this.statusStr = statusStr;
-//    }
-//
-//    public int getSetup() {
-//        return setup;
-//    }
-//
-//    public void setSetup(int setup) {
-//        this.setup = setup;
-//    }
-//
-//    public String getSetupStr() {
-//        return setupStr;
-//    }
-//
-//    public void setSetupStr(String setupStr) {
-//        this.setupStr = setupStr;
-//    }
-//
-//    public String getCurrentApproveUserName() {
-//        return currentApproveUserName;
-//    }
-//
-//    public void setCurrentApproveUserName(String currentApproveUserName) {
-//        this.currentApproveUserName = currentApproveUserName;
-//    }
-//
-//    public String getCourseCode() {
-//        return courseCode;
-//    }
-//
-//    public void setCourseCode(String courseCode) {
-//        this.courseCode = courseCode;
-//    }
-//
-//    public String getCourseName() {
-//        return courseName;
-//    }
-//
-//    public void setCourseName(String courseName) {
-//        this.courseName = courseName;
-//    }
-//
-//    public String getPaperNumber() {
-//        return paperNumber;
-//    }
-//
-//    public void setPaperNumber(String paperNumber) {
-//        this.paperNumber = paperNumber;
-//    }
-//}

+ 12 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/result/WorkResult.java

@@ -113,6 +113,18 @@ public class WorkResult implements Serializable {
     @ApiModelProperty(value = "审核状态")
     String auditStatus;
 
+    @ApiModelProperty(value = "考试id")
+    @JsonSerialize(using = ToStringSerializer.class)
+    Long examId;
+
+    public Long getExamId() {
+        return examId;
+    }
+
+    public void setExamId(Long examId) {
+        this.examId = examId;
+    }
+
     public String getStatusStr() {
         if (Objects.nonNull(status)) {
             return status.getTitle();

+ 1 - 4
distributed-print-business/src/main/java/com/qmth/distributed/print/business/mapper/ExamTaskReviewLogMapper.java

@@ -2,12 +2,9 @@ package com.qmth.distributed.print.business.mapper;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.qmth.distributed.print.business.bean.dto.approvalForm.ApprovalInfo;
-import com.qmth.distributed.print.business.bean.dto.ReviewLogDto;
 import com.qmth.distributed.print.business.entity.ExamTaskReviewLog;
 import org.apache.ibatis.annotations.Param;
 
-import java.util.List;
-
 /**
  * <p>
  * 命题任务审核日志表 Mapper 接口
@@ -18,7 +15,7 @@ import java.util.List;
  */
 public interface ExamTaskReviewLogMapper extends BaseMapper<ExamTaskReviewLog> {
 
-    List<ReviewLogDto> list(@Param("flowId") Long flowId);
+//    List<ReviewLogDto> list(@Param("flowId") Long flowId);
 
     ApprovalInfo findOnePassBySetUp(@Param("flowId") Long flowId, @Param("setup") int setup);
 }

+ 0 - 24
distributed-print-business/src/main/java/com/qmth/distributed/print/business/mapper/TFFlowApproveLogMapper.java

@@ -1,24 +0,0 @@
-//package com.qmth.distributed.print.business.mapper;
-//
-//import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-//import com.qmth.distributed.print.business.entity.TFFlowApproveLog;
-//import org.apache.ibatis.annotations.Param;
-//
-///**
-// * <p>
-// * 流程审批记录 Mapper 接口
-// * </p>
-// *
-// * @author wangliang
-// * @since 2021-08-05
-// */
-//public interface TFFlowApproveLogMapper extends BaseMapper<TFFlowApproveLog> {
-//
-//    /**
-//     * 根据流程id查询流程状态
-//     *
-//     * @param flowId
-//     * @return
-//     */
-//    TFFlowApproveLog findByFlowId(@Param("flowId") Long flowId);
-//}

+ 0 - 60
distributed-print-business/src/main/java/com/qmth/distributed/print/business/mapper/TFFlowMapper.java

@@ -1,60 +0,0 @@
-//package com.qmth.distributed.print.business.mapper;
-//
-//import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-//import com.baomidou.mybatisplus.core.metadata.IPage;
-//import com.qmth.distributed.print.business.bean.result.FlowApproveResult;
-//import com.qmth.distributed.print.business.entity.TFFlow;
-//import org.apache.ibatis.annotations.Param;
-//
-//import java.util.Map;
-//
-///**
-// * <p>
-// * 流程表 Mapper 接口
-// * </p>
-// *
-// * @author wangliang
-// * @since 2021-08-02
-// */
-//public interface TFFlowMapper extends BaseMapper<TFFlow> {
-//
-//    /**
-//     * 流程列表
-//     *
-//     * @param iPage
-//     * @param name
-//     * @param schoolId
-//     * @param orgId
-//     * @return
-//     */
-//    IPage<TFFlow> list(IPage<Map> iPage, @Param("name") String name, @Param("schoolId") Long schoolId, @Param("orgId") Long orgId);
-//
-//    /**
-//     * 流程审批记录列表
-//     *
-//     * @param iPage
-//     * @param startName
-//     * @param schoolId
-//     * @param orgId
-//     * @param flowId
-//     * @return
-//     */
-//    IPage<FlowApproveResult> flowApproveList(IPage<Map> iPage, @Param("status") String status, @Param("startName") String startName, @Param("teachingRoomId") Long teachingRoomId, @Param("createStartTime") Long createStartTime, @Param("createEndTime") Long createEndTime, @Param("schoolId") Long schoolId, @Param("orgId") Long orgId, @Param("flowId") Long flowId);
-//
-//    /**
-//     * 流程审批记录找人
-//     *
-//     * @param schoolId
-//     * @param flowId
-//     * @return
-//     */
-//    FlowApproveResult flowApproveUserList(@Param("schoolId") Long schoolId, @Param("flowId") Long flowId);
-//
-//    /**
-//     * 根据key查找id
-//     *
-//     * @param flowKey
-//     * @return
-//     */
-//    public String findActIdByFlowKey(@Param("flowKey") String flowKey);
-//}

+ 3 - 83
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/ActivitiService.java

@@ -1,10 +1,10 @@
 package com.qmth.distributed.print.business.service;
 
 import com.qmth.distributed.print.business.bean.flow.CustomFlowSaveDto;
-import com.qmth.distributed.print.business.bean.flow.CustomFlowVarDto;
-import com.qmth.distributed.print.business.bean.result.*;
+import com.qmth.distributed.print.business.bean.result.FlowTaskResult;
+import com.qmth.distributed.print.business.bean.result.FlowViewResult;
+import com.qmth.distributed.print.business.bean.result.TaskInfoResult;
 import com.qmth.distributed.print.business.enums.TFCustomTypeEnum;
-import com.qmth.teachcloud.common.bean.params.ApproveUserResult;
 import org.activiti.engine.runtime.ProcessInstance;
 import org.springframework.web.multipart.MultipartFile;
 
@@ -22,35 +22,6 @@ import java.util.Map;
  */
 public interface ActivitiService {
 
-    /**
-     * 创建流程
-     *
-     * @param processFileName
-     */
-    void createDeployment(String processFileName);
-
-    /**
-     * 上传流程文件
-     *
-     * @param file
-     */
-    void uploadDeployment(MultipartFile file) throws IOException;
-
-    /**
-     * 上传流程文件
-     *
-     * @param file
-     */
-    void uploadDeployment(File file) throws IOException;
-
-    /**
-     * 启动流程
-     *
-     * @param processKey
-     * @param map
-     */
-    public ProcessInstance startActivity(String processKey, Map<String, Object> map);
-
     /**
      * 启动流程
      *
@@ -80,23 +51,6 @@ public interface ActivitiService {
      */
     public List<FlowTaskResult> getTaskAll(String flowId);
 
-    /**
-     * 流程删除
-     *
-     * @param id
-     * @return
-     */
-    public Boolean flowDelete(Long id);
-
-    /**
-     * 获取所有流程节点待审批人
-     *
-     * @param courseCode
-     * @param taskId
-     * @return
-     */
-    public FlowTaskApprovePeopleAllResult taskApproverPeopleAll(String courseCode, String taskId);
-
     /**
      * 流程节点转他人审批
      *
@@ -106,40 +60,6 @@ public interface ActivitiService {
      */
     public boolean taskApproverExchange(String userId, String taskId);
 
-    /**
-     * 获取转他人审批人
-     *
-     * @param taskId
-     * @param realName
-     * @return
-     */
-    public FlowTaskApprovePeopleAllResult taskApproverExchangePeople(String taskId, String realName);
-
-    /**
-     * 获取下级节点审批人
-     *
-     * @param courseCode
-     * @param taskId
-     * @return
-     */
-    public FlowTaskApprovePeopleAllResult taskApproverNextPeople(String courseCode, String taskId);
-
-    /**
-     * 获取印刷员审批人
-     *
-     * @param flowId
-     * @return
-     */
-    public List<ApproveUserResult> findByPrintApprove(Long flowId);
-
-    /**
-     * 获取流程提交记录
-     *
-     * @param examTaskId
-     * @return
-     */
-    public List<FlowTaskSubmitPeopleAllResult> taskApproverSubmitList(String examTaskId);
-
     /**
      * 动态创建流程图
      *

+ 2 - 6
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/ExamTaskReviewLogService.java

@@ -1,12 +1,8 @@
 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.dto.ReviewLogDto;
 import com.qmth.distributed.print.business.entity.ExamTaskReviewLog;
 
-import java.util.List;
-
 /**
  * <p>
  * 命题任务审核日志表 服务类
@@ -17,7 +13,7 @@ import java.util.List;
  */
 public interface ExamTaskReviewLogService extends IService<ExamTaskReviewLog> {
 
-    List<ReviewLogDto> list(Long flowId);
+//    List<ReviewLogDto> list(Long flowId);
 
-    ApprovalInfo findOnePassBySetUp(Long flowId, int setup);
+//    ApprovalInfo findOnePassBySetUp(Long flowId, int setup);
 }

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

@@ -1,24 +0,0 @@
-//package com.qmth.distributed.print.business.service;
-//
-//import com.baomidou.mybatisplus.extension.service.IService;
-//import com.qmth.distributed.print.business.entity.TFFlowApprove;
-//import com.qmth.distributed.print.business.entity.TFFlowApproveLog;
-//
-///**
-// * <p>
-// * 流程审批记录 服务类
-// * </p>
-// *
-// * @author wangliang
-// * @since 2021-08-05
-// */
-//public interface TFFlowApproveLogService extends IService<TFFlowApproveLog> {
-//
-//    /**
-//     * 根据流程id查询流程状态
-//     *
-//     * @param flowId
-//     * @return
-//     */
-//    TFFlowApproveLog findByFlowId(Long flowId);
-//}

+ 0 - 67
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/TFFlowService.java

@@ -1,67 +0,0 @@
-//package com.qmth.distributed.print.business.service;
-//
-//import com.baomidou.mybatisplus.core.metadata.IPage;
-//import com.baomidou.mybatisplus.extension.service.IService;
-//import com.qmth.distributed.print.business.bean.result.FlowApproveResult;
-//import com.qmth.distributed.print.business.entity.TFFlow;
-//
-//import java.util.Map;
-//
-///**
-// * <p>
-// * 流程表 服务类
-// * </p>
-// *
-// * @author wangliang
-// * @since 2021-08-02
-// */
-//public interface TFFlowService extends IService<TFFlow> {
-//
-//    /**
-//     * 流程列表
-//     *
-//     * @param iPage
-//     * @param name
-//     * @param schoolId
-//     * @param orgId
-//     * @return
-//     */
-//    public IPage<TFFlow> list(IPage<Map> iPage, String name, Long schoolId, Long orgId);
-//
-//    /**
-//     * 流程审批记录列表
-//     *
-//     * @param iPage
-//     * @param startName
-//     * @param schoolId
-//     * @param orgId
-//     * @param flowId
-//     * @return
-//     */
-//    public IPage<FlowApproveResult> flowApproveList(IPage<Map> iPage, String status, String startName, Long teachingRoomId, Long createStartTime, Long createEndTime, Long schoolId, Long orgId, Long flowId);
-//
-//    /**
-//     * 流程审批记录找人
-//     *
-//     * @param schoolId
-//     * @param flowId
-//     * @return
-//     */
-//    public FlowApproveResult flowApproveUserList(Long schoolId, Long flowId);
-//
-//    /**
-//     * 根据key查找流程
-//     *
-//     * @param flowKey
-//     * @return
-//     */
-//    public Integer findByFlowKey(String flowKey);
-//
-//    /**
-//     * 根据key查找id
-//     *
-//     * @param flowKey
-//     * @return
-//     */
-//    public String findActIdByFlowKey(String flowKey);
-//}

文件差異過大導致無法顯示
+ 2 - 976
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ActivitiServiceImpl.java


+ 8 - 11
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamTaskReviewLogServiceImpl.java

@@ -2,14 +2,11 @@ package com.qmth.distributed.print.business.service.impl;
 
 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.dto.ReviewLogDto;
 import com.qmth.distributed.print.business.entity.ExamTaskReviewLog;
 import com.qmth.distributed.print.business.mapper.ExamTaskReviewLogMapper;
 import com.qmth.distributed.print.business.service.ExamTaskReviewLogService;
 import org.springframework.stereotype.Service;
 
-import java.util.List;
-
 /**
  * <p>
  * 命题任务审核日志表 服务实现类
@@ -21,13 +18,13 @@ import java.util.List;
 @Service
 public class ExamTaskReviewLogServiceImpl extends ServiceImpl<ExamTaskReviewLogMapper, ExamTaskReviewLog> implements ExamTaskReviewLogService {
 
-    @Override
-    public List<ReviewLogDto> list(Long flowId) {
-        return this.baseMapper.list(flowId);
-    }
+//    @Override
+//    public List<ReviewLogDto> list(Long flowId) {
+//        return this.baseMapper.list(flowId);
+//    }
 
-    @Override
-    public ApprovalInfo findOnePassBySetUp(Long flowId, int setup) {
-        return this.baseMapper.findOnePassBySetUp(flowId,setup);
-    }
+//    @Override
+//    public ApprovalInfo findOnePassBySetUp(Long flowId, int setup) {
+//        return this.baseMapper.findOnePassBySetUp(flowId,setup);
+//    }
 }

+ 26 - 25
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamTaskServiceImpl.java

@@ -1840,31 +1840,32 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
         final String link = ",";
         List<ApprovalInfo> approvalInfoList = new ArrayList<>();
         if (review) {
-            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);
+            //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);
         }
 
         // 2.ExamRoomInfo 部分

+ 0 - 35
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/TFFlowApproveLogServiceImpl.java

@@ -1,35 +0,0 @@
-//package com.qmth.distributed.print.business.service.impl;
-//
-//import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-//import com.qmth.distributed.print.business.entity.TFFlowApproveLog;
-//import com.qmth.distributed.print.business.mapper.TFFlowApproveLogMapper;
-//import com.qmth.distributed.print.business.service.TFFlowApproveLogService;
-//import org.springframework.stereotype.Service;
-//
-//import javax.annotation.Resource;
-//
-///**
-// * <p>
-// * 流程审批记录 服务实现类
-// * </p>
-// *
-// * @author wangliang
-// * @since 2021-08-05
-// */
-//@Service
-//public class TFFlowApproveLogServiceImpl extends ServiceImpl<TFFlowApproveLogMapper, TFFlowApproveLog> implements TFFlowApproveLogService {
-//
-//    @Resource
-//    TFFlowApproveLogMapper tfFlowApproveLogMapper;
-//
-//    /**
-//     * 根据流程id查询流程状态
-//     *
-//     * @param flowId
-//     * @return
-//     */
-//    @Override
-//    public TFFlowApproveLog findByFlowId(Long flowId) {
-//        return tfFlowApproveLogMapper.findByFlowId(flowId);
-//    }
-//}

+ 0 - 145
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/TFFlowServiceImpl.java

@@ -1,145 +0,0 @@
-//package com.qmth.distributed.print.business.service.impl;
-//
-//import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-//import com.baomidou.mybatisplus.core.metadata.IPage;
-//import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-//import com.qmth.distributed.print.business.bean.result.FlowApproveResult;
-//import com.qmth.distributed.print.business.entity.TFFlow;
-//import com.qmth.distributed.print.business.entity.TFFlowLog;
-//import com.qmth.distributed.print.business.mapper.TExamTaskFlowMapper;
-//import com.qmth.distributed.print.business.mapper.TFFlowLogMapper;
-//import com.qmth.distributed.print.business.mapper.TFFlowMapper;
-//import com.qmth.distributed.print.business.service.TFFlowService;
-//import com.qmth.teachcloud.common.entity.SysUser;
-//import com.qmth.teachcloud.common.enums.FlowApproveSetupEnum;
-//import com.qmth.teachcloud.common.service.SysUserService;
-//import com.qmth.teachcloud.common.util.ServletUtil;
-//import org.apache.commons.lang3.StringUtils;
-//import org.springframework.beans.factory.annotation.Autowired;
-//import org.springframework.stereotype.Service;
-//
-//import javax.annotation.Resource;
-//import java.util.*;
-//
-///**
-// * <p>
-// * 流程表 服务实现类
-// * </p>
-// *
-// * @author wangliang
-// * @since 2021-08-02
-// */
-//@Service
-//public class TFFlowServiceImpl extends ServiceImpl<TFFlowMapper, TFFlow> implements TFFlowService {
-//
-//    @Resource
-//    TFFlowMapper tfFlowMapper;
-//
-//    @Resource
-//    TExamTaskFlowMapper tExamTaskFlowMapper;
-//
-//    @Resource
-//    TFFlowLogMapper tfFlowLogMapper;
-//
-//    @Autowired
-//    SysUserService sysUserService;
-//
-//    /**
-//     * 流程列表
-//     *
-//     * @param iPage
-//     * @param name
-//     * @param schoolId
-//     * @param orgId
-//     * @return
-//     */
-//    @Override
-//    public IPage<TFFlow> list(IPage<Map> iPage, String name, Long schoolId, Long orgId) {
-//        return tfFlowMapper.list(iPage, name, schoolId, orgId);
-//    }
-//
-//    /**
-//     * 流程审批记录列表
-//     *
-//     * @param iPage
-//     * @param startName
-//     * @param schoolId
-//     * @param orgId
-//     * @param flowId
-//     * @return
-//     */
-//    @Override
-//    public IPage<FlowApproveResult> flowApproveList(IPage<Map> iPage, String status, String startName, Long teachingRoomId, Long createStartTime, Long createEndTime, Long schoolId, Long orgId, Long flowId) {
-//        IPage<FlowApproveResult> flowApproveResultIPage = tfFlowMapper.flowApproveList(iPage, status, startName, teachingRoomId, createStartTime, createEndTime, schoolId, orgId, flowId);
-//        for (FlowApproveResult record : flowApproveResultIPage.getRecords()) {
-//            record.setStatusStr(record.getStatus().getTitle());
-//            // FlowApproveSetupEnum
-//            if (FlowApproveSetupEnum.FINISH.getSetup() == record.getSetup()) {
-//                record.setSetupStr("结束节点");
-//            } else if (FlowApproveSetupEnum.SUBMIT.getSetup() == record.getSetup()) {
-//                record.setSetupStr("开始节点");
-//            } else {
-//                record.setSetupStr("审批节点");
-//            }
-//
-//            Long maxFlowId = tExamTaskFlowMapper.selectMaxFlowIdByExamTaskId(record.getTaskId());
-//            if (Objects.nonNull(maxFlowId)) {
-//                List<TFFlowLog> flowLogs = tfFlowLogMapper.findByFlowId(maxFlowId, Long.parseLong((String) ServletUtil.getRequestHeaderSchoolId()));
-//                TFFlowLog tfFlowLog = flowLogs.stream().sorted(Comparator.comparingLong(TFFlowLog::getCreateTime).reversed()).findFirst().orElse(null);
-//                if (Objects.nonNull(tfFlowLog)) {
-//                    String pendApproveId = tfFlowLog.getPendApproveId();
-//                    if (StringUtils.isNotBlank(pendApproveId)) {
-//                        StringJoiner sj = new StringJoiner(",");
-//                        for (String id : pendApproveId.split(",")) {
-//                            SysUser sysUser = sysUserService.getById(id);
-//                            sj.add(sysUser.getRealName());
-//                        }
-//                        record.setCurrentApproveUserName(sj.toString());
-//                    }
-//                }
-//            }
-//
-//        }
-//        return flowApproveResultIPage;
-//    }
-//
-//    /**
-//     * 流程审批记录找人
-//     *
-//     * @param schoolId
-//     * @param flowId
-//     * @return
-//     */
-//    @Override
-//    public FlowApproveResult flowApproveUserList(Long schoolId, Long flowId) {
-//        return tfFlowMapper.flowApproveUserList(schoolId, flowId);
-//    }
-//
-//    /**
-//     * 根据key查找流程
-//     *
-//     * @param flowKey
-//     * @return
-//     */
-//    @Override
-//    public Integer findByFlowKey(String flowKey) {
-//        SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
-//        QueryWrapper<TFFlow> tfFlowQueryWrapper = new QueryWrapper<>();
-//        tfFlowQueryWrapper.lambda().eq(TFFlow::getSchoolId, sysUser.getSchoolId())
-//                .eq(TFFlow::getFlowKey, flowKey)
-//                .eq(TFFlow::getEnable, true)
-//                .eq(TFFlow::getPublish, true);
-//        return this.count(tfFlowQueryWrapper);
-//    }
-//
-//    /**
-//     * 根据key查找id
-//     *
-//     * @param flowKey
-//     * @return
-//     */
-//    @Override
-//    public String findActIdByFlowKey(String flowKey) {
-//        return tfFlowMapper.findActIdByFlowKey(flowKey);
-//    }
-//}

+ 4 - 2
distributed-print-business/src/main/resources/mapper/ExamTaskMapper.xml

@@ -883,7 +883,8 @@
                 et.teacher_name teacherName,
                 et.lecturer_name lecturerName,
                 d.real_name as propositionName,
-                so.name teachingRoomName
+                so.name teachingRoomName,
+                et.exam_id as examId
             from
                 ACT_RU_TASK art
             left join t_f_flow_join tffj on
@@ -938,7 +939,8 @@
                 et.teacher_name teacherName,
                 et.lecturer_name lecturerName,
                 d.real_name as propositionName,
-                so.name teachingRoomName
+                so.name teachingRoomName,
+                et.exam_id as examId
             from
                 ACT_RU_TASK art
             left join t_f_flow_join tffj on

+ 47 - 47
distributed-print-business/src/main/resources/mapper/ExamTaskReviewLogMapper.xml

@@ -18,53 +18,53 @@
         exam_task_id, review_status, reason, operate_id, operate_time
     </sql>
 
-    <select id="list" resultType="com.qmth.distributed.print.business.bean.dto.ReviewLogDto">
-        select
-            tffl.id,
-            tffl.approve_operation as approvePass,
-            tffl.approve_remark as reason,
-            tffl.approve_setup as setUp,
-            tffl.approve_id as operateId,
-            su.real_name as operateName,
-            tffl.create_time as operateTime
-        from
-            t_f_flow_log tffl
-        left join sys_user su on tffl.approve_id = su.id
-        where EXISTS(
-            select t.flow_id from t_f_flow_join t
-        where EXISTS (select tffj.object_id from t_f_flow_join tffj
-                where tffj.flow_id = #{flowId} and tffj.object_id = t.object_id)
-        and tffl.flow_id = t.flow_id)
-        order by tffl.create_time desc
-    </select>
+<!--    <select id="list" resultType="com.qmth.distributed.print.business.bean.dto.ReviewLogDto">-->
+<!--        select-->
+<!--            tffl.id,-->
+<!--            tffl.approve_operation as approvePass,-->
+<!--            tffl.approve_remark as reason,-->
+<!--            tffl.approve_setup as setUp,-->
+<!--            tffl.approve_id as operateId,-->
+<!--            su.real_name as operateName,-->
+<!--            tffl.create_time as operateTime-->
+<!--        from-->
+<!--            t_f_flow_log tffl-->
+<!--        left join sys_user su on tffl.approve_id = su.id-->
+<!--        where EXISTS(-->
+<!--            select t.flow_id from t_f_flow_join t-->
+<!--        where EXISTS (select tffj.object_id from t_f_flow_join tffj-->
+<!--                where tffj.flow_id = #{flowId} and tffj.object_id = t.object_id)-->
+<!--        and tffl.flow_id = t.flow_id)-->
+<!--        order by tffl.create_time desc-->
+<!--    </select>-->
 
-    <select id="findOnePassBySetUp"
-            resultType="com.qmth.distributed.print.business.bean.dto.approvalForm.ApprovalInfo">
-        SELECT
-            tffl.approve_remark AS remark,
-            tffl.approve_setup AS level,
-            tffl.approve_id AS approveId,
-            su.real_name AS approveName,
-            tffl.create_time AS time
-        FROM
-            t_f_flow_log tffl
-                LEFT JOIN
-            sys_user su ON tffl.approve_id = su.id
-        <where>
-            AND tffl.approve_operation = 'APPROVE'
-            <if test="flowId > 0 and flowId != ''">
-                AND EXISTS(
-                select t.flow_id from t_f_flow_join t
-                where EXISTS (select tffj.object_id from t_f_flow_join tffj
-                where tffj.flow_id = #{flowId} and tffj.object_id = t.object_id)
-                and tffl.flow_id = t.flow_id)
-            </if>
-            <if test="setup != null and setup != ''">
-                AND tffl.approve_setup = #{setup}
-            </if>
-        </where>
-        ORDER BY tffl.create_time DESC
-        LIMIT 1
-    </select>
+<!--    <select id="findOnePassBySetUp"-->
+<!--            resultType="com.qmth.distributed.print.business.bean.dto.approvalForm.ApprovalInfo">-->
+<!--        SELECT-->
+<!--            tffl.approve_remark AS remark,-->
+<!--            tffl.approve_setup AS level,-->
+<!--            tffl.approve_id AS approveId,-->
+<!--            su.real_name AS approveName,-->
+<!--            tffl.create_time AS time-->
+<!--        FROM-->
+<!--            t_f_flow_log tffl-->
+<!--                LEFT JOIN-->
+<!--            sys_user su ON tffl.approve_id = su.id-->
+<!--        <where>-->
+<!--            AND tffl.approve_operation = 'APPROVE'-->
+<!--            <if test="flowId > 0 and flowId != ''">-->
+<!--                AND EXISTS(-->
+<!--                select t.flow_id from t_f_flow_join t-->
+<!--                where EXISTS (select tffj.object_id from t_f_flow_join tffj-->
+<!--                where tffj.flow_id = #{flowId} and tffj.object_id = t.object_id)-->
+<!--                and tffl.flow_id = t.flow_id)-->
+<!--            </if>-->
+<!--            <if test="setup != null and setup != ''">-->
+<!--                AND tffl.approve_setup = #{setup}-->
+<!--            </if>-->
+<!--        </where>-->
+<!--        ORDER BY tffl.create_time DESC-->
+<!--        LIMIT 1-->
+<!--    </select>-->
 
 </mapper>

+ 62 - 59
distributed-print/src/main/java/com/qmth/distributed/print/api/ExamTaskController.java

@@ -23,7 +23,10 @@ import com.qmth.teachcloud.common.contant.SystemConstant;
 import com.qmth.teachcloud.common.entity.BasicAttachment;
 import com.qmth.teachcloud.common.entity.SysUser;
 import com.qmth.teachcloud.common.entity.TBTask;
-import com.qmth.teachcloud.common.enums.*;
+import com.qmth.teachcloud.common.enums.ExceptionResultEnum;
+import com.qmth.teachcloud.common.enums.FlowApprovePassEnum;
+import com.qmth.teachcloud.common.enums.TaskTypeEnum;
+import com.qmth.teachcloud.common.enums.UploadFileEnum;
 import com.qmth.teachcloud.common.service.BasicAttachmentService;
 import com.qmth.teachcloud.common.service.BasicStudentService;
 import com.qmth.teachcloud.common.util.Result;
@@ -102,17 +105,18 @@ public class ExamTaskController {
 
     /**
      * 命题任务管理-查询
-     * @param enable 正常/禁用
-     * @param status 状态
-     * @param cardRuleId 题卡规则ID
-     * @param courseCode 课程代码
+     *
+     * @param enable      正常/禁用
+     * @param status      状态
+     * @param cardRuleId  题卡规则ID
+     * @param courseCode  课程代码
      * @param paperNumber 试卷编号
-     * @param startTime 开始时间
-     * @param endTime 结束时间
-     * @param userName 命题老师名称
-     * @param createName 创建人名称
-     * @param pageNumber 分页参数
-     * @param pageSize 分页参数
+     * @param startTime   开始时间
+     * @param endTime     结束时间
+     * @param userName    命题老师名称
+     * @param createName  创建人名称
+     * @param pageNumber  分页参数
+     * @param pageSize    分页参数
      * @return Result
      */
     @ApiOperation(value = "命题任务管理-查询")
@@ -131,12 +135,11 @@ public class ExamTaskController {
                        @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
                        @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
 
-        return ResultUtil.ok(examTaskService.list(SystemConstant.convertIdToLong(semesterId),SystemConstant.convertIdToLong(examId),enable, status, SystemConstant.convertIdToLong(cardRuleId), courseCode, paperNumber, startTime, endTime, userName, createName, pageNumber, pageSize));
+        return ResultUtil.ok(examTaskService.list(SystemConstant.convertIdToLong(semesterId), SystemConstant.convertIdToLong(examId), enable, status, SystemConstant.convertIdToLong(cardRuleId), courseCode, paperNumber, startTime, endTime, userName, createName, pageNumber, pageSize));
     }
 
     /**
      * 试卷编号模糊查询
-     *
      */
     @ApiOperation(value = "试卷编号模糊查询")
     @RequestMapping(value = "/paper_number_query", method = RequestMethod.POST)
@@ -152,7 +155,6 @@ public class ExamTaskController {
 
     /**
      * 命题老师模糊查询
-     *
      */
     @ApiOperation(value = "命题老师模糊查询")
     @RequestMapping(value = "/user_query", method = RequestMethod.POST)
@@ -162,7 +164,6 @@ public class ExamTaskController {
 
     /**
      * 命题任务管理-更改/指派命题老师
-     *
      */
     @ApiOperation(value = "命题任务管理-更改/指派命题老师")
     @RequestMapping(value = "/assign_user", method = RequestMethod.POST)
@@ -172,7 +173,6 @@ public class ExamTaskController {
 
     /**
      * 命题任务管理-启用/禁用
-     *
      */
     @ApiOperation(value = "命题任务管理-启用/禁用")
     @RequestMapping(value = "/enable", method = RequestMethod.POST)
@@ -182,7 +182,6 @@ public class ExamTaskController {
 
     /**
      * 命题任务管理-新建命题任务
-     *
      */
     @ApiOperation(value = "命题任务管理-新建命题任务")
     @RequestMapping(value = "/save", method = RequestMethod.POST)
@@ -197,7 +196,6 @@ public class ExamTaskController {
 
     /**
      * 命题任务管理-文件导入
-     *
      */
     @ApiOperation(value = "命题任务管理-文件导入")
     @RequestMapping(value = "/import", method = RequestMethod.POST)
@@ -226,7 +224,6 @@ public class ExamTaskController {
 
     /**
      * 命题任务管理-批量保存命题任务
-     *
      */
     @ApiOperation(value = "命题任务管理-批量保存命题任务")
     @RequestMapping(value = "/save_batch", method = RequestMethod.POST)
@@ -240,15 +237,14 @@ public class ExamTaskController {
         return ResultUtil.ok(true);
     }
 
-    /**
-     * 审核历史
-     *
-     */
-    @ApiOperation(value = "审核历史")
-    @RequestMapping(value = "/review_list", method = RequestMethod.POST)
-    public Result reviewList(@ApiParam(value = "流程id", required = true) @RequestParam String flowId) {
-        return ResultUtil.ok(examTaskReviewLogService.list(SystemConstant.convertIdToLong(flowId)));
-    }
+//    /**
+//     * 审核历史
+//     */
+//    @ApiOperation(value = "审核历史")
+//    @RequestMapping(value = "/review_list", method = RequestMethod.POST)
+//    public Result reviewList(@ApiParam(value = "流程id", required = true) @RequestParam String flowId) {
+//        return ResultUtil.ok(examTaskReviewLogService.list(SystemConstant.convertIdToLong(flowId)));
+//    }
 
     /**
      * 入库申请-查询
@@ -301,14 +297,17 @@ public class ExamTaskController {
     @RequestMapping(value = "/apply_get_one", method = RequestMethod.POST)
     public Result applyGetOne(@RequestParam(value = "examTaskId") Long examTaskId,
                               @RequestParam(value = "source", required = false) String source) {
+        SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
         ExamTaskDetailCardDto detail = examTaskService.applyGetOne(examTaskId, source);
         if (Objects.nonNull(detail) && Objects.nonNull(detail.getFlowId())) {
-            Task task = taskService.createTaskQuery().processInstanceId(detail.getFlowId()).singleResult();
+            Task task = taskService.createTaskQuery().processInstanceId(detail.getFlowId())
+                    .taskCandidateOrAssigned(String.valueOf(sysUser.getId())).singleResult();
             if (Objects.nonNull(task)) {
                 detail.setFlowTaskId(task.getId());
             } else {
                 TFFlowJoin tfFlowJoin = tfFlowJoinService.findByFlowLevel(Long.parseLong(detail.getExamTaskId()));
-                task = taskService.createTaskQuery().processInstanceId(String.valueOf(tfFlowJoin.getFlowId())).singleResult();
+                task = taskService.createTaskQuery().processInstanceId(detail.getFlowId())
+                        .taskCandidateOrAssigned(String.valueOf(sysUser.getId())).singleResult();
                 if (Objects.nonNull(task)) {
                     detail.setSubFlowReject(true);
                     detail.setFlowTaskId(task.getId());
@@ -392,17 +391,17 @@ public class ExamTaskController {
     /**
      * 入库审核-查询-未审核
      *
-     * @param courseCode 课程代码
-     * @param paperNumber 试卷编号
-     * @param userId 命题老师ID
-     * @param cardRuleId 题卡规则ID
-     * @param startTime 开始时间
-     * @param endTime 结束时间
+     * @param courseCode      课程代码
+     * @param paperNumber     试卷编号
+     * @param userId          命题老师ID
+     * @param cardRuleId      题卡规则ID
+     * @param startTime       开始时间
+     * @param endTime         结束时间
      * @param startCreateTime 申请时间-起始
      * @param endCreateTime   申请时间-终止
      * @param createName      创建人
-     * @param pageNumber 分页参数
-     * @param pageSize 分页参数
+     * @param pageNumber      分页参数
+     * @param pageSize        分页参数
      * @return Result
      */
     @ApiOperation(value = "入库审核-查询-已审核")
@@ -462,24 +461,28 @@ public class ExamTaskController {
         if (!CollectionUtils.isEmpty(examTaskIdList)) {
             for (Long examTaskId : examTaskIdList) {
                 ExamTask examTask = examTaskService.getById(examTaskId);
-                Task task = taskService.createTaskQuery().processInstanceId(String.valueOf(examTask.getFlowId())).singleResult();
-                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);
-                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失败");
-                        }
+                List<Task> taskList = taskService.createTaskQuery().processInstanceId(String.valueOf(examTask.getFlowId())).list();
+                if (Objects.nonNull(taskList) && taskList.size() > 0) {
+                    for (Task task : taskList) {
+                        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);
                     }
                 }
+//                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();
@@ -512,12 +515,12 @@ public class ExamTaskController {
     /**
      * 卷库查询
      *
-     * @param courseCode 课程代码
+     * @param courseCode  课程代码
      * @param paperNumber 试卷编号
-     * @param startTime 开始时间
-     * @param endTime 结束时间
-     * @param pageNumber 分页参数
-     * @param pageSize 分页参数
+     * @param startTime   开始时间
+     * @param endTime     结束时间
+     * @param pageNumber  分页参数
+     * @param pageSize    分页参数
      * @return Result
      */
     @ApiOperation(value = "卷库查询")

+ 0 - 299
distributed-print/src/main/java/com/qmth/distributed/print/api/TFFlowController.java

@@ -1,299 +0,0 @@
-//package com.qmth.distributed.print.api;
-//
-//import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
-//import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-//import com.google.common.reflect.TypeToken;
-//import com.google.gson.Gson;
-//import com.qmth.boot.api.constant.ApiConstant;
-//import com.qmth.boot.api.exception.ApiException;
-//import com.qmth.distributed.print.business.bean.params.FlowApproveParam;
-//import com.qmth.distributed.print.business.bean.params.FlowParam;
-//import com.qmth.distributed.print.business.bean.params.FlowTaskApproveParam;
-//import com.qmth.distributed.print.business.bean.result.EditResult;
-////import com.qmth.distributed.print.business.bean.result.FlowApproveResult;
-//import com.qmth.distributed.print.business.bean.result.FlowTaskApprovePeopleAllResult;
-//import com.qmth.distributed.print.business.bean.result.FlowTaskResult;
-//import com.qmth.distributed.print.business.entity.*;
-//import com.qmth.distributed.print.business.enums.MessageEnum;
-//import com.qmth.distributed.print.business.service.*;
-//import com.qmth.teachcloud.common.bean.params.ApproveUserResult;
-//import com.qmth.teachcloud.common.contant.SystemConstant;
-//import com.qmth.teachcloud.common.entity.BasicAttachment;
-//import com.qmth.teachcloud.common.entity.SysUser;
-//import com.qmth.teachcloud.common.enums.*;
-//import com.qmth.teachcloud.common.service.BasicAttachmentService;
-//import com.qmth.teachcloud.common.service.SysUserService;
-//import com.qmth.teachcloud.common.util.JacksonUtil;
-//import com.qmth.teachcloud.common.util.Result;
-//import com.qmth.teachcloud.common.util.ResultUtil;
-//import com.qmth.teachcloud.common.util.ServletUtil;
-//import io.swagger.annotations.*;
-//import org.activiti.engine.TaskService;
-//import org.activiti.engine.task.Task;
-//import org.slf4j.Logger;
-//import org.slf4j.LoggerFactory;
-//import org.springframework.beans.factory.annotation.Autowired;
-//import org.springframework.dao.DuplicateKeyException;
-//import org.springframework.transaction.annotation.Transactional;
-//import org.springframework.validation.BindingResult;
-//import org.springframework.validation.annotation.Validated;
-//import org.springframework.web.bind.annotation.*;
-//import org.springframework.web.multipart.MultipartFile;
-//
-//import javax.annotation.Resource;
-//import javax.validation.Valid;
-//import javax.validation.constraints.Max;
-//import javax.validation.constraints.Min;
-//import java.io.IOException;
-//import java.util.*;
-//
-///**
-// * <p>
-// * 流程表 前端控制器
-// * </p>
-// *
-// * @author wangliang
-// * @since 2021-08-02
-// */
-//@Api(tags = "流程Controller")
-//@RestController
-//@RequestMapping(ApiConstant.DEFAULT_URI_PREFIX + "/${prefix.url.flow}")
-////@Aac(auth = BOOL.FALSE, strict = BOOL.FALSE)
-//@Validated
-//public class TFFlowController {
-//    private final static Logger log = LoggerFactory.getLogger(TFFlowController.class);
-//
-//    @Resource
-//    PrintCommonService printCommonService;
-//
-//    @Resource
-//    BasicAttachmentService basicAttachmentService;
-//
-//    @Resource
-//    ActivitiService activitiService;
-//
-//    @Resource
-//    TFFlowService tfFlowService;
-//
-//    @Resource
-//    TFFlowApproveLogService tfFlowApproveLogService;
-//
-//    @Autowired
-//    SysUserService sysUserService;
-//
-//    @Autowired
-//    BasicMessageService basicMessageService;
-//
-//    @Resource
-//    TaskService taskService;
-//
-//    @Resource
-//    TExamTaskFlowService tExamTaskFlowService;
-//
-//    @ApiOperation(value = "注册流程")
-//    @Transactional
-//    @ApiResponses({@ApiResponse(code = 200, message = "常规信息", response = ResultUtil.class)})
-//    @RequestMapping(value = "/register", method = RequestMethod.POST)
-//    public Result register(@ApiParam(value = "上传文件", required = true) @RequestParam MultipartFile file,
-//                           @ApiParam(value = "流程文件名称", required = true) @RequestParam String name) {
-//        BasicAttachment basicAttachment = null;
-//        try {
-//            int temp = file.getOriginalFilename().lastIndexOf(".");
-//            String fileName = file.getOriginalFilename().substring(0, temp);
-//            String format = file.getOriginalFilename().substring(temp, file.getOriginalFilename().length());
-//            if (!format.equalsIgnoreCase(".bpmn")) {
-//                throw ExceptionResultEnum.ERROR.exception("上传的流程文件格式只能为.bmpn");
-//            }
-//            basicAttachment = printCommonService.saveAttachment(file, ServletUtil.getRequestMd5(), UploadFileEnum.FILE);
-//            if (Objects.isNull(basicAttachment)) {
-//                throw ExceptionResultEnum.ATTACHMENT_ERROR.exception();
-//            }
-//            activitiService.uploadDeployment(file);
-//            String actFlowId = tfFlowService.findActIdByFlowKey(SystemConstant.GDYKDX_FLOW_KEY);
-//            SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
-//            TFFlow tfFlow = new TFFlow(SystemConstant.getHeadOrUserSchoolId(), sysUser.getOrgId(), name, sysUser.getId(), fileName, actFlowId);
-//            tfFlowService.save(tfFlow);
-//        } catch (Exception e) {
-//            log.error(SystemConstant.LOG_ERROR, e);
-//            if (Objects.nonNull(basicAttachment)) {
-//                basicAttachmentService.deleteAttachment(basicAttachment);
-//            }
-//            if (e instanceof DuplicateKeyException) {
-//                String errorColumn = e.getCause().toString();
-//                String columnStr = errorColumn.substring(errorColumn.lastIndexOf("key") + 3, errorColumn.length()).replaceAll("'", "");
-//                throw ExceptionResultEnum.SQL_ERROR.exception("[" + FieldUniqueEnum.convertToTitle(columnStr) + "]数据不允许重复插入");
-//            } else if (e instanceof ApiException) {
-//                ResultUtil.error((ApiException) e, e.getMessage());
-//            } else {
-//                ResultUtil.error(e.getMessage());
-//            }
-//        }
-//        return ResultUtil.ok(new EditResult(basicAttachment.getId()));
-//    }
-//
-////    @ApiOperation(value = "发布流程")
-////    @ApiResponses({@ApiResponse(code = 200, message = "常规信息", response = ResultUtil.class)})
-////    @RequestMapping(value = "/publish", method = RequestMethod.POST)
-////    public Result publish(@ApiParam(value = "流程文件id", required = true) @RequestParam String id) {
-////        SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
-////        UpdateWrapper tfFlowUpdateWrapper = new UpdateWrapper<>();
-////        tfFlowUpdateWrapper.lambda().eq(TFFlow::getId, Long.parseLong(id))
-////                .set(TFFlow::getPublish, true)
-////                .set(TFFlow::getUpdateId, sysUser.getId())
-////                .set(TFFlow::getUpdateTime, System.currentTimeMillis());
-////        return ResultUtil.ok(tfFlowService.update(tfFlowUpdateWrapper));
-////    }
-//
-//    @ApiOperation(value = "流程逻辑删除")
-//    @ApiResponses({@ApiResponse(code = 200, message = "常规信息", response = ResultUtil.class)})
-//    @RequestMapping(value = "/enable", method = RequestMethod.POST)
-//    public Result enable(@Valid @RequestBody FlowParam flowParam, BindingResult bindingResult) {
-//        if (bindingResult.hasErrors()) {
-//            return ResultUtil.error(bindingResult.getAllErrors().get(0).getDefaultMessage());
-//        }
-//        return ResultUtil.ok(activitiService.flowDelete(flowParam.getId()));
-//    }
-//
-//    @ApiOperation(value = "流程列表")
-//    @ApiResponses({@ApiResponse(code = 200, message = "流程信息", response = TFFlow.class)})
-//    @RequestMapping(value = "/list", method = RequestMethod.POST)
-//    public Result list(@ApiParam(value = "流程名称", required = false) @RequestParam(required = false) String name,
-//                       @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(tfFlowService.list(new Page<>(pageNumber, pageSize), name, SystemConstant.getHeadOrUserSchoolId(), sysUser.getOrgId()));
-//    }
-//
-//    @ApiOperation(value = "审批流程")
-//    @ApiResponses({@ApiResponse(code = 200, message = "常规信息", response = ResultUtil.class)})
-//    @RequestMapping(value = "/task/approve", method = RequestMethod.POST)
-//    public Result taskApprove(@Valid @RequestBody FlowTaskApproveParam flowTaskApproveParam, BindingResult bindingResult) {
-//        if (bindingResult.hasErrors()) {
-//            return ResultUtil.error(bindingResult.getAllErrors().get(0).getDefaultMessage());
-//        }
-//        Map<String, Object> map = new HashMap<>();
-//        map.computeIfAbsent(SystemConstant.FLOW_TASK_ID, v -> flowTaskApproveParam.getTaskId());
-//        map.computeIfAbsent(SystemConstant.APPROVE_OPERATION, v -> flowTaskApproveParam.getApprovePass());
-//        map.computeIfAbsent(SystemConstant.APPROVE_REMARK, v -> flowTaskApproveParam.getRemark());
-//        map.computeIfAbsent(SystemConstant.APPROVE_SETUP, v -> flowTaskApproveParam.getSetup());
-//        map.computeIfAbsent(SystemConstant.APPROVE_USER_IDS, v -> flowTaskApproveParam.getApproveUserIds());
-//        map.computeIfAbsent(SystemConstant.USER_TASK_ID, v -> flowTaskApproveParam.getUsertaskId());
-//        Map<String, Object> objectMap = activitiService.taskApprove(map);
-//        if (Objects.nonNull(objectMap)) {
-//            TFFlowApprove tfFlowApprove = (TFFlowApprove) objectMap.get("tfFlowApprove");
-//            ExamTask examTask = (ExamTask) objectMap.get("examTask");
-//            boolean presidentApprove = Objects.nonNull(objectMap.get(SystemConstant.APPROVE_PRESIDENT_SYSTEM)) ? (boolean) objectMap.get(SystemConstant.APPROVE_PRESIDENT_SYSTEM) : false;
-//            //审核通过,生成pdf
-//            if (Objects.nonNull(tfFlowApprove) && FlowApproveSetupEnum.FINISH.getSetup() == tfFlowApprove.getSetup()) {
-//                // 取命题老师ID
-//                SysUser sysUser = sysUserService.getById(examTask.getUserId());
-//                try {
-//                    printCommonService.checkData(examTask.getSchoolId(), examTask.getCourseCode(), examTask.getPaperNumber(), sysUser);
-//                } catch (IOException e) {
-//                    throw ExceptionResultEnum.ERROR.exception("生成pdf失败");
-//                }
-//            } else if (Objects.nonNull(tfFlowApprove) && FlowApproveSetupEnum.THREE_APPROVE.getSetup() == tfFlowApprove.getSetup() && presidentApprove) {//命题老师后台提交
-//                TExamTaskFlow tExamTaskFlow = tExamTaskFlowService.findByFlowLevel(examTask.getId());
-//                Task task = taskService.createTaskQuery().processInstanceId(String.valueOf(tExamTaskFlow.getFlowId())).singleResult();
-//                if (Objects.nonNull(task)) {
-//                    Map<String, Object> mapObject = new HashMap<>();
-//                    mapObject.computeIfAbsent(SystemConstant.FLOW_TASK_ID, v -> task.getId());
-//                    mapObject.computeIfAbsent(SystemConstant.APPROVE_PRESIDENT_SYSTEM, v -> presidentApprove);
-//                    activitiService.taskApprove(mapObject);
-//                }
-//            }
-//
-//            // 驳回短信(驳回给提交老师)
-//            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();
-//    }
-//
-//    @ApiOperation(value = "流程审批记录列表")
-//    @ApiResponses({@ApiResponse(code = 200, message = "流程审批记录信息", response = FlowApproveResult.class)})
-//    @RequestMapping(value = "/approve/list", method = RequestMethod.POST)
-//    public Result taskApproveList(@ApiParam(value = "状态", required = false) @RequestParam(required = false) String status,
-//                                  @ApiParam(value = "发起人名称", required = false) @RequestParam(required = false) String startName,
-//                                  @ApiParam(value = "教研室", required = false) @RequestParam(required = false) Long teachingRoomId,
-//                                  @ApiParam(value = "提交开始时间", required = false) @RequestParam(required = false) Long createStartTime,
-//                                  @ApiParam(value = "提交结束时间", required = false) @RequestParam(required = false) Long createEndTime,
-//                                  @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(tfFlowService.flowApproveList(new Page<>(pageNumber, pageSize), status, startName, teachingRoomId, createStartTime, createEndTime, SystemConstant.getHeadOrUserSchoolId(), sysUser.getOrgId(), null));
-//    }
-//
-//    @ApiOperation(value = "流程审批记录逻辑删除")
-//    @ApiResponses({@ApiResponse(code = 200, message = "常规信息", response = ResultUtil.class)})
-//    @RequestMapping(value = "/approve/enable", method = RequestMethod.POST)
-//    public Result enable(@Valid @RequestBody FlowApproveParam flowApproveParam, BindingResult bindingResult) {
-//        if (bindingResult.hasErrors()) {
-//            return ResultUtil.error(bindingResult.getAllErrors().get(0).getDefaultMessage());
-//        }
-//        UpdateWrapper<TFFlowApproveLog> tfFlowApproveLogUpdateWrapper = new UpdateWrapper<>();
-//        tfFlowApproveLogUpdateWrapper.lambda().eq(TFFlowApproveLog::getFlowId, flowApproveParam.getFlowId())
-//                .set(TFFlowApproveLog::getEnable, flowApproveParam.getEnable());
-//        return ResultUtil.ok(tfFlowApproveLogService.update(tfFlowApproveLogUpdateWrapper));
-//    }
-//
-//    @ApiOperation(value = "流程终止")
-//    @ApiResponses({@ApiResponse(code = 200, message = "常规信息", response = ResultUtil.class)})
-//    @RequestMapping(value = "/end", method = RequestMethod.POST)
-//    public Result end(@ApiParam(value = "流程id", required = true) @RequestParam String flowId) {
-//        activitiService.flowEnd(flowId);
-//        return ResultUtil.ok();
-//    }
-//
-//    @ApiOperation(value = "获取所有流程节点")
-//    @ApiResponses({@ApiResponse(code = 200, message = "流程节点", response = FlowTaskResult.class)})
-//    @RequestMapping(value = "/task/all", method = RequestMethod.POST)
-//    public Result taskAll(@ApiParam(value = "流程id", required = true) @RequestParam String flowId) {
-//        return ResultUtil.ok(activitiService.getTaskAll(flowId));
-//    }
-//
-//    @ApiOperation(value = "获取所有流程节点待审批人")
-//    @ApiResponses({@ApiResponse(code = 200, message = "流程节点待审批人", response = FlowTaskApprovePeopleAllResult.class)})
-//    @RequestMapping(value = "/task/approver/people_all", method = RequestMethod.POST)
-//    public Result taskApproverPeopleAll(@ApiParam(value = "课程编码", required = false) @RequestParam(required = false) String courseCode,
-//                                        @ApiParam(value = "流程节点id", required = false) @RequestParam(required = false) String taskId) {
-//        return ResultUtil.ok(activitiService.taskApproverPeopleAll(courseCode, taskId));
-//    }
-//
-//    @ApiOperation(value = "流程节点转他人审批")
-//    @ApiResponses({@ApiResponse(code = 200, message = "常规信息", response = ResultUtil.class)})
-//    @RequestMapping(value = "/task/approver/exchange", method = RequestMethod.POST)
-//    public Result taskApproverExchange(@ApiParam(value = "审批人id", required = true) @RequestParam String userId,
-//                                       @ApiParam(value = "流程节点id", required = true) @RequestParam String taskId) {
-//        return ResultUtil.ok(activitiService.taskApproverExchange(userId, taskId));
-//    }
-//
-//    @ApiOperation(value = "获取转他人审批人")
-//    @ApiResponses({@ApiResponse(code = 200, message = "流程节点审批人", response = FlowTaskApprovePeopleAllResult.class)})
-//    @RequestMapping(value = "/task/approver/exchange/people", method = RequestMethod.POST)
-//    public Result taskApproverExchangePeople(@ApiParam(value = "流程节点id", required = true) @RequestParam String taskId,
-//                                             @ApiParam(value = "用户姓名", required = false) @RequestParam(required = false) String realName) {
-//        return ResultUtil.ok(activitiService.taskApproverExchangePeople(taskId, realName));
-//    }
-//
-//    @ApiOperation(value = "获取下级节点审批人")
-//    @ApiResponses({@ApiResponse(code = 200, message = "流程节点审批人", response = FlowTaskApprovePeopleAllResult.class)})
-//    @RequestMapping(value = "/task/approver/next/people", method = RequestMethod.POST)
-//    public Result taskApproverNextPeople(@ApiParam(value = "课程编码", required = false) @RequestParam(required = false) String courseCode,
-//                                         @ApiParam(value = "流程节点id", required = false) @RequestParam(required = false) String taskId) {
-//        return ResultUtil.ok(activitiService.taskApproverNextPeople(courseCode, taskId));
-//    }
-//
-//    @ApiOperation(value = "获取提交记录")
-//    @ApiResponses({@ApiResponse(code = 200, message = "流程提交记录", response = FlowTaskApprovePeopleAllResult.class)})
-//    @RequestMapping(value = "/task/approver/submit/list", method = RequestMethod.POST)
-//    public Result taskApproverSubmitList(@ApiParam(value = "考试任务id", required = true) @RequestParam String examTaskId) {
-//        return ResultUtil.ok(activitiService.taskApproverSubmitList(examTaskId));
-//    }
-//}

+ 0 - 54
teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/SysUserService.java

@@ -107,60 +107,6 @@ public interface SysUserService extends IService<SysUser> {
      */
     Map<String, Object> executeSysUserImportLogic(List<LinkedMultiValueMap<Integer, Object>> finalList, Map<String, Object> map) throws NoSuchAlgorithmException;
 
-    /**
-     * 获取命题审批人
-     *
-     * @param courseCode
-     * @param realName
-     * @return
-     */
-    public List<ApproveUserResult> findByAssignApprove(String courseCode, String realName);
-
-    /**
-     * 获取命题审批人
-     *
-     * @param realName
-     * @return
-     */
-    public List<ApproveUserResult> findByJxzyyAssignApprove(String realName);
-
-    /**
-     * 获取教研室主任审批人
-     *
-     * @param courseCode
-     * @param realName
-     * @return
-     */
-    public List<ApproveUserResult> findByDirectorApprove(String courseCode, String realName);
-
-    /**
-     * 获取教研室主任审批人
-     *
-     * @param realName
-     * @param flowApproveNameEnum
-     * @return
-     */
-    public List<ApproveUserResult> findByJxzyyDirectorApprove(String realName, FlowApproveNameEnum flowApproveNameEnum);
-
-    /**
-     * 获取院长审批人
-     *
-     * @param orgIds
-     * @param realName
-     * @return
-     */
-    public List<ApproveUserResult> findByPresidentApprove(List<Long> orgIds, String realName);
-
-    /**
-     * 获取主任或院长审批人
-     *
-     * @param orgIds
-     * @param realName
-     * @param flowApproveNameEnum
-     * @return
-     */
-    public List<ApproveUserResult> findByJxzyyTopDirectorOrPresidentApprove(List<Long> orgIds, String realName, FlowApproveNameEnum flowApproveNameEnum);
-
     /**
      * 获取同级别下一级审批人
      *

+ 0 - 169
teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/SysUserServiceImpl.java

@@ -790,175 +790,6 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
         return map;
     }
 
-    /**
-     * 获取命题审批人
-     *
-     * @param courseCode courseCode
-     * @param realName   realName
-     * @return return
-     */
-    @Override
-    public List<ApproveUserResult> findByAssignApprove(String courseCode, String realName) {
-        Long schoolId = SystemConstant.getHeadOrUserSchoolId();
-        QueryWrapper<BasicCourse> basicCourseQueryWrapper = new QueryWrapper<>();
-        basicCourseQueryWrapper.lambda().eq(BasicCourse::getSchoolId, schoolId)
-                .eq(BasicCourse::getCode, courseCode)
-                .eq(BasicCourse::getEnable, true);
-        BasicCourse basicCourse = basicCourseService.getOne(basicCourseQueryWrapper);
-        Optional.ofNullable(basicCourse).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("课程数据为空"));
-        List<SysOrg> sysOrgList = sysOrgService.findByConnectByRootOrgId(basicCourse.getTeachingRoomId());
-        Set<Long> orgIds = sysOrgList.stream().map(s -> s.getId()).collect(Collectors.toSet());
-        return sysUserService.filterFlowPrivilege(schoolId, orgIds, false, null, realName);
-    }
-
-    /**
-     * 获取命题审批人
-     *
-     * @param realName
-     * @return
-     */
-    @Override
-    public List<ApproveUserResult> findByJxzyyAssignApprove(String realName) {
-        SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
-        List<SysOrg> sysOrgList = sysOrgService.findByConnectByRootOrgId(sysUser.getOrgId());
-        Set<Long> orgIds = sysOrgList.stream().map(s -> s.getId()).collect(Collectors.toSet());
-        return sysUserService.filterFlowPrivilege(sysUser.getSchoolId(), orgIds, false, null, realName);
-    }
-
-    /**
-     * 获取教研室主任审批人
-     *
-     * @param courseCode courseCode
-     * @param realName   realName
-     * @return return
-     */
-    @Override
-    public List<ApproveUserResult> findByDirectorApprove(String courseCode, String realName) {
-        Long schoolId = SystemConstant.getHeadOrUserSchoolId();
-        QueryWrapper<BasicCourse> basicCourseQueryWrapper = new QueryWrapper<>();
-        basicCourseQueryWrapper.lambda().eq(BasicCourse::getSchoolId, schoolId)
-                .eq(BasicCourse::getCode, courseCode);
-        BasicCourse basicCourse = basicCourseService.getOne(basicCourseQueryWrapper);
-
-        Optional.ofNullable(basicCourse).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("课程数据为空"));
-        Optional.ofNullable(basicCourse.getTeachingRoomId()).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("课程机构为空"));
-        List<SysOrg> sysOrgList = sysOrgService.findByConnectByRootOrgId(basicCourse.getTeachingRoomId());
-        Set<Long> orgIds = sysOrgList.stream().map(s -> s.getId()).collect(Collectors.toSet());
-        List<ApproveUserResult> approveUserResultList = sysUserService.filterFlowPrivilege(schoolId, orgIds, true, FlowApproveNameEnum.DIRECTOR, realName);
-//        if (Objects.isNull(approveUserResultList) || approveUserResultList.size() == 0) {
-//            throw ExceptionResultEnum.ERROR.exception("课程["+ basicCourse.getName() + "]未配置主任审批人");
-//        }
-        return approveUserResultList;
-    }
-
-    /**
-     * 获取教研室主任审批人
-     *
-     * @param realName
-     * @param flowApproveNameEnum
-     * @return
-     */
-    @Override
-    public List<ApproveUserResult> findByJxzyyDirectorApprove(String realName, FlowApproveNameEnum flowApproveNameEnum) {
-        SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
-        AuthBean authBean = teachcloudCommonService.getUserAuth(sysUser.getId());
-        Set<SysRolePrivilege> sysRolePrivilegeSet = new HashSet<>();
-        for (SysRole s : authBean.getRoleList()) {
-            sysRolePrivilegeSet.addAll(teachcloudCommonService.getRolePrivilege(s.getId()));
-        }
-        boolean cjmt = false, cjss = false;
-        List<SysPrivilege> sysPrivilegeList = sysPrivilegeService.list(new QueryWrapper<SysPrivilege>().lambda().in(SysPrivilege::getUrl, Arrays.asList(FlowApproveNameEnum.DIRECTOR.getId(), FlowApproveNameEnum.PRESIDENT.getId())));
-        go:
-        for (SysRolePrivilege sysRolePrivilege : sysRolePrivilegeSet) {
-            for (SysPrivilege sysPrivilege : sysPrivilegeList) {
-                if (Objects.equals(sysPrivilege.getUrl(), FlowApproveNameEnum.DIRECTOR.getId()) && sysRolePrivilege.getPrivilegeId().longValue() == sysPrivilege.getId().longValue()) {
-                    cjmt = true;
-                } else if (Objects.equals(sysPrivilege.getUrl(), FlowApproveNameEnum.PRESIDENT.getId()) && sysRolePrivilege.getPrivilegeId().longValue() == sysPrivilege.getId().longValue()) {
-                    cjss = true;
-                }
-            }
-            if (cjmt && cjss) {
-                break go;
-            }
-        }
-        SysOrg sysOrg = authBean.getOrg();
-        if (sysOrg.getType() == OrgTypeEnum.SCHOOL) {//学校下是实施人员或者超级老师
-            List<ApproveUserResult> approveUserResultList = new ArrayList<>();
-            if (cjss && cjmt) {
-                List<ApproveUserResult> presidentList = this.findByJxzyyTopDirectorOrPresidentApprove(Arrays.asList(sysOrg.getId()), realName, FlowApproveNameEnum.PRESIDENT);
-                List<ApproveUserResult> directorList = this.findByJxzyyTopDirectorOrPresidentApprove(Arrays.asList(sysOrg.getId()), realName, FlowApproveNameEnum.DIRECTOR);
-                approveUserResultList.addAll(presidentList);
-                approveUserResultList.addAll(directorList);
-                Set<ApproveUserResult> approveUserResultSet = new HashSet<>(approveUserResultList);
-                approveUserResultList = new ArrayList<>(approveUserResultSet);
-            } else if (cjss) {
-                approveUserResultList = this.findByJxzyyTopDirectorOrPresidentApprove(Arrays.asList(sysOrg.getId()), realName, FlowApproveNameEnum.PRESIDENT);
-            } else if (cjmt && flowApproveNameEnum == FlowApproveNameEnum.DIRECTOR) {
-                approveUserResultList = this.findByJxzyyTopDirectorOrPresidentApprove(Arrays.asList(sysOrg.getId()), realName, FlowApproveNameEnum.DIRECTOR);
-            }
-            return approveUserResultList;
-        } else {//否则是学校命题老师
-            if (flowApproveNameEnum == FlowApproveNameEnum.DIRECTOR) {
-                List<ApproveUserResult> approveUserResultList = this.findByJxzyyTopDirectorOrPresidentApprove(Arrays.asList(sysOrg.getId()), realName, FlowApproveNameEnum.DIRECTOR);
-                List<SysOrg> sysOrgList = sysOrgService.findByConnectByParentId(sysUser.getOrgId(), true, false);
-                Set<Long> orgIds = sysOrgList.stream().map(s -> s.getId()).collect(Collectors.toSet());
-                approveUserResultList.addAll(sysUserService.filterFlowPrivilege(sysUser.getSchoolId(), orgIds, true, FlowApproveNameEnum.DIRECTOR, realName));
-                return approveUserResultList;
-            } else {
-                return null;
-            }
-        }
-    }
-
-    /**
-     * 获取院长审批人
-     *
-     * @param orgIds   orgIds
-     * @param realName realName
-     * @return return
-     */
-    @Override
-    public List<ApproveUserResult> findByPresidentApprove(List<Long> orgIds, String realName) {
-        if (Objects.nonNull(orgIds) && orgIds.size() > 0) {
-            Long schoolId = SystemConstant.getHeadOrUserSchoolId();
-            Set<SysOrg> sysOrgSet = new HashSet<>();
-            for (Long l : orgIds) {
-                sysOrgSet.addAll(sysOrgService.findByConnectByParentId(l, true, false));
-            }
-            Set<Long> orgIdsSet = sysOrgSet.stream().map(s -> s.getId()).collect(Collectors.toSet());
-            List<ApproveUserResult> approveUserResultList = sysUserService.filterFlowPrivilege(schoolId, orgIdsSet, true, FlowApproveNameEnum.PRESIDENT, realName);
-//        if (Objects.isNull(approveUserResultList) || approveUserResultList.size() == 0) {
-//            throw ExceptionResultEnum.ERROR.exception("未配置院长审批人");
-//        }
-            return approveUserResultList;
-        } else {
-            return new ArrayList<>();
-        }
-    }
-
-    /**
-     * 获取院长审批人
-     *
-     * @param orgIds
-     * @param realName
-     * @return
-     */
-    @Override
-    public List<ApproveUserResult> findByJxzyyTopDirectorOrPresidentApprove(List<Long> orgIds, String realName, FlowApproveNameEnum flowApproveNameEnum) {
-        if (Objects.nonNull(orgIds) && orgIds.size() > 0) {
-            Long schoolId = SystemConstant.getHeadOrUserSchoolId();
-            Set<SysOrg> sysOrgSet = new HashSet<>();
-            for (Long l : orgIds) {
-                sysOrgSet.addAll(sysOrgService.findByJxzyyConnectByParentId(l, OrgTypeEnum.SCHOOL));
-            }
-            Set<Long> orgIdsSet = sysOrgSet.stream().map(s -> s.getId()).collect(Collectors.toSet());
-            List<ApproveUserResult> approveUserResultList = sysUserService.filterFlowPrivilege(schoolId, orgIdsSet, true, flowApproveNameEnum, realName);
-            return approveUserResultList;
-        } else {
-            return new ArrayList<>();
-        }
-    }
-
     /**
      * 获取同级别下一级审批人
      *

部分文件因文件數量過多而無法顯示