Your Name 2 년 전
부모
커밋
564a6a99b1

db/.back_文明创办/文明创办-backup-20221228183638.pdma.json → db/.back_文明创办/文明创办-backup-20221230093454.pdma.json 파일 보기

@@ -4,7 +4,7 @@
4 4
   "avatar": "",
5 5
   "version": "4.2.0",
6 6
   "createdTime": "2022-12-12 09:36:12",
7
-  "updatedTime": "2022-12-28 16:00:46",
7
+  "updatedTime": "2022-12-29 16:25:56",
8 8
   "dbConns": [],
9 9
   "profile": {
10 10
     "default": {
@@ -4366,7 +4366,7 @@
4366 4366
           "hideInGraph": false,
4367 4367
           "refDict": "",
4368 4368
           "extProps": {},
4369
-          "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
4369
+          "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
4370 4370
           "id": "C7F06F89-4FA3-48D2-A861-B008B8C81251"
4371 4371
         },
4372 4372
         {
@@ -4467,7 +4467,7 @@
4467 4467
           "defaultValue": "",
4468 4468
           "hideInGraph": false,
4469 4469
           "refDict": "",
4470
-          "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
4470
+          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
4471 4471
           "id": "DACC10C6-21E8-4483-9C65-DFC7EB3B960A",
4472 4472
           "uiHint": ""
4473 4473
         },
@@ -7858,6 +7858,23 @@
7858 7858
           "domain": "73FD2BAD-2358-4336-B96D-45DC897BD792",
7859 7859
           "id": "6FD54E7F-E054-403B-83AB-9309AE4B2B72"
7860 7860
         },
7861
+        {
7862
+          "defKey": "result",
7863
+          "defName": "处理结果",
7864
+          "comment": "",
7865
+          "type": "TEXT",
7866
+          "len": 0,
7867
+          "scale": "",
7868
+          "primaryKey": false,
7869
+          "notNull": false,
7870
+          "autoIncrement": false,
7871
+          "defaultValue": "",
7872
+          "hideInGraph": false,
7873
+          "refDict": "",
7874
+          "extProps": {},
7875
+          "domain": "",
7876
+          "id": "A9868395-4BC7-464D-8BA5-07EFEB6CDF6E"
7877
+        },
7861 7878
         {
7862 7879
           "defKey": "status",
7863 7880
           "defName": "状态",

db/.back_文明创办/文明创办-backup-20221228183752.pdma.json → db/.back_文明创办/文明创办-backup-20221230141755.pdma.json 파일 보기

@@ -4,7 +4,7 @@
4 4
   "avatar": "",
5 5
   "version": "4.2.0",
6 6
   "createdTime": "2022-12-12 09:36:12",
7
-  "updatedTime": "2022-12-28 18:36:38",
7
+  "updatedTime": "2022-12-30 09:34:54",
8 8
   "dbConns": [],
9 9
   "profile": {
10 10
     "default": {
@@ -4366,7 +4366,7 @@
4366 4366
           "hideInGraph": false,
4367 4367
           "refDict": "",
4368 4368
           "extProps": {},
4369
-          "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
4369
+          "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
4370 4370
           "id": "C7F06F89-4FA3-48D2-A861-B008B8C81251"
4371 4371
         },
4372 4372
         {
@@ -7503,7 +7503,7 @@
7503 7503
           "hideInGraph": false,
7504 7504
           "refDict": "",
7505 7505
           "extProps": {},
7506
-          "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
7506
+          "domain": "73FD2BAD-2358-4336-B96D-45DC897BD792",
7507 7507
           "id": "18A5C4E3-563C-46B6-A12D-FDB002AA0480"
7508 7508
         },
7509 7509
         {
@@ -7554,7 +7554,7 @@
7554 7554
           "hideInGraph": false,
7555 7555
           "refDict": "",
7556 7556
           "extProps": {},
7557
-          "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
7557
+          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
7558 7558
           "id": "464C7108-433F-42E8-BBE6-BA48AC65FAE6"
7559 7559
         },
7560 7560
         {
@@ -7571,7 +7571,7 @@
7571 7571
           "hideInGraph": false,
7572 7572
           "refDict": "",
7573 7573
           "extProps": {},
7574
-          "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
7574
+          "domain": "54611CCC-CA4B-42E1-9F32-4944C85B85A6",
7575 7575
           "id": "0F8DF251-A5D0-48CC-AAD8-D06516BF72DC"
7576 7576
         },
7577 7577
         {
@@ -7858,6 +7858,23 @@
7858 7858
           "domain": "73FD2BAD-2358-4336-B96D-45DC897BD792",
7859 7859
           "id": "6FD54E7F-E054-403B-83AB-9309AE4B2B72"
7860 7860
         },
7861
+        {
7862
+          "defKey": "result",
7863
+          "defName": "处理结果",
7864
+          "comment": "",
7865
+          "type": "TEXT",
7866
+          "len": 0,
7867
+          "scale": "",
7868
+          "primaryKey": false,
7869
+          "notNull": false,
7870
+          "autoIncrement": false,
7871
+          "defaultValue": "",
7872
+          "hideInGraph": false,
7873
+          "refDict": "",
7874
+          "extProps": {},
7875
+          "domain": "",
7876
+          "id": "A9868395-4BC7-464D-8BA5-07EFEB6CDF6E"
7877
+        },
7861 7878
         {
7862 7879
           "defKey": "status",
7863 7880
           "defName": "状态",

+ 38
- 4
db/文明创办.pdma.json 파일 보기

@@ -4,7 +4,7 @@
4 4
   "avatar": "",
5 5
   "version": "4.2.0",
6 6
   "createdTime": "2022-12-12 09:36:12",
7
-  "updatedTime": "2022-12-29 16:25:56",
7
+  "updatedTime": "2022-12-30 14:17:55",
8 8
   "dbConns": [],
9 9
   "profile": {
10 10
     "default": {
@@ -3674,6 +3674,40 @@
3674 3674
           "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
3675 3675
           "id": "94EE1F8F-61A7-4104-B747-4E1C0036CBB8"
3676 3676
         },
3677
+        {
3678
+          "defKey": "apply_type",
3679
+          "defName": "当前申请",
3680
+          "comment": "",
3681
+          "type": "",
3682
+          "len": "",
3683
+          "scale": "",
3684
+          "primaryKey": false,
3685
+          "notNull": false,
3686
+          "autoIncrement": false,
3687
+          "defaultValue": "",
3688
+          "hideInGraph": false,
3689
+          "refDict": "",
3690
+          "extProps": {},
3691
+          "domain": "73FD2BAD-2358-4336-B96D-45DC897BD792",
3692
+          "id": "EA6F4EA5-1BD9-4919-B756-BA0A4949E625"
3693
+        },
3694
+        {
3695
+          "defKey": "apply_id",
3696
+          "defName": "当前申请ID",
3697
+          "comment": "",
3698
+          "type": "",
3699
+          "len": "",
3700
+          "scale": "",
3701
+          "primaryKey": false,
3702
+          "notNull": false,
3703
+          "autoIncrement": false,
3704
+          "defaultValue": "",
3705
+          "hideInGraph": false,
3706
+          "refDict": "",
3707
+          "extProps": {},
3708
+          "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
3709
+          "id": "D30F4AC2-D4FE-452A-9A75-4821F0F0BA1E"
3710
+        },
3677 3711
         {
3678 3712
           "defKey": "status",
3679 3713
           "defName": "状态",
@@ -7503,7 +7537,7 @@
7503 7537
           "hideInGraph": false,
7504 7538
           "refDict": "",
7505 7539
           "extProps": {},
7506
-          "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
7540
+          "domain": "73FD2BAD-2358-4336-B96D-45DC897BD792",
7507 7541
           "id": "18A5C4E3-563C-46B6-A12D-FDB002AA0480"
7508 7542
         },
7509 7543
         {
@@ -7554,7 +7588,7 @@
7554 7588
           "hideInGraph": false,
7555 7589
           "refDict": "",
7556 7590
           "extProps": {},
7557
-          "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
7591
+          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
7558 7592
           "id": "464C7108-433F-42E8-BBE6-BA48AC65FAE6"
7559 7593
         },
7560 7594
         {
@@ -7571,7 +7605,7 @@
7571 7605
           "hideInGraph": false,
7572 7606
           "refDict": "",
7573 7607
           "extProps": {},
7574
-          "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
7608
+          "domain": "54611CCC-CA4B-42E1-9F32-4944C85B85A6",
7575 7609
           "id": "0F8DF251-A5D0-48CC-AAD8-D06516BF72DC"
7576 7610
         },
7577 7611
         {

+ 4
- 6
src/main/java/com/example/civilizedcity/controller/TaIssueApplyController.java 파일 보기

@@ -82,16 +82,14 @@ public class TaIssueApplyController extends BaseController {
82 82
     @GetMapping("/taIssueApply")
83 83
     public ResponseBean list(@ApiParam("页码") @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
84 84
                              @ApiParam("单页数据量") @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
85
-                             @ApiParam("申请类型") @RequestParam(value = "applyType", required = false) String applyType) throws Exception {
85
+                             @ApiParam("申请类型") @RequestParam(value = "applyType", required = false) String applyType,
86
+                             @ApiParam("问题单来源") @RequestParam(value = "sourceType", required = false) String sourceType) throws Exception {
86 87
 
87 88
         SysUser sysUser = currentUser();
89
+        String orgId = Constants.ROOT_ORG.equals(sysUser.getOrgId()) ? null : sysUser.getOrgId();
88 90
 
89 91
         IPage<TaIssueApply> pg = new Page<>(pageNum, pageSize);
90
-        QueryWrapper<TaIssueApply> queryWrapper = new QueryWrapper<>();
91
-        queryWrapper.eq(StringUtils.isEmpty(applyType),"apply_type", applyType);
92
-        queryWrapper.nested(q -> q.eq("org_id", sysUser.getOrgId()).or().eq("verify_org", sysUser.getOrgId()));
93
-        queryWrapper.orderByDesc("create_date");
94
-        IPage<TaIssueApply> result = taIssueApplyService.page(pg, queryWrapper);
92
+        IPage<TaIssueApply> result = taIssueApplyService.getPageBy(pg, applyType, orgId, sourceType);
95 93
 
96 94
         return ResponseBean.success(result);
97 95
     }

+ 3
- 0
src/main/java/com/example/civilizedcity/controller/TaIssueController.java 파일 보기

@@ -75,6 +75,7 @@ public class TaIssueController extends BaseController {
75 75
     public ResponseBean list(@ApiParam("页码") @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
76 76
                              @ApiParam("单页数据量") @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
77 77
                              @ApiParam("问题单状态") @RequestParam(value = "bizStatus", required = false) String bizStatus,
78
+                             @ApiParam("来源") @RequestParam(value = "sourceType", required = false) String sourceType,
78 79
                              @ApiParam("我的") @RequestParam(value = "mine", defaultValue = "false") Boolean mine) throws Exception {
79 80
 
80 81
         SysUser sysUser = currentUser();
@@ -102,6 +103,8 @@ public class TaIssueController extends BaseController {
102 103
             queryWrapper.eq("process_status", Constants.PROCESS_STATUS_REJECT);
103 104
         }
104 105
 
106
+        queryWrapper.eq(Constants.ISSUE_SOURCE_FEEDBACK.equals(sourceType), "source_type", "feedback");
107
+        queryWrapper.ne(Constants.ISSUE_SOURCE_INSPECTOR.equals(sourceType), "source_type", "feedback");
105 108
         queryWrapper.eq(mine, "create_user", sysUser.getUserId());
106 109
         queryWrapper.gt("status", Constants.STATUS_DELETE);
107 110
         queryWrapper.orderByDesc("create_date");

+ 8
- 0
src/main/java/com/example/civilizedcity/entity/TaIssueApply.java 파일 보기

@@ -1,5 +1,6 @@
1 1
 package com.example.civilizedcity.entity;
2 2
 
3
+import com.baomidou.mybatisplus.annotation.TableField;
3 4
 import io.swagger.annotations.ApiModel;
4 5
 import io.swagger.annotations.ApiModelProperty;
5 6
 import com.baomidou.mybatisplus.annotation.IdType;
@@ -72,4 +73,11 @@ public class TaIssueApply implements Serializable,Cloneable{
72 73
     @ApiModelProperty(name = "申请时间",notes = "")
73 74
     private LocalDateTime createDate ;
74 75
 
76
+    @TableField(exist = false)
77
+    @ApiModelProperty(name = "问题单内容",notes = "")
78
+    private String issueContent;
79
+
80
+     @TableField(exist = false)
81
+     @ApiModelProperty(name = "问题单地址",notes = "")
82
+     private String issueAddr;
75 83
 }

+ 7
- 2
src/main/java/com/example/civilizedcity/mapper/TaIssueApplyMapper.java 파일 보기

@@ -1,6 +1,7 @@
1 1
 package com.example.civilizedcity.mapper;
2 2
 
3 3
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.baomidou.mybatisplus.core.metadata.IPage;
4 5
 import org.apache.ibatis.annotations.Mapper;
5 6
 import org.apache.ibatis.annotations.Param;
6 7
 import com.example.civilizedcity.entity.TaIssueApply;
@@ -12,5 +13,9 @@ import com.example.civilizedcity.entity.TaIssueApply;
12 13
  */
13 14
 @Mapper
14 15
 public interface TaIssueApplyMapper  extends BaseMapper<TaIssueApply>{
15
-    
16
-}
16
+
17
+     IPage<TaIssueApply> getPageBy(IPage<TaIssueApply> pg,
18
+                                   @Param("applyType") String applyType,
19
+                                   @Param("orgId") String orgId,
20
+                                   @Param("sourceType") String sourceType);
21
+ }

+ 4
- 0
src/main/java/com/example/civilizedcity/mapper/TaIssueMapper.java 파일 보기

@@ -17,4 +17,8 @@ public interface TaIssueMapper  extends BaseMapper<TaIssue>{
17 17
      IPage<TaIssue> getPageBy(IPage<TaIssue> pg, @Param("orgId") String orgId);
18 18
 
19 19
      IPage<TaIssue> getAllBy(IPage<TaIssue> pg);
20
+
21
+     int updateApply(@Param("issueId") Integer issueId,
22
+                     @Param("applyType") String applyType,
23
+                     @Param("applyId") Integer applyId);
20 24
  }

+ 3
- 0
src/main/java/com/example/civilizedcity/service/TaIssueApplyService.java 파일 보기

@@ -1,5 +1,6 @@
1 1
 package com.example.civilizedcity.service;
2 2
 
3
+import com.baomidou.mybatisplus.core.metadata.IPage;
3 4
 import com.baomidou.mybatisplus.extension.service.IService;
4 5
 import com.example.civilizedcity.entity.SysUser;
5 6
 import com.example.civilizedcity.entity.TaIssueApply;
@@ -12,4 +13,6 @@ import com.example.civilizedcity.entity.TaIssueApply;
12 13
 public interface TaIssueApplyService extends IBaseService<TaIssueApply> {
13 14
 
14 15
      void createNewApply(TaIssueApply taIssueApply, SysUser sysUser) throws Exception;
16
+
17
+     IPage<TaIssueApply> getPageBy(IPage<TaIssueApply> pg, String applyType, String orgId, String sourceType);
15 18
  }

+ 12
- 0
src/main/java/com/example/civilizedcity/service/impl/TaIssueApplyServiceImpl.java 파일 보기

@@ -1,7 +1,9 @@
1 1
 package com.example.civilizedcity.service.impl;
2 2
 
3
+import com.baomidou.mybatisplus.core.metadata.IPage;
3 4
 import com.example.civilizedcity.common.ResponseBean;
4 5
 import com.example.civilizedcity.entity.SysUser;
6
+import com.example.civilizedcity.mapper.TaIssueMapper;
5 7
 import org.springframework.beans.factory.annotation.Autowired;
6 8
 import org.springframework.stereotype.Service;
7 9
 import com.example.civilizedcity.entity.TaIssueApply;
@@ -19,6 +21,9 @@ import java.time.LocalDateTime;
19 21
 @Service
20 22
 public class TaIssueApplyServiceImpl extends BaseServiceImpl<TaIssueApplyMapper, TaIssueApply> implements TaIssueApplyService {
21 23
 
24
+    @Autowired
25
+    TaIssueMapper taIssueMapper;
26
+
22 27
     @Override
23 28
     public void createNewApply(TaIssueApply taIssueApply, SysUser sysUser) throws Exception {
24 29
 
@@ -33,5 +38,12 @@ public class TaIssueApplyServiceImpl extends BaseServiceImpl<TaIssueApplyMapper,
33 38
         taIssueApply.setCreateDate(LocalDateTime.now());
34 39
 
35 40
         save(taIssueApply);
41
+
42
+        taIssueMapper.updateApply(taIssueApply.getIssueId(), taIssueApply.getApplyType(), taIssueApply.getApplyId());
43
+    }
44
+
45
+    @Override
46
+    public IPage<TaIssueApply> getPageBy(IPage<TaIssueApply> pg, String applyType, String orgId, String sourceType) {
47
+        return baseMapper.getPageBy(pg, applyType, orgId, sourceType);
36 48
     }
37 49
 }

+ 26
- 1
src/main/resources/mapper/TaIssueApplyMapper.xml 파일 보기

@@ -2,5 +2,30 @@
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.TaIssueApplyMapper">
5
-    
5
+
6
+    <select id="getPageBy" resultType="com.example.civilizedcity.entity.TaIssueApply">
7
+        SELECT
8
+            t.*,
9
+            s.content AS issue_content,
10
+            s.addr AS issue_addr
11
+        FROM
12
+            ta_issue_apply t
13
+                INNER JOIN ta_issue s ON t.issue_id = s.issue_id
14
+        WHERE
15
+            t.`status` &gt; -1
16
+        <if test="applyType != null and applyType != ''">
17
+            AND t.apply_type = #{applyType}
18
+        </if>
19
+        <if test="orgId != null and orgId != ''">
20
+          AND t.org_id = #{orgId}
21
+        </if>
22
+        <if test="sourceType != null and sourceType == 'feedback'">
23
+            AND s.source_type = 'feedback'
24
+        </if>
25
+        <if test="sourceType != null and sourceType != 'feedback'">
26
+            AND s.source_type != 'feedback'
27
+        </if>
28
+        ORDER BY
29
+            t.create_date DESC
30
+    </select>
6 31
 </mapper>

+ 7
- 0
src/main/resources/mapper/TaIssueMapper.xml 파일 보기

@@ -2,6 +2,13 @@
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.TaIssueMapper">
5
+    <update id="updateApply">
6
+        UPDATE ta_issue t
7
+        SET t.apply_type = #{applyType},
8
+            t.apply_id = #{applyId}
9
+        WHERE
10
+            t.issue_id = #{issueId}
11
+    </update>
5 12
 
6 13
     <select id="getPageBy" resultType="com.example.civilizedcity.entity.TaIssue">
7 14
         SELECT