Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张雷
/
fmboot
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
构建
提交
问题看板
文件
提交
网络
比较
分支
标签
6793290b
由
张雷
编写于
2023-10-08 11:03:18 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
奥体项目设备实时数据,模拟量实时数据接口开发
1 个父辈
c8036cd1
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
65 行增加
和
0 行删除
fm-product/src/main/java/com/skua/modules/business/controller/OlympicCenterController.java
fm-product/src/main/java/com/skua/modules/business/mapper/WhatStructDataMapper.java
fm-product/src/main/java/com/skua/modules/business/mapper/xml/WhatStructDataMapper.xml
fm-product/src/main/java/com/skua/modules/business/service/IOlympicCenterService.java
fm-product/src/main/java/com/skua/modules/business/service/impl/OlympicCenterServiceImpl.java
fm-product/src/main/java/com/skua/modules/business/controller/OlympicCenterController.java
查看文件 @
6793290
...
...
@@ -339,4 +339,14 @@ public class OlympicCenterController {
result
.
setSuccess
(
true
);
return
result
;
}
@ApiOperation
(
value
=
"获取新锅炉房泵实时数据"
,
notes
=
"获取新锅炉房泵实时数据"
)
@GetMapping
(
value
=
"/getNewBoilerPumpRealTimeData"
)
public
Result
<
Map
<
String
,
Object
>>
getNewBoilerPumpRealTimeData
(
String
sourceType
,
String
pumpId
){
Result
<
Map
<
String
,
Object
>>
result
=
new
Result
<
Map
<
String
,
Object
>>();
Map
<
String
,
Object
>
map
=
olympicCenterService
.
getNewBoilerPumpRealTimeData
(
sourceType
,
pumpId
);
result
.
setResult
(
map
);
result
.
setSuccess
(
true
);
return
result
;
}
}
...
...
fm-product/src/main/java/com/skua/modules/business/mapper/WhatStructDataMapper.java
查看文件 @
6793290
...
...
@@ -37,4 +37,6 @@ public interface WhatStructDataMapper {
List
<
WhatStructData
>
getEquipDataListOfNewBoiler
(
@Param
(
"sourceType"
)
String
sourceType
);
List
<
WhatStructData
>
getRealTimeDataOfNewBoiler
(
@Param
(
"sourceType"
)
String
sourceType
,
@Param
(
"pipeDn"
)
String
pipeDn
);
List
<
WhatStructData
>
getXglfEquipDataList
(
@Param
(
"sourceType"
)
String
sourceType
,
@Param
(
"pumpId"
)
String
pumpId
);
}
...
...
fm-product/src/main/java/com/skua/modules/business/mapper/xml/WhatStructDataMapper.xml
查看文件 @
6793290
...
...
@@ -96,4 +96,9 @@
AND equip_type = 'other'
</select>
<select
id=
"getXglfEquipDataList"
resultType=
"com.skua.modules.business.entity.WhatStructData"
>
select * from what_struct_data_xglf
where pump_code = #{sourceType} and equip_code = #{pumpId}
</select>
</mapper>
\ No newline at end of file
...
...
fm-product/src/main/java/com/skua/modules/business/service/IOlympicCenterService.java
查看文件 @
6793290
...
...
@@ -64,4 +64,6 @@ public interface IOlympicCenterService {
List
<
Map
<
String
,
Object
>>
getNewBoilerRealTimeReport
(
String
sourceType
);
List
<
TableResult
>
getNewBoilerRealDataReport
(
String
sourceType
,
String
pipeDn
);
Map
<
String
,
Object
>
getNewBoilerPumpRealTimeData
(
String
sourceType
,
String
pumpId
);
}
...
...
fm-product/src/main/java/com/skua/modules/business/service/impl/OlympicCenterServiceImpl.java
查看文件 @
6793290
...
...
@@ -2968,6 +2968,52 @@ public class OlympicCenterServiceImpl implements IOlympicCenterService {
return
list
;
}
@Override
public
Map
<
String
,
Object
>
getNewBoilerPumpRealTimeData
(
String
sourceType
,
String
pumpId
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"status"
,
"停止"
);
map
.
put
(
"runtime"
,
"0"
);
map
.
put
(
"name"
,
pumpId
);
map
.
put
(
"id"
,
pumpId
);
String
pgField
=
""
;
List
<
Map
<
String
,
Object
>>
statusList
=
new
ArrayList
<>();
List
<
WhatStructData
>
equipList
=
new
ArrayList
<>();
equipList
=
whatStructDataMapper
.
getXglfEquipDataList
(
sourceType
,
pumpId
);
if
(
equipList
.
size
()==
0
){
return
map
;
}
Map
<
String
,
Object
>
equipMap
=
new
HashMap
<>();
for
(
WhatStructData
whatStructData
:
equipList
)
{
pgField
=
pgField
+
","
+
whatStructData
.
getMonitorId
();
if
(
"equip_status"
.
equals
(
whatStructData
.
getEquipType
())){
Map
<
String
,
Object
>
statusMap
=
new
HashMap
<>();
statusMap
.
put
(
"name"
,
whatStructData
.
getMonitorName
());
statusMap
.
put
(
"id"
,
whatStructData
.
getId
());
statusMap
.
put
(
"monitorid"
,
whatStructData
.
getMonitorId
());
statusList
.
add
(
statusMap
);
map
.
put
(
"name"
,
whatStructData
.
getMonitorName
());
}
if
(
"equip_time"
.
equals
(
whatStructData
.
getEquipType
())){
equipMap
.
put
(
"runtime"
,
whatStructData
.
getMonitorId
());
}
}
Map
<
String
,
Object
>
monitorMap
=
new
HashMap
<>();
List
<
Map
<
String
,
Object
>>
monitorList
=
fmPgQueryService
.
queryFactoryMonitorFromRealTimeData
(
AT_ID
,
pgField
);
if
(
monitorList
.
size
()==
1
){
monitorMap
=
monitorList
.
get
(
0
);
if
(
monitorMap
.
get
(
equipMap
.
get
(
"runtime"
).
toString
())!=
null
){
map
.
put
(
"runtime"
,
monitorMap
.
get
(
equipMap
.
get
(
"runtime"
).
toString
()));
}
else
{
map
.
put
(
"runtime"
,
"--"
);
}
String
equipStatus
=
"停止"
;
equipStatus
=
getStatusNew2
(
monitorMap
,
statusList
,
pumpId
);
map
.
put
(
"status"
,
equipStatus
);
}
return
map
;
}
//遍历两个年份之间的年份
private
static
String
[]
getYearsArray
(
String
startYear
,
String
endYear
)
{
int
length
=
Integer
.
parseInt
(
endYear
)
-
Integer
.
parseInt
(
startYear
)
+
1
;
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论