|
...
|
...
|
@@ -3,7 +3,10 @@ package com.lframework.xingyun.sc.impl.shipments.car; |
|
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.exceptions.impl.DefaultClientException;
|
|
8
|
11
|
import com.lframework.starter.common.utils.Assert;
|
|
9
|
12
|
import com.lframework.starter.common.utils.ObjectUtil;
|
|
...
|
...
|
@@ -21,6 +24,7 @@ import com.lframework.xingyun.sc.entity.DraftRequestCarTicket; |
|
21
|
24
|
import com.lframework.xingyun.sc.mappers.DraftRequestCarTicketMapper;
|
|
22
|
25
|
import com.lframework.xingyun.sc.service.shipments.car.DraftRequestCarTicketService;
|
|
23
|
26
|
import com.lframework.xingyun.sc.vo.shipments.car.*;
|
|
|
27
|
+import org.apache.commons.collections.CollectionUtils;
|
|
24
|
28
|
import org.apache.commons.lang3.StringUtils;
|
|
25
|
29
|
import org.springframework.stereotype.Service;
|
|
26
|
30
|
import org.springframework.transaction.annotation.Transactional;
|
|
...
|
...
|
@@ -28,12 +32,15 @@ import org.springframework.transaction.annotation.Transactional; |
|
28
|
32
|
import javax.annotation.Resource;
|
|
29
|
33
|
import java.io.Serializable;
|
|
30
|
34
|
import java.util.List;
|
|
|
35
|
+import java.util.stream.Collectors;
|
|
31
|
36
|
|
|
32
|
37
|
@Service
|
|
33
|
38
|
public class DraftRequestCarTicketServiceImpl extends BaseMpServiceImpl<DraftRequestCarTicketMapper, DraftRequestCarTicket> implements DraftRequestCarTicketService {
|
|
34
|
39
|
private static final String BPM_FLAG = "DRAFT_REQUEST_CAR";
|
|
35
|
40
|
@Resource
|
|
36
|
41
|
private FlowInstanceWrapperService flowInstanceWrapperService;
|
|
|
42
|
+ @Resource
|
|
|
43
|
+ private FlowTaskWrapperMapper flowTaskWrapperMapper;
|
|
37
|
44
|
|
|
38
|
45
|
@Override
|
|
39
|
46
|
public PageResult<DraftRequestCarTicket> query(Integer pageIndex, Integer pageSize, QueryDraftRequestCarTicketVo vo) {
|
|
...
|
...
|
@@ -43,6 +50,21 @@ public class DraftRequestCarTicketServiceImpl extends BaseMpServiceImpl<DraftReq |
|
43
|
50
|
|
|
44
|
51
|
PageHelperUtil.startPage(pageIndex, pageSize);
|
|
45
|
52
|
List<DraftRequestCarTicket> datas = this.query(vo);
|
|
|
53
|
+ if (CollectionUtils.isNotEmpty(datas)) {
|
|
|
54
|
+ // 获取当前人员的待办任务数据
|
|
|
55
|
+ List<FlowTaskDto> flowTaskList = flowTaskWrapperMapper.queryTodoList(new QueryTodoTaskListVo(), SecurityUtil.getCurrentUser().getId());
|
|
|
56
|
+ if (CollectionUtils.isEmpty(flowTaskList)) {
|
|
|
57
|
+ return new PageResult<>();
|
|
|
58
|
+ }
|
|
|
59
|
+ List<String> ids = flowTaskList.stream().map(FlowTaskDto::getBusinessId).collect(Collectors.toList());
|
|
|
60
|
+ for (DraftRequestCarTicket draftRequestCarTicket : datas) {
|
|
|
61
|
+ if (ids.contains(draftRequestCarTicket.getId())) {
|
|
|
62
|
+ draftRequestCarTicket.setShowExamine(true);
|
|
|
63
|
+ } else {
|
|
|
64
|
+ draftRequestCarTicket.setShowExamine(false);
|
|
|
65
|
+ }
|
|
|
66
|
+ }
|
|
|
67
|
+ }
|
|
46
|
68
|
|
|
47
|
69
|
return PageResultUtil.convert(new PageInfo<>(datas));
|
|
48
|
70
|
}
|
|
...
|
...
|
@@ -75,9 +97,9 @@ public class DraftRequestCarTicketServiceImpl extends BaseMpServiceImpl<DraftReq |
|
75
|
97
|
if (!StringUtil.isBlank(vo.getDeptId())) {
|
|
76
|
98
|
data.setDeptId(vo.getDeptId());
|
|
77
|
99
|
}
|
|
78
|
|
- if (vo.getDeliveryDate() != null) {
|
|
79
|
|
- data.setDeliveryDate(vo.getDeliveryDate());
|
|
80
|
|
- }
|
|
|
100
|
+// if (vo.getDeliveryDate() != null) {
|
|
|
101
|
+// data.setDeliveryDate(vo.getDeliveryDate());
|
|
|
102
|
+// }
|
|
81
|
103
|
if (!StringUtil.isBlank(vo.getWorkshopId())) {
|
|
82
|
104
|
data.setWorkshopId(vo.getWorkshopId());
|
|
83
|
105
|
}
|
|
...
|
...
|
@@ -108,9 +130,9 @@ public class DraftRequestCarTicketServiceImpl extends BaseMpServiceImpl<DraftReq |
|
108
|
130
|
if (!StringUtil.isBlank(vo.getExternalAuditor())) {
|
|
109
|
131
|
data.setExternalAuditor(vo.getExternalAuditor());
|
|
110
|
132
|
}
|
|
111
|
|
- if (!StringUtil.isBlank(vo.getLoadingTime())) {
|
|
112
|
|
- data.setLoadingTime(vo.getLoadingTime());
|
|
113
|
|
- }
|
|
|
133
|
+// if (!StringUtil.isBlank(vo.getLoadingTime())) {
|
|
|
134
|
+// data.setLoadingTime(vo.getLoadingTime());
|
|
|
135
|
+// }
|
|
114
|
136
|
if (!StringUtil.isBlank(vo.getSpecialLoadingRequirement())) {
|
|
115
|
137
|
data.setSpecialLoadingRequirement(vo.getSpecialLoadingRequirement());
|
|
116
|
138
|
}
|
|
...
|
...
|
@@ -149,7 +171,7 @@ public class DraftRequestCarTicketServiceImpl extends BaseMpServiceImpl<DraftReq |
|
149
|
171
|
.set(DraftRequestCarTicket::getPurchaseOrderId, StringUtil.isBlank(vo.getPurchaseOrderId()) ? null : vo.getPurchaseOrderId())
|
|
150
|
172
|
.set(DraftRequestCarTicket::getRequestCarData, vo.getRequestCarData() == null ? null : vo.getRequestCarData())
|
|
151
|
173
|
.set(DraftRequestCarTicket::getDeptId, StringUtil.isBlank(vo.getDeptId()) ? null : vo.getDeptId())
|
|
152
|
|
- .set(DraftRequestCarTicket::getDeliveryDate, vo.getDeliveryDate() == null ? null : vo.getDeliveryDate())
|
|
|
174
|
+// .set(DraftRequestCarTicket::getDeliveryDate, vo.getDeliveryDate() == null ? null : vo.getDeliveryDate())
|
|
153
|
175
|
.set(DraftRequestCarTicket::getWorkshopId, StringUtil.isBlank(vo.getWorkshopId()) ? null : vo.getWorkshopId())
|
|
154
|
176
|
.set(DraftRequestCarTicket::getOrderNo, StringUtil.isBlank(vo.getOrderNo()) ? null : vo.getOrderNo())
|
|
155
|
177
|
.set(DraftRequestCarTicket::getCustomerShortName, StringUtil.isBlank(vo.getCustomerShortName()) ? null : vo.getCustomerShortName())
|
|
...
|
...
|
@@ -160,7 +182,7 @@ public class DraftRequestCarTicketServiceImpl extends BaseMpServiceImpl<DraftReq |
|
160
|
182
|
.set(DraftRequestCarTicket::getReturnPlanArrangement, StringUtil.isBlank(vo.getReturnPlanArrangement()) ? null : vo.getReturnPlanArrangement())
|
|
161
|
183
|
.set(DraftRequestCarTicket::getOther, StringUtil.isBlank(vo.getOther()) ? null : vo.getOther())
|
|
162
|
184
|
.set(DraftRequestCarTicket::getExternalAuditor, StringUtil.isBlank(vo.getExternalAuditor()) ? null : vo.getExternalAuditor())
|
|
163
|
|
- .set(DraftRequestCarTicket::getLoadingTime, StringUtil.isBlank(vo.getLoadingTime()) ? null : vo.getLoadingTime())
|
|
|
185
|
+// .set(DraftRequestCarTicket::getLoadingTime, StringUtil.isBlank(vo.getLoadingTime()) ? null : vo.getLoadingTime())
|
|
164
|
186
|
.set(DraftRequestCarTicket::getSpecialLoadingRequirement, StringUtil.isBlank(vo.getSpecialLoadingRequirement()) ? null : vo.getSpecialLoadingRequirement())
|
|
165
|
187
|
.set(DraftRequestCarTicket::getBusinessOfficeAuditor, StringUtil.isBlank(vo.getBusinessOfficeAuditor()) ? null : vo.getBusinessOfficeAuditor())
|
|
166
|
188
|
.set(DraftRequestCarTicket::getOperationsDepartmentAuditor, StringUtil.isBlank(vo.getOperationsDepartmentAuditor()) ? null : vo.getOperationsDepartmentAuditor())
|
...
|
...
|
|