Commit 8341952f zshaohui

料盒操作 出入库时,不加锁

1 个父辈 b1868acc
......@@ -246,16 +246,18 @@ public class MaterialBoxController {
throw new ValidateException("smfcore.materialBox.inPos", "物料已在库位{0}中", new String[]{pos.getPosName()});
}
long currentTimeMillis = System.currentTimeMillis();
Long outTime = outLastScanMap.get(subBarcode.getBarcode());
if (outTime != null && currentTimeMillis - outTime <= 1000 * 60 * 10) {
throw new ValidateException("smfcore.materialBox.outBox", "物料{0}已经取出", new String[]{subBarcode.getBarcode()});
}
//synchronized (this) {
long currentTimeMillis = System.currentTimeMillis();
Long outTime = outLastScanMap.get(subBarcode.getBarcode());
if (outTime != null && currentTimeMillis - outTime <= 1000 * 60 * 10) {
throw new ValidateException("smfcore.materialBox.outBox", "物料{0}已经取出", new String[]{subBarcode.getBarcode()});
}
Long inTime = inLastScanMap.get(subBarcode.getBarcode());
if (inTime != null && currentTimeMillis - inTime <= 1000 * 60 * 10) {
throw new ValidateException("smfcore.materialBox.inBox", "物料{0}已在料盒{1}中", new String[]{subBarcode.getBarcode(), barcode.getBarcode()});
}
Long inTime = inLastScanMap.get(subBarcode.getBarcode());
if (inTime != null && currentTimeMillis - inTime <= 1000 * 60 * 10) {
throw new ValidateException("smfcore.materialBox.inBox", "物料{0}已在料盒{1}中", new String[]{subBarcode.getBarcode(), barcode.getBarcode()});
}
//}
if (subBarcode.getHostBarcodeId() == null) {
smfApi.canPutInAfterResolve(subBarcode);
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!