Commit 3457cfb9 authored by zhangsen's avatar zhangsen

td相关 - 预警光伏和风电页面开发

parent e12b3f51
...@@ -37,4 +37,8 @@ public class FanHealthIndexDto implements Serializable { ...@@ -37,4 +37,8 @@ public class FanHealthIndexDto implements Serializable {
private Integer current; private Integer current;
private Integer size; private Integer size;
private String orderColumns; private String orderColumns;
private String warningName;
private String warningStatus;
private String disposotionState;
private String subarray;
} }
package com.yeejoin.amos.boot.module.jxiop.biz.tdMapper2; package com.yeejoin.amos.boot.module.jxiop.biz.tdMapper2;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.dto.FanHealthIndexDto;
import com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanHealthIndex; import com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanHealthIndex;
import com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanWarningRecord; import com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanWarningRecord;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -25,4 +26,8 @@ public interface FanWaringRecordMapper extends BaseMapper<FanWarningRecord> { ...@@ -25,4 +26,8 @@ public interface FanWaringRecordMapper extends BaseMapper<FanWarningRecord> {
int saveBatchWarningRecords(@Param("list") List<FanWarningRecord> list); int saveBatchWarningRecords(@Param("list") List<FanWarningRecord> list);
List<FanWarningRecord> getInfoByPage(@Param("dto") FanHealthIndexDto dto);
Integer getInfoByPageTotal(@Param("dto") FanHealthIndexDto dto);
} }
package com.yeejoin.amos.boot.module.jxiop.biz.tdMapper2; package com.yeejoin.amos.boot.module.jxiop.biz.tdMapper2;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.dto.FanHealthIndexDto;
import com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanWarningRecord; import com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanWarningRecord;
import com.yeejoin.amos.boot.module.jxiop.biz.tdengine.PvWarningRecord; import com.yeejoin.amos.boot.module.jxiop.biz.tdengine.PvWarningRecord;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -19,4 +20,9 @@ public interface PvWaringRecordMapper extends BaseMapper<PvWarningRecord> { ...@@ -19,4 +20,9 @@ public interface PvWaringRecordMapper extends BaseMapper<PvWarningRecord> {
List<PvWarningRecord> selectWarningPoint(String STATION, String EQUIPMENTNAME, String SUBARRAY); List<PvWarningRecord> selectWarningPoint(String STATION, String EQUIPMENTNAME, String SUBARRAY);
List<Map<String, Object>> selectEquipWarningTotal(String STATION, String EQUIPMENTNAME, String SUBARRAY); List<Map<String, Object>> selectEquipWarningTotal(String STATION, String EQUIPMENTNAME, String SUBARRAY);
List<PvWarningRecord> getInfoByPage(@Param("dto") FanHealthIndexDto dto);
Integer getInfoByPageTotal(@Param("dto") FanHealthIndexDto dto);
} }
...@@ -177,4 +177,38 @@ ...@@ -177,4 +177,38 @@
`b`.`STATION`, `b`.`STATION`,
`b`.`EQUIPMENT_NAME` `b`.`EQUIPMENT_NAME`
</select> </select>
<select id="getInfoByPage" resultType="com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanWarningRecord">
SELECT * FROM fan_warning_record
<where>
<if test="dto.area!= null and dto.area!= ''"> AND arae = #{dto.area} </if>
<if test="dto.station!= null and dto.station!= ''">AND station = #{dto.station} </if>
<if test="dto.equipmentName!= null and dto.equipmentName!= ''">AND equipment_name = #{dto.equipmentName}</if>
<if test="dto.subSystem!= null and dto.subSystem!= ''">AND sub_system = #{dto.subSystem} </if>
<if test="dto.pointName!= null and dto.pointName!= ''">AND point_name = #{dto.pointName} </if>
<if test="dto.warningName!= null and dto.warningName!= ''">AND warning_name = #{dto.warningName} </if>
<if test="dto.disposotionState!= null and dto.disposotionState!= ''">AND disposotion_state = #{dto.disposotionState} </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>
</where>
<if test="dto.orderColumns != null and dto.orderColumns != ''">
order by ${dto.orderColumns}
</if>
limit #{dto.current}, #{dto.size}
</select>
<select id="getInfoByPageTotal" resultType="java.lang.Integer">
SELECT count(1) FROM fan_warning_record
<where>
<if test="dto.area!= null and dto.area!= ''"> AND arae = #{dto.area} </if>
<if test="dto.station!= null and dto.station!= ''">AND station = #{dto.station} </if>
<if test="dto.equipmentName!= null and dto.equipmentName!= ''">AND equipment_name = #{dto.equipmentName}</if>
<if test="dto.subSystem!= null and dto.subSystem!= ''">AND sub_system = #{dto.subSystem} </if>
<if test="dto.pointName!= null and dto.pointName!= ''">AND point_name = #{dto.pointName} </if>
<if test="dto.warningName!= null and dto.warningName!= ''">AND warning_name = #{dto.warningName} </if>
<if test="dto.disposotionState!= null and dto.disposotionState!= ''">AND disposotion_state = #{dto.disposotionState} </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>
</where>
</select>
</mapper> </mapper>
...@@ -193,4 +193,38 @@ ...@@ -193,4 +193,38 @@
`b`.`STATION`, `b`.`STATION`,
`b`.`EQUIPMENT_NAME` `b`.`EQUIPMENT_NAME`
</select> </select>
<select id="getInfoByPage" resultType="com.yeejoin.amos.boot.module.jxiop.biz.tdengine.PvWarningRecord">
SELECT * FROM fan_warning_record
<where>
<if test="dto.area!= null and dto.area!= ''"> AND arae = #{dto.area} </if>
<if test="dto.station!= null and dto.station!= ''">AND station = #{dto.station} </if>
<if test="dto.equipmentName!= null and dto.equipmentName!= ''">AND equipment_name = #{dto.equipmentName}</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.warningName!= null and dto.warningName!= ''">AND warning_name = #{dto.warningName} </if>
<if test="dto.disposotionState!= null and dto.disposotionState!= ''">AND disposotion_state = #{dto.disposotionState} </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>
</where>
<if test="dto.orderColumns != null and dto.orderColumns != ''">
order by ${dto.orderColumns}
</if>
limit #{dto.current}, #{dto.size}
</select>
<select id="getInfoByPageTotal" resultType="java.lang.Integer">
SELECT count(1) FROM fan_warning_record
<where>
<if test="dto.area!= null and dto.area!= ''"> AND arae = #{dto.area} </if>
<if test="dto.station!= null and dto.station!= ''">AND station = #{dto.station} </if>
<if test="dto.equipmentName!= null and dto.equipmentName!= ''">AND equipment_name = #{dto.equipmentName}</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.warningName!= null and dto.warningName!= ''">AND warning_name = #{dto.warningName} </if>
<if test="dto.disposotionState!= null and dto.disposotionState!= ''">AND disposotion_state = #{dto.disposotionState} </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>
</where>
</select>
</mapper> </mapper>
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