NoscalePrDaPfPeriodDataMapper.xml 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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.NoscalePrDaPfPeriodDataMapper">
  6. <resultMap type="NoscalePrDaPfPeriodData" id="NoscalePrDaPfPeriodDataResult">
  7. <result property="wfPrNo" column="wf_pr_no"/>
  8. <result property="modelNo" column="model_no"/>
  9. <result property="dataTime" column="data_time"/>
  10. <result property="value" column="value"/>
  11. <result property="dataFlag" column="data_flag"/>
  12. </resultMap>
  13. <sql id="selectNoscalePrDaPfPeriodDataVo">
  14. select wf_pr_no, model_no, data_time, value, data_flag from noscale_pr_da_pf_period_data
  15. </sql>
  16. <select id="selectNoscalePrDaPfPeriodDataList" parameterType="NoscalePrDaPfPeriodData"
  17. resultMap="NoscalePrDaPfPeriodDataResult">
  18. <include refid="selectNoscalePrDaPfPeriodDataVo"/>
  19. <where>
  20. <if test="wfPrNo != null ">and wf_pr_no = #{wfPrNo}</if>
  21. <if test="modelNo != null ">and model_no = #{modelNo}</if>
  22. <if test="value != null ">and value = #{value}</if>
  23. <if test="dataFlag != null ">and data_flag = #{dataFlag}</if>
  24. <if test="params.beginDataTime != null and params.beginDataTime != '' and params.endDataTime != null and params.endDataTime != ''">
  25. and data_time between to_date(#{params.beginDataTime},'yyyy-MM-dd HH24:MI:SS') and
  26. to_date(#{params.endDataTime},'yyyy-MM-dd HH24:MI:SS')
  27. </if>
  28. <if test="dataTime != null ">and data_time = #{dataTime}</if>
  29. </where>
  30. order by data_time asc
  31. </select>
  32. <select id="selectNoscalePrDaPfPeriodDataById" parameterType="Long" resultMap="NoscalePrDaPfPeriodDataResult">
  33. <include refid="selectNoscalePrDaPfPeriodDataVo"/>
  34. where wf_pr_no = #{wfPrNo}
  35. </select>
  36. <select id="selectNoscalePrDaPfPeriodData" parameterType="NoscalePrDaPfPeriodData" resultMap="NoscalePrDaPfPeriodDataResult">
  37. <include refid="selectNoscalePrDaPfPeriodDataVo"/>
  38. where wf_pr_no = #{wfPrNo} and model_no = #{modelNo} and data_time > #{dataTime}
  39. </select>
  40. </mapper>