12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- <?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.WfYcHistoryData2Mapper">
- <resultMap type="WfYcHistoryData2" id="WfYcHistoryData2Result">
- <result property="analogNo" column="analog_no"/>
- <result property="dataTime" column="data_time"/>
- <result property="ycRawVal" column="yc_raw_val"/>
- <result property="ycVal" column="yc_val"/>
- <result property="dataFlag" column="data_flag"/>
- </resultMap>
- <sql id="selectWfYcHistoryData2Vo">
- select analog_no, data_time, yc_raw_val, yc_val, data_flag from wf_yc_history_data2
- </sql>
- <select id="selectWfYcHistoryData2List" parameterType="WfYcHistoryData2" resultMap="WfYcHistoryData2Result">
- <include refid="selectWfYcHistoryData2Vo"/>
- <where>
- <if test="analogNo != null ">and analog_no = #{analogNo}</if>
- <if test="ycRawVal != null ">and yc_raw_val = #{ycRawVal}</if>
- <if test="ycVal != null ">and yc_val = #{ycVal}</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>
- <if test="condition != null ">and to_char(data_time,'yyyy-MM-dd HH24:MI:SS') LIKE '%00:00:00%'</if>
- </where>
- order by data_time asc
- </select>
- <select id="selectWfYcHistoryData2ById" parameterType="Long" resultMap="WfYcHistoryData2Result">
- <include refid="selectWfYcHistoryData2Vo"/>
- where analog_no = #{analogNo}
- </select>
- <select id="selectWfYcHistoryData2" parameterType="WfYcHistoryData2" resultMap="WfYcHistoryData2Result">
- <include refid="selectWfYcHistoryData2Vo"/>
- where analog_no = #{avgApYcNo} and data_time = #{dateTime}
- </select>
- </mapper>
|