Commit 50e099d6 孙克

物料禁用后,弹框确认是否强制出库, 强制出库时, 不检查是否禁用

物料已禁用,还会出库问题修改
1 个父辈 7e31f997
...@@ -558,7 +558,7 @@ public class LiteOrderCache { ...@@ -558,7 +558,7 @@ public class LiteOrderCache {
throw new ValidateException("",pos.getBarcode().getBarcode()+"被禁用,库位为:"+pos.getPosName()); throw new ValidateException("",pos.getBarcode().getBarcode()+"被禁用,库位为:"+pos.getPosName());
} }
} catch (ValidateException e) { } catch (ValidateException e) {
e.printStackTrace(); pos = null;
log.error("工单号:" + orderNo + "唯一码:" + pos.getBarcode().getBarcode() + ":" + e.getMessage()); log.error("工单号:" + orderNo + "唯一码:" + pos.getBarcode().getBarcode() + ":" + e.getMessage());
excludePosIds.add(pos.getId()); excludePosIds.add(pos.getId());
} }
......
...@@ -760,17 +760,23 @@ public class StoragePosController { ...@@ -760,17 +760,23 @@ public class StoragePosController {
return ResultBean.newErrorResult(-1,"","未找到可以出库的任务"); return ResultBean.newErrorResult(-1,"","未找到可以出库的任务");
} }
//获取禁用料
List<Barcode> barcodeList = needOutPosList.stream().map(StoragePos::getBarcode).collect(Collectors.toList());
List<String> checkReelList = lizhenApi.batchCheckReel(barcodeList, "", model); //需要强制出库
if(checkOutDto.needForceOut()){
log.info("执行UID强制出库, 不再检查禁用料");
}else{
//获取禁用料
List<Barcode> barcodeList = needOutPosList.stream().map(StoragePos::getBarcode).collect(Collectors.toList());
for (StoragePos pos : needOutPosList) { List<String> checkReelList = lizhenApi.batchCheckReel(barcodeList, "", model);
Barcode barcode = pos.getBarcode();
String barcodeStr = barcode.getBarcode(); for (StoragePos pos : needOutPosList) {
if (checkReelList != null && !checkReelList.isEmpty()){ Barcode barcode = pos.getBarcode();
if (checkReelList.contains(barcodeStr)){ String barcodeStr = barcode.getBarcode();
return ResultBean.newErrorResult(-1,"",barcodeStr+"已经被禁用,库位为:"+pos.getPosName()); if (checkReelList != null && !checkReelList.isEmpty()){
if (checkReelList.contains(barcodeStr)){
return ResultBean.newErrorResult(-1,"",barcodeStr+"已经被禁用,库位为:"+pos.getPosName());
}
} }
} }
} }
......
...@@ -11,4 +11,16 @@ public class CheckOutDto { ...@@ -11,4 +11,16 @@ public class CheckOutDto {
private String singleOut; private String singleOut;
private String model; private String model;
/**
* 是否强制出库
*/
private Boolean forceOut = false;
public boolean needForceOut(){
if(forceOut != null){
return forceOut.booleanValue();
}
return false;
}
} }
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!