|
@@ -27,7 +27,10 @@ import com.lframework.xingyun.sc.service.order.PurchaseOrderInfoService; |
|
@@ -27,7 +27,10 @@ import com.lframework.xingyun.sc.service.order.PurchaseOrderInfoService; |
|
27
|
import com.lframework.xingyun.sc.service.order.PurchaseOrderLineService;
|
27
|
import com.lframework.xingyun.sc.service.order.PurchaseOrderLineService;
|
|
28
|
import com.lframework.xingyun.sc.service.shipments.ShipmentsPlanDetailService;
|
28
|
import com.lframework.xingyun.sc.service.shipments.ShipmentsPlanDetailService;
|
|
29
|
import com.lframework.xingyun.sc.service.shipments.ShipmentsPlanService;
|
29
|
import com.lframework.xingyun.sc.service.shipments.ShipmentsPlanService;
|
|
|
|
30
|
+import com.lframework.xingyun.sc.service.shipments.delay.DelayedShipmentDetailService;
|
|
|
|
31
|
+import com.lframework.xingyun.sc.service.shipments.delay.DelayedShipmentService;
|
|
30
|
import com.lframework.xingyun.sc.utils.CommonUtil;
|
32
|
import com.lframework.xingyun.sc.utils.CommonUtil;
|
|
|
|
33
|
+import com.lframework.xingyun.sc.vo.shipments.delay.QueryDelayedShipmentVo;
|
|
31
|
import com.lframework.xingyun.sc.vo.shipments.plan.*;
|
34
|
import com.lframework.xingyun.sc.vo.shipments.plan.*;
|
|
32
|
import org.apache.commons.collections4.CollectionUtils;
|
35
|
import org.apache.commons.collections4.CollectionUtils;
|
|
33
|
import org.apache.commons.lang3.StringUtils;
|
36
|
import org.apache.commons.lang3.StringUtils;
|
|
@@ -61,6 +64,11 @@ public class ShipmentsPlanDetailServiceImpl extends BaseMpServiceImpl<ShipmentsP |
|
@@ -61,6 +64,11 @@ public class ShipmentsPlanDetailServiceImpl extends BaseMpServiceImpl<ShipmentsP |
|
61
|
private SysRoleService sysRoleService;
|
64
|
private SysRoleService sysRoleService;
|
|
62
|
@Resource
|
65
|
@Resource
|
|
63
|
private SysUserDeptService sysUserDeptService;
|
66
|
private SysUserDeptService sysUserDeptService;
|
|
|
|
67
|
+ @Resource
|
|
|
|
68
|
+ private DelayedShipmentService delayedShipmentService;
|
|
|
|
69
|
+ @Resource
|
|
|
|
70
|
+ private DelayedShipmentDetailService delayedShipmentDetailService;
|
|
|
|
71
|
+
|
|
64
|
|
72
|
|
|
65
|
|
73
|
|
|
66
|
@Override
|
74
|
@Override
|
|
@@ -208,12 +216,36 @@ public class ShipmentsPlanDetailServiceImpl extends BaseMpServiceImpl<ShipmentsP |
|
@@ -208,12 +216,36 @@ public class ShipmentsPlanDetailServiceImpl extends BaseMpServiceImpl<ShipmentsP |
|
208
|
existOrderSpecIds.addAll(orderSpecIds);
|
216
|
existOrderSpecIds.addAll(orderSpecIds);
|
|
209
|
}
|
217
|
}
|
|
210
|
}
|
218
|
}
|
|
|
|
219
|
+ //延期发货单中审核中、审核驳回的数据不可被选择
|
|
|
|
220
|
+ QueryDelayedShipmentVo vo1 = new QueryDelayedShipmentVo();
|
|
|
|
221
|
+ vo1.setStatus("AUDIT");
|
|
|
|
222
|
+ List<DelayedShipment> query = delayedShipmentService.query(vo1);
|
|
|
|
223
|
+ List<String> ids = new ArrayList<>();
|
|
|
|
224
|
+ if (CollectionUtils.isNotEmpty(query)) {
|
|
|
|
225
|
+ ids = query.stream().map(DelayedShipment::getId).collect(Collectors.toList());
|
|
|
|
226
|
+ }
|
|
|
|
227
|
+ QueryDelayedShipmentVo vo2 = new QueryDelayedShipmentVo();
|
|
|
|
228
|
+ vo2.setStatus("REFUSE");
|
|
|
|
229
|
+ List<DelayedShipment> query1 = delayedShipmentService.query(vo2);
|
|
|
|
230
|
+ if (CollectionUtils.isNotEmpty(query1)) {
|
|
|
|
231
|
+ ids.addAll(query.stream().map(DelayedShipment::getId).collect(Collectors.toList()));
|
|
|
|
232
|
+ }
|
|
|
|
233
|
+ List<String> orderSpecIdList = new ArrayList<>();
|
|
|
|
234
|
+ if (CollectionUtils.isNotEmpty(ids)) {
|
|
|
|
235
|
+ List<DelayedShipmentDetail> delayedShipmentDetails = delayedShipmentDetailService.queryByList(ids);
|
|
|
|
236
|
+ if (CollectionUtils.isNotEmpty(delayedShipmentDetails)) {
|
|
|
|
237
|
+ orderSpecIdList = delayedShipmentDetails.stream().map(DelayedShipmentDetail::getOrderSpecId).collect(Collectors.toList());
|
|
|
|
238
|
+ }
|
|
|
|
239
|
+ }
|
|
211
|
List<String> orderSpecIds = vo.getOrderSpecIds();
|
240
|
List<String> orderSpecIds = vo.getOrderSpecIds();
|
|
212
|
if (CollectionUtils.isNotEmpty(orderSpecIds)) {
|
241
|
if (CollectionUtils.isNotEmpty(orderSpecIds)) {
|
|
213
|
orderSpecIds.addAll(existOrderSpecIds);
|
242
|
orderSpecIds.addAll(existOrderSpecIds);
|
|
214
|
} else {
|
243
|
} else {
|
|
215
|
orderSpecIds = existOrderSpecIds;
|
244
|
orderSpecIds = existOrderSpecIds;
|
|
216
|
}
|
245
|
}
|
|
|
|
246
|
+ if (CollectionUtils.isNotEmpty(orderSpecIdList)) {
|
|
|
|
247
|
+ orderSpecIds.addAll(orderSpecIdList);
|
|
|
|
248
|
+ }
|
|
217
|
vo.setOrderSpecIds(orderSpecIds);
|
249
|
vo.setOrderSpecIds(orderSpecIds);
|
|
218
|
// 业务员做权限控制
|
250
|
// 业务员做权限控制
|
|
219
|
List<String> userIds = new ArrayList<>();
|
251
|
List<String> userIds = new ArrayList<>();
|