浏览代码

家庭经济困难认定审批流

yzx 5 月之前
父节点
当前提交
6588556850

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

@@ -67,66 +67,6 @@ public class asProcessInstanceController {
     @Resource
     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("todo-page")
     @Operation(summary = "获取 Todo 待办任务分页")
     @PreAuthorize("@ss.hasPermission('bpm:task:query')")
@@ -144,80 +84,30 @@ 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("/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));
+    }
 
 
 

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

@@ -191,7 +191,7 @@ public class asTaskController {
     }
 
     @PutMapping("/approve-people")
-    @Operation(summary = "整体通过综测审批")
+    @Operation(summary = "整体通过家庭经济困难认定审批")
     @PreAuthorize("@ss.hasPermission('eve:task:update')")
     public CommonResult<Boolean> approveTaskByPeople(@Valid @RequestBody List<BpmTaskApproveReqVO> reqVOList) {
         taskService.approveTaskAchievementByPeople(getLoginUserId(), reqVOList);
@@ -204,7 +204,6 @@ public class asTaskController {
     @PreAuthorize("@ss.hasPermission('eve:task:update')")
     public CommonResult<Boolean> rejectAchievementTask(@Valid @RequestBody BpmTaskApproveReqVO reqVO) {
         taskService.rejectAchievementTask(getLoginUserId(), reqVO);
-
         return success(true);
     }
 
@@ -225,7 +224,7 @@ public class asTaskController {
     }
 
     @PutMapping("/reject-people")
-    @Operation(summary = "整体不通过综测审批:直接结束流程")
+    @Operation(summary = "整体不通过家庭经济困难认定:直接结束流程")
     @PreAuthorize("@ss.hasPermission('eve:task:update')")
     public CommonResult<Boolean> rejectTaskByPeople(@Valid @RequestBody List<BpmTaskRejectReqVO> reqVOList) {
         taskService.rejectTaskByPeople(getLoginUserId(), reqVOList);