LpWfMonthDataMapper.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.LpWfMonthDataMapper">
  6. <resultMap type="LpWfMonthData" id="LpWfMonthDataResult">
  7. <result property="wfNo" column="wf_no"/>
  8. <result property="modelNo" column="model_no"/>
  9. <result property="dataTime" column="data_time"/>
  10. <result property="generatingCapacity" column="generating_capacity"/>
  11. <result property="pfGeneratingCapacity" column="pf_generating_capacity"/>
  12. <result property="dataFlag" column="data_flag"/>
  13. </resultMap>
  14. <sql id="selectLpWfMonthDataVo">
  15. select wf_no, model_no, data_time, generating_capacity, pf_generating_capacity, data_flag from lp_wf_month_data
  16. </sql>
  17. <select id="selectLpWfMonthDataList" parameterType="LpWfMonthData" resultMap="LpWfMonthDataResult">
  18. <include refid="selectLpWfMonthDataVo"/>
  19. <where>
  20. <if test="wfNo != null ">and wf_no = #{wfNo}</if>
  21. <if test="modelNo != null ">and model_no = #{modelNo}</if>
  22. <if test="generatingCapacity != null ">and generating_capacity = #{generatingCapacity}</if>
  23. <if test="pfGeneratingCapacity != null ">and pf_generating_capacity = #{pfGeneratingCapacity}</if>
  24. <if test="dataFlag != null ">and data_flag = #{dataFlag}</if>
  25. <if test="params.beginDataTime != null and params.beginDataTime != '' and params.endDataTime != null and params.endDataTime != ''">
  26. and data_time between to_date(#{params.beginDataTime},'yyyy-MM-dd HH24:MI:SS') and
  27. to_date(#{params.endDataTime},'yyyy-MM-dd HH24:MI:SS')
  28. </if>
  29. <if test="dataTime != null ">and data_time = #{dataTime}</if>
  30. </where>
  31. order by data_time asc
  32. </select>
  33. <select id="selectLpWfMonthDataById" parameterType="Long" resultMap="LpWfMonthDataResult">
  34. <include refid="selectLpWfMonthDataVo"/>
  35. where wf_no = #{wfNo}
  36. </select>
  37. <select id="selectLpWfMonthData" parameterType="LpWfMonthData" resultMap="LpWfMonthDataResult">
  38. <include refid="selectLpWfMonthDataVo"/>
  39. where wf_no = #{wfNo} and data_time > #{dataTime}
  40. </select>
  41. </mapper>