Yansen 2 lat temu
rodzic
commit
64ec50f539
56 zmienionych plików z 2355 dodań i 856 usunięć
  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 Wyświetl plik

4
   "avatar": "",
4
   "avatar": "",
5
   "version": "4.1.4",
5
   "version": "4.1.4",
6
   "createdTime": "2022-12-12 09:36:12",
6
   "createdTime": "2022-12-12 09:36:12",
7
-  "updatedTime": "2022-12-13 16:43:12",
7
+  "updatedTime": "2022-12-15 11:04:32",
8
   "dbConns": [],
8
   "dbConns": [],
9
   "profile": {
9
   "profile": {
10
     "default": {
10
     "default": {
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}",
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
         "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}",
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
         "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",
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
         "applyFor": "29D1CE08-4C35-4D2D-AAA9-23D93305B52E",
243
         "applyFor": "29D1CE08-4C35-4D2D-AAA9-23D93305B52E",
1116
           "hideInGraph": false,
1116
           "hideInGraph": false,
1117
           "refDict": "",
1117
           "refDict": "",
1118
           "extProps": {},
1118
           "extProps": {},
1119
-          "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
1119
+          "domain": "54611CCC-CA4B-42E1-9F32-4944C85B85A6",
1120
           "id": "322EC759-BCCE-42E6-A1F1-837739AA6278"
1120
           "id": "322EC759-BCCE-42E6-A1F1-837739AA6278"
1121
         },
1121
         },
1122
         {
1122
         {
4351
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
4351
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
4352
           "id": "642B925C-403B-496D-BF93-5D4BE72A883B"
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
           "defKey": "process_node",
4372
           "defKey": "process_node",
4356
           "defName": "流程节点",
4373
           "defName": "流程节点",
4629
           "id": "0EF50BA7-C44F-4D9E-A28D-F94C3D15350F"
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
           "scale": "",
4654
           "scale": "",
4638
           "primaryKey": false,
4655
           "primaryKey": false,
4639
           "notNull": false,
4656
           "notNull": false,
4641
           "defaultValue": "",
4658
           "defaultValue": "",
4642
           "hideInGraph": false,
4659
           "hideInGraph": false,
4643
           "refDict": "",
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
           "defKey": "status",
4666
           "defKey": "status",
4924
         "custom": {}
4941
         "custom": {}
4925
       },
4942
       },
4926
       "defKey": "ta_check_item",
4943
       "defKey": "ta_check_item",
4927
-      "defName": "测评点位",
4944
+      "defName": "测评项目",
4928
       "comment": "",
4945
       "comment": "",
4929
       "properties": {},
4946
       "properties": {},
4930
       "nameTemplate": "{defKey}[{defName}]",
4947
       "nameTemplate": "{defKey}[{defName}]",
5029
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
5046
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
5030
           "id": "7FF8CD4A-8CA9-4C24-A20E-F5D1C1425E33"
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
           "defKey": "name",
5067
           "defKey": "name",
5034
           "defName": "名称",
5068
           "defName": "名称",
5047
           "id": "2ED82F0E-CA82-4D70-854E-9C74BF5D3F1E"
5081
           "id": "2ED82F0E-CA82-4D70-854E-9C74BF5D3F1E"
5048
         },
5082
         },
5049
         {
5083
         {
5050
-          "defKey": "score",
5084
+          "defKey": "full_score",
5051
           "defName": "满分",
5085
           "defName": "满分",
5052
           "comment": "",
5086
           "comment": "",
5053
           "type": "DECIMAL",
5087
           "type": "DECIMAL",
5064
           "id": "D2EBAC6F-DE7D-420D-933B-2F1D89EDA536"
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
           "comment": "",
5120
           "comment": "",
5070
           "type": "",
5121
           "type": "",
5071
           "len": "",
5122
           "len": "",
5073
           "primaryKey": false,
5124
           "primaryKey": false,
5074
           "notNull": false,
5125
           "notNull": false,
5075
           "autoIncrement": false,
5126
           "autoIncrement": false,
5076
-          "defaultValue": "",
5127
+          "defaultValue": "1",
5077
           "hideInGraph": false,
5128
           "hideInGraph": false,
5078
           "refDict": "",
5129
           "refDict": "",
5079
           "extProps": {},
5130
           "extProps": {},
5443
         },
5494
         },
5444
         "custom": {}
5495
         "custom": {}
5445
       },
5496
       },
5446
-      "defKey": "td_loc_question",
5447
-      "defName": "点位问题",
5497
+      "defKey": "td_question",
5498
+      "defName": "问题",
5448
       "comment": "",
5499
       "comment": "",
5449
       "properties": {},
5500
       "properties": {},
5450
       "nameTemplate": "{defKey}[{defName}]",
5501
       "nameTemplate": "{defKey}[{defName}]",
5524
           "scale": "",
5575
           "scale": "",
5525
           "primaryKey": true,
5576
           "primaryKey": true,
5526
           "notNull": true,
5577
           "notNull": true,
5527
-          "autoIncrement": true,
5578
+          "autoIncrement": false,
5528
           "defaultValue": "",
5579
           "defaultValue": "",
5529
           "hideInGraph": true,
5580
           "hideInGraph": true,
5530
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
5581
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
5532
           "uiHint": "",
5583
           "uiHint": "",
5533
           "id": "9936D1F3-0931-40ED-A4AA-DF8DA1F3DD38"
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
           "defKey": "qu_type",
5587
           "defKey": "qu_type",
5554
           "defName": "问题类型",
5588
           "defName": "问题类型",
5669
         },
5703
         },
5670
         "custom": {}
5704
         "custom": {}
5671
       },
5705
       },
5672
-      "defKey": "td_loc_qu_answer",
5673
-      "defName": "点位问题答案",
5706
+      "defKey": "td_qu_answer",
5707
+      "defName": "问题答案",
5674
       "comment": "",
5708
       "comment": "",
5675
       "properties": {},
5709
       "properties": {},
5676
       "nameTemplate": "{defKey}[{defName}]",
5710
       "nameTemplate": "{defKey}[{defName}]",
5750
           "scale": "",
5784
           "scale": "",
5751
           "primaryKey": true,
5785
           "primaryKey": true,
5752
           "notNull": true,
5786
           "notNull": true,
5753
-          "autoIncrement": true,
5787
+          "autoIncrement": false,
5754
           "defaultValue": "",
5788
           "defaultValue": "",
5755
           "hideInGraph": true,
5789
           "hideInGraph": true,
5756
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
5790
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
5896
         "custom": {}
5930
         "custom": {}
5897
       },
5931
       },
5898
       "defKey": "ta_check_item_qu",
5932
       "defKey": "ta_check_item_qu",
5899
-      "defName": "点位问题",
5933
+      "defName": "项目问题",
5900
       "comment": "",
5934
       "comment": "",
5901
       "properties": {},
5935
       "properties": {},
5902
       "nameTemplate": "{defKey}[{defName}]",
5936
       "nameTemplate": "{defKey}[{defName}]",
5968
       ],
6002
       ],
5969
       "fields": [
6003
       "fields": [
5970
         {
6004
         {
5971
-          "defKey": "id",
6005
+          "defKey": "qu_id",
5972
           "defName": "id",
6006
           "defName": "id",
5973
           "comment": "",
6007
           "comment": "",
5974
           "type": "",
6008
           "type": "",
5976
           "scale": "",
6010
           "scale": "",
5977
           "primaryKey": true,
6011
           "primaryKey": true,
5978
           "notNull": true,
6012
           "notNull": true,
5979
-          "autoIncrement": true,
6013
+          "autoIncrement": false,
5980
           "defaultValue": "",
6014
           "defaultValue": "",
5981
           "hideInGraph": true,
6015
           "hideInGraph": true,
5982
-          "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
6016
+          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
5983
           "refDict": "",
6017
           "refDict": "",
5984
           "uiHint": "",
6018
           "uiHint": "",
5985
           "id": "58A7DDC4-00CB-4FC4-86E9-E251AA006338"
6019
           "id": "58A7DDC4-00CB-4FC4-86E9-E251AA006338"
6002
           "uiHint": ""
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
           "type": "",
6042
           "type": "",
6009
           "len": "",
6043
           "len": "",
6010
           "scale": "",
6044
           "scale": "",
6013
           "autoIncrement": false,
6047
           "autoIncrement": false,
6014
           "defaultValue": "",
6048
           "defaultValue": "",
6015
           "hideInGraph": false,
6049
           "hideInGraph": false,
6050
+          "domain": "73FD2BAD-2358-4336-B96D-45DC897BD792",
6016
           "refDict": "",
6051
           "refDict": "",
6017
           "extProps": {},
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
           "defKey": "sort_no",
6141
           "defKey": "sort_no",
6162
         {
6281
         {
6163
           "defKey": "qu_id",
6282
           "defKey": "qu_id",
6164
           "defName": "问题ID",
6283
           "defName": "问题ID",
6165
-          "comment": "来源点位题",
6284
+          "comment": "来源点位题",
6166
           "type": "",
6285
           "type": "",
6167
           "len": "",
6286
           "len": "",
6168
           "scale": "",
6287
           "scale": "",
6193
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
6312
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
6194
           "id": "0B03C02D-84EC-4306-8CEA-2BAF04806409"
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
           "defKey": "answer",
6316
           "defKey": "answer",
6249
           "defName": "答案",
6317
           "defName": "答案",
6455
         },
6523
         },
6456
         {
6524
         {
6457
           "defKey": "item_id",
6525
           "defKey": "item_id",
6458
-          "defName": "测评点位",
6526
+          "defName": "测评项目",
6459
           "comment": "",
6527
           "comment": "",
6460
           "type": "",
6528
           "type": "",
6461
           "len": "",
6529
           "len": "",
6489
         },
6557
         },
6490
         {
6558
         {
6491
           "defKey": "item_name",
6559
           "defKey": "item_name",
6492
-          "defName": "点位名称",
6560
+          "defName": "项目名称",
6493
           "comment": "",
6561
           "comment": "",
6494
           "type": "",
6562
           "type": "",
6495
           "len": "",
6563
           "len": "",
6506
         },
6574
         },
6507
         {
6575
         {
6508
           "defKey": "name",
6576
           "defKey": "name",
6509
-          "defName": "具体名称",
6577
+          "defName": "具体(小区)名称",
6510
           "comment": "",
6578
           "comment": "",
6511
           "type": "",
6579
           "type": "",
6512
           "len": "",
6580
           "len": "",
6931
       ],
6999
       ],
6932
       "correlations": [],
7000
       "correlations": [],
6933
       "indexes": []
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
   "views": [],
7189
   "views": [],
7353
         "54B9F404-6224-4952-8B2C-A30F6FEE7CC1",
7606
         "54B9F404-6224-4952-8B2C-A30F6FEE7CC1",
7354
         "B6BB7C88-ABE9-4B2F-8556-6A4EA85FBFCB",
7607
         "B6BB7C88-ABE9-4B2F-8556-6A4EA85FBFCB",
7355
         "156A3EC2-A70F-41C1-A66F-BFBE8476BA16",
7608
         "156A3EC2-A70F-41C1-A66F-BFBE8476BA16",
7609
+        "507794C4-11E9-4924-AEC5-368BC6E03FD7",
7356
         "3B58B8CA-AF26-40FE-907A-A34523419478",
7610
         "3B58B8CA-AF26-40FE-907A-A34523419478",
7357
         "B20E272F-91EB-4BAC-AAD6-AF99D517E44D",
7611
         "B20E272F-91EB-4BAC-AAD6-AF99D517E44D",
7358
         "EF3D4E17-6CE0-4944-B1DC-40280B2B689F"
7612
         "EF3D4E17-6CE0-4944-B1DC-40280B2B689F"

db/.back_文明创办/文明创办-backup-20221213164312.pdma.json → db/.back_文明创办/文明创办-backup-20221215163252.pdma.json Wyświetl plik

4
   "avatar": "",
4
   "avatar": "",
5
   "version": "4.1.4",
5
   "version": "4.1.4",
6
   "createdTime": "2022-12-12 09:36:12",
6
   "createdTime": "2022-12-12 09:36:12",
7
-  "updatedTime": "2022-12-13 16:42:28",
7
+  "updatedTime": "2022-12-15 11:04:55",
8
   "dbConns": [],
8
   "dbConns": [],
9
   "profile": {
9
   "profile": {
10
     "default": {
10
     "default": {
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}",
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
         "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}",
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
         "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",
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
         "applyFor": "29D1CE08-4C35-4D2D-AAA9-23D93305B52E",
243
         "applyFor": "29D1CE08-4C35-4D2D-AAA9-23D93305B52E",
1116
           "hideInGraph": false,
1116
           "hideInGraph": false,
1117
           "refDict": "",
1117
           "refDict": "",
1118
           "extProps": {},
1118
           "extProps": {},
1119
-          "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
1119
+          "domain": "54611CCC-CA4B-42E1-9F32-4944C85B85A6",
1120
           "id": "322EC759-BCCE-42E6-A1F1-837739AA6278"
1120
           "id": "322EC759-BCCE-42E6-A1F1-837739AA6278"
1121
         },
1121
         },
1122
         {
1122
         {
4351
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
4351
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
4352
           "id": "642B925C-403B-496D-BF93-5D4BE72A883B"
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
           "defKey": "process_node",
4372
           "defKey": "process_node",
4356
           "defName": "流程节点",
4373
           "defName": "流程节点",
4629
           "id": "0EF50BA7-C44F-4D9E-A28D-F94C3D15350F"
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
           "scale": "",
4654
           "scale": "",
4638
           "primaryKey": false,
4655
           "primaryKey": false,
4639
           "notNull": false,
4656
           "notNull": false,
4641
           "defaultValue": "",
4658
           "defaultValue": "",
4642
           "hideInGraph": false,
4659
           "hideInGraph": false,
4643
           "refDict": "",
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
           "defKey": "status",
4666
           "defKey": "status",
4924
         "custom": {}
4941
         "custom": {}
4925
       },
4942
       },
4926
       "defKey": "ta_check_item",
4943
       "defKey": "ta_check_item",
4927
-      "defName": "测评点位",
4944
+      "defName": "测评项目",
4928
       "comment": "",
4945
       "comment": "",
4929
       "properties": {},
4946
       "properties": {},
4930
       "nameTemplate": "{defKey}[{defName}]",
4947
       "nameTemplate": "{defKey}[{defName}]",
5029
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
5046
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
5030
           "id": "7FF8CD4A-8CA9-4C24-A20E-F5D1C1425E33"
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
           "defKey": "name",
5067
           "defKey": "name",
5034
           "defName": "名称",
5068
           "defName": "名称",
5050
           "defKey": "full_score",
5084
           "defKey": "full_score",
5051
           "defName": "满分",
5085
           "defName": "满分",
5052
           "comment": "",
5086
           "comment": "",
5053
-          "type": "",
5054
-          "len": "",
5055
-          "scale": "",
5087
+          "type": "DECIMAL",
5088
+          "len": 6,
5089
+          "scale": 2,
5056
           "primaryKey": false,
5090
           "primaryKey": false,
5057
           "notNull": false,
5091
           "notNull": false,
5058
           "autoIncrement": false,
5092
           "autoIncrement": false,
5060
           "hideInGraph": false,
5094
           "hideInGraph": false,
5061
           "refDict": "",
5095
           "refDict": "",
5062
           "extProps": {},
5096
           "extProps": {},
5063
-          "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
5097
+          "domain": "",
5064
           "id": "D2EBAC6F-DE7D-420D-933B-2F1D89EDA536"
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
           "comment": "",
5120
           "comment": "",
5070
           "type": "",
5121
           "type": "",
5071
           "len": "",
5122
           "len": "",
5073
           "primaryKey": false,
5124
           "primaryKey": false,
5074
           "notNull": false,
5125
           "notNull": false,
5075
           "autoIncrement": false,
5126
           "autoIncrement": false,
5076
-          "defaultValue": "",
5127
+          "defaultValue": "1",
5077
           "hideInGraph": false,
5128
           "hideInGraph": false,
5078
           "refDict": "",
5129
           "refDict": "",
5079
           "extProps": {},
5130
           "extProps": {},
5443
         },
5494
         },
5444
         "custom": {}
5495
         "custom": {}
5445
       },
5496
       },
5446
-      "defKey": "td_loc_question",
5447
-      "defName": "点位问题",
5497
+      "defKey": "td_question",
5498
+      "defName": "问题",
5448
       "comment": "",
5499
       "comment": "",
5449
       "properties": {},
5500
       "properties": {},
5450
       "nameTemplate": "{defKey}[{defName}]",
5501
       "nameTemplate": "{defKey}[{defName}]",
5524
           "scale": "",
5575
           "scale": "",
5525
           "primaryKey": true,
5576
           "primaryKey": true,
5526
           "notNull": true,
5577
           "notNull": true,
5527
-          "autoIncrement": true,
5578
+          "autoIncrement": false,
5528
           "defaultValue": "",
5579
           "defaultValue": "",
5529
           "hideInGraph": true,
5580
           "hideInGraph": true,
5530
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
5581
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
5532
           "uiHint": "",
5583
           "uiHint": "",
5533
           "id": "9936D1F3-0931-40ED-A4AA-DF8DA1F3DD38"
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
           "defKey": "qu_type",
5587
           "defKey": "qu_type",
5554
           "defName": "问题类型",
5588
           "defName": "问题类型",
5669
         },
5703
         },
5670
         "custom": {}
5704
         "custom": {}
5671
       },
5705
       },
5672
-      "defKey": "td_loc_qu_answer",
5673
-      "defName": "点位问题答案",
5706
+      "defKey": "td_qu_answer",
5707
+      "defName": "问题答案",
5674
       "comment": "",
5708
       "comment": "",
5675
       "properties": {},
5709
       "properties": {},
5676
       "nameTemplate": "{defKey}[{defName}]",
5710
       "nameTemplate": "{defKey}[{defName}]",
5750
           "scale": "",
5784
           "scale": "",
5751
           "primaryKey": true,
5785
           "primaryKey": true,
5752
           "notNull": true,
5786
           "notNull": true,
5753
-          "autoIncrement": true,
5787
+          "autoIncrement": false,
5754
           "defaultValue": "",
5788
           "defaultValue": "",
5755
           "hideInGraph": true,
5789
           "hideInGraph": true,
5756
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
5790
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
5896
         "custom": {}
5930
         "custom": {}
5897
       },
5931
       },
5898
       "defKey": "ta_check_item_qu",
5932
       "defKey": "ta_check_item_qu",
5899
-      "defName": "点位问题",
5933
+      "defName": "项目问题",
5900
       "comment": "",
5934
       "comment": "",
5901
       "properties": {},
5935
       "properties": {},
5902
       "nameTemplate": "{defKey}[{defName}]",
5936
       "nameTemplate": "{defKey}[{defName}]",
5968
       ],
6002
       ],
5969
       "fields": [
6003
       "fields": [
5970
         {
6004
         {
5971
-          "defKey": "id",
6005
+          "defKey": "qu_id",
5972
           "defName": "id",
6006
           "defName": "id",
5973
           "comment": "",
6007
           "comment": "",
5974
           "type": "",
6008
           "type": "",
5976
           "scale": "",
6010
           "scale": "",
5977
           "primaryKey": true,
6011
           "primaryKey": true,
5978
           "notNull": true,
6012
           "notNull": true,
5979
-          "autoIncrement": true,
6013
+          "autoIncrement": false,
5980
           "defaultValue": "",
6014
           "defaultValue": "",
5981
           "hideInGraph": true,
6015
           "hideInGraph": true,
5982
-          "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
6016
+          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
5983
           "refDict": "",
6017
           "refDict": "",
5984
           "uiHint": "",
6018
           "uiHint": "",
5985
           "id": "58A7DDC4-00CB-4FC4-86E9-E251AA006338"
6019
           "id": "58A7DDC4-00CB-4FC4-86E9-E251AA006338"
6002
           "uiHint": ""
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
           "type": "",
6042
           "type": "",
6009
           "len": "",
6043
           "len": "",
6010
           "scale": "",
6044
           "scale": "",
6013
           "autoIncrement": false,
6047
           "autoIncrement": false,
6014
           "defaultValue": "",
6048
           "defaultValue": "",
6015
           "hideInGraph": false,
6049
           "hideInGraph": false,
6050
+          "domain": "73FD2BAD-2358-4336-B96D-45DC897BD792",
6016
           "refDict": "",
6051
           "refDict": "",
6017
           "extProps": {},
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
           "defKey": "sort_no",
6141
           "defKey": "sort_no",
6162
         {
6281
         {
6163
           "defKey": "qu_id",
6282
           "defKey": "qu_id",
6164
           "defName": "问题ID",
6283
           "defName": "问题ID",
6165
-          "comment": "来源点位题",
6284
+          "comment": "来源点位题",
6166
           "type": "",
6285
           "type": "",
6167
           "len": "",
6286
           "len": "",
6168
           "scale": "",
6287
           "scale": "",
6193
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
6312
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
6194
           "id": "0B03C02D-84EC-4306-8CEA-2BAF04806409"
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
           "defKey": "answer",
6316
           "defKey": "answer",
6249
           "defName": "答案",
6317
           "defName": "答案",
6455
         },
6523
         },
6456
         {
6524
         {
6457
           "defKey": "item_id",
6525
           "defKey": "item_id",
6458
-          "defName": "测评点位",
6526
+          "defName": "测评项目",
6459
           "comment": "",
6527
           "comment": "",
6460
           "type": "",
6528
           "type": "",
6461
           "len": "",
6529
           "len": "",
6489
         },
6557
         },
6490
         {
6558
         {
6491
           "defKey": "item_name",
6559
           "defKey": "item_name",
6492
-          "defName": "点位名称",
6560
+          "defName": "项目名称",
6493
           "comment": "",
6561
           "comment": "",
6494
           "type": "",
6562
           "type": "",
6495
           "len": "",
6563
           "len": "",
6506
         },
6574
         },
6507
         {
6575
         {
6508
           "defKey": "name",
6576
           "defKey": "name",
6509
-          "defName": "具体名称",
6577
+          "defName": "具体(小区)名称",
6510
           "comment": "",
6578
           "comment": "",
6511
           "type": "",
6579
           "type": "",
6512
           "len": "",
6580
           "len": "",
6931
       ],
6999
       ],
6932
       "correlations": [],
7000
       "correlations": [],
6933
       "indexes": []
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
   "views": [],
7189
   "views": [],
7353
         "54B9F404-6224-4952-8B2C-A30F6FEE7CC1",
7606
         "54B9F404-6224-4952-8B2C-A30F6FEE7CC1",
7354
         "B6BB7C88-ABE9-4B2F-8556-6A4EA85FBFCB",
7607
         "B6BB7C88-ABE9-4B2F-8556-6A4EA85FBFCB",
7355
         "156A3EC2-A70F-41C1-A66F-BFBE8476BA16",
7608
         "156A3EC2-A70F-41C1-A66F-BFBE8476BA16",
7609
+        "507794C4-11E9-4924-AEC5-368BC6E03FD7",
7356
         "3B58B8CA-AF26-40FE-907A-A34523419478",
7610
         "3B58B8CA-AF26-40FE-907A-A34523419478",
7357
         "B20E272F-91EB-4BAC-AAD6-AF99D517E44D",
7611
         "B20E272F-91EB-4BAC-AAD6-AF99D517E44D",
7358
         "EF3D4E17-6CE0-4944-B1DC-40280B2B689F"
7612
         "EF3D4E17-6CE0-4944-B1DC-40280B2B689F"

db/.back_文明创办/文明创办-backup-20221213164228.pdma.json → db/.back_文明创办/文明创办-backup-20221215163254.pdma.json Wyświetl plik

4
   "avatar": "",
4
   "avatar": "",
5
   "version": "4.1.4",
5
   "version": "4.1.4",
6
   "createdTime": "2022-12-12 09:36:12",
6
   "createdTime": "2022-12-12 09:36:12",
7
-  "updatedTime": "2022-12-13 16:40:09",
7
+  "updatedTime": "2022-12-15 16:32:52",
8
   "dbConns": [],
8
   "dbConns": [],
9
   "profile": {
9
   "profile": {
10
     "default": {
10
     "default": {
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}",
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
         "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}",
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
         "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",
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
         "applyFor": "29D1CE08-4C35-4D2D-AAA9-23D93305B52E",
243
         "applyFor": "29D1CE08-4C35-4D2D-AAA9-23D93305B52E",
1116
           "hideInGraph": false,
1116
           "hideInGraph": false,
1117
           "refDict": "",
1117
           "refDict": "",
1118
           "extProps": {},
1118
           "extProps": {},
1119
-          "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
1119
+          "domain": "54611CCC-CA4B-42E1-9F32-4944C85B85A6",
1120
           "id": "322EC759-BCCE-42E6-A1F1-837739AA6278"
1120
           "id": "322EC759-BCCE-42E6-A1F1-837739AA6278"
1121
         },
1121
         },
1122
         {
1122
         {
2408
           "id": "31357233-866E-45C4-867D-1F11AD8CF851"
2408
           "id": "31357233-866E-45C4-867D-1F11AD8CF851"
2409
         },
2409
         },
2410
         {
2410
         {
2411
-          "defKey": "resource_p_id",
2411
+          "defKey": "parent_id",
2412
           "defName": "上级ID",
2412
           "defName": "上级ID",
2413
           "comment": "",
2413
           "comment": "",
2414
           "type": "",
2414
           "type": "",
4351
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
4351
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
4352
           "id": "642B925C-403B-496D-BF93-5D4BE72A883B"
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
           "defKey": "process_node",
4372
           "defKey": "process_node",
4356
           "defName": "流程节点",
4373
           "defName": "流程节点",
4629
           "id": "0EF50BA7-C44F-4D9E-A28D-F94C3D15350F"
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
           "scale": "",
4654
           "scale": "",
4638
           "primaryKey": false,
4655
           "primaryKey": false,
4639
           "notNull": false,
4656
           "notNull": false,
4641
           "defaultValue": "",
4658
           "defaultValue": "",
4642
           "hideInGraph": false,
4659
           "hideInGraph": false,
4643
           "refDict": "",
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
           "defKey": "status",
4666
           "defKey": "status",
4924
         "custom": {}
4941
         "custom": {}
4925
       },
4942
       },
4926
       "defKey": "ta_check_item",
4943
       "defKey": "ta_check_item",
4927
-      "defName": "测评点位",
4944
+      "defName": "测评项目",
4928
       "comment": "",
4945
       "comment": "",
4929
       "properties": {},
4946
       "properties": {},
4930
       "nameTemplate": "{defKey}[{defName}]",
4947
       "nameTemplate": "{defKey}[{defName}]",
5029
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
5046
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
5030
           "id": "7FF8CD4A-8CA9-4C24-A20E-F5D1C1425E33"
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
           "defKey": "name",
5067
           "defKey": "name",
5034
           "defName": "名称",
5068
           "defName": "名称",
5050
           "defKey": "full_score",
5084
           "defKey": "full_score",
5051
           "defName": "满分",
5085
           "defName": "满分",
5052
           "comment": "",
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
           "type": "",
5121
           "type": "",
5054
           "len": "",
5122
           "len": "",
5055
           "scale": "",
5123
           "scale": "",
5056
           "primaryKey": false,
5124
           "primaryKey": false,
5057
           "notNull": false,
5125
           "notNull": false,
5058
           "autoIncrement": false,
5126
           "autoIncrement": false,
5059
-          "defaultValue": "",
5127
+          "defaultValue": "1",
5060
           "hideInGraph": false,
5128
           "hideInGraph": false,
5061
           "refDict": "",
5129
           "refDict": "",
5062
           "extProps": {},
5130
           "extProps": {},
5063
           "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
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
           "defKey": "status",
5135
           "defKey": "status",
5426
         },
5494
         },
5427
         "custom": {}
5495
         "custom": {}
5428
       },
5496
       },
5429
-      "defKey": "td_loc_question",
5430
-      "defName": "点位问题",
5497
+      "defKey": "td_question",
5498
+      "defName": "问题",
5431
       "comment": "",
5499
       "comment": "",
5432
       "properties": {},
5500
       "properties": {},
5433
       "nameTemplate": "{defKey}[{defName}]",
5501
       "nameTemplate": "{defKey}[{defName}]",
5507
           "scale": "",
5575
           "scale": "",
5508
           "primaryKey": true,
5576
           "primaryKey": true,
5509
           "notNull": true,
5577
           "notNull": true,
5510
-          "autoIncrement": true,
5578
+          "autoIncrement": false,
5511
           "defaultValue": "",
5579
           "defaultValue": "",
5512
           "hideInGraph": true,
5580
           "hideInGraph": true,
5513
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
5581
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
5515
           "uiHint": "",
5583
           "uiHint": "",
5516
           "id": "9936D1F3-0931-40ED-A4AA-DF8DA1F3DD38"
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
           "defKey": "qu_type",
5587
           "defKey": "qu_type",
5537
           "defName": "问题类型",
5588
           "defName": "问题类型",
5652
         },
5703
         },
5653
         "custom": {}
5704
         "custom": {}
5654
       },
5705
       },
5655
-      "defKey": "td_loc_qu_answer",
5656
-      "defName": "点位问题答案",
5706
+      "defKey": "td_qu_answer",
5707
+      "defName": "问题答案",
5657
       "comment": "",
5708
       "comment": "",
5658
       "properties": {},
5709
       "properties": {},
5659
       "nameTemplate": "{defKey}[{defName}]",
5710
       "nameTemplate": "{defKey}[{defName}]",
5733
           "scale": "",
5784
           "scale": "",
5734
           "primaryKey": true,
5785
           "primaryKey": true,
5735
           "notNull": true,
5786
           "notNull": true,
5736
-          "autoIncrement": true,
5787
+          "autoIncrement": false,
5737
           "defaultValue": "",
5788
           "defaultValue": "",
5738
           "hideInGraph": true,
5789
           "hideInGraph": true,
5739
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
5790
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
5879
         "custom": {}
5930
         "custom": {}
5880
       },
5931
       },
5881
       "defKey": "ta_check_item_qu",
5932
       "defKey": "ta_check_item_qu",
5882
-      "defName": "点位问题",
5933
+      "defName": "项目问题",
5883
       "comment": "",
5934
       "comment": "",
5884
       "properties": {},
5935
       "properties": {},
5885
       "nameTemplate": "{defKey}[{defName}]",
5936
       "nameTemplate": "{defKey}[{defName}]",
5951
       ],
6002
       ],
5952
       "fields": [
6003
       "fields": [
5953
         {
6004
         {
5954
-          "defKey": "id",
6005
+          "defKey": "qu_id",
5955
           "defName": "id",
6006
           "defName": "id",
5956
           "comment": "",
6007
           "comment": "",
5957
           "type": "",
6008
           "type": "",
5959
           "scale": "",
6010
           "scale": "",
5960
           "primaryKey": true,
6011
           "primaryKey": true,
5961
           "notNull": true,
6012
           "notNull": true,
5962
-          "autoIncrement": true,
6013
+          "autoIncrement": false,
5963
           "defaultValue": "",
6014
           "defaultValue": "",
5964
           "hideInGraph": true,
6015
           "hideInGraph": true,
5965
-          "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
6016
+          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
5966
           "refDict": "",
6017
           "refDict": "",
5967
           "uiHint": "",
6018
           "uiHint": "",
5968
           "id": "58A7DDC4-00CB-4FC4-86E9-E251AA006338"
6019
           "id": "58A7DDC4-00CB-4FC4-86E9-E251AA006338"
5985
           "uiHint": ""
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
           "type": "",
6042
           "type": "",
5992
           "len": "",
6043
           "len": "",
5993
           "scale": "",
6044
           "scale": "",
5996
           "autoIncrement": false,
6047
           "autoIncrement": false,
5997
           "defaultValue": "",
6048
           "defaultValue": "",
5998
           "hideInGraph": false,
6049
           "hideInGraph": false,
6050
+          "domain": "73FD2BAD-2358-4336-B96D-45DC897BD792",
5999
           "refDict": "",
6051
           "refDict": "",
6000
           "extProps": {},
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
           "defKey": "sort_no",
6141
           "defKey": "sort_no",
6145
         {
6281
         {
6146
           "defKey": "qu_id",
6282
           "defKey": "qu_id",
6147
           "defName": "问题ID",
6283
           "defName": "问题ID",
6148
-          "comment": "来源点位题",
6284
+          "comment": "来源点位题",
6149
           "type": "",
6285
           "type": "",
6150
           "len": "",
6286
           "len": "",
6151
           "scale": "",
6287
           "scale": "",
6176
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
6312
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
6177
           "id": "0B03C02D-84EC-4306-8CEA-2BAF04806409"
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
           "defKey": "answer",
6316
           "defKey": "answer",
6232
           "defName": "答案",
6317
           "defName": "答案",
6438
         },
6523
         },
6439
         {
6524
         {
6440
           "defKey": "item_id",
6525
           "defKey": "item_id",
6441
-          "defName": "测评点位",
6526
+          "defName": "测评项目",
6442
           "comment": "",
6527
           "comment": "",
6443
           "type": "",
6528
           "type": "",
6444
           "len": "",
6529
           "len": "",
6472
         },
6557
         },
6473
         {
6558
         {
6474
           "defKey": "item_name",
6559
           "defKey": "item_name",
6475
-          "defName": "点位名称",
6560
+          "defName": "项目名称",
6476
           "comment": "",
6561
           "comment": "",
6477
           "type": "",
6562
           "type": "",
6478
           "len": "",
6563
           "len": "",
6489
         },
6574
         },
6490
         {
6575
         {
6491
           "defKey": "name",
6576
           "defKey": "name",
6492
-          "defName": "具体名称",
6577
+          "defName": "具体(小区)名称",
6493
           "comment": "",
6578
           "comment": "",
6494
           "type": "",
6579
           "type": "",
6495
           "len": "",
6580
           "len": "",
6914
       ],
6999
       ],
6915
       "correlations": [],
7000
       "correlations": [],
6916
       "indexes": []
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
   "views": [],
7189
   "views": [],
7336
         "54B9F404-6224-4952-8B2C-A30F6FEE7CC1",
7606
         "54B9F404-6224-4952-8B2C-A30F6FEE7CC1",
7337
         "B6BB7C88-ABE9-4B2F-8556-6A4EA85FBFCB",
7607
         "B6BB7C88-ABE9-4B2F-8556-6A4EA85FBFCB",
7338
         "156A3EC2-A70F-41C1-A66F-BFBE8476BA16",
7608
         "156A3EC2-A70F-41C1-A66F-BFBE8476BA16",
7609
+        "507794C4-11E9-4924-AEC5-368BC6E03FD7",
7339
         "3B58B8CA-AF26-40FE-907A-A34523419478",
7610
         "3B58B8CA-AF26-40FE-907A-A34523419478",
7340
         "B20E272F-91EB-4BAC-AAD6-AF99D517E44D",
7611
         "B20E272F-91EB-4BAC-AAD6-AF99D517E44D",
7341
         "EF3D4E17-6CE0-4944-B1DC-40280B2B689F"
7612
         "EF3D4E17-6CE0-4944-B1DC-40280B2B689F"

+ 358
- 104
db/文明创办.pdma.json Wyświetl plik

4
   "avatar": "",
4
   "avatar": "",
5
   "version": "4.1.4",
5
   "version": "4.1.4",
6
   "createdTime": "2022-12-12 09:36:12",
6
   "createdTime": "2022-12-12 09:36:12",
7
-  "updatedTime": "2022-12-13 16:45:50",
7
+  "updatedTime": "2022-12-15 16:32:54",
8
   "dbConns": [],
8
   "dbConns": [],
9
   "profile": {
9
   "profile": {
10
     "default": {
10
     "default": {
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}",
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
         "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}",
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
         "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",
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
         "applyFor": "29D1CE08-4C35-4D2D-AAA9-23D93305B52E",
243
         "applyFor": "29D1CE08-4C35-4D2D-AAA9-23D93305B52E",
1116
           "hideInGraph": false,
1116
           "hideInGraph": false,
1117
           "refDict": "",
1117
           "refDict": "",
1118
           "extProps": {},
1118
           "extProps": {},
1119
-          "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
1119
+          "domain": "54611CCC-CA4B-42E1-9F32-4944C85B85A6",
1120
           "id": "322EC759-BCCE-42E6-A1F1-837739AA6278"
1120
           "id": "322EC759-BCCE-42E6-A1F1-837739AA6278"
1121
         },
1121
         },
1122
         {
1122
         {
2408
           "id": "31357233-866E-45C4-867D-1F11AD8CF851"
2408
           "id": "31357233-866E-45C4-867D-1F11AD8CF851"
2409
         },
2409
         },
2410
         {
2410
         {
2411
-          "defKey": "resource_p_id",
2411
+          "defKey": "parent_id",
2412
           "defName": "上级ID",
2412
           "defName": "上级ID",
2413
           "comment": "",
2413
           "comment": "",
2414
           "type": "",
2414
           "type": "",
4351
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
4351
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
4352
           "id": "642B925C-403B-496D-BF93-5D4BE72A883B"
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
           "defKey": "process_node",
4372
           "defKey": "process_node",
4356
           "defName": "流程节点",
4373
           "defName": "流程节点",
4629
           "id": "0EF50BA7-C44F-4D9E-A28D-F94C3D15350F"
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
           "scale": "",
4654
           "scale": "",
4638
           "primaryKey": false,
4655
           "primaryKey": false,
4639
           "notNull": false,
4656
           "notNull": false,
4641
           "defaultValue": "",
4658
           "defaultValue": "",
4642
           "hideInGraph": false,
4659
           "hideInGraph": false,
4643
           "refDict": "",
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
           "defKey": "status",
4666
           "defKey": "status",
4924
         "custom": {}
4941
         "custom": {}
4925
       },
4942
       },
4926
       "defKey": "ta_check_item",
4943
       "defKey": "ta_check_item",
4927
-      "defName": "测评点位",
4944
+      "defName": "测评项目",
4928
       "comment": "",
4945
       "comment": "",
4929
       "properties": {},
4946
       "properties": {},
4930
       "nameTemplate": "{defKey}[{defName}]",
4947
       "nameTemplate": "{defKey}[{defName}]",
5029
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
5046
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
5030
           "id": "7FF8CD4A-8CA9-4C24-A20E-F5D1C1425E33"
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
           "defKey": "name",
5067
           "defKey": "name",
5034
           "defName": "名称",
5068
           "defName": "名称",
5047
           "id": "2ED82F0E-CA82-4D70-854E-9C74BF5D3F1E"
5081
           "id": "2ED82F0E-CA82-4D70-854E-9C74BF5D3F1E"
5048
         },
5082
         },
5049
         {
5083
         {
5050
-          "defKey": "score",
5084
+          "defKey": "full_score",
5051
           "defName": "满分",
5085
           "defName": "满分",
5052
           "comment": "",
5086
           "comment": "",
5053
           "type": "DECIMAL",
5087
           "type": "DECIMAL",
5064
           "id": "D2EBAC6F-DE7D-420D-933B-2F1D89EDA536"
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
           "comment": "",
5120
           "comment": "",
5070
           "type": "",
5121
           "type": "",
5071
           "len": "",
5122
           "len": "",
5073
           "primaryKey": false,
5124
           "primaryKey": false,
5074
           "notNull": false,
5125
           "notNull": false,
5075
           "autoIncrement": false,
5126
           "autoIncrement": false,
5076
-          "defaultValue": "",
5127
+          "defaultValue": "1",
5077
           "hideInGraph": false,
5128
           "hideInGraph": false,
5078
           "refDict": "",
5129
           "refDict": "",
5079
           "extProps": {},
5130
           "extProps": {},
5443
         },
5494
         },
5444
         "custom": {}
5495
         "custom": {}
5445
       },
5496
       },
5446
-      "defKey": "td_loc_question",
5447
-      "defName": "点位问题",
5497
+      "defKey": "td_question",
5498
+      "defName": "问题",
5448
       "comment": "",
5499
       "comment": "",
5449
       "properties": {},
5500
       "properties": {},
5450
       "nameTemplate": "{defKey}[{defName}]",
5501
       "nameTemplate": "{defKey}[{defName}]",
5524
           "scale": "",
5575
           "scale": "",
5525
           "primaryKey": true,
5576
           "primaryKey": true,
5526
           "notNull": true,
5577
           "notNull": true,
5527
-          "autoIncrement": true,
5578
+          "autoIncrement": false,
5528
           "defaultValue": "",
5579
           "defaultValue": "",
5529
           "hideInGraph": true,
5580
           "hideInGraph": true,
5530
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
5581
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
5532
           "uiHint": "",
5583
           "uiHint": "",
5533
           "id": "9936D1F3-0931-40ED-A4AA-DF8DA1F3DD38"
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
           "defKey": "qu_type",
5587
           "defKey": "qu_type",
5554
           "defName": "问题类型",
5588
           "defName": "问题类型",
5669
         },
5703
         },
5670
         "custom": {}
5704
         "custom": {}
5671
       },
5705
       },
5672
-      "defKey": "td_loc_qu_answer",
5673
-      "defName": "点位问题答案",
5706
+      "defKey": "td_qu_answer",
5707
+      "defName": "问题答案",
5674
       "comment": "",
5708
       "comment": "",
5675
       "properties": {},
5709
       "properties": {},
5676
       "nameTemplate": "{defKey}[{defName}]",
5710
       "nameTemplate": "{defKey}[{defName}]",
5750
           "scale": "",
5784
           "scale": "",
5751
           "primaryKey": true,
5785
           "primaryKey": true,
5752
           "notNull": true,
5786
           "notNull": true,
5753
-          "autoIncrement": true,
5787
+          "autoIncrement": false,
5754
           "defaultValue": "",
5788
           "defaultValue": "",
5755
           "hideInGraph": true,
5789
           "hideInGraph": true,
5756
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
5790
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
5896
         "custom": {}
5930
         "custom": {}
5897
       },
5931
       },
5898
       "defKey": "ta_check_item_qu",
5932
       "defKey": "ta_check_item_qu",
5899
-      "defName": "点位问题",
5933
+      "defName": "项目问题",
5900
       "comment": "",
5934
       "comment": "",
5901
       "properties": {},
5935
       "properties": {},
5902
       "nameTemplate": "{defKey}[{defName}]",
5936
       "nameTemplate": "{defKey}[{defName}]",
5968
       ],
6002
       ],
5969
       "fields": [
6003
       "fields": [
5970
         {
6004
         {
5971
-          "defKey": "id",
6005
+          "defKey": "qu_id",
5972
           "defName": "id",
6006
           "defName": "id",
5973
           "comment": "",
6007
           "comment": "",
5974
           "type": "",
6008
           "type": "",
5976
           "scale": "",
6010
           "scale": "",
5977
           "primaryKey": true,
6011
           "primaryKey": true,
5978
           "notNull": true,
6012
           "notNull": true,
5979
-          "autoIncrement": true,
6013
+          "autoIncrement": false,
5980
           "defaultValue": "",
6014
           "defaultValue": "",
5981
           "hideInGraph": true,
6015
           "hideInGraph": true,
5982
-          "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
6016
+          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
5983
           "refDict": "",
6017
           "refDict": "",
5984
           "uiHint": "",
6018
           "uiHint": "",
5985
           "id": "58A7DDC4-00CB-4FC4-86E9-E251AA006338"
6019
           "id": "58A7DDC4-00CB-4FC4-86E9-E251AA006338"
6002
           "uiHint": ""
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
           "type": "",
6042
           "type": "",
6009
           "len": "",
6043
           "len": "",
6010
           "scale": "",
6044
           "scale": "",
6013
           "autoIncrement": false,
6047
           "autoIncrement": false,
6014
           "defaultValue": "",
6048
           "defaultValue": "",
6015
           "hideInGraph": false,
6049
           "hideInGraph": false,
6050
+          "domain": "73FD2BAD-2358-4336-B96D-45DC897BD792",
6016
           "refDict": "",
6051
           "refDict": "",
6017
           "extProps": {},
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
           "defKey": "sort_no",
6141
           "defKey": "sort_no",
6162
         {
6281
         {
6163
           "defKey": "qu_id",
6282
           "defKey": "qu_id",
6164
           "defName": "问题ID",
6283
           "defName": "问题ID",
6165
-          "comment": "来源点位题",
6284
+          "comment": "来源点位题",
6166
           "type": "",
6285
           "type": "",
6167
           "len": "",
6286
           "len": "",
6168
           "scale": "",
6287
           "scale": "",
6193
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
6312
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
6194
           "id": "0B03C02D-84EC-4306-8CEA-2BAF04806409"
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
           "defKey": "answer",
6316
           "defKey": "answer",
6249
           "defName": "答案",
6317
           "defName": "答案",
6455
         },
6523
         },
6456
         {
6524
         {
6457
           "defKey": "item_id",
6525
           "defKey": "item_id",
6458
-          "defName": "测评点位",
6526
+          "defName": "测评项目",
6459
           "comment": "",
6527
           "comment": "",
6460
           "type": "",
6528
           "type": "",
6461
           "len": "",
6529
           "len": "",
6489
         },
6557
         },
6490
         {
6558
         {
6491
           "defKey": "item_name",
6559
           "defKey": "item_name",
6492
-          "defName": "点位名称",
6560
+          "defName": "项目名称",
6493
           "comment": "",
6561
           "comment": "",
6494
           "type": "",
6562
           "type": "",
6495
           "len": "",
6563
           "len": "",
6506
         },
6574
         },
6507
         {
6575
         {
6508
           "defKey": "name",
6576
           "defKey": "name",
6509
-          "defName": "具体名称",
6577
+          "defName": "具体(小区)名称",
6510
           "comment": "",
6578
           "comment": "",
6511
           "type": "",
6579
           "type": "",
6512
           "len": "",
6580
           "len": "",
6931
       ],
6999
       ],
6932
       "correlations": [],
7000
       "correlations": [],
6933
       "indexes": []
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
   "views": [],
7189
   "views": [],
7353
         "54B9F404-6224-4952-8B2C-A30F6FEE7CC1",
7606
         "54B9F404-6224-4952-8B2C-A30F6FEE7CC1",
7354
         "B6BB7C88-ABE9-4B2F-8556-6A4EA85FBFCB",
7607
         "B6BB7C88-ABE9-4B2F-8556-6A4EA85FBFCB",
7355
         "156A3EC2-A70F-41C1-A66F-BFBE8476BA16",
7608
         "156A3EC2-A70F-41C1-A66F-BFBE8476BA16",
7609
+        "507794C4-11E9-4924-AEC5-368BC6E03FD7",
7356
         "3B58B8CA-AF26-40FE-907A-A34523419478",
7610
         "3B58B8CA-AF26-40FE-907A-A34523419478",
7357
         "B20E272F-91EB-4BAC-AAD6-AF99D517E44D",
7611
         "B20E272F-91EB-4BAC-AAD6-AF99D517E44D",
7358
         "EF3D4E17-6CE0-4944-B1DC-40280B2B689F"
7612
         "EF3D4E17-6CE0-4944-B1DC-40280B2B689F"

+ 1
- 1
src/main/java/com/example/civilizedcity/common/Constants.java Wyświetl plik

1
 package com.example.civilizedcity.common;
1
 package com.example.civilizedcity.common;
2
 
2
 
3
 public class Constants {
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
     public final static int STATUS_DELETE = -1;
6
     public final static int STATUS_DELETE = -1;
7
     public final static int STATUS_READY = 0;
7
     public final static int STATUS_READY = 0;

+ 55
- 23
src/main/java/com/example/civilizedcity/controller/SysOrgController.java Wyświetl plik

4
 import com.baomidou.mybatisplus.core.metadata.IPage;
4
 import com.baomidou.mybatisplus.core.metadata.IPage;
5
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
5
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
 import com.example.civilizedcity.common.BaseController;
6
 import com.example.civilizedcity.common.BaseController;
7
+import com.example.civilizedcity.common.Constants;
7
 import com.example.civilizedcity.common.ResponseBean;
8
 import com.example.civilizedcity.common.ResponseBean;
9
+
10
+import java.time.LocalDateTime;
8
 import java.util.List;
11
 import java.util.List;
12
+
13
+import com.example.civilizedcity.common.StringUtils;
14
+import com.example.civilizedcity.entity.SysRole;
9
 import io.swagger.annotations.Api;
15
 import io.swagger.annotations.Api;
10
 import io.swagger.annotations.ApiOperation;
16
 import io.swagger.annotations.ApiOperation;
11
 import io.swagger.annotations.ApiParam;
17
 import io.swagger.annotations.ApiParam;
14
 import com.example.civilizedcity.entity.SysOrg;
20
 import com.example.civilizedcity.entity.SysOrg;
15
 import com.example.civilizedcity.service.SysOrgService;
21
 import com.example.civilizedcity.service.SysOrgService;
16
 
22
 
17
- /**
23
+/**
18
  * 单位表;(sys_org)表控制层
24
  * 单位表;(sys_org)表控制层
25
+ *
19
  * @author : http://njyunzhi.com
26
  * @author : http://njyunzhi.com
20
  * @date : 2022-12-12
27
  * @date : 2022-12-12
21
  */
28
  */
23
 @RestController
30
 @RestController
24
 @RequestMapping("/")
31
 @RequestMapping("/")
25
 public class SysOrgController extends BaseController {
32
 public class SysOrgController extends BaseController {
26
-    
33
+
27
     @Autowired
34
     @Autowired
28
     private SysOrgService sysOrgService;
35
     private SysOrgService sysOrgService;
29
-    
30
-    /** 
31
-     * 通过ID查询单条数据 
36
+
37
+    /**
38
+     * 通过ID查询单条数据
32
      *
39
      *
33
      * @param orgId 主键
40
      * @param orgId 主键
34
      * @return 实例对象
41
      * @return 实例对象
38
     public ResponseBean queryById(@ApiParam("对象ID") @PathVariable String id) throws Exception {
45
     public ResponseBean queryById(@ApiParam("对象ID") @PathVariable String id) throws Exception {
39
         return ResponseBean.success(sysOrgService.getById(id));
46
         return ResponseBean.success(sysOrgService.getById(id));
40
     }
47
     }
41
-    
42
-    /** 
48
+
49
+    /**
43
      * 分页查询
50
      * 分页查询
44
      *
51
      *
45
-     * @param pageNum 当前页码
52
+     * @param pageNum  当前页码
46
      * @param pageSize 每页条数
53
      * @param pageSize 每页条数
47
      * @return 查询结果
54
      * @return 查询结果
48
      */
55
      */
49
     @ApiOperation("分页查询")
56
     @ApiOperation("分页查询")
50
     @GetMapping("/sysOrg")
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
         IPage<SysOrg> pg = new Page<>(pageNum, pageSize);
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
         return ResponseBean.success(result);
69
         return ResponseBean.success(result);
60
     }
70
     }
61
-    
62
-    /** 
71
+
72
+    /**
63
      * 新增数据
73
      * 新增数据
64
      *
74
      *
65
      * @param sysOrg 实例对象
75
      * @param sysOrg 实例对象
68
     @ApiOperation("新增数据")
78
     @ApiOperation("新增数据")
69
     @PostMapping("/sysOrg")
79
     @PostMapping("/sysOrg")
70
     public ResponseBean add(@ApiParam("对象实体") @RequestBody SysOrg sysOrg) throws Exception {
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
         sysOrgService.save(sysOrg);
93
         sysOrgService.save(sysOrg);
72
         return ResponseBean.success(sysOrg);
94
         return ResponseBean.success(sysOrg);
73
     }
95
     }
74
-    
75
-    /** 
96
+
97
+    /**
76
      * 更新数据
98
      * 更新数据
77
      *
99
      *
78
      * @param sysOrg 实例对象
100
      * @param sysOrg 实例对象
81
     @ApiOperation("更新数据")
103
     @ApiOperation("更新数据")
82
     @PutMapping("/sysOrg/{id}")
104
     @PutMapping("/sysOrg/{id}")
83
     public ResponseBean edit(@ApiParam("对象实体") @RequestBody SysOrg sysOrg,
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
         sysOrgService.updateById(sysOrg);
117
         sysOrgService.updateById(sysOrg);
86
         return ResponseBean.success(sysOrg);
118
         return ResponseBean.success(sysOrg);
87
     }
119
     }
88
-    
89
-    /** 
120
+
121
+    /**
90
      * 通过主键删除数据
122
      * 通过主键删除数据
91
      *
123
      *
92
      * @param orgId 主键
124
      * @param orgId 主键
94
      */
126
      */
95
     @ApiOperation("通过主键删除数据")
127
     @ApiOperation("通过主键删除数据")
96
     @DeleteMapping("/sysOrg/{id}")
128
     @DeleteMapping("/sysOrg/{id}")
97
-    public ResponseBean deleteById(@ApiParam("对象ID") @PathVariable String id){
129
+    public ResponseBean deleteById(@ApiParam("对象ID") @PathVariable String id) {
98
         sysOrgService.removeLogicById(id);
130
         sysOrgService.removeLogicById(id);
99
         return ResponseBean.success("success");
131
         return ResponseBean.success("success");
100
     }
132
     }

+ 62
- 23
src/main/java/com/example/civilizedcity/controller/SysPositionController.java Wyświetl plik

4
 import com.baomidou.mybatisplus.core.metadata.IPage;
4
 import com.baomidou.mybatisplus.core.metadata.IPage;
5
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
5
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
 import com.example.civilizedcity.common.BaseController;
6
 import com.example.civilizedcity.common.BaseController;
7
+import com.example.civilizedcity.common.Constants;
7
 import com.example.civilizedcity.common.ResponseBean;
8
 import com.example.civilizedcity.common.ResponseBean;
9
+
10
+import java.time.LocalDateTime;
8
 import java.util.List;
11
 import java.util.List;
12
+
13
+import com.example.civilizedcity.common.StringUtils;
9
 import io.swagger.annotations.Api;
14
 import io.swagger.annotations.Api;
10
 import io.swagger.annotations.ApiOperation;
15
 import io.swagger.annotations.ApiOperation;
11
 import io.swagger.annotations.ApiParam;
16
 import io.swagger.annotations.ApiParam;
14
 import com.example.civilizedcity.entity.SysPosition;
19
 import com.example.civilizedcity.entity.SysPosition;
15
 import com.example.civilizedcity.service.SysPositionService;
20
 import com.example.civilizedcity.service.SysPositionService;
16
 
21
 
17
- /**
22
+/**
18
  * 岗位表;(sys_position)表控制层
23
  * 岗位表;(sys_position)表控制层
24
+ *
19
  * @author : http://njyunzhi.com
25
  * @author : http://njyunzhi.com
20
  * @date : 2022-12-12
26
  * @date : 2022-12-12
21
  */
27
  */
23
 @RestController
29
 @RestController
24
 @RequestMapping("/")
30
 @RequestMapping("/")
25
 public class SysPositionController extends BaseController {
31
 public class SysPositionController extends BaseController {
26
-    
32
+
27
     @Autowired
33
     @Autowired
28
     private SysPositionService sysPositionService;
34
     private SysPositionService sysPositionService;
29
-    
30
-    /** 
31
-     * 通过ID查询单条数据 
35
+
36
+    /**
37
+     * 通过ID查询单条数据
32
      *
38
      *
33
      * @param positionId 主键
39
      * @param positionId 主键
34
      * @return 实例对象
40
      * @return 实例对象
38
     public ResponseBean queryById(@ApiParam("对象ID") @PathVariable String id) throws Exception {
44
     public ResponseBean queryById(@ApiParam("对象ID") @PathVariable String id) throws Exception {
39
         return ResponseBean.success(sysPositionService.getById(id));
45
         return ResponseBean.success(sysPositionService.getById(id));
40
     }
46
     }
41
-    
42
-    /** 
47
+
48
+    /**
43
      * 分页查询
49
      * 分页查询
44
      *
50
      *
45
-     * @param pageNum 当前页码
51
+     * @param pageNum  当前页码
46
      * @param pageSize 每页条数
52
      * @param pageSize 每页条数
47
      * @return 查询结果
53
      * @return 查询结果
48
      */
54
      */
49
     @ApiOperation("分页查询")
55
     @ApiOperation("分页查询")
50
     @GetMapping("/sysPosition")
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
         IPage<SysPosition> pg = new Page<>(pageNum, pageSize);
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
         return ResponseBean.success(result);
70
         return ResponseBean.success(result);
60
     }
71
     }
61
-    
62
-    /** 
72
+
73
+    /**
63
      * 新增数据
74
      * 新增数据
64
      *
75
      *
65
      * @param sysPosition 实例对象
76
      * @param sysPosition 实例对象
68
     @ApiOperation("新增数据")
79
     @ApiOperation("新增数据")
69
     @PostMapping("/sysPosition")
80
     @PostMapping("/sysPosition")
70
     public ResponseBean add(@ApiParam("对象实体") @RequestBody SysPosition sysPosition) throws Exception {
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
         sysPositionService.save(sysPosition);
97
         sysPositionService.save(sysPosition);
72
         return ResponseBean.success(sysPosition);
98
         return ResponseBean.success(sysPosition);
73
     }
99
     }
74
-    
75
-    /** 
100
+
101
+    /**
76
      * 更新数据
102
      * 更新数据
77
      *
103
      *
78
      * @param sysPosition 实例对象
104
      * @param sysPosition 实例对象
81
     @ApiOperation("更新数据")
107
     @ApiOperation("更新数据")
82
     @PutMapping("/sysPosition/{id}")
108
     @PutMapping("/sysPosition/{id}")
83
     public ResponseBean edit(@ApiParam("对象实体") @RequestBody SysPosition sysPosition,
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
         sysPositionService.updateById(sysPosition);
124
         sysPositionService.updateById(sysPosition);
86
         return ResponseBean.success(sysPosition);
125
         return ResponseBean.success(sysPosition);
87
     }
126
     }
88
-    
89
-    /** 
127
+
128
+    /**
90
      * 通过主键删除数据
129
      * 通过主键删除数据
91
      *
130
      *
92
      * @param positionId 主键
131
      * @param positionId 主键
94
      */
133
      */
95
     @ApiOperation("通过主键删除数据")
134
     @ApiOperation("通过主键删除数据")
96
     @DeleteMapping("/sysPosition/{id}")
135
     @DeleteMapping("/sysPosition/{id}")
97
-    public ResponseBean deleteById(@ApiParam("对象ID") @PathVariable String id){
136
+    public ResponseBean deleteById(@ApiParam("对象ID") @PathVariable String id) {
98
         sysPositionService.removeLogicById(id);
137
         sysPositionService.removeLogicById(id);
99
         return ResponseBean.success("success");
138
         return ResponseBean.success("success");
100
     }
139
     }

+ 56
- 59
src/main/java/com/example/civilizedcity/controller/SysResourceController.java Wyświetl plik

27
     @Autowired
27
     @Autowired
28
     private SysResourceService sysResourceService;
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
      * @return 查询结果
47
      * @return 查询结果
48
      */
48
      */
49
     @ApiOperation("分页查询")
49
     @ApiOperation("分页查询")
50
     @GetMapping("/sysResource")
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
         return ResponseBean.success(result);
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 Wyświetl plik

4
 import com.baomidou.mybatisplus.core.metadata.IPage;
4
 import com.baomidou.mybatisplus.core.metadata.IPage;
5
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
5
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
 import com.example.civilizedcity.common.BaseController;
6
 import com.example.civilizedcity.common.BaseController;
7
+import com.example.civilizedcity.common.Constants;
7
 import com.example.civilizedcity.common.ResponseBean;
8
 import com.example.civilizedcity.common.ResponseBean;
9
+
10
+import java.time.LocalDateTime;
11
+import java.util.HashMap;
8
 import java.util.List;
12
 import java.util.List;
13
+
14
+import com.example.civilizedcity.common.StringUtils;
15
+import com.example.civilizedcity.service.SysUserRoleService;
9
 import io.swagger.annotations.Api;
16
 import io.swagger.annotations.Api;
10
 import io.swagger.annotations.ApiOperation;
17
 import io.swagger.annotations.ApiOperation;
11
 import io.swagger.annotations.ApiParam;
18
 import io.swagger.annotations.ApiParam;
14
 import com.example.civilizedcity.entity.SysRole;
21
 import com.example.civilizedcity.entity.SysRole;
15
 import com.example.civilizedcity.service.SysRoleService;
22
 import com.example.civilizedcity.service.SysRoleService;
16
 
23
 
17
- /**
24
+/**
18
  * 系统角色;(sys_role)表控制层
25
  * 系统角色;(sys_role)表控制层
26
+ *
19
  * @author : http://njyunzhi.com
27
  * @author : http://njyunzhi.com
20
  * @date : 2022-12-12
28
  * @date : 2022-12-12
21
  */
29
  */
23
 @RestController
31
 @RestController
24
 @RequestMapping("/")
32
 @RequestMapping("/")
25
 public class SysRoleController extends BaseController {
33
 public class SysRoleController extends BaseController {
26
-    
34
+
27
     @Autowired
35
     @Autowired
28
     private SysRoleService sysRoleService;
36
     private SysRoleService sysRoleService;
29
-    
30
-    /** 
31
-     * 通过ID查询单条数据 
37
+
38
+    @Autowired
39
+    private SysUserRoleService sysUserRoleService;
40
+
41
+    /**
42
+     * 通过ID查询单条数据
32
      *
43
      *
33
      * @param roleId 主键
44
      * @param roleId 主键
34
      * @return 实例对象
45
      * @return 实例对象
38
     public ResponseBean queryById(@ApiParam("对象ID") @PathVariable String id) throws Exception {
49
     public ResponseBean queryById(@ApiParam("对象ID") @PathVariable String id) throws Exception {
39
         return ResponseBean.success(sysRoleService.getById(id));
50
         return ResponseBean.success(sysRoleService.getById(id));
40
     }
51
     }
41
-    
42
-    /** 
52
+
53
+    /**
43
      * 分页查询
54
      * 分页查询
44
      *
55
      *
45
-     * @param pageNum 当前页码
56
+     * @param pageNum  当前页码
46
      * @param pageSize 每页条数
57
      * @param pageSize 每页条数
47
      * @return 查询结果
58
      * @return 查询结果
48
      */
59
      */
49
     @ApiOperation("分页查询")
60
     @ApiOperation("分页查询")
50
     @GetMapping("/sysRole")
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
         IPage<SysRole> pg = new Page<>(pageNum, pageSize);
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
         return ResponseBean.success(result);
71
         return ResponseBean.success(result);
60
     }
72
     }
61
-    
62
-    /** 
73
+
74
+    /**
63
      * 新增数据
75
      * 新增数据
64
      *
76
      *
65
      * @param sysRole 实例对象
77
      * @param sysRole 实例对象
68
     @ApiOperation("新增数据")
80
     @ApiOperation("新增数据")
69
     @PostMapping("/sysRole")
81
     @PostMapping("/sysRole")
70
     public ResponseBean add(@ApiParam("对象实体") @RequestBody SysRole sysRole) throws Exception {
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
         sysRoleService.save(sysRole);
96
         sysRoleService.save(sysRole);
72
         return ResponseBean.success(sysRole);
97
         return ResponseBean.success(sysRole);
73
     }
98
     }
74
-    
75
-    /** 
99
+
100
+    /**
76
      * 更新数据
101
      * 更新数据
77
      *
102
      *
78
      * @param sysRole 实例对象
103
      * @param sysRole 实例对象
81
     @ApiOperation("更新数据")
106
     @ApiOperation("更新数据")
82
     @PutMapping("/sysRole/{id}")
107
     @PutMapping("/sysRole/{id}")
83
     public ResponseBean edit(@ApiParam("对象实体") @RequestBody SysRole sysRole,
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
         sysRoleService.updateById(sysRole);
121
         sysRoleService.updateById(sysRole);
86
         return ResponseBean.success(sysRole);
122
         return ResponseBean.success(sysRole);
87
     }
123
     }
88
-    
89
-    /** 
124
+
125
+    /**
90
      * 通过主键删除数据
126
      * 通过主键删除数据
91
      *
127
      *
92
      * @param roleId 主键
128
      * @param roleId 主键
94
      */
130
      */
95
     @ApiOperation("通过主键删除数据")
131
     @ApiOperation("通过主键删除数据")
96
     @DeleteMapping("/sysRole/{id}")
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
         return ResponseBean.success("success");
138
         return ResponseBean.success("success");
100
     }
139
     }
101
 }
140
 }

+ 90
- 71
src/main/java/com/example/civilizedcity/controller/SysRoleResourceController.java Wyświetl plik

26
     
26
     
27
     @Autowired
27
     @Autowired
28
     private SysRoleResourceService sysRoleResourceService;
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 Wyświetl plik

4
 import com.baomidou.mybatisplus.core.metadata.IPage;
4
 import com.baomidou.mybatisplus.core.metadata.IPage;
5
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
5
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
 import com.example.civilizedcity.common.BaseController;
6
 import com.example.civilizedcity.common.BaseController;
7
+import com.example.civilizedcity.common.Constants;
7
 import com.example.civilizedcity.common.ResponseBean;
8
 import com.example.civilizedcity.common.ResponseBean;
9
+
10
+import java.util.HashMap;
8
 import java.util.List;
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
 import io.swagger.annotations.Api;
19
 import io.swagger.annotations.Api;
10
 import io.swagger.annotations.ApiOperation;
20
 import io.swagger.annotations.ApiOperation;
11
 import io.swagger.annotations.ApiParam;
21
 import io.swagger.annotations.ApiParam;
23
 @RestController
33
 @RestController
24
 @RequestMapping("/")
34
 @RequestMapping("/")
25
 public class SysUserController extends BaseController {
35
 public class SysUserController extends BaseController {
26
-    
36
+
27
     @Autowired
37
     @Autowired
28
-    private SysUserService sysUserService;
29
-    
38
+     SysRoleService sysRoleService;
39
+
40
+    @Autowired
41
+     SysResourceService sysResourceService;
42
+
30
     /** 
43
     /** 
31
      * 通过ID查询单条数据 
44
      * 通过ID查询单条数据 
32
      *
45
      *
36
     @ApiOperation("通过ID查询单条数据")
49
     @ApiOperation("通过ID查询单条数据")
37
     @GetMapping("/sysUser/{id}")
50
     @GetMapping("/sysUser/{id}")
38
     public ResponseBean queryById(@ApiParam("对象ID") @PathVariable String id) throws Exception {
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
      */
89
      */
49
     @ApiOperation("分页查询")
90
     @ApiOperation("分页查询")
50
     @GetMapping("/sysUser")
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
         IPage<SysUser> pg = new Page<>(pageNum, pageSize);
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
         IPage<SysUser> result = sysUserService.page(pg);
106
         IPage<SysUser> result = sysUserService.page(pg);
58
         
107
         
59
         return ResponseBean.success(result);
108
         return ResponseBean.success(result);
68
     @ApiOperation("新增数据")
117
     @ApiOperation("新增数据")
69
     @PostMapping("/sysUser")
118
     @PostMapping("/sysUser")
70
     public ResponseBean add(@ApiParam("对象实体") @RequestBody SysUser sysUser) throws Exception {
119
     public ResponseBean add(@ApiParam("对象实体") @RequestBody SysUser sysUser) throws Exception {
71
-        sysUserService.save(sysUser);
120
+        sysUserService.mergeData(sysUser);
72
         return ResponseBean.success(sysUser);
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 Wyświetl plik

27
     @Autowired
27
     @Autowired
28
     private SysUserRoleService sysUserRoleService;
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 Wyświetl plik

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

src/main/java/com/example/civilizedcity/controller/TdLocQuestionController.java → src/main/java/com/example/civilizedcity/controller/TdQuestionController.java Wyświetl plik

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

+ 1
- 1
src/main/java/com/example/civilizedcity/entity/SysOrg.java Wyświetl plik

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

+ 1
- 1
src/main/java/com/example/civilizedcity/entity/SysPosition.java Wyświetl plik

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

+ 1
- 1
src/main/java/com/example/civilizedcity/entity/SysResource.java Wyświetl plik

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

+ 1
- 1
src/main/java/com/example/civilizedcity/entity/SysRole.java Wyświetl plik

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

+ 1
- 1
src/main/java/com/example/civilizedcity/entity/SysRoleResource.java Wyświetl plik

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

+ 12
- 2
src/main/java/com/example/civilizedcity/entity/SysUser.java Wyświetl plik

1
 package com.example.civilizedcity.entity;
1
 package com.example.civilizedcity.entity;
2
 
2
 
3
+import com.baomidou.mybatisplus.annotation.TableField;
3
 import io.swagger.annotations.ApiModel;
4
 import io.swagger.annotations.ApiModel;
4
 import io.swagger.annotations.ApiModelProperty;
5
 import io.swagger.annotations.ApiModelProperty;
5
 import com.baomidou.mybatisplus.annotation.IdType;
6
 import com.baomidou.mybatisplus.annotation.IdType;
8
 import java.io.Serializable;
9
 import java.io.Serializable;
9
 import java.time.LocalDateTime;
10
 import java.time.LocalDateTime;
10
 import java.util.Date;
11
 import java.util.Date;
12
+import java.util.List;
13
+
11
 import lombok.Data;
14
 import lombok.Data;
12
 import lombok.EqualsAndHashCode;
15
 import lombok.EqualsAndHashCode;
13
 import lombok.experimental.Accessors;
16
 import lombok.experimental.Accessors;
25
 public class SysUser implements Serializable,Cloneable{
28
 public class SysUser implements Serializable,Cloneable{
26
     /** 用户ID */
29
     /** 用户ID */
27
     @ApiModelProperty(name = "用户ID",notes = "")
30
     @ApiModelProperty(name = "用户ID",notes = "")
28
-    @TableId(value = "user_id", type = IdType.INPUT)
31
+    @TableId(value = "user_id", type = IdType.ASSIGN_UUID)
29
     private String userId ;
32
     private String userId ;
30
     /** 用户名称 */
33
     /** 用户名称 */
31
     @ApiModelProperty(name = "用户名称",notes = "")
34
     @ApiModelProperty(name = "用户名称",notes = "")
32
-    private Integer name ;
35
+    private String name ;
33
     /** 头像 */
36
     /** 头像 */
34
     @ApiModelProperty(name = "头像",notes = "")
37
     @ApiModelProperty(name = "头像",notes = "")
35
     private String avatar ;
38
     private String avatar ;
52
     @ApiModelProperty(name = "创建时间",notes = "")
55
     @ApiModelProperty(name = "创建时间",notes = "")
53
     private LocalDateTime createDate ;
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 Wyświetl plik

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

+ 28
- 13
src/main/java/com/example/civilizedcity/entity/TaCheckItemQu.java Wyświetl plik

22
 @ApiModel(value = "点位问题",description = "")
22
 @ApiModel(value = "点位问题",description = "")
23
 @TableName("ta_check_item_qu")
23
 @TableName("ta_check_item_qu")
24
 public class TaCheckItemQu implements Serializable,Cloneable{
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 Wyświetl plik

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

src/main/java/com/example/civilizedcity/entity/TdLocQuAnswer.java → src/main/java/com/example/civilizedcity/entity/TdQuAnswer.java Wyświetl plik

21
 @Accessors(chain = true)
21
 @Accessors(chain = true)
22
 @ApiModel(value = "点位问题答案",description = "")
22
 @ApiModel(value = "点位问题答案",description = "")
23
 @TableName("td_loc_qu_answer")
23
 @TableName("td_loc_qu_answer")
24
-public class TdLocQuAnswer implements Serializable,Cloneable{
24
+public class TdQuAnswer implements Serializable,Cloneable{
25
     /** 答案ID */
25
     /** 答案ID */
26
     @ApiModelProperty(name = "答案ID",notes = "")
26
     @ApiModelProperty(name = "答案ID",notes = "")
27
     @TableId(value = "answer_id", type = IdType.INPUT)
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 Wyświetl plik

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

+ 9
- 3
src/main/java/com/example/civilizedcity/mapper/SysResourceMapper.java Wyświetl plik

5
 import org.apache.ibatis.annotations.Param;
5
 import org.apache.ibatis.annotations.Param;
6
 import com.example.civilizedcity.entity.SysResource;
6
 import com.example.civilizedcity.entity.SysResource;
7
 
7
 
8
- /**
8
+import java.util.List;
9
+
10
+/**
9
  * 资源表;(sys_resource)表数据库访问层
11
  * 资源表;(sys_resource)表数据库访问层
12
+ *
10
  * @author : http://njyunzhi.com
13
  * @author : http://njyunzhi.com
11
  * @date : 2022-12-12
14
  * @date : 2022-12-12
12
  */
15
  */
13
 @Mapper
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 Wyświetl plik

5
 import org.apache.ibatis.annotations.Param;
5
 import org.apache.ibatis.annotations.Param;
6
 import com.example.civilizedcity.entity.SysRole;
6
 import com.example.civilizedcity.entity.SysRole;
7
 
7
 
8
- /**
8
+import java.util.List;
9
+
10
+/**
9
  * 系统角色;(sys_role)表数据库访问层
11
  * 系统角色;(sys_role)表数据库访问层
10
  * @author : http://njyunzhi.com
12
  * @author : http://njyunzhi.com
11
  * @date : 2022-12-12
13
  * @date : 2022-12-12
12
  */
14
  */
13
 @Mapper
15
 @Mapper
14
 public interface SysRoleMapper  extends BaseMapper<SysRole>{
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 Wyświetl plik

5
 import org.apache.ibatis.annotations.Param;
5
 import org.apache.ibatis.annotations.Param;
6
 import com.example.civilizedcity.entity.SysRoleResource;
6
 import com.example.civilizedcity.entity.SysRoleResource;
7
 
7
 
8
- /**
8
+import java.util.List;
9
+
10
+/**
9
  * 角色资源;(sys_role_resource)表数据库访问层
11
  * 角色资源;(sys_role_resource)表数据库访问层
10
  * @author : http://njyunzhi.com
12
  * @author : http://njyunzhi.com
11
  * @date : 2022-12-12
13
  * @date : 2022-12-12
12
  */
14
  */
13
 @Mapper
15
 @Mapper
14
 public interface SysRoleResourceMapper  extends BaseMapper<SysRoleResource>{
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 Wyświetl plik

5
 import org.apache.ibatis.annotations.Param;
5
 import org.apache.ibatis.annotations.Param;
6
 import com.example.civilizedcity.entity.SysUserRole;
6
 import com.example.civilizedcity.entity.SysUserRole;
7
 
7
 
8
- /**
8
+import java.util.List;
9
+
10
+/**
9
  * 角色授权;(sys_user_role)表数据库访问层
11
  * 角色授权;(sys_user_role)表数据库访问层
10
  * @author : http://njyunzhi.com
12
  * @author : http://njyunzhi.com
11
  * @date : 2022-12-12
13
  * @date : 2022-12-12
12
  */
14
  */
13
 @Mapper
15
 @Mapper
14
 public interface SysUserRoleMapper  extends BaseMapper<SysUserRole>{
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 Wyświetl plik

2
 
2
 
3
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
3
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
 import org.apache.ibatis.annotations.Mapper;
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
  * 点位问题答案;(td_loc_qu_answer)表数据库访问层
8
  * 点位问题答案;(td_loc_qu_answer)表数据库访问层
11
  * @date : 2022-12-13
10
  * @date : 2022-12-13
12
  */
11
  */
13
 @Mapper
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 Wyświetl plik

2
 
2
 
3
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
3
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
 import org.apache.ibatis.annotations.Mapper;
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
  * 点位问题;(td_loc_question)表数据库访问层
8
  * 点位问题;(td_loc_question)表数据库访问层
11
  * @date : 2022-12-13
10
  * @date : 2022-12-13
12
  */
11
  */
13
 @Mapper
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 Wyświetl plik

9
  * @date : 2022-12-12
9
  * @date : 2022-12-12
10
  */
10
  */
11
 public interface SysPositionService extends IBaseService<SysPosition> {
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 Wyświetl plik

3
 import com.baomidou.mybatisplus.extension.service.IService;
3
 import com.baomidou.mybatisplus.extension.service.IService;
4
 import com.example.civilizedcity.entity.SysResource;
4
 import com.example.civilizedcity.entity.SysResource;
5
 
5
 
6
- /**
6
+import java.util.List;
7
+
8
+/**
7
  * 资源表;(sys_resource)表服务接口
9
  * 资源表;(sys_resource)表服务接口
8
  * @author : http://njyunzhi.com
10
  * @author : http://njyunzhi.com
9
  * @date : 2022-12-12
11
  * @date : 2022-12-12
10
  */
12
  */
11
 public interface SysResourceService extends IBaseService<SysResource> {
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 Wyświetl plik

3
 import com.baomidou.mybatisplus.extension.service.IService;
3
 import com.baomidou.mybatisplus.extension.service.IService;
4
 import com.example.civilizedcity.entity.SysRoleResource;
4
 import com.example.civilizedcity.entity.SysRoleResource;
5
 
5
 
6
- /**
6
+import java.util.List;
7
+
8
+/**
7
  * 角色资源;(sys_role_resource)表服务接口
9
  * 角色资源;(sys_role_resource)表服务接口
8
  * @author : http://njyunzhi.com
10
  * @author : http://njyunzhi.com
9
  * @date : 2022-12-12
11
  * @date : 2022-12-12
10
  */
12
  */
11
 public interface SysRoleResourceService extends IBaseService<SysRoleResource> {
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 Wyświetl plik

3
 import com.baomidou.mybatisplus.extension.service.IService;
3
 import com.baomidou.mybatisplus.extension.service.IService;
4
 import com.example.civilizedcity.entity.SysRole;
4
 import com.example.civilizedcity.entity.SysRole;
5
 
5
 
6
- /**
6
+import java.util.List;
7
+
8
+/**
7
  * 系统角色;(sys_role)表服务接口
9
  * 系统角色;(sys_role)表服务接口
8
  * @author : http://njyunzhi.com
10
  * @author : http://njyunzhi.com
9
  * @date : 2022-12-12
11
  * @date : 2022-12-12
10
  */
12
  */
11
 public interface SysRoleService extends IBaseService<SysRole> {
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 Wyświetl plik

15
     SysUser login(LoginParam loginParm) throws Exception;
15
     SysUser login(LoginParam loginParm) throws Exception;
16
 
16
 
17
     boolean changePassword(SysUser user, ChangePassword param) throws Exception;
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 Wyświetl plik

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 Wyświetl plik

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 Wyświetl plik

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 Wyświetl plik

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 Wyświetl plik

1
 package com.example.civilizedcity.service.impl;
1
 package com.example.civilizedcity.service.impl;
2
 
2
 
3
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4
+import com.example.civilizedcity.common.StringUtils;
3
 import org.springframework.beans.factory.annotation.Autowired;
5
 import org.springframework.beans.factory.annotation.Autowired;
4
 import org.springframework.stereotype.Service;
6
 import org.springframework.stereotype.Service;
5
 import com.example.civilizedcity.entity.SysPosition;
7
 import com.example.civilizedcity.entity.SysPosition;
6
 import com.example.civilizedcity.mapper.SysPositionMapper;
8
 import com.example.civilizedcity.mapper.SysPositionMapper;
7
 import com.example.civilizedcity.service.SysPositionService;
9
 import com.example.civilizedcity.service.SysPositionService;
8
- /**
10
+
11
+/**
9
  * 岗位表;(sys_position)表服务实现类
12
  * 岗位表;(sys_position)表服务实现类
13
+ *
10
  * @author : http://www.chiner.pro
14
  * @author : http://www.chiner.pro
11
  * @date : 2022-12-12
15
  * @date : 2022-12-12
12
  */
16
  */
13
 @Service
17
 @Service
14
 public class SysPositionServiceImpl extends BaseServiceImpl<SysPositionMapper, SysPosition> implements SysPositionService {
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 Wyświetl plik

1
 package com.example.civilizedcity.service.impl;
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
 import org.springframework.stereotype.Service;
5
 import org.springframework.stereotype.Service;
5
 import com.example.civilizedcity.entity.SysResource;
6
 import com.example.civilizedcity.entity.SysResource;
6
 import com.example.civilizedcity.mapper.SysResourceMapper;
7
 import com.example.civilizedcity.mapper.SysResourceMapper;
7
 import com.example.civilizedcity.service.SysResourceService;
8
 import com.example.civilizedcity.service.SysResourceService;
8
- /**
9
+
10
+import java.util.List;
11
+
12
+/**
9
  * 资源表;(sys_resource)表服务实现类
13
  * 资源表;(sys_resource)表服务实现类
14
+ *
10
  * @author : http://www.chiner.pro
15
  * @author : http://www.chiner.pro
11
  * @date : 2022-12-12
16
  * @date : 2022-12-12
12
  */
17
  */
13
 @Service
18
 @Service
14
 public class SysResourceServiceImpl extends BaseServiceImpl<SysResourceMapper, SysResource> implements SysResourceService {
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 Wyświetl plik

5
 import com.example.civilizedcity.entity.SysRoleResource;
5
 import com.example.civilizedcity.entity.SysRoleResource;
6
 import com.example.civilizedcity.mapper.SysRoleResourceMapper;
6
 import com.example.civilizedcity.mapper.SysRoleResourceMapper;
7
 import com.example.civilizedcity.service.SysRoleResourceService;
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
  * 角色资源;(sys_role_resource)表服务实现类
14
  * 角色资源;(sys_role_resource)表服务实现类
15
+ *
10
  * @author : http://www.chiner.pro
16
  * @author : http://www.chiner.pro
11
  * @date : 2022-12-12
17
  * @date : 2022-12-12
12
  */
18
  */
13
 @Service
19
 @Service
14
 public class SysRoleResourceServiceImpl extends BaseServiceImpl<SysRoleResourceMapper, SysRoleResource> implements SysRoleResourceService {
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 Wyświetl plik

1
 package com.example.civilizedcity.service.impl;
1
 package com.example.civilizedcity.service.impl;
2
 
2
 
3
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4
+import com.example.civilizedcity.common.Constants;
3
 import org.springframework.beans.factory.annotation.Autowired;
5
 import org.springframework.beans.factory.annotation.Autowired;
4
 import org.springframework.stereotype.Service;
6
 import org.springframework.stereotype.Service;
5
 import com.example.civilizedcity.entity.SysRole;
7
 import com.example.civilizedcity.entity.SysRole;
6
 import com.example.civilizedcity.mapper.SysRoleMapper;
8
 import com.example.civilizedcity.mapper.SysRoleMapper;
7
 import com.example.civilizedcity.service.SysRoleService;
9
 import com.example.civilizedcity.service.SysRoleService;
8
- /**
10
+
11
+import java.util.List;
12
+
13
+/**
9
  * 系统角色;(sys_role)表服务实现类
14
  * 系统角色;(sys_role)表服务实现类
15
+ *
10
  * @author : http://www.chiner.pro
16
  * @author : http://www.chiner.pro
11
  * @date : 2022-12-12
17
  * @date : 2022-12-12
12
  */
18
  */
13
 @Service
19
 @Service
14
 public class SysRoleServiceImpl extends BaseServiceImpl<SysRoleMapper, SysRole> implements SysRoleService {
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 Wyświetl plik

4
 import com.example.civilizedcity.common.EncryptUtils;
4
 import com.example.civilizedcity.common.EncryptUtils;
5
 import com.example.civilizedcity.common.StringUtils;
5
 import com.example.civilizedcity.common.StringUtils;
6
 import com.example.civilizedcity.entity.SysLogin;
6
 import com.example.civilizedcity.entity.SysLogin;
7
+import com.example.civilizedcity.entity.SysRole;
8
+import com.example.civilizedcity.entity.SysUserRole;
7
 import com.example.civilizedcity.mapper.SysLoginMapper;
9
 import com.example.civilizedcity.mapper.SysLoginMapper;
10
+import com.example.civilizedcity.mapper.SysUserRoleMapper;
8
 import com.example.civilizedcity.vo.ChangePassword;
11
 import com.example.civilizedcity.vo.ChangePassword;
9
 import com.example.civilizedcity.vo.LoginParam;
12
 import com.example.civilizedcity.vo.LoginParam;
10
 import org.springframework.beans.factory.annotation.Autowired;
13
 import org.springframework.beans.factory.annotation.Autowired;
13
 import com.example.civilizedcity.mapper.SysUserMapper;
16
 import com.example.civilizedcity.mapper.SysUserMapper;
14
 import com.example.civilizedcity.service.SysUserService;
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
  * 用户表;(sys_user)表服务实现类
25
  * 用户表;(sys_user)表服务实现类
18
  *
26
  *
25
     @Autowired
33
     @Autowired
26
     SysLoginMapper sysLoginMapper;
34
     SysLoginMapper sysLoginMapper;
27
 
35
 
36
+    @Autowired
37
+    SysUserRoleMapper sysUserRoleMapper;
38
+
28
     @Override
39
     @Override
29
     public SysUser login(LoginParam loginParm) throws Exception {
40
     public SysUser login(LoginParam loginParm) throws Exception {
30
         SysLogin sysLogin = sysLoginMapper.getByAccount(loginParm.getAccount());
41
         SysLogin sysLogin = sysLoginMapper.getByAccount(loginParm.getAccount());
69
         return sysLoginMapper.updateById(sysLogin) > 0;
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
     boolean checkPassword(String src, String targ, String salt) {
150
     boolean checkPassword(String src, String targ, String salt) {
73
         String newPass = EncryptUtils.md5(src, salt);
151
         String newPass = EncryptUtils.md5(src, salt);
74
         return targ.equals(newPass);
152
         return targ.equals(newPass);

+ 0
- 16
src/main/java/com/example/civilizedcity/service/impl/TdLocQuAnswerServiceImpl.java Wyświetl plik

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 Wyświetl plik

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 Wyświetl plik

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 Wyświetl plik

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 Wyświetl plik

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

+ 30
- 1
src/main/resources/mapper/SysResourceMapper.xml Wyświetl plik

2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
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.SysResourceMapper">
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
 </mapper>
35
 </mapper>

+ 12
- 1
src/main/resources/mapper/SysRoleMapper.xml Wyświetl plik

2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
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.SysRoleMapper">
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
 </mapper>
17
 </mapper>

+ 21
- 1
src/main/resources/mapper/SysRoleResourceMapper.xml Wyświetl plik

2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
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.SysRoleResourceMapper">
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
 </mapper>
26
 </mapper>

+ 21
- 1
src/main/resources/mapper/SysUserRoleMapper.xml Wyświetl plik

2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
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.SysUserRoleMapper">
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
 </mapper>
26
 </mapper>

src/main/resources/mapper/TdLocQuAnswerMapper.xml → src/main/resources/mapper/TdQuAnswerMapper.xml Wyświetl plik

1
 <?xml version="1.0" encoding="UTF-8"?>
1
 <?xml version="1.0" encoding="UTF-8"?>
2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
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
 </mapper>
6
 </mapper>

src/main/resources/mapper/TdLocQuestionMapper.xml → src/main/resources/mapper/TdQuestionMapper.xml Wyświetl plik

1
 <?xml version="1.0" encoding="UTF-8"?>
1
 <?xml version="1.0" encoding="UTF-8"?>
2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
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
 </mapper>
6
 </mapper>