WfPrUtilizationhoursMapper.xml 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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.WfPrUtilizationhoursMapper">
  6. <resultMap type="WfPrUtilizationhours" id="WfPrUtilizationhoursResult">
  7. <result property="windplantNo" column="windplant_no" />
  8. <result property="projectNo" column="project_no" />
  9. <result property="dataTime" column="data_time" />
  10. <result property="hourCount" column="hour_count" />
  11. <result property="dataFlag" column="data_flag" />
  12. </resultMap>
  13. <sql id="selectWfPrUtilizationhoursVo">
  14. select windplant_no, project_no, data_time, hour_count, data_flag from wf_pr_utilizationhours
  15. </sql>
  16. <select id="selectWfPrUtilizationhoursList" parameterType="WfPrUtilizationhours" resultMap="WfPrUtilizationhoursResult">
  17. <include refid="selectWfPrUtilizationhoursVo"/>
  18. <where>
  19. <if test="windplantNo != null ">and windplant_no = #{windplantNo}</if>
  20. <if test="projectNo != null ">and project_no = #{projectNo}</if>
  21. <if test="hourCount != null "> and hour_count = #{hourCount}</if>
  22. <if test="dataFlag != null "> and data_flag = #{dataFlag}</if>
  23. <if test="params.beginDataTime != null and params.beginDataTime != '' and params.endDataTime != null and params.endDataTime != ''">
  24. and data_time between to_date(#{params.beginDataTime},'yyyy-MM-dd HH24:MI:SS') and
  25. to_date(#{params.endDataTime},'yyyy-MM-dd HH24:MI:SS')
  26. </if>
  27. <if test="dataTime != null ">and data_time = #{dataTime}</if>
  28. </where>
  29. </select>
  30. <select id="selectWfPrUtilizationhoursById" parameterType="Long" resultMap="WfPrUtilizationhoursResult">
  31. <include refid="selectWfPrUtilizationhoursVo"/>
  32. where windplant_no = #{windplantNo}
  33. </select>
  34. <select id="selectWfPrUtilizationhours" parameterType="WfPrUtilizationhours" resultMap="WfPrUtilizationhoursResult">
  35. <include refid="selectWfPrUtilizationhoursVo"/>
  36. where windplant_no = #{windplantNo} and project_no = #{projectNo} and data_time > #{dataTime}
  37. </select>
  38. </mapper>