Explorar el Código

系统上的修改

yzx hace 5 meses
padre
commit
fb4c5b781c
Se han modificado 15 ficheros con 1001 adiciones y 882 borrados
  1. 1 1
      yudao-module-as/yudao-module-as-api/src/main/java/cn/iocoder/yudao/module/as/aidingstudentscollegemanage/AidingStudentsCollegeManageApi.java
  2. 132 132
      yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/controller/admin/task/asProcessInstanceController.java
  3. 212 228
      yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/controller/admin/task/asTaskController.java
  4. 55 0
      yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/controller/admin/task/vo/task/asAidingPageReqVO.java
  5. 98 0
      yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/controller/admin/task/vo/task/asTaskRespVO.java
  6. 207 0
      yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/convert/task/asTaskConvert.java
  7. 21 5
      yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/dal/mysql/aidingstudentspersonmanage/AidingStudentsPersonManageMapper.java
  8. 6 5
      yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/service/aidingstudentspersonmanage/AidingStudentsPersonManageService.java
  9. 6 6
      yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/service/aidingstudentspersonmanage/AidingStudentsPersonManageServiceImpl.java
  10. 0 230
      yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/task/asTaskConvert.java
  11. 6 6
      yudao-module-bpm/yudao-module-bpm-biz/pom.xml
  12. 2 9
      yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/expression/BpmTaskAidAssistantExpression.java
  13. 133 138
      yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/expression/BpmTaskAssignClassMutualExpression.java
  14. 116 116
      yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/expression/BpmTaskAssignClassSelfExpression.java
  15. 6 6
      yudao-module-system/yudao-module-system-biz/pom.xml

+ 1 - 1
yudao-module-as/yudao-module-as-api/src/main/java/cn/iocoder/yudao/module/as/aidingstudentscollegemanage/AidingStudentsCollegeManageApi.java

@@ -1,6 +1,6 @@
 package cn.iocoder.yudao.module.as.aidingstudentscollegemanage;
 
-import cn.iocoder.yudao.module.as.api.aidingstudentscollegemanage.dto.AidingStudentsCollegeManageDTO;
+import cn.iocoder.yudao.module.as.aidingstudentscollegemanage.dto.AidingStudentsCollegeManageDTO;
 
 import java.util.Set;
 

+ 132 - 132
yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/controller/admin/task/asProcessInstanceController.java

@@ -68,64 +68,64 @@ public class asProcessInstanceController {
     private DeptApi deptApi;
 
 
-    @GetMapping("/my-page")
-    @Operation(summary = "获得我的实例分页列表", description = "在【我的流程】菜单中,进行调用")
-    @PreAuthorize("@ss.hasAnyPermissions('eve:task:query','eve:achievement:query')")
-    public CommonResult<PageResult<eveProcessInstanceRespVO>> getProcessInstancePageByLogin(
-            @Valid eveProcessInstanceReqVO pageReqVO) {
-        List<HistoricProcessInstance> hiListResult = processInstanceService.getProcessInstanceList(
-                getLoginUserId(), pageReqVO);
-        if (CollUtil.isEmpty(hiListResult)) {
-            return success(PageResult.empty());
-        }
-        // 拼接返回
-        Map<String, List<Task>> taskMap = taskService.getTaskMapByProcessInstanceIds(
-                convertList(hiListResult, HistoricProcessInstance::getId));
-        Map<String, ProcessDefinition> processDefinitionMap = processDefinitionService.getProcessDefinitionMap(
-                convertSet(hiListResult, HistoricProcessInstance::getProcessDefinitionId));
-        // 发起人信息
-        Map<Long, AdminUserRespDTO> userMap = adminUserApi.getUserMap(
-                convertSet(hiListResult, processInstance -> NumberUtils.parseLong(processInstance.getStartUserId())));
-        Map<Long, DeptRespDTO> deptMap = deptApi.getDeptMap(
-                convertSet(userMap.values(), AdminUserRespDTO::getDeptId));
-
-
-        List<AchievementDO> achievementList = achievementService.getAchievementByProcessInstanceIds(
-                convertList(hiListResult, HistoricProcessInstance::getId),pageReqVO.getManageId());
-
-
-        List<HistoricProcessInstance>  hiList = new ArrayList<>();
-        List<eveProcessInstanceRespVO> allResults = new ArrayList<>();
-
-        for (HistoricProcessInstance instance : hiListResult) {
-            for (AchievementDO achievement : achievementList) {
-                if (achievement.getProcessInstanceId().equals(instance.getId())) {
-                    hiList.add(instance);
-                    eveProcessInstanceRespVO evpRespVO = BeanUtils.toBean(instance, eveProcessInstanceRespVO.class);
-                    evpRespVO.setAchievementTest(BeanUtils.toBean(achievement, eveProcessInstanceRespVO.Achievement.class));
-                    allResults.add(evpRespVO);
-                }
-            }
-        }
-
-        // 手动实现分页逻辑
-        int total = allResults.size();
-        int hiTotal = hiList.size();
-        int pageSize = pageReqVO.getPageSize();
-        int pageNo = pageReqVO.getPageNo();
-        int fromIndex = Math.min((pageNo - 1) * pageSize, total);
-        int toIndex = Math.min(pageNo * pageSize, total);
-        List<eveProcessInstanceRespVO> pagedResults = allResults.subList(fromIndex, toIndex);
-        List<HistoricProcessInstance> hiResults = hiList.subList(fromIndex, toIndex);
-
-
-        PageResult<eveProcessInstanceRespVO> resultPage = new PageResult<>(pagedResults,(long)total);
-
-        PageResult<HistoricProcessInstance> hiResultPage = new PageResult<>(hiResults,(long)total);
-
-        return success(BpmProcessInstanceConvert.INSTANCE.getProcessInstancePage(hiResultPage,resultPage,
-                processDefinitionMap, taskMap, null,userMap, deptMap));
-    }
+//    @GetMapping("/my-page")
+//    @Operation(summary = "获得我的实例分页列表", description = "在【我的流程】菜单中,进行调用")
+//    @PreAuthorize("@ss.hasAnyPermissions('eve:task:query','eve:achievement:query')")
+//    public CommonResult<PageResult<eveProcessInstanceRespVO>> getProcessInstancePageByLogin(
+//            @Valid eveProcessInstanceReqVO pageReqVO) {
+//        List<HistoricProcessInstance> hiListResult = processInstanceService.getProcessInstanceList(
+//                getLoginUserId(), pageReqVO);
+//        if (CollUtil.isEmpty(hiListResult)) {
+//            return success(PageResult.empty());
+//        }
+//        // 拼接返回
+//        Map<String, List<Task>> taskMap = taskService.getTaskMapByProcessInstanceIds(
+//                convertList(hiListResult, HistoricProcessInstance::getId));
+//        Map<String, ProcessDefinition> processDefinitionMap = processDefinitionService.getProcessDefinitionMap(
+//                convertSet(hiListResult, HistoricProcessInstance::getProcessDefinitionId));
+//        // 发起人信息
+//        Map<Long, AdminUserRespDTO> userMap = adminUserApi.getUserMap(
+//                convertSet(hiListResult, processInstance -> NumberUtils.parseLong(processInstance.getStartUserId())));
+//        Map<Long, DeptRespDTO> deptMap = deptApi.getDeptMap(
+//                convertSet(userMap.values(), AdminUserRespDTO::getDeptId));
+//
+//
+//        List<AchievementDO> achievementList = achievementService.getAchievementByProcessInstanceIds(
+//                convertList(hiListResult, HistoricProcessInstance::getId),pageReqVO.getManageId());
+//
+//
+//        List<HistoricProcessInstance>  hiList = new ArrayList<>();
+//        List<eveProcessInstanceRespVO> allResults = new ArrayList<>();
+//
+//        for (HistoricProcessInstance instance : hiListResult) {
+//            for (AchievementDO achievement : achievementList) {
+//                if (achievement.getProcessInstanceId().equals(instance.getId())) {
+//                    hiList.add(instance);
+//                    eveProcessInstanceRespVO evpRespVO = BeanUtils.toBean(instance, eveProcessInstanceRespVO.class);
+//                    evpRespVO.setAchievementTest(BeanUtils.toBean(achievement, eveProcessInstanceRespVO.Achievement.class));
+//                    allResults.add(evpRespVO);
+//                }
+//            }
+//        }
+//
+//        // 手动实现分页逻辑
+//        int total = allResults.size();
+//        int hiTotal = hiList.size();
+//        int pageSize = pageReqVO.getPageSize();
+//        int pageNo = pageReqVO.getPageNo();
+//        int fromIndex = Math.min((pageNo - 1) * pageSize, total);
+//        int toIndex = Math.min(pageNo * pageSize, total);
+//        List<eveProcessInstanceRespVO> pagedResults = allResults.subList(fromIndex, toIndex);
+//        List<HistoricProcessInstance> hiResults = hiList.subList(fromIndex, toIndex);
+//
+//
+//        PageResult<eveProcessInstanceRespVO> resultPage = new PageResult<>(pagedResults,(long)total);
+//
+//        PageResult<HistoricProcessInstance> hiResultPage = new PageResult<>(hiResults,(long)total);
+//
+//        return success(BpmProcessInstanceConvert.INSTANCE.getProcessInstancePage(hiResultPage,resultPage,
+//                processDefinitionMap, taskMap, null,userMap, deptMap));
+//    }
 
     @GetMapping("todo-page")
     @Operation(summary = "获取 Todo 待办任务分页")
@@ -144,80 +144,80 @@ public class asProcessInstanceController {
         return success(BpmTaskConvert.INSTANCE.buildTodoTaskPage(pageResult, processInstanceMap, userMap));
     }
 
-    @GetMapping("/user-list")
-    @Operation(summary = "获取学生审批项目", description = "在【我的流程】菜单中,进行调用")
-    @PreAuthorize("@ss.hasAnyPermissions('eve:comprehensive-college-manage:query','eve:task:query','eve:comprehensive-manage:query')")
-    public CommonResult<List<eveProcessInstanceRespVO>> getProcessInstanceMyPage(
-            @Valid eveProcessInstanceReqVO pageReqVO) {
-        List<HistoricProcessInstance> hiListResult = processInstanceService.getProcessInstanceList(
-                pageReqVO.getStartUserId(), pageReqVO);
-        if (CollUtil.isEmpty(hiListResult)) {
-            return success(null);
-        }
-
-        // 拼接返回
-        Map<String, List<Task>> taskMap = taskService.getTaskMapByProcessInstanceIds(
-                convertList(hiListResult, HistoricProcessInstance::getId));
-
-        // 拼接返回
-        Map<String, List<Task>> taskMapUser = taskService.getTaskMapByProcessInstanceIdsAndUser(
-                convertList(hiListResult, HistoricProcessInstance::getId),WebFrameworkUtils.getLoginUserId());
-
-        Map<String, ProcessDefinition> processDefinitionMap = processDefinitionService.getProcessDefinitionMap(
-                convertSet(hiListResult, HistoricProcessInstance::getProcessDefinitionId));
-
-        // 发起人信息
-        Map<Long, AdminUserRespDTO> userMap = adminUserApi.getUserMap(
-                convertSet(hiListResult, processInstance -> NumberUtils.parseLong(processInstance.getStartUserId())));
-        Map<Long, DeptRespDTO> deptMap = deptApi.getDeptMap(
-                convertSet(userMap.values(), AdminUserRespDTO::getDeptId));
-
-
-        List<HistoricProcessInstance> ListResult = new ArrayList<>();
-
-        List<AchievementDO> achievementList = achievementService.getAchievementByProcessInstanceIds(
-                convertList(hiListResult, HistoricProcessInstance::getId),pageReqVO.getManageId());
-
-        List<eveProcessInstanceRespVO> vpPageResult = new ArrayList<>();
-
-        for (HistoricProcessInstance respVO : hiListResult) {
-            for(AchievementDO achievement : achievementList){
-                if(achievement.getProcessInstanceId().equals(respVO.getId())){
-                    ListResult.add(respVO);
-                    eveProcessInstanceRespVO eveRespVO = BeanUtils.toBean(respVO, eveProcessInstanceRespVO.class);
-                    eveRespVO.setAchievementTest(BeanUtils.toBean(achievement, eveProcessInstanceRespVO.Achievement.class));
-                    vpPageResult.add(eveRespVO);
-                }
-            }
-        }
-        return success(BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceList(ListResult,vpPageResult,
-                processDefinitionMap, taskMap,taskMapUser, userMap, deptMap));
-    }
-
-    @GetMapping("/get")
-    @Operation(summary = "获得指定流程实例", description = "在【流程详细】界面中,进行调用")
-    @Parameter(name = "id", description = "流程实例的编号", required = true)
-    @PreAuthorize("@ss.hasAnyPermissions('eve:task:query','eve:achievement:query')  || @ss.hasAnyRoles('xgcxueshengguanli')")
-    public CommonResult<BpmProcessInstanceRespVO> getProcessInstance(@RequestParam("id") String id) {
-        HistoricProcessInstance processInstance = processInstanceService.getHistoricProcessInstance(id);
-        if (processInstance == null) {
-            return success(null);
-        }
-        // 拼接返回
-        ProcessDefinition processDefinition = processDefinitionService.getProcessDefinition(
-                processInstance.getProcessDefinitionId());
-        BpmProcessDefinitionInfoDO processDefinitionInfo = processDefinitionService.getProcessDefinitionInfo(
-                processInstance.getProcessDefinitionId());
-        String bpmnXml = BpmnModelUtils.getBpmnXml(
-                processDefinitionService.getProcessDefinitionBpmnModel(processInstance.getProcessDefinitionId()));
-        AdminUserRespDTO startUser = adminUserApi.getUser(NumberUtils.parseLong(processInstance.getStartUserId()));
-        DeptRespDTO dept = null;
-        if (startUser != null) {
-            dept = deptApi.getDept(startUser.getDeptId());
-        }
-        return success(BpmProcessInstanceConvert.INSTANCE.buildProcessInstance(processInstance,
-                processDefinition, processDefinitionInfo, bpmnXml, startUser, dept));
-    }
+//    @GetMapping("/user-list")
+//    @Operation(summary = "获取学生审批项目", description = "在【我的流程】菜单中,进行调用")
+//    @PreAuthorize("@ss.hasAnyPermissions('eve:comprehensive-college-manage:query','eve:task:query','eve:comprehensive-manage:query')")
+//    public CommonResult<List<eveProcessInstanceRespVO>> getProcessInstanceMyPage(
+//            @Valid eveProcessInstanceReqVO pageReqVO) {
+//        List<HistoricProcessInstance> hiListResult = processInstanceService.getProcessInstanceList(
+//                pageReqVO.getStartUserId(), pageReqVO);
+//        if (CollUtil.isEmpty(hiListResult)) {
+//            return success(null);
+//        }
+//
+//        // 拼接返回
+//        Map<String, List<Task>> taskMap = taskService.getTaskMapByProcessInstanceIds(
+//                convertList(hiListResult, HistoricProcessInstance::getId));
+//
+//        // 拼接返回
+//        Map<String, List<Task>> taskMapUser = taskService.getTaskMapByProcessInstanceIdsAndUser(
+//                convertList(hiListResult, HistoricProcessInstance::getId),WebFrameworkUtils.getLoginUserId());
+//
+//        Map<String, ProcessDefinition> processDefinitionMap = processDefinitionService.getProcessDefinitionMap(
+//                convertSet(hiListResult, HistoricProcessInstance::getProcessDefinitionId));
+//
+//        // 发起人信息
+//        Map<Long, AdminUserRespDTO> userMap = adminUserApi.getUserMap(
+//                convertSet(hiListResult, processInstance -> NumberUtils.parseLong(processInstance.getStartUserId())));
+//        Map<Long, DeptRespDTO> deptMap = deptApi.getDeptMap(
+//                convertSet(userMap.values(), AdminUserRespDTO::getDeptId));
+//
+//
+//        List<HistoricProcessInstance> ListResult = new ArrayList<>();
+//
+//        List<AchievementDO> achievementList = achievementService.getAchievementByProcessInstanceIds(
+//                convertList(hiListResult, HistoricProcessInstance::getId),pageReqVO.getManageId());
+//
+//        List<eveProcessInstanceRespVO> vpPageResult = new ArrayList<>();
+//
+//        for (HistoricProcessInstance respVO : hiListResult) {
+//            for(AchievementDO achievement : achievementList){
+//                if(achievement.getProcessInstanceId().equals(respVO.getId())){
+//                    ListResult.add(respVO);
+//                    eveProcessInstanceRespVO eveRespVO = BeanUtils.toBean(respVO, eveProcessInstanceRespVO.class);
+//                    eveRespVO.setAchievementTest(BeanUtils.toBean(achievement, eveProcessInstanceRespVO.Achievement.class));
+//                    vpPageResult.add(eveRespVO);
+//                }
+//            }
+//        }
+//        return success(BpmProcessInstanceConvert.INSTANCE.buildProcessInstanceList(ListResult,vpPageResult,
+//                processDefinitionMap, taskMap,taskMapUser, userMap, deptMap));
+//    }
+
+//    @GetMapping("/get")
+//    @Operation(summary = "获得指定流程实例", description = "在【流程详细】界面中,进行调用")
+//    @Parameter(name = "id", description = "流程实例的编号", required = true)
+//    @PreAuthorize("@ss.hasAnyPermissions('eve:task:query','eve:achievement:query')  || @ss.hasAnyRoles('xgcxueshengguanli')")
+//    public CommonResult<BpmProcessInstanceRespVO> getProcessInstance(@RequestParam("id") String id) {
+//        HistoricProcessInstance processInstance = processInstanceService.getHistoricProcessInstance(id);
+//        if (processInstance == null) {
+//            return success(null);
+//        }
+//        // 拼接返回
+//        ProcessDefinition processDefinition = processDefinitionService.getProcessDefinition(
+//                processInstance.getProcessDefinitionId());
+//        BpmProcessDefinitionInfoDO processDefinitionInfo = processDefinitionService.getProcessDefinitionInfo(
+//                processInstance.getProcessDefinitionId());
+//        String bpmnXml = BpmnModelUtils.getBpmnXml(
+//                processDefinitionService.getProcessDefinitionBpmnModel(processInstance.getProcessDefinitionId()));
+//        AdminUserRespDTO startUser = adminUserApi.getUser(NumberUtils.parseLong(processInstance.getStartUserId()));
+//        DeptRespDTO dept = null;
+//        if (startUser != null) {
+//            dept = deptApi.getDept(startUser.getDeptId());
+//        }
+//        return success(BpmProcessInstanceConvert.INSTANCE.buildProcessInstance(processInstance,
+//                processDefinition, processDefinitionInfo, bpmnXml, startUser, dept));
+//    }
 
 
 

+ 212 - 228
yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/controller/admin/task/asTaskController.java

@@ -2,11 +2,14 @@ package cn.iocoder.yudao.module.as.controller.admin.task;
 
 import cn.hutool.core.collection.CollUtil;
 import cn.iocoder.yudao.framework.common.pojo.CommonResult;
+import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils;
 import cn.iocoder.yudao.framework.common.util.number.NumberUtils;
 import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
 import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
-import cn.iocoder.yudao.module.as.controller.admin.aidingstudentspersonmanage.vo.AidingStudentsPersonManageClassPageReqVO;
-import cn.iocoder.yudao.module.as.controller.admin.aidingstudentspersonmanage.vo.AidingStudentsPersonManageUploadRespVO;
+import cn.iocoder.yudao.module.as.controller.admin.aidingstudentspersonmanage.vo.AidingStudentPersonManageClassVO;
+import cn.iocoder.yudao.module.as.controller.admin.aidingstudentspersonmanage.vo.AidingStudentPersonManageInfoPageReqVO;
+import cn.iocoder.yudao.module.as.controller.admin.aidingstudentspersonmanage.vo.AidingStudentPersonManageInfoRespVO;
+import cn.iocoder.yudao.module.as.controller.admin.task.vo.task.asTaskRespVO;
 import cn.iocoder.yudao.module.as.dal.dataobject.aidingstudentspersonmanage.AidingStudentsPersonManageDO;
 import cn.iocoder.yudao.module.as.service.aidingstudentspersonmanage.AidingStudentsPersonManageService;
 import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.BpmTaskPageReqVO;
@@ -34,6 +37,7 @@ import org.springframework.web.bind.annotation.*;
 import javax.annotation.Resource;
 import javax.validation.Valid;
 import java.util.*;
+import java.util.function.Function;
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
 import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
@@ -62,12 +66,7 @@ public class asTaskController {
     @GetMapping("/todo-page-aiding")
     @Operation(summary = "获取 Todo 综测审批待办任务分页")
     @PreAuthorize("@ss.hasPermission('eve:task:query')")
-    public CommonResult<List<AidingStudentsPersonManageUploadRespVO>> getTaskTodoPageAiding(@Valid BpmTaskPageReqVO pageVO) {
-        //获取班级id
-        Long deptId = adminUserApi.getUser(getLoginUserId()).getDeptId();
-        //获取所属学院id
-        Long collegeId = deptApi.getCollegeId(deptId);
-
+    public CommonResult<Map<String,List<AidingStudentPersonManageInfoPageReqVO>>> getTaskTodoPageAiding(@Valid BpmTaskPageReqVO pageVO) {
         //获取我的任务中家困任务的列表
         List<Task> pageResult = taskService.getTaskTodoPageAidingList(getLoginUserId(), pageVO);
 
@@ -81,22 +80,11 @@ public class asTaskController {
                         convertList(pageResult,Task::getProcessInstanceId),pageVO
                 );
 
+        Map<String, List<AidingStudentPersonManageInfoPageReqVO>> classNameMap =
+                BeanUtils.toBean(aidingStudentsPersonList, AidingStudentPersonManageInfoPageReqVO.class).stream()
+                        .collect(Collectors.groupingBy(AidingStudentPersonManageInfoPageReqVO::getClassName));
 
-//        //获取任务列表中的家庭经济认定实例,aidingStudentsPersonList
-//        List<AidingStudentsPersonManageUploadRespVO> aidingStudentsPersonList =
-//                aidingStudentsPersonManageService.getAidingStudentsPersonManageClassPage();
-
-
-        Map<Long, ComprehensiveManageDO> comprehensiveManage =
-                comprehensiveManageService.getManagetMap(convertSet(achievementList, AchievementDO::getManageId));
-
-        Map<Long, AdminUserRespDTO> userMap = adminUserApi.getUserMap(
-                convertSet(achievementList, AchievementDO::getUserId));
-        Map<Long, DeptRespDTO> deptMap = deptApi.getDeptMap(
-                convertSet(userMap.values(), AdminUserRespDTO::getDeptId));
-
-        return success(eveTaskConvert.INSTANCE.buildTodoTaskPageComprehensive(
-                userMap,deptMap,comprehensiveManage,achievementList,deptId));
+        return success(classNameMap);
     }
 
 
@@ -110,7 +98,6 @@ public class asTaskController {
         if (CollUtil.isEmpty(taskList)) {
             return success(Collections.emptyList());
         }
-
         // 拼接数据
         HistoricProcessInstance processInstance = processInstanceService.getHistoricProcessInstance(processInstanceId);
         // 获得 User 和 Dept Map
@@ -131,219 +118,216 @@ public class asTaskController {
     @GetMapping("/done-page-comprehensive")
     @Operation(summary = "获取 Done 综测审批已办任务分页")
     @PreAuthorize("@ss.hasPermission('eve:task:query')")
-    public CommonResult<List<AchievementRespVO>> getTaskDonePageComprehensive(@Valid BpmTaskPageReqVO pageVO) {
+    public CommonResult<Map<String,List<AidingStudentPersonManageInfoPageReqVO>>> getTaskDonePageComprehensive(@Valid BpmTaskPageReqVO pageVO) {
         List<HistoricTaskInstance> pageResult = taskService.getTaskDonePageComprehensive(getLoginUserId(), pageVO);
         if (CollUtil.isEmpty(pageResult)) {
             return success(null);
         }
-        List<AchievementDO> achievementList = achievementService.selectByProcessInstanceIdsGroupByUser(
-                convertList(pageResult,HistoricTaskInstance::getProcessInstanceId),pageVO);
-
-        // 移除当前元素
-        achievementList.removeIf(achievementDO -> achievementDO.getUserId().equals(getLoginUserId()));
-
-        Map<Long, ComprehensiveManageDO> comprehensiveManage =
-                comprehensiveManageService.getManagetMap(convertSet(achievementList, AchievementDO::getManageId));
-
-
-        Map<Long, AdminUserRespDTO> userMap = adminUserApi.getUserMap(
-                convertSet(achievementList, AchievementDO::getUserId));
-        Map<Long, DeptRespDTO> deptMap = deptApi.getDeptMap(
-                convertSet(userMap.values(), AdminUserRespDTO::getDeptId));
-        return success(asTaskConvert.INSTANCE.buildTaskComprehensive(achievementList, userMap, deptMap,comprehensiveManage));
-    }
-
-    @GetMapping("done-user-list")
-    @Operation(summary = "获取 Done 综测审批已办任务个人")
-    @PreAuthorize("@ss.hasPermission('eve:task:query')")
-    public CommonResult<List<eveTaskRespVO>>  getTaskDoneByPeople(@Valid  BpmTaskPageReqVO pageVO) {
-
-        Long startUserId = pageVO.getUserId();
-        List<AchievementDO> achievementList
-                = achievementService.getAchievementByPeopleAndManageId(startUserId,pageVO.getManageId());
-
-        Map<String, AchievementDO> achievementDOMap = convertMap(achievementList,AchievementDO::getProcessInstanceId);
-        Collection<String> processInstanceIds = convertSet(achievementList,AchievementDO::getProcessInstanceId);
-
-        List<HistoricTaskInstance> pageResult
-                = taskService.getTaskDoneByPeopleAndProcessInstanceIds(getLoginUserId(), pageVO , processInstanceIds);
-
-        // 使用 Stream API 来处理
-        Map<String, HistoricTaskInstance> latestTasks = pageResult.stream()
-                .collect(Collectors.toMap(
-                        HistoricTaskInstance::getProcessInstanceId,
-                        task -> task,
-                        (existingTask, newTask) -> newTask.getEndTime().after(existingTask.getEndTime()) ? newTask : existingTask
-                ));
-
-        pageResult.removeIf(task -> !latestTasks.get(task.getProcessInstanceId()).equals(task));
-
-
-        if (CollUtil.isEmpty(pageResult)) {
-            return success(null);
-        }
-
-        Map<String, HistoricProcessInstance> processInstanceMap = processInstanceService.getHistoricProcessInstanceMap(
-                convertSet(pageResult, HistoricTaskInstance::getProcessInstanceId));
-        Map<Long, AdminUserRespDTO> userMap = adminUserApi.getUserMap(
-                convertSet(processInstanceMap.values(), instance -> Long.valueOf(instance.getStartUserId())));
-
-        return success(eveTaskConvert.INSTANCE.buildTaskDoneByPeople(pageResult, processInstanceMap, userMap,achievementDOMap));
-    }
-
-    @PutMapping("/approve")
-    @Operation(summary = "通过单项综测审批")
-    @PreAuthorize("@ss.hasPermission('eve:task:update')")
-    public CommonResult<Boolean> approveTask(@Valid @RequestBody BpmTaskApproveReqVO reqVO) {
-        taskService.approveTaskAchievement(getLoginUserId(), reqVO);
-        return success(true);
-    }
-
-    @PutMapping("/approve-edit")
-    @Operation(summary = "单项审批修改")
-    @PreAuthorize("@ss.hasPermission('eve:achievement:update')")
-    public CommonResult<Boolean> approveTaskEdit(@Valid @RequestBody BpmTaskApproveReqVO reqVO) {
-        taskService.approveTaskAchievement(getLoginUserId(), reqVO);
-        return success(true);
-    }
-
-    @PutMapping("/approve-people")
-    @Operation(summary = "整体通过综测审批")
-    @PreAuthorize("@ss.hasPermission('eve:task:update')")
-    public CommonResult<Boolean> approveTaskByPeople(@Valid @RequestBody List<BpmTaskApproveReqVO> reqVOList) {
-        taskService.approveTaskAchievementByPeople(getLoginUserId(), reqVOList);
-
-        return success(true);
-    }
-
-    @PostMapping("/approve-college-rank")
-    @Operation(summary = "学院针对当前完成互评状态的条目进行审核并发起公示和排名")
-    @PreAuthorize("@ss.hasPermission('eve:comprehensive-college-manage:update')")
-    @Transactional
-    public CommonResult<Boolean> approveTaskAndRankByCollege(@Valid @RequestBody BpmTaskPageReqVO pageVO) {
-        Long deptId = adminUserApi.getUser(getLoginUserId()).getDeptId();
-        Long collegeId =  deptApi.getCollegeId(deptId);
-        DeptRespDTO dept = deptApi.getDept(collegeId);
-        ComprehensiveCollegeManageDO comprehensiveCollegeManage
-                =  comprehensiveCollegeManageService.getComprehensiveCollegeManage(pageVO.getManageId(), collegeId);
-
-        if(comprehensiveCollegeManage.getComStatus() != 1){
-            throw exception(ALREADY_PUBLICIZED);
-        }
-        comprehensiveCollegeManage.setComStatus(2);
-        comprehensiveCollegeManageService.updateComprehensiveCollegeManage(
-                BeanUtils.toBean(comprehensiveCollegeManage, ComprehensiveCollegeManageSaveReqVO.class)
-        );
-        List<Task> pageResult = taskService.getTaskTodoPageComprehensive(getLoginUserId(), pageVO);
-
-        if (CollUtil.isEmpty(pageResult)) {
-            return success(null);
-        }
-
-        List<AchievementDO> achievementList = achievementService.getAchievementByProcessInstanceIds(
-                convertList(pageResult,Task::getProcessInstanceId),pageVO.getManageId());
 
-        List<BpmTaskApproveReqVO> vpPageResult = new ArrayList<>();
-
-        for (Task respVO : pageResult) {
-            for(AchievementDO achievement : achievementList){
-                if(achievement.getProcessInstanceId().equals(respVO.getProcessInstanceId())){
-                    BpmTaskApproveReqVO eveRespVO = BeanUtils.toBean(respVO, BpmTaskApproveReqVO.class);
-                    vpPageResult.add(eveRespVO);
-                }
-            }
-        }
-
-        taskService.approveTaskAchievementByPeople(getLoginUserId(), vpPageResult);
-
-        comprehensiveService.comprehensiveCalculateByCollegeID(
-                collegeId,pageVO.getManageId(),1 , "学院公示"
-        );
-
-        comprehensiveService.comprehensiveRanking(collegeId,dept.getBs(),pageVO.getManageId());
-
-        return success(true);
-    }
-
-    @GetMapping("/approve-college")
-    @Operation(summary = "学院确认(即批量通过当前状态为学院公示的审批)")
-    @PreAuthorize("@ss.hasPermission('eve:comprehensive-college-manage:update')")
-    @Transactional
-    public CommonResult<Boolean> approveTaskByCollege(@Valid BpmTaskPageReqVO pageVO) {
-        List<Task> pageResult = taskService.getTaskTodoPageComprehensive(getLoginUserId(), pageVO);
-        if (CollUtil.isEmpty(pageResult)) {
-            return success(null);
-        }
-        Long deptId = adminUserApi.getUser(SecurityFrameworkUtils.getLoginUserId()).getDeptId();
-        Long collegeId =  deptApi.getCollegeId(deptId);
-        ComprehensiveCollegeManageDO comprehensiveCollegeManage
-                =  comprehensiveCollegeManageService.getComprehensiveCollegeManage(pageVO.getManageId(), collegeId);
-        if(comprehensiveCollegeManage.getComStatus() != 2){
-            throw exception(PLEASE_START_PUBLICIZED);
-        }
-        comprehensiveCollegeManageService.updateComprehensiveCollegeManage(
-                BeanUtils.toBean(comprehensiveCollegeManage.setComStatus(3), ComprehensiveCollegeManageSaveReqVO.class)
-        );
-        List<AchievementDO> achievementList = achievementService.getAchievementByProcessInstanceIds(
-                convertList(pageResult,Task::getProcessInstanceId),pageVO.getManageId());
-
-        List<BpmTaskApproveReqVO> vpPageResult = new ArrayList<>();
-
-        for (Task respVO : pageResult) {
-            for(AchievementDO achievement : achievementList){
-                if(achievement.getProcessInstanceId().equals(respVO.getProcessInstanceId())){
-                    BpmTaskApproveReqVO eveRespVO = BeanUtils.toBean(respVO, BpmTaskApproveReqVO.class);
-                    vpPageResult.add(eveRespVO);
-                }
-            }
-        }
-        taskService.approveTaskAchievementByPeople(getLoginUserId(), vpPageResult);
-        return success(true);
-    }
-
-    @PutMapping("/reject-update")
-    @Operation(summary = "不通过任务:驳回到审批人处")
-    @PreAuthorize("@ss.hasPermission('eve:task:update')")
-    public CommonResult<Boolean> rejectAchievementTask(@Valid @RequestBody BpmTaskApproveReqVO reqVO) {
-        taskService.rejectAchievementTask(getLoginUserId(), reqVO);
-
-        return success(true);
-    }
-
-    @PutMapping("/reject-people-update")
-    @Operation(summary = "整体不通过任务:驳回到审批人处")
-    @PreAuthorize("@ss.hasPermission('eve:task:update')")
-    public CommonResult<Boolean> rejectAchievementTaskByPeople(@Valid @RequestBody List<BpmTaskApproveReqVO> reqVOList) {
-        taskService.rejectAchievementTaskByPeople(getLoginUserId(), reqVOList);
-        return success(true);
-    }
+        //根据当前任务的idList获取 ,返回关于项目与班级分组的学生材料
+        List<AidingStudentsPersonManageDO> aidingStudentsPersonList =
+                aidingStudentsPersonManageService.getAidingStudentsPersonManageClassPage(
+                        convertList(pageResult,HistoricTaskInstance::getProcessInstanceId),pageVO
+                );
 
-    @PutMapping("/reject")
-    @Operation(summary = "不通过任务:直接结束流程")
-    @PreAuthorize("@ss.hasPermission('eve:task:update')")
-    public CommonResult<Boolean> rejectTask(@Valid @RequestBody BpmTaskRejectReqVO reqVO) {
-        taskService.rejectTask(getLoginUserId(), reqVO);
-        return success(true);
-    }
+        Map<String, List<AidingStudentPersonManageInfoPageReqVO>> classNameMap =
+                BeanUtils.toBean(aidingStudentsPersonList, AidingStudentPersonManageInfoPageReqVO.class).stream()
+                        .collect(Collectors.groupingBy(AidingStudentPersonManageInfoPageReqVO::getClassName));
 
-    @PutMapping("/reject-people")
-    @Operation(summary = "整体不通过综测审批:直接结束流程")
-    @PreAuthorize("@ss.hasPermission('eve:task:update')")
-    public CommonResult<Boolean> rejectTaskByPeople(@Valid @RequestBody List<BpmTaskRejectReqVO> reqVOList) {
-        taskService.rejectTaskByPeople(getLoginUserId(), reqVOList);
-        return success(true);
+        return success(classNameMap);
     }
 
-    @PutMapping("/reject-undo")
-    @Operation(summary = "在下一个人审批前退回审批")
-    @PreAuthorize("@ss.hasPermission('eve:task:update')")
-    public CommonResult<Boolean> rejectUndoTask(@Valid @RequestBody BpmTaskUndoReqVO reqVO) {
-        taskService.UndoTask(getLoginUserId(), reqVO);
+//    @GetMapping("done-user-list")
+//    @Operation(summary = "获取 Done 综测审批已办任务个人")
+//    @PreAuthorize("@ss.hasPermission('eve:task:query')")
+//    public CommonResult<List<asTaskRespVO>>  getTaskDoneByPeople(@Valid  BpmTaskPageReqVO pageVO) {
+//
+//        Long startUserId = pageVO.getUserId();
+//        List<AidingStudentsPersonManageDO> achievementList
+//                = aidingStudentsPersonManageService.getAchievementByPeopleAndManageId(startUserId,pageVO.getManageId());
+//
+//        Map<String, AchievementDO> achievementDOMap = convertMap(achievementList,AidingStudentsPersonManageDO::getProcessInstanceId);
+//        Collection<String> processInstanceIds = convertSet(achievementList,AidingStudentsPersonManageDO::getProcessInstanceId);
+//
+//        List<HistoricTaskInstance> pageResult
+//                = taskService.getTaskDoneByPeopleAndProcessInstanceIds(getLoginUserId(), pageVO , processInstanceIds);
+//
+//        // 使用 Stream API 来处理
+//        Map<String, HistoricTaskInstance> latestTasks = pageResult.stream()
+//                .collect(Collectors.toMap(
+//                        HistoricTaskInstance::getProcessInstanceId,
+//                        task -> task,
+//                        (existingTask, newTask) -> newTask.getEndTime().after(existingTask.getEndTime()) ? newTask : existingTask
+//                ));
+//
+//        pageResult.removeIf(task -> !latestTasks.get(task.getProcessInstanceId()).equals(task));
+//
+//
+//        if (CollUtil.isEmpty(pageResult)) {
+//            return success(null);
+//        }
+//
+//        Map<String, HistoricProcessInstance> processInstanceMap = processInstanceService.getHistoricProcessInstanceMap(
+//                convertSet(pageResult, HistoricTaskInstance::getProcessInstanceId));
+//        Map<Long, AdminUserRespDTO> userMap = adminUserApi.getUserMap(
+//                convertSet(processInstanceMap.values(), instance -> Long.valueOf(instance.getStartUserId())));
+//
+//        return success(eveTaskConvert.INSTANCE.buildTaskDoneByPeople(pageResult, processInstanceMap, userMap,achievementDOMap));
+//    }
+//
+//    @PutMapping("/approve")
+//    @Operation(summary = "通过单项综测审批")
+//    @PreAuthorize("@ss.hasPermission('eve:task:update')")
+//    public CommonResult<Boolean> approveTask(@Valid @RequestBody BpmTaskApproveReqVO reqVO) {
+//        taskService.approveTaskAchievement(getLoginUserId(), reqVO);
+//        return success(true);
+//    }
+//
+//    @PutMapping("/approve-edit")
+//    @Operation(summary = "单项审批修改")
+//    @PreAuthorize("@ss.hasPermission('eve:achievement:update')")
+//    public CommonResult<Boolean> approveTaskEdit(@Valid @RequestBody BpmTaskApproveReqVO reqVO) {
+//        taskService.approveTaskAchievement(getLoginUserId(), reqVO);
+//        return success(true);
+//    }
+//
+//    @PutMapping("/approve-people")
+//    @Operation(summary = "整体通过综测审批")
+//    @PreAuthorize("@ss.hasPermission('eve:task:update')")
+//    public CommonResult<Boolean> approveTaskByPeople(@Valid @RequestBody List<BpmTaskApproveReqVO> reqVOList) {
+//        taskService.approveTaskAchievementByPeople(getLoginUserId(), reqVOList);
+//
+//        return success(true);
+//    }
+//
+//    @PostMapping("/approve-college-rank")
+//    @Operation(summary = "学院针对当前完成互评状态的条目进行审核并发起公示和排名")
+//    @PreAuthorize("@ss.hasPermission('eve:comprehensive-college-manage:update')")
+//    @Transactional
+//    public CommonResult<Boolean> approveTaskAndRankByCollege(@Valid @RequestBody BpmTaskPageReqVO pageVO) {
+//        Long deptId = adminUserApi.getUser(getLoginUserId()).getDeptId();
+//        Long collegeId =  deptApi.getCollegeId(deptId);
+//        DeptRespDTO dept = deptApi.getDept(collegeId);
+//        ComprehensiveCollegeManageDO comprehensiveCollegeManage
+//                =  comprehensiveCollegeManageService.getComprehensiveCollegeManage(pageVO.getManageId(), collegeId);
+//
+//        if(comprehensiveCollegeManage.getComStatus() != 1){
+//            throw exception(ALREADY_PUBLICIZED);
+//        }
+//        comprehensiveCollegeManage.setComStatus(2);
+//        comprehensiveCollegeManageService.updateComprehensiveCollegeManage(
+//                BeanUtils.toBean(comprehensiveCollegeManage, ComprehensiveCollegeManageSaveReqVO.class)
+//        );
+//        List<Task> pageResult = taskService.getTaskTodoPageComprehensive(getLoginUserId(), pageVO);
+//
+//        if (CollUtil.isEmpty(pageResult)) {
+//            return success(null);
+//        }
+//
+//        List<AchievementDO> achievementList = achievementService.getAchievementByProcessInstanceIds(
+//                convertList(pageResult,Task::getProcessInstanceId),pageVO.getManageId());
+//
+//        List<BpmTaskApproveReqVO> vpPageResult = new ArrayList<>();
+//
+//        for (Task respVO : pageResult) {
+//            for(AchievementDO achievement : achievementList){
+//                if(achievement.getProcessInstanceId().equals(respVO.getProcessInstanceId())){
+//                    BpmTaskApproveReqVO eveRespVO = BeanUtils.toBean(respVO, BpmTaskApproveReqVO.class);
+//                    vpPageResult.add(eveRespVO);
+//                }
+//            }
+//        }
+//
+//        taskService.approveTaskAchievementByPeople(getLoginUserId(), vpPageResult);
+//
+//        comprehensiveService.comprehensiveCalculateByCollegeID(
+//                collegeId,pageVO.getManageId(),1 , "学院公示"
+//        );
+//
+//        comprehensiveService.comprehensiveRanking(collegeId,dept.getBs(),pageVO.getManageId());
+//
+//        return success(true);
+//    }
+//
+//    @GetMapping("/approve-college")
+//    @Operation(summary = "学院确认(即批量通过当前状态为学院公示的审批)")
+//    @PreAuthorize("@ss.hasPermission('eve:comprehensive-college-manage:update')")
+//    @Transactional
+//    public CommonResult<Boolean> approveTaskByCollege(@Valid BpmTaskPageReqVO pageVO) {
+//        List<Task> pageResult = taskService.getTaskTodoPageComprehensive(getLoginUserId(), pageVO);
+//        if (CollUtil.isEmpty(pageResult)) {
+//            return success(null);
+//        }
+//        Long deptId = adminUserApi.getUser(SecurityFrameworkUtils.getLoginUserId()).getDeptId();
+//        Long collegeId =  deptApi.getCollegeId(deptId);
+//        ComprehensiveCollegeManageDO comprehensiveCollegeManage
+//                =  comprehensiveCollegeManageService.getComprehensiveCollegeManage(pageVO.getManageId(), collegeId);
+//        if(comprehensiveCollegeManage.getComStatus() != 2){
+//            throw exception(PLEASE_START_PUBLICIZED);
+//        }
+//        comprehensiveCollegeManageService.updateComprehensiveCollegeManage(
+//                BeanUtils.toBean(comprehensiveCollegeManage.setComStatus(3), ComprehensiveCollegeManageSaveReqVO.class)
+//        );
+//        List<AchievementDO> achievementList = achievementService.getAchievementByProcessInstanceIds(
+//                convertList(pageResult,Task::getProcessInstanceId),pageVO.getManageId());
+//
+//        List<BpmTaskApproveReqVO> vpPageResult = new ArrayList<>();
+//
+//        for (Task respVO : pageResult) {
+//            for(AchievementDO achievement : achievementList){
+//                if(achievement.getProcessInstanceId().equals(respVO.getProcessInstanceId())){
+//                    BpmTaskApproveReqVO eveRespVO = BeanUtils.toBean(respVO, BpmTaskApproveReqVO.class);
+//                    vpPageResult.add(eveRespVO);
+//                }
+//            }
+//        }
+//        taskService.approveTaskAchievementByPeople(getLoginUserId(), vpPageResult);
+//        return success(true);
+//    }
+//
+//    @PutMapping("/reject-update")
+//    @Operation(summary = "不通过任务:驳回到审批人处")
+//    @PreAuthorize("@ss.hasPermission('eve:task:update')")
+//    public CommonResult<Boolean> rejectAchievementTask(@Valid @RequestBody BpmTaskApproveReqVO reqVO) {
+//        taskService.rejectAchievementTask(getLoginUserId(), reqVO);
+//
+//        return success(true);
+//    }
+//
+//    @PutMapping("/reject-people-update")
+//    @Operation(summary = "整体不通过任务:驳回到审批人处")
+//    @PreAuthorize("@ss.hasPermission('eve:task:update')")
+//    public CommonResult<Boolean> rejectAchievementTaskByPeople(@Valid @RequestBody List<BpmTaskApproveReqVO> reqVOList) {
+//        taskService.rejectAchievementTaskByPeople(getLoginUserId(), reqVOList);
+//        return success(true);
+//    }
+//
+//    @PutMapping("/reject")
+//    @Operation(summary = "不通过任务:直接结束流程")
+//    @PreAuthorize("@ss.hasPermission('eve:task:update')")
+//    public CommonResult<Boolean> rejectTask(@Valid @RequestBody BpmTaskRejectReqVO reqVO) {
+//        taskService.rejectTask(getLoginUserId(), reqVO);
+//        return success(true);
+//    }
+//
+//    @PutMapping("/reject-people")
+//    @Operation(summary = "整体不通过综测审批:直接结束流程")
+//    @PreAuthorize("@ss.hasPermission('eve:task:update')")
+//    public CommonResult<Boolean> rejectTaskByPeople(@Valid @RequestBody List<BpmTaskRejectReqVO> reqVOList) {
 //        taskService.rejectTaskByPeople(getLoginUserId(), reqVOList);
-
-//        return error(400,"改流程不能修改!");
-
-        return success(true);
-    }
+//        return success(true);
+//    }
+//
+//    @PutMapping("/reject-undo")
+//    @Operation(summary = "在下一个人审批前退回审批")
+//    @PreAuthorize("@ss.hasPermission('eve:task:update')")
+//    public CommonResult<Boolean> rejectUndoTask(@Valid @RequestBody BpmTaskUndoReqVO reqVO) {
+//        taskService.UndoTask(getLoginUserId(), reqVO);
+////        taskService.rejectTaskByPeople(getLoginUserId(), reqVOList);
+//
+////        return error(400,"改流程不能修改!");
+//
+//        return success(true);
+//    }
 
 }

+ 55 - 0
yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/controller/admin/task/vo/task/asAidingPageReqVO.java

@@ -0,0 +1,55 @@
+package cn.iocoder.yudao.module.as.controller.admin.task.vo.task;
+
+import cn.iocoder.yudao.framework.common.pojo.PageParam;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.ToString;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.time.LocalDateTime;
+import java.util.List;
+
+import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
+
+@Schema(description = "管理后台 - 综测单项分页 Request VO")
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ToString(callSuper = true)
+public class asAidingPageReqVO extends PageParam {
+
+    @Schema(description = "管理表外键", example = "1")
+    private Long manageId;
+
+    @Schema(description = "学号", example = "27854")
+    private String studentId;
+
+    @Schema(description = "用户Id", example = "27854")
+    private Long userId;
+
+    @Schema(description = "类型(德体美劳)", example = "1")
+    private String type;
+
+    @Schema(description = "级别(国家级、省部级)")
+    private String category;
+
+    @Schema(description = "名称", example = "芋艿")
+    private String name;
+
+    @Schema(description = "分值")
+    private Integer score;
+
+    @Schema(description = "附件路径")
+    private List<String> attachment;
+
+    @Schema(description = "状态值", example = "1")
+    private Integer status;
+
+    @Schema(description = "是否进入个人库")
+    private Integer isRepository;
+    
+    @Schema(description = "创建时间")
+    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
+    private LocalDateTime[] createTime;
+
+}

+ 98 - 0
yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/controller/admin/task/vo/task/asTaskRespVO.java

@@ -0,0 +1,98 @@
+package cn.iocoder.yudao.module.as.controller.admin.task.vo.task;
+
+import cn.iocoder.yudao.module.as.controller.admin.aidingstudentspersonmanage.vo.AidingStudentPersonManageInfoPageReqVO;
+import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceRespVO;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import java.time.LocalDateTime;
+import java.util.List;
+import java.util.Map;
+
+@Schema(description = "管理后台 - 流程任务 Response VO")
+@Data
+public class asTaskRespVO {
+
+    @Schema(description = "任务编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
+    private String id;
+
+    @Schema(description = "任务名字", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
+    private String name;
+
+    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
+    private LocalDateTime createTime;
+
+    @Schema(description = "结束时间", requiredMode = Schema.RequiredMode.REQUIRED)
+    private LocalDateTime endTime;
+
+    @Schema(description = "持续时间", example = "1000")
+    private Long durationInMillis;
+
+    @Schema(description = "任务状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
+    private Integer status; // 参见 BpmTaskStatusEnum 枚举
+
+    @Schema(description = "审批理由", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
+    private String reason;
+
+    /**
+     * 负责人的用户信息
+     */
+    private BpmProcessInstanceRespVO.User ownerUser;
+    /**
+     * 审核的用户信息
+     */
+    private BpmProcessInstanceRespVO.User assigneeUser;
+
+    @Schema(description = "任务定义的标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "Activity_one")
+    private String taskDefinitionKey;
+
+    @Schema(description = "所属流程实例编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "8888")
+    private String processInstanceId;
+    /**
+     * 所属流程实例
+     */
+    private ProcessInstance processInstance;
+
+    @Schema(description = "父任务编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
+    private String parentTaskId;
+    @Schema(description = "子任务列表(由加签生成)", requiredMode = Schema.RequiredMode.REQUIRED, example = "childrenTask")
+    private List<asTaskRespVO> children;
+
+    @Schema(description = "表单编号", example = "1024")
+    private Long formId;
+    @Schema(description = "表单名字", example = "请假表单")
+    private String formName;
+    @Schema(description = "表单的配置-JSON 字符串")
+    private String formConf;
+    @Schema(description = "表单项的数组")
+    private List<String> formFields;
+    @Schema(description = "提交的表单值", requiredMode = Schema.RequiredMode.REQUIRED)
+    private Map<String, Object> formVariables;
+
+    @Schema(description = "综测单项的流程实例")
+    private AidingStudentPersonManageInfoPageReqVO aidingStudentPersonManageInfo;
+
+    @Data
+    @Schema(description = "流程实例")
+    public static class ProcessInstance {
+
+        @Schema(description = "流程实例编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
+        private String id;
+
+        @Schema(description = "流程实例名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
+        private String name;
+
+        @Schema(description = "提交时间", requiredMode = Schema.RequiredMode.REQUIRED)
+        private LocalDateTime createTime;
+
+        @Schema(description = "流程定义的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048")
+        private String processDefinitionId;
+
+        /**
+         * 发起人的用户信息
+         */
+        private BpmProcessInstanceRespVO.User startUser;
+
+    }
+
+}

+ 207 - 0
yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/convert/task/asTaskConvert.java

@@ -0,0 +1,207 @@
+package cn.iocoder.yudao.module.as.convert.task;
+
+import org.flowable.task.service.impl.persistence.entity.TaskEntityImpl;
+import org.mapstruct.Mapper;
+import org.mapstruct.factory.Mappers;
+
+import java.util.Date;
+
+import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMultiMap;
+
+/**
+ * Bpm 任务 Convert
+ *
+ * @author 芋道源码
+ */
+@Mapper
+public interface asTaskConvert {
+
+    asTaskConvert INSTANCE = Mappers.getMapper(asTaskConvert.class);
+
+//    default PageResult<eveTaskRespVO> buildTodoTaskPage(PageResult<Task> pageResult,
+//                                                        Map<String, ProcessInstance> processInstanceMap,
+//                                                        Map<Long, AdminUserRespDTO> userMap) {
+//        return BeanUtils.toBean(pageResult, eveTaskRespVO.class, taskVO -> {
+//            ProcessInstance processInstance = processInstanceMap.get(taskVO.getProcessInstanceId());
+//            if (processInstance == null) {
+//                return;
+//            }
+//            taskVO.setProcessInstance(BeanUtils.toBean(processInstance, eveTaskRespVO.ProcessInstance.class));
+//            AdminUserRespDTO startUser = userMap.get(NumberUtils.parseLong(processInstance.getStartUserId()));
+//            taskVO.getProcessInstance().setStartUser(BeanUtils.toBean(startUser, BpmProcessInstanceRespVO.User.class));
+//        });
+//    }
+//
+//    default List<AchievementRespVO> buildTodoTaskPageComprehensive(Map<Long, AdminUserRespDTO> userMap,
+//                                                                   Map<Long, DeptRespDTO> deptMap,
+//                                                                   Map<Long, ComprehensiveManageDO> comprehensiveManageDOMap ,
+//                                                               List<AchievementDO> achievementList,
+//                                                                   Long deptId) {
+//
+//
+//        for (AchievementDO achievement : achievementList) {
+//            AdminUserRespDTO startUser = userMap.get(achievement.getUserId());
+//            achievement.setStartUser(BeanUtils.toBean(startUser, AchievementDO.User.class));
+//            if (startUser != null) {
+//                MapUtils.findAndThen(deptMap, startUser.getDeptId(),
+//                        dept -> achievement.getStartUser().setDeptName(dept.getName())
+//                );
+//                MapUtils.findAndThen(deptMap, startUser.getDeptId(),
+//                        dept -> achievement.setReviewType(
+//                                Objects.equals(deptId, dept.getId()) ? "班级自评" : "班级互评"
+//                        )
+//                );
+//                achievement.getStartUser().setNickname(startUser.getNickname());
+//                achievement.setStudentId(startUser.getStudentId());
+//            }
+//
+//            MapUtils.findAndThen(comprehensiveManageDOMap, achievement.getManageId(),
+//                    ComprehensiveManage -> achievement.setComprehensiveManage(
+//                            BeanUtils.toBean(ComprehensiveManage,AchievementDO.ComprehensiveManage.class))
+//            );
+//        }
+//        return BeanUtils.toBean(achievementList, AchievementRespVO.class);
+//    }
+//
+//
+//    default List<AchievementRespVO> buildTaskComprehensive(List<AchievementDO> achievementList,
+//                                                    Map<Long, AdminUserRespDTO> userMap,
+//                                                    Map<Long, DeptRespDTO> deptMap,
+//                                                    Map<Long, ComprehensiveManageDO> comprehensiveManageMap
+//                                                    ) {
+//
+//
+//        for (AchievementDO achievement : achievementList) {
+//            AdminUserRespDTO startUser = userMap.get(achievement.getUserId());
+//            achievement.setStartUser(BeanUtils.toBean(startUser, AchievementDO.User.class));
+//            MapUtils.findAndThen(deptMap, startUser.getDeptId(), dept -> achievement.getStartUser().setDeptName(dept.getName()));
+//            achievement.getStartUser().setNickname(startUser.getNickname());
+//            achievement.setStudentId(startUser.getStudentId());
+//            MapUtils.findAndThen(comprehensiveManageMap, achievement.getManageId(),
+//                    ComprehensiveManage -> achievement.setComprehensiveManage(
+//                            BeanUtils.toBean(ComprehensiveManage,AchievementDO.ComprehensiveManage.class))
+//            );
+//        }
+//        return BeanUtils.toBean(achievementList, AchievementRespVO.class);
+//    }
+//
+//    default List<eveTaskRespVO> buildTaskDoneByPeople(List<HistoricTaskInstance> pageResult,
+//                                                          Map<String, HistoricProcessInstance> processInstanceMap,
+//                                                          Map<Long, AdminUserRespDTO> userMap,
+//                                                          Map<String, AchievementDO> achievementDOMap
+//
+//    ) {
+//
+//        return CollectionUtils.convertList(pageResult, task -> {
+//            eveTaskRespVO taskVO = BeanUtils.toBean(task, eveTaskRespVO.class);
+//            taskVO.setStatus(FlowableUtils.getTaskStatus(task)).setReason(FlowableUtils.getTaskReason(task));
+//            // 流程实例
+//            HistoricProcessInstance processInstance = processInstanceMap.get(taskVO.getProcessInstanceId());
+//            if (processInstance != null) {
+//                AdminUserRespDTO startUser = userMap.get(NumberUtils.parseLong(processInstance.getStartUserId()));
+//                taskVO.setProcessInstance(BeanUtils.toBean(processInstance, eveTaskRespVO.ProcessInstance.class));
+//                taskVO.getProcessInstance().setStartUser(BeanUtils.toBean(startUser, BpmProcessInstanceRespVO.User.class));
+//                AchievementDO achievement = achievementDOMap.get(processInstance.getId());
+//                taskVO.setAchievement(BeanUtils.toBean(achievement, AchievementRespVO.class));
+//            }
+//            return taskVO;
+//        });
+//    }
+//
+//    default List<BpmTaskRespVO> buildTaskListByProcessInstanceId(List<HistoricTaskInstance> taskList,
+//                                                                 HistoricProcessInstance processInstance,
+//                                                                 Map<Long, BpmFormDO> formMap,
+//                                                                 Map<Long, AdminUserRespDTO> userMap,
+//                                                                 Map<Long, DeptRespDTO> deptMap) {
+//        List<BpmTaskRespVO> taskVOList = CollectionUtils.convertList(taskList, task -> {
+//            BpmTaskRespVO taskVO = BeanUtils.toBean(task, BpmTaskRespVO.class);
+//            taskVO.setStatus(FlowableUtils.getTaskStatus(task)).setReason(FlowableUtils.getTaskReason(task));
+//            // 流程实例
+//            AdminUserRespDTO startUser = userMap.get(NumberUtils.parseLong(processInstance.getStartUserId()));
+//            taskVO.setProcessInstance(BeanUtils.toBean(processInstance, BpmTaskRespVO.ProcessInstance.class));
+//            taskVO.getProcessInstance().setStartUser(BeanUtils.toBean(startUser, BpmProcessInstanceRespVO.User.class));
+//            // 表单信息
+//            BpmFormDO form = MapUtil.get(formMap, NumberUtils.parseLong(task.getFormKey()), BpmFormDO.class);
+//            if (form != null) {
+//                taskVO.setFormId(form.getId()).setFormName(form.getName()).setFormConf(form.getConf())
+//                        .setFormFields(form.getFields()).setFormVariables(FlowableUtils.getTaskFormVariable(task));
+//            }
+//            // 用户信息
+//            AdminUserRespDTO assignUser = userMap.get(NumberUtils.parseLong(task.getAssignee()));
+//            if (assignUser != null) {
+//                taskVO.setAssigneeUser(BeanUtils.toBean(assignUser, BpmProcessInstanceRespVO.User.class));
+//                findAndThen(deptMap, assignUser.getDeptId(), dept -> taskVO.getAssigneeUser().setDeptName(dept.getName()));
+//            }
+//            AdminUserRespDTO ownerUser = userMap.get(NumberUtils.parseLong(task.getOwner()));
+//            if (ownerUser != null) {
+//                taskVO.setOwnerUser(BeanUtils.toBean(ownerUser, BpmProcessInstanceRespVO.User.class));
+//                findAndThen(deptMap, ownerUser.getDeptId(), dept -> taskVO.getOwnerUser().setDeptName(dept.getName()));
+//            }
+//            return taskVO;
+//        });
+//
+//        // 拼接父子关系
+//        Map<String, List<BpmTaskRespVO>> childrenTaskMap = convertMultiMap(
+//                filterList(taskVOList, r -> StrUtil.isNotEmpty(r.getParentTaskId())),
+//                BpmTaskRespVO::getParentTaskId);
+//        for (BpmTaskRespVO taskVO : taskVOList) {
+//            taskVO.setChildren(childrenTaskMap.get(taskVO.getId()));
+//        }
+//        return filterList(taskVOList, r -> StrUtil.isEmpty(r.getParentTaskId()));
+//    }
+//
+//    default List<BpmTaskRespVO> buildTaskListByParentTaskId(List<Task> taskList,
+//                                                            Map<Long, AdminUserRespDTO> userMap,
+//                                                            Map<Long, DeptRespDTO> deptMap) {
+//        return convertList(taskList, task -> BeanUtils.toBean(task, BpmTaskRespVO.class, taskVO -> {
+//            AdminUserRespDTO assignUser = userMap.get(NumberUtils.parseLong(task.getAssignee()));
+//            if (assignUser != null) {
+//                taskVO.setAssigneeUser(BeanUtils.toBean(assignUser, BpmProcessInstanceRespVO.User.class));
+//                DeptRespDTO dept = deptMap.get(assignUser.getDeptId());
+//                if (dept != null) {
+//                    taskVO.getAssigneeUser().setDeptName(dept.getName());
+//                }
+//            }
+//            AdminUserRespDTO ownerUser = userMap.get(NumberUtils.parseLong(task.getOwner()));
+//            if (ownerUser != null) {
+//                taskVO.setOwnerUser(BeanUtils.toBean(ownerUser, BpmProcessInstanceRespVO.User.class));
+//                findAndThen(deptMap, ownerUser.getDeptId(), dept -> taskVO.getOwnerUser().setDeptName(dept.getName()));
+//            }
+//        }));
+//    }
+//
+//    default BpmMessageSendWhenTaskCreatedReqDTO convert(ProcessInstance processInstance, AdminUserRespDTO startUser,
+//                                                        Task task) {
+//        BpmMessageSendWhenTaskCreatedReqDTO reqDTO = new BpmMessageSendWhenTaskCreatedReqDTO();
+//        reqDTO.setProcessInstanceId(processInstance.getProcessInstanceId())
+//                .setProcessInstanceName(processInstance.getName()).setStartUserId(startUser.getId())
+//                .setStartUserNickname(startUser.getNickname()).setTaskId(task.getId()).setTaskName(task.getName())
+//                .setAssigneeUserId(NumberUtils.parseLong(task.getAssignee()));
+//        return reqDTO;
+//    }
+
+    /**
+     * 将父任务的属性,拷贝到子任务(加签任务)
+     *
+     * 为什么不使用 mapstruct 映射?因为 TaskEntityImpl 还有很多其他属性,这里我们只设置我们需要的。
+     * 使用 mapstruct 会将里面嵌套的各个属性值都设置进去,会出现意想不到的问题。
+     *
+     * @param parentTask 父任务
+     * @param childTask 加签任务
+     */
+    default void copyTo(TaskEntityImpl parentTask, TaskEntityImpl childTask) {
+        childTask.setName(parentTask.getName());
+        childTask.setDescription(parentTask.getDescription());
+        childTask.setCategory(parentTask.getCategory());
+        childTask.setParentTaskId(parentTask.getId());
+        childTask.setProcessDefinitionId(parentTask.getProcessDefinitionId());
+        childTask.setProcessInstanceId(parentTask.getProcessInstanceId());
+//        childTask.setExecutionId(parentTask.getExecutionId()); // TODO 芋艿:新加的,不太确定;尴尬,不加时,子任务不通过会失败(报错);加了,子任务审批通过会失败(报错)
+        childTask.setTaskDefinitionKey(parentTask.getTaskDefinitionKey());
+        childTask.setTaskDefinitionId(parentTask.getTaskDefinitionId());
+        childTask.setPriority(parentTask.getPriority());
+        childTask.setCreateTime(new Date());
+        childTask.setTenantId(parentTask.getTenantId());
+    }
+
+}

+ 21 - 5
yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/dal/mysql/aidingstudentspersonmanage/AidingStudentsPersonManageMapper.java

@@ -2,7 +2,9 @@ package cn.iocoder.yudao.module.as.dal.mysql.aidingstudentspersonmanage;
 
 import cn.iocoder.yudao.framework.common.pojo.PageResult;
 import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
-import cn.iocoder.yudao.module.as.controller.admin.aidingstudentspersonmanage.vo.AidingStudentPersonManageInfoPageReqVO;
+import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
+import cn.iocoder.yudao.module.as.controller.admin.aidingstudentspersonmanage.vo.AidingStudentPersonManagerCollegePageReqVO;
+import cn.iocoder.yudao.module.as.controller.admin.aidingstudentspersonmanage.vo.AidingStudentsPersonManageClassPageReqVO;
 import cn.iocoder.yudao.module.as.dal.dataobject.aidingstudentspersonmanage.AidingStudentsPersonManageDO;
 import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.BpmTaskPageReqVO;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@@ -21,16 +23,30 @@ import java.util.Map;
 @Mapper
 public interface AidingStudentsPersonManageMapper extends BaseMapperX<AidingStudentsPersonManageDO> {
 
-    /*default PageResult<AidingStudentsPersonManageDO> selectPage(AidingStudentPersonManageInfoPageReqVO reqVO) {
+    default PageResult<AidingStudentsPersonManageDO> selectPage(AidingStudentsPersonManageClassPageReqVO reqVO) {
         return selectPage(reqVO, new LambdaQueryWrapper<AidingStudentsPersonManageDO>()
                 .eq(StringUtils.isNotBlank(reqVO.getClassName()),AidingStudentsPersonManageDO::getClassName, reqVO.getClassName())
-                .eq(reqVO.getCollegeManageId() != null,AidingStudentsPersonManageDO::getCollegeManageId, reqVO.getCollegeManageId())
+                .eq(reqVO.getCollegeManageId() != null,AidingStudentsPersonManageDO::getDifficultType, reqVO.getCollegeManageId())
                 .eq(reqVO.getManageId() != null,AidingStudentsPersonManageDO::getManageId, reqVO.getManageId())
                 .like(StringUtils.isNotBlank(reqVO.getNickname()),AidingStudentsPersonManageDO::getNickname, reqVO.getNickname())
                 .like(StringUtils.isNotBlank(reqVO.getStudentSno()),AidingStudentsPersonManageDO::getStudentSno, reqVO.getStudentSno())
                 .eq(reqVO.getDifficultType() != null,AidingStudentsPersonManageDO::getDifficultType, reqVO.getDifficultType())
-                .orderByDesc(AidingStudentsPersonManageDO::getSort));
-    }*/
+                .orderByDesc(AidingStudentsPersonManageDO::getId));
+    }
+
+
+    default List<AidingStudentsPersonManageDO>  selectListByProcessInstanceId(List<String> ids,
+                                                                              BpmTaskPageReqVO pageVO){
+        return selectList(
+                new LambdaQueryWrapperX<AidingStudentsPersonManageDO>()
+                        .in(AidingStudentsPersonManageDO::getManageId,ids)
+                        .eqIfPresent(AidingStudentsPersonManageDO::getClass,pageVO.getClassId())
+                        .eqIfPresent(AidingStudentsPersonManageDO::getManageId,pageVO.getManageId())
+                        .eqIfPresent(AidingStudentsPersonManageDO::getCollegeId,pageVO.getCollegeId())
+                        .eqIfPresent(AidingStudentsPersonManageDO::getNickname,pageVO.getUsername())
+                        .groupBy(AidingStudentsPersonManageDO::getClassName)
+        );
+    }
 
     /**
      * 根据学生ID查询data_info数据

+ 6 - 5
yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/service/aidingstudentspersonmanage/AidingStudentsPersonManageService.java

@@ -25,11 +25,12 @@ public interface AidingStudentsPersonManageService  {
      */
     void uploadAidingStudentsManage(AidingStudentPersonManageInfoRespVO uploadVO);
 
-    /**
-     * 获取学生申请信息分页
-     * @param pageReqVO
-     * @return
-     *//*
+//    /**
+//     * 获取学生申请信息分页
+//     * @param pageReqVO
+//     * @return
+//     */
+    /*
     PageResult<AidingStudentsPersonManageDO> getAidingStudentsPersonManageClassPage(AidingStudentPersonManageInfoPageReqVO pageReqVO);*/
 
 

+ 6 - 6
yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/service/aidingstudentspersonmanage/AidingStudentsPersonManageServiceImpl.java

@@ -209,11 +209,11 @@ public class AidingStudentsPersonManageServiceImpl extends ServiceImpl<AidingStu
         return result;
     }
 
-    /**
-     * 班级获取学生申请信息分页
-     * @param pageReqVO
-     * @return
-     */
+//    /**
+//     * 班级获取学生申请信息分页
+//     * @param pageReqVO
+//     * @return
+//     */
     /*@Override
     public PageResult<AidingStudentsPersonManageDO> getAidingStudentsPersonManageClassPage(
             AidingStudentPersonManageInfoPageReqVO pageReqVO) {
@@ -223,7 +223,7 @@ public class AidingStudentsPersonManageServiceImpl extends ServiceImpl<AidingStu
     @Override
     public List<AidingStudentsPersonManageDO>  getAidingStudentsPersonManageClassPage(List<String> ids,
                                                                                BpmTaskPageReqVO pageVO){
-        return aidingStudentsPersonManageMapper.selectListByProcessInstanceId(ids,pageReqVO);
+        return aidingStudentsPersonManageMapper.selectListByProcessInstanceId(ids,pageVO);
     };
 
     /**

+ 0 - 230
yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/task/asTaskConvert.java

@@ -1,230 +0,0 @@
-package cn.iocoder.yudao.module.as.task;
-
-import cn.hutool.core.map.MapUtil;
-import cn.hutool.core.util.StrUtil;
-import cn.iocoder.yudao.framework.common.pojo.PageResult;
-import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils;
-import cn.iocoder.yudao.framework.common.util.collection.MapUtils;
-import cn.iocoder.yudao.framework.common.util.number.NumberUtils;
-import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
-import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceRespVO;
-import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.BpmTaskRespVO;
-import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmFormDO;
-import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.FlowableUtils;
-import cn.iocoder.yudao.module.bpm.service.message.dto.BpmMessageSendWhenTaskCreatedReqDTO;
-import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO;
-import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
-import org.flowable.engine.history.HistoricProcessInstance;
-import org.flowable.engine.runtime.ProcessInstance;
-import org.flowable.task.api.Task;
-import org.flowable.task.api.history.HistoricTaskInstance;
-import org.flowable.task.service.impl.persistence.entity.TaskEntityImpl;
-import org.mapstruct.Mapper;
-import org.mapstruct.factory.Mappers;
-
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-
-import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMultiMap;
-import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.filterList;
-import static cn.iocoder.yudao.framework.common.util.collection.MapUtils.findAndThen;
-
-/**
- * Bpm 任务 Convert
- *
- * @author 芋道源码
- */
-@Mapper
-public interface asTaskConvert {
-
-    asTaskConvert INSTANCE = Mappers.getMapper(asTaskConvert.class);
-
-    default PageResult<eveTaskRespVO> buildTodoTaskPage(PageResult<Task> pageResult,
-                                                        Map<String, ProcessInstance> processInstanceMap,
-                                                        Map<Long, AdminUserRespDTO> userMap) {
-        return BeanUtils.toBean(pageResult, eveTaskRespVO.class, taskVO -> {
-            ProcessInstance processInstance = processInstanceMap.get(taskVO.getProcessInstanceId());
-            if (processInstance == null) {
-                return;
-            }
-            taskVO.setProcessInstance(BeanUtils.toBean(processInstance, eveTaskRespVO.ProcessInstance.class));
-            AdminUserRespDTO startUser = userMap.get(NumberUtils.parseLong(processInstance.getStartUserId()));
-            taskVO.getProcessInstance().setStartUser(BeanUtils.toBean(startUser, BpmProcessInstanceRespVO.User.class));
-        });
-    }
-
-    default List<AchievementRespVO> buildTodoTaskPageComprehensive(Map<Long, AdminUserRespDTO> userMap,
-                                                                   Map<Long, DeptRespDTO> deptMap,
-                                                                   Map<Long, ComprehensiveManageDO> comprehensiveManageDOMap ,
-                                                               List<AchievementDO> achievementList,
-                                                                   Long deptId) {
-
-
-        for (AchievementDO achievement : achievementList) {
-            AdminUserRespDTO startUser = userMap.get(achievement.getUserId());
-            achievement.setStartUser(BeanUtils.toBean(startUser, AchievementDO.User.class));
-            if (startUser != null) {
-                MapUtils.findAndThen(deptMap, startUser.getDeptId(),
-                        dept -> achievement.getStartUser().setDeptName(dept.getName())
-                );
-                MapUtils.findAndThen(deptMap, startUser.getDeptId(),
-                        dept -> achievement.setReviewType(
-                                Objects.equals(deptId, dept.getId()) ? "班级自评" : "班级互评"
-                        )
-                );
-                achievement.getStartUser().setNickname(startUser.getNickname());
-                achievement.setStudentId(startUser.getStudentId());
-            }
-
-            MapUtils.findAndThen(comprehensiveManageDOMap, achievement.getManageId(),
-                    ComprehensiveManage -> achievement.setComprehensiveManage(
-                            BeanUtils.toBean(ComprehensiveManage,AchievementDO.ComprehensiveManage.class))
-            );
-        }
-        return BeanUtils.toBean(achievementList, AchievementRespVO.class);
-    }
-
-
-    default List<AchievementRespVO> buildTaskComprehensive(List<AchievementDO> achievementList,
-                                                    Map<Long, AdminUserRespDTO> userMap,
-                                                    Map<Long, DeptRespDTO> deptMap,
-                                                    Map<Long, ComprehensiveManageDO> comprehensiveManageMap
-                                                    ) {
-
-
-        for (AchievementDO achievement : achievementList) {
-            AdminUserRespDTO startUser = userMap.get(achievement.getUserId());
-            achievement.setStartUser(BeanUtils.toBean(startUser, AchievementDO.User.class));
-            MapUtils.findAndThen(deptMap, startUser.getDeptId(), dept -> achievement.getStartUser().setDeptName(dept.getName()));
-            achievement.getStartUser().setNickname(startUser.getNickname());
-            achievement.setStudentId(startUser.getStudentId());
-            MapUtils.findAndThen(comprehensiveManageMap, achievement.getManageId(),
-                    ComprehensiveManage -> achievement.setComprehensiveManage(
-                            BeanUtils.toBean(ComprehensiveManage,AchievementDO.ComprehensiveManage.class))
-            );
-        }
-        return BeanUtils.toBean(achievementList, AchievementRespVO.class);
-    }
-
-    default List<eveTaskRespVO> buildTaskDoneByPeople(List<HistoricTaskInstance> pageResult,
-                                                          Map<String, HistoricProcessInstance> processInstanceMap,
-                                                          Map<Long, AdminUserRespDTO> userMap,
-                                                          Map<String, AchievementDO> achievementDOMap
-
-    ) {
-
-        return CollectionUtils.convertList(pageResult, task -> {
-            eveTaskRespVO taskVO = BeanUtils.toBean(task, eveTaskRespVO.class);
-            taskVO.setStatus(FlowableUtils.getTaskStatus(task)).setReason(FlowableUtils.getTaskReason(task));
-            // 流程实例
-            HistoricProcessInstance processInstance = processInstanceMap.get(taskVO.getProcessInstanceId());
-            if (processInstance != null) {
-                AdminUserRespDTO startUser = userMap.get(NumberUtils.parseLong(processInstance.getStartUserId()));
-                taskVO.setProcessInstance(BeanUtils.toBean(processInstance, eveTaskRespVO.ProcessInstance.class));
-                taskVO.getProcessInstance().setStartUser(BeanUtils.toBean(startUser, BpmProcessInstanceRespVO.User.class));
-                AchievementDO achievement = achievementDOMap.get(processInstance.getId());
-                taskVO.setAchievement(BeanUtils.toBean(achievement, AchievementRespVO.class));
-            }
-            return taskVO;
-        });
-    }
-
-    default List<BpmTaskRespVO> buildTaskListByProcessInstanceId(List<HistoricTaskInstance> taskList,
-                                                                 HistoricProcessInstance processInstance,
-                                                                 Map<Long, BpmFormDO> formMap,
-                                                                 Map<Long, AdminUserRespDTO> userMap,
-                                                                 Map<Long, DeptRespDTO> deptMap) {
-        List<BpmTaskRespVO> taskVOList = CollectionUtils.convertList(taskList, task -> {
-            BpmTaskRespVO taskVO = BeanUtils.toBean(task, BpmTaskRespVO.class);
-            taskVO.setStatus(FlowableUtils.getTaskStatus(task)).setReason(FlowableUtils.getTaskReason(task));
-            // 流程实例
-            AdminUserRespDTO startUser = userMap.get(NumberUtils.parseLong(processInstance.getStartUserId()));
-            taskVO.setProcessInstance(BeanUtils.toBean(processInstance, BpmTaskRespVO.ProcessInstance.class));
-            taskVO.getProcessInstance().setStartUser(BeanUtils.toBean(startUser, BpmProcessInstanceRespVO.User.class));
-            // 表单信息
-            BpmFormDO form = MapUtil.get(formMap, NumberUtils.parseLong(task.getFormKey()), BpmFormDO.class);
-            if (form != null) {
-                taskVO.setFormId(form.getId()).setFormName(form.getName()).setFormConf(form.getConf())
-                        .setFormFields(form.getFields()).setFormVariables(FlowableUtils.getTaskFormVariable(task));
-            }
-            // 用户信息
-            AdminUserRespDTO assignUser = userMap.get(NumberUtils.parseLong(task.getAssignee()));
-            if (assignUser != null) {
-                taskVO.setAssigneeUser(BeanUtils.toBean(assignUser, BpmProcessInstanceRespVO.User.class));
-                findAndThen(deptMap, assignUser.getDeptId(), dept -> taskVO.getAssigneeUser().setDeptName(dept.getName()));
-            }
-            AdminUserRespDTO ownerUser = userMap.get(NumberUtils.parseLong(task.getOwner()));
-            if (ownerUser != null) {
-                taskVO.setOwnerUser(BeanUtils.toBean(ownerUser, BpmProcessInstanceRespVO.User.class));
-                findAndThen(deptMap, ownerUser.getDeptId(), dept -> taskVO.getOwnerUser().setDeptName(dept.getName()));
-            }
-            return taskVO;
-        });
-
-        // 拼接父子关系
-        Map<String, List<BpmTaskRespVO>> childrenTaskMap = convertMultiMap(
-                filterList(taskVOList, r -> StrUtil.isNotEmpty(r.getParentTaskId())),
-                BpmTaskRespVO::getParentTaskId);
-        for (BpmTaskRespVO taskVO : taskVOList) {
-            taskVO.setChildren(childrenTaskMap.get(taskVO.getId()));
-        }
-        return filterList(taskVOList, r -> StrUtil.isEmpty(r.getParentTaskId()));
-    }
-
-    default List<BpmTaskRespVO> buildTaskListByParentTaskId(List<Task> taskList,
-                                                            Map<Long, AdminUserRespDTO> userMap,
-                                                            Map<Long, DeptRespDTO> deptMap) {
-        return convertList(taskList, task -> BeanUtils.toBean(task, BpmTaskRespVO.class, taskVO -> {
-            AdminUserRespDTO assignUser = userMap.get(NumberUtils.parseLong(task.getAssignee()));
-            if (assignUser != null) {
-                taskVO.setAssigneeUser(BeanUtils.toBean(assignUser, BpmProcessInstanceRespVO.User.class));
-                DeptRespDTO dept = deptMap.get(assignUser.getDeptId());
-                if (dept != null) {
-                    taskVO.getAssigneeUser().setDeptName(dept.getName());
-                }
-            }
-            AdminUserRespDTO ownerUser = userMap.get(NumberUtils.parseLong(task.getOwner()));
-            if (ownerUser != null) {
-                taskVO.setOwnerUser(BeanUtils.toBean(ownerUser, BpmProcessInstanceRespVO.User.class));
-                findAndThen(deptMap, ownerUser.getDeptId(), dept -> taskVO.getOwnerUser().setDeptName(dept.getName()));
-            }
-        }));
-    }
-
-    default BpmMessageSendWhenTaskCreatedReqDTO convert(ProcessInstance processInstance, AdminUserRespDTO startUser,
-                                                        Task task) {
-        BpmMessageSendWhenTaskCreatedReqDTO reqDTO = new BpmMessageSendWhenTaskCreatedReqDTO();
-        reqDTO.setProcessInstanceId(processInstance.getProcessInstanceId())
-                .setProcessInstanceName(processInstance.getName()).setStartUserId(startUser.getId())
-                .setStartUserNickname(startUser.getNickname()).setTaskId(task.getId()).setTaskName(task.getName())
-                .setAssigneeUserId(NumberUtils.parseLong(task.getAssignee()));
-        return reqDTO;
-    }
-
-    /**
-     * 将父任务的属性,拷贝到子任务(加签任务)
-     *
-     * 为什么不使用 mapstruct 映射?因为 TaskEntityImpl 还有很多其他属性,这里我们只设置我们需要的。
-     * 使用 mapstruct 会将里面嵌套的各个属性值都设置进去,会出现意想不到的问题。
-     *
-     * @param parentTask 父任务
-     * @param childTask 加签任务
-     */
-    default void copyTo(TaskEntityImpl parentTask, TaskEntityImpl childTask) {
-        childTask.setName(parentTask.getName());
-        childTask.setDescription(parentTask.getDescription());
-        childTask.setCategory(parentTask.getCategory());
-        childTask.setParentTaskId(parentTask.getId());
-        childTask.setProcessDefinitionId(parentTask.getProcessDefinitionId());
-        childTask.setProcessInstanceId(parentTask.getProcessInstanceId());
-//        childTask.setExecutionId(parentTask.getExecutionId()); // TODO 芋艿:新加的,不太确定;尴尬,不加时,子任务不通过会失败(报错);加了,子任务审批通过会失败(报错)
-        childTask.setTaskDefinitionKey(parentTask.getTaskDefinitionKey());
-        childTask.setTaskDefinitionId(parentTask.getTaskDefinitionId());
-        childTask.setPriority(parentTask.getPriority());
-        childTask.setCreateTime(new Date());
-        childTask.setTenantId(parentTask.getTenantId());
-    }
-
-}

+ 6 - 6
yudao-module-bpm/yudao-module-bpm-biz/pom.xml

@@ -80,12 +80,12 @@
             <groupId>org.flowable</groupId>
             <artifactId>flowable-spring-boot-starter-actuator</artifactId>
         </dependency>
-        <dependency>
-            <groupId>cn.iocoder.boot</groupId>
-            <artifactId>yudao-module-eve-api</artifactId>
-            <version>2.1.0-jdk8-snapshot</version>
-            <scope>compile</scope>
-        </dependency>
+<!--        <dependency>-->
+<!--            <groupId>cn.iocoder.boot</groupId>-->
+<!--            <artifactId>yudao-module-eve-api</artifactId>-->
+<!--            <version>2.1.0-jdk8-snapshot</version>-->
+<!--            <scope>compile</scope>-->
+<!--        </dependency>-->
         <dependency>
             <groupId>cn.iocoder.boot</groupId>
             <artifactId>yudao-module-as-api</artifactId>

+ 2 - 9
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/expression/BpmTaskAidAssistantExpression.java

@@ -1,11 +1,9 @@
 package cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.expression;
 
 import cn.iocoder.yudao.framework.common.util.number.NumberUtils;
-import cn.iocoder.yudao.module.as.api.aidingstudentscollegemanage.AidingStudentsCollegeManageApi;
+import cn.iocoder.yudao.module.as.aidingstudentscollegemanage.AidingStudentsCollegeManageApi ;
 import cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceService;
-import cn.iocoder.yudao.module.eve.api.achievement.AchievementApi;
-import cn.iocoder.yudao.module.eve.api.classreviewer.ClassReviewerApi;
-import cn.iocoder.yudao.module.eve.api.classreviewer.DTO.ClassReviewerDTO;
+
 import cn.iocoder.yudao.module.system.api.dept.DeptApi;
 import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO;
 import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
@@ -35,8 +33,6 @@ public class BpmTaskAidAssistantExpression {
     @Resource
     private DeptApi deptApi;
 
-    @Resource
-    private ClassReviewerApi classReviewerApi;
 
     @Resource
     private PermissionService permissionService;
@@ -44,9 +40,6 @@ public class BpmTaskAidAssistantExpression {
     @Resource
     private BpmProcessInstanceService processInstanceService;
 
-    @Resource
-    private AchievementApi achievementApi;
-
     @Resource
     private AidingStudentsCollegeManageApi aidingStudentsCollegeManageApi;
     /**

+ 133 - 138
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/expression/BpmTaskAssignClassMutualExpression.java

@@ -1,138 +1,133 @@
-package cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.expression;
-
-import cn.iocoder.yudao.framework.common.util.number.NumberUtils;
-import cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceService;
-
-import cn.iocoder.yudao.module.eve.api.achievement.AchievementApi;
-import cn.iocoder.yudao.module.eve.api.achievement.dto.AchievementDTO;
-import cn.iocoder.yudao.module.eve.api.classmutual.ClassMutualApi;
-import cn.iocoder.yudao.module.eve.api.classmutual.dto.ClassMutualDTO;
-
-import cn.iocoder.yudao.module.eve.api.classreviewer.ClassReviewerApi;
-import cn.iocoder.yudao.module.eve.api.classreviewer.DTO.ClassReviewerDTO;
-import cn.iocoder.yudao.module.system.api.dept.DeptApi;
-import cn.iocoder.yudao.module.system.api.dept.PostApi;
-import cn.iocoder.yudao.module.system.api.permission.PermissionApi;
-import cn.iocoder.yudao.module.system.service.permission.PermissionService;
-
-import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO;
-import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
-import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
-
-import org.flowable.engine.delegate.DelegateExecution;
-import org.flowable.engine.runtime.ProcessInstance;
-import org.springframework.stereotype.Component;
-import javax.annotation.Resource;
-import java.util.*;
-
-import static cn.iocoder.yudao.framework.common.util.collection.SetUtils.asSet;
-import static java.util.Collections.emptySet;
-
-/**
- *
- * 尝试通过部门和岗位获取同年级不同班级的自评小组信息并分配为审批人
- * @author yzx
- */
-@Component
-public class BpmTaskAssignClassMutualExpression {
-
-    @Resource
-    private AdminUserApi adminUserApi;
-    @Resource
-    private DeptApi deptApi;
-
-    @Resource
-    private PostApi postApi;
-
-    @Resource
-    private PermissionApi permissionApi;
-
-    @Resource
-    private PermissionService permissionService;
-
-    @Resource
-    private BpmProcessInstanceService processInstanceService;
-
-    @Resource
-    private ClassMutualApi classMutualApi;
-
-    @Resource
-    private AchievementApi achievementApi;
-
-    @Resource
-    private ClassReviewerApi classReviewerApi;
-    /**
-     * 计算审批的候选人
-     * @param execution 流程执行实体
-     * @return 班级互评审批人
-     */
-    public Set<Long> calculateUsers(DelegateExecution execution) {
-
-        // 获得发起人
-        ProcessInstance processInstance = processInstanceService.getProcessInstance(execution.getProcessInstanceId());
-        Long startUserId = NumberUtils.parseLong(processInstance.getStartUserId());
-        String processInstanceId = processInstance.getProcessInstanceId();
-        Long manageId = achievementApi.getManageId(processInstanceId).getManageId();
-
-        //获得发起人所在的部门
-        DeptRespDTO dept = null;
-        dept = getStartUserDept(startUserId);
-        if (dept == null) {
-            // 找不到发起人的部门,所以无法使用该规则
-            return emptySet();
-        }
-        //获取对应班级
-        ClassMutualDTO reviewClass = classMutualApi.getClassMutualByReviewed(dept.getId(),manageId);
-
-        List<ClassReviewerDTO> ClassReviewerList =
-                classReviewerApi.getClassReviewerByClass(manageId,reviewClass.getReviewClass());
-
-        Long result = ClassReviewerList.stream()
-                .filter(dto -> dto.getClassMutualReviewed().contains(startUserId))
-                .findFirst()
-                .map(ClassReviewerDTO::getUserId)
-                .orElse(null);
-        if(result == null){
-            return emptySet();
-        }
-
-//        //根据部门id获取部门内所有的成员
-//        Collection<Long> deptIds = new ArrayList<>();
-//        deptIds.add(reviewClass.getReviewClass());
-//        List<AdminUserRespDTO> userRespDTOList =  adminUserApi.getUserListByDeptIds(deptIds);
-//
-//        //筛选出“评审成员”
-//        Set<Long> RoleIdSet = getRoleByUserLists(userRespDTOList);
-        Set<Long> RoleIdSet = new HashSet<>();
-        RoleIdSet.add(result);
-        return RoleIdSet;
-    }
-
-    private DeptRespDTO getStartUserDept(Long startUserId) {
-        AdminUserRespDTO startUser = adminUserApi.getUser(startUserId);
-        if (startUser.getDeptId() == null) { // 找不到部门,所以无法使用该规则
-            return null;
-        }
-        return deptApi.getDept(startUser.getDeptId());
-    }
-
-    // 在当前用户列表中筛选出具有“评审成员”角色的用户
-    private  Set<Long> getRoleByUserLists(List<AdminUserRespDTO> userRespDTOList) {
-
-        Set<Long> RoleIdSet = new HashSet<>();
-        for (AdminUserRespDTO userRespDTO : userRespDTOList) {
-            Long userRespDTOId = userRespDTO.getId();
-            Set<Long> theUserIdList =  permissionService.getUserRoleIdListByUserId(userRespDTOId);
-            boolean contains154 = theUserIdList.contains(154L);
-            if(contains154){
-                RoleIdSet.add(userRespDTO.getId());
-            }
-        }
-        return RoleIdSet;
-    }
-
-
-
-
-
-}
+//package cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.expression;
+//
+//import cn.iocoder.yudao.framework.common.util.number.NumberUtils;
+//import cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceService;
+//
+//import cn.iocoder.yudao.module.eve.api.achievement.AchievementApi;
+//import cn.iocoder.yudao.module.eve.api.achievement.dto.AchievementDTO;
+//import cn.iocoder.yudao.module.eve.api.classmutual.ClassMutualApi;
+//import cn.iocoder.yudao.module.eve.api.classmutual.dto.ClassMutualDTO;
+//
+//import cn.iocoder.yudao.module.eve.api.classreviewer.ClassReviewerApi;
+//import cn.iocoder.yudao.module.eve.api.classreviewer.DTO.ClassReviewerDTO;
+//import cn.iocoder.yudao.module.system.api.dept.DeptApi;
+//import cn.iocoder.yudao.module.system.api.dept.PostApi;
+//import cn.iocoder.yudao.module.system.api.permission.PermissionApi;
+//import cn.iocoder.yudao.module.system.service.permission.PermissionService;
+//
+//import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO;
+//import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
+//import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
+//
+//import org.flowable.engine.delegate.DelegateExecution;
+//import org.flowable.engine.runtime.ProcessInstance;
+//import org.springframework.stereotype.Component;
+//import javax.annotation.Resource;
+//import java.util.*;
+//
+//import static cn.iocoder.yudao.framework.common.util.collection.SetUtils.asSet;
+//import static java.util.Collections.emptySet;
+//
+///**
+// *
+// * 尝试通过部门和岗位获取同年级不同班级的自评小组信息并分配为审批人
+// * @author yzx
+// */
+//@Component
+//public class BpmTaskAssignClassMutualExpression {
+//
+//    @Resource
+//    private AdminUserApi adminUserApi;
+//    @Resource
+//    private DeptApi deptApi;
+//
+//    @Resource
+//    private PostApi postApi;
+//
+//    @Resource
+//    private PermissionApi permissionApi;
+//
+//    @Resource
+//    private PermissionService permissionService;
+//
+//    @Resource
+//    private BpmProcessInstanceService processInstanceService;
+//
+//    @Resource
+//    private ClassMutualApi classMutualApi;
+//
+//    @Resource
+//    private AchievementApi achievementApi;
+//
+//    @Resource
+//    private ClassReviewerApi classReviewerApi;
+//    /**
+//     * 计算审批的候选人
+//     * @param execution 流程执行实体
+//     * @return 班级互评审批人
+//     */
+//    public Set<Long> calculateUsers(DelegateExecution execution) {
+//
+//        // 获得发起人
+//        ProcessInstance processInstance = processInstanceService.getProcessInstance(execution.getProcessInstanceId());
+//        Long startUserId = NumberUtils.parseLong(processInstance.getStartUserId());
+//        String processInstanceId = processInstance.getProcessInstanceId();
+//        Long manageId = achievementApi.getManageId(processInstanceId).getManageId();
+//
+//        //获得发起人所在的部门
+//        DeptRespDTO dept = null;
+//        dept = getStartUserDept(startUserId);
+//        if (dept == null) {
+//            // 找不到发起人的部门,所以无法使用该规则
+//            return emptySet();
+//        }
+//        //获取对应班级
+//        ClassMutualDTO reviewClass = classMutualApi.getClassMutualByReviewed(dept.getId(),manageId);
+//
+//        List<ClassReviewerDTO> ClassReviewerList =
+//                classReviewerApi.getClassReviewerByClass(manageId,reviewClass.getReviewClass());
+//
+//        Long result = ClassReviewerList.stream()
+//                .filter(dto -> dto.getClassMutualReviewed().contains(startUserId))
+//                .findFirst()
+//                .map(ClassReviewerDTO::getUserId)
+//                .orElse(null);
+//        if(result == null){
+//            return emptySet();
+//        }
+//
+////        //根据部门id获取部门内所有的成员
+////        Collection<Long> deptIds = new ArrayList<>();
+////        deptIds.add(reviewClass.getReviewClass());
+////        List<AdminUserRespDTO> userRespDTOList =  adminUserApi.getUserListByDeptIds(deptIds);
+////
+////        //筛选出“评审成员”
+////        Set<Long> RoleIdSet = getRoleByUserLists(userRespDTOList);
+//        Set<Long> RoleIdSet = new HashSet<>();
+//        RoleIdSet.add(result);
+//        return RoleIdSet;
+//    }
+//
+//    private DeptRespDTO getStartUserDept(Long startUserId) {
+//        AdminUserRespDTO startUser = adminUserApi.getUser(startUserId);
+//        if (startUser.getDeptId() == null) { // 找不到部门,所以无法使用该规则
+//            return null;
+//        }
+//        return deptApi.getDept(startUser.getDeptId());
+//    }
+//
+//    // 在当前用户列表中筛选出具有“评审成员”角色的用户
+//    private  Set<Long> getRoleByUserLists(List<AdminUserRespDTO> userRespDTOList) {
+//
+//        Set<Long> RoleIdSet = new HashSet<>();
+//        for (AdminUserRespDTO userRespDTO : userRespDTOList) {
+//            Long userRespDTOId = userRespDTO.getId();
+//            Set<Long> theUserIdList =  permissionService.getUserRoleIdListByUserId(userRespDTOId);
+//            boolean contains154 = theUserIdList.contains(154L);
+//            if(contains154){
+//                RoleIdSet.add(userRespDTO.getId());
+//            }
+//        }
+//        return RoleIdSet;
+//    }
+//}

+ 116 - 116
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/expression/BpmTaskAssignClassSelfExpression.java

@@ -1,119 +1,119 @@
-package cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.expression;
-
-import cn.iocoder.yudao.framework.common.util.number.NumberUtils;
-import cn.iocoder.yudao.framework.security.core.LoginUser;
-import cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceService;
-import cn.iocoder.yudao.module.eve.api.achievement.AchievementApi;
-import cn.iocoder.yudao.module.system.api.dept.DeptApi;
-import cn.iocoder.yudao.module.system.api.dept.PostApi;
-import cn.iocoder.yudao.module.system.api.permission.PermissionApi;
-import cn.iocoder.yudao.module.system.service.permission.PermissionService;
-
-import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO;
-import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
-import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
-import org.flowable.engine.delegate.DelegateExecution;
-import org.flowable.engine.runtime.ProcessInstance;
-import org.springframework.stereotype.Component;
-import javax.annotation.Resource;
-import java.util.*;
-import cn.iocoder.yudao.module.eve.api.classreviewer.ClassReviewerApi;
-import static cn.iocoder.yudao.framework.common.util.collection.SetUtils.asSet;
-import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
-import static java.util.Collections.emptySet;
-import cn.iocoder.yudao.module.eve.api.classreviewer.ClassReviewerApi ;
-import cn.iocoder.yudao.module.eve.api.classreviewer.DTO.ClassReviewerDTO;
-/**
- *
- * 尝试通过部门和岗位获取当前班级的自评小组信息并分配为审批人
- * @author yzx
- */
-@Component
-public class BpmTaskAssignClassSelfExpression {
-
-    @Resource
-    private AdminUserApi adminUserApi;
-    @Resource
-    private DeptApi deptApi;
-
-    @Resource
-    private ClassReviewerApi classReviewerApi;
-
-    @Resource
-    private PermissionService permissionService;
-
-    @Resource
-    private BpmProcessInstanceService processInstanceService;
-
-    @Resource
-    private AchievementApi achievementApi;
-    /**
-     * 计算审批的候选人
-     * @param execution 流程执行实体
-     * @return 班级自评小组内部审批人
-     */
-    public Set<Long> calculateUsers(DelegateExecution execution) {
-
-        // 获得发起人
-        ProcessInstance processInstance = processInstanceService.getProcessInstance(execution.getProcessInstanceId());
-
-        Long startUserId = NumberUtils.parseLong(processInstance.getStartUserId());
-
-        Map<String, Object> variablesMap = processInstance.getProcessVariables();
-        Long manageId = (long)variablesMap.get("manageId");
-        List<ClassReviewerDTO> ClassReviewerList = classReviewerApi.getClassReviewer(manageId);
-
-        Long result = ClassReviewerList.stream()
-                .filter(dto -> dto.getReviewed().contains(startUserId))
-                .findFirst()
-                .map(ClassReviewerDTO::getUserId)
-                .orElse(null);
-        if(result == null){
-            return emptySet();
-        }
-//        //获得发起人所在的部门
-//        DeptRespDTO dept = null;
-//        dept = getStartUserDept(startUserId);
-//        if (dept == null) {
-//            // 找不到发起人的部门,所以无法使用该规则
+//package cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.expression;
+//
+//import cn.iocoder.yudao.framework.common.util.number.NumberUtils;
+//import cn.iocoder.yudao.framework.security.core.LoginUser;
+//import cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceService;
+//import cn.iocoder.yudao.module.eve.api.achievement.AchievementApi;
+//import cn.iocoder.yudao.module.system.api.dept.DeptApi;
+//import cn.iocoder.yudao.module.system.api.dept.PostApi;
+//import cn.iocoder.yudao.module.system.api.permission.PermissionApi;
+//import cn.iocoder.yudao.module.system.service.permission.PermissionService;
+//
+//import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO;
+//import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
+//import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
+//import org.flowable.engine.delegate.DelegateExecution;
+//import org.flowable.engine.runtime.ProcessInstance;
+//import org.springframework.stereotype.Component;
+//import javax.annotation.Resource;
+//import java.util.*;
+//import cn.iocoder.yudao.module.eve.api.classreviewer.ClassReviewerApi;
+//import static cn.iocoder.yudao.framework.common.util.collection.SetUtils.asSet;
+//import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
+//import static java.util.Collections.emptySet;
+//import cn.iocoder.yudao.module.eve.api.classreviewer.ClassReviewerApi ;
+//import cn.iocoder.yudao.module.eve.api.classreviewer.DTO.ClassReviewerDTO;
+///**
+// *
+// * 尝试通过部门和岗位获取当前班级的自评小组信息并分配为审批人
+// * @author yzx
+// */
+//@Component
+//public class BpmTaskAssignClassSelfExpression {
+//
+//    @Resource
+//    private AdminUserApi adminUserApi;
+//    @Resource
+//    private DeptApi deptApi;
+//
+//    @Resource
+//    private ClassReviewerApi classReviewerApi;
+//
+//    @Resource
+//    private PermissionService permissionService;
+//
+//    @Resource
+//    private BpmProcessInstanceService processInstanceService;
+//
+//    @Resource
+//    private AchievementApi achievementApi;
+//    /**
+//     * 计算审批的候选人
+//     * @param execution 流程执行实体
+//     * @return 班级自评小组内部审批人
+//     */
+//    public Set<Long> calculateUsers(DelegateExecution execution) {
+//
+//        // 获得发起人
+//        ProcessInstance processInstance = processInstanceService.getProcessInstance(execution.getProcessInstanceId());
+//
+//        Long startUserId = NumberUtils.parseLong(processInstance.getStartUserId());
+//
+//        Map<String, Object> variablesMap = processInstance.getProcessVariables();
+//        Long manageId = (long)variablesMap.get("manageId");
+//        List<ClassReviewerDTO> ClassReviewerList = classReviewerApi.getClassReviewer(manageId);
+//
+//        Long result = ClassReviewerList.stream()
+//                .filter(dto -> dto.getReviewed().contains(startUserId))
+//                .findFirst()
+//                .map(ClassReviewerDTO::getUserId)
+//                .orElse(null);
+//        if(result == null){
 //            return emptySet();
 //        }
+////        //获得发起人所在的部门
+////        DeptRespDTO dept = null;
+////        dept = getStartUserDept(startUserId);
+////        if (dept == null) {
+////            // 找不到发起人的部门,所以无法使用该规则
+////            return emptySet();
+////        }
+////
+////        //根据部门id获取部门内的成员
+////        Collection<Long> deptIds = new ArrayList<Long>();
+////        deptIds.add(dept.getId());
+////        List<AdminUserRespDTO> userRespDTOList =  adminUserApi.getUserListByDeptIds(deptIds);
+////
+////        //获取“评审成员”
+////        Set<Long> RoleIdSet = getRoleByUserLists(userRespDTOList);
+//
+//        Set<Long> RoleIdSet = new HashSet<>();
+//        RoleIdSet.add(result);
+//        return RoleIdSet;
+//    }
+//
+//    private DeptRespDTO getStartUserDept(Long startUserId) {
+//        AdminUserRespDTO startUser = adminUserApi.getUser(startUserId);
+//        if (startUser.getDeptId() == null) { // 找不到部门,所以无法使用该规则
+//            return null;
+//        }
+//        return deptApi.getDept(startUser.getDeptId());
+//    }
+//
+//    // 在当前用户列表中筛选出具有“评审成员”角色的用户
+//    private  Set<Long> getRoleByUserLists(List<AdminUserRespDTO> userRespDTOList) {
+//
+//        Set<Long> RoleIdSet = new HashSet<>();
+//        for (AdminUserRespDTO userRespDTO : userRespDTOList) {
+//            Long userRespDTOId = userRespDTO.getId();
+//            Set<Long> theUserIdList =  permissionService.getUserRoleIdListByUserId(userRespDTOId);
+//            boolean contains154 = theUserIdList.contains(154L);
+//            if(contains154 && !Objects.equals(userRespDTO.getId(), getLoginUserId())){
+//                RoleIdSet.add(userRespDTO.getId());
+//            }
+//        }
+//        return RoleIdSet;
+//    }
+//
 //
-//        //根据部门id获取部门内的成员
-//        Collection<Long> deptIds = new ArrayList<Long>();
-//        deptIds.add(dept.getId());
-//        List<AdminUserRespDTO> userRespDTOList =  adminUserApi.getUserListByDeptIds(deptIds);
-//
-//        //获取“评审成员”
-//        Set<Long> RoleIdSet = getRoleByUserLists(userRespDTOList);
-
-        Set<Long> RoleIdSet = new HashSet<>();
-        RoleIdSet.add(result);
-        return RoleIdSet;
-    }
-
-    private DeptRespDTO getStartUserDept(Long startUserId) {
-        AdminUserRespDTO startUser = adminUserApi.getUser(startUserId);
-        if (startUser.getDeptId() == null) { // 找不到部门,所以无法使用该规则
-            return null;
-        }
-        return deptApi.getDept(startUser.getDeptId());
-    }
-
-    // 在当前用户列表中筛选出具有“评审成员”角色的用户
-    private  Set<Long> getRoleByUserLists(List<AdminUserRespDTO> userRespDTOList) {
-
-        Set<Long> RoleIdSet = new HashSet<>();
-        for (AdminUserRespDTO userRespDTO : userRespDTOList) {
-            Long userRespDTOId = userRespDTO.getId();
-            Set<Long> theUserIdList =  permissionService.getUserRoleIdListByUserId(userRespDTOId);
-            boolean contains154 = theUserIdList.contains(154L);
-            if(contains154 && !Objects.equals(userRespDTO.getId(), getLoginUserId())){
-                RoleIdSet.add(userRespDTO.getId());
-            }
-        }
-        return RoleIdSet;
-    }
-
-
-}
+//}

+ 6 - 6
yudao-module-system/yudao-module-system-biz/pom.xml

@@ -132,12 +132,12 @@
             <groupId>com.xingyuv</groupId>
             <artifactId>spring-boot-starter-captcha-plus</artifactId> <!-- 验证码,一般用于登录使用 -->
         </dependency>
-        <dependency>
-            <groupId>cn.iocoder.boot</groupId>
-            <artifactId>yudao-module-eve-api</artifactId>
-            <version>2.1.0-jdk8-snapshot</version>
-            <scope>compile</scope>
-        </dependency>
+<!--        <dependency>-->
+<!--            <groupId>cn.iocoder.boot</groupId>-->
+<!--            <artifactId>yudao-module-eve-api</artifactId>-->
+<!--            <version>2.1.0-jdk8-snapshot</version>-->
+<!--            <scope>compile</scope>-->
+<!--        </dependency>-->
     </dependencies>
 
 </project>