From 4259deb19122a4807d50c99ed4a95405ebe4a47c Mon Sep 17 00:00:00 2001
From: zhou zhou <3272660260@qq.com>
Date: 星期五, 10 四月 2026 08:40:18 +0800
Subject: [PATCH] #

---
 rsf-server/src/main/java/com/vincent/rsf/server/system/controller/FlowStepInstanceController.java |   50 +++++++++++++++++++++++++++++++-------------------
 1 files changed, 31 insertions(+), 19 deletions(-)

diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/system/controller/FlowStepInstanceController.java b/rsf-server/src/main/java/com/vincent/rsf/server/system/controller/FlowStepInstanceController.java
index 8f6324c..c2f5729 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/system/controller/FlowStepInstanceController.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/system/controller/FlowStepInstanceController.java
@@ -15,8 +15,9 @@
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
+import com.vincent.rsf.server.manager.utils.buildPageRowsUtils;
 
-import javax.servlet.http.HttpServletResponse;
+import jakarta.servlet.http.HttpServletResponse;
 import java.util.*;
 
 @RestController
@@ -25,33 +26,33 @@
     @Autowired
     private FlowStepInstanceService flowStepInstanceService;
 
-    @PreAuthorize("hasAuthority('system:flowStepInstance:list')")
+    @PreAuthorize("hasAuthority('manager:task:list')")
     @PostMapping("/flowStepInstance/page")
     public R page(@RequestBody Map<String, Object> map) {
         BaseParam baseParam = buildParam(map, BaseParam.class);
         PageParam<FlowStepInstance, BaseParam> pageParam = new PageParam<>(baseParam, FlowStepInstance.class);
-        return R.ok().add(flowStepInstanceService.page(pageParam, pageParam.buildWrapper(true)));
+        return R.ok().add(buildPageRowsUtils.rowsMap(flowStepInstanceService.page(pageParam, pageParam.buildWrapper(true))));
     }
 
-    @PreAuthorize("hasAuthority('system:flowStepInstance:list')")
+    @PreAuthorize("hasAuthority('manager:task:list')")
     @PostMapping("/flowStepInstance/list")
     public R list(@RequestBody Map<String, Object> map) {
-        return R.ok().add(flowStepInstanceService.list());
+        return R.ok().add(buildPageRowsUtils.rowsMap(flowStepInstanceService.list()));
     }
 
-    @PreAuthorize("hasAuthority('system:flowStepInstance:list')")
+    @PreAuthorize("hasAuthority('manager:task:list')")
     @PostMapping({"/flowStepInstance/many/{ids}", "/flowStepInstances/many/{ids}"})
     public R many(@PathVariable Long[] ids) {
-        return R.ok().add(flowStepInstanceService.listByIds(Arrays.asList(ids)));
+        return R.ok().add(buildPageRowsUtils.rowsMap(flowStepInstanceService.listByIds(Arrays.asList(ids))));
     }
 
-    @PreAuthorize("hasAuthority('system:flowStepInstance:list')")
+    @PreAuthorize("hasAuthority('manager:task:list')")
     @GetMapping("/flowStepInstance/{id}")
     public R get(@PathVariable("id") Long id) {
-        return R.ok().add(flowStepInstanceService.getById(id));
+        return R.ok().add(buildPageRowsUtils.rowsMap(flowStepInstanceService.getById(id)));
     }
 
-    @PreAuthorize("hasAuthority('system:flowStepInstance:save')")
+    @PreAuthorize("hasAuthority('manager:task:save')")
     @OperationLog("Create 瀛愭祦绋嬫楠ゅ疄渚�")
     @PostMapping("/flowStepInstance/save")
     public R save(@RequestBody FlowStepInstance flowStepInstance) {
@@ -60,10 +61,10 @@
         if (!flowStepInstanceService.save(flowStepInstance)) {
             return R.error("Save Fail");
         }
-        return R.ok("Save Success").add(flowStepInstance);
+        return R.ok("Save Success").add(buildPageRowsUtils.rowsMap(flowStepInstance));
     }
 
-    @PreAuthorize("hasAuthority('system:flowStepInstance:update')")
+    @PreAuthorize("hasAuthority('manager:task:update')")
     @OperationLog("Update 瀛愭祦绋嬫楠ゅ疄渚�")
     @PostMapping("/flowStepInstance/update")
     public R update(@RequestBody FlowStepInstance flowStepInstance) {
@@ -71,20 +72,30 @@
         if (!flowStepInstanceService.updateById(flowStepInstance)) {
             return R.error("Update Fail");
         }
-        return R.ok("Update Success").add(flowStepInstance);
+        return R.ok("Update Success").add(buildPageRowsUtils.rowsMap(flowStepInstance));
     }
 
-    @PreAuthorize("hasAuthority('system:flowStepInstance:remove')")
+    @PreAuthorize("hasAuthority('manager:task:update')")
+    @OperationLog("Jump Current 瀛愭祦绋嬫楠ゅ疄渚�")
+    @PostMapping("/flowStepInstance/jumpCurrent/{id}")
+    public R jumpCurrent(@PathVariable("id") Long id) {
+        if (!flowStepInstanceService.jumpCurrent(id)) {
+            return R.error("璺宠浆寮傚父");
+        }
+        return R.ok("璺宠浆鎴愬姛").add(buildPageRowsUtils.rowsMap(id));
+    }
+
+    @PreAuthorize("hasAuthority('manager:task:remove')")
     @OperationLog("Delete 瀛愭祦绋嬫楠ゅ疄渚�")
     @PostMapping("/flowStepInstance/remove/{ids}")
     public R remove(@PathVariable Long[] ids) {
         if (!flowStepInstanceService.removeByIds(Arrays.asList(ids))) {
             return R.error("Delete Fail");
         }
-        return R.ok("Delete Success").add(ids);
+        return R.ok("Delete Success").add(buildPageRowsUtils.rowsMap(ids));
     }
 
-    @PreAuthorize("hasAuthority('system:flowStepInstance:list')")
+    @PreAuthorize("hasAuthority('manager:task:list')")
     @PostMapping("/flowStepInstance/query")
     public R query(@RequestParam(required = false) String condition) {
         List<KeyValVo> vos = new ArrayList<>();
@@ -95,13 +106,14 @@
         flowStepInstanceService.page(new Page<>(1, 30), wrapper).getRecords().forEach(
                 item -> vos.add(new KeyValVo(item.getId(), item.getId()))
         );
-        return R.ok().add(vos);
+        return R.ok().add(buildPageRowsUtils.rowsMap(vos));
     }
 
-    @PreAuthorize("hasAuthority('system:flowStepInstance:list')")
+    @PreAuthorize("hasAuthority('manager:task:list')")
     @PostMapping("/flowStepInstance/export")
     public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception {
-        ExcelUtil.build(ExcelUtil.create(flowStepInstanceService.list(), FlowStepInstance.class), response);
+        ExcelUtil.build(ExcelUtil.create(buildPageRowsUtils.rowsMap(flowStepInstanceService.list()), FlowStepInstance.class), response);
     }
 
 }
+

--
Gitblit v1.9.1