Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张雷
/
fmboot
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
构建
提交
问题看板
文件
提交
网络
比较
分支
标签
78eebf40
由
张雷
编写于
2023-06-13 10:25:57 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
奥体项目数据报表时间修改
1 个父辈
9873efc0
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
70 行增加
和
8 行删除
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/vo/InputQueryParams.java
fm-product/src/main/java/com/skua/modules/business/controller/OlympicCenterController.java
查看文件 @
78eebf4
...
...
@@ -4,6 +4,7 @@ import com.skua.core.api.vo.Result;
import
com.skua.modules.business.service.IOlympicCenterService
;
import
com.skua.modules.business.service.ISynthesizeService
;
import
com.skua.modules.business.vo.EchartResult
;
import
com.skua.modules.business.vo.InputQueryParams
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -204,4 +205,25 @@ public class OlympicCenterController {
return
result
;
}
@ApiOperation
(
value
=
"获取系统的压力和流量趋势图"
,
notes
=
"获取系统的压力和流量趋势图"
)
@GetMapping
(
value
=
"/getPumpOrFlowChart"
)
public
Result
<
Map
<
String
,
Object
>>
getPumpOrFlowChart
(
InputQueryParams
inputQueryParams
){
Result
<
Map
<
String
,
Object
>>
result
=
new
Result
<
Map
<
String
,
Object
>>();
Map
<
String
,
Object
>
map
=
olympicCenterService
.
getPumpOrFlowChart
(
inputQueryParams
);
result
.
setResult
(
map
);
result
.
setSuccess
(
true
);
return
result
;
}
@ApiOperation
(
value
=
"获取趋势图"
,
notes
=
"获取趋势图"
)
@GetMapping
(
value
=
"/getHistoryTrendsByDate"
)
public
Result
<
List
<
EchartResult
>>
getHistoryTrendsByDate
(
InputQueryParams
inputQueryParams
){
Result
<
List
<
EchartResult
>>
result
=
new
Result
<
List
<
EchartResult
>>();
List
<
EchartResult
>
list
=
new
ArrayList
<
EchartResult
>();
list
=
olympicCenterService
.
getHistoryTrendsByDate
(
inputQueryParams
);
result
.
setResult
(
list
);
result
.
setSuccess
(
true
);
return
result
;
}
}
...
...
fm-product/src/main/java/com/skua/modules/business/mapper/WhatStructDataMapper.java
查看文件 @
78eebf4
...
...
@@ -31,4 +31,6 @@ public interface WhatStructDataMapper {
List
<
WhatStructData
>
getEquipDataList
(
@Param
(
"sourceType"
)
String
sourceType
,
@Param
(
"pumpId"
)
String
pumpId
);
List
<
WhatStructData
>
getEquipDataListBySource
(
@Param
(
"sourceType"
)
String
sourceType
);
List
<
WhatStructData
>
getSumEquipListBySource
(
@Param
(
"sourceType"
)
String
sourceType
);
}
...
...
fm-product/src/main/java/com/skua/modules/business/mapper/xml/WhatStructDataMapper.xml
查看文件 @
78eebf4
...
...
@@ -15,7 +15,7 @@
</select>
<select
id=
"getListByType"
resultType=
"com.skua.modules.business.entity.WhatStructData"
>
select * from what_struct_data
_bak
select * from what_struct_data
where 1=1
<if
test=
"sourceType!=null and sourceType!=''"
>
and system_code = #{sourceType}
...
...
@@ -24,44 +24,54 @@
</select>
<select
id=
"getDataList"
resultType=
"com.skua.modules.business.entity.WhatStructData"
>
select * from what_struct_data
_bak
select * from what_struct_data
where id LIKE CONCAT( #{equipId},'%')
order by monitor_sort
</select>
<select
id=
"getListForUENew"
resultType=
"com.skua.modules.business.entity.WhatStructData"
>
select * from what_struct_data
_bak
order by monitor_sort
select * from what_struct_data order by monitor_sort
</select>
<select
id=
"getFlowList"
resultType=
"com.skua.modules.business.entity.WhatStructData"
>
select * from what_struct_data
_bak
where equip_type like CONCAT('flow','%')
select * from what_struct_data where equip_type like CONCAT('flow','%')
<if
test=
"loction!=null and loction!=''"
>
and pump_code = #{loction}
</if>
</select>
<select
id=
"getPressureList"
resultType=
"com.skua.modules.business.entity.WhatStructData"
>
select * from what_struct_data
_bak
where equip_type like CONCAT('pressure','%')
select * from what_struct_data where equip_type like CONCAT('pressure','%')
<if
test=
"loction!=null and loction!=''"
>
and pump_code = #{loction}
</if>
</select>
<select
id=
"getTemperatureList"
resultType=
"com.skua.modules.business.entity.WhatStructData"
>
select * from what_struct_data
_bak
where equip_type like CONCAT('temperature','%')
select * from what_struct_data where equip_type like CONCAT('temperature','%')
<if
test=
"loction!=null and loction!=''"
>
and pump_code = #{loction}
</if>
</select>
<select
id=
"getEquipDataList"
resultType=
"com.skua.modules.business.entity.WhatStructData"
>
select * from what_struct_data
_bak
select * from what_struct_data
where pump_code = #{sourceType} and equip_code = #{pumpId}
</select>
<select
id=
"getEquipDataListBySource"
resultType=
"com.skua.modules.business.entity.WhatStructData"
>
select * from what_struct_data
_bak
select * from what_struct_data
where pump_code = #{sourceType}
</select>
<select
id=
"getSumEquipListBySource"
resultType=
"com.skua.modules.business.entity.WhatStructData"
>
SELECT
*
FROM
what_struct_data
WHERE
system_code = #{sourceType}
AND is_sum = 1
</select>
</mapper>
\ No newline at end of file
...
...
fm-product/src/main/java/com/skua/modules/business/service/IOlympicCenterService.java
查看文件 @
78eebf4
package
com
.
skua
.
modules
.
business
.
service
;
import
com.skua.modules.business.vo.EchartResult
;
import
com.skua.modules.business.vo.InputQueryParams
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -39,4 +40,8 @@ public interface IOlympicCenterService {
List
<
Map
<
String
,
Object
>>
getHistoryReportClos
(
String
dataType
,
String
loction
);
List
<
Map
<
String
,
Object
>>
getHistoryReportData
(
String
dataType
,
String
loction
);
Map
<
String
,
Object
>
getPumpOrFlowChart
(
InputQueryParams
inputQueryParams
);
List
<
EchartResult
>
getHistoryTrendsByDate
(
InputQueryParams
inputQueryParams
);
}
...
...
fm-product/src/main/java/com/skua/modules/business/service/impl/OlympicCenterServiceImpl.java
查看文件 @
78eebf4
此文件的差异被折叠,
点击展开。
fm-product/src/main/java/com/skua/modules/business/vo/InputQueryParams.java
0 → 100644
查看文件 @
78eebf4
package
com
.
skua
.
modules
.
business
.
vo
;
import
lombok.Data
;
/**
* 返回数据实体
*/
@Data
public
class
InputQueryParams
{
/**设备编码*/
private
String
equipId
;
/**设备类型 压力:p,流量:f,温度:t*/
private
String
equipType
;
/**系统类型*/
private
String
sourceType
;
/**时间粒度 今日:today,本周:week,本月:month,近6月:6month,自定义:custom*/
private
String
timeType
;
/**开始时间 yyyy-MM-DD*/
private
String
start
;
/**结束时间 yyyy-MM-DD*/
private
String
end
;
}
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论