Browse Source

fix: 增加日志打印

JieZ 2 years ago
parent
commit
1211787996

+ 17 - 14
bpm-core/src/main/java/com/srm/bpm/facade/rest/ProcessFlowRestController.java

@@ -42,6 +42,7 @@ import io.swagger.annotations.ApiImplicitParam;
42
 import io.swagger.annotations.ApiImplicitParams;
42
 import io.swagger.annotations.ApiImplicitParams;
43
 import io.swagger.annotations.ApiOperation;
43
 import io.swagger.annotations.ApiOperation;
44
 import lombok.RequiredArgsConstructor;
44
 import lombok.RequiredArgsConstructor;
45
+import lombok.extern.slf4j.Slf4j;
45
 import springfox.documentation.annotations.ApiIgnore;
46
 import springfox.documentation.annotations.ApiIgnore;
46
 
47
 
47
 /**
48
 /**
@@ -55,6 +56,7 @@ import springfox.documentation.annotations.ApiIgnore;
55
 @RequiredArgsConstructor
56
 @RequiredArgsConstructor
56
 @RequestMapping("/flow/process/rest")
57
 @RequestMapping("/flow/process/rest")
57
 @Api(tags = "流程管理")
58
 @Api(tags = "流程管理")
59
+@Slf4j
58
 public class ProcessFlowRestController {
60
 public class ProcessFlowRestController {
59
     private final DataSourceProperties dataSourceProperties;
61
     private final DataSourceProperties dataSourceProperties;
60
     private final ProcessFlowLogic processFlowLogic;
62
     private final ProcessFlowLogic processFlowLogic;
@@ -64,11 +66,7 @@ public class ProcessFlowRestController {
64
     private final BpmConfig bpmConfig;
66
     private final BpmConfig bpmConfig;
65
 
67
 
66
     @ApiOperation(value = "分页查询流程", httpMethod = "GET")
68
     @ApiOperation(value = "分页查询流程", httpMethod = "GET")
67
-    @ApiImplicitParams(
69
+    @ApiImplicitParams({@ApiImplicitParam(name = "page", defaultValue = "1"), @ApiImplicitParam(name = "limit", defaultValue = "10")})
68
-            {
69
-                    @ApiImplicitParam(name = "page", defaultValue = "1"),
70
-                    @ApiImplicitParam(name = "limit", defaultValue = "10")
71
-            })
72
     @GetMapping("/list")
70
     @GetMapping("/list")
73
     public R<List<ProcessGridDTO>> grid(
71
     public R<List<ProcessGridDTO>> grid(
74
             @ApiIgnore @RequestParam Map<String, Object> params
72
             @ApiIgnore @RequestParam Map<String, Object> params
@@ -76,7 +74,8 @@ public class ProcessFlowRestController {
76
         final Integer pageNo = Integer.valueOf((String) params.get("page"));
74
         final Integer pageNo = Integer.valueOf((String) params.get("page"));
77
         final Integer pageSize = Integer.valueOf((String) params.get("limit"));
75
         final Integer pageSize = Integer.valueOf((String) params.get("limit"));
78
         final String bloc = loginUserHolder.getBloc();
76
         final String bloc = loginUserHolder.getBloc();
79
-        Pair<List<ProcessGridDTO>, Long> pair = processFlowLogic.getProcessFlowByPage(pageNo, pageSize, params, bloc);
77
+        Pair<List<ProcessGridDTO>, Long> pair =
78
+                processFlowLogic.getProcessFlowByPage(pageNo, pageSize, params, bloc);
80
         return R.ok(pair.getKey(), pair.getValue());
79
         return R.ok(pair.getKey(), pair.getValue());
81
     }
80
     }
82
 
81
 
@@ -163,9 +162,9 @@ public class ProcessFlowRestController {
163
      */
162
      */
164
     @PostMapping("process/save")
163
     @PostMapping("process/save")
165
     public R save(
164
     public R save(
166
-            @RequestParam("data") String processDesingerData,
165
+            @RequestParam("data") String processDesingerData, @RequestParam("id") long processId
167
-            @RequestParam("id") long processId
168
     ) {
166
     ) {
167
+        log.info("提交的流程数据:\n{}", processDesingerData);
169
         this.processDesingerLogic.saveProcessAndSetting(processDesingerData, processId);
168
         this.processDesingerLogic.saveProcessAndSetting(processDesingerData, processId);
170
         return R.empty();
169
         return R.empty();
171
     }
170
     }
@@ -198,7 +197,9 @@ public class ProcessFlowRestController {
198
     }
197
     }
199
 
198
 
200
     @PostMapping("/temp/save/{id}")
199
     @PostMapping("/temp/save/{id}")
201
-    public R savePrintTemp(@PathVariable(value = "id") long processId, @RequestParam("file") MultipartFile var1) {
200
+    public R savePrintTemp(
201
+            @PathVariable(value = "id") long processId, @RequestParam("file") MultipartFile var1
202
+    ) {
202
         final boolean b = this.formSettingLogic.updatePrintTemp(processId, var1);
203
         final boolean b = this.formSettingLogic.updatePrintTemp(processId, var1);
203
         return R.state(b);
204
         return R.state(b);
204
     }
205
     }
@@ -232,11 +233,13 @@ public class ProcessFlowRestController {
232
 
233
 
233
     @PostMapping("/formlink/save")
234
     @PostMapping("/formlink/save")
234
     public R formLinkSave(
235
     public R formLinkSave(
235
-            @RequestParam(value = "formLink",required = false,defaultValue = "") String formLink,
236
+            @RequestParam(value = "formLink", required = false, defaultValue = "") String formLink,
236
-            @RequestParam(value = "approveLink",required = false,defaultValue = "") String approveLink,
237
+            @RequestParam(value = "approveLink", required = false, defaultValue = "") String approveLink,
237
-            @RequestParam(value = "manualStartFlag",required = false,defaultValue = "1") Integer manualStartFlag,
238
+            @RequestParam(value = "manualStartFlag", required = false, defaultValue = "1") Integer manualStartFlag,
238
-            @RequestParam("id") long processId) {
239
+            @RequestParam("id") long processId
239
-        final boolean b = this.formSettingLogic.updateFormLink(processId, formLink,approveLink,manualStartFlag);
240
+    ) {
241
+        final boolean b = this.formSettingLogic.updateFormLink(processId, formLink, approveLink,
242
+                manualStartFlag);
240
         return R.state(b);
243
         return R.state(b);
241
     }
244
     }
242
 }
245
 }