123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166 |
- <?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.project.production.mapper.TMonthlyProductionReportMapper">
-
- <resultMap type="TMonthlyProductionReport" id="TMonthlyProductionReportResult">
- <result property="id" column="id" />
- <result property="reportMonth" column="report_month" />
- <result property="reportYear" column="report_year" />
- <result property="nap" column="nap" />
- <result property="c5" column="c5" />
- <result property="c6C8Na" column="c6_c8_na" />
- <result property="wisonEthane" column="wison_ethane" />
- <result property="lpgToFurnace" column="lpg_to_furnace" />
- <result property="raff3FrBd" column="raff3_fr_bd" />
- <result property="raffinate2pFr2ph" column="raffinate2p_fr_2ph" />
- <result property="c2FrLdpe" column="c2_fr_ldpe" />
- <result property="c3FrOxo" column="c3_fr_oxo" />
- <result property="mixedC3C4" column="mixed_c3_c4" />
- <result property="hyC9" column="hy_c9" />
- <result property="pguOffgas" column="pgu_offgas" />
- <result property="washOil" column="wash_oil" />
- <result property="toluene" column="toluene" />
- <result property="hyC4FrR800" column="hy_c4_fr_r800" />
- <result property="crackerRawInput" column="cracker_raw_input" />
- <result property="crackerRawFeed" column="cracker_raw_feed" />
- <result property="deptName" column="dept_name" />
- </resultMap>
- <sql id="selectTMonthlyProductionReportVo">
- select d.id, d.report_month, d.report_year, d.nap, d.c5, d.c6_c8_na, d.wison_ethane, d.lpg_to_furnace, d.raff3_fr_bd, d.raffinate2p_fr_2ph, d.c2_fr_ldpe, d.c3_fr_oxo, d.mixed_c3_c4, d.hy_c9, d.pgu_offgas, d.wash_oil, d.toluene, d.hy_c4_fr_r800, d.cracker_raw_input, d.cracker_raw_feed from t_monthly_production_report d
- </sql>
- <select id="selectCrackerRawMaterialByYear" parameterType="Long" resultMap="TMonthlyProductionReportResult">
- select
- d.id, d.report_month, d.report_year, d.nap, d.c5, d.c6_c8_na, d.wison_ethane, d.lpg_to_furnace,
- d.raff3_fr_bd, d.raffinate2p_fr_2ph, d.c2_fr_ldpe, d.c3_fr_oxo, d.mixed_c3_c4, d.hy_c9, d.pgu_offgas,
- d.wash_oil, d.toluene, d.hy_c4_fr_r800, d.cracker_raw_input, d.cracker_raw_feed
- from
- t_monthly_production_report d
- where d.report_year = #{year}
- </select>
- <select id="selectTMonthlyProductionReportList" parameterType="TMonthlyProductionReport" resultMap="TMonthlyProductionReportResult">
- <include refid="selectTMonthlyProductionReportVo"/>
- <where>
- <if test="reportMonth != null "> and report_month = #{reportMonth}</if>
- <if test="reportYear != null "> and report_year = #{reportYear}</if>
- <if test="nap != null and nap != ''"> and nap = #{nap}</if>
- <if test="c5 != null and c5 != ''"> and c5 = #{c5}</if>
- <if test="c6C8Na != null and c6C8Na != ''"> and c6_c8_na = #{c6C8Na}</if>
- <if test="wisonEthane != null and wisonEthane != ''"> and wison_ethane = #{wisonEthane}</if>
- <if test="lpgToFurnace != null and lpgToFurnace != ''"> and lpg_to_furnace = #{lpgToFurnace}</if>
- <if test="raff3FrBd != null and raff3FrBd != ''"> and raff3_fr_bd = #{raff3FrBd}</if>
- <if test="raffinate2pFr2ph != null and raffinate2pFr2ph != ''"> and raffinate2p_fr_2ph = #{raffinate2pFr2ph}</if>
- <if test="c2FrLdpe != null and c2FrLdpe != ''"> and c2_fr_ldpe = #{c2FrLdpe}</if>
- <if test="c3FrOxo != null and c3FrOxo != ''"> and c3_fr_oxo = #{c3FrOxo}</if>
- <if test="mixedC3C4 != null and mixedC3C4 != ''"> and mixed_c3_c4 = #{mixedC3C4}</if>
- <if test="hyC9 != null and hyC9 != ''"> and hy_c9 = #{hyC9}</if>
- <if test="pguOffgas != null and pguOffgas != ''"> and pgu_offgas = #{pguOffgas}</if>
- <if test="washOil != null and washOil != ''"> and wash_oil = #{washOil}</if>
- <if test="toluene != null and toluene != ''"> and toluene = #{toluene}</if>
- <if test="hyC4FrR800 != null and hyC4FrR800 != ''"> and hy_c4_fr_r800 = #{hyC4FrR800}</if>
- <if test="crackerRawInput != null and crackerRawInput != ''"> and cracker_raw_input = #{crackerRawInput}</if>
- <if test="crackerRawFeed != null and crackerRawFeed != ''"> and cracker_raw_feed = #{crackerRawFeed}</if>
- and d.del_flag = 0
- </where>
- <!-- 数据范围过滤 -->
- ${params.dataScope}
- </select>
-
- <select id="selectTMonthlyProductionReportById" parameterType="Long" resultMap="TMonthlyProductionReportResult">
- <include refid="selectTMonthlyProductionReportVo"/>
- where id = #{id}
- </select>
-
- <insert id="insertTMonthlyProductionReport" parameterType="TMonthlyProductionReport">
- <selectKey keyProperty="id" resultType="long" order="BEFORE">
- SELECT SEQ_T_MONTHLY_REPORT.NEXTVAL as id FROM DUAL
- </selectKey>
- insert into t_monthly_production_report
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">id,</if>
- <if test="reportMonth != null">report_month,</if>
- <if test="reportYear != null">report_year,</if>
- <if test="nap != null">nap,</if>
- <if test="c5 != null">c5,</if>
- <if test="c6C8Na != null">c6_c8_na,</if>
- <if test="wisonEthane != null">wison_ethane,</if>
- <if test="lpgToFurnace != null">lpg_to_furnace,</if>
- <if test="raff3FrBd != null">raff3_fr_bd,</if>
- <if test="raffinate2pFr2ph != null">raffinate2p_fr_2ph,</if>
- <if test="c2FrLdpe != null">c2_fr_ldpe,</if>
- <if test="c3FrOxo != null">c3_fr_oxo,</if>
- <if test="mixedC3C4 != null">mixed_c3_c4,</if>
- <if test="hyC9 != null">hy_c9,</if>
- <if test="pguOffgas != null">pgu_offgas,</if>
- <if test="washOil != null">wash_oil,</if>
- <if test="toluene != null">toluene,</if>
- <if test="hyC4FrR800 != null">hy_c4_fr_r800,</if>
- <if test="crackerRawInput != null">cracker_raw_input,</if>
- <if test="crackerRawFeed != null">cracker_raw_feed,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">#{id},</if>
- <if test="reportMonth != null">#{reportMonth},</if>
- <if test="reportYear != null">#{reportYear},</if>
- <if test="nap != null">#{nap},</if>
- <if test="c5 != null">#{c5},</if>
- <if test="c6C8Na != null">#{c6C8Na},</if>
- <if test="wisonEthane != null">#{wisonEthane},</if>
- <if test="lpgToFurnace != null">#{lpgToFurnace},</if>
- <if test="raff3FrBd != null">#{raff3FrBd},</if>
- <if test="raffinate2pFr2ph != null">#{raffinate2pFr2ph},</if>
- <if test="c2FrLdpe != null">#{c2FrLdpe},</if>
- <if test="c3FrOxo != null">#{c3FrOxo},</if>
- <if test="mixedC3C4 != null">#{mixedC3C4},</if>
- <if test="hyC9 != null">#{hyC9},</if>
- <if test="pguOffgas != null">#{pguOffgas},</if>
- <if test="washOil != null">#{washOil},</if>
- <if test="toluene != null">#{toluene},</if>
- <if test="hyC4FrR800 != null">#{hyC4FrR800},</if>
- <if test="crackerRawInput != null">#{crackerRawInput},</if>
- <if test="crackerRawFeed != null">#{crackerRawFeed},</if>
- </trim>
- </insert>
- <update id="updateTMonthlyProductionReport" parameterType="TMonthlyProductionReport">
- update t_monthly_production_report
- <trim prefix="SET" suffixOverrides=",">
- <if test="reportMonth != null">report_month = #{reportMonth},</if>
- <if test="reportYear != null">report_year = #{reportYear},</if>
- <if test="nap != null">nap = #{nap},</if>
- <if test="c5 != null">c5 = #{c5},</if>
- <if test="c6C8Na != null">c6_c8_na = #{c6C8Na},</if>
- <if test="wisonEthane != null">wison_ethane = #{wisonEthane},</if>
- <if test="lpgToFurnace != null">lpg_to_furnace = #{lpgToFurnace},</if>
- <if test="raff3FrBd != null">raff3_fr_bd = #{raff3FrBd},</if>
- <if test="raffinate2pFr2ph != null">raffinate2p_fr_2ph = #{raffinate2pFr2ph},</if>
- <if test="c2FrLdpe != null">c2_fr_ldpe = #{c2FrLdpe},</if>
- <if test="c3FrOxo != null">c3_fr_oxo = #{c3FrOxo},</if>
- <if test="mixedC3C4 != null">mixed_c3_c4 = #{mixedC3C4},</if>
- <if test="hyC9 != null">hy_c9 = #{hyC9},</if>
- <if test="pguOffgas != null">pgu_offgas = #{pguOffgas},</if>
- <if test="washOil != null">wash_oil = #{washOil},</if>
- <if test="toluene != null">toluene = #{toluene},</if>
- <if test="hyC4FrR800 != null">hy_c4_fr_r800 = #{hyC4FrR800},</if>
- <if test="crackerRawInput != null">cracker_raw_input = #{crackerRawInput},</if>
- <if test="crackerRawFeed != null">cracker_raw_feed = #{crackerRawFeed},</if>
- </trim>
- where id = #{id}
- </update>
- <update id="deleteTMonthlyProductionReportById" parameterType="Long">
- update t_monthly_production_report set del_flag = 2 where id = #{id}
- </update>
- <update id="deleteTMonthlyProductionReportByIds" parameterType="String">
- update t_monthly_production_report set del_flag = 2 where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </update>
-
- </mapper>
|