LpProjectMonthDataMapper.xml 4.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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.LpProjectMonthDataMapper">
  6. <resultMap type="LpProjectMonthData" id="LpProjectMonthDataResult">
  7. <result property="wfPrNo" column="wf_pr_no"/>
  8. <result property="modelNo" column="model_no"/>
  9. <result property="dataTime" column="data_time"/>
  10. <result property="k" column="k"/>
  11. <result property="c" column="c"/>
  12. <result property="pfK" column="pf_k"/>
  13. <result property="kRelativeerror" column="k_relativeerror"/>
  14. <result property="pfC" column="pf_c"/>
  15. <result property="cRelativeerror" column="c_relativeerror"/>
  16. <result property="speed" column="speed"/>
  17. <result property="hourCount" column="hour_count"/>
  18. <result property="factors" column="factors"/>
  19. <result property="windEnergy" column="wind_energy"/>
  20. <result property="generatingCapacity" column="generating_capacity"/>
  21. <result property="pfGeneratingCapacity" column="pf_generating_capacity"/>
  22. <result property="pfHourCount" column="pf_hour_count"/>
  23. <result property="maxProbabilityDensity" column="max_probability_density"/>
  24. <result property="energyRelativeerror" column="energy_relativeerror"/>
  25. <result property="dataFlag" column="data_flag"/>
  26. </resultMap>
  27. <sql id="selectLpProjectMonthDataVo">
  28. select wf_pr_no, model_no, data_time, k, c, pf_k, k_relativeerror, pf_c, c_relativeerror, speed, hour_count, factors, wind_energy, generating_capacity, pf_generating_capacity, pf_hour_count, max_probability_density, energy_relativeerror, data_flag from lp_project_month_data
  29. </sql>
  30. <select id="selectLpProjectMonthDataList" parameterType="LpProjectMonthData" resultMap="LpProjectMonthDataResult">
  31. <include refid="selectLpProjectMonthDataVo"/>
  32. <where>
  33. <if test="wfPrNo != null ">and wf_pr_no = #{wfPrNo}</if>
  34. <if test="modelNo != null ">and model_no = #{modelNo}</if>
  35. <if test="k != null ">and k = #{k}</if>
  36. <if test="c != null ">and c = #{c}</if>
  37. <if test="pfK != null ">and pf_k = #{pfK}</if>
  38. <if test="kRelativeerror != null ">and k_relativeerror = #{kRelativeerror}</if>
  39. <if test="pfC != null ">and pf_c = #{pfC}</if>
  40. <if test="cRelativeerror != null ">and c_relativeerror = #{cRelativeerror}</if>
  41. <if test="speed != null ">and speed = #{speed}</if>
  42. <if test="hourCount != null ">and hour_count = #{hourCount}</if>
  43. <if test="factors != null ">and factors = #{factors}</if>
  44. <if test="windEnergy != null ">and wind_energy = #{windEnergy}</if>
  45. <if test="generatingCapacity != null ">and generating_capacity = #{generatingCapacity}</if>
  46. <if test="pfGeneratingCapacity != null ">and pf_generating_capacity = #{pfGeneratingCapacity}</if>
  47. <if test="pfHourCount != null ">and pf_hour_count = #{pfHourCount}</if>
  48. <if test="maxProbabilityDensity != null ">and max_probability_density = #{maxProbabilityDensity}</if>
  49. <if test="energyRelativeerror != null ">and energy_relativeerror = #{energyRelativeerror}</if>
  50. <if test="dataFlag != null ">and data_flag = #{dataFlag}</if>
  51. <if test="params.beginDataTime != null and params.beginDataTime != '' and params.endDataTime != null and params.endDataTime != ''">
  52. and data_time between to_date(#{params.beginDataTime},'yyyy-MM-dd HH24:MI:SS') and
  53. to_date(#{params.endDataTime},'yyyy-MM-dd HH24:MI:SS')
  54. </if>
  55. <if test="dataTime != null ">and data_time = #{dataTime}</if>
  56. </where>
  57. order by data_time asc
  58. </select>
  59. <select id="selectLpProjectMonthDataById" parameterType="Long" resultMap="LpProjectMonthDataResult">
  60. <include refid="selectLpProjectMonthDataVo"/>
  61. where wf_pr_no = #{wfPrNo}
  62. </select>
  63. <select id="selectLpProjectMonthData" parameterType="LpProjectMonthData" resultMap="LpProjectMonthDataResult">
  64. <include refid="selectLpProjectMonthDataVo"/>
  65. where wf_pr_no = #{wfPrNo} and data_time > #{dataTime}
  66. </select>
  67. </mapper>