Commit f6d57fa8 LN

增加XRay测试配置

1 个父辈 9fd7c56b
...@@ -184,7 +184,6 @@ public class Constants { ...@@ -184,7 +184,6 @@ public class Constants {
*/ */
public static final String CACHE_API_TEST ="CACHE_API_TEST"; public static final String CACHE_API_TEST ="CACHE_API_TEST";
/** /**
* =true, XRay离线时,忽略xray,继续入库 * =true, XRay离线时,忽略xray,继续入库
*/ */
...@@ -205,4 +204,11 @@ public class Constants { ...@@ -205,4 +204,11 @@ public class Constants {
// public static final String ExpirationDateConfig = "micron_expiration_config"; // public static final String ExpirationDateConfig = "micron_expiration_config";
public static final String CACHE_ExpirationDateConfig_N = "micron_expiration_config_new"; public static final String CACHE_ExpirationDateConfig_N = "micron_expiration_config_new";
/**
* 是否启用Xray测试模式,所有的料盘获取入库库位时都去xray点料,true=启用
*/
public static final String CACHE_XRAY_TEST ="CACHE_XRAY_TEST";
} }
...@@ -623,6 +623,29 @@ public class RobotBoxHandler extends BaseDeviceHandler { ...@@ -623,6 +623,29 @@ public class RobotBoxHandler extends BaseDeviceHandler {
if (pos != null) { if (pos != null) {
Storage storage = dataCache.getStorageById(pos.getStorageId()); Storage storage = dataCache.getStorageById(pos.getStorageId());
if(storage.isTHIRDBox()&&ObjectUtil.isEmpty(preCid)) {
Boolean useAPi = dataCache.getCache(Constants.CACHE_API_TEST);
if (useAPi == null) {
useAPi = false;
}
Boolean xrayTest = dataCache.getCache(Constants.CACHE_XRAY_TEST);
if (xrayTest == null) {
xrayTest = false;
}
if ((useAPi == false) && xrayTest) {
log.info("useAPi==false,xrayTest=true, 点料测试已启用,且分配的库位是麦康尼料仓, 物料[" + barcode.getBarcode() + "]需要先去点料");
resultMap.put("result", "110");
resultMap.put("barcode", barcode.getBarcode());
errorMsg = MessageUtils.getText("smfcore.api.toXray", new String[]{barcode.getBarcode()}, new Locale("en", "US"), "{0}需要去点料");
lineMsg = errorMsg;
DeviceMessageUtil.updateLineMsg(lineMsg,code,cids, pos.getPosName(),"smfcore.linemsg.posLock",new String[]{barcode.getBarcode(),pos.getPosName()});
return resultMap;
}
}
//如果所在料仓有出库任务未完成,暂停入库 //如果所在料仓有出库任务未完成,暂停入库
// Collection<DataLog> tasks = taskService.getAllTasks(); // Collection<DataLog> tasks = taskService.getAllTasks();
// for (DataLog task : tasks) { // for (DataLog task : tasks) {
......
...@@ -92,7 +92,11 @@ public class SettingsController { ...@@ -92,7 +92,11 @@ public class SettingsController {
inputCheck=false; inputCheck=false;
dataCache.updateCache(Constants.CACHE_INPUT_CHECK,inputCheck); dataCache.updateCache(Constants.CACHE_INPUT_CHECK,inputCheck);
} }
Boolean xrayTest=dataCache.getCache(Constants.CACHE_XRAY_TEST);
if(xrayTest==null){
xrayTest=false;
dataCache.updateCache(Constants.CACHE_XRAY_TEST,xrayTest);
}
SysSettingsDto dto = new SysSettingsDto(); SysSettingsDto dto = new SysSettingsDto();
dto.setStartJob(startJob); dto.setStartJob(startJob);
dto.setStopOut(stopOut); dto.setStopOut(stopOut);
...@@ -105,6 +109,7 @@ public class SettingsController { ...@@ -105,6 +109,7 @@ public class SettingsController {
dto.setXrayBypass(xrayBypass); dto.setXrayBypass(xrayBypass);
dto.setExpiredateVerify(expiredateVerify); dto.setExpiredateVerify(expiredateVerify);
dto.setInputCheck(inputCheck); dto.setInputCheck(inputCheck);
dto.setXRayTest(xrayTest);
return dto; return dto;
} }
...@@ -123,10 +128,11 @@ public class SettingsController { ...@@ -123,10 +128,11 @@ public class SettingsController {
dataCache.updateCache(Constants.CACHE_API_XRAY_BYPASSS, sysSettingsDto.isXrayBypass()); dataCache.updateCache(Constants.CACHE_API_XRAY_BYPASSS, sysSettingsDto.isXrayBypass());
dataCache.updateCache(Constants.CACHE_EXPIREDATE_VERIFY, sysSettingsDto.isExpiredateVerify()); dataCache.updateCache(Constants.CACHE_EXPIREDATE_VERIFY, sysSettingsDto.isExpiredateVerify());
dataCache.updateCache(Constants.CACHE_INPUT_CHECK,sysSettingsDto.isInputCheck()); dataCache.updateCache(Constants.CACHE_INPUT_CHECK,sysSettingsDto.isInputCheck());
dataCache.updateCache(Constants.CACHE_XRAY_TEST,sysSettingsDto.isXRayTest());
log.info("更改系统设置:stopout=" + sysSettingsDto.isStopOut() + ",stopjob=" + sysSettingsDto.isStartJob() + ",sluggishDay=" + sysSettingsDto.getSluggishDay() log.info("更改系统设置:stopout=" + sysSettingsDto.isStopOut() + ",stopjob=" + sysSettingsDto.isStartJob() + ",sluggishDay=" + sysSettingsDto.getSluggishDay()
+ ",expiresDay=" + sysSettingsDto.getExpiresDay() + ",capacityWarn=" + sysSettingsDto.getCapacityWarn() + ",backUpMonth=" + sysSettingsDto.getBackUpMonth() + + ",expiresDay=" + sysSettingsDto.getExpiresDay() + ",capacityWarn=" + sysSettingsDto.getCapacityWarn() + ",backUpMonth=" + sysSettingsDto.getBackUpMonth() +
" ,sameBarcodeSettings=" + sysSettingsDto.getSameBarcodeSettings()+", apiTest="+sysSettingsDto.isApiTest()+",xrayBypass="+sysSettingsDto.isXrayBypass()+ " ,sameBarcodeSettings=" + sysSettingsDto.getSameBarcodeSettings()+", apiTest="+sysSettingsDto.isApiTest()+",xrayBypass="+sysSettingsDto.isXrayBypass()+
",expiredateVerify=" + sysSettingsDto.isExpiredateVerify()+",inputCheck="+sysSettingsDto.isInputCheck()); ",expiredateVerify=" + sysSettingsDto.isExpiredateVerify()+",inputCheck="+sysSettingsDto.isInputCheck()+",isXRayTest="+sysSettingsDto.isXRayTest());
String msg = MessageUtils.getText("smfcore.saveOk", servletRequest.getLocale(), "保存成功"); String msg = MessageUtils.getText("smfcore.saveOk", servletRequest.getLocale(), "保存成功");
return ResultBean.newOkResult(msg); return ResultBean.newOkResult(msg);
......
...@@ -42,4 +42,8 @@ public class SysSettingsDto implements Serializable { ...@@ -42,4 +42,8 @@ public class SysSettingsDto implements Serializable {
@ApiModelProperty("是否启用入库检测") @ApiModelProperty("是否启用入库检测")
private boolean inputCheck = false; private boolean inputCheck = false;
@ApiModelProperty("Xray点料测试功能")
private boolean xRayTest = false;
} }
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!