Commit 7a944d7c LN

增加入库检测配置

1 个父辈 6780c1fd
......@@ -196,4 +196,9 @@ public class Constants {
* 是否启用过期时间验证
*/
public static final String CACHE_EXPIREDATE_VERIFY = "CACHE_EXPIREDATE_VERIFY";
/**
* 入库检测配置
*/
public static final String CACHE_INPUT_CHECK = "CACHE_INPUT_CHECK";
}
......@@ -286,7 +286,7 @@ public class StatusBean {
addPosInfo(barcode,posId,plateW,plateH,isSingleOut,false,0);
}
public void addPosInfo(String barcode, String posId, int plateW, int plateH, boolean isSingleOut,boolean isNgReel,int usedCount ){
addPosInfo(barcode,posId,plateW,plateH,isSingleOut,isNgReel,usedCount,0);
addPosInfo(barcode,posId,plateW,plateH,isSingleOut,isNgReel,usedCount,0,false);
}
/**
* 获取客户端发送上来的条码信息
......@@ -297,7 +297,7 @@ public class StatusBean {
/**
* 入库时添加仓位及料盘大小信息(posId库位编号,plateW:料盘宽度,plateH:料盘高度,singleOut:是否出库到料仓门口)
*/
public void addPosInfo(String barcode, String posId, int plateW, int plateH, boolean isSingleOut,boolean isNgReel,int usedCount,int lastReelH){
public void addPosInfo(String barcode, String posId, int plateW, int plateH, boolean isSingleOut,boolean isNgReel,int usedCount,int lastReelH,boolean inputCheck){
String originalPosId = data.get("posId");
String originalPlateW = data.get("plateW");
String originalPlateH = data.get("plateH");
......@@ -335,6 +335,9 @@ public class StatusBean {
if(lastReelH>0){
data.put("lastReelH",lastReelH+"");
}
if(inputCheck){
data.put("inputCheck",inputCheck+"");
}
}
/**
......
......@@ -316,7 +316,11 @@ public class BaseDeviceHandler implements IDeviceHandler {
String posId = putInTask.getPosName();
int plateW = barcodeSave.getPlateSize();
int plateH = barcodeSave.getHeight();
statusBean.addPosInfo(barcodeSave.getBarcode(), posId, plateW, plateH, false,false,barcodeSave.getUsedCount(),lastReelP);
Boolean inputCheck=dataCache.getCache(Constants.CACHE_INPUT_CHECK);
if(inputCheck==null){
inputCheck=false;
}
statusBean.addPosInfo(barcodeSave.getBarcode(), posId, plateW, plateH, false,false,barcodeSave.getUsedCount(),lastReelP,inputCheck);
//记录这一盘的高度
pos.setLastReelH(barcodeSave.getHeight());
......@@ -1006,7 +1010,7 @@ public class BaseDeviceHandler implements IDeviceHandler {
plateW = pos.getW();
plateH = pos.getH();
}
statusBean.addPosInfo(outTask.getBarcode(), posName, plateW, plateH, false,outTask.isNgReel(),0,0);
statusBean.addPosInfo(outTask.getBarcode(), posName, plateW, plateH, false,outTask.isNgReel(),0);
log.info("出库" + storage.getName() + "[" + posName + "]物料[" + outTask.getBarcode() + "]["+outTask.isNgReel()+"] 发送到客户端" + storage.getCid());
}
return statusBean;
......
......@@ -87,6 +87,12 @@ public class SettingsController {
dataCache.updateCache(Constants.CACHE_EXPIREDATE_VERIFY,expiredateVerify);
}
Boolean inputCheck=dataCache.getCache(Constants.CACHE_INPUT_CHECK);
if(inputCheck==null){
inputCheck=false;
dataCache.updateCache(Constants.CACHE_INPUT_CHECK,inputCheck);
}
SysSettingsDto dto = new SysSettingsDto();
dto.setStartJob(startJob);
dto.setStopOut(stopOut);
......@@ -98,6 +104,7 @@ public class SettingsController {
dto.setApiTest(useAPi);
dto.setXrayBypass(xrayBypass);
dto.setExpiredateVerify(expiredateVerify);
dto.setInputCheck(inputCheck);
return dto;
}
......@@ -115,10 +122,11 @@ public class SettingsController {
dataCache.updateCache(Constants.CACHE_API_TEST, sysSettingsDto.isApiTest());
dataCache.updateCache(Constants.CACHE_API_XRAY_BYPASSS, sysSettingsDto.isXrayBypass());
dataCache.updateCache(Constants.CACHE_EXPIREDATE_VERIFY, sysSettingsDto.isExpiredateVerify());
dataCache.updateCache(Constants.CACHE_INPUT_CHECK,sysSettingsDto.isInputCheck());
log.info("更改系统设置:stopout=" + sysSettingsDto.isStopOut() + ",stopjob=" + sysSettingsDto.isStartJob() + ",sluggishDay=" + sysSettingsDto.getSluggishDay()
+ ",expiresDay=" + sysSettingsDto.getExpiresDay() + ",capacityWarn=" + sysSettingsDto.getCapacityWarn() + ",backUpMonth=" + sysSettingsDto.getBackUpMonth() +
" ,sameBarcodeSettings=" + sysSettingsDto.getSameBarcodeSettings()+", apiTest="+sysSettingsDto.isApiTest()+",xrayBypass="+sysSettingsDto.isXrayBypass()+
",expiredateVerify=" + sysSettingsDto.isExpiredateVerify());
",expiredateVerify=" + sysSettingsDto.isExpiredateVerify()+",inputCheck="+sysSettingsDto.isInputCheck());
String msg = MessageUtils.getText("smfcore.saveOk", servletRequest.getLocale(), "保存成功");
return ResultBean.newOkResult(msg);
......
......@@ -39,4 +39,7 @@ public class SysSettingsDto implements Serializable {
@ApiModelProperty("是否可以存储")
private boolean expiredateVerify = false;
@ApiModelProperty("是否启用入库检测")
private boolean inputCheck = false;
}
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!