WfUspTsEfPeriodDataMapper.xml 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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.WfUspTsEfPeriodDataMapper">
  6. <resultMap type="WfUspTsEfPeriodData" id="WfUspTsEfPeriodDataResult">
  7. <result property="windplantNo" column="windplant_no"/>
  8. <result property="modelNo" column="model_no"/>
  9. <result property="timeScale" column="time_scale"/>
  10. <result property="dataTime" column="data_time"/>
  11. <result property="windSpeed" column="wind_speed"/>
  12. <result property="modCoeff" column="mod_coeff"/>
  13. <result property="energy" column="energy"/>
  14. <result property="modEnergy" column="mod_energy"/>
  15. <result property="dataFlag" column="data_flag"/>
  16. </resultMap>
  17. <sql id="selectWfUspTsEfPeriodDataVo">
  18. select windplant_no, model_no, time_scale, data_time, wind_speed, mod_coeff, energy, mod_energy, data_flag from wf_usp_ts_ef_period_data
  19. </sql>
  20. <select id="selectWfUspTsEfPeriodDataList" parameterType="WfUspTsEfPeriodData"
  21. resultMap="WfUspTsEfPeriodDataResult">
  22. <include refid="selectWfUspTsEfPeriodDataVo"/>
  23. <where>
  24. <if test="windplantNo != null ">and windplant_no = #{windplantNo}</if>
  25. <if test="modelNo != null ">and model_no = #{modelNo}</if>
  26. <if test="timeScale != null ">and time_scale = #{timeScale}</if>
  27. <if test="windSpeed != null ">and wind_speed = #{windSpeed}</if>
  28. <if test="modCoeff != null ">and mod_coeff = #{modCoeff}</if>
  29. <if test="energy != null ">and energy = #{energy}</if>
  30. <if test="modEnergy != null ">and mod_energy = #{modEnergy}</if>
  31. <if test="dataFlag != null ">and data_flag = #{dataFlag}</if>
  32. <if test="params.beginDataTime != null and params.beginDataTime != '' and params.endDataTime != null and params.endDataTime != ''">
  33. and data_time between to_date(#{params.beginDataTime},'yyyy-MM-dd HH24:MI:SS') and
  34. to_date(#{params.endDataTime},'yyyy-MM-dd HH24:MI:SS')
  35. </if>
  36. <if test="dataTime != null ">and data_time = #{dataTime}</if>
  37. </where>
  38. order by data_time asc
  39. </select>
  40. <select id="selectWfUspTsEfPeriodDataById" parameterType="Long" resultMap="WfUspTsEfPeriodDataResult">
  41. <include refid="selectWfUspTsEfPeriodDataVo"/>
  42. where windplant_no = #{windplantNo}
  43. </select>
  44. <select id="selectWfUspTsEfPeriodData" parameterType="WfUspTsEfPeriodData"
  45. resultMap="WfUspTsEfPeriodDataResult">
  46. <include refid="selectWfUspTsEfPeriodDataVo"/>
  47. where windplant_no = #{windplantNo} and model_no = #{modelNo} and time_scale = #{timeScale} and data_time > #{dataTime}
  48. </select>
  49. </mapper>