Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张雷
/
skboot-zhongye
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
构建
提交
问题看板
文件
提交
网络
比较
分支
标签
7705c933
由
张雷
编写于
2025-01-16 11:46:51 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
实时数据问题修改
1 个父辈
671b4a1c
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
34 行增加
和
30 行删除
sk-module-datafill/src/main/java/com/skua/modules/dataAnalysis/service/impl/FactoryCenterServiceImpl.java
sk-module-system/src/main/java/com/skua/modules/system/controller/SysFactoryInfoController.java
sk-module-datafill/src/main/java/com/skua/modules/dataAnalysis/service/impl/FactoryCenterServiceImpl.java
查看文件 @
7705c93
...
...
@@ -87,42 +87,46 @@ public class FactoryCenterServiceImpl implements IFactoryCenterService {
if
(!
StringUtils
.
isEmpty
(
fields
))
{
fields
=
fields
.
substring
(
1
);
}
//获取实时数据
List
<
Map
<
String
,
Object
>>
pgDataList
=
pgQueryService
.
queryFactoryMonitorFromRealTimeData
(
departId
,
fields
);
Map
<
String
,
Object
>
dataMap
=
new
HashMap
<
String
,
Object
>();
if
(
pgDataList
!=
null
&&
pgDataList
.
size
()>
0
)
{
dataMap
=
pgDataList
.
get
(
0
);
}
String
[]
departArray
=
departId
.
split
(
","
);
//根据厂区分别查询实时数据
int
sort
=
0
;
//序号
for
(
String
depart
:
departArray
)
{
Map
<
String
,
Object
>
limitMap
=
new
HashMap
<>();
if
(
levelMap
.
get
(
depart
)!=
null
){
List
<
Map
<
String
,
String
>>
limitList
=
(
List
<
Map
<
String
,
String
>>)
levelMap
.
get
(
depart
);
for
(
Map
<
String
,
String
>
lMap
:
limitList
)
{
limitMap
.
put
(
lMap
.
get
(
"code"
),
lMap
);
String
[]
departIdArr
=
departId
.
split
(
","
);
for
(
String
depart
:
departIdArr
)
{
List
<
WaterQualityMonitoringDetailVO
>
realTimelist
=
new
ArrayList
<>();
//获取实时数据
List
<
Map
<
String
,
Object
>>
pgDataList
=
pgQueryService
.
queryFactoryMonitorFromRealTimeData
(
depart
,
fields
);
Map
<
String
,
Object
>
dataMap
=
new
HashMap
<
String
,
Object
>();
if
(
pgDataList
!=
null
&&
pgDataList
.
size
()>
0
)
{
dataMap
=
pgDataList
.
get
(
0
);
Map
<
String
,
Object
>
limitMap
=
new
HashMap
<>();
if
(
levelMap
.
get
(
depart
)!=
null
){
List
<
Map
<
String
,
String
>>
limitList
=
(
List
<
Map
<
String
,
String
>>)
levelMap
.
get
(
depart
);
for
(
Map
<
String
,
String
>
lMap
:
limitList
)
{
limitMap
.
put
(
lMap
.
get
(
"code"
),
lMap
);
}
}
}
if
(
parmType
!=
null
){
if
(
"in"
.
equals
(
parmType
)){
sort
++;
list
=
putInWaterDataInList
(
sort
,
list
,
dataMap
,
monitorTagMap
,
depart
,
departMap
,
departParentMap
,
limitMap
);
}
else
if
(
"out"
.
equals
(
parmType
)){
sort
++;
list
=
putOutWaterDataInList
(
sort
,
list
,
dataMap
,
monitorTagMap
,
depart
,
departMap
,
departParentMap
,
limitMap
);
if
(
parmType
!=
null
){
if
(
"in"
.
equals
(
parmType
)){
sort
++;
realTimelist
=
putInWaterDataInList
(
sort
,
realTimelist
,
dataMap
,
monitorTagMap
,
depart
,
departMap
,
departParentMap
,
limitMap
);
}
else
if
(
"out"
.
equals
(
parmType
)){
sort
++;
realTimelist
=
putOutWaterDataInList
(
sort
,
realTimelist
,
dataMap
,
monitorTagMap
,
depart
,
departMap
,
departParentMap
,
limitMap
);
}
else
{
sort
++;
realTimelist
=
putInWaterDataInList
(
sort
,
realTimelist
,
dataMap
,
monitorTagMap
,
depart
,
departMap
,
departParentMap
,
limitMap
);
sort
++;
realTimelist
=
putOutWaterDataInList
(
sort
,
realTimelist
,
dataMap
,
monitorTagMap
,
depart
,
departMap
,
departParentMap
,
limitMap
);
}
}
else
{
sort
++;
list
=
putInWaterDataInList
(
sort
,
list
,
dataMap
,
monitorTagMap
,
depart
,
departMap
,
departParentMap
,
limitMap
);
realTimelist
=
putInWaterDataInList
(
sort
,
realTime
list
,
dataMap
,
monitorTagMap
,
depart
,
departMap
,
departParentMap
,
limitMap
);
sort
++;
list
=
putOutWaterDataInList
(
sort
,
list
,
dataMap
,
monitorTagMap
,
depart
,
departMap
,
departParentMap
,
limitMap
);
realTimelist
=
putOutWaterDataInList
(
sort
,
realTime
list
,
dataMap
,
monitorTagMap
,
depart
,
departMap
,
departParentMap
,
limitMap
);
}
}
else
{
sort
++;
list
=
putInWaterDataInList
(
sort
,
list
,
dataMap
,
monitorTagMap
,
depart
,
departMap
,
departParentMap
,
limitMap
);
sort
++;
list
=
putOutWaterDataInList
(
sort
,
list
,
dataMap
,
monitorTagMap
,
depart
,
departMap
,
departParentMap
,
limitMap
);
list
.
addAll
(
realTimelist
);
}
}
return
list
;
}
...
...
sk-module-system/src/main/java/com/skua/modules/system/controller/SysFactoryInfoController.java
查看文件 @
7705c93
...
...
@@ -483,12 +483,12 @@ public class SysFactoryInfoController {
public
Result
queryByDepartId
(
@RequestParam
(
name
=
"departId"
,
required
=
true
)
String
departId
)
{
Result
result
=
new
Result
();
SysFactoryInfoVO
sysFactoryInfo
=
sysFactoryInfoService
.
getByDepartId
(
departId
);
JSONObject
jsonObject
=
sysDictService
.
translateTDictValue
(
sysFactoryInfo
);
JSONObject
jsonObject
=
new
JSONObject
(
);
if
(
sysFactoryInfo
==
null
)
{
departId
=
getDepart
(
BaseContextHandler
.
getRealDepartId
());
sysFactoryInfo
=
sysFactoryInfoService
.
getByDepartId
(
departId
);
jsonObject
=
sysDictService
.
translateTDictValue
(
sysFactoryInfo
);
}
jsonObject
=
sysDictService
.
translateTDictValue
(
sysFactoryInfo
);
result
.
setResult
(
jsonObject
);
result
.
setSuccess
(
true
);
return
result
;
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论