|
...
|
...
|
@@ -172,8 +172,17 @@ public class ShipmentsPlanDetailServiceImpl extends BaseMpServiceImpl<ShipmentsP |
|
172
|
172
|
}
|
|
173
|
173
|
vo.setWorkshopId(plan.getWorkshopId());
|
|
174
|
174
|
// 获取已经存在的明细数据
|
|
175
|
|
- List<String> orderSpecIds = getBaseMapper().getExistsOrderSpecIds(plan.getAfTomoPreShipDate());
|
|
176
|
|
- if (CollectionUtils.isNotEmpty(orderSpecIds)) {
|
|
|
175
|
+ LambdaQueryWrapper<ShipmentsPlanDetail> queryWrapper = Wrappers.lambdaQuery(ShipmentsPlanDetail.class);
|
|
|
176
|
+ queryWrapper.eq(ShipmentsPlanDetail::getPreShipments, Boolean.FALSE)
|
|
|
177
|
+ .eq(ShipmentsPlanDetail::getDelFlag, Boolean.FALSE);
|
|
|
178
|
+ List<ShipmentsPlanDetail> detailList = getBaseMapper().selectList(queryWrapper);
|
|
|
179
|
+ if (CollectionUtils.isNotEmpty(detailList)) {
|
|
|
180
|
+ List<String> orderSpecIds = detailList.stream().map(ShipmentsPlanDetail::getOrderSpecId).collect(Collectors.toList());
|
|
|
181
|
+ vo.setOrderSpecIds(orderSpecIds);
|
|
|
182
|
+ }
|
|
|
183
|
+ detailList = listByPlanId(plan.getId(), true);
|
|
|
184
|
+ if (CollectionUtils.isNotEmpty(detailList)) {
|
|
|
185
|
+ List<String> orderSpecIds = detailList.stream().map(ShipmentsPlanDetail::getOrderSpecId).collect(Collectors.toList());
|
|
177
|
186
|
vo.setOrderSpecIds(orderSpecIds);
|
|
178
|
187
|
}
|
|
179
|
188
|
// 开启分页
|
|
...
|
...
|
@@ -254,10 +263,12 @@ public class ShipmentsPlanDetailServiceImpl extends BaseMpServiceImpl<ShipmentsP |
|
254
|
263
|
orderIds.add(orderId);
|
|
255
|
264
|
}
|
|
256
|
265
|
}
|
|
257
|
|
- QueryShipmentsPlanDetailVo detailVo = new QueryShipmentsPlanDetailVo();
|
|
258
|
|
- detailVo.setOrderSpecIds(orderSpecIds);
|
|
259
|
|
- detailVo.setCompleted(Boolean.TRUE);
|
|
260
|
|
- List<ShipmentsPlanDetail> detailList = query(detailVo);
|
|
|
266
|
+ // 获取已经加入过发货计划中的数据
|
|
|
267
|
+ LambdaQueryWrapper<ShipmentsPlanDetail> queryWrapper = Wrappers.lambdaQuery(ShipmentsPlanDetail.class);
|
|
|
268
|
+ queryWrapper.in(ShipmentsPlanDetail::getOrderSpecId, orderSpecIds)
|
|
|
269
|
+ .eq(ShipmentsPlanDetail::getDelFlag, Boolean.FALSE)
|
|
|
270
|
+ .eq(ShipmentsPlanDetail::getPreShipments, Boolean.FALSE);
|
|
|
271
|
+ List<ShipmentsPlanDetail> detailList = getBaseMapper().selectList(queryWrapper);
|
|
261
|
272
|
if (CollectionUtils.isNotEmpty(detailList)) {
|
|
262
|
273
|
List<String> orderSpecIdList = detailList.stream().map(ShipmentsPlanDetail::getOrderSpecId).distinct().collect(Collectors.toList());
|
|
263
|
274
|
// 过滤掉已发货的数据
|
...
|
...
|
|