|
@@ -0,0 +1,220 @@
|
|
|
+<?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.jjt.ws.mapper.TwinRzCalcMonthMapper">
|
|
|
+
|
|
|
+ <resultMap type="TwinRzCalcMonth" id="TwinRzCalcMonthResult">
|
|
|
+ <result property="calcId" column="CALC_ID" />
|
|
|
+ <result property="dataDate" column="DATA_DATE" />
|
|
|
+ <result property="totalPrice" column="TOTAL_PRICE" />
|
|
|
+ <result property="length" column="LENGTH" />
|
|
|
+ <result property="lengthPrice" column="LENGTH_PRICE" />
|
|
|
+ <result property="weight" column="WEIGHT" />
|
|
|
+ <result property="weightPrice" column="WEIGHT_PRICE" />
|
|
|
+ <result property="dUse" column="D_USE" />
|
|
|
+ <result property="dPrice" column="D_PRICE" />
|
|
|
+ <result property="qzUse" column="QZ_USE" />
|
|
|
+ <result property="qzPrice" column="QZ_PRICE" />
|
|
|
+ <result property="qzFUse" column="QZ_F_USE" />
|
|
|
+ <result property="qzGUse" column="QZ_G_USE" />
|
|
|
+ <result property="qzPUse" column="QZ_P_USE" />
|
|
|
+ <result property="qzJfUse" column="QZ_JF_USE" />
|
|
|
+ <result property="hzUse" column="HZ_USE" />
|
|
|
+ <result property="hzPrice" column="HZ_PRICE" />
|
|
|
+ <result property="hzFUse" column="HZ_F_USE" />
|
|
|
+ <result property="hzGUse" column="HZ_G_USE" />
|
|
|
+ <result property="hzPUse" column="HZ_P_USE" />
|
|
|
+ <result property="hzJfUse" column="HZ_JF_USE" />
|
|
|
+ <result property="yrUse" column="YR_USE" />
|
|
|
+ <result property="yrPrice" column="YR_PRICE" />
|
|
|
+ <result property="yrFUse" column="YR_F_USE" />
|
|
|
+ <result property="yrGUse" column="YR_G_USE" />
|
|
|
+ <result property="yrPUse" column="YR_P_USE" />
|
|
|
+ <result property="yrJfUse" column="YR_JF_USE" />
|
|
|
+ <result property="sPrice" column="S_PRICE" />
|
|
|
+ <result property="sUse" column="S_USE" />
|
|
|
+ <result property="qPrice" column="Q_PRICE" />
|
|
|
+ <result property="qLowUse" column="Q_LOW_USE" />
|
|
|
+ <result property="qLowPrice" column="Q_LOW_PRICE" />
|
|
|
+ <result property="qMidUse" column="Q_MID_USE" />
|
|
|
+ <result property="qMidPrice" column="Q_MID_PRICE" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectTwinRzCalcMonthVo">
|
|
|
+ select CALC_ID, DATA_DATE, TOTAL_PRICE, LENGTH, LENGTH_PRICE, WEIGHT, WEIGHT_PRICE, D_USE, D_PRICE, QZ_USE, QZ_PRICE, QZ_F_USE, QZ_G_USE, QZ_P_USE, QZ_JF_USE, HZ_USE, HZ_PRICE, HZ_F_USE, HZ_G_USE, HZ_P_USE, HZ_JF_USE, YR_USE, YR_PRICE, YR_F_USE, YR_G_USE, YR_P_USE, YR_JF_USE, S_PRICE, S_USE, Q_PRICE, Q_LOW_USE, Q_LOW_PRICE, Q_MID_USE, Q_MID_PRICE from TWIN_RZ_CALC_MONTH
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectTwinRzCalcMonthList" parameterType="TwinRzCalcMonth" resultMap="TwinRzCalcMonthResult">
|
|
|
+ <include refid="selectTwinRzCalcMonthVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="dataDate != null "> and DATA_DATE = #{dataDate}</if>
|
|
|
+ <if test="totalPrice != null "> and TOTAL_PRICE = #{totalPrice}</if>
|
|
|
+ <if test="length != null "> and LENGTH = #{length}</if>
|
|
|
+ <if test="lengthPrice != null "> and LENGTH_PRICE = #{lengthPrice}</if>
|
|
|
+ <if test="weight != null "> and WEIGHT = #{weight}</if>
|
|
|
+ <if test="weightPrice != null "> and WEIGHT_PRICE = #{weightPrice}</if>
|
|
|
+ <if test="dUse != null "> and D_USE = #{dUse}</if>
|
|
|
+ <if test="dPrice != null "> and D_PRICE = #{dPrice}</if>
|
|
|
+ <if test="qzUse != null "> and QZ_USE = #{qzUse}</if>
|
|
|
+ <if test="qzPrice != null "> and QZ_PRICE = #{qzPrice}</if>
|
|
|
+ <if test="qzFUse != null "> and QZ_F_USE = #{qzFUse}</if>
|
|
|
+ <if test="qzGUse != null "> and QZ_G_USE = #{qzGUse}</if>
|
|
|
+ <if test="qzPUse != null "> and QZ_P_USE = #{qzPUse}</if>
|
|
|
+ <if test="qzJfUse != null "> and QZ_JF_USE = #{qzJfUse}</if>
|
|
|
+ <if test="hzUse != null "> and HZ_USE = #{hzUse}</if>
|
|
|
+ <if test="hzPrice != null "> and HZ_PRICE = #{hzPrice}</if>
|
|
|
+ <if test="hzFUse != null "> and HZ_F_USE = #{hzFUse}</if>
|
|
|
+ <if test="hzGUse != null "> and HZ_G_USE = #{hzGUse}</if>
|
|
|
+ <if test="hzPUse != null "> and HZ_P_USE = #{hzPUse}</if>
|
|
|
+ <if test="hzJfUse != null "> and HZ_JF_USE = #{hzJfUse}</if>
|
|
|
+ <if test="yrUse != null "> and YR_USE = #{yrUse}</if>
|
|
|
+ <if test="yrPrice != null "> and YR_PRICE = #{yrPrice}</if>
|
|
|
+ <if test="yrFUse != null "> and YR_F_USE = #{yrFUse}</if>
|
|
|
+ <if test="yrGUse != null "> and YR_G_USE = #{yrGUse}</if>
|
|
|
+ <if test="yrPUse != null "> and YR_P_USE = #{yrPUse}</if>
|
|
|
+ <if test="yrJfUse != null "> and YR_JF_USE = #{yrJfUse}</if>
|
|
|
+ <if test="sPrice != null "> and S_PRICE = #{sPrice}</if>
|
|
|
+ <if test="sUse != null "> and S_USE = #{sUse}</if>
|
|
|
+ <if test="qPrice != null "> and Q_PRICE = #{qPrice}</if>
|
|
|
+ <if test="qLowUse != null "> and Q_LOW_USE = #{qLowUse}</if>
|
|
|
+ <if test="qLowPrice != null "> and Q_LOW_PRICE = #{qLowPrice}</if>
|
|
|
+ <if test="qMidUse != null "> and Q_MID_USE = #{qMidUse}</if>
|
|
|
+ <if test="qMidPrice != null "> and Q_MID_PRICE = #{qMidPrice}</if>
|
|
|
+ <if test="params.month != null and params.month != ''">
|
|
|
+ and FORMAT(DATA_DATE, 'yyyy-MM') = #{params.month}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ order by data_date
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectTwinRzCalcMonthByCalcId" parameterType="Long" resultMap="TwinRzCalcMonthResult">
|
|
|
+ <include refid="selectTwinRzCalcMonthVo"/>
|
|
|
+ where CALC_ID = #{calcId}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertTwinRzCalcMonth" parameterType="TwinRzCalcMonth" useGeneratedKeys="true" keyProperty="calcId">
|
|
|
+ insert into TWIN_RZ_CALC_MONTH
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="dataDate != null">DATA_DATE,</if>
|
|
|
+ <if test="totalPrice != null">TOTAL_PRICE,</if>
|
|
|
+ <if test="length != null">LENGTH,</if>
|
|
|
+ <if test="lengthPrice != null">LENGTH_PRICE,</if>
|
|
|
+ <if test="weight != null">WEIGHT,</if>
|
|
|
+ <if test="weightPrice != null">WEIGHT_PRICE,</if>
|
|
|
+ <if test="dUse != null">D_USE,</if>
|
|
|
+ <if test="dPrice != null">D_PRICE,</if>
|
|
|
+ <if test="qzUse != null">QZ_USE,</if>
|
|
|
+ <if test="qzPrice != null">QZ_PRICE,</if>
|
|
|
+ <if test="qzFUse != null">QZ_F_USE,</if>
|
|
|
+ <if test="qzGUse != null">QZ_G_USE,</if>
|
|
|
+ <if test="qzPUse != null">QZ_P_USE,</if>
|
|
|
+ <if test="qzJfUse != null">QZ_JF_USE,</if>
|
|
|
+ <if test="hzUse != null">HZ_USE,</if>
|
|
|
+ <if test="hzPrice != null">HZ_PRICE,</if>
|
|
|
+ <if test="hzFUse != null">HZ_F_USE,</if>
|
|
|
+ <if test="hzGUse != null">HZ_G_USE,</if>
|
|
|
+ <if test="hzPUse != null">HZ_P_USE,</if>
|
|
|
+ <if test="hzJfUse != null">HZ_JF_USE,</if>
|
|
|
+ <if test="yrUse != null">YR_USE,</if>
|
|
|
+ <if test="yrPrice != null">YR_PRICE,</if>
|
|
|
+ <if test="yrFUse != null">YR_F_USE,</if>
|
|
|
+ <if test="yrGUse != null">YR_G_USE,</if>
|
|
|
+ <if test="yrPUse != null">YR_P_USE,</if>
|
|
|
+ <if test="yrJfUse != null">YR_JF_USE,</if>
|
|
|
+ <if test="sPrice != null">S_PRICE,</if>
|
|
|
+ <if test="sUse != null">S_USE,</if>
|
|
|
+ <if test="qPrice != null">Q_PRICE,</if>
|
|
|
+ <if test="qLowUse != null">Q_LOW_USE,</if>
|
|
|
+ <if test="qLowPrice != null">Q_LOW_PRICE,</if>
|
|
|
+ <if test="qMidUse != null">Q_MID_USE,</if>
|
|
|
+ <if test="qMidPrice != null">Q_MID_PRICE,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="dataDate != null">#{dataDate},</if>
|
|
|
+ <if test="totalPrice != null">#{totalPrice},</if>
|
|
|
+ <if test="length != null">#{length},</if>
|
|
|
+ <if test="lengthPrice != null">#{lengthPrice},</if>
|
|
|
+ <if test="weight != null">#{weight},</if>
|
|
|
+ <if test="weightPrice != null">#{weightPrice},</if>
|
|
|
+ <if test="dUse != null">#{dUse},</if>
|
|
|
+ <if test="dPrice != null">#{dPrice},</if>
|
|
|
+ <if test="qzUse != null">#{qzUse},</if>
|
|
|
+ <if test="qzPrice != null">#{qzPrice},</if>
|
|
|
+ <if test="qzFUse != null">#{qzFUse},</if>
|
|
|
+ <if test="qzGUse != null">#{qzGUse},</if>
|
|
|
+ <if test="qzPUse != null">#{qzPUse},</if>
|
|
|
+ <if test="qzJfUse != null">#{qzJfUse},</if>
|
|
|
+ <if test="hzUse != null">#{hzUse},</if>
|
|
|
+ <if test="hzPrice != null">#{hzPrice},</if>
|
|
|
+ <if test="hzFUse != null">#{hzFUse},</if>
|
|
|
+ <if test="hzGUse != null">#{hzGUse},</if>
|
|
|
+ <if test="hzPUse != null">#{hzPUse},</if>
|
|
|
+ <if test="hzJfUse != null">#{hzJfUse},</if>
|
|
|
+ <if test="yrUse != null">#{yrUse},</if>
|
|
|
+ <if test="yrPrice != null">#{yrPrice},</if>
|
|
|
+ <if test="yrFUse != null">#{yrFUse},</if>
|
|
|
+ <if test="yrGUse != null">#{yrGUse},</if>
|
|
|
+ <if test="yrPUse != null">#{yrPUse},</if>
|
|
|
+ <if test="yrJfUse != null">#{yrJfUse},</if>
|
|
|
+ <if test="sPrice != null">#{sPrice},</if>
|
|
|
+ <if test="sUse != null">#{sUse},</if>
|
|
|
+ <if test="qPrice != null">#{qPrice},</if>
|
|
|
+ <if test="qLowUse != null">#{qLowUse},</if>
|
|
|
+ <if test="qLowPrice != null">#{qLowPrice},</if>
|
|
|
+ <if test="qMidUse != null">#{qMidUse},</if>
|
|
|
+ <if test="qMidPrice != null">#{qMidPrice},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateTwinRzCalcMonth" parameterType="TwinRzCalcMonth">
|
|
|
+ update TWIN_RZ_CALC_MONTH
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="dataDate != null">DATA_DATE = #{dataDate},</if>
|
|
|
+ <if test="totalPrice != null">TOTAL_PRICE = #{totalPrice},</if>
|
|
|
+ <if test="length != null">LENGTH = #{length},</if>
|
|
|
+ <if test="lengthPrice != null">LENGTH_PRICE = #{lengthPrice},</if>
|
|
|
+ <if test="weight != null">WEIGHT = #{weight},</if>
|
|
|
+ <if test="weightPrice != null">WEIGHT_PRICE = #{weightPrice},</if>
|
|
|
+ <if test="dUse != null">D_USE = #{dUse},</if>
|
|
|
+ <if test="dPrice != null">D_PRICE = #{dPrice},</if>
|
|
|
+ <if test="qzUse != null">QZ_USE = #{qzUse},</if>
|
|
|
+ <if test="qzPrice != null">QZ_PRICE = #{qzPrice},</if>
|
|
|
+ <if test="qzFUse != null">QZ_F_USE = #{qzFUse},</if>
|
|
|
+ <if test="qzGUse != null">QZ_G_USE = #{qzGUse},</if>
|
|
|
+ <if test="qzPUse != null">QZ_P_USE = #{qzPUse},</if>
|
|
|
+ <if test="qzJfUse != null">QZ_JF_USE = #{qzJfUse},</if>
|
|
|
+ <if test="hzUse != null">HZ_USE = #{hzUse},</if>
|
|
|
+ <if test="hzPrice != null">HZ_PRICE = #{hzPrice},</if>
|
|
|
+ <if test="hzFUse != null">HZ_F_USE = #{hzFUse},</if>
|
|
|
+ <if test="hzGUse != null">HZ_G_USE = #{hzGUse},</if>
|
|
|
+ <if test="hzPUse != null">HZ_P_USE = #{hzPUse},</if>
|
|
|
+ <if test="hzJfUse != null">HZ_JF_USE = #{hzJfUse},</if>
|
|
|
+ <if test="yrUse != null">YR_USE = #{yrUse},</if>
|
|
|
+ <if test="yrPrice != null">YR_PRICE = #{yrPrice},</if>
|
|
|
+ <if test="yrFUse != null">YR_F_USE = #{yrFUse},</if>
|
|
|
+ <if test="yrGUse != null">YR_G_USE = #{yrGUse},</if>
|
|
|
+ <if test="yrPUse != null">YR_P_USE = #{yrPUse},</if>
|
|
|
+ <if test="yrJfUse != null">YR_JF_USE = #{yrJfUse},</if>
|
|
|
+ <if test="sPrice != null">S_PRICE = #{sPrice},</if>
|
|
|
+ <if test="sUse != null">S_USE = #{sUse},</if>
|
|
|
+ <if test="qPrice != null">Q_PRICE = #{qPrice},</if>
|
|
|
+ <if test="qLowUse != null">Q_LOW_USE = #{qLowUse},</if>
|
|
|
+ <if test="qLowPrice != null">Q_LOW_PRICE = #{qLowPrice},</if>
|
|
|
+ <if test="qMidUse != null">Q_MID_USE = #{qMidUse},</if>
|
|
|
+ <if test="qMidPrice != null">Q_MID_PRICE = #{qMidPrice},</if>
|
|
|
+ </trim>
|
|
|
+ where CALC_ID = #{calcId}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteTwinRzCalcMonthByCalcId" parameterType="Long">
|
|
|
+ delete from TWIN_RZ_CALC_MONTH where CALC_ID = #{calcId}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteTwinRzCalcMonthByCalcIds" parameterType="String">
|
|
|
+ delete from TWIN_RZ_CALC_MONTH where CALC_ID in
|
|
|
+ <foreach item="calcId" collection="array" open="(" separator="," close=")">
|
|
|
+ #{calcId}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+</mapper>
|