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