|
@@ -2745,6 +2745,14 @@ public class WmsDocOrderHeaderServiceImpl implements IWmsDocOrderHeaderService {
|
|
|
return wmsDocOrderHeaderService.pdaUnbind(unbindDTO);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * PDA解绑物料并发控制
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public synchronized AjaxResult syncGroupDiskBHCheck(GroupDiskFrom groupDiskFrom){
|
|
|
+ return wmsDocOrderHeaderService.groupDiskBHCheck(groupDiskFrom);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* PDA理货备货并发控制
|
|
|
*/
|
|
@@ -2863,7 +2871,7 @@ public class WmsDocOrderHeaderServiceImpl implements IWmsDocOrderHeaderService {
|
|
|
public AjaxResult pdaGroupDisk(PdaGroupDiskDTO pdaGroupDiskDTO) {
|
|
|
GroupDiskConvertDTO groupDiskConvertDTO = buildGroupDiskConvertDTO(pdaGroupDiskDTO);
|
|
|
String locationId = invLotLocGroupDisk(groupDiskConvertDTO);
|
|
|
- BigDecimal palletTotal = invLotAttService.queryPalletTotal(groupDiskConvertDTO.getPalletTo());
|
|
|
+ BigDecimal palletTotal = invLotAttService.queryPalletTotal(groupDiskConvertDTO.getPalletTo(), locationId);
|
|
|
if (StringUtils.isBlank(groupDiskConvertDTO.getWmsOrderNo())) return AjaxResult.success("组盘成功!托盘数量: " + palletTotal);
|
|
|
groupDiskConvertDTO.setLocationId(locationId);
|
|
|
wmsDocOrderGroupDisk(groupDiskConvertDTO);
|
|
@@ -2906,11 +2914,11 @@ public class WmsDocOrderHeaderServiceImpl implements IWmsDocOrderHeaderService {
|
|
|
InvLotLocId invLotLocId = invLotLocIdService.queryInvLotLocIdByLotnum(unbindDTO.getLotnum());
|
|
|
Long locationId = unbindWmsBox(unbindDTO.getPalletTo(), unbindDTO.getPalletFrom());
|
|
|
unbindInvLotLoc(unbindDTO.getLotnum(), locationId, unbindDTO.getPalletFrom(), unbindDTO.getSku());
|
|
|
- if (StringUtils.isBlank(unbindDTO.getErpNo())) return AjaxResult.success("托盘:" + unbindDTO.getPalletTo() + "解绑成功!托盘数量: " + invLotAttService.queryPalletTotal(unbindDTO.getPalletTo()));
|
|
|
+ if (StringUtils.isBlank(unbindDTO.getErpNo())) return AjaxResult.success("托盘:" + unbindDTO.getPalletTo() + "解绑成功!托盘数量: " + invLotAttService.queryPalletTotal(unbindDTO.getPalletTo(), locationId.toString()));
|
|
|
// 删除条码扫描记录
|
|
|
erpBarcodesService.untieRecordErpBarcodeListAsnSo(unbindDTO.getErpNo(), null, unbindDTO.getSn());
|
|
|
unbindWmsDocOrder(unbindDTO.getErpNo(), invLotLocId.getQty(), unbindDTO.getSku());
|
|
|
- return AjaxResult.success("托盘:" + unbindDTO.getPalletTo() + "解绑成功!托盘数量: " + invLotAttService.queryPalletTotal(unbindDTO.getPalletTo()));
|
|
|
+ return AjaxResult.success("托盘:" + unbindDTO.getPalletTo() + "解绑成功!托盘数量: " + invLotAttService.queryPalletTotal(unbindDTO.getPalletTo(), locationId.toString()));
|
|
|
}
|
|
|
|
|
|
private List<WmsDocOrderDetails> getWmsDocOrderDetailsList(List<String> orderList, String orderType){
|
|
@@ -3008,8 +3016,7 @@ public class WmsDocOrderHeaderServiceImpl implements IWmsDocOrderHeaderService {
|
|
|
reversePickInventoryMatchDTO.getQty(), palletMatchLogList);
|
|
|
invLotAttPalletTotalDTOList.addAll(invLotAttPalletTotalList);
|
|
|
}
|
|
|
- LinkedList<Object> result = ListUtil.toLinkedList(flag, invLotAttPalletTotalDTOList);
|
|
|
- return result;
|
|
|
+ return ListUtil.toLinkedList(flag, invLotAttPalletTotalDTOList);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -3151,11 +3158,12 @@ public class WmsDocOrderHeaderServiceImpl implements IWmsDocOrderHeaderService {
|
|
|
String orderNo = StringUtils.isNotBlank(groupDiskConvertDTO.getWmsOrderNo()) ? groupDiskConvertDTO.getWmsOrderNo() : null;
|
|
|
//创建新批次
|
|
|
InvLotLocId invLotLocId = invLotLocIdList.stream().findFirst().orElseThrow(() -> new BaseException("库位库存信息丢失!"));
|
|
|
+ BigDecimal qtyAllocated = ObjectUtil.isNotNull(invLotLocId.getQtyallocated()) ? invLotLocId.getQtyallocated() : BigDecimal.ZERO;
|
|
|
+ BigDecimal invLotLocQty = invLotLocId.getQty().subtract(qtyAllocated);
|
|
|
+ Assert.isTrue(NumberUtil.isGreater(invLotLocQty, BigDecimal.ZERO), "该产品已备货!");
|
|
|
String asnNo = invLotAttList.stream().filter(item -> item.getLotnum().equals(invLotLocId.getLotnum())).map(InvLotAtt::getLotatt08).findFirst().orElseThrow(() -> new BaseException("此批次入库信息丢失!"));
|
|
|
String sku = groupDiskConvertDTO.getSku();
|
|
|
invLotAttService.insertInvLotAtt(buildInvLotAtt(groupDiskConvertDTO.getLotNum(), groupDiskConvertDTO.getPalletTo(), orderNo, groupDiskConvertDTO.getSn(), sku, asnNo));
|
|
|
- BigDecimal qtyAllocated = ObjectUtil.isNotNull(invLotLocId.getQtyallocated()) ? invLotLocId.getQtyallocated() : BigDecimal.ZERO;
|
|
|
- BigDecimal invLotLocQty = invLotLocId.getQty().subtract(qtyAllocated);
|
|
|
//验证托盘相关信息并获取指向托盘库位信息
|
|
|
String locationId = verifyInvLotAndGetLocationId(groupDiskConvertDTO.getPalletTo(), groupDiskConvertDTO.getSn(), orderNo);
|
|
|
locationId = StringUtils.isNotBlank(locationId) ? locationId : invLotLocId.getLocationId();
|