NoscalePrDaEfPeriodDataMapper.xml 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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.NoscalePrDaEfPeriodDataMapper">
  6. <resultMap type="NoscalePrDaEfPeriodData" id="NoscalePrDaEfPeriodDataResult">
  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="selectNoscalePrDaEfPeriodDataVo">
  14. select wf_pr_no, model_no, data_time, value, data_flag from noscale_pr_da_ef_period_data
  15. </sql>
  16. <select id="selectNoscalePrDaEfPeriodDataList" parameterType="NoscalePrDaEfPeriodData"
  17. resultMap="NoscalePrDaEfPeriodDataResult">
  18. <include refid="selectNoscalePrDaEfPeriodDataVo"/>
  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. <if test="condition != null ">and to_char(data_time,'yyyy-MM-dd HH24:MI:SS') LIKE '%00:00:00%'</if>
  30. </where>
  31. order by data_time asc
  32. </select>
  33. <select id="selectNoscalePrDaEfPeriodDataById" parameterType="Long" resultMap="NoscalePrDaEfPeriodDataResult">
  34. <include refid="selectNoscalePrDaEfPeriodDataVo"/>
  35. where wf_pr_no = #{wfPrNo}
  36. </select>
  37. <select id="selectNoscalePrDaEfPeriodDataByJh" parameterType="NoscalePrDaEfPeriodData"
  38. resultMap="NoscalePrDaEfPeriodDataResult">
  39. <include refid="selectNoscalePrDaEfPeriodDataVo"/>
  40. where wf_pr_no = #{projectNo} and model_no = #{modelNo} and data_time = #{dataTime}
  41. </select>
  42. <select id="selectNoscalePrDaEfPeriodData" parameterType="NoscalePrDaEfPeriodData"
  43. resultMap="NoscalePrDaEfPeriodDataResult">
  44. <include refid="selectNoscalePrDaEfPeriodDataVo"/>
  45. where wf_pr_no = #{projectNo} and model_no = #{modelNo} and data_time > #{dataTime}
  46. </select>
  47. </mapper>