|
@@ -876,7 +876,7 @@ public class InvLotLocIdServiceImpl implements IInvLotLocIdService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public AjaxResult releaseLocation(String locationFrom, Long warehouseId, String updateBy) {
|
|
|
+ public AjaxResult releaseLocation(String locationFrom,Long locationTo,Long warehouseId, String updateBy) {
|
|
|
|
|
|
BaseLocationInfo baseLocationInfo = baseLocationInfoService.selectBaseLocationInfoByIdOrNo(locationFrom, Constant.WAREHOUSE_ID);
|
|
|
if (null == baseLocationInfo) return AjaxResult.error("查无库位信息");
|
|
@@ -886,7 +886,8 @@ public class InvLotLocIdServiceImpl implements IInvLotLocIdService {
|
|
|
|
|
|
if (BaseLocationZone.ZONE_OUTBOUND == baseLocationInfo.getZoneId().intValue()) {
|
|
|
for (InvLotLocId invLotLocId : invLotLocIdList) {
|
|
|
- invLotLocIdMapper.updateLocation(Long.parseLong(invLotLocId.getLocationId()), Constant.LOC_SORTATION_CACHE);
|
|
|
+ invLotLocIdMapper.updateLocation(Long.parseLong(invLotLocId.getLocationId())
|
|
|
+ , locationTo);
|
|
|
}
|
|
|
} else {
|
|
|
return AjaxResult.error("出库缓存区的库位才可释放!");
|
|
@@ -894,11 +895,11 @@ public class InvLotLocIdServiceImpl implements IInvLotLocIdService {
|
|
|
|
|
|
baseLocationInfoService.unOccupyLocation(baseLocationInfo.getId(), warehouseId, updateBy);
|
|
|
|
|
|
- baseLocationInfoService.occupyLocation(Constant.LOC_SORTATION_CACHE, warehouseId, updateBy);
|
|
|
+ baseLocationInfoService.occupyLocation(locationTo, warehouseId, updateBy);
|
|
|
|
|
|
WmsBoxInfo wmsBoxInfo = iWmsBoxInfoService.selectByLocationId(String.valueOf(baseLocationInfo.getId()));
|
|
|
if (wmsBoxInfo != null) {
|
|
|
- iWmsBoxInfoService.updateLocationBind(baseLocationInfo.getId(), Constant.LOC_SORTATION_CACHE
|
|
|
+ iWmsBoxInfoService.updateLocationBind(baseLocationInfo.getId(), locationTo
|
|
|
, wmsBoxInfo.getIsFull() == null ? "" : wmsBoxInfo.getIsFull());
|
|
|
}
|
|
|
|
|
@@ -918,36 +919,38 @@ public class InvLotLocIdServiceImpl implements IInvLotLocIdService {
|
|
|
if (invLotLocIdLotattVOS.size() == 0) {
|
|
|
return AjaxResult.error("不存在对应释放库存!");
|
|
|
}
|
|
|
-
|
|
|
- InvLotLocIdLotattVO invLotLocIdLotattVO = invLotLocIdLotattVOS.get(0);
|
|
|
-
|
|
|
-
|
|
|
- if (StringUtils.isEmpty(invLotLocIdLotattVO.getLotatt15())
|
|
|
- && StringUtils.isNotEmpty(invLotLocIdLotattVO.getLotatt14())) {
|
|
|
- WmsDocOrderHeader wmsDocOrderHeader = wmsDocOrderHeaderService.selectWmsDocOrderHeaderByOrderNo(invLotLocIdLotattVO.getLotatt14());
|
|
|
- if (!wmsDocOrderHeader.getOrderStatus().equals(Constant.ORDER_STS.STS23.getValue())
|
|
|
- && !wmsDocOrderHeader.getOrderStatus().equals(Constant.ORDER_STS.STS98.getValue())
|
|
|
- && !wmsDocOrderHeader.getOrderStatus().equals(Constant.ORDER_STS.STS99.getValue())) {
|
|
|
-
|
|
|
- return AjaxResult.error("备货单还未备货完成,不可直接出库!" + invLotLocIdLotattVO.getLotatt14());
|
|
|
+
|
|
|
+ boolean con = false;
|
|
|
+ InvLotLocIdLotattVO vo = null;
|
|
|
+ for (InvLotLocIdLotattVO lotLocIdLotattVO : invLotLocIdLotattVOS) {
|
|
|
+
|
|
|
+ if (StringUtils.isEmpty(lotLocIdLotattVO.getLotatt15())
|
|
|
+ && StringUtils.isNotEmpty(lotLocIdLotattVO.getLotatt14())) {
|
|
|
+ vo = lotLocIdLotattVO;
|
|
|
+ con = true;
|
|
|
}
|
|
|
- return AjaxResult.error("备货库存库位释放请用【PDA备货库位释放】功能");
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
- if (StringUtils.isEmpty(invLotLocIdLotattVO.getLotatt15())) {
|
|
|
+ if (con) {
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ return invLotLocIdService.releaseLocation(basLocationForm.getLocationNo(), Constant.LOC_SORTATION02_CACHE
|
|
|
+ ,Constant.WAREHOUSE_ID, "PDA");
|
|
|
+ }
|
|
|
+ if (StringUtils.isEmpty(invLotLocIdLotattVOS.get(0).getLotatt15())) {
|
|
|
|
|
|
return AjaxResult.error("移库暂时不支持释放!");
|
|
|
|
|
|
}
|
|
|
- String lotatt15 = invLotLocIdLotattVO.getLotatt15();
|
|
|
- WmsDocOrderHeader wmsDocOrderHeader = wmsDocOrderHeaderService.selectWmsDocOrderHeaderByOrderNo(lotatt15);
|
|
|
|
|
|
- return invLotLocIdService.releaseLocation(basLocationForm.getLocationNo(), Constant.WAREHOUSE_ID, "PDA");
|
|
|
+ return invLotLocIdService.releaseLocation(basLocationForm.getLocationNo(), Constant.LOC_SORTATION_CACHE
|
|
|
+ ,Constant.WAREHOUSE_ID, "PDA");
|
|
|
}
|
|
|
|
|
|
@Transactional
|
|
@@ -969,9 +972,8 @@ public class InvLotLocIdServiceImpl implements IInvLotLocIdService {
|
|
|
if (locIdLotattVO.getZoneId().equals(Constant.ZONE_TYPE.ZONE_INV.getValue())) {
|
|
|
return AjaxResult.error("托盘在货架上,不可出库!");
|
|
|
}
|
|
|
- if (!locIdLotattVO.getZoneId().equals(Constant.ZONE_TYPE.ZONE_OUT.getValue())
|
|
|
- && !locIdLotattVO.getLocationId().equals(Constant.LOC_SORTATION02_CACHE)) {
|
|
|
- return AjaxResult.error("托盘不在指定的出库位,不可出库!");
|
|
|
+ if (!locIdLotattVO.getLocationId().equals(Constant.LOC_SORTATION02_CACHE)) {
|
|
|
+ return AjaxResult.error("托盘不在线边位,不可出库!");
|
|
|
}
|
|
|
orderNo = locIdLotattVO.getLotatt14();
|
|
|
locationId = locIdLotattVO.getLocationId();
|