WfUspTsPeriodDataMapper.xml 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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.WfUspTsPeriodDataMapper">
  6. <resultMap type="WfUspTsPeriodData" id="WfUspTsPeriodDataResult">
  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="power" column="power"/>
  14. <result property="modPower" column="mod_power"/>
  15. <result property="dataFlag" column="data_flag"/>
  16. </resultMap>
  17. <sql id="selectWfUspTsPeriodDataVo">
  18. select windplant_no, model_no, time_scale, data_time, wind_speed, mod_coeff, power, mod_power, data_flag from wf_usp_ts_period_data
  19. </sql>
  20. <select id="selectWfUspTsPeriodDataList" parameterType="WfUspTsPeriodData" resultMap="WfUspTsPeriodDataResult">
  21. <include refid="selectWfUspTsPeriodDataVo"/>
  22. <where>
  23. <if test="windplantNo != null ">and windplant_no = #{windplantNo}</if>
  24. <if test="modelNo != null ">and model_no = #{modelNo}</if>
  25. <if test="timeScale != null ">and time_scale = #{timeScale}</if>
  26. <if test="windSpeed != null ">and wind_speed = #{windSpeed}</if>
  27. <if test="modCoeff != null ">and mod_coeff = #{modCoeff}</if>
  28. <if test="power != null ">and power = #{power}</if>
  29. <if test="modPower != null ">and mod_power = #{modPower}</if>
  30. <if test="dataFlag != null ">and data_flag = #{dataFlag}</if>
  31. <if test="params.beginDataTime != null and params.beginDataTime != '' and params.endDataTime != null and params.endDataTime != ''">
  32. and data_time between to_date(#{params.beginDataTime},'yyyy-MM-dd HH24:MI:SS') and
  33. to_date(#{params.endDataTime},'yyyy-MM-dd HH24:MI:SS')
  34. </if>
  35. <if test="dataTime != null ">and data_time = #{dataTime}</if>
  36. </where>
  37. order by data_time asc
  38. </select>
  39. <select id="selectWfUspTsPeriodDataById" parameterType="Long" resultMap="WfUspTsPeriodDataResult">
  40. <include refid="selectWfUspTsPeriodDataVo"/>
  41. where windplant_no = #{windplantNo}
  42. </select>
  43. <select id="selectWfUspTsPeriodData" parameterType="WfUspTsPeriodData" resultMap="WfUspTsPeriodDataResult">
  44. <include refid="selectWfUspTsPeriodDataVo"/>
  45. where windplant_no = #{windplantNo} and model_no = #{modelNo} and time_scale = #{timeScale} and data_time = #{dataTime}
  46. </select>
  47. <select id="selectWfUspTsPeriodData1" parameterType="WfUspTsPeriodData" resultMap="WfUspTsPeriodDataResult">
  48. <include refid="selectWfUspTsPeriodDataVo"/>
  49. where windplant_no = #{windplantNo} and model_no = #{modelNo} and time_scale = #{timeScale} and data_time > #{dataTime}
  50. </select>
  51. </mapper>