From b30f4c40c77a940a2a749a676e901787f55040b0 Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期五, 06 十一月 2026 11:48:25 +0800
Subject: [PATCH] 流程优化

---
 src/main/java/com/ruoyi/projectManagement/controller/ProjectWorkflowController.java |   48 +++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 39 insertions(+), 9 deletions(-)

diff --git a/src/main/java/com/ruoyi/projectManagement/controller/ProjectWorkflowController.java b/src/main/java/com/ruoyi/projectManagement/controller/ProjectWorkflowController.java
index 3e1d9a9..eb0c39c 100644
--- a/src/main/java/com/ruoyi/projectManagement/controller/ProjectWorkflowController.java
+++ b/src/main/java/com/ruoyi/projectManagement/controller/ProjectWorkflowController.java
@@ -1,6 +1,8 @@
 package com.ruoyi.projectManagement.controller;
 
 import com.ruoyi.framework.web.domain.AjaxResult;
+import com.ruoyi.framework.aspectj.lang.annotation.Log;
+import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
 import com.ruoyi.projectManagement.dto.ProjectWorkflowDtos;
 import com.ruoyi.projectManagement.service.ProjectWorkflowService;
 import io.swagger.v3.oas.annotations.Operation;
@@ -24,25 +26,30 @@
     private final ProjectWorkflowService service;
 
     @GetMapping("/{projectId}")
+    @PreAuthorize("@ss.hasPermi('project:info:query')")
     @Operation(summary = "椤圭洰妯″潡銆佽窡杩涖�佹眹鎶ャ�佺粺璁″拰璧勬枡")
     public AjaxResult workbench(@PathVariable Long projectId) {
         return AjaxResult.success(service.getWorkbench(projectId));
     }
 
-    @PreAuthorize("@ss.hasPermi('project:module:edit')")
+    @GetMapping("/lifecycle/{projectId}")
+    @PreAuthorize("@ss.hasPermi('project:info:query')")
+    @Operation(summary = "椤圭洰鐢熷懡鍛ㄦ湡")
+    public AjaxResult lifecycle(@PathVariable Long projectId) {
+        return AjaxResult.success(service.getLifecycle(projectId));
+    }
+
+    @PreAuthorize("@ss.hasPermi('project:start')")
     @PostMapping("/start/{projectId}")
+    @Log(title = "椤圭洰绠$悊-寮�濮嬮」鐩�", businessType = BusinessType.UPDATE)
     public AjaxResult startProject(@PathVariable Long projectId) {
         service.startProject(projectId);
         return AjaxResult.success();
     }
 
-    @PostMapping("/project-executors")
-    public AjaxResult updateProjectExecutors(@RequestBody ProjectWorkflowDtos.ProjectExecutorsRequest request) {
-        service.updateProjectExecutors(request);
-        return AjaxResult.success();
-    }
-
     @PostMapping("/transition")
+    @PreAuthorize("@ss.hasPermi('project:phase:edit')")
+    @Log(title = "椤圭洰绠$悊-闃舵鎺ㄨ繘", businessType = BusinessType.UPDATE)
     public AjaxResult transition(@RequestBody ProjectWorkflowDtos.StageTransitionRequest request) {
         service.transitionStage(request);
         return AjaxResult.success();
@@ -50,12 +57,22 @@
 
     @PreAuthorize("@ss.hasPermi('project:module:edit')")
     @PostMapping("/module")
+    @Log(title = "椤圭洰绠$悊-妯″潡缁存姢", businessType = BusinessType.UPDATE)
     public AjaxResult saveModule(@RequestBody ProjectWorkflowDtos.ModuleSaveRequest request) {
         return AjaxResult.success(service.saveModule(request));
     }
 
+    @PreAuthorize("@ss.hasPermi('project:module:edit')")
+    @PostMapping("/modules/batch")
+    @Log(title = "椤圭洰绠$悊-妯″潡鎵归噺缁存姢", businessType = BusinessType.UPDATE)
+    public AjaxResult saveModulesBatch(@RequestBody ProjectWorkflowDtos.ModulesBatchRequest request) {
+        service.saveModulesBatch(request);
+        return AjaxResult.success();
+    }
+
     @PreAuthorize("@ss.hasPermi('project:module:remove')")
     @DeleteMapping("/module/{id}")
+    @Log(title = "椤圭洰绠$悊-妯″潡鍒犻櫎", businessType = BusinessType.DELETE)
     public AjaxResult deleteModule(@PathVariable Long id) {
         service.deleteModule(id);
         return AjaxResult.success();
@@ -63,80 +80,93 @@
 
     @PreAuthorize("@ss.hasPermi('project:follow:add')")
     @PostMapping("/follow-up")
+    @Log(title = "椤圭洰绠$悊-椤圭洰璺熻繘", businessType = BusinessType.INSERT)
     public AjaxResult saveFollowUp(@RequestBody ProjectWorkflowDtos.FollowUpRequest request) {
         return AjaxResult.success(service.saveFollowUp(request));
     }
 
     @PreAuthorize("@ss.hasPermi('project:follow:remove')")
     @DeleteMapping("/follow-up/{id}")
+    @Log(title = "椤圭洰绠$悊-璺熻繘鍒犻櫎", businessType = BusinessType.DELETE)
     public AjaxResult deleteFollowUp(@PathVariable Long id) {
-        service.softDelete("project_management_follow_up", id);
+        service.deleteFollowUp(id);
         return AjaxResult.success();
     }
 
     @PreAuthorize("@ss.hasPermi('project:report:add')")
     @PostMapping("/report")
+    @Log(title = "椤圭洰绠$悊-杩涘害姹囨姤", businessType = BusinessType.INSERT)
     public AjaxResult saveReport(@RequestBody ProjectWorkflowDtos.ProgressReportRequest request) {
         return AjaxResult.success(service.saveReport(request));
     }
 
     @PreAuthorize("@ss.hasPermi('project:report:remove')")
     @DeleteMapping("/report/{id}")
+    @Log(title = "椤圭洰绠$悊-姹囨姤鍒犻櫎", businessType = BusinessType.DELETE)
     public AjaxResult deleteReport(@PathVariable Long id) {
-        service.softDelete("project_management_progress_report", id);
+        service.deleteReport(id);
         return AjaxResult.success();
     }
 
     @PreAuthorize("@ss.hasPermi('project:material:add')")
     @PostMapping("/material")
+    @Log(title = "椤圭洰绠$悊-璧勬枡缁存姢", businessType = BusinessType.INSERT)
     public AjaxResult saveMaterial(@RequestBody ProjectWorkflowDtos.MaterialRequest request) {
         return AjaxResult.success(service.saveMaterial(request));
     }
 
     @PreAuthorize("@ss.hasPermi('project:phase:edit')")
     @PostMapping("/phase")
+    @Log(title = "椤圭洰绠$悊-闃舵鍔炵悊", businessType = BusinessType.UPDATE)
     public AjaxResult savePhase(@RequestBody ProjectWorkflowDtos.PhaseRequest request) {
         return AjaxResult.success(service.savePhase(request));
     }
 
     @PreAuthorize("@ss.hasPermi('project:material:remove')")
     @DeleteMapping("/material/{id}")
+    @Log(title = "椤圭洰绠$悊-璧勬枡鍒犻櫎", businessType = BusinessType.DELETE)
     public AjaxResult deleteMaterial(@PathVariable Long id) {
         service.softDelete("project_management_material", id);
         return AjaxResult.success();
     }
 
     @GetMapping("/category/list")
+    @PreAuthorize("@ss.hasAnyPermi('project:category:list,project:info:add,project:info:edit')")
     public AjaxResult categoryList() {
         return AjaxResult.success(service.listCategories());
     }
 
     @PreAuthorize("@ss.hasPermi('project:category:edit')")
     @PostMapping("/category")
+    @Log(title = "椤圭洰绠$悊-鍒嗙被缁存姢", businessType = BusinessType.UPDATE)
     public AjaxResult saveCategory(@RequestBody ProjectWorkflowDtos.CategoryRequest request) {
         return AjaxResult.success(service.saveCategory(request));
     }
 
     @PreAuthorize("@ss.hasPermi('project:category:remove')")
     @DeleteMapping("/category/{id}")
+    @Log(title = "椤圭洰绠$悊-鍒嗙被鍒犻櫎", businessType = BusinessType.DELETE)
     public AjaxResult deleteCategory(@PathVariable Long id) {
         service.deleteCategory(id);
         return AjaxResult.success();
     }
 
     @GetMapping("/policy/list")
+    @PreAuthorize("@ss.hasPermi('policy:file:list')")
     public AjaxResult policyList(@RequestParam(required = false) String keyword) {
         return AjaxResult.success(service.listPolicies(keyword));
     }
 
     @PreAuthorize("@ss.hasPermi('policy:file:edit')")
     @PostMapping("/policy")
+    @Log(title = "鏀垮簻鏀跨瓥鏂囦欢-缁存姢", businessType = BusinessType.UPDATE)
     public AjaxResult savePolicy(@RequestBody ProjectWorkflowDtos.PolicyRequest request) {
         return AjaxResult.success(service.savePolicy(request));
     }
 
     @PreAuthorize("@ss.hasPermi('policy:file:remove')")
     @DeleteMapping("/policy/{id}")
+    @Log(title = "鏀垮簻鏀跨瓥鏂囦欢-鍒犻櫎", businessType = BusinessType.DELETE)
     public AjaxResult deletePolicy(@PathVariable Long id) {
         service.softDelete("government_policy_file", id);
         return AjaxResult.success();

--
Gitblit v1.9.3