NoscaleWfDaPfPeriodDataMapper.xml 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.ruoyi.predict.mapper.NoscaleWfDaPfPeriodDataMapper">
  6. <resultMap type="NoscaleWfDaPfPeriodData" id="NoscaleWfDaPfPeriodDataResult">
  7. <result property="windplantNo" column="windplant_no"/>
  8. <result property="modelNo" column="model_no"/>
  9. <result property="dataTime" column="data_time"/>
  10. <result property="value" column="value"/>
  11. <result property="dataFlag" column="data_flag"/>
  12. <result property="modspeed" column="modspeed"/>
  13. </resultMap>
  14. <sql id="selectNoscaleWfDaPfPeriodDataVo">
  15. select windplant_no, model_no, data_time, value, data_flag, modspeed from noscale_wf_da_pf_period_data
  16. </sql>
  17. <select id="selectNoscaleWfDaPfPeriodDataList" parameterType="NoscaleWfDaPfPeriodData"
  18. resultMap="NoscaleWfDaPfPeriodDataResult">
  19. <include refid="selectNoscaleWfDaPfPeriodDataVo"/>
  20. <where>
  21. <if test="windplantNo != null ">and windplant_no = #{windplantNo}</if>
  22. <if test="modelNo != null ">and model_no = #{modelNo}</if>
  23. <if test="value != null ">and value = #{value}</if>
  24. <if test="dataFlag != null ">and data_flag = #{dataFlag}</if>
  25. <if test="modspeed != null ">and modspeed = #{modspeed}</if>
  26. <if test="params.beginDataTime != null and params.beginDataTime != '' and params.endDataTime != null and params.endDataTime != ''">
  27. and data_time between to_date(#{params.beginDataTime},'yyyy-MM-dd HH24:MI:SS') and
  28. to_date(#{params.endDataTime},'yyyy-MM-dd HH24:MI:SS')
  29. </if>
  30. <!--<if test="params.beginDataTime != null and params.beginDataTime != ''">
  31. and data_time >= to_date(#{params.beginDataTime},'yyyy-MM-dd HH24:MI:SS')
  32. </if>-->
  33. <if test="dataTime != null ">and data_time = #{dataTime}</if>
  34. <if test="condition != null ">and to_char(data_time,'yyyy-MM-dd HH24:MI:SS') LIKE '%00:00:00%'</if>
  35. </where>
  36. order by data_time asc
  37. </select>
  38. <select id="selectNoscaleWfDaPfPeriodDataById" parameterType="Long" resultMap="NoscaleWfDaPfPeriodDataResult">
  39. <include refid="selectNoscaleWfDaPfPeriodDataVo"/>
  40. where windplant_no = #{windplantNo}
  41. </select>
  42. <select id="selectNoscaleWfDaPfPeriodDataByJh" parameterType="NoscaleWfDaPfPeriodData" resultMap="NoscaleWfDaPfPeriodDataResult">
  43. <include refid="selectNoscaleWfDaPfPeriodDataVo"/>
  44. where windplant_no = #{windplantNo} and model_no = #{modelNo} and data_time = #{dataTime}
  45. </select>
  46. <select id="selectNoscaleWfDaPfPeriodData" parameterType="NoscaleWfDaPfPeriodData" resultMap="NoscaleWfDaPfPeriodDataResult">
  47. <include refid="selectNoscaleWfDaPfPeriodDataVo"/>
  48. where windplant_no = #{windplantNo} and model_no = #{modelNo} and data_time > #{dataTime}
  49. </select>
  50. </mapper>