WfDaPfParaMapper.xml 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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.WfDaPfParaMapper">
  6. <resultMap type="WfDaPfPara" id="WfDaPfParaResult">
  7. <result property="windplantNo" column="windplant_no"/>
  8. <result property="modelNo" column="model_no"/>
  9. <result property="pfProcTimeAm" column="pf_proc_time_am"/>
  10. <result property="pfProcTimePm" column="pf_proc_time_pm"/>
  11. <result property="pfDayProcTime" column="pf_day_proc_time"/>
  12. <result property="pfMonthProcTime" column="pf_month_proc_time"/>
  13. <result property="pfType" column="pf_type"/>
  14. <result property="para" column="para"/>
  15. <result property="mem" column="mem"/>
  16. <result property="ifModelValid" column="if_model_valid"/>
  17. </resultMap>
  18. <sql id="selectWfDaPfParaVo">
  19. select windplant_no, model_no, pf_proc_time_am, pf_proc_time_pm, pf_day_proc_time, pf_month_proc_time, pf_type, para, mem, if_model_valid from wf_da_pf_para
  20. </sql>
  21. <select id="selectWfDaPfParaList" parameterType="WfDaPfPara" resultMap="WfDaPfParaResult">
  22. select
  23. wdpp.*,
  24. win.name as "windplantName",
  25. wmi.item_name as "itemName"
  26. from
  27. wf_da_pf_para wdpp
  28. left join windplant win on win.windplant_no = wdpp.windplant_no
  29. left join enum_menu_item wmi on wmi.item_no = wdpp.model_no and wmi.menu_no = 120
  30. <where>
  31. <if test="windplantNo != null ">and wdpp.windplant_no = #{windplantNo}</if>
  32. <if test="modelNo != null ">and wdpp.model_no = #{modelNo}</if>
  33. <if test="pfProcTimeAm != null ">and wdpp.pf_proc_time_am = #{pfProcTimeAm}</if>
  34. <if test="pfProcTimePm != null ">and wdpp.pf_proc_time_pm = #{pfProcTimePm}</if>
  35. <if test="pfDayProcTime != null ">and wdpp.pf_day_proc_time = #{pfDayProcTime}</if>
  36. <if test="pfMonthProcTime != null ">and wdpp.pf_month_proc_time = #{pfMonthProcTime}</if>
  37. <if test="pfType != null ">and wdpp.pf_type = #{pfType}</if>
  38. <if test="para != null and para != ''">and wdpp.para = #{para}</if>
  39. <if test="mem != null and mem != ''">and wdpp.mem = #{mem}</if>
  40. <if test="ifModelValid != null ">and wdpp.if_model_valid = #{ifModelValid}</if>
  41. </where>
  42. order by wdpp.windplant_no asc
  43. </select>
  44. <select id="selectWfDaPfParaById" parameterType="Long" resultMap="WfDaPfParaResult">
  45. <include refid="selectWfDaPfParaVo"/>
  46. where windplant_no = #{windplantNo} and model_no = #{modelNo}
  47. </select>
  48. <insert id="insertWfDaPfPara" parameterType="WfDaPfPara">
  49. insert into wf_da_pf_para
  50. <trim prefix="(" suffix=")" suffixOverrides=",">
  51. <if test="windplantNo != null">windplant_no,</if>
  52. <if test="modelNo != null">model_no,</if>
  53. <if test="pfProcTimeAm != null">pf_proc_time_am,</if>
  54. <if test="pfProcTimePm != null">pf_proc_time_pm,</if>
  55. <if test="pfDayProcTime != null">pf_day_proc_time,</if>
  56. <if test="pfMonthProcTime != null">pf_month_proc_time,</if>
  57. <if test="pfType != null">pf_type,</if>
  58. <if test="para != null">para,</if>
  59. <if test="mem != null">mem,</if>
  60. <if test="ifModelValid != null">if_model_valid,</if>
  61. </trim>
  62. <trim prefix="values (" suffix=")" suffixOverrides=",">
  63. <if test="windplantNo != null">#{windplantNo},</if>
  64. <if test="modelNo != null">#{modelNo},</if>
  65. <if test="pfProcTimeAm != null">#{pfProcTimeAm},</if>
  66. <if test="pfProcTimePm != null">#{pfProcTimePm},</if>
  67. <if test="pfDayProcTime != null">#{pfDayProcTime},</if>
  68. <if test="pfMonthProcTime != null">#{pfMonthProcTime},</if>
  69. <if test="pfType != null">#{pfType},</if>
  70. <if test="para != null">#{para},</if>
  71. <if test="mem != null">#{mem},</if>
  72. <if test="ifModelValid != null">#{ifModelValid},</if>
  73. </trim>
  74. </insert>
  75. <update id="updateWfDaPfPara" parameterType="WfDaPfPara">
  76. update wf_da_pf_para
  77. <trim prefix="SET" suffixOverrides=",">
  78. <if test="pfProcTimeAm != null">pf_proc_time_am = #{pfProcTimeAm},</if>
  79. <if test="pfProcTimePm != null">pf_proc_time_pm = #{pfProcTimePm},</if>
  80. <if test="pfDayProcTime != null">pf_day_proc_time = #{pfDayProcTime},</if>
  81. <if test="pfMonthProcTime != null">pf_month_proc_time = #{pfMonthProcTime},</if>
  82. <if test="pfType != null">pf_type = #{pfType},</if>
  83. <if test="para != null">para = #{para},</if>
  84. <if test="mem != null">mem = #{mem},</if>
  85. <if test="ifModelValid != null">if_model_valid = #{ifModelValid},</if>
  86. </trim>
  87. where windplant_no = #{windplantNo} and model_no = #{modelNo}
  88. </update>
  89. <delete id="deleteWfDaPfParaById" parameterType="Long">
  90. delete from wf_da_pf_para where windplant_no = #{windplantNo} and model_no = #{modelNo}
  91. </delete>
  92. </mapper>