1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- <?xml version="1.0" encoding="UTF-8" ?>
- <!DOCTYPE mapper
- PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
- "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="com.ruoyi.predict.mapper.WfUspEfParaMapper">
- <resultMap type="WfUspEfPara" id="WfUspEfParaResult">
- <result property="windplantNo" column="windplant_no"/>
- <result property="modelNo" column="model_no"/>
- <result property="efProcTime" column="ef_proc_time"/>
- <result property="efDayProcTime" column="ef_day_proc_time"/>
- <result property="efMonthProcTime" column="ef_month_proc_time"/>
- <result property="efType" column="ef_type"/>
- <result property="para" column="para"/>
- <result property="mem" column="mem"/>
- <result property="ifModelValid" column="if_model_valid"/>
- </resultMap>
- <sql id="selectWfUspEfParaVo">
- 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
- </sql>
- <select id="selectWfUspEfParaList" parameterType="WfUspEfPara" resultMap="WfUspEfParaResult">
- select
- wuep.*,
- win.name as "windplantName",
- wmi.item_name as "itemName"
- from
- wf_usp_ef_para wuep
- left join windplant win on win.windplant_no = wuep.windplant_no
- left join enum_menu_item wmi on wmi.item_no = wuep.model_no and wmi.menu_no = 123
- <where>
- <if test="windplantNo != null ">and wuep.windplant_no = #{windplantNo}</if>
- <if test="modelNo != null ">and wuep.model_no = #{modelNo}</if>
- <if test="efProcTime != null ">and wuep.ef_proc_time = #{efProcTime}</if>
- <if test="efDayProcTime != null ">and wuep.ef_day_proc_time = #{efDayProcTime}</if>
- <if test="efMonthProcTime != null ">and wuep.ef_month_proc_time = #{efMonthProcTime}</if>
- <if test="efType != null ">and wuep.ef_type = #{efType}</if>
- <if test="para != null and para != ''">and wuep.para = #{para}</if>
- <if test="mem != null and mem != ''">and wuep.mem = #{mem}</if>
- <if test="ifModelValid != null ">and wuep.if_model_valid = #{ifModelValid}</if>
- </where>
- order by wuep.windplant_no asc
- </select>
- <select id="selectWfUspEfParaById" parameterType="Long" resultMap="WfUspEfParaResult">
- <include refid="selectWfUspEfParaVo"/>
- where windplant_no = #{windplantNo} and model_no = #{modelNo}
- </select>
- <insert id="insertWfUspEfPara" parameterType="WfUspEfPara">
- insert into wf_usp_ef_para
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="windplantNo != null">windplant_no,</if>
- <if test="modelNo != null">model_no,</if>
- <if test="efProcTime != null">ef_proc_time,</if>
- <if test="efDayProcTime != null">ef_day_proc_time,</if>
- <if test="efMonthProcTime != null">ef_month_proc_time,</if>
- <if test="efType != null">ef_type,</if>
- <if test="para != null">para,</if>
- <if test="mem != null">mem,</if>
- <if test="ifModelValid != null">if_model_valid,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="windplantNo != null">#{windplantNo},</if>
- <if test="modelNo != null">#{modelNo},</if>
- <if test="efProcTime != null">#{efProcTime},</if>
- <if test="efDayProcTime != null">#{efDayProcTime},</if>
- <if test="efMonthProcTime != null">#{efMonthProcTime},</if>
- <if test="efType != null">#{efType},</if>
- <if test="para != null">#{para},</if>
- <if test="mem != null">#{mem},</if>
- <if test="ifModelValid != null">#{ifModelValid},</if>
- </trim>
- </insert>
- <update id="updateWfUspEfPara" parameterType="WfUspEfPara">
- update wf_usp_ef_para
- <trim prefix="SET" suffixOverrides=",">
- <if test="efProcTime != null">ef_proc_time = #{efProcTime},</if>
- <if test="efDayProcTime != null">ef_day_proc_time = #{efDayProcTime},</if>
- <if test="efMonthProcTime != null">ef_month_proc_time = #{efMonthProcTime},</if>
- <if test="efType != null">ef_type = #{efType},</if>
- <if test="para != null">para = #{para},</if>
- <if test="mem != null">mem = #{mem},</if>
- <if test="ifModelValid != null">if_model_valid = #{ifModelValid},</if>
- </trim>
- where windplant_no = #{windplantNo} and model_no = #{modelNo}
- </update>
- <delete id="deleteWfUspEfParaById" parameterType="Long">
- delete from wf_usp_ef_para where windplant_no = #{windplantNo} and model_no = #{modelNo}
- </delete>
- </mapper>
|