Yansen 2 лет назад
Родитель
Сommit
2b07d86b6e
19 измененных файлов: 569 добавлений и 98 удалений
  1. 19
    2
      db/.back_文明创办/文明创办-backup-20221216155916.pdma.json
  2. 36
    2
      db/.back_文明创办/文明创办-backup-20221216202913.pdma.json
  3. 64
    7
      db/.back_文明创办/文明创办-backup-20221216202942.pdma.json
  4. 45
    5
      db/文明创办.pdma.json
  5. 4
    0
      src/main/java/com/example/civilizedcity/common/Constants.java
  6. 1
    1
      src/main/java/com/example/civilizedcity/controller/SysOrgController.java
  7. 1
    1
      src/main/java/com/example/civilizedcity/controller/SysPositionController.java
  8. 101
    0
      src/main/java/com/example/civilizedcity/controller/TaCheckItemAnController.java
  9. 58
    16
      src/main/java/com/example/civilizedcity/controller/TaCheckItemController.java
  10. 57
    35
      src/main/java/com/example/civilizedcity/controller/TaCheckItemQuController.java
  11. 34
    25
      src/main/java/com/example/civilizedcity/entity/TaCheckItem.java
  12. 45
    0
      src/main/java/com/example/civilizedcity/entity/TaCheckItemAn.java
  13. 6
    0
      src/main/java/com/example/civilizedcity/entity/TaCheckItemQu.java
  14. 16
    0
      src/main/java/com/example/civilizedcity/mapper/TaCheckItemAnMapper.java
  15. 16
    0
      src/main/java/com/example/civilizedcity/service/TaCheckItemAnService.java
  16. 3
    2
      src/main/java/com/example/civilizedcity/service/TaCheckItemQuService.java
  17. 43
    0
      src/main/java/com/example/civilizedcity/service/impl/TaCheckItemAnServiceImpl.java
  18. 14
    2
      src/main/java/com/example/civilizedcity/service/impl/TaCheckItemQuServiceImpl.java
  19. 6
    0
      src/main/resources/mapper/TaCheckItemAnMapper.xml

db/.back_文明创办/文明创办-backup-20221215163254.pdma.json → db/.back_文明创办/文明创办-backup-20221216155916.pdma.json Просмотреть файл

4
   "avatar": "",
4
   "avatar": "",
5
   "version": "4.1.4",
5
   "version": "4.1.4",
6
   "createdTime": "2022-12-12 09:36:12",
6
   "createdTime": "2022-12-12 09:36:12",
7
-  "updatedTime": "2022-12-15 16:32:52",
7
+  "updatedTime": "2022-12-16 09:30:29",
8
   "dbConns": [],
8
   "dbConns": [],
9
   "profile": {
9
   "profile": {
10
     "default": {
10
     "default": {
4646
           "id": "0EF50BA7-C44F-4D9E-A28D-F94C3D15350F"
4646
           "id": "0EF50BA7-C44F-4D9E-A28D-F94C3D15350F"
4647
         },
4647
         },
4648
         {
4648
         {
4649
-          "defKey": "expire_date",
4649
+          "defKey": "start_date",
4650
+          "defName": "开始日期",
4651
+          "comment": "YYYY-MM-DD",
4652
+          "type": "VARCHAR",
4653
+          "len": 20,
4654
+          "scale": "",
4655
+          "primaryKey": false,
4656
+          "notNull": false,
4657
+          "autoIncrement": false,
4658
+          "defaultValue": "",
4659
+          "hideInGraph": false,
4660
+          "refDict": "",
4661
+          "extProps": {},
4662
+          "domain": "",
4663
+          "id": "79224057-EA94-4244-B887-4A046ACE7B35"
4664
+        },
4665
+        {
4666
+          "defKey": "end_date",
4650
           "defName": "截止时间",
4667
           "defName": "截止时间",
4651
           "comment": "YYYY-MM-DD",
4668
           "comment": "YYYY-MM-DD",
4652
           "type": "VARCHAR",
4669
           "type": "VARCHAR",

db/.back_文明创办/文明创办-backup-20221216093029.pdma.json → db/.back_文明创办/文明创办-backup-20221216202913.pdma.json Просмотреть файл

4
   "avatar": "",
4
   "avatar": "",
5
   "version": "4.1.4",
5
   "version": "4.1.4",
6
   "createdTime": "2022-12-12 09:36:12",
6
   "createdTime": "2022-12-12 09:36:12",
7
-  "updatedTime": "2022-12-15 16:32:54",
7
+  "updatedTime": "2022-12-16 15:59:16",
8
   "dbConns": [],
8
   "dbConns": [],
9
   "profile": {
9
   "profile": {
10
     "default": {
10
     "default": {
4646
           "id": "0EF50BA7-C44F-4D9E-A28D-F94C3D15350F"
4646
           "id": "0EF50BA7-C44F-4D9E-A28D-F94C3D15350F"
4647
         },
4647
         },
4648
         {
4648
         {
4649
-          "defKey": "expire_date",
4649
+          "defKey": "start_date",
4650
+          "defName": "开始日期",
4651
+          "comment": "YYYY-MM-DD",
4652
+          "type": "VARCHAR",
4653
+          "len": 20,
4654
+          "scale": "",
4655
+          "primaryKey": false,
4656
+          "notNull": false,
4657
+          "autoIncrement": false,
4658
+          "defaultValue": "",
4659
+          "hideInGraph": false,
4660
+          "refDict": "",
4661
+          "extProps": {},
4662
+          "domain": "",
4663
+          "id": "79224057-EA94-4244-B887-4A046ACE7B35"
4664
+        },
4665
+        {
4666
+          "defKey": "end_date",
4650
           "defName": "截止时间",
4667
           "defName": "截止时间",
4651
           "comment": "YYYY-MM-DD",
4668
           "comment": "YYYY-MM-DD",
4652
           "type": "VARCHAR",
4669
           "type": "VARCHAR",
5063
           "domain": "73FD2BAD-2358-4336-B96D-45DC897BD792",
5080
           "domain": "73FD2BAD-2358-4336-B96D-45DC897BD792",
5064
           "id": "3274DF40-5C9F-49E0-8013-A8F8FC5B401A"
5081
           "id": "3274DF40-5C9F-49E0-8013-A8F8FC5B401A"
5065
         },
5082
         },
5083
+        {
5084
+          "defKey": "type_id",
5085
+          "defName": "点位ID",
5086
+          "comment": "",
5087
+          "type": "",
5088
+          "len": "",
5089
+          "scale": "",
5090
+          "primaryKey": false,
5091
+          "notNull": false,
5092
+          "autoIncrement": false,
5093
+          "defaultValue": "",
5094
+          "hideInGraph": false,
5095
+          "refDict": "",
5096
+          "extProps": {},
5097
+          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
5098
+          "id": "9E210B7C-B1A2-43DB-A734-11B2FA544C96"
5099
+        },
5066
         {
5100
         {
5067
           "defKey": "name",
5101
           "defKey": "name",
5068
           "defName": "名称",
5102
           "defName": "名称",

db/.back_文明创办/文明创办-backup-20221215163252.pdma.json → db/.back_文明创办/文明创办-backup-20221216202942.pdma.json Просмотреть файл

4
   "avatar": "",
4
   "avatar": "",
5
   "version": "4.1.4",
5
   "version": "4.1.4",
6
   "createdTime": "2022-12-12 09:36:12",
6
   "createdTime": "2022-12-12 09:36:12",
7
-  "updatedTime": "2022-12-15 11:04:55",
7
+  "updatedTime": "2022-12-16 20:29:13",
8
   "dbConns": [],
8
   "dbConns": [],
9
   "profile": {
9
   "profile": {
10
     "default": {
10
     "default": {
2408
           "id": "31357233-866E-45C4-867D-1F11AD8CF851"
2408
           "id": "31357233-866E-45C4-867D-1F11AD8CF851"
2409
         },
2409
         },
2410
         {
2410
         {
2411
-          "defKey": "resource_p_id",
2411
+          "defKey": "parent_id",
2412
           "defName": "上级ID",
2412
           "defName": "上级ID",
2413
           "comment": "",
2413
           "comment": "",
2414
           "type": "",
2414
           "type": "",
4646
           "id": "0EF50BA7-C44F-4D9E-A28D-F94C3D15350F"
4646
           "id": "0EF50BA7-C44F-4D9E-A28D-F94C3D15350F"
4647
         },
4647
         },
4648
         {
4648
         {
4649
-          "defKey": "expire_date",
4649
+          "defKey": "start_date",
4650
+          "defName": "开始日期",
4651
+          "comment": "YYYY-MM-DD",
4652
+          "type": "VARCHAR",
4653
+          "len": 20,
4654
+          "scale": "",
4655
+          "primaryKey": false,
4656
+          "notNull": false,
4657
+          "autoIncrement": false,
4658
+          "defaultValue": "",
4659
+          "hideInGraph": false,
4660
+          "refDict": "",
4661
+          "extProps": {},
4662
+          "domain": "",
4663
+          "id": "79224057-EA94-4244-B887-4A046ACE7B35"
4664
+        },
4665
+        {
4666
+          "defKey": "end_date",
4650
           "defName": "截止时间",
4667
           "defName": "截止时间",
4651
           "comment": "YYYY-MM-DD",
4668
           "comment": "YYYY-MM-DD",
4652
           "type": "VARCHAR",
4669
           "type": "VARCHAR",
5063
           "domain": "73FD2BAD-2358-4336-B96D-45DC897BD792",
5080
           "domain": "73FD2BAD-2358-4336-B96D-45DC897BD792",
5064
           "id": "3274DF40-5C9F-49E0-8013-A8F8FC5B401A"
5081
           "id": "3274DF40-5C9F-49E0-8013-A8F8FC5B401A"
5065
         },
5082
         },
5083
+        {
5084
+          "defKey": "type_id",
5085
+          "defName": "点位ID",
5086
+          "comment": "",
5087
+          "type": "",
5088
+          "len": "",
5089
+          "scale": "",
5090
+          "primaryKey": false,
5091
+          "notNull": false,
5092
+          "autoIncrement": false,
5093
+          "defaultValue": "",
5094
+          "hideInGraph": false,
5095
+          "refDict": "",
5096
+          "extProps": {},
5097
+          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
5098
+          "id": "9E210B7C-B1A2-43DB-A734-11B2FA544C96"
5099
+        },
5066
         {
5100
         {
5067
           "defKey": "name",
5101
           "defKey": "name",
5068
           "defName": "名称",
5102
           "defName": "名称",
7004
       "id": "507794C4-11E9-4924-AEC5-368BC6E03FD7",
7038
       "id": "507794C4-11E9-4924-AEC5-368BC6E03FD7",
7005
       "env": {
7039
       "env": {
7006
         "base": {
7040
         "base": {
7007
-          "nameSpace": "",
7008
-          "codeRoot": ""
7009
-        }
7041
+          "nameSpace": "com.example.civilizedcity",
7042
+          "codeRoot": "TaCheckItemAn"
7043
+        },
7044
+        "template": {
7045
+          "JavaMybatisPlus": {
7046
+            "Controller": {
7047
+              "suffix": "controller/{{=it.codeRoot}}Controller.java"
7048
+            },
7049
+            "Service": {
7050
+              "suffix": "service/{{=it.codeRoot}}Service.java"
7051
+            },
7052
+            "ServiceImpl": {
7053
+              "suffix": "service/impl/{{=it. codeRoot}}ServiceImpl.java"
7054
+            },
7055
+            "Mapper": {
7056
+              "suffix": "mapper/{{=it.codeRoot}}Mapper.java"
7057
+            },
7058
+            "Mapper.xml": {
7059
+              "suffix": "mapper/{{=it.codeRoot}}Mapper.xml"
7060
+            },
7061
+            "Entity": {
7062
+              "suffix": "entity/{{=it.codeRoot}}.java"
7063
+            }
7064
+          }
7065
+        },
7066
+        "custom": {}
7010
       },
7067
       },
7011
       "defKey": "ta_check_item_an",
7068
       "defKey": "ta_check_item_an",
7012
       "defName": "项目问题答案",
7069
       "defName": "项目问题答案",
7089
           "scale": "",
7146
           "scale": "",
7090
           "primaryKey": true,
7147
           "primaryKey": true,
7091
           "notNull": true,
7148
           "notNull": true,
7092
-          "autoIncrement": true,
7149
+          "autoIncrement": false,
7093
           "defaultValue": "",
7150
           "defaultValue": "",
7094
           "hideInGraph": true,
7151
           "hideInGraph": true,
7095
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
7152
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",

+ 45
- 5
db/文明创办.pdma.json Просмотреть файл

4
   "avatar": "",
4
   "avatar": "",
5
   "version": "4.1.4",
5
   "version": "4.1.4",
6
   "createdTime": "2022-12-12 09:36:12",
6
   "createdTime": "2022-12-12 09:36:12",
7
-  "updatedTime": "2022-12-16 09:30:29",
7
+  "updatedTime": "2022-12-16 20:29:42",
8
   "dbConns": [],
8
   "dbConns": [],
9
   "profile": {
9
   "profile": {
10
     "default": {
10
     "default": {
5080
           "domain": "73FD2BAD-2358-4336-B96D-45DC897BD792",
5080
           "domain": "73FD2BAD-2358-4336-B96D-45DC897BD792",
5081
           "id": "3274DF40-5C9F-49E0-8013-A8F8FC5B401A"
5081
           "id": "3274DF40-5C9F-49E0-8013-A8F8FC5B401A"
5082
         },
5082
         },
5083
+        {
5084
+          "defKey": "type_id",
5085
+          "defName": "点位ID",
5086
+          "comment": "",
5087
+          "type": "",
5088
+          "len": "",
5089
+          "scale": "",
5090
+          "primaryKey": false,
5091
+          "notNull": false,
5092
+          "autoIncrement": false,
5093
+          "defaultValue": "",
5094
+          "hideInGraph": false,
5095
+          "refDict": "",
5096
+          "extProps": {},
5097
+          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
5098
+          "id": "9E210B7C-B1A2-43DB-A734-11B2FA544C96"
5099
+        },
5083
         {
5100
         {
5084
           "defKey": "name",
5101
           "defKey": "name",
5085
           "defName": "名称",
5102
           "defName": "名称",
7021
       "id": "507794C4-11E9-4924-AEC5-368BC6E03FD7",
7038
       "id": "507794C4-11E9-4924-AEC5-368BC6E03FD7",
7022
       "env": {
7039
       "env": {
7023
         "base": {
7040
         "base": {
7024
-          "nameSpace": "",
7025
-          "codeRoot": ""
7026
-        }
7041
+          "nameSpace": "com.example.civilizedcity",
7042
+          "codeRoot": "TaCheckItemAn"
7043
+        },
7044
+        "template": {
7045
+          "JavaMybatisPlus": {
7046
+            "Controller": {
7047
+              "suffix": "controller/{{=it.codeRoot}}Controller.java"
7048
+            },
7049
+            "Service": {
7050
+              "suffix": "service/{{=it.codeRoot}}Service.java"
7051
+            },
7052
+            "ServiceImpl": {
7053
+              "suffix": "service/impl/{{=it. codeRoot}}ServiceImpl.java"
7054
+            },
7055
+            "Mapper": {
7056
+              "suffix": "mapper/{{=it.codeRoot}}Mapper.java"
7057
+            },
7058
+            "Mapper.xml": {
7059
+              "suffix": "mapper/{{=it.codeRoot}}Mapper.xml"
7060
+            },
7061
+            "Entity": {
7062
+              "suffix": "entity/{{=it.codeRoot}}.java"
7063
+            }
7064
+          }
7065
+        },
7066
+        "custom": {}
7027
       },
7067
       },
7028
       "defKey": "ta_check_item_an",
7068
       "defKey": "ta_check_item_an",
7029
       "defName": "项目问题答案",
7069
       "defName": "项目问题答案",
7106
           "scale": "",
7146
           "scale": "",
7107
           "primaryKey": true,
7147
           "primaryKey": true,
7108
           "notNull": true,
7148
           "notNull": true,
7109
-          "autoIncrement": true,
7149
+          "autoIncrement": false,
7110
           "defaultValue": "",
7150
           "defaultValue": "",
7111
           "hideInGraph": true,
7151
           "hideInGraph": true,
7112
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
7152
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",

+ 4
- 0
src/main/java/com/example/civilizedcity/common/Constants.java Просмотреть файл

6
     public final static int STATUS_DELETE = -1;
6
     public final static int STATUS_DELETE = -1;
7
     public final static int STATUS_READY = 0;
7
     public final static int STATUS_READY = 0;
8
     public final static int STATUS_NORMAL = 1;
8
     public final static int STATUS_NORMAL = 1;
9
+
10
+
11
+    public final static String CHECK_ITEM_LOC = "loc";  // 实例调研
12
+    public final static String CHECK_ITEM_SURVEY = "survey";  // 问卷调研
9
 }
13
 }

+ 1
- 1
src/main/java/com/example/civilizedcity/controller/SysOrgController.java Просмотреть файл

61
 
61
 
62
         IPage<SysOrg> pg = new Page<>(pageNum, pageSize);
62
         IPage<SysOrg> pg = new Page<>(pageNum, pageSize);
63
         QueryWrapper<SysOrg> queryWrapper = new QueryWrapper<>();
63
         QueryWrapper<SysOrg> queryWrapper = new QueryWrapper<>();
64
-        queryWrapper.like(StringUtils.isEmpty(name), "name", name);
64
+        queryWrapper.like(!StringUtils.isEmpty(name), "name", name);
65
         queryWrapper.gt("status", Constants.STATUS_DELETE);
65
         queryWrapper.gt("status", Constants.STATUS_DELETE);
66
         queryWrapper.orderByDesc("create_date");
66
         queryWrapper.orderByDesc("create_date");
67
         IPage<SysOrg> result = sysOrgService.page(pg, queryWrapper);
67
         IPage<SysOrg> result = sysOrgService.page(pg, queryWrapper);

+ 1
- 1
src/main/java/com/example/civilizedcity/controller/SysPositionController.java Просмотреть файл

120
             return ResponseBean.error("名称已存在");
120
             return ResponseBean.error("名称已存在");
121
         }
121
         }
122
 
122
 
123
-        sysPosition.setPositionPId(id);
123
+        sysPosition.setPositionId(id);
124
         sysPositionService.updateById(sysPosition);
124
         sysPositionService.updateById(sysPosition);
125
         return ResponseBean.success(sysPosition);
125
         return ResponseBean.success(sysPosition);
126
     }
126
     }

+ 101
- 0
src/main/java/com/example/civilizedcity/controller/TaCheckItemAnController.java Просмотреть файл

1
+package com.example.civilizedcity.controller;
2
+
3
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4
+import com.baomidou.mybatisplus.core.metadata.IPage;
5
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
+import com.example.civilizedcity.common.BaseController;
7
+import com.example.civilizedcity.common.ResponseBean;
8
+import java.util.List;
9
+import io.swagger.annotations.Api;
10
+import io.swagger.annotations.ApiOperation;
11
+import io.swagger.annotations.ApiParam;
12
+import org.springframework.beans.factory.annotation.Autowired;
13
+import org.springframework.web.bind.annotation.*;
14
+import com.example.civilizedcity.entity.TaCheckItemAn;
15
+import com.example.civilizedcity.service.TaCheckItemAnService;
16
+
17
+ /**
18
+ * 项目问题答案;(ta_check_item_an)表控制层
19
+ * @author : http://njyunzhi.com
20
+ * @date : 2022-12-16
21
+ */
22
+@Api(tags = "项目问题答案对象功能接口")
23
+@RestController
24
+@RequestMapping("/")
25
+public class TaCheckItemAnController extends BaseController {
26
+    
27
+    @Autowired
28
+    private TaCheckItemAnService taCheckItemAnService;
29
+    
30
+    /** 
31
+     * 通过ID查询单条数据 
32
+     *
33
+     * @param answerId 主键
34
+     * @return 实例对象
35
+     */
36
+    @ApiOperation("通过ID查询单条数据")
37
+    @GetMapping("/taCheckItemAn/{id}")
38
+    public ResponseBean queryById(@ApiParam("对象ID") @PathVariable String id) throws Exception {
39
+        return ResponseBean.success(taCheckItemAnService.getById(id));
40
+    }
41
+    
42
+    /** 
43
+     * 分页查询
44
+     *
45
+     * @param pageNum 当前页码
46
+     * @param pageSize 每页条数
47
+     * @return 查询结果
48
+     */
49
+    @ApiOperation("分页查询")
50
+    @GetMapping("/taCheckItemAn")
51
+    public ResponseBean list(@ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
52
+                            @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize) throws Exception {
53
+        
54
+        IPage<TaCheckItemAn> pg = new Page<>(pageNum, pageSize);
55
+        // QueryWrapper<TaCheckItemAn> queryWrapper = new QueryWrapper<>();
56
+        // queryWrapper.orderByDesc("create_date");
57
+        IPage<TaCheckItemAn> result = taCheckItemAnService.page(pg);
58
+        
59
+        return ResponseBean.success(result);
60
+    }
61
+    
62
+    /** 
63
+     * 新增数据
64
+     *
65
+     * @param taCheckItemAn 实例对象
66
+     * @return 实例对象
67
+     */
68
+    @ApiOperation("新增数据")
69
+    @PostMapping("/taCheckItemAn")
70
+    public ResponseBean add(@ApiParam("对象实体") @RequestBody TaCheckItemAn taCheckItemAn) throws Exception {
71
+        taCheckItemAnService.save(taCheckItemAn);
72
+        return ResponseBean.success(taCheckItemAn);
73
+    }
74
+    
75
+    /** 
76
+     * 更新数据
77
+     *
78
+     * @param taCheckItemAn 实例对象
79
+     * @return 实例对象
80
+     */
81
+    @ApiOperation("更新数据")
82
+    @PutMapping("/taCheckItemAn/{id}")
83
+    public ResponseBean edit(@ApiParam("对象实体") @RequestBody TaCheckItemAn taCheckItemAn,
84
+                            @ApiParam("对象ID") @PathVariable String id ) throws Exception {
85
+        taCheckItemAnService.updateById(taCheckItemAn);
86
+        return ResponseBean.success(taCheckItemAn);
87
+    }
88
+    
89
+    /** 
90
+     * 通过主键删除数据
91
+     *
92
+     * @param answerId 主键
93
+     * @return 是否成功
94
+     */
95
+    @ApiOperation("通过主键删除数据")
96
+    @DeleteMapping("/taCheckItemAn/{id}")
97
+    public ResponseBean deleteById(@ApiParam("对象ID") @PathVariable String id){
98
+        taCheckItemAnService.removeLogicById(id);
99
+        return ResponseBean.success("success");
100
+    }
101
+}

+ 58
- 16
src/main/java/com/example/civilizedcity/controller/TaCheckItemController.java Просмотреть файл

4
 import com.baomidou.mybatisplus.core.metadata.IPage;
4
 import com.baomidou.mybatisplus.core.metadata.IPage;
5
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
5
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
 import com.example.civilizedcity.common.BaseController;
6
 import com.example.civilizedcity.common.BaseController;
7
+import com.example.civilizedcity.common.Constants;
7
 import com.example.civilizedcity.common.ResponseBean;
8
 import com.example.civilizedcity.common.ResponseBean;
9
+
10
+import java.time.LocalDateTime;
8
 import java.util.List;
11
 import java.util.List;
12
+
13
+import com.example.civilizedcity.common.StringUtils;
9
 import io.swagger.annotations.Api;
14
 import io.swagger.annotations.Api;
10
 import io.swagger.annotations.ApiOperation;
15
 import io.swagger.annotations.ApiOperation;
11
 import io.swagger.annotations.ApiParam;
16
 import io.swagger.annotations.ApiParam;
27
     @Autowired
32
     @Autowired
28
     private TaCheckItemService taCheckItemService;
33
     private TaCheckItemService taCheckItemService;
29
     
34
     
30
-    /** 
31
-     * 通过ID查询单条数据 
35
+    /**
36
+     * 通过ID查询单条数据
32
      *
37
      *
33
      * @param itemId 主键
38
      * @param itemId 主键
34
      * @return 实例对象
39
      * @return 实例对象
38
     public ResponseBean queryById(@ApiParam("对象ID") @PathVariable String id) throws Exception {
43
     public ResponseBean queryById(@ApiParam("对象ID") @PathVariable String id) throws Exception {
39
         return ResponseBean.success(taCheckItemService.getById(id));
44
         return ResponseBean.success(taCheckItemService.getById(id));
40
     }
45
     }
46
+
47
+     /**
48
+      * 通过测评以及点位查询数据
49
+      *
50
+      * @param checkId 测评ID
51
+      * @param typeId 点位ID
52
+      * @return 实例对象
53
+      */
54
+     @ApiOperation("通过测评以及点位查询数据")
55
+     @GetMapping("/taCheck/{checkId}/item/{typeId}")
56
+     public ResponseBean queryByCheckId(@ApiParam("测评ID") @PathVariable String checkId,
57
+                                        @ApiParam("点位ID") @PathVariable String typeId) throws Exception {
58
+
59
+         return ResponseBean.success(getByCheckAndType(checkId, typeId));
60
+     }
61
+
62
+     private TaCheckItem getByCheckAndType(String checkId, String typeId) {
63
+         QueryWrapper<TaCheckItem> queryWrapper = new QueryWrapper<>();
64
+         queryWrapper.eq("check_id", checkId);
65
+         queryWrapper.eq("item_type", Constants.CHECK_ITEM_LOC); // 只查点位
66
+         queryWrapper.eq("type_id", typeId);
67
+         queryWrapper.gt("status", Constants.STATUS_DELETE);
68
+
69
+        return taCheckItemService.getOne(queryWrapper);
70
+     }
41
     
71
     
42
     /** 
72
     /** 
43
      * 分页查询
73
      * 分页查询
68
     @ApiOperation("新增数据")
98
     @ApiOperation("新增数据")
69
     @PostMapping("/taCheckItem")
99
     @PostMapping("/taCheckItem")
70
     public ResponseBean add(@ApiParam("对象实体") @RequestBody TaCheckItem taCheckItem) throws Exception {
100
     public ResponseBean add(@ApiParam("对象实体") @RequestBody TaCheckItem taCheckItem) throws Exception {
71
-        taCheckItemService.save(taCheckItem);
101
+
102
+        TaCheckItem origin = getByCheckAndType(taCheckItem.getCheckId(), taCheckItem.getItemId());
103
+        if (null == origin) {
104
+            // 新增
105
+            taCheckItem.setStatus(Constants.STATUS_NORMAL);
106
+            taCheckItem.setCreateDate(LocalDateTime.now());
107
+            taCheckItemService.save(taCheckItem);
108
+        } else {
109
+            // 更新
110
+            taCheckItem.setItemId((origin.getItemId()));
111
+            taCheckItemService.updateById(taCheckItem);
112
+        }
113
+
72
         return ResponseBean.success(taCheckItem);
114
         return ResponseBean.success(taCheckItem);
73
     }
115
     }
74
     
116
     
75
-    /** 
76
-     * 更新数据
77
-     *
78
-     * @param taCheckItem 实例对象
79
-     * @return 实例对象
80
-     */
81
-    @ApiOperation("更新数据")
82
-    @PutMapping("/taCheckItem/{id}")
83
-    public ResponseBean edit(@ApiParam("对象实体") @RequestBody TaCheckItem taCheckItem,
84
-                            @ApiParam("对象ID") @PathVariable String id ) throws Exception {
85
-        taCheckItemService.updateById(taCheckItem);
86
-        return ResponseBean.success(taCheckItem);
87
-    }
117
+//    /**
118
+//     * 更新数据
119
+//     *
120
+//     * @param taCheckItem 实例对象
121
+//     * @return 实例对象
122
+//     */
123
+//    @ApiOperation("更新数据")
124
+//    @PutMapping("/taCheckItem/{id}")
125
+//    public ResponseBean edit(@ApiParam("对象实体") @RequestBody TaCheckItem taCheckItem,
126
+//                            @ApiParam("对象ID") @PathVariable String id ) throws Exception {
127
+//        taCheckItemService.updateById(taCheckItem);
128
+//        return ResponseBean.success(taCheckItem);
129
+//    }
88
     
130
     
89
     /** 
131
     /** 
90
      * 通过主键删除数据
132
      * 通过主键删除数据

+ 57
- 35
src/main/java/com/example/civilizedcity/controller/TaCheckItemQuController.java Просмотреть файл

5
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
5
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
 import com.example.civilizedcity.common.BaseController;
6
 import com.example.civilizedcity.common.BaseController;
7
 import com.example.civilizedcity.common.ResponseBean;
7
 import com.example.civilizedcity.common.ResponseBean;
8
+
8
 import java.util.List;
9
 import java.util.List;
10
+
11
+import com.example.civilizedcity.common.StringUtils;
12
+import com.example.civilizedcity.service.TaCheckItemAnService;
9
 import io.swagger.annotations.Api;
13
 import io.swagger.annotations.Api;
10
 import io.swagger.annotations.ApiOperation;
14
 import io.swagger.annotations.ApiOperation;
11
 import io.swagger.annotations.ApiParam;
15
 import io.swagger.annotations.ApiParam;
14
 import com.example.civilizedcity.entity.TaCheckItemQu;
18
 import com.example.civilizedcity.entity.TaCheckItemQu;
15
 import com.example.civilizedcity.service.TaCheckItemQuService;
19
 import com.example.civilizedcity.service.TaCheckItemQuService;
16
 
20
 
17
- /**
21
+/**
18
  * 点位问题;(ta_check_item_qu)表控制层
22
  * 点位问题;(ta_check_item_qu)表控制层
23
+ *
19
  * @author : http://njyunzhi.com
24
  * @author : http://njyunzhi.com
20
  * @date : 2022-12-13
25
  * @date : 2022-12-13
21
  */
26
  */
23
 @RestController
28
 @RestController
24
 @RequestMapping("/")
29
 @RequestMapping("/")
25
 public class TaCheckItemQuController extends BaseController {
30
 public class TaCheckItemQuController extends BaseController {
26
-    
31
+
27
     @Autowired
32
     @Autowired
28
     private TaCheckItemQuService taCheckItemQuService;
33
     private TaCheckItemQuService taCheckItemQuService;
29
-    
30
-    /** 
31
-     * 通过ID查询单条数据 
34
+
35
+    @Autowired
36
+    private TaCheckItemAnService taCheckItemAnService;
37
+
38
+    /**
39
+     * 通过ID查询单条数据
32
      *
40
      *
33
      * @param id 主键
41
      * @param id 主键
34
      * @return 实例对象
42
      * @return 实例对象
38
     public ResponseBean queryById(@ApiParam("对象ID") @PathVariable Integer id) throws Exception {
46
     public ResponseBean queryById(@ApiParam("对象ID") @PathVariable Integer id) throws Exception {
39
         return ResponseBean.success(taCheckItemQuService.getById(id));
47
         return ResponseBean.success(taCheckItemQuService.getById(id));
40
     }
48
     }
41
-    
42
-    /** 
49
+
50
+    /**
43
      * 分页查询
51
      * 分页查询
44
      *
52
      *
45
-     * @param pageNum 当前页码
53
+     * @param pageNum  当前页码
46
      * @param pageSize 每页条数
54
      * @param pageSize 每页条数
47
      * @return 查询结果
55
      * @return 查询结果
48
      */
56
      */
49
     @ApiOperation("分页查询")
57
     @ApiOperation("分页查询")
50
     @GetMapping("/taCheckItemQu")
58
     @GetMapping("/taCheckItemQu")
51
-    public ResponseBean list(@ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
52
-                            @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize) throws Exception {
53
-        
59
+    public ResponseBean list(@ApiParam("页码") @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
60
+                             @ApiParam("单页数据量") @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
61
+                             @ApiParam("点位ID") @RequestParam(value = "itemId") String itemId) throws Exception {
62
+
54
         IPage<TaCheckItemQu> pg = new Page<>(pageNum, pageSize);
63
         IPage<TaCheckItemQu> pg = new Page<>(pageNum, pageSize);
55
-        // QueryWrapper<TaCheckItemQu> queryWrapper = new QueryWrapper<>();
56
-        // queryWrapper.orderByDesc("create_date");
57
-        IPage<TaCheckItemQu> result = taCheckItemQuService.page(pg);
58
-        
64
+        QueryWrapper<TaCheckItemQu> queryWrapper = new QueryWrapper<>();
65
+        queryWrapper.eq("item_id", itemId);
66
+        queryWrapper.orderByDesc("sort_no");
67
+        IPage<TaCheckItemQu> result = taCheckItemQuService.page(pg, queryWrapper);
68
+
59
         return ResponseBean.success(result);
69
         return ResponseBean.success(result);
60
     }
70
     }
61
-    
62
-    /** 
71
+
72
+    /**
63
      * 新增数据
73
      * 新增数据
64
      *
74
      *
65
      * @param taCheckItemQu 实例对象
75
      * @param taCheckItemQu 实例对象
68
     @ApiOperation("新增数据")
78
     @ApiOperation("新增数据")
69
     @PostMapping("/taCheckItemQu")
79
     @PostMapping("/taCheckItemQu")
70
     public ResponseBean add(@ApiParam("对象实体") @RequestBody TaCheckItemQu taCheckItemQu) throws Exception {
80
     public ResponseBean add(@ApiParam("对象实体") @RequestBody TaCheckItemQu taCheckItemQu) throws Exception {
71
-        taCheckItemQuService.save(taCheckItemQu);
72
-        return ResponseBean.success(taCheckItemQu);
73
-    }
74
-    
75
-    /** 
76
-     * 更新数据
77
-     *
78
-     * @param taCheckItemQu 实例对象
79
-     * @return 实例对象
80
-     */
81
-    @ApiOperation("更新数据")
82
-    @PutMapping("/taCheckItemQu/{id}")
83
-    public ResponseBean edit(@ApiParam("对象实体") @RequestBody TaCheckItemQu taCheckItemQu,
84
-                            @ApiParam("对象ID") @PathVariable Integer id ) throws Exception {
85
-        taCheckItemQuService.updateById(taCheckItemQu);
81
+        String quId = taCheckItemQu.getQuId();
82
+
83
+        if (StringUtils.isEmpty(quId)) {
84
+            // 新增
85
+            int maxNo = taCheckItemQuService.getMaxNoBy(taCheckItemQu.getItemId());
86
+            taCheckItemQu.setSortNo(maxNo + 1);
87
+            taCheckItemQuService.save(taCheckItemQu);
88
+        } else {
89
+            taCheckItemQuService.updateById(taCheckItemQu);
90
+        }
91
+
92
+        taCheckItemAnService.mergeData(taCheckItemQu.getQuId(), taCheckItemQu.getAnswerList());
93
+
86
         return ResponseBean.success(taCheckItemQu);
94
         return ResponseBean.success(taCheckItemQu);
87
     }
95
     }
88
-    
89
-    /** 
96
+
97
+//    /**
98
+//     * 更新数据
99
+//     *
100
+//     * @param taCheckItemQu 实例对象
101
+//     * @return 实例对象
102
+//     */
103
+//    @ApiOperation("更新数据")
104
+//    @PutMapping("/taCheckItemQu/{id}")
105
+//    public ResponseBean edit(@ApiParam("对象实体") @RequestBody TaCheckItemQu taCheckItemQu,
106
+//                            @ApiParam("对象ID") @PathVariable Integer id ) throws Exception {
107
+//        taCheckItemQuService.updateById(taCheckItemQu);
108
+//        return ResponseBean.success(taCheckItemQu);
109
+//    }
110
+
111
+    /**
90
      * 通过主键删除数据
112
      * 通过主键删除数据
91
      *
113
      *
92
      * @param id 主键
114
      * @param id 主键
94
      */
116
      */
95
     @ApiOperation("通过主键删除数据")
117
     @ApiOperation("通过主键删除数据")
96
     @DeleteMapping("/taCheckItemQu/{id}")
118
     @DeleteMapping("/taCheckItemQu/{id}")
97
-    public ResponseBean deleteById(@ApiParam("对象ID") @PathVariable Integer id){
119
+    public ResponseBean deleteById(@ApiParam("对象ID") @PathVariable Integer id) {
98
         taCheckItemQuService.removeLogicById(id);
120
         taCheckItemQuService.removeLogicById(id);
99
         return ResponseBean.success("success");
121
         return ResponseBean.success("success");
100
     }
122
     }

+ 34
- 25
src/main/java/com/example/civilizedcity/entity/TaCheckItem.java Просмотреть файл

22
 @ApiModel(value = "测评点位",description = "")
22
 @ApiModel(value = "测评点位",description = "")
23
 @TableName("ta_check_item")
23
 @TableName("ta_check_item")
24
 public class TaCheckItem implements Serializable,Cloneable{
24
 public class TaCheckItem implements Serializable,Cloneable{
25
-      /** 点位ID */
26
-      @ApiModelProperty(name = "点位ID",notes = "")
27
-      @TableId(value = "item_id", type = IdType.INPUT)
28
-      private String itemId ;
29
-      /** 所属测评 */
30
-      @ApiModelProperty(name = "所属测评",notes = "")
31
-      private String checkId ;
32
-      /** 名称 */
33
-      @ApiModelProperty(name = "名称",notes = "")
34
-      private String name ;
35
-      /** 满分 */
36
-      @ApiModelProperty(name = "满分",notes = "")
37
-      private Double score ;
38
-      /** 事件份数 */
39
-      @ApiModelProperty(name = "事件份数",notes = "")
40
-      private Integer examinationNum ;
41
-      /** 状态 */
42
-      @ApiModelProperty(name = "状态",notes = "")
43
-      private Integer status ;
44
-      /** 创建人 */
45
-      @ApiModelProperty(name = "创建人",notes = "")
46
-      private String createUser ;
47
-      /** 创建时间 */
48
-      @ApiModelProperty(name = "创建时间",notes = "")
49
-      private LocalDateTime createDate ;
25
+       /** 点位ID */
26
+       @ApiModelProperty(name = "点位ID",notes = "")
27
+       @TableId(value = "item_id", type = IdType.ASSIGN_UUID)
28
+       private String itemId ;
29
+       /** 所属测评 */
30
+       @ApiModelProperty(name = "所属测评",notes = "")
31
+       private String checkId ;
32
+       /** 项目类型;loc点位,survey问卷调查 */
33
+       @ApiModelProperty(name = "项目类型",notes = "loc点位,survey问卷调查")
34
+       private String itemType ;
35
+        /** 点位ID */
36
+        @ApiModelProperty(name = "点位ID",notes = "")
37
+        private String typeId ;
38
+       /** 名称 */
39
+       @ApiModelProperty(name = "名称",notes = "")
40
+       private String name ;
41
+       /** 满分 */
42
+       @ApiModelProperty(name = "满分",notes = "")
43
+       private Double fullScore ;
44
+       /** 得分 */
45
+       @ApiModelProperty(name = "得分",notes = "")
46
+       private Double score ;
47
+       /** 数量 */
48
+       @ApiModelProperty(name = "数量",notes = "")
49
+       private Integer num ;
50
+       /** 状态 */
51
+       @ApiModelProperty(name = "状态",notes = "")
52
+       private Integer status ;
53
+       /** 创建人 */
54
+       @ApiModelProperty(name = "创建人",notes = "")
55
+       private String createUser ;
56
+       /** 创建时间 */
57
+       @ApiModelProperty(name = "创建时间",notes = "")
58
+       private LocalDateTime createDate ;
50
 
59
 
51
 }
60
 }

+ 45
- 0
src/main/java/com/example/civilizedcity/entity/TaCheckItemAn.java Просмотреть файл

1
+package com.example.civilizedcity.entity;
2
+
3
+import io.swagger.annotations.ApiModel;
4
+import io.swagger.annotations.ApiModelProperty;
5
+import com.baomidou.mybatisplus.annotation.IdType;
6
+import com.baomidou.mybatisplus.annotation.TableName;
7
+import com.baomidou.mybatisplus.annotation.TableId;
8
+import java.io.Serializable;
9
+import java.time.LocalDateTime;
10
+import lombok.Data;
11
+import lombok.EqualsAndHashCode;
12
+import lombok.experimental.Accessors;
13
+
14
+ /**
15
+ * 项目问题答案;
16
+ * @author : http://www.chiner.pro
17
+ * @date : 2022-12-16
18
+ */
19
+@Data
20
+@EqualsAndHashCode(callSuper = false)
21
+@Accessors(chain = true)
22
+@ApiModel(value = "项目问题答案",description = "")
23
+@TableName("ta_check_item_an")
24
+public class TaCheckItemAn implements Serializable,Cloneable{
25
+    /** 答案ID */
26
+    @ApiModelProperty(name = "答案ID",notes = "")
27
+    @TableId(value = "answer_id", type = IdType.ASSIGN_UUID)
28
+    private String answerId ;
29
+    /** 问题ID */
30
+    @ApiModelProperty(name = "问题ID",notes = "")
31
+    private String quId ;
32
+    /** 答案选项;ABCD等 */
33
+    @ApiModelProperty(name = "答案选项",notes = "ABCD等")
34
+    private String answerCode ;
35
+    /** 答案 */
36
+    @ApiModelProperty(name = "答案",notes = "")
37
+    private String answer ;
38
+    /** 分值 */
39
+    @ApiModelProperty(name = "分值",notes = "")
40
+    private Double score ;
41
+    /** 排序 */
42
+    @ApiModelProperty(name = "排序",notes = "")
43
+    private Integer sortNo ;
44
+
45
+}

+ 6
- 0
src/main/java/com/example/civilizedcity/entity/TaCheckItemQu.java Просмотреть файл

7
 import com.baomidou.mybatisplus.annotation.TableId;
7
 import com.baomidou.mybatisplus.annotation.TableId;
8
 import java.io.Serializable;
8
 import java.io.Serializable;
9
 import java.time.LocalDateTime;
9
 import java.time.LocalDateTime;
10
+import java.util.List;
11
+
10
 import lombok.Data;
12
 import lombok.Data;
11
 import lombok.EqualsAndHashCode;
13
 import lombok.EqualsAndHashCode;
12
 import lombok.experimental.Accessors;
14
 import lombok.experimental.Accessors;
51
      @ApiModelProperty(name = "序号",notes = "")
53
      @ApiModelProperty(name = "序号",notes = "")
52
      private Integer sortNo ;
54
      private Integer sortNo ;
53
 
55
 
56
+      /**
57
+       * 答案列表
58
+       */
59
+     List<TaCheckItemAn> answerList;
54
 }
60
 }

+ 16
- 0
src/main/java/com/example/civilizedcity/mapper/TaCheckItemAnMapper.java Просмотреть файл

1
+package com.example.civilizedcity.mapper;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import org.apache.ibatis.annotations.Mapper;
5
+import org.apache.ibatis.annotations.Param;
6
+import com.example.civilizedcity.entity.TaCheckItemAn;
7
+
8
+ /**
9
+ * 项目问题答案;(ta_check_item_an)表数据库访问层
10
+ * @author : http://njyunzhi.com
11
+ * @date : 2022-12-16
12
+ */
13
+@Mapper
14
+public interface TaCheckItemAnMapper  extends BaseMapper<TaCheckItemAn>{
15
+    
16
+}

+ 16
- 0
src/main/java/com/example/civilizedcity/service/TaCheckItemAnService.java Просмотреть файл

1
+package com.example.civilizedcity.service;
2
+
3
+import com.baomidou.mybatisplus.extension.service.IService;
4
+import com.example.civilizedcity.entity.TaCheckItemAn;
5
+
6
+import java.util.List;
7
+
8
+/**
9
+ * 项目问题答案;(ta_check_item_an)表服务接口
10
+ * @author : http://njyunzhi.com
11
+ * @date : 2022-12-16
12
+ */
13
+public interface TaCheckItemAnService extends IBaseService<TaCheckItemAn> {
14
+
15
+     boolean mergeData(String quId, List<TaCheckItemAn> answerList);
16
+ }

+ 3
- 2
src/main/java/com/example/civilizedcity/service/TaCheckItemQuService.java Просмотреть файл

9
  * @date : 2022-12-13
9
  * @date : 2022-12-13
10
  */
10
  */
11
 public interface TaCheckItemQuService extends IBaseService<TaCheckItemQu> {
11
 public interface TaCheckItemQuService extends IBaseService<TaCheckItemQu> {
12
-    
13
-}
12
+
13
+     int getMaxNoBy(String itemId);
14
+ }

+ 43
- 0
src/main/java/com/example/civilizedcity/service/impl/TaCheckItemAnServiceImpl.java Просмотреть файл

1
+package com.example.civilizedcity.service.impl;
2
+
3
+import com.example.civilizedcity.common.StringUtils;
4
+import com.example.civilizedcity.entity.SysRole;
5
+import com.example.civilizedcity.entity.SysUserRole;
6
+import org.springframework.beans.factory.annotation.Autowired;
7
+import org.springframework.stereotype.Service;
8
+import com.example.civilizedcity.entity.TaCheckItemAn;
9
+import com.example.civilizedcity.mapper.TaCheckItemAnMapper;
10
+import com.example.civilizedcity.service.TaCheckItemAnService;
11
+
12
+import java.util.ArrayList;
13
+import java.util.HashMap;
14
+import java.util.List;
15
+
16
+/**
17
+ * 项目问题答案;(ta_check_item_an)表服务实现类
18
+ *
19
+ * @author : http://www.chiner.pro
20
+ * @date : 2022-12-16
21
+ */
22
+@Service
23
+public class TaCheckItemAnServiceImpl extends BaseServiceImpl<TaCheckItemAnMapper, TaCheckItemAn> implements TaCheckItemAnService {
24
+
25
+    @Override
26
+    public boolean mergeData(String quId, List<TaCheckItemAn> answerList) {
27
+        if (StringUtils.isEmpty(quId)) return false;
28
+
29
+        // 先删除所有
30
+        baseMapper.deleteByMap(new HashMap<String, Object>() {{
31
+            put("qu_id", quId);
32
+        }});
33
+
34
+        for (int i = 0; i < answerList.size(); i ++) {
35
+            TaCheckItemAn item = answerList.get(i);
36
+            // 重新排序
37
+            item.setSortNo(i + 1);
38
+            save(item);
39
+        }
40
+
41
+        return true;
42
+    }
43
+}

+ 14
- 2
src/main/java/com/example/civilizedcity/service/impl/TaCheckItemQuServiceImpl.java Просмотреть файл

1
 package com.example.civilizedcity.service.impl;
1
 package com.example.civilizedcity.service.impl;
2
 
2
 
3
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
3
 import org.springframework.beans.factory.annotation.Autowired;
4
 import org.springframework.beans.factory.annotation.Autowired;
4
 import org.springframework.stereotype.Service;
5
 import org.springframework.stereotype.Service;
5
 import com.example.civilizedcity.entity.TaCheckItemQu;
6
 import com.example.civilizedcity.entity.TaCheckItemQu;
6
 import com.example.civilizedcity.mapper.TaCheckItemQuMapper;
7
 import com.example.civilizedcity.mapper.TaCheckItemQuMapper;
7
 import com.example.civilizedcity.service.TaCheckItemQuService;
8
 import com.example.civilizedcity.service.TaCheckItemQuService;
8
- /**
9
+
10
+/**
9
  * 点位问题;(ta_check_item_qu)表服务实现类
11
  * 点位问题;(ta_check_item_qu)表服务实现类
12
+ *
10
  * @author : http://www.chiner.pro
13
  * @author : http://www.chiner.pro
11
  * @date : 2022-12-13
14
  * @date : 2022-12-13
12
  */
15
  */
13
 @Service
16
 @Service
14
 public class TaCheckItemQuServiceImpl extends BaseServiceImpl<TaCheckItemQuMapper, TaCheckItemQu> implements TaCheckItemQuService {
17
 public class TaCheckItemQuServiceImpl extends BaseServiceImpl<TaCheckItemQuMapper, TaCheckItemQu> implements TaCheckItemQuService {
15
-    
18
+
19
+    @Override
20
+    public int getMaxNoBy(String itemId) {
21
+        QueryWrapper<TaCheckItemQu> queryWrapper = new QueryWrapper<>();
22
+        queryWrapper.eq("item_id", itemId);
23
+        queryWrapper.orderByDesc("sort_no");
24
+
25
+        TaCheckItemQu one = getOne(queryWrapper);
26
+        return null == one ? 0 : one.getSortNo();
27
+    }
16
 }
28
 }

+ 6
- 0
src/main/resources/mapper/TaCheckItemAnMapper.xml Просмотреть файл

1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+
4
+<mapper namespace="com.example.civilizedcity.mapper.TaCheckItemAnMapper">
5
+    
6
+</mapper>