NwpFileTimeMapper.xml 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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.NwpFileTimeMapper">
  6. <resultMap type="NwpFileTime" id="NwpFileTimeResult">
  7. <result property="windplantNo" column="windplant_no"/>
  8. <result property="nwpNo" column="nwp_no"/>
  9. <result property="fileDbRecTimeAm" column="file_db_rec_time_am"/>
  10. <result property="fileDbRecTimePm" column="file_db_rec_time_pm"/>
  11. <result property="procTimeAm" column="proc_time_am"/>
  12. <result property="procTimePm" column="proc_time_pm"/>
  13. </resultMap>
  14. <sql id="selectNwpFileTimeVo">
  15. select windplant_no, nwp_no, file_db_rec_time_am, file_db_rec_time_pm, proc_time_am, proc_time_pm from nwp_file_time
  16. </sql>
  17. <select id="selectNwpFileTimeList" parameterType="NwpFileTime" resultMap="NwpFileTimeResult">
  18. select
  19. nft.*,
  20. w.name as "windplantName",
  21. emi.item_name as "nwpNoName"
  22. from
  23. nwp_file_time nft
  24. left join windplant w on w.windplant_no = nft.windplant_no
  25. left join enum_menu_item emi on emi.item_val = nft.nwp_no and emi.menu_no = 119
  26. <where>
  27. <if test="windplantNo != null ">and nft.windplant_no = #{windplantNo}</if>
  28. <if test="nwpNo != null ">and nft.nwp_no = #{nwpNo}</if>
  29. <if test="fileDbRecTimeAm != null ">and nft.file_db_rec_time_am = #{fileDbRecTimeAm}</if>
  30. <if test="fileDbRecTimePm != null ">and nft.file_db_rec_time_pm = #{fileDbRecTimePm}</if>
  31. <if test="procTimeAm != null ">and nft.proc_time_am = #{procTimeAm}</if>
  32. <if test="procTimePm != null ">and nft.proc_time_pm = #{procTimePm}</if>
  33. <if test="windplantName != null and windplantName != ''">and w.name like concat(concat('%',
  34. #{windplantName}), '%')
  35. </if>
  36. </where>
  37. order by nft.windplant_no asc
  38. </select>
  39. <select id="selectNwpFileTimeById" parameterType="Long" resultMap="NwpFileTimeResult">
  40. <include refid="selectNwpFileTimeVo"/>
  41. where windplant_no = #{windplantNo}
  42. </select>
  43. </mapper>