WfPrPfutilizationhoursMapper.xml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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.WfPrPfutilizationhoursMapper">
  6. <resultMap type="WfPrPfutilizationhours" id="WfPrPfutilizationhoursResult">
  7. <result property="windplantNo" column="windplant_no" />
  8. <result property="projectNo" column="project_no" />
  9. <result property="modelNo" column="model_no" />
  10. <result property="dataTime" column="data_time" />
  11. <result property="pfHourCount" column="pf_hour_count" />
  12. <result property="dataFlag" column="data_flag" />
  13. </resultMap>
  14. <sql id="selectWfPrPfutilizationhoursVo">
  15. select windplant_no, project_no, model_no, data_time, pf_hour_count, data_flag from wf_pr_pfutilizationhours
  16. </sql>
  17. <select id="selectWfPrPfutilizationhoursList" parameterType="WfPrPfutilizationhours" resultMap="WfPrPfutilizationhoursResult">
  18. <include refid="selectWfPrPfutilizationhoursVo"/>
  19. <where>
  20. <if test="windplantNo != null ">and windplant_no = #{windplantNo}</if>
  21. <if test="projectNo != null ">and project_no = #{projectNo}</if>
  22. <if test="modelNo != null ">and model_no = #{modelNo}</if>
  23. <if test="pfHourCount != null "> and pf_hour_count = #{pfHourCount}</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. </select>
  32. <select id="selectWfPrPfutilizationhoursById" parameterType="Long" resultMap="WfPrPfutilizationhoursResult">
  33. <include refid="selectWfPrPfutilizationhoursVo"/>
  34. where windplant_no = #{windplantNo}
  35. </select>
  36. <select id="selectWfPrPfutilizationhours" parameterType="WfPrPfutilizationhours" resultMap="WfPrPfutilizationhoursResult">
  37. <include refid="selectWfPrPfutilizationhoursVo"/>
  38. <where>
  39. <if test="windplantNo != null ">and windplant_no = #{windplantNo}</if>
  40. <if test="projectNo != null ">and project_no = #{projectNo}</if>
  41. <if test="modelNo != null ">and model_no = #{modelNo}</if>
  42. <if test="dataTime != null ">and data_time > #{dataTime}</if>
  43. </where>
  44. </select>
  45. </mapper>