|
@@ -1296,6 +1296,31 @@ public class WmsDocOrderHeaderServiceImpl implements IWmsDocOrderHeaderService {
|
|
return AjaxResult.success();
|
|
return AjaxResult.success();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
+ public AjaxResult groupDiskBHCheck(GroupDiskFrom groupDiskFrom) {
|
|
|
|
+
|
|
|
|
+ // 验证出库单
|
|
|
|
+ WmsDocOrderHeader header = wmsDocOrderHeaderService.selectWmsDocOrderHeaderByOrderNo(groupDiskFrom.getOrderNo());
|
|
|
|
+ if (null == header) return AjaxResult.error("查无此出库单数据" + groupDiskFrom.getOrderNo());
|
|
|
|
+ if (!header.getOrderType().equals(Constant.ORDER_TYP.BH.getValue())) {
|
|
|
|
+ return AjaxResult.error("出库单类型不可备货组盘!");
|
|
|
|
+ }
|
|
|
|
+ if (!header.getOrderStatus().equals(Constant.ORDER_STS.STS10.getValue())
|
|
|
|
+ && !header.getOrderStatus().equals(Constant.ORDER_STS.STS20.getValue())
|
|
|
|
+ && !header.getOrderStatus().equals(Constant.ORDER_STS.STS22.getValue())) {
|
|
|
|
+ return AjaxResult.error("出库单状态不可备货组盘!");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //验证目标托盘库存,一个托盘只能备货一个出库单
|
|
|
|
+ AjaxResult ajaxResultC = invLotLocIdService.checkPalletIsOnlyOrderNo(groupDiskFrom.getPalletNoTo()
|
|
|
|
+ , groupDiskFrom.getOrderNo());
|
|
|
|
+ if (!ajaxResultC.isSuccess()) {
|
|
|
|
+ return ajaxResultC;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return AjaxResult.success();
|
|
|
|
+ }
|
|
|
|
+
|
|
@Transactional
|
|
@Transactional
|
|
@Override
|
|
@Override
|
|
public synchronized AjaxResult groupDiskBH(GroupDiskFrom groupDiskFrom) {
|
|
public synchronized AjaxResult groupDiskBH(GroupDiskFrom groupDiskFrom) {
|
|
@@ -1366,7 +1391,7 @@ public class WmsDocOrderHeaderServiceImpl implements IWmsDocOrderHeaderService {
|
|
// 组盘是把出库的库存重新组到一个新的托盘上,所以起始托盘和条码理应可以查询到系统里有对应的库存。
|
|
// 组盘是把出库的库存重新组到一个新的托盘上,所以起始托盘和条码理应可以查询到系统里有对应的库存。
|
|
if (invLotLocIdLotattList.size() == 0) {
|
|
if (invLotLocIdLotattList.size() == 0) {
|
|
// 备货(不是当前出库单分配的)
|
|
// 备货(不是当前出库单分配的)
|
|
- return groupDiskUnAllocationBH(groupDiskFrom);
|
|
|
|
|
|
+ return groupDiskUnAllocationBH(groupDiskFrom, taskQty);
|
|
// return AjaxResult.error(String.format("不存在对应库存!起始托盘:%s,条码:%s", palletNoFrom, sn));
|
|
// return AjaxResult.error(String.format("不存在对应库存!起始托盘:%s,条码:%s", palletNoFrom, sn));
|
|
}
|
|
}
|
|
// 产品的话基本只能查出有一条库存 但是物料可能会多条 但是我们只处理一条库存
|
|
// 产品的话基本只能查出有一条库存 但是物料可能会多条 但是我们只处理一条库存
|
|
@@ -1499,7 +1524,7 @@ public class WmsDocOrderHeaderServiceImpl implements IWmsDocOrderHeaderService {
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@Transactional
|
|
@Transactional
|
|
- public AjaxResult groupDiskUnAllocationBH(GroupDiskFrom groupDiskFrom) {
|
|
|
|
|
|
+ public AjaxResult groupDiskUnAllocationBH(GroupDiskFrom groupDiskFrom, int taskQty) {
|
|
String palletNoFrom = groupDiskFrom.getPalletNoFrom(); // 起始托盘
|
|
String palletNoFrom = groupDiskFrom.getPalletNoFrom(); // 起始托盘
|
|
String palletNoTo = groupDiskFrom.getPalletNoTo(); // 目标托盘
|
|
String palletNoTo = groupDiskFrom.getPalletNoTo(); // 目标托盘
|
|
String sn = groupDiskFrom.getSn(); // 条码号
|
|
String sn = groupDiskFrom.getSn(); // 条码号
|
|
@@ -1672,7 +1697,7 @@ public class WmsDocOrderHeaderServiceImpl implements IWmsDocOrderHeaderService {
|
|
boxInfoUpdate.setId(wmsBoxInfo.getId());
|
|
boxInfoUpdate.setId(wmsBoxInfo.getId());
|
|
boxInfoUpdate.setLocationId(currentVirtualZone);
|
|
boxInfoUpdate.setLocationId(currentVirtualZone);
|
|
wmsBoxInfoService.updateWmsBoxInfo(boxInfoUpdate);
|
|
wmsBoxInfoService.updateWmsBoxInfo(boxInfoUpdate);
|
|
- return AjaxResult.success("当前托盘备货成功!(未分配条码),还剩余未备数:" + residual);
|
|
|
|
|
|
+ return AjaxResult.success("当前托盘备货成功!(未分配条码),备货情况:" + taskQty + "/" + residual);
|
|
}
|
|
}
|
|
|
|
|
|
@Transactional
|
|
@Transactional
|