123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <?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.ruoyi.predict.mapper.ProjectUspTsPeriodDataMapper">
- <resultMap type="ProjectUspTsPeriodData" id="ProjectUspTsPeriodDataResult">
- <result property="projectNo" column="project_no"/>
- <result property="modelNo" column="model_no"/>
- <result property="timeScale" column="time_scale"/>
- <result property="dataTime" column="data_time"/>
- <result property="windSpeed" column="wind_speed"/>
- <result property="modCoeff" column="mod_coeff"/>
- <result property="power" column="power"/>
- <result property="modPower" column="mod_power"/>
- <result property="dataFlag" column="data_flag"/>
- </resultMap>
- <sql id="selectProjectUspTsPeriodDataVo">
- select project_no, model_no, time_scale, data_time, wind_speed, mod_coeff, power, mod_power, data_flag from project_usp_ts_period_data
- </sql>
- <select id="selectProjectUspTsPeriodDataList" parameterType="ProjectUspTsPeriodData"
- resultMap="ProjectUspTsPeriodDataResult">
- <include refid="selectProjectUspTsPeriodDataVo"/>
- <where>
- <if test="projectNo != null ">and project_no = #{projectNo}</if>
- <if test="modelNo != null ">and model_no = #{modelNo}</if>
- <if test="timeScale != null ">and time_scale = #{timeScale}</if>
- <if test="windSpeed != null ">and wind_speed = #{windSpeed}</if>
- <if test="modCoeff != null ">and mod_coeff = #{modCoeff}</if>
- <if test="power != null ">and power = #{power}</if>
- <if test="modPower != null ">and mod_power = #{modPower}</if>
- <if test="dataFlag != null ">and data_flag = #{dataFlag}</if>
- <if test="params.beginDataTime != null and params.beginDataTime != '' and params.endDataTime != null and params.endDataTime != ''">
- and data_time between to_date(#{params.beginDataTime},'yyyy-MM-dd HH24:MI:SS') and
- to_date(#{params.endDataTime},'yyyy-MM-dd HH24:MI:SS')
- </if>
- <if test="dataTime != null ">and data_time = #{dataTime}</if>
- </where>
- order by data_time asc
- </select>
- <select id="selectProjectUspTsPeriodDataById" parameterType="Long" resultMap="ProjectUspTsPeriodDataResult">
- <include refid="selectProjectUspTsPeriodDataVo"/>
- where project_no = #{projectNo}
- </select>
- <select id="selectProjectUspTsPeriodData" parameterType="ProjectUspTsPeriodData" resultMap="ProjectUspTsPeriodDataResult">
- <include refid="selectProjectUspTsPeriodDataVo"/>
- where project_no = #{projectNo} and model_no = #{modelNo} and time_scale = #{timeScale} and data_time > #{dataTime}
- </select>
- </mapper>
|