WfDaEfParaMapper.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.WfDaEfParaMapper">
  6. <resultMap type="WfDaEfPara" id="WfDaEfParaResult">
  7. <result property="windplantNo" column="windplant_no"/>
  8. <result property="modelNo" column="model_no"/>
  9. <result property="efProcTimeAm" column="ef_proc_time_am"/>
  10. <result property="efProcTimePm" column="ef_proc_time_pm"/>
  11. <result property="efDayProcTime" column="ef_day_proc_time"/>
  12. <result property="efMonthProcTime" column="ef_month_proc_time"/>
  13. <result property="efType" column="ef_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="selectWfDaEfParaVo">
  19. select windplant_no, model_no, ef_proc_time_am, ef_proc_time_pm, ef_day_proc_time, ef_month_proc_time, ef_type, para, mem, if_model_valid from wf_da_ef_para
  20. </sql>
  21. <select id="selectWfDaEfParaList" parameterType="WfDaEfPara" resultMap="WfDaEfParaResult">
  22. select
  23. wdep.*,
  24. win.name as "windplantName",
  25. wmi.item_name as "itemName"
  26. from
  27. wf_da_ef_para wdep
  28. left join windplant win on win.windplant_no = wdep.windplant_no
  29. left join enum_menu_item wmi on wmi.item_no = wdep.model_no and wmi.menu_no = 120
  30. <where>
  31. <if test="windplantNo != null ">and wdep.windplant_no = #{windplantNo}</if>
  32. <if test="modelNo != null ">and wdep.model_no = #{modelNo}</if>
  33. <if test="efProcTimeAm != null ">and wdep.ef_proc_time_am = #{efProcTimeAm}</if>
  34. <if test="efProcTimePm != null ">and wdep.ef_proc_time_pm = #{efProcTimePm}</if>
  35. <if test="efDayProcTime != null ">and wdep.ef_day_proc_time = #{efDayProcTime}</if>
  36. <if test="efMonthProcTime != null ">and wdep.ef_month_proc_time = #{efMonthProcTime}</if>
  37. <if test="efType != null ">and wdep.ef_type = #{efType}</if>
  38. <if test="para != null and para != ''">and wdep.para = #{para}</if>
  39. <if test="mem != null and mem != ''">and wdep.mem = #{mem}</if>
  40. <if test="ifModelValid != null ">and wdep.if_model_valid = #{ifModelValid}</if>
  41. </where>
  42. order by wdep.windplant_no asc
  43. </select>
  44. <select id="selectWfDaEfParaById" parameterType="Long" resultMap="WfDaEfParaResult">
  45. <include refid="selectWfDaEfParaVo"/>
  46. where windplant_no = #{windplantNo} and model_no = #{modelNo}
  47. </select>
  48. <insert id="insertWfDaEfPara" parameterType="WfDaEfPara">
  49. insert into wf_da_ef_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="efProcTimeAm != null">ef_proc_time_am,</if>
  54. <if test="efProcTimePm != null">ef_proc_time_pm,</if>
  55. <if test="efDayProcTime != null">ef_day_proc_time,</if>
  56. <if test="efMonthProcTime != null">ef_month_proc_time,</if>
  57. <if test="efType != null">ef_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="efProcTimeAm != null">#{efProcTimeAm},</if>
  66. <if test="efProcTimePm != null">#{efProcTimePm},</if>
  67. <if test="efDayProcTime != null">#{efDayProcTime},</if>
  68. <if test="efMonthProcTime != null">#{efMonthProcTime},</if>
  69. <if test="efType != null">#{efType},</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="updateWfDaEfPara" parameterType="WfDaEfPara">
  76. update wf_da_ef_para
  77. <trim prefix="SET" suffixOverrides=",">
  78. <if test="efProcTimeAm != null">ef_proc_time_am = #{efProcTimeAm},</if>
  79. <if test="efProcTimePm != null">ef_proc_time_pm = #{efProcTimePm},</if>
  80. <if test="efDayProcTime != null">ef_day_proc_time = #{efDayProcTime},</if>
  81. <if test="efMonthProcTime != null">ef_month_proc_time = #{efMonthProcTime},</if>
  82. <if test="efType != null">ef_type = #{efType},</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="deleteWfDaEfParaById" parameterType="Long">
  90. delete from wf_da_ef_para where windplant_no = #{windplantNo} and model_no = #{modelNo}
  91. </delete>
  92. </mapper>