123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- <?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.PvDaPfParaMapper">
- <resultMap type="PvDaPfPara" id="PvDaPfParaResult">
- <result property="windplantNo" column="windplant_no"/>
- <result property="modelNo" column="model_no"/>
- <result property="pfProcTimeAm" column="pf_proc_time_am"/>
- <result property="pfProcTimePm" column="pf_proc_time_pm"/>
- <result property="pfDayProcTime" column="pf_day_proc_time"/>
- <result property="pfMonthProcTime" column="pf_month_proc_time"/>
- <result property="pfType" column="pf_type"/>
- <result property="para" column="para"/>
- <result property="mem" column="mem"/>
- <result property="ifModelValid" column="if_model_valid"/>
- </resultMap>
- <sql id="selectPvDaPfParaVo">
- 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 pv_da_pf_para
- </sql>
- <select id="selectPvDaPfParaList" parameterType="PvDaPfPara" resultMap="PvDaPfParaResult">
- select
- pdpp.*,
- pps.name as "pvName",
- wmi.item_name as "itemName"
- from
- pv_da_pf_para pdpp
- left join pv_power_station pps on pps.pv_station_no = pdpp.windplant_no
- left join enum_menu_item wmi on wmi.item_no = pdpp.model_no and wmi.menu_no = 120
- <where>
- <if test="windplantNo != null ">and pdpp.windplant_no = #{windplantNo}</if>
- <if test="modelNo != null ">and pdpp.model_no = #{modelNo}</if>
- <if test="pfProcTimeAm != null ">and pdpp.pf_proc_time_am = #{pfProcTimeAm}</if>
- <if test="pfProcTimePm != null ">and pdpp.pf_proc_time_pm = #{pfProcTimePm}</if>
- <if test="pfDayProcTime != null ">and pdpp.pf_day_proc_time = #{pfDayProcTime}</if>
- <if test="pfMonthProcTime != null ">and pdpp.pf_month_proc_time = #{pfMonthProcTime}</if>
- <if test="pfType != null ">and pdpp.pf_type = #{pfType}</if>
- <if test="para != null and para != ''">and pdpp.para = #{para}</if>
- <if test="mem != null and mem != ''">and pdpp.mem = #{mem}</if>
- <if test="ifModelValid != null ">and pdpp.if_model_valid = #{ifModelValid}</if>
- </where>
- order by pdpp.windplant_no asc
- </select>
- <select id="selectPvDaPfParaById" parameterType="Long" resultMap="PvDaPfParaResult">
- <include refid="selectPvDaPfParaVo"/>
- where windplant_no = #{windplantNo} and model_no = #{modelNo}
- </select>
- <insert id="insertPvDaPfPara" parameterType="PvDaPfPara">
- insert into pv_da_pf_para
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="windplantNo != null">windplant_no,</if>
- <if test="modelNo != null">model_no,</if>
- <if test="pfProcTimeAm != null">pf_proc_time_am,</if>
- <if test="pfProcTimePm != null">pf_proc_time_pm,</if>
- <if test="pfDayProcTime != null">pf_day_proc_time,</if>
- <if test="pfMonthProcTime != null">pf_month_proc_time,</if>
- <if test="pfType != null">pf_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="pfProcTimeAm != null">#{pfProcTimeAm},</if>
- <if test="pfProcTimePm != null">#{pfProcTimePm},</if>
- <if test="pfDayProcTime != null">#{pfDayProcTime},</if>
- <if test="pfMonthProcTime != null">#{pfMonthProcTime},</if>
- <if test="pfType != null">#{pfType},</if>
- <if test="para != null">#{para},</if>
- <if test="mem != null">#{mem},</if>
- <if test="ifModelValid != null">#{ifModelValid},</if>
- </trim>
- </insert>
- <update id="updatePvDaPfPara" parameterType="PvDaPfPara">
- update pv_da_pf_para
- <trim prefix="SET" suffixOverrides=",">
- <if test="pfProcTimeAm != null">pf_proc_time_am = #{pfProcTimeAm},</if>
- <if test="pfProcTimePm != null">pf_proc_time_pm = #{pfProcTimePm},</if>
- <if test="pfDayProcTime != null">pf_day_proc_time = #{pfDayProcTime},</if>
- <if test="pfMonthProcTime != null">pf_month_proc_time = #{pfMonthProcTime},</if>
- <if test="pfType != null">pf_type = #{pfType},</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="deletePvDaPfParaById" parameterType="Long">
- delete from pv_da_pf_para where windplant_no = #{windplantNo} and model_no = #{modelNo}
- </delete>
- </mapper>
|