Commit 889da2c7 authored by zhangsen's avatar zhangsen

td相关

parent 8d87161f
......@@ -53,10 +53,10 @@ public class TdInfoQueryController {
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@GetMapping(value = "/getFanHealthIndexInfo")
@ApiOperation(httpMethod = "GET", value = "分页查询健康指数信息 - 风电", notes = "分页查询健康指数信息 - 风电")
public ResponseModel<Page<FanHealthIndex>> getFanHealthIndexInfo(@RequestBody FanHealthIndexDto dto, @RequestParam String analysisObjType) {
dto.setAnalysisObjType(analysisObjType);
@PostMapping(value = "/getFanHealthIndexInfo")
@ApiOperation(httpMethod = "POST", value = "分页查询健康指数信息 - 风电", notes = "分页查询健康指数信息 - 风电")
public ResponseModel<Page<FanHealthIndex>> getFanHealthIndexInfo(@RequestBody FanHealthIndexDto dto) {
// TODO: 2023/11/7 时间减8
Page<FanHealthIndex> resultPage = new Page<>(dto.getCurrent(), dto.getSize());
dto.setCurrent((dto.getCurrent() - 1) * dto.getSize());
List<Map<String, String>> orderWeight = dto.getSorts().stream().sorted(Comparator.comparing(t -> Integer.parseInt(t.get("orderWeight")))).collect(Collectors.toList());
......@@ -76,10 +76,9 @@ public class TdInfoQueryController {
}
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@GetMapping(value = "/getPvHealthIndexInfo")
@ApiOperation(httpMethod = "GET", value = "分页查询健康指数信息 - 光伏", notes = "分页查询健康指数信息 - 光伏")
public ResponseModel<Page<PvHealthIndex>> getPvHealthIndexInfo(@RequestBody PvHealthIndexDto dto, @RequestParam String analysisObjType) {
dto.setAnalysisObjType(analysisObjType);
@PostMapping(value = "/getPvHealthIndexInfo")
@ApiOperation(httpMethod = "POST", value = "分页查询健康指数信息 - 光伏", notes = "分页查询健康指数信息 - 光伏")
public ResponseModel<Page<PvHealthIndex>> getPvHealthIndexInfo(@RequestBody PvHealthIndexDto dto) {
Page<PvHealthIndex> resultPage = new Page<>(dto.getCurrent(), dto.getSize());
dto.setCurrent((dto.getCurrent() - 1) * dto.getSize());
List<Map<String, String>> orderWeight = dto.getSorts().stream().sorted(Comparator.comparing(t -> Integer.parseInt(t.get("orderWeight")))).collect(Collectors.toList());
......
......@@ -156,17 +156,17 @@
<select id="getInfoByPage" resultType="com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanHealthIndex">
SELECT * FROM fan_health_index_data
<where>
<if test='dto.analysisObjType!= null'>analysis_obj_type = #{dto.analysisObjType}</if>
<if test='dto.analysisType!= null'>and analysis_type = #{dto.analysisType}</if>
<if test='dto.endDate!= null'> and ts &lt;= #{dto.endDate} </if>
<if test='dto.startDate!= null'> and ts &gt;= #{dto.startDate} </if>
<if test='dto.area!= null'> AND area = #{area} </if>
<if test='dto.number!= null'> AND `number` = #{dto.number} </if>
<if test='dto.pointName!= null'>AND point_name = #{dto.pointName} </if>
<if test='dto.station!= null'>AND station = #{dto.station} </if>
<if test='dto.healthLevel!= null'>AND health_level = #{dto.healthLevel} </if>
<if test='dto.subSystem!= null'>AND sub_system = #{dto.subSystem} </if>
<if test='dto.equipmentName!= null'>AND equipment_name = #{dto.equipmentName}
<if test="dto.analysisObjType!= null and dto.analysisObjType!= ''">analysis_obj_type = #{dto.analysisObjType}</if>
<if test="dto.analysisType!= null and dto.analysisType!= ''">and analysis_type = #{dto.analysisType}</if>
<if test="dto.endDate!= null and dto.endDate!= '' "> and ts &lt;= #{dto.endDate} </if>
<if test="dto.startDate!= null and dto.startDate!= ''"> and ts &gt;= #{dto.startDate} </if>
<if test="dto.area!= null and dto.area!= ''"> AND area = #{area} </if>
<if test="dto.number!= null and dto.number!= ''"> AND `number` = #{dto.number} </if>
<if test="dto.pointName!= null and dto.pointName!= ''">AND point_name = #{dto.pointName} </if>
<if test="dto.station!= null and dto.station!= ''">AND station = #{dto.station} </if>
<if test="dto.healthLevel!= null and dto.healthLevel!= ''">AND health_level = #{dto.healthLevel} </if>
<if test="dto.subSystem!= null and dto.subSystem!= ''">AND sub_system = #{dto.subSystem} </if>
<if test="dto.equipmentName!= null and dto.equipmentName!= ''">AND equipment_name = #{dto.equipmentName}
</if>
</where>
<if test="dto.orderColumns != null and dto.orderColumns != ''">
......@@ -178,17 +178,18 @@
<select id="getInfoByPageTotal" resultType="java.lang.Integer">
SELECT count(1) FROM fan_health_index_data
<where>
<if test='dto.analysisObjType!= null'>analysis_obj_type = #{dto.analysisObjType}</if>
<if test='dto.analysisType!= null'>and analysis_type = #{dto.analysisType}</if>
<if test='dto.endDate!= null'> and ts &lt;= #{dto.endDate} </if>
<if test='dto.startDate!= null'> and ts &gt;= #{dto.startDate} </if>
<if test='dto.area!= null'> AND area = #{area} </if>
<if test='dto.number!= null'> AND `number` = #{dto.number} </if>
<if test='dto.pointName!= null'>AND point_name = #{dto.pointName} </if>
<if test='dto.station!= null'>AND station = #{dto.station} </if>
<if test='dto.healthLevel!= null'>AND health_level = #{dto.healthLevel} </if>
<if test='dto.subSystem!= null'>AND sub_system = #{dto.subSystem} </if>
<if test='dto.equipmentName!= null'>AND equipment_name = #{dto.equipmentName}</if>
<if test="dto.analysisObjType!= null and dto.analysisObjType!= ''">analysis_obj_type = #{dto.analysisObjType}</if>
<if test="dto.analysisType!= null and dto.analysisType!= ''">and analysis_type = #{dto.analysisType}</if>
<if test="dto.endDate!= null and dto.endDate!= '' "> and ts &lt;= #{dto.endDate} </if>
<if test="dto.startDate!= null and dto.startDate!= ''"> and ts &gt;= #{dto.startDate} </if>
<if test="dto.area!= null and dto.area!= ''"> AND area = #{area} </if>
<if test="dto.number!= null and dto.number!= ''"> AND `number` = #{dto.number} </if>
<if test="dto.pointName!= null and dto.pointName!= ''">AND point_name = #{dto.pointName} </if>
<if test="dto.station!= null and dto.station!= ''">AND station = #{dto.station} </if>
<if test="dto.healthLevel!= null and dto.healthLevel!= ''">AND health_level = #{dto.healthLevel} </if>
<if test="dto.subSystem!= null and dto.subSystem!= ''">AND sub_system = #{dto.subSystem} </if>
<if test="dto.equipmentName!= null and dto.equipmentName!= ''">AND equipment_name = #{dto.equipmentName}
</if>
</where>
</select>
......
......@@ -190,16 +190,16 @@
<select id="getInfoByPage" resultType="com.yeejoin.amos.boot.module.jxiop.biz.tdengine.PvHealthIndex">
SELECT * FROM pv_health_index_data
<where>
<if test='dto.analysisObjType!= null'>analysis_obj_type = #{dto.analysisObjType}</if>
<if test='dto.analysisType!= null'>and analysis_type = #{dto.analysisType}</if>
<if test='dto.endDate!= null'> and ts &lt;= #{dto.endDate} </if>
<if test='dto.startDate!= null'> and ts &gt;= #{dto.startDate} </if>
<if test='dto.area!= null'> AND area = #{area} </if>
<if test='dto.number!= null'> AND `subarray` = #{dto.subarray} </if>
<if test='dto.pointName!= null'>AND point_name = #{dto.pointName} </if>
<if test='dto.station!= null'>AND station = #{dto.station} </if>
<if test='dto.healthLevel!= null'>AND health_level = #{dto.healthLevel} </if>
<if test='dto.equipmentName!= null'>AND equipment_name = #{dto.equipmentName}
<if test="dto.analysisObjType!= null and dto.analysisObjType!= ''">analysis_obj_type = #{dto.analysisObjType}</if>
<if test="dto.analysisType!= null and dto.analysisType!= ''">and analysis_type = #{dto.analysisType}</if>
<if test="dto.endDate!= null and dto.endDate!= ''"> and ts &lt;= #{dto.endDate} </if>
<if test="dto.startDate!= null and dto.startDate!= ''"> and ts &gt;= #{dto.startDate} </if>
<if test="dto.area!= null and dto.area!= ''"> AND area = #{area} </if>
<if test="dto.subarray!= null and dto.subarray!= ''"> AND `subarray` = #{dto.subarray} </if>
<if test="dto.pointName!= null and dto.pointName!= ''">AND point_name = #{dto.pointName} </if>
<if test="dto.station!= null and dto.station!= ''">AND station = #{dto.station} </if>
<if test="dto.healthLevel!= null and dto.healthLevel!= ''">AND health_level = #{dto.healthLevel} </if>
<if test="dto.equipmentName!= null and dto.equipmentName!= ''">AND equipment_name = #{dto.equipmentName}
</if>
</where>
<if test="dto.orderColumns != null and dto.orderColumns != ''">
......@@ -211,17 +211,17 @@
<select id="getInfoByPageTotal" resultType="java.lang.Integer">
SELECT count(1) FROM fan_health_index_data
<where>
<if test='dto.analysisObjType!= null'>analysis_obj_type = #{dto.analysisObjType}</if>
<if test='dto.analysisType!= null'>and analysis_type = #{dto.analysisType}</if>
<if test='dto.endDate!= null'> and ts &lt;= #{dto.endDate} </if>
<if test='dto.startDate!= null'> and ts &gt;= #{dto.startDate} </if>
<if test='dto.area!= null'> AND area = #{area} </if>
<if test='dto.number!= null'> AND `number` = #{dto.number} </if>
<if test='dto.pointName!= null'>AND point_name = #{dto.pointName} </if>
<if test='dto.station!= null'>AND station = #{dto.station} </if>
<if test='dto.healthLevel!= null'>AND health_level = #{dto.healthLevel} </if>
<if test='dto.subSystem!= null'>AND sub_system = #{dto.subSystem} </if>
<if test='dto.equipmentName!= null'>AND equipment_name = #{dto.equipmentName}</if>
<if test="dto.analysisObjType!= null and dto.analysisObjType!= ''">analysis_obj_type = #{dto.analysisObjType}</if>
<if test="dto.analysisType!= null and dto.analysisType!= ''">and analysis_type = #{dto.analysisType}</if>
<if test="dto.endDate!= null and dto.endDate!= ''"> and ts &lt;= #{dto.endDate} </if>
<if test="dto.startDate!= null and dto.startDate!= ''"> and ts &gt;= #{dto.startDate} </if>
<if test="dto.area!= null and dto.area!= ''"> AND area = #{area} </if>
<if test="dto.subarray!= null and dto.subarray!= ''"> AND `subarray` = #{dto.subarray} </if>
<if test="dto.pointName!= null and dto.pointName!= ''">AND point_name = #{dto.pointName} </if>
<if test="dto.station!= null and dto.station!= ''">AND station = #{dto.station} </if>
<if test="dto.healthLevel!= null and dto.healthLevel!= ''">AND health_level = #{dto.healthLevel} </if>
<if test="dto.equipmentName!= null and dto.equipmentName!= ''">AND equipment_name = #{dto.equipmentName}
</if>
</where>
</select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment