WfDaPfErrIntervalMapper.xml 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  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.WfDaPfErrIntervalMapper">
  6. <resultMap type="WfDaPfErrInterval" id="WfDaPfErrIntervalResult">
  7. <result property="windplantNo" column="windplant_no"/>
  8. <result property="modelNo" column="model_no"/>
  9. <result property="dataTime" column="data_time"/>
  10. <result property="maxInterval95" column="max_interval95"/>
  11. <result property="maxInterval90" column="max_interval90"/>
  12. <result property="maxInterval85" column="max_interval85"/>
  13. <result property="maxInterval80" column="max_interval80"/>
  14. <result property="maxInterval75" column="max_interval75"/>
  15. <result property="maxInterval70" column="max_interval70"/>
  16. <result property="maxInterval65" column="max_interval65"/>
  17. <result property="maxInterval60" column="max_interval60"/>
  18. <result property="maxInterval55" column="max_interval55"/>
  19. <result property="maxInterval50" column="max_interval50"/>
  20. <result property="minInterval95" column="min_interval95"/>
  21. <result property="minInterval90" column="min_interval90"/>
  22. <result property="minInterval85" column="min_interval85"/>
  23. <result property="minInterval80" column="min_interval80"/>
  24. <result property="minInterval75" column="min_interval75"/>
  25. <result property="minInterval70" column="min_interval70"/>
  26. <result property="minInterval65" column="min_interval65"/>
  27. <result property="minInterval60" column="min_interval60"/>
  28. <result property="minInterval55" column="min_interval55"/>
  29. <result property="minInterval50" column="min_interval50"/>
  30. <result property="maxValue" column="max_value"/>
  31. <result property="minValue" column="min_value"/>
  32. <result property="avgValue" column="avg_value"/>
  33. <result property="mlValue" column="ml_value"/>
  34. <result property="dataFlag" column="data_flag"/>
  35. </resultMap>
  36. <sql id="selectWfDaPfErrIntervalVo">
  37. select windplant_no, model_no, data_time, max_interval95, max_interval90, max_interval85, max_interval80, max_interval75, max_interval70, max_interval65, max_interval60, max_interval55, max_interval50, min_interval95, min_interval90, min_interval85, min_interval80, min_interval75, min_interval70, min_interval65, min_interval60, min_interval55, min_interval50, max_value, min_value, avg_value, ml_value, data_flag from wf_da_pf_err_interval
  38. </sql>
  39. <select id="selectWfDaPfErrIntervalList" parameterType="WfDaPfErrInterval" resultMap="WfDaPfErrIntervalResult">
  40. select
  41. wdpei.windplant_no,
  42. wdpei.model_no,
  43. wdpei.data_time,
  44. wdpei.max_interval95,
  45. wdpei.max_interval90,
  46. wdpei.max_interval85,
  47. wdpei.max_interval80,
  48. wdpei.max_interval75,
  49. wdpei.max_interval70,
  50. wdpei.max_interval65,
  51. wdpei.max_interval60,
  52. wdpei.max_interval55,
  53. wdpei.max_interval50,
  54. wdpei.min_interval95,
  55. wdpei.min_interval90,
  56. wdpei.min_interval85,
  57. wdpei.min_interval80,
  58. wdpei.min_interval75,
  59. wdpei.min_interval70,
  60. wdpei.min_interval65,
  61. wdpei.min_interval60,
  62. wdpei.min_interval55,
  63. wdpei.min_interval50,
  64. wdpei.max_value,
  65. wdpei.min_value,
  66. wdpei.avg_value,
  67. wdpei.ml_value,
  68. wdpei.data_flag,
  69. wspd.p0,
  70. nwdppd.value
  71. from
  72. wf_da_pf_err_interval wdpei
  73. LEFT JOIN WF_STAT_PERIOD_DATA wspd ON wspd.windplant_no = wdpei.windplant_no and wspd.data_time =
  74. wdpei.data_time
  75. LEFT JOIN NOSCALE_WF_DA_PF_PERIOD_DATA nwdppd ON nwdppd.windplant_no = wdpei.windplant_no and nwdppd.model_no =
  76. wdpei.model_no and nwdppd.data_time = wdpei.data_time
  77. <where>
  78. <if test="windplantNo != null ">and wdpei.windplant_no = #{windplantNo}</if>
  79. <if test="modelNo != null ">and wdpei.model_no = #{modelNo}</if>
  80. <if test="maxInterval95 != null ">and wdpei.max_interval95 = #{maxInterval95}</if>
  81. <if test="maxInterval90 != null ">and wdpei.max_interval90 = #{maxInterval90}</if>
  82. <if test="maxInterval85 != null ">and wdpei.max_interval85 = #{maxInterval85}</if>
  83. <if test="maxInterval80 != null ">and wdpei.max_interval80 = #{maxInterval80}</if>
  84. <if test="maxInterval75 != null ">and wdpei.max_interval75 = #{maxInterval75}</if>
  85. <if test="maxInterval70 != null ">and wdpei.max_interval70 = #{maxInterval70}</if>
  86. <if test="maxInterval65 != null ">and wdpei.max_interval65 = #{maxInterval65}</if>
  87. <if test="maxInterval60 != null ">and wdpei.max_interval60 = #{maxInterval60}</if>
  88. <if test="maxInterval55 != null ">and wdpei.max_interval55 = #{maxInterval55}</if>
  89. <if test="maxInterval50 != null ">and wdpei.max_interval50 = #{maxInterval50}</if>
  90. <if test="minInterval95 != null ">and wdpei.min_interval95 = #{minInterval95}</if>
  91. <if test="minInterval90 != null ">and wdpei.min_interval90 = #{minInterval90}</if>
  92. <if test="minInterval85 != null ">and wdpei.min_interval85 = #{minInterval85}</if>
  93. <if test="minInterval80 != null ">and wdpei.min_interval80 = #{minInterval80}</if>
  94. <if test="minInterval75 != null ">and wdpei.min_interval75 = #{minInterval75}</if>
  95. <if test="minInterval70 != null ">and wdpei.min_interval70 = #{minInterval70}</if>
  96. <if test="minInterval65 != null ">and wdpei.min_interval65 = #{minInterval65}</if>
  97. <if test="minInterval60 != null ">and wdpei.min_interval60 = #{minInterval60}</if>
  98. <if test="minInterval55 != null ">and wdpei.min_interval55 = #{minInterval55}</if>
  99. <if test="minInterval50 != null ">and wdpei.min_interval50 = #{minInterval50}</if>
  100. <if test="maxValue != null ">and wdpei.max_value = #{maxValue}</if>
  101. <if test="minValue != null ">and wdpei.min_value = #{minValue}</if>
  102. <if test="avgValue != null ">and wdpei.avg_value = #{avgValue}</if>
  103. <if test="mlValue != null ">and wdpei.ml_value = #{mlValue}</if>
  104. <if test="dataFlag != null ">and wdpei.data_flag = #{dataFlag}</if>
  105. <if test="params.beginDataTime != null and params.beginDataTime != '' and params.endDataTime != null and params.endDataTime != ''">
  106. and wdpei.data_time between to_date(#{params.beginDataTime},'yyyy-MM-dd HH24:MI:SS') and
  107. to_date(#{params.endDataTime},'yyyy-MM-dd HH24:MI:SS')
  108. </if>
  109. </where>
  110. order by wdpei.data_time asc
  111. </select>
  112. <select id="selectWfDaPfErrIntervalById" parameterType="Long" resultMap="WfDaPfErrIntervalResult">
  113. <include refid="selectWfDaPfErrIntervalVo"/>
  114. where windplant_no = #{windplantNo}
  115. </select>
  116. <select id="selectWfDaPfErrInterval" parameterType="WfDaPfErrInterval" resultMap="WfDaPfErrIntervalResult">
  117. select
  118. wdpei.windplant_no,
  119. wdpei.model_no,
  120. wdpei.data_time,
  121. wdpei.max_interval95,
  122. wdpei.max_interval90,
  123. wdpei.max_interval85,
  124. wdpei.max_interval80,
  125. wdpei.max_interval75,
  126. wdpei.max_interval70,
  127. wdpei.max_interval65,
  128. wdpei.max_interval60,
  129. wdpei.max_interval55,
  130. wdpei.max_interval50,
  131. wdpei.min_interval95,
  132. wdpei.min_interval90,
  133. wdpei.min_interval85,
  134. wdpei.min_interval80,
  135. wdpei.min_interval75,
  136. wdpei.min_interval70,
  137. wdpei.min_interval65,
  138. wdpei.min_interval60,
  139. wdpei.min_interval55,
  140. wdpei.min_interval50,
  141. wdpei.max_value,
  142. wdpei.min_value,
  143. wdpei.avg_value,
  144. wdpei.ml_value,
  145. wdpei.data_flag,
  146. wspd.p0,
  147. nwdppd.value
  148. from
  149. wf_da_pf_err_interval wdpei
  150. LEFT JOIN WF_STAT_PERIOD_DATA wspd ON wspd.windplant_no = wdpei.windplant_no and wspd.data_time = wdpei.data_time
  151. LEFT JOIN NOSCALE_WF_DA_PF_PERIOD_DATA nwdppd ON nwdppd.windplant_no = wdpei.windplant_no and nwdppd.model_no = wdpei.model_no and nwdppd.data_time = wdpei.data_time
  152. where wdpei.windplant_no = #{windplantNo} and wdpei.model_no = #{modelNo} and wdpei.data_time = #{dateTime}
  153. </select>
  154. </mapper>