Commit e70d664b zshaohui

1.7寸预留外侧库位5个 其他不预留

1 个父辈 5b437e11
...@@ -238,8 +238,10 @@ public class JkemController { ...@@ -238,8 +238,10 @@ public class JkemController {
//判断对应的尺寸,外侧的库位,是否保留5个 //判断对应的尺寸,外侧的库位,是否保留5个
List<String> findCidList = new ArrayList<>(); List<String> findCidList = new ArrayList<>();
List<Storage> findNewStorageList = new ArrayList<>(); List<Storage> findNewStorageList = new ArrayList<>();
if (barcode.getPlateSize() == 7) {
for (Storage storage : newStorageList) { for (Storage storage : newStorageList) {
if (barcode.getPlateSize() == 7) {
int count = storagePosManager.getRemainPosCountByStorage(storage, barcode, taskService.excludePosIds(), "", "_F"); int count = storagePosManager.getRemainPosCountByStorage(storage, barcode, taskService.excludePosIds(), "", "_F");
if (count > 5) { if (count > 5) {
findCidList.add(storage.getCid()); findCidList.add(storage.getCid());
...@@ -247,10 +249,16 @@ public class JkemController { ...@@ -247,10 +249,16 @@ public class JkemController {
} else { } else {
log.info(storage.getCid() + "对应的尺寸:" + barcode.getPlateSize() + "x" + barcode.getHeight() + "外侧库位数量小于等于5个,忽略不入库"); log.info(storage.getCid() + "对应的尺寸:" + barcode.getPlateSize() + "x" + barcode.getHeight() + "外侧库位数量小于等于5个,忽略不入库");
} }
} else {
findCidList.add(storage.getCid());
findNewStorageList.add(storage);
} }
} }
if (findNewStorageList == null || findNewStorageList.isEmpty()){ if (findNewStorageList == null || findNewStorageList.isEmpty()){
throw new ValidateException("smfcore.noValidStorage", "[{0}]料仓列表中未找到可用的料仓",new String[]{barcode.getBarcode()}); throw new ValidateException("smfcore.noValidStorage", "[{0}]料仓列表中未找到可用的料仓",new String[]{barcode.getBarcode()});
} }
......
...@@ -84,7 +84,7 @@ public class StackerController { ...@@ -84,7 +84,7 @@ public class StackerController {
@RequestMapping("/getAvailableStorageByStacker") @RequestMapping("/getAvailableStorageByStacker")
@AnonymousAccess @AnonymousAccess
public ResultBean getAvailableStorageByStacker(String stacker,String storageCid) { public ResultBean getAvailableStorageByStacker(String stacker,String storageCid) {
log.info("获取可用料仓[{}]信息,排除的cid为{}", stacker,storageCid); //log.info("获取可用料仓[{}]信息,排除的cid为{}", stacker,storageCid);
if (StringUtils.isEmpty(stacker)) { if (StringUtils.isEmpty(stacker)) {
return ResultBean.newErrorResult(-1, "smfcore.valueCanotNull", "{0}不能为空", new String[]{"stacker"}); return ResultBean.newErrorResult(-1, "smfcore.valueCanotNull", "{0}不能为空", new String[]{"stacker"});
} }
...@@ -181,7 +181,7 @@ public class StackerController { ...@@ -181,7 +181,7 @@ public class StackerController {
stackerList = stackerList.stream().sorted(Comparator.comparing(StackerCache::getCount).reversed()).collect(Collectors.toList()); stackerList = stackerList.stream().sorted(Comparator.comparing(StackerCache::getCount).reversed()).collect(Collectors.toList());
for (StackerCache stackerCache : stackerList) { for (StackerCache stackerCache : stackerList) {
String sizeStr = stackerCache.getW() + "x" + stackerCache.getH(); String sizeStr = stackerCache.getW() + "x" + stackerCache.getH();
log.info("料串[{}],包含的尺寸信息有[{}]",stacker,sizeStr); //log.info("料串[{}],包含的尺寸信息有[{}]",stacker,sizeStr);
//根据尺寸找到空库位最多的料仓进行入库 //根据尺寸找到空库位最多的料仓进行入库
for (Storage storage : storageList) { for (Storage storage : storageList) {
Map<String, UsageItem> usageMap = storage.getUsageMap(); Map<String, UsageItem> usageMap = storage.getUsageMap();
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!