PvUspTsPeriodDataMapper.xml 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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.PvUspTsPeriodDataMapper">
  6. <resultMap type="PvUspTsPeriodData" id="PvUspTsPeriodDataResult">
  7. <result property="pvNo" column="pv_no" />
  8. <result property="modelNo" column="model_no" />
  9. <result property="timeScale" column="time_scale" />
  10. <result property="dataTime" column="data_time" />
  11. <result property="ghi" column="ghi" />
  12. <result property="modCoeff" column="mod_coeff" />
  13. <result property="power" column="power" />
  14. <result property="modPower" column="mod_power" />
  15. <result property="dataFlag" column="data_flag" />
  16. </resultMap>
  17. <sql id="selectPvUspTsPeriodDataVo">
  18. select pv_no, model_no, time_scale, data_time, ghi, mod_coeff, power, mod_power, data_flag from pv_usp_ts_period_data
  19. </sql>
  20. <select id="selectPvUspTsPeriodDataList" parameterType="PvUspTsPeriodData" resultMap="PvUspTsPeriodDataResult">
  21. <include refid="selectPvUspTsPeriodDataVo"/>
  22. <where>
  23. <if test="pvNo != null ">and pv_no = #{pvNo}</if>
  24. <if test="modelNo != null ">and model_no = #{modelNo}</if>
  25. <if test="timeScale != null ">and time_scale = #{timeScale}</if>
  26. <if test="ghi != null "> and ghi = #{ghi}</if>
  27. <if test="modCoeff != null "> and mod_coeff = #{modCoeff}</if>
  28. <if test="power != null "> and power = #{power}</if>
  29. <if test="modPower != null "> and mod_power = #{modPower}</if>
  30. <if test="dataFlag != null "> and data_flag = #{dataFlag}</if>
  31. <if test="params.beginDataTime != null and params.beginDataTime != '' and params.endDataTime != null and params.endDataTime != ''">
  32. and data_time between to_date(#{params.beginDataTime},'yyyy-MM-dd HH24:MI:SS') and
  33. to_date(#{params.endDataTime},'yyyy-MM-dd HH24:MI:SS')
  34. </if>
  35. <if test="dataTime != null ">and data_time = #{dataTime}</if>
  36. </where>
  37. </select>
  38. <select id="selectPvUspTsPeriodDataById" parameterType="Long" resultMap="PvUspTsPeriodDataResult">
  39. <include refid="selectPvUspTsPeriodDataVo"/>
  40. where pv_no = #{pvNo}
  41. </select>
  42. <select id="selectPvUspTsPeriodData" parameterType="PvUspTsPeriodData" resultMap="PvUspTsPeriodDataResult">
  43. <include refid="selectPvUspTsPeriodDataVo"/>
  44. where pv_no = #{pvNo} and model_no = #{modelNo} and time_scale = #{timeScale} and data_time = #{dataTime}
  45. </select>
  46. </mapper>