Commit c15a7044 zshaohui

增加入库超时时间配置

1 个父辈 02e8fcdd
......@@ -168,4 +168,10 @@ public class Constants {
*/
public static final String CACHE_spSettings="spSettings";
/**
* 入库超时时间
*/
public static final String CACHE_Deposit_Exceed_Time = "CACHE_Deposit_Exceed_Time";
}
......@@ -81,6 +81,7 @@ public class SettingsController {
Integer expiresDay=dataCache.getCache(Constants.CACHE_ExpiresDay);
Integer caWarn=dataCache.getCache(Constants.CACHE_CapacityWarn);
Integer backUpMonth = dataCache.getCache(Constants.BACKUP_MONTH_KEY);
Integer depositExceedTime = dataCache.getCache(Constants.CACHE_Deposit_Exceed_Time);
SysSettingsDto dto = new SysSettingsDto();
dto.setStartJob(startJob);
dto.setStopOut(stopOut);
......@@ -88,6 +89,7 @@ public class SettingsController {
dto.setExpiresDay(expiresDay);
dto.setCapacityWarn(caWarn);
dto.setBackUpMonth(backUpMonth);
dto.setDepositExceedTime(depositExceedTime);
return dto;
}
......@@ -101,8 +103,10 @@ public class SettingsController {
dataCache.updateCache(Constants.CACHE_ExpiresDay,sysSettingsDto.getExpiresDay());
dataCache.updateCache(Constants.CACHE_CapacityWarn,sysSettingsDto.getCapacityWarn());
dataCache.updateCache(Constants.BACKUP_MONTH_KEY,sysSettingsDto.getBackUpMonth());
dataCache.updateCache(Constants.CACHE_Deposit_Exceed_Time,sysSettingsDto.getDepositExceedTime());
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()
+",depositExceedTime="+sysSettingsDto.getDepositExceedTime());
return ResultBean.newOkResult("保存成功");
}
......
......@@ -27,4 +27,7 @@ public class SysSettingsDto implements Serializable {
@ApiModelProperty("备份时间")
private Integer backUpMonth=0;
@ApiModelProperty("入库超时时间")
private Integer depositExceedTime = 0;
}
package com.neotel.smfcore.custom.micron20031.manager;
import com.neotel.smfcore.common.utils.Constants;
import com.neotel.smfcore.core.barcode.service.manager.IBarcodeManager;
import com.neotel.smfcore.core.barcode.service.po.Barcode;
import com.neotel.smfcore.core.device.util.DataCache;
import com.neotel.smfcore.core.inList.enums.INLIST_STATUS;
import com.neotel.smfcore.core.inList.service.manager.IInListItemManager;
import com.neotel.smfcore.core.inList.service.manager.IInListManager;
......@@ -37,6 +39,9 @@ public class MicronSpTimerProcess {
@Autowired
private IBarcodeManager barcodeManager;
@Autowired
private DataCache dataCache;
private ScheduledExecutorService scheduledThreadPool = Executors.newScheduledThreadPool(1);
private boolean isRunning = false;
......@@ -65,7 +70,11 @@ public class MicronSpTimerProcess {
public void InlistTimeoutProcess() {
//当前开始的入库单,如果超过一小时还未完成,发送邮件
try {
long timeOutTime = 60 * 60 * 1000;
Integer depositExceedTime = dataCache.getCache(Constants.CACHE_Deposit_Exceed_Time);
if (depositExceedTime == null){
depositExceedTime = 1;
}
long timeOutTime = 60 * 60 * 1000 * depositExceedTime;
List<InList> lists = inListCache.getTimeOutInListMap(timeOutTime);
List<InList> inLists = new ArrayList<>();
for (InList inList :
......
......@@ -73,6 +73,6 @@ app:
type: ""
menu:
show:
show: sysSetting
hide:
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!