Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit f6324ca3
由
LN
编写于
2026-01-07 17:24:42 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
Tool Utilization 功能完善。
1 个父辈
59473888
隐藏空白字符变更
内嵌
并排
正在显示
15 个修改的文件
包含
57 行增加
和
20 行删除
src/main/java/com/neotel/smfcore/core/device/handler/impl/BaseDeviceHandler.java
src/main/java/com/neotel/smfcore/core/device/util/DataCache.java
src/main/java/com/neotel/smfcore/core/deviceState/util/DeviceStateDurationUtil.java
src/main/java/com/neotel/smfcore/core/equipment/rest/EquipmentController.java
src/main/java/com/neotel/smfcore/core/report/rest/query/ReportQuery.java
src/main/java/com/neotel/smfcore/core/system/util/DevicesStatusUtil.java
src/main/java/com/neotel/smfcore/core/system/util/TaskService.java
src/main/java/com/neotel/smfcore/custom/micron1053/Micron1053Menu.java
src/main/java/com/neotel/smfcore/custom/micron1053/bean/dto/DeviceStateChartDto.java
src/main/java/com/neotel/smfcore/custom/micron1053/controller/MicronReportController.java
src/main/resources/messages.properties
src/main/resources/messages_en_US.properties
src/main/resources/messages_ja_JP.properties
src/main/resources/messages_zh_CN.properties
src/main/resources/messages_zh_TW.properties
src/main/java/com/neotel/smfcore/core/device/handler/impl/BaseDeviceHandler.java
查看文件 @
f6324ca
...
...
@@ -939,6 +939,7 @@ public class BaseDeviceHandler implements IDeviceHandler {
}
else
{
needSaveToMongo
=
statusBean
.
needSaveToMongo
();
}
statusBean
.
setOfflineTime
(-
1
);
statusBean
.
setTime
(
System
.
currentTimeMillis
());
Map
<
String
,
BoxStatusBean
>
statusOfBoxes
=
statusBeanToSave
.
getBoxStatus
();
...
...
src/main/java/com/neotel/smfcore/core/device/util/DataCache.java
查看文件 @
f6324ca
...
...
@@ -142,15 +142,19 @@ public class DataCache {
}
Boolean
finishChangeConfig
=
getCache
(
Constants
.
CACHE_FinishChangeExpConfig
);
if
(
finishChangeConfig
==
null
||
!
finishChangeConfig
){
if
(
configs
!=
null
){
if
(
finishChangeConfig
==
null
||
!
finishChangeConfig
)
{
//先备份原来的
log
.
info
(
"CACHE_FinishChangeExpConfig=false,先转存过期年配置到:"
+
Constants
.
CACHE_ExpirationDateConfig_N
+
"_back"
);
updateCache
(
Constants
.
CACHE_ExpirationDateConfig_N
+
"_back"
,
configs
);
if
(
configs
!=
null
)
{
for
(
ExpConfig
c
:
configs
)
{
if
(
c
!=
null
&&
c
.
getValue
()!=
null
)
{
c
.
setValue
(
c
.
getValue
()
*
365
);
if
(
c
!=
null
&&
c
.
getValue
()
!=
null
)
{
c
.
setValue
(
c
.
getValue
()
*
365
);
}
}
updateCache
(
Constants
.
CACHE_ExpirationDateConfig_N
,
configs
);
}
log
.
info
(
" 已完成,过期年改已改为天,保存CACHE_FinishChangeExpConfig=true"
);
updateCache
(
Constants
.
CACHE_FinishChangeExpConfig
,
true
);
}
...
...
src/main/java/com/neotel/smfcore/core/deviceState/util/DeviceStateDurationUtil.java
查看文件 @
f6324ca
...
...
@@ -145,7 +145,11 @@ public class DeviceStateDurationUtil {
lastStorageStatusMap
.
remove
(
currentDuration
);
lastStorageStatusMap
.
add
(
newSlice
);
msg
=
msg
+
" 开始时间"
+
DateUtil
.
toDateTimeString
(
newSlice
.
getStartTime
());
if
(
msg
==
""
){
msg
=
dType
+
",cid="
+
cid
+
", 旧状态 "
+
currentDuration
.
getDeviceS
()
+
" 开始时间"
+
DateUtil
.
toDateTimeString
(
newSlice
.
getStartTime
());
}
else
{
msg
=
msg
+
" 开始时间"
+
DateUtil
.
toDateTimeString
(
newSlice
.
getStartTime
());
}
}
if
(
ObjectUtil
.
isNotEmpty
(
msg
))
{
log
.
info
(
"ProcessState"
+
msg
);
...
...
src/main/java/com/neotel/smfcore/core/equipment/rest/EquipmentController.java
查看文件 @
f6324ca
...
...
@@ -218,4 +218,12 @@ public class EquipmentController {
log
.
info
(
"设备cid="
+
cid
+
", equipType="
+
equipment
.
getType
()
+
" setActivate(false)成功"
);
return
ResultBean
.
newOkResult
(
"OK"
);
}
@ApiOperation
(
"返回所有的非料仓设备"
)
@GetMapping
(
value
=
"/all"
)
public
List
<
EquipmentDto
>
all
()
{
List
<
Equipment
>
list
=
equipmentManager
.
findAll
();
List
<
EquipmentDto
>
dtos
=
equipmentMapper
.
toDto
(
list
);
return
dtos
;
}
}
src/main/java/com/neotel/smfcore/core/report/rest/query/ReportQuery.java
查看文件 @
f6324ca
...
...
@@ -2,6 +2,7 @@ package com.neotel.smfcore.core.report.rest.query;
import
cn.hutool.core.date.DateTime
;
import
com.neotel.smfcore.common.bean.BetweenData
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
org.springframework.format.annotation.DateTimeFormat
;
...
...
@@ -16,4 +17,9 @@ public class ReportQuery implements Serializable {
private
String
pn
;
private
List
<
String
>
cidList
;
/**
* 区分设备类型:STORAGE=料仓,EQUIPMENT=其他设备
*/
private
String
deviceType
;
}
src/main/java/com/neotel/smfcore/core/system/util/DevicesStatusUtil.java
查看文件 @
f6324ca
...
...
@@ -256,10 +256,10 @@ public class DevicesStatusUtil {
if
(
bean
.
getOfflineTime
()
==
-
1
&&
(
bean
.
timeOut
()||
bean
.
getStatus
()==
BOX_STATUS
.
OFFLINE
))
{
bean
.
setOfflineTime
(
System
.
currentTimeMillis
());
DeviceMessageUtil
.
addOfflineMessage
(
bean
.
getCid
(),
""
);
DeviceStateDurationUtil
.
deviceOffline
(
bean
.
getCid
(),
DeviceSKind
.
EQUIPMENT
);
DeviceStateDurationUtil
.
deviceOffline
(
bean
.
getCid
(),
DeviceSKind
.
STORAGE
);
}
}
}
}
}
catch
(
Exception
ex
)
{
log
.
error
(
"设备状态定时器执行出错:"
,
ex
);
}
...
...
src/main/java/com/neotel/smfcore/core/system/util/TaskService.java
查看文件 @
f6324ca
...
...
@@ -510,7 +510,8 @@ public class TaskService {
public
StatusBean
checkOut
(
Storage
storage
,
StatusBean
statusBean
)
{
try
{
//准备更新暂停出入库
if
(
dataCache
.
getCache
(
Constants
.
CACHE_StopOut
))
{
Boolean
stopOut
=
dataCache
.
getCache
(
Constants
.
CACHE_StopOut
);
if
(
ObjectUtil
.
isNotEmpty
(
stopOut
)&&
stopOut
)
{
return
statusBean
;
}
String
cid
=
storage
.
getCid
();
...
...
src/main/java/com/neotel/smfcore/custom/micron1053/Micron1053Menu.java
查看文件 @
f6324ca
...
...
@@ -71,7 +71,7 @@ public class Micron1053Menu {
MenuInit
.
addMenu
(
menuLabel
,
pMenuReport
,
203
,
"ErrorLog"
,
"errorLog"
,
"report/errorLog/index"
,
"errorLog"
);
MenuInit
.
addMenu
(
menuLabel
,
pMenuReport
,
204
,
"ErrorReport"
,
"errorReport"
,
"report/errorReport/index"
,
"errorReport"
);
MenuInit
.
addMenu
(
menuLabel
,
pMenuReport
,
205
,
"EventLog"
,
"eventLog"
,
"report/eventLog/index"
,
"eventlog"
);
MenuInit
.
addMenu
(
menuLabel
,
pMenuReport
,
206
,
"
DeviceSChart
"
,
"deviceSChart"
,
"report/deviceSChart/index"
,
"deviceSChart"
);
MenuInit
.
addMenu
(
menuLabel
,
pMenuReport
,
206
,
"
Tool Utilization
"
,
"deviceSChart"
,
"report/deviceSChart/index"
,
"deviceSChart"
);
//Help
MenuInit
.
addMenu
(
menuLabel
,
null
,
999
,
"Help"
,
"helps"
,
"help/helps/index"
,
"help"
);
...
...
src/main/java/com/neotel/smfcore/custom/micron1053/bean/dto/DeviceStateChartDto.java
查看文件 @
f6324ca
...
...
@@ -18,6 +18,8 @@ public class DeviceStateChartDto implements Serializable {
@ApiModelProperty
(
"设备CID"
)
private
String
cid
;
@ApiModelProperty
(
"区分设备类型:STORAGE=料仓,EQUIPMENT=其他设备"
)
private
String
deviceType
;
@ApiModelProperty
(
"日期/天"
)
private
Date
day
;
...
...
src/main/java/com/neotel/smfcore/custom/micron1053/controller/MicronReportController.java
查看文件 @
f6324ca
...
...
@@ -10,6 +10,7 @@ import com.neotel.smfcore.common.utils.FileUtil;
import
com.neotel.smfcore.common.utils.QueryHelp
;
import
com.neotel.smfcore.core.device.bean.StatusBean
;
import
com.neotel.smfcore.core.device.util.DataCache
;
import
com.neotel.smfcore.core.deviceState.enums.DeviceSKind
;
import
com.neotel.smfcore.core.deviceState.service.manager.IDeviceStateDurationManager
;
import
com.neotel.smfcore.core.deviceState.service.po.DeviceStateDuration
;
import
com.neotel.smfcore.core.equipment.service.po.Equipment
;
...
...
@@ -389,6 +390,9 @@ public class MicronReportController {
if
(
reportQuery
.
getCidList
()!=
null
){
query
.
addCriteria
(
Criteria
.
where
(
"cid"
).
in
(
reportQuery
.
getCidList
()));
}
if
(
ObjectUtil
.
isNotEmpty
(
reportQuery
.
getDeviceType
())){
query
.
addCriteria
(
Criteria
.
where
(
"deviceType"
).
is
(
reportQuery
.
getDeviceType
()));
}
List
<
DeviceStateDuration
>
list
=
deviceStateDurationManager
.
findByQuery
(
query
);
Map
<
String
,
Map
<
Date
,
DeviceStateChartDto
>>
resultMap
=
new
HashMap
<>();
...
...
@@ -403,17 +407,19 @@ public class MicronReportController {
DeviceStateChartDto
dto
=
dayMap
.
get
(
day
);
if
(
dto
==
null
)
{
String
deviceName
=
cid
;
Storage
storage
=
dataCache
.
getStorage
(
cid
);
if
(
storage
!=
null
)
{
deviceName
=
storage
.
getName
();
}
else
{
Equipment
eq
=
equipmentCache
.
getEquipment
(
cid
);
if
(
d
.
getDeviceType
()==
DeviceSKind
.
STORAGE
){
Storage
storage
=
dataCache
.
getStorage
(
cid
);
if
(
storage
!=
null
)
{
deviceName
=
storage
.
getName
();
}
}
else
{
Equipment
eq
=
equipmentCache
.
getEquipment
(
cid
);
if
(
eq
!=
null
)
{
deviceName
=
eq
.
getName
();
}
}
dto
=
new
DeviceStateChartDto
(
deviceName
,
cid
,
day
,
0L
,
0L
,
0L
);
dto
=
new
DeviceStateChartDto
(
deviceName
,
cid
,
d
.
getDeviceType
(),
day
,
0L
,
0L
,
0L
);
dayMap
.
put
(
day
,
dto
);
}
...
...
src/main/resources/messages.properties
查看文件 @
f6324ca
...
...
@@ -409,3 +409,4 @@ smfcore.xray.countingHistory.xRayFile=\u56FE\u7247\u6587\u4EF6\u540D
smfcore.xray.countingHistory.resultFile
=
\u
7ED3
\u
679C
\u6587\u
4EF6
\u
540D
smfcore.xray.countingHistory.uploadOk
=
\u
662F
\u5426\u
4E0A
\u
4F20
\u
5B8C
\u6210
smfcore.xray.countingHistory.countingTime
=
\u
70B9
\u6599\u
65F6
\u
95F4
smfcore.deviceSChart
=
Tool Utilization
\ No newline at end of file
src/main/resources/messages_en_US.properties
查看文件 @
f6324ca
...
...
@@ -386,4 +386,5 @@ smfcore.xray.countingHistory.tdBarcode=Barcode
smfcore.xray.countingHistory.xRayFile
=
Image File Name
smfcore.xray.countingHistory.resultFile
=
Result File Name
smfcore.xray.countingHistory.uploadOk
=
Upload Completed
smfcore.xray.countingHistory.countingTime
=
Counting Time
\ No newline at end of file
smfcore.xray.countingHistory.countingTime
=
Counting Time
smfcore.deviceSChart
=
Tool Utilization
\ No newline at end of file
src/main/resources/messages_ja_JP.properties
查看文件 @
f6324ca
...
...
@@ -381,4 +381,5 @@ smfcore.xray.countingHistory.tdBarcode=\u30D0\u30FC\u30B3\u30FC\u30C9
smfcore.xray.countingHistory.xRayFile
=
\u
753B
\u
50CF
\u
30D5
\u
30A1
\u
30A4
\u
30EB
\u
540D
smfcore.xray.countingHistory.resultFile
=
\u
7D50
\u
679C
\u
30D5
\u
30A1
\u
30A4
\u
30EB
\u
540D
smfcore.xray.countingHistory.uploadOk
=
\u
30A2
\u
30C3
\u
30D7
\u
30ED
\u
30FC
\u
30C9
\u
5B8C
\u
4E86
smfcore.xray.countingHistory.countingTime
=
\u
30AB
\u
30A6
\u
30F3
\u
30C8
\u6642\u9593
\ No newline at end of file
smfcore.xray.countingHistory.countingTime
=
\u
30AB
\u
30A6
\u
30F3
\u
30C8
\u6642\u9593
smfcore.deviceSChart
=
Tool Utilization
\ No newline at end of file
src/main/resources/messages_zh_CN.properties
查看文件 @
f6324ca
...
...
@@ -383,4 +383,5 @@ smfcore.xray.countingHistory.resultFile=\u7ED3\u679C\u6587\u4EF6\u540D
smfcore.xray.countingHistory.uploadOk
=
\u
662F
\u5426\u
4E0A
\u
4F20
\u
5B8C
\u6210
smfcore.xray.countingHistory.countingTime
=
\u
70B9
\u6599\u
65F6
\u
95F4
smfcore.common.createDate
=
\u
521B
\u
5EFA
\u
65F6
\u
95F4
smfcore.common.updateDate
=
\u
66F4
\u
65B0
\u
65F6
\u
95F4
\ No newline at end of file
smfcore.common.updateDate
=
\u
66F4
\u
65B0
\u
65F6
\u
95F4
smfcore.deviceSChart
=
Tool Utilization
\ No newline at end of file
src/main/resources/messages_zh_TW.properties
查看文件 @
f6324ca
...
...
@@ -384,4 +384,5 @@ smfcore.xray.countingHistory.tdBarcode=\u689D\u78BC
smfcore.xray.countingHistory.xRayFile
=
\u5716\u7247\u
6A94
\u
540D
smfcore.xray.countingHistory.resultFile
=
\u
7D50
\u
679C
\u
6A94
\u
540D
smfcore.xray.countingHistory.uploadOk
=
\u
662F
\u5426\u
4E0A
\u
50B3
\u
5B8C
\u6210
smfcore.xray.countingHistory.countingTime
=
\u
9EDE
\u6599\u6642\u9593
\ No newline at end of file
smfcore.xray.countingHistory.countingTime
=
\u
9EDE
\u6599\u6642\u9593
smfcore.deviceSChart
=
Tool Utilization
\ No newline at end of file
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论