|
@@ -559,6 +559,9 @@ public class WmsDocOrderHeaderServiceImpl implements IWmsDocOrderHeaderService {
|
|
// 二次组盘查询不到
|
|
// 二次组盘查询不到
|
|
if (pickingListVOS.size() == 0) {
|
|
if (pickingListVOS.size() == 0) {
|
|
InvLocIdSearchFrom invLocIdSearchFrom = new InvLocIdSearchFrom();
|
|
InvLocIdSearchFrom invLocIdSearchFrom = new InvLocIdSearchFrom();
|
|
|
|
+ LotattDTO lotattDTO = new LotattDTO();
|
|
|
|
+ lotattDTO.setLotatt07(palletNo);
|
|
|
|
+ invLocIdSearchFrom.setLotattDTO(lotattDTO);
|
|
List<InvLotLocIdLotattVO> invLotLocIdLotattVOList = invLotLocIdService.selectInvLocIdLotattList(invLocIdSearchFrom);
|
|
List<InvLotLocIdLotattVO> invLotLocIdLotattVOList = invLotLocIdService.selectInvLocIdLotattList(invLocIdSearchFrom);
|
|
for (InvLotLocIdLotattVO locIdLotattVO : invLotLocIdLotattVOList) {
|
|
for (InvLotLocIdLotattVO locIdLotattVO : invLotLocIdLotattVOList) {
|
|
PickingListVO pickingListVO = new PickingListVO();
|
|
PickingListVO pickingListVO = new PickingListVO();
|
|
@@ -586,7 +589,7 @@ public class WmsDocOrderHeaderServiceImpl implements IWmsDocOrderHeaderService {
|
|
ActAllocationDetailsFrom actAllocationQuery = new ActAllocationDetailsFrom();
|
|
ActAllocationDetailsFrom actAllocationQuery = new ActAllocationDetailsFrom();
|
|
actAllocationQuery.setOrderNo(orderNo);
|
|
actAllocationQuery.setOrderNo(orderNo);
|
|
actAllocationQuery.setLotatt02(sn);
|
|
actAllocationQuery.setLotatt02(sn);
|
|
- actAllocationQuery.setStatus(Constant.ORDER_STS.STS20.getValue());
|
|
|
|
|
|
+ actAllocationQuery.setStatus(Constant.ORDER_STS.STS21.getValue());
|
|
actAllocationDetailsFromList = actAllocationDetailsService.selectActAllocationDetailsInvLotAttList(actAllocationQuery);
|
|
actAllocationDetailsFromList = actAllocationDetailsService.selectActAllocationDetailsInvLotAttList(actAllocationQuery);
|
|
if (actAllocationDetailsFromList.size() == 0) {
|
|
if (actAllocationDetailsFromList.size() == 0) {
|
|
actAllocationQuery.setStatus(Constant.ORDER_STS.STS30.getValue());
|
|
actAllocationQuery.setStatus(Constant.ORDER_STS.STS30.getValue());
|
|
@@ -602,7 +605,7 @@ public class WmsDocOrderHeaderServiceImpl implements IWmsDocOrderHeaderService {
|
|
.stream()
|
|
.stream()
|
|
.filter(v -> {
|
|
.filter(v -> {
|
|
BigDecimal canPickNum = v.getQty().subtract(v.getPickQty());
|
|
BigDecimal canPickNum = v.getQty().subtract(v.getPickQty());
|
|
- return canPickNum.compareTo(qty) == 1;
|
|
|
|
|
|
+ return canPickNum.compareTo(qty) == 0;
|
|
}).collect(Collectors.toList());
|
|
}).collect(Collectors.toList());
|
|
// 大于拣货数量的明细
|
|
// 大于拣货数量的明细
|
|
List<ActAllocationDetailsFrom> greaterAllocationList = new ArrayList<>();
|
|
List<ActAllocationDetailsFrom> greaterAllocationList = new ArrayList<>();
|
|
@@ -611,7 +614,7 @@ public class WmsDocOrderHeaderServiceImpl implements IWmsDocOrderHeaderService {
|
|
.stream()
|
|
.stream()
|
|
.filter(v -> {
|
|
.filter(v -> {
|
|
BigDecimal canPickNum = v.getQty().subtract(v.getPickQty());
|
|
BigDecimal canPickNum = v.getQty().subtract(v.getPickQty());
|
|
- return canPickNum.compareTo(qty) == 0;
|
|
|
|
|
|
+ return canPickNum.compareTo(qty) == 1;
|
|
}).collect(Collectors.toList());
|
|
}).collect(Collectors.toList());
|
|
if (greaterAllocationList.size() > 0) {
|
|
if (greaterAllocationList.size() > 0) {
|
|
endActAllocation = greaterAllocationList.get(0);
|
|
endActAllocation = greaterAllocationList.get(0);
|
|
@@ -633,7 +636,7 @@ public class WmsDocOrderHeaderServiceImpl implements IWmsDocOrderHeaderService {
|
|
actAllocationDetailsService.updateActAllocationDetails(allocationUpdate);
|
|
actAllocationDetailsService.updateActAllocationDetails(allocationUpdate);
|
|
// 更新库存数量
|
|
// 更新库存数量
|
|
String lotnum = endActAllocation.getLotnum();
|
|
String lotnum = endActAllocation.getLotnum();
|
|
- Long locationId = endActAllocation.getLocationId();
|
|
|
|
|
|
+ Long locationId = Constant.LOC_SORTATION_CACHE;
|
|
String sku = endActAllocation.getMaterial();
|
|
String sku = endActAllocation.getMaterial();
|
|
String customerId = Constant.CUSTOMER_ID;
|
|
String customerId = Constant.CUSTOMER_ID;
|
|
InvLotLocId invLotLocId = invLotLocIdService.selectInvLotLocIdById(locationId.toString(), customerId, sku, lotnum);
|
|
InvLotLocId invLotLocId = invLotLocIdService.selectInvLotLocIdById(locationId.toString(), customerId, sku, lotnum);
|
|
@@ -653,6 +656,7 @@ public class WmsDocOrderHeaderServiceImpl implements IWmsDocOrderHeaderService {
|
|
wmsDocOrderDetails.setLineStatus(Constant.ORDER_STS.STS40.getValue());
|
|
wmsDocOrderDetails.setLineStatus(Constant.ORDER_STS.STS40.getValue());
|
|
}
|
|
}
|
|
wmsDocOrderDetailsMapper.updateWmsDocOrderDetails(wmsDocOrderDetails);
|
|
wmsDocOrderDetailsMapper.updateWmsDocOrderDetails(wmsDocOrderDetails);
|
|
|
|
+ // todo 更新头单
|
|
return AjaxResult.success("拣货成功");
|
|
return AjaxResult.success("拣货成功");
|
|
}
|
|
}
|
|
|
|
|
|
@@ -708,6 +712,7 @@ public class WmsDocOrderHeaderServiceImpl implements IWmsDocOrderHeaderService {
|
|
wmsDocOrderDetails.setLineStatus(Constant.ORDER_STS.STS99.getValue());
|
|
wmsDocOrderDetails.setLineStatus(Constant.ORDER_STS.STS99.getValue());
|
|
wmsDocOrderDetailsMapper.updateWmsDocOrderDetails(wmsDocOrderDetails);
|
|
wmsDocOrderDetailsMapper.updateWmsDocOrderDetails(wmsDocOrderDetails);
|
|
}
|
|
}
|
|
|
|
+ // todo 分配明细为拣货完成
|
|
}
|
|
}
|
|
// 备货 修改出库单为备货状态
|
|
// 备货 修改出库单为备货状态
|
|
// if (header != null && header.getOrderType().equals(Constant.ORDER_TYP.BH.getValue())) {
|
|
// if (header != null && header.getOrderType().equals(Constant.ORDER_TYP.BH.getValue())) {
|