冀北电网一张图,变电站、终端和监测点信息接口编写

This commit is contained in:
wr
2024-04-23 18:16:12 +08:00
parent 9492365d0d
commit 02e1b8d42a
37 changed files with 1412 additions and 26 deletions

View File

@@ -0,0 +1,16 @@
package com.njcn.harmonic.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.njcn.harmonic.pojo.po.RMpTargetWarnDPO;
/**
* <p>
* Mapper 接口
* </p>
*
* @author wr
* @since 2024-04-19
*/
public interface RMpTargetWarnDMapper extends BaseMapper<RMpTargetWarnDPO> {
}

View File

@@ -1,10 +1,13 @@
package com.njcn.harmonic.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.njcn.device.pq.pojo.dto.PollutionGridDiagramDTO;
import com.njcn.harmonic.pojo.po.RStatPollutionSubstationM;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
* Description:
@@ -22,4 +25,11 @@ public interface RStatPollutionSubstationMMapper extends BaseMapper<RStatPolluti
int insertOrUpdate(RStatPollutionSubstationM record);
int insertOrUpdateSelective(RStatPollutionSubstationM record);
Page<PollutionGridDiagramDTO> selectBySubstationPage(Page page,
@Param("ids") List<String> ids,
@Param("typeMapId") Map<String,String> typeMapId,
@Param("startTime") String startTime,
@Param("endTime") String endTime
);
}

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.njcn.harmonic.mapper.RMpTargetWarnDMapper">
</mapper>

View File

@@ -104,4 +104,31 @@
</if>
</trim>
</insert>
<select id="selectBySubstationPage" resultType="com.njcn.device.pq.pojo.dto.PollutionGridDiagramDTO">
SELECT
substation_id as id,
IF(`pollution_type`=#{typeMapId.I,javaType=string},value,3.14159) as `data`,
IF(`pollution_type`=#{typeMapId.V,javaType=string},value,3.14159) as `dataV`
FROM
r_stat_pollution_substation_m
<where>
<if test="ids != null and ids.size > 0">
AND substation_id IN
<foreach collection='ids' item='item' index="index" open='(' separator=',' close=')'>
#{item}
</foreach>
</if>
<if test="startTime != null and startTime !=''">
AND data_date >= #{startTime}
</if>
<if test="endTime != null and endTime != ''">
AND data_date &lt;= #{endTime}
</if>
</where>
GROUP BY
substation_id
ORDER BY `data` DESC,dataV DESC
</select>
</mapper>