no message
parent
c17f8e991d
commit
247ee06b62
|
|
@ -330,9 +330,6 @@ public class StockServiceImpl implements StockService {
|
||||||
String firstItemCode = barCodeVos.iterator().next().getItemCode();
|
String firstItemCode = barCodeVos.iterator().next().getItemCode();
|
||||||
Item item = validateItem(firstItemCode);
|
Item item = validateItem(firstItemCode);
|
||||||
|
|
||||||
/**验证容器类型和物料类型是否匹配*/
|
|
||||||
validateStockAndItem(stock, item);
|
|
||||||
|
|
||||||
/*容器类型:小件入库则入小件缓存区、大件入库则入大件缓存区*/
|
/*容器类型:小件入库则入小件缓存区、大件入库则入大件缓存区*/
|
||||||
validateStockType(stock.getStockType());
|
validateStockType(stock.getStockType());
|
||||||
|
|
||||||
|
|
@ -347,7 +344,7 @@ public class StockServiceImpl implements StockService {
|
||||||
|
|
||||||
|
|
||||||
/**验证终点点位*/
|
/**验证终点点位*/
|
||||||
String areaCode = stockTypeToAreaMap.getValueByKey(stock.getStockType());
|
String areaCode = stockTypeToAreaMap.getValueByKey(item.getGoodType());
|
||||||
Point endPoint = validateEndPoint(item, areaCode);
|
Point endPoint = validateEndPoint(item, areaCode);
|
||||||
|
|
||||||
/**创建下发任务*/
|
/**创建下发任务*/
|
||||||
|
|
@ -407,7 +404,7 @@ public class StockServiceImpl implements StockService {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void validateStockType(String stockType) {
|
private void validateStockType(String stockType) {
|
||||||
if (!stockTypeToAreaMap.getStockTypeToAreaMap().containsKey(stockType)) {
|
if (!"托盘".equals(stockType)) {
|
||||||
throw new RuntimeException(stockType + "容器类型错误!");
|
throw new RuntimeException(stockType + "容器类型错误!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -477,7 +474,7 @@ public class StockServiceImpl implements StockService {
|
||||||
|
|
||||||
taskFuture.join();
|
taskFuture.join();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException("创建任务记录失败!", e);
|
throw new RuntimeException("创建任务失败!", e);
|
||||||
} finally {
|
} finally {
|
||||||
executor.shutdown();
|
executor.shutdown();
|
||||||
}
|
}
|
||||||
|
|
@ -757,11 +754,7 @@ public class StockServiceImpl implements StockService {
|
||||||
}
|
}
|
||||||
|
|
||||||
private Point validateEndPoint(Item item, String areaCode) {
|
private Point validateEndPoint(Item item, String areaCode) {
|
||||||
Double itemHeight = null;
|
Point endPoint = pointService.findByCode(null, BaseStatus.FREE, BaseStatus.STORAGE, areaCode, null, null);
|
||||||
if (AreaNameDic.XJQ.equals(areaCode)) {
|
|
||||||
itemHeight = item.getExtendD2();//整托高度
|
|
||||||
}
|
|
||||||
Point endPoint = pointService.findByCode(null, BaseStatus.FREE, BaseStatus.STORAGE, areaCode, null, itemHeight);
|
|
||||||
if (endPoint == null) {
|
if (endPoint == null) {
|
||||||
throw new RuntimeException(areaCode + "没有空闲点位!");
|
throw new RuntimeException(areaCode + "没有空闲点位!");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,8 @@ public class StockTypeToAreaMap {
|
||||||
static {
|
static {
|
||||||
stockTypeToAreaMap = new HashMap<>();
|
stockTypeToAreaMap = new HashMap<>();
|
||||||
// 初始化Map
|
// 初始化Map
|
||||||
stockTypeToAreaMap.put("小件入库", AreaNameDic.XJQ);
|
stockTypeToAreaMap.put("小件", AreaNameDic.XJQ);
|
||||||
stockTypeToAreaMap.put("大件入库", AreaNameDic.DJQ);
|
stockTypeToAreaMap.put("大件", AreaNameDic.DJQ);
|
||||||
// 更多的初始化操作...
|
// 更多的初始化操作...
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue