diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/sys/controller/SysProcDefController.java b/hz-pm-api/src/main/java/com/hz/pm/api/sys/controller/SysProcDefController.java index 7680075..59fa435 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/sys/controller/SysProcDefController.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/sys/controller/SysProcDefController.java @@ -1,5 +1,7 @@ package com.hz.pm.api.sys.controller; +import cn.hutool.json.JSONObject; +import cn.hutool.json.JSONUtil; import com.hz.pm.api.sys.manage.InitProcessManage; import com.ningdatech.basic.model.PageVo; import com.ningdatech.log.annotation.WebLog; @@ -15,6 +17,7 @@ import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import java.util.Set; +import java.util.stream.Collectors; /** * @Classname SysProcdefController @@ -37,7 +40,7 @@ public class SysProcDefController { @ApiOperation(value = "系统流程配置列表", notes = "系统流程配置列表") @GetMapping("/list") public PageVo list(@RequestParam(defaultValue = "1") Integer pageNumber, - @RequestParam(defaultValue = "10") Integer pageSize, + @RequestParam(defaultValue = "20") Integer pageSize, @RequestParam(required = false) String mhUnitId) { return modelGroupService.getModelsPage(mhUnitId, pageNumber, pageSize); } @@ -75,4 +78,224 @@ public class SysProcDefController { initProcessManage.initProcessForUnits(unitIds); } + public static void main(String[] args) { + String s = "{\n" + + " \"code\": 200,\n" + + " \"data\": [\n" + + " {\n" + + " \"id\": 32,\n" + + " \"name\": \"上城区信创办\",\n" + + " \"parentId\": 1084,\n" + + " \"shortName\": \"上城区\",\n" + + " \"sort\": 13,\n" + + " \"type\": \"NODE\"\n" + + " },\n" + + " {\n" + + " \"id\": 3418,\n" + + " \"name\": \"上城区国有企业\",\n" + + " \"parentId\": 32,\n" + + " \"sort\": 1,\n" + + " \"type\": \"SASAC\"\n" + + " },\n" + + " {\n" + + " \"id\": 41,\n" + + " \"name\": \"临安区信创办\",\n" + + " \"parentId\": 1084,\n" + + " \"shortName\": \"临安区\",\n" + + " \"sort\": 4,\n" + + " \"type\": \"NODE\"\n" + + " },\n" + + " {\n" + + " \"id\": 3409,\n" + + " \"name\": \"临安区国有企业\",\n" + + " \"parentId\": 41,\n" + + " \"sort\": 1,\n" + + " \"type\": \"SASAC\"\n" + + " },\n" + + " {\n" + + " \"id\": 38,\n" + + " \"name\": \"临平区信创办\",\n" + + " \"parentId\": 1084,\n" + + " \"shortName\": \"临平区\",\n" + + " \"sort\": 7,\n" + + " \"type\": \"NODE\"\n" + + " },\n" + + " {\n" + + " \"id\": 3412,\n" + + " \"name\": \"临平区国有企业\",\n" + + " \"parentId\": 38,\n" + + " \"sort\": 1,\n" + + " \"type\": \"SASAC\"\n" + + " },\n" + + " {\n" + + " \"id\": 37,\n" + + " \"name\": \"余杭区信创办\",\n" + + " \"parentId\": 1084,\n" + + " \"shortName\": \"余杭区\",\n" + + " \"sort\": 8,\n" + + " \"type\": \"NODE\"\n" + + " },\n" + + " {\n" + + " \"id\": 3413,\n" + + " \"name\": \"余杭区国有企业\",\n" + + " \"parentId\": 37,\n" + + " \"sort\": 1,\n" + + " \"type\": \"SASAC\"\n" + + " },\n" + + " {\n" + + " \"id\": 40,\n" + + " \"name\": \"富阳区信创办\",\n" + + " \"parentId\": 1084,\n" + + " \"shortName\": \"富阳区\",\n" + + " \"sort\": 5,\n" + + " \"type\": \"NODE\"\n" + + " },\n" + + " {\n" + + " \"id\": 3410,\n" + + " \"name\": \"富阳区国有企业\",\n" + + " \"parentId\": 40,\n" + + " \"sort\": 1,\n" + + " \"type\": \"SASAC\"\n" + + " },\n" + + " {\n" + + " \"id\": 1,\n" + + " \"name\": \"市信创办\",\n" + + " \"parentId\": 0,\n" + + " \"sort\": 1,\n" + + " \"type\": \"REGION\"\n" + + " },\n" + + " {\n" + + " \"id\": 3269,\n" + + " \"name\": \"市属国有企业\",\n" + + " \"parentId\": 1,\n" + + " \"sort\": 3,\n" + + " \"type\": \"SASAC\"\n" + + " },\n" + + " {\n" + + " \"id\": 44,\n" + + " \"name\": \"建德市信创办\",\n" + + " \"parentId\": 1084,\n" + + " \"shortName\": \"建德市\",\n" + + " \"sort\": 1,\n" + + " \"type\": \"NODE\"\n" + + " },\n" + + " {\n" + + " \"id\": 3406,\n" + + " \"name\": \"建德市国有企业\",\n" + + " \"parentId\": 44,\n" + + " \"sort\": 1,\n" + + " \"type\": \"SASAC\"\n" + + " },\n" + + " {\n" + + " \"id\": 33,\n" + + " \"name\": \"拱墅区信创办\",\n" + + " \"parentId\": 1084,\n" + + " \"shortName\": \"拱墅区\",\n" + + " \"sort\": 12,\n" + + " \"type\": \"NODE\"\n" + + " },\n" + + " {\n" + + " \"id\": 3417,\n" + + " \"name\": \"拱墅区国有企业\",\n" + + " \"parentId\": 33,\n" + + " \"sort\": 1,\n" + + " \"type\": \"SASAC\"\n" + + " },\n" + + " {\n" + + " \"id\": 42,\n" + + " \"name\": \"桐庐县信创办\",\n" + + " \"parentId\": 1084,\n" + + " \"shortName\": \"桐庐县\",\n" + + " \"sort\": 3,\n" + + " \"type\": \"NODE\"\n" + + " },\n" + + " {\n" + + " \"id\": 3408,\n" + + " \"name\": \"桐庐县国有企业\",\n" + + " \"parentId\": 42,\n" + + " \"sort\": 1,\n" + + " \"type\": \"SASAC\"\n" + + " },\n" + + " {\n" + + " \"id\": 43,\n" + + " \"name\": \"淳安县信创办\",\n" + + " \"parentId\": 1084,\n" + + " \"shortName\": \"淳安县\",\n" + + " \"sort\": 2,\n" + + " \"type\": \"NODE\"\n" + + " },\n" + + " {\n" + + " \"id\": 3407,\n" + + " \"name\": \"淳安县国有企业\",\n" + + " \"parentId\": 43,\n" + + " \"sort\": 1,\n" + + " \"type\": \"SASAC\"\n" + + " },\n" + + " {\n" + + " \"id\": 35,\n" + + " \"name\": \"滨江区信创办\",\n" + + " \"parentId\": 1084,\n" + + " \"shortName\": \"滨江区\",\n" + + " \"sort\": 10,\n" + + " \"type\": \"NODE\"\n" + + " },\n" + + " {\n" + + " \"id\": 3415,\n" + + " \"name\": \"滨江区国有企业\",\n" + + " \"parentId\": 35,\n" + + " \"sort\": 1,\n" + + " \"type\": \"SASAC\"\n" + + " },\n" + + " {\n" + + " \"id\": 36,\n" + + " \"name\": \"萧山区信创办\",\n" + + " \"parentId\": 1084,\n" + + " \"shortName\": \"萧山区\",\n" + + " \"sort\": 9,\n" + + " \"type\": \"NODE\"\n" + + " },\n" + + " {\n" + + " \"id\": 3414,\n" + + " \"name\": \"萧山区国有企业\",\n" + + " \"parentId\": 36,\n" + + " \"sort\": 1,\n" + + " \"type\": \"SASAC\"\n" + + " },\n" + + " {\n" + + " \"id\": 34,\n" + + " \"name\": \"西湖区信创办\",\n" + + " \"parentId\": 1084,\n" + + " \"shortName\": \"西湖区\",\n" + + " \"sort\": 11,\n" + + " \"type\": \"NODE\"\n" + + " },\n" + + " {\n" + + " \"id\": 3416,\n" + + " \"name\": \"西湖区国有企业\",\n" + + " \"parentId\": 34,\n" + + " \"sort\": 1,\n" + + " \"type\": \"SASAC\"\n" + + " },\n" + + " {\n" + + " \"id\": 39,\n" + + " \"name\": \"钱塘区信创办\",\n" + + " \"parentId\": 1084,\n" + + " \"shortName\": \"钱塘区\",\n" + + " \"sort\": 6,\n" + + " \"type\": \"NODE\"\n" + + " },\n" + + " {\n" + + " \"id\": 3411,\n" + + " \"name\": \"钱塘区国有企业\",\n" + + " \"parentId\": 39,\n" + + " \"sort\": 1,\n" + + " \"type\": \"SASAC\"\n" + + " }\n" + + " ],\n" + + " \"message\": \"正常\"\n" + + "}"; + + System.out.println(JSONUtil.parseObj(s).getBeanList("data", JSONObject.class).stream().map(w -> w.getStr("id")).collect(Collectors.joining(","))); + } + }