Commit 20c27e8e48e2bfc5c868328a525b786e90f547ee

Authored by yeqianyong
1 parent cf6b8ca2

楚江erp:发货计划明细新增去除时间限制

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