78eebf40 张雷

奥体项目数据报表时间修改

1 个父辈 9873efc0
......@@ -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;
}
}
......
......@@ -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);
}
......
......@@ -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
......
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);
}
......
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!