Переглянути джерело

1、接口添加Swagger注解
2、实体类添加Swagger中文描述

csg6 5 місяців тому
батько
коміт
92b9b04285
41 змінених файлів з 1191 додано та 961 видалено
  1. 14 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java
  2. 40 52
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDeptController.java
  3. 27 27
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysMenuController.java
  4. 52 41
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysPostController.java
  5. 34 16
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysRoleController.java
  6. 39 57
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java
  7. 1 1
      ruoyi-admin/src/main/resources/application-druid-test.yml
  8. 2 0
      ruoyi-admin/src/main/resources/application.yml
  9. 0 2
      ruoyi-admin/src/test/java/com/post/Test02.java
  10. 15 6
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDept.java
  11. 10 4
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysRole.java
  12. 14 2
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java
  13. 1 1
      ruoyi-framework/pom.xml
  14. 3 3
      ruoyi-framework/src/main/java/com/ruoyi/framework/interceptor/cas/CasConfigure.java
  15. 34 35
      ruoyi-postcheck/src/main/java/com/ruoyi/postCheck/controller/PostAssessmentRatingOtherController.java
  16. 39 28
      ruoyi-postcheck/src/main/java/com/ruoyi/postCheck/controller/PostCheckedController.java
  17. 3 18
      ruoyi-postcheck/src/main/java/com/ruoyi/postCheck/controller/PostCheckedHistoryController.java
  18. 17 9
      ruoyi-postcheck/src/main/java/com/ruoyi/postCheck/controller/PostCheckedHomePageController.java
  19. 22 23
      ruoyi-postcheck/src/main/java/com/ruoyi/postCheck/controller/PostCheckedItemsController.java
  20. 127 41
      ruoyi-postcheck/src/main/java/com/ruoyi/postCheck/controller/PostCheckedProblemController.java
  21. 65 82
      ruoyi-postcheck/src/main/java/com/ruoyi/postCheck/controller/PostCheckedProblemRecordController.java
  22. 7 1
      ruoyi-postcheck/src/main/java/com/ruoyi/postCheck/controller/PostCheckedProductionProblemStatisticsController.java
  23. 17 15
      ruoyi-postcheck/src/main/java/com/ruoyi/postCheck/controller/PostHighlightsController.java
  24. 19 18
      ruoyi-postcheck/src/main/java/com/ruoyi/postCheck/controller/PostListController.java
  25. 38 38
      ruoyi-postcheck/src/main/java/com/ruoyi/postCheck/controller/PostPlanCheckUserController.java
  26. 78 72
      ruoyi-postcheck/src/main/java/com/ruoyi/postCheck/controller/PostPlanController.java
  27. 29 34
      ruoyi-postcheck/src/main/java/com/ruoyi/postCheck/controller/PostPlanInfoController.java
  28. 9 10
      ruoyi-postcheck/src/main/java/com/ruoyi/postCheck/controller/PostPlanJoinCheckedController.java
  29. 3 3
      ruoyi-postcheck/src/main/java/com/ruoyi/postCheck/controller/PostPlanJoinProblemController.java
  30. 11 10
      ruoyi-postcheck/src/main/java/com/ruoyi/postCheck/controller/PostProgrammeController.java
  31. 37 61
      ruoyi-postcheck/src/main/java/com/ruoyi/postCheck/controller/PostProgrammeTemplateController.java
  32. 22 25
      ruoyi-postcheck/src/main/java/com/ruoyi/postCheck/controller/PostTeamController.java
  33. 6 5
      ruoyi-postcheck/src/main/java/com/ruoyi/postCheck/controller/PostTeamDeptController.java
  34. 12 22
      ruoyi-postcheck/src/main/java/com/ruoyi/postCheck/controller/PostTeamUserController.java
  35. 7 0
      ruoyi-postcheck/src/main/java/com/ruoyi/postCheck/service/IPostAssessmentRatingOtherService.java
  36. 148 18
      ruoyi-postcheck/src/main/java/com/ruoyi/postCheck/service/impl/PostAssessmentRatingOtherServiceImpl.java
  37. 45 19
      ruoyi-postcheck/src/main/java/com/ruoyi/postCheck/service/impl/PostAssessmentRulesServiceImpl.java
  38. 47 76
      ruoyi-quartz/src/main/java/com/ruoyi/quartz/controller/SysJobController.java
  39. 71 62
      ruoyi-quartz/src/main/java/com/ruoyi/quartz/domain/SysJob.java
  40. 5 0
      ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/PostCheckSystemTask.java
  41. 21 24
      ruoyi-system/src/main/java/com/ruoyi/system/domain/SysPost.java

+ 14 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java

@@ -14,6 +14,9 @@ import javax.servlet.http.HttpServletResponse;
14 14
 import com.ruoyi.common.annotation.Anonymous;
15 15
 import com.ruoyi.common.utils.AntiVirus;
16 16
 import com.ruoyi.postCheck.service.IPostCheckedService;
17
+import io.swagger.annotations.Api;
18
+import io.swagger.annotations.ApiImplicitParam;
19
+import io.swagger.annotations.ApiImplicitParams;
17 20
 import io.swagger.annotations.ApiOperation;
18 21
 import org.apache.commons.io.IOUtils;
19 22
 import org.apache.ibatis.annotations.Param;
@@ -37,6 +40,7 @@ import com.ruoyi.framework.config.ServerConfig;
37 40
  *
38 41
  * @author ruoyi
39 42
  */
43
+@Api(tags = "8.1.1-系统工具类")
40 44
 @RestController
41 45
 @RequestMapping("/common")
42 46
 @Anonymous
@@ -62,6 +66,11 @@ public class CommonController {
62 66
      * @param fileName 文件名称
63 67
      * @param delete   是否删除
64 68
      */
69
+    @ApiOperation("下载文件")
70
+    @ApiImplicitParams({
71
+            @ApiImplicitParam(name = "fileName", value = "文件相对地址", dataType = "String", dataTypeClass = String.class),
72
+            @ApiImplicitParam(name = "delete", value = "是否完成后删除", dataType = "String", dataTypeClass = String.class),
73
+    })
65 74
     @GetMapping("/download")
66 75
     public void fileDownload(String fileName, Boolean delete, HttpServletResponse response, HttpServletRequest request) {
67 76
         try {
@@ -85,6 +94,7 @@ public class CommonController {
85 94
     /**
86 95
      * 通用上传请求(单个)
87 96
      */
97
+    @ApiOperation("上传文件")
88 98
     @PostMapping("/upload")
89 99
 //    public AjaxResult uploadFile(@RequestParam("file") MultipartFile file, @RequestParam("unid") String unid, @RequestParam("returnImage") String returnImage) throws Exception {
90 100
     public AjaxResult uploadFile(MultipartFile file) throws Exception {
@@ -183,7 +193,11 @@ public class CommonController {
183 193
         }
184 194
     }
185 195
 
196
+
186 197
     @ApiOperation("获取地址中文件的Base64")
198
+    @ApiImplicitParams({
199
+            @ApiImplicitParam(name = "path", value = "文件相对地址", dataType = "String", dataTypeClass = String.class),
200
+    })
187 201
     @GetMapping("/getBase64")
188 202
     @Anonymous
189 203
     public AjaxResult getBase64(String path, HttpServletResponse response) throws IOException {

+ 40 - 52
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDeptController.java

@@ -1,23 +1,5 @@
1 1
 package com.ruoyi.web.controller.system;
2 2
 
3
-import java.util.List;
4
-
5
-import com.ruoyi.common.core.page.TableDataInfo;
6
-import com.ruoyi.postCheck.controller.PostPlanController;
7
-import com.ruoyi.postCheck.domain.PostPlan;
8
-import com.ruoyi.postCheck.service.IPostPlanService;
9
-import org.apache.commons.lang3.ArrayUtils;
10
-import org.springframework.beans.factory.annotation.Autowired;
11
-import org.springframework.security.access.prepost.PreAuthorize;
12
-import org.springframework.validation.annotation.Validated;
13
-import org.springframework.web.bind.annotation.DeleteMapping;
14
-import org.springframework.web.bind.annotation.GetMapping;
15
-import org.springframework.web.bind.annotation.PathVariable;
16
-import org.springframework.web.bind.annotation.PostMapping;
17
-import org.springframework.web.bind.annotation.PutMapping;
18
-import org.springframework.web.bind.annotation.RequestBody;
19
-import org.springframework.web.bind.annotation.RequestMapping;
20
-import org.springframework.web.bind.annotation.RestController;
21 3
 import com.ruoyi.common.annotation.Log;
22 4
 import com.ruoyi.common.constant.UserConstants;
23 5
 import com.ruoyi.common.core.controller.BaseController;
@@ -26,16 +8,24 @@ import com.ruoyi.common.core.domain.entity.SysDept;
26 8
 import com.ruoyi.common.enums.BusinessType;
27 9
 import com.ruoyi.common.utils.StringUtils;
28 10
 import com.ruoyi.system.service.ISysDeptService;
11
+import io.swagger.annotations.*;
12
+import org.apache.commons.lang3.ArrayUtils;
13
+import org.springframework.beans.factory.annotation.Autowired;
14
+import org.springframework.security.access.prepost.PreAuthorize;
15
+import org.springframework.validation.annotation.Validated;
16
+import org.springframework.web.bind.annotation.*;
17
+
18
+import java.util.List;
29 19
 
30 20
 /**
31 21
  * 部门信息
32 22
  *
33 23
  * @author ruoyi
34 24
  */
25
+@Api(tags = "6.2.1-部门管理")
35 26
 @RestController
36 27
 @RequestMapping("/system/dept")
37
-public class SysDeptController extends BaseController
38
-{
28
+public class SysDeptController extends BaseController {
39 29
     @Autowired
40 30
     private ISysDeptService deptService;
41 31
 
@@ -44,13 +34,16 @@ public class SysDeptController extends BaseController
44 34
 //    @Autowired
45 35
 //    private PostPlanController postPlanController;
46 36
 
47
-    /**
48
-     * 获取部门列表
49
-     */
37
+
38
+    @ApiOperation("获取部门列表")
39
+    @ApiImplicitParams({
40
+            @ApiImplicitParam(name = "deptId", value = "部门ID", dataType = "Long", dataTypeClass = Long.class),
41
+            @ApiImplicitParam(name = "deptName", value = "部门名称", dataType = "String", dataTypeClass = String.class),
42
+            @ApiImplicitParam(name = "status", value = "状态0正常1停用", dataType = "String", dataTypeClass = String.class),
43
+    })
50 44
     @PreAuthorize("@ss.hasPermi('system:dept:list')")
51 45
     @GetMapping("/list")
52
-    public AjaxResult list(SysDept dept)
53
-    {
46
+    public AjaxResult list(SysDept dept) {
54 47
         List<SysDept> depts = deptService.selectDeptList(dept);
55 48
 
56 49
 //        List<PostPlan> postPlanList = postPlanService.list();
@@ -65,8 +58,7 @@ public class SysDeptController extends BaseController
65 58
      */
66 59
     @PreAuthorize("@ss.hasPermi('system:dept:list')")
67 60
     @GetMapping("/list/exclude/{deptId}")
68
-    public AjaxResult excludeChild(@PathVariable(value = "deptId", required = false) Long deptId)
69
-    {
61
+    public AjaxResult excludeChild(@PathVariable(value = "deptId", required = false) Long deptId) {
70 62
         List<SysDept> depts = deptService.selectDeptList(new SysDept());
71 63
         depts.removeIf(d -> d.getDeptId().intValue() == deptId || ArrayUtils.contains(StringUtils.split(d.getAncestors(), ","), deptId + ""));
72 64
         return success(depts);
@@ -75,10 +67,12 @@ public class SysDeptController extends BaseController
75 67
     /**
76 68
      * 根据部门编号获取详细信息
77 69
      */
70
+    @ApiOperation("部门详情")
78 71
     @PreAuthorize("@ss.hasPermi('system:dept:query')")
79 72
     @GetMapping(value = "/{deptId}")
80
-    public AjaxResult getInfo(@PathVariable Long deptId)
81
-    {
73
+    public AjaxResult getInfo(
74
+            @ApiParam(name = "deptId", value = "部门ID", required = true)
75
+            @PathVariable Long deptId) {
82 76
         deptService.checkDeptDataScope(deptId);
83 77
         return success(deptService.selectDeptById(deptId));
84 78
     }
@@ -89,36 +83,33 @@ public class SysDeptController extends BaseController
89 83
     @PreAuthorize("@ss.hasPermi('system:dept:add')")
90 84
     @Log(title = "部门管理", businessType = BusinessType.INSERT)
91 85
     @PostMapping
92
-    public AjaxResult add(@Validated @RequestBody SysDept dept)
93
-    {
94
-        if (!deptService.checkDeptNameUnique(dept))
95
-        {
86
+    public AjaxResult add(@Validated @RequestBody SysDept dept) {
87
+        if (!deptService.checkDeptNameUnique(dept)) {
96 88
             return error("新增部门'" + dept.getDeptName() + "'失败,部门名称已存在");
97 89
         }
98 90
         dept.setCreateBy(getUsername());
99 91
         return toAjax(deptService.insertDept(dept));
100 92
     }
101 93
 
102
-    /**
103
-     * 修改部门
104
-     */
94
+    @ApiOperation("修改部门")
95
+    @ApiImplicitParams({
96
+            @ApiImplicitParam(name = "deptId", value = "部门ID", dataType = "Long", dataTypeClass = Long.class),
97
+            @ApiImplicitParam(name = "status", value = "部门状态0正常1停用", dataType = "String", dataTypeClass = String.class),
98
+            @ApiImplicitParam(name = "type", value = "部门类型", dataType = "Integer", dataTypeClass = Integer.class),
99
+            @ApiImplicitParam(name = "deptCode", value = "部门代码", dataType = "String", dataTypeClass = String.class),
100
+            @ApiImplicitParam(name = "orderNum", value = "显示顺序", dataType = "Integer", dataTypeClass = Integer.class),
101
+    })
105 102
     @PreAuthorize("@ss.hasPermi('system:dept:edit')")
106 103
     @Log(title = "部门管理", businessType = BusinessType.UPDATE)
107 104
     @PutMapping
108
-    public AjaxResult edit(@Validated @RequestBody SysDept dept)
109
-    {
105
+    public AjaxResult edit(@Validated @RequestBody SysDept dept) {
110 106
         Long deptId = dept.getDeptId();
111 107
         deptService.checkDeptDataScope(deptId);
112
-        if (!deptService.checkDeptNameUnique(dept))
113
-        {
108
+        if (!deptService.checkDeptNameUnique(dept)) {
114 109
             return error("修改部门'" + dept.getDeptName() + "'失败,部门名称已存在");
115
-        }
116
-        else if (dept.getParentId().equals(deptId))
117
-        {
110
+        } else if (dept.getParentId().equals(deptId)) {
118 111
             return error("修改部门'" + dept.getDeptName() + "'失败,上级部门不能是自己");
119
-        }
120
-        else if (StringUtils.equals(UserConstants.DEPT_DISABLE, dept.getStatus()) && deptService.selectNormalChildrenDeptById(deptId) > 0)
121
-        {
112
+        } else if (StringUtils.equals(UserConstants.DEPT_DISABLE, dept.getStatus()) && deptService.selectNormalChildrenDeptById(deptId) > 0) {
122 113
             return error("该部门包含未停用的子部门!");
123 114
         }
124 115
         dept.setUpdateBy(getUsername());
@@ -131,14 +122,11 @@ public class SysDeptController extends BaseController
131 122
     @PreAuthorize("@ss.hasPermi('system:dept:remove')")
132 123
     @Log(title = "部门管理", businessType = BusinessType.DELETE)
133 124
     @DeleteMapping("/{deptId}")
134
-    public AjaxResult remove(@PathVariable Long deptId)
135
-    {
136
-        if (deptService.hasChildByDeptId(deptId))
137
-        {
125
+    public AjaxResult remove(@PathVariable Long deptId) {
126
+        if (deptService.hasChildByDeptId(deptId)) {
138 127
             return warn("存在下级部门,不允许删除");
139 128
         }
140
-        if (deptService.checkDeptExistUser(deptId))
141
-        {
129
+        if (deptService.checkDeptExistUser(deptId)) {
142 130
             return warn("部门存在用户,不允许删除");
143 131
         }
144 132
         deptService.checkDeptDataScope(deptId);

+ 27 - 27
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysMenuController.java

@@ -1,21 +1,5 @@
1 1
 package com.ruoyi.web.controller.system;
2 2
 
3
-import java.util.List;
4
-
5
-import com.ruoyi.framework.config.ServerConfig;
6
-import com.ruoyi.framework.interceptor.cas.CASUser;
7
-import lombok.extern.slf4j.Slf4j;
8
-import org.springframework.beans.factory.annotation.Autowired;
9
-import org.springframework.security.access.prepost.PreAuthorize;
10
-import org.springframework.validation.annotation.Validated;
11
-import org.springframework.web.bind.annotation.DeleteMapping;
12
-import org.springframework.web.bind.annotation.GetMapping;
13
-import org.springframework.web.bind.annotation.PathVariable;
14
-import org.springframework.web.bind.annotation.PostMapping;
15
-import org.springframework.web.bind.annotation.PutMapping;
16
-import org.springframework.web.bind.annotation.RequestBody;
17
-import org.springframework.web.bind.annotation.RequestMapping;
18
-import org.springframework.web.bind.annotation.RestController;
19 3
 import com.ruoyi.common.annotation.Log;
20 4
 import com.ruoyi.common.constant.UserConstants;
21 5
 import com.ruoyi.common.core.controller.BaseController;
@@ -24,12 +8,25 @@ import com.ruoyi.common.core.domain.entity.SysMenu;
24 8
 import com.ruoyi.common.enums.BusinessType;
25 9
 import com.ruoyi.common.utils.StringUtils;
26 10
 import com.ruoyi.system.service.ISysMenuService;
11
+import io.swagger.annotations.Api;
12
+import io.swagger.annotations.ApiOperation;
13
+import io.swagger.annotations.ApiParam;
14
+import lombok.extern.slf4j.Slf4j;
15
+import org.springframework.beans.factory.annotation.Autowired;
16
+import org.springframework.security.access.prepost.PreAuthorize;
17
+import org.springframework.validation.annotation.Validated;
18
+import org.springframework.web.bind.annotation.*;
19
+
20
+import java.util.List;
21
+
27 22
 
28 23
 /**
29 24
  * 菜单信息
30 25
  *
31 26
  * @author ruoyi
32 27
  */
28
+
29
+@Api(tags = "6.6.1-菜单管理")
33 30
 @RestController
34 31
 @RequestMapping("/system/menu")
35 32
 @Slf4j
@@ -41,8 +38,9 @@ public class SysMenuController extends BaseController {
41 38
 //    @Autowired
42 39
 //    private ServerConfig serverConfig;
43 40
     /**
44
-     * 获取菜单列表
41
+     *
45 42
      */
43
+    @ApiOperation("获取菜单列表")
46 44
     @PreAuthorize("@ss.hasPermi('system:menu:list')")
47 45
     @GetMapping("/list")
48 46
     public AjaxResult list(SysMenu menu) {
@@ -61,24 +59,23 @@ public class SysMenuController extends BaseController {
61 59
     /**
62 60
      * 根据菜单编号获取详细信息
63 61
      */
62
+    @ApiOperation("获取菜单详情")
64 63
     @PreAuthorize("@ss.hasPermi('system:menu:query')")
65 64
     @GetMapping(value = "/{menuId}")
66 65
     public AjaxResult getInfo(@PathVariable Long menuId) {
67 66
         return success(menuService.selectMenuById(menuId));
68 67
     }
69 68
 
70
-    /**
71
-     * 获取菜单下拉树列表
72
-     */
69
+
70
+    @ApiOperation("获取菜单下拉树列表")
73 71
     @GetMapping("/treeselect")
74 72
     public AjaxResult treeselect(SysMenu menu) {
75 73
         List<SysMenu> menus = menuService.selectMenuList(menu, getUserId());
76 74
         return success(menuService.buildMenuTreeSelect(menus));
77 75
     }
78 76
 
79
-    /**
80
-     * 加载对应角色菜单列表树
81
-     */
77
+
78
+    @ApiOperation("加载对应角色菜单列表树")
82 79
     @GetMapping(value = "/roleMenuTreeselect/{roleId}")
83 80
     public AjaxResult roleMenuTreeselect(@PathVariable("roleId") Long roleId) {
84 81
         List<SysMenu> menus = menuService.selectMenuList(getUserId());
@@ -88,9 +85,8 @@ public class SysMenuController extends BaseController {
88 85
         return ajax;
89 86
     }
90 87
 
91
-    /**
92
-     * 新增菜单
93
-     */
88
+
89
+    @ApiOperation("新增菜单")
94 90
     @PreAuthorize("@ss.hasPermi('system:menu:add')")
95 91
     @Log(title = "菜单管理", businessType = BusinessType.INSERT)
96 92
     @PostMapping
@@ -107,6 +103,7 @@ public class SysMenuController extends BaseController {
107 103
     /**
108 104
      * 修改菜单
109 105
      */
106
+    @ApiOperation("修改菜单")
110 107
     @PreAuthorize("@ss.hasPermi('system:menu:edit')")
111 108
     @Log(title = "菜单管理", businessType = BusinessType.UPDATE)
112 109
     @PutMapping
@@ -125,10 +122,13 @@ public class SysMenuController extends BaseController {
125 122
     /**
126 123
      * 删除菜单
127 124
      */
125
+    @ApiOperation("删除菜单")
128 126
     @PreAuthorize("@ss.hasPermi('system:menu:remove')")
129 127
     @Log(title = "菜单管理", businessType = BusinessType.DELETE)
130 128
     @DeleteMapping("/{menuId}")
131
-    public AjaxResult remove(@PathVariable("menuId") Long menuId) {
129
+    public AjaxResult remove(
130
+            @ApiParam(name = "menuId", value = "菜单ID", required = true)
131
+            @PathVariable("menuId") Long menuId) {
132 132
         if (menuService.hasChildByMenuId(menuId)) {
133 133
             return warn("存在子菜单,不允许删除");
134 134
         }

+ 52 - 41
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysPostController.java

@@ -1,48 +1,35 @@
1 1
 package com.ruoyi.web.controller.system;
2 2
 
3
-import java.util.Date;
4
-import java.util.List;
5
-import java.util.Map;
6
-import java.util.stream.Collectors;
7
-import javax.servlet.http.HttpServletResponse;
8
-
9
-import com.alibaba.fastjson2.JSON;
10
-import com.alibaba.fastjson2.JSONObject;
11
-import com.ruoyi.common.utils.StringUtils;
12
-import com.ruoyi.postCheck.domain.PostChecked;
13
-import com.ruoyi.postCheck.domain.PostPlan;
14
-import com.ruoyi.postCheck.domain.PostPlanInfo;
15
-import com.ruoyi.postCheck.service.IPostPlanInfoService;
16
-import io.swagger.annotations.Api;
17
-import io.swagger.annotations.ApiImplicitParam;
18
-import io.swagger.annotations.ApiImplicitParams;
19
-import io.swagger.annotations.ApiOperation;
20
-import org.springframework.beans.factory.annotation.Autowired;
21
-import org.springframework.security.access.prepost.PreAuthorize;
22
-import org.springframework.validation.annotation.Validated;
23
-import org.springframework.web.bind.annotation.DeleteMapping;
24
-import org.springframework.web.bind.annotation.GetMapping;
25
-import org.springframework.web.bind.annotation.PathVariable;
26
-import org.springframework.web.bind.annotation.PostMapping;
27
-import org.springframework.web.bind.annotation.PutMapping;
28
-import org.springframework.web.bind.annotation.RequestBody;
29
-import org.springframework.web.bind.annotation.RequestMapping;
30
-import org.springframework.web.bind.annotation.RestController;
31 3
 import com.ruoyi.common.annotation.Log;
32 4
 import com.ruoyi.common.core.controller.BaseController;
33 5
 import com.ruoyi.common.core.domain.AjaxResult;
34 6
 import com.ruoyi.common.core.page.TableDataInfo;
35 7
 import com.ruoyi.common.enums.BusinessType;
8
+import com.ruoyi.common.utils.StringUtils;
36 9
 import com.ruoyi.common.utils.poi.ExcelUtil;
10
+import com.ruoyi.postCheck.domain.PostPlanInfo;
11
+import com.ruoyi.postCheck.service.IPostPlanInfoService;
37 12
 import com.ruoyi.system.domain.SysPost;
38 13
 import com.ruoyi.system.service.ISysPostService;
14
+import io.swagger.annotations.*;
15
+import org.springframework.beans.factory.annotation.Autowired;
16
+import org.springframework.security.access.prepost.PreAuthorize;
17
+import org.springframework.validation.annotation.Validated;
18
+import org.springframework.web.bind.annotation.*;
19
+
20
+import javax.servlet.http.HttpServletResponse;
21
+import java.util.Date;
22
+import java.util.List;
23
+import java.util.Map;
24
+import java.util.stream.Collectors;
25
+
39 26
 
40 27
 /**
41 28
  * 岗位信息操作处理
42 29
  *
43 30
  * @author ruoyi
44 31
  */
45
-@Api(tags = "900.2.1-岗位接口")
32
+@Api(tags = "6.3.1-岗位管理")
46 33
 @RestController
47 34
 @RequestMapping("/system/post")
48 35
 public class SysPostController extends BaseController {
@@ -52,9 +39,8 @@ public class SysPostController extends BaseController {
52 39
     @Autowired
53 40
     private IPostPlanInfoService postPlanInfoService;
54 41
 
55
-    /**
56
-     * 获取岗位列表
57
-     */
42
+
43
+    @ApiOperation("获取岗位列表")
58 44
     @PreAuthorize("@ss.hasPermi('system:post:list')")
59 45
     @GetMapping("/list")
60 46
     public TableDataInfo list(SysPost post) {
@@ -80,15 +66,27 @@ public class SysPostController extends BaseController {
80 66
     /**
81 67
      * 根据岗位编号获取详细信息
82 68
      */
69
+    @ApiOperation("岗位详情")
83 70
     @PreAuthorize("@ss.hasPermi('system:post:query')")
84 71
     @GetMapping(value = "/{postId}")
85
-    public AjaxResult getInfo(@PathVariable Long postId) {
72
+    public AjaxResult getInfo(
73
+            @ApiParam(name = "postId", value = "岗位ID", required = true)
74
+            @PathVariable Long postId) {
86 75
         return success(postService.selectPostById(postId));
87 76
     }
88 77
 
89 78
     /**
90 79
      * 新增岗位
91 80
      */
81
+    @ApiOperation("新增岗位")
82
+    @ApiImplicitParams({
83
+//            @ApiImplicitParam(name = "postId", value = "岗位ID", dataType = "Long", dataTypeClass = Long.class),
84
+            @ApiImplicitParam(name = "deptId", value = "部门ID", dataType = "Long", dataTypeClass = Long.class),
85
+            @ApiImplicitParam(name = "postCode", value = "岗位编码", dataType = "String", dataTypeClass = String.class),
86
+            @ApiImplicitParam(name = "postName", value = "岗位名称", dataType = "String", dataTypeClass = String.class),
87
+            @ApiImplicitParam(name = "postSort", value = "排序", dataType = "Integer", dataTypeClass = Integer.class),
88
+            @ApiImplicitParam(name = "status", value = "岗位状态0正常1停用", dataType = "String", dataTypeClass = String.class),
89
+    })
92 90
     @PreAuthorize("@ss.hasPermi('system:post:add')")
93 91
     @Log(title = "岗位管理", businessType = BusinessType.INSERT)
94 92
     @PostMapping
@@ -103,9 +101,16 @@ public class SysPostController extends BaseController {
103 101
         return toAjax(postService.insertPost(post));
104 102
     }
105 103
 
106
-    /**
107
-     * 修改岗位
108
-     */
104
+
105
+    @ApiOperation("修改岗位")
106
+    @ApiImplicitParams({
107
+            @ApiImplicitParam(name = "postId", value = "岗位ID", dataType = "Long", dataTypeClass = Long.class),
108
+            @ApiImplicitParam(name = "deptId", value = "部门ID", dataType = "Long", dataTypeClass = Long.class),
109
+            @ApiImplicitParam(name = "postCode", value = "岗位编码", dataType = "String", dataTypeClass = String.class),
110
+            @ApiImplicitParam(name = "postName", value = "岗位名称", dataType = "String", dataTypeClass = String.class),
111
+            @ApiImplicitParam(name = "postSort", value = "排序", dataType = "Integer", dataTypeClass = Integer.class),
112
+            @ApiImplicitParam(name = "status", value = "岗位状态0正常1停用", dataType = "String", dataTypeClass = String.class),
113
+    })
109 114
     @PreAuthorize("@ss.hasPermi('system:post:edit')")
110 115
     @Log(title = "岗位管理", businessType = BusinessType.UPDATE)
111 116
     @PutMapping
@@ -120,13 +125,14 @@ public class SysPostController extends BaseController {
120 125
         return toAjax(postService.updatePost(post));
121 126
     }
122 127
 
123
-    /**
124
-     * 删除岗位
125
-     */
128
+
129
+    @ApiOperation("删除岗位")
126 130
     @PreAuthorize("@ss.hasPermi('system:post:remove')")
127 131
     @Log(title = "岗位管理", businessType = BusinessType.DELETE)
128 132
     @DeleteMapping("/{postIds}")
129
-    public AjaxResult remove(@PathVariable Long[] postIds) {
133
+    public AjaxResult remove(
134
+            @ApiParam(name = "postIds", value = "岗位ID数组", required = true)
135
+            @PathVariable Long[] postIds) {
130 136
         return toAjax(postService.deletePostByIds(postIds));
131 137
     }
132 138
 
@@ -142,7 +148,12 @@ public class SysPostController extends BaseController {
142 148
 
143 149
     @ApiOperation("根据部门查询岗位列表,并设置检查时间和检查人员")
144 150
     @GetMapping({"/postCheck/optionselect/{deptId}", "/postCheck/optionselect/{deptId}/{planId}"})
145
-    public AjaxResult postCheckOptionselect(@PathVariable("deptId") Long deptId, @PathVariable(value = "planId", required = false) Long planId) {
151
+    public AjaxResult postCheckOptionselect(
152
+            @ApiParam(name = "deptId", value = "部门ID", required = true)
153
+            @PathVariable("deptId") Long deptId,
154
+
155
+            @ApiParam(name = "planId", value = "计划ID", required = false)
156
+            @PathVariable(value = "planId", required = false) Long planId) {
146 157
         List<SysPost> posts = postService.selectPostByDeptId(deptId);
147 158
         if (planId != null) {
148 159
             //根据计划ID查询岗位的检查时间和检查人

+ 34 - 16
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysRoleController.java

@@ -1,19 +1,5 @@
1 1
 package com.ruoyi.web.controller.system;
2 2
 
3
-import java.util.List;
4
-import javax.servlet.http.HttpServletResponse;
5
-
6
-import org.springframework.beans.factory.annotation.Autowired;
7
-import org.springframework.security.access.prepost.PreAuthorize;
8
-import org.springframework.validation.annotation.Validated;
9
-import org.springframework.web.bind.annotation.DeleteMapping;
10
-import org.springframework.web.bind.annotation.GetMapping;
11
-import org.springframework.web.bind.annotation.PathVariable;
12
-import org.springframework.web.bind.annotation.PostMapping;
13
-import org.springframework.web.bind.annotation.PutMapping;
14
-import org.springframework.web.bind.annotation.RequestBody;
15
-import org.springframework.web.bind.annotation.RequestMapping;
16
-import org.springframework.web.bind.annotation.RestController;
17 3
 import com.ruoyi.common.annotation.Log;
18 4
 import com.ruoyi.common.core.controller.BaseController;
19 5
 import com.ruoyi.common.core.domain.AjaxResult;
@@ -24,19 +10,26 @@ import com.ruoyi.common.core.domain.model.LoginUser;
24 10
 import com.ruoyi.common.core.page.TableDataInfo;
25 11
 import com.ruoyi.common.enums.BusinessType;
26 12
 import com.ruoyi.common.utils.StringUtils;
27
-import com.ruoyi.common.utils.poi.ExcelUtil;
28 13
 import com.ruoyi.framework.web.service.SysPermissionService;
29 14
 import com.ruoyi.framework.web.service.TokenService;
30 15
 import com.ruoyi.system.domain.SysUserRole;
31 16
 import com.ruoyi.system.service.ISysDeptService;
32 17
 import com.ruoyi.system.service.ISysRoleService;
33 18
 import com.ruoyi.system.service.ISysUserService;
19
+import io.swagger.annotations.*;
20
+import org.springframework.beans.factory.annotation.Autowired;
21
+import org.springframework.security.access.prepost.PreAuthorize;
22
+import org.springframework.validation.annotation.Validated;
23
+import org.springframework.web.bind.annotation.*;
24
+
25
+import java.util.List;
34 26
 
35 27
 /**
36 28
  * 角色信息
37 29
  *
38 30
  * @author ruoyi
39 31
  */
32
+@Api(tags = "6.4.1-角色管理")
40 33
 @RestController
41 34
 @RequestMapping("/system/role")
42 35
 public class SysRoleController extends BaseController {
@@ -55,6 +48,7 @@ public class SysRoleController extends BaseController {
55 48
     @Autowired
56 49
     private ISysDeptService deptService;
57 50
 
51
+    @ApiOperation("角色列表查询")
58 52
     @PreAuthorize("@ss.hasPermi('system:role:list')")
59 53
     @GetMapping("/list")
60 54
     public TableDataInfo list(SysRole role) {
@@ -79,9 +73,12 @@ public class SysRoleController extends BaseController {
79 73
     /**
80 74
      * 根据角色编号获取详细信息
81 75
      */
76
+    @ApiOperation("角色详情查询")
82 77
     @PreAuthorize("@ss.hasPermi('system:role:query')")
83 78
     @GetMapping(value = "/{roleId}")
84
-    public AjaxResult getInfo(@PathVariable Long roleId) {
79
+    public AjaxResult getInfo(
80
+            @ApiParam(name = "roleId", value = "角色ID", required = true)
81
+            @PathVariable Long roleId) {
85 82
         roleService.checkRoleDataScope(roleId);
86 83
         return success(roleService.selectRoleById(roleId));
87 84
     }
@@ -89,6 +86,7 @@ public class SysRoleController extends BaseController {
89 86
     /**
90 87
      * 新增角色
91 88
      */
89
+    @ApiOperation("新增角色")
92 90
     @PreAuthorize("@ss.hasPermi('system:role:add')")
93 91
     @Log(title = "角色管理", businessType = BusinessType.INSERT)
94 92
     @PostMapping
@@ -106,6 +104,7 @@ public class SysRoleController extends BaseController {
106 104
     /**
107 105
      * 修改保存角色
108 106
      */
107
+    @ApiOperation("修改角色")
109 108
     @PreAuthorize("@ss.hasPermi('system:role:edit')")
110 109
     @Log(title = "角色管理", businessType = BusinessType.UPDATE)
111 110
     @PutMapping
@@ -147,6 +146,7 @@ public class SysRoleController extends BaseController {
147 146
     /**
148 147
      * 状态修改
149 148
      */
149
+    @ApiOperation("角色状态修改")
150 150
     @PreAuthorize("@ss.hasPermi('system:role:edit')")
151 151
     @Log(title = "角色管理", businessType = BusinessType.UPDATE)
152 152
     @PutMapping("/changeStatus")
@@ -160,6 +160,7 @@ public class SysRoleController extends BaseController {
160 160
     /**
161 161
      * 删除角色
162 162
      */
163
+    @ApiOperation("删除角色")
163 164
     @PreAuthorize("@ss.hasPermi('system:role:remove')")
164 165
     @Log(title = "角色管理", businessType = BusinessType.DELETE)
165 166
     @DeleteMapping("/{roleIds}")
@@ -170,6 +171,7 @@ public class SysRoleController extends BaseController {
170 171
     /**
171 172
      * 获取角色选择框列表
172 173
      */
174
+    @ApiOperation("获取角色选择框列表")
173 175
     @PreAuthorize("@ss.hasPermi('system:role:query')")
174 176
     @GetMapping("/optionselect")
175 177
     public AjaxResult optionselect() {
@@ -179,6 +181,7 @@ public class SysRoleController extends BaseController {
179 181
     /**
180 182
      * 查询已分配用户角色列表
181 183
      */
184
+    @ApiOperation("查询已分配用户角色列表")
182 185
     @PreAuthorize("@ss.hasPermi('system:role:list')")
183 186
     @GetMapping("/authUser/allocatedList")
184 187
     public TableDataInfo allocatedList(SysUser user) {
@@ -190,6 +193,7 @@ public class SysRoleController extends BaseController {
190 193
     /**
191 194
      * 查询未分配用户角色列表
192 195
      */
196
+    @ApiOperation("查询未分配用户角色列表")
193 197
     @PreAuthorize("@ss.hasPermi('system:role:list')")
194 198
     @GetMapping("/authUser/unallocatedList")
195 199
     public TableDataInfo unallocatedList(SysUser user) {
@@ -202,6 +206,7 @@ public class SysRoleController extends BaseController {
202 206
     /**
203 207
      * 取消授权用户
204 208
      */
209
+    @ApiOperation("取消授权用户")
205 210
     @PreAuthorize("@ss.hasPermi('system:role:edit')")
206 211
     @Log(title = "角色管理", businessType = BusinessType.GRANT)
207 212
     @PutMapping("/authUser/cancel")
@@ -212,6 +217,11 @@ public class SysRoleController extends BaseController {
212 217
     /**
213 218
      * 批量取消授权用户
214 219
      */
220
+    @ApiOperation("批量取消授权用户")
221
+    @ApiImplicitParams({
222
+            @ApiImplicitParam(name = "roleId", value = "角色ID数组", dataType = "Long[]", dataTypeClass = Long[].class),
223
+            @ApiImplicitParam(name = "userIds", value = "用户ID数组", dataType = "Long[]", dataTypeClass = Long[].class),
224
+    })
215 225
     @PreAuthorize("@ss.hasPermi('system:role:edit')")
216 226
     @Log(title = "角色管理", businessType = BusinessType.GRANT)
217 227
     @PutMapping("/authUser/cancelAll")
@@ -222,6 +232,11 @@ public class SysRoleController extends BaseController {
222 232
     /**
223 233
      * 批量选择用户授权
224 234
      */
235
+    @ApiOperation("批量选择用户授权")
236
+    @ApiImplicitParams({
237
+            @ApiImplicitParam(name = "roleId", value = "角色ID数组", dataType = "Long[]", dataTypeClass = Long[].class),
238
+            @ApiImplicitParam(name = "userIds", value = "用户ID数组", dataType = "Long[]", dataTypeClass = Long[].class),
239
+    })
225 240
     @PreAuthorize("@ss.hasPermi('system:role:edit')")
226 241
     @Log(title = "角色管理", businessType = BusinessType.GRANT)
227 242
     @PutMapping("/authUser/selectAll")
@@ -230,8 +245,11 @@ public class SysRoleController extends BaseController {
230 245
         return toAjax(roleService.insertAuthUsers(roleId, userIds));
231 246
     }
232 247
 
248
+
233 249
     /**
234 250
      * 获取对应角色部门树列表
251
+     * @param roleId
252
+     * @return
235 253
      */
236 254
     @PreAuthorize("@ss.hasPermi('system:role:query')")
237 255
     @GetMapping(value = "/deptTree/{roleId}")

+ 39 - 57
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java

@@ -1,33 +1,9 @@
1 1
 package com.ruoyi.web.controller.system;
2 2
 
3
-import java.util.ArrayList;
4
-import java.util.Date;
5
-import java.util.List;
6
-import java.util.stream.Collectors;
7
-import javax.servlet.http.HttpServletResponse;
8
-
9
-import com.ruoyi.common.core.domain.TreeSelect;
10
-import com.ruoyi.temp.model.DataBean;
11
-import io.swagger.annotations.Api;
12
-import io.swagger.annotations.ApiImplicitParam;
13
-import io.swagger.annotations.ApiImplicitParams;
14
-import io.swagger.annotations.ApiOperation;
15
-import org.apache.commons.lang3.ArrayUtils;
16
-import org.springframework.beans.factory.annotation.Autowired;
17
-import org.springframework.security.access.prepost.PreAuthorize;
18
-import org.springframework.validation.annotation.Validated;
19
-import org.springframework.web.bind.annotation.DeleteMapping;
20
-import org.springframework.web.bind.annotation.GetMapping;
21
-import org.springframework.web.bind.annotation.PathVariable;
22
-import org.springframework.web.bind.annotation.PostMapping;
23
-import org.springframework.web.bind.annotation.PutMapping;
24
-import org.springframework.web.bind.annotation.RequestBody;
25
-import org.springframework.web.bind.annotation.RequestMapping;
26
-import org.springframework.web.bind.annotation.RestController;
27
-import org.springframework.web.multipart.MultipartFile;
28 3
 import com.ruoyi.common.annotation.Log;
29 4
 import com.ruoyi.common.core.controller.BaseController;
30 5
 import com.ruoyi.common.core.domain.AjaxResult;
6
+import com.ruoyi.common.core.domain.TreeSelect;
31 7
 import com.ruoyi.common.core.domain.entity.SysDept;
32 8
 import com.ruoyi.common.core.domain.entity.SysRole;
33 9
 import com.ruoyi.common.core.domain.entity.SysUser;
@@ -35,18 +11,27 @@ import com.ruoyi.common.core.page.TableDataInfo;
35 11
 import com.ruoyi.common.enums.BusinessType;
36 12
 import com.ruoyi.common.utils.SecurityUtils;
37 13
 import com.ruoyi.common.utils.StringUtils;
38
-import com.ruoyi.common.utils.poi.ExcelUtil;
39 14
 import com.ruoyi.system.service.ISysDeptService;
40 15
 import com.ruoyi.system.service.ISysPostService;
41 16
 import com.ruoyi.system.service.ISysRoleService;
42 17
 import com.ruoyi.system.service.ISysUserService;
18
+import io.swagger.annotations.*;
19
+import org.apache.commons.lang3.ArrayUtils;
20
+import org.springframework.beans.factory.annotation.Autowired;
21
+import org.springframework.security.access.prepost.PreAuthorize;
22
+import org.springframework.validation.annotation.Validated;
23
+import org.springframework.web.bind.annotation.*;
24
+
25
+import java.util.ArrayList;
26
+import java.util.List;
27
+import java.util.stream.Collectors;
43 28
 
44 29
 /**
45 30
  * 用户信息
46 31
  *
47 32
  * @author ruoyi
48 33
  */
49
-@Api(tags = "900.1.1-部门、用户接口")
34
+@Api(tags = "6.1.1-用户管理")
50 35
 @RestController
51 36
 @RequestMapping("/system/user")
52 37
 public class SysUserController extends BaseController {
@@ -62,9 +47,8 @@ public class SysUserController extends BaseController {
62 47
     @Autowired
63 48
     private ISysPostService postService;
64 49
 
65
-    /**
66
-     * 获取用户列表
67
-     */
50
+
51
+    @ApiOperation("获取用户列表")
68 52
     @PreAuthorize("@ss.hasPermi('system:user:list')")
69 53
     @GetMapping("/list")
70 54
     public TableDataInfo list(SysUser user) {
@@ -92,6 +76,7 @@ public class SysUserController extends BaseController {
92 76
         return getDataTable(list);
93 77
     }
94 78
 
79
+/*
95 80
     @Log(title = "用户管理", businessType = BusinessType.EXPORT)
96 81
     @PreAuthorize("@ss.hasPermi('system:user:export')")
97 82
     @PostMapping("/export")
@@ -100,6 +85,7 @@ public class SysUserController extends BaseController {
100 85
         ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class);
101 86
         util.exportExcel(response, list, "用户数据");
102 87
     }
88
+    */
103 89
 /*
104 90
 
105 91
     @Log(title = "用户管理", businessType = BusinessType.IMPORT)
@@ -123,9 +109,12 @@ public class SysUserController extends BaseController {
123 109
     /**
124 110
      * 根据用户编号获取详细信息
125 111
      */
112
+    @ApiOperation("查询用户详情")
126 113
     @PreAuthorize("@ss.hasPermi('system:user:query')")
127 114
     @GetMapping(value = {"/", "/{userId}"})
128
-    public AjaxResult getInfo(@PathVariable(value = "userId", required = false) Long userId) {
115
+    public AjaxResult getInfo(
116
+            @ApiParam(name = "userId", value = "用户ID", required = false)
117
+            @PathVariable(value = "userId", required = false) Long userId) {
129 118
         userService.checkUserDataScope(userId);
130 119
         AjaxResult ajax = AjaxResult.success();
131 120
         List<SysRole> roles = roleService.selectRoleAll();
@@ -180,6 +169,14 @@ public class SysUserController extends BaseController {
180 169
     @PreAuthorize("@ss.hasPermi('system:user:edit')")
181 170
     @Log(title = "用户管理", businessType = BusinessType.UPDATE)
182 171
     @PutMapping
172
+    @ApiOperation("用户修改")
173
+    @ApiImplicitParams({
174
+            @ApiImplicitParam(name = "userId", value = "主键", dataType = "Long", dataTypeClass = Long.class),
175
+            @ApiImplicitParam(name = "deptId", value = "部门ID", dataType = "Long", dataTypeClass = Long.class),
176
+            @ApiImplicitParam(name = "nickName", value = "用户姓名", dataType = "String", dataTypeClass = String.class),
177
+            @ApiImplicitParam(name = "email", value = "用户邮箱", dataType = "String", dataTypeClass = String.class),
178
+            @ApiImplicitParam(name = "status", value = "账号状态", dataType = "String", dataTypeClass = String.class),
179
+    })
183 180
     public AjaxResult edit(@Validated @RequestBody SysUser user) {
184 181
         userService.checkUserAllowed(user);
185 182
         userService.checkUserDataScope(user.getUserId());
@@ -227,6 +224,12 @@ public class SysUserController extends BaseController {
227 224
     @PreAuthorize("@ss.hasPermi('system:user:edit')")
228 225
     @Log(title = "用户管理", businessType = BusinessType.UPDATE)
229 226
     @PutMapping("/changeStatus")
227
+    @ApiOperation("用户状态修改")
228
+    @ApiImplicitParams({
229
+            @ApiImplicitParam(name = "userId", value = "主键", dataType = "Long", dataTypeClass = Long.class),
230
+            @ApiImplicitParam(name = "status", value = "账号状态", dataType = "String", dataTypeClass = String.class),
231
+
232
+    })
230 233
     public AjaxResult changeStatus(@RequestBody SysUser user) {
231 234
         userService.checkUserAllowed(user);
232 235
         userService.checkUserDataScope(user.getUserId());
@@ -254,6 +257,11 @@ public class SysUserController extends BaseController {
254 257
     @PreAuthorize("@ss.hasPermi('system:user:edit')")
255 258
     @Log(title = "用户管理", businessType = BusinessType.GRANT)
256 259
     @PutMapping("/authRole")
260
+    @ApiOperation("用户授权角色")
261
+    @ApiImplicitParams({
262
+            @ApiImplicitParam(name = "userId", value = "用户ID", dataType = "Long", dataTypeClass = Long.class),
263
+            @ApiImplicitParam(name = "roleIds", value = "角色数组ID", dataType = "Long[]", dataTypeClass = Long[].class),
264
+    })
257 265
     public AjaxResult insertAuthRole(Long userId, Long[] roleIds) {
258 266
         userService.checkUserDataScope(userId);
259 267
         userService.insertUserAuth(userId, roleIds);
@@ -267,32 +275,6 @@ public class SysUserController extends BaseController {
267 275
     @ApiOperation("获取部门树列表")
268 276
     @GetMapping("/deptTree")
269 277
     public AjaxResult deptTree(SysDept dept) {
270
-
271
-        //测试合并单元格
272
-      /*  if(false){
273
-//           ExcelUtil init 方法中,设置合并单元格
274
-//            sheet.addMergedRegion(new CellRangeAddress(8, 10, 0, 2));//标题合并单元格操作,17为总列数   已测试通过可以合并
275
-
276
-//            List<DataBean> list = ListUtils.newArrayList();
277
-            List<DataBean> list = new ArrayList<>();
278
-            for (int i = 0; i < 10; i++) {
279
-                DataBean data = new DataBean();
280
-                data.setName("字符串" + i);
281
-                data.setContent(new Date() + "");
282
-                data.setContent2(new Date() + "");
283
-                data.setContent3(new Date() + "");
284
-                list.add(data);
285
-            }
286
-
287
-
288
-            ExcelUtil<DataBean> util = new ExcelUtil<>(DataBean.class);
289
-            String sheetName = "岗检计划";
290
-            String title = "岗位责任制检查表";
291
-            AjaxResult ajaxResult = util.exportExcel(list, sheetName, title);
292
-            System.out.println();
293
-            System.out.println("ajaxResult = " + ajaxResult);
294
-            System.out.println();
295
-        }*/
296 278
         dept.setStatus("0");
297 279
         List<TreeSelect> treeSelects = deptService.selectDeptTreeListPostCheck(dept);
298 280
 

+ 1 - 1
ruoyi-admin/src/main/resources/application-druid-test.yml

@@ -34,7 +34,7 @@ spring:
34 34
             master:
35 35
 #                url: jdbc:kingbase8://localhost:54321/postcheck
36 36
 #                url: jdbc:kingbase8://10.152.164.68:54321/postcheck
37
-                url: jdbc:kingbase8://10.152.72.5:9300/postcheck
37
+                url: jdbc:kingbase8://10.152.72.7:9300/postcheck
38 38
                 username: postcheckuser
39 39
                 password: Hzsh.eitc@6626.pcu
40 40
             # 从库数据源

+ 2 - 0
ruoyi-admin/src/main/resources/application.yml

@@ -107,6 +107,8 @@ pagehelper:
107 107
   params: count=countSql
108 108
 
109 109
 # Swagger配置
110
+#  API 访问路径:http://localhost:8180/swagger-ui/index.html
111
+#  注意:开启Swagger需要关闭CAS客户端注册器 CasConfigure.java上面的注解
110 112
 swagger:
111 113
   # 是否开启swagger
112 114
 #  enabled: false

+ 0 - 2
ruoyi-admin/src/test/java/com/post/Test02.java

@@ -25,7 +25,5 @@ public class Test02 {
25 25
 
26 26
          l = Long.parseLong("400001");
27 27
         System.out.println("l = " + l);
28
-
29
-
30 28
     }
31 29
 }

+ 15 - 6
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDept.java

@@ -1,32 +1,35 @@
1 1
 package com.ruoyi.common.core.domain.entity;
2 2
 
3
-import java.util.ArrayList;
4
-import java.util.List;
3
+import com.ruoyi.common.core.domain.BaseEntity;
4
+import io.swagger.annotations.ApiModel;
5
+import io.swagger.annotations.ApiModelProperty;
6
+
5 7
 import javax.validation.constraints.Email;
6 8
 import javax.validation.constraints.NotBlank;
7 9
 import javax.validation.constraints.NotNull;
8 10
 import javax.validation.constraints.Size;
9
-
10
-import org.apache.commons.lang3.builder.ToStringBuilder;
11
-import org.apache.commons.lang3.builder.ToStringStyle;
12
-import com.ruoyi.common.core.domain.BaseEntity;
11
+import java.util.ArrayList;
12
+import java.util.List;
13 13
 
14 14
 /**
15 15
  * 部门表 sys_dept
16 16
  *
17 17
  * @author ruoyi
18 18
  */
19
+@ApiModel(value = "部门管理实体类")
19 20
 public class SysDept extends BaseEntity {
20 21
     private static final long serialVersionUID = 1L;
21 22
 
22 23
     /**
23 24
      * 部门ID
24 25
      */
26
+    @ApiModelProperty("部门ID")
25 27
     private Long deptId;
26 28
 
27 29
     /**
28 30
      * 父部门ID
29 31
      */
32
+    @ApiModelProperty("父部门ID")
30 33
     private Long parentId;
31 34
 
32 35
     /**
@@ -37,11 +40,13 @@ public class SysDept extends BaseEntity {
37 40
     /**
38 41
      * 部门名称
39 42
      */
43
+    @ApiModelProperty("部门名称")
40 44
     private String deptName;
41 45
 
42 46
     /**
43 47
      * 显示顺序
44 48
      */
49
+    @ApiModelProperty("显示顺序")
45 50
     private Integer orderNum;
46 51
 
47 52
     /**
@@ -62,11 +67,13 @@ public class SysDept extends BaseEntity {
62 67
     /**
63 68
      * 部门状态:0正常,1停用
64 69
      */
70
+    @ApiModelProperty("状态0正常1停用")
65 71
     private String status;
66 72
 
67 73
     /**
68 74
      * 删除标志(0代表存在 2代表删除)
69 75
      */
76
+    @ApiModelProperty("删除0存在2删除")
70 77
     private Integer delFlag;
71 78
 
72 79
     /**
@@ -77,6 +84,7 @@ public class SysDept extends BaseEntity {
77 84
     /**
78 85
      * 部门编码
79 86
      */
87
+    @ApiModelProperty("部门编码")
80 88
     private String deptCode;
81 89
     /**
82 90
      * 岗检系统部门代码:岗检问题编号时需要使用他
@@ -86,6 +94,7 @@ public class SysDept extends BaseEntity {
86 94
     /**
87 95
      * 1 职能部门 2 生产部门 3 其他
88 96
      */
97
+    @ApiModelProperty("类型-职能2生产3其他")
89 98
     private Integer type;
90 99
 
91 100
     /**

+ 10 - 4
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysRole.java

@@ -4,6 +4,9 @@ import java.util.Set;
4 4
 import javax.validation.constraints.NotBlank;
5 5
 import javax.validation.constraints.NotNull;
6 6
 import javax.validation.constraints.Size;
7
+
8
+import io.swagger.annotations.ApiModel;
9
+import io.swagger.annotations.ApiModelProperty;
7 10
 import org.apache.commons.lang3.builder.ToStringBuilder;
8 11
 import org.apache.commons.lang3.builder.ToStringStyle;
9 12
 import com.ruoyi.common.annotation.Excel;
@@ -15,23 +18,24 @@ import com.ruoyi.common.core.domain.BaseEntity;
15 18
  *
16 19
  * @author ruoyi
17 20
  */
21
+@ApiModel(value = "角色管理实体类")
18 22
 public class SysRole extends BaseEntity
19 23
 {
20 24
     private static final long serialVersionUID = 1L;
21 25
 
22
-    /** 角色ID */
26
+    @ApiModelProperty("角色ID")
23 27
     @Excel(name = "角色序号", cellType = ColumnType.NUMERIC)
24 28
     private Long roleId;
25 29
 
26
-    /** 角色名称 */
30
+    @ApiModelProperty("角色名称")
27 31
     @Excel(name = "角色名称")
28 32
     private String roleName;
29 33
 
30
-    /** 角色权限 */
34
+    @ApiModelProperty("角色权限KEY")
31 35
     @Excel(name = "角色权限")
32 36
     private String roleKey;
33 37
 
34
-    /** 角色排序 */
38
+    @ApiModelProperty("角色排序")
35 39
     @Excel(name = "角色排序")
36 40
     private Integer roleSort;
37 41
 
@@ -46,10 +50,12 @@ public class SysRole extends BaseEntity
46 50
     private boolean deptCheckStrictly;
47 51
 
48 52
     /** 角色状态(0正常 1停用) */
53
+    @ApiModelProperty("状态0正常1停用")
49 54
     @Excel(name = "角色状态", readConverterExp = "0=正常,1=停用")
50 55
     private String status;
51 56
 
52 57
     /** 删除标志(0代表存在 2代表删除) */
58
+    @ApiModelProperty("删除标识0存在2删除")
53 59
     private Integer delFlag;
54 60
 
55 61
     /** 用户是否存在此角色标识 默认不存在 */

+ 14 - 2
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java

@@ -4,6 +4,8 @@ import java.util.Date;
4 4
 import java.util.List;
5 5
 import javax.validation.constraints.*;
6 6
 
7
+import io.swagger.annotations.ApiModel;
8
+import io.swagger.annotations.ApiModelProperty;
7 9
 import org.apache.commons.lang3.builder.ToStringBuilder;
8 10
 import org.apache.commons.lang3.builder.ToStringStyle;
9 11
 import com.ruoyi.common.annotation.Excel;
@@ -19,42 +21,49 @@ import com.ruoyi.common.xss.Xss;
19 21
  *
20 22
  * @author ruoyi
21 23
  */
24
+@ApiModel(value = "用户管理实体类")
22 25
 public class SysUser extends BaseEntity {
23 26
 
24 27
     private static final long serialVersionUID = 1440402324862402070L;
25 28
     /**
26 29
      * 用户ID
27 30
      */
31
+    @ApiModelProperty("用户ID")
28 32
     @Excel(name = "用户序号", cellType = ColumnType.NUMERIC, prompt = "用户编号")
29 33
     private Long userId;
30 34
 
31 35
     /**
32 36
      * 部门ID
33 37
      */
38
+    @ApiModelProperty("部门ID")
34 39
     @Excel(name = "部门编号", type = Type.IMPORT)
35 40
     private Long deptId;
36 41
 
37 42
     /**
38 43
      * 用户账号
39 44
      */
45
+    @ApiModelProperty("域账号ID")
40 46
     @Excel(name = "域账号ID")
41 47
     private String userName;
42 48
 
43 49
     /**
44 50
      * 用户昵称
45 51
      */
52
+    @ApiModelProperty("用户姓名")
46 53
     @Excel(name = "姓名")
47 54
     private String nickName;
48 55
 
49 56
     /**
50 57
      * 用户邮箱
51 58
      */
59
+    @ApiModelProperty("用户邮箱")
52 60
     @Excel(name = "用户邮箱")
53 61
     private String email;
54 62
 
55 63
     /**
56 64
      * 手机号码
57 65
      */
66
+    @ApiModelProperty("用户手机号")
58 67
     @Excel(name = "手机号码")
59 68
     private String phonenumber;
60 69
 
@@ -67,6 +76,7 @@ public class SysUser extends BaseEntity {
67 76
     /**
68 77
      * 用户头像
69 78
      */
79
+    @ApiModelProperty("用户头像URL")
70 80
     private String avatar;
71 81
 
72 82
     /**
@@ -77,24 +87,26 @@ public class SysUser extends BaseEntity {
77 87
     /**
78 88
      * 帐号状态(0正常 1停用)
79 89
      */
90
+    @ApiModelProperty("用户状态0正常1停用")
80 91
     @Excel(name = "帐号状态", readConverterExp = "0=正常,1=停用")
81 92
     private String status;
82 93
 
83 94
     /**
84 95
      * 删除标志(0代表存在 2代表删除)
85 96
      */
97
+    @ApiModelProperty("删除标识0存在2删除")
86 98
     private Integer delFlag;
87 99
 
88 100
     /**
89 101
      * 最后登录IP
90 102
      */
91
-    @Excel(name = "最后登录IP", type = Type.EXPORT)
103
+//    @Excel(name = "最后登录IP", type = Type.EXPORT)
92 104
     private String loginIp;
93 105
 
94 106
     /**
95 107
      * 最后登录时间
96 108
      */
97
-    @Excel(name = "最后登录时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss", type = Type.EXPORT)
109
+//    @Excel(name = "最后登录时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss", type = Type.EXPORT)
98 110
     private Date loginDate;
99 111
 
100 112
     /**

+ 1 - 1
ruoyi-framework/pom.xml

@@ -18,7 +18,7 @@
18 18
     <dependencies>
19 19
 
20 20
         <!-- SpringBoot Web容器 -->
21
-         <dependency>
21
+        <dependency>
22 22
             <groupId>org.springframework.boot</groupId>
23 23
             <artifactId>spring-boot-starter-web</artifactId>
24 24
         </dependency>

+ 3 - 3
ruoyi-framework/src/main/java/com/ruoyi/framework/interceptor/cas/CasConfigure.java

@@ -9,8 +9,8 @@ import net.unicon.cas.client.configuration.EnableCasClient;
9 9
 /**
10 10
  * TODO $CAS统一认证:拦截器类CAS
11 11
  */
12
-@EnableCasClient
13
-@Configuration
12
+//@EnableCasClient
13
+//@Configuration
14 14
 public class CasConfigure extends CasClientConfigurerAdapter {
15 15
     @Override
16 16
     public void configureAuthenticationFilter(FilterRegistrationBean authenticationFilter) {
@@ -21,7 +21,7 @@ public class CasConfigure extends CasClientConfigurerAdapter {
21 21
 //              "|/captchaImage/*|/system/*|/common/*|/monitor/*|/register/*|/login/*|/getInfo/*|/getRouters/*|/test/user/*|/tool/gen/*|/postcheck/login|/redirectpostcheck");
22 22
         authenticationFilter.addInitParameter("ignorePattern", "/Content/*|/context/*|/actuator/*|/assets/*|/instances/*" +
23 23
                 "|/postCheck/*|/captchaImage/*|/system/*|/common/*|/monitor/*|/register/*|/login/*|/logout/*|/getInfo/*|/getRouters/*|/test/user/*|/tool/gen/*|/postcheck/login|/redirectpostcheck|/redirectpostcheckout"+
24
-                "|/avatar/*");
24
+                "|/avatar/*|/swagger-ui/*");
25 25
         authenticationFilter.getInitParameters().put("authenticationRedirectStrategyClass", "com.patterncat.CustomAuthRedirectStrategy");
26 26
     }
27 27
 }

+ 34 - 35
ruoyi-postcheck/src/main/java/com/ruoyi/postCheck/controller/PostAssessmentRatingOtherController.java

@@ -1,43 +1,26 @@
1 1
 package com.ruoyi.postCheck.controller;
2 2
 
3
-import java.util.ArrayList;
4
-import java.util.Date;
5
-import java.util.List;
6
-import java.util.stream.Collectors;
7
-import javax.servlet.http.HttpServletResponse;
8
-
9
-import com.ruoyi.common.constant.PostListEnum;
3
+import com.ruoyi.common.annotation.Log;
4
+import com.ruoyi.common.constant.PostAssessmentRatingOtherEnum;
5
+import com.ruoyi.common.core.controller.BaseController;
6
+import com.ruoyi.common.core.domain.AjaxResult;
10 7
 import com.ruoyi.common.core.domain.entity.SysDept;
11 8
 import com.ruoyi.common.core.domain.entity.SysUser;
9
+import com.ruoyi.common.core.page.TableDataInfo;
10
+import com.ruoyi.common.enums.BusinessType;
12 11
 import com.ruoyi.common.enums.DeptCode;
13
-import com.ruoyi.common.exception.base.BaseException;
14
-import com.ruoyi.postCheck.domain.tools.PostListApproveTypeUser;
12
+import com.ruoyi.postCheck.domain.PostAssessmentRatingOther;
13
+import com.ruoyi.postCheck.service.IPostAssessmentRatingOtherService;
15 14
 import com.ruoyi.system.service.ISysDeptService;
16
-import com.ruoyi.system.service.ISysPostService;
17 15
 import com.ruoyi.system.service.ISysUserService;
18
-import org.springframework.security.access.prepost.PreAuthorize;
16
+import io.swagger.annotations.*;
19 17
 import org.springframework.beans.factory.annotation.Autowired;
20 18
 import org.springframework.util.CollectionUtils;
21
-import org.springframework.web.bind.annotation.GetMapping;
22
-import org.springframework.web.bind.annotation.PostMapping;
23
-import org.springframework.web.bind.annotation.PutMapping;
24
-import org.springframework.web.bind.annotation.DeleteMapping;
25
-import org.springframework.web.bind.annotation.PathVariable;
26
-import org.springframework.web.bind.annotation.RequestBody;
27
-import org.springframework.web.bind.annotation.RequestMapping;
28
-import org.springframework.web.bind.annotation.RestController;
29
-import com.ruoyi.common.annotation.Log;
30
-import com.ruoyi.common.core.controller.BaseController;
31
-import com.ruoyi.common.core.domain.AjaxResult;
32
-import com.ruoyi.common.enums.BusinessType;
33
-import com.ruoyi.postCheck.domain.PostAssessmentRatingOther;
34
-import com.ruoyi.postCheck.service.IPostAssessmentRatingOtherService;
35
-import com.ruoyi.common.utils.poi.ExcelUtil;
36
-import com.ruoyi.common.core.page.TableDataInfo;
37
-import io.swagger.annotations.Api;
38
-import io.swagger.annotations.ApiOperation;
39
-import io.swagger.annotations.ApiImplicitParams;
40
-import io.swagger.annotations.ApiImplicitParam;
19
+import org.springframework.web.bind.annotation.*;
20
+
21
+import java.util.Date;
22
+import java.util.List;
23
+import java.util.stream.Collectors;
41 24
 
42 25
 /**
43 26
  * 打分表(职能互评生产日常)Controller
@@ -87,7 +70,14 @@ public class PostAssessmentRatingOtherController extends BaseController {
87 70
         startPage("desc", "t1.create_time");
88 71
 
89 72
         //仅可以查看自己部门的打分任务
90
-        postAssessmentRatingOther.setDeptId(getDeptId());
73
+        if (postAssessmentRatingOther.getType() == PostAssessmentRatingOtherEnum.TYPE_ZN_HP.getValue()) {
74
+            postAssessmentRatingOther.setDeptId(getDeptId());
75
+        }
76
+        //生产部门是三大部门给生产部门评分
77
+        else if (postAssessmentRatingOther.getType() == PostAssessmentRatingOtherEnum.TYPE_SC_RC.getValue()) {
78
+            postAssessmentRatingOther.setDeptId(null);
79
+        }
80
+
91 81
 //        postAssessmentRatingOther.setDeptId(30l);//职能
92 82
 //        postAssessmentRatingOther.setDeptId(19l);//生产
93 83
 
@@ -114,7 +104,9 @@ public class PostAssessmentRatingOtherController extends BaseController {
114 104
     @ApiOperation("获取打分表(职能互评生产日常)详细信息")
115 105
 //    @PreAuthorize("@ss.hasPermi('postCheck:postAssessmentRatingOther:query')")
116 106
     @GetMapping(value = "/{id}")
117
-    public AjaxResult getInfo(@PathVariable("id") Long id) {
107
+    public AjaxResult getInfo(
108
+            @ApiParam(name = "id", value = "打分表id", required = true)
109
+            @PathVariable("id") Long id) {
118 110
         return success(postAssessmentRatingOtherService.selectPostAssessmentRatingOtherById(id));
119 111
     }
120 112
 
@@ -231,11 +223,18 @@ public class PostAssessmentRatingOtherController extends BaseController {
231 223
         List<Long> userHaveAuthorityList = userList.stream().map(t -> t.getUserId()).collect(Collectors.toList());
232 224
 
233 225
         if (!userHaveAuthorityList.contains(getUserId())) {
234
-            return error("无权限,请切换内控法务部经理账号操作!");
226
+            return error("无权限,请切换内控法务部人员账号操作!");
235 227
         }
236 228
 
237 229
         postAssessmentRatingOther.setDeptId(getDeptId());
238
-        return toAjax(postAssessmentRatingOtherService.batchAddRatingOther(postAssessmentRatingOther));
230
+        Integer type = postAssessmentRatingOther.getType();
231
+        if (type == PostAssessmentRatingOtherEnum.TYPE_ZN_HP.getValue()) {
232
+            return toAjax(postAssessmentRatingOtherService.batchAddRatingOther(postAssessmentRatingOther));
233
+        } else if (type == PostAssessmentRatingOtherEnum.TYPE_SC_RC.getValue()) {
234
+            return toAjax(postAssessmentRatingOtherService.addRatingOtherSC(postAssessmentRatingOther));
235
+        } else {
236
+            return AjaxResult.error("类型错误,请检查!");
237
+        }
239 238
     }
240 239
 
241 240
 

+ 39 - 28
ruoyi-postcheck/src/main/java/com/ruoyi/postCheck/controller/PostCheckedController.java

@@ -17,10 +17,7 @@ import com.ruoyi.postCheck.domain.PostChecked;
17 17
 import com.ruoyi.postCheck.domain.PostCheckedItems;
18 18
 import com.ruoyi.postCheck.service.IPostCheckedService;
19 19
 import com.ruoyi.postCheck.util.excel.create.PostCheckedCreateExcel;
20
-import io.swagger.annotations.Api;
21
-import io.swagger.annotations.ApiImplicitParam;
22
-import io.swagger.annotations.ApiImplicitParams;
23
-import io.swagger.annotations.ApiOperation;
20
+import io.swagger.annotations.*;
24 21
 import org.springframework.beans.factory.annotation.Autowired;
25 22
 import org.springframework.security.access.prepost.PreAuthorize;
26 23
 import org.springframework.util.CollectionUtils;
@@ -37,7 +34,7 @@ import java.util.List;
37 34
  * @author csg
38 35
  * @date 2024-01-05
39 36
  */
40
-@Api(tags = "2.5.1-岗检表管理接口")
37
+@Api(tags = "2.4.1-岗检表管理接口")
41 38
 @RestController
42 39
 @RequestMapping("/postCheck/postChecked")
43 40
 public class PostCheckedController extends BaseController {
@@ -51,7 +48,7 @@ public class PostCheckedController extends BaseController {
51 48
     /**
52 49
      * 查询岗检表管理列表
53 50
      */
54
-    @ApiOperation("1、查询岗检表管理列表")
51
+    @ApiOperation("查询岗检表管理列表")
55 52
     @ApiImplicitParams({
56 53
             @ApiImplicitParam(name = "id", value = "主键ID", dataType = "Long", dataTypeClass = Long.class),
57 54
             @ApiImplicitParam(name = "checkWorkgroupId", value = "检查工作组ID", dataType = "Long", dataTypeClass = Long.class),
@@ -104,22 +101,24 @@ public class PostCheckedController extends BaseController {
104 101
     /**
105 102
      * 获取岗检表管理详细信息
106 103
      */
107
-    @ApiOperation("2、获取岗检表管理详细信息")
104
+    @ApiOperation("获取岗检表管理详细信息")
108 105
 //    @PreAuthorize("@ss.hasPermi('postCheck:postChecked:query')")
109 106
     @GetMapping(value = "/{id}")
110
-    public AjaxResult getInfo(@PathVariable("id") Long id) {
107
+    public AjaxResult getInfo(
108
+            @ApiParam(name = "id", value = "检查表id", required = true)
109
+            @PathVariable("id") Long id) {
111 110
         return success(postCheckedService.selectPostCheckedById(id));
112 111
     }
113 112
 
114 113
 
115
-    @ApiOperation("3、新增岗检表管理")
116
-    @ApiImplicitParams({
117
-            @ApiImplicitParam(name = "checkWorkgroupId", value = "检查工作组ID", dataType = "Long", dataTypeClass = Long.class),
118
-            @ApiImplicitParam(name = "checkGroupId", value = "检查小组ID", dataType = "Long", dataTypeClass = Long.class),
119
-            @ApiImplicitParam(name = "checkedDeptId", value = "被检查部门ID", dataType = "Long", dataTypeClass = Long.class),
120
-            @ApiImplicitParam(name = "checkedPostId", value = "被检查岗位ID", dataType = "Long", dataTypeClass = Long.class),
121
-            @ApiImplicitParam(name = "children", value = "检查表明细数组", dataType = "List", dataTypeClass = PostCheckedItems.class),
122
-    })
114
+    @ApiOperation("新增岗检表管理")
115
+//    @ApiImplicitParams({
116
+//            @ApiImplicitParam(name = "checkWorkgroupId", value = "检查工作组ID", dataType = "Long", dataTypeClass = Long.class),
117
+//            @ApiImplicitParam(name = "checkGroupId", value = "检查小组ID", dataType = "Long", dataTypeClass = Long.class),
118
+//            @ApiImplicitParam(name = "checkedDeptId", value = "被检查部门ID", dataType = "Long", dataTypeClass = Long.class),
119
+//            @ApiImplicitParam(name = "checkedPostId", value = "被检查岗位ID", dataType = "Long", dataTypeClass = Long.class),
120
+//            @ApiImplicitParam(name = "children", value = "检查表明细数组", dataType = "List", dataTypeClass = PostCheckedItems.class),
121
+//    })
123 122
     @PreAuthorize("@ss.hasPermi('postCheck:postChecked:add')")
124 123
     @Log(title = "岗检表管理", businessType = BusinessType.INSERT)
125 124
     @PostMapping
@@ -136,15 +135,15 @@ public class PostCheckedController extends BaseController {
136 135
     /**
137 136
      * 修改岗检表管理
138 137
      */
139
-    @ApiOperation("4、修改岗检表管理")
140
-    @ApiImplicitParams({
138
+    @ApiOperation("修改岗检表管理")
139
+    /*@ApiImplicitParams({
141 140
             @ApiImplicitParam(name = "id", value = "主键ID", dataType = "Long", dataTypeClass = Long.class),
142 141
             @ApiImplicitParam(name = "checkWorkgroupId", value = "检查工作组ID", dataType = "Long", dataTypeClass = Long.class),
143 142
             @ApiImplicitParam(name = "checkGroupId", value = "检查小组ID", dataType = "Long", dataTypeClass = Long.class),
144 143
             @ApiImplicitParam(name = "checkedDeptId", value = "被检查部门ID", dataType = "Long", dataTypeClass = Long.class),
145 144
             @ApiImplicitParam(name = "checkedPostId", value = "被检查岗位ID", dataType = "Long", dataTypeClass = Long.class),
146 145
             @ApiImplicitParam(name = "children", value = "检查表明细数组", dataType = "List", dataTypeClass = PostCheckedItems.class),
147
-    })
146
+    })*/
148 147
     @PreAuthorize("@ss.hasPermi('postCheck:postChecked:edit')")
149 148
     @Log(title = "岗检表管理", businessType = BusinessType.UPDATE)
150 149
     @PutMapping
@@ -155,26 +154,28 @@ public class PostCheckedController extends BaseController {
155 154
     /**
156 155
      * 删除岗检表管理
157 156
      */
158
-    @ApiOperation("5、删除岗检表管理")
159
-    @ApiImplicitParam(name = "ids", value = "Long类型的主键数组", dataType = "Long[]", dataTypeClass = Long[].class)
157
+    @ApiOperation("删除岗检表管理")
158
+//    @ApiImplicitParam(name = "ids", value = "Long类型的主键数组", dataType = "Long[]", dataTypeClass = Long[].class)
160 159
     @PreAuthorize("@ss.hasPermi('postCheck:postChecked:remove')")
161 160
     @Log(title = "岗检表管理", businessType = BusinessType.DELETE)
162 161
     @DeleteMapping("/{ids}")
163
-    public AjaxResult remove(@PathVariable Long[] ids) {
162
+    public AjaxResult remove(
163
+            @ApiParam(name = "ids", value = "岗检表ids", required = true)
164
+            @PathVariable Long[] ids) {
164 165
         return toAjax(postCheckedService.deletePostCheckedByIds(ids));
165 166
     }
166 167
 
167
-    @ApiOperation("6、岗检表提交审核")
168
+    @ApiOperation("岗检表提交")
168 169
     @ApiImplicitParams({
169 170
             @ApiImplicitParam(name = "id", value = "主键ID", dataType = "String", dataTypeClass = String.class),
170 171
     })
171
-    @Log(title = "岗检表提交审核", businessType = BusinessType.UPDATE)
172
+    @Log(title = "岗检表提交", businessType = BusinessType.UPDATE)
172 173
     @GetMapping("/submitApprove")
173 174
     public AjaxResult submitApprove(Long id) {
174 175
         return toAjax(postCheckedService.submitApprove(id));
175 176
     }
176 177
 
177
-    @ApiOperation("7、岗检表审核")
178
+    @ApiOperation("岗检表审核")
178 179
     @ApiImplicitParams({
179 180
             @ApiImplicitParam(name = "id", value = "主键", dataType = "Long", dataTypeClass = Long.class),
180 181
             @ApiImplicitParam(name = "status", value = "状态:3-通过;4-驳回;", dataType = "Integer", dataTypeClass = Integer.class),
@@ -222,9 +223,11 @@ public class PostCheckedController extends BaseController {
222 223
     /**
223 224
      * 获取岗检表管理详细信息
224 225
      */
225
-    @ApiOperation("岗检表预览")
226
+    @ApiOperation("岗检表预览详情")
226 227
     @GetMapping(value = "/preview/{id}")
227
-    public AjaxResult preview(@PathVariable("id") Long id) {
228
+    public AjaxResult preview(
229
+            @ApiParam(name = "id", value = "岗检表id", required = true)
230
+            @PathVariable("id") Long id) {
228 231
         PostChecked postChecked = postCheckedService.selectPostCheckedById(id);
229 232
         PostCheckedCreateExcel postCheckedCreateExcel = new PostCheckedCreateExcel();
230 233
         String fileName = postCheckedCreateExcel.createExcel(postChecked, postChecked.getChildren());
@@ -236,7 +239,15 @@ public class PostCheckedController extends BaseController {
236 239
     }
237 240
 
238 241
 
239
-    @ApiOperation("岗检表-批量下载:返回的压缩包地址,前端再去调用下载文件接口保存文件即可")
242
+    /**
243
+     * 岗检表-批量下载 返回的压缩包地址,前端再去调用下载文件接口保存文件即可
244
+     * @param ids
245
+     * @return
246
+     */
247
+    @ApiOperation("岗检表批量下载")
248
+    @ApiImplicitParams({
249
+            @ApiImplicitParam(name = "ids", value = "岗检表ids", dataType = "String", dataTypeClass = String.class),
250
+    })
240 251
     @GetMapping(value = "/batchExport")
241 252
     public AjaxResult batchExport(String ids) {
242 253
         String downloadPath = ruoYiConfig.getDownloadPath();

+ 3 - 18
ruoyi-postcheck/src/main/java/com/ruoyi/postCheck/controller/PostCheckedHistoryController.java

@@ -1,37 +1,23 @@
1 1
 package com.ruoyi.postCheck.controller;
2 2
 
3
-import com.ruoyi.common.constant.PostCheckedReportEnum;
4 3
 import com.ruoyi.common.core.controller.BaseController;
5 4
 import com.ruoyi.common.core.domain.AjaxResult;
6
-import com.ruoyi.common.core.page.TableDataInfo;
7
-import com.ruoyi.postCheck.domain.PostCheckedProblem;
8
-import com.ruoyi.postCheck.domain.PostCheckedReport;
9
-import com.ruoyi.postCheck.domain.history.CheckStatisticsView;
10
-import com.ruoyi.postCheck.domain.problemStatistics.CheckedProblemDeptDetaailView;
11 5
 import com.ruoyi.postCheck.model.DeptDetaailViewModel;
12 6
 import com.ruoyi.postCheck.service.IPostCheckedReportService;
13 7
 import com.ruoyi.system.service.ISysDeptService;
14 8
 import com.ruoyi.system.service.ISysPostService;
15
-import io.swagger.annotations.Api;
16
-import io.swagger.annotations.ApiImplicitParam;
17
-import io.swagger.annotations.ApiImplicitParams;
18
-import io.swagger.annotations.ApiOperation;
19 9
 import org.springframework.beans.factory.annotation.Autowired;
20 10
 import org.springframework.web.bind.annotation.GetMapping;
21 11
 import org.springframework.web.bind.annotation.RequestMapping;
22 12
 import org.springframework.web.bind.annotation.RestController;
23 13
 
24
-import java.util.ArrayList;
25
-import java.util.Date;
26
-import java.util.List;
27
-
28 14
 /**
29 15
  * 岗检报告管理Controller
30 16
  *
31 17
  * @author csg
32 18
  * @date 2023-12-28
33 19
  */
34
-@Api(tags = "6.1.1-岗检历史")
20
+//@Api(tags = "99.1.1-岗检历史")
35 21
 @RestController
36 22
 @RequestMapping("/postCheck/history")
37 23
 public class PostCheckedHistoryController extends BaseController {
@@ -63,9 +49,8 @@ public class PostCheckedHistoryController extends BaseController {
63 49
     }
64 50
 */
65 51
 
66
-    @ApiOperation("2、查看-第一个表格:1-检查部门;2-岗检岗位;3-完整性问题;4-有效性问题;5-适宜性问题;6-问题总数;7-已整改问题;")
52
+//    @ApiOperation("2、查看-第一个表格:1-检查部门;2-岗检岗位;3-完整性问题;4-有效性问题;5-适宜性问题;6-问题总数;7-已整改问题;")
67 53
     @GetMapping("/checkStatistics")
68
-//    @ApiImplicitParam(name = "id", value = "岗检报告的主键ID", dataType = "Long", dataTypeClass = Long.class)
69 54
     public AjaxResult checkStatistics(Long id) {
70 55
 
71 56
 //        第一步:、1-检查部门;2-岗检岗位;
@@ -77,7 +62,7 @@ public class PostCheckedHistoryController extends BaseController {
77 62
         return success(postCheckedReportService.checkStatistics());
78 63
     }
79 64
 
80
-    @ApiOperation("3、查看-第二个表格:岗检问题")
65
+//    @ApiOperation("3、查看-第二个表格:岗检问题")
81 66
     @GetMapping("/deptDetaailView")
82 67
 //    @ApiImplicitParam(name = "id", value = "岗检报告的主键ID", dataType = "Long", dataTypeClass = Long.class)
83 68
 //    public AjaxResult deptDetaailView(DeptDetaailViewModel model) { //notParam不是参数-是返回信息-方便接口联调

+ 17 - 9
ruoyi-postcheck/src/main/java/com/ruoyi/postCheck/controller/PostCheckedHomePageController.java

@@ -33,7 +33,7 @@ import java.util.stream.Collectors;
33 33
  * @author csg
34 34
  * @date 2023-12-23
35 35
  */
36
-@Api(tags = "1-首页")
36
+@Api(tags = "7.1.1-首页统计查询")
37 37
 @RestController
38 38
 @RequestMapping("/postCheck/homePage")
39 39
 public class PostCheckedHomePageController extends BaseController {
@@ -55,20 +55,20 @@ public class PostCheckedHomePageController extends BaseController {
55 55
      * 3、岗检数量-已查:post_plan t1 inner join post_plan_info t2 两张表连接,t2.status(岗检状态:1-未检;2-已检;)
56 56
      * 4、岗检数量-未查:post_plan t1 inner join post_plan_info t2 两张表连接,t2.status(岗检状态:1-未检;2-已检;)
57 57
      */
58
-    @ApiOperation("1-总览")
59
-    @ApiImplicitParams({
58
+    @ApiOperation("1-总览:统计岗位责任制清单、岗检问题、岗检计划")
59
+  /*  @ApiImplicitParams({
60 60
             @ApiImplicitParam(name = "listCount", value = "责任制清单数量", dataType = "Integer", dataTypeClass = Integer.class),
61 61
             @ApiImplicitParam(name = "problemCount", value = "检查出的问题数量", dataType = "Integer", dataTypeClass = Integer.class),
62 62
             @ApiImplicitParam(name = "checkedPostCount", value = "岗检数量-已查", dataType = "Integer", dataTypeClass = Integer.class),
63 63
             @ApiImplicitParam(name = "uncheckedPostCount", value = "岗检数量-未查", dataType = "Integer", dataTypeClass = Integer.class),
64
-    })
64
+    })*/
65 65
     @GetMapping("/totalView")
66 66
     public AjaxResult totalView() {
67 67
         return success(postCheckedProblemService.totalView());
68 68
     }
69 69
 
70 70
 
71
-//    @ApiOperation("2-检查出的问题")
71
+
72 72
     @ApiOperation("2-岗检问题属性分布")
73 73
     @ApiImplicitParams({
74 74
             @ApiImplicitParam(name = "problemTotal", value = "总数量", dataType = "Integer", dataTypeClass = Integer.class),
@@ -84,7 +84,11 @@ public class PostCheckedHomePageController extends BaseController {
84 84
     }
85 85
 
86 86
 
87
-    @ApiOperation("3-人员数量V2->岗位:data.postShouldCheckedCount;人员:data.userShouldCheckedCount")
87
+    /**
88
+     * 3-人员数量V2->岗位:data.postShouldCheckedCount;人员:data.userShouldCheckedCount
89
+     * @return
90
+     */
91
+    @ApiOperation("3-应检岗位数量、应检岗位人数")
88 92
     @GetMapping("/userTotal")
89 93
     public AjaxResult userTotal() {
90 94
         //查询待检查的岗位
@@ -111,7 +115,11 @@ public class PostCheckedHomePageController extends BaseController {
111 115
     }
112 116
 
113 117
 
114
-    @ApiOperation("4-中间饼图-20240305岗检计划完成率:主要体现“率”百分比(岗检计划中的 已检岗位数量 和 应检岗位数量)")
118
+    /**
119
+     * 中间饼图-20240305岗检计划完成率:主要体现“率”百分比(岗检计划中的 已检岗位数量 和 应检岗位数量)
120
+     * @return
121
+     */
122
+    @ApiOperation("4-岗检完成率统计")
115 123
     @GetMapping("/planCompletionRate")
116 124
     public AjaxResult planCompletionRate() {
117 125
 
@@ -206,8 +214,8 @@ public class PostCheckedHomePageController extends BaseController {
206 214
     }
207 215
 
208 216
 
209
-    @ApiOperation("8-评比排名-废弃")
210
-    @GetMapping("/assessmentRating")
217
+//    @ApiOperation("8-评比排名-废弃")
218
+//    @GetMapping("/assessmentRating")
211 219
     public AjaxResult assessmentRating() {
212 220
 //        岗位问题表结合岗检规则实时计算岗检扣分情况
213 221
 //        select * from "public"."post_checked_problem";

+ 22 - 23
ruoyi-postcheck/src/main/java/com/ruoyi/postCheck/controller/PostCheckedItemsController.java

@@ -1,37 +1,30 @@
1 1
 package com.ruoyi.postCheck.controller;
2 2
 
3
-import java.util.List;
4
-import javax.servlet.http.HttpServletResponse;
5
-import org.springframework.security.access.prepost.PreAuthorize;
6
-import org.springframework.beans.factory.annotation.Autowired;
7
-import org.springframework.web.bind.annotation.GetMapping;
8
-import org.springframework.web.bind.annotation.PostMapping;
9
-import org.springframework.web.bind.annotation.PutMapping;
10
-import org.springframework.web.bind.annotation.DeleteMapping;
11
-import org.springframework.web.bind.annotation.PathVariable;
12
-import org.springframework.web.bind.annotation.RequestBody;
13
-import org.springframework.web.bind.annotation.RequestMapping;
14
-import org.springframework.web.bind.annotation.RestController;
15 3
 import com.ruoyi.common.annotation.Log;
16 4
 import com.ruoyi.common.core.controller.BaseController;
17 5
 import com.ruoyi.common.core.domain.AjaxResult;
6
+import com.ruoyi.common.core.page.TableDataInfo;
18 7
 import com.ruoyi.common.enums.BusinessType;
8
+import com.ruoyi.common.utils.poi.ExcelUtil;
19 9
 import com.ruoyi.postCheck.domain.PostCheckedItems;
20 10
 import com.ruoyi.postCheck.service.IPostCheckedItemsService;
21
-import com.ruoyi.common.utils.poi.ExcelUtil;
22
-import com.ruoyi.common.core.page.TableDataInfo;
23
-import io.swagger.annotations.Api;
24
-import io.swagger.annotations.ApiOperation;
25
-import io.swagger.annotations.ApiImplicitParams;
26
-import io.swagger.annotations.ApiImplicitParam;
11
+import org.springframework.beans.factory.annotation.Autowired;
12
+import org.springframework.security.access.prepost.PreAuthorize;
13
+import org.springframework.web.bind.annotation.*;
14
+
15
+import javax.servlet.http.HttpServletResponse;
16
+import java.util.List;
27 17
 
28 18
 /**
19
+ * 废弃2024年6月4日09:00:55
20
+ * 废弃2024年6月4日09:00:55
21
+ * 废弃2024年6月4日09:00:55
29 22
  * 岗检表管理明细Controller
30 23
  *
31 24
  * @author csg
32 25
  * @date 2024-01-05
33 26
  */
34
-@Api(tags = "2.5.2-岗检表管理明细接口(废弃不调)")
27
+//@Api(tags = "2.5.2-岗检表管理明细接口(废弃不调)")
35 28
 @RestController
36 29
 @RequestMapping("/postCheck/postCheckedItems")
37 30
 public class PostCheckedItemsController extends BaseController
@@ -42,7 +35,7 @@ public class PostCheckedItemsController extends BaseController
42 35
     /**
43 36
      * 查询岗检表管理明细列表
44 37
      */
45
-    @ApiOperation("查询岗检表管理明细列表")
38
+    /*@ApiOperation("查询岗检表管理明细列表")
46 39
     @ApiImplicitParams({
47 40
                     @ApiImplicitParam(name = "id", value = "主键ID", dataType = "Long", dataTypeClass = Long.class),
48 41
                     @ApiImplicitParam(name = "postCheckedId", value = "岗位责任制检查表ID", dataType = "Long", dataTypeClass = Long.class),
@@ -56,7 +49,7 @@ public class PostCheckedItemsController extends BaseController
56 49
                 @ApiImplicitParam(name = "pageNum", value = "页码从1开始", dataType = "Integer", dataTypeClass = Integer.class),
57 50
                 @ApiImplicitParam(name = "pageSize", value = "分页大小", dataType = "Integer", dataTypeClass = Integer.class),
58 51
                 @ApiImplicitParam(name = "orderBy", value = "排序字段", dataType = "String", dataTypeClass = String.class)
59
-    })
52
+    })*/
60 53
 //    @PreAuthorize("@ss.hasPermi('postCheck:postCheckedItems:list')")
61 54
     @GetMapping("/list")
62 55
     public TableDataInfo list(PostCheckedItems postCheckedItems)
@@ -69,7 +62,7 @@ public class PostCheckedItemsController extends BaseController
69 62
     /**
70 63
      * 导出岗检表管理明细列表
71 64
      */
72
-    @ApiOperation("导出岗检表管理明细列表")
65
+//    @ApiOperation("导出岗检表管理明细列表")
73 66
 //    @PreAuthorize("@ss.hasPermi('postCheck:postCheckedItems:export')")
74 67
     @Log(title = "岗检表管理明细", businessType = BusinessType.EXPORT)
75 68
     @PostMapping("/export")
@@ -83,7 +76,7 @@ public class PostCheckedItemsController extends BaseController
83 76
     /**
84 77
      * 获取岗检表管理明细详细信息
85 78
      */
86
-    @ApiOperation("获取岗检表管理明细详细信息")
79
+//    @ApiOperation("获取岗检表管理明细详细信息")
87 80
 //    @PreAuthorize("@ss.hasPermi('postCheck:postCheckedItems:query')")
88 81
     @GetMapping(value = "/{id}")
89 82
     public AjaxResult getInfo(@PathVariable("id") Long id)
@@ -94,6 +87,7 @@ public class PostCheckedItemsController extends BaseController
94 87
     /**
95 88
      * 新增岗检表管理明细
96 89
      */
90
+    /*
97 91
     @ApiOperation("新增岗检表管理明细")
98 92
     @ApiImplicitParams({
99 93
         @ApiImplicitParam(name = "id", value = "主键ID", dataType = "Long", dataTypeClass = Long.class),
@@ -106,6 +100,7 @@ public class PostCheckedItemsController extends BaseController
106 100
         @ApiImplicitParam(name = "postCheckedMethod", value = "检查方法", dataType = "String", dataTypeClass = String.class),
107 101
         @ApiImplicitParam(name = "postCheckedResult", value = "检查结果", dataType = "String", dataTypeClass = String.class),
108 102
     })
103
+    */
109 104
     @PreAuthorize("@ss.hasPermi('postCheck:postCheckedItems:add')")
110 105
     @Log(title = "岗检表管理明细", businessType = BusinessType.INSERT)
111 106
     @PostMapping
@@ -117,6 +112,7 @@ public class PostCheckedItemsController extends BaseController
117 112
     /**
118 113
      * 修改岗检表管理明细
119 114
      */
115
+    /*
120 116
     @ApiOperation("修改岗检表管理明细")
121 117
     @ApiImplicitParams({
122 118
                     @ApiImplicitParam(name = "id", value = "主键ID", dataType = "Long", dataTypeClass = Long.class),
@@ -129,6 +125,7 @@ public class PostCheckedItemsController extends BaseController
129 125
                     @ApiImplicitParam(name = "postCheckedMethod", value = "检查方法", dataType = "String", dataTypeClass = String.class),
130 126
                     @ApiImplicitParam(name = "postCheckedResult", value = "检查结果", dataType = "String", dataTypeClass = String.class),
131 127
     })
128
+    */
132 129
     @PreAuthorize("@ss.hasPermi('postCheck:postCheckedItems:edit')")
133 130
     @Log(title = "岗检表管理明细", businessType = BusinessType.UPDATE)
134 131
     @PutMapping
@@ -140,8 +137,10 @@ public class PostCheckedItemsController extends BaseController
140 137
     /**
141 138
      * 删除岗检表管理明细
142 139
      */
140
+    /*
143 141
     @ApiOperation("删除岗检表管理明细")
144 142
     @ApiImplicitParam(name = "ids", value = "Long类型的主键数组", dataType = "Long[]", dataTypeClass = Long[].class)
143
+    */
145 144
     @PreAuthorize("@ss.hasPermi('postCheck:postCheckedItems:remove')")
146 145
     @Log(title = "岗检表管理明细", businessType = BusinessType.DELETE)
147 146
 	@DeleteMapping("/{ids}")

Різницю між файлами не показано, бо вона завелика
+ 127 - 41
ruoyi-postcheck/src/main/java/com/ruoyi/postCheck/controller/PostCheckedProblemController.java


+ 65 - 82
ruoyi-postcheck/src/main/java/com/ruoyi/postCheck/controller/PostCheckedProblemRecordController.java

@@ -1,30 +1,19 @@
1 1
 package com.ruoyi.postCheck.controller;
2 2
 
3
-import java.util.Date;
4
-import java.util.List;
5
-import javax.servlet.http.HttpServletResponse;
6
-import org.springframework.security.access.prepost.PreAuthorize;
7
-import org.springframework.beans.factory.annotation.Autowired;
8
-import org.springframework.web.bind.annotation.GetMapping;
9
-import org.springframework.web.bind.annotation.PostMapping;
10
-import org.springframework.web.bind.annotation.PutMapping;
11
-import org.springframework.web.bind.annotation.DeleteMapping;
12
-import org.springframework.web.bind.annotation.PathVariable;
13
-import org.springframework.web.bind.annotation.RequestBody;
14
-import org.springframework.web.bind.annotation.RequestMapping;
15
-import org.springframework.web.bind.annotation.RestController;
16
-import com.ruoyi.common.annotation.Log;
17 3
 import com.ruoyi.common.core.controller.BaseController;
18
-import com.ruoyi.common.core.domain.AjaxResult;
19
-import com.ruoyi.common.enums.BusinessType;
4
+import com.ruoyi.common.core.page.TableDataInfo;
20 5
 import com.ruoyi.postCheck.domain.PostCheckedProblemRecord;
21 6
 import com.ruoyi.postCheck.service.IPostCheckedProblemRecordService;
22
-import com.ruoyi.common.utils.poi.ExcelUtil;
23
-import com.ruoyi.common.core.page.TableDataInfo;
24 7
 import io.swagger.annotations.Api;
25
-import io.swagger.annotations.ApiOperation;
26
-import io.swagger.annotations.ApiImplicitParams;
27 8
 import io.swagger.annotations.ApiImplicitParam;
9
+import io.swagger.annotations.ApiImplicitParams;
10
+import io.swagger.annotations.ApiOperation;
11
+import org.springframework.beans.factory.annotation.Autowired;
12
+import org.springframework.web.bind.annotation.GetMapping;
13
+import org.springframework.web.bind.annotation.RequestMapping;
14
+import org.springframework.web.bind.annotation.RestController;
15
+
16
+import java.util.List;
28 17
 
29 18
 /**
30 19
  * 岗检问题操作记录表Controller
@@ -32,11 +21,10 @@ import io.swagger.annotations.ApiImplicitParam;
32 21
  * @author csg
33 22
  * @date 2023-12-23
34 23
  */
35
-@Api(tags = "3.3.2-岗检问题操作记录表接口")
24
+@Api(tags = "3.3.3-岗检问题操作记录表接口")
36 25
 @RestController
37 26
 @RequestMapping("/postCheck/postCheckedProblemRecord")
38
-public class PostCheckedProblemRecordController extends BaseController
39
-{
27
+public class PostCheckedProblemRecordController extends BaseController {
40 28
     @Autowired
41 29
     private IPostCheckedProblemRecordService postCheckedProblemRecordService;
42 30
 
@@ -46,7 +34,7 @@ public class PostCheckedProblemRecordController extends BaseController
46 34
     @ApiOperation("查询岗检问题操作记录表列表")
47 35
     @ApiImplicitParams({
48 36
 //                    @ApiImplicitParam(name = "id", value = "主键ID", dataType = "Long", dataTypeClass = Long.class),
49
-                    @ApiImplicitParam(name = "problemId", value = "问题ID(多)", dataType = "Long", dataTypeClass = Long.class),
37
+            @ApiImplicitParam(name = "problemId", value = "问题ID(多)", dataType = "Long", dataTypeClass = Long.class),
50 38
 //                    @ApiImplicitParam(name = "userBy", value = "操作者姓名", dataType = "String", dataTypeClass = String.class),
51 39
 //                    @ApiImplicitParam(name = "content", value = "操作内容", dataType = "String", dataTypeClass = String.class),
52 40
 //                    @ApiImplicitParam(name = "delFlag", value = "删除标志(0代表存在 2代表删除)", dataType = "String", dataTypeClass = String.class),
@@ -56,8 +44,7 @@ public class PostCheckedProblemRecordController extends BaseController
56 44
     })
57 45
 //    @PreAuthorize("@ss.hasPermi('postCheck:postCheckedProblemRecord:list')")
58 46
     @GetMapping("/list")
59
-    public TableDataInfo list(PostCheckedProblemRecord postCheckedProblemRecord)
60
-    {
47
+    public TableDataInfo list(PostCheckedProblemRecord postCheckedProblemRecord) {
61 48
 //        startPage();
62 49
         startPage("desc", "t1.create_time");
63 50
         List<PostCheckedProblemRecord> list = postCheckedProblemRecordService.selectPostCheckedProblemRecordList(postCheckedProblemRecord);
@@ -66,77 +53,73 @@ public class PostCheckedProblemRecordController extends BaseController
66 53
 
67 54
     /**
68 55
      * 导出岗检问题操作记录表列表
69
-    @ApiOperation("导出岗检问题操作记录表列表")
70
-//    @PreAuthorize("@ss.hasPermi('postCheck:postCheckedProblemRecord:export')")
71
-    @Log(title = "岗检问题操作记录表", businessType = BusinessType.EXPORT)
72
-    @PostMapping("/export")
73
-    public void export(HttpServletResponse response, PostCheckedProblemRecord postCheckedProblemRecord)
74
-    {
75
-        List<PostCheckedProblemRecord> list = postCheckedProblemRecordService.selectPostCheckedProblemRecordList(postCheckedProblemRecord);
76
-        ExcelUtil<PostCheckedProblemRecord> util = new ExcelUtil<PostCheckedProblemRecord>(PostCheckedProblemRecord.class);
77
-        util.exportExcel(response, list, "岗检问题操作记录表数据");
78
-    }
56
+     @ApiOperation("导出岗检问题操作记录表列表")
57
+     //    @PreAuthorize("@ss.hasPermi('postCheck:postCheckedProblemRecord:export')")
58
+     @Log(title = "岗检问题操作记录表", businessType = BusinessType.EXPORT)
59
+     @PostMapping("/export") public void export(HttpServletResponse response, PostCheckedProblemRecord postCheckedProblemRecord)
60
+     {
61
+     List<PostCheckedProblemRecord> list = postCheckedProblemRecordService.selectPostCheckedProblemRecordList(postCheckedProblemRecord);
62
+     ExcelUtil<PostCheckedProblemRecord> util = new ExcelUtil<PostCheckedProblemRecord>(PostCheckedProblemRecord.class);
63
+     util.exportExcel(response, list, "岗检问题操作记录表数据");
64
+     }
79 65
      */
80 66
 
81 67
     /**
82 68
      * 获取岗检问题操作记录表详细信息
83
-    @ApiOperation("获取岗检问题操作记录表详细信息")
84
-//    @PreAuthorize("@ss.hasPermi('postCheck:postCheckedProblemRecord:query')")
85
-    @GetMapping(value = "/{id}")
86
-    public AjaxResult getInfo(@PathVariable("id") Long id)
87
-    {
88
-        return success(postCheckedProblemRecordService.selectPostCheckedProblemRecordById(id));
89
-    }
69
+     @ApiOperation("获取岗检问题操作记录表详细信息")
70
+     //    @PreAuthorize("@ss.hasPermi('postCheck:postCheckedProblemRecord:query')")
71
+     @GetMapping(value = "/{id}")
72
+     public AjaxResult getInfo(@PathVariable("id") Long id)
73
+     {
74
+     return success(postCheckedProblemRecordService.selectPostCheckedProblemRecordById(id));
75
+     }
90 76
      */
91 77
 
92 78
     /**
93 79
      * 新增岗检问题操作记录表
94
-    @ApiOperation("新增岗检问题操作记录表")
95
-    @ApiImplicitParams({
96
-        @ApiImplicitParam(name = "id", value = "主键ID", dataType = "Long", dataTypeClass = Long.class),
97
-        @ApiImplicitParam(name = "problemId", value = "问题ID(多)", dataType = "Long", dataTypeClass = Long.class),
98
-        @ApiImplicitParam(name = "userBy", value = "操作者姓名", dataType = "String", dataTypeClass = String.class),
99
-        @ApiImplicitParam(name = "content", value = "操作内容", dataType = "String", dataTypeClass = String.class),
100
-        @ApiImplicitParam(name = "delFlag", value = "删除标志(0代表存在 2代表删除)", dataType = "String", dataTypeClass = String.class),
101
-    })
102
-//    @PreAuthorize("@ss.hasPermi('postCheck:postCheckedProblemRecord:add')")
103
-    @Log(title = "岗检问题操作记录表", businessType = BusinessType.INSERT)
104
-    @PostMapping
105
-    public AjaxResult add(@RequestBody PostCheckedProblemRecord postCheckedProblemRecord)
106
-    {
107
-        return toAjax(postCheckedProblemRecordService.insertPostCheckedProblemRecord(postCheckedProblemRecord));
108
-    }
80
+     @ApiOperation("新增岗检问题操作记录表")
81
+     @ApiImplicitParams({
82
+     @ApiImplicitParam(name = "id", value = "主键ID", dataType = "Long", dataTypeClass = Long.class),
83
+     @ApiImplicitParam(name = "problemId", value = "问题ID(多)", dataType = "Long", dataTypeClass = Long.class),
84
+     @ApiImplicitParam(name = "userBy", value = "操作者姓名", dataType = "String", dataTypeClass = String.class),
85
+     @ApiImplicitParam(name = "content", value = "操作内容", dataType = "String", dataTypeClass = String.class),
86
+     @ApiImplicitParam(name = "delFlag", value = "删除标志(0代表存在 2代表删除)", dataType = "String", dataTypeClass = String.class),
87
+     })
88
+     //    @PreAuthorize("@ss.hasPermi('postCheck:postCheckedProblemRecord:add')")
89
+     @Log(title = "岗检问题操作记录表", businessType = BusinessType.INSERT)
90
+     @PostMapping public AjaxResult add(@RequestBody PostCheckedProblemRecord postCheckedProblemRecord)
91
+     {
92
+     return toAjax(postCheckedProblemRecordService.insertPostCheckedProblemRecord(postCheckedProblemRecord));
93
+     }
109 94
      */
110 95
 
111 96
     /**
112 97
      * 修改岗检问题操作记录表
113
-    @ApiOperation("修改岗检问题操作记录表")
114
-    @ApiImplicitParams({
115
-                    @ApiImplicitParam(name = "id", value = "主键ID", dataType = "Long", dataTypeClass = Long.class),
116
-                    @ApiImplicitParam(name = "problemId", value = "问题ID(多)", dataType = "Long", dataTypeClass = Long.class),
117
-                    @ApiImplicitParam(name = "userBy", value = "操作者姓名", dataType = "String", dataTypeClass = String.class),
118
-                    @ApiImplicitParam(name = "content", value = "操作内容", dataType = "String", dataTypeClass = String.class),
119
-                    @ApiImplicitParam(name = "delFlag", value = "删除标志(0代表存在 2代表删除)", dataType = "String", dataTypeClass = String.class),
120
-    })
121
-//    @PreAuthorize("@ss.hasPermi('postCheck:postCheckedProblemRecord:edit')")
122
-    @Log(title = "岗检问题操作记录表", businessType = BusinessType.UPDATE)
123
-    @PutMapping
124
-    public AjaxResult edit(@RequestBody PostCheckedProblemRecord postCheckedProblemRecord)
125
-    {
126
-        return toAjax(postCheckedProblemRecordService.updatePostCheckedProblemRecord(postCheckedProblemRecord));
127
-    }
98
+     @ApiOperation("修改岗检问题操作记录表")
99
+     @ApiImplicitParams({
100
+     @ApiImplicitParam(name = "id", value = "主键ID", dataType = "Long", dataTypeClass = Long.class),
101
+     @ApiImplicitParam(name = "problemId", value = "问题ID(多)", dataType = "Long", dataTypeClass = Long.class),
102
+     @ApiImplicitParam(name = "userBy", value = "操作者姓名", dataType = "String", dataTypeClass = String.class),
103
+     @ApiImplicitParam(name = "content", value = "操作内容", dataType = "String", dataTypeClass = String.class),
104
+     @ApiImplicitParam(name = "delFlag", value = "删除标志(0代表存在 2代表删除)", dataType = "String", dataTypeClass = String.class),
105
+     })
106
+     //    @PreAuthorize("@ss.hasPermi('postCheck:postCheckedProblemRecord:edit')")
107
+     @Log(title = "岗检问题操作记录表", businessType = BusinessType.UPDATE)
108
+     @PutMapping public AjaxResult edit(@RequestBody PostCheckedProblemRecord postCheckedProblemRecord)
109
+     {
110
+     return toAjax(postCheckedProblemRecordService.updatePostCheckedProblemRecord(postCheckedProblemRecord));
111
+     }
128 112
      */
129 113
 
130 114
     /**
131 115
      * 删除岗检问题操作记录表
132
-    @ApiOperation("删除岗检问题操作记录表")
133
-    @ApiImplicitParam(name = "ids", value = "Long类型的主键数组", dataType = "Long[]", dataTypeClass = Long[].class)
134
-//    @PreAuthorize("@ss.hasPermi('postCheck:postCheckedProblemRecord:remove')")
135
-    @Log(title = "岗检问题操作记录表", businessType = BusinessType.DELETE)
136
-	@DeleteMapping("/{ids}")
137
-    public AjaxResult remove(@PathVariable Long[] ids)
138
-    {
139
-        return toAjax(postCheckedProblemRecordService.deletePostCheckedProblemRecordByIds(ids));
140
-    }
116
+     @ApiOperation("删除岗检问题操作记录表")
117
+     @ApiImplicitParam(name = "ids", value = "Long类型的主键数组", dataType = "Long[]", dataTypeClass = Long[].class)
118
+     //    @PreAuthorize("@ss.hasPermi('postCheck:postCheckedProblemRecord:remove')")
119
+     @Log(title = "岗检问题操作记录表", businessType = BusinessType.DELETE)
120
+     @DeleteMapping("/{ids}") public AjaxResult remove(@PathVariable Long[] ids)
121
+     {
122
+     return toAjax(postCheckedProblemRecordService.deletePostCheckedProblemRecordByIds(ids));
123
+     }
141 124
      */
142 125
 }

+ 7 - 1
ruoyi-postcheck/src/main/java/com/ruoyi/postCheck/controller/PostCheckedProductionProblemStatisticsController.java

@@ -9,6 +9,7 @@ import com.ruoyi.postCheck.model.DeptDetaailViewModel;
9 9
 import com.ruoyi.postCheck.service.IPostCheckedProblemService;
10 10
 import io.swagger.annotations.Api;
11 11
 import io.swagger.annotations.ApiOperation;
12
+import io.swagger.annotations.ApiParam;
12 13
 import org.springframework.beans.factory.annotation.Autowired;
13 14
 import org.springframework.web.bind.annotation.GetMapping;
14 15
 import org.springframework.web.bind.annotation.PathVariable;
@@ -157,7 +158,12 @@ public class PostCheckedProductionProblemStatisticsController extends BaseContro
157 158
 
158 159
     @ApiOperation("6-历年岗检问题数量")
159 160
     @GetMapping("/historyProblemNumberView/{year}/{deptId}")
160
-    public AjaxResult historyProblemNumberView(@PathVariable("year") String year,@PathVariable("deptId") String deptId){ //notParam不是参数-是返回信息-方便接口联调
161
+    public AjaxResult historyProblemNumberView(
162
+            @ApiParam(name = "year", value = "年份", required = true)
163
+            @PathVariable("year") String year,
164
+
165
+            @ApiParam(name = "deptId", value = "部门ID", required = true)
166
+            @PathVariable("deptId") String deptId){ //notParam不是参数-是返回信息-方便接口联调
161 167
 //         查询问题表
162 168
 //        select * from "public"."post_checked_problem";
163 169
 //        GROUP BY problem_attribute -- 问题属性(1-完整问题;2-有效性问题;3-适宜性问题;)

+ 17 - 15
ruoyi-postcheck/src/main/java/com/ruoyi/postCheck/controller/PostHighlightsController.java

@@ -4,6 +4,7 @@ import java.util.Date;
4 4
 import java.util.List;
5 5
 import javax.servlet.http.HttpServletResponse;
6 6
 
7
+import io.swagger.annotations.*;
7 8
 import org.springframework.security.access.prepost.PreAuthorize;
8 9
 import org.springframework.beans.factory.annotation.Autowired;
9 10
 import org.springframework.web.bind.annotation.GetMapping;
@@ -22,10 +23,6 @@ import com.ruoyi.postCheck.domain.PostHighlights;
22 23
 import com.ruoyi.postCheck.service.IPostHighlightsService;
23 24
 import com.ruoyi.common.utils.poi.ExcelUtil;
24 25
 import com.ruoyi.common.core.page.TableDataInfo;
25
-import io.swagger.annotations.Api;
26
-import io.swagger.annotations.ApiOperation;
27
-import io.swagger.annotations.ApiImplicitParams;
28
-import io.swagger.annotations.ApiImplicitParam;
29 26
 
30 27
 /**
31 28
  * 岗检亮点Controller
@@ -33,7 +30,7 @@ import io.swagger.annotations.ApiImplicitParam;
33 30
  * @author csg
34 31
  * @date 2023-12-26
35 32
  */
36
-@Api(tags = "6.2.1-岗检亮点接口")
33
+@Api(tags = "3.4.1-岗检亮点")
37 34
 @RestController
38 35
 @RequestMapping("/postCheck/postHighlights")
39 36
 public class PostHighlightsController extends BaseController {
@@ -49,7 +46,7 @@ public class PostHighlightsController extends BaseController {
49 46
             @ApiImplicitParam(name = "highlightsType", value = "职责类别:1-业务职责;2-党建及党风廉政;3-安全环保职责;4-合规保密职;5-其他;", dataType = "Integer", dataTypeClass = Integer.class),
50 47
             @ApiImplicitParam(name = "problemAttribute", value = "问题属性(1-完整问题;2-有效性问题;3-适宜性问题;)", dataType = "Integer", dataTypeClass = Integer.class),
51 48
             @ApiImplicitParam(name = "highlights", value = "管理亮点", dataType = "String", dataTypeClass = String.class),
52
-            @ApiImplicitParam(name = "delFlag", value = "del_flag", dataType = "Integer", dataTypeClass = Integer.class),
49
+//            @ApiImplicitParam(name = "delFlag", value = "del_flag", dataType = "Integer", dataTypeClass = Integer.class),
53 50
             @ApiImplicitParam(name = "createUserId", value = "创建人ID", dataType = "Long", dataTypeClass = Long.class),
54 51
             @ApiImplicitParam(name = "pageNum", value = "页码从1开始", dataType = "Integer", dataTypeClass = Integer.class),
55 52
             @ApiImplicitParam(name = "pageSize", value = "分页大小", dataType = "Integer", dataTypeClass = Integer.class),
@@ -67,6 +64,7 @@ public class PostHighlightsController extends BaseController {
67 64
     /**
68 65
      * 导出岗检亮点列表
69 66
      */
67
+    /*
70 68
     @ApiOperation("导出岗检亮点列表")
71 69
 //    @PreAuthorize("@ss.hasPermi('postCheck:postHighlights:export')")
72 70
     @Log(title = "岗检亮点", businessType = BusinessType.EXPORT)
@@ -76,14 +74,16 @@ public class PostHighlightsController extends BaseController {
76 74
         ExcelUtil<PostHighlights> util = new ExcelUtil<PostHighlights>(PostHighlights.class);
77 75
         util.exportExcel(response, list, "岗检亮点数据");
78 76
     }
79
-
77
+*/
80 78
     /**
81 79
      * 获取岗检亮点详细信息
82 80
      */
83 81
     @ApiOperation("获取岗检亮点详细信息")
84 82
 //    @PreAuthorize("@ss.hasPermi('postCheck:postHighlights:query')")
85 83
     @GetMapping(value = "/{id}")
86
-    public AjaxResult getInfo(@PathVariable("id") Long id) {
84
+    public AjaxResult getInfo(
85
+            @ApiParam(name = "id", value = "岗检亮点id", required = true)
86
+            @PathVariable("id") Long id) {
87 87
         return success(postHighlightsService.selectPostHighlightsById(id));
88 88
     }
89 89
 
@@ -92,12 +92,12 @@ public class PostHighlightsController extends BaseController {
92 92
      */
93 93
     @ApiOperation("新增岗检亮点")
94 94
     @ApiImplicitParams({
95
-            @ApiImplicitParam(name = "id", value = "主键id", dataType = "Long", dataTypeClass = Long.class),
95
+//            @ApiImplicitParam(name = "id", value = "主键id", dataType = "Long", dataTypeClass = Long.class),
96 96
             @ApiImplicitParam(name = "highlightsType", value = "职责类别:1-业务职责;2-党建及党风廉政;3-安全环保职责;4-合规保密职;5-其他;", dataType = "Integer", dataTypeClass = Integer.class),
97 97
             @ApiImplicitParam(name = "problemAttribute", value = "问题属性(1-完整问题;2-有效性问题;3-适宜性问题;)", dataType = "Integer", dataTypeClass = Integer.class),
98 98
             @ApiImplicitParam(name = "highlights", value = "管理亮点", dataType = "String", dataTypeClass = String.class),
99
-            @ApiImplicitParam(name = "delFlag", value = "del_flag", dataType = "Integer", dataTypeClass = Integer.class),
100
-            @ApiImplicitParam(name = "createUserId", value = "创建人ID", dataType = "Long", dataTypeClass = Long.class),
99
+//            @ApiImplicitParam(name = "delFlag", value = "del_flag", dataType = "Integer", dataTypeClass = Integer.class),
100
+//            @ApiImplicitParam(name = "createUserId", value = "创建人ID", dataType = "Long", dataTypeClass = Long.class),
101 101
     })
102 102
     @PreAuthorize("@ss.hasPermi('postCheck:postHighlights:add')")
103 103
     @Log(title = "岗检亮点", businessType = BusinessType.INSERT)
@@ -115,8 +115,8 @@ public class PostHighlightsController extends BaseController {
115 115
             @ApiImplicitParam(name = "highlightsType", value = "职责类别:1-业务职责;2-党建及党风廉政;3-安全环保职责;4-合规保密职;5-其他;", dataType = "Integer", dataTypeClass = Integer.class),
116 116
             @ApiImplicitParam(name = "problemAttribute", value = "问题属性(1-完整问题;2-有效性问题;3-适宜性问题;)", dataType = "Integer", dataTypeClass = Integer.class),
117 117
             @ApiImplicitParam(name = "highlights", value = "管理亮点", dataType = "String", dataTypeClass = String.class),
118
-            @ApiImplicitParam(name = "delFlag", value = "del_flag", dataType = "Integer", dataTypeClass = Integer.class),
119
-            @ApiImplicitParam(name = "createUserId", value = "创建人ID", dataType = "Long", dataTypeClass = Long.class),
118
+//            @ApiImplicitParam(name = "delFlag", value = "del_flag", dataType = "Integer", dataTypeClass = Integer.class),
119
+//            @ApiImplicitParam(name = "createUserId", value = "创建人ID", dataType = "Long", dataTypeClass = Long.class),
120 120
     })
121 121
     @PreAuthorize("@ss.hasPermi('postCheck:postHighlights:edit')")
122 122
     @Log(title = "岗检亮点", businessType = BusinessType.UPDATE)
@@ -129,11 +129,13 @@ public class PostHighlightsController extends BaseController {
129 129
      * 删除岗检亮点
130 130
      */
131 131
     @ApiOperation("删除岗检亮点")
132
-    @ApiImplicitParam(name = "ids", value = "Long类型的主键数组", dataType = "Long[]", dataTypeClass = Long[].class)
132
+//    @ApiImplicitParam(name = "ids", value = "Long类型的主键数组", dataType = "Long[]", dataTypeClass = Long[].class)
133 133
     @PreAuthorize("@ss.hasPermi('postCheck:postHighlights:remove')")
134 134
     @Log(title = "岗检亮点", businessType = BusinessType.DELETE)
135 135
     @DeleteMapping("/{ids}")
136
-    public AjaxResult remove(@PathVariable Long[] ids) {
136
+    public AjaxResult remove(
137
+            @ApiParam(name = "ids", value = "岗检亮点ids", required = true)
138
+            @PathVariable Long[] ids) {
137 139
         return toAjax(postHighlightsService.deletePostHighlightsByIds(ids));
138 140
     }
139 141
 }

+ 19 - 18
ruoyi-postcheck/src/main/java/com/ruoyi/postCheck/controller/PostListController.java

@@ -16,10 +16,7 @@ import com.ruoyi.postCheck.domain.tools.PostCheckListType;
16 16
 import com.ruoyi.postCheck.domain.tools.PostListApproveTypeUser;
17 17
 import com.ruoyi.postCheck.service.IPostListService;
18 18
 import com.ruoyi.system.service.ISysPostService;
19
-import io.swagger.annotations.Api;
20
-import io.swagger.annotations.ApiImplicitParam;
21
-import io.swagger.annotations.ApiImplicitParams;
22
-import io.swagger.annotations.ApiOperation;
19
+import io.swagger.annotations.*;
23 20
 import org.springframework.beans.factory.annotation.Autowired;
24 21
 import org.springframework.security.access.prepost.PreAuthorize;
25 22
 import org.springframework.web.bind.annotation.*;
@@ -76,7 +73,9 @@ public class PostListController extends BaseController {
76 73
     @ApiOperation("获取岗位责任制清单详细信息")
77 74
     @PreAuthorize("@ss.hasPermi('postCheck:postCheckList:query')")
78 75
     @GetMapping(value = "/{id}")
79
-    public AjaxResult getInfo(@PathVariable("id") Long id) {
76
+    public AjaxResult getInfo(
77
+            @ApiParam(name = "id", value = "清单id", required = true)
78
+            @PathVariable("id") Long id) {
80 79
         return success(postListService.selectPostListById(id));
81 80
     }
82 81
 
@@ -100,11 +99,12 @@ public class PostListController extends BaseController {
100 99
      * 新增岗位责任制清单
101 100
      */
102 101
     @ApiOperation("新增岗位责任制清单")
102
+    /*
103 103
     @ApiImplicitParams({
104
-            @ApiImplicitParam(name = "id", value = "主键", dataType = "Long", dataTypeClass = Long.class),
105
-            @ApiImplicitParam(name = "status", value = "状态:1-待审核;2-审核中;3-通过;4-驳回;", dataType = "Long", dataTypeClass = Long.class),
106
-            @ApiImplicitParam(name = "statusByUserId", value = "审核人ID", dataType = "Long", dataTypeClass = Long.class),
107
-            @ApiImplicitParam(name = "statusByUserName", value = "审核人姓名", dataType = "String", dataTypeClass = String.class),
104
+//            @ApiImplicitParam(name = "id", value = "主键", dataType = "Long", dataTypeClass = Long.class),
105
+//            @ApiImplicitParam(name = "status", value = "状态:1-待审核;2-审核中;3-通过;4-驳回;", dataType = "Long", dataTypeClass = Long.class),
106
+//            @ApiImplicitParam(name = "statusByUserId", value = "审核人ID", dataType = "Long", dataTypeClass = Long.class),
107
+//            @ApiImplicitParam(name = "statusByUserName", value = "审核人姓名", dataType = "String", dataTypeClass = String.class),
108 108
             @ApiImplicitParam(name = "unitId", value = "所在单位", dataType = "String", dataTypeClass = String.class),
109 109
             @ApiImplicitParam(name = "postId", value = "岗位ID", dataType = "String", dataTypeClass = String.class),
110 110
             @ApiImplicitParam(name = "positionLevel", value = "岗位级别", dataType = "String", dataTypeClass = String.class),
@@ -117,11 +117,12 @@ public class PostListController extends BaseController {
117 117
             @ApiImplicitParam(name = "creationDate", value = "编制日期", dataType = "Date", dataTypeClass = Date.class),
118 118
             @ApiImplicitParam(name = "revisionDate", value = "修订日期", dataType = "Date", dataTypeClass = Date.class),
119 119
             @ApiImplicitParam(name = "jobSummary", value = "工作摘要", dataType = "String", dataTypeClass = String.class),
120
-            @ApiImplicitParam(name = "remark", value = "备注(前端把所在部门的选中数JSON放到这里了,后端不要再所以设置值)", dataType = "String", dataTypeClass = String.class),
121
-            @ApiImplicitParam(name = "createUserId", value = "创建者用户ID", dataType = "Long", dataTypeClass = Long.class),
122
-            /** 岗位责任制清单明细信息 */
120
+            @ApiImplicitParam(name = "remark", value = "所在部门祖级id", dataType = "String", dataTypeClass = String.class),
121
+//            @ApiImplicitParam(name = "createUserId", value = "创建者用户ID", dataType = "Long", dataTypeClass = Long.class),
122
+            *//** 岗位责任制清单明细信息 *//*
123 123
             @ApiImplicitParam(name = "children", value = "岗位责任制清单明细", dataType = "PostListInfo", dataTypeClass = PostListInfo.class),
124
-    })
124
+    })*/
125
+
125 126
     @PreAuthorize("@ss.hasPermi('postCheck:postCheckList:add')")
126 127
     @Log(title = "岗位责任制清单", businessType = BusinessType.INSERT)
127 128
     @PostMapping
@@ -231,7 +232,7 @@ public class PostListController extends BaseController {
231 232
     }
232 233
 
233 234
 
234
-    @ApiOperation("1、岗位责任制清单提交审核")
235
+    @ApiOperation("1、岗位责任制清单提交")
235 236
     @ApiImplicitParams({
236 237
             @ApiImplicitParam(name = "id", value = "主键ID", dataType = "String", dataTypeClass = String.class),
237 238
     })
@@ -244,8 +245,8 @@ public class PostListController extends BaseController {
244 245
 
245 246
     @ApiOperation("2、岗位责任制清单审核")
246 247
     @ApiImplicitParams({
247
-            @ApiImplicitParam(name = "type", value = "审核的类型(1-业务职责;2-党建及党风廉政建设职责;3-安全环保职责;4-合规保密职;5-任职资格与能力素质要求)", dataType = "String", dataTypeClass = String.class),
248 248
             @ApiImplicitParam(name = "id", value = "主键ID", dataType = "String", dataTypeClass = String.class),
249
+            @ApiImplicitParam(name = "type", value = "审核的类型(1-业务职责;2-党建及党风廉政建设职责;3-安全环保职责;4-合规保密职;5-任职资格与能力素质要求)", dataType = "String", dataTypeClass = String.class),
249 250
             @ApiImplicitParam(name = "status", value = "状态:3-通过;4-驳回;", dataType = "String", dataTypeClass = String.class),
250 251
             @ApiImplicitParam(name = "reason", value = "未通过理由(驳回时必选)", dataType = "String", dataTypeClass = String.class),
251 252
     })
@@ -256,9 +257,9 @@ public class PostListController extends BaseController {
256 257
     }
257 258
 
258 259
 
259
-    @ApiOperation("1、检查项目下拉框(不需要参数)")
260
+    @ApiOperation("1、岗位责任制清单检查项目下拉框")
260 261
     @GetMapping("/typeList")
261
-    public AjaxResult typeList(PostCheckListType postCheckListType) {
262
+    public AjaxResult typeList() {
262 263
       /*
263 264
         List<Map<Integer, String>> list = new ArrayList<>();
264 265
         Map<Integer, String> map = new HashMap<>();
@@ -301,7 +302,7 @@ public class PostListController extends BaseController {
301 302
      *
302 303
      * @return
303 304
      */
304
-    @ApiOperation("2、检查内容:参数是检查项目下拉框")
305
+    @ApiOperation("2、岗位责任制清单检查内容:参数是检查项目下拉框")
305 306
     @GetMapping("/contentListByType")
306 307
     @ApiImplicitParams({
307 308
             @ApiImplicitParam(name = "deptId", value = "参数->部门ID", dataType = "Long", dataTypeClass = Long.class),

+ 38 - 38
ruoyi-postcheck/src/main/java/com/ruoyi/postCheck/controller/PostPlanCheckUserController.java

@@ -2,6 +2,8 @@ package com.ruoyi.postCheck.controller;
2 2
 
3 3
 import java.util.List;
4 4
 import javax.servlet.http.HttpServletResponse;
5
+
6
+import io.swagger.annotations.*;
5 7
 import org.springframework.security.access.prepost.PreAuthorize;
6 8
 import org.springframework.beans.factory.annotation.Autowired;
7 9
 import org.springframework.web.bind.annotation.GetMapping;
@@ -20,10 +22,6 @@ import com.ruoyi.postCheck.domain.PostPlanCheckUser;
20 22
 import com.ruoyi.postCheck.service.IPostPlanCheckUserService;
21 23
 import com.ruoyi.common.utils.poi.ExcelUtil;
22 24
 import com.ruoyi.common.core.page.TableDataInfo;
23
-import io.swagger.annotations.Api;
24
-import io.swagger.annotations.ApiOperation;
25
-import io.swagger.annotations.ApiImplicitParams;
26
-import io.swagger.annotations.ApiImplicitParam;
27 25
 
28 26
 /**
29 27
  * 岗检计划明细检查人表Controller
@@ -31,22 +29,23 @@ import io.swagger.annotations.ApiImplicitParam;
31 29
  * @author csg
32 30
  * @date 2023-12-19
33 31
  */
34
-@Api(tags = "2.3.3-岗检计划明细检查人表接口(废弃)")
32
+@Api(tags = "2.3.3-岗检计划检查人员接口")
35 33
 @RestController
36 34
 @RequestMapping("/postCheck/planInfoUser")
37
-public class PostPlanCheckUserController extends BaseController
38
-{
35
+public class PostPlanCheckUserController extends BaseController {
39 36
     @Autowired
40 37
     private IPostPlanCheckUserService postPlanInfoUserService;
41 38
 
42 39
     /**
43 40
      * 查询岗检计划明细检查人表列表
44 41
      */
45
-    @ApiOperation("查询岗检计划明细检查人表列表")
42
+    @ApiOperation("岗检计划检查人员列表")
43
+    @ApiImplicitParams({
44
+            @ApiImplicitParam(name = "postPlanId", value = "岗检计划ID", dataType = "Long", dataTypeClass = Long.class),
45
+    })
46 46
 //    @PreAuthorize("@ss.hasPermi('postCheck:planInfoUser:list')")
47 47
     @GetMapping("/list")
48
-    public TableDataInfo list(PostPlanCheckUser postPlanCheckUser)
49
-    {
48
+    public TableDataInfo list(PostPlanCheckUser postPlanCheckUser) {
50 49
         startPage();
51 50
         List<PostPlanCheckUser> list = postPlanInfoUserService.selectPostPlanInfoUserList(postPlanCheckUser);
52 51
         return getDataTable(list);
@@ -55,69 +54,70 @@ public class PostPlanCheckUserController extends BaseController
55 54
     /**
56 55
      * 导出岗检计划明细检查人表列表
57 56
      */
58
-    @ApiOperation("导出岗检计划明细检查人表列表")
57
+//    @ApiOperation("导出岗检计划明细检查人表列表")
59 58
 //    @PreAuthorize("@ss.hasPermi('postCheck:planInfoUser:export')")
60
-    @Log(title = "岗检计划明细检查人表", businessType = BusinessType.EXPORT)
61
-    @PostMapping("/export")
62
-    public void export(HttpServletResponse response, PostPlanCheckUser postPlanCheckUser)
63
-    {
64
-        List<PostPlanCheckUser> list = postPlanInfoUserService.selectPostPlanInfoUserList(postPlanCheckUser);
65
-        ExcelUtil<PostPlanCheckUser> util = new ExcelUtil<PostPlanCheckUser>(PostPlanCheckUser.class);
66
-        util.exportExcel(response, list, "岗检计划明细检查人表数据");
67
-    }
59
+//    @Log(title = "岗检计划明细检查人表", businessType = BusinessType.EXPORT)
60
+//    @PostMapping("/export")
61
+//    public void export(HttpServletResponse response, PostPlanCheckUser postPlanCheckUser) {
62
+//        List<PostPlanCheckUser> list = postPlanInfoUserService.selectPostPlanInfoUserList(postPlanCheckUser);
63
+//        ExcelUtil<PostPlanCheckUser> util = new ExcelUtil<PostPlanCheckUser>(PostPlanCheckUser.class);
64
+//        util.exportExcel(response, list, "岗检计划明细检查人表数据");
65
+//    }
68 66
 
69 67
     /**
70 68
      * 获取岗检计划明细检查人表详细信息
71 69
      */
72
-    @ApiOperation("获取岗检计划明细检查人表详细信息")
70
+    @ApiOperation("岗检计划检查人员详情")
73 71
 //    @PreAuthorize("@ss.hasPermi('postCheck:planInfoUser:query')")
74 72
     @GetMapping(value = "/{id}")
75
-    public AjaxResult getInfo(@PathVariable("id") Long id)
76
-    {
73
+    public AjaxResult getInfo(
74
+            @ApiParam(name = "id", value = "岗检计划检查人员表id", required = true)
75
+            @PathVariable("id") Long id) {
77 76
         return success(postPlanInfoUserService.selectPostPlanInfoUserById(id));
78 77
     }
79 78
 
80 79
     /**
81 80
      * 新增岗检计划明细检查人表
82 81
      */
83
-    @ApiOperation("新增岗检计划明细检查人表")
82
+    @ApiOperation("新增岗检计划检查人员")
83
+    /*
84 84
     @ApiImplicitParams({
85
-        @ApiImplicitParam(name = "id", value = "主键", dataType = "Long", dataTypeClass = Long.class),
86
-        @ApiImplicitParam(name = "postPlanInfoId", value = "计划明细ID", dataType = "Long", dataTypeClass = Long.class),
87
-        @ApiImplicitParam(name = "checkedUserId", value = "检查人员ID", dataType = "Long", dataTypeClass = Long.class),
88
-        @ApiImplicitParam(name = "delFlag", value = "del_flag", dataType = "Integer", dataTypeClass = Integer.class),
89
-        @ApiImplicitParam(name = "createUserId", value = "创建者用户ID", dataType = "Long", dataTypeClass = Long.class),
90
-        @ApiImplicitParam(name = "type", value = "检查人员ID:1-组长;2-组员;", dataType = "Integer", dataTypeClass = Integer.class),
85
+            @ApiImplicitParam(name = "id", value = "主键", dataType = "Long", dataTypeClass = Long.class),
86
+            @ApiImplicitParam(name = "postPlanInfoId", value = "计划明细ID", dataType = "Long", dataTypeClass = Long.class),
87
+            @ApiImplicitParam(name = "checkedUserId", value = "检查人员ID", dataType = "Long", dataTypeClass = Long.class),
88
+            @ApiImplicitParam(name = "delFlag", value = "del_flag", dataType = "Integer", dataTypeClass = Integer.class),
89
+            @ApiImplicitParam(name = "createUserId", value = "创建者用户ID", dataType = "Long", dataTypeClass = Long.class),
90
+            @ApiImplicitParam(name = "type", value = "检查人员ID:1-组长;2-组员;", dataType = "Integer", dataTypeClass = Integer.class),
91 91
     })
92
+    */
92 93
     @PreAuthorize("@ss.hasPermi('postCheck:planInfoUser:add')")
93 94
     @Log(title = "岗检计划明细检查人表", businessType = BusinessType.INSERT)
94 95
     @PostMapping
95
-    public AjaxResult add(@RequestBody PostPlanCheckUser postPlanCheckUser)
96
-    {
96
+    public AjaxResult add(@RequestBody PostPlanCheckUser postPlanCheckUser) {
97 97
         return toAjax(postPlanInfoUserService.insertPostPlanInfoUser(postPlanCheckUser));
98 98
     }
99 99
 
100 100
     /**
101 101
      * 修改岗检计划明细检查人表
102 102
      */
103
-    @ApiOperation("修改岗检计划明细检查人表")
103
+    @ApiOperation("修改岗检计划检查人员")
104 104
     @PreAuthorize("@ss.hasPermi('postCheck:planInfoUser:edit')")
105 105
     @Log(title = "岗检计划明细检查人表", businessType = BusinessType.UPDATE)
106 106
     @PutMapping
107
-    public AjaxResult edit(@RequestBody PostPlanCheckUser postPlanCheckUser)
108
-    {
107
+    public AjaxResult edit(@RequestBody PostPlanCheckUser postPlanCheckUser) {
109 108
         return toAjax(postPlanInfoUserService.updatePostPlanInfoUser(postPlanCheckUser));
110 109
     }
111 110
 
112 111
     /**
113 112
      * 删除岗检计划明细检查人表
114 113
      */
115
-    @ApiOperation("删除岗检计划明细检查人表")
114
+    @ApiOperation("删除岗检计划检查人员")
116 115
     @PreAuthorize("@ss.hasPermi('postCheck:planInfoUser:remove')")
117 116
     @Log(title = "岗检计划明细检查人表", businessType = BusinessType.DELETE)
118
-	@DeleteMapping("/{ids}")
119
-    public AjaxResult remove(@PathVariable Long[] ids)
120
-    {
117
+    @DeleteMapping("/{ids}")
118
+    public AjaxResult remove(
119
+            @ApiParam(name = "ids", value = "岗检计划检查人员ids", required = true)
120
+            @PathVariable Long[] ids) {
121 121
         return toAjax(postPlanInfoUserService.deletePostPlanInfoUserByIds(ids));
122 122
     }
123 123
 }

+ 78 - 72
ruoyi-postcheck/src/main/java/com/ruoyi/postCheck/controller/PostPlanController.java

@@ -65,26 +65,26 @@ public class PostPlanController extends BaseController {
65 65
      */
66 66
     @ApiOperation("查询岗检计划列表")
67 67
     @ApiImplicitParams({
68
-            @ApiImplicitParam(name = "id", value = "id", dataType = "Long", dataTypeClass = Long.class),
69
-            @ApiImplicitParam(name = "name", value = "name", dataType = "String", dataTypeClass = String.class),
70
-            @ApiImplicitParam(name = "content", value = "content", dataType = "String", dataTypeClass = String.class),
71
-            @ApiImplicitParam(name = "startTime", value = "start_time", dataType = "String", dataTypeClass = String.class),
72
-            @ApiImplicitParam(name = "endTime", value = "end_time", dataType = "String", dataTypeClass = String.class),
73
-            @ApiImplicitParam(name = "status", value = "status", dataType = "Long", dataTypeClass = Long.class),
74
-            @ApiImplicitParam(name = "delFlag", value = "del_flag", dataType = "String", dataTypeClass = String.class),
75
-            @ApiImplicitParam(name = "createUserId", value = "create_user_id", dataType = "Long", dataTypeClass = Long.class),
76
-            @ApiImplicitParam(name = "checkWorkgroupId", value = "check_workgroup_id", dataType = "Long", dataTypeClass = Long.class),
77
-            @ApiImplicitParam(name = "checkGroupId", value = "check_group_id", dataType = "Long", dataTypeClass = Long.class),
78
-            @ApiImplicitParam(name = "statusIcfa", value = "1-内控法务部审批-状态:1-待审核;3-通过;4-驳回;", dataType = "Long", dataTypeClass = Long.class),
79
-            @ApiImplicitParam(name = "dateIcfa", value = "1-内控法务部审批-通过日期", dataType = "String", dataTypeClass = String.class),
80
-            @ApiImplicitParam(name = "reasonIcfa", value = "1-内控法务部审批-未通过理由", dataType = "String", dataTypeClass = String.class),
81
-            @ApiImplicitParam(name = "statusHr", value = "2-人力资源审批-状态:1-待审核;3-通过;4-驳回;", dataType = "Long", dataTypeClass = Long.class),
82
-            @ApiImplicitParam(name = "dateHr", value = "2-人力资源审批-通过日期", dataType = "String", dataTypeClass = String.class),
83
-            @ApiImplicitParam(name = "reasonHr", value = "2-人力资源审批-未通过理由", dataType = "String", dataTypeClass = String.class),
84
-            @ApiImplicitParam(name = "statusTime", value = "审核时间", dataType = "String", dataTypeClass = String.class),
85
-            @ApiImplicitParam(name = "statusUserId", value = "审核时人ID", dataType = "Long", dataTypeClass = Long.class),
86
-            @ApiImplicitParam(name = "statusIcfaUserId", value = "1-内控法务部审批人ID", dataType = "Long", dataTypeClass = Long.class),
87
-            @ApiImplicitParam(name = "statusHrUserId", value = "2-人力资源审批人ID", dataType = "Long", dataTypeClass = Long.class),
68
+            @ApiImplicitParam(name = "id", value = "计划id", dataType = "Long", dataTypeClass = Long.class),
69
+            @ApiImplicitParam(name = "name", value = "计划名称", dataType = "String", dataTypeClass = String.class),
70
+            @ApiImplicitParam(name = "content", value = "计划内容", dataType = "String", dataTypeClass = String.class),
71
+            @ApiImplicitParam(name = "startTime", value = "开始时间", dataType = "String", dataTypeClass = String.class),
72
+            @ApiImplicitParam(name = "endTime", value = "结束时间", dataType = "String", dataTypeClass = String.class),
73
+            @ApiImplicitParam(name = "status", value = "状态", dataType = "Long", dataTypeClass = Long.class),
74
+//            @ApiImplicitParam(name = "delFlag", value = "del_flag", dataType = "String", dataTypeClass = String.class),
75
+//            @ApiImplicitParam(name = "createUserId", value = "create_user_id", dataType = "Long", dataTypeClass = Long.class),
76
+            @ApiImplicitParam(name = "checkWorkgroupId", value = "工作组", dataType = "Long", dataTypeClass = Long.class),
77
+            @ApiImplicitParam(name = "checkGroupId", value = "检查小组", dataType = "Long", dataTypeClass = Long.class),
78
+//            @ApiImplicitParam(name = "statusIcfa", value = "1-内控法务部审批-状态:1-待审核;3-通过;4-驳回;", dataType = "Long", dataTypeClass = Long.class),
79
+//            @ApiImplicitParam(name = "dateIcfa", value = "1-内控法务部审批-通过日期", dataType = "String", dataTypeClass = String.class),
80
+//            @ApiImplicitParam(name = "reasonIcfa", value = "1-内控法务部审批-未通过理由", dataType = "String", dataTypeClass = String.class),
81
+//            @ApiImplicitParam(name = "statusHr", value = "2-人力资源审批-状态:1-待审核;3-通过;4-驳回;", dataType = "Long", dataTypeClass = Long.class),
82
+//            @ApiImplicitParam(name = "dateHr", value = "2-人力资源审批-通过日期", dataType = "String", dataTypeClass = String.class),
83
+//            @ApiImplicitParam(name = "reasonHr", value = "2-人力资源审批-未通过理由", dataType = "String", dataTypeClass = String.class),
84
+//            @ApiImplicitParam(name = "statusTime", value = "审核时间", dataType = "String", dataTypeClass = String.class),
85
+//            @ApiImplicitParam(name = "statusUserId", value = "审核时人ID", dataType = "Long", dataTypeClass = Long.class),
86
+//            @ApiImplicitParam(name = "statusIcfaUserId", value = "1-内控法务部审批人ID", dataType = "Long", dataTypeClass = Long.class),
87
+//            @ApiImplicitParam(name = "statusHrUserId", value = "2-人力资源审批人ID", dataType = "Long", dataTypeClass = Long.class),
88 88
             @ApiImplicitParam(name = "pageNum", value = "页码从1开始", dataType = "Integer", dataTypeClass = Integer.class),
89 89
             @ApiImplicitParam(name = "pageSize", value = "分页大小", dataType = "Integer", dataTypeClass = Integer.class),
90 90
             @ApiImplicitParam(name = "orderBy", value = "排序字段", dataType = "String", dataTypeClass = String.class),
@@ -94,8 +94,6 @@ public class PostPlanController extends BaseController {
94 94
             @ApiImplicitParam(name = "checkedUserNames", value = "检查人员中文名称逗号拼接", dataType = "String", dataTypeClass = String.class),
95 95
             @ApiImplicitParam(name = "checkedDeptNames", value = "被检查部门名称", dataType = "String", dataTypeClass = String.class),
96 96
             @ApiImplicitParam(name = "checkedPostNames", value = "被检查岗位名称(多个拼接)", dataType = "String", dataTypeClass = String.class),
97
-
98
-
99 97
     })
100 98
     @PreAuthorize("@ss.hasPermi('postCheck:postPlan:list')")
101 99
     @GetMapping("/list")
@@ -113,28 +111,28 @@ public class PostPlanController extends BaseController {
113 111
     }
114 112
 
115 113
 
116
-    @ApiOperation("查询岗检计划列表,行单位是被检查部门")
114
+    @ApiOperation("查询岗检计划列表(行单位是被检查部门)")
117 115
     @ApiImplicitParams({
118
-            @ApiImplicitParam(name = "id", value = "id", dataType = "Long", dataTypeClass = Long.class),
119
-            @ApiImplicitParam(name = "name", value = "name", dataType = "String", dataTypeClass = String.class),
120
-            @ApiImplicitParam(name = "content", value = "content", dataType = "String", dataTypeClass = String.class),
121
-            @ApiImplicitParam(name = "startTime", value = "start_time", dataType = "String", dataTypeClass = String.class),
122
-            @ApiImplicitParam(name = "endTime", value = "end_time", dataType = "String", dataTypeClass = String.class),
123
-            @ApiImplicitParam(name = "status", value = "status", dataType = "Long", dataTypeClass = Long.class),
124
-            @ApiImplicitParam(name = "delFlag", value = "del_flag", dataType = "String", dataTypeClass = String.class),
125
-            @ApiImplicitParam(name = "createUserId", value = "create_user_id", dataType = "Long", dataTypeClass = Long.class),
126
-            @ApiImplicitParam(name = "checkWorkgroupId", value = "check_workgroup_id", dataType = "Long", dataTypeClass = Long.class),
127
-            @ApiImplicitParam(name = "checkGroupId", value = "check_group_id", dataType = "Long", dataTypeClass = Long.class),
128
-            @ApiImplicitParam(name = "statusIcfa", value = "1-内控法务部审批-状态:1-待审核;3-通过;4-驳回;", dataType = "Long", dataTypeClass = Long.class),
129
-            @ApiImplicitParam(name = "dateIcfa", value = "1-内控法务部审批-通过日期", dataType = "String", dataTypeClass = String.class),
130
-            @ApiImplicitParam(name = "reasonIcfa", value = "1-内控法务部审批-未通过理由", dataType = "String", dataTypeClass = String.class),
131
-            @ApiImplicitParam(name = "statusHr", value = "2-人力资源审批-状态:1-待审核;3-通过;4-驳回;", dataType = "Long", dataTypeClass = Long.class),
132
-            @ApiImplicitParam(name = "dateHr", value = "2-人力资源审批-通过日期", dataType = "String", dataTypeClass = String.class),
133
-            @ApiImplicitParam(name = "reasonHr", value = "2-人力资源审批-未通过理由", dataType = "String", dataTypeClass = String.class),
134
-            @ApiImplicitParam(name = "statusTime", value = "审核时间", dataType = "String", dataTypeClass = String.class),
135
-            @ApiImplicitParam(name = "statusUserId", value = "审核时人ID", dataType = "Long", dataTypeClass = Long.class),
136
-            @ApiImplicitParam(name = "statusIcfaUserId", value = "1-内控法务部审批人ID", dataType = "Long", dataTypeClass = Long.class),
137
-            @ApiImplicitParam(name = "statusHrUserId", value = "2-人力资源审批人ID", dataType = "Long", dataTypeClass = Long.class),
116
+            @ApiImplicitParam(name = "id", value = "计划id", dataType = "Long", dataTypeClass = Long.class),
117
+            @ApiImplicitParam(name = "name", value = "计划名称", dataType = "String", dataTypeClass = String.class),
118
+            @ApiImplicitParam(name = "content", value = "计划内容", dataType = "String", dataTypeClass = String.class),
119
+            @ApiImplicitParam(name = "startTime", value = "开始时间", dataType = "String", dataTypeClass = String.class),
120
+            @ApiImplicitParam(name = "endTime", value = "结束时间", dataType = "String", dataTypeClass = String.class),
121
+            @ApiImplicitParam(name = "status", value = "状态", dataType = "Long", dataTypeClass = Long.class),
122
+//            @ApiImplicitParam(name = "delFlag", value = "del_flag", dataType = "String", dataTypeClass = String.class),
123
+//            @ApiImplicitParam(name = "createUserId", value = "create_user_id", dataType = "Long", dataTypeClass = Long.class),
124
+            @ApiImplicitParam(name = "checkWorkgroupId", value = "工作组", dataType = "Long", dataTypeClass = Long.class),
125
+            @ApiImplicitParam(name = "checkGroupId", value = "检查小组", dataType = "Long", dataTypeClass = Long.class),
126
+//            @ApiImplicitParam(name = "statusIcfa", value = "1-内控法务部审批-状态:1-待审核;3-通过;4-驳回;", dataType = "Long", dataTypeClass = Long.class),
127
+//            @ApiImplicitParam(name = "dateIcfa", value = "1-内控法务部审批-通过日期", dataType = "String", dataTypeClass = String.class),
128
+//            @ApiImplicitParam(name = "reasonIcfa", value = "1-内控法务部审批-未通过理由", dataType = "String", dataTypeClass = String.class),
129
+//            @ApiImplicitParam(name = "statusHr", value = "2-人力资源审批-状态:1-待审核;3-通过;4-驳回;", dataType = "Long", dataTypeClass = Long.class),
130
+//            @ApiImplicitParam(name = "dateHr", value = "2-人力资源审批-通过日期", dataType = "String", dataTypeClass = String.class),
131
+//            @ApiImplicitParam(name = "reasonHr", value = "2-人力资源审批-未通过理由", dataType = "String", dataTypeClass = String.class),
132
+//            @ApiImplicitParam(name = "statusTime", value = "审核时间", dataType = "String", dataTypeClass = String.class),
133
+//            @ApiImplicitParam(name = "statusUserId", value = "审核时人ID", dataType = "Long", dataTypeClass = Long.class),
134
+//            @ApiImplicitParam(name = "statusIcfaUserId", value = "1-内控法务部审批人ID", dataType = "Long", dataTypeClass = Long.class),
135
+//            @ApiImplicitParam(name = "statusHrUserId", value = "2-人力资源审批人ID", dataType = "Long", dataTypeClass = Long.class),
138 136
             @ApiImplicitParam(name = "pageNum", value = "页码从1开始", dataType = "Integer", dataTypeClass = Integer.class),
139 137
             @ApiImplicitParam(name = "pageSize", value = "分页大小", dataType = "Integer", dataTypeClass = Integer.class),
140 138
             @ApiImplicitParam(name = "orderBy", value = "排序字段", dataType = "String", dataTypeClass = String.class),
@@ -144,8 +142,6 @@ public class PostPlanController extends BaseController {
144 142
             @ApiImplicitParam(name = "checkedUserNames", value = "检查人员中文名称逗号拼接", dataType = "String", dataTypeClass = String.class),
145 143
             @ApiImplicitParam(name = "checkedDeptNames", value = "被检查部门名称", dataType = "String", dataTypeClass = String.class),
146 144
             @ApiImplicitParam(name = "checkedPostNames", value = "被检查岗位名称(多个拼接)", dataType = "String", dataTypeClass = String.class),
147
-
148
-
149 145
     })
150 146
     @PreAuthorize("@ss.hasPermi('postCheck:postPlan:list')")
151 147
     @GetMapping("/listV2")
@@ -180,9 +176,11 @@ public class PostPlanController extends BaseController {
180 176
     /**
181 177
      * 获取岗检表管理详细信息
182 178
      */
183
-    @ApiOperation("岗检表预览")
179
+    @ApiOperation("岗检表预览详情")
184 180
     @GetMapping(value = "/preview/{id}")
185
-    public AjaxResult preview(@PathVariable("id") Long id) {
181
+    public AjaxResult preview(
182
+            @ApiParam(name = "id", value = "id", required = true)
183
+            @PathVariable("id") Long id) {
186 184
 
187 185
         List<PostPlanExcelBean> list = new ArrayList<>();
188 186
 
@@ -239,10 +237,12 @@ public class PostPlanController extends BaseController {
239 237
     /**
240 238
      * 获取岗检计划详细信息
241 239
      */
242
-    @ApiOperation("获取岗检计划详细信息")
240
+    @ApiOperation("查询岗检计划详细信息")
243 241
     @PreAuthorize("@ss.hasPermi('postCheck:postPlan:query')")
244 242
     @GetMapping(value = "/{id}")
245
-    public AjaxResult getInfo(@PathVariable("id") Long id) {
243
+    public AjaxResult getInfo(
244
+            @ApiParam(name = "id", value = "岗检计划id", required = true)
245
+            @PathVariable("id") Long id) {
246 246
         return success(postPlanService.selectPostPlanById(id));
247 247
     }
248 248
 
@@ -253,31 +253,33 @@ public class PostPlanController extends BaseController {
253 253
      * type:1-组长、2-组员
254 254
      */
255 255
     @ApiOperation("新增岗检计划")
256
+   /*
256 257
     @ApiImplicitParams({
257
-            @ApiImplicitParam(name = "id", value = "id", dataType = "Long", dataTypeClass = Long.class),
258
-            @ApiImplicitParam(name = "name", value = "name", dataType = "String", dataTypeClass = String.class),
259
-            @ApiImplicitParam(name = "content", value = "content", dataType = "String", dataTypeClass = String.class),
260
-            @ApiImplicitParam(name = "startTime", value = "start_time", dataType = "String", dataTypeClass = String.class),
261
-            @ApiImplicitParam(name = "endTime", value = "end_time", dataType = "String", dataTypeClass = String.class),
262
-            @ApiImplicitParam(name = "status", value = "status", dataType = "Long", dataTypeClass = Long.class),
263
-            @ApiImplicitParam(name = "delFlag", value = "del_flag", dataType = "String", dataTypeClass = String.class),
264
-            @ApiImplicitParam(name = "createUserId", value = "create_user_id", dataType = "Long", dataTypeClass = Long.class),
265
-            @ApiImplicitParam(name = "checkWorkgroupId", value = "check_workgroup_id", dataType = "Long", dataTypeClass = Long.class),
266
-            @ApiImplicitParam(name = "checkGroupId", value = "check_group_id", dataType = "Long", dataTypeClass = Long.class),
267
-            @ApiImplicitParam(name = "statusIcfa", value = "1-内控法务部审批-状态:1-待审核;3-通过;4-驳回;", dataType = "Long", dataTypeClass = Long.class),
268
-            @ApiImplicitParam(name = "dateIcfa", value = "1-内控法务部审批-通过日期", dataType = "String", dataTypeClass = String.class),
269
-            @ApiImplicitParam(name = "reasonIcfa", value = "1-内控法务部审批-未通过理由", dataType = "String", dataTypeClass = String.class),
270
-            @ApiImplicitParam(name = "statusHr", value = "2-人力资源审批-状态:1-待审核;3-通过;4-驳回;", dataType = "Long", dataTypeClass = Long.class),
271
-            @ApiImplicitParam(name = "dateHr", value = "2-人力资源审批-通过日期", dataType = "String", dataTypeClass = String.class),
272
-            @ApiImplicitParam(name = "reasonHr", value = "2-人力资源审批-未通过理由", dataType = "String", dataTypeClass = String.class),
273
-            @ApiImplicitParam(name = "statusTime", value = "审核时间", dataType = "String", dataTypeClass = String.class),
274
-            @ApiImplicitParam(name = "statusUserId", value = "审核时人ID", dataType = "Long", dataTypeClass = Long.class),
275
-            @ApiImplicitParam(name = "statusIcfaUserId", value = "1-内控法务部审批人ID", dataType = "Long", dataTypeClass = Long.class),
276
-            @ApiImplicitParam(name = "statusHrUserId", value = "2-人力资源审批人ID", dataType = "Long", dataTypeClass = Long.class),
258
+//            @ApiImplicitParam(name = "id", value = "id", dataType = "Long", dataTypeClass = Long.class),
259
+            @ApiImplicitParam(name = "name", value = "岗检计划名称", dataType = "String", dataTypeClass = String.class),
260
+            @ApiImplicitParam(name = "content", value = "岗检计划内容", dataType = "String", dataTypeClass = String.class),
261
+            @ApiImplicitParam(name = "startTime", value = "岗检计划开始时间", dataType = "String", dataTypeClass = String.class),
262
+            @ApiImplicitParam(name = "endTime", value = "岗检计划结束时间", dataType = "String", dataTypeClass = String.class),
263
+            @ApiImplicitParam(name = "status", value = "状态", dataType = "Long", dataTypeClass = Long.class),
264
+//            @ApiImplicitParam(name = "delFlag", value = "del_flag", dataType = "String", dataTypeClass = String.class),
265
+//            @ApiImplicitParam(name = "createUserId", value = "create_user_id", dataType = "Long", dataTypeClass = Long.class),
266
+            @ApiImplicitParam(name = "checkWorkgroupId", value = "工作组", dataType = "Long", dataTypeClass = Long.class),
267
+            @ApiImplicitParam(name = "checkGroupId", value = "检查小组", dataType = "Long", dataTypeClass = Long.class),
268
+//            @ApiImplicitParam(name = "statusIcfa", value = "1-内控法务部审批-状态:1-待审核;3-通过;4-驳回;", dataType = "Long", dataTypeClass = Long.class),
269
+//            @ApiImplicitParam(name = "dateIcfa", value = "1-内控法务部审批-通过日期", dataType = "String", dataTypeClass = String.class),
270
+//            @ApiImplicitParam(name = "reasonIcfa", value = "1-内控法务部审批-未通过理由", dataType = "String", dataTypeClass = String.class),
271
+//            @ApiImplicitParam(name = "statusHr", value = "2-人力资源审批-状态:1-待审核;3-通过;4-驳回;", dataType = "Long", dataTypeClass = Long.class),
272
+//            @ApiImplicitParam(name = "dateHr", value = "2-人力资源审批-通过日期", dataType = "String", dataTypeClass = String.class),
273
+//            @ApiImplicitParam(name = "reasonHr", value = "2-人力资源审批-未通过理由", dataType = "String", dataTypeClass = String.class),
274
+//            @ApiImplicitParam(name = "statusTime", value = "审核时间", dataType = "String", dataTypeClass = String.class),
275
+//            @ApiImplicitParam(name = "statusUserId", value = "审核时人ID", dataType = "Long", dataTypeClass = Long.class),
276
+//            @ApiImplicitParam(name = "statusIcfaUserId", value = "1-内控法务部审批人ID", dataType = "Long", dataTypeClass = Long.class),
277
+//            @ApiImplicitParam(name = "statusHrUserId", value = "2-人力资源审批人ID", dataType = "Long", dataTypeClass = Long.class),
277 278
 
278 279
             @ApiImplicitParam(name = "checkUserChildren", value = "检查人员数组", dataType = "List", dataTypeClass = PostPlanCheckUser.class),
279 280
             @ApiImplicitParam(name = "children", value = "检查小组数组", dataType = "List", dataTypeClass = PostPlanInfo.class),
280 281
     })
282
+    */
281 283
     @PreAuthorize("@ss.hasPermi('postCheck:postPlan:add')")
282 284
     @Log(title = "岗检计划", businessType = BusinessType.INSERT)
283 285
     @PostMapping
@@ -289,6 +291,7 @@ public class PostPlanController extends BaseController {
289 291
      * 修改岗检计划
290 292
      */
291 293
     @ApiOperation("修改岗检计划")
294
+    /*
292 295
     @ApiImplicitParams({
293 296
             @ApiImplicitParam(name = "id", value = "id", dataType = "Long", dataTypeClass = Long.class),
294 297
             @ApiImplicitParam(name = "name", value = "name", dataType = "String", dataTypeClass = String.class),
@@ -311,6 +314,7 @@ public class PostPlanController extends BaseController {
311 314
             @ApiImplicitParam(name = "statusIcfaUserId", value = "1-内控法务部审批人ID", dataType = "Long", dataTypeClass = Long.class),
312 315
             @ApiImplicitParam(name = "statusHrUserId", value = "2-人力资源审批人ID", dataType = "Long", dataTypeClass = Long.class),
313 316
     })
317
+    */
314 318
     @PreAuthorize("@ss.hasPermi('postCheck:postPlan:edit')")
315 319
     @Log(title = "岗检计划", businessType = BusinessType.UPDATE)
316 320
     @PutMapping
@@ -322,11 +326,13 @@ public class PostPlanController extends BaseController {
322 326
      * 删除岗检计划
323 327
      */
324 328
     @ApiOperation("删除岗检计划")
325
-    @ApiImplicitParam(name = "ids", value = "Long类型的主键数组", dataType = "Long[]", dataTypeClass = Long[].class)
329
+//    @ApiImplicitParam(name = "ids", value = "Long类型的主键数组", dataType = "Long[]", dataTypeClass = Long[].class)
326 330
     @PreAuthorize("@ss.hasPermi('postCheck:postPlan:remove')")
327 331
     @Log(title = "岗检计划", businessType = BusinessType.DELETE)
328 332
     @DeleteMapping("/{ids}")
329
-    public AjaxResult remove(@PathVariable Long[] ids) {
333
+    public AjaxResult remove(
334
+            @ApiParam(name = "ids", value = "岗检计划ids", required = true)
335
+            @PathVariable Long[] ids) {
330 336
         return toAjax(postPlanService.deletePostPlanByIds(ids));
331 337
     }
332 338
 
@@ -395,7 +401,7 @@ public class PostPlanController extends BaseController {
395 401
 
396 402
     @ApiOperation("岗检计划发布")
397 403
     @ApiImplicitParams({
398
-            @ApiImplicitParam(name = "id", value = "主键ID", dataType = "Long", dataTypeClass = Long.class),
404
+            @ApiImplicitParam(name = "id", value = "岗检计划ID", dataType = "Long", dataTypeClass = Long.class),
399 405
     })
400 406
     @Log(title = "岗检计划发布", businessType = BusinessType.UPDATE)
401 407
     @PutMapping("/publish")

+ 29 - 34
ruoyi-postcheck/src/main/java/com/ruoyi/postCheck/controller/PostPlanInfoController.java

@@ -3,6 +3,8 @@ package com.ruoyi.postCheck.controller;
3 3
 import java.util.Date;
4 4
 import java.util.List;
5 5
 import javax.servlet.http.HttpServletResponse;
6
+
7
+import io.swagger.annotations.*;
6 8
 import org.springframework.security.access.prepost.PreAuthorize;
7 9
 import org.springframework.beans.factory.annotation.Autowired;
8 10
 import org.springframework.web.bind.annotation.GetMapping;
@@ -21,22 +23,17 @@ import com.ruoyi.postCheck.domain.PostPlanInfo;
21 23
 import com.ruoyi.postCheck.service.IPostPlanInfoService;
22 24
 import com.ruoyi.common.utils.poi.ExcelUtil;
23 25
 import com.ruoyi.common.core.page.TableDataInfo;
24
-import io.swagger.annotations.Api;
25
-import io.swagger.annotations.ApiOperation;
26
-import io.swagger.annotations.ApiImplicitParams;
27
-import io.swagger.annotations.ApiImplicitParam;
28 26
 
29 27
 /**
30
- * 岗检计划明细表Controller
28
+ * 岗检计划明细
31 29
  *
32 30
  * @author csg
33 31
  * @date 2023-12-19
34 32
  */
35
-@Api(tags = "2.3.2-岗检计划明细表接口(暂时不调,走2.3.1接口后端搞定)")
33
+@Api(tags = "2.3.2-岗检计划明细表接口")
36 34
 @RestController
37 35
 @RequestMapping("/postCheck/postPlanInfo")
38
-public class PostPlanInfoController extends BaseController
39
-{
36
+public class PostPlanInfoController extends BaseController {
40 37
     @Autowired
41 38
     private IPostPlanInfoService postPlanInfoService;
42 39
 
@@ -44,10 +41,12 @@ public class PostPlanInfoController extends BaseController
44 41
      * 查询岗检计划明细表列表
45 42
      */
46 43
     @ApiOperation("查询岗检计划明细表列表")
44
+    @ApiImplicitParams({
45
+            @ApiImplicitParam(name = "postPlanId", value = "岗检计划ID", dataType = "Long", dataTypeClass = Long.class),
46
+    })
47 47
 //    @PreAuthorize("@ss.hasPermi('postCheck:postPlanInfo:list')")
48 48
     @GetMapping("/list")
49
-    public TableDataInfo list(PostPlanInfo postPlanInfo)
50
-    {
49
+    public TableDataInfo list(PostPlanInfo postPlanInfo) {
51 50
         startPage();
52 51
         List<PostPlanInfo> list = postPlanInfoService.selectPostPlanInfoList(postPlanInfo);
53 52
         return getDataTable(list);
@@ -56,32 +55,32 @@ public class PostPlanInfoController extends BaseController
56 55
     /**
57 56
      * 导出岗检计划明细表列表
58 57
      */
59
-    @ApiOperation("导出岗检计划明细表列表")
58
+//    @ApiOperation("导出岗检计划明细表列表")
60 59
 //    @PreAuthorize("@ss.hasPermi('postCheck:postPlanInfo:export')")
61
-    @Log(title = "岗检计划明细表", businessType = BusinessType.EXPORT)
60
+    /*@Log(title = "岗检计划明细表", businessType = BusinessType.EXPORT)
62 61
     @PostMapping("/export")
63
-    public void export(HttpServletResponse response, PostPlanInfo postPlanInfo)
64
-    {
62
+    public void export(HttpServletResponse response, PostPlanInfo postPlanInfo) {
65 63
         List<PostPlanInfo> list = postPlanInfoService.selectPostPlanInfoList(postPlanInfo);
66 64
         ExcelUtil<PostPlanInfo> util = new ExcelUtil<PostPlanInfo>(PostPlanInfo.class);
67 65
         util.exportExcel(response, list, "岗检计划明细表数据");
68
-    }
66
+    }*/
69 67
 
70 68
     /**
71 69
      * 获取岗检计划明细表详细信息
72 70
      */
73
-    @ApiOperation("获取岗检计划明细表详细信息")
71
+//    @ApiOperation("获取岗检计划明细表详细信息")
74 72
 //    @PreAuthorize("@ss.hasPermi('postCheck:postPlanInfo:query')")
75 73
     @GetMapping(value = "/{id}")
76
-    public AjaxResult getInfo(@PathVariable("id") Long id)
77
-    {
74
+    public AjaxResult getInfo(
75
+            @ApiParam(name = "id", value = "岗检计划id", required = true)
76
+            @PathVariable("id") Long id) {
78 77
         return success(postPlanInfoService.selectPostPlanInfoById(id));
79 78
     }
80 79
 
81 80
     /**
82 81
      * 新增岗检计划明细表
83 82
      */
84
-    @ApiOperation("新增岗检计划明细表")
83
+    /*
85 84
     @ApiImplicitParams({
86 85
         @ApiImplicitParam(name = "id", value = "主键", dataType = "Long", dataTypeClass = Long.class),
87 86
         @ApiImplicitParam(name = "postPlanId", value = "计划ID", dataType = "Long", dataTypeClass = Long.class),
@@ -90,36 +89,32 @@ public class PostPlanInfoController extends BaseController
90 89
         @ApiImplicitParam(name = "checkedPostId", value = "被检查岗位ID", dataType = "Long", dataTypeClass = Long.class),
91 90
         @ApiImplicitParam(name = "delFlag", value = "del_flag", dataType = "Integer", dataTypeClass = Integer.class),
92 91
         @ApiImplicitParam(name = "createUserId", value = "创建者用户ID", dataType = "Long", dataTypeClass = Long.class),
93
-    })
92
+    })*/
93
+    @ApiOperation("新增岗检计划明细表")
94 94
     @PreAuthorize("@ss.hasPermi('postCheck:postPlanInfo:add')")
95
-    @Log(title = "岗检计划明细表", businessType = BusinessType.INSERT)
95
+    @Log(title = "新增岗检计划明细表", businessType = BusinessType.INSERT)
96 96
     @PostMapping
97
-    public AjaxResult add(@RequestBody PostPlanInfo postPlanInfo)
98
-    {
97
+    public AjaxResult add(@RequestBody PostPlanInfo postPlanInfo) {
99 98
         return toAjax(postPlanInfoService.insertPostPlanInfo(postPlanInfo));
100 99
     }
101 100
 
102
-    /**
103
-     * 修改岗检计划明细表
104
-     */
101
+
105 102
     @ApiOperation("修改岗检计划明细表")
106 103
     @PreAuthorize("@ss.hasPermi('postCheck:postPlanInfo:edit')")
107 104
     @Log(title = "岗检计划明细表", businessType = BusinessType.UPDATE)
108 105
     @PutMapping
109
-    public AjaxResult edit(@RequestBody PostPlanInfo postPlanInfo)
110
-    {
106
+    public AjaxResult edit(@RequestBody PostPlanInfo postPlanInfo) {
111 107
         return toAjax(postPlanInfoService.updatePostPlanInfo(postPlanInfo));
112 108
     }
113 109
 
114
-    /**
115
-     * 删除岗检计划明细表
116
-     */
110
+
117 111
     @ApiOperation("删除岗检计划明细表")
118 112
     @PreAuthorize("@ss.hasPermi('postCheck:postPlanInfo:remove')")
119 113
     @Log(title = "岗检计划明细表", businessType = BusinessType.DELETE)
120
-	@DeleteMapping("/{ids}")
121
-    public AjaxResult remove(@PathVariable Long[] ids)
122
-    {
114
+    @DeleteMapping("/{ids}")
115
+    public AjaxResult remove(
116
+            @ApiParam(name = "ids", value = "岗检计划明细ids", required = true)
117
+            @PathVariable Long[] ids) {
123 118
         return toAjax(postPlanInfoService.deletePostPlanInfoByIds(ids));
124 119
     }
125 120
 }

+ 9 - 10
ruoyi-postcheck/src/main/java/com/ruoyi/postCheck/controller/PostPlanJoinCheckedController.java

@@ -3,7 +3,9 @@ package com.ruoyi.postCheck.controller;
3 3
 import java.util.Date;
4 4
 import java.util.List;
5 5
 
6
+import com.ruoyi.common.annotation.Excel;
6 7
 import com.ruoyi.common.constant.PostPlanEnum;
8
+import io.swagger.annotations.*;
7 9
 import org.springframework.security.access.prepost.PreAuthorize;
8 10
 import org.springframework.beans.factory.annotation.Autowired;
9 11
 import org.springframework.web.bind.annotation.GetMapping;
@@ -17,10 +19,6 @@ import com.ruoyi.common.enums.BusinessType;
17 19
 import com.ruoyi.postCheck.domain.join.PostPlanJoinChecked;
18 20
 import com.ruoyi.postCheck.service.IPostPlanJoinCheckedService;
19 21
 import com.ruoyi.common.core.page.TableDataInfo;
20
-import io.swagger.annotations.Api;
21
-import io.swagger.annotations.ApiOperation;
22
-import io.swagger.annotations.ApiImplicitParams;
23
-import io.swagger.annotations.ApiImplicitParam;
24 22
 
25 23
 /**
26 24
  * 岗检记录上传列表Controller
@@ -28,7 +26,7 @@ import io.swagger.annotations.ApiImplicitParam;
28 26
  * @author csg
29 27
  * @date 2023-12-22
30 28
  */
31
-@Api(tags = "3.1.1-岗检记录上传列表接口")
29
+@Api(tags = "3.1.1-岗检记录上传")
32 30
 @RestController
33 31
 @RequestMapping("/postCheck/postPlanJoinChecked")
34 32
 public class PostPlanJoinCheckedController extends BaseController {
@@ -38,8 +36,11 @@ public class PostPlanJoinCheckedController extends BaseController {
38 36
 
39 37
     @ApiOperation("查询岗检记录上传列表列表")
40 38
     @ApiImplicitParams({
41
-//                    @ApiImplicitParam(name = "id", value = "id", dataType = "Long", dataTypeClass = Long.class),
42
-//                    @ApiImplicitParam(name = "name", value = "name", dataType = "Long", dataTypeClass = Long.class),
39
+            @ApiImplicitParam(name = "checkGroupId", value = "检查工作组ID", dataType = "Long", dataTypeClass = Long.class),
40
+            @ApiImplicitParam(name = "checkedDeptId", value = "被检查部门ID", dataType = "Long", dataTypeClass = Long.class),
41
+            @ApiImplicitParam(name = "checkedDeptName", value = "被检查部门名称", dataType = "String", dataTypeClass = String.class),
42
+            @ApiImplicitParam(name = "status", value = "岗检状态:1-未检;2-已检;", dataType = "Integer", dataTypeClass = Integer.class),
43
+
43 44
             @ApiImplicitParam(name = "pageNum", value = "页码从1开始", dataType = "Integer", dataTypeClass = Integer.class),
44 45
             @ApiImplicitParam(name = "pageSize", value = "分页大小", dataType = "Integer", dataTypeClass = Integer.class),
45 46
             @ApiImplicitParam(name = "orderBy", value = "排序字段", dataType = "String", dataTypeClass = String.class)
@@ -72,7 +73,7 @@ public class PostPlanJoinCheckedController extends BaseController {
72 73
     })
73 74
     @Log(title = "岗检完成确认", businessType = BusinessType.UPDATE)
74 75
     @PutMapping("/checked")
75
-    public AjaxResult checked(Long planInfoId,  String checkedUserName,Date checkedTime, String checkedImg) {
76
+    public AjaxResult checked(Long planInfoId, String checkedUserName, Date checkedTime, String checkedImg) {
76 77
         return toAjax(postPlanJoinCheckedService.checked(planInfoId, checkedUserName, checkedTime, checkedImg));
77 78
     }
78 79
 
@@ -80,9 +81,7 @@ public class PostPlanJoinCheckedController extends BaseController {
80 81
     @ApiImplicitParams({
81 82
             @ApiImplicitParam(name = "planInfoId", value = "岗检计划明细ID", dataType = "Long", dataTypeClass = Long.class),
82 83
             @ApiImplicitParam(name = "checkedImg", value = "检查表照片(图片上传后的相对路径)", dataType = "String", dataTypeClass = String.class),
83
-
84 84
     })
85
-
86 85
     @Log(title = "岗检完成确认后重新上传检查表照片", businessType = BusinessType.UPDATE)
87 86
     @PutMapping("imgReUpload")
88 87
     public AjaxResult imgReUpload(Long planInfoId, String checkedImg) {

+ 3 - 3
ruoyi-postcheck/src/main/java/com/ruoyi/postCheck/controller/PostPlanJoinProblemController.java

@@ -15,7 +15,7 @@ import org.springframework.web.bind.annotation.RestController;
15 15
 import java.util.List;
16 16
 
17 17
 
18
-@Api(tags = "3.2.1-岗检问题录入列表接口")
18
+@Api(tags = "3.2.1-岗检问题录入")
19 19
 @RestController
20 20
 @RequestMapping("/postCheck/postPlanJoinProblem")
21 21
 public class PostPlanJoinProblemController extends BaseController {
@@ -25,7 +25,7 @@ public class PostPlanJoinProblemController extends BaseController {
25 25
     /**
26 26
      * 查询岗检问题录入列表列表
27 27
      */
28
-    @ApiOperation("查询岗检问题录入列表列表")
28
+    @ApiOperation("查询岗检问题录入列表")
29 29
     @ApiImplicitParams({
30 30
 //                    @ApiImplicitParam(name = "id", value = "id", dataType = "Long", dataTypeClass = Long.class),
31 31
 //                    @ApiImplicitParam(name = "name", value = "name", dataType = "Long", dataTypeClass = Long.class),
@@ -42,7 +42,7 @@ public class PostPlanJoinProblemController extends BaseController {
42 42
             @ApiImplicitParam(name = "checkedDeptId", value = "被检查部门ID", dataType = "Long", dataTypeClass = Long.class),
43 43
             @ApiImplicitParam(name = "checkedDeptName", value = "被检查部门名称", dataType = "String", dataTypeClass = String.class),
44 44
             @ApiImplicitParam(name = "checkedPostId", value = "被检查岗位ID", dataType = "Long", dataTypeClass = Long.class),
45
-            @ApiImplicitParam(name = "checkedPostNames", value = "被检查岗位名称(多个逗号拼接)", dataType = "String", dataTypeClass = String.class),
45
+            @ApiImplicitParam(name = "checkedPostName", value = "被检查岗位名称", dataType = "String", dataTypeClass = String.class),
46 46
             @ApiImplicitParam(name = "status", value = "岗检状态", dataType = "Integer", dataTypeClass = Integer.class),
47 47
 
48 48
             @ApiImplicitParam(name = "pageNum", value = "页码从1开始", dataType = "Integer", dataTypeClass = Integer.class),

+ 11 - 10
ruoyi-postcheck/src/main/java/com/ruoyi/postCheck/controller/PostProgrammeController.java

@@ -17,10 +17,7 @@ import com.ruoyi.postCheck.domain.PostProgramme;
17 17
 import com.ruoyi.postCheck.service.IPostProgrammeService;
18 18
 import com.ruoyi.system.service.ISysDeptService;
19 19
 import com.ruoyi.system.service.ISysPostService;
20
-import io.swagger.annotations.Api;
21
-import io.swagger.annotations.ApiImplicitParam;
22
-import io.swagger.annotations.ApiImplicitParams;
23
-import io.swagger.annotations.ApiOperation;
20
+import io.swagger.annotations.*;
24 21
 import org.springframework.beans.factory.annotation.Autowired;
25 22
 import org.springframework.security.access.prepost.PreAuthorize;
26 23
 import org.springframework.web.bind.annotation.*;
@@ -101,7 +98,9 @@ public class PostProgrammeController extends BaseController {
101 98
     @ApiOperation("获取岗检方案详细信息")
102 99
     @PreAuthorize("@ss.hasPermi('postCheck:programme:query')")
103 100
     @GetMapping(value = "/{id}")
104
-    public AjaxResult getInfo(@PathVariable("id") Long id) {
101
+    public AjaxResult getInfo(
102
+            @ApiParam(name = "id", value = "岗检方案id", required = true)
103
+            @PathVariable("id") Long id) {
105 104
         return success(postProgrammeService.selectPostProgrammeById(id));
106 105
     }
107 106
 
@@ -109,7 +108,7 @@ public class PostProgrammeController extends BaseController {
109 108
      * 新增岗检方案
110 109
      */
111 110
     @ApiOperation("新增岗检方案")
112
-    @ApiImplicitParams({
111
+/*    @ApiImplicitParams({
113 112
             @ApiImplicitParam(name = "id", value = "主键ID", dataType = "Long", dataTypeClass = Long.class),
114 113
             @ApiImplicitParam(name = "name", value = "名称", dataType = "String", dataTypeClass = String.class),
115 114
             @ApiImplicitParam(name = "submitDate", value = "提交日期", dataType = "String", dataTypeClass = String.class),
@@ -121,7 +120,7 @@ public class PostProgrammeController extends BaseController {
121 120
             @ApiImplicitParam(name = "reasonIcfa", value = "2-内控法务部审批-未通过理由", dataType = "String", dataTypeClass = String.class),
122 121
 
123 122
             @ApiImplicitParam(name = "diskPath", value = "岗检方案文件地址", dataType = "String", dataTypeClass = String.class),
124
-    })
123
+    })*/
125 124
     @PreAuthorize("@ss.hasPermi('postCheck:programme:add')")
126 125
     @Log(title = "岗检方案", businessType = BusinessType.INSERT)
127 126
     @PostMapping
@@ -133,7 +132,7 @@ public class PostProgrammeController extends BaseController {
133 132
      * 修改岗检方案
134 133
      */
135 134
     @ApiOperation("修改岗检方案")
136
-    @ApiImplicitParams({
135
+/*    @ApiImplicitParams({
137 136
             @ApiImplicitParam(name = "id", value = "主键ID", dataType = "Long", dataTypeClass = Long.class),
138 137
             @ApiImplicitParam(name = "name", value = "名称", dataType = "String", dataTypeClass = String.class),
139 138
             @ApiImplicitParam(name = "submitDate", value = "提交日期", dataType = "String", dataTypeClass = String.class),
@@ -144,7 +143,7 @@ public class PostProgrammeController extends BaseController {
144 143
             @ApiImplicitParam(name = "dateIcfa", value = "2-内控法务部审批-通过日期", dataType = "String", dataTypeClass = String.class),
145 144
             @ApiImplicitParam(name = "reasonIcfa", value = "2-内控法务部审批-未通过理由", dataType = "String", dataTypeClass = String.class),
146 145
             @ApiImplicitParam(name = "diskPath", value = "岗检方案文件地址", dataType = "String", dataTypeClass = String.class),
147
-    })
146
+    })*/
148 147
 
149 148
     @PreAuthorize("@ss.hasPermi('postCheck:programme:edit')")
150 149
     @Log(title = "岗检方案", businessType = BusinessType.UPDATE)
@@ -161,7 +160,9 @@ public class PostProgrammeController extends BaseController {
161 160
     @PreAuthorize("@ss.hasPermi('postCheck:programme:remove')")
162 161
     @Log(title = "岗检方案", businessType = BusinessType.DELETE)
163 162
     @DeleteMapping("/{ids}")
164
-    public AjaxResult remove(@PathVariable Long[] ids) {
163
+    public AjaxResult remove(
164
+            @ApiParam(name = "ids", value = "岗检方案ids", required = true)
165
+            @PathVariable Long[] ids) {
165 166
         return toAjax(postProgrammeService.deletePostProgrammeByIds(ids));
166 167
     }
167 168
 

+ 37 - 61
ruoyi-postcheck/src/main/java/com/ruoyi/postCheck/controller/PostProgrammeTemplateController.java

@@ -1,38 +1,18 @@
1 1
 package com.ruoyi.postCheck.controller;
2 2
 
3
-import java.util.Date;
4
-import java.util.List;
5
-import javax.servlet.http.HttpServletResponse;
6
-
7
-import com.ruoyi.common.constant.HttpStatus;
8
-import com.ruoyi.common.constant.PostProgrammeEnum;
9
-import com.ruoyi.common.core.domain.entity.SysDept;
10
-import com.ruoyi.common.core.domain.model.LoginUser;
11
-import com.ruoyi.common.enums.DeptCode;
12
-import com.ruoyi.common.utils.SecurityUtils;
13
-import com.ruoyi.postCheck.domain.PostProgramme;
14
-import org.springframework.security.access.prepost.PreAuthorize;
15
-import org.springframework.beans.factory.annotation.Autowired;
16
-import org.springframework.web.bind.annotation.GetMapping;
17
-import org.springframework.web.bind.annotation.PostMapping;
18
-import org.springframework.web.bind.annotation.PutMapping;
19
-import org.springframework.web.bind.annotation.DeleteMapping;
20
-import org.springframework.web.bind.annotation.PathVariable;
21
-import org.springframework.web.bind.annotation.RequestBody;
22
-import org.springframework.web.bind.annotation.RequestMapping;
23
-import org.springframework.web.bind.annotation.RestController;
24 3
 import com.ruoyi.common.annotation.Log;
25 4
 import com.ruoyi.common.core.controller.BaseController;
26 5
 import com.ruoyi.common.core.domain.AjaxResult;
6
+import com.ruoyi.common.core.page.TableDataInfo;
27 7
 import com.ruoyi.common.enums.BusinessType;
28 8
 import com.ruoyi.postCheck.domain.PostProgrammeTemplate;
29 9
 import com.ruoyi.postCheck.service.IPostProgrammeTemplateService;
30
-import com.ruoyi.common.utils.poi.ExcelUtil;
31
-import com.ruoyi.common.core.page.TableDataInfo;
32
-import io.swagger.annotations.Api;
33
-import io.swagger.annotations.ApiOperation;
34
-import io.swagger.annotations.ApiImplicitParams;
35
-import io.swagger.annotations.ApiImplicitParam;
10
+import io.swagger.annotations.*;
11
+import org.springframework.beans.factory.annotation.Autowired;
12
+import org.springframework.security.access.prepost.PreAuthorize;
13
+import org.springframework.web.bind.annotation.*;
14
+
15
+import java.util.List;
36 16
 
37 17
 /**
38 18
  * 岗检方案模板Controller
@@ -43,8 +23,7 @@ import io.swagger.annotations.ApiImplicitParam;
43 23
 @Api(tags = "2.1.2-岗检方案模板接口")
44 24
 @RestController
45 25
 @RequestMapping("/postCheck/programmeTemplate")
46
-public class PostProgrammeTemplateController extends BaseController
47
-{
26
+public class PostProgrammeTemplateController extends BaseController {
48 27
     @Autowired
49 28
     private IPostProgrammeTemplateService postProgrammeTemplateService;
50 29
 
@@ -54,8 +33,7 @@ public class PostProgrammeTemplateController extends BaseController
54 33
     @ApiOperation("查询岗检方案模板列表")
55 34
 //    @PreAuthorize("@ss.hasPermi('postCheck:programmeTemplate:list')")
56 35
     @GetMapping("/list")
57
-    public TableDataInfo list(PostProgrammeTemplate postProgrammeTemplate)
58
-    {
36
+    public TableDataInfo list(PostProgrammeTemplate postProgrammeTemplate) {
59 37
         startPage();
60 38
         List<PostProgrammeTemplate> list = postProgrammeTemplateService.selectPostProgrammeTemplateList(postProgrammeTemplate);
61 39
         return getDataTable(list);
@@ -63,16 +41,15 @@ public class PostProgrammeTemplateController extends BaseController
63 41
 
64 42
     /**
65 43
      * 导出岗检方案模板列表
66
-    @ApiOperation("导出岗检方案模板列表")
67
-    @PreAuthorize("@ss.hasPermi('postCheck:programmeTemplate:export')")
68
-    @Log(title = "岗检方案模板", businessType = BusinessType.EXPORT)
69
-    @PostMapping("/export")
70
-    public void export(HttpServletResponse response, PostProgrammeTemplate postProgrammeTemplate)
71
-    {
72
-        List<PostProgrammeTemplate> list = postProgrammeTemplateService.selectPostProgrammeTemplateList(postProgrammeTemplate);
73
-        ExcelUtil<PostProgrammeTemplate> util = new ExcelUtil<PostProgrammeTemplate>(PostProgrammeTemplate.class);
74
-        util.exportExcel(response, list, "岗检方案模板数据");
75
-    }
44
+     @ApiOperation("导出岗检方案模板列表")
45
+     @PreAuthorize("@ss.hasPermi('postCheck:programmeTemplate:export')")
46
+     @Log(title = "岗检方案模板", businessType = BusinessType.EXPORT)
47
+     @PostMapping("/export") public void export(HttpServletResponse response, PostProgrammeTemplate postProgrammeTemplate)
48
+     {
49
+     List<PostProgrammeTemplate> list = postProgrammeTemplateService.selectPostProgrammeTemplateList(postProgrammeTemplate);
50
+     ExcelUtil<PostProgrammeTemplate> util = new ExcelUtil<PostProgrammeTemplate>(PostProgrammeTemplate.class);
51
+     util.exportExcel(response, list, "岗检方案模板数据");
52
+     }
76 53
      */
77 54
 
78 55
     /**
@@ -81,8 +58,9 @@ public class PostProgrammeTemplateController extends BaseController
81 58
     @ApiOperation("获取岗检方案模板详细信息")
82 59
 //    @PreAuthorize("@ss.hasPermi('postCheck:programmeTemplate:query')")
83 60
     @GetMapping(value = "/{id}")
84
-    public AjaxResult getInfo(@PathVariable("id") Long id)
85
-    {
61
+    public AjaxResult getInfo(
62
+            @ApiParam(name = "id", value = "岗检方案模版id", required = true)
63
+            @PathVariable("id") Long id) {
86 64
         return success(postProgrammeTemplateService.selectPostProgrammeTemplateById(id));
87 65
     }
88 66
 
@@ -90,20 +68,19 @@ public class PostProgrammeTemplateController extends BaseController
90 68
      * 新增岗检方案模板
91 69
      */
92 70
     @ApiOperation("新增岗检方案模板")
93
-    @ApiImplicitParams({
94
-        @ApiImplicitParam(name = "id", value = "主键", dataType = "Long", dataTypeClass = Long.class),
95
-        @ApiImplicitParam(name = "planName", value = "方案名称", dataType = "String", dataTypeClass = String.class),
96
-        @ApiImplicitParam(name = "templateName", value = "模板名称", dataType = "String", dataTypeClass = String.class),
97
-        @ApiImplicitParam(name = "diskPath", value = "模板磁盘路径", dataType = "String", dataTypeClass = String.class),
98
-        @ApiImplicitParam(name = "status", value = "状态(1-启动;2-作废)", dataType = "Integer", dataTypeClass = Integer.class),
99
-        @ApiImplicitParam(name = "delFlag", value = "del_flag", dataType = "Integer", dataTypeClass = Integer.class),
100
-        @ApiImplicitParam(name = "createUserId", value = "创建者用户ID", dataType = "Long", dataTypeClass = Long.class),
101
-    })
71
+/*    @ApiImplicitParams({
72
+            @ApiImplicitParam(name = "id", value = "主键", dataType = "Long", dataTypeClass = Long.class),
73
+            @ApiImplicitParam(name = "planName", value = "方案名称", dataType = "String", dataTypeClass = String.class),
74
+            @ApiImplicitParam(name = "templateName", value = "模板名称", dataType = "String", dataTypeClass = String.class),
75
+            @ApiImplicitParam(name = "diskPath", value = "模板磁盘路径", dataType = "String", dataTypeClass = String.class),
76
+            @ApiImplicitParam(name = "status", value = "状态(1-启动;2-作废)", dataType = "Integer", dataTypeClass = Integer.class),
77
+            @ApiImplicitParam(name = "delFlag", value = "del_flag", dataType = "Integer", dataTypeClass = Integer.class),
78
+            @ApiImplicitParam(name = "createUserId", value = "创建者用户ID", dataType = "Long", dataTypeClass = Long.class),
79
+    })*/
102 80
     @PreAuthorize("@ss.hasPermi('postCheck:programmeTemplate:add')")
103 81
     @Log(title = "岗检方案模板", businessType = BusinessType.INSERT)
104 82
     @PostMapping
105
-    public AjaxResult add(@RequestBody PostProgrammeTemplate postProgrammeTemplate)
106
-    {
83
+    public AjaxResult add(@RequestBody PostProgrammeTemplate postProgrammeTemplate) {
107 84
         return toAjax(postProgrammeTemplateService.insertPostProgrammeTemplate(postProgrammeTemplate));
108 85
     }
109 86
 
@@ -114,8 +91,7 @@ public class PostProgrammeTemplateController extends BaseController
114 91
     @PreAuthorize("@ss.hasPermi('postCheck:programmeTemplate:edit')")
115 92
     @Log(title = "岗检方案模板", businessType = BusinessType.UPDATE)
116 93
     @PutMapping
117
-    public AjaxResult edit(@RequestBody PostProgrammeTemplate postProgrammeTemplate)
118
-    {
94
+    public AjaxResult edit(@RequestBody PostProgrammeTemplate postProgrammeTemplate) {
119 95
         return toAjax(postProgrammeTemplateService.updatePostProgrammeTemplate(postProgrammeTemplate));
120 96
     }
121 97
 
@@ -125,15 +101,15 @@ public class PostProgrammeTemplateController extends BaseController
125 101
     @ApiOperation("删除岗检方案模板")
126 102
     @PreAuthorize("@ss.hasPermi('postCheck:programmeTemplate:remove')")
127 103
     @Log(title = "岗检方案模板", businessType = BusinessType.DELETE)
128
-	@DeleteMapping("/{ids}")
129
-    public AjaxResult remove(@PathVariable Long[] ids)
130
-    {
104
+    @DeleteMapping("/{ids}")
105
+    public AjaxResult remove(
106
+            @ApiParam(name = "ids", value = "岗检方案模板ids", required = true)
107
+            @PathVariable Long[] ids) {
131 108
         return toAjax(postProgrammeTemplateService.deletePostProgrammeTemplateByIds(ids));
132 109
     }
133 110
 
134 111
 
135
-
136
-    @ApiOperation("审核:岗检方案模板启用/禁用")
112
+    @ApiOperation("岗检方案模板启用/禁用")
137 113
     @ApiImplicitParams({
138 114
             @ApiImplicitParam(name = "id", value = "主键ID", dataType = "Long", dataTypeClass = Long.class),
139 115
             @ApiImplicitParam(name = "status", value = "状态(1-启动;2-作废)", dataType = "Long", dataTypeClass = Long.class)

+ 22 - 25
ruoyi-postcheck/src/main/java/com/ruoyi/postCheck/controller/PostTeamController.java

@@ -1,37 +1,28 @@
1 1
 package com.ruoyi.postCheck.controller;
2 2
 
3
-import java.util.*;
4
-import javax.servlet.http.HttpServletResponse;
5
-
6
-import com.ruoyi.common.exception.base.BaseException;
7
-import com.ruoyi.common.utils.DateUtils;
8
-import org.springframework.security.access.prepost.PreAuthorize;
9
-import org.springframework.beans.factory.annotation.Autowired;
10
-import org.springframework.util.CollectionUtils;
11
-import org.springframework.web.bind.annotation.GetMapping;
12
-import org.springframework.web.bind.annotation.PostMapping;
13
-import org.springframework.web.bind.annotation.PutMapping;
14
-import org.springframework.web.bind.annotation.DeleteMapping;
15
-import org.springframework.web.bind.annotation.PathVariable;
16
-import org.springframework.web.bind.annotation.RequestBody;
17
-import org.springframework.web.bind.annotation.RequestMapping;
18
-import org.springframework.web.bind.annotation.RestController;
19 3
 import com.ruoyi.common.annotation.Log;
20 4
 import com.ruoyi.common.core.controller.BaseController;
21 5
 import com.ruoyi.common.core.domain.AjaxResult;
6
+import com.ruoyi.common.core.page.TableDataInfo;
22 7
 import com.ruoyi.common.enums.BusinessType;
8
+import com.ruoyi.common.utils.DateUtils;
23 9
 import com.ruoyi.postCheck.domain.PostTeam;
24 10
 import com.ruoyi.postCheck.service.IPostTeamService;
25
-import com.ruoyi.common.utils.poi.ExcelUtil;
26
-import com.ruoyi.common.core.page.TableDataInfo;
27 11
 import io.swagger.annotations.Api;
28 12
 import io.swagger.annotations.ApiOperation;
29
-import io.swagger.annotations.ApiImplicitParams;
30
-import io.swagger.annotations.ApiImplicitParam;
13
+import io.swagger.annotations.ApiParam;
14
+import org.springframework.beans.factory.annotation.Autowired;
15
+import org.springframework.security.access.prepost.PreAuthorize;
16
+import org.springframework.util.CollectionUtils;
17
+import org.springframework.web.bind.annotation.*;
18
+
19
+import java.util.ArrayList;
20
+import java.util.Date;
21
+import java.util.List;
22
+import java.util.Map;
31 23
 
32 24
 /**
33
- * 岗检小组Controller
34
- * TODO $岗检小组业务说明
25
+ *
35 26
  * 1、【岗检工作组】下的【岗检小组】是自定义的名称与部门无关;
36 27
  * 2、第一个【岗检小组】被设置为【牵头小组】;
37 28
  * 3、【岗检小组】小组中的人员是从全公司下抽调的,第一个被抽调的人设置为【组长】。
@@ -118,7 +109,9 @@ public class PostTeamController extends BaseController {
118 109
     @ApiOperation("获取岗检小组详细信息")
119 110
 //    @PreAuthorize("@ss.hasPermi('postCheck:team:query')")
120 111
     @GetMapping(value = "/{id}")
121
-    public AjaxResult getInfo(@PathVariable("id") Long id) {
112
+    public AjaxResult getInfo(
113
+            @ApiParam(name = "id", value = "岗检小组id", required = true)
114
+            @PathVariable("id") Long id) {
122 115
         return success(postTeamService.selectPostTeamById(id));
123 116
     }
124 117
 
@@ -126,6 +119,7 @@ public class PostTeamController extends BaseController {
126 119
      * 新增岗检小组
127 120
      */
128 121
     @ApiOperation("新增岗检小组")
122
+    /*
129 123
     @ApiImplicitParams({
130 124
             @ApiImplicitParam(name = "id", value = "主键", dataType = "Long", dataTypeClass = Long.class),
131 125
             @ApiImplicitParam(name = "name", value = "名称", dataType = "String", dataTypeClass = String.class),
@@ -137,6 +131,7 @@ public class PostTeamController extends BaseController {
137 131
             @ApiImplicitParam(name = "teamType", value = "type=3时,工作小组权限(1-牵头;2-成员)", dataType = "Integer", dataTypeClass = Integer.class),
138 132
 //            @ApiImplicitParam(name = "children", value = "子对象", dataType = "PostTeam.java", dataTypeClass = PostTeam.class),
139 133
     })
134
+    */
140 135
     @PreAuthorize("@ss.hasPermi('postCheck:team:add')")
141 136
     @Log(title = "岗检小组", businessType = BusinessType.INSERT)
142 137
     @PostMapping
@@ -162,7 +157,9 @@ public class PostTeamController extends BaseController {
162 157
     @PreAuthorize("@ss.hasPermi('postCheck:team:remove')")
163 158
     @Log(title = "岗检小组", businessType = BusinessType.DELETE)
164 159
     @DeleteMapping("/{ids}")
165
-    public AjaxResult remove(@PathVariable Long[] ids) {
160
+    public AjaxResult remove(
161
+            @ApiParam(name = "ids", value = "岗检小组ids", required = true)
162
+            @PathVariable Long[] ids) {
166 163
         return toAjax(postTeamService.deletePostTeamByIds(ids));
167 164
     }
168 165
 
@@ -206,7 +203,7 @@ public class PostTeamController extends BaseController {
206 203
      * Tools-查询岗检工作组列表-查询工作小组列表
207 204
      * 调用模块:岗检计划新增
208 205
      */
209
-    @ApiOperation("Tools-查询工作小组列表")
206
+    @ApiOperation("Tools-查询工作小组列表(四级)")
210 207
     @GetMapping("/teamListByGroupId/{parentId}")
211 208
     public AjaxResult list(@PathVariable("parentId") Long parentId) {
212 209
         PostTeam postTeam = new PostTeam();

+ 6 - 5
ruoyi-postcheck/src/main/java/com/ruoyi/postCheck/controller/PostTeamDeptController.java

@@ -7,10 +7,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
7 7
 import com.ruoyi.common.enums.BusinessType;
8 8
 import com.ruoyi.postCheck.domain.PostTeamDept;
9 9
 import com.ruoyi.postCheck.service.IPostTeamDeptService;
10
-import io.swagger.annotations.Api;
11
-import io.swagger.annotations.ApiImplicitParam;
12
-import io.swagger.annotations.ApiImplicitParams;
13
-import io.swagger.annotations.ApiOperation;
10
+import io.swagger.annotations.*;
14 11
 import org.springframework.beans.factory.annotation.Autowired;
15 12
 import org.springframework.security.access.prepost.PreAuthorize;
16 13
 import org.springframework.web.bind.annotation.*;
@@ -69,6 +66,7 @@ public class PostTeamDeptController extends BaseController {
69 66
      * 新增岗检工作组关联部门
70 67
      */
71 68
     @ApiOperation("新增岗检工作组关联部门")
69
+    /*
72 70
     @ApiImplicitParams({
73 71
             @ApiImplicitParam(name = "id", value = "主键", dataType = "Long", dataTypeClass = Long.class),
74 72
             @ApiImplicitParam(name = "postTeamId", value = "岗检工作组ID", dataType = "Long", dataTypeClass = Long.class),
@@ -77,6 +75,7 @@ public class PostTeamDeptController extends BaseController {
77 75
 //            @ApiImplicitParam(name = "delFlag", value = "del_flag", dataType = "Integer", dataTypeClass = Integer.class),
78 76
 //            @ApiImplicitParam(name = "createUserId", value = "创建者用户ID", dataType = "Long", dataTypeClass = Long.class),
79 77
     })
78
+    */
80 79
 //    @PreAuthorize("@ss.hasPermi('postCheck:teamDept:add')")
81 80
     @Log(title = "岗检工作组关联部门", businessType = BusinessType.INSERT)
82 81
     @PostMapping
@@ -102,7 +101,9 @@ public class PostTeamDeptController extends BaseController {
102 101
 //    @PreAuthorize("@ss.hasPermi('postCheck:teamDept:remove')")
103 102
     @Log(title = "岗检工作组关联部门", businessType = BusinessType.DELETE)
104 103
     @DeleteMapping("/{ids}")
105
-    public AjaxResult remove(@PathVariable Long[] ids) {
104
+    public AjaxResult remove(
105
+            @ApiParam(name = "ids", value = "岗检工作组关联部门表ids", required = true)
106
+            @PathVariable Long[] ids) {
106 107
         return toAjax(postTeamDeptService.deletePostTeamDeptByIds(ids));
107 108
     }
108 109
 }

+ 12 - 22
ruoyi-postcheck/src/main/java/com/ruoyi/postCheck/controller/PostTeamUserController.java

@@ -1,31 +1,17 @@
1 1
 package com.ruoyi.postCheck.controller;
2 2
 
3
-import java.util.Date;
4
-import java.util.List;
5
-import javax.servlet.http.HttpServletResponse;
6
-
7
-import org.springframework.security.access.prepost.PreAuthorize;
8
-import org.springframework.beans.factory.annotation.Autowired;
9
-import org.springframework.web.bind.annotation.GetMapping;
10
-import org.springframework.web.bind.annotation.PostMapping;
11
-import org.springframework.web.bind.annotation.PutMapping;
12
-import org.springframework.web.bind.annotation.DeleteMapping;
13
-import org.springframework.web.bind.annotation.PathVariable;
14
-import org.springframework.web.bind.annotation.RequestBody;
15
-import org.springframework.web.bind.annotation.RequestMapping;
16
-import org.springframework.web.bind.annotation.RestController;
17 3
 import com.ruoyi.common.annotation.Log;
18 4
 import com.ruoyi.common.core.controller.BaseController;
19 5
 import com.ruoyi.common.core.domain.AjaxResult;
6
+import com.ruoyi.common.core.page.TableDataInfo;
20 7
 import com.ruoyi.common.enums.BusinessType;
21 8
 import com.ruoyi.postCheck.domain.PostTeamUser;
22 9
 import com.ruoyi.postCheck.service.IPostTeamUserService;
23
-import com.ruoyi.common.utils.poi.ExcelUtil;
24
-import com.ruoyi.common.core.page.TableDataInfo;
25
-import io.swagger.annotations.Api;
26
-import io.swagger.annotations.ApiOperation;
27
-import io.swagger.annotations.ApiImplicitParams;
28
-import io.swagger.annotations.ApiImplicitParam;
10
+import io.swagger.annotations.*;
11
+import org.springframework.beans.factory.annotation.Autowired;
12
+import org.springframework.web.bind.annotation.*;
13
+
14
+import java.util.List;
29 15
 
30 16
 /**
31 17
  * 岗检小组关联成员Controller
@@ -71,7 +57,9 @@ public class PostTeamUserController extends BaseController {
71 57
     @ApiOperation("获取岗检小组关联成员详细信息")
72 58
 //    @PreAuthorize("@ss.hasPermi('postCheck:teamUser:query')")
73 59
     @GetMapping(value = "/{id}")
74
-    public AjaxResult getInfo(@PathVariable("id") Long id) {
60
+    public AjaxResult getInfo(
61
+            @ApiParam(name = "id", value = "岗检小组关联成员中间表id", required = true)
62
+            @PathVariable("id") Long id) {
75 63
         return success(postTeamUserService.selectPostTeamUserById(id));
76 64
     }
77 65
 
@@ -120,7 +108,9 @@ public class PostTeamUserController extends BaseController {
120 108
 
121 109
     @ApiOperation("Tools-根据岗检小组ID查询成员列表(组长的type=1)")
122 110
     @GetMapping("/getTeamUserByTeamId/{postTeamId}")
123
-    public AjaxResult list(@PathVariable("postTeamId") Long postTeamId) {
111
+    public AjaxResult list(
112
+            @ApiParam(name = "postTeamId", value = "岗检小组ID", required = true)
113
+            @PathVariable("postTeamId") Long postTeamId) {
124 114
         PostTeamUser postTeamUser = new PostTeamUser();
125 115
         postTeamUser.setPostTeamId(postTeamId);
126 116
         List<PostTeamUser> list = postTeamUserService.selectPostTeamUserList(postTeamUser);

+ 7 - 0
ruoyi-postcheck/src/main/java/com/ruoyi/postCheck/service/IPostAssessmentRatingOtherService.java

@@ -68,6 +68,13 @@ public interface IPostAssessmentRatingOtherService extends IService<PostAssessme
68 68
      */
69 69
     int batchAddRatingOther(PostAssessmentRatingOther postAssessmentRatingOther);
70 70
 
71
+    /**
72
+     * V2:管理员创建生产部门的日常评分,只创建一条,后续三大部门对所有的生产部门(13个)进行评分
73
+     * @param postAssessmentRatingOther
74
+     * @return
75
+     */
76
+    int addRatingOtherSC(PostAssessmentRatingOther postAssessmentRatingOther);
77
+
71 78
     int batchAddRatingOtherUpdate(PostAssessmentRatingOther postAssessmentRatingOther);
72 79
 
73 80
     int productionDepartmentSub(List<PostAssessmentRatingOther> postAssessmentRatingOther);

+ 148 - 18
ruoyi-postcheck/src/main/java/com/ruoyi/postCheck/service/impl/PostAssessmentRatingOtherServiceImpl.java

@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
7 7
 import com.ruoyi.common.constant.PostAssessmentRatingOtherEnum;
8 8
 import com.ruoyi.common.constant.PostAssessmentRulesEnum;
9 9
 import com.ruoyi.common.core.domain.entity.SysDept;
10
+import com.ruoyi.common.core.domain.model.LoginUser;
10 11
 import com.ruoyi.common.enums.SysDeptEnum;
11 12
 import com.ruoyi.common.exception.base.BaseException;
12 13
 import com.ruoyi.common.utils.DateUtils;
@@ -299,17 +300,6 @@ public class PostAssessmentRatingOtherServiceImpl extends ServiceImpl<PostAssess
299 300
      */
300 301
     @Override
301 302
     public List<PostAssessmentRatingOther> selectPostAssessmentRatingOtherList(PostAssessmentRatingOther postAssessmentRatingOther) {
302
-//        String beginTime = null;
303
-//        String endTime = null;
304
-//        Map<String, Object> params = postAssessmentRatingOther.getParams();
305
-//        try {
306
-//            beginTime = (String) params.get("beginTime");
307
-//            endTime = (String) params.get("endTime");
308
-//        } catch (Exception e) {
309
-//            e.printStackTrace();
310
-//            return new ArrayList<>();
311
-//        }
312
-
313 303
 
314 304
         //该部门的打分任务表
315 305
         List<PostAssessmentRatingOther> dataList = postAssessmentRatingOtherMapper.selectPostAssessmentRatingOtherList(postAssessmentRatingOther);
@@ -397,7 +387,8 @@ public class PostAssessmentRatingOtherServiceImpl extends ServiceImpl<PostAssess
397 387
     }
398 388
 
399 389
     /**
400
-     * 管理员创建互评计划:(职能部门互评、生产部门日常)
390
+     * 管理员创建
391
+     * V2:职能部门互评
401 392
      * 互评批次:管理员启动互评任务,初始化13个部门互相打分的记录
402 393
      *
403 394
      * @param postAssessmentRatingOther
@@ -425,7 +416,7 @@ public class PostAssessmentRatingOtherServiceImpl extends ServiceImpl<PostAssess
425 416
             return 0;
426 417
         }
427 418
 
428
-        if (type != PostAssessmentRatingOtherEnum.TYPE_ZN_HP.getValue() && type != PostAssessmentRatingOtherEnum.TYPE_SC_RC.getValue()) {
419
+        if (type != PostAssessmentRatingOtherEnum.TYPE_ZN_HP.getValue()) {
429 420
             return 0;
430 421
         }
431 422
 
@@ -444,24 +435,42 @@ public class PostAssessmentRatingOtherServiceImpl extends ServiceImpl<PostAssess
444 435
 
445 436
 
446 437
         //初始化13个职能部门评分
447
-        List<PostAssessmentRules> rulesList = null;
438
+        List<PostAssessmentRules> rulesList = rulesList = postAssessmentRulesMapper.selectList(Wrappers.<PostAssessmentRules>lambdaQuery()
439
+                .eq(PostAssessmentRules::getType, PostAssessmentRulesEnum.TYPE_ZN.getValue())
440
+                .orderByDesc(PostAssessmentRules::getCreateTime)
441
+        );
442
+        /*
448 443
         // 类型:1-职能互评;
449 444
         if (type == PostAssessmentRatingOtherEnum.TYPE_ZN_HP.getValue()) {
450 445
             rulesList = postAssessmentRulesMapper.selectList(Wrappers.<PostAssessmentRules>lambdaQuery()
451 446
                     .eq(PostAssessmentRules::getType, PostAssessmentRulesEnum.TYPE_ZN.getValue())
447
+                    .orderByDesc(PostAssessmentRules::getCreateTime)
452 448
             );
453 449
         }
454 450
         //类型:2-生产日常;
455 451
         else if (type == PostAssessmentRatingOtherEnum.TYPE_SC_RC.getValue()) {
456 452
             rulesList = postAssessmentRulesMapper.selectList(Wrappers.<PostAssessmentRules>lambdaQuery()
457 453
                     .eq(PostAssessmentRules::getType, PostAssessmentRulesEnum.TYPE_SC.getValue())
454
+                    .orderByDesc(PostAssessmentRules::getCreateTime)
458 455
             );
459 456
 
460 457
         }
458
+        */
461 459
         if (CollectionUtils.isEmpty(rulesList)) {
462 460
             throw new BaseException(deptTypeView + "未添加考核评比规则,请检查!");
463 461
         }
464 462
 
463
+        //利用Set集合进行去重,按创建时间取最近的
464
+        Set<Integer> dutyTypeSet = new HashSet<>();
465
+        Iterator<PostAssessmentRules> rulesIterator = rulesList.iterator();
466
+        while (rulesIterator.hasNext()) {
467
+            PostAssessmentRules rules = rulesIterator.next();
468
+            Integer dutyType = rules.getDutyType();
469
+            if (!dutyTypeSet.add(dutyType)) {
470
+                rulesIterator.remove();
471
+            }
472
+        }
473
+
465 474
 
466 475
         //1、查询职能/生产部门列表
467 476
         SysDept deptParam = new SysDept();
@@ -471,9 +480,10 @@ public class PostAssessmentRatingOtherServiceImpl extends ServiceImpl<PostAssess
471 480
         if (CollectionUtils.isEmpty(deptList)) {
472 481
             throw new BaseException(deptTypeView + "系统管理->部门管理中未设置部门类型,请检查!");
473 482
         }
474
-//        List<Long> deptIdList = postAssessmentRatingOtherMapper.getDeptIdList(postAssessmentRatingOther.getDeptId(), type);
483
+
475 484
 
476 485
         String batchId = IdWorker.getIdStr().substring(4);//批次ID
486
+
477 487
         //循环13个部门插入待打分的任务:例如:A部门为其他12个部门打分的主表 + 打分明细表(不含自己的其他12个部门)、B部门为其他12个部门打分的主表 + 打分明细表(不含自己的其他12个部门)、……
478 488
         for (SysDept dept : deptList) {
479 489
             Long deptId = dept.getDeptId();
@@ -508,6 +518,7 @@ public class PostAssessmentRatingOtherServiceImpl extends ServiceImpl<PostAssess
508 518
                     info.setByDeptId(otherDept.getDeptId());//被评分部门ID(其他12个部门的)
509 519
                     info.setDutyType(postAssessmentRule.getDutyType());//规则类型
510 520
                     info.setScoreWeight(postAssessmentRule.getFullScore());//满分/权重
521
+                    info.setRule(postAssessmentRule.getRule());//考核规则/评分标准
511 522
 //                    info.setByDeptScore();//打分分数
512 523
                     info.setCreateDefault();
513 524
                     int insertInfo = postAssessmentRatingOtherInfoMapper.insert(info);
@@ -521,6 +532,128 @@ public class PostAssessmentRatingOtherServiceImpl extends ServiceImpl<PostAssess
521 532
         return 1;
522 533
     }
523 534
 
535
+    /**
536
+     * V2:管理员创建生产部门的日常评分,只创建一条,后续三大部门对所有的生产部门(13个)进行评分
537
+     *
538
+     * @param postAssessmentRatingOther
539
+     * @return
540
+     */
541
+    @Override
542
+    @Transactional(rollbackFor = Exception.class)
543
+    public int addRatingOtherSC(PostAssessmentRatingOther postAssessmentRatingOther) {
544
+
545
+        Integer type = postAssessmentRatingOther.getType();//类型:1-职能互评;2-生产日常;
546
+        Date startTime = postAssessmentRatingOther.getStartTime();//评分开始时间(管理员创建的)
547
+        Integer deptType = null;
548
+        String deptTypeView = "";
549
+        if (type == PostAssessmentRatingOtherEnum.TYPE_ZN_HP.getValue()) {
550
+            deptTypeView = "职能部门互评";
551
+            deptType = SysDeptEnum.TYPE_ZN.getValue();
552
+        } else if (type == PostAssessmentRatingOtherEnum.TYPE_SC_RC.getValue()) {
553
+            deptTypeView = "生产部门日常评分";
554
+            deptType = SysDeptEnum.TYPE_SC.getValue();
555
+        } else {
556
+            deptTypeView = "【type = " + type + "】";
557
+            deptType = SysDeptEnum.TYPE_OTHER.getValue();
558
+        }
559
+        if (type == null || startTime == null) {
560
+            return 0;
561
+        }
562
+
563
+        if (type != PostAssessmentRatingOtherEnum.TYPE_SC_RC.getValue()) {
564
+            return 0;
565
+        }
566
+
567
+        //检查评分记录是否已经存在,1个年度只允许一次
568
+        String year = DateUtils.parseDateToStr(DateUtils.YYYY, startTime);
569
+        Map<String, Object> params = new HashMap<>();
570
+        params.put("beginTime", year + "-01-01");
571
+        params.put("endTime", year + "-12-31");
572
+        PostAssessmentRatingOther postAssessmentRatingOtherParam = new PostAssessmentRatingOther();
573
+        postAssessmentRatingOtherParam.setType(type);
574
+        postAssessmentRatingOtherParam.setParams(params);
575
+        List<PostAssessmentRatingOther> postAssessmentRatingOtherList = postAssessmentRatingOtherMapper.selectPostAssessmentRatingOtherList(postAssessmentRatingOtherParam);
576
+        if (!CollectionUtils.isEmpty(postAssessmentRatingOtherList)) {
577
+            throw new BaseException(year + "年度已创建过" + deptTypeView + "不可以重复创建,请检查!");
578
+        }
579
+
580
+
581
+        //初始化13个生产部门评分,只有1条
582
+        List<PostAssessmentRules> rulesList = postAssessmentRulesMapper.selectList(Wrappers.<PostAssessmentRules>lambdaQuery()
583
+                .eq(PostAssessmentRules::getType, PostAssessmentRulesEnum.TYPE_SC.getValue())
584
+                .orderByDesc(PostAssessmentRules::getCreateTime)
585
+        );
586
+
587
+
588
+        if (CollectionUtils.isEmpty(rulesList)) {
589
+            throw new BaseException(deptTypeView + "未添加考核评比规则,请检查!");
590
+        }
591
+
592
+        //利用Set集合进行去重,按创建时间取最近的
593
+        Set<Integer> dutyTypeSet = new HashSet<>();
594
+        Iterator<PostAssessmentRules> rulesIterator = rulesList.iterator();
595
+        while (rulesIterator.hasNext()) {
596
+            PostAssessmentRules rules = rulesIterator.next();
597
+            Integer dutyType = rules.getDutyType();
598
+            if (!dutyTypeSet.add(dutyType)) {
599
+                rulesIterator.remove();
600
+            }
601
+        }
602
+
603
+
604
+        //1、查询生产部门
605
+        SysDept deptParam = new SysDept();
606
+        deptParam.setStatus(SysDeptEnum.STATUS_VALID.getValue().toString());//部门状态(0正常 1停用)
607
+        deptParam.setType(deptType);//1 职能部门 2 生产部门 3 其他
608
+        List<SysDept> deptList = sysDeptService.selectDeptListByCondition(deptParam);
609
+        if (CollectionUtils.isEmpty(deptList)) {
610
+            throw new BaseException(deptTypeView + "系统管理->部门管理中未设置部门类型,请检查!");
611
+        }
612
+
613
+
614
+        String batchId = IdWorker.getIdStr().substring(4);//批次ID
615
+        Long deptId = SecurityUtils.getDeptId();
616
+        SysDept sysDept = sysDeptService.selectDeptById(deptId);
617
+        String deptName = sysDept.getDeptName();
618
+        //A部门打分任务主表
619
+        PostAssessmentRatingOther postAssessmentRatingOtherOther = new PostAssessmentRatingOther();
620
+        postAssessmentRatingOtherOther.setId(Long.parseLong(IdWorker.getIdStr().substring(4)));
621
+        postAssessmentRatingOtherOther.setType(type);
622
+        postAssessmentRatingOtherOther.setBatchId(batchId);
623
+        postAssessmentRatingOtherOther.setStartTime(startTime);
624
+        postAssessmentRatingOtherOther.setStatus(PostAssessmentRatingOtherEnum.STATUS_ING.getValue());////状态:1-进行中;2-已完成
625
+        postAssessmentRatingOtherOther.setDeptId(deptId);//打分部门ID
626
+        postAssessmentRatingOtherOther.setDeptName(deptName);//打分部门名称
627
+        postAssessmentRatingOtherOther.setCreateDefault();
628
+        postAssessmentRatingOtherOther.setCreateUserId(SecurityUtils.getLoginUser().getUserId());
629
+        int insert = postAssessmentRatingOtherMapper.insert(postAssessmentRatingOtherOther);
630
+        if (insert == 0) {
631
+            throw new BaseException(deptTypeView + "失败,请稍后重试!");
632
+        }
633
+
634
+        //分别为13个部门按规则插入打分明细
635
+        for (SysDept otherDept : deptList) {
636
+            //2.1、B、C、D、E、F……(另外的12个部门)部门按考核评比规则插入打分明细
637
+            for (PostAssessmentRules postAssessmentRule : rulesList) {
638
+                PostAssessmentRatingOtherInfo info = new PostAssessmentRatingOtherInfo();
639
+                info.setRatingOtherId(postAssessmentRatingOtherOther.getId());//A打分任务表ID
640
+                info.setId(Long.parseLong(IdWorker.getIdStr().substring(4)));
641
+                info.setByDeptName(otherDept.getDeptName());//被评分部门名称(其他12个部门的)
642
+                info.setByDeptId(otherDept.getDeptId());//被评分部门ID(其他12个部门的)
643
+                info.setDutyType(postAssessmentRule.getDutyType());//规则类型
644
+                info.setScoreWeight(postAssessmentRule.getFullScore());//满分/权重
645
+//                    info.setByDeptScore();//打分分数
646
+                info.setCreateDefault();
647
+                int insertInfo = postAssessmentRatingOtherInfoMapper.insert(info);
648
+                if (insertInfo == 0) {
649
+                    throw new BaseException(deptTypeView + "失败,请稍后重试!");
650
+                }
651
+            }
652
+        }
653
+
654
+        return 1;
655
+    }
656
+
524 657
     @Override
525 658
     @Transactional(rollbackFor = Exception.class)
526 659
     public int batchAddRatingOtherUpdate(PostAssessmentRatingOther postAssessmentRatingOther) {
@@ -536,8 +669,6 @@ public class PostAssessmentRatingOtherServiceImpl extends ServiceImpl<PostAssess
536 669
 //                .eq(PostAssessmentRatingOther::getId, postAssessmentRatingOther.getId()));
537 670
 
538 671
 
539
-
540
-
541 672
         //标记状态=已打分
542 673
         postAssessmentRatingOtherMapper.update(null,
543 674
                 Wrappers.<PostAssessmentRatingOther>lambdaUpdate().
@@ -548,7 +679,6 @@ public class PostAssessmentRatingOtherServiceImpl extends ServiceImpl<PostAssess
548 679
         );
549 680
 
550 681
 
551
-
552 682
         //打分明细:数据库中
553 683
         List<PostAssessmentRatingOtherInfo> info = postAssessmentRatingOtherInfoMapper.selectList(Wrappers.<PostAssessmentRatingOtherInfo>lambdaQuery()
554 684
                 .eq(PostAssessmentRatingOtherInfo::getRatingOtherId, postAssessmentRatingOther.getId())

+ 45 - 19
ruoyi-postcheck/src/main/java/com/ruoyi/postCheck/service/impl/PostAssessmentRulesServiceImpl.java

@@ -3,10 +3,14 @@ package com.ruoyi.postCheck.service.impl;
3 3
 import java.util.Date;
4 4
 import java.util.List;
5 5
 
6
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
7
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
8
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
6 9
 import com.ruoyi.common.constant.PostAssessmentRulesEnum;
7 10
 import com.ruoyi.common.constant.PostCheckedReportEnum;
8 11
 import com.ruoyi.common.core.domain.entity.SysUser;
9 12
 import com.ruoyi.common.core.domain.model.LoginUser;
13
+import com.ruoyi.common.exception.base.BaseException;
10 14
 import com.ruoyi.common.utils.DateUtils;
11 15
 import com.ruoyi.common.utils.SecurityUtils;
12 16
 import com.ruoyi.postCheck.domain.PostCheckedReport;
@@ -18,6 +22,7 @@ import com.ruoyi.postCheck.domain.PostAssessmentRules;
18 22
 import com.ruoyi.postCheck.service.IPostAssessmentRulesService;
19 23
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
20 24
 import com.baomidou.mybatisplus.core.toolkit.IdWorker;
25
+import org.springframework.util.CollectionUtils;
21 26
 
22 27
 /**
23 28
  * 考核规则Service业务层处理
@@ -26,8 +31,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker;
26 31
  * @date 2023-12-28
27 32
  */
28 33
 @Service
29
-public class PostAssessmentRulesServiceImpl extends ServiceImpl<PostAssessmentRulesMapper, PostAssessmentRules> implements IPostAssessmentRulesService
30
-{
34
+public class PostAssessmentRulesServiceImpl extends ServiceImpl<PostAssessmentRulesMapper, PostAssessmentRules> implements IPostAssessmentRulesService {
31 35
     @Autowired
32 36
     private PostAssessmentRulesMapper postAssessmentRulesMapper;
33 37
 
@@ -38,8 +42,7 @@ public class PostAssessmentRulesServiceImpl extends ServiceImpl<PostAssessmentRu
38 42
      * @return 考核规则
39 43
      */
40 44
     @Override
41
-    public PostAssessmentRules selectPostAssessmentRulesById(Long id)
42
-    {
45
+    public PostAssessmentRules selectPostAssessmentRulesById(Long id) {
43 46
         return postAssessmentRulesMapper.selectPostAssessmentRulesById(id);
44 47
     }
45 48
 
@@ -50,8 +53,7 @@ public class PostAssessmentRulesServiceImpl extends ServiceImpl<PostAssessmentRu
50 53
      * @return 考核规则
51 54
      */
52 55
     @Override
53
-    public List<PostAssessmentRules> selectPostAssessmentRulesList(PostAssessmentRules postAssessmentRules)
54
-    {
56
+    public List<PostAssessmentRules> selectPostAssessmentRulesList(PostAssessmentRules postAssessmentRules) {
55 57
         return postAssessmentRulesMapper.selectPostAssessmentRulesList(postAssessmentRules);
56 58
     }
57 59
 
@@ -62,15 +64,42 @@ public class PostAssessmentRulesServiceImpl extends ServiceImpl<PostAssessmentRu
62 64
      * @return 结果
63 65
      */
64 66
     @Override
65
-    public int insertPostAssessmentRules(PostAssessmentRules postAssessmentRules)
66
-    {
67
-        //TODO 自增主键修改为-MyBatis-Plus雪花算法(截取5位解决VUE精度丢失BUG)-系统登录日志
68
-        if (postAssessmentRules.getId() == null)
69
-            postAssessmentRules.setId(Long.parseLong(IdWorker.getIdStr().substring(4)));
70
-        // postAssessmentRules.setCreateTime(DateUtils.getNowDate());
71
-        postAssessmentRules.setCreateDefault();
67
+    public int insertPostAssessmentRules(PostAssessmentRules postAssessmentRules) {
68
+
69
+        Integer type = postAssessmentRules.getType();
70
+        Integer dutyType = postAssessmentRules.getDutyType();
71
+
72
+        if (type == null || dutyType == null) {
73
+            throw new BaseException("参数为空,请检查!");
74
+        }
75
+
76
+        String msgView = null;
77
+        if (type == PostAssessmentRulesEnum.TYPE_POST.getValue()) {
78
+            msgView = "评分分类";
79
+        } else if (type == PostAssessmentRulesEnum.TYPE_ZN.getValue()) {
80
+            msgView = "项目";
81
+        } else if (type == PostAssessmentRulesEnum.TYPE_SC.getValue()) {
82
+            msgView = "专业";
83
+
84
+        } else {
85
+            throw new BaseException("类型错误,请检查!");
86
+        }
87
+
88
+
89
+        LambdaQueryWrapper<PostAssessmentRules> queryWrapper = Wrappers.lambdaQuery(PostAssessmentRules.class);
90
+        queryWrapper.eq(PostAssessmentRules::getType, type);
91
+        queryWrapper.eq(PostAssessmentRules::getDutyType, dutyType);
92
+        List<PostAssessmentRules> postAssessmentRulesList = postAssessmentRulesMapper.selectList(queryWrapper);
93
+        if (!CollectionUtils.isEmpty(postAssessmentRulesList)) {
94
+            throw new BaseException("该【" + msgView + "】已存在,请通过修改方式进行调整!");
95
+        }
96
+
97
+
98
+        postAssessmentRules.setId(Long.parseLong(IdWorker.getIdStr().substring(4)));
72 99
         postAssessmentRules.setStatus(PostAssessmentRulesEnum.STATUS_WAIT.getValue()); // 去创建自己的枚举类
73 100
         postAssessmentRules.setCreateUserId(SecurityUtils.getUserId());
101
+
102
+        postAssessmentRules.setCreateDefault();
74 103
         return postAssessmentRulesMapper.insertPostAssessmentRules(postAssessmentRules);
75 104
     }
76 105
 
@@ -81,8 +110,7 @@ public class PostAssessmentRulesServiceImpl extends ServiceImpl<PostAssessmentRu
81 110
      * @return 结果
82 111
      */
83 112
     @Override
84
-    public int updatePostAssessmentRules(PostAssessmentRules postAssessmentRules)
85
-    {
113
+    public int updatePostAssessmentRules(PostAssessmentRules postAssessmentRules) {
86 114
         // postAssessmentRules.setUpdateTime(DateUtils.getNowDate());
87 115
         postAssessmentRules.setUpdateDefault();
88 116
         return postAssessmentRulesMapper.updatePostAssessmentRules(postAssessmentRules);
@@ -95,8 +123,7 @@ public class PostAssessmentRulesServiceImpl extends ServiceImpl<PostAssessmentRu
95 123
      * @return 结果
96 124
      */
97 125
     @Override
98
-    public int deletePostAssessmentRulesByIds(Long[] ids)
99
-    {
126
+    public int deletePostAssessmentRulesByIds(Long[] ids) {
100 127
         return postAssessmentRulesMapper.deletePostAssessmentRulesByIds(ids);
101 128
     }
102 129
 
@@ -107,8 +134,7 @@ public class PostAssessmentRulesServiceImpl extends ServiceImpl<PostAssessmentRu
107 134
      * @return 结果
108 135
      */
109 136
     @Override
110
-    public int deletePostAssessmentRulesById(Long id)
111
-    {
137
+    public int deletePostAssessmentRulesById(Long id) {
112 138
         return postAssessmentRulesMapper.deletePostAssessmentRulesById(id);
113 139
     }
114 140
 

+ 47 - 76
ruoyi-quartz/src/main/java/com/ruoyi/quartz/controller/SysJobController.java

@@ -1,18 +1,5 @@
1 1
 package com.ruoyi.quartz.controller;
2 2
 
3
-import java.util.List;
4
-import javax.servlet.http.HttpServletResponse;
5
-import org.quartz.SchedulerException;
6
-import org.springframework.beans.factory.annotation.Autowired;
7
-import org.springframework.security.access.prepost.PreAuthorize;
8
-import org.springframework.web.bind.annotation.DeleteMapping;
9
-import org.springframework.web.bind.annotation.GetMapping;
10
-import org.springframework.web.bind.annotation.PathVariable;
11
-import org.springframework.web.bind.annotation.PostMapping;
12
-import org.springframework.web.bind.annotation.PutMapping;
13
-import org.springframework.web.bind.annotation.RequestBody;
14
-import org.springframework.web.bind.annotation.RequestMapping;
15
-import org.springframework.web.bind.annotation.RestController;
16 3
 import com.ruoyi.common.annotation.Log;
17 4
 import com.ruoyi.common.constant.Constants;
18 5
 import com.ruoyi.common.core.controller.BaseController;
@@ -21,31 +8,39 @@ import com.ruoyi.common.core.page.TableDataInfo;
21 8
 import com.ruoyi.common.enums.BusinessType;
22 9
 import com.ruoyi.common.exception.job.TaskException;
23 10
 import com.ruoyi.common.utils.StringUtils;
24
-import com.ruoyi.common.utils.poi.ExcelUtil;
25 11
 import com.ruoyi.quartz.domain.SysJob;
26 12
 import com.ruoyi.quartz.service.ISysJobService;
27 13
 import com.ruoyi.quartz.util.CronUtils;
28 14
 import com.ruoyi.quartz.util.ScheduleUtils;
15
+import io.swagger.annotations.Api;
16
+import io.swagger.annotations.ApiOperation;
17
+import io.swagger.annotations.ApiParam;
18
+import org.quartz.SchedulerException;
19
+import org.springframework.beans.factory.annotation.Autowired;
20
+import org.springframework.security.access.prepost.PreAuthorize;
21
+import org.springframework.web.bind.annotation.*;
22
+
23
+import java.util.List;
29 24
 
30 25
 /**
31 26
  * 调度任务信息操作处理
32
- * 
27
+ *
33 28
  * @author ruoyi
34 29
  */
30
+@Api(tags = "6.5.1-定时任务")
35 31
 @RestController
36 32
 @RequestMapping("/monitor/job")
37
-public class SysJobController extends BaseController
38
-{
33
+public class SysJobController extends BaseController {
39 34
     @Autowired
40 35
     private ISysJobService jobService;
41 36
 
42 37
     /**
43 38
      * 查询定时任务列表
44 39
      */
40
+    @ApiOperation("查询定时任务列表")
45 41
     @PreAuthorize("@ss.hasPermi('monitor:job:list')")
46 42
     @GetMapping("/list")
47
-    public TableDataInfo list(SysJob sysJob)
48
-    {
43
+    public TableDataInfo list(SysJob sysJob) {
49 44
         startPage();
50 45
         List<SysJob> list = jobService.selectJobList(sysJob);
51 46
         return getDataTable(list);
@@ -54,7 +49,7 @@ public class SysJobController extends BaseController
54 49
     /**
55 50
      * 导出定时任务列表
56 51
      */
57
-    @PreAuthorize("@ss.hasPermi('monitor:job:export')")
52
+   /* @PreAuthorize("@ss.hasPermi('monitor:job:export')")
58 53
     @Log(title = "定时任务", businessType = BusinessType.EXPORT)
59 54
     @PostMapping("/export")
60 55
     public void export(HttpServletResponse response, SysJob sysJob)
@@ -62,48 +57,39 @@ public class SysJobController extends BaseController
62 57
         List<SysJob> list = jobService.selectJobList(sysJob);
63 58
         ExcelUtil<SysJob> util = new ExcelUtil<SysJob>(SysJob.class);
64 59
         util.exportExcel(response, list, "定时任务");
65
-    }
60
+    }*/
66 61
 
67 62
     /**
68 63
      * 获取定时任务详细信息
69 64
      */
65
+    @ApiOperation("定时任务详情")
70 66
     @PreAuthorize("@ss.hasPermi('monitor:job:query')")
71 67
     @GetMapping(value = "/{jobId}")
72
-    public AjaxResult getInfo(@PathVariable("jobId") Long jobId)
73
-    {
68
+    public AjaxResult getInfo(
69
+            @ApiParam(name = "jobId", value = "id", required = true)
70
+            @PathVariable("jobId") Long jobId) {
74 71
         return success(jobService.selectJobById(jobId));
75 72
     }
76 73
 
77 74
     /**
78 75
      * 新增定时任务
79 76
      */
77
+    @ApiOperation("新增定时任务")
80 78
     @PreAuthorize("@ss.hasPermi('monitor:job:add')")
81 79
     @Log(title = "定时任务", businessType = BusinessType.INSERT)
82 80
     @PostMapping
83
-    public AjaxResult add(@RequestBody SysJob job) throws SchedulerException, TaskException
84
-    {
85
-        if (!CronUtils.isValid(job.getCronExpression()))
86
-        {
81
+    public AjaxResult add(@RequestBody SysJob job) throws SchedulerException, TaskException {
82
+        if (!CronUtils.isValid(job.getCronExpression())) {
87 83
             return error("新增任务'" + job.getJobName() + "'失败,Cron表达式不正确");
88
-        }
89
-        else if (StringUtils.containsIgnoreCase(job.getInvokeTarget(), Constants.LOOKUP_RMI))
90
-        {
84
+        } else if (StringUtils.containsIgnoreCase(job.getInvokeTarget(), Constants.LOOKUP_RMI)) {
91 85
             return error("新增任务'" + job.getJobName() + "'失败,目标字符串不允许'rmi'调用");
92
-        }
93
-        else if (StringUtils.containsAnyIgnoreCase(job.getInvokeTarget(), new String[] { Constants.LOOKUP_LDAP, Constants.LOOKUP_LDAPS }))
94
-        {
86
+        } else if (StringUtils.containsAnyIgnoreCase(job.getInvokeTarget(), new String[]{Constants.LOOKUP_LDAP, Constants.LOOKUP_LDAPS})) {
95 87
             return error("新增任务'" + job.getJobName() + "'失败,目标字符串不允许'ldap(s)'调用");
96
-        }
97
-        else if (StringUtils.containsAnyIgnoreCase(job.getInvokeTarget(), new String[] { Constants.HTTP, Constants.HTTPS }))
98
-        {
88
+        } else if (StringUtils.containsAnyIgnoreCase(job.getInvokeTarget(), new String[]{Constants.HTTP, Constants.HTTPS})) {
99 89
             return error("新增任务'" + job.getJobName() + "'失败,目标字符串不允许'http(s)'调用");
100
-        }
101
-        else if (StringUtils.containsAnyIgnoreCase(job.getInvokeTarget(), Constants.JOB_ERROR_STR))
102
-        {
90
+        } else if (StringUtils.containsAnyIgnoreCase(job.getInvokeTarget(), Constants.JOB_ERROR_STR)) {
103 91
             return error("新增任务'" + job.getJobName() + "'失败,目标字符串存在违规");
104
-        }
105
-        else if (!ScheduleUtils.whiteList(job.getInvokeTarget()))
106
-        {
92
+        } else if (!ScheduleUtils.whiteList(job.getInvokeTarget())) {
107 93
             return error("新增任务'" + job.getJobName() + "'失败,目标字符串不在白名单内");
108 94
         }
109 95
         job.setCreateBy(getUsername());
@@ -113,72 +99,57 @@ public class SysJobController extends BaseController
113 99
     /**
114 100
      * 修改定时任务
115 101
      */
102
+    @ApiOperation("修改定时任务")
116 103
     @PreAuthorize("@ss.hasPermi('monitor:job:edit')")
117 104
     @Log(title = "定时任务", businessType = BusinessType.UPDATE)
118 105
     @PutMapping
119
-    public AjaxResult edit(@RequestBody SysJob job) throws SchedulerException, TaskException
120
-    {
121
-        if (!CronUtils.isValid(job.getCronExpression()))
122
-        {
106
+    public AjaxResult edit(@RequestBody SysJob job) throws SchedulerException, TaskException {
107
+        if (!CronUtils.isValid(job.getCronExpression())) {
123 108
             return error("修改任务'" + job.getJobName() + "'失败,Cron表达式不正确");
124
-        }
125
-        else if (StringUtils.containsIgnoreCase(job.getInvokeTarget(), Constants.LOOKUP_RMI))
126
-        {
109
+        } else if (StringUtils.containsIgnoreCase(job.getInvokeTarget(), Constants.LOOKUP_RMI)) {
127 110
             return error("修改任务'" + job.getJobName() + "'失败,目标字符串不允许'rmi'调用");
128
-        }
129
-        else if (StringUtils.containsAnyIgnoreCase(job.getInvokeTarget(), new String[] { Constants.LOOKUP_LDAP, Constants.LOOKUP_LDAPS }))
130
-        {
111
+        } else if (StringUtils.containsAnyIgnoreCase(job.getInvokeTarget(), new String[]{Constants.LOOKUP_LDAP, Constants.LOOKUP_LDAPS})) {
131 112
             return error("修改任务'" + job.getJobName() + "'失败,目标字符串不允许'ldap(s)'调用");
132
-        }
133
-        else if (StringUtils.containsAnyIgnoreCase(job.getInvokeTarget(), new String[] { Constants.HTTP, Constants.HTTPS }))
134
-        {
113
+        } else if (StringUtils.containsAnyIgnoreCase(job.getInvokeTarget(), new String[]{Constants.HTTP, Constants.HTTPS})) {
135 114
             return error("修改任务'" + job.getJobName() + "'失败,目标字符串不允许'http(s)'调用");
136
-        }
137
-        else if (StringUtils.containsAnyIgnoreCase(job.getInvokeTarget(), Constants.JOB_ERROR_STR))
138
-        {
115
+        } else if (StringUtils.containsAnyIgnoreCase(job.getInvokeTarget(), Constants.JOB_ERROR_STR)) {
139 116
             return error("修改任务'" + job.getJobName() + "'失败,目标字符串存在违规");
140
-        }
141
-        else if (!ScheduleUtils.whiteList(job.getInvokeTarget()))
142
-        {
117
+        } else if (!ScheduleUtils.whiteList(job.getInvokeTarget())) {
143 118
             return error("修改任务'" + job.getJobName() + "'失败,目标字符串不在白名单内");
144 119
         }
145 120
         job.setUpdateBy(getUsername());
146 121
         return toAjax(jobService.updateJob(job));
147 122
     }
148 123
 
149
-    /**
150
-     * 定时任务状态修改
151
-     */
124
+
125
+    @ApiOperation("定时任务状态修改")
152 126
     @PreAuthorize("@ss.hasPermi('monitor:job:changeStatus')")
153 127
     @Log(title = "定时任务", businessType = BusinessType.UPDATE)
154 128
     @PutMapping("/changeStatus")
155
-    public AjaxResult changeStatus(@RequestBody SysJob job) throws SchedulerException
156
-    {
129
+    public AjaxResult changeStatus(@RequestBody SysJob job) throws SchedulerException {
157 130
         SysJob newJob = jobService.selectJobById(job.getJobId());
158 131
         newJob.setStatus(job.getStatus());
159 132
         return toAjax(jobService.changeStatus(newJob));
160 133
     }
161 134
 
162
-    /**
163
-     * 定时任务立即执行一次
164
-     */
135
+
136
+    @ApiOperation("定时任务立即执行一次")
165 137
     @PreAuthorize("@ss.hasPermi('monitor:job:changeStatus')")
166 138
     @Log(title = "定时任务", businessType = BusinessType.UPDATE)
167 139
     @PutMapping("/run")
168
-    public AjaxResult run(@RequestBody SysJob job) throws SchedulerException
169
-    {
140
+    public AjaxResult run(@RequestBody SysJob job) throws SchedulerException {
170 141
         boolean result = jobService.run(job);
171 142
         return result ? success() : error("任务不存在或已过期!");
172 143
     }
173 144
 
174
-    /**
175
-     * 删除定时任务
176
-     */
145
+
146
+    @ApiOperation("删除定时任务")
177 147
     @PreAuthorize("@ss.hasPermi('monitor:job:remove')")
178 148
     @Log(title = "定时任务", businessType = BusinessType.DELETE)
179 149
     @DeleteMapping("/{jobIds}")
180
-    public AjaxResult remove(@PathVariable Long[] jobIds) throws SchedulerException, TaskException
181
-    {
150
+    public AjaxResult remove(
151
+            @ApiParam(name = "id", value = "定时任务id", required = true)
152
+            @PathVariable Long[] jobIds) throws SchedulerException, TaskException {
182 153
         jobService.deleteJobByIds(jobIds);
183 154
         return success();
184 155
     }

+ 71 - 62
ruoyi-quartz/src/main/java/com/ruoyi/quartz/domain/SysJob.java

@@ -3,6 +3,9 @@ package com.ruoyi.quartz.domain;
3 3
 import java.util.Date;
4 4
 import javax.validation.constraints.NotBlank;
5 5
 import javax.validation.constraints.Size;
6
+
7
+import io.swagger.annotations.ApiModel;
8
+import io.swagger.annotations.ApiModelProperty;
6 9
 import org.apache.commons.lang3.builder.ToStringBuilder;
7 10
 import org.apache.commons.lang3.builder.ToStringStyle;
8 11
 import com.fasterxml.jackson.annotation.JsonFormat;
@@ -15,157 +18,163 @@ import com.ruoyi.quartz.util.CronUtils;
15 18
 
16 19
 /**
17 20
  * 定时任务调度表 sys_job
18
- * 
21
+ *
19 22
  * @author ruoyi
20 23
  */
21
-public class SysJob extends BaseEntity
22
-{
24
+@ApiModel(value = "定时任务调度对象")
25
+public class SysJob extends BaseEntity {
23 26
     private static final long serialVersionUID = 1L;
24 27
 
25
-    /** 任务ID */
28
+    /**
29
+     * 任务ID
30
+     */
31
+    @ApiModelProperty("任务编号")
26 32
     @Excel(name = "任务序号", cellType = ColumnType.NUMERIC)
27 33
     private Long jobId;
28 34
 
29
-    /** 任务名称 */
35
+    /**
36
+     * 任务名称
37
+     */
38
+    @ApiModelProperty("任务名称")
30 39
     @Excel(name = "任务名称")
31 40
     private String jobName;
32 41
 
33
-    /** 任务组名 */
42
+    /**
43
+     * 任务组名
44
+     */
45
+    @ApiModelProperty("任务组名")
34 46
     @Excel(name = "任务组名")
35 47
     private String jobGroup;
36 48
 
37
-    /** 调用目标字符串 */
49
+    /**
50
+     * 调用目标字符串
51
+     */
52
+    @ApiModelProperty("调用目标字符串")
38 53
     @Excel(name = "调用目标字符串")
39 54
     private String invokeTarget;
40 55
 
41
-    /** cron执行表达式 */
56
+    /**
57
+     * cron执行表达式
58
+     */
59
+    @ApiModelProperty("指定表达式")
42 60
     @Excel(name = "执行表达式 ")
43 61
     private String cronExpression;
44 62
 
45
-    /** cron计划策略 */
63
+    /**
64
+     * cron计划策略
65
+     */
66
+    @ApiModelProperty("计划策略")
46 67
     @Excel(name = "计划策略 ", readConverterExp = "0=默认,1=立即触发执行,2=触发一次执行,3=不触发立即执行")
47 68
     private String misfirePolicy = ScheduleConstants.MISFIRE_DEFAULT;
48 69
 
49
-    /** 是否并发执行(0允许 1禁止) */
70
+    /**
71
+     * 是否并发执行(0允许 1禁止)
72
+     */
73
+    @ApiModelProperty("并发执行")
50 74
     @Excel(name = "并发执行", readConverterExp = "0=允许,1=禁止")
51 75
     private String concurrent;
52 76
 
53
-    /** 任务状态(0正常 1暂停) */
77
+    /**
78
+     * 任务状态(0正常 1暂停)
79
+     */
80
+    @ApiModelProperty("任务状态")
54 81
     @Excel(name = "任务状态", readConverterExp = "0=正常,1=暂停")
55 82
     private String status;
56 83
 
57
-    public Long getJobId()
58
-    {
84
+    public Long getJobId() {
59 85
         return jobId;
60 86
     }
61 87
 
62
-    public void setJobId(Long jobId)
63
-    {
88
+    public void setJobId(Long jobId) {
64 89
         this.jobId = jobId;
65 90
     }
66 91
 
67 92
     @NotBlank(message = "任务名称不能为空")
68 93
     @Size(min = 0, max = 64, message = "任务名称不能超过64个字符")
69
-    public String getJobName()
70
-    {
94
+    public String getJobName() {
71 95
         return jobName;
72 96
     }
73 97
 
74
-    public void setJobName(String jobName)
75
-    {
98
+    public void setJobName(String jobName) {
76 99
         this.jobName = jobName;
77 100
     }
78 101
 
79
-    public String getJobGroup()
80
-    {
102
+    public String getJobGroup() {
81 103
         return jobGroup;
82 104
     }
83 105
 
84
-    public void setJobGroup(String jobGroup)
85
-    {
106
+    public void setJobGroup(String jobGroup) {
86 107
         this.jobGroup = jobGroup;
87 108
     }
88 109
 
89 110
     @NotBlank(message = "调用目标字符串不能为空")
90 111
     @Size(min = 0, max = 500, message = "调用目标字符串长度不能超过500个字符")
91
-    public String getInvokeTarget()
92
-    {
112
+    public String getInvokeTarget() {
93 113
         return invokeTarget;
94 114
     }
95 115
 
96
-    public void setInvokeTarget(String invokeTarget)
97
-    {
116
+    public void setInvokeTarget(String invokeTarget) {
98 117
         this.invokeTarget = invokeTarget;
99 118
     }
100 119
 
101 120
     @NotBlank(message = "Cron执行表达式不能为空")
102 121
     @Size(min = 0, max = 255, message = "Cron执行表达式不能超过255个字符")
103
-    public String getCronExpression()
104
-    {
122
+    public String getCronExpression() {
105 123
         return cronExpression;
106 124
     }
107 125
 
108
-    public void setCronExpression(String cronExpression)
109
-    {
126
+    public void setCronExpression(String cronExpression) {
110 127
         this.cronExpression = cronExpression;
111 128
     }
112 129
 
113 130
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
114
-    public Date getNextValidTime()
115
-    {
116
-        if (StringUtils.isNotEmpty(cronExpression))
117
-        {
131
+    public Date getNextValidTime() {
132
+        if (StringUtils.isNotEmpty(cronExpression)) {
118 133
             return CronUtils.getNextExecution(cronExpression);
119 134
         }
120 135
         return null;
121 136
     }
122 137
 
123
-    public String getMisfirePolicy()
124
-    {
138
+    public String getMisfirePolicy() {
125 139
         return misfirePolicy;
126 140
     }
127 141
 
128
-    public void setMisfirePolicy(String misfirePolicy)
129
-    {
142
+    public void setMisfirePolicy(String misfirePolicy) {
130 143
         this.misfirePolicy = misfirePolicy;
131 144
     }
132 145
 
133
-    public String getConcurrent()
134
-    {
146
+    public String getConcurrent() {
135 147
         return concurrent;
136 148
     }
137 149
 
138
-    public void setConcurrent(String concurrent)
139
-    {
150
+    public void setConcurrent(String concurrent) {
140 151
         this.concurrent = concurrent;
141 152
     }
142 153
 
143
-    public String getStatus()
144
-    {
154
+    public String getStatus() {
145 155
         return status;
146 156
     }
147 157
 
148
-    public void setStatus(String status)
149
-    {
158
+    public void setStatus(String status) {
150 159
         this.status = status;
151 160
     }
152 161
 
153 162
     @Override
154 163
     public String toString() {
155
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
156
-            .append("jobId", getJobId())
157
-            .append("jobName", getJobName())
158
-            .append("jobGroup", getJobGroup())
159
-            .append("cronExpression", getCronExpression())
160
-            .append("nextValidTime", getNextValidTime())
161
-            .append("misfirePolicy", getMisfirePolicy())
162
-            .append("concurrent", getConcurrent())
163
-            .append("status", getStatus())
164
-            .append("createBy", getCreateBy())
165
-            .append("createTime", getCreateTime())
166
-            .append("updateBy", getUpdateBy())
167
-            .append("updateTime", getUpdateTime())
168
-            .append("remark", getRemark())
169
-            .toString();
164
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
165
+                .append("jobId", getJobId())
166
+                .append("jobName", getJobName())
167
+                .append("jobGroup", getJobGroup())
168
+                .append("cronExpression", getCronExpression())
169
+                .append("nextValidTime", getNextValidTime())
170
+                .append("misfirePolicy", getMisfirePolicy())
171
+                .append("concurrent", getConcurrent())
172
+                .append("status", getStatus())
173
+                .append("createBy", getCreateBy())
174
+                .append("createTime", getCreateTime())
175
+                .append("updateBy", getUpdateBy())
176
+                .append("updateTime", getUpdateTime())
177
+                .append("remark", getRemark())
178
+                .toString();
170 179
     }
171 180
 }

+ 5 - 0
ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/PostCheckSystemTask.java

@@ -430,10 +430,15 @@ public class PostCheckSystemTask {
430 430
     }
431 431
 
432 432
     public static void main(String[] args) {
433
+//        Hzsh.eitc@6626.admin = 9888DE88B93ADE3C2F1CF21B3DA5490F1622B52E75C2ED57CD0A3ED8FC621339
434
+//        Hzsh.eitc@6626.user = 57E00682ED216BB1160100FE7EE9B350111E72584087752289390438A67FBDFA
433 435
 
434 436
 //        String aesEncrypt = AesUtil.aesEncrypt("Hzsh.eitc@6626.admin", AesUtil.aesKey);
435 437
         String aesEncrypt = AesUtil.aesEncrypt("Hzsh.eitc@6626.user", AesUtil.aesKey);
436 438
         System.out.println("aesEncrypt = " + aesEncrypt);
439
+
440
+        String aesDecrypt = AesUtil.aesDecrypt("D87E964E44C6792A6E433F85B13EC1B6", AesUtil.aesKey);
441
+        System.out.println("aesDecrypt = " + aesDecrypt);
437 442
         if (true) {
438 443
             return;
439 444
         }

+ 21 - 24
ruoyi-system/src/main/java/com/ruoyi/system/domain/SysPost.java

@@ -1,16 +1,15 @@
1 1
 package com.ruoyi.system.domain;
2 2
 
3
-import javax.validation.constraints.NotBlank;
4
-import javax.validation.constraints.NotNull;
5
-import javax.validation.constraints.Size;
6
-
7 3
 import com.fasterxml.jackson.annotation.JsonFormat;
8
-import org.apache.commons.lang3.builder.ToStringBuilder;
9
-import org.apache.commons.lang3.builder.ToStringStyle;
10 4
 import com.ruoyi.common.annotation.Excel;
11 5
 import com.ruoyi.common.annotation.Excel.ColumnType;
12 6
 import com.ruoyi.common.core.domain.BaseEntity;
7
+import io.swagger.annotations.ApiModel;
8
+import io.swagger.annotations.ApiModelProperty;
13 9
 
10
+import javax.validation.constraints.NotBlank;
11
+import javax.validation.constraints.NotNull;
12
+import javax.validation.constraints.Size;
14 13
 import java.util.Date;
15 14
 
16 15
 /**
@@ -18,55 +17,53 @@ import java.util.Date;
18 17
  *
19 18
  * @author ruoyi
20 19
  */
20
+@ApiModel(value = "岗位管理对象")
21 21
 public class SysPost extends BaseEntity
22 22
 {
23 23
     private static final long serialVersionUID = 1L;
24 24
 
25
-    /** 岗位序号 */
25
+    @ApiModelProperty("岗位ID")
26 26
     @Excel(name = "岗位序号", cellType = ColumnType.NUMERIC)
27 27
     private Long postId;
28 28
 
29
-    /** 岗位编码 */
29
+    @ApiModelProperty("岗位编码")
30 30
     @Excel(name = "岗位编码")
31 31
     private String postCode;
32 32
 
33
-    /** 岗位名称 */
33
+    @ApiModelProperty("岗位名称")
34 34
     @Excel(name = "岗位名称")
35 35
     private String postName;
36 36
 
37
-    /** 岗位排序 */
37
+    @ApiModelProperty("岗位排序")
38 38
     @Excel(name = "岗位排序")
39 39
     private Integer postSort;
40 40
 
41
-    /** 状态(0正常 1停用) */
41
+
42
+    @ApiModelProperty("岗位状态0正常1停用")
42 43
     @Excel(name = "状态", readConverterExp = "0=正常,1=停用")
43 44
     private String status;
44 45
 
45
-
46
-    /**
47
-     * 部门id
48
-     */
46
+    @ApiModelProperty("部门ID")
49 47
     private Long deptId;
50 48
 
51
-    /**
52
-     * 部门id
53
-     */
54
-    private Long deptName;
55 49
 
56
-    /**
57
-     * 部门状态
58
-     */
50
+    @ApiModelProperty("部门名称")
51
+    private String deptName;
52
+
53
+    @ApiModelProperty("部门状态0正常1停用")
59 54
     @Excel(name = "部门状态(0正常 1停用)")
60 55
     private String deptStatus;
61 56
 
62 57
     /**
63 58
      * 级别:0-不设置;1-经理;
64 59
      */
60
+    @ApiModelProperty("级别0员工1经理2领导")
65 61
     private Integer postLevel;
66 62
 
67 63
     /**
68 64
      * 是否关键岗位:1-是;2-否;
69 65
      */
66
+    @ApiModelProperty("是否关键岗位1时2否")
70 67
     private Integer importantType;
71 68
 
72 69
 
@@ -175,11 +172,11 @@ public class SysPost extends BaseEntity
175 172
         this.deptId = deptId;
176 173
     }
177 174
 
178
-    public Long getDeptName() {
175
+    public String getDeptName() {
179 176
         return deptName;
180 177
     }
181 178
 
182
-    public void setDeptName(Long deptName) {
179
+    public void setDeptName(String deptName) {
183 180
         this.deptName = deptName;
184 181
     }
185 182