Commit 85cc036c zshaohui

1.量测功能修改

1 个父辈 06b2cfa4
...@@ -197,16 +197,6 @@ public class DeviceController { ...@@ -197,16 +197,6 @@ public class DeviceController {
throw new ValidateException("", "335S00571/155S00462的料号不允许入到智能仓"); throw new ValidateException("", "335S00571/155S00462的料号不允许入到智能仓");
} }
//判断是否过期
barcode = lizhenApi.getInDate(barcode);
//判断物料是否过期
Date expireDate = barcode.getExpireDate();
if (expireDate != null) {
if (System.currentTimeMillis() > expireDate.getTime()) {
throw new ValidateException("smfcore.error.barcode.expired", "物料已过期,无法入库.");
}
}
//判断虚拟仓有没有存在,如果有,把虚拟仓库位置空 //判断虚拟仓有没有存在,如果有,把虚拟仓库位置空
StoragePos storagePos = storagePosManager.getByBarcode(barcode.getBarcode()); StoragePos storagePos = storagePosManager.getByBarcode(barcode.getBarcode());
if (storagePos != null) { if (storagePos != null) {
...@@ -238,6 +228,17 @@ public class DeviceController { ...@@ -238,6 +228,17 @@ public class DeviceController {
barcode = barcodeCanPutIn; barcode = barcodeCanPutIn;
} }
//判断是否过期
barcode = lizhenApi.getInDate(barcode);
//判断物料是否过期
Date expireDate = barcode.getExpireDate();
if (expireDate != null) {
if (System.currentTimeMillis() > expireDate.getTime()) {
throw new ValidateException("smfcore.error.barcode.expired", "物料已过期,无法入库.");
}
}
Barcode barcodeApi = lizhenApi.barcodeInfo(barcode); Barcode barcodeApi = lizhenApi.barcodeInfo(barcode);
//如果是L开头的去量测 //如果是L开头的去量测
......
...@@ -258,6 +258,7 @@ public class LizhenApi extends DefaultSmfApiListener { ...@@ -258,6 +258,7 @@ public class LizhenApi extends DefaultSmfApiListener {
//保存禁用料记录 //保存禁用料记录
Barcode barcodeOri = barcodeManager.findByBarcode(barcode.getBarcode()); Barcode barcodeOri = barcodeManager.findByBarcode(barcode.getBarcode());
if (barcodeOri != null){ if (barcodeOri != null){
barcodeOri.setExpireDate(barcode.getExpireDate());
barcodeOri.setDisableMsg(resultStr); barcodeOri.setDisableMsg(resultStr);
barcode = barcodeManager.save(barcodeOri); barcode = barcodeManager.save(barcodeOri);
StoragePos storagePos = storagePosManager.getByBarcode(barcode.getBarcode()); StoragePos storagePos = storagePosManager.getByBarcode(barcode.getBarcode());
......
...@@ -22,6 +22,6 @@ api: ...@@ -22,6 +22,6 @@ api:
#获取有限期 #获取有限期
getInDateUrl: http://10.68.30.22:8082/api/mes/GetInDate getInDateUrl: http://10.68.30.22:8082/api/mes/GetInDate
#散料是否量测 #散料是否量测
checkReelMeasureUrl: http://10.68.25.75:8001/Sct/CheckReelMeasure checkReelMeasure: http://10.68.25.75:8001/Sct/CheckReelMeasure
#获取尺寸信息 #获取尺寸信息
brandQtyUrl: http://10.68.30.22:8082/api/wcs/brandQty brandQtyUrl: http://10.68.30.22:8082/api/wcs/brandQty
\ No newline at end of file \ No newline at end of file
...@@ -23,6 +23,6 @@ api: ...@@ -23,6 +23,6 @@ api:
#获取有限期 #获取有限期
getInDateUrl: http://10.42.220.171:8082/api/mes/GetInDate getInDateUrl: http://10.42.220.171:8082/api/mes/GetInDate
#散料是否量测 #散料是否量测
checkReelMeasureUrl: http://10.68.25.75:8001/Sct/CheckReelMeasure checkReelMeasure: http://10.68.25.75:8001/Sct/CheckReelMeasure
#获取尺寸信息 #获取尺寸信息
brandQtyUrl: http://10.42.220.171:8082/api/mlb/brandQty brandQtyUrl: http://10.42.220.171:8082/api/mlb/brandQty
\ No newline at end of file \ No newline at end of file
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!