|
...
|
...
|
@@ -5,8 +5,11 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
5
|
5
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
|
6
|
6
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
7
|
7
|
import com.github.pagehelper.PageInfo;
|
|
|
8
|
+import com.lframework.starter.bpm.dto.FlowTaskDto;
|
|
|
9
|
+import com.lframework.starter.bpm.mappers.FlowTaskWrapperMapper;
|
|
8
|
10
|
import com.lframework.starter.bpm.service.FlowDefinitionWrapperService;
|
|
9
|
11
|
import com.lframework.starter.bpm.service.FlowInstanceWrapperService;
|
|
|
12
|
+import com.lframework.starter.bpm.vo.flow.task.QueryTodoTaskListVo;
|
|
10
|
13
|
import com.lframework.starter.web.core.components.redis.RedisHandler;
|
|
11
|
14
|
import com.lframework.starter.web.core.components.security.SecurityUtil;
|
|
12
|
15
|
import com.lframework.starter.web.core.utils.*;
|
|
...
|
...
|
@@ -86,6 +89,8 @@ public class CustomerCreditServiceImpl extends BaseMpServiceImpl<CustomerCreditM |
|
86
|
89
|
private FlowInstanceWrapperService flowInstanceWrapperService;
|
|
87
|
90
|
@Autowired
|
|
88
|
91
|
private RedisHandler redisHandler;
|
|
|
92
|
+ @Resource
|
|
|
93
|
+ private FlowTaskWrapperMapper flowTaskWrapperMapper;
|
|
89
|
94
|
|
|
90
|
95
|
@Override
|
|
91
|
96
|
public PageResult<CustomerCredit> query(Integer pageIndex, Integer pageSize, QueryCustomerCreditVo vo) {
|
|
...
|
...
|
@@ -95,6 +100,21 @@ public class CustomerCreditServiceImpl extends BaseMpServiceImpl<CustomerCreditM |
|
95
|
100
|
|
|
96
|
101
|
PageHelperUtil.startPage(pageIndex, pageSize);
|
|
97
|
102
|
List<CustomerCredit> datas = this.query(vo);
|
|
|
103
|
+ if (CollectionUtils.isNotEmpty(datas)) {
|
|
|
104
|
+ // 获取当前人员的待办任务数据
|
|
|
105
|
+ List<FlowTaskDto> flowTaskList = flowTaskWrapperMapper.queryTodoList(new QueryTodoTaskListVo(), SecurityUtil.getCurrentUser().getId());
|
|
|
106
|
+ if (org.apache.commons.collections4.CollectionUtils.isEmpty(flowTaskList)) {
|
|
|
107
|
+ return new PageResult<>();
|
|
|
108
|
+ }
|
|
|
109
|
+ List<String> ids = flowTaskList.stream().map(FlowTaskDto::getBusinessId).collect(Collectors.toList());
|
|
|
110
|
+ for (CustomerCredit customerCredit : datas) {
|
|
|
111
|
+ if (ids.contains(customerCredit.getId())) {
|
|
|
112
|
+ customerCredit.setShowExamine(true);
|
|
|
113
|
+ } else {
|
|
|
114
|
+ customerCredit.setShowExamine(false);
|
|
|
115
|
+ }
|
|
|
116
|
+ }
|
|
|
117
|
+ }
|
|
98
|
118
|
|
|
99
|
119
|
return PageResultUtil.convert(new PageInfo<>(datas));
|
|
100
|
120
|
}
|
...
|
...
|
|