Browse Source

民意征集修改

hjc 4 months ago
parent
commit
5a51709016
9 changed files with 172 additions and 42 deletions
  1. 46 19
      unis-plugin/unis-plugin-biz/src/main/java/com/unis/interactiveCommunication/modular/icPublicOpinionCollect/controller/IcPublicOpinionCollectController.java
  2. 22 3
      unis-plugin/unis-plugin-biz/src/main/java/com/unis/interactiveCommunication/modular/icPublicOpinionCollect/mapper/mapping/IcPublicOpinionCollectMapper.xml
  3. 26 0
      unis-plugin/unis-plugin-biz/src/main/java/com/unis/interactiveCommunication/modular/icPublicOpinionCollect/param/IcPublicOpinionAuditStatusParam.java
  4. 16 0
      unis-plugin/unis-plugin-biz/src/main/java/com/unis/interactiveCommunication/modular/icPublicOpinionCollect/service/IcPublicOpinionCollectService.java
  5. 48 20
      unis-plugin/unis-plugin-biz/src/main/java/com/unis/interactiveCommunication/modular/icPublicOpinionCollect/service/impl/IcPublicOpinionCollectServiceImpl.java
  6. 3 0
      unis-plugin/unis-plugin-biz/src/main/java/com/unis/interactiveCommunication/modular/icPublicOpinionCollect/vo/IcPublicOpinionCollectVO.java
  7. 4 0
      unis-plugin/unis-plugin-biz/src/main/java/com/unis/interactiveCommunication/modular/icPublicOpinionCollectMessage/entity/IcPublicOpinionCollectMessage.java
  8. 4 0
      unis-plugin/unis-plugin-biz/src/main/java/com/unis/interactiveCommunication/modular/icPublicOpinionCollectMessage/param/IcPublicOpinionCollectMessageAddParam.java
  9. 3 0
      unis-plugin/unis-plugin-biz/src/main/java/com/unis/interactiveCommunication/modular/icPublicOpinionCollectMessage/param/IcPublicOpinionCollectMessageEditParam.java

+ 46 - 19
unis-plugin/unis-plugin-biz/src/main/java/com/unis/interactiveCommunication/modular/icPublicOpinionCollect/controller/IcPublicOpinionCollectController.java

@@ -18,6 +18,7 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
18 18
 import com.github.xiaoymin.knife4j.annotations.ApiSupport;
19 19
 import com.unis.interactiveCommunication.modular.icPublicOpinionCollect.param.*;
20 20
 import com.unis.interactiveCommunication.modular.icPublicOpinionCollect.vo.IcPublicOpinionCollectVO;
21
+import com.unis.interactiveCommunication.modular.icPublicOpinionCollectMessage.param.IcPublicOpinionCollectMessageIdParam;
21 22
 import com.unis.openGovernment.modular.ogAdministrativeDocument.param.OgAdministrativeDocumentAndStatusParam;
22 23
 import com.unis.organization.modular.iodepartmentfunction.entity.BizIoDepartmentFunction;
23 24
 import io.swagger.annotations.Api;
@@ -42,7 +43,7 @@ import java.util.List;
42 43
  * 互动交流-民意征集管理表控制器
43 44
  *
44 45
  * @author hjc
45
- * @date  2024/05/23 19:44
46
+ * @date 2024/05/23 19:44
46 47
  */
47 48
 @Api(tags = "互动交流-民意征集管理表控制器")
48 49
 @ApiSupport(author = "UNIS_TEAM", order = 1)
@@ -57,7 +58,7 @@ public class IcPublicOpinionCollectController {
57 58
      * 获取互动交流-民意征集管理表分页
58 59
      *
59 60
      * @author hjc
60
-     * @date  2024/05/23 19:44
61
+     * @date 2024/05/23 19:44
61 62
      */
62 63
     @ApiOperationSupport(order = 1)
63 64
     @ApiOperation("获取互动交流-民意征集管理表分页")
@@ -71,7 +72,7 @@ public class IcPublicOpinionCollectController {
71 72
      * 启用,禁用
72 73
      *
73 74
      * @author hjc
74
-     * @date  2024/05/20 16:18
75
+     * @date 2024/05/20 16:18
75 76
      */
76 77
     @ApiOperationSupport(order = 4)
77 78
     @ApiOperation("启用,禁用")
@@ -88,7 +89,7 @@ public class IcPublicOpinionCollectController {
88 89
      * 获取互动交流-民意征集管理表详情
89 90
      *
90 91
      * @author hjc
91
-     * @date  2024/05/23 19:44
92
+     * @date 2024/05/23 19:44
92 93
      */
93 94
     @ApiOperationSupport(order = 5)
94 95
     @ApiOperation("获取互动交流-民意征集管理表详情")
@@ -99,10 +100,25 @@ public class IcPublicOpinionCollectController {
99 100
     }
100 101
 
101 102
     /**
103
+     * 审核留言-通过、不通过
104
+     *
105
+     * @author hjc
106
+     * @date 2024/05/23 23:40
107
+     */
108
+    @ApiOperationSupport(order = 5)
109
+    @ApiOperation("审核留言-通过、不通过")
110
+    //@SaCheckPermission("/interactiveCommunication/icPublicOpinionCollectMessage/detail")
111
+    @PostMapping("/interactiveCommunication/icPublicOpinionCollect/auditStatus")
112
+    public CommonResult<String> auditStatus(@RequestBody @Valid IcPublicOpinionAuditStatusParam icPublicOpinionAuditStatusParam) {
113
+        icPublicOpinionCollectService.auditStatus(icPublicOpinionAuditStatusParam);
114
+        return CommonResult.ok();
115
+    }
116
+
117
+    /**
102 118
      * 获取征集部门信息
103 119
      *
104 120
      * @author hjc
105
-     * @date  2024/05/23 19:44
121
+     * @date 2024/05/23 19:44
106 122
      */
107 123
     @ApiOperationSupport(order = 5)
108 124
     @ApiOperation("获取征集部门信息")
@@ -111,11 +127,12 @@ public class IcPublicOpinionCollectController {
111 127
     public CommonResult<List<BizIoDepartmentFunction>> getIoDepartmentFunction() {
112 128
         return CommonResult.data(icPublicOpinionCollectService.getIoDepartmentFunction());
113 129
     }
130
+
114 131
     /**
115 132
      * 添加互动交流-民意征集管理表
116 133
      *
117 134
      * @author hjc
118
-     * @date  2024/05/23 19:44
135
+     * @date 2024/05/23 19:44
119 136
      */
120 137
     @ApiOperationSupport(order = 2)
121 138
     @ApiOperation("添加互动交流-民意征集管理表")
@@ -132,7 +149,7 @@ public class IcPublicOpinionCollectController {
132 149
      * 网站-分页展示
133 150
      *
134 151
      * @author hjc
135
-     * @date  2024/05/23 19:44
152
+     * @date 2024/05/23 19:44
136 153
      */
137 154
     @ApiOperationSupport(order = 1)
138 155
     @ApiOperation("网站-分页展示")
@@ -141,7 +158,21 @@ public class IcPublicOpinionCollectController {
141 158
     public CommonResult<Page<IcPublicOpinionCollect>> getSitePage(IcPublicOpinionCollectPageParam icPublicOpinionCollectPageParam) {
142 159
         return CommonResult.data(icPublicOpinionCollectService.getSitePage(icPublicOpinionCollectPageParam));
143 160
     }
144
-/*    *
161
+
162
+    /**
163
+     * 网站-详情
164
+     *
165
+     * @author hjc
166
+     * @date 2024/05/23 19:44
167
+     */
168
+    @ApiOperationSupport(order = 5)
169
+    @ApiOperation("网站-详情")
170
+    // @SaCheckPermission("/interactiveCommunication/icPublicOpinionCollect/detail")
171
+    @GetMapping("/interactiveCommunication/icPublicOpinionCollect/siteDetail")
172
+    public CommonResult<JSONObject> siteDetail(@Valid IcPublicOpinionCollectIdParam icPublicOpinionCollectIdParam) {
173
+        return CommonResult.data(icPublicOpinionCollectService.siteDetail(icPublicOpinionCollectIdParam));
174
+    }
175
+    /*    *
145 176
      * 编辑互动交流-民意征集管理表
146 177
      *
147 178
      * @author hjc
@@ -156,15 +187,15 @@ public class IcPublicOpinionCollectController {
156 187
         icPublicOpinionCollectService.edit(icPublicOpinionCollectEditParam);
157 188
         return CommonResult.ok();
158 189
     }
159
-/*
190
+    /*
160 191
 
161
-    */
192
+     */
162 193
 /**
163
-     * 删除互动交流-民意征集管理表
164
-     *
165
-     * @author hjc
166
-     * @date  2024/05/23 19:44
167
-     *//*
194
+ * 删除互动交流-民意征集管理表
195
+ *
196
+ * @author hjc
197
+ * @date 2024/05/23 19:44
198
+ *//*
168 199
 
169 200
     @ApiOperationSupport(order = 4)
170 201
     @ApiOperation("删除互动交流-民意征集管理表")
@@ -179,8 +210,4 @@ public class IcPublicOpinionCollectController {
179 210
 */
180 211
 
181 212
 
182
-
183
-
184
-
185
-
186 213
 }

+ 22 - 3
unis-plugin/unis-plugin-biz/src/main/java/com/unis/interactiveCommunication/modular/icPublicOpinionCollect/mapper/mapping/IcPublicOpinionCollectMapper.xml

@@ -6,9 +6,28 @@
6 6
     <select id="selectMyPage"
7 7
             resultType="com.unis.interactiveCommunication.modular.icPublicOpinionCollect.vo.IcPublicOpinionCollectVO">
8 8
 
9
-        SELECT t1.*,t3.department_name, count( t2.public_opinion_collect_id ) viewsNumber FROM biz_ic_public_opinion_collect t1 LEFT JOIN
10
-        biz_ic_public_opinion_collect_message t2 ON t1.id = t2.public_opinion_collect_id
11
-              left join biz_io_department_function t3 on t1.io_department_function_id=t3.id
9
+        SELECT
10
+        t1.*,
11
+        t3.department_name,
12
+        ifnull( count( t2.public_opinion_collect_id ), 0 ) viewsNumber,
13
+        ifnull( t4.auditPassStatusNumber, 0 ) auditPassStatusNumber
14
+        FROM
15
+        biz_ic_public_opinion_collect t1
16
+        LEFT JOIN biz_ic_public_opinion_collect_message t2 ON t1.id = t2.public_opinion_collect_id
17
+        LEFT JOIN biz_io_department_function t3 ON t1.io_department_function_id = t3.id
18
+        LEFT JOIN (
19
+        SELECT
20
+        t1.id,
21
+        ifnull( count( t2.audit_status ), 0 ) auditPassStatusNumber
22
+        FROM
23
+        biz_ic_public_opinion_collect t1
24
+        LEFT JOIN biz_ic_public_opinion_collect_message t2 ON t1.id = t2.public_opinion_collect_id
25
+        WHERE
26
+        t2.audit_status = '1'
27
+        GROUP BY
28
+        t1.id
29
+        ) t4 ON t1.id = t4.id
30
+
12 31
         <where>
13 32
 
14 33
             <if test="collectionTitle!=null and collectionTitle!=''">

+ 26 - 0
unis-plugin/unis-plugin-biz/src/main/java/com/unis/interactiveCommunication/modular/icPublicOpinionCollect/param/IcPublicOpinionAuditStatusParam.java

@@ -0,0 +1,26 @@
1
+package com.unis.interactiveCommunication.modular.icPublicOpinionCollect.param;
2
+
3
+import io.swagger.annotations.ApiModelProperty;
4
+import lombok.Data;
5
+
6
+import javax.validation.constraints.NotBlank;
7
+import javax.validation.constraints.NotNull;
8
+
9
+/**
10
+ * @author hjc
11
+ * @date 2024/7/30 11:02
12
+ */
13
+@Data
14
+public class IcPublicOpinionAuditStatusParam {
15
+
16
+
17
+    /** 留言记录唯一标识符 */
18
+    @ApiModelProperty(value = "留言记录唯一标识符", required = true)
19
+    @NotBlank(message = "id不能为空")
20
+    private String id;
21
+
22
+    /** 状态 0:未审核;1:审核通过;2:审核不通过; */
23
+    @ApiModelProperty(value = "状态 1:审核通过;2:审核不通过;", position = 10)
24
+    @NotNull(message = "审核状态不能为空")
25
+    private Integer auditStatus;
26
+}

+ 16 - 0
unis-plugin/unis-plugin-biz/src/main/java/com/unis/interactiveCommunication/modular/icPublicOpinionCollect/service/IcPublicOpinionCollectService.java

@@ -101,4 +101,20 @@ public interface IcPublicOpinionCollectService extends IService<IcPublicOpinionC
101 101
      * @date  2024/05/23 19:44
102 102
      */
103 103
     Page<IcPublicOpinionCollect> getSitePage(IcPublicOpinionCollectPageParam icPublicOpinionCollectPageParam);
104
+
105
+    /**
106
+     * 审核留言-通过、不通过
107
+     *
108
+     * @author hjc
109
+     * @date  2024/05/23 23:40
110
+     */
111
+    void auditStatus(IcPublicOpinionAuditStatusParam icPublicOpinionAuditStatusParam);
112
+
113
+    /**
114
+     * 获取网站-详情
115
+     *
116
+     * @author hjc
117
+     * @date 2024/05/23 19:44
118
+     */
119
+    JSONObject siteDetail(IcPublicOpinionCollectIdParam icPublicOpinionCollectIdParam);
104 120
 }

+ 48 - 20
unis-plugin/unis-plugin-biz/src/main/java/com/unis/interactiveCommunication/modular/icPublicOpinionCollect/service/impl/IcPublicOpinionCollectServiceImpl.java

@@ -17,7 +17,10 @@ import cn.hutool.core.collection.CollStreamUtil;
17 17
 import cn.hutool.core.util.ObjectUtil;
18 18
 import cn.hutool.core.util.StrUtil;
19 19
 import com.alibaba.fastjson.JSONObject;
20
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
20 21
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
22
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
23
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
21 24
 import com.baomidou.mybatisplus.core.toolkit.StringUtils;
22 25
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
23 26
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -63,24 +66,9 @@ public class IcPublicOpinionCollectServiceImpl extends ServiceImpl<IcPublicOpini
63 66
 
64 67
     @Override
65 68
     public Page<IcPublicOpinionCollectVO> page(IcPublicOpinionCollectPageParam pageParam) {
66
-      /*  QueryWrapper<IcPublicOpinionCollect> queryWrapper = new QueryWrapper<>();
67
-        if (StringUtils.isNotEmpty(icPublicOpinionCollectPageParam.getCollectionTitle())) {
68
-            queryWrapper.like("collection_title", icPublicOpinionCollectPageParam.getCollectionTitle());
69
-        }
70
-        if (ObjectUtil.isNotEmpty(icPublicOpinionCollectPageParam.getProgressStatus())) {
71
-            queryWrapper.eq("progress_status", icPublicOpinionCollectPageParam.getProgressStatus());
72
-        }
73
-        if (ObjectUtil.isAllNotEmpty(icPublicOpinionCollectPageParam.getSortField(), icPublicOpinionCollectPageParam.getSortOrder())) {
74
-            CommonSortOrderEnum.validate(icPublicOpinionCollectPageParam.getSortOrder());
75
-            queryWrapper.orderBy(true, icPublicOpinionCollectPageParam.getSortOrder().equals(CommonSortOrderEnum.ASC.getValue()),
76
-                    StrUtil.toUnderlineCase(icPublicOpinionCollectPageParam.getSortField()));
77
-        } else {
78
-            queryWrapper.lambda().orderByAsc(IcPublicOpinionCollect::getId);
79
-        }
80
-        return this.page(CommonPageRequest.defaultPage(), queryWrapper);*/
69
+
81 70
 
82 71
         Page<IcPublicOpinionCollectVO> page = new Page<>(pageParam.getCurrent(), pageParam.getSize());
83
-        /* return bizIoDepartmentFunctionMapper.selectMyPage(page, pageParam.getCollectionTitle(), pageParam.getProgressStatus());*/
84 72
         return icPublicOpinionCollectMapper.selectMyPage(page, pageParam.getCollectionTitle(), pageParam.getProgressStatus());
85 73
 
86 74
     }
@@ -98,10 +86,10 @@ public class IcPublicOpinionCollectServiceImpl extends ServiceImpl<IcPublicOpini
98 86
             if (date.compareTo(startTime) == 0 || startTime.before(date)) {
99 87
                 icPublicOpinionCollect.setProgressStatus(1);
100 88
             }
101
-            if (date.before(startTime)){
89
+            if (date.before(startTime)) {
102 90
                 icPublicOpinionCollect.setProgressStatus(0);
103 91
             }
104
-            if ( date.after(endTime)) {
92
+            if (date.after(endTime)) {
105 93
                 icPublicOpinionCollect.setProgressStatus(2);
106 94
             }
107 95
         }
@@ -195,7 +183,7 @@ public class IcPublicOpinionCollectServiceImpl extends ServiceImpl<IcPublicOpini
195 183
                 if (date.compareTo(startTime) == 0 || startTime.before(date) && endTime.after(date)) {
196 184
                     icPublicOpinionCollect.setProgressStatus(1);
197 185
                 }
198
-                if (date.after(endTime)){
186
+                if (date.after(endTime)) {
199 187
                     throw new CommonException("已结束收集,不能进行启用");
200 188
                 }
201 189
             }
@@ -207,7 +195,7 @@ public class IcPublicOpinionCollectServiceImpl extends ServiceImpl<IcPublicOpini
207 195
                 if (startTime.after(date)) {
208 196
                     icPublicOpinionCollect.setProgressStatus(0);
209 197
                 }
210
-                if (endTime.before(date)){
198
+                if (endTime.before(date)) {
211 199
                     icPublicOpinionCollect.setProgressStatus(2);
212 200
                 }
213 201
             }
@@ -235,4 +223,44 @@ public class IcPublicOpinionCollectServiceImpl extends ServiceImpl<IcPublicOpini
235 223
         }
236 224
         return this.page(CommonPageRequest.defaultPage(), queryWrapper);
237 225
     }
226
+
227
+    /**
228
+     * 审核留言-通过、不通过
229
+     *
230
+     * @author hjc
231
+     * @date 2024/05/23 23:40
232
+     */
233
+    @Override
234
+    public void auditStatus(IcPublicOpinionAuditStatusParam icPublicOpinionAuditStatusParam) {
235
+
236
+        icPublicOpinionCollectMessageMapper.update(null, new LambdaUpdateWrapper<IcPublicOpinionCollectMessage>()
237
+                .eq(IcPublicOpinionCollectMessage::getId, icPublicOpinionAuditStatusParam.getId())
238
+                .set(IcPublicOpinionCollectMessage::getAuditStatus, icPublicOpinionAuditStatusParam.getAuditStatus()));
239
+    }
240
+
241
+    /**
242
+     * 获取网站-详情
243
+     *
244
+     * @author hjc
245
+     * @date 2024/05/23 19:44
246
+     */
247
+    @Override
248
+    public JSONObject siteDetail(IcPublicOpinionCollectIdParam icPublicOpinionCollectIdParam) {
249
+        JSONObject jsonObject = new JSONObject();
250
+
251
+        IcPublicOpinionCollect icPublicOpinionCollect = icPublicOpinionCollectMapper.selectById(icPublicOpinionCollectIdParam.getId());
252
+        if (ObjectUtil.isEmpty(icPublicOpinionCollect)) {
253
+            throw new CommonException("暂无对应数据,id为{}", icPublicOpinionCollectIdParam.getId());
254
+        }
255
+        jsonObject.put("icPublicOpinionCollect", icPublicOpinionCollect);
256
+
257
+        //意见征集数据
258
+        List<IcPublicOpinionCollectMessage> icPublicOpinionCollectMessages = icPublicOpinionCollectMessageMapper
259
+                .selectList(Wrappers.lambdaQuery(IcPublicOpinionCollectMessage.class)
260
+                        .eq(IcPublicOpinionCollectMessage::getPublicOpinionCollectId, icPublicOpinionCollect.getId())
261
+                        .eq(IcPublicOpinionCollectMessage::getAuditStatus, 1));
262
+        jsonObject.put("icPublicOpinionCollectMessages", icPublicOpinionCollectMessages);
263
+
264
+        return jsonObject;
265
+    }
238 266
 }

+ 3 - 0
unis-plugin/unis-plugin-biz/src/main/java/com/unis/interactiveCommunication/modular/icPublicOpinionCollect/vo/IcPublicOpinionCollectVO.java

@@ -19,4 +19,7 @@ public class IcPublicOpinionCollectVO extends IcPublicOpinionCollect {
19 19
     @ApiModelProperty(value = "征集部门名称")
20 20
     private String departmentName;
21 21
 
22
+    @ApiModelProperty(value = "审核通过意见数量")
23
+    private Integer auditPassStatusNumber;
24
+
22 25
 }

+ 4 - 0
unis-plugin/unis-plugin-biz/src/main/java/com/unis/interactiveCommunication/modular/icPublicOpinionCollectMessage/entity/IcPublicOpinionCollectMessage.java

@@ -70,4 +70,8 @@ public class IcPublicOpinionCollectMessage {
70 70
     /** 留言内容 */
71 71
     @ApiModelProperty(value = "留言内容", position = 9)
72 72
     private String content;
73
+
74
+    /** 状态 0:未审核;1:审核通过;2:审核不通过; */
75
+    @ApiModelProperty(value = "状态 0:未审核;1:审核通过;2:审核不通过;", position = 10)
76
+    private Integer auditStatus;
73 77
 }

+ 4 - 0
unis-plugin/unis-plugin-biz/src/main/java/com/unis/interactiveCommunication/modular/icPublicOpinionCollectMessage/param/IcPublicOpinionCollectMessageAddParam.java

@@ -47,4 +47,8 @@ public class IcPublicOpinionCollectMessageAddParam {
47 47
     @ApiModelProperty(value = "留言内容", position = 9)
48 48
     private String content;
49 49
 
50
+    /** 状态 0:未审核;1:审核通过;2:审核不通过; */
51
+    @ApiModelProperty(value = "状态 0:未审核;1:审核通过;2:审核不通过;", position = 10)
52
+    private Integer auditStatus;
53
+
50 54
 }

+ 3 - 0
unis-plugin/unis-plugin-biz/src/main/java/com/unis/interactiveCommunication/modular/icPublicOpinionCollectMessage/param/IcPublicOpinionCollectMessageEditParam.java

@@ -52,4 +52,7 @@ public class IcPublicOpinionCollectMessageEditParam {
52 52
     @ApiModelProperty(value = "留言内容", position = 9)
53 53
     private String content;
54 54
 
55
+    /** 状态 0:未审核;1:审核通过;2:审核不通过; */
56
+    @ApiModelProperty(value = "状态 0:未审核;1:审核通过;2:审核不通过;", position = 10)
57
+    private Integer auditStatus;
55 58
 }