Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 3ecd8bf2
由
LN
编写于
2025-02-28 17:12:44 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
SO1560锡膏料仓温湿度上传:回温区,冷藏区2个,制冷温度2个
1 个父辈
f636ff94
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
117 行增加
和
40 行删除
src/main/java/com/neotel/smfcore/core/dashboard/mimo/SmdBoxMimoController.java
src/main/java/com/neotel/smfcore/core/device/bean/BoxStatusBean.java
src/main/java/com/neotel/smfcore/core/device/handler/impl/BaseDeviceHandler.java
src/main/java/com/neotel/smfcore/core/kanban/rest/BoxKanbanController.java
src/main/java/com/neotel/smfcore/core/kanban/rest/bean/dto/BoxStatusDto.java
src/main/java/com/neotel/smfcore/core/system/service/po/Humiture.java
src/main/java/com/neotel/smfcore/core/dashboard/mimo/SmdBoxMimoController.java
查看文件 @
3ecd8bf
...
@@ -351,7 +351,7 @@ public class SmdBoxMimoController {
...
@@ -351,7 +351,7 @@ public class SmdBoxMimoController {
int
allCount
=
inTask
+
outTask
;
int
allCount
=
inTask
+
outTask
;
BoxStatusDto
boxDto
=
new
BoxStatusDto
(
storage
.
getId
(),
storage
.
getName
(),
storage
.
getCid
(),
false
,
0
,
BoxStatusDto
boxDto
=
new
BoxStatusDto
(
storage
.
getId
(),
storage
.
getName
(),
storage
.
getCid
(),
false
,
0
,
"0"
,
"0"
,
"0"
,
""
,
""
,
allCount
,
inTask
,
outTask
,
"0"
,
"0"
,
"0"
,
""
,
""
,
allCount
,
inTask
,
outTask
,
0
,
""
,
""
,
""
,
""
,
""
,
storage
.
getType
(),
storage
.
getUsageMap
(),
new
HashMap
<>(),
storage
.
getInListName
());
0
,
""
,
""
,
""
,
""
,
""
,
storage
.
getType
(),
storage
.
getUsageMap
(),
new
HashMap
<>(),
storage
.
getInListName
()
,
""
,
""
,
""
,
""
);
//获取设备状态,设置状态和当前任务信息
//获取设备状态,设置状态和当前任务信息
StatusBean
bean
=
DevicesStatusUtil
.
getStatusBean
(
storage
.
getCid
());
StatusBean
bean
=
DevicesStatusUtil
.
getStatusBean
(
storage
.
getCid
());
...
@@ -375,10 +375,12 @@ public class SmdBoxMimoController {
...
@@ -375,10 +375,12 @@ public class SmdBoxMimoController {
}
else
{
}
else
{
boxDto
.
setOnLine
(
true
);
boxDto
.
setOnLine
(
true
);
for
(
BoxStatusBean
boxStatus
:
bean
.
getBoxStatus
().
values
())
{
for
(
BoxStatusBean
boxStatus
:
bean
.
getBoxStatus
().
values
())
{
String
humidity
=
boxStatus
.
getHumidity
();
// String humidity = boxStatus.getHumidity();
String
temperature
=
boxStatus
.
getTemperature
();
// String temperature = boxStatus.getTemperature();
boxDto
.
setHumidity
(
humidity
);
// boxDto.setHumidity(humidity);
boxDto
.
setTemperature
(
temperature
);
// boxDto.setTemperature(temperature);
boxDto
.
UpdateTemp
(
boxStatus
);
MSDSettiings
settiings
=
dataCache
.
getCache
(
Constants
.
CACHE_msdSetting
);
MSDSettiings
settiings
=
dataCache
.
getCache
(
Constants
.
CACHE_msdSetting
);
if
(
settiings
!=
null
)
{
if
(
settiings
!=
null
)
{
if
(
settiings
.
getMinHumidity
()
==
-
1
f
)
{
if
(
settiings
.
getMinHumidity
()
==
-
1
f
)
{
...
@@ -388,8 +390,8 @@ public class SmdBoxMimoController {
...
@@ -388,8 +390,8 @@ public class SmdBoxMimoController {
boxDto
.
setTemperature
(
0
+
""
);
boxDto
.
setTemperature
(
0
+
""
);
}
}
}
}
boxDto
.
setCodeAirTemp
(
boxStatus
.
getCodeAirTemp
());
//
boxDto.setCodeAirTemp(boxStatus.getCodeAirTemp());
boxDto
.
setCodeAirTemp2
(
boxStatus
.
getCodeAirTemp2
());
//
boxDto.setCodeAirTemp2(boxStatus.getCodeAirTemp2());
boxDto
.
setStatus
(
bean
.
getStatus
());
boxDto
.
setStatus
(
bean
.
getStatus
());
boxDto
.
setMsg
(
bean
.
getShowMsg
(
locale
));
boxDto
.
setMsg
(
bean
.
getShowMsg
(
locale
));
boxDto
.
setBarcode
(
bean
.
getCode
());
boxDto
.
setBarcode
(
bean
.
getCode
());
...
...
src/main/java/com/neotel/smfcore/core/device/bean/BoxStatusBean.java
查看文件 @
3ecd8bf
...
@@ -2,6 +2,7 @@ package com.neotel.smfcore.core.device.bean;
...
@@ -2,6 +2,7 @@ package com.neotel.smfcore.core.device.bean;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.neotel.smfcore.core.device.enums.BOX_STATUS
;
import
com.neotel.smfcore.core.device.enums.BOX_STATUS
;
import
lombok.Data
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -9,6 +10,7 @@ import java.util.Map;
...
@@ -9,6 +10,7 @@ import java.util.Map;
/**
/**
* Created by sunke on 17/2/13.
* Created by sunke on 17/2/13.
*/
*/
@Data
public
class
BoxStatusBean
{
public
class
BoxStatusBean
{
/// <summary>
/// <summary>
...
@@ -46,22 +48,41 @@ public class BoxStatusBean {
...
@@ -46,22 +48,41 @@ public class BoxStatusBean {
public
String
[]
msgParam
;
public
String
[]
msgParam
;
/// <summary>
/// <summary>
/// 温度
/// 温度
/锡膏料仓为冷藏区温度
/// </summary>
/// </summary>
public
String
temperature
;
public
String
temperature
;
/// <summary>
/// <summary>
/// 湿度
/// 湿度
/锡膏料仓为冷藏区湿度
/// </summary>
/// </summary>
public
String
humidity
;
public
String
humidity
;
/**
/**
*
冷藏区
温度1
*
制冷
温度1
*/
*/
public
String
codeAirTemp
;
public
String
codeAirTemp
;
/**
/**
* 制冷温度2
*/
public
String
codeAirTemp2
;
/**
* 冷藏区温度2
* 冷藏区温度2
*/
*/
public
String
codeAirTemp2
;
public
String
temperature2
;
/**
* 冷藏区湿度
*/
public
String
humidity2
;
/**
* 回温区温度
*/
public
String
wTemp
;
/**
* 回温区湿度
*/
public
String
wHum
;
public
int
getBoxId
()
{
public
int
getBoxId
()
{
return
boxId
;
return
boxId
;
...
@@ -195,19 +216,19 @@ public class BoxStatusBean {
...
@@ -195,19 +216,19 @@ public class BoxStatusBean {
return
-
1
;
return
-
1
;
}
}
public
String
getCodeAirTemp
()
{
//
public String getCodeAirTemp() {
return
codeAirTemp
;
//
return codeAirTemp;
}
//
}
public
void
setCodeAirTemp
(
String
codeAirTemp
)
{
public
void
setCodeAirTemp
(
String
codeAirTemp
)
{
this
.
codeAirTemp
=
codeAirTemp
;
this
.
codeAirTemp
=
codeAirTemp
;
}
}
public
String
getCodeAirTemp2
()
{
//
public String getCodeAirTemp2() {
return
codeAirTemp2
;
//
return codeAirTemp2;
}
//
}
//
public
void
setCodeAirTemp2
(
String
codeAirTemp2
)
{
//
public void setCodeAirTemp2(String codeAirTemp2) {
this
.
codeAirTemp2
=
codeAirTemp2
;
//
this.codeAirTemp2 = codeAirTemp2;
}
//
}
}
}
src/main/java/com/neotel/smfcore/core/device/handler/impl/BaseDeviceHandler.java
查看文件 @
3ecd8bf
...
@@ -961,6 +961,18 @@ public class BaseDeviceHandler implements IDeviceHandler {
...
@@ -961,6 +961,18 @@ public class BaseDeviceHandler implements IDeviceHandler {
if
(
ObjectUtil
.
isNotEmpty
(
codeAirTemp2
)){
if
(
ObjectUtil
.
isNotEmpty
(
codeAirTemp2
)){
humiture
.
setCodeAirTemp2
(
codeAirTemp2
);
humiture
.
setCodeAirTemp2
(
codeAirTemp2
);
}
}
if
(
ObjectUtil
.
isNotEmpty
(
boxStatus
.
getWHum
())){
humiture
.
setWHum
(
boxStatus
.
getWHum
());
}
if
(
ObjectUtil
.
isNotEmpty
(
boxStatus
.
getWTemp
())){
humiture
.
setWTemp
(
boxStatus
.
getWTemp
());
}
if
(
ObjectUtil
.
isNotEmpty
(
boxStatus
.
getTemperature2
())){
humiture
.
setTemperature2
(
boxStatus
.
getTemperature2
());
}
if
(
ObjectUtil
.
isNotEmpty
(
boxStatus
.
getHumidity2
())){
humiture
.
setHumidity2
(
boxStatus
.
getHumidity2
());
}
try
{
try
{
humitureManager
.
save
(
humiture
);
humitureManager
.
save
(
humiture
);
statusBean
.
setLastSaveTime
(
System
.
currentTimeMillis
());
statusBean
.
setLastSaveTime
(
System
.
currentTimeMillis
());
...
...
src/main/java/com/neotel/smfcore/core/kanban/rest/BoxKanbanController.java
查看文件 @
3ecd8bf
...
@@ -424,7 +424,7 @@ public class BoxKanbanController {
...
@@ -424,7 +424,7 @@ public class BoxKanbanController {
int
allCount
=
inTask
+
outTask
;
int
allCount
=
inTask
+
outTask
;
BoxStatusDto
boxDto
=
new
BoxStatusDto
(
storage
.
getId
(),
storage
.
getName
(),
storage
.
getCid
(),
false
,
0
,
BoxStatusDto
boxDto
=
new
BoxStatusDto
(
storage
.
getId
(),
storage
.
getName
(),
storage
.
getCid
(),
false
,
0
,
"0"
,
"0"
,
"0"
,
""
,
""
,
allCount
,
inTask
,
outTask
,
"0"
,
"0"
,
"0"
,
""
,
""
,
allCount
,
inTask
,
outTask
,
0
,
""
,
""
,
""
,
""
,
""
,
storage
.
getType
(),
storage
.
getUsageMap
(),
new
HashMap
<>(),
storage
.
getInListName
());
0
,
""
,
""
,
""
,
""
,
""
,
storage
.
getType
(),
storage
.
getUsageMap
(),
new
HashMap
<>(),
storage
.
getInListName
()
,
""
,
""
,
""
,
""
);
//获取设备状态,设置状态和当前任务信息
//获取设备状态,设置状态和当前任务信息
StatusBean
bean
=
DevicesStatusUtil
.
getStatusBean
(
storage
.
getCid
());
StatusBean
bean
=
DevicesStatusUtil
.
getStatusBean
(
storage
.
getCid
());
...
@@ -448,10 +448,11 @@ public class BoxKanbanController {
...
@@ -448,10 +448,11 @@ public class BoxKanbanController {
}
else
{
}
else
{
boxDto
.
setOnLine
(
true
);
boxDto
.
setOnLine
(
true
);
for
(
BoxStatusBean
boxStatus
:
bean
.
getBoxStatus
().
values
())
{
for
(
BoxStatusBean
boxStatus
:
bean
.
getBoxStatus
().
values
())
{
String
humidity
=
boxStatus
.
getHumidity
();
// String humidity = boxStatus.getHumidity();
String
temperature
=
boxStatus
.
getTemperature
();
// String temperature = boxStatus.getTemperature();
boxDto
.
setHumidity
(
humidity
);
// boxDto.setHumidity(humidity);
boxDto
.
setTemperature
(
temperature
);
// boxDto.setTemperature(temperature);
boxDto
.
UpdateTemp
(
boxStatus
);
MSDSettiings
settiings
=
dataCache
.
getCache
(
Constants
.
CACHE_msdSetting
);
MSDSettiings
settiings
=
dataCache
.
getCache
(
Constants
.
CACHE_msdSetting
);
if
(
settiings
!=
null
)
{
if
(
settiings
!=
null
)
{
if
(
settiings
.
getMinHumidity
()
==
-
1
f
)
{
if
(
settiings
.
getMinHumidity
()
==
-
1
f
)
{
...
@@ -461,8 +462,8 @@ public class BoxKanbanController {
...
@@ -461,8 +462,8 @@ public class BoxKanbanController {
boxDto
.
setTemperature
(
0
+
""
);
boxDto
.
setTemperature
(
0
+
""
);
}
}
}
}
boxDto
.
setCodeAirTemp
(
boxStatus
.
getCodeAirTemp
());
//
boxDto.setCodeAirTemp(boxStatus.getCodeAirTemp());
boxDto
.
setCodeAirTemp2
(
boxStatus
.
getCodeAirTemp2
());
//
boxDto.setCodeAirTemp2(boxStatus.getCodeAirTemp2());
boxDto
.
setStatus
(
bean
.
getStatus
());
boxDto
.
setStatus
(
bean
.
getStatus
());
boxDto
.
setMsg
(
bean
.
getShowMsg
(
locale
));
boxDto
.
setMsg
(
bean
.
getShowMsg
(
locale
));
boxDto
.
setBarcode
(
bean
.
getCode
());
boxDto
.
setBarcode
(
bean
.
getCode
());
...
...
src/main/java/com/neotel/smfcore/core/kanban/rest/bean/dto/BoxStatusDto.java
查看文件 @
3ecd8bf
package
com
.
neotel
.
smfcore
.
core
.
kanban
.
rest
.
bean
.
dto
;
package
com
.
neotel
.
smfcore
.
core
.
kanban
.
rest
.
bean
.
dto
;
import
com.neotel.smfcore.core.device.bean.BoxStatusBean
;
import
com.neotel.smfcore.core.device.enums.OP_STATUS
;
import
com.neotel.smfcore.core.device.enums.OP_STATUS
;
import
com.neotel.smfcore.core.storage.bean.UsageItem
;
import
com.neotel.smfcore.core.storage.bean.UsageItem
;
import
com.neotel.smfcore.core.storage.enums.DeviceType
;
import
com.neotel.smfcore.core.storage.enums.DeviceType
;
...
@@ -31,13 +32,13 @@ public class BoxStatusDto {
...
@@ -31,13 +32,13 @@ public class BoxStatusDto {
@ApiModelProperty
(
"单台BOX状态,0=离线,1=正常运行中, 2=急停,3=故障,4=警告,5=调试中,6入库执行中,7入仓位完成,8入库失败, 9出库执行中,10出仓位完成,11出库失败,12移栽出库,13 重置中,14 扫码入库失败 "
)
@ApiModelProperty
(
"单台BOX状态,0=离线,1=正常运行中, 2=急停,3=故障,4=警告,5=调试中,6入库执行中,7入仓位完成,8入库失败, 9出库执行中,10出仓位完成,11出库失败,12移栽出库,13 重置中,14 扫码入库失败 "
)
private
int
status
=
0
;
private
int
status
=
0
;
@ApiModelProperty
(
"温度"
)
@ApiModelProperty
(
"温度
/锡膏料仓冷藏区温度
"
)
private
String
temperature
;
private
String
temperature
;
@ApiModelProperty
(
"湿度"
)
@ApiModelProperty
(
"湿度
/锡膏料仓冷藏区湿度
"
)
private
String
humidity
;
private
String
humidity
;
@ApiModelProperty
(
"
冷气机温度
"
)
@ApiModelProperty
(
"
制冷温度1
"
)
private
String
codeAirTemp
;
private
String
codeAirTemp
;
@ApiModelProperty
(
"
冷气机
温度2"
)
@ApiModelProperty
(
"
制冷
温度2"
)
private
String
codeAirTemp2
;
private
String
codeAirTemp2
;
@ApiModelProperty
(
"文字显示"
)
@ApiModelProperty
(
"文字显示"
)
private
String
msg
=
""
;
private
String
msg
=
""
;
...
@@ -85,4 +86,27 @@ public class BoxStatusDto {
...
@@ -85,4 +86,27 @@ public class BoxStatusDto {
@ApiModelProperty
(
"当前绑定的入库单名称"
)
@ApiModelProperty
(
"当前绑定的入库单名称"
)
private
String
inListName
=
""
;
private
String
inListName
=
""
;
@ApiModelProperty
(
"冷藏区温度2"
)
public
String
temperature2
;
@ApiModelProperty
(
"冷藏区湿度"
)
public
String
humidity2
;
@ApiModelProperty
(
"回温区温度"
)
public
String
wTemp
;
@ApiModelProperty
(
"回温区湿度"
)
public
String
wHum
;
public
void
UpdateTemp
(
BoxStatusBean
boxStatus
)
{
String
humidity
=
boxStatus
.
getHumidity
();
String
temperature
=
boxStatus
.
getTemperature
();
setHumidity
(
humidity
);
setTemperature
(
temperature
);
setWTemp
(
boxStatus
.
getWTemp
());
setWHum
(
boxStatus
.
getWHum
());
setCodeAirTemp
(
boxStatus
.
getCodeAirTemp
());
setCodeAirTemp2
(
boxStatus
.
getCodeAirTemp2
());
setTemperature2
(
boxStatus
.
getTemperature2
());
setHumidity2
(
boxStatus
.
getHumidity2
());
}
}
}
src/main/java/com/neotel/smfcore/core/system/service/po/Humiture.java
查看文件 @
3ecd8bf
...
@@ -17,23 +17,40 @@ public class Humiture extends BasePo implements Serializable {
...
@@ -17,23 +17,40 @@ public class Humiture extends BasePo implements Serializable {
* 料仓号
* 料仓号
*/
*/
private
String
cid
;
private
String
cid
;
/// <summary>
/// 温度/锡膏料仓为冷藏区温度
/// </summary>
public
String
temperature
;
/// <summary>
/// 湿度/锡膏料仓为冷藏区湿度
/// </summary>
public
String
humidity
;
/**
* 制冷温度1
*/
public
String
codeAirTemp
=
""
;
/**
/**
*
温度
*
制冷温度2
*/
*/
p
rivate
String
temperature
;
p
ublic
String
codeAirTemp2
=
""
;
/**
/**
* 温度2,用于锡膏料仓冷藏温度保存
* 冷藏区温度2
*/
public
String
temperature2
=
""
;
/**
* 冷藏区湿度
*/
*/
p
rivate
String
codeAirTemp
;
p
ublic
String
humidity2
=
""
;
/**
/**
*
冷藏区温度2(锡膏料仓)
*
回温区温度
*/
*/
p
rivate
String
codeAirTemp2
;
p
ublic
String
wTemp
=
""
;
/**
/**
* 湿度
*
回温区
湿度
*/
*/
p
rivate
String
humidity
;
p
ublic
String
wHum
=
""
;
}
}
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论