|
@@ -408,11 +408,19 @@ public class WmsDocOrderHeaderServiceImpl implements IWmsDocOrderHeaderService {
|
|
|
CodeSkuRelationshipVO codeSkuRelationshipVO = codeSkuRelationshipService.snCheck(sn);
|
|
|
WmsDocOrderHeader docOrderHeader = wmsDocOrderHeaderService.selectWmsDocOrderHeaderByOrderNo(orderNo);
|
|
|
// 查询出分配明细
|
|
|
+ List<ActAllocationDetailsFrom> actAllocationDetailsFromList = new ArrayList<>();
|
|
|
ActAllocationDetailsFrom actAllocationQuery = new ActAllocationDetailsFrom();
|
|
|
actAllocationQuery.setOrderNo(orderNo);
|
|
|
actAllocationQuery.setLotatt02(sn);
|
|
|
actAllocationQuery.setStatus(Constant.ORDER_STS.STS20.getValue());
|
|
|
- List<ActAllocationDetailsFrom> actAllocationDetailsFromList = actAllocationDetailsService.selectActAllocationDetailsInvLotAttList(actAllocationQuery);
|
|
|
+ actAllocationDetailsFromList = actAllocationDetailsService.selectActAllocationDetailsInvLotAttList(actAllocationQuery);
|
|
|
+ if (actAllocationDetailsFromList.size() == 0) {
|
|
|
+ actAllocationQuery.setStatus(Constant.ORDER_STS.STS30.getValue());
|
|
|
+ actAllocationDetailsFromList = actAllocationDetailsService.selectActAllocationDetailsInvLotAttList(actAllocationQuery);
|
|
|
+ }
|
|
|
+ if (actAllocationDetailsFromList.size() == 0) {
|
|
|
+ return AjaxResult.error("没有可以拣货的库存!");
|
|
|
+ }
|
|
|
// 最终确定要拣货的明细
|
|
|
ActAllocationDetailsFrom endActAllocation = null;
|
|
|
// 相等拣货数量的明细
|
|
@@ -461,7 +469,7 @@ public class WmsDocOrderHeaderServiceImpl implements IWmsDocOrderHeaderService {
|
|
|
invLotLocId.setQtyallocatedEach(invLotLocId.getQtyallocated());
|
|
|
invLotLocIdService.updateInvLotLocId(invLotLocId);
|
|
|
// 删除0库存
|
|
|
- invLotLocIdService.clearZeroInventory(locationId.toString(),customerId,sku,lotnum);
|
|
|
+ invLotLocIdService.clearZeroInventory(locationId.toString(), customerId, sku, lotnum);
|
|
|
// 更新出库单拣货数量
|
|
|
WmsDocOrderDetails wmsDocOrderDetails = wmsDocOrderDetailsMapper.selectWmsDocOrderDetailsByNoLineNo(endActAllocation.getOrderNo(), endActAllocation.getLineNo());
|
|
|
wmsDocOrderDetails.setQtyPicked(wmsDocOrderDetails.getQtyPicked().add(qty));
|
|
@@ -888,6 +896,10 @@ public class WmsDocOrderHeaderServiceImpl implements IWmsDocOrderHeaderService {
|
|
|
query.setLotatt02(snCheckSoForm.getSn());
|
|
|
query.setStatus(Constant.ORDER_STS.STS20.getValue());
|
|
|
ActAllocationDetailsFrom actAllocationDetailsFrom = actAllocationDetailsService.selectActAllocationDetailsInvLotAttByModel(query);
|
|
|
+ if (actAllocationDetailsFrom == null) {
|
|
|
+ query.setStatus(Constant.ORDER_STS.STS30.getValue());
|
|
|
+ actAllocationDetailsFrom = actAllocationDetailsService.selectActAllocationDetailsInvLotAttByModel(query);
|
|
|
+ }
|
|
|
if (actAllocationDetailsFrom != null) {
|
|
|
codeSkuRelationshipSoVO.setOrderNo(actAllocationDetailsFrom.getOrderNo());
|
|
|
codeSkuRelationshipSoVO.setSku(actAllocationDetailsFrom.getMaterial());
|