NoscaleWfDaEfPeriodDataMapper.xml 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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.NoscaleWfDaEfPeriodDataMapper">
  6. <resultMap type="NoscaleWfDaEfPeriodData" id="NoscaleWfDaEfPeriodDataResult">
  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. </resultMap>
  13. <sql id="selectNoscaleWfDaEfPeriodDataVo">
  14. select windplant_no, model_no, data_time, value, data_flag from noscale_wf_da_ef_period_data
  15. </sql>
  16. <select id="selectNoscaleWfDaEfPeriodDataList" parameterType="NoscaleWfDaEfPeriodData"
  17. resultMap="NoscaleWfDaEfPeriodDataResult">
  18. <include refid="selectNoscaleWfDaEfPeriodDataVo"/>
  19. <where>
  20. <if test="windplantNo != null ">and windplant_no = #{windplantNo}</if>
  21. <if test="modelNo != null ">and model_no = #{modelNo}</if>
  22. <if test="value != null ">and value = #{value}</if>
  23. <if test="dataFlag != null ">and data_flag = #{dataFlag}</if>
  24. <if test="params.beginDataTime != null and params.beginDataTime != '' and params.endDataTime != null and params.endDataTime != ''">
  25. and data_time between to_date(#{params.beginDataTime},'yyyy-MM-dd HH24:MI:SS') and
  26. to_date(#{params.endDataTime},'yyyy-MM-dd HH24:MI:SS')
  27. </if>
  28. <if test="dataTime != null ">and data_time = #{dataTime}</if>
  29. </where>
  30. order by data_time asc
  31. </select>
  32. <select id="selectNoscaleWfDaEfPeriodDataById" parameterType="Long" resultMap="NoscaleWfDaEfPeriodDataResult">
  33. <include refid="selectNoscaleWfDaEfPeriodDataVo"/>
  34. where windplant_no = #{windplantNo}
  35. </select>
  36. <select id="selectNoscaleWfDaEfPeriodData" parameterType="NoscaleWfDaEfPeriodData"
  37. resultMap="NoscaleWfDaEfPeriodDataResult">
  38. <include refid="selectNoscaleWfDaEfPeriodDataVo"/>
  39. where windplant_no = #{windplantNo} and model_no = #{modelNo} and data_time > #{dataTime}
  40. </select>
  41. </mapper>