Commit 2d678f210092f8e2b11db951bf6f3ff0105d0d6f

Authored by yeqianyong
2 parents 0ee93a92 20c27e8e

Merge branch 'master_after20' into master_cj_zq

@@ -171,6 +171,7 @@ public class ShipmentsPlanDetailServiceImpl extends BaseMpServiceImpl<ShipmentsP @@ -171,6 +171,7 @@ public class ShipmentsPlanDetailServiceImpl extends BaseMpServiceImpl<ShipmentsP
171 throw new DefaultClientException("发货计划不存在!"); 171 throw new DefaultClientException("发货计划不存在!");
172 } 172 }
173 vo.setWorkshopId(plan.getWorkshopId()); 173 vo.setWorkshopId(plan.getWorkshopId());
  174 + List<String> existOrderSpecIds = new ArrayList<>();
174 // 获取已经存在的明细数据 175 // 获取已经存在的明细数据
175 LambdaQueryWrapper<ShipmentsPlanDetail> queryWrapper = Wrappers.lambdaQuery(ShipmentsPlanDetail.class); 176 LambdaQueryWrapper<ShipmentsPlanDetail> queryWrapper = Wrappers.lambdaQuery(ShipmentsPlanDetail.class);
176 queryWrapper.eq(ShipmentsPlanDetail::getPreShipments, Boolean.FALSE) 177 queryWrapper.eq(ShipmentsPlanDetail::getPreShipments, Boolean.FALSE)
@@ -178,13 +179,14 @@ public class ShipmentsPlanDetailServiceImpl extends BaseMpServiceImpl<ShipmentsP @@ -178,13 +179,14 @@ public class ShipmentsPlanDetailServiceImpl extends BaseMpServiceImpl<ShipmentsP
178 List<ShipmentsPlanDetail> detailList = getBaseMapper().selectList(queryWrapper); 179 List<ShipmentsPlanDetail> detailList = getBaseMapper().selectList(queryWrapper);
179 if (CollectionUtils.isNotEmpty(detailList)) { 180 if (CollectionUtils.isNotEmpty(detailList)) {
180 List<String> orderSpecIds = detailList.stream().map(ShipmentsPlanDetail::getOrderSpecId).collect(Collectors.toList()); 181 List<String> orderSpecIds = detailList.stream().map(ShipmentsPlanDetail::getOrderSpecId).collect(Collectors.toList());
181 - vo.setOrderSpecIds(orderSpecIds); 182 + existOrderSpecIds.addAll(orderSpecIds);
182 } 183 }
183 detailList = listByPlanId(plan.getId(), true); 184 detailList = listByPlanId(plan.getId(), true);
184 if (CollectionUtils.isNotEmpty(detailList)) { 185 if (CollectionUtils.isNotEmpty(detailList)) {
185 List<String> orderSpecIds = detailList.stream().map(ShipmentsPlanDetail::getOrderSpecId).collect(Collectors.toList()); 186 List<String> orderSpecIds = detailList.stream().map(ShipmentsPlanDetail::getOrderSpecId).collect(Collectors.toList());
186 - vo.setOrderSpecIds(orderSpecIds); 187 + existOrderSpecIds.addAll(orderSpecIds);
187 } 188 }
  189 + vo.setOrderSpecIds(existOrderSpecIds);
188 // 开启分页 190 // 开启分页
189 PageHelperUtil.startPage(pageIndex, pageSize); 191 PageHelperUtil.startPage(pageIndex, pageSize);
190 List<ShipmentsPlanDetail> dataList = getBaseMapper().queryCanShipmentsData(vo); 192 List<ShipmentsPlanDetail> dataList = getBaseMapper().queryCanShipmentsData(vo);
@@ -190,7 +190,7 @@ @@ -190,7 +190,7 @@
190 from tbl_purchase_order_line ol 190 from tbl_purchase_order_line ol
191 inner join purchase_order_info o on ol.purchase_order_id = o.id 191 inner join purchase_order_info o on ol.purchase_order_id = o.id
192 left join base_data_customer c on o.ordering_unit = c.id 192 left join base_data_customer c on o.ordering_unit = c.id
193 - where ol.delivery_date >= #{vo.shipmentDate} and ol.del_flag = false 193 + where ol.del_flag = false
194 and o.type = 'PRODUCTION' and o.examine_status = 'PASS' and o.status not in ('SHIPPED', 'DELIVERED', 'CANCEL') 194 and o.type = 'PRODUCTION' and o.examine_status = 'PASS' and o.status not in ('SHIPPED', 'DELIVERED', 'CANCEL')
195 and (o.revoke_status != 'UNDOING' or o.revoke_status is null) 195 and (o.revoke_status != 'UNDOING' or o.revoke_status is null)
196 and (o.spec_change_status != 'IN_PROGRESS' or o.spec_change_status is null) 196 and (o.spec_change_status != 'IN_PROGRESS' or o.spec_change_status is null)