Yansen 2 年前
父节点
当前提交
64ec50f539
共有 56 个文件被更改,包括 2355 次插入856 次删除
  1. 357
    103
      db/.back_文明创办/文明创办-backup-20221215110455.pdma.json
  2. 360
    106
      db/.back_文明创办/文明创办-backup-20221215163252.pdma.json
  3. 373
    102
      db/.back_文明创办/文明创办-backup-20221215163254.pdma.json
  4. 358
    104
      db/文明创办.pdma.json
  5. 1
    1
      src/main/java/com/example/civilizedcity/common/Constants.java
  6. 55
    23
      src/main/java/com/example/civilizedcity/controller/SysOrgController.java
  7. 62
    23
      src/main/java/com/example/civilizedcity/controller/SysPositionController.java
  8. 56
    59
      src/main/java/com/example/civilizedcity/controller/SysResourceController.java
  9. 63
    24
      src/main/java/com/example/civilizedcity/controller/SysRoleController.java
  10. 90
    71
      src/main/java/com/example/civilizedcity/controller/SysRoleResourceController.java
  11. 71
    22
      src/main/java/com/example/civilizedcity/controller/SysUserController.java
  12. 71
    71
      src/main/java/com/example/civilizedcity/controller/SysUserRoleController.java
  13. 8
    10
      src/main/java/com/example/civilizedcity/controller/TdQuAnswerController.java
  14. 8
    10
      src/main/java/com/example/civilizedcity/controller/TdQuestionController.java
  15. 1
    1
      src/main/java/com/example/civilizedcity/entity/SysOrg.java
  16. 1
    1
      src/main/java/com/example/civilizedcity/entity/SysPosition.java
  17. 1
    1
      src/main/java/com/example/civilizedcity/entity/SysResource.java
  18. 1
    1
      src/main/java/com/example/civilizedcity/entity/SysRole.java
  19. 1
    1
      src/main/java/com/example/civilizedcity/entity/SysRoleResource.java
  20. 12
    2
      src/main/java/com/example/civilizedcity/entity/SysUser.java
  21. 1
    1
      src/main/java/com/example/civilizedcity/entity/SysUserRole.java
  22. 28
    13
      src/main/java/com/example/civilizedcity/entity/TaCheckItemQu.java
  23. 1
    1
      src/main/java/com/example/civilizedcity/entity/TaPerson.java
  24. 1
    1
      src/main/java/com/example/civilizedcity/entity/TdQuAnswer.java
  25. 1
    1
      src/main/java/com/example/civilizedcity/entity/TdQuestion.java
  26. 9
    3
      src/main/java/com/example/civilizedcity/mapper/SysResourceMapper.java
  27. 6
    3
      src/main/java/com/example/civilizedcity/mapper/SysRoleMapper.java
  28. 8
    3
      src/main/java/com/example/civilizedcity/mapper/SysRoleResourceMapper.java
  29. 8
    3
      src/main/java/com/example/civilizedcity/mapper/SysUserRoleMapper.java
  30. 2
    3
      src/main/java/com/example/civilizedcity/mapper/TdQuAnswerMapper.java
  31. 2
    3
      src/main/java/com/example/civilizedcity/mapper/TdQuestionMapper.java
  32. 3
    2
      src/main/java/com/example/civilizedcity/service/SysPositionService.java
  33. 7
    2
      src/main/java/com/example/civilizedcity/service/SysResourceService.java
  34. 6
    3
      src/main/java/com/example/civilizedcity/service/SysRoleResourceService.java
  35. 6
    3
      src/main/java/com/example/civilizedcity/service/SysRoleService.java
  36. 2
    0
      src/main/java/com/example/civilizedcity/service/SysUserService.java
  37. 0
    13
      src/main/java/com/example/civilizedcity/service/TdLocQuAnswerService.java
  38. 0
    13
      src/main/java/com/example/civilizedcity/service/TdLocQuestionService.java
  39. 12
    0
      src/main/java/com/example/civilizedcity/service/TdQuAnswerService.java
  40. 12
    0
      src/main/java/com/example/civilizedcity/service/TdQuestionService.java
  41. 15
    2
      src/main/java/com/example/civilizedcity/service/impl/SysPositionServiceImpl.java
  42. 23
    3
      src/main/java/com/example/civilizedcity/service/impl/SysResourceServiceImpl.java
  43. 38
    2
      src/main/java/com/example/civilizedcity/service/impl/SysRoleResourceServiceImpl.java
  44. 18
    2
      src/main/java/com/example/civilizedcity/service/impl/SysRoleServiceImpl.java
  45. 78
    0
      src/main/java/com/example/civilizedcity/service/impl/SysUserServiceImpl.java
  46. 0
    16
      src/main/java/com/example/civilizedcity/service/impl/TdLocQuAnswerServiceImpl.java
  47. 0
    16
      src/main/java/com/example/civilizedcity/service/impl/TdLocQuestionServiceImpl.java
  48. 15
    0
      src/main/java/com/example/civilizedcity/service/impl/TdQuAnswerServiceImpl.java
  49. 15
    0
      src/main/java/com/example/civilizedcity/service/impl/TdQuestionServiceImpl.java
  50. 2
    2
      src/main/resources/application.yml
  51. 30
    1
      src/main/resources/mapper/SysResourceMapper.xml
  52. 12
    1
      src/main/resources/mapper/SysRoleMapper.xml
  53. 21
    1
      src/main/resources/mapper/SysRoleResourceMapper.xml
  54. 21
    1
      src/main/resources/mapper/SysUserRoleMapper.xml
  55. 1
    1
      src/main/resources/mapper/TdQuAnswerMapper.xml
  56. 1
    1
      src/main/resources/mapper/TdQuestionMapper.xml

db/.back_文明创办/文明创办-backup-20221213164550.pdma.json → db/.back_文明创办/文明创办-backup-20221215110455.pdma.json 查看文件

@@ -4,7 +4,7 @@
4 4
   "avatar": "",
5 5
   "version": "4.1.4",
6 6
   "createdTime": "2022-12-12 09:36:12",
7
-  "updatedTime": "2022-12-13 16:43:12",
7
+  "updatedTime": "2022-12-15 11:04:32",
8 8
   "dbConns": [],
9 9
   "profile": {
10 10
     "default": {
@@ -237,7 +237,7 @@
237 237
         "ServiceImpl": "{{  var today=new Date();\n    var fullYear=today.getFullYear();\n    var month=today.getMonth() + 1;\n    var days=today.getDate();\n    \n    var pkVarName = \"undefinedId\";\n    var pkVarNameU = \"UndefinedId\";\n    var pkFieldKey = \"UNDEFINED\";\n    var pkDataType = \"String\";\n    it.entity.fields.forEach(function(field){\n        if(field.primaryKey){\n            pkFieldKey = field.defKey;\n            pkVarName = it.func.camel(field.defKey,false);\n            pkVarNameU = it.func.camel(field.defKey,true);\n            pkDataType = field[\"type\"];\n            return;\n        }\n    });\n    \n    var pkgName = it.entity.env.base.nameSpace;\n    var beanClass = it.entity.env.base.codeRoot;\n    var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n    var serviceClass = beanClass+'Service';\n    var serviceVarName= beanVarName+'Service';\n    var mapperName = beanVarName+'Mapper';\n    \n}}package {{=pkgName}}.service.impl;\n$blankline\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.stereotype.Service;\n\nimport {{=pkgName}}.entity.{{=beanClass}};\nimport {{=pkgName}}.mapper.{{=beanClass}}Mapper;\nimport {{=pkgName}}.service.{{=serviceClass}};\n\n /**\n * {{=it.entity.defName}};({{=it.entity.defKey}})表服务实现类\n * @author : http://www.chiner.pro\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\n */\n@Service\npublic class {{=serviceClass}}Impl extends BaseServiceImpl<{{=beanClass}}Mapper, {{=beanClass}}> implements {{=serviceClass}} {\n    $blankline\n}",
238 238
         "Mapper": "{{  var today=new Date();\n    var fullYear=today.getFullYear();\n    var month=today.getMonth() + 1;\n    var days=today.getDate();\n    \n    var pkVarName = \"undefinedId\";\n    var pkDataType = \"String\";\n    it.entity.fields.forEach(function(field){\n        if(field.primaryKey){\n            pkVarName = it.func.camel(field.defKey,false);\n            pkDataType = field[\"type\"];\n            return;\n        }\n    });\n    \n    var pkgName = it.entity.env.base.nameSpace;\n    var beanClass = it.entity.env.base.codeRoot;\n    var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n    var serviceClass = beanClass+'Service';\n    var serviceVarName= beanVarName+'Service';\n    \n}}package {{=pkgName}}.mapper;\n$blankline\n\nimport com.baomidou.mybatisplus.core.mapper.BaseMapper;\nimport org.apache.ibatis.annotations.Mapper;\nimport org.apache.ibatis.annotations.Param;\nimport {{=pkgName}}.entity.{{=beanClass}};\n$blankline\n\n /**\n * {{=it.entity.defName}};({{=it.entity.defKey}})表数据库访问层\n * @author : http://njyunzhi.com\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\n */\n@Mapper\npublic interface {{=beanClass}}Mapper  extends BaseMapper<{{=beanClass}}>{\n    $blankline\n}",
239 239
         "Mapper.xml": "{{  var today=new Date();\n    var fullYear=today.getFullYear();\n    var month=today.getMonth() + 1;\n    var days=today.getDate();\n    \n    var pkVarName = \"undefinedId\";\n    var pkDataType = \"String\";\n    var pkField = \"UNDEFINED_ID\";\n    it.entity.fields.forEach(function(field){\n        if(field.primaryKey){\n            pkField = field.defKey;\n            pkVarName = it.func.camel(field.defKey,false);\n            pkDataType = field[\"type\"];\n            return;\n        }\n    });\n    \n    var pkgName = it.entity.env.base.nameSpace;\n    var beanClass = it.entity.env.base.codeRoot;\n    var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n    var serviceClass = beanClass+'Service';\n    var serviceVarName= beanVarName+'Service';\n    \n}}<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE mapper PUBLIC \"-//mybatis.org//DTD Mapper 3.0//EN\" \"http://mybatis.org/dtd/mybatis-3-mapper.dtd\">\n$blankline\n\n<mapper namespace=\"{{=pkgName}}.mapper.{{=beanClass}}Mapper\">\n    $blankline\n</mapper>\n\n",
240
-        "Entity": "{{  var today=new Date();\n    var fullYear=today.getFullYear();\n    var month=today.getMonth() + 1;\n    var days=today.getDate();\n    \n    var pkVarName = \"undefinedId\";\n    var pkDataType = \"String\";\n    it.entity.fields.forEach(function(field){\n        if(field.primaryKey){\n            pkVarName = it.func.camel(field.defKey,false);\n            pkDataType = field[\"type\"];\n            return;\n        }\n    });\n    \n    var pkgName = it.entity.env.base.nameSpace;\n    var beanClass = it.entity.env.base.codeRoot;\n    var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n    var serviceClass = beanClass+'Service';\n    var serviceVarName= beanVarName+'Service';\n    \n}}package {{=pkgName}}.entity;\n$blankline\nimport io.swagger.annotations.ApiModel;\nimport io.swagger.annotations.ApiModelProperty;\nimport com.baomidou.mybatisplus.annotation.IdType;\nimport com.baomidou.mybatisplus.annotation.TableName;\nimport com.baomidou.mybatisplus.annotation.TableId;\nimport java.io.Serializable;\nimport java.time.LocalDateTime;\nimport lombok.Data;\nimport lombok.EqualsAndHashCode;\nimport lombok.experimental.Accessors;\n$blankline\n\n /**\n * {{=it.entity.defName}};{{=it.entity.comment}}\n * @author : http://www.chiner.pro\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\n */\n@Data\n@EqualsAndHashCode(callSuper = false)\n@Accessors(chain = true)\n@ApiModel(value = \"{{=it.entity.defName}}\",description = \"{{=it.entity.comment}}\")\n@TableName(\"{{=it.entity.defKey}}\")\npublic class {{=beanClass}} implements Serializable,Cloneable{\n{{~it.entity.fields:field:index}}\n    /** {{=it.func.join(field.defName,field.comment,';')}} */\n    @ApiModelProperty(name = \"{{=field.defName}}\",notes = \"{{=field.comment}}\")\n    {{? field.primaryKey }}\n    @TableId(value = \"{{=field.defKey}}\", type = IdType.INPUT)\n    {{?}}\n    private {{=field.type}} {{=it.func.camel(field.defKey,false)}} ;\n{{~}}\n$blankline\n}"
240
+        "Entity": "{{  var today=new Date();\n    var fullYear=today.getFullYear();\n    var month=today.getMonth() + 1;\n    var days=today.getDate();\n    \n    var pkVarName = \"undefinedId\";\n    var pkDataType = \"String\";\n    it.entity.fields.forEach(function(field){\n        if(field.primaryKey){\n            pkVarName = it.func.camel(field.defKey,false);\n            pkDataType = field[\"type\"];\n            return;\n        }\n    });\n    \n    var pkgName = it.entity.env.base.nameSpace;\n    var beanClass = it.entity.env.base.codeRoot;\n    var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n    var serviceClass = beanClass+'Service';\n    var serviceVarName= beanVarName+'Service';\n    \n}}package {{=pkgName}}.entity;\n$blankline\nimport io.swagger.annotations.ApiModel;\nimport io.swagger.annotations.ApiModelProperty;\nimport com.baomidou.mybatisplus.annotation.IdType;\nimport com.baomidou.mybatisplus.annotation.TableName;\nimport com.baomidou.mybatisplus.annotation.TableId;\nimport java.io.Serializable;\nimport java.time.LocalDateTime;\nimport lombok.Data;\nimport lombok.EqualsAndHashCode;\nimport lombok.experimental.Accessors;\n$blankline\n\n /**\n * {{=it.entity.defName}};{{=it.entity.comment}}\n * @author : http://www.chiner.pro\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\n */\n@Data\n@EqualsAndHashCode(callSuper = false)\n@Accessors(chain = true)\n@ApiModel(value = \"{{=it.entity.defName}}\",description = \"{{=it.entity.comment}}\")\n@TableName(\"{{=it.entity.defKey}}\")\npublic class {{=beanClass}} implements Serializable,Cloneable{\n{{~it.entity.fields:field:index}}\n    /** {{=it.func.join(field.defName,field.comment,';')}} */\n    @ApiModelProperty(name = \"{{=field.defName}}\",notes = \"{{=field.comment}}\")\n    {{? field.primaryKey }}\n    @TableId(value = \"{{=field.defKey}}\", type = IdType.ASSIGN_UUID)\n    {{?}}\n    private {{=field.type}} {{=it.func.camel(field.defKey,false)}} ;\n{{~}}\n$blankline\n}"
241 241
       },
242 242
       {
243 243
         "applyFor": "29D1CE08-4C35-4D2D-AAA9-23D93305B52E",
@@ -1116,7 +1116,7 @@
1116 1116
           "hideInGraph": false,
1117 1117
           "refDict": "",
1118 1118
           "extProps": {},
1119
-          "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
1119
+          "domain": "54611CCC-CA4B-42E1-9F32-4944C85B85A6",
1120 1120
           "id": "322EC759-BCCE-42E6-A1F1-837739AA6278"
1121 1121
         },
1122 1122
         {
@@ -4351,6 +4351,23 @@
4351 4351
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
4352 4352
           "id": "642B925C-403B-496D-BF93-5D4BE72A883B"
4353 4353
         },
4354
+        {
4355
+          "defKey": "expire_date",
4356
+          "defName": "截止时间",
4357
+          "comment": "YYYY-MM-DD",
4358
+          "type": "",
4359
+          "len": "",
4360
+          "scale": "",
4361
+          "primaryKey": false,
4362
+          "notNull": false,
4363
+          "autoIncrement": false,
4364
+          "defaultValue": "",
4365
+          "hideInGraph": false,
4366
+          "refDict": "",
4367
+          "extProps": {},
4368
+          "domain": "73FD2BAD-2358-4336-B96D-45DC897BD792",
4369
+          "id": "97EC5064-0B0E-4AD5-BE3A-535AD8913AD1"
4370
+        },
4354 4371
         {
4355 4372
           "defKey": "process_node",
4356 4373
           "defName": "流程节点",
@@ -4629,11 +4646,11 @@
4629 4646
           "id": "0EF50BA7-C44F-4D9E-A28D-F94C3D15350F"
4630 4647
         },
4631 4648
         {
4632
-          "defKey": "org_id",
4633
-          "defName": "机构ID",
4634
-          "comment": "",
4635
-          "type": "",
4636
-          "len": "",
4649
+          "defKey": "expire_date",
4650
+          "defName": "截止时间",
4651
+          "comment": "YYYY-MM-DD",
4652
+          "type": "VARCHAR",
4653
+          "len": 20,
4637 4654
           "scale": "",
4638 4655
           "primaryKey": false,
4639 4656
           "notNull": false,
@@ -4641,9 +4658,9 @@
4641 4658
           "defaultValue": "",
4642 4659
           "hideInGraph": false,
4643 4660
           "refDict": "",
4644
-          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
4645
-          "id": "F3C73F9F-2277-498F-A067-9D44F19125B1",
4646
-          "uiHint": ""
4661
+          "extProps": {},
4662
+          "domain": "",
4663
+          "id": "52C74C06-CC1C-416E-B913-78B500CE30A2"
4647 4664
         },
4648 4665
         {
4649 4666
           "defKey": "status",
@@ -4924,7 +4941,7 @@
4924 4941
         "custom": {}
4925 4942
       },
4926 4943
       "defKey": "ta_check_item",
4927
-      "defName": "测评点位",
4944
+      "defName": "测评项目",
4928 4945
       "comment": "",
4929 4946
       "properties": {},
4930 4947
       "nameTemplate": "{defKey}[{defName}]",
@@ -5029,6 +5046,23 @@
5029 5046
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
5030 5047
           "id": "7FF8CD4A-8CA9-4C24-A20E-F5D1C1425E33"
5031 5048
         },
5049
+        {
5050
+          "defKey": "item_type",
5051
+          "defName": "项目类型",
5052
+          "comment": "loc点位,survey问卷调查",
5053
+          "type": "",
5054
+          "len": "",
5055
+          "scale": "",
5056
+          "primaryKey": false,
5057
+          "notNull": false,
5058
+          "autoIncrement": false,
5059
+          "defaultValue": "",
5060
+          "hideInGraph": false,
5061
+          "refDict": "",
5062
+          "extProps": {},
5063
+          "domain": "73FD2BAD-2358-4336-B96D-45DC897BD792",
5064
+          "id": "3274DF40-5C9F-49E0-8013-A8F8FC5B401A"
5065
+        },
5032 5066
         {
5033 5067
           "defKey": "name",
5034 5068
           "defName": "名称",
@@ -5047,7 +5081,7 @@
5047 5081
           "id": "2ED82F0E-CA82-4D70-854E-9C74BF5D3F1E"
5048 5082
         },
5049 5083
         {
5050
-          "defKey": "score",
5084
+          "defKey": "full_score",
5051 5085
           "defName": "满分",
5052 5086
           "comment": "",
5053 5087
           "type": "DECIMAL",
@@ -5064,8 +5098,25 @@
5064 5098
           "id": "D2EBAC6F-DE7D-420D-933B-2F1D89EDA536"
5065 5099
         },
5066 5100
         {
5067
-          "defKey": "examination_num",
5068
-          "defName": "事件份数",
5101
+          "defKey": "score",
5102
+          "defName": "得分",
5103
+          "comment": "",
5104
+          "type": "DECIMAL",
5105
+          "len": 6,
5106
+          "scale": 2,
5107
+          "primaryKey": false,
5108
+          "notNull": false,
5109
+          "autoIncrement": false,
5110
+          "defaultValue": "",
5111
+          "hideInGraph": false,
5112
+          "refDict": "",
5113
+          "extProps": {},
5114
+          "domain": "",
5115
+          "id": "90915C24-C088-4AC8-924E-E951EF0DB253"
5116
+        },
5117
+        {
5118
+          "defKey": "num",
5119
+          "defName": "数量",
5069 5120
           "comment": "",
5070 5121
           "type": "",
5071 5122
           "len": "",
@@ -5073,7 +5124,7 @@
5073 5124
           "primaryKey": false,
5074 5125
           "notNull": false,
5075 5126
           "autoIncrement": false,
5076
-          "defaultValue": "",
5127
+          "defaultValue": "1",
5077 5128
           "hideInGraph": false,
5078 5129
           "refDict": "",
5079 5130
           "extProps": {},
@@ -5443,8 +5494,8 @@
5443 5494
         },
5444 5495
         "custom": {}
5445 5496
       },
5446
-      "defKey": "td_loc_question",
5447
-      "defName": "点位问题",
5497
+      "defKey": "td_question",
5498
+      "defName": "问题",
5448 5499
       "comment": "",
5449 5500
       "properties": {},
5450 5501
       "nameTemplate": "{defKey}[{defName}]",
@@ -5524,7 +5575,7 @@
5524 5575
           "scale": "",
5525 5576
           "primaryKey": true,
5526 5577
           "notNull": true,
5527
-          "autoIncrement": true,
5578
+          "autoIncrement": false,
5528 5579
           "defaultValue": "",
5529 5580
           "hideInGraph": true,
5530 5581
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
@@ -5532,23 +5583,6 @@
5532 5583
           "uiHint": "",
5533 5584
           "id": "9936D1F3-0931-40ED-A4AA-DF8DA1F3DD38"
5534 5585
         },
5535
-        {
5536
-          "defKey": "loc_id",
5537
-          "defName": "点位ID",
5538
-          "comment": "",
5539
-          "type": "",
5540
-          "len": "",
5541
-          "scale": "",
5542
-          "primaryKey": false,
5543
-          "notNull": false,
5544
-          "autoIncrement": false,
5545
-          "defaultValue": "",
5546
-          "hideInGraph": false,
5547
-          "refDict": "",
5548
-          "extProps": {},
5549
-          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
5550
-          "id": "AAB4BF27-5AE1-42A1-8164-2FA6A3D8D056"
5551
-        },
5552 5586
         {
5553 5587
           "defKey": "qu_type",
5554 5588
           "defName": "问题类型",
@@ -5669,8 +5703,8 @@
5669 5703
         },
5670 5704
         "custom": {}
5671 5705
       },
5672
-      "defKey": "td_loc_qu_answer",
5673
-      "defName": "点位问题答案",
5706
+      "defKey": "td_qu_answer",
5707
+      "defName": "问题答案",
5674 5708
       "comment": "",
5675 5709
       "properties": {},
5676 5710
       "nameTemplate": "{defKey}[{defName}]",
@@ -5750,7 +5784,7 @@
5750 5784
           "scale": "",
5751 5785
           "primaryKey": true,
5752 5786
           "notNull": true,
5753
-          "autoIncrement": true,
5787
+          "autoIncrement": false,
5754 5788
           "defaultValue": "",
5755 5789
           "hideInGraph": true,
5756 5790
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
@@ -5896,7 +5930,7 @@
5896 5930
         "custom": {}
5897 5931
       },
5898 5932
       "defKey": "ta_check_item_qu",
5899
-      "defName": "点位问题",
5933
+      "defName": "项目问题",
5900 5934
       "comment": "",
5901 5935
       "properties": {},
5902 5936
       "nameTemplate": "{defKey}[{defName}]",
@@ -5968,7 +6002,7 @@
5968 6002
       ],
5969 6003
       "fields": [
5970 6004
         {
5971
-          "defKey": "id",
6005
+          "defKey": "qu_id",
5972 6006
           "defName": "id",
5973 6007
           "comment": "",
5974 6008
           "type": "",
@@ -5976,10 +6010,10 @@
5976 6010
           "scale": "",
5977 6011
           "primaryKey": true,
5978 6012
           "notNull": true,
5979
-          "autoIncrement": true,
6013
+          "autoIncrement": false,
5980 6014
           "defaultValue": "",
5981 6015
           "hideInGraph": true,
5982
-          "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
6016
+          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
5983 6017
           "refDict": "",
5984 6018
           "uiHint": "",
5985 6019
           "id": "58A7DDC4-00CB-4FC4-86E9-E251AA006338"
@@ -6002,9 +6036,9 @@
6002 6036
           "uiHint": ""
6003 6037
         },
6004 6038
         {
6005
-          "defKey": "qu_id",
6006
-          "defName": "问题ID",
6007
-          "comment": "来源点位问题",
6039
+          "defKey": "qu_type",
6040
+          "defName": "问题类型",
6041
+          "comment": "radio 单选, fill 填空题",
6008 6042
           "type": "",
6009 6043
           "len": "",
6010 6044
           "scale": "",
@@ -6013,10 +6047,95 @@
6013 6047
           "autoIncrement": false,
6014 6048
           "defaultValue": "",
6015 6049
           "hideInGraph": false,
6050
+          "domain": "73FD2BAD-2358-4336-B96D-45DC897BD792",
6016 6051
           "refDict": "",
6017 6052
           "extProps": {},
6018
-          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
6019
-          "id": "C5E6642A-D6EF-460C-90CA-98855441D345"
6053
+          "id": "99ED2FEB-E6A2-4237-A998-E9E83A90A9FB"
6054
+        },
6055
+        {
6056
+          "defKey": "title",
6057
+          "defName": "问题描述",
6058
+          "comment": "",
6059
+          "type": "",
6060
+          "len": "",
6061
+          "scale": "",
6062
+          "primaryKey": false,
6063
+          "notNull": false,
6064
+          "autoIncrement": false,
6065
+          "defaultValue": "",
6066
+          "hideInGraph": false,
6067
+          "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
6068
+          "refDict": "",
6069
+          "extProps": {},
6070
+          "id": "F967C8FB-F1EF-4C85-9DC4-EB37C8227339"
6071
+        },
6072
+        {
6073
+          "defKey": "compute_type",
6074
+          "defName": "计分方式",
6075
+          "comment": "+得分,-减分",
6076
+          "type": "VARCHAR",
6077
+          "len": 10,
6078
+          "scale": "",
6079
+          "primaryKey": false,
6080
+          "notNull": false,
6081
+          "autoIncrement": false,
6082
+          "defaultValue": "",
6083
+          "hideInGraph": false,
6084
+          "refDict": "",
6085
+          "extProps": {},
6086
+          "domain": "",
6087
+          "id": "FDCEECB0-2E7F-43D6-9B96-8D464865D562"
6088
+        },
6089
+        {
6090
+          "defKey": "max_score",
6091
+          "defName": "最高得(扣)分",
6092
+          "comment": "",
6093
+          "type": "DECIMAL",
6094
+          "len": 6,
6095
+          "scale": 2,
6096
+          "primaryKey": false,
6097
+          "notNull": false,
6098
+          "autoIncrement": false,
6099
+          "defaultValue": "",
6100
+          "hideInGraph": false,
6101
+          "refDict": "",
6102
+          "extProps": {},
6103
+          "domain": "",
6104
+          "id": "786109C8-D36C-4724-8C76-DE64AC216BF1"
6105
+        },
6106
+        {
6107
+          "defKey": "an_score",
6108
+          "defName": "每项计分",
6109
+          "comment": "",
6110
+          "type": "DECIMAL",
6111
+          "len": 6,
6112
+          "scale": 2,
6113
+          "primaryKey": false,
6114
+          "notNull": false,
6115
+          "autoIncrement": false,
6116
+          "defaultValue": "",
6117
+          "hideInGraph": false,
6118
+          "refDict": "",
6119
+          "extProps": {},
6120
+          "domain": "",
6121
+          "id": "DD228B07-C934-4B55-BFBD-844E4CBC0A75"
6122
+        },
6123
+        {
6124
+          "defKey": "stand",
6125
+          "defName": "评分标准",
6126
+          "comment": "",
6127
+          "type": "TEXT",
6128
+          "len": 0,
6129
+          "scale": "",
6130
+          "primaryKey": false,
6131
+          "notNull": false,
6132
+          "autoIncrement": false,
6133
+          "defaultValue": "",
6134
+          "hideInGraph": false,
6135
+          "refDict": "",
6136
+          "extProps": {},
6137
+          "domain": "",
6138
+          "id": "0C274B8A-FF55-4B84-B764-780A793044EF"
6020 6139
         },
6021 6140
         {
6022 6141
           "defKey": "sort_no",
@@ -6162,7 +6281,7 @@
6162 6281
         {
6163 6282
           "defKey": "qu_id",
6164 6283
           "defName": "问题ID",
6165
-          "comment": "来源点位题",
6284
+          "comment": "来源点位题",
6166 6285
           "type": "",
6167 6286
           "len": "",
6168 6287
           "scale": "",
@@ -6193,57 +6312,6 @@
6193 6312
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
6194 6313
           "id": "0B03C02D-84EC-4306-8CEA-2BAF04806409"
6195 6314
         },
6196
-        {
6197
-          "defKey": "is_custom",
6198
-          "defName": "其他问题",
6199
-          "comment": "其他问题时, qu_id 不存在",
6200
-          "type": "",
6201
-          "len": "",
6202
-          "scale": "",
6203
-          "primaryKey": false,
6204
-          "notNull": false,
6205
-          "autoIncrement": false,
6206
-          "defaultValue": "",
6207
-          "hideInGraph": false,
6208
-          "refDict": "",
6209
-          "extProps": {},
6210
-          "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
6211
-          "id": "58BB49C4-EE07-4A1A-B301-FC46D63C7B6B"
6212
-        },
6213
-        {
6214
-          "defKey": "qu_title",
6215
-          "defName": "问题描述",
6216
-          "comment": "",
6217
-          "type": "",
6218
-          "len": "",
6219
-          "scale": "",
6220
-          "primaryKey": false,
6221
-          "notNull": false,
6222
-          "autoIncrement": false,
6223
-          "defaultValue": "",
6224
-          "hideInGraph": false,
6225
-          "refDict": "",
6226
-          "extProps": {},
6227
-          "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
6228
-          "id": "9659966E-5B4E-4E35-BF20-BB849C988D3F"
6229
-        },
6230
-        {
6231
-          "defKey": "stand_answer",
6232
-          "defName": "标准答案",
6233
-          "comment": "",
6234
-          "type": "",
6235
-          "len": "",
6236
-          "scale": "",
6237
-          "primaryKey": false,
6238
-          "notNull": false,
6239
-          "autoIncrement": false,
6240
-          "defaultValue": "",
6241
-          "hideInGraph": false,
6242
-          "refDict": "",
6243
-          "extProps": {},
6244
-          "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
6245
-          "id": "5C1A1961-721B-4B18-8E55-42B3A0019062"
6246
-        },
6247 6315
         {
6248 6316
           "defKey": "answer",
6249 6317
           "defName": "答案",
@@ -6455,7 +6523,7 @@
6455 6523
         },
6456 6524
         {
6457 6525
           "defKey": "item_id",
6458
-          "defName": "测评点位",
6526
+          "defName": "测评项目",
6459 6527
           "comment": "",
6460 6528
           "type": "",
6461 6529
           "len": "",
@@ -6489,7 +6557,7 @@
6489 6557
         },
6490 6558
         {
6491 6559
           "defKey": "item_name",
6492
-          "defName": "点位名称",
6560
+          "defName": "项目名称",
6493 6561
           "comment": "",
6494 6562
           "type": "",
6495 6563
           "len": "",
@@ -6506,7 +6574,7 @@
6506 6574
         },
6507 6575
         {
6508 6576
           "defKey": "name",
6509
-          "defName": "具体名称",
6577
+          "defName": "具体(小区)名称",
6510 6578
           "comment": "",
6511 6579
           "type": "",
6512 6580
           "len": "",
@@ -6931,6 +6999,191 @@
6931 6999
       ],
6932 7000
       "correlations": [],
6933 7001
       "indexes": []
7002
+    },
7003
+    {
7004
+      "id": "507794C4-11E9-4924-AEC5-368BC6E03FD7",
7005
+      "env": {
7006
+        "base": {
7007
+          "nameSpace": "",
7008
+          "codeRoot": ""
7009
+        }
7010
+      },
7011
+      "defKey": "ta_check_item_an",
7012
+      "defName": "项目问题答案",
7013
+      "comment": "",
7014
+      "properties": {},
7015
+      "nameTemplate": "{defKey}[{defName}]",
7016
+      "headers": [
7017
+        {
7018
+          "refKey": "hideInGraph",
7019
+          "hideInGraph": true
7020
+        },
7021
+        {
7022
+          "refKey": "defKey",
7023
+          "hideInGraph": false
7024
+        },
7025
+        {
7026
+          "refKey": "defName",
7027
+          "hideInGraph": false
7028
+        },
7029
+        {
7030
+          "refKey": "primaryKey",
7031
+          "hideInGraph": false
7032
+        },
7033
+        {
7034
+          "refKey": "notNull",
7035
+          "hideInGraph": true
7036
+        },
7037
+        {
7038
+          "refKey": "autoIncrement",
7039
+          "hideInGraph": true
7040
+        },
7041
+        {
7042
+          "refKey": "domain",
7043
+          "hideInGraph": true
7044
+        },
7045
+        {
7046
+          "refKey": "type",
7047
+          "hideInGraph": false
7048
+        },
7049
+        {
7050
+          "refKey": "len",
7051
+          "hideInGraph": false
7052
+        },
7053
+        {
7054
+          "refKey": "scale",
7055
+          "hideInGraph": false
7056
+        },
7057
+        {
7058
+          "refKey": "comment",
7059
+          "hideInGraph": true
7060
+        },
7061
+        {
7062
+          "refKey": "refDict",
7063
+          "hideInGraph": true
7064
+        },
7065
+        {
7066
+          "refKey": "defaultValue",
7067
+          "hideInGraph": true
7068
+        },
7069
+        {
7070
+          "refKey": "isStandard",
7071
+          "hideInGraph": false
7072
+        },
7073
+        {
7074
+          "refKey": "uiHint",
7075
+          "hideInGraph": true
7076
+        },
7077
+        {
7078
+          "refKey": "extProps",
7079
+          "hideInGraph": true
7080
+        }
7081
+      ],
7082
+      "fields": [
7083
+        {
7084
+          "defKey": "answer_id",
7085
+          "defName": "答案ID",
7086
+          "comment": "",
7087
+          "type": "",
7088
+          "len": 32,
7089
+          "scale": "",
7090
+          "primaryKey": true,
7091
+          "notNull": true,
7092
+          "autoIncrement": true,
7093
+          "defaultValue": "",
7094
+          "hideInGraph": true,
7095
+          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
7096
+          "refDict": "",
7097
+          "uiHint": "",
7098
+          "id": "DB338FE4-285E-4AF1-9578-8690FF7FE086"
7099
+        },
7100
+        {
7101
+          "defKey": "qu_id",
7102
+          "defName": "问题ID",
7103
+          "comment": "",
7104
+          "type": "",
7105
+          "len": "",
7106
+          "scale": "",
7107
+          "primaryKey": false,
7108
+          "notNull": false,
7109
+          "autoIncrement": false,
7110
+          "defaultValue": "",
7111
+          "hideInGraph": false,
7112
+          "refDict": "",
7113
+          "extProps": {},
7114
+          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
7115
+          "id": "EC6B096C-2BC6-45D7-88F5-555F94BF1AA0"
7116
+        },
7117
+        {
7118
+          "defKey": "answer_code",
7119
+          "defName": "答案选项",
7120
+          "comment": "ABCD等",
7121
+          "type": "VARCHAR",
7122
+          "len": 10,
7123
+          "scale": "",
7124
+          "primaryKey": false,
7125
+          "notNull": false,
7126
+          "autoIncrement": false,
7127
+          "defaultValue": "",
7128
+          "hideInGraph": false,
7129
+          "refDict": "",
7130
+          "extProps": {},
7131
+          "id": "8C057AFD-1CBC-40D9-8681-7B3A104D84A8"
7132
+        },
7133
+        {
7134
+          "defKey": "answer",
7135
+          "defName": "答案",
7136
+          "comment": "",
7137
+          "type": "",
7138
+          "len": "",
7139
+          "scale": "",
7140
+          "primaryKey": false,
7141
+          "notNull": false,
7142
+          "autoIncrement": false,
7143
+          "defaultValue": "",
7144
+          "hideInGraph": false,
7145
+          "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
7146
+          "refDict": "",
7147
+          "extProps": {},
7148
+          "id": "51283DB3-ADD4-4B09-BBB5-887CA10C6BF7"
7149
+        },
7150
+        {
7151
+          "defKey": "score",
7152
+          "defName": "分值",
7153
+          "comment": "",
7154
+          "type": "DECIMAL",
7155
+          "len": 6,
7156
+          "scale": 2,
7157
+          "primaryKey": false,
7158
+          "notNull": false,
7159
+          "autoIncrement": false,
7160
+          "defaultValue": "",
7161
+          "hideInGraph": false,
7162
+          "refDict": "",
7163
+          "extProps": {},
7164
+          "domain": "",
7165
+          "id": "EC9AB5F8-E387-4E40-B948-2581DA3E9D4D"
7166
+        },
7167
+        {
7168
+          "defKey": "sort_no",
7169
+          "defName": "排序",
7170
+          "comment": "",
7171
+          "type": "",
7172
+          "len": "",
7173
+          "scale": "",
7174
+          "primaryKey": false,
7175
+          "notNull": false,
7176
+          "autoIncrement": false,
7177
+          "defaultValue": "",
7178
+          "hideInGraph": false,
7179
+          "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
7180
+          "refDict": "",
7181
+          "extProps": {},
7182
+          "id": "90218D19-7731-4AFE-8883-74944A66D6C8"
7183
+        }
7184
+      ],
7185
+      "correlations": [],
7186
+      "indexes": []
6934 7187
     }
6935 7188
   ],
6936 7189
   "views": [],
@@ -7353,6 +7606,7 @@
7353 7606
         "54B9F404-6224-4952-8B2C-A30F6FEE7CC1",
7354 7607
         "B6BB7C88-ABE9-4B2F-8556-6A4EA85FBFCB",
7355 7608
         "156A3EC2-A70F-41C1-A66F-BFBE8476BA16",
7609
+        "507794C4-11E9-4924-AEC5-368BC6E03FD7",
7356 7610
         "3B58B8CA-AF26-40FE-907A-A34523419478",
7357 7611
         "B20E272F-91EB-4BAC-AAD6-AF99D517E44D",
7358 7612
         "EF3D4E17-6CE0-4944-B1DC-40280B2B689F"

db/.back_文明创办/文明创办-backup-20221213164312.pdma.json → db/.back_文明创办/文明创办-backup-20221215163252.pdma.json 查看文件

@@ -4,7 +4,7 @@
4 4
   "avatar": "",
5 5
   "version": "4.1.4",
6 6
   "createdTime": "2022-12-12 09:36:12",
7
-  "updatedTime": "2022-12-13 16:42:28",
7
+  "updatedTime": "2022-12-15 11:04:55",
8 8
   "dbConns": [],
9 9
   "profile": {
10 10
     "default": {
@@ -237,7 +237,7 @@
237 237
         "ServiceImpl": "{{  var today=new Date();\n    var fullYear=today.getFullYear();\n    var month=today.getMonth() + 1;\n    var days=today.getDate();\n    \n    var pkVarName = \"undefinedId\";\n    var pkVarNameU = \"UndefinedId\";\n    var pkFieldKey = \"UNDEFINED\";\n    var pkDataType = \"String\";\n    it.entity.fields.forEach(function(field){\n        if(field.primaryKey){\n            pkFieldKey = field.defKey;\n            pkVarName = it.func.camel(field.defKey,false);\n            pkVarNameU = it.func.camel(field.defKey,true);\n            pkDataType = field[\"type\"];\n            return;\n        }\n    });\n    \n    var pkgName = it.entity.env.base.nameSpace;\n    var beanClass = it.entity.env.base.codeRoot;\n    var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n    var serviceClass = beanClass+'Service';\n    var serviceVarName= beanVarName+'Service';\n    var mapperName = beanVarName+'Mapper';\n    \n}}package {{=pkgName}}.service.impl;\n$blankline\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.stereotype.Service;\n\nimport {{=pkgName}}.entity.{{=beanClass}};\nimport {{=pkgName}}.mapper.{{=beanClass}}Mapper;\nimport {{=pkgName}}.service.{{=serviceClass}};\n\n /**\n * {{=it.entity.defName}};({{=it.entity.defKey}})表服务实现类\n * @author : http://www.chiner.pro\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\n */\n@Service\npublic class {{=serviceClass}}Impl extends BaseServiceImpl<{{=beanClass}}Mapper, {{=beanClass}}> implements {{=serviceClass}} {\n    $blankline\n}",
238 238
         "Mapper": "{{  var today=new Date();\n    var fullYear=today.getFullYear();\n    var month=today.getMonth() + 1;\n    var days=today.getDate();\n    \n    var pkVarName = \"undefinedId\";\n    var pkDataType = \"String\";\n    it.entity.fields.forEach(function(field){\n        if(field.primaryKey){\n            pkVarName = it.func.camel(field.defKey,false);\n            pkDataType = field[\"type\"];\n            return;\n        }\n    });\n    \n    var pkgName = it.entity.env.base.nameSpace;\n    var beanClass = it.entity.env.base.codeRoot;\n    var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n    var serviceClass = beanClass+'Service';\n    var serviceVarName= beanVarName+'Service';\n    \n}}package {{=pkgName}}.mapper;\n$blankline\n\nimport com.baomidou.mybatisplus.core.mapper.BaseMapper;\nimport org.apache.ibatis.annotations.Mapper;\nimport org.apache.ibatis.annotations.Param;\nimport {{=pkgName}}.entity.{{=beanClass}};\n$blankline\n\n /**\n * {{=it.entity.defName}};({{=it.entity.defKey}})表数据库访问层\n * @author : http://njyunzhi.com\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\n */\n@Mapper\npublic interface {{=beanClass}}Mapper  extends BaseMapper<{{=beanClass}}>{\n    $blankline\n}",
239 239
         "Mapper.xml": "{{  var today=new Date();\n    var fullYear=today.getFullYear();\n    var month=today.getMonth() + 1;\n    var days=today.getDate();\n    \n    var pkVarName = \"undefinedId\";\n    var pkDataType = \"String\";\n    var pkField = \"UNDEFINED_ID\";\n    it.entity.fields.forEach(function(field){\n        if(field.primaryKey){\n            pkField = field.defKey;\n            pkVarName = it.func.camel(field.defKey,false);\n            pkDataType = field[\"type\"];\n            return;\n        }\n    });\n    \n    var pkgName = it.entity.env.base.nameSpace;\n    var beanClass = it.entity.env.base.codeRoot;\n    var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n    var serviceClass = beanClass+'Service';\n    var serviceVarName= beanVarName+'Service';\n    \n}}<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE mapper PUBLIC \"-//mybatis.org//DTD Mapper 3.0//EN\" \"http://mybatis.org/dtd/mybatis-3-mapper.dtd\">\n$blankline\n\n<mapper namespace=\"{{=pkgName}}.mapper.{{=beanClass}}Mapper\">\n    $blankline\n</mapper>\n\n",
240
-        "Entity": "{{  var today=new Date();\n    var fullYear=today.getFullYear();\n    var month=today.getMonth() + 1;\n    var days=today.getDate();\n    \n    var pkVarName = \"undefinedId\";\n    var pkDataType = \"String\";\n    it.entity.fields.forEach(function(field){\n        if(field.primaryKey){\n            pkVarName = it.func.camel(field.defKey,false);\n            pkDataType = field[\"type\"];\n            return;\n        }\n    });\n    \n    var pkgName = it.entity.env.base.nameSpace;\n    var beanClass = it.entity.env.base.codeRoot;\n    var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n    var serviceClass = beanClass+'Service';\n    var serviceVarName= beanVarName+'Service';\n    \n}}package {{=pkgName}}.entity;\n$blankline\nimport io.swagger.annotations.ApiModel;\nimport io.swagger.annotations.ApiModelProperty;\nimport com.baomidou.mybatisplus.annotation.IdType;\nimport com.baomidou.mybatisplus.annotation.TableName;\nimport com.baomidou.mybatisplus.annotation.TableId;\nimport java.io.Serializable;\nimport java.time.LocalDateTime;\nimport lombok.Data;\nimport lombok.EqualsAndHashCode;\nimport lombok.experimental.Accessors;\n$blankline\n\n /**\n * {{=it.entity.defName}};{{=it.entity.comment}}\n * @author : http://www.chiner.pro\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\n */\n@Data\n@EqualsAndHashCode(callSuper = false)\n@Accessors(chain = true)\n@ApiModel(value = \"{{=it.entity.defName}}\",description = \"{{=it.entity.comment}}\")\n@TableName(\"{{=it.entity.defKey}}\")\npublic class {{=beanClass}} implements Serializable,Cloneable{\n{{~it.entity.fields:field:index}}\n    /** {{=it.func.join(field.defName,field.comment,';')}} */\n    @ApiModelProperty(name = \"{{=field.defName}}\",notes = \"{{=field.comment}}\")\n    {{? field.primaryKey }}\n    @TableId(value = \"{{=field.defKey}}\", type = IdType.INPUT)\n    {{?}}\n    private {{=field.type}} {{=it.func.camel(field.defKey,false)}} ;\n{{~}}\n$blankline\n}"
240
+        "Entity": "{{  var today=new Date();\n    var fullYear=today.getFullYear();\n    var month=today.getMonth() + 1;\n    var days=today.getDate();\n    \n    var pkVarName = \"undefinedId\";\n    var pkDataType = \"String\";\n    it.entity.fields.forEach(function(field){\n        if(field.primaryKey){\n            pkVarName = it.func.camel(field.defKey,false);\n            pkDataType = field[\"type\"];\n            return;\n        }\n    });\n    \n    var pkgName = it.entity.env.base.nameSpace;\n    var beanClass = it.entity.env.base.codeRoot;\n    var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n    var serviceClass = beanClass+'Service';\n    var serviceVarName= beanVarName+'Service';\n    \n}}package {{=pkgName}}.entity;\n$blankline\nimport io.swagger.annotations.ApiModel;\nimport io.swagger.annotations.ApiModelProperty;\nimport com.baomidou.mybatisplus.annotation.IdType;\nimport com.baomidou.mybatisplus.annotation.TableName;\nimport com.baomidou.mybatisplus.annotation.TableId;\nimport java.io.Serializable;\nimport java.time.LocalDateTime;\nimport lombok.Data;\nimport lombok.EqualsAndHashCode;\nimport lombok.experimental.Accessors;\n$blankline\n\n /**\n * {{=it.entity.defName}};{{=it.entity.comment}}\n * @author : http://www.chiner.pro\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\n */\n@Data\n@EqualsAndHashCode(callSuper = false)\n@Accessors(chain = true)\n@ApiModel(value = \"{{=it.entity.defName}}\",description = \"{{=it.entity.comment}}\")\n@TableName(\"{{=it.entity.defKey}}\")\npublic class {{=beanClass}} implements Serializable,Cloneable{\n{{~it.entity.fields:field:index}}\n    /** {{=it.func.join(field.defName,field.comment,';')}} */\n    @ApiModelProperty(name = \"{{=field.defName}}\",notes = \"{{=field.comment}}\")\n    {{? field.primaryKey }}\n    @TableId(value = \"{{=field.defKey}}\", type = IdType.ASSIGN_UUID)\n    {{?}}\n    private {{=field.type}} {{=it.func.camel(field.defKey,false)}} ;\n{{~}}\n$blankline\n}"
241 241
       },
242 242
       {
243 243
         "applyFor": "29D1CE08-4C35-4D2D-AAA9-23D93305B52E",
@@ -1116,7 +1116,7 @@
1116 1116
           "hideInGraph": false,
1117 1117
           "refDict": "",
1118 1118
           "extProps": {},
1119
-          "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
1119
+          "domain": "54611CCC-CA4B-42E1-9F32-4944C85B85A6",
1120 1120
           "id": "322EC759-BCCE-42E6-A1F1-837739AA6278"
1121 1121
         },
1122 1122
         {
@@ -4351,6 +4351,23 @@
4351 4351
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
4352 4352
           "id": "642B925C-403B-496D-BF93-5D4BE72A883B"
4353 4353
         },
4354
+        {
4355
+          "defKey": "expire_date",
4356
+          "defName": "截止时间",
4357
+          "comment": "YYYY-MM-DD",
4358
+          "type": "",
4359
+          "len": "",
4360
+          "scale": "",
4361
+          "primaryKey": false,
4362
+          "notNull": false,
4363
+          "autoIncrement": false,
4364
+          "defaultValue": "",
4365
+          "hideInGraph": false,
4366
+          "refDict": "",
4367
+          "extProps": {},
4368
+          "domain": "73FD2BAD-2358-4336-B96D-45DC897BD792",
4369
+          "id": "97EC5064-0B0E-4AD5-BE3A-535AD8913AD1"
4370
+        },
4354 4371
         {
4355 4372
           "defKey": "process_node",
4356 4373
           "defName": "流程节点",
@@ -4629,11 +4646,11 @@
4629 4646
           "id": "0EF50BA7-C44F-4D9E-A28D-F94C3D15350F"
4630 4647
         },
4631 4648
         {
4632
-          "defKey": "org_id",
4633
-          "defName": "机构ID",
4634
-          "comment": "",
4635
-          "type": "",
4636
-          "len": "",
4649
+          "defKey": "expire_date",
4650
+          "defName": "截止时间",
4651
+          "comment": "YYYY-MM-DD",
4652
+          "type": "VARCHAR",
4653
+          "len": 20,
4637 4654
           "scale": "",
4638 4655
           "primaryKey": false,
4639 4656
           "notNull": false,
@@ -4641,9 +4658,9 @@
4641 4658
           "defaultValue": "",
4642 4659
           "hideInGraph": false,
4643 4660
           "refDict": "",
4644
-          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
4645
-          "id": "F3C73F9F-2277-498F-A067-9D44F19125B1",
4646
-          "uiHint": ""
4661
+          "extProps": {},
4662
+          "domain": "",
4663
+          "id": "52C74C06-CC1C-416E-B913-78B500CE30A2"
4647 4664
         },
4648 4665
         {
4649 4666
           "defKey": "status",
@@ -4924,7 +4941,7 @@
4924 4941
         "custom": {}
4925 4942
       },
4926 4943
       "defKey": "ta_check_item",
4927
-      "defName": "测评点位",
4944
+      "defName": "测评项目",
4928 4945
       "comment": "",
4929 4946
       "properties": {},
4930 4947
       "nameTemplate": "{defKey}[{defName}]",
@@ -5029,6 +5046,23 @@
5029 5046
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
5030 5047
           "id": "7FF8CD4A-8CA9-4C24-A20E-F5D1C1425E33"
5031 5048
         },
5049
+        {
5050
+          "defKey": "item_type",
5051
+          "defName": "项目类型",
5052
+          "comment": "loc点位,survey问卷调查",
5053
+          "type": "",
5054
+          "len": "",
5055
+          "scale": "",
5056
+          "primaryKey": false,
5057
+          "notNull": false,
5058
+          "autoIncrement": false,
5059
+          "defaultValue": "",
5060
+          "hideInGraph": false,
5061
+          "refDict": "",
5062
+          "extProps": {},
5063
+          "domain": "73FD2BAD-2358-4336-B96D-45DC897BD792",
5064
+          "id": "3274DF40-5C9F-49E0-8013-A8F8FC5B401A"
5065
+        },
5032 5066
         {
5033 5067
           "defKey": "name",
5034 5068
           "defName": "名称",
@@ -5050,9 +5084,9 @@
5050 5084
           "defKey": "full_score",
5051 5085
           "defName": "满分",
5052 5086
           "comment": "",
5053
-          "type": "",
5054
-          "len": "",
5055
-          "scale": "",
5087
+          "type": "DECIMAL",
5088
+          "len": 6,
5089
+          "scale": 2,
5056 5090
           "primaryKey": false,
5057 5091
           "notNull": false,
5058 5092
           "autoIncrement": false,
@@ -5060,12 +5094,29 @@
5060 5094
           "hideInGraph": false,
5061 5095
           "refDict": "",
5062 5096
           "extProps": {},
5063
-          "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
5097
+          "domain": "",
5064 5098
           "id": "D2EBAC6F-DE7D-420D-933B-2F1D89EDA536"
5065 5099
         },
5066 5100
         {
5067
-          "defKey": "examination_num",
5068
-          "defName": "事件份数",
5101
+          "defKey": "score",
5102
+          "defName": "得分",
5103
+          "comment": "",
5104
+          "type": "DECIMAL",
5105
+          "len": 6,
5106
+          "scale": 2,
5107
+          "primaryKey": false,
5108
+          "notNull": false,
5109
+          "autoIncrement": false,
5110
+          "defaultValue": "",
5111
+          "hideInGraph": false,
5112
+          "refDict": "",
5113
+          "extProps": {},
5114
+          "domain": "",
5115
+          "id": "90915C24-C088-4AC8-924E-E951EF0DB253"
5116
+        },
5117
+        {
5118
+          "defKey": "num",
5119
+          "defName": "数量",
5069 5120
           "comment": "",
5070 5121
           "type": "",
5071 5122
           "len": "",
@@ -5073,7 +5124,7 @@
5073 5124
           "primaryKey": false,
5074 5125
           "notNull": false,
5075 5126
           "autoIncrement": false,
5076
-          "defaultValue": "",
5127
+          "defaultValue": "1",
5077 5128
           "hideInGraph": false,
5078 5129
           "refDict": "",
5079 5130
           "extProps": {},
@@ -5443,8 +5494,8 @@
5443 5494
         },
5444 5495
         "custom": {}
5445 5496
       },
5446
-      "defKey": "td_loc_question",
5447
-      "defName": "点位问题",
5497
+      "defKey": "td_question",
5498
+      "defName": "问题",
5448 5499
       "comment": "",
5449 5500
       "properties": {},
5450 5501
       "nameTemplate": "{defKey}[{defName}]",
@@ -5524,7 +5575,7 @@
5524 5575
           "scale": "",
5525 5576
           "primaryKey": true,
5526 5577
           "notNull": true,
5527
-          "autoIncrement": true,
5578
+          "autoIncrement": false,
5528 5579
           "defaultValue": "",
5529 5580
           "hideInGraph": true,
5530 5581
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
@@ -5532,23 +5583,6 @@
5532 5583
           "uiHint": "",
5533 5584
           "id": "9936D1F3-0931-40ED-A4AA-DF8DA1F3DD38"
5534 5585
         },
5535
-        {
5536
-          "defKey": "loc_id",
5537
-          "defName": "点位ID",
5538
-          "comment": "",
5539
-          "type": "",
5540
-          "len": "",
5541
-          "scale": "",
5542
-          "primaryKey": false,
5543
-          "notNull": false,
5544
-          "autoIncrement": false,
5545
-          "defaultValue": "",
5546
-          "hideInGraph": false,
5547
-          "refDict": "",
5548
-          "extProps": {},
5549
-          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
5550
-          "id": "AAB4BF27-5AE1-42A1-8164-2FA6A3D8D056"
5551
-        },
5552 5586
         {
5553 5587
           "defKey": "qu_type",
5554 5588
           "defName": "问题类型",
@@ -5669,8 +5703,8 @@
5669 5703
         },
5670 5704
         "custom": {}
5671 5705
       },
5672
-      "defKey": "td_loc_qu_answer",
5673
-      "defName": "点位问题答案",
5706
+      "defKey": "td_qu_answer",
5707
+      "defName": "问题答案",
5674 5708
       "comment": "",
5675 5709
       "properties": {},
5676 5710
       "nameTemplate": "{defKey}[{defName}]",
@@ -5750,7 +5784,7 @@
5750 5784
           "scale": "",
5751 5785
           "primaryKey": true,
5752 5786
           "notNull": true,
5753
-          "autoIncrement": true,
5787
+          "autoIncrement": false,
5754 5788
           "defaultValue": "",
5755 5789
           "hideInGraph": true,
5756 5790
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
@@ -5896,7 +5930,7 @@
5896 5930
         "custom": {}
5897 5931
       },
5898 5932
       "defKey": "ta_check_item_qu",
5899
-      "defName": "点位问题",
5933
+      "defName": "项目问题",
5900 5934
       "comment": "",
5901 5935
       "properties": {},
5902 5936
       "nameTemplate": "{defKey}[{defName}]",
@@ -5968,7 +6002,7 @@
5968 6002
       ],
5969 6003
       "fields": [
5970 6004
         {
5971
-          "defKey": "id",
6005
+          "defKey": "qu_id",
5972 6006
           "defName": "id",
5973 6007
           "comment": "",
5974 6008
           "type": "",
@@ -5976,10 +6010,10 @@
5976 6010
           "scale": "",
5977 6011
           "primaryKey": true,
5978 6012
           "notNull": true,
5979
-          "autoIncrement": true,
6013
+          "autoIncrement": false,
5980 6014
           "defaultValue": "",
5981 6015
           "hideInGraph": true,
5982
-          "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
6016
+          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
5983 6017
           "refDict": "",
5984 6018
           "uiHint": "",
5985 6019
           "id": "58A7DDC4-00CB-4FC4-86E9-E251AA006338"
@@ -6002,9 +6036,9 @@
6002 6036
           "uiHint": ""
6003 6037
         },
6004 6038
         {
6005
-          "defKey": "qu_id",
6006
-          "defName": "问题ID",
6007
-          "comment": "来源点位问题",
6039
+          "defKey": "qu_type",
6040
+          "defName": "问题类型",
6041
+          "comment": "radio 单选, fill 填空题",
6008 6042
           "type": "",
6009 6043
           "len": "",
6010 6044
           "scale": "",
@@ -6013,10 +6047,95 @@
6013 6047
           "autoIncrement": false,
6014 6048
           "defaultValue": "",
6015 6049
           "hideInGraph": false,
6050
+          "domain": "73FD2BAD-2358-4336-B96D-45DC897BD792",
6016 6051
           "refDict": "",
6017 6052
           "extProps": {},
6018
-          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
6019
-          "id": "C5E6642A-D6EF-460C-90CA-98855441D345"
6053
+          "id": "99ED2FEB-E6A2-4237-A998-E9E83A90A9FB"
6054
+        },
6055
+        {
6056
+          "defKey": "title",
6057
+          "defName": "问题描述",
6058
+          "comment": "",
6059
+          "type": "",
6060
+          "len": "",
6061
+          "scale": "",
6062
+          "primaryKey": false,
6063
+          "notNull": false,
6064
+          "autoIncrement": false,
6065
+          "defaultValue": "",
6066
+          "hideInGraph": false,
6067
+          "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
6068
+          "refDict": "",
6069
+          "extProps": {},
6070
+          "id": "F967C8FB-F1EF-4C85-9DC4-EB37C8227339"
6071
+        },
6072
+        {
6073
+          "defKey": "compute_type",
6074
+          "defName": "计分方式",
6075
+          "comment": "+得分,-减分",
6076
+          "type": "VARCHAR",
6077
+          "len": 10,
6078
+          "scale": "",
6079
+          "primaryKey": false,
6080
+          "notNull": false,
6081
+          "autoIncrement": false,
6082
+          "defaultValue": "",
6083
+          "hideInGraph": false,
6084
+          "refDict": "",
6085
+          "extProps": {},
6086
+          "domain": "",
6087
+          "id": "FDCEECB0-2E7F-43D6-9B96-8D464865D562"
6088
+        },
6089
+        {
6090
+          "defKey": "max_score",
6091
+          "defName": "最高得(扣)分",
6092
+          "comment": "",
6093
+          "type": "DECIMAL",
6094
+          "len": 6,
6095
+          "scale": 2,
6096
+          "primaryKey": false,
6097
+          "notNull": false,
6098
+          "autoIncrement": false,
6099
+          "defaultValue": "",
6100
+          "hideInGraph": false,
6101
+          "refDict": "",
6102
+          "extProps": {},
6103
+          "domain": "",
6104
+          "id": "786109C8-D36C-4724-8C76-DE64AC216BF1"
6105
+        },
6106
+        {
6107
+          "defKey": "an_score",
6108
+          "defName": "每项计分",
6109
+          "comment": "",
6110
+          "type": "DECIMAL",
6111
+          "len": 6,
6112
+          "scale": 2,
6113
+          "primaryKey": false,
6114
+          "notNull": false,
6115
+          "autoIncrement": false,
6116
+          "defaultValue": "",
6117
+          "hideInGraph": false,
6118
+          "refDict": "",
6119
+          "extProps": {},
6120
+          "domain": "",
6121
+          "id": "DD228B07-C934-4B55-BFBD-844E4CBC0A75"
6122
+        },
6123
+        {
6124
+          "defKey": "stand",
6125
+          "defName": "评分标准",
6126
+          "comment": "",
6127
+          "type": "TEXT",
6128
+          "len": 0,
6129
+          "scale": "",
6130
+          "primaryKey": false,
6131
+          "notNull": false,
6132
+          "autoIncrement": false,
6133
+          "defaultValue": "",
6134
+          "hideInGraph": false,
6135
+          "refDict": "",
6136
+          "extProps": {},
6137
+          "domain": "",
6138
+          "id": "0C274B8A-FF55-4B84-B764-780A793044EF"
6020 6139
         },
6021 6140
         {
6022 6141
           "defKey": "sort_no",
@@ -6162,7 +6281,7 @@
6162 6281
         {
6163 6282
           "defKey": "qu_id",
6164 6283
           "defName": "问题ID",
6165
-          "comment": "来源点位题",
6284
+          "comment": "来源点位题",
6166 6285
           "type": "",
6167 6286
           "len": "",
6168 6287
           "scale": "",
@@ -6193,57 +6312,6 @@
6193 6312
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
6194 6313
           "id": "0B03C02D-84EC-4306-8CEA-2BAF04806409"
6195 6314
         },
6196
-        {
6197
-          "defKey": "is_custom",
6198
-          "defName": "其他问题",
6199
-          "comment": "其他问题时, qu_id 不存在",
6200
-          "type": "",
6201
-          "len": "",
6202
-          "scale": "",
6203
-          "primaryKey": false,
6204
-          "notNull": false,
6205
-          "autoIncrement": false,
6206
-          "defaultValue": "",
6207
-          "hideInGraph": false,
6208
-          "refDict": "",
6209
-          "extProps": {},
6210
-          "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
6211
-          "id": "58BB49C4-EE07-4A1A-B301-FC46D63C7B6B"
6212
-        },
6213
-        {
6214
-          "defKey": "qu_title",
6215
-          "defName": "问题描述",
6216
-          "comment": "",
6217
-          "type": "",
6218
-          "len": "",
6219
-          "scale": "",
6220
-          "primaryKey": false,
6221
-          "notNull": false,
6222
-          "autoIncrement": false,
6223
-          "defaultValue": "",
6224
-          "hideInGraph": false,
6225
-          "refDict": "",
6226
-          "extProps": {},
6227
-          "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
6228
-          "id": "9659966E-5B4E-4E35-BF20-BB849C988D3F"
6229
-        },
6230
-        {
6231
-          "defKey": "stand_answer",
6232
-          "defName": "标准答案",
6233
-          "comment": "",
6234
-          "type": "",
6235
-          "len": "",
6236
-          "scale": "",
6237
-          "primaryKey": false,
6238
-          "notNull": false,
6239
-          "autoIncrement": false,
6240
-          "defaultValue": "",
6241
-          "hideInGraph": false,
6242
-          "refDict": "",
6243
-          "extProps": {},
6244
-          "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
6245
-          "id": "5C1A1961-721B-4B18-8E55-42B3A0019062"
6246
-        },
6247 6315
         {
6248 6316
           "defKey": "answer",
6249 6317
           "defName": "答案",
@@ -6455,7 +6523,7 @@
6455 6523
         },
6456 6524
         {
6457 6525
           "defKey": "item_id",
6458
-          "defName": "测评点位",
6526
+          "defName": "测评项目",
6459 6527
           "comment": "",
6460 6528
           "type": "",
6461 6529
           "len": "",
@@ -6489,7 +6557,7 @@
6489 6557
         },
6490 6558
         {
6491 6559
           "defKey": "item_name",
6492
-          "defName": "点位名称",
6560
+          "defName": "项目名称",
6493 6561
           "comment": "",
6494 6562
           "type": "",
6495 6563
           "len": "",
@@ -6506,7 +6574,7 @@
6506 6574
         },
6507 6575
         {
6508 6576
           "defKey": "name",
6509
-          "defName": "具体名称",
6577
+          "defName": "具体(小区)名称",
6510 6578
           "comment": "",
6511 6579
           "type": "",
6512 6580
           "len": "",
@@ -6931,6 +6999,191 @@
6931 6999
       ],
6932 7000
       "correlations": [],
6933 7001
       "indexes": []
7002
+    },
7003
+    {
7004
+      "id": "507794C4-11E9-4924-AEC5-368BC6E03FD7",
7005
+      "env": {
7006
+        "base": {
7007
+          "nameSpace": "",
7008
+          "codeRoot": ""
7009
+        }
7010
+      },
7011
+      "defKey": "ta_check_item_an",
7012
+      "defName": "项目问题答案",
7013
+      "comment": "",
7014
+      "properties": {},
7015
+      "nameTemplate": "{defKey}[{defName}]",
7016
+      "headers": [
7017
+        {
7018
+          "refKey": "hideInGraph",
7019
+          "hideInGraph": true
7020
+        },
7021
+        {
7022
+          "refKey": "defKey",
7023
+          "hideInGraph": false
7024
+        },
7025
+        {
7026
+          "refKey": "defName",
7027
+          "hideInGraph": false
7028
+        },
7029
+        {
7030
+          "refKey": "primaryKey",
7031
+          "hideInGraph": false
7032
+        },
7033
+        {
7034
+          "refKey": "notNull",
7035
+          "hideInGraph": true
7036
+        },
7037
+        {
7038
+          "refKey": "autoIncrement",
7039
+          "hideInGraph": true
7040
+        },
7041
+        {
7042
+          "refKey": "domain",
7043
+          "hideInGraph": true
7044
+        },
7045
+        {
7046
+          "refKey": "type",
7047
+          "hideInGraph": false
7048
+        },
7049
+        {
7050
+          "refKey": "len",
7051
+          "hideInGraph": false
7052
+        },
7053
+        {
7054
+          "refKey": "scale",
7055
+          "hideInGraph": false
7056
+        },
7057
+        {
7058
+          "refKey": "comment",
7059
+          "hideInGraph": true
7060
+        },
7061
+        {
7062
+          "refKey": "refDict",
7063
+          "hideInGraph": true
7064
+        },
7065
+        {
7066
+          "refKey": "defaultValue",
7067
+          "hideInGraph": true
7068
+        },
7069
+        {
7070
+          "refKey": "isStandard",
7071
+          "hideInGraph": false
7072
+        },
7073
+        {
7074
+          "refKey": "uiHint",
7075
+          "hideInGraph": true
7076
+        },
7077
+        {
7078
+          "refKey": "extProps",
7079
+          "hideInGraph": true
7080
+        }
7081
+      ],
7082
+      "fields": [
7083
+        {
7084
+          "defKey": "answer_id",
7085
+          "defName": "答案ID",
7086
+          "comment": "",
7087
+          "type": "",
7088
+          "len": 32,
7089
+          "scale": "",
7090
+          "primaryKey": true,
7091
+          "notNull": true,
7092
+          "autoIncrement": true,
7093
+          "defaultValue": "",
7094
+          "hideInGraph": true,
7095
+          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
7096
+          "refDict": "",
7097
+          "uiHint": "",
7098
+          "id": "DB338FE4-285E-4AF1-9578-8690FF7FE086"
7099
+        },
7100
+        {
7101
+          "defKey": "qu_id",
7102
+          "defName": "问题ID",
7103
+          "comment": "",
7104
+          "type": "",
7105
+          "len": "",
7106
+          "scale": "",
7107
+          "primaryKey": false,
7108
+          "notNull": false,
7109
+          "autoIncrement": false,
7110
+          "defaultValue": "",
7111
+          "hideInGraph": false,
7112
+          "refDict": "",
7113
+          "extProps": {},
7114
+          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
7115
+          "id": "EC6B096C-2BC6-45D7-88F5-555F94BF1AA0"
7116
+        },
7117
+        {
7118
+          "defKey": "answer_code",
7119
+          "defName": "答案选项",
7120
+          "comment": "ABCD等",
7121
+          "type": "VARCHAR",
7122
+          "len": 10,
7123
+          "scale": "",
7124
+          "primaryKey": false,
7125
+          "notNull": false,
7126
+          "autoIncrement": false,
7127
+          "defaultValue": "",
7128
+          "hideInGraph": false,
7129
+          "refDict": "",
7130
+          "extProps": {},
7131
+          "id": "8C057AFD-1CBC-40D9-8681-7B3A104D84A8"
7132
+        },
7133
+        {
7134
+          "defKey": "answer",
7135
+          "defName": "答案",
7136
+          "comment": "",
7137
+          "type": "",
7138
+          "len": "",
7139
+          "scale": "",
7140
+          "primaryKey": false,
7141
+          "notNull": false,
7142
+          "autoIncrement": false,
7143
+          "defaultValue": "",
7144
+          "hideInGraph": false,
7145
+          "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
7146
+          "refDict": "",
7147
+          "extProps": {},
7148
+          "id": "51283DB3-ADD4-4B09-BBB5-887CA10C6BF7"
7149
+        },
7150
+        {
7151
+          "defKey": "score",
7152
+          "defName": "分值",
7153
+          "comment": "",
7154
+          "type": "DECIMAL",
7155
+          "len": 6,
7156
+          "scale": 2,
7157
+          "primaryKey": false,
7158
+          "notNull": false,
7159
+          "autoIncrement": false,
7160
+          "defaultValue": "",
7161
+          "hideInGraph": false,
7162
+          "refDict": "",
7163
+          "extProps": {},
7164
+          "domain": "",
7165
+          "id": "EC9AB5F8-E387-4E40-B948-2581DA3E9D4D"
7166
+        },
7167
+        {
7168
+          "defKey": "sort_no",
7169
+          "defName": "排序",
7170
+          "comment": "",
7171
+          "type": "",
7172
+          "len": "",
7173
+          "scale": "",
7174
+          "primaryKey": false,
7175
+          "notNull": false,
7176
+          "autoIncrement": false,
7177
+          "defaultValue": "",
7178
+          "hideInGraph": false,
7179
+          "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
7180
+          "refDict": "",
7181
+          "extProps": {},
7182
+          "id": "90218D19-7731-4AFE-8883-74944A66D6C8"
7183
+        }
7184
+      ],
7185
+      "correlations": [],
7186
+      "indexes": []
6934 7187
     }
6935 7188
   ],
6936 7189
   "views": [],
@@ -7353,6 +7606,7 @@
7353 7606
         "54B9F404-6224-4952-8B2C-A30F6FEE7CC1",
7354 7607
         "B6BB7C88-ABE9-4B2F-8556-6A4EA85FBFCB",
7355 7608
         "156A3EC2-A70F-41C1-A66F-BFBE8476BA16",
7609
+        "507794C4-11E9-4924-AEC5-368BC6E03FD7",
7356 7610
         "3B58B8CA-AF26-40FE-907A-A34523419478",
7357 7611
         "B20E272F-91EB-4BAC-AAD6-AF99D517E44D",
7358 7612
         "EF3D4E17-6CE0-4944-B1DC-40280B2B689F"

db/.back_文明创办/文明创办-backup-20221213164228.pdma.json → db/.back_文明创办/文明创办-backup-20221215163254.pdma.json 查看文件

@@ -4,7 +4,7 @@
4 4
   "avatar": "",
5 5
   "version": "4.1.4",
6 6
   "createdTime": "2022-12-12 09:36:12",
7
-  "updatedTime": "2022-12-13 16:40:09",
7
+  "updatedTime": "2022-12-15 16:32:52",
8 8
   "dbConns": [],
9 9
   "profile": {
10 10
     "default": {
@@ -237,7 +237,7 @@
237 237
         "ServiceImpl": "{{  var today=new Date();\n    var fullYear=today.getFullYear();\n    var month=today.getMonth() + 1;\n    var days=today.getDate();\n    \n    var pkVarName = \"undefinedId\";\n    var pkVarNameU = \"UndefinedId\";\n    var pkFieldKey = \"UNDEFINED\";\n    var pkDataType = \"String\";\n    it.entity.fields.forEach(function(field){\n        if(field.primaryKey){\n            pkFieldKey = field.defKey;\n            pkVarName = it.func.camel(field.defKey,false);\n            pkVarNameU = it.func.camel(field.defKey,true);\n            pkDataType = field[\"type\"];\n            return;\n        }\n    });\n    \n    var pkgName = it.entity.env.base.nameSpace;\n    var beanClass = it.entity.env.base.codeRoot;\n    var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n    var serviceClass = beanClass+'Service';\n    var serviceVarName= beanVarName+'Service';\n    var mapperName = beanVarName+'Mapper';\n    \n}}package {{=pkgName}}.service.impl;\n$blankline\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.stereotype.Service;\n\nimport {{=pkgName}}.entity.{{=beanClass}};\nimport {{=pkgName}}.mapper.{{=beanClass}}Mapper;\nimport {{=pkgName}}.service.{{=serviceClass}};\n\n /**\n * {{=it.entity.defName}};({{=it.entity.defKey}})表服务实现类\n * @author : http://www.chiner.pro\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\n */\n@Service\npublic class {{=serviceClass}}Impl extends BaseServiceImpl<{{=beanClass}}Mapper, {{=beanClass}}> implements {{=serviceClass}} {\n    $blankline\n}",
238 238
         "Mapper": "{{  var today=new Date();\n    var fullYear=today.getFullYear();\n    var month=today.getMonth() + 1;\n    var days=today.getDate();\n    \n    var pkVarName = \"undefinedId\";\n    var pkDataType = \"String\";\n    it.entity.fields.forEach(function(field){\n        if(field.primaryKey){\n            pkVarName = it.func.camel(field.defKey,false);\n            pkDataType = field[\"type\"];\n            return;\n        }\n    });\n    \n    var pkgName = it.entity.env.base.nameSpace;\n    var beanClass = it.entity.env.base.codeRoot;\n    var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n    var serviceClass = beanClass+'Service';\n    var serviceVarName= beanVarName+'Service';\n    \n}}package {{=pkgName}}.mapper;\n$blankline\n\nimport com.baomidou.mybatisplus.core.mapper.BaseMapper;\nimport org.apache.ibatis.annotations.Mapper;\nimport org.apache.ibatis.annotations.Param;\nimport {{=pkgName}}.entity.{{=beanClass}};\n$blankline\n\n /**\n * {{=it.entity.defName}};({{=it.entity.defKey}})表数据库访问层\n * @author : http://njyunzhi.com\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\n */\n@Mapper\npublic interface {{=beanClass}}Mapper  extends BaseMapper<{{=beanClass}}>{\n    $blankline\n}",
239 239
         "Mapper.xml": "{{  var today=new Date();\n    var fullYear=today.getFullYear();\n    var month=today.getMonth() + 1;\n    var days=today.getDate();\n    \n    var pkVarName = \"undefinedId\";\n    var pkDataType = \"String\";\n    var pkField = \"UNDEFINED_ID\";\n    it.entity.fields.forEach(function(field){\n        if(field.primaryKey){\n            pkField = field.defKey;\n            pkVarName = it.func.camel(field.defKey,false);\n            pkDataType = field[\"type\"];\n            return;\n        }\n    });\n    \n    var pkgName = it.entity.env.base.nameSpace;\n    var beanClass = it.entity.env.base.codeRoot;\n    var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n    var serviceClass = beanClass+'Service';\n    var serviceVarName= beanVarName+'Service';\n    \n}}<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE mapper PUBLIC \"-//mybatis.org//DTD Mapper 3.0//EN\" \"http://mybatis.org/dtd/mybatis-3-mapper.dtd\">\n$blankline\n\n<mapper namespace=\"{{=pkgName}}.mapper.{{=beanClass}}Mapper\">\n    $blankline\n</mapper>\n\n",
240
-        "Entity": "{{  var today=new Date();\n    var fullYear=today.getFullYear();\n    var month=today.getMonth() + 1;\n    var days=today.getDate();\n    \n    var pkVarName = \"undefinedId\";\n    var pkDataType = \"String\";\n    it.entity.fields.forEach(function(field){\n        if(field.primaryKey){\n            pkVarName = it.func.camel(field.defKey,false);\n            pkDataType = field[\"type\"];\n            return;\n        }\n    });\n    \n    var pkgName = it.entity.env.base.nameSpace;\n    var beanClass = it.entity.env.base.codeRoot;\n    var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n    var serviceClass = beanClass+'Service';\n    var serviceVarName= beanVarName+'Service';\n    \n}}package {{=pkgName}}.entity;\n$blankline\nimport io.swagger.annotations.ApiModel;\nimport io.swagger.annotations.ApiModelProperty;\nimport com.baomidou.mybatisplus.annotation.IdType;\nimport com.baomidou.mybatisplus.annotation.TableName;\nimport com.baomidou.mybatisplus.annotation.TableId;\nimport java.io.Serializable;\nimport java.time.LocalDateTime;\nimport lombok.Data;\nimport lombok.EqualsAndHashCode;\nimport lombok.experimental.Accessors;\n$blankline\n\n /**\n * {{=it.entity.defName}};{{=it.entity.comment}}\n * @author : http://www.chiner.pro\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\n */\n@Data\n@EqualsAndHashCode(callSuper = false)\n@Accessors(chain = true)\n@ApiModel(value = \"{{=it.entity.defName}}\",description = \"{{=it.entity.comment}}\")\n@TableName(\"{{=it.entity.defKey}}\")\npublic class {{=beanClass}} implements Serializable,Cloneable{\n{{~it.entity.fields:field:index}}\n    /** {{=it.func.join(field.defName,field.comment,';')}} */\n    @ApiModelProperty(name = \"{{=field.defName}}\",notes = \"{{=field.comment}}\")\n    {{? field.primaryKey }}\n    @TableId(value = \"{{=field.defKey}}\", type = IdType.INPUT)\n    {{?}}\n    private {{=field.type}} {{=it.func.camel(field.defKey,false)}} ;\n{{~}}\n$blankline\n}"
240
+        "Entity": "{{  var today=new Date();\n    var fullYear=today.getFullYear();\n    var month=today.getMonth() + 1;\n    var days=today.getDate();\n    \n    var pkVarName = \"undefinedId\";\n    var pkDataType = \"String\";\n    it.entity.fields.forEach(function(field){\n        if(field.primaryKey){\n            pkVarName = it.func.camel(field.defKey,false);\n            pkDataType = field[\"type\"];\n            return;\n        }\n    });\n    \n    var pkgName = it.entity.env.base.nameSpace;\n    var beanClass = it.entity.env.base.codeRoot;\n    var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n    var serviceClass = beanClass+'Service';\n    var serviceVarName= beanVarName+'Service';\n    \n}}package {{=pkgName}}.entity;\n$blankline\nimport io.swagger.annotations.ApiModel;\nimport io.swagger.annotations.ApiModelProperty;\nimport com.baomidou.mybatisplus.annotation.IdType;\nimport com.baomidou.mybatisplus.annotation.TableName;\nimport com.baomidou.mybatisplus.annotation.TableId;\nimport java.io.Serializable;\nimport java.time.LocalDateTime;\nimport lombok.Data;\nimport lombok.EqualsAndHashCode;\nimport lombok.experimental.Accessors;\n$blankline\n\n /**\n * {{=it.entity.defName}};{{=it.entity.comment}}\n * @author : http://www.chiner.pro\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\n */\n@Data\n@EqualsAndHashCode(callSuper = false)\n@Accessors(chain = true)\n@ApiModel(value = \"{{=it.entity.defName}}\",description = \"{{=it.entity.comment}}\")\n@TableName(\"{{=it.entity.defKey}}\")\npublic class {{=beanClass}} implements Serializable,Cloneable{\n{{~it.entity.fields:field:index}}\n    /** {{=it.func.join(field.defName,field.comment,';')}} */\n    @ApiModelProperty(name = \"{{=field.defName}}\",notes = \"{{=field.comment}}\")\n    {{? field.primaryKey }}\n    @TableId(value = \"{{=field.defKey}}\", type = IdType.ASSIGN_UUID)\n    {{?}}\n    private {{=field.type}} {{=it.func.camel(field.defKey,false)}} ;\n{{~}}\n$blankline\n}"
241 241
       },
242 242
       {
243 243
         "applyFor": "29D1CE08-4C35-4D2D-AAA9-23D93305B52E",
@@ -1116,7 +1116,7 @@
1116 1116
           "hideInGraph": false,
1117 1117
           "refDict": "",
1118 1118
           "extProps": {},
1119
-          "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
1119
+          "domain": "54611CCC-CA4B-42E1-9F32-4944C85B85A6",
1120 1120
           "id": "322EC759-BCCE-42E6-A1F1-837739AA6278"
1121 1121
         },
1122 1122
         {
@@ -2408,7 +2408,7 @@
2408 2408
           "id": "31357233-866E-45C4-867D-1F11AD8CF851"
2409 2409
         },
2410 2410
         {
2411
-          "defKey": "resource_p_id",
2411
+          "defKey": "parent_id",
2412 2412
           "defName": "上级ID",
2413 2413
           "comment": "",
2414 2414
           "type": "",
@@ -4351,6 +4351,23 @@
4351 4351
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
4352 4352
           "id": "642B925C-403B-496D-BF93-5D4BE72A883B"
4353 4353
         },
4354
+        {
4355
+          "defKey": "expire_date",
4356
+          "defName": "截止时间",
4357
+          "comment": "YYYY-MM-DD",
4358
+          "type": "",
4359
+          "len": "",
4360
+          "scale": "",
4361
+          "primaryKey": false,
4362
+          "notNull": false,
4363
+          "autoIncrement": false,
4364
+          "defaultValue": "",
4365
+          "hideInGraph": false,
4366
+          "refDict": "",
4367
+          "extProps": {},
4368
+          "domain": "73FD2BAD-2358-4336-B96D-45DC897BD792",
4369
+          "id": "97EC5064-0B0E-4AD5-BE3A-535AD8913AD1"
4370
+        },
4354 4371
         {
4355 4372
           "defKey": "process_node",
4356 4373
           "defName": "流程节点",
@@ -4629,11 +4646,11 @@
4629 4646
           "id": "0EF50BA7-C44F-4D9E-A28D-F94C3D15350F"
4630 4647
         },
4631 4648
         {
4632
-          "defKey": "org_id",
4633
-          "defName": "机构ID",
4634
-          "comment": "",
4635
-          "type": "",
4636
-          "len": "",
4649
+          "defKey": "expire_date",
4650
+          "defName": "截止时间",
4651
+          "comment": "YYYY-MM-DD",
4652
+          "type": "VARCHAR",
4653
+          "len": 20,
4637 4654
           "scale": "",
4638 4655
           "primaryKey": false,
4639 4656
           "notNull": false,
@@ -4641,9 +4658,9 @@
4641 4658
           "defaultValue": "",
4642 4659
           "hideInGraph": false,
4643 4660
           "refDict": "",
4644
-          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
4645
-          "id": "F3C73F9F-2277-498F-A067-9D44F19125B1",
4646
-          "uiHint": ""
4661
+          "extProps": {},
4662
+          "domain": "",
4663
+          "id": "52C74C06-CC1C-416E-B913-78B500CE30A2"
4647 4664
         },
4648 4665
         {
4649 4666
           "defKey": "status",
@@ -4924,7 +4941,7 @@
4924 4941
         "custom": {}
4925 4942
       },
4926 4943
       "defKey": "ta_check_item",
4927
-      "defName": "测评点位",
4944
+      "defName": "测评项目",
4928 4945
       "comment": "",
4929 4946
       "properties": {},
4930 4947
       "nameTemplate": "{defKey}[{defName}]",
@@ -5029,6 +5046,23 @@
5029 5046
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
5030 5047
           "id": "7FF8CD4A-8CA9-4C24-A20E-F5D1C1425E33"
5031 5048
         },
5049
+        {
5050
+          "defKey": "item_type",
5051
+          "defName": "项目类型",
5052
+          "comment": "loc点位,survey问卷调查",
5053
+          "type": "",
5054
+          "len": "",
5055
+          "scale": "",
5056
+          "primaryKey": false,
5057
+          "notNull": false,
5058
+          "autoIncrement": false,
5059
+          "defaultValue": "",
5060
+          "hideInGraph": false,
5061
+          "refDict": "",
5062
+          "extProps": {},
5063
+          "domain": "73FD2BAD-2358-4336-B96D-45DC897BD792",
5064
+          "id": "3274DF40-5C9F-49E0-8013-A8F8FC5B401A"
5065
+        },
5032 5066
         {
5033 5067
           "defKey": "name",
5034 5068
           "defName": "名称",
@@ -5050,18 +5084,52 @@
5050 5084
           "defKey": "full_score",
5051 5085
           "defName": "满分",
5052 5086
           "comment": "",
5087
+          "type": "DECIMAL",
5088
+          "len": 6,
5089
+          "scale": 2,
5090
+          "primaryKey": false,
5091
+          "notNull": false,
5092
+          "autoIncrement": false,
5093
+          "defaultValue": "",
5094
+          "hideInGraph": false,
5095
+          "refDict": "",
5096
+          "extProps": {},
5097
+          "domain": "",
5098
+          "id": "D2EBAC6F-DE7D-420D-933B-2F1D89EDA536"
5099
+        },
5100
+        {
5101
+          "defKey": "score",
5102
+          "defName": "得分",
5103
+          "comment": "",
5104
+          "type": "DECIMAL",
5105
+          "len": 6,
5106
+          "scale": 2,
5107
+          "primaryKey": false,
5108
+          "notNull": false,
5109
+          "autoIncrement": false,
5110
+          "defaultValue": "",
5111
+          "hideInGraph": false,
5112
+          "refDict": "",
5113
+          "extProps": {},
5114
+          "domain": "",
5115
+          "id": "90915C24-C088-4AC8-924E-E951EF0DB253"
5116
+        },
5117
+        {
5118
+          "defKey": "num",
5119
+          "defName": "数量",
5120
+          "comment": "",
5053 5121
           "type": "",
5054 5122
           "len": "",
5055 5123
           "scale": "",
5056 5124
           "primaryKey": false,
5057 5125
           "notNull": false,
5058 5126
           "autoIncrement": false,
5059
-          "defaultValue": "",
5127
+          "defaultValue": "1",
5060 5128
           "hideInGraph": false,
5061 5129
           "refDict": "",
5062 5130
           "extProps": {},
5063 5131
           "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
5064
-          "id": "D2EBAC6F-DE7D-420D-933B-2F1D89EDA536"
5132
+          "id": "06FF365A-00BF-4F0A-B284-AD3479222286"
5065 5133
         },
5066 5134
         {
5067 5135
           "defKey": "status",
@@ -5426,8 +5494,8 @@
5426 5494
         },
5427 5495
         "custom": {}
5428 5496
       },
5429
-      "defKey": "td_loc_question",
5430
-      "defName": "点位问题",
5497
+      "defKey": "td_question",
5498
+      "defName": "问题",
5431 5499
       "comment": "",
5432 5500
       "properties": {},
5433 5501
       "nameTemplate": "{defKey}[{defName}]",
@@ -5507,7 +5575,7 @@
5507 5575
           "scale": "",
5508 5576
           "primaryKey": true,
5509 5577
           "notNull": true,
5510
-          "autoIncrement": true,
5578
+          "autoIncrement": false,
5511 5579
           "defaultValue": "",
5512 5580
           "hideInGraph": true,
5513 5581
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
@@ -5515,23 +5583,6 @@
5515 5583
           "uiHint": "",
5516 5584
           "id": "9936D1F3-0931-40ED-A4AA-DF8DA1F3DD38"
5517 5585
         },
5518
-        {
5519
-          "defKey": "loc_id",
5520
-          "defName": "点位ID",
5521
-          "comment": "",
5522
-          "type": "",
5523
-          "len": "",
5524
-          "scale": "",
5525
-          "primaryKey": false,
5526
-          "notNull": false,
5527
-          "autoIncrement": false,
5528
-          "defaultValue": "",
5529
-          "hideInGraph": false,
5530
-          "refDict": "",
5531
-          "extProps": {},
5532
-          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
5533
-          "id": "AAB4BF27-5AE1-42A1-8164-2FA6A3D8D056"
5534
-        },
5535 5586
         {
5536 5587
           "defKey": "qu_type",
5537 5588
           "defName": "问题类型",
@@ -5652,8 +5703,8 @@
5652 5703
         },
5653 5704
         "custom": {}
5654 5705
       },
5655
-      "defKey": "td_loc_qu_answer",
5656
-      "defName": "点位问题答案",
5706
+      "defKey": "td_qu_answer",
5707
+      "defName": "问题答案",
5657 5708
       "comment": "",
5658 5709
       "properties": {},
5659 5710
       "nameTemplate": "{defKey}[{defName}]",
@@ -5733,7 +5784,7 @@
5733 5784
           "scale": "",
5734 5785
           "primaryKey": true,
5735 5786
           "notNull": true,
5736
-          "autoIncrement": true,
5787
+          "autoIncrement": false,
5737 5788
           "defaultValue": "",
5738 5789
           "hideInGraph": true,
5739 5790
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
@@ -5879,7 +5930,7 @@
5879 5930
         "custom": {}
5880 5931
       },
5881 5932
       "defKey": "ta_check_item_qu",
5882
-      "defName": "点位问题",
5933
+      "defName": "项目问题",
5883 5934
       "comment": "",
5884 5935
       "properties": {},
5885 5936
       "nameTemplate": "{defKey}[{defName}]",
@@ -5951,7 +6002,7 @@
5951 6002
       ],
5952 6003
       "fields": [
5953 6004
         {
5954
-          "defKey": "id",
6005
+          "defKey": "qu_id",
5955 6006
           "defName": "id",
5956 6007
           "comment": "",
5957 6008
           "type": "",
@@ -5959,10 +6010,10 @@
5959 6010
           "scale": "",
5960 6011
           "primaryKey": true,
5961 6012
           "notNull": true,
5962
-          "autoIncrement": true,
6013
+          "autoIncrement": false,
5963 6014
           "defaultValue": "",
5964 6015
           "hideInGraph": true,
5965
-          "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
6016
+          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
5966 6017
           "refDict": "",
5967 6018
           "uiHint": "",
5968 6019
           "id": "58A7DDC4-00CB-4FC4-86E9-E251AA006338"
@@ -5985,9 +6036,9 @@
5985 6036
           "uiHint": ""
5986 6037
         },
5987 6038
         {
5988
-          "defKey": "qu_id",
5989
-          "defName": "问题ID",
5990
-          "comment": "来源点位问题",
6039
+          "defKey": "qu_type",
6040
+          "defName": "问题类型",
6041
+          "comment": "radio 单选, fill 填空题",
5991 6042
           "type": "",
5992 6043
           "len": "",
5993 6044
           "scale": "",
@@ -5996,10 +6047,95 @@
5996 6047
           "autoIncrement": false,
5997 6048
           "defaultValue": "",
5998 6049
           "hideInGraph": false,
6050
+          "domain": "73FD2BAD-2358-4336-B96D-45DC897BD792",
5999 6051
           "refDict": "",
6000 6052
           "extProps": {},
6001
-          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
6002
-          "id": "C5E6642A-D6EF-460C-90CA-98855441D345"
6053
+          "id": "99ED2FEB-E6A2-4237-A998-E9E83A90A9FB"
6054
+        },
6055
+        {
6056
+          "defKey": "title",
6057
+          "defName": "问题描述",
6058
+          "comment": "",
6059
+          "type": "",
6060
+          "len": "",
6061
+          "scale": "",
6062
+          "primaryKey": false,
6063
+          "notNull": false,
6064
+          "autoIncrement": false,
6065
+          "defaultValue": "",
6066
+          "hideInGraph": false,
6067
+          "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
6068
+          "refDict": "",
6069
+          "extProps": {},
6070
+          "id": "F967C8FB-F1EF-4C85-9DC4-EB37C8227339"
6071
+        },
6072
+        {
6073
+          "defKey": "compute_type",
6074
+          "defName": "计分方式",
6075
+          "comment": "+得分,-减分",
6076
+          "type": "VARCHAR",
6077
+          "len": 10,
6078
+          "scale": "",
6079
+          "primaryKey": false,
6080
+          "notNull": false,
6081
+          "autoIncrement": false,
6082
+          "defaultValue": "",
6083
+          "hideInGraph": false,
6084
+          "refDict": "",
6085
+          "extProps": {},
6086
+          "domain": "",
6087
+          "id": "FDCEECB0-2E7F-43D6-9B96-8D464865D562"
6088
+        },
6089
+        {
6090
+          "defKey": "max_score",
6091
+          "defName": "最高得(扣)分",
6092
+          "comment": "",
6093
+          "type": "DECIMAL",
6094
+          "len": 6,
6095
+          "scale": 2,
6096
+          "primaryKey": false,
6097
+          "notNull": false,
6098
+          "autoIncrement": false,
6099
+          "defaultValue": "",
6100
+          "hideInGraph": false,
6101
+          "refDict": "",
6102
+          "extProps": {},
6103
+          "domain": "",
6104
+          "id": "786109C8-D36C-4724-8C76-DE64AC216BF1"
6105
+        },
6106
+        {
6107
+          "defKey": "an_score",
6108
+          "defName": "每项计分",
6109
+          "comment": "",
6110
+          "type": "DECIMAL",
6111
+          "len": 6,
6112
+          "scale": 2,
6113
+          "primaryKey": false,
6114
+          "notNull": false,
6115
+          "autoIncrement": false,
6116
+          "defaultValue": "",
6117
+          "hideInGraph": false,
6118
+          "refDict": "",
6119
+          "extProps": {},
6120
+          "domain": "",
6121
+          "id": "DD228B07-C934-4B55-BFBD-844E4CBC0A75"
6122
+        },
6123
+        {
6124
+          "defKey": "stand",
6125
+          "defName": "评分标准",
6126
+          "comment": "",
6127
+          "type": "TEXT",
6128
+          "len": 0,
6129
+          "scale": "",
6130
+          "primaryKey": false,
6131
+          "notNull": false,
6132
+          "autoIncrement": false,
6133
+          "defaultValue": "",
6134
+          "hideInGraph": false,
6135
+          "refDict": "",
6136
+          "extProps": {},
6137
+          "domain": "",
6138
+          "id": "0C274B8A-FF55-4B84-B764-780A793044EF"
6003 6139
         },
6004 6140
         {
6005 6141
           "defKey": "sort_no",
@@ -6145,7 +6281,7 @@
6145 6281
         {
6146 6282
           "defKey": "qu_id",
6147 6283
           "defName": "问题ID",
6148
-          "comment": "来源点位题",
6284
+          "comment": "来源点位题",
6149 6285
           "type": "",
6150 6286
           "len": "",
6151 6287
           "scale": "",
@@ -6176,57 +6312,6 @@
6176 6312
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
6177 6313
           "id": "0B03C02D-84EC-4306-8CEA-2BAF04806409"
6178 6314
         },
6179
-        {
6180
-          "defKey": "is_custom",
6181
-          "defName": "其他问题",
6182
-          "comment": "其他问题时, qu_id 不存在",
6183
-          "type": "",
6184
-          "len": "",
6185
-          "scale": "",
6186
-          "primaryKey": false,
6187
-          "notNull": false,
6188
-          "autoIncrement": false,
6189
-          "defaultValue": "",
6190
-          "hideInGraph": false,
6191
-          "refDict": "",
6192
-          "extProps": {},
6193
-          "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
6194
-          "id": "58BB49C4-EE07-4A1A-B301-FC46D63C7B6B"
6195
-        },
6196
-        {
6197
-          "defKey": "qu_title",
6198
-          "defName": "问题描述",
6199
-          "comment": "",
6200
-          "type": "",
6201
-          "len": "",
6202
-          "scale": "",
6203
-          "primaryKey": false,
6204
-          "notNull": false,
6205
-          "autoIncrement": false,
6206
-          "defaultValue": "",
6207
-          "hideInGraph": false,
6208
-          "refDict": "",
6209
-          "extProps": {},
6210
-          "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
6211
-          "id": "9659966E-5B4E-4E35-BF20-BB849C988D3F"
6212
-        },
6213
-        {
6214
-          "defKey": "stand_answer",
6215
-          "defName": "标准答案",
6216
-          "comment": "",
6217
-          "type": "",
6218
-          "len": "",
6219
-          "scale": "",
6220
-          "primaryKey": false,
6221
-          "notNull": false,
6222
-          "autoIncrement": false,
6223
-          "defaultValue": "",
6224
-          "hideInGraph": false,
6225
-          "refDict": "",
6226
-          "extProps": {},
6227
-          "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
6228
-          "id": "5C1A1961-721B-4B18-8E55-42B3A0019062"
6229
-        },
6230 6315
         {
6231 6316
           "defKey": "answer",
6232 6317
           "defName": "答案",
@@ -6438,7 +6523,7 @@
6438 6523
         },
6439 6524
         {
6440 6525
           "defKey": "item_id",
6441
-          "defName": "测评点位",
6526
+          "defName": "测评项目",
6442 6527
           "comment": "",
6443 6528
           "type": "",
6444 6529
           "len": "",
@@ -6472,7 +6557,7 @@
6472 6557
         },
6473 6558
         {
6474 6559
           "defKey": "item_name",
6475
-          "defName": "点位名称",
6560
+          "defName": "项目名称",
6476 6561
           "comment": "",
6477 6562
           "type": "",
6478 6563
           "len": "",
@@ -6489,7 +6574,7 @@
6489 6574
         },
6490 6575
         {
6491 6576
           "defKey": "name",
6492
-          "defName": "具体名称",
6577
+          "defName": "具体(小区)名称",
6493 6578
           "comment": "",
6494 6579
           "type": "",
6495 6580
           "len": "",
@@ -6914,6 +6999,191 @@
6914 6999
       ],
6915 7000
       "correlations": [],
6916 7001
       "indexes": []
7002
+    },
7003
+    {
7004
+      "id": "507794C4-11E9-4924-AEC5-368BC6E03FD7",
7005
+      "env": {
7006
+        "base": {
7007
+          "nameSpace": "",
7008
+          "codeRoot": ""
7009
+        }
7010
+      },
7011
+      "defKey": "ta_check_item_an",
7012
+      "defName": "项目问题答案",
7013
+      "comment": "",
7014
+      "properties": {},
7015
+      "nameTemplate": "{defKey}[{defName}]",
7016
+      "headers": [
7017
+        {
7018
+          "refKey": "hideInGraph",
7019
+          "hideInGraph": true
7020
+        },
7021
+        {
7022
+          "refKey": "defKey",
7023
+          "hideInGraph": false
7024
+        },
7025
+        {
7026
+          "refKey": "defName",
7027
+          "hideInGraph": false
7028
+        },
7029
+        {
7030
+          "refKey": "primaryKey",
7031
+          "hideInGraph": false
7032
+        },
7033
+        {
7034
+          "refKey": "notNull",
7035
+          "hideInGraph": true
7036
+        },
7037
+        {
7038
+          "refKey": "autoIncrement",
7039
+          "hideInGraph": true
7040
+        },
7041
+        {
7042
+          "refKey": "domain",
7043
+          "hideInGraph": true
7044
+        },
7045
+        {
7046
+          "refKey": "type",
7047
+          "hideInGraph": false
7048
+        },
7049
+        {
7050
+          "refKey": "len",
7051
+          "hideInGraph": false
7052
+        },
7053
+        {
7054
+          "refKey": "scale",
7055
+          "hideInGraph": false
7056
+        },
7057
+        {
7058
+          "refKey": "comment",
7059
+          "hideInGraph": true
7060
+        },
7061
+        {
7062
+          "refKey": "refDict",
7063
+          "hideInGraph": true
7064
+        },
7065
+        {
7066
+          "refKey": "defaultValue",
7067
+          "hideInGraph": true
7068
+        },
7069
+        {
7070
+          "refKey": "isStandard",
7071
+          "hideInGraph": false
7072
+        },
7073
+        {
7074
+          "refKey": "uiHint",
7075
+          "hideInGraph": true
7076
+        },
7077
+        {
7078
+          "refKey": "extProps",
7079
+          "hideInGraph": true
7080
+        }
7081
+      ],
7082
+      "fields": [
7083
+        {
7084
+          "defKey": "answer_id",
7085
+          "defName": "答案ID",
7086
+          "comment": "",
7087
+          "type": "",
7088
+          "len": 32,
7089
+          "scale": "",
7090
+          "primaryKey": true,
7091
+          "notNull": true,
7092
+          "autoIncrement": true,
7093
+          "defaultValue": "",
7094
+          "hideInGraph": true,
7095
+          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
7096
+          "refDict": "",
7097
+          "uiHint": "",
7098
+          "id": "DB338FE4-285E-4AF1-9578-8690FF7FE086"
7099
+        },
7100
+        {
7101
+          "defKey": "qu_id",
7102
+          "defName": "问题ID",
7103
+          "comment": "",
7104
+          "type": "",
7105
+          "len": "",
7106
+          "scale": "",
7107
+          "primaryKey": false,
7108
+          "notNull": false,
7109
+          "autoIncrement": false,
7110
+          "defaultValue": "",
7111
+          "hideInGraph": false,
7112
+          "refDict": "",
7113
+          "extProps": {},
7114
+          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
7115
+          "id": "EC6B096C-2BC6-45D7-88F5-555F94BF1AA0"
7116
+        },
7117
+        {
7118
+          "defKey": "answer_code",
7119
+          "defName": "答案选项",
7120
+          "comment": "ABCD等",
7121
+          "type": "VARCHAR",
7122
+          "len": 10,
7123
+          "scale": "",
7124
+          "primaryKey": false,
7125
+          "notNull": false,
7126
+          "autoIncrement": false,
7127
+          "defaultValue": "",
7128
+          "hideInGraph": false,
7129
+          "refDict": "",
7130
+          "extProps": {},
7131
+          "id": "8C057AFD-1CBC-40D9-8681-7B3A104D84A8"
7132
+        },
7133
+        {
7134
+          "defKey": "answer",
7135
+          "defName": "答案",
7136
+          "comment": "",
7137
+          "type": "",
7138
+          "len": "",
7139
+          "scale": "",
7140
+          "primaryKey": false,
7141
+          "notNull": false,
7142
+          "autoIncrement": false,
7143
+          "defaultValue": "",
7144
+          "hideInGraph": false,
7145
+          "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
7146
+          "refDict": "",
7147
+          "extProps": {},
7148
+          "id": "51283DB3-ADD4-4B09-BBB5-887CA10C6BF7"
7149
+        },
7150
+        {
7151
+          "defKey": "score",
7152
+          "defName": "分值",
7153
+          "comment": "",
7154
+          "type": "DECIMAL",
7155
+          "len": 6,
7156
+          "scale": 2,
7157
+          "primaryKey": false,
7158
+          "notNull": false,
7159
+          "autoIncrement": false,
7160
+          "defaultValue": "",
7161
+          "hideInGraph": false,
7162
+          "refDict": "",
7163
+          "extProps": {},
7164
+          "domain": "",
7165
+          "id": "EC9AB5F8-E387-4E40-B948-2581DA3E9D4D"
7166
+        },
7167
+        {
7168
+          "defKey": "sort_no",
7169
+          "defName": "排序",
7170
+          "comment": "",
7171
+          "type": "",
7172
+          "len": "",
7173
+          "scale": "",
7174
+          "primaryKey": false,
7175
+          "notNull": false,
7176
+          "autoIncrement": false,
7177
+          "defaultValue": "",
7178
+          "hideInGraph": false,
7179
+          "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
7180
+          "refDict": "",
7181
+          "extProps": {},
7182
+          "id": "90218D19-7731-4AFE-8883-74944A66D6C8"
7183
+        }
7184
+      ],
7185
+      "correlations": [],
7186
+      "indexes": []
6917 7187
     }
6918 7188
   ],
6919 7189
   "views": [],
@@ -7336,6 +7606,7 @@
7336 7606
         "54B9F404-6224-4952-8B2C-A30F6FEE7CC1",
7337 7607
         "B6BB7C88-ABE9-4B2F-8556-6A4EA85FBFCB",
7338 7608
         "156A3EC2-A70F-41C1-A66F-BFBE8476BA16",
7609
+        "507794C4-11E9-4924-AEC5-368BC6E03FD7",
7339 7610
         "3B58B8CA-AF26-40FE-907A-A34523419478",
7340 7611
         "B20E272F-91EB-4BAC-AAD6-AF99D517E44D",
7341 7612
         "EF3D4E17-6CE0-4944-B1DC-40280B2B689F"

+ 358
- 104
db/文明创办.pdma.json 查看文件

@@ -4,7 +4,7 @@
4 4
   "avatar": "",
5 5
   "version": "4.1.4",
6 6
   "createdTime": "2022-12-12 09:36:12",
7
-  "updatedTime": "2022-12-13 16:45:50",
7
+  "updatedTime": "2022-12-15 16:32:54",
8 8
   "dbConns": [],
9 9
   "profile": {
10 10
     "default": {
@@ -237,7 +237,7 @@
237 237
         "ServiceImpl": "{{  var today=new Date();\n    var fullYear=today.getFullYear();\n    var month=today.getMonth() + 1;\n    var days=today.getDate();\n    \n    var pkVarName = \"undefinedId\";\n    var pkVarNameU = \"UndefinedId\";\n    var pkFieldKey = \"UNDEFINED\";\n    var pkDataType = \"String\";\n    it.entity.fields.forEach(function(field){\n        if(field.primaryKey){\n            pkFieldKey = field.defKey;\n            pkVarName = it.func.camel(field.defKey,false);\n            pkVarNameU = it.func.camel(field.defKey,true);\n            pkDataType = field[\"type\"];\n            return;\n        }\n    });\n    \n    var pkgName = it.entity.env.base.nameSpace;\n    var beanClass = it.entity.env.base.codeRoot;\n    var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n    var serviceClass = beanClass+'Service';\n    var serviceVarName= beanVarName+'Service';\n    var mapperName = beanVarName+'Mapper';\n    \n}}package {{=pkgName}}.service.impl;\n$blankline\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.stereotype.Service;\n\nimport {{=pkgName}}.entity.{{=beanClass}};\nimport {{=pkgName}}.mapper.{{=beanClass}}Mapper;\nimport {{=pkgName}}.service.{{=serviceClass}};\n\n /**\n * {{=it.entity.defName}};({{=it.entity.defKey}})表服务实现类\n * @author : http://www.chiner.pro\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\n */\n@Service\npublic class {{=serviceClass}}Impl extends BaseServiceImpl<{{=beanClass}}Mapper, {{=beanClass}}> implements {{=serviceClass}} {\n    $blankline\n}",
238 238
         "Mapper": "{{  var today=new Date();\n    var fullYear=today.getFullYear();\n    var month=today.getMonth() + 1;\n    var days=today.getDate();\n    \n    var pkVarName = \"undefinedId\";\n    var pkDataType = \"String\";\n    it.entity.fields.forEach(function(field){\n        if(field.primaryKey){\n            pkVarName = it.func.camel(field.defKey,false);\n            pkDataType = field[\"type\"];\n            return;\n        }\n    });\n    \n    var pkgName = it.entity.env.base.nameSpace;\n    var beanClass = it.entity.env.base.codeRoot;\n    var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n    var serviceClass = beanClass+'Service';\n    var serviceVarName= beanVarName+'Service';\n    \n}}package {{=pkgName}}.mapper;\n$blankline\n\nimport com.baomidou.mybatisplus.core.mapper.BaseMapper;\nimport org.apache.ibatis.annotations.Mapper;\nimport org.apache.ibatis.annotations.Param;\nimport {{=pkgName}}.entity.{{=beanClass}};\n$blankline\n\n /**\n * {{=it.entity.defName}};({{=it.entity.defKey}})表数据库访问层\n * @author : http://njyunzhi.com\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\n */\n@Mapper\npublic interface {{=beanClass}}Mapper  extends BaseMapper<{{=beanClass}}>{\n    $blankline\n}",
239 239
         "Mapper.xml": "{{  var today=new Date();\n    var fullYear=today.getFullYear();\n    var month=today.getMonth() + 1;\n    var days=today.getDate();\n    \n    var pkVarName = \"undefinedId\";\n    var pkDataType = \"String\";\n    var pkField = \"UNDEFINED_ID\";\n    it.entity.fields.forEach(function(field){\n        if(field.primaryKey){\n            pkField = field.defKey;\n            pkVarName = it.func.camel(field.defKey,false);\n            pkDataType = field[\"type\"];\n            return;\n        }\n    });\n    \n    var pkgName = it.entity.env.base.nameSpace;\n    var beanClass = it.entity.env.base.codeRoot;\n    var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n    var serviceClass = beanClass+'Service';\n    var serviceVarName= beanVarName+'Service';\n    \n}}<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE mapper PUBLIC \"-//mybatis.org//DTD Mapper 3.0//EN\" \"http://mybatis.org/dtd/mybatis-3-mapper.dtd\">\n$blankline\n\n<mapper namespace=\"{{=pkgName}}.mapper.{{=beanClass}}Mapper\">\n    $blankline\n</mapper>\n\n",
240
-        "Entity": "{{  var today=new Date();\n    var fullYear=today.getFullYear();\n    var month=today.getMonth() + 1;\n    var days=today.getDate();\n    \n    var pkVarName = \"undefinedId\";\n    var pkDataType = \"String\";\n    it.entity.fields.forEach(function(field){\n        if(field.primaryKey){\n            pkVarName = it.func.camel(field.defKey,false);\n            pkDataType = field[\"type\"];\n            return;\n        }\n    });\n    \n    var pkgName = it.entity.env.base.nameSpace;\n    var beanClass = it.entity.env.base.codeRoot;\n    var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n    var serviceClass = beanClass+'Service';\n    var serviceVarName= beanVarName+'Service';\n    \n}}package {{=pkgName}}.entity;\n$blankline\nimport io.swagger.annotations.ApiModel;\nimport io.swagger.annotations.ApiModelProperty;\nimport com.baomidou.mybatisplus.annotation.IdType;\nimport com.baomidou.mybatisplus.annotation.TableName;\nimport com.baomidou.mybatisplus.annotation.TableId;\nimport java.io.Serializable;\nimport java.time.LocalDateTime;\nimport lombok.Data;\nimport lombok.EqualsAndHashCode;\nimport lombok.experimental.Accessors;\n$blankline\n\n /**\n * {{=it.entity.defName}};{{=it.entity.comment}}\n * @author : http://www.chiner.pro\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\n */\n@Data\n@EqualsAndHashCode(callSuper = false)\n@Accessors(chain = true)\n@ApiModel(value = \"{{=it.entity.defName}}\",description = \"{{=it.entity.comment}}\")\n@TableName(\"{{=it.entity.defKey}}\")\npublic class {{=beanClass}} implements Serializable,Cloneable{\n{{~it.entity.fields:field:index}}\n    /** {{=it.func.join(field.defName,field.comment,';')}} */\n    @ApiModelProperty(name = \"{{=field.defName}}\",notes = \"{{=field.comment}}\")\n    {{? field.primaryKey }}\n    @TableId(value = \"{{=field.defKey}}\", type = IdType.INPUT)\n    {{?}}\n    private {{=field.type}} {{=it.func.camel(field.defKey,false)}} ;\n{{~}}\n$blankline\n}"
240
+        "Entity": "{{  var today=new Date();\n    var fullYear=today.getFullYear();\n    var month=today.getMonth() + 1;\n    var days=today.getDate();\n    \n    var pkVarName = \"undefinedId\";\n    var pkDataType = \"String\";\n    it.entity.fields.forEach(function(field){\n        if(field.primaryKey){\n            pkVarName = it.func.camel(field.defKey,false);\n            pkDataType = field[\"type\"];\n            return;\n        }\n    });\n    \n    var pkgName = it.entity.env.base.nameSpace;\n    var beanClass = it.entity.env.base.codeRoot;\n    var beanVarName = beanClass.charAt(0).toLowerCase()+beanClass.slice(1);\n    var serviceClass = beanClass+'Service';\n    var serviceVarName= beanVarName+'Service';\n    \n}}package {{=pkgName}}.entity;\n$blankline\nimport io.swagger.annotations.ApiModel;\nimport io.swagger.annotations.ApiModelProperty;\nimport com.baomidou.mybatisplus.annotation.IdType;\nimport com.baomidou.mybatisplus.annotation.TableName;\nimport com.baomidou.mybatisplus.annotation.TableId;\nimport java.io.Serializable;\nimport java.time.LocalDateTime;\nimport lombok.Data;\nimport lombok.EqualsAndHashCode;\nimport lombok.experimental.Accessors;\n$blankline\n\n /**\n * {{=it.entity.defName}};{{=it.entity.comment}}\n * @author : http://www.chiner.pro\n * @date : {{=fullYear}}-{{=month}}-{{=days}}\n */\n@Data\n@EqualsAndHashCode(callSuper = false)\n@Accessors(chain = true)\n@ApiModel(value = \"{{=it.entity.defName}}\",description = \"{{=it.entity.comment}}\")\n@TableName(\"{{=it.entity.defKey}}\")\npublic class {{=beanClass}} implements Serializable,Cloneable{\n{{~it.entity.fields:field:index}}\n    /** {{=it.func.join(field.defName,field.comment,';')}} */\n    @ApiModelProperty(name = \"{{=field.defName}}\",notes = \"{{=field.comment}}\")\n    {{? field.primaryKey }}\n    @TableId(value = \"{{=field.defKey}}\", type = IdType.ASSIGN_UUID)\n    {{?}}\n    private {{=field.type}} {{=it.func.camel(field.defKey,false)}} ;\n{{~}}\n$blankline\n}"
241 241
       },
242 242
       {
243 243
         "applyFor": "29D1CE08-4C35-4D2D-AAA9-23D93305B52E",
@@ -1116,7 +1116,7 @@
1116 1116
           "hideInGraph": false,
1117 1117
           "refDict": "",
1118 1118
           "extProps": {},
1119
-          "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
1119
+          "domain": "54611CCC-CA4B-42E1-9F32-4944C85B85A6",
1120 1120
           "id": "322EC759-BCCE-42E6-A1F1-837739AA6278"
1121 1121
         },
1122 1122
         {
@@ -2408,7 +2408,7 @@
2408 2408
           "id": "31357233-866E-45C4-867D-1F11AD8CF851"
2409 2409
         },
2410 2410
         {
2411
-          "defKey": "resource_p_id",
2411
+          "defKey": "parent_id",
2412 2412
           "defName": "上级ID",
2413 2413
           "comment": "",
2414 2414
           "type": "",
@@ -4351,6 +4351,23 @@
4351 4351
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
4352 4352
           "id": "642B925C-403B-496D-BF93-5D4BE72A883B"
4353 4353
         },
4354
+        {
4355
+          "defKey": "expire_date",
4356
+          "defName": "截止时间",
4357
+          "comment": "YYYY-MM-DD",
4358
+          "type": "",
4359
+          "len": "",
4360
+          "scale": "",
4361
+          "primaryKey": false,
4362
+          "notNull": false,
4363
+          "autoIncrement": false,
4364
+          "defaultValue": "",
4365
+          "hideInGraph": false,
4366
+          "refDict": "",
4367
+          "extProps": {},
4368
+          "domain": "73FD2BAD-2358-4336-B96D-45DC897BD792",
4369
+          "id": "97EC5064-0B0E-4AD5-BE3A-535AD8913AD1"
4370
+        },
4354 4371
         {
4355 4372
           "defKey": "process_node",
4356 4373
           "defName": "流程节点",
@@ -4629,11 +4646,11 @@
4629 4646
           "id": "0EF50BA7-C44F-4D9E-A28D-F94C3D15350F"
4630 4647
         },
4631 4648
         {
4632
-          "defKey": "org_id",
4633
-          "defName": "机构ID",
4634
-          "comment": "",
4635
-          "type": "",
4636
-          "len": "",
4649
+          "defKey": "expire_date",
4650
+          "defName": "截止时间",
4651
+          "comment": "YYYY-MM-DD",
4652
+          "type": "VARCHAR",
4653
+          "len": 20,
4637 4654
           "scale": "",
4638 4655
           "primaryKey": false,
4639 4656
           "notNull": false,
@@ -4641,9 +4658,9 @@
4641 4658
           "defaultValue": "",
4642 4659
           "hideInGraph": false,
4643 4660
           "refDict": "",
4644
-          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
4645
-          "id": "F3C73F9F-2277-498F-A067-9D44F19125B1",
4646
-          "uiHint": ""
4661
+          "extProps": {},
4662
+          "domain": "",
4663
+          "id": "52C74C06-CC1C-416E-B913-78B500CE30A2"
4647 4664
         },
4648 4665
         {
4649 4666
           "defKey": "status",
@@ -4924,7 +4941,7 @@
4924 4941
         "custom": {}
4925 4942
       },
4926 4943
       "defKey": "ta_check_item",
4927
-      "defName": "测评点位",
4944
+      "defName": "测评项目",
4928 4945
       "comment": "",
4929 4946
       "properties": {},
4930 4947
       "nameTemplate": "{defKey}[{defName}]",
@@ -5029,6 +5046,23 @@
5029 5046
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
5030 5047
           "id": "7FF8CD4A-8CA9-4C24-A20E-F5D1C1425E33"
5031 5048
         },
5049
+        {
5050
+          "defKey": "item_type",
5051
+          "defName": "项目类型",
5052
+          "comment": "loc点位,survey问卷调查",
5053
+          "type": "",
5054
+          "len": "",
5055
+          "scale": "",
5056
+          "primaryKey": false,
5057
+          "notNull": false,
5058
+          "autoIncrement": false,
5059
+          "defaultValue": "",
5060
+          "hideInGraph": false,
5061
+          "refDict": "",
5062
+          "extProps": {},
5063
+          "domain": "73FD2BAD-2358-4336-B96D-45DC897BD792",
5064
+          "id": "3274DF40-5C9F-49E0-8013-A8F8FC5B401A"
5065
+        },
5032 5066
         {
5033 5067
           "defKey": "name",
5034 5068
           "defName": "名称",
@@ -5047,7 +5081,7 @@
5047 5081
           "id": "2ED82F0E-CA82-4D70-854E-9C74BF5D3F1E"
5048 5082
         },
5049 5083
         {
5050
-          "defKey": "score",
5084
+          "defKey": "full_score",
5051 5085
           "defName": "满分",
5052 5086
           "comment": "",
5053 5087
           "type": "DECIMAL",
@@ -5064,8 +5098,25 @@
5064 5098
           "id": "D2EBAC6F-DE7D-420D-933B-2F1D89EDA536"
5065 5099
         },
5066 5100
         {
5067
-          "defKey": "examination_num",
5068
-          "defName": "事件份数",
5101
+          "defKey": "score",
5102
+          "defName": "得分",
5103
+          "comment": "",
5104
+          "type": "DECIMAL",
5105
+          "len": 6,
5106
+          "scale": 2,
5107
+          "primaryKey": false,
5108
+          "notNull": false,
5109
+          "autoIncrement": false,
5110
+          "defaultValue": "",
5111
+          "hideInGraph": false,
5112
+          "refDict": "",
5113
+          "extProps": {},
5114
+          "domain": "",
5115
+          "id": "90915C24-C088-4AC8-924E-E951EF0DB253"
5116
+        },
5117
+        {
5118
+          "defKey": "num",
5119
+          "defName": "数量",
5069 5120
           "comment": "",
5070 5121
           "type": "",
5071 5122
           "len": "",
@@ -5073,7 +5124,7 @@
5073 5124
           "primaryKey": false,
5074 5125
           "notNull": false,
5075 5126
           "autoIncrement": false,
5076
-          "defaultValue": "",
5127
+          "defaultValue": "1",
5077 5128
           "hideInGraph": false,
5078 5129
           "refDict": "",
5079 5130
           "extProps": {},
@@ -5443,8 +5494,8 @@
5443 5494
         },
5444 5495
         "custom": {}
5445 5496
       },
5446
-      "defKey": "td_loc_question",
5447
-      "defName": "点位问题",
5497
+      "defKey": "td_question",
5498
+      "defName": "问题",
5448 5499
       "comment": "",
5449 5500
       "properties": {},
5450 5501
       "nameTemplate": "{defKey}[{defName}]",
@@ -5524,7 +5575,7 @@
5524 5575
           "scale": "",
5525 5576
           "primaryKey": true,
5526 5577
           "notNull": true,
5527
-          "autoIncrement": true,
5578
+          "autoIncrement": false,
5528 5579
           "defaultValue": "",
5529 5580
           "hideInGraph": true,
5530 5581
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
@@ -5532,23 +5583,6 @@
5532 5583
           "uiHint": "",
5533 5584
           "id": "9936D1F3-0931-40ED-A4AA-DF8DA1F3DD38"
5534 5585
         },
5535
-        {
5536
-          "defKey": "loc_id",
5537
-          "defName": "点位ID",
5538
-          "comment": "",
5539
-          "type": "",
5540
-          "len": "",
5541
-          "scale": "",
5542
-          "primaryKey": false,
5543
-          "notNull": false,
5544
-          "autoIncrement": false,
5545
-          "defaultValue": "",
5546
-          "hideInGraph": false,
5547
-          "refDict": "",
5548
-          "extProps": {},
5549
-          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
5550
-          "id": "AAB4BF27-5AE1-42A1-8164-2FA6A3D8D056"
5551
-        },
5552 5586
         {
5553 5587
           "defKey": "qu_type",
5554 5588
           "defName": "问题类型",
@@ -5669,8 +5703,8 @@
5669 5703
         },
5670 5704
         "custom": {}
5671 5705
       },
5672
-      "defKey": "td_loc_qu_answer",
5673
-      "defName": "点位问题答案",
5706
+      "defKey": "td_qu_answer",
5707
+      "defName": "问题答案",
5674 5708
       "comment": "",
5675 5709
       "properties": {},
5676 5710
       "nameTemplate": "{defKey}[{defName}]",
@@ -5750,7 +5784,7 @@
5750 5784
           "scale": "",
5751 5785
           "primaryKey": true,
5752 5786
           "notNull": true,
5753
-          "autoIncrement": true,
5787
+          "autoIncrement": false,
5754 5788
           "defaultValue": "",
5755 5789
           "hideInGraph": true,
5756 5790
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
@@ -5896,7 +5930,7 @@
5896 5930
         "custom": {}
5897 5931
       },
5898 5932
       "defKey": "ta_check_item_qu",
5899
-      "defName": "点位问题",
5933
+      "defName": "项目问题",
5900 5934
       "comment": "",
5901 5935
       "properties": {},
5902 5936
       "nameTemplate": "{defKey}[{defName}]",
@@ -5968,7 +6002,7 @@
5968 6002
       ],
5969 6003
       "fields": [
5970 6004
         {
5971
-          "defKey": "id",
6005
+          "defKey": "qu_id",
5972 6006
           "defName": "id",
5973 6007
           "comment": "",
5974 6008
           "type": "",
@@ -5976,10 +6010,10 @@
5976 6010
           "scale": "",
5977 6011
           "primaryKey": true,
5978 6012
           "notNull": true,
5979
-          "autoIncrement": true,
6013
+          "autoIncrement": false,
5980 6014
           "defaultValue": "",
5981 6015
           "hideInGraph": true,
5982
-          "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
6016
+          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
5983 6017
           "refDict": "",
5984 6018
           "uiHint": "",
5985 6019
           "id": "58A7DDC4-00CB-4FC4-86E9-E251AA006338"
@@ -6002,9 +6036,9 @@
6002 6036
           "uiHint": ""
6003 6037
         },
6004 6038
         {
6005
-          "defKey": "qu_id",
6006
-          "defName": "问题ID",
6007
-          "comment": "来源点位问题",
6039
+          "defKey": "qu_type",
6040
+          "defName": "问题类型",
6041
+          "comment": "radio 单选, fill 填空题",
6008 6042
           "type": "",
6009 6043
           "len": "",
6010 6044
           "scale": "",
@@ -6013,10 +6047,95 @@
6013 6047
           "autoIncrement": false,
6014 6048
           "defaultValue": "",
6015 6049
           "hideInGraph": false,
6050
+          "domain": "73FD2BAD-2358-4336-B96D-45DC897BD792",
6016 6051
           "refDict": "",
6017 6052
           "extProps": {},
6018
-          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
6019
-          "id": "C5E6642A-D6EF-460C-90CA-98855441D345"
6053
+          "id": "99ED2FEB-E6A2-4237-A998-E9E83A90A9FB"
6054
+        },
6055
+        {
6056
+          "defKey": "title",
6057
+          "defName": "问题描述",
6058
+          "comment": "",
6059
+          "type": "",
6060
+          "len": "",
6061
+          "scale": "",
6062
+          "primaryKey": false,
6063
+          "notNull": false,
6064
+          "autoIncrement": false,
6065
+          "defaultValue": "",
6066
+          "hideInGraph": false,
6067
+          "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
6068
+          "refDict": "",
6069
+          "extProps": {},
6070
+          "id": "F967C8FB-F1EF-4C85-9DC4-EB37C8227339"
6071
+        },
6072
+        {
6073
+          "defKey": "compute_type",
6074
+          "defName": "计分方式",
6075
+          "comment": "+得分,-减分",
6076
+          "type": "VARCHAR",
6077
+          "len": 10,
6078
+          "scale": "",
6079
+          "primaryKey": false,
6080
+          "notNull": false,
6081
+          "autoIncrement": false,
6082
+          "defaultValue": "",
6083
+          "hideInGraph": false,
6084
+          "refDict": "",
6085
+          "extProps": {},
6086
+          "domain": "",
6087
+          "id": "FDCEECB0-2E7F-43D6-9B96-8D464865D562"
6088
+        },
6089
+        {
6090
+          "defKey": "max_score",
6091
+          "defName": "最高得(扣)分",
6092
+          "comment": "",
6093
+          "type": "DECIMAL",
6094
+          "len": 6,
6095
+          "scale": 2,
6096
+          "primaryKey": false,
6097
+          "notNull": false,
6098
+          "autoIncrement": false,
6099
+          "defaultValue": "",
6100
+          "hideInGraph": false,
6101
+          "refDict": "",
6102
+          "extProps": {},
6103
+          "domain": "",
6104
+          "id": "786109C8-D36C-4724-8C76-DE64AC216BF1"
6105
+        },
6106
+        {
6107
+          "defKey": "an_score",
6108
+          "defName": "每项计分",
6109
+          "comment": "",
6110
+          "type": "DECIMAL",
6111
+          "len": 6,
6112
+          "scale": 2,
6113
+          "primaryKey": false,
6114
+          "notNull": false,
6115
+          "autoIncrement": false,
6116
+          "defaultValue": "",
6117
+          "hideInGraph": false,
6118
+          "refDict": "",
6119
+          "extProps": {},
6120
+          "domain": "",
6121
+          "id": "DD228B07-C934-4B55-BFBD-844E4CBC0A75"
6122
+        },
6123
+        {
6124
+          "defKey": "stand",
6125
+          "defName": "评分标准",
6126
+          "comment": "",
6127
+          "type": "TEXT",
6128
+          "len": 0,
6129
+          "scale": "",
6130
+          "primaryKey": false,
6131
+          "notNull": false,
6132
+          "autoIncrement": false,
6133
+          "defaultValue": "",
6134
+          "hideInGraph": false,
6135
+          "refDict": "",
6136
+          "extProps": {},
6137
+          "domain": "",
6138
+          "id": "0C274B8A-FF55-4B84-B764-780A793044EF"
6020 6139
         },
6021 6140
         {
6022 6141
           "defKey": "sort_no",
@@ -6162,7 +6281,7 @@
6162 6281
         {
6163 6282
           "defKey": "qu_id",
6164 6283
           "defName": "问题ID",
6165
-          "comment": "来源点位题",
6284
+          "comment": "来源点位题",
6166 6285
           "type": "",
6167 6286
           "len": "",
6168 6287
           "scale": "",
@@ -6193,57 +6312,6 @@
6193 6312
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
6194 6313
           "id": "0B03C02D-84EC-4306-8CEA-2BAF04806409"
6195 6314
         },
6196
-        {
6197
-          "defKey": "is_custom",
6198
-          "defName": "其他问题",
6199
-          "comment": "其他问题时, qu_id 不存在",
6200
-          "type": "",
6201
-          "len": "",
6202
-          "scale": "",
6203
-          "primaryKey": false,
6204
-          "notNull": false,
6205
-          "autoIncrement": false,
6206
-          "defaultValue": "",
6207
-          "hideInGraph": false,
6208
-          "refDict": "",
6209
-          "extProps": {},
6210
-          "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
6211
-          "id": "58BB49C4-EE07-4A1A-B301-FC46D63C7B6B"
6212
-        },
6213
-        {
6214
-          "defKey": "qu_title",
6215
-          "defName": "问题描述",
6216
-          "comment": "",
6217
-          "type": "",
6218
-          "len": "",
6219
-          "scale": "",
6220
-          "primaryKey": false,
6221
-          "notNull": false,
6222
-          "autoIncrement": false,
6223
-          "defaultValue": "",
6224
-          "hideInGraph": false,
6225
-          "refDict": "",
6226
-          "extProps": {},
6227
-          "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
6228
-          "id": "9659966E-5B4E-4E35-BF20-BB849C988D3F"
6229
-        },
6230
-        {
6231
-          "defKey": "stand_answer",
6232
-          "defName": "标准答案",
6233
-          "comment": "",
6234
-          "type": "",
6235
-          "len": "",
6236
-          "scale": "",
6237
-          "primaryKey": false,
6238
-          "notNull": false,
6239
-          "autoIncrement": false,
6240
-          "defaultValue": "",
6241
-          "hideInGraph": false,
6242
-          "refDict": "",
6243
-          "extProps": {},
6244
-          "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
6245
-          "id": "5C1A1961-721B-4B18-8E55-42B3A0019062"
6246
-        },
6247 6315
         {
6248 6316
           "defKey": "answer",
6249 6317
           "defName": "答案",
@@ -6455,7 +6523,7 @@
6455 6523
         },
6456 6524
         {
6457 6525
           "defKey": "item_id",
6458
-          "defName": "测评点位",
6526
+          "defName": "测评项目",
6459 6527
           "comment": "",
6460 6528
           "type": "",
6461 6529
           "len": "",
@@ -6489,7 +6557,7 @@
6489 6557
         },
6490 6558
         {
6491 6559
           "defKey": "item_name",
6492
-          "defName": "点位名称",
6560
+          "defName": "项目名称",
6493 6561
           "comment": "",
6494 6562
           "type": "",
6495 6563
           "len": "",
@@ -6506,7 +6574,7 @@
6506 6574
         },
6507 6575
         {
6508 6576
           "defKey": "name",
6509
-          "defName": "具体名称",
6577
+          "defName": "具体(小区)名称",
6510 6578
           "comment": "",
6511 6579
           "type": "",
6512 6580
           "len": "",
@@ -6931,6 +6999,191 @@
6931 6999
       ],
6932 7000
       "correlations": [],
6933 7001
       "indexes": []
7002
+    },
7003
+    {
7004
+      "id": "507794C4-11E9-4924-AEC5-368BC6E03FD7",
7005
+      "env": {
7006
+        "base": {
7007
+          "nameSpace": "",
7008
+          "codeRoot": ""
7009
+        }
7010
+      },
7011
+      "defKey": "ta_check_item_an",
7012
+      "defName": "项目问题答案",
7013
+      "comment": "",
7014
+      "properties": {},
7015
+      "nameTemplate": "{defKey}[{defName}]",
7016
+      "headers": [
7017
+        {
7018
+          "refKey": "hideInGraph",
7019
+          "hideInGraph": true
7020
+        },
7021
+        {
7022
+          "refKey": "defKey",
7023
+          "hideInGraph": false
7024
+        },
7025
+        {
7026
+          "refKey": "defName",
7027
+          "hideInGraph": false
7028
+        },
7029
+        {
7030
+          "refKey": "primaryKey",
7031
+          "hideInGraph": false
7032
+        },
7033
+        {
7034
+          "refKey": "notNull",
7035
+          "hideInGraph": true
7036
+        },
7037
+        {
7038
+          "refKey": "autoIncrement",
7039
+          "hideInGraph": true
7040
+        },
7041
+        {
7042
+          "refKey": "domain",
7043
+          "hideInGraph": true
7044
+        },
7045
+        {
7046
+          "refKey": "type",
7047
+          "hideInGraph": false
7048
+        },
7049
+        {
7050
+          "refKey": "len",
7051
+          "hideInGraph": false
7052
+        },
7053
+        {
7054
+          "refKey": "scale",
7055
+          "hideInGraph": false
7056
+        },
7057
+        {
7058
+          "refKey": "comment",
7059
+          "hideInGraph": true
7060
+        },
7061
+        {
7062
+          "refKey": "refDict",
7063
+          "hideInGraph": true
7064
+        },
7065
+        {
7066
+          "refKey": "defaultValue",
7067
+          "hideInGraph": true
7068
+        },
7069
+        {
7070
+          "refKey": "isStandard",
7071
+          "hideInGraph": false
7072
+        },
7073
+        {
7074
+          "refKey": "uiHint",
7075
+          "hideInGraph": true
7076
+        },
7077
+        {
7078
+          "refKey": "extProps",
7079
+          "hideInGraph": true
7080
+        }
7081
+      ],
7082
+      "fields": [
7083
+        {
7084
+          "defKey": "answer_id",
7085
+          "defName": "答案ID",
7086
+          "comment": "",
7087
+          "type": "",
7088
+          "len": 32,
7089
+          "scale": "",
7090
+          "primaryKey": true,
7091
+          "notNull": true,
7092
+          "autoIncrement": true,
7093
+          "defaultValue": "",
7094
+          "hideInGraph": true,
7095
+          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
7096
+          "refDict": "",
7097
+          "uiHint": "",
7098
+          "id": "DB338FE4-285E-4AF1-9578-8690FF7FE086"
7099
+        },
7100
+        {
7101
+          "defKey": "qu_id",
7102
+          "defName": "问题ID",
7103
+          "comment": "",
7104
+          "type": "",
7105
+          "len": "",
7106
+          "scale": "",
7107
+          "primaryKey": false,
7108
+          "notNull": false,
7109
+          "autoIncrement": false,
7110
+          "defaultValue": "",
7111
+          "hideInGraph": false,
7112
+          "refDict": "",
7113
+          "extProps": {},
7114
+          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
7115
+          "id": "EC6B096C-2BC6-45D7-88F5-555F94BF1AA0"
7116
+        },
7117
+        {
7118
+          "defKey": "answer_code",
7119
+          "defName": "答案选项",
7120
+          "comment": "ABCD等",
7121
+          "type": "VARCHAR",
7122
+          "len": 10,
7123
+          "scale": "",
7124
+          "primaryKey": false,
7125
+          "notNull": false,
7126
+          "autoIncrement": false,
7127
+          "defaultValue": "",
7128
+          "hideInGraph": false,
7129
+          "refDict": "",
7130
+          "extProps": {},
7131
+          "id": "8C057AFD-1CBC-40D9-8681-7B3A104D84A8"
7132
+        },
7133
+        {
7134
+          "defKey": "answer",
7135
+          "defName": "答案",
7136
+          "comment": "",
7137
+          "type": "",
7138
+          "len": "",
7139
+          "scale": "",
7140
+          "primaryKey": false,
7141
+          "notNull": false,
7142
+          "autoIncrement": false,
7143
+          "defaultValue": "",
7144
+          "hideInGraph": false,
7145
+          "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
7146
+          "refDict": "",
7147
+          "extProps": {},
7148
+          "id": "51283DB3-ADD4-4B09-BBB5-887CA10C6BF7"
7149
+        },
7150
+        {
7151
+          "defKey": "score",
7152
+          "defName": "分值",
7153
+          "comment": "",
7154
+          "type": "DECIMAL",
7155
+          "len": 6,
7156
+          "scale": 2,
7157
+          "primaryKey": false,
7158
+          "notNull": false,
7159
+          "autoIncrement": false,
7160
+          "defaultValue": "",
7161
+          "hideInGraph": false,
7162
+          "refDict": "",
7163
+          "extProps": {},
7164
+          "domain": "",
7165
+          "id": "EC9AB5F8-E387-4E40-B948-2581DA3E9D4D"
7166
+        },
7167
+        {
7168
+          "defKey": "sort_no",
7169
+          "defName": "排序",
7170
+          "comment": "",
7171
+          "type": "",
7172
+          "len": "",
7173
+          "scale": "",
7174
+          "primaryKey": false,
7175
+          "notNull": false,
7176
+          "autoIncrement": false,
7177
+          "defaultValue": "",
7178
+          "hideInGraph": false,
7179
+          "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
7180
+          "refDict": "",
7181
+          "extProps": {},
7182
+          "id": "90218D19-7731-4AFE-8883-74944A66D6C8"
7183
+        }
7184
+      ],
7185
+      "correlations": [],
7186
+      "indexes": []
6934 7187
     }
6935 7188
   ],
6936 7189
   "views": [],
@@ -7353,6 +7606,7 @@
7353 7606
         "54B9F404-6224-4952-8B2C-A30F6FEE7CC1",
7354 7607
         "B6BB7C88-ABE9-4B2F-8556-6A4EA85FBFCB",
7355 7608
         "156A3EC2-A70F-41C1-A66F-BFBE8476BA16",
7609
+        "507794C4-11E9-4924-AEC5-368BC6E03FD7",
7356 7610
         "3B58B8CA-AF26-40FE-907A-A34523419478",
7357 7611
         "B20E272F-91EB-4BAC-AAD6-AF99D517E44D",
7358 7612
         "EF3D4E17-6CE0-4944-B1DC-40280B2B689F"

+ 1
- 1
src/main/java/com/example/civilizedcity/common/Constants.java 查看文件

@@ -1,7 +1,7 @@
1 1
 package com.example.civilizedcity.common;
2 2
 
3 3
 public class Constants {
4
-    public final static int ROOT_ID = 1;    // 超级管理员ID
4
+    public final static String ROOT_ID = "1";    // 超级管理员ID
5 5
 
6 6
     public final static int STATUS_DELETE = -1;
7 7
     public final static int STATUS_READY = 0;

+ 55
- 23
src/main/java/com/example/civilizedcity/controller/SysOrgController.java 查看文件

@@ -4,8 +4,14 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4 4
 import com.baomidou.mybatisplus.core.metadata.IPage;
5 5
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6 6
 import com.example.civilizedcity.common.BaseController;
7
+import com.example.civilizedcity.common.Constants;
7 8
 import com.example.civilizedcity.common.ResponseBean;
9
+
10
+import java.time.LocalDateTime;
8 11
 import java.util.List;
12
+
13
+import com.example.civilizedcity.common.StringUtils;
14
+import com.example.civilizedcity.entity.SysRole;
9 15
 import io.swagger.annotations.Api;
10 16
 import io.swagger.annotations.ApiOperation;
11 17
 import io.swagger.annotations.ApiParam;
@@ -14,8 +20,9 @@ import org.springframework.web.bind.annotation.*;
14 20
 import com.example.civilizedcity.entity.SysOrg;
15 21
 import com.example.civilizedcity.service.SysOrgService;
16 22
 
17
- /**
23
+/**
18 24
  * 单位表;(sys_org)表控制层
25
+ *
19 26
  * @author : http://njyunzhi.com
20 27
  * @date : 2022-12-12
21 28
  */
@@ -23,12 +30,12 @@ import com.example.civilizedcity.service.SysOrgService;
23 30
 @RestController
24 31
 @RequestMapping("/")
25 32
 public class SysOrgController extends BaseController {
26
-    
33
+
27 34
     @Autowired
28 35
     private SysOrgService sysOrgService;
29
-    
30
-    /** 
31
-     * 通过ID查询单条数据 
36
+
37
+    /**
38
+     * 通过ID查询单条数据
32 39
      *
33 40
      * @param orgId 主键
34 41
      * @return 实例对象
@@ -38,28 +45,31 @@ public class SysOrgController extends BaseController {
38 45
     public ResponseBean queryById(@ApiParam("对象ID") @PathVariable String id) throws Exception {
39 46
         return ResponseBean.success(sysOrgService.getById(id));
40 47
     }
41
-    
42
-    /** 
48
+
49
+    /**
43 50
      * 分页查询
44 51
      *
45
-     * @param pageNum 当前页码
52
+     * @param pageNum  当前页码
46 53
      * @param pageSize 每页条数
47 54
      * @return 查询结果
48 55
      */
49 56
     @ApiOperation("分页查询")
50 57
     @GetMapping("/sysOrg")
51
-    public ResponseBean list(@ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
52
-                            @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize) throws Exception {
53
-        
58
+    public ResponseBean list(@ApiParam("页码") @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
59
+                             @ApiParam("单页数据量") @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
60
+                             @ApiParam("单位名称") @RequestParam(value = "name", required = false) String name) throws Exception {
61
+
54 62
         IPage<SysOrg> pg = new Page<>(pageNum, pageSize);
55
-        // QueryWrapper<SysOrg> queryWrapper = new QueryWrapper<>();
56
-        // queryWrapper.orderByDesc("create_date");
57
-        IPage<SysOrg> result = sysOrgService.page(pg);
58
-        
63
+        QueryWrapper<SysOrg> queryWrapper = new QueryWrapper<>();
64
+        queryWrapper.like(StringUtils.isEmpty(name), "name", name);
65
+        queryWrapper.gt("status", Constants.STATUS_DELETE);
66
+        queryWrapper.orderByDesc("create_date");
67
+        IPage<SysOrg> result = sysOrgService.page(pg, queryWrapper);
68
+
59 69
         return ResponseBean.success(result);
60 70
     }
61
-    
62
-    /** 
71
+
72
+    /**
63 73
      * 新增数据
64 74
      *
65 75
      * @param sysOrg 实例对象
@@ -68,11 +78,23 @@ public class SysOrgController extends BaseController {
68 78
     @ApiOperation("新增数据")
69 79
     @PostMapping("/sysOrg")
70 80
     public ResponseBean add(@ApiParam("对象实体") @RequestBody SysOrg sysOrg) throws Exception {
81
+        if (StringUtils.isEmpty(sysOrg.getName())) {
82
+            return ResponseBean.error("名称不能为空");
83
+        }
84
+
85
+        long i = sysOrgService.countBy("name", sysOrg.getName(), false);
86
+        if (i > 0) {
87
+            return ResponseBean.error("名称已存在");
88
+        }
89
+
90
+        sysOrg.setOrgId(null);
91
+        sysOrg.setStatus(Constants.STATUS_NORMAL);
92
+        sysOrg.setCreateDate(LocalDateTime.now());
71 93
         sysOrgService.save(sysOrg);
72 94
         return ResponseBean.success(sysOrg);
73 95
     }
74
-    
75
-    /** 
96
+
97
+    /**
76 98
      * 更新数据
77 99
      *
78 100
      * @param sysOrg 实例对象
@@ -81,12 +103,22 @@ public class SysOrgController extends BaseController {
81 103
     @ApiOperation("更新数据")
82 104
     @PutMapping("/sysOrg/{id}")
83 105
     public ResponseBean edit(@ApiParam("对象实体") @RequestBody SysOrg sysOrg,
84
-                            @ApiParam("对象ID") @PathVariable String id ) throws Exception {
106
+                             @ApiParam("对象ID") @PathVariable String id) throws Exception {
107
+        if (StringUtils.isEmpty(sysOrg.getName())) {
108
+            return ResponseBean.error("名称不能为空");
109
+        }
110
+
111
+        SysOrg exists = sysOrgService.getByButNot("name", sysOrg.getName(), "org_id", id, false);
112
+        if (null != exists) {
113
+            return ResponseBean.error("名称已存在");
114
+        }
115
+
116
+        sysOrg.setOrgId(id);
85 117
         sysOrgService.updateById(sysOrg);
86 118
         return ResponseBean.success(sysOrg);
87 119
     }
88
-    
89
-    /** 
120
+
121
+    /**
90 122
      * 通过主键删除数据
91 123
      *
92 124
      * @param orgId 主键
@@ -94,7 +126,7 @@ public class SysOrgController extends BaseController {
94 126
      */
95 127
     @ApiOperation("通过主键删除数据")
96 128
     @DeleteMapping("/sysOrg/{id}")
97
-    public ResponseBean deleteById(@ApiParam("对象ID") @PathVariable String id){
129
+    public ResponseBean deleteById(@ApiParam("对象ID") @PathVariable String id) {
98 130
         sysOrgService.removeLogicById(id);
99 131
         return ResponseBean.success("success");
100 132
     }

+ 62
- 23
src/main/java/com/example/civilizedcity/controller/SysPositionController.java 查看文件

@@ -4,8 +4,13 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4 4
 import com.baomidou.mybatisplus.core.metadata.IPage;
5 5
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6 6
 import com.example.civilizedcity.common.BaseController;
7
+import com.example.civilizedcity.common.Constants;
7 8
 import com.example.civilizedcity.common.ResponseBean;
9
+
10
+import java.time.LocalDateTime;
8 11
 import java.util.List;
12
+
13
+import com.example.civilizedcity.common.StringUtils;
9 14
 import io.swagger.annotations.Api;
10 15
 import io.swagger.annotations.ApiOperation;
11 16
 import io.swagger.annotations.ApiParam;
@@ -14,8 +19,9 @@ import org.springframework.web.bind.annotation.*;
14 19
 import com.example.civilizedcity.entity.SysPosition;
15 20
 import com.example.civilizedcity.service.SysPositionService;
16 21
 
17
- /**
22
+/**
18 23
  * 岗位表;(sys_position)表控制层
24
+ *
19 25
  * @author : http://njyunzhi.com
20 26
  * @date : 2022-12-12
21 27
  */
@@ -23,12 +29,12 @@ import com.example.civilizedcity.service.SysPositionService;
23 29
 @RestController
24 30
 @RequestMapping("/")
25 31
 public class SysPositionController extends BaseController {
26
-    
32
+
27 33
     @Autowired
28 34
     private SysPositionService sysPositionService;
29
-    
30
-    /** 
31
-     * 通过ID查询单条数据 
35
+
36
+    /**
37
+     * 通过ID查询单条数据
32 38
      *
33 39
      * @param positionId 主键
34 40
      * @return 实例对象
@@ -38,28 +44,33 @@ public class SysPositionController extends BaseController {
38 44
     public ResponseBean queryById(@ApiParam("对象ID") @PathVariable String id) throws Exception {
39 45
         return ResponseBean.success(sysPositionService.getById(id));
40 46
     }
41
-    
42
-    /** 
47
+
48
+    /**
43 49
      * 分页查询
44 50
      *
45
-     * @param pageNum 当前页码
51
+     * @param pageNum  当前页码
46 52
      * @param pageSize 每页条数
47 53
      * @return 查询结果
48 54
      */
49 55
     @ApiOperation("分页查询")
50 56
     @GetMapping("/sysPosition")
51
-    public ResponseBean list(@ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
52
-                            @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize) throws Exception {
53
-        
57
+    public ResponseBean list(@ApiParam("页码") @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
58
+                             @ApiParam("单页数据量") @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
59
+                             @ApiParam("所属单位") @RequestParam(value = "orgId", required = false) String orgId,
60
+                             @ApiParam("名称") @RequestParam(value = "name", defaultValue = "10") String name) throws Exception {
61
+
54 62
         IPage<SysPosition> pg = new Page<>(pageNum, pageSize);
55
-        // QueryWrapper<SysPosition> queryWrapper = new QueryWrapper<>();
56
-        // queryWrapper.orderByDesc("create_date");
57
-        IPage<SysPosition> result = sysPositionService.page(pg);
58
-        
63
+        QueryWrapper<SysPosition> queryWrapper = new QueryWrapper<>();
64
+        queryWrapper.eq(StringUtils.isEmpty(orgId), "org_id", orgId);
65
+        queryWrapper.like(StringUtils.isEmpty(name), "name", name);
66
+        queryWrapper.gt("status", Constants.STATUS_DELETE);
67
+        queryWrapper.orderByDesc("create_date");
68
+        IPage<SysPosition> result = sysPositionService.page(pg, queryWrapper);
69
+
59 70
         return ResponseBean.success(result);
60 71
     }
61
-    
62
-    /** 
72
+
73
+    /**
63 74
      * 新增数据
64 75
      *
65 76
      * @param sysPosition 实例对象
@@ -68,11 +79,26 @@ public class SysPositionController extends BaseController {
68 79
     @ApiOperation("新增数据")
69 80
     @PostMapping("/sysPosition")
70 81
     public ResponseBean add(@ApiParam("对象实体") @RequestBody SysPosition sysPosition) throws Exception {
82
+        if (StringUtils.isEmpty(sysPosition.getName())) {
83
+            return ResponseBean.error("名称不能为空");
84
+        }
85
+        if (StringUtils.isEmpty(sysPosition.getOrgId())) {
86
+            return ResponseBean.error("单位不能为空");
87
+        }
88
+
89
+        long i = sysPositionService.countInOrg(sysPosition.getOrgId(), sysPosition.getName(), null);
90
+        if (i > 0) {
91
+            return ResponseBean.error("名称已存在");
92
+        }
93
+
94
+        sysPosition.setPositionId(null);
95
+        sysPosition.setStatus(Constants.STATUS_NORMAL);
96
+        sysPosition.setCreateDate(LocalDateTime.now());
71 97
         sysPositionService.save(sysPosition);
72 98
         return ResponseBean.success(sysPosition);
73 99
     }
74
-    
75
-    /** 
100
+
101
+    /**
76 102
      * 更新数据
77 103
      *
78 104
      * @param sysPosition 实例对象
@@ -81,12 +107,25 @@ public class SysPositionController extends BaseController {
81 107
     @ApiOperation("更新数据")
82 108
     @PutMapping("/sysPosition/{id}")
83 109
     public ResponseBean edit(@ApiParam("对象实体") @RequestBody SysPosition sysPosition,
84
-                            @ApiParam("对象ID") @PathVariable String id ) throws Exception {
110
+                             @ApiParam("对象ID") @PathVariable String id) throws Exception {
111
+        if (StringUtils.isEmpty(sysPosition.getName())) {
112
+            return ResponseBean.error("名称不能为空");
113
+        }
114
+        if (StringUtils.isEmpty(sysPosition.getOrgId())) {
115
+            return ResponseBean.error("单位不能为空");
116
+        }
117
+
118
+        long i = sysPositionService.countInOrg(sysPosition.getOrgId(), sysPosition.getName(), id);
119
+        if (i > 0) {
120
+            return ResponseBean.error("名称已存在");
121
+        }
122
+
123
+        sysPosition.setPositionPId(id);
85 124
         sysPositionService.updateById(sysPosition);
86 125
         return ResponseBean.success(sysPosition);
87 126
     }
88
-    
89
-    /** 
127
+
128
+    /**
90 129
      * 通过主键删除数据
91 130
      *
92 131
      * @param positionId 主键
@@ -94,7 +133,7 @@ public class SysPositionController extends BaseController {
94 133
      */
95 134
     @ApiOperation("通过主键删除数据")
96 135
     @DeleteMapping("/sysPosition/{id}")
97
-    public ResponseBean deleteById(@ApiParam("对象ID") @PathVariable String id){
136
+    public ResponseBean deleteById(@ApiParam("对象ID") @PathVariable String id) {
98 137
         sysPositionService.removeLogicById(id);
99 138
         return ResponseBean.success("success");
100 139
     }

+ 56
- 59
src/main/java/com/example/civilizedcity/controller/SysResourceController.java 查看文件

@@ -27,75 +27,72 @@ public class SysResourceController extends BaseController {
27 27
     @Autowired
28 28
     private SysResourceService sysResourceService;
29 29
     
30
-    /** 
31
-     * 通过ID查询单条数据 
32
-     *
33
-     * @param resourceId 主键
34
-     * @return 实例对象
35
-     */
36
-    @ApiOperation("通过ID查询单条数据")
37
-    @GetMapping("/sysResource/{id}")
38
-    public ResponseBean queryById(@ApiParam("对象ID") @PathVariable String id) throws Exception {
39
-        return ResponseBean.success(sysResourceService.getById(id));
40
-    }
30
+//    /**
31
+//     * 通过ID查询单条数据
32
+//     *
33
+//     * @param resourceId 主键
34
+//     * @return 实例对象
35
+//     */
36
+//    @ApiOperation("通过ID查询单条数据")
37
+//    @GetMapping("/sysResource/{id}")
38
+//    public ResponseBean queryById(@ApiParam("对象ID") @PathVariable String id) throws Exception {
39
+//        return ResponseBean.success(sysResourceService.getById(id));
40
+//    }
41 41
     
42 42
     /** 
43 43
      * 分页查询
44 44
      *
45
-     * @param pageNum 当前页码
46
-     * @param pageSize 每页条数
45
+     * @param typeCode 资源类型
46
+     * @param roleId 角色ID
47 47
      * @return 查询结果
48 48
      */
49 49
     @ApiOperation("分页查询")
50 50
     @GetMapping("/sysResource")
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<SysResource> pg = new Page<>(pageNum, pageSize);
55
-        // QueryWrapper<SysResource> queryWrapper = new QueryWrapper<>();
56
-        // queryWrapper.orderByDesc("create_date");
57
-        IPage<SysResource> result = sysResourceService.page(pg);
51
+    public ResponseBean list(@ApiParam("资源类型") @RequestParam(value = "typeCode") String typeCode,
52
+                             @ApiParam("角色ID") @RequestParam(value = "roleId", required = false) String roleId) throws Exception {
53
+
54
+        List<SysResource> result = sysResourceService.listBy(typeCode, roleId);
58 55
         
59 56
         return ResponseBean.success(result);
60 57
     }
61 58
     
62
-    /** 
63
-     * 新增数据
64
-     *
65
-     * @param sysResource 实例对象
66
-     * @return 实例对象
67
-     */
68
-    @ApiOperation("新增数据")
69
-    @PostMapping("/sysResource")
70
-    public ResponseBean add(@ApiParam("对象实体") @RequestBody SysResource sysResource) throws Exception {
71
-        sysResourceService.save(sysResource);
72
-        return ResponseBean.success(sysResource);
73
-    }
74
-    
75
-    /** 
76
-     * 更新数据
77
-     *
78
-     * @param sysResource 实例对象
79
-     * @return 实例对象
80
-     */
81
-    @ApiOperation("更新数据")
82
-    @PutMapping("/sysResource/{id}")
83
-    public ResponseBean edit(@ApiParam("对象实体") @RequestBody SysResource sysResource,
84
-                            @ApiParam("对象ID") @PathVariable String id ) throws Exception {
85
-        sysResourceService.updateById(sysResource);
86
-        return ResponseBean.success(sysResource);
87
-    }
88
-    
89
-    /** 
90
-     * 通过主键删除数据
91
-     *
92
-     * @param resourceId 主键
93
-     * @return 是否成功
94
-     */
95
-    @ApiOperation("通过主键删除数据")
96
-    @DeleteMapping("/sysResource/{id}")
97
-    public ResponseBean deleteById(@ApiParam("对象ID") @PathVariable String id){
98
-        sysResourceService.removeLogicById(id);
99
-        return ResponseBean.success("success");
100
-    }
59
+//    /**
60
+//     * 新增数据
61
+//     *
62
+//     * @param sysResource 实例对象
63
+//     * @return 实例对象
64
+//     */
65
+//    @ApiOperation("新增数据")
66
+//    @PostMapping("/sysResource")
67
+//    public ResponseBean add(@ApiParam("对象实体") @RequestBody SysResource sysResource) throws Exception {
68
+//        sysResourceService.save(sysResource);
69
+//        return ResponseBean.success(sysResource);
70
+//    }
71
+//
72
+//    /**
73
+//     * 更新数据
74
+//     *
75
+//     * @param sysResource 实例对象
76
+//     * @return 实例对象
77
+//     */
78
+//    @ApiOperation("更新数据")
79
+//    @PutMapping("/sysResource/{id}")
80
+//    public ResponseBean edit(@ApiParam("对象实体") @RequestBody SysResource sysResource,
81
+//                            @ApiParam("对象ID") @PathVariable String id ) throws Exception {
82
+//        sysResourceService.updateById(sysResource);
83
+//        return ResponseBean.success(sysResource);
84
+//    }
85
+//
86
+//    /**
87
+//     * 通过主键删除数据
88
+//     *
89
+//     * @param resourceId 主键
90
+//     * @return 是否成功
91
+//     */
92
+//    @ApiOperation("通过主键删除数据")
93
+//    @DeleteMapping("/sysResource/{id}")
94
+//    public ResponseBean deleteById(@ApiParam("对象ID") @PathVariable String id){
95
+//        sysResourceService.removeLogicById(id);
96
+//        return ResponseBean.success("success");
97
+//    }
101 98
 }

+ 63
- 24
src/main/java/com/example/civilizedcity/controller/SysRoleController.java 查看文件

@@ -4,8 +4,15 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4 4
 import com.baomidou.mybatisplus.core.metadata.IPage;
5 5
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6 6
 import com.example.civilizedcity.common.BaseController;
7
+import com.example.civilizedcity.common.Constants;
7 8
 import com.example.civilizedcity.common.ResponseBean;
9
+
10
+import java.time.LocalDateTime;
11
+import java.util.HashMap;
8 12
 import java.util.List;
13
+
14
+import com.example.civilizedcity.common.StringUtils;
15
+import com.example.civilizedcity.service.SysUserRoleService;
9 16
 import io.swagger.annotations.Api;
10 17
 import io.swagger.annotations.ApiOperation;
11 18
 import io.swagger.annotations.ApiParam;
@@ -14,8 +21,9 @@ import org.springframework.web.bind.annotation.*;
14 21
 import com.example.civilizedcity.entity.SysRole;
15 22
 import com.example.civilizedcity.service.SysRoleService;
16 23
 
17
- /**
24
+/**
18 25
  * 系统角色;(sys_role)表控制层
26
+ *
19 27
  * @author : http://njyunzhi.com
20 28
  * @date : 2022-12-12
21 29
  */
@@ -23,12 +31,15 @@ import com.example.civilizedcity.service.SysRoleService;
23 31
 @RestController
24 32
 @RequestMapping("/")
25 33
 public class SysRoleController extends BaseController {
26
-    
34
+
27 35
     @Autowired
28 36
     private SysRoleService sysRoleService;
29
-    
30
-    /** 
31
-     * 通过ID查询单条数据 
37
+
38
+    @Autowired
39
+    private SysUserRoleService sysUserRoleService;
40
+
41
+    /**
42
+     * 通过ID查询单条数据
32 43
      *
33 44
      * @param roleId 主键
34 45
      * @return 实例对象
@@ -38,28 +49,29 @@ public class SysRoleController extends BaseController {
38 49
     public ResponseBean queryById(@ApiParam("对象ID") @PathVariable String id) throws Exception {
39 50
         return ResponseBean.success(sysRoleService.getById(id));
40 51
     }
41
-    
42
-    /** 
52
+
53
+    /**
43 54
      * 分页查询
44 55
      *
45
-     * @param pageNum 当前页码
56
+     * @param pageNum  当前页码
46 57
      * @param pageSize 每页条数
47 58
      * @return 查询结果
48 59
      */
49 60
     @ApiOperation("分页查询")
50 61
     @GetMapping("/sysRole")
51
-    public ResponseBean list(@ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
52
-                            @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize) throws Exception {
53
-        
62
+    public ResponseBean list(@ApiParam("页码") @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
63
+                             @ApiParam("单页数据量") @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) throws Exception {
64
+
54 65
         IPage<SysRole> pg = new Page<>(pageNum, pageSize);
55
-        // QueryWrapper<SysRole> queryWrapper = new QueryWrapper<>();
56
-        // queryWrapper.orderByDesc("create_date");
57
-        IPage<SysRole> result = sysRoleService.page(pg);
58
-        
66
+        QueryWrapper<SysRole> queryWrapper = new QueryWrapper<>();
67
+//        queryWrapper.gt("status", Constants.STATUS_DELETE);
68
+        queryWrapper.orderByDesc("create_date");
69
+        IPage<SysRole> result = sysRoleService.page(pg, queryWrapper);
70
+
59 71
         return ResponseBean.success(result);
60 72
     }
61
-    
62
-    /** 
73
+
74
+    /**
63 75
      * 新增数据
64 76
      *
65 77
      * @param sysRole 实例对象
@@ -68,11 +80,24 @@ public class SysRoleController extends BaseController {
68 80
     @ApiOperation("新增数据")
69 81
     @PostMapping("/sysRole")
70 82
     public ResponseBean add(@ApiParam("对象实体") @RequestBody SysRole sysRole) throws Exception {
83
+        sysRole.setRoleId(null);
84
+
85
+        if (StringUtils.isEmpty(sysRole.getName())) {
86
+            return ResponseBean.error("角色名称不能为空");
87
+        }
88
+
89
+        long i = sysRoleService.countBy("name", sysRole.getName(), false);
90
+        if (i > 0) {
91
+            return ResponseBean.error("角色名称已存在");
92
+        }
93
+
94
+        sysRole.setStatus(Constants.STATUS_NORMAL);
95
+        sysRole.setCreateDate(LocalDateTime.now());
71 96
         sysRoleService.save(sysRole);
72 97
         return ResponseBean.success(sysRole);
73 98
     }
74
-    
75
-    /** 
99
+
100
+    /**
76 101
      * 更新数据
77 102
      *
78 103
      * @param sysRole 实例对象
@@ -81,12 +106,23 @@ public class SysRoleController extends BaseController {
81 106
     @ApiOperation("更新数据")
82 107
     @PutMapping("/sysRole/{id}")
83 108
     public ResponseBean edit(@ApiParam("对象实体") @RequestBody SysRole sysRole,
84
-                            @ApiParam("对象ID") @PathVariable String id ) throws Exception {
109
+                             @ApiParam("对象ID") @PathVariable String id) throws Exception {
110
+
111
+        if (StringUtils.isEmpty(sysRole.getName())) {
112
+            return ResponseBean.error("角色名称不能为空");
113
+        }
114
+
115
+        SysRole exists = sysRoleService.getByButNot("name", sysRole.getName(), "role_id", id, false);
116
+        if (null != exists) {
117
+            return ResponseBean.error("角色名称已存在");
118
+        }
119
+
120
+        sysRole.setRoleId(id);
85 121
         sysRoleService.updateById(sysRole);
86 122
         return ResponseBean.success(sysRole);
87 123
     }
88
-    
89
-    /** 
124
+
125
+    /**
90 126
      * 通过主键删除数据
91 127
      *
92 128
      * @param roleId 主键
@@ -94,8 +130,11 @@ public class SysRoleController extends BaseController {
94 130
      */
95 131
     @ApiOperation("通过主键删除数据")
96 132
     @DeleteMapping("/sysRole/{id}")
97
-    public ResponseBean deleteById(@ApiParam("对象ID") @PathVariable String id){
98
-        sysRoleService.removeLogicById(id);
133
+    public ResponseBean deleteById(@ApiParam("对象ID") @PathVariable String id) {
134
+        sysRoleService.removeById(id);
135
+        sysUserRoleService.removeByMap(new HashMap<String, Object>() {{
136
+            put("role_id", id);
137
+        }});
99 138
         return ResponseBean.success("success");
100 139
     }
101 140
 }

+ 90
- 71
src/main/java/com/example/civilizedcity/controller/SysRoleResourceController.java 查看文件

@@ -26,76 +26,95 @@ public class SysRoleResourceController extends BaseController {
26 26
     
27 27
     @Autowired
28 28
     private SysRoleResourceService sysRoleResourceService;
29
+
30
+     /**
31
+      * 新增数据, 包含编辑
32
+      *
33
+      * @param roleId 角色ID
34
+      * @param roleResourcesList 授权列表
35
+      * @return 实例对象
36
+      */
37
+     @ApiOperation("新增数据, 包含编辑")
38
+     @PostMapping("/role/{roleId}/resources")
39
+     public ResponseBean add(@ApiParam("角色ID") @PathVariable String roleId,
40
+                             @ApiParam("授权列表") @RequestBody List<SysRoleResource> roleResourcesList) throws Exception {
41
+         if (null == roleResourcesList) {
42
+             return ResponseBean.error("未找到授权对象");
43
+         }
44
+
45
+         sysRoleResourceService.mergeData(roleId, roleResourcesList);
46
+         return ResponseBean.success(roleResourcesList);
47
+     }
29 48
     
30
-    /** 
31
-     * 通过ID查询单条数据 
32
-     *
33
-     * @param resourceId 主键
34
-     * @return 实例对象
35
-     */
36
-    @ApiOperation("通过ID查询单条数据")
37
-    @GetMapping("/sysRoleResource/{id}")
38
-    public ResponseBean queryById(@ApiParam("对象ID") @PathVariable String id) throws Exception {
39
-        return ResponseBean.success(sysRoleResourceService.getById(id));
40
-    }
41
-    
42
-    /** 
43
-     * 分页查询
44
-     *
45
-     * @param pageNum 当前页码
46
-     * @param pageSize 每页条数
47
-     * @return 查询结果
48
-     */
49
-    @ApiOperation("分页查询")
50
-    @GetMapping("/sysRoleResource")
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<SysRoleResource> pg = new Page<>(pageNum, pageSize);
55
-        // QueryWrapper<SysRoleResource> queryWrapper = new QueryWrapper<>();
56
-        // queryWrapper.orderByDesc("create_date");
57
-        IPage<SysRoleResource> result = sysRoleResourceService.page(pg);
58
-        
59
-        return ResponseBean.success(result);
60
-    }
61
-    
62
-    /** 
63
-     * 新增数据
64
-     *
65
-     * @param sysRoleResource 实例对象
66
-     * @return 实例对象
67
-     */
68
-    @ApiOperation("新增数据")
69
-    @PostMapping("/sysRoleResource")
70
-    public ResponseBean add(@ApiParam("对象实体") @RequestBody SysRoleResource sysRoleResource) throws Exception {
71
-        sysRoleResourceService.save(sysRoleResource);
72
-        return ResponseBean.success(sysRoleResource);
73
-    }
74
-    
75
-    /** 
76
-     * 更新数据
77
-     *
78
-     * @param sysRoleResource 实例对象
79
-     * @return 实例对象
80
-     */
81
-    @ApiOperation("更新数据")
82
-    @PutMapping("/sysRoleResource/{id}")
83
-    public ResponseBean edit(@ApiParam("对象实体") @RequestBody SysRoleResource sysRoleResource,
84
-                            @ApiParam("对象ID") @PathVariable String id ) throws Exception {
85
-        sysRoleResourceService.updateById(sysRoleResource);
86
-        return ResponseBean.success(sysRoleResource);
87
-    }
88
-    
89
-    /** 
90
-     * 通过主键删除数据
91
-     *
92
-     * @param resourceId 主键
93
-     * @return 是否成功
94
-     */
95
-    @ApiOperation("通过主键删除数据")
96
-    @DeleteMapping("/sysRoleResource/{id}")
97
-    public ResponseBean deleteById(@ApiParam("对象ID") @PathVariable String id){
98
-        sysRoleResourceService.removeLogicById(id);
99
-        return ResponseBean.success("success");
100
-    }
49
+//    /**
50
+//     * 通过ID查询单条数据
51
+//     *
52
+//     * @param resourceId 主键
53
+//     * @return 实例对象
54
+//     */
55
+//    @ApiOperation("通过ID查询单条数据")
56
+//    @GetMapping("/sysRoleResource/{id}")
57
+//    public ResponseBean queryById(@ApiParam("对象ID") @PathVariable String id) throws Exception {
58
+//        return ResponseBean.success(sysRoleResourceService.getById(id));
59
+//    }
60
+//
61
+//    /**
62
+//     * 分页查询
63
+//     *
64
+//     * @param pageNum 当前页码
65
+//     * @param pageSize 每页条数
66
+//     * @return 查询结果
67
+//     */
68
+//    @ApiOperation("分页查询")
69
+//    @GetMapping("/sysRoleResource")
70
+//    public ResponseBean list(@ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
71
+//                            @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize) throws Exception {
72
+//
73
+//        IPage<SysRoleResource> pg = new Page<>(pageNum, pageSize);
74
+//        // QueryWrapper<SysRoleResource> queryWrapper = new QueryWrapper<>();
75
+//        // queryWrapper.orderByDesc("create_date");
76
+//        IPage<SysRoleResource> result = sysRoleResourceService.page(pg);
77
+//
78
+//        return ResponseBean.success(result);
79
+//    }
80
+//
81
+//    /**
82
+//     * 新增数据
83
+//     *
84
+//     * @param sysRoleResource 实例对象
85
+//     * @return 实例对象
86
+//     */
87
+//    @ApiOperation("新增数据")
88
+//    @PostMapping("/sysRoleResource")
89
+//    public ResponseBean add(@ApiParam("对象实体") @RequestBody SysRoleResource sysRoleResource) throws Exception {
90
+//        sysRoleResourceService.save(sysRoleResource);
91
+//        return ResponseBean.success(sysRoleResource);
92
+//    }
93
+//
94
+//    /**
95
+//     * 更新数据
96
+//     *
97
+//     * @param sysRoleResource 实例对象
98
+//     * @return 实例对象
99
+//     */
100
+//    @ApiOperation("更新数据")
101
+//    @PutMapping("/sysRoleResource/{id}")
102
+//    public ResponseBean edit(@ApiParam("对象实体") @RequestBody SysRoleResource sysRoleResource,
103
+//                            @ApiParam("对象ID") @PathVariable String id ) throws Exception {
104
+//        sysRoleResourceService.updateById(sysRoleResource);
105
+//        return ResponseBean.success(sysRoleResource);
106
+//    }
107
+//
108
+//    /**
109
+//     * 通过主键删除数据
110
+//     *
111
+//     * @param resourceId 主键
112
+//     * @return 是否成功
113
+//     */
114
+//    @ApiOperation("通过主键删除数据")
115
+//    @DeleteMapping("/sysRoleResource/{id}")
116
+//    public ResponseBean deleteById(@ApiParam("对象ID") @PathVariable String id){
117
+//        sysRoleResourceService.removeLogicById(id);
118
+//        return ResponseBean.success("success");
119
+//    }
101 120
 }

+ 71
- 22
src/main/java/com/example/civilizedcity/controller/SysUserController.java 查看文件

@@ -4,8 +4,18 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4 4
 import com.baomidou.mybatisplus.core.metadata.IPage;
5 5
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6 6
 import com.example.civilizedcity.common.BaseController;
7
+import com.example.civilizedcity.common.Constants;
7 8
 import com.example.civilizedcity.common.ResponseBean;
9
+
10
+import java.util.HashMap;
8 11
 import java.util.List;
12
+import java.util.Map;
13
+
14
+import com.example.civilizedcity.common.StringUtils;
15
+import com.example.civilizedcity.entity.SysResource;
16
+import com.example.civilizedcity.entity.SysRole;
17
+import com.example.civilizedcity.service.SysResourceService;
18
+import com.example.civilizedcity.service.SysRoleService;
9 19
 import io.swagger.annotations.Api;
10 20
 import io.swagger.annotations.ApiOperation;
11 21
 import io.swagger.annotations.ApiParam;
@@ -23,10 +33,13 @@ import com.example.civilizedcity.service.SysUserService;
23 33
 @RestController
24 34
 @RequestMapping("/")
25 35
 public class SysUserController extends BaseController {
26
-    
36
+
27 37
     @Autowired
28
-    private SysUserService sysUserService;
29
-    
38
+     SysRoleService sysRoleService;
39
+
40
+    @Autowired
41
+     SysResourceService sysResourceService;
42
+
30 43
     /** 
31 44
      * 通过ID查询单条数据 
32 45
      *
@@ -36,8 +49,36 @@ public class SysUserController extends BaseController {
36 49
     @ApiOperation("通过ID查询单条数据")
37 50
     @GetMapping("/sysUser/{id}")
38 51
     public ResponseBean queryById(@ApiParam("对象ID") @PathVariable String id) throws Exception {
39
-        return ResponseBean.success(sysUserService.getById(id));
52
+        SysUser sysUser = sysUserService.getById(id);
53
+        if (null == sysUser || sysUser.getStatus() == Constants.STATUS_DELETE) {
54
+            return ResponseBean.error("用户不存在");
55
+        }
56
+
57
+        return ResponseBean.success(getPermissions(sysUser));
40 58
     }
59
+
60
+     /**
61
+      * 查询当前人员
62
+      *
63
+      * @param
64
+      * @return 实例对象
65
+      */
66
+     @ApiOperation("查询当前人员")
67
+     @GetMapping("/sysUser/current")
68
+     public ResponseBean current() throws Exception {
69
+         SysUser sysUser = currentUser();
70
+         return ResponseBean.success(getPermissions(sysUser));
71
+     }
72
+
73
+     private SysUser getPermissions(SysUser sysUser) {
74
+         List<SysRole> rolesList = sysRoleService.getByUser(sysUser.getUserId());
75
+         List<SysResource> resourcesList = sysResourceService.getByUser(sysUser.getUserId());
76
+
77
+         sysUser.setRolesList(rolesList);
78
+         sysUser.setResourcesList(resourcesList);
79
+
80
+         return sysUser;
81
+     }
41 82
     
42 83
     /** 
43 84
      * 分页查询
@@ -48,12 +89,20 @@ public class SysUserController extends BaseController {
48 89
      */
49 90
     @ApiOperation("分页查询")
50 91
     @GetMapping("/sysUser")
51
-    public ResponseBean list(@ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
52
-                            @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize) throws Exception {
92
+    public ResponseBean list(@ApiParam("页码") @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
93
+                             @ApiParam("单页数据量") @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
94
+                             @ApiParam("姓名") @RequestParam(value = "name", required = false) String name,
95
+                             @ApiParam("机构") @RequestParam(value = "orgId", required = false) String orgId,
96
+                             @ApiParam("手机号") @RequestParam(value = "phone", required = false) String phone) throws Exception {
53 97
         
54 98
         IPage<SysUser> pg = new Page<>(pageNum, pageSize);
55
-        // QueryWrapper<SysUser> queryWrapper = new QueryWrapper<>();
56
-        // queryWrapper.orderByDesc("create_date");
99
+        QueryWrapper<SysUser> queryWrapper = new QueryWrapper<>();
100
+        queryWrapper.like(!StringUtils.isEmpty(name), "name", name);
101
+        queryWrapper.eq(!StringUtils.isEmpty(orgId), "org_id", orgId);
102
+        queryWrapper.like(!StringUtils.isEmpty(phone), "phone", phone);
103
+        queryWrapper.gt("status", Constants.STATUS_DELETE);
104
+        queryWrapper.ne("user_id", Constants.ROOT_ID);
105
+        queryWrapper.orderByDesc("create_date");
57 106
         IPage<SysUser> result = sysUserService.page(pg);
58 107
         
59 108
         return ResponseBean.success(result);
@@ -68,23 +117,23 @@ public class SysUserController extends BaseController {
68 117
     @ApiOperation("新增数据")
69 118
     @PostMapping("/sysUser")
70 119
     public ResponseBean add(@ApiParam("对象实体") @RequestBody SysUser sysUser) throws Exception {
71
-        sysUserService.save(sysUser);
120
+        sysUserService.mergeData(sysUser);
72 121
         return ResponseBean.success(sysUser);
73 122
     }
74 123
     
75
-    /** 
76
-     * 更新数据
77
-     *
78
-     * @param sysUser 实例对象
79
-     * @return 实例对象
80
-     */
81
-    @ApiOperation("更新数据")
82
-    @PutMapping("/sysUser/{id}")
83
-    public ResponseBean edit(@ApiParam("对象实体") @RequestBody SysUser sysUser,
84
-                            @ApiParam("对象ID") @PathVariable String id ) throws Exception {
85
-        sysUserService.updateById(sysUser);
86
-        return ResponseBean.success(sysUser);
87
-    }
124
+//    /**
125
+//     * 更新数据
126
+//     *
127
+//     * @param sysUser 实例对象
128
+//     * @return 实例对象
129
+//     */
130
+//    @ApiOperation("更新数据")
131
+//    @PutMapping("/sysUser/{id}")
132
+//    public ResponseBean edit(@ApiParam("对象实体") @RequestBody SysUser sysUser,
133
+//                            @ApiParam("对象ID") @PathVariable String id ) throws Exception {
134
+//        sysUserService.updateById(sysUser);
135
+//        return ResponseBean.success(sysUser);
136
+//    }
88 137
     
89 138
     /** 
90 139
      * 通过主键删除数据

+ 71
- 71
src/main/java/com/example/civilizedcity/controller/SysUserRoleController.java 查看文件

@@ -27,75 +27,75 @@ public class SysUserRoleController extends BaseController {
27 27
     @Autowired
28 28
     private SysUserRoleService sysUserRoleService;
29 29
     
30
-    /** 
31
-     * 通过ID查询单条数据 
32
-     *
33
-     * @param userId 主键
34
-     * @return 实例对象
35
-     */
36
-    @ApiOperation("通过ID查询单条数据")
37
-    @GetMapping("/sysUserRole/{id}")
38
-    public ResponseBean queryById(@ApiParam("对象ID") @PathVariable String id) throws Exception {
39
-        return ResponseBean.success(sysUserRoleService.getById(id));
40
-    }
41
-    
42
-    /** 
43
-     * 分页查询
44
-     *
45
-     * @param pageNum 当前页码
46
-     * @param pageSize 每页条数
47
-     * @return 查询结果
48
-     */
49
-    @ApiOperation("分页查询")
50
-    @GetMapping("/sysUserRole")
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<SysUserRole> pg = new Page<>(pageNum, pageSize);
55
-        // QueryWrapper<SysUserRole> queryWrapper = new QueryWrapper<>();
56
-        // queryWrapper.orderByDesc("create_date");
57
-        IPage<SysUserRole> result = sysUserRoleService.page(pg);
58
-        
59
-        return ResponseBean.success(result);
60
-    }
61
-    
62
-    /** 
63
-     * 新增数据
64
-     *
65
-     * @param sysUserRole 实例对象
66
-     * @return 实例对象
67
-     */
68
-    @ApiOperation("新增数据")
69
-    @PostMapping("/sysUserRole")
70
-    public ResponseBean add(@ApiParam("对象实体") @RequestBody SysUserRole sysUserRole) throws Exception {
71
-        sysUserRoleService.save(sysUserRole);
72
-        return ResponseBean.success(sysUserRole);
73
-    }
74
-    
75
-    /** 
76
-     * 更新数据
77
-     *
78
-     * @param sysUserRole 实例对象
79
-     * @return 实例对象
80
-     */
81
-    @ApiOperation("更新数据")
82
-    @PutMapping("/sysUserRole/{id}")
83
-    public ResponseBean edit(@ApiParam("对象实体") @RequestBody SysUserRole sysUserRole,
84
-                            @ApiParam("对象ID") @PathVariable String id ) throws Exception {
85
-        sysUserRoleService.updateById(sysUserRole);
86
-        return ResponseBean.success(sysUserRole);
87
-    }
88
-    
89
-    /** 
90
-     * 通过主键删除数据
91
-     *
92
-     * @param userId 主键
93
-     * @return 是否成功
94
-     */
95
-    @ApiOperation("通过主键删除数据")
96
-    @DeleteMapping("/sysUserRole/{id}")
97
-    public ResponseBean deleteById(@ApiParam("对象ID") @PathVariable String id){
98
-        sysUserRoleService.removeLogicById(id);
99
-        return ResponseBean.success("success");
100
-    }
30
+//    /**
31
+//     * 通过ID查询单条数据
32
+//     *
33
+//     * @param userId 主键
34
+//     * @return 实例对象
35
+//     */
36
+//    @ApiOperation("通过ID查询单条数据")
37
+//    @GetMapping("/sysUserRole/{id}")
38
+//    public ResponseBean queryById(@ApiParam("对象ID") @PathVariable String id) throws Exception {
39
+//        return ResponseBean.success(sysUserRoleService.getById(id));
40
+//    }
41
+//
42
+//    /**
43
+//     * 分页查询
44
+//     *
45
+//     * @param pageNum 当前页码
46
+//     * @param pageSize 每页条数
47
+//     * @return 查询结果
48
+//     */
49
+//    @ApiOperation("分页查询")
50
+//    @GetMapping("/sysUserRole")
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<SysUserRole> pg = new Page<>(pageNum, pageSize);
55
+//        // QueryWrapper<SysUserRole> queryWrapper = new QueryWrapper<>();
56
+//        // queryWrapper.orderByDesc("create_date");
57
+//        IPage<SysUserRole> result = sysUserRoleService.page(pg);
58
+//
59
+//        return ResponseBean.success(result);
60
+//    }
61
+//
62
+//    /**
63
+//     * 新增数据
64
+//     *
65
+//     * @param sysUserRole 实例对象
66
+//     * @return 实例对象
67
+//     */
68
+//    @ApiOperation("新增数据")
69
+//    @PostMapping("/sysUserRole")
70
+//    public ResponseBean add(@ApiParam("对象实体") @RequestBody SysUserRole sysUserRole) throws Exception {
71
+//        sysUserRoleService.save(sysUserRole);
72
+//        return ResponseBean.success(sysUserRole);
73
+//    }
74
+//
75
+//    /**
76
+//     * 更新数据
77
+//     *
78
+//     * @param sysUserRole 实例对象
79
+//     * @return 实例对象
80
+//     */
81
+//    @ApiOperation("更新数据")
82
+//    @PutMapping("/sysUserRole/{id}")
83
+//    public ResponseBean edit(@ApiParam("对象实体") @RequestBody SysUserRole sysUserRole,
84
+//                            @ApiParam("对象ID") @PathVariable String id ) throws Exception {
85
+//        sysUserRoleService.updateById(sysUserRole);
86
+//        return ResponseBean.success(sysUserRole);
87
+//    }
88
+//
89
+//    /**
90
+//     * 通过主键删除数据
91
+//     *
92
+//     * @param userId 主键
93
+//     * @return 是否成功
94
+//     */
95
+//    @ApiOperation("通过主键删除数据")
96
+//    @DeleteMapping("/sysUserRole/{id}")
97
+//    public ResponseBean deleteById(@ApiParam("对象ID") @PathVariable String id){
98
+//        sysUserRoleService.removeLogicById(id);
99
+//        return ResponseBean.success("success");
100
+//    }
101 101
 }

src/main/java/com/example/civilizedcity/controller/TdLocQuAnswerController.java → src/main/java/com/example/civilizedcity/controller/TdQuAnswerController.java 查看文件

@@ -1,18 +1,16 @@
1 1
 package com.example.civilizedcity.controller;
2 2
 
3
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4 3
 import com.baomidou.mybatisplus.core.metadata.IPage;
5 4
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6 5
 import com.example.civilizedcity.common.BaseController;
7 6
 import com.example.civilizedcity.common.ResponseBean;
8
-import java.util.List;
9 7
 import io.swagger.annotations.Api;
10 8
 import io.swagger.annotations.ApiOperation;
11 9
 import io.swagger.annotations.ApiParam;
12 10
 import org.springframework.beans.factory.annotation.Autowired;
13 11
 import org.springframework.web.bind.annotation.*;
14
-import com.example.civilizedcity.entity.TdLocQuAnswer;
15
-import com.example.civilizedcity.service.TdLocQuAnswerService;
12
+import com.example.civilizedcity.entity.TdQuAnswer;
13
+import com.example.civilizedcity.service.TdQuAnswerService;
16 14
 
17 15
  /**
18 16
  * 点位问题答案;(td_loc_qu_answer)表控制层
@@ -22,10 +20,10 @@ import com.example.civilizedcity.service.TdLocQuAnswerService;
22 20
 @Api(tags = "点位问题答案对象功能接口")
23 21
 @RestController
24 22
 @RequestMapping("/")
25
-public class TdLocQuAnswerController extends BaseController {
23
+public class TdQuAnswerController extends BaseController {
26 24
     
27 25
     @Autowired
28
-    private TdLocQuAnswerService tdLocQuAnswerService;
26
+    private TdQuAnswerService tdLocQuAnswerService;
29 27
     
30 28
     /** 
31 29
      * 通过ID查询单条数据 
@@ -51,10 +49,10 @@ public class TdLocQuAnswerController extends BaseController {
51 49
     public ResponseBean list(@ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
52 50
                             @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize) throws Exception {
53 51
         
54
-        IPage<TdLocQuAnswer> pg = new Page<>(pageNum, pageSize);
52
+        IPage<TdQuAnswer> pg = new Page<>(pageNum, pageSize);
55 53
         // QueryWrapper<TdLocQuAnswer> queryWrapper = new QueryWrapper<>();
56 54
         // queryWrapper.orderByDesc("create_date");
57
-        IPage<TdLocQuAnswer> result = tdLocQuAnswerService.page(pg);
55
+        IPage<TdQuAnswer> result = tdLocQuAnswerService.page(pg);
58 56
         
59 57
         return ResponseBean.success(result);
60 58
     }
@@ -67,7 +65,7 @@ public class TdLocQuAnswerController extends BaseController {
67 65
      */
68 66
     @ApiOperation("新增数据")
69 67
     @PostMapping("/tdLocQuAnswer")
70
-    public ResponseBean add(@ApiParam("对象实体") @RequestBody TdLocQuAnswer tdLocQuAnswer) throws Exception {
68
+    public ResponseBean add(@ApiParam("对象实体") @RequestBody TdQuAnswer tdLocQuAnswer) throws Exception {
71 69
         tdLocQuAnswerService.save(tdLocQuAnswer);
72 70
         return ResponseBean.success(tdLocQuAnswer);
73 71
     }
@@ -80,7 +78,7 @@ public class TdLocQuAnswerController extends BaseController {
80 78
      */
81 79
     @ApiOperation("更新数据")
82 80
     @PutMapping("/tdLocQuAnswer/{id}")
83
-    public ResponseBean edit(@ApiParam("对象实体") @RequestBody TdLocQuAnswer tdLocQuAnswer,
81
+    public ResponseBean edit(@ApiParam("对象实体") @RequestBody TdQuAnswer tdLocQuAnswer,
84 82
                             @ApiParam("对象ID") @PathVariable String id ) throws Exception {
85 83
         tdLocQuAnswerService.updateById(tdLocQuAnswer);
86 84
         return ResponseBean.success(tdLocQuAnswer);

src/main/java/com/example/civilizedcity/controller/TdLocQuestionController.java → src/main/java/com/example/civilizedcity/controller/TdQuestionController.java 查看文件

@@ -1,18 +1,16 @@
1 1
 package com.example.civilizedcity.controller;
2 2
 
3
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4 3
 import com.baomidou.mybatisplus.core.metadata.IPage;
5 4
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6 5
 import com.example.civilizedcity.common.BaseController;
7 6
 import com.example.civilizedcity.common.ResponseBean;
8
-import java.util.List;
9 7
 import io.swagger.annotations.Api;
10 8
 import io.swagger.annotations.ApiOperation;
11 9
 import io.swagger.annotations.ApiParam;
12 10
 import org.springframework.beans.factory.annotation.Autowired;
13 11
 import org.springframework.web.bind.annotation.*;
14
-import com.example.civilizedcity.entity.TdLocQuestion;
15
-import com.example.civilizedcity.service.TdLocQuestionService;
12
+import com.example.civilizedcity.entity.TdQuestion;
13
+import com.example.civilizedcity.service.TdQuestionService;
16 14
 
17 15
  /**
18 16
  * 点位问题;(td_loc_question)表控制层
@@ -22,10 +20,10 @@ import com.example.civilizedcity.service.TdLocQuestionService;
22 20
 @Api(tags = "点位问题对象功能接口")
23 21
 @RestController
24 22
 @RequestMapping("/")
25
-public class TdLocQuestionController extends BaseController {
23
+public class TdQuestionController extends BaseController {
26 24
     
27 25
     @Autowired
28
-    private TdLocQuestionService tdLocQuestionService;
26
+    private TdQuestionService tdLocQuestionService;
29 27
     
30 28
     /** 
31 29
      * 通过ID查询单条数据 
@@ -51,10 +49,10 @@ public class TdLocQuestionController extends BaseController {
51 49
     public ResponseBean list(@ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
52 50
                             @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize) throws Exception {
53 51
         
54
-        IPage<TdLocQuestion> pg = new Page<>(pageNum, pageSize);
52
+        IPage<TdQuestion> pg = new Page<>(pageNum, pageSize);
55 53
         // QueryWrapper<TdLocQuestion> queryWrapper = new QueryWrapper<>();
56 54
         // queryWrapper.orderByDesc("create_date");
57
-        IPage<TdLocQuestion> result = tdLocQuestionService.page(pg);
55
+        IPage<TdQuestion> result = tdLocQuestionService.page(pg);
58 56
         
59 57
         return ResponseBean.success(result);
60 58
     }
@@ -67,7 +65,7 @@ public class TdLocQuestionController extends BaseController {
67 65
      */
68 66
     @ApiOperation("新增数据")
69 67
     @PostMapping("/tdLocQuestion")
70
-    public ResponseBean add(@ApiParam("对象实体") @RequestBody TdLocQuestion tdLocQuestion) throws Exception {
68
+    public ResponseBean add(@ApiParam("对象实体") @RequestBody TdQuestion tdLocQuestion) throws Exception {
71 69
         tdLocQuestionService.save(tdLocQuestion);
72 70
         return ResponseBean.success(tdLocQuestion);
73 71
     }
@@ -80,7 +78,7 @@ public class TdLocQuestionController extends BaseController {
80 78
      */
81 79
     @ApiOperation("更新数据")
82 80
     @PutMapping("/tdLocQuestion/{id}")
83
-    public ResponseBean edit(@ApiParam("对象实体") @RequestBody TdLocQuestion tdLocQuestion,
81
+    public ResponseBean edit(@ApiParam("对象实体") @RequestBody TdQuestion tdLocQuestion,
84 82
                             @ApiParam("对象ID") @PathVariable String id ) throws Exception {
85 83
         tdLocQuestionService.updateById(tdLocQuestion);
86 84
         return ResponseBean.success(tdLocQuestion);

+ 1
- 1
src/main/java/com/example/civilizedcity/entity/SysOrg.java 查看文件

@@ -25,7 +25,7 @@ import lombok.experimental.Accessors;
25 25
 public class SysOrg implements Serializable,Cloneable{
26 26
     /** 机构ID */
27 27
     @ApiModelProperty(name = "机构ID",notes = "")
28
-    @TableId(value = "org_id", type = IdType.INPUT)
28
+    @TableId(value = "org_id", type = IdType.ASSIGN_UUID)
29 29
     private String orgId ;
30 30
     /** 机构编码 */
31 31
     @ApiModelProperty(name = "机构编码",notes = "")

+ 1
- 1
src/main/java/com/example/civilizedcity/entity/SysPosition.java 查看文件

@@ -25,7 +25,7 @@ import lombok.experimental.Accessors;
25 25
 public class SysPosition implements Serializable,Cloneable{
26 26
     /** 岗位ID */
27 27
     @ApiModelProperty(name = "岗位ID",notes = "")
28
-    @TableId(value = "position_id", type = IdType.INPUT)
28
+    @TableId(value = "position_id", type = IdType.ASSIGN_UUID)
29 29
     private String positionId ;
30 30
     /** 岗位名称 */
31 31
     @ApiModelProperty(name = "岗位名称",notes = "")

+ 1
- 1
src/main/java/com/example/civilizedcity/entity/SysResource.java 查看文件

@@ -38,7 +38,7 @@ public class SysResource implements Serializable,Cloneable{
38 38
     private String resourceCode ;
39 39
     /** 上级ID */
40 40
     @ApiModelProperty(name = "上级ID",notes = "")
41
-    private String resourcePId ;
41
+    private String parentId ;
42 42
     /** 排序 */
43 43
     @ApiModelProperty(name = "排序",notes = "")
44 44
     private Integer sortNo ;

+ 1
- 1
src/main/java/com/example/civilizedcity/entity/SysRole.java 查看文件

@@ -25,7 +25,7 @@ import lombok.experimental.Accessors;
25 25
 public class SysRole implements Serializable,Cloneable{
26 26
     /** 角色ID */
27 27
     @ApiModelProperty(name = "角色ID",notes = "")
28
-    @TableId(value = "role_id", type = IdType.INPUT)
28
+    @TableId(value = "role_id", type = IdType.ASSIGN_UUID)
29 29
     private String roleId ;
30 30
     /** 角色名称 */
31 31
     @ApiModelProperty(name = "角色名称",notes = "")

+ 1
- 1
src/main/java/com/example/civilizedcity/entity/SysRoleResource.java 查看文件

@@ -25,7 +25,7 @@ public class SysRoleResource implements Serializable,Cloneable{
25 25
      /** 用户ID */
26 26
      @ApiModelProperty(name = "ID",notes = "")
27 27
      @TableId(value = "id", type = IdType.AUTO)
28
-     private String id ;
28
+     private Integer id ;
29 29
     /** 角色ID */
30 30
     @ApiModelProperty(name = "角色ID",notes = "")
31 31
     private String roleId ;

+ 12
- 2
src/main/java/com/example/civilizedcity/entity/SysUser.java 查看文件

@@ -1,5 +1,6 @@
1 1
 package com.example.civilizedcity.entity;
2 2
 
3
+import com.baomidou.mybatisplus.annotation.TableField;
3 4
 import io.swagger.annotations.ApiModel;
4 5
 import io.swagger.annotations.ApiModelProperty;
5 6
 import com.baomidou.mybatisplus.annotation.IdType;
@@ -8,6 +9,8 @@ import com.baomidou.mybatisplus.annotation.TableId;
8 9
 import java.io.Serializable;
9 10
 import java.time.LocalDateTime;
10 11
 import java.util.Date;
12
+import java.util.List;
13
+
11 14
 import lombok.Data;
12 15
 import lombok.EqualsAndHashCode;
13 16
 import lombok.experimental.Accessors;
@@ -25,11 +28,11 @@ import lombok.experimental.Accessors;
25 28
 public class SysUser implements Serializable,Cloneable{
26 29
     /** 用户ID */
27 30
     @ApiModelProperty(name = "用户ID",notes = "")
28
-    @TableId(value = "user_id", type = IdType.INPUT)
31
+    @TableId(value = "user_id", type = IdType.ASSIGN_UUID)
29 32
     private String userId ;
30 33
     /** 用户名称 */
31 34
     @ApiModelProperty(name = "用户名称",notes = "")
32
-    private Integer name ;
35
+    private String name ;
33 36
     /** 头像 */
34 37
     @ApiModelProperty(name = "头像",notes = "")
35 38
     private String avatar ;
@@ -52,4 +55,11 @@ public class SysUser implements Serializable,Cloneable{
52 55
     @ApiModelProperty(name = "创建时间",notes = "")
53 56
     private LocalDateTime createDate ;
54 57
 
58
+     @ApiModelProperty(name = "角色列表", notes = "")
59
+     @TableField(exist = false)
60
+     List<SysRole> rolesList;
61
+
62
+     @ApiModelProperty(name = "资源列表", notes = "")
63
+     @TableField(exist = false)
64
+     List<SysResource> resourcesList;
55 65
 }

+ 1
- 1
src/main/java/com/example/civilizedcity/entity/SysUserRole.java 查看文件

@@ -25,7 +25,7 @@ public class SysUserRole implements Serializable,Cloneable{
25 25
      /** 用户ID */
26 26
      @ApiModelProperty(name = "ID",notes = "")
27 27
      @TableId(value = "id", type = IdType.AUTO)
28
-     private String id ;
28
+     private Integer id ;
29 29
     /** 角色ID */
30 30
     @ApiModelProperty(name = "角色ID",notes = "")
31 31
     private String roleId ;

+ 28
- 13
src/main/java/com/example/civilizedcity/entity/TaCheckItemQu.java 查看文件

@@ -22,18 +22,33 @@ import lombok.experimental.Accessors;
22 22
 @ApiModel(value = "点位问题",description = "")
23 23
 @TableName("ta_check_item_qu")
24 24
 public class TaCheckItemQu implements Serializable,Cloneable{
25
-    /** id */
26
-    @ApiModelProperty(name = "id",notes = "")
27
-    @TableId(value = "id", type = IdType.INPUT)
28
-    private Integer id ;
29
-    /** 点位ID */
30
-    @ApiModelProperty(name = "点位ID",notes = "")
31
-    private String itemId ;
32
-    /** 问题ID;来源点位问题 */
33
-    @ApiModelProperty(name = "问题ID",notes = "来源点位问题")
34
-    private String quId ;
35
-    /** 序号 */
36
-    @ApiModelProperty(name = "序号",notes = "")
37
-    private Integer sortNo ;
25
+     /** id */
26
+     @ApiModelProperty(name = "id",notes = "")
27
+     @TableId(value = "qu_id", type = IdType.ASSIGN_UUID)
28
+     private String quId ;
29
+     /** 点位ID */
30
+     @ApiModelProperty(name = "点位ID",notes = "")
31
+     private String itemId ;
32
+     /** 问题类型;radio 单选, fill 填空题 */
33
+     @ApiModelProperty(name = "问题类型",notes = "radio 单选, fill 填空题")
34
+     private String quType ;
35
+     /** 问题描述 */
36
+     @ApiModelProperty(name = "问题描述",notes = "")
37
+     private String title ;
38
+     /** 计分方式;+得分,-减分 */
39
+     @ApiModelProperty(name = "计分方式",notes = "+得分,-减分")
40
+     private String computeType ;
41
+     /** 最高得(扣)分 */
42
+     @ApiModelProperty(name = "最高得(扣)分",notes = "")
43
+     private Double maxScore ;
44
+     /** 每项计分 */
45
+     @ApiModelProperty(name = "每项计分",notes = "")
46
+     private Double anScore ;
47
+     /** 评分标准 */
48
+     @ApiModelProperty(name = "评分标准",notes = "")
49
+     private String stand ;
50
+     /** 序号 */
51
+     @ApiModelProperty(name = "序号",notes = "")
52
+     private Integer sortNo ;
38 53
 
39 54
 }

+ 1
- 1
src/main/java/com/example/civilizedcity/entity/TaPerson.java 查看文件

@@ -25,7 +25,7 @@ import lombok.experimental.Accessors;
25 25
 public class TaPerson implements Serializable,Cloneable{
26 26
     /** 人员id */
27 27
     @ApiModelProperty(name = "人员id",notes = "")
28
-    @TableId(value = "person_id", type = IdType.INPUT)
28
+    @TableId(value = "person_id", type = IdType.ASSIGN_UUID)
29 29
     private String personId ;
30 30
     /** 微信openid */
31 31
     @ApiModelProperty(name = "微信openid",notes = "")

src/main/java/com/example/civilizedcity/entity/TdLocQuAnswer.java → src/main/java/com/example/civilizedcity/entity/TdQuAnswer.java 查看文件

@@ -21,7 +21,7 @@ import lombok.experimental.Accessors;
21 21
 @Accessors(chain = true)
22 22
 @ApiModel(value = "点位问题答案",description = "")
23 23
 @TableName("td_loc_qu_answer")
24
-public class TdLocQuAnswer implements Serializable,Cloneable{
24
+public class TdQuAnswer implements Serializable,Cloneable{
25 25
     /** 答案ID */
26 26
     @ApiModelProperty(name = "答案ID",notes = "")
27 27
     @TableId(value = "answer_id", type = IdType.INPUT)

src/main/java/com/example/civilizedcity/entity/TdLocQuestion.java → src/main/java/com/example/civilizedcity/entity/TdQuestion.java 查看文件

@@ -21,7 +21,7 @@ import lombok.experimental.Accessors;
21 21
 @Accessors(chain = true)
22 22
 @ApiModel(value = "点位问题",description = "")
23 23
 @TableName("td_loc_question")
24
-public class TdLocQuestion implements Serializable,Cloneable{
24
+public class TdQuestion implements Serializable,Cloneable{
25 25
     /** 问题ID */
26 26
     @ApiModelProperty(name = "问题ID",notes = "")
27 27
     @TableId(value = "qu_id", type = IdType.INPUT)

+ 9
- 3
src/main/java/com/example/civilizedcity/mapper/SysResourceMapper.java 查看文件

@@ -5,12 +5,18 @@ import org.apache.ibatis.annotations.Mapper;
5 5
 import org.apache.ibatis.annotations.Param;
6 6
 import com.example.civilizedcity.entity.SysResource;
7 7
 
8
- /**
8
+import java.util.List;
9
+
10
+/**
9 11
  * 资源表;(sys_resource)表数据库访问层
12
+ *
10 13
  * @author : http://njyunzhi.com
11 14
  * @date : 2022-12-12
12 15
  */
13 16
 @Mapper
14
-public interface SysResourceMapper  extends BaseMapper<SysResource>{
15
-    
17
+public interface SysResourceMapper extends BaseMapper<SysResource> {
18
+
19
+    List<SysResource> getByUser(@Param("userId") String userId);
20
+
21
+    List<SysResource> listBy(@Param("typeCode") String typeCode, @Param("roleId") String roleId);
16 22
 }

+ 6
- 3
src/main/java/com/example/civilizedcity/mapper/SysRoleMapper.java 查看文件

@@ -5,12 +5,15 @@ import org.apache.ibatis.annotations.Mapper;
5 5
 import org.apache.ibatis.annotations.Param;
6 6
 import com.example.civilizedcity.entity.SysRole;
7 7
 
8
- /**
8
+import java.util.List;
9
+
10
+/**
9 11
  * 系统角色;(sys_role)表数据库访问层
10 12
  * @author : http://njyunzhi.com
11 13
  * @date : 2022-12-12
12 14
  */
13 15
 @Mapper
14 16
 public interface SysRoleMapper  extends BaseMapper<SysRole>{
15
-    
16
-}
17
+
18
+     List<SysRole> getByUser(@Param("userId") String userId);
19
+ }

+ 8
- 3
src/main/java/com/example/civilizedcity/mapper/SysRoleResourceMapper.java 查看文件

@@ -5,12 +5,17 @@ import org.apache.ibatis.annotations.Mapper;
5 5
 import org.apache.ibatis.annotations.Param;
6 6
 import com.example.civilizedcity.entity.SysRoleResource;
7 7
 
8
- /**
8
+import java.util.List;
9
+
10
+/**
9 11
  * 角色资源;(sys_role_resource)表数据库访问层
10 12
  * @author : http://njyunzhi.com
11 13
  * @date : 2022-12-12
12 14
  */
13 15
 @Mapper
14 16
 public interface SysRoleResourceMapper  extends BaseMapper<SysRoleResource>{
15
-    
16
-}
17
+
18
+     SysRoleResource getByRoleAndResource(@Param("roleId") String roleId, @Param("resourceId") String resourceId);
19
+
20
+     int deleteNotIn(@Param("roleId") String roleId, @Param("idList") List<Integer> idList);
21
+ }

+ 8
- 3
src/main/java/com/example/civilizedcity/mapper/SysUserRoleMapper.java 查看文件

@@ -5,12 +5,17 @@ import org.apache.ibatis.annotations.Mapper;
5 5
 import org.apache.ibatis.annotations.Param;
6 6
 import com.example.civilizedcity.entity.SysUserRole;
7 7
 
8
- /**
8
+import java.util.List;
9
+
10
+/**
9 11
  * 角色授权;(sys_user_role)表数据库访问层
10 12
  * @author : http://njyunzhi.com
11 13
  * @date : 2022-12-12
12 14
  */
13 15
 @Mapper
14 16
 public interface SysUserRoleMapper  extends BaseMapper<SysUserRole>{
15
-    
16
-}
17
+
18
+     SysUserRole getByUserAndRole(@Param("userId") String userId, @Param("roleId") String roleId);
19
+
20
+     int deleteNotIn(@Param("userId") String userId, @Param("idList") List<Integer> idList);
21
+ }

src/main/java/com/example/civilizedcity/mapper/TdLocQuAnswerMapper.java → src/main/java/com/example/civilizedcity/mapper/TdQuAnswerMapper.java 查看文件

@@ -2,8 +2,7 @@ package com.example.civilizedcity.mapper;
2 2
 
3 3
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4 4
 import org.apache.ibatis.annotations.Mapper;
5
-import org.apache.ibatis.annotations.Param;
6
-import com.example.civilizedcity.entity.TdLocQuAnswer;
5
+import com.example.civilizedcity.entity.TdQuAnswer;
7 6
 
8 7
  /**
9 8
  * 点位问题答案;(td_loc_qu_answer)表数据库访问层
@@ -11,6 +10,6 @@ import com.example.civilizedcity.entity.TdLocQuAnswer;
11 10
  * @date : 2022-12-13
12 11
  */
13 12
 @Mapper
14
-public interface TdLocQuAnswerMapper  extends BaseMapper<TdLocQuAnswer>{
13
+public interface TdQuAnswerMapper extends BaseMapper<TdQuAnswer>{
15 14
     
16 15
 }

src/main/java/com/example/civilizedcity/mapper/TdLocQuestionMapper.java → src/main/java/com/example/civilizedcity/mapper/TdQuestionMapper.java 查看文件

@@ -2,8 +2,7 @@ package com.example.civilizedcity.mapper;
2 2
 
3 3
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4 4
 import org.apache.ibatis.annotations.Mapper;
5
-import org.apache.ibatis.annotations.Param;
6
-import com.example.civilizedcity.entity.TdLocQuestion;
5
+import com.example.civilizedcity.entity.TdQuestion;
7 6
 
8 7
  /**
9 8
  * 点位问题;(td_loc_question)表数据库访问层
@@ -11,6 +10,6 @@ import com.example.civilizedcity.entity.TdLocQuestion;
11 10
  * @date : 2022-12-13
12 11
  */
13 12
 @Mapper
14
-public interface TdLocQuestionMapper  extends BaseMapper<TdLocQuestion>{
13
+public interface TdQuestionMapper extends BaseMapper<TdQuestion>{
15 14
     
16 15
 }

+ 3
- 2
src/main/java/com/example/civilizedcity/service/SysPositionService.java 查看文件

@@ -9,5 +9,6 @@ import com.example.civilizedcity.entity.SysPosition;
9 9
  * @date : 2022-12-12
10 10
  */
11 11
 public interface SysPositionService extends IBaseService<SysPosition> {
12
-    
13
-}
12
+
13
+     long countInOrg(String orgId, String name, String nePosId);
14
+ }

+ 7
- 2
src/main/java/com/example/civilizedcity/service/SysResourceService.java 查看文件

@@ -3,11 +3,16 @@ package com.example.civilizedcity.service;
3 3
 import com.baomidou.mybatisplus.extension.service.IService;
4 4
 import com.example.civilizedcity.entity.SysResource;
5 5
 
6
- /**
6
+import java.util.List;
7
+
8
+/**
7 9
  * 资源表;(sys_resource)表服务接口
8 10
  * @author : http://njyunzhi.com
9 11
  * @date : 2022-12-12
10 12
  */
11 13
 public interface SysResourceService extends IBaseService<SysResource> {
12
-    
14
+
15
+     List<SysResource> getByUser(String userId);
16
+
17
+    List<SysResource> listBy(String typeCode, String roleId);
13 18
 }

+ 6
- 3
src/main/java/com/example/civilizedcity/service/SysRoleResourceService.java 查看文件

@@ -3,11 +3,14 @@ package com.example.civilizedcity.service;
3 3
 import com.baomidou.mybatisplus.extension.service.IService;
4 4
 import com.example.civilizedcity.entity.SysRoleResource;
5 5
 
6
- /**
6
+import java.util.List;
7
+
8
+/**
7 9
  * 角色资源;(sys_role_resource)表服务接口
8 10
  * @author : http://njyunzhi.com
9 11
  * @date : 2022-12-12
10 12
  */
11 13
 public interface SysRoleResourceService extends IBaseService<SysRoleResource> {
12
-    
13
-}
14
+
15
+     boolean mergeData(String roleId, List<SysRoleResource> roleResourcesList);
16
+ }

+ 6
- 3
src/main/java/com/example/civilizedcity/service/SysRoleService.java 查看文件

@@ -3,11 +3,14 @@ package com.example.civilizedcity.service;
3 3
 import com.baomidou.mybatisplus.extension.service.IService;
4 4
 import com.example.civilizedcity.entity.SysRole;
5 5
 
6
- /**
6
+import java.util.List;
7
+
8
+/**
7 9
  * 系统角色;(sys_role)表服务接口
8 10
  * @author : http://njyunzhi.com
9 11
  * @date : 2022-12-12
10 12
  */
11 13
 public interface SysRoleService extends IBaseService<SysRole> {
12
-    
13
-}
14
+
15
+     List<SysRole> getByUser(String userId);
16
+ }

+ 2
- 0
src/main/java/com/example/civilizedcity/service/SysUserService.java 查看文件

@@ -15,4 +15,6 @@ public interface SysUserService extends IBaseService<SysUser> {
15 15
     SysUser login(LoginParam loginParm) throws Exception;
16 16
 
17 17
     boolean changePassword(SysUser user, ChangePassword param) throws Exception;
18
+
19
+    boolean mergeData(SysUser sysUser) throws Exception;
18 20
 }

+ 0
- 13
src/main/java/com/example/civilizedcity/service/TdLocQuAnswerService.java 查看文件

@@ -1,13 +0,0 @@
1
-package com.example.civilizedcity.service;
2
-
3
-import com.baomidou.mybatisplus.extension.service.IService;
4
-import com.example.civilizedcity.entity.TdLocQuAnswer;
5
-
6
- /**
7
- * 点位问题答案;(td_loc_qu_answer)表服务接口
8
- * @author : http://njyunzhi.com
9
- * @date : 2022-12-13
10
- */
11
-public interface TdLocQuAnswerService extends IBaseService<TdLocQuAnswer> {
12
-    
13
-}

+ 0
- 13
src/main/java/com/example/civilizedcity/service/TdLocQuestionService.java 查看文件

@@ -1,13 +0,0 @@
1
-package com.example.civilizedcity.service;
2
-
3
-import com.baomidou.mybatisplus.extension.service.IService;
4
-import com.example.civilizedcity.entity.TdLocQuestion;
5
-
6
- /**
7
- * 点位问题;(td_loc_question)表服务接口
8
- * @author : http://njyunzhi.com
9
- * @date : 2022-12-13
10
- */
11
-public interface TdLocQuestionService extends IBaseService<TdLocQuestion> {
12
-    
13
-}

+ 12
- 0
src/main/java/com/example/civilizedcity/service/TdQuAnswerService.java 查看文件

@@ -0,0 +1,12 @@
1
+package com.example.civilizedcity.service;
2
+
3
+import com.example.civilizedcity.entity.TdQuAnswer;
4
+
5
+ /**
6
+ * 点位问题答案;(td_loc_qu_answer)表服务接口
7
+ * @author : http://njyunzhi.com
8
+ * @date : 2022-12-13
9
+ */
10
+public interface TdQuAnswerService extends IBaseService<TdQuAnswer> {
11
+    
12
+}

+ 12
- 0
src/main/java/com/example/civilizedcity/service/TdQuestionService.java 查看文件

@@ -0,0 +1,12 @@
1
+package com.example.civilizedcity.service;
2
+
3
+import com.example.civilizedcity.entity.TdQuestion;
4
+
5
+ /**
6
+ * 点位问题;(td_loc_question)表服务接口
7
+ * @author : http://njyunzhi.com
8
+ * @date : 2022-12-13
9
+ */
10
+public interface TdQuestionService extends IBaseService<TdQuestion> {
11
+    
12
+}

+ 15
- 2
src/main/java/com/example/civilizedcity/service/impl/SysPositionServiceImpl.java 查看文件

@@ -1,16 +1,29 @@
1 1
 package com.example.civilizedcity.service.impl;
2 2
 
3
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4
+import com.example.civilizedcity.common.StringUtils;
3 5
 import org.springframework.beans.factory.annotation.Autowired;
4 6
 import org.springframework.stereotype.Service;
5 7
 import com.example.civilizedcity.entity.SysPosition;
6 8
 import com.example.civilizedcity.mapper.SysPositionMapper;
7 9
 import com.example.civilizedcity.service.SysPositionService;
8
- /**
10
+
11
+/**
9 12
  * 岗位表;(sys_position)表服务实现类
13
+ *
10 14
  * @author : http://www.chiner.pro
11 15
  * @date : 2022-12-12
12 16
  */
13 17
 @Service
14 18
 public class SysPositionServiceImpl extends BaseServiceImpl<SysPositionMapper, SysPosition> implements SysPositionService {
15
-    
19
+
20
+    @Override
21
+    public long countInOrg(String orgId, String name, String nePosId) {
22
+        QueryWrapper<SysPosition> queryWrapper = new QueryWrapper<>();
23
+        queryWrapper.eq("org_id", orgId);
24
+        queryWrapper.eq("name", name);
25
+        queryWrapper.ne(StringUtils.isEmpty(nePosId), "position_id", nePosId);
26
+
27
+        return count(queryWrapper);
28
+    }
16 29
 }

+ 23
- 3
src/main/java/com/example/civilizedcity/service/impl/SysResourceServiceImpl.java 查看文件

@@ -1,16 +1,36 @@
1 1
 package com.example.civilizedcity.service.impl;
2 2
 
3
-import org.springframework.beans.factory.annotation.Autowired;
3
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4
+import com.example.civilizedcity.common.Constants;
4 5
 import org.springframework.stereotype.Service;
5 6
 import com.example.civilizedcity.entity.SysResource;
6 7
 import com.example.civilizedcity.mapper.SysResourceMapper;
7 8
 import com.example.civilizedcity.service.SysResourceService;
8
- /**
9
+
10
+import java.util.List;
11
+
12
+/**
9 13
  * 资源表;(sys_resource)表服务实现类
14
+ *
10 15
  * @author : http://www.chiner.pro
11 16
  * @date : 2022-12-12
12 17
  */
13 18
 @Service
14 19
 public class SysResourceServiceImpl extends BaseServiceImpl<SysResourceMapper, SysResource> implements SysResourceService {
15
-    
20
+
21
+    @Override
22
+    public List<SysResource> getByUser(String userId) {
23
+        if (userId == Constants.ROOT_ID) {
24
+            QueryWrapper<SysResource> queryWrapper = new QueryWrapper<>();
25
+            queryWrapper.gt("status", Constants.STATUS_DELETE);
26
+            return list(queryWrapper);
27
+        }
28
+
29
+        return baseMapper.getByUser(userId);
30
+    }
31
+
32
+    @Override
33
+    public List<SysResource> listBy(String typeCode, String roleId) {
34
+        return baseMapper.listBy(typeCode, roleId);
35
+    }
16 36
 }

+ 38
- 2
src/main/java/com/example/civilizedcity/service/impl/SysRoleResourceServiceImpl.java 查看文件

@@ -5,12 +5,48 @@ import org.springframework.stereotype.Service;
5 5
 import com.example.civilizedcity.entity.SysRoleResource;
6 6
 import com.example.civilizedcity.mapper.SysRoleResourceMapper;
7 7
 import com.example.civilizedcity.service.SysRoleResourceService;
8
- /**
8
+
9
+import java.util.ArrayList;
10
+import java.util.HashMap;
11
+import java.util.List;
12
+
13
+/**
9 14
  * 角色资源;(sys_role_resource)表服务实现类
15
+ *
10 16
  * @author : http://www.chiner.pro
11 17
  * @date : 2022-12-12
12 18
  */
13 19
 @Service
14 20
 public class SysRoleResourceServiceImpl extends BaseServiceImpl<SysRoleResourceMapper, SysRoleResource> implements SysRoleResourceService {
15
-    
21
+
22
+    @Override
23
+    public boolean mergeData(String roleId, List<SysRoleResource> roleResourcesList) {
24
+        // 如果是空 list, 代表取消授权
25
+        if (roleResourcesList.size() == 0) {
26
+            removeByMap(new HashMap<String, Object>(){{
27
+                put("role_id", roleId);
28
+            }});
29
+            return true;
30
+        }
31
+
32
+        //
33
+        List<Integer> idList = new ArrayList<>();
34
+        for (SysRoleResource item: roleResourcesList) {
35
+            item.setRoleId(roleId);
36
+
37
+            SysRoleResource origin = baseMapper.getByRoleAndResource(roleId, item.getResourceId());
38
+            if (null != origin) {
39
+                item.setId(origin.getId());
40
+            } else {
41
+                baseMapper.insert(item);
42
+            }
43
+
44
+            idList.add(item.getId());
45
+        }
46
+
47
+        // 删除多余的数据
48
+        baseMapper.deleteNotIn(roleId, idList);
49
+
50
+        return true;
51
+    }
16 52
 }

+ 18
- 2
src/main/java/com/example/civilizedcity/service/impl/SysRoleServiceImpl.java 查看文件

@@ -1,16 +1,32 @@
1 1
 package com.example.civilizedcity.service.impl;
2 2
 
3
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4
+import com.example.civilizedcity.common.Constants;
3 5
 import org.springframework.beans.factory.annotation.Autowired;
4 6
 import org.springframework.stereotype.Service;
5 7
 import com.example.civilizedcity.entity.SysRole;
6 8
 import com.example.civilizedcity.mapper.SysRoleMapper;
7 9
 import com.example.civilizedcity.service.SysRoleService;
8
- /**
10
+
11
+import java.util.List;
12
+
13
+/**
9 14
  * 系统角色;(sys_role)表服务实现类
15
+ *
10 16
  * @author : http://www.chiner.pro
11 17
  * @date : 2022-12-12
12 18
  */
13 19
 @Service
14 20
 public class SysRoleServiceImpl extends BaseServiceImpl<SysRoleMapper, SysRole> implements SysRoleService {
15
-    
21
+
22
+    @Override
23
+    public List<SysRole> getByUser(String userId) {
24
+        if (userId == Constants.ROOT_ID) {
25
+            QueryWrapper<SysRole> queryWrapper = new QueryWrapper<>();
26
+            queryWrapper.gt("status", Constants.STATUS_DELETE);
27
+            return list(queryWrapper);
28
+        }
29
+
30
+        return baseMapper.getByUser(userId);
31
+    }
16 32
 }

+ 78
- 0
src/main/java/com/example/civilizedcity/service/impl/SysUserServiceImpl.java 查看文件

@@ -4,7 +4,10 @@ import com.example.civilizedcity.common.Constants;
4 4
 import com.example.civilizedcity.common.EncryptUtils;
5 5
 import com.example.civilizedcity.common.StringUtils;
6 6
 import com.example.civilizedcity.entity.SysLogin;
7
+import com.example.civilizedcity.entity.SysRole;
8
+import com.example.civilizedcity.entity.SysUserRole;
7 9
 import com.example.civilizedcity.mapper.SysLoginMapper;
10
+import com.example.civilizedcity.mapper.SysUserRoleMapper;
8 11
 import com.example.civilizedcity.vo.ChangePassword;
9 12
 import com.example.civilizedcity.vo.LoginParam;
10 13
 import org.springframework.beans.factory.annotation.Autowired;
@@ -13,6 +16,11 @@ import com.example.civilizedcity.entity.SysUser;
13 16
 import com.example.civilizedcity.mapper.SysUserMapper;
14 17
 import com.example.civilizedcity.service.SysUserService;
15 18
 
19
+import java.time.LocalDateTime;
20
+import java.util.ArrayList;
21
+import java.util.HashMap;
22
+import java.util.List;
23
+
16 24
 /**
17 25
  * 用户表;(sys_user)表服务实现类
18 26
  *
@@ -25,6 +33,9 @@ public class SysUserServiceImpl extends BaseServiceImpl<SysUserMapper, SysUser>
25 33
     @Autowired
26 34
     SysLoginMapper sysLoginMapper;
27 35
 
36
+    @Autowired
37
+    SysUserRoleMapper sysUserRoleMapper;
38
+
28 39
     @Override
29 40
     public SysUser login(LoginParam loginParm) throws Exception {
30 41
         SysLogin sysLogin = sysLoginMapper.getByAccount(loginParm.getAccount());
@@ -69,6 +80,73 @@ public class SysUserServiceImpl extends BaseServiceImpl<SysUserMapper, SysUser>
69 80
         return sysLoginMapper.updateById(sysLogin) > 0;
70 81
     }
71 82
 
83
+    @Override
84
+    public boolean mergeData(SysUser sysUser) throws Exception {
85
+        if (StringUtils.isEmpty(sysUser.getName())) {
86
+            throw new Exception("用户名称不能为空");
87
+        }
88
+
89
+        LocalDateTime now = LocalDateTime.now();
90
+
91
+        // 用户表
92
+        String userId = sysUser.getUserId();
93
+        if (StringUtils.isEmpty(userId)) {
94
+            if (!StringUtils.isEmpty(sysUser.getPhone())) {
95
+                SysUser origin = getExistBy("phone", sysUser.getPhone(), false, true);
96
+                if (null != origin) {
97
+                    throw new Exception("手机号重复");
98
+                }
99
+            }
100
+
101
+            if (null == sysUser.getStatus()) {
102
+                sysUser.setStatus(Constants.STATUS_NORMAL);
103
+            }
104
+
105
+            sysUser.setCreateDate(now);
106
+            save(sysUser);
107
+            userId = sysUser.getUserId();
108
+        } else {
109
+            if (!StringUtils.isEmpty(sysUser.getPhone())) {
110
+                SysUser origin = getByButNot("phone", sysUser.getPhone(), "user_id", userId, true);
111
+                if (null != origin) {
112
+                    throw new Exception("手机号重复");
113
+                }
114
+            }
115
+
116
+            //
117
+            updateById(sysUser);
118
+        }
119
+
120
+        // 授权角色
121
+        List<SysRole> rolesList = sysUser.getRolesList();
122
+        if (null == rolesList || rolesList.size() == 0) {
123
+            sysUserRoleMapper.deleteByMap(new HashMap<String, Object>() {{
124
+                put("user_id", sysUser.getUserId());
125
+            }});
126
+        } else {
127
+            List<Integer> idList = new ArrayList<>();
128
+            for (SysRole role : rolesList) {
129
+                SysUserRole item = new SysUserRole();
130
+                item.setUserId(sysUser.getUserId());
131
+                item.setRoleId(role.getRoleId());
132
+
133
+                SysUserRole exists = sysUserRoleMapper.getByUserAndRole(sysUser.getUserId(), role.getRoleId());
134
+                if (null != exists) {
135
+                    item.setId(exists.getId());
136
+                } else {
137
+                    sysUserRoleMapper.insert(item);
138
+                }
139
+
140
+                idList.add(item.getId());
141
+            }
142
+
143
+            // 去除垃圾数据
144
+            sysUserRoleMapper.deleteNotIn(sysUser.getUserId(), idList);
145
+        }
146
+
147
+        return true;
148
+    }
149
+
72 150
     boolean checkPassword(String src, String targ, String salt) {
73 151
         String newPass = EncryptUtils.md5(src, salt);
74 152
         return targ.equals(newPass);

+ 0
- 16
src/main/java/com/example/civilizedcity/service/impl/TdLocQuAnswerServiceImpl.java 查看文件

@@ -1,16 +0,0 @@
1
-package com.example.civilizedcity.service.impl;
2
-
3
-import org.springframework.beans.factory.annotation.Autowired;
4
-import org.springframework.stereotype.Service;
5
-import com.example.civilizedcity.entity.TdLocQuAnswer;
6
-import com.example.civilizedcity.mapper.TdLocQuAnswerMapper;
7
-import com.example.civilizedcity.service.TdLocQuAnswerService;
8
- /**
9
- * 点位问题答案;(td_loc_qu_answer)表服务实现类
10
- * @author : http://www.chiner.pro
11
- * @date : 2022-12-13
12
- */
13
-@Service
14
-public class TdLocQuAnswerServiceImpl extends BaseServiceImpl<TdLocQuAnswerMapper, TdLocQuAnswer> implements TdLocQuAnswerService {
15
-    
16
-}

+ 0
- 16
src/main/java/com/example/civilizedcity/service/impl/TdLocQuestionServiceImpl.java 查看文件

@@ -1,16 +0,0 @@
1
-package com.example.civilizedcity.service.impl;
2
-
3
-import org.springframework.beans.factory.annotation.Autowired;
4
-import org.springframework.stereotype.Service;
5
-import com.example.civilizedcity.entity.TdLocQuestion;
6
-import com.example.civilizedcity.mapper.TdLocQuestionMapper;
7
-import com.example.civilizedcity.service.TdLocQuestionService;
8
- /**
9
- * 点位问题;(td_loc_question)表服务实现类
10
- * @author : http://www.chiner.pro
11
- * @date : 2022-12-13
12
- */
13
-@Service
14
-public class TdLocQuestionServiceImpl extends BaseServiceImpl<TdLocQuestionMapper, TdLocQuestion> implements TdLocQuestionService {
15
-    
16
-}

+ 15
- 0
src/main/java/com/example/civilizedcity/service/impl/TdQuAnswerServiceImpl.java 查看文件

@@ -0,0 +1,15 @@
1
+package com.example.civilizedcity.service.impl;
2
+
3
+import org.springframework.stereotype.Service;
4
+import com.example.civilizedcity.entity.TdQuAnswer;
5
+import com.example.civilizedcity.mapper.TdQuAnswerMapper;
6
+import com.example.civilizedcity.service.TdQuAnswerService;
7
+ /**
8
+ * 点位问题答案;(td_loc_qu_answer)表服务实现类
9
+ * @author : http://www.chiner.pro
10
+ * @date : 2022-12-13
11
+ */
12
+@Service
13
+public class TdQuAnswerServiceImpl extends BaseServiceImpl<TdQuAnswerMapper, TdQuAnswer> implements TdQuAnswerService {
14
+    
15
+}

+ 15
- 0
src/main/java/com/example/civilizedcity/service/impl/TdQuestionServiceImpl.java 查看文件

@@ -0,0 +1,15 @@
1
+package com.example.civilizedcity.service.impl;
2
+
3
+import org.springframework.stereotype.Service;
4
+import com.example.civilizedcity.entity.TdQuestion;
5
+import com.example.civilizedcity.mapper.TdQuestionMapper;
6
+import com.example.civilizedcity.service.TdQuestionService;
7
+ /**
8
+ * 点位问题;(td_loc_question)表服务实现类
9
+ * @author : http://www.chiner.pro
10
+ * @date : 2022-12-13
11
+ */
12
+@Service
13
+public class TdQuestionServiceImpl extends BaseServiceImpl<TdQuestionMapper, TdQuestion> implements TdQuestionService {
14
+    
15
+}

+ 2
- 2
src/main/resources/application.yml 查看文件

@@ -30,8 +30,8 @@ yz:
30 30
 
31 31
 wx:
32 32
   miniapp:
33
-    appid:
34
-    secret:
33
+    appid: wxe44244d1a5ea3364
34
+    secret: b7dbbb7b51d40aa716115e76721ed3ff
35 35
     token:
36 36
     aesKey:
37 37
 

+ 30
- 1
src/main/resources/mapper/SysResourceMapper.xml 查看文件

@@ -2,5 +2,34 @@
2 2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3 3
 
4 4
 <mapper namespace="com.example.civilizedcity.mapper.SysResourceMapper">
5
-    
5
+
6
+    <select id="getByUser" resultType="com.example.civilizedcity.entity.SysResource">
7
+        SELECT DISTINCT
8
+            t.*
9
+        FROM
10
+            sys_resource t
11
+                INNER JOIN sys_role_resource s ON t.resource_id = s.resource_id
12
+                INNER JOIN sys_user_role m ON m.role_id = s.role_id
13
+        WHERE
14
+            m.user_id = #{userId}
15
+        ORDER BY
16
+            t.type_code,
17
+            t.sort_no ASC
18
+    </select>
19
+    <select id="listBy" resultType="com.example.civilizedcity.entity.SysResource">
20
+        SELECT
21
+            t.*
22
+        FROM
23
+            sys_resource t
24
+        <if test="roleId != null">
25
+            INNER JOIN sys_role_resource s ON s.resource_id = t.resource_id
26
+        </if>
27
+        WHERE
28
+            t.type_code = #{typeCode}
29
+        <if test="roleId != null">
30
+            AND s.role_id = #{roleId}
31
+        </if>
32
+        ORDER BY
33
+            t.sort_no ASC
34
+    </select>
6 35
 </mapper>

+ 12
- 1
src/main/resources/mapper/SysRoleMapper.xml 查看文件

@@ -2,5 +2,16 @@
2 2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3 3
 
4 4
 <mapper namespace="com.example.civilizedcity.mapper.SysRoleMapper">
5
-    
5
+
6
+    <select id="getByUser" resultType="com.example.civilizedcity.entity.SysRole">
7
+        SELECT DISTINCT
8
+            t.*
9
+        FROM
10
+            sys_role t
11
+                INNER JOIN sys_user_role s ON t.role_id = s.role_id
12
+        WHERE
13
+            s.user_id = #{userId}
14
+        ORDER BY
15
+            t.`name`
16
+    </select>
6 17
 </mapper>

+ 21
- 1
src/main/resources/mapper/SysRoleResourceMapper.xml 查看文件

@@ -2,5 +2,25 @@
2 2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3 3
 
4 4
 <mapper namespace="com.example.civilizedcity.mapper.SysRoleResourceMapper">
5
-    
5
+    <delete id="deleteNotIn">
6
+        DELETE t
7
+        FROM
8
+            sys_role_resource t
9
+        WHERE
10
+            t.role_id = #{roleId}
11
+            AND t.id NOT IN
12
+        <foreach item="item" collection="idList" separator="," open="(" close=")" index="">
13
+            #{item}
14
+        </foreach>
15
+    </delete>
16
+
17
+    <select id="getByRoleAndResource" resultType="com.example.civilizedcity.entity.SysRoleResource">
18
+        SELECT
19
+            *
20
+        FROM
21
+            sys_role_resource t
22
+        WHERE
23
+            t.role_id = #{roleId}
24
+          AND t.resource_id = #{resourceId}
25
+    </select>
6 26
 </mapper>

+ 21
- 1
src/main/resources/mapper/SysUserRoleMapper.xml 查看文件

@@ -2,5 +2,25 @@
2 2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3 3
 
4 4
 <mapper namespace="com.example.civilizedcity.mapper.SysUserRoleMapper">
5
-    
5
+    <delete id="deleteNotIn">
6
+        DELETE t
7
+        FROM
8
+            sys_user_role t
9
+        WHERE
10
+            t.user_id = #{userId}
11
+        AND t.id NOT IN
12
+        <foreach item="item" collection="idList" separator="," open="(" close=")" index="">
13
+            #{item}
14
+        </foreach>
15
+    </delete>
16
+
17
+    <select id="getByUserAndRole" resultType="com.example.civilizedcity.entity.SysUserRole">
18
+        SELECT
19
+            *
20
+        FROM
21
+            sys_user_role t
22
+        WHERE
23
+            t.user_id = #{userId}
24
+          AND t.role_id = #{roleId}
25
+    </select>
6 26
 </mapper>

src/main/resources/mapper/TdLocQuAnswerMapper.xml → src/main/resources/mapper/TdQuAnswerMapper.xml 查看文件

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

src/main/resources/mapper/TdLocQuestionMapper.xml → src/main/resources/mapper/TdQuestionMapper.xml 查看文件

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