|
@@ -2877,11 +2877,16 @@ public class TaskController extends BladeController {
|
|
return report;
|
|
return report;
|
|
}
|
|
}
|
|
|
|
|
|
- @GetMapping("/getFixedFlowPage")
|
|
|
|
|
|
+ @PostMapping("/getFixedFlowPage")
|
|
@ApiOperationSupport(order = 21)
|
|
@ApiOperationSupport(order = 21)
|
|
@ApiOperation(value = "计量预设流程分页", notes = "传入dto")
|
|
@ApiOperation(value = "计量预设流程分页", notes = "传入dto")
|
|
public R<Page<Map<String, Object>>> getFixedFlowPage(@RequestBody PageFixedFlowDTO dto) {
|
|
public R<Page<Map<String, Object>>> getFixedFlowPage(@RequestBody PageFixedFlowDTO dto) {
|
|
- return R.data(taskClient.getFixedFlowPage(dto));
|
|
|
|
|
|
+ Page<Map<String, Object>> resultMap = new Page<>();
|
|
|
|
+ resultMap.setCurrent(dto.getCurrent());
|
|
|
|
+ resultMap.setSize(dto.getSize());
|
|
|
|
+ resultMap.setTotal(jdbcTemplate.queryForObject("SELECT count(1) FROM u_fixed_flow WHERE is_deleted = 0 AND project_id = ? AND contract_id = ?", Long.class, dto.getProjectId(), dto.getContractId()));
|
|
|
|
+ resultMap.setRecords(taskClient.getFixedFlowPage(dto));
|
|
|
|
+ return R.data(resultMap);
|
|
}
|
|
}
|
|
|
|
|
|
@PostMapping("/saveFixedFlow")
|
|
@PostMapping("/saveFixedFlow")
|
|
@@ -2903,7 +2908,6 @@ public class TaskController extends BladeController {
|
|
String[] userIdArray = userIds.split(",");
|
|
String[] userIdArray = userIds.split(",");
|
|
for (String userId : userIdArray) {
|
|
for (String userId : userIdArray) {
|
|
if (!allUserIds.add(userId)) {
|
|
if (!allUserIds.add(userId)) {
|
|
- //如果添加失败,说明这个userId已经存在,表示有重复
|
|
|
|
duplicateUserIds.add(userId);
|
|
duplicateUserIds.add(userId);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -2931,7 +2935,7 @@ public class TaskController extends BladeController {
|
|
@GetMapping("/getFixedFlow")
|
|
@GetMapping("/getFixedFlow")
|
|
@ApiOperationSupport(order = 23)
|
|
@ApiOperationSupport(order = 23)
|
|
@ApiOperation(value = "计量获取预设流程信息", notes = "传入预设流程id")
|
|
@ApiOperation(value = "计量获取预设流程信息", notes = "传入预设流程id")
|
|
- public R<FixedFlowVO> getFixedFlow(@RequestBody String id) {
|
|
|
|
|
|
+ public R<FixedFlowVO> getFixedFlow(@RequestParam String id) {
|
|
FixedFlow fixedFlow = jdbcTemplate.query("SELECT * FROM u_fixed_flow WHERE is_deleted = 0 AND id = ?", new Object[]{id}, new BeanPropertyRowMapper<>(FixedFlow.class)).stream().findAny().orElse(null);
|
|
FixedFlow fixedFlow = jdbcTemplate.query("SELECT * FROM u_fixed_flow WHERE is_deleted = 0 AND id = ?", new Object[]{id}, new BeanPropertyRowMapper<>(FixedFlow.class)).stream().findAny().orElse(null);
|
|
if (fixedFlow != null) {
|
|
if (fixedFlow != null) {
|
|
List<FixedFlowLink> fixedFlowLinkList = jdbcTemplate.query("SELECT * FROM u_fixed_flow_link WHERE is_deleted = 0 AND fixed_flow_id = ?", new Object[]{fixedFlow.getId()}, new BeanPropertyRowMapper<>(FixedFlowLink.class));
|
|
List<FixedFlowLink> fixedFlowLinkList = jdbcTemplate.query("SELECT * FROM u_fixed_flow_link WHERE is_deleted = 0 AND fixed_flow_id = ?", new Object[]{fixedFlow.getId()}, new BeanPropertyRowMapper<>(FixedFlowLink.class));
|
|
@@ -2993,7 +2997,6 @@ public class TaskController extends BladeController {
|
|
String[] userIdArray = userIds.split(",");
|
|
String[] userIdArray = userIds.split(",");
|
|
for (String userId : userIdArray) {
|
|
for (String userId : userIdArray) {
|
|
if (!allUserIds.add(userId)) {
|
|
if (!allUserIds.add(userId)) {
|
|
- //如果添加失败,说明这个userId已经存在,表示有重复
|
|
|
|
duplicateUserIds.add(userId);
|
|
duplicateUserIds.add(userId);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -3003,7 +3006,7 @@ public class TaskController extends BladeController {
|
|
}
|
|
}
|
|
|
|
|
|
if (taskClient.updateFixedFlow(dto.getFixedFlowId(), dto.getFixedName())) {
|
|
if (taskClient.updateFixedFlow(dto.getFixedFlowId(), dto.getFixedName())) {
|
|
-
|
|
|
|
|
|
+ jdbcTemplate.update("DELETE FROM u_fixed_flow_link WHERE fixed_flow_id = ?", dto.getFixedFlowId());
|
|
int sort = 1;
|
|
int sort = 1;
|
|
for (UpdateFixedFlowDTO.FixedBranch fixedBranch : dto.getFixedBranchList()) {
|
|
for (UpdateFixedFlowDTO.FixedBranch fixedBranch : dto.getFixedBranchList()) {
|
|
taskClient.updateFixedFlowLink(dto.getFixedFlowId(), fixedBranch.getName(), fixedBranch.getType(),
|
|
taskClient.updateFixedFlowLink(dto.getFixedFlowId(), fixedBranch.getName(), fixedBranch.getType(),
|
|
@@ -3016,13 +3019,13 @@ public class TaskController extends BladeController {
|
|
return R.fail("操作失败");
|
|
return R.fail("操作失败");
|
|
}
|
|
}
|
|
|
|
|
|
- @PostMapping("/deleteFixedFlowBranch")
|
|
|
|
|
|
+ /*@PostMapping("/deleteFixedFlowBranch")
|
|
@ApiOperationSupport(order = 25)
|
|
@ApiOperationSupport(order = 25)
|
|
@ApiOperation(value = "计量刪除预设流程分支", notes = "传入预设流程id、分支名称")
|
|
@ApiOperation(value = "计量刪除预设流程分支", notes = "传入预设流程id、分支名称")
|
|
public R<Object> deleteFixedFlowBranch(@RequestParam String id, @RequestParam String name) {
|
|
public R<Object> deleteFixedFlowBranch(@RequestParam String id, @RequestParam String name) {
|
|
jdbcTemplate.update("DELETE FROM u_fixed_flow_link WHERE fixed_flow_id = ? AND fixed_flow_link = ?", new Object[]{id, name});
|
|
jdbcTemplate.update("DELETE FROM u_fixed_flow_link WHERE fixed_flow_id = ? AND fixed_flow_link = ?", new Object[]{id, name});
|
|
- return R.fail("操作成功");
|
|
|
|
- }
|
|
|
|
|
|
+ return R.success("操作成功");
|
|
|
|
+ }*/
|
|
|
|
|
|
@PostMapping("/deleteFixedFlow")
|
|
@PostMapping("/deleteFixedFlow")
|
|
@ApiOperationSupport(order = 26)
|
|
@ApiOperationSupport(order = 26)
|
|
@@ -3030,7 +3033,7 @@ public class TaskController extends BladeController {
|
|
public R<Object> deleteFixedFlow(@RequestParam String id) {
|
|
public R<Object> deleteFixedFlow(@RequestParam String id) {
|
|
jdbcTemplate.update("DELETE FROM u_fixed_flow WHERE id = ?", new Object[]{id});
|
|
jdbcTemplate.update("DELETE FROM u_fixed_flow WHERE id = ?", new Object[]{id});
|
|
jdbcTemplate.update("DELETE FROM u_fixed_flow_link WHERE fixed_flow_id = ?", new Object[]{id});
|
|
jdbcTemplate.update("DELETE FROM u_fixed_flow_link WHERE fixed_flow_id = ?", new Object[]{id});
|
|
- return R.fail("操作成功");
|
|
|
|
|
|
+ return R.success("操作成功");
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|