Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit c15a7044
由
zshaohui
编写于
2023-11-16 10:32:18 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
增加入库超时时间配置
1 个父辈
02e8fcdd
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
25 行增加
和
3 行删除
src/main/java/com/neotel/smfcore/common/utils/Constants.java
src/main/java/com/neotel/smfcore/core/system/rest/SettingsController.java
src/main/java/com/neotel/smfcore/core/system/rest/bean/dto/SysSettingsDto.java
src/main/java/com/neotel/smfcore/custom/micron20031/manager/MicronSpTimerProcess.java
src/main/resources/config/application.yml
src/main/java/com/neotel/smfcore/common/utils/Constants.java
查看文件 @
c15a704
...
@@ -168,4 +168,10 @@ public class Constants {
...
@@ -168,4 +168,10 @@ public class Constants {
*/
*/
public
static
final
String
CACHE_spSettings
=
"spSettings"
;
public
static
final
String
CACHE_spSettings
=
"spSettings"
;
/**
* 入库超时时间
*/
public
static
final
String
CACHE_Deposit_Exceed_Time
=
"CACHE_Deposit_Exceed_Time"
;
}
}
src/main/java/com/neotel/smfcore/core/system/rest/SettingsController.java
查看文件 @
c15a704
...
@@ -81,6 +81,7 @@ public class SettingsController {
...
@@ -81,6 +81,7 @@ public class SettingsController {
Integer
expiresDay
=
dataCache
.
getCache
(
Constants
.
CACHE_ExpiresDay
);
Integer
expiresDay
=
dataCache
.
getCache
(
Constants
.
CACHE_ExpiresDay
);
Integer
caWarn
=
dataCache
.
getCache
(
Constants
.
CACHE_CapacityWarn
);
Integer
caWarn
=
dataCache
.
getCache
(
Constants
.
CACHE_CapacityWarn
);
Integer
backUpMonth
=
dataCache
.
getCache
(
Constants
.
BACKUP_MONTH_KEY
);
Integer
backUpMonth
=
dataCache
.
getCache
(
Constants
.
BACKUP_MONTH_KEY
);
Integer
depositExceedTime
=
dataCache
.
getCache
(
Constants
.
CACHE_Deposit_Exceed_Time
);
SysSettingsDto
dto
=
new
SysSettingsDto
();
SysSettingsDto
dto
=
new
SysSettingsDto
();
dto
.
setStartJob
(
startJob
);
dto
.
setStartJob
(
startJob
);
dto
.
setStopOut
(
stopOut
);
dto
.
setStopOut
(
stopOut
);
...
@@ -88,6 +89,7 @@ public class SettingsController {
...
@@ -88,6 +89,7 @@ public class SettingsController {
dto
.
setExpiresDay
(
expiresDay
);
dto
.
setExpiresDay
(
expiresDay
);
dto
.
setCapacityWarn
(
caWarn
);
dto
.
setCapacityWarn
(
caWarn
);
dto
.
setBackUpMonth
(
backUpMonth
);
dto
.
setBackUpMonth
(
backUpMonth
);
dto
.
setDepositExceedTime
(
depositExceedTime
);
return
dto
;
return
dto
;
}
}
...
@@ -101,8 +103,10 @@ public class SettingsController {
...
@@ -101,8 +103,10 @@ public class SettingsController {
dataCache
.
updateCache
(
Constants
.
CACHE_ExpiresDay
,
sysSettingsDto
.
getExpiresDay
());
dataCache
.
updateCache
(
Constants
.
CACHE_ExpiresDay
,
sysSettingsDto
.
getExpiresDay
());
dataCache
.
updateCache
(
Constants
.
CACHE_CapacityWarn
,
sysSettingsDto
.
getCapacityWarn
());
dataCache
.
updateCache
(
Constants
.
CACHE_CapacityWarn
,
sysSettingsDto
.
getCapacityWarn
());
dataCache
.
updateCache
(
Constants
.
BACKUP_MONTH_KEY
,
sysSettingsDto
.
getBackUpMonth
());
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
()
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
(
"保存成功"
);
return
ResultBean
.
newOkResult
(
"保存成功"
);
}
}
...
...
src/main/java/com/neotel/smfcore/core/system/rest/bean/dto/SysSettingsDto.java
查看文件 @
c15a704
...
@@ -27,4 +27,7 @@ public class SysSettingsDto implements Serializable {
...
@@ -27,4 +27,7 @@ public class SysSettingsDto implements Serializable {
@ApiModelProperty
(
"备份时间"
)
@ApiModelProperty
(
"备份时间"
)
private
Integer
backUpMonth
=
0
;
private
Integer
backUpMonth
=
0
;
@ApiModelProperty
(
"入库超时时间"
)
private
Integer
depositExceedTime
=
0
;
}
}
src/main/java/com/neotel/smfcore/custom/micron20031/manager/MicronSpTimerProcess.java
查看文件 @
c15a704
package
com
.
neotel
.
smfcore
.
custom
.
micron20031
.
manager
;
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.manager.IBarcodeManager
;
import
com.neotel.smfcore.core.barcode.service.po.Barcode
;
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.enums.INLIST_STATUS
;
import
com.neotel.smfcore.core.inList.service.manager.IInListItemManager
;
import
com.neotel.smfcore.core.inList.service.manager.IInListItemManager
;
import
com.neotel.smfcore.core.inList.service.manager.IInListManager
;
import
com.neotel.smfcore.core.inList.service.manager.IInListManager
;
...
@@ -37,6 +39,9 @@ public class MicronSpTimerProcess {
...
@@ -37,6 +39,9 @@ public class MicronSpTimerProcess {
@Autowired
@Autowired
private
IBarcodeManager
barcodeManager
;
private
IBarcodeManager
barcodeManager
;
@Autowired
private
DataCache
dataCache
;
private
ScheduledExecutorService
scheduledThreadPool
=
Executors
.
newScheduledThreadPool
(
1
);
private
ScheduledExecutorService
scheduledThreadPool
=
Executors
.
newScheduledThreadPool
(
1
);
private
boolean
isRunning
=
false
;
private
boolean
isRunning
=
false
;
...
@@ -65,7 +70,11 @@ public class MicronSpTimerProcess {
...
@@ -65,7 +70,11 @@ public class MicronSpTimerProcess {
public
void
InlistTimeoutProcess
()
{
public
void
InlistTimeoutProcess
()
{
//当前开始的入库单,如果超过一小时还未完成,发送邮件
//当前开始的入库单,如果超过一小时还未完成,发送邮件
try
{
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
>
lists
=
inListCache
.
getTimeOutInListMap
(
timeOutTime
);
List
<
InList
>
inLists
=
new
ArrayList
<>();
List
<
InList
>
inLists
=
new
ArrayList
<>();
for
(
InList
inList
:
for
(
InList
inList
:
...
...
src/main/resources/config/application.yml
查看文件 @
c15a704
...
@@ -73,6 +73,6 @@ app:
...
@@ -73,6 +73,6 @@ app:
type
:
"
"
type
:
"
"
menu
:
menu
:
show
:
show
:
sysSetting
hide
:
hide
:
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论