|
...
|
...
|
@@ -3,7 +3,10 @@ package com.lframework.xingyun.sc.impl.shipments.delay; |
|
3
|
3
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
4
|
4
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
5
|
5
|
import com.github.pagehelper.PageInfo;
|
|
|
6
|
+import com.lframework.starter.bpm.dto.FlowTaskDto;
|
|
|
7
|
+import com.lframework.starter.bpm.mappers.FlowTaskWrapperMapper;
|
|
6
|
8
|
import com.lframework.starter.bpm.service.FlowInstanceWrapperService;
|
|
|
9
|
+import com.lframework.starter.bpm.vo.flow.task.QueryTodoTaskListVo;
|
|
7
|
10
|
import com.lframework.starter.common.utils.CollectionUtil;
|
|
8
|
11
|
import com.lframework.starter.common.utils.StringUtil;
|
|
9
|
12
|
import com.lframework.starter.mq.core.service.MqProducerService;
|
|
...
|
...
|
@@ -23,8 +26,6 @@ import com.lframework.starter.web.inner.bo.usercenter.UserInfoBo; |
|
23
|
26
|
import com.lframework.starter.web.inner.components.oplog.OtherOpLogType;
|
|
24
|
27
|
import com.lframework.starter.web.inner.dto.message.SysSiteMessageDto;
|
|
25
|
28
|
import com.lframework.starter.web.inner.dto.system.UserInfoDto;
|
|
26
|
|
-import com.lframework.starter.web.inner.entity.SysRole;
|
|
27
|
|
-import com.lframework.starter.web.inner.service.system.SysRoleService;
|
|
28
|
29
|
import com.lframework.starter.web.inner.service.system.SysUserRoleService;
|
|
29
|
30
|
import com.lframework.starter.web.inner.service.system.SysUserService;
|
|
30
|
31
|
import com.lframework.xingyun.sc.entity.DelayedShipment;
|
|
...
|
...
|
@@ -44,6 +45,7 @@ import java.time.LocalDate; |
|
44
|
45
|
import java.time.temporal.ChronoUnit;
|
|
45
|
46
|
import java.util.ArrayList;
|
|
46
|
47
|
import java.util.List;
|
|
|
48
|
+import java.util.stream.Collectors;
|
|
47
|
49
|
|
|
48
|
50
|
@Service
|
|
49
|
51
|
public class DelayedShipmentServiceImpl extends BaseMpServiceImpl<DelayedShipmentMapper, DelayedShipment> implements DelayedShipmentService {
|
|
...
|
...
|
@@ -64,6 +66,8 @@ public class DelayedShipmentServiceImpl extends BaseMpServiceImpl<DelayedShipmen |
|
64
|
66
|
private SysUserRoleService sysUserRoleService;
|
|
65
|
67
|
@Resource
|
|
66
|
68
|
private TransactorHandler transactorHandler;
|
|
|
69
|
+ @Resource
|
|
|
70
|
+ private FlowTaskWrapperMapper flowTaskWrapperMapper;
|
|
67
|
71
|
|
|
68
|
72
|
@Override
|
|
69
|
73
|
public PageResult<DelayedShipment> query(Integer pageIndex, Integer pageSize, QueryDelayedShipmentVo vo) {
|
|
...
|
...
|
@@ -73,6 +77,21 @@ public class DelayedShipmentServiceImpl extends BaseMpServiceImpl<DelayedShipmen |
|
73
|
77
|
|
|
74
|
78
|
PageHelperUtil.startPage(pageIndex, pageSize);
|
|
75
|
79
|
List<DelayedShipment> datas = this.query(vo);
|
|
|
80
|
+ if (CollectionUtils.isNotEmpty(datas)) {
|
|
|
81
|
+ // 获取当前人员的待办任务数据
|
|
|
82
|
+ List<FlowTaskDto> flowTaskList = flowTaskWrapperMapper.queryTodoList(new QueryTodoTaskListVo(), SecurityUtil.getCurrentUser().getId());
|
|
|
83
|
+ if (org.apache.commons.collections4.CollectionUtils.isEmpty(flowTaskList)) {
|
|
|
84
|
+ return PageResultUtil.convert(new PageInfo<>(datas));
|
|
|
85
|
+ }
|
|
|
86
|
+ List<String> ids = flowTaskList.stream().map(FlowTaskDto::getBusinessId).collect(Collectors.toList());
|
|
|
87
|
+ for (DelayedShipment delayedShipment : datas) {
|
|
|
88
|
+ if (ids.contains(delayedShipment.getId())) {
|
|
|
89
|
+ delayedShipment.setShowExamine(true);
|
|
|
90
|
+ } else {
|
|
|
91
|
+ delayedShipment.setShowExamine(false);
|
|
|
92
|
+ }
|
|
|
93
|
+ }
|
|
|
94
|
+ }
|
|
76
|
95
|
|
|
77
|
96
|
return PageResultUtil.convert(new PageInfo<>(datas));
|
|
78
|
97
|
}
|
...
|
...
|
|