PrTheorypowerDataMapper.xml 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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.PrTheorypowerDataMapper">
  6. <resultMap type="PrTheorypowerData" id="PrTheorypowerDataResult">
  7. <result property="windplantNo" column="windplant_no" />
  8. <result property="projectNo" column="project_no" />
  9. <result property="dataTime" column="data_time" />
  10. <result property="theorypower" column="theorypower" />
  11. <result property="availablepower" column="availablepower" />
  12. <result property="isLimit" column="is_limit" />
  13. <result property="dataFlag" column="data_flag" />
  14. </resultMap>
  15. <sql id="selectPrTheorypowerDataVo">
  16. select windplant_no, project_no, data_time, theorypower, availablepower, is_limit, data_flag from pr_theorypower_data
  17. </sql>
  18. <select id="selectPrTheorypowerDataList" parameterType="PrTheorypowerData" resultMap="PrTheorypowerDataResult">
  19. <include refid="selectPrTheorypowerDataVo"/>
  20. <where>
  21. <if test="windplantNo != null ">and windplant_no = #{windplantNo}</if>
  22. <if test="projectNo != null ">and project_no = #{projectNo}</if>
  23. <if test="theorypower != null "> and theorypower = #{theorypower}</if>
  24. <if test="availablepower != null "> and availablepower = #{availablepower}</if>
  25. <if test="isLimit != null "> and is_limit = #{isLimit}</if>
  26. <if test="dataFlag != null "> and data_flag = #{dataFlag}</if>
  27. <if test="params.beginDataTime != null and params.beginDataTime != '' and params.endDataTime != null and params.endDataTime != ''">
  28. and data_time between to_date(#{params.beginDataTime},'yyyy-MM-dd HH24:MI:SS') and
  29. to_date(#{params.endDataTime},'yyyy-MM-dd HH24:MI:SS')
  30. </if>
  31. <if test="dataTime != null ">and data_time = #{dataTime}</if>
  32. </where>
  33. </select>
  34. <select id="selectPrTheorypowerDataById" parameterType="Long" resultMap="PrTheorypowerDataResult">
  35. <include refid="selectPrTheorypowerDataVo"/>
  36. where windplant_no = #{windplantNo}
  37. </select>
  38. <select id="selectPrTheorypowerData" parameterType="PrTheorypowerData" resultMap="PrTheorypowerDataResult">
  39. <include refid="selectPrTheorypowerDataVo"/>
  40. where windplant_no = #{windplantNo} and project_no = #{projectNo} and data_time > #{dataTime}
  41. </select>
  42. </mapper>