WfUspEfParaMapper.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.WfUspEfParaMapper">
  6. <resultMap type="WfUspEfPara" id="WfUspEfParaResult">
  7. <result property="windplantNo" column="windplant_no"/>
  8. <result property="modelNo" column="model_no"/>
  9. <result property="efProcTime" column="ef_proc_time"/>
  10. <result property="efDayProcTime" column="ef_day_proc_time"/>
  11. <result property="efMonthProcTime" column="ef_month_proc_time"/>
  12. <result property="efType" column="ef_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="selectWfUspEfParaVo">
  18. select windplant_no, model_no, ef_proc_time, ef_day_proc_time, ef_month_proc_time, ef_type, para, mem, if_model_valid from wf_usp_ef_para
  19. </sql>
  20. <select id="selectWfUspEfParaList" parameterType="WfUspEfPara" resultMap="WfUspEfParaResult">
  21. select
  22. wuep.*,
  23. win.name as "windplantName",
  24. wmi.item_name as "itemName"
  25. from
  26. wf_usp_ef_para wuep
  27. left join windplant win on win.windplant_no = wuep.windplant_no
  28. left join enum_menu_item wmi on wmi.item_no = wuep.model_no and wmi.menu_no = 123
  29. <where>
  30. <if test="windplantNo != null ">and wuep.windplant_no = #{windplantNo}</if>
  31. <if test="modelNo != null ">and wuep.model_no = #{modelNo}</if>
  32. <if test="efProcTime != null ">and wuep.ef_proc_time = #{efProcTime}</if>
  33. <if test="efDayProcTime != null ">and wuep.ef_day_proc_time = #{efDayProcTime}</if>
  34. <if test="efMonthProcTime != null ">and wuep.ef_month_proc_time = #{efMonthProcTime}</if>
  35. <if test="efType != null ">and wuep.ef_type = #{efType}</if>
  36. <if test="para != null and para != ''">and wuep.para = #{para}</if>
  37. <if test="mem != null and mem != ''">and wuep.mem = #{mem}</if>
  38. <if test="ifModelValid != null ">and wuep.if_model_valid = #{ifModelValid}</if>
  39. </where>
  40. order by wuep.windplant_no asc
  41. </select>
  42. <select id="selectWfUspEfParaById" parameterType="Long" resultMap="WfUspEfParaResult">
  43. <include refid="selectWfUspEfParaVo"/>
  44. where windplant_no = #{windplantNo} and model_no = #{modelNo}
  45. </select>
  46. <insert id="insertWfUspEfPara" parameterType="WfUspEfPara">
  47. insert into wf_usp_ef_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="efProcTime != null">ef_proc_time,</if>
  52. <if test="efDayProcTime != null">ef_day_proc_time,</if>
  53. <if test="efMonthProcTime != null">ef_month_proc_time,</if>
  54. <if test="efType != null">ef_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="efProcTime != null">#{efProcTime},</if>
  63. <if test="efDayProcTime != null">#{efDayProcTime},</if>
  64. <if test="efMonthProcTime != null">#{efMonthProcTime},</if>
  65. <if test="efType != null">#{efType},</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="updateWfUspEfPara" parameterType="WfUspEfPara">
  72. update wf_usp_ef_para
  73. <trim prefix="SET" suffixOverrides=",">
  74. <if test="efProcTime != null">ef_proc_time = #{efProcTime},</if>
  75. <if test="efDayProcTime != null">ef_day_proc_time = #{efDayProcTime},</if>
  76. <if test="efMonthProcTime != null">ef_month_proc_time = #{efMonthProcTime},</if>
  77. <if test="efType != null">ef_type = #{efType},</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="deleteWfUspEfParaById" parameterType="Long">
  85. delete from wf_usp_ef_para where windplant_no = #{windplantNo} and model_no = #{modelNo}
  86. </delete>
  87. </mapper>