Yansen 2 년 전
부모
커밋
770a32b705

db/.back_文明创办/文明创办-backup-202323151753.pdma.json → db/.back_文明创办/文明创办-backup-202326113238.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": "2023-2-3 14:29:50",
7
+  "updatedTime": "2023-2-5 10:46:48",
8
   "dbConns": [],
8
   "dbConns": [],
9
   "profile": {
9
   "profile": {
10
     "default": {
10
     "default": {
3640
           "notes": {},
3640
           "notes": {},
3641
           "id": "67B51317-2D33-4118-81AA-50D179CDF9E8"
3641
           "id": "67B51317-2D33-4118-81AA-50D179CDF9E8"
3642
         },
3642
         },
3643
+        {
3644
+          "defKey": "end_date",
3645
+          "defName": "办结日期",
3646
+          "comment": "",
3647
+          "type": "",
3648
+          "len": "",
3649
+          "scale": "",
3650
+          "primaryKey": false,
3651
+          "notNull": false,
3652
+          "autoIncrement": false,
3653
+          "defaultValue": "",
3654
+          "hideInGraph": false,
3655
+          "refDict": "",
3656
+          "extProps": {},
3657
+          "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC",
3658
+          "id": "82C054A9-86DD-4905-B241-92C1467C68A4"
3659
+        },
3643
         {
3660
         {
3644
           "defKey": "org_id",
3661
           "defKey": "org_id",
3645
           "defName": "责任单位",
3662
           "defName": "责任单位",
6845
           "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
6862
           "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
6846
           "id": "31758145-9BDD-4A20-904B-E70372F394E1"
6863
           "id": "31758145-9BDD-4A20-904B-E70372F394E1"
6847
         },
6864
         },
6865
+        {
6866
+          "defKey": "sex",
6867
+          "defName": "性别",
6868
+          "comment": "",
6869
+          "type": "VARCHAR",
6870
+          "len": 32,
6871
+          "scale": "",
6872
+          "primaryKey": false,
6873
+          "notNull": false,
6874
+          "autoIncrement": false,
6875
+          "defaultValue": "",
6876
+          "hideInGraph": false,
6877
+          "refDict": "",
6878
+          "extProps": {},
6879
+          "domain": "",
6880
+          "id": "18C56DEF-A828-486A-941B-A4167F5AB0BE"
6881
+        },
6882
+        {
6883
+          "defKey": "age",
6884
+          "defName": "年龄段",
6885
+          "comment": "",
6886
+          "type": "VARCHAR",
6887
+          "len": 64,
6888
+          "scale": "",
6889
+          "primaryKey": false,
6890
+          "notNull": false,
6891
+          "autoIncrement": false,
6892
+          "defaultValue": "",
6893
+          "hideInGraph": false,
6894
+          "refDict": "",
6895
+          "extProps": {},
6896
+          "domain": "",
6897
+          "id": "005ABCD0-A5E8-4F3B-87C9-3C90087A368F"
6898
+        },
6848
         {
6899
         {
6849
           "defKey": "score",
6900
           "defKey": "score",
6850
           "defName": "得分",
6901
           "defName": "得分",

+ 35
- 1
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": "2023-2-5 10:46:48",
7
+  "updatedTime": "2023-2-6 11:32:38",
8
   "dbConns": [],
8
   "dbConns": [],
9
   "profile": {
9
   "profile": {
10
     "default": {
10
     "default": {
8645
           "uiHint": "",
8645
           "uiHint": "",
8646
           "id": "219A66C3-6D3F-4F1E-A572-9E5294556142"
8646
           "id": "219A66C3-6D3F-4F1E-A572-9E5294556142"
8647
         },
8647
         },
8648
+        {
8649
+          "defKey": "loc_id",
8650
+          "defName": "点位ID",
8651
+          "comment": "",
8652
+          "type": "",
8653
+          "len": "",
8654
+          "scale": "",
8655
+          "primaryKey": false,
8656
+          "notNull": false,
8657
+          "autoIncrement": false,
8658
+          "defaultValue": "",
8659
+          "hideInGraph": false,
8660
+          "refDict": "",
8661
+          "extProps": {},
8662
+          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
8663
+          "id": "B93801A5-158E-41EC-9CC9-F2E586414C2A"
8664
+        },
8665
+        {
8666
+          "defKey": "loc_name",
8667
+          "defName": "点位名称",
8668
+          "comment": "",
8669
+          "type": "",
8670
+          "len": "",
8671
+          "scale": "",
8672
+          "primaryKey": false,
8673
+          "notNull": false,
8674
+          "autoIncrement": false,
8675
+          "defaultValue": "",
8676
+          "hideInGraph": false,
8677
+          "refDict": "",
8678
+          "extProps": {},
8679
+          "domain": "54611CCC-CA4B-42E1-9F32-4944C85B85A6",
8680
+          "id": "49BF27B0-A3B7-4D25-8B62-871DC3C7D4C0"
8681
+        },
8648
         {
8682
         {
8649
           "defKey": "content",
8683
           "defKey": "content",
8650
           "defName": "测评标准",
8684
           "defName": "测评标准",

+ 28
- 28
src/main/java/com/example/civilizedcity/controller/CommController.java 파일 보기

49
     public ResponseBean uploadImage(@ApiParam("客户端") @PathVariable String client,
49
     public ResponseBean uploadImage(@ApiParam("客户端") @PathVariable String client,
50
                                     @ApiParam("文件") @RequestParam("file") MultipartFile multipartFile,
50
                                     @ApiParam("文件") @RequestParam("file") MultipartFile multipartFile,
51
                                     @ApiParam("文件类型") @RequestParam(value = "fileType", defaultValue = "image") String fileType) throws Exception {
51
                                     @ApiParam("文件类型") @RequestParam(value = "fileType", defaultValue = "image") String fileType) throws Exception {
52
-//        try {
53
-//            String url = ossUtils.putObject(multipartFile);
54
-//
55
-//            Map<String, Object> resp = new HashMap<>();
56
-//            resp.put("url", url);
57
-//            resp.put("fileType", fileType);
58
-//            return ResponseBean.success(resp);
59
-//        } catch (IOException e) {
60
-//            return ResponseBean.error("上传图片失败: " + e.getMessage(), ResponseBean.ERROR_UNAVAILABLE);
61
-//        }
62
-
63
-
64
-        //获取文件名
65
-        String fileName = multipartFile.getOriginalFilename();
66
-        String newFileName = String.format("%s/%d-%s", getMonth(), System.currentTimeMillis(), fileName);
67
-
68
-        // 上传目录以日期分类
69
-        File tmp = new File(String.format("%s/%s", getUploadPath(), getMonth()));
70
-        if (!tmp.exists()) {
71
-            tmp.mkdir();
52
+        try {
53
+            String url = ossUtils.putObject(multipartFile);
54
+
55
+            Map<String, Object> resp = new HashMap<>();
56
+            resp.put("url", url);
57
+            resp.put("fileType", fileType);
58
+            return ResponseBean.success(resp);
59
+        } catch (IOException e) {
60
+            return ResponseBean.error("上传图片失败: " + e.getMessage(), ResponseBean.ERROR_UNAVAILABLE);
72
         }
61
         }
73
 
62
 
74
-        //
75
-        File upFile = new File(String.format("%s/%s", getUploadPath(), newFileName));
76
-        multipartFile.transferTo(upFile);
77
 
63
 
78
-        String url = String.format("%s/%s", uploadPrefix, newFileName);
79
-        return ResponseBean.success(new HashMap<String, Object>(){{
80
-            put("url", url);
81
-            put("fileType", fileType);
82
-        }});
64
+//        //获取文件名
65
+//        String fileName = multipartFile.getOriginalFilename();
66
+//        String newFileName = String.format("%s/%d-%s", getMonth(), System.currentTimeMillis(), fileName);
67
+//
68
+//        // 上传目录以日期分类
69
+//        File tmp = new File(String.format("%s/%s", getUploadPath(), getMonth()));
70
+//        if (!tmp.exists()) {
71
+//            tmp.mkdir();
72
+//        }
73
+//
74
+//        //
75
+//        File upFile = new File(String.format("%s/%s", getUploadPath(), newFileName));
76
+//        multipartFile.transferTo(upFile);
77
+//
78
+//        String url = String.format("%s/%s", uploadPrefix, newFileName);
79
+//        return ResponseBean.success(new HashMap<String, Object>(){{
80
+//            put("url", url);
81
+//            put("fileType", fileType);
82
+//        }});
83
     }
83
     }
84
 
84
 
85
     private String getUploadPath() {
85
     private String getUploadPath() {

+ 49
- 41
src/main/java/com/example/civilizedcity/controller/TaCheckStandController.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
+
8
 import java.util.List;
10
 import java.util.List;
11
+
12
+import com.example.civilizedcity.common.StringUtils;
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.TaCheckStand;
18
 import com.example.civilizedcity.entity.TaCheckStand;
15
 import com.example.civilizedcity.service.TaCheckStandService;
19
 import com.example.civilizedcity.service.TaCheckStandService;
16
 
20
 
17
- /**
21
+/**
18
  * 测评标准;(ta_check_stand)表控制层
22
  * 测评标准;(ta_check_stand)表控制层
23
+ *
19
  * @author : http://njyunzhi.com
24
  * @author : http://njyunzhi.com
20
  * @date : 2023-1-29
25
  * @date : 2023-1-29
21
  */
26
  */
23
 @RestController
28
 @RestController
24
 @RequestMapping("/")
29
 @RequestMapping("/")
25
 public class TaCheckStandController extends BaseController {
30
 public class TaCheckStandController extends BaseController {
26
-    
31
+
27
     @Autowired
32
     @Autowired
28
     private TaCheckStandService taCheckStandService;
33
     private TaCheckStandService taCheckStandService;
29
-    
30
-    /** 
31
-     * 通过ID查询单条数据 
34
+
35
+    /**
36
+     * 通过ID查询单条数据
32
      *
37
      *
33
      * @param statndId 主键
38
      * @param statndId 主键
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(taCheckStandService.getById(id));
44
         return ResponseBean.success(taCheckStandService.getById(id));
40
     }
45
     }
41
-    
42
-//    /**
43
-//     * 分页查询
44
-//     *
45
-//     * @param pageNum 当前页码
46
-//     * @param pageSize 每页条数
47
-//     * @return 查询结果
48
-//     */
49
-//    @ApiOperation("分页查询")
50
-//    @GetMapping("/taCheckStand")
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<TaCheckStand> pg = new Page<>(pageNum, pageSize);
55
-//        // QueryWrapper<TaCheckStand> queryWrapper = new QueryWrapper<>();
56
-//        // queryWrapper.orderByDesc("create_date");
57
-//        IPage<TaCheckStand> result = taCheckStandService.page(pg);
58
-//
59
-//        return ResponseBean.success(result);
60
-//    }
61
-//
62
-//    /**
63
-//     * 新增数据
64
-//     *
65
-//     * @param taCheckStand 实例对象
66
-//     * @return 实例对象
67
-//     */
68
-//    @ApiOperation("新增数据")
69
-//    @PostMapping("/taCheckStand")
70
-//    public ResponseBean add(@ApiParam("对象实体") @RequestBody TaCheckStand taCheckStand) throws Exception {
71
-//        taCheckStandService.save(taCheckStand);
72
-//        return ResponseBean.success(taCheckStand);
73
-//    }
74
-    
75
-    /** 
46
+
47
+    /**
48
+     * 分页查询
49
+     *
50
+     * @param pageNum  当前页码
51
+     * @param pageSize 每页条数
52
+     * @return 查询结果
53
+     */
54
+    @ApiOperation("分页查询")
55
+    @GetMapping("/taCheckStand")
56
+    public ResponseBean list(@ApiParam("页码") @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
57
+                             @ApiParam("单页数据量") @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
58
+                             @ApiParam("点位ID") @RequestParam(value = "locId", required = false) String locId) throws Exception {
59
+
60
+        IPage<TaCheckStand> pg = new Page<>(pageNum, pageSize);
61
+        QueryWrapper<TaCheckStand> queryWrapper = new QueryWrapper<>();
62
+        queryWrapper.eq(StringUtils.isNotEmpty(locId), "loc_id", locId);
63
+        queryWrapper.eq("status", Constants.STATUS_NORMAL);
64
+        queryWrapper.orderByDesc("create_date");
65
+        IPage<TaCheckStand> result = taCheckStandService.page(pg);
66
+
67
+        return ResponseBean.success(result);
68
+    }
69
+
70
+    /**
71
+     * 新增数据
72
+     *
73
+     * @param taCheckStand 实例对象
74
+     * @return 实例对象
75
+     */
76
+    @ApiOperation("新增数据")
77
+    @PostMapping("/taCheckStand")
78
+    public ResponseBean add(@ApiParam("对象实体") @RequestBody TaCheckStand taCheckStand) throws Exception {
79
+        taCheckStandService.save(taCheckStand);
80
+        return ResponseBean.success(taCheckStand);
81
+    }
82
+
83
+    /**
76
      * 更新数据
84
      * 更新数据
77
      *
85
      *
78
      * @param taCheckStand 实例对象
86
      * @param taCheckStand 实例对象
81
     @ApiOperation("更新数据")
89
     @ApiOperation("更新数据")
82
     @PutMapping("/taCheckStand/{id}")
90
     @PutMapping("/taCheckStand/{id}")
83
     public ResponseBean edit(@ApiParam("对象实体") @RequestBody TaCheckStand taCheckStand,
91
     public ResponseBean edit(@ApiParam("对象实体") @RequestBody TaCheckStand taCheckStand,
84
-                            @ApiParam("对象ID") @PathVariable String id ) throws Exception {
92
+                             @ApiParam("对象ID") @PathVariable String id) throws Exception {
85
         taCheckStand.setStatndId(id);
93
         taCheckStand.setStatndId(id);
86
         taCheckStandService.updateById(taCheckStand);
94
         taCheckStandService.updateById(taCheckStand);
87
         return ResponseBean.success(taCheckStand);
95
         return ResponseBean.success(taCheckStand);

+ 9
- 3
src/main/java/com/example/civilizedcity/entity/TaCheckStand.java 파일 보기

26
     @ApiModelProperty(name = "标准ID",notes = "")
26
     @ApiModelProperty(name = "标准ID",notes = "")
27
     @TableId(value = "statnd_id", type = IdType.ASSIGN_UUID)
27
     @TableId(value = "statnd_id", type = IdType.ASSIGN_UUID)
28
     private String statndId ;
28
     private String statndId ;
29
-    /** 测评标准 */
30
-    @ApiModelProperty(name = "测评标准",notes = "")
31
-    private String content ;
29
+     /** 点位ID */
30
+     @ApiModelProperty(name = "点位ID",notes = "")
31
+     private String locId ;
32
+     /** 点位名称 */
33
+     @ApiModelProperty(name = "点位名称",notes = "")
34
+     private String locName ;
35
+     /** 测评标准 */
36
+     @ApiModelProperty(name = "测评标准",notes = "")
37
+     private String content ;
32
     /** 状态 */
38
     /** 状态 */
33
     @ApiModelProperty(name = "状态",notes = "")
39
     @ApiModelProperty(name = "状态",notes = "")
34
     private Integer status ;
40
     private Integer status ;