|
@@ -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
|
}
|