Преглед изворни кода

Merge branch 'dev1.0' of http://git.ycjcjy.com/civilized_city/service into dev1.0

Your Name пре 2 година
родитељ
комит
47abfcd75f
23 измењених фајлова са 673 додато и 49 уклоњено
  1. 18
    1
      db/.back_文明创办/文明创办-backup-2023323142334.pdma.json
  2. 161
    8
      db/.back_文明创办/文明创办-backup-2023323142415.pdma.json
  3. 178
    8
      db/.back_文明创办/文明创办-backup-2023323142510.pdma.json
  4. 69
    1
      db/文明创办.pdma.json
  5. 1
    1
      pom.xml
  6. 31
    0
      src/main/java/com/example/civilizedcity/controller/TaCheckController.java
  7. 9
    0
      src/main/java/com/example/civilizedcity/controller/TaIssueApplyController.java
  8. 1
    1
      src/main/java/com/example/civilizedcity/controller/TaMessageController.java
  9. 3
    0
      src/main/java/com/example/civilizedcity/entity/TaCheck.java
  10. 4
    0
      src/main/java/com/example/civilizedcity/entity/TaCheckItem.java
  11. 4
    0
      src/main/java/com/example/civilizedcity/entity/TaCheckItemAn.java
  12. 3
    0
      src/main/java/com/example/civilizedcity/entity/TaCheckItemQu.java
  13. 2
    0
      src/main/java/com/example/civilizedcity/mapper/TaCheckAnswerItemMapper.java
  14. 3
    1
      src/main/java/com/example/civilizedcity/mapper/TaCheckItemMapper.java
  15. 3
    1
      src/main/java/com/example/civilizedcity/mapper/TaCheckItemQuMapper.java
  16. 2
    0
      src/main/java/com/example/civilizedcity/service/TaCheckService.java
  17. 57
    23
      src/main/java/com/example/civilizedcity/service/impl/SysUserServiceImpl.java
  18. 28
    0
      src/main/java/com/example/civilizedcity/service/impl/TaCheckServiceImpl.java
  19. 4
    3
      src/main/java/com/example/civilizedcity/service/impl/TaIssueApplyServiceImpl.java
  20. 5
    1
      src/main/java/com/example/civilizedcity/service/impl/TaMessageServiceImpl.java
  21. 27
    0
      src/main/resources/mapper/TaCheckAnswerItemMapper.xml
  22. 28
    0
      src/main/resources/mapper/TaCheckItemMapper.xml
  23. 32
    0
      src/main/resources/mapper/TaCheckItemQuMapper.xml

db/.back_文明创办/文明创办-backup-2023313112657.pdma.json → db/.back_文明创办/文明创办-backup-2023323142334.pdma.json Прегледај датотеку

@@ -4,7 +4,7 @@
4 4
   "avatar": "",
5 5
   "version": "4.1.4",
6 6
   "createdTime": "2022-12-12 09:36:12",
7
-  "updatedTime": "2023-2-28 15:31:35",
7
+  "updatedTime": "2023-3-13 11:26:57",
8 8
   "dbConns": [],
9 9
   "profile": {
10 10
     "default": {
@@ -667,6 +667,23 @@
667 667
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
668 668
           "id": "B7406CE6-690F-4A9B-8BA4-4EF1F18B5C87"
669 669
         },
670
+        {
671
+          "defKey": "is_responsible",
672
+          "defName": "是否责任单位",
673
+          "comment": "",
674
+          "type": "",
675
+          "len": "",
676
+          "scale": "",
677
+          "primaryKey": false,
678
+          "notNull": false,
679
+          "autoIncrement": false,
680
+          "defaultValue": "1",
681
+          "hideInGraph": false,
682
+          "refDict": "",
683
+          "extProps": {},
684
+          "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
685
+          "id": "40B1363B-2AD0-4B89-9ADE-A487DCB59573"
686
+        },
670 687
         {
671 688
           "defKey": "sort_no",
672 689
           "defName": "排序",

db/.back_文明创办/文明创办-backup-202325104648.pdma.json → db/.back_文明创办/文明创办-backup-2023323142415.pdma.json Прегледај датотеку

@@ -4,7 +4,7 @@
4 4
   "avatar": "",
5 5
   "version": "4.1.4",
6 6
   "createdTime": "2022-12-12 09:36:12",
7
-  "updatedTime": "2023-2-4 21:25:08",
7
+  "updatedTime": "2023-3-23 14:23:34",
8 8
   "dbConns": [],
9 9
   "profile": {
10 10
     "default": {
@@ -667,6 +667,23 @@
667 667
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
668 668
           "id": "B7406CE6-690F-4A9B-8BA4-4EF1F18B5C87"
669 669
         },
670
+        {
671
+          "defKey": "is_responsible",
672
+          "defName": "是否责任单位",
673
+          "comment": "",
674
+          "type": "",
675
+          "len": "",
676
+          "scale": "",
677
+          "primaryKey": false,
678
+          "notNull": false,
679
+          "autoIncrement": false,
680
+          "defaultValue": "1",
681
+          "hideInGraph": false,
682
+          "refDict": "",
683
+          "extProps": {},
684
+          "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
685
+          "id": "40B1363B-2AD0-4B89-9ADE-A487DCB59573"
686
+        },
670 687
         {
671 688
           "defKey": "sort_no",
672 689
           "defName": "排序",
@@ -1221,6 +1238,23 @@
1221 1238
           "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
1222 1239
           "id": "D1C0A2CD-89DB-44DF-918F-EA536E39761F"
1223 1240
         },
1241
+        {
1242
+          "defKey": "is_from_wx",
1243
+          "defName": "是否微信端添加",
1244
+          "comment": "",
1245
+          "type": "",
1246
+          "len": "",
1247
+          "scale": "",
1248
+          "primaryKey": false,
1249
+          "notNull": false,
1250
+          "autoIncrement": false,
1251
+          "defaultValue": "0",
1252
+          "hideInGraph": false,
1253
+          "refDict": "",
1254
+          "extProps": {},
1255
+          "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
1256
+          "id": "FDA26255-02A6-4AD5-AA2C-B8C410548D44"
1257
+        },
1224 1258
         {
1225 1259
           "defKey": "create_user",
1226 1260
           "defName": "创建人",
@@ -3525,7 +3559,7 @@
3525 3559
           "defName": "定位",
3526 3560
           "comment": "",
3527 3561
           "type": "VARCHAR",
3528
-          "len": 32,
3562
+          "len": 64,
3529 3563
           "scale": "",
3530 3564
           "primaryKey": false,
3531 3565
           "notNull": false,
@@ -4816,6 +4850,40 @@
4816 4850
           "domain": "",
4817 4851
           "id": "F2E17D81-03A9-42C4-8DD7-732C8D40DC59"
4818 4852
         },
4853
+        {
4854
+          "defKey": "loc_score_percent",
4855
+          "defName": "实地测评得分占比",
4856
+          "comment": "",
4857
+          "type": "DECIMAL",
4858
+          "len": 6,
4859
+          "scale": 2,
4860
+          "primaryKey": false,
4861
+          "notNull": false,
4862
+          "autoIncrement": false,
4863
+          "defaultValue": "",
4864
+          "hideInGraph": false,
4865
+          "refDict": "",
4866
+          "extProps": {},
4867
+          "domain": "",
4868
+          "id": "DE02FAE0-A53F-4F6F-BB1B-B1669DD46C82"
4869
+        },
4870
+        {
4871
+          "defKey": "survey_score_percent",
4872
+          "defName": "调查问卷得分占比",
4873
+          "comment": "",
4874
+          "type": "DECIMAL",
4875
+          "len": 6,
4876
+          "scale": 2,
4877
+          "primaryKey": false,
4878
+          "notNull": false,
4879
+          "autoIncrement": false,
4880
+          "defaultValue": "",
4881
+          "hideInGraph": false,
4882
+          "refDict": "",
4883
+          "extProps": {},
4884
+          "domain": "",
4885
+          "id": "85BA110E-FCC5-4FC5-BE12-2C83C3D0EC27"
4886
+        },
4819 4887
         {
4820 4888
           "defKey": "start_date",
4821 4889
           "defName": "开始日期",
@@ -4900,6 +4968,23 @@
4900 4968
           "refDict": "",
4901 4969
           "uiHint": "",
4902 4970
           "id": "1E651F5A-E5FA-4AB5-A67E-C2EF184FFD36"
4971
+        },
4972
+        {
4973
+          "defKey": "copy_from",
4974
+          "defName": "拷贝来源",
4975
+          "comment": "",
4976
+          "type": "",
4977
+          "len": "",
4978
+          "scale": "",
4979
+          "primaryKey": false,
4980
+          "notNull": false,
4981
+          "autoIncrement": false,
4982
+          "defaultValue": "",
4983
+          "hideInGraph": false,
4984
+          "refDict": "",
4985
+          "extProps": {},
4986
+          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
4987
+          "id": "FF90BF79-2A75-4638-98AE-B17BFD53F8CA"
4903 4988
         }
4904 4989
       ],
4905 4990
       "correlations": [],
@@ -5202,7 +5287,7 @@
5202 5287
       "fields": [
5203 5288
         {
5204 5289
           "defKey": "item_id",
5205
-          "defName": "点位ID",
5290
+          "defName": "测评项目ID",
5206 5291
           "comment": "",
5207 5292
           "type": "",
5208 5293
           "len": 32,
@@ -6503,7 +6588,7 @@
6503 6588
         {
6504 6589
           "defKey": "qu_id",
6505 6590
           "defName": "问题ID",
6506
-          "comment": "来源点位问题",
6591
+          "comment": "来源项目问题",
6507 6592
           "type": "",
6508 6593
           "len": "",
6509 6594
           "scale": "",
@@ -6811,9 +6896,26 @@
6811 6896
           "domain": "54611CCC-CA4B-42E1-9F32-4944C85B85A6",
6812 6897
           "id": "BF4E109D-9F8C-4E39-8803-A88E5A347AF3"
6813 6898
         },
6899
+        {
6900
+          "defKey": "community_name",
6901
+          "defName": "社区名称",
6902
+          "comment": "",
6903
+          "type": "",
6904
+          "len": "",
6905
+          "scale": "",
6906
+          "primaryKey": false,
6907
+          "notNull": false,
6908
+          "autoIncrement": false,
6909
+          "defaultValue": "",
6910
+          "hideInGraph": false,
6911
+          "refDict": "",
6912
+          "extProps": {},
6913
+          "domain": "54611CCC-CA4B-42E1-9F32-4944C85B85A6",
6914
+          "id": "B5CFBE96-9810-4B5D-9A21-F8664F16A45C"
6915
+        },
6814 6916
         {
6815 6917
           "defKey": "name",
6816
-          "defName": "具体(小区)名称",
6918
+          "defName": "名称",
6817 6919
           "comment": "",
6818 6920
           "type": "",
6819 6921
           "len": "",
@@ -6833,7 +6935,7 @@
6833 6935
           "defName": "定位",
6834 6936
           "comment": "",
6835 6937
           "type": "VARCHAR",
6836
-          "len": 32,
6938
+          "len": 64,
6837 6939
           "scale": "",
6838 6940
           "primaryKey": false,
6839 6941
           "notNull": false,
@@ -6847,7 +6949,7 @@
6847 6949
         },
6848 6950
         {
6849 6951
           "defKey": "addr",
6850
-          "defName": "定位描述",
6952
+          "defName": "定位描述(小区)名称",
6851 6953
           "comment": "",
6852 6954
           "type": "",
6853 6955
           "len": "",
@@ -6964,6 +7066,23 @@
6964 7066
           "uiHint": "",
6965 7067
           "id": "D7BCB5EA-301A-4B0C-8DD2-F74C4CBFF3F3"
6966 7068
         },
7069
+        {
7070
+          "defKey": "user_name",
7071
+          "defName": "作答人名称",
7072
+          "comment": "",
7073
+          "type": "",
7074
+          "len": "",
7075
+          "scale": "",
7076
+          "primaryKey": false,
7077
+          "notNull": false,
7078
+          "autoIncrement": false,
7079
+          "defaultValue": "",
7080
+          "hideInGraph": false,
7081
+          "refDict": "",
7082
+          "extProps": {},
7083
+          "domain": "54611CCC-CA4B-42E1-9F32-4944C85B85A6",
7084
+          "id": "9EEC2EA3-0210-4385-8864-2AF7A5038727"
7085
+        },
6967 7086
         {
6968 7087
           "defKey": "create_date",
6969 7088
           "defName": "作答时间",
@@ -7144,7 +7263,7 @@
7144 7263
           "defName": "定位",
7145 7264
           "comment": "",
7146 7265
           "type": "VARCHAR",
7147
-          "len": 32,
7266
+          "len": 64,
7148 7267
           "scale": "",
7149 7268
           "primaryKey": false,
7150 7269
           "notNull": false,
@@ -8645,6 +8764,40 @@
8645 8764
           "uiHint": "",
8646 8765
           "id": "219A66C3-6D3F-4F1E-A572-9E5294556142"
8647 8766
         },
8767
+        {
8768
+          "defKey": "loc_id",
8769
+          "defName": "点位ID",
8770
+          "comment": "",
8771
+          "type": "",
8772
+          "len": "",
8773
+          "scale": "",
8774
+          "primaryKey": false,
8775
+          "notNull": false,
8776
+          "autoIncrement": false,
8777
+          "defaultValue": "",
8778
+          "hideInGraph": false,
8779
+          "refDict": "",
8780
+          "extProps": {},
8781
+          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
8782
+          "id": "B93801A5-158E-41EC-9CC9-F2E586414C2A"
8783
+        },
8784
+        {
8785
+          "defKey": "loc_name",
8786
+          "defName": "点位名称",
8787
+          "comment": "",
8788
+          "type": "",
8789
+          "len": "",
8790
+          "scale": "",
8791
+          "primaryKey": false,
8792
+          "notNull": false,
8793
+          "autoIncrement": false,
8794
+          "defaultValue": "",
8795
+          "hideInGraph": false,
8796
+          "refDict": "",
8797
+          "extProps": {},
8798
+          "domain": "54611CCC-CA4B-42E1-9F32-4944C85B85A6",
8799
+          "id": "49BF27B0-A3B7-4D25-8B62-871DC3C7D4C0"
8800
+        },
8648 8801
         {
8649 8802
           "defKey": "content",
8650 8803
           "defName": "测评标准",

db/.back_文明创办/文明创办-backup-202326113238.pdma.json → db/.back_文明创办/文明创办-backup-2023323142510.pdma.json Прегледај датотеку

@@ -4,7 +4,7 @@
4 4
   "avatar": "",
5 5
   "version": "4.1.4",
6 6
   "createdTime": "2022-12-12 09:36:12",
7
-  "updatedTime": "2023-2-5 10:46:48",
7
+  "updatedTime": "2023-3-23 14:24:15",
8 8
   "dbConns": [],
9 9
   "profile": {
10 10
     "default": {
@@ -667,6 +667,23 @@
667 667
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
668 668
           "id": "B7406CE6-690F-4A9B-8BA4-4EF1F18B5C87"
669 669
         },
670
+        {
671
+          "defKey": "is_responsible",
672
+          "defName": "是否责任单位",
673
+          "comment": "",
674
+          "type": "",
675
+          "len": "",
676
+          "scale": "",
677
+          "primaryKey": false,
678
+          "notNull": false,
679
+          "autoIncrement": false,
680
+          "defaultValue": "1",
681
+          "hideInGraph": false,
682
+          "refDict": "",
683
+          "extProps": {},
684
+          "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
685
+          "id": "40B1363B-2AD0-4B89-9ADE-A487DCB59573"
686
+        },
670 687
         {
671 688
           "defKey": "sort_no",
672 689
           "defName": "排序",
@@ -1221,6 +1238,23 @@
1221 1238
           "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
1222 1239
           "id": "D1C0A2CD-89DB-44DF-918F-EA536E39761F"
1223 1240
         },
1241
+        {
1242
+          "defKey": "is_from_wx",
1243
+          "defName": "是否微信端添加",
1244
+          "comment": "",
1245
+          "type": "",
1246
+          "len": "",
1247
+          "scale": "",
1248
+          "primaryKey": false,
1249
+          "notNull": false,
1250
+          "autoIncrement": false,
1251
+          "defaultValue": "0",
1252
+          "hideInGraph": false,
1253
+          "refDict": "",
1254
+          "extProps": {},
1255
+          "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
1256
+          "id": "FDA26255-02A6-4AD5-AA2C-B8C410548D44"
1257
+        },
1224 1258
         {
1225 1259
           "defKey": "create_user",
1226 1260
           "defName": "创建人",
@@ -3525,7 +3559,7 @@
3525 3559
           "defName": "定位",
3526 3560
           "comment": "",
3527 3561
           "type": "VARCHAR",
3528
-          "len": 32,
3562
+          "len": 64,
3529 3563
           "scale": "",
3530 3564
           "primaryKey": false,
3531 3565
           "notNull": false,
@@ -4816,6 +4850,40 @@
4816 4850
           "domain": "",
4817 4851
           "id": "F2E17D81-03A9-42C4-8DD7-732C8D40DC59"
4818 4852
         },
4853
+        {
4854
+          "defKey": "loc_score_percent",
4855
+          "defName": "实地测评得分占比",
4856
+          "comment": "",
4857
+          "type": "DECIMAL",
4858
+          "len": 6,
4859
+          "scale": 2,
4860
+          "primaryKey": false,
4861
+          "notNull": false,
4862
+          "autoIncrement": false,
4863
+          "defaultValue": "",
4864
+          "hideInGraph": false,
4865
+          "refDict": "",
4866
+          "extProps": {},
4867
+          "domain": "",
4868
+          "id": "DE02FAE0-A53F-4F6F-BB1B-B1669DD46C82"
4869
+        },
4870
+        {
4871
+          "defKey": "survey_score_percent",
4872
+          "defName": "调查问卷得分占比",
4873
+          "comment": "",
4874
+          "type": "DECIMAL",
4875
+          "len": 6,
4876
+          "scale": 2,
4877
+          "primaryKey": false,
4878
+          "notNull": false,
4879
+          "autoIncrement": false,
4880
+          "defaultValue": "",
4881
+          "hideInGraph": false,
4882
+          "refDict": "",
4883
+          "extProps": {},
4884
+          "domain": "",
4885
+          "id": "85BA110E-FCC5-4FC5-BE12-2C83C3D0EC27"
4886
+        },
4819 4887
         {
4820 4888
           "defKey": "start_date",
4821 4889
           "defName": "开始日期",
@@ -4900,6 +4968,23 @@
4900 4968
           "refDict": "",
4901 4969
           "uiHint": "",
4902 4970
           "id": "1E651F5A-E5FA-4AB5-A67E-C2EF184FFD36"
4971
+        },
4972
+        {
4973
+          "defKey": "copy_from",
4974
+          "defName": "拷贝来源",
4975
+          "comment": "",
4976
+          "type": "",
4977
+          "len": "",
4978
+          "scale": "",
4979
+          "primaryKey": false,
4980
+          "notNull": false,
4981
+          "autoIncrement": false,
4982
+          "defaultValue": "",
4983
+          "hideInGraph": false,
4984
+          "refDict": "",
4985
+          "extProps": {},
4986
+          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
4987
+          "id": "FF90BF79-2A75-4638-98AE-B17BFD53F8CA"
4903 4988
         }
4904 4989
       ],
4905 4990
       "correlations": [],
@@ -5202,7 +5287,7 @@
5202 5287
       "fields": [
5203 5288
         {
5204 5289
           "defKey": "item_id",
5205
-          "defName": "点位ID",
5290
+          "defName": "测评项目ID",
5206 5291
           "comment": "",
5207 5292
           "type": "",
5208 5293
           "len": 32,
@@ -5386,6 +5471,23 @@
5386 5471
           "refDict": "",
5387 5472
           "uiHint": "",
5388 5473
           "id": "4D9B5070-3252-4714-86D7-34928A0C5552"
5474
+        },
5475
+        {
5476
+          "defKey": "copy_from",
5477
+          "defName": "拷贝来源",
5478
+          "comment": "",
5479
+          "type": "",
5480
+          "len": "",
5481
+          "scale": "",
5482
+          "primaryKey": false,
5483
+          "notNull": false,
5484
+          "autoIncrement": false,
5485
+          "defaultValue": "",
5486
+          "hideInGraph": false,
5487
+          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
5488
+          "refDict": "",
5489
+          "extProps": {},
5490
+          "id": "0279B08D-E12C-4409-8253-A5D7766A7133"
5389 5491
         }
5390 5492
       ],
5391 5493
       "correlations": [],
@@ -6503,7 +6605,7 @@
6503 6605
         {
6504 6606
           "defKey": "qu_id",
6505 6607
           "defName": "问题ID",
6506
-          "comment": "来源点位问题",
6608
+          "comment": "来源项目问题",
6507 6609
           "type": "",
6508 6610
           "len": "",
6509 6611
           "scale": "",
@@ -6811,9 +6913,26 @@
6811 6913
           "domain": "54611CCC-CA4B-42E1-9F32-4944C85B85A6",
6812 6914
           "id": "BF4E109D-9F8C-4E39-8803-A88E5A347AF3"
6813 6915
         },
6916
+        {
6917
+          "defKey": "community_name",
6918
+          "defName": "社区名称",
6919
+          "comment": "",
6920
+          "type": "",
6921
+          "len": "",
6922
+          "scale": "",
6923
+          "primaryKey": false,
6924
+          "notNull": false,
6925
+          "autoIncrement": false,
6926
+          "defaultValue": "",
6927
+          "hideInGraph": false,
6928
+          "refDict": "",
6929
+          "extProps": {},
6930
+          "domain": "54611CCC-CA4B-42E1-9F32-4944C85B85A6",
6931
+          "id": "B5CFBE96-9810-4B5D-9A21-F8664F16A45C"
6932
+        },
6814 6933
         {
6815 6934
           "defKey": "name",
6816
-          "defName": "具体(小区)名称",
6935
+          "defName": "名称",
6817 6936
           "comment": "",
6818 6937
           "type": "",
6819 6938
           "len": "",
@@ -6833,7 +6952,7 @@
6833 6952
           "defName": "定位",
6834 6953
           "comment": "",
6835 6954
           "type": "VARCHAR",
6836
-          "len": 32,
6955
+          "len": 64,
6837 6956
           "scale": "",
6838 6957
           "primaryKey": false,
6839 6958
           "notNull": false,
@@ -6847,7 +6966,7 @@
6847 6966
         },
6848 6967
         {
6849 6968
           "defKey": "addr",
6850
-          "defName": "定位描述",
6969
+          "defName": "定位描述(小区)名称",
6851 6970
           "comment": "",
6852 6971
           "type": "",
6853 6972
           "len": "",
@@ -6964,6 +7083,23 @@
6964 7083
           "uiHint": "",
6965 7084
           "id": "D7BCB5EA-301A-4B0C-8DD2-F74C4CBFF3F3"
6966 7085
         },
7086
+        {
7087
+          "defKey": "user_name",
7088
+          "defName": "作答人名称",
7089
+          "comment": "",
7090
+          "type": "",
7091
+          "len": "",
7092
+          "scale": "",
7093
+          "primaryKey": false,
7094
+          "notNull": false,
7095
+          "autoIncrement": false,
7096
+          "defaultValue": "",
7097
+          "hideInGraph": false,
7098
+          "refDict": "",
7099
+          "extProps": {},
7100
+          "domain": "54611CCC-CA4B-42E1-9F32-4944C85B85A6",
7101
+          "id": "9EEC2EA3-0210-4385-8864-2AF7A5038727"
7102
+        },
6967 7103
         {
6968 7104
           "defKey": "create_date",
6969 7105
           "defName": "作答时间",
@@ -7144,7 +7280,7 @@
7144 7280
           "defName": "定位",
7145 7281
           "comment": "",
7146 7282
           "type": "VARCHAR",
7147
-          "len": 32,
7283
+          "len": 64,
7148 7284
           "scale": "",
7149 7285
           "primaryKey": false,
7150 7286
           "notNull": false,
@@ -8645,6 +8781,40 @@
8645 8781
           "uiHint": "",
8646 8782
           "id": "219A66C3-6D3F-4F1E-A572-9E5294556142"
8647 8783
         },
8784
+        {
8785
+          "defKey": "loc_id",
8786
+          "defName": "点位ID",
8787
+          "comment": "",
8788
+          "type": "",
8789
+          "len": "",
8790
+          "scale": "",
8791
+          "primaryKey": false,
8792
+          "notNull": false,
8793
+          "autoIncrement": false,
8794
+          "defaultValue": "",
8795
+          "hideInGraph": false,
8796
+          "refDict": "",
8797
+          "extProps": {},
8798
+          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
8799
+          "id": "B93801A5-158E-41EC-9CC9-F2E586414C2A"
8800
+        },
8801
+        {
8802
+          "defKey": "loc_name",
8803
+          "defName": "点位名称",
8804
+          "comment": "",
8805
+          "type": "",
8806
+          "len": "",
8807
+          "scale": "",
8808
+          "primaryKey": false,
8809
+          "notNull": false,
8810
+          "autoIncrement": false,
8811
+          "defaultValue": "",
8812
+          "hideInGraph": false,
8813
+          "refDict": "",
8814
+          "extProps": {},
8815
+          "domain": "54611CCC-CA4B-42E1-9F32-4944C85B85A6",
8816
+          "id": "49BF27B0-A3B7-4D25-8B62-871DC3C7D4C0"
8817
+        },
8648 8818
         {
8649 8819
           "defKey": "content",
8650 8820
           "defName": "测评标准",

+ 69
- 1
db/文明创办.pdma.json Прегледај датотеку

@@ -4,7 +4,7 @@
4 4
   "avatar": "",
5 5
   "version": "4.1.4",
6 6
   "createdTime": "2022-12-12 09:36:12",
7
-  "updatedTime": "2023-3-13 11:26:57",
7
+  "updatedTime": "2023-3-23 14:25:10",
8 8
   "dbConns": [],
9 9
   "profile": {
10 10
     "default": {
@@ -4969,6 +4969,23 @@
4969 4969
           "refDict": "",
4970 4970
           "uiHint": "",
4971 4971
           "id": "1E651F5A-E5FA-4AB5-A67E-C2EF184FFD36"
4972
+        },
4973
+        {
4974
+          "defKey": "copy_from",
4975
+          "defName": "拷贝来源",
4976
+          "comment": "",
4977
+          "type": "",
4978
+          "len": "",
4979
+          "scale": "",
4980
+          "primaryKey": false,
4981
+          "notNull": false,
4982
+          "autoIncrement": false,
4983
+          "defaultValue": "",
4984
+          "hideInGraph": false,
4985
+          "refDict": "",
4986
+          "extProps": {},
4987
+          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
4988
+          "id": "FF90BF79-2A75-4638-98AE-B17BFD53F8CA"
4972 4989
         }
4973 4990
       ],
4974 4991
       "correlations": [],
@@ -5455,6 +5472,23 @@
5455 5472
           "refDict": "",
5456 5473
           "uiHint": "",
5457 5474
           "id": "4D9B5070-3252-4714-86D7-34928A0C5552"
5475
+        },
5476
+        {
5477
+          "defKey": "copy_from",
5478
+          "defName": "拷贝来源",
5479
+          "comment": "",
5480
+          "type": "",
5481
+          "len": "",
5482
+          "scale": "",
5483
+          "primaryKey": false,
5484
+          "notNull": false,
5485
+          "autoIncrement": false,
5486
+          "defaultValue": "",
5487
+          "hideInGraph": false,
5488
+          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
5489
+          "refDict": "",
5490
+          "extProps": {},
5491
+          "id": "0279B08D-E12C-4409-8253-A5D7766A7133"
5458 5492
         }
5459 5493
       ],
5460 5494
       "correlations": [],
@@ -6444,6 +6478,23 @@
6444 6478
           "extProps": {},
6445 6479
           "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
6446 6480
           "id": "A8365D64-DE0A-4F0E-9427-83DFF0ED66C6"
6481
+        },
6482
+        {
6483
+          "defKey": "copy_from",
6484
+          "defName": "拷贝来源",
6485
+          "comment": "",
6486
+          "type": "",
6487
+          "len": "",
6488
+          "scale": "",
6489
+          "primaryKey": false,
6490
+          "notNull": false,
6491
+          "autoIncrement": false,
6492
+          "defaultValue": "",
6493
+          "hideInGraph": false,
6494
+          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
6495
+          "refDict": "",
6496
+          "extProps": {},
6497
+          "id": "E2BA367C-D262-43FB-A729-D26D6453D20C"
6447 6498
         }
6448 6499
       ],
6449 6500
       "correlations": [],
@@ -7669,6 +7720,23 @@
7669 7720
           "refDict": "",
7670 7721
           "extProps": {},
7671 7722
           "id": "90218D19-7731-4AFE-8883-74944A66D6C8"
7723
+        },
7724
+        {
7725
+          "defKey": "copy_from",
7726
+          "defName": "拷贝来源",
7727
+          "comment": "",
7728
+          "type": "",
7729
+          "len": "",
7730
+          "scale": "",
7731
+          "primaryKey": false,
7732
+          "notNull": false,
7733
+          "autoIncrement": false,
7734
+          "defaultValue": "",
7735
+          "hideInGraph": false,
7736
+          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
7737
+          "refDict": "",
7738
+          "extProps": {},
7739
+          "id": "C0B26905-831F-4891-9B83-F84E4D111C44"
7672 7740
         }
7673 7741
       ],
7674 7742
       "correlations": [],

+ 1
- 1
pom.xml Прегледај датотеку

@@ -10,7 +10,7 @@
10 10
     </parent>
11 11
     <groupId>com.example</groupId>
12 12
     <artifactId>civilizedCity</artifactId>
13
-    <version>0.0.4</version>
13
+    <version>0.0.7</version>
14 14
     <name>civilizedCity</name>
15 15
     <description>civilizedCity</description>
16 16
     <properties>

+ 31
- 0
src/main/java/com/example/civilizedcity/controller/TaCheckController.java Прегледај датотеку

@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4 4
 import com.baomidou.mybatisplus.core.metadata.IPage;
5 5
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6 6
 import com.example.civilizedcity.common.*;
7
+import com.example.civilizedcity.entity.SysUser;
7 8
 import com.example.civilizedcity.service.TaCheckItemService;
8 9
 import io.swagger.annotations.Api;
9 10
 import io.swagger.annotations.ApiOperation;
@@ -110,6 +111,36 @@ public class TaCheckController extends BaseController {
110 111
     }
111 112
 
112 113
 
114
+    /**
115
+     * 复制
116
+     *
117
+     * @param id 实例ID
118
+     * @return 实例对象
119
+     */
120
+    @ApiOperation("复制")
121
+    @PutMapping("/taCheck/{id}/copy")
122
+    public ResponseBean copy(@ApiParam("测评ID") @PathVariable String id,
123
+                             @ApiParam("对象实体") @RequestBody TaCheck taCheck) throws Exception {
124
+        TaCheck origin = taCheckService.getById(id);
125
+        if (null == taCheck || origin.getStatus() == Constants.STATUS_DELETE) {
126
+            return ResponseBean.error("未找到模拟测评信息");
127
+        }
128
+
129
+        String title = StringUtils.ifNull(taCheck.getTitle(), origin.getTitle() + "-复制");
130
+        TaCheck exists = taCheckService.getExistBy("title", title, false, true);
131
+
132
+        if (null != exists) {
133
+            return ResponseBean.error("测评名称重复");
134
+        }
135
+
136
+        SysUser sysUser = currentUser();
137
+        origin.setCreateUser(sysUser.getUserId());
138
+        origin.setTitle(title);
139
+        TaCheck newCheck = taCheckService.copy(origin);
140
+        return ResponseBean.success(newCheck);
141
+    }
142
+
143
+
113 144
     /**
114 145
      * 计算分数
115 146
      *

+ 9
- 0
src/main/java/com/example/civilizedcity/controller/TaIssueApplyController.java Прегледај датотеку

@@ -130,11 +130,20 @@ public class TaIssueApplyController extends BaseController {
130 130
                              @ApiParam("问题单ID") @RequestParam(value = "issueId", required = false) Integer issueId,
131 131
                              @ApiParam("申请类型") @RequestParam(value = "applyType", required = false) String applyType,
132 132
                              @ApiParam("问题单来源") @RequestParam(value = "sourceType", required = false) String sourceType,
133
+                             @ApiParam("用户身份") @RequestParam(value = "duty", required = false) String duty,
133 134
                              @ApiParam(value = "是否全部") @RequestParam(value = "isAll", defaultValue = "false") Boolean isAll) throws Exception {
134 135
 
135 136
         SysUser sysUser = currentUser();
136 137
         String orgId = isManager(sysUser) ? null : sysUser.getOrgId();
137 138
 
139
+        if (StringUtils.isNotEmpty((duty))) {
140
+            if (Constants.DUTY_ORG_MANAGER.equals(duty) || Constants.DUTY_ORG_USER.equals(duty)) {
141
+                if (StringUtils.isEmpty(orgId)) {
142
+                    orgId = sysUser.getOrgId();
143
+                }
144
+            }
145
+        }
146
+
138 147
         IPage<TaIssueApply> pg = new Page<>(pageNum, pageSize);
139 148
         IPage<TaIssueApply> result = taIssueApplyService.getPageBy(pg, issueId, applyType, orgId, sourceType, isAll);
140 149
 

+ 1
- 1
src/main/java/com/example/civilizedcity/controller/TaMessageController.java Прегледај датотеку

@@ -77,7 +77,7 @@ public class TaMessageController extends BaseController {
77 77
 
78 78
         queryWrapper.eq("status", Constants.STATUS_NORMAL);
79 79
         queryWrapper.orderByDesc("create_date");
80
-        IPage<TaMessage> result = taMessageService.page(pg);
80
+        IPage<TaMessage> result = taMessageService.page(pg, queryWrapper);
81 81
 
82 82
         return ResponseBean.success(result);
83 83
     }

+ 3
- 0
src/main/java/com/example/civilizedcity/entity/TaCheck.java Прегледај датотеку

@@ -61,4 +61,7 @@ public class TaCheck implements Serializable,Cloneable{
61 61
       @ApiModelProperty(name = "创建时间",notes = "")
62 62
       private LocalDateTime createDate ;
63 63
 
64
+     /** 拷贝来源 */
65
+     @ApiModelProperty(name = "拷贝来源",notes = "")
66
+     private String copyFrom ;
64 67
 }

+ 4
- 0
src/main/java/com/example/civilizedcity/entity/TaCheckItem.java Прегледај датотеку

@@ -83,6 +83,10 @@ public class TaCheckItem implements Serializable, Cloneable {
83 83
     @ApiModelProperty(name = "创建时间", notes = "")
84 84
     private LocalDateTime createDate;
85 85
 
86
+    /** 拷贝来源 */
87
+    @ApiModelProperty(name = "拷贝来源",notes = "")
88
+    private String copyFrom ;
89
+
86 90
     @TableField(exist = false)
87 91
     @ApiModelProperty(name = "是否只读, 只读代表不需要答题")
88 92
     private Integer answerNum;

+ 4
- 0
src/main/java/com/example/civilizedcity/entity/TaCheckItemAn.java Прегледај датотеку

@@ -44,4 +44,8 @@ public class TaCheckItemAn implements Serializable,Cloneable{
44 44
 
45 45
      @ApiModelProperty(name = "上报问题",notes = "")
46 46
     private Boolean reportIssue;
47
+
48
+     /** 拷贝来源 */
49
+     @ApiModelProperty(name = "拷贝来源",notes = "")
50
+     private String copyFrom ;
47 51
 }

+ 3
- 0
src/main/java/com/example/civilizedcity/entity/TaCheckItemQu.java Прегледај датотеку

@@ -57,6 +57,9 @@ public class TaCheckItemQu implements Serializable,Cloneable{
57 57
       @ApiModelProperty(name = "填空题单位",notes = "")
58 58
      private String fillUnit;
59 59
 
60
+      /** 拷贝来源 */
61
+      @ApiModelProperty(name = "拷贝来源",notes = "")
62
+      private String copyFrom ;
60 63
       /**
61 64
        * 答案列表
62 65
        */

+ 2
- 0
src/main/java/com/example/civilizedcity/mapper/TaCheckAnswerItemMapper.java Прегледај датотеку

@@ -25,4 +25,6 @@ public interface TaCheckAnswerItemMapper extends BaseMapper<TaCheckAnswerItem> {
25 25
                                         @Param("userId") String userId);
26 26
 
27 27
     List<TaCheckAnswerItem> getListByAnswer(@Param("answerId") String answerId);
28
+
29
+    long copyItems(@Param("checkId") String checkId);
28 30
 }

+ 3
- 1
src/main/java/com/example/civilizedcity/mapper/TaCheckItemMapper.java Прегледај датотеку

@@ -24,4 +24,6 @@ public interface TaCheckItemMapper  extends BaseMapper<TaCheckItem>{
24 24
      int createNewLocItems(@Param("checkId") String checkId);
25 25
 
26 26
      List<TaCheckItem> getListBy(@Param("checkId") String checkId, @Param("itemType") String itemType);
27
- }
27
+
28
+    long copyItems(@Param("oldCheckId") String oldCheckId, @Param("newCheckId") String newCheckId);
29
+}

+ 3
- 1
src/main/java/com/example/civilizedcity/mapper/TaCheckItemQuMapper.java Прегледај датотеку

@@ -18,4 +18,6 @@ public interface TaCheckItemQuMapper  extends BaseMapper<TaCheckItemQu>{
18 18
      Integer countByItem(@Param("itemId") String itemId);
19 19
 
20 20
      List<TaCheckItemQu> getListBy(@Param("itemId") String itemId);
21
- }
21
+
22
+    long copyItems(@Param("checkId") String checkId);
23
+}

+ 2
- 0
src/main/java/com/example/civilizedcity/service/TaCheckService.java Прегледај датотеку

@@ -10,4 +10,6 @@ import com.example.civilizedcity.entity.TaCheck;
10 10
 public interface TaCheckService extends IBaseService<TaCheck> {
11 11
 
12 12
      TaCheck calcScore(TaCheck taCheck);
13
+
14
+     TaCheck copy(TaCheck taCheck);
13 15
  }

+ 57
- 23
src/main/java/com/example/civilizedcity/service/impl/SysUserServiceImpl.java Прегледај датотеку

@@ -5,15 +5,12 @@ import com.example.civilizedcity.common.Constants;
5 5
 import com.example.civilizedcity.common.EncryptUtils;
6 6
 import com.example.civilizedcity.common.StringUtils;
7 7
 import com.example.civilizedcity.entity.*;
8
-import com.example.civilizedcity.mapper.SysLoginMapper;
9
-import com.example.civilizedcity.mapper.SysUserDutyMapper;
10
-import com.example.civilizedcity.mapper.SysUserRoleMapper;
8
+import com.example.civilizedcity.mapper.*;
11 9
 import com.example.civilizedcity.vo.ChangePassword;
12 10
 import com.example.civilizedcity.vo.LoginParam;
13 11
 import org.springframework.beans.factory.annotation.Autowired;
14 12
 import org.springframework.beans.factory.annotation.Value;
15 13
 import org.springframework.stereotype.Service;
16
-import com.example.civilizedcity.mapper.SysUserMapper;
17 14
 import com.example.civilizedcity.service.SysUserService;
18 15
 
19 16
 import java.time.LocalDateTime;
@@ -39,6 +36,9 @@ public class SysUserServiceImpl extends BaseServiceImpl<SysUserMapper, SysUser>
39 36
     @Autowired
40 37
     SysUserDutyMapper sysUserDutyMapper;
41 38
 
39
+    @Autowired
40
+    TaPersonMapper taPersonMapper;
41
+
42 42
     String defaultPwd = "123456";
43 43
 
44 44
     @Override
@@ -85,6 +85,25 @@ public class SysUserServiceImpl extends BaseServiceImpl<SysUserMapper, SysUser>
85 85
         return sysLoginMapper.updateById(sysLogin) > 0;
86 86
     }
87 87
 
88
+    private boolean getBool(Boolean b) {
89
+        return null != b && b;
90
+    }
91
+
92
+    /**
93
+     * 校验是否市民
94
+     * 用户的 orgId == 市民的 personId
95
+     * @param sysUser
96
+     * @return
97
+     */
98
+    private boolean isCitizen(SysUser sysUser) {
99
+        if (null == sysUser || StringUtils.isEmpty(sysUser.getOrgId())) {
100
+            return false;
101
+        }
102
+
103
+        TaPerson taPerson = taPersonMapper.selectById(sysUser.getOrgId());
104
+        return null != taPerson && taPerson.getStatus() > Constants.STATUS_DELETE;
105
+    }
106
+
88 107
     @Override
89 108
     public boolean mergeData(SysUser sysUser) throws Exception {
90 109
         if (StringUtils.isEmpty(sysUser.getName())) {
@@ -93,35 +112,50 @@ public class SysUserServiceImpl extends BaseServiceImpl<SysUserMapper, SysUser>
93 112
 
94 113
         LocalDateTime now = LocalDateTime.now();
95 114
 
96
-        // 用户表
97
-        String userId = sysUser.getUserId();
98
-        if (StringUtils.isEmpty(userId)) {
99
-            if (!StringUtils.isEmpty(sysUser.getPhone())) {
100
-                SysUser origin = getExistBy("phone", sysUser.getPhone(), false, true);
101
-                if (null != origin) {
102
-                    throw new Exception("手机号重复");
115
+        boolean newOne = StringUtils.isEmpty(sysUser.getUserId());
116
+
117
+        if (!StringUtils.isEmpty(sysUser.getPhone())) {
118
+            SysUser origin = getExistBy("phone", sysUser.getPhone(), false, true);
119
+            if (null != origin) {
120
+                if (!newOne && !origin.getUserId().equals(sysUser.getUserId())) {
121
+                    throw new Exception("手机号重复");
103 122
                 }
104
-            }
105 123
 
106
-            if (null == sysUser.getStatus()) {
107
-                sysUser.setStatus(Constants.STATUS_NORMAL);
124
+                newOne = false;
125
+                sysUser.setUserId(origin.getUserId());
126
+
127
+                // 如果是市民
128
+                if (isCitizen(origin)) {
129
+                    sysUser.setIsUser(true);
130
+                }
108 131
             }
132
+        }
133
+
134
+        if (null == sysUser.getStatus()) {
135
+            sysUser.setStatus(Constants.STATUS_NORMAL);
136
+        }
109 137
 
138
+        // 用户表
139
+        if (newOne) {
110 140
             sysUser.setCreateDate(now);
111 141
             save(sysUser);
112
-            userId = sysUser.getUserId();
113 142
         } else {
114
-            if (!StringUtils.isEmpty(sysUser.getPhone())) {
115
-                SysUser origin = getByButNot("phone", sysUser.getPhone(), "user_id", userId, true);
116
-                if (null != origin) {
117
-                    throw new Exception("手机号重复");
118
-                }
119
-            }
120
-
121
-            //
122 143
             updateById(sysUser);
123 144
         }
124 145
 
146
+        // 登录账户
147
+        SysLogin sysLogin = sysLoginMapper.getByAccount(sysUser.getPhone());
148
+        if (null == sysLogin) {
149
+            sysLogin = new SysLogin();
150
+
151
+            sysLogin.setAccount(sysUser.getPhone());
152
+            sysLogin.setPassword(EncryptUtils.md5(EncryptUtils.md5(defaultPwd), sysUser.getUserId()));
153
+            sysLogin.setUserId(sysUser.getUserId());
154
+            sysLogin.setStatus(Constants.STATUS_NORMAL);
155
+            sysLogin.setCreateDate(now);
156
+            sysLoginMapper.insert(sysLogin);
157
+        }
158
+
125 159
         // 授权角色
126 160
         List<SysRole> rolesList = sysUser.getRolesList();
127 161
         if (null == rolesList || rolesList.size() == 0) {

+ 28
- 0
src/main/java/com/example/civilizedcity/service/impl/TaCheckServiceImpl.java Прегледај датотеку

@@ -9,6 +9,7 @@ import org.springframework.stereotype.Service;
9 9
 import com.example.civilizedcity.service.TaCheckService;
10 10
 import org.springframework.transaction.annotation.Transactional;
11 11
 
12
+import java.time.LocalDateTime;
12 13
 import java.util.List;
13 14
 
14 15
 /**
@@ -50,6 +51,33 @@ public class TaCheckServiceImpl extends BaseServiceImpl<TaCheckMapper, TaCheck>
50 51
         return taCheck;
51 52
     }
52 53
 
54
+    @Transactional(rollbackFor = Exception.class)
55
+    @Override
56
+    public TaCheck copy(TaCheck taCheck) {
57
+        TaCheck newCheck = new TaCheck();
58
+        newCheck.setCopyFrom(taCheck.getCheckId());
59
+        newCheck.setTitle(taCheck.getTitle());
60
+        newCheck.setStartDate(taCheck.getStartDate());
61
+        newCheck.setEndDate(taCheck.getEndDate());
62
+        newCheck.setLocScorePercent(taCheck.getLocScorePercent());
63
+        newCheck.setSurveyScorePercent(taCheck.getSurveyScorePercent());
64
+        newCheck.setStatus(Constants.STATUS_NORMAL);
65
+        newCheck.setCreateUser(taCheck.getCreateUser());
66
+        newCheck.setCreateDate(LocalDateTime.now());
67
+
68
+        save(newCheck);
69
+
70
+        // 拷贝测评项目
71
+        taCheckItemMapper.copyItems(taCheck.getCheckId(), newCheck.getCheckId());
72
+
73
+        // 拷贝测评问题
74
+        taCheckItemQuMapper.copyItems(taCheck.getCheckId());
75
+
76
+        taCheckAnswerItemMapper.copyItems(taCheck.getCheckId());
77
+
78
+        return newCheck;
79
+    }
80
+
53 81
     /**
54 82
      * 计算点位分数
55 83
      * 计算的前提是, 每份试卷(ta_check_answer)的分数已经计算好了

+ 4
- 3
src/main/java/com/example/civilizedcity/service/impl/TaIssueApplyServiceImpl.java Прегледај датотеку

@@ -144,7 +144,7 @@ public class TaIssueApplyServiceImpl extends BaseServiceImpl<TaIssueApplyMapper,
144 144
         taOrgIssueMapper.updateById(taOrgIssue);
145 145
 
146 146
         // 再次生成流程记录,
147
-        createProcessByIssue(taIssue, sysUser);
147
+        createProcessByIssue(taIssue, sysUser, origin);
148 148
 
149 149
 //        // 如果是用户随手拍
150 150
 //        if (Constants.SOURCE_FEEDBACK.equals(taIssue.getSourceType())) {
@@ -156,13 +156,14 @@ public class TaIssueApplyServiceImpl extends BaseServiceImpl<TaIssueApplyMapper,
156 156
         applicationEventPublisher.publishEvent(new MessagEvent(this, origin));
157 157
     }
158 158
 
159
-    private void createProcessByIssue(TaIssue taIssue, SysUser sysUser) {
159
+    private void createProcessByIssue(TaIssue taIssue, SysUser sysUser, TaIssueApply taIssueApply) {
160 160
         TaIssueProcess taIssueProcess = new TaIssueProcess();
161 161
         taIssueProcess.setIssueId(taIssue.getIssueId());
162 162
         taIssueProcess.setOrgId(taIssue.getOrgId());
163 163
         taIssueProcess.setProcessNode(taIssue.getProcessNode());
164 164
         taIssueProcess.setProcessStatus(taIssue.getProcessStatus());
165
-        taIssueProcess.setProcessResult(null);
165
+        taIssueProcess.setProcessResult(taIssueApply.getVerifyDesc());
166
+//        taIssueProcess.setProcessResult(null);
166 167
         taIssueProcess.setCreateUser(sysUser.getUserId());
167 168
         taIssueProcess.setCreateDate(LocalDateTime.now());
168 169
         taIssueProcess.setStatus(Constants.STATUS_NORMAL);

+ 5
- 1
src/main/java/com/example/civilizedcity/service/impl/TaMessageServiceImpl.java Прегледај датотеку

@@ -1,6 +1,7 @@
1 1
 package com.example.civilizedcity.service.impl;
2 2
 
3 3
 import com.example.civilizedcity.common.Constants;
4
+import com.example.civilizedcity.common.StringUtils;
4 5
 import com.example.civilizedcity.entity.TaIssue;
5 6
 import com.example.civilizedcity.entity.TaIssueApply;
6 7
 import org.apache.ibatis.annotations.Param;
@@ -108,8 +109,11 @@ public class TaMessageServiceImpl extends BaseServiceImpl<TaMessageMapper, TaMes
108 109
                     break;
109 110
             }
110 111
         } else {
112
+            String content = "ID: "+ taIssueApply.getIssueId()  +" , 审核结果: " + (Constants.APPLY_PASS.equals(taIssueApply.getVerifyStatus()) ? "通过" : "不通过");
113
+            content += String.format("。 意见: %s", StringUtils.ifNull(taIssueApply.getVerifyDesc(), "无"));
114
+
111 115
             taMessage.setMsgType("verify-" + taIssueApply.getApplyType());
112
-            taMessage.setContent("审核结果: " + (Constants.APPLY_PASS.equals(taIssueApply.getVerifyStatus()) ? "通过" : "不通过"));
116
+            taMessage.setContent(content);
113 117
             taMessage.setReceiveUser(null);
114 118
             taMessage.setOrgId(taIssueApply.getOrgId());
115 119
 

+ 27
- 0
src/main/resources/mapper/TaCheckAnswerItemMapper.xml Прегледај датотеку

@@ -2,6 +2,33 @@
2 2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3 3
 
4 4
 <mapper namespace="com.example.civilizedcity.mapper.TaCheckAnswerItemMapper">
5
+    <insert id="copyItems">
6
+        INSERT INTO ta_check_item_an (
7
+            `answer_id`,
8
+            `copy_from`,
9
+            `qu_id`,
10
+            `answer_code`,
11
+            `answer`,
12
+            `score`,
13
+            `report_issue`,
14
+            `sort_no`
15
+        ) SELECT
16
+              UUID_SHORT( ),
17
+              t.`answer_id`,
18
+              s.`qu_id`,
19
+              t.`answer_code`,
20
+              t.`answer`,
21
+              t.`score`,
22
+              t.`report_issue`,
23
+              t.`sort_no`
24
+        FROM
25
+            ta_check_item_an t
26
+                INNER JOIN ta_check_item_qu s ON t.qu_id = s.copy_from
27
+                INNER JOIN ta_check_item m ON s.item_id = m.item_id
28
+                INNER JOIN ta_check n ON m.check_id = n.check_id
29
+        WHERE
30
+            n.copy_from = #{checkId}
31
+    </insert>
5 32
 
6 33
     <select id="getListBy" resultType="com.example.civilizedcity.entity.TaCheckAnswerItem">
7 34
         SELECT

+ 28
- 0
src/main/resources/mapper/TaCheckItemMapper.xml Прегледај датотеку

@@ -17,6 +17,34 @@
17 17
         ORDER BY
18 18
             t.sort_no ASC
19 19
     </insert>
20
+    <insert id="copyItems">
21
+        insert into ta_check_item (
22
+            `item_id`,
23
+            `copy_from`,
24
+            `check_id`,
25
+            `item_type`,
26
+            `type_id`,
27
+            `name`,
28
+            `full_score`,
29
+            `num`,
30
+            `status`,
31
+            `create_date`
32
+        )
33
+        select
34
+            UUID_SHORT(),
35
+            t.`item_id`,
36
+            #{newCheckId},
37
+            t.`item_type`,
38
+            t.`type_id`,
39
+            t.`name`,
40
+            t.`full_score`,
41
+            t.`num`,
42
+            1,
43
+            now()
44
+        from ta_check_item t
45
+        WHERE t.check_id = #{oldCheckId}
46
+          and t.`status` = 1
47
+    </insert>
20 48
 
21 49
     <select id="getPageBy" resultType="com.example.civilizedcity.entity.TaCheckItem">
22 50
         SELECT

+ 32
- 0
src/main/resources/mapper/TaCheckItemQuMapper.xml Прегледај датотеку

@@ -2,6 +2,38 @@
2 2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3 3
 
4 4
 <mapper namespace="com.example.civilizedcity.mapper.TaCheckItemQuMapper">
5
+    <insert id="copyItems">
6
+        INSERT INTO ta_check_item_qu (
7
+            `qu_id`,
8
+            `copy_from`,
9
+            `item_id`,
10
+            `qu_type`,
11
+            `title`,
12
+            `compute_type`,
13
+            `max_score`,
14
+            `an_score`,
15
+            `fill_unit`,
16
+            `stand`,
17
+            `sort_no`
18
+        ) SELECT
19
+              UUID_SHORT( ),
20
+              t.`qu_id`,
21
+              s.`item_id`,
22
+              t.`qu_type`,
23
+              t.`title`,
24
+              t.`compute_type`,
25
+              t.`max_score`,
26
+              t.`an_score`,
27
+              t.`fill_unit`,
28
+              t.`stand`,
29
+              t.`sort_no`
30
+        FROM
31
+            ta_check_item_qu t
32
+                INNER JOIN ta_check_item s ON t.item_id = s.copy_from
33
+                INNER JOIN ta_check m ON s.check_id = m.check_id
34
+        WHERE
35
+            m.copy_from = #{checkId}
36
+    </insert>
5 37
 
6 38
     <select id="countByItem" resultType="java.lang.Integer">
7 39
         SELECT