WfUspPfParaMapper.xml 4.7 KB

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