|
@@ -0,0 +1,446 @@
|
|
|
+<?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.steerinfo.dil.mapper.TbProductSummaryDgMapper">
|
|
|
+ <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.TbProductSummaryDg">
|
|
|
+ <id column="ITEM_ID" jdbcType="DECIMAL" property="itemId" />
|
|
|
+ <result column="ITEM_NAME" jdbcType="VARCHAR" property="itemName" />
|
|
|
+ <result column="IN_STORAGE_DAILY" jdbcType="DECIMAL" property="inStorageDaily" />
|
|
|
+ <result column="IN_STORAGE_MONTH" jdbcType="DECIMAL" property="inStorageMonth" />
|
|
|
+ <result column="SALES_DAILY" jdbcType="DECIMAL" property="salesDaily" />
|
|
|
+ <result column="SALES_MONTH" jdbcType="DECIMAL" property="salesMonth" />
|
|
|
+ <result column="INVENTORY_CURRENT" jdbcType="DECIMAL" property="inventoryCurrent" />
|
|
|
+ <result column="INVENTORY_START" jdbcType="DECIMAL" property="inventoryStart" />
|
|
|
+ <result column="INVENTORY_CHANGE" jdbcType="DECIMAL" property="inventoryChange" />
|
|
|
+ <result column="SALES_PLAN_MONTH" jdbcType="DECIMAL" property="salesPlanMonth" />
|
|
|
+ <result column="SCHEDULE_PLAN_MONTH" jdbcType="DECIMAL" property="schedulePlanMonth" />
|
|
|
+ <result column="DATES" jdbcType="TIMESTAMP" property="dates" />
|
|
|
+ <result column="COMPANY_NAME" jdbcType="VARCHAR" property="companyName" />
|
|
|
+ <result column="IS_VALID" jdbcType="CHAR" property="isValid" />
|
|
|
+ </resultMap>
|
|
|
+ <sql id="columns">
|
|
|
+ ITEM_ID, ITEM_NAME, IN_STORAGE_DAILY, IN_STORAGE_MONTH, SALES_DAILY, SALES_MONTH,
|
|
|
+ INVENTORY_CURRENT, INVENTORY_START, INVENTORY_CHANGE, SALES_PLAN_MONTH, SCHEDULE_PLAN_MONTH,
|
|
|
+ DATES, COMPANY_NAME, IS_VALID
|
|
|
+ </sql>
|
|
|
+ <sql id="columns_alias">
|
|
|
+ t.ITEM_ID, t.ITEM_NAME, t.IN_STORAGE_DAILY, t.IN_STORAGE_MONTH, t.SALES_DAILY, t.SALES_MONTH,
|
|
|
+ t.INVENTORY_CURRENT, t.INVENTORY_START, t.INVENTORY_CHANGE, t.SALES_PLAN_MONTH, t.SCHEDULE_PLAN_MONTH,
|
|
|
+ t.DATES, t.COMPANY_NAME, t.IS_VALID
|
|
|
+ </sql>
|
|
|
+ <sql id="select">
|
|
|
+ SELECT <include refid="columns"/> FROM TB_PRODUCT_SUMMARY_DG
|
|
|
+ </sql>
|
|
|
+ <sql id="select_alias">
|
|
|
+ SELECT <include refid="columns_alias"/> FROM TB_PRODUCT_SUMMARY_DG t
|
|
|
+ </sql>
|
|
|
+ <sql id="where">
|
|
|
+ <where>
|
|
|
+ <if test="itemId != null">
|
|
|
+ and ITEM_ID = #{itemId}
|
|
|
+ </if>
|
|
|
+ <if test="itemName != null and itemName != ''">
|
|
|
+ and ITEM_NAME = #{itemName}
|
|
|
+ </if>
|
|
|
+ <if test="inStorageDaily != null">
|
|
|
+ and IN_STORAGE_DAILY = #{inStorageDaily}
|
|
|
+ </if>
|
|
|
+ <if test="inStorageMonth != null">
|
|
|
+ and IN_STORAGE_MONTH = #{inStorageMonth}
|
|
|
+ </if>
|
|
|
+ <if test="salesDaily != null">
|
|
|
+ and SALES_DAILY = #{salesDaily}
|
|
|
+ </if>
|
|
|
+ <if test="salesMonth != null">
|
|
|
+ and SALES_MONTH = #{salesMonth}
|
|
|
+ </if>
|
|
|
+ <if test="inventoryCurrent != null">
|
|
|
+ and INVENTORY_CURRENT = #{inventoryCurrent}
|
|
|
+ </if>
|
|
|
+ <if test="inventoryStart != null">
|
|
|
+ and INVENTORY_START = #{inventoryStart}
|
|
|
+ </if>
|
|
|
+ <if test="inventoryChange != null">
|
|
|
+ and INVENTORY_CHANGE = #{inventoryChange}
|
|
|
+ </if>
|
|
|
+ <if test="salesPlanMonth != null">
|
|
|
+ and SALES_PLAN_MONTH = #{salesPlanMonth}
|
|
|
+ </if>
|
|
|
+ <if test="schedulePlanMonth != null">
|
|
|
+ and SCHEDULE_PLAN_MONTH = #{schedulePlanMonth}
|
|
|
+ </if>
|
|
|
+ <if test="dates != null">
|
|
|
+ and TO_CHAR(DATES,'yyyy-MM-dd') = #{dates}
|
|
|
+ </if>
|
|
|
+ <if test="companyName != null and companyName != ''">
|
|
|
+ and COMPANY_NAME = #{companyName}
|
|
|
+ </if>
|
|
|
+ <if test="isValid != null">
|
|
|
+ and IS_VALID = #{isValid}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </sql>
|
|
|
+ <sql id="whereLike">
|
|
|
+ <where>
|
|
|
+ <if test="itemId != null">
|
|
|
+ and ITEM_ID = #{itemId}
|
|
|
+ </if>
|
|
|
+ <if test="itemName != null and itemName != ''">
|
|
|
+ and ITEM_NAME LIKE '%${itemName}%'
|
|
|
+ </if>
|
|
|
+ <if test="inStorageDaily != null">
|
|
|
+ and IN_STORAGE_DAILY = #{inStorageDaily}
|
|
|
+ </if>
|
|
|
+ <if test="inStorageMonth != null">
|
|
|
+ and IN_STORAGE_MONTH = #{inStorageMonth}
|
|
|
+ </if>
|
|
|
+ <if test="salesDaily != null">
|
|
|
+ and SALES_DAILY = #{salesDaily}
|
|
|
+ </if>
|
|
|
+ <if test="salesMonth != null">
|
|
|
+ and SALES_MONTH = #{salesMonth}
|
|
|
+ </if>
|
|
|
+ <if test="inventoryCurrent != null">
|
|
|
+ and INVENTORY_CURRENT = #{inventoryCurrent}
|
|
|
+ </if>
|
|
|
+ <if test="inventoryStart != null">
|
|
|
+ and INVENTORY_START = #{inventoryStart}
|
|
|
+ </if>
|
|
|
+ <if test="inventoryChange != null">
|
|
|
+ and INVENTORY_CHANGE = #{inventoryChange}
|
|
|
+ </if>
|
|
|
+ <if test="salesPlanMonth != null">
|
|
|
+ and SALES_PLAN_MONTH = #{salesPlanMonth}
|
|
|
+ </if>
|
|
|
+ <if test="schedulePlanMonth != null">
|
|
|
+ and SCHEDULE_PLAN_MONTH = #{schedulePlanMonth}
|
|
|
+ </if>
|
|
|
+ <if test="dates != null">
|
|
|
+ and TO_CHAR(DATES,'yyyy-MM-dd') = #{dates}
|
|
|
+ </if>
|
|
|
+ <if test="companyName != null and companyName != ''">
|
|
|
+ and COMPANY_NAME LIKE '%${companyName}%'
|
|
|
+ </if>
|
|
|
+ <if test="isValid != null">
|
|
|
+ and IS_VALID = #{isValid}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </sql>
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="DECIMAL">
|
|
|
+ delete from TB_PRODUCT_SUMMARY_DG
|
|
|
+ where ITEM_ID = #{itemId,jdbcType=DECIMAL}
|
|
|
+ </delete>
|
|
|
+ <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
|
|
|
+ delete from TB_PRODUCT_SUMMARY_DG
|
|
|
+ where 1!=1
|
|
|
+ <if test="itemName != null and itemName != ''">
|
|
|
+ or ITEM_NAME = #{itemName}
|
|
|
+ </if>
|
|
|
+ <if test="inStorageDaily != null">
|
|
|
+ or IN_STORAGE_DAILY = #{inStorageDaily}
|
|
|
+ </if>
|
|
|
+ <if test="inStorageMonth != null">
|
|
|
+ or IN_STORAGE_MONTH = #{inStorageMonth}
|
|
|
+ </if>
|
|
|
+ <if test="salesDaily != null">
|
|
|
+ or SALES_DAILY = #{salesDaily}
|
|
|
+ </if>
|
|
|
+ <if test="salesMonth != null">
|
|
|
+ or SALES_MONTH = #{salesMonth}
|
|
|
+ </if>
|
|
|
+ <if test="inventoryCurrent != null">
|
|
|
+ or INVENTORY_CURRENT = #{inventoryCurrent}
|
|
|
+ </if>
|
|
|
+ <if test="inventoryStart != null">
|
|
|
+ or INVENTORY_START = #{inventoryStart}
|
|
|
+ </if>
|
|
|
+ <if test="inventoryChange != null">
|
|
|
+ or INVENTORY_CHANGE = #{inventoryChange}
|
|
|
+ </if>
|
|
|
+ <if test="salesPlanMonth != null">
|
|
|
+ or SALES_PLAN_MONTH = #{salesPlanMonth}
|
|
|
+ </if>
|
|
|
+ <if test="schedulePlanMonth != null">
|
|
|
+ or SCHEDULE_PLAN_MONTH = #{schedulePlanMonth}
|
|
|
+ </if>
|
|
|
+ <if test="dates != null">
|
|
|
+ or TO_CHAR(DATES,'yyyy-MM-dd') = '#{dates}'
|
|
|
+ </if>
|
|
|
+ <if test="companyName != null and companyName != ''">
|
|
|
+ or COMPANY_NAME = #{companyName}
|
|
|
+ </if>
|
|
|
+ <if test="isValid != null">
|
|
|
+ or IS_VALID = #{isValid}
|
|
|
+ </if>
|
|
|
+ </delete>
|
|
|
+ <insert id="insert" parameterType="com.steerinfo.dil.model.TbProductSummaryDg">
|
|
|
+ insert into TB_PRODUCT_SUMMARY_DG (ITEM_ID, ITEM_NAME, IN_STORAGE_DAILY,
|
|
|
+ IN_STORAGE_MONTH, SALES_DAILY, SALES_MONTH,
|
|
|
+ INVENTORY_CURRENT, INVENTORY_START, INVENTORY_CHANGE,
|
|
|
+ SALES_PLAN_MONTH, SCHEDULE_PLAN_MONTH, DATES,
|
|
|
+ COMPANY_NAME, IS_VALID)
|
|
|
+ values (#{itemId,jdbcType=DECIMAL}, #{itemName,jdbcType=VARCHAR}, #{inStorageDaily,jdbcType=DECIMAL},
|
|
|
+ #{inStorageMonth,jdbcType=DECIMAL}, #{salesDaily,jdbcType=DECIMAL}, #{salesMonth,jdbcType=DECIMAL},
|
|
|
+ #{inventoryCurrent,jdbcType=DECIMAL}, #{inventoryStart,jdbcType=DECIMAL}, #{inventoryChange,jdbcType=DECIMAL},
|
|
|
+ #{salesPlanMonth,jdbcType=DECIMAL}, #{schedulePlanMonth,jdbcType=DECIMAL}, #{dates,jdbcType=TIMESTAMP},
|
|
|
+ #{companyName,jdbcType=VARCHAR}, #{isValid,jdbcType=CHAR})
|
|
|
+ </insert>
|
|
|
+ <insert id="insertSelective" parameterType="com.steerinfo.dil.model.TbProductSummaryDg">
|
|
|
+ insert into TB_PRODUCT_SUMMARY_DG
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="itemId != null">
|
|
|
+ ITEM_ID,
|
|
|
+ </if>
|
|
|
+ <if test="itemName != null">
|
|
|
+ ITEM_NAME,
|
|
|
+ </if>
|
|
|
+ <if test="inStorageDaily != null">
|
|
|
+ IN_STORAGE_DAILY,
|
|
|
+ </if>
|
|
|
+ <if test="inStorageMonth != null">
|
|
|
+ IN_STORAGE_MONTH,
|
|
|
+ </if>
|
|
|
+ <if test="salesDaily != null">
|
|
|
+ SALES_DAILY,
|
|
|
+ </if>
|
|
|
+ <if test="salesMonth != null">
|
|
|
+ SALES_MONTH,
|
|
|
+ </if>
|
|
|
+ <if test="inventoryCurrent != null">
|
|
|
+ INVENTORY_CURRENT,
|
|
|
+ </if>
|
|
|
+ <if test="inventoryStart != null">
|
|
|
+ INVENTORY_START,
|
|
|
+ </if>
|
|
|
+ <if test="inventoryChange != null">
|
|
|
+ INVENTORY_CHANGE,
|
|
|
+ </if>
|
|
|
+ <if test="salesPlanMonth != null">
|
|
|
+ SALES_PLAN_MONTH,
|
|
|
+ </if>
|
|
|
+ <if test="schedulePlanMonth != null">
|
|
|
+ SCHEDULE_PLAN_MONTH,
|
|
|
+ </if>
|
|
|
+ <if test="dates != null">
|
|
|
+ DATES,
|
|
|
+ </if>
|
|
|
+ <if test="companyName != null">
|
|
|
+ COMPANY_NAME,
|
|
|
+ </if>
|
|
|
+ <if test="isValid != null">
|
|
|
+ IS_VALID,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="itemId != null">
|
|
|
+ #{itemId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="itemName != null">
|
|
|
+ #{itemName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="inStorageDaily != null">
|
|
|
+ #{inStorageDaily,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="inStorageMonth != null">
|
|
|
+ #{inStorageMonth,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="salesDaily != null">
|
|
|
+ #{salesDaily,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="salesMonth != null">
|
|
|
+ #{salesMonth,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="inventoryCurrent != null">
|
|
|
+ #{inventoryCurrent,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="inventoryStart != null">
|
|
|
+ #{inventoryStart,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="inventoryChange != null">
|
|
|
+ #{inventoryChange,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="salesPlanMonth != null">
|
|
|
+ #{salesPlanMonth,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="schedulePlanMonth != null">
|
|
|
+ #{schedulePlanMonth,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="dates != null">
|
|
|
+ #{dates,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="companyName != null">
|
|
|
+ #{companyName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="isValid != null">
|
|
|
+ #{isValid,jdbcType=CHAR},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.TbProductSummaryDg">
|
|
|
+ update TB_PRODUCT_SUMMARY_DG
|
|
|
+ set ITEM_NAME = #{itemName,jdbcType=VARCHAR},
|
|
|
+ IN_STORAGE_DAILY = #{inStorageDaily,jdbcType=DECIMAL},
|
|
|
+ IN_STORAGE_MONTH = #{inStorageMonth,jdbcType=DECIMAL},
|
|
|
+ SALES_DAILY = #{salesDaily,jdbcType=DECIMAL},
|
|
|
+ SALES_MONTH = #{salesMonth,jdbcType=DECIMAL},
|
|
|
+ INVENTORY_CURRENT = #{inventoryCurrent,jdbcType=DECIMAL},
|
|
|
+ INVENTORY_START = #{inventoryStart,jdbcType=DECIMAL},
|
|
|
+ INVENTORY_CHANGE = #{inventoryChange,jdbcType=DECIMAL},
|
|
|
+ SALES_PLAN_MONTH = #{salesPlanMonth,jdbcType=DECIMAL},
|
|
|
+ SCHEDULE_PLAN_MONTH = #{schedulePlanMonth,jdbcType=DECIMAL},
|
|
|
+ DATES = #{dates,jdbcType=TIMESTAMP},
|
|
|
+ COMPANY_NAME = #{companyName,jdbcType=VARCHAR},
|
|
|
+ IS_VALID = #{isValid,jdbcType=CHAR}
|
|
|
+ where ITEM_ID = #{itemId,jdbcType=DECIMAL}
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.TbProductSummaryDg">
|
|
|
+ update TB_PRODUCT_SUMMARY_DG
|
|
|
+ <set>
|
|
|
+ <if test="itemName != null">
|
|
|
+ ITEM_NAME = #{itemName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="inStorageDaily != null">
|
|
|
+ IN_STORAGE_DAILY = #{inStorageDaily,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="inStorageMonth != null">
|
|
|
+ IN_STORAGE_MONTH = #{inStorageMonth,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="salesDaily != null">
|
|
|
+ SALES_DAILY = #{salesDaily,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="salesMonth != null">
|
|
|
+ SALES_MONTH = #{salesMonth,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="inventoryCurrent != null">
|
|
|
+ INVENTORY_CURRENT = #{inventoryCurrent,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="inventoryStart != null">
|
|
|
+ INVENTORY_START = #{inventoryStart,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="inventoryChange != null">
|
|
|
+ INVENTORY_CHANGE = #{inventoryChange,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="salesPlanMonth != null">
|
|
|
+ SALES_PLAN_MONTH = #{salesPlanMonth,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="schedulePlanMonth != null">
|
|
|
+ SCHEDULE_PLAN_MONTH = #{schedulePlanMonth,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="dates != null">
|
|
|
+ DATES = #{dates,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="companyName != null">
|
|
|
+ COMPANY_NAME = #{companyName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="isValid != null">
|
|
|
+ IS_VALID = #{isValid,jdbcType=CHAR},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where ITEM_ID = #{itemId,jdbcType=DECIMAL}
|
|
|
+ </update>
|
|
|
+ <select id="selectByPrimaryKey" parameterType="DECIMAL" resultMap="BaseResultMap">
|
|
|
+ <include refid="select"/>
|
|
|
+ where ITEM_ID = #{itemId,jdbcType=DECIMAL}
|
|
|
+ </select>
|
|
|
+ <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
|
|
|
+ <include refid="select"/>
|
|
|
+ <include refid="where"/>
|
|
|
+ </select>
|
|
|
+ <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
|
|
|
+ <include refid="select"/>
|
|
|
+ <include refid="whereLike"/>
|
|
|
+ </select>
|
|
|
+ <insert id="batchInsert" parameterType="java.util.List">
|
|
|
+ insert into TB_PRODUCT_SUMMARY_DG
|
|
|
+ (ITEM_ID,
|
|
|
+ ITEM_NAME, IN_STORAGE_DAILY, IN_STORAGE_MONTH,
|
|
|
+ SALES_DAILY, SALES_MONTH, INVENTORY_CURRENT,
|
|
|
+ INVENTORY_START, INVENTORY_CHANGE,
|
|
|
+ SALES_PLAN_MONTH, SCHEDULE_PLAN_MONTH,
|
|
|
+ DATES, COMPANY_NAME, IS_VALID
|
|
|
+ )
|
|
|
+ ( <foreach collection="list" item="item" separator="union all">
|
|
|
+ select
|
|
|
+ #{item.itemId,jdbcType=DECIMAL},
|
|
|
+ #{item.itemName,jdbcType=VARCHAR}, #{item.inStorageDaily,jdbcType=DECIMAL}, #{item.inStorageMonth,jdbcType=DECIMAL},
|
|
|
+ #{item.salesDaily,jdbcType=DECIMAL}, #{item.salesMonth,jdbcType=DECIMAL}, #{item.inventoryCurrent,jdbcType=DECIMAL},
|
|
|
+ #{item.inventoryStart,jdbcType=DECIMAL}, #{item.inventoryChange,jdbcType=DECIMAL},
|
|
|
+ #{item.salesPlanMonth,jdbcType=DECIMAL}, #{item.schedulePlanMonth,jdbcType=DECIMAL},
|
|
|
+ #{item.dates,jdbcType=TIMESTAMP}, #{item.companyName,jdbcType=VARCHAR}, #{item.isValid,jdbcType=CHAR}
|
|
|
+ from dual
|
|
|
+ </foreach> )
|
|
|
+ </insert>
|
|
|
+ <update id="batchUpdate" parameterType="java.util.List">
|
|
|
+ update TB_PRODUCT_SUMMARY_DG
|
|
|
+ set
|
|
|
+ ITEM_ID=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case ITEM_ID" close="end">
|
|
|
+ when #{item.itemId,jdbcType=DECIMAL} then #{item.itemId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,ITEM_NAME=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case ITEM_ID" close="end">
|
|
|
+ when #{item.itemId,jdbcType=DECIMAL} then #{item.itemName,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,IN_STORAGE_DAILY=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case ITEM_ID" close="end">
|
|
|
+ when #{item.itemId,jdbcType=DECIMAL} then #{item.inStorageDaily,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,IN_STORAGE_MONTH=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case ITEM_ID" close="end">
|
|
|
+ when #{item.itemId,jdbcType=DECIMAL} then #{item.inStorageMonth,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,SALES_DAILY=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case ITEM_ID" close="end">
|
|
|
+ when #{item.itemId,jdbcType=DECIMAL} then #{item.salesDaily,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,SALES_MONTH=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case ITEM_ID" close="end">
|
|
|
+ when #{item.itemId,jdbcType=DECIMAL} then #{item.salesMonth,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,INVENTORY_CURRENT=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case ITEM_ID" close="end">
|
|
|
+ when #{item.itemId,jdbcType=DECIMAL} then #{item.inventoryCurrent,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,INVENTORY_START=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case ITEM_ID" close="end">
|
|
|
+ when #{item.itemId,jdbcType=DECIMAL} then #{item.inventoryStart,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,INVENTORY_CHANGE=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case ITEM_ID" close="end">
|
|
|
+ when #{item.itemId,jdbcType=DECIMAL} then #{item.inventoryChange,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,SALES_PLAN_MONTH=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case ITEM_ID" close="end">
|
|
|
+ when #{item.itemId,jdbcType=DECIMAL} then #{item.salesPlanMonth,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,SCHEDULE_PLAN_MONTH=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case ITEM_ID" close="end">
|
|
|
+ when #{item.itemId,jdbcType=DECIMAL} then #{item.schedulePlanMonth,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,DATES=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case ITEM_ID" close="end">
|
|
|
+ when #{item.itemId,jdbcType=DECIMAL} then #{item.dates,jdbcType=TIMESTAMP}
|
|
|
+ </foreach>
|
|
|
+ ,COMPANY_NAME=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case ITEM_ID" close="end">
|
|
|
+ when #{item.itemId,jdbcType=DECIMAL} then #{item.companyName,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,IS_VALID=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case ITEM_ID" close="end">
|
|
|
+ when #{item.itemId,jdbcType=DECIMAL} then #{item.isValid,jdbcType=CHAR}
|
|
|
+ </foreach>
|
|
|
+ where ITEM_ID in
|
|
|
+ <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
|
|
|
+ #{item.itemId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ </update>
|
|
|
+ <delete id="batchDelete" parameterType="java.util.List">
|
|
|
+ delete from TB_PRODUCT_SUMMARY_DG
|
|
|
+ where ITEM_ID in
|
|
|
+ <foreach collection="list" item="id" open="(" close=")" separator=",">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+ <!-- 友情提示!!!-->
|
|
|
+ <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
|
|
|
+
|
|
|
+</mapper>
|