|
|
|
|
@ -376,23 +376,25 @@ public class WorkService extends ServiceImpl<WorkMapper, Work> {
|
|
|
|
|
.eq(Objects.nonNull(mailQuery.getSignRoleId()), "w.sign_role_id", mailQuery.getSignRoleId()) |
|
|
|
|
.eq(Objects.nonNull(mailQuery.getSignDeptId()), "w.sign_dept_id", mailQuery.getSignDeptId()); |
|
|
|
|
|
|
|
|
|
//剔除终止操作的信件类别方便统计
|
|
|
|
|
// if (StrUtil.isNotBlank(mailQuery.getMailState())) {
|
|
|
|
|
// switch (mailQuery.getMailState()) {
|
|
|
|
|
// case "terminated":
|
|
|
|
|
// queryWrapper.nested(i -> i.eq("m.mail_first_category", "终止类")
|
|
|
|
|
// .or().eq("m.mail_first_category", "感谢信类")
|
|
|
|
|
// .or().eq("m.mail_first_category", "无效类"));
|
|
|
|
|
// break;
|
|
|
|
|
// case "completion":
|
|
|
|
|
// queryWrapper.ne("m.mail_first_category", "终止类")
|
|
|
|
|
// .ne("m.mail_first_category", "感谢信类")
|
|
|
|
|
// .ne("m.mail_first_category", "无效类");
|
|
|
|
|
// break;
|
|
|
|
|
// default:
|
|
|
|
|
// queryWrapper.eq("m.mail_state", mailQuery.getMailState());
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
if (StrUtil.isNotBlank(mailQuery.getCountMails())) { |
|
|
|
|
switch (mailQuery.getCountMails()) { |
|
|
|
|
case "1": |
|
|
|
|
queryWrapper.and(i -> i.ne("m.flow_key","first_sign")//防止二级专班退回市局专班的信件未被签收,但是仍然存在于mail表中
|
|
|
|
|
.ne("m.mail_first_category","无效类") |
|
|
|
|
.ne("m.mail_first_category","终止类") |
|
|
|
|
.ne("m.mail_first_category","感谢信类")); |
|
|
|
|
break; |
|
|
|
|
case "2": |
|
|
|
|
queryWrapper.nested(i->i.eq("mm.completed", "1")); |
|
|
|
|
break; |
|
|
|
|
case "3": |
|
|
|
|
queryWrapper.nested(i->i.eq("mm.satisfied", "1")); |
|
|
|
|
break; |
|
|
|
|
case "4": |
|
|
|
|
queryWrapper.nested(i->i.eq("mm.resolved", "1")); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (StrUtil.isNotBlank(mailQuery.getFlowKey())) { |
|
|
|
|
List<String> flowKeyList = StrUtil.split(mailQuery.getFlowKey(), ',', true, true); |
|
|
|
|
|
|
|
|
|
@ -433,7 +435,7 @@ public class WorkService extends ServiceImpl<WorkMapper, Work> {
|
|
|
|
|
} |
|
|
|
|
// 排序
|
|
|
|
|
queryWrapper.orderByDesc("m.mail_time"); |
|
|
|
|
Page<QueryMailVo> result = baseMapper.selectQueryPage(page, queryWrapper); |
|
|
|
|
Page<QueryMailVo> result = baseMapper.selectQueryPage(page, queryWrapper, mailQuery.getCountMails()); |
|
|
|
|
for (QueryMailVo workVo : result.getRecords()) { |
|
|
|
|
List<MailLabel> labelNames = mailLabelMapper.selectList(null); |
|
|
|
|
if (StrUtil.isNotBlank(workVo.getMailLabels())) { |
|
|
|
|
|