WfUspMonthDataMapper.xml 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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.WfUspMonthDataMapper">
  6. <resultMap type="WfUspMonthData" id="WfUspMonthDataResult">
  7. <result property="windplantNo" column="windplant_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="nrmse" column="nrmse"/>
  12. <result property="nmae" column="nmae"/>
  13. <result property="bias" column="bias"/>
  14. <result property="correlationCoeff" column="correlation_coeff"/>
  15. <result property="accuracyRate" column="accuracy_rate"/>
  16. <result property="dataCount" column="data_count"/>
  17. <result property="dataFlag" column="data_flag"/>
  18. </resultMap>
  19. <sql id="selectWfUspMonthDataVo">
  20. select windplant_no, model_no, time_scale, data_time, nrmse, nmae, bias, correlation_coeff, accuracy_rate, data_count, data_flag from wf_usp_month_data
  21. </sql>
  22. <select id="selectWfUspMonthDataList" parameterType="WfUspMonthData" resultMap="WfUspMonthDataResult">
  23. <include refid="selectWfUspMonthDataVo"/>
  24. <where>
  25. <if test="windplantNo != null ">and windplant_no = #{windplantNo}</if>
  26. <if test="modelNo != null ">and model_no = #{modelNo}</if>
  27. <if test="timeScale != null ">and time_scale = #{timeScale}</if>
  28. <if test="nrmse != null ">and nrmse = #{nrmse}</if>
  29. <if test="nmae != null ">and nmae = #{nmae}</if>
  30. <if test="bias != null ">and bias = #{bias}</if>
  31. <if test="correlationCoeff != null ">and correlation_coeff = #{correlationCoeff}</if>
  32. <if test="accuracyRate != null ">and accuracy_rate = #{accuracyRate}</if>
  33. <if test="dataCount != null ">and data_count = #{dataCount}</if>
  34. <if test="dataFlag != null ">and data_flag = #{dataFlag}</if>
  35. <if test="params.beginDataTime != null and params.beginDataTime != '' and params.endDataTime != null and params.endDataTime != ''">
  36. and data_time between to_date(#{params.beginDataTime},'yyyy-MM-dd HH24:MI:SS') and
  37. to_date(#{params.endDataTime},'yyyy-MM-dd HH24:MI:SS')
  38. </if>
  39. <if test="dataTime != null ">and data_time = #{dataTime}</if>
  40. </where>
  41. order by data_time asc
  42. </select>
  43. <select id="selectWfUspMonthDataById" parameterType="Long" resultMap="WfUspMonthDataResult">
  44. <include refid="selectWfUspMonthDataVo"/>
  45. where windplant_no = #{windplantNo}
  46. </select>
  47. <select id="selectWfUspMonthData" parameterType="WfUspMonthData" resultMap="WfUspMonthDataResult">
  48. <include refid="selectWfUspMonthDataVo"/>
  49. where windplant_no = #{windplantNo} and model_no = #{modelNo} and time_scale = #{timeScale} and data_time = #{dateTime}
  50. </select>
  51. </mapper>