|
|
@ -1,82 +1,93 @@
|
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<?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">
|
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
<mapper namespace="com.glxp.sale.admin.dao.inventory.InvCountOrderDetailMapper">
|
|
|
|
<mapper namespace="com.glxp.api.admin.dao.inventory.InvCountOrderDetailDao">
|
|
|
|
<resultMap id="BaseResultMap" type="com.glxp.sale.admin.entity.inventory.InvCountOrderDetail">
|
|
|
|
<resultMap id="BaseResultMap" type="com.glxp.api.admin.entity.inventory.InvCountOrderDetail">
|
|
|
|
<!--@mbg.generated-->
|
|
|
|
|
|
|
|
<!--@Table inv_count_order_detail-->
|
|
|
|
|
|
|
|
<id column="id" jdbcType="INTEGER" property="id"/>
|
|
|
|
<id column="id" jdbcType="INTEGER" property="id"/>
|
|
|
|
<result column="orderIdFk" jdbcType="VARCHAR" property="orderidfk" />
|
|
|
|
<result column="orderIdFk" jdbcType="VARCHAR" property="orderIdFk"/>
|
|
|
|
<result column="productId" jdbcType="VARCHAR" property="productid" />
|
|
|
|
<result column="productId" jdbcType="VARCHAR" property="productId"/>
|
|
|
|
<result column="batchNo" jdbcType="VARCHAR" property="batchno" />
|
|
|
|
<result column="batchNo" jdbcType="VARCHAR" property="batchNo"/>
|
|
|
|
<result column="produceDate" jdbcType="TIMESTAMP" property="producedate" />
|
|
|
|
<result column="produceDate" jdbcType="TIMESTAMP" property="produceDate"/>
|
|
|
|
<result column="expireDate" jdbcType="TIMESTAMP" property="expiredate" />
|
|
|
|
<result column="expireDate" jdbcType="TIMESTAMP" property="expireDate"/>
|
|
|
|
<result column="serialNo" jdbcType="VARCHAR" property="serialno" />
|
|
|
|
<result column="serialNo" jdbcType="VARCHAR" property="serialNo"/>
|
|
|
|
<result column="countNum" jdbcType="INTEGER" property="countnum" />
|
|
|
|
<result column="countNum" jdbcType="INTEGER" property="countNum"/>
|
|
|
|
<result column="bookNum" jdbcType="INTEGER" property="booknum" />
|
|
|
|
<result column="bookNum" jdbcType="INTEGER" property="bookNum"/>
|
|
|
|
<result column="profitNum" jdbcType="INTEGER" property="profitnum" />
|
|
|
|
<result column="profitNum" jdbcType="INTEGER" property="profitNum"/>
|
|
|
|
<result column="lossNum" jdbcType="INTEGER" property="lossnum" />
|
|
|
|
<result column="lossNum" jdbcType="INTEGER" property="lossNum"/>
|
|
|
|
<result column="status" jdbcType="BOOLEAN" property="status"/>
|
|
|
|
<result column="status" jdbcType="BOOLEAN" property="status"/>
|
|
|
|
</resultMap>
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
|
|
<sql id="Base_Column_List">
|
|
|
|
<sql id="Base_Column_List">
|
|
|
|
<!--@mbg.generated-->
|
|
|
|
id,
|
|
|
|
id, orderIdFk, productId, batchNo, produceDate, expireDate, serialNo, countNum, bookNum,
|
|
|
|
orderIdFk,
|
|
|
|
profitNum, lossNum, `status`
|
|
|
|
productId,
|
|
|
|
|
|
|
|
batchNo,
|
|
|
|
|
|
|
|
produceDate,
|
|
|
|
|
|
|
|
expireDate,
|
|
|
|
|
|
|
|
serialNo,
|
|
|
|
|
|
|
|
countNum,
|
|
|
|
|
|
|
|
bookNum,
|
|
|
|
|
|
|
|
profitNum,
|
|
|
|
|
|
|
|
lossNum,
|
|
|
|
|
|
|
|
`status`
|
|
|
|
</sql>
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
|
|
<!--@mbg.generated-->
|
|
|
|
|
|
|
|
select
|
|
|
|
select
|
|
|
|
<include refid="Base_Column_List"/>
|
|
|
|
<include refid="Base_Column_List"/>
|
|
|
|
from inv_count_order_detail
|
|
|
|
from inv_count_order_detail
|
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
|
|
<!--@mbg.generated-->
|
|
|
|
delete
|
|
|
|
delete from inv_count_order_detail
|
|
|
|
from inv_count_order_detail
|
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
|
</delete>
|
|
|
|
</delete>
|
|
|
|
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.glxp.sale.admin.entity.inventory.InvCountOrderDetail" useGeneratedKeys="true">
|
|
|
|
|
|
|
|
<!--@mbg.generated-->
|
|
|
|
<insert id="insert" keyColumn="id" keyProperty="id"
|
|
|
|
|
|
|
|
parameterType="com.glxp.api.admin.entity.inventory.InvCountOrderDetail" useGeneratedKeys="true">
|
|
|
|
insert into inv_count_order_detail (orderIdFk, productId, batchNo,
|
|
|
|
insert into inv_count_order_detail (orderIdFk, productId, batchNo,
|
|
|
|
produceDate, expireDate, serialNo,
|
|
|
|
produceDate, expireDate, serialNo,
|
|
|
|
countNum, bookNum, profitNum,
|
|
|
|
countNum, bookNum, profitNum,
|
|
|
|
lossNum, `status`)
|
|
|
|
lossNum, `status`)
|
|
|
|
values (#{orderidfk,jdbcType=VARCHAR}, #{productid,jdbcType=VARCHAR}, #{batchno,jdbcType=VARCHAR},
|
|
|
|
values (#{orderIdFk,jdbcType=VARCHAR}, #{productId,jdbcType=VARCHAR}, #{batchNo,jdbcType=VARCHAR},
|
|
|
|
#{producedate,jdbcType=TIMESTAMP}, #{expiredate,jdbcType=TIMESTAMP}, #{serialno,jdbcType=VARCHAR},
|
|
|
|
#{produceDate,jdbcType=TIMESTAMP}, #{expireDate,jdbcType=TIMESTAMP}, #{serialNo,jdbcType=VARCHAR},
|
|
|
|
#{countnum,jdbcType=INTEGER}, #{booknum,jdbcType=INTEGER}, #{profitnum,jdbcType=INTEGER},
|
|
|
|
#{countNum,jdbcType=INTEGER}, #{bookNum,jdbcType=INTEGER}, #{profitNum,jdbcType=INTEGER},
|
|
|
|
#{lossnum,jdbcType=INTEGER}, #{status,jdbcType=BOOLEAN})
|
|
|
|
#{lossNum,jdbcType=INTEGER}, #{status,jdbcType=BOOLEAN})
|
|
|
|
</insert>
|
|
|
|
</insert>
|
|
|
|
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.glxp.sale.admin.entity.inventory.InvCountOrderDetail" useGeneratedKeys="true">
|
|
|
|
|
|
|
|
<!--@mbg.generated-->
|
|
|
|
<insert id="insertSelective" keyColumn="id" keyProperty="id"
|
|
|
|
|
|
|
|
parameterType="com.glxp.api.admin.entity.inventory.InvCountOrderDetail" useGeneratedKeys="true">
|
|
|
|
insert into inv_count_order_detail
|
|
|
|
insert into inv_count_order_detail
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
<if test="orderidfk != null">
|
|
|
|
<if test="orderIdFk != null">
|
|
|
|
orderIdFk,
|
|
|
|
orderIdFk,
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="productid != null">
|
|
|
|
<if test="productId != null">
|
|
|
|
productId,
|
|
|
|
productId,
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="batchno != null">
|
|
|
|
<if test="batchNo != null">
|
|
|
|
batchNo,
|
|
|
|
batchNo,
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="producedate != null">
|
|
|
|
<if test="produceDate != null">
|
|
|
|
produceDate,
|
|
|
|
produceDate,
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="expiredate != null">
|
|
|
|
<if test="expireDate != null">
|
|
|
|
expireDate,
|
|
|
|
expireDate,
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="serialno != null">
|
|
|
|
<if test="serialNo != null">
|
|
|
|
serialNo,
|
|
|
|
serialNo,
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="countnum != null">
|
|
|
|
<if test="countNum != null">
|
|
|
|
countNum,
|
|
|
|
countNum,
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="booknum != null">
|
|
|
|
<if test="bookNum != null">
|
|
|
|
bookNum,
|
|
|
|
bookNum,
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="profitnum != null">
|
|
|
|
<if test="profitNum != null">
|
|
|
|
profitNum,
|
|
|
|
profitNum,
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="lossnum != null">
|
|
|
|
<if test="lossNum != null">
|
|
|
|
lossNum,
|
|
|
|
lossNum,
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="status != null">
|
|
|
|
<if test="status != null">
|
|
|
@ -84,74 +95,74 @@
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
</trim>
|
|
|
|
</trim>
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
<if test="orderidfk != null">
|
|
|
|
<if test="orderIdFk != null">
|
|
|
|
#{orderidfk,jdbcType=VARCHAR},
|
|
|
|
#{orderIdFk,jdbcType=VARCHAR},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="productid != null">
|
|
|
|
<if test="productId != null">
|
|
|
|
#{productid,jdbcType=VARCHAR},
|
|
|
|
#{productId,jdbcType=VARCHAR},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="batchno != null">
|
|
|
|
<if test="batchNo != null">
|
|
|
|
#{batchno,jdbcType=VARCHAR},
|
|
|
|
#{batchNo,jdbcType=VARCHAR},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="producedate != null">
|
|
|
|
<if test="produceDate != null">
|
|
|
|
#{producedate,jdbcType=TIMESTAMP},
|
|
|
|
#{produceDate,jdbcType=TIMESTAMP},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="expiredate != null">
|
|
|
|
<if test="expireDate != null">
|
|
|
|
#{expiredate,jdbcType=TIMESTAMP},
|
|
|
|
#{expireDate,jdbcType=TIMESTAMP},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="serialno != null">
|
|
|
|
<if test="serialNo != null">
|
|
|
|
#{serialno,jdbcType=VARCHAR},
|
|
|
|
#{serialNo,jdbcType=VARCHAR},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="countnum != null">
|
|
|
|
<if test="countNum != null">
|
|
|
|
#{countnum,jdbcType=INTEGER},
|
|
|
|
#{countNum,jdbcType=INTEGER},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="booknum != null">
|
|
|
|
<if test="bookNum != null">
|
|
|
|
#{booknum,jdbcType=INTEGER},
|
|
|
|
#{bookNum,jdbcType=INTEGER},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="profitnum != null">
|
|
|
|
<if test="profitNum != null">
|
|
|
|
#{profitnum,jdbcType=INTEGER},
|
|
|
|
#{profitNum,jdbcType=INTEGER},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="lossnum != null">
|
|
|
|
<if test="lossNum != null">
|
|
|
|
#{lossnum,jdbcType=INTEGER},
|
|
|
|
#{lossNum,jdbcType=INTEGER},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="status != null">
|
|
|
|
<if test="status != null">
|
|
|
|
#{status,jdbcType=BOOLEAN},
|
|
|
|
#{status,jdbcType=BOOLEAN},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
</trim>
|
|
|
|
</trim>
|
|
|
|
</insert>
|
|
|
|
</insert>
|
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.glxp.sale.admin.entity.inventory.InvCountOrderDetail">
|
|
|
|
|
|
|
|
<!--@mbg.generated-->
|
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.glxp.api.admin.entity.inventory.InvCountOrderDetail">
|
|
|
|
update inv_count_order_detail
|
|
|
|
update inv_count_order_detail
|
|
|
|
<set>
|
|
|
|
<set>
|
|
|
|
<if test="orderidfk != null">
|
|
|
|
<if test="orderIdFk != null">
|
|
|
|
orderIdFk = #{orderidfk,jdbcType=VARCHAR},
|
|
|
|
orderIdFk = #{orderIdFk,jdbcType=VARCHAR},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="productid != null">
|
|
|
|
<if test="productId != null">
|
|
|
|
productId = #{productid,jdbcType=VARCHAR},
|
|
|
|
productId = #{productId,jdbcType=VARCHAR},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="batchno != null">
|
|
|
|
<if test="batchNo != null">
|
|
|
|
batchNo = #{batchno,jdbcType=VARCHAR},
|
|
|
|
batchNo = #{batchNo,jdbcType=VARCHAR},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="producedate != null">
|
|
|
|
<if test="produceDate != null">
|
|
|
|
produceDate = #{producedate,jdbcType=TIMESTAMP},
|
|
|
|
produceDate = #{produceDate,jdbcType=TIMESTAMP},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="expiredate != null">
|
|
|
|
<if test="expireDate != null">
|
|
|
|
expireDate = #{expiredate,jdbcType=TIMESTAMP},
|
|
|
|
expireDate = #{expireDate,jdbcType=TIMESTAMP},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="serialno != null">
|
|
|
|
<if test="serialNo != null">
|
|
|
|
serialNo = #{serialno,jdbcType=VARCHAR},
|
|
|
|
serialNo = #{serialNo,jdbcType=VARCHAR},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="countnum != null">
|
|
|
|
<if test="countNum != null">
|
|
|
|
countNum = #{countnum,jdbcType=INTEGER},
|
|
|
|
countNum = #{countNum,jdbcType=INTEGER},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="booknum != null">
|
|
|
|
<if test="bookNum != null">
|
|
|
|
bookNum = #{booknum,jdbcType=INTEGER},
|
|
|
|
bookNum = #{bookNum,jdbcType=INTEGER},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="profitnum != null">
|
|
|
|
<if test="profitNum != null">
|
|
|
|
profitNum = #{profitnum,jdbcType=INTEGER},
|
|
|
|
profitNum = #{profitNum,jdbcType=INTEGER},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="lossnum != null">
|
|
|
|
<if test="lossNum != null">
|
|
|
|
lossNum = #{lossnum,jdbcType=INTEGER},
|
|
|
|
lossNum = #{lossNum,jdbcType=INTEGER},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="status != null">
|
|
|
|
<if test="status != null">
|
|
|
|
`status` = #{status,jdbcType=BOOLEAN},
|
|
|
|
`status` = #{status,jdbcType=BOOLEAN},
|
|
|
@ -159,74 +170,74 @@
|
|
|
|
</set>
|
|
|
|
</set>
|
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
|
</update>
|
|
|
|
</update>
|
|
|
|
<update id="updateByPrimaryKey" parameterType="com.glxp.sale.admin.entity.inventory.InvCountOrderDetail">
|
|
|
|
|
|
|
|
<!--@mbg.generated-->
|
|
|
|
<update id="updateByPrimaryKey" parameterType="com.glxp.api.admin.entity.inventory.InvCountOrderDetail">
|
|
|
|
update inv_count_order_detail
|
|
|
|
update inv_count_order_detail
|
|
|
|
set orderIdFk = #{orderidfk,jdbcType=VARCHAR},
|
|
|
|
set orderIdFk = #{orderIdFk,jdbcType=VARCHAR},
|
|
|
|
productId = #{productid,jdbcType=VARCHAR},
|
|
|
|
productId = #{productId,jdbcType=VARCHAR},
|
|
|
|
batchNo = #{batchno,jdbcType=VARCHAR},
|
|
|
|
batchNo = #{batchNo,jdbcType=VARCHAR},
|
|
|
|
produceDate = #{producedate,jdbcType=TIMESTAMP},
|
|
|
|
produceDate = #{produceDate,jdbcType=TIMESTAMP},
|
|
|
|
expireDate = #{expiredate,jdbcType=TIMESTAMP},
|
|
|
|
expireDate = #{expireDate,jdbcType=TIMESTAMP},
|
|
|
|
serialNo = #{serialno,jdbcType=VARCHAR},
|
|
|
|
serialNo = #{serialNo,jdbcType=VARCHAR},
|
|
|
|
countNum = #{countnum,jdbcType=INTEGER},
|
|
|
|
countNum = #{countNum,jdbcType=INTEGER},
|
|
|
|
bookNum = #{booknum,jdbcType=INTEGER},
|
|
|
|
bookNum = #{bookNum,jdbcType=INTEGER},
|
|
|
|
profitNum = #{profitnum,jdbcType=INTEGER},
|
|
|
|
profitNum = #{productId,jdbcType=INTEGER},
|
|
|
|
lossNum = #{lossnum,jdbcType=INTEGER},
|
|
|
|
lossNum = #{lossNum,jdbcType=INTEGER},
|
|
|
|
`status` = #{status,jdbcType=BOOLEAN}
|
|
|
|
`status` = #{status,jdbcType=BOOLEAN}
|
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
|
</update>
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
|
|
<update id="updateBatch" parameterType="java.util.List">
|
|
|
|
<update id="updateBatch" parameterType="java.util.List">
|
|
|
|
<!--@mbg.generated-->
|
|
|
|
|
|
|
|
update inv_count_order_detail
|
|
|
|
update inv_count_order_detail
|
|
|
|
<trim prefix="set" suffixOverrides=",">
|
|
|
|
<trim prefix="set" suffixOverrides=",">
|
|
|
|
<trim prefix="orderIdFk = case" suffix="end,">
|
|
|
|
<trim prefix="orderIdFk = case" suffix="end,">
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.orderidfk,jdbcType=VARCHAR}
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.orderIdFk,jdbcType=VARCHAR}
|
|
|
|
</foreach>
|
|
|
|
</foreach>
|
|
|
|
</trim>
|
|
|
|
</trim>
|
|
|
|
<trim prefix="productId = case" suffix="end,">
|
|
|
|
<trim prefix="productId = case" suffix="end,">
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.productid,jdbcType=VARCHAR}
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.productId,jdbcType=VARCHAR}
|
|
|
|
</foreach>
|
|
|
|
</foreach>
|
|
|
|
</trim>
|
|
|
|
</trim>
|
|
|
|
<trim prefix="batchNo = case" suffix="end,">
|
|
|
|
<trim prefix="batchNo = case" suffix="end,">
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.batchno,jdbcType=VARCHAR}
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.batchNo,jdbcType=VARCHAR}
|
|
|
|
</foreach>
|
|
|
|
</foreach>
|
|
|
|
</trim>
|
|
|
|
</trim>
|
|
|
|
<trim prefix="produceDate = case" suffix="end,">
|
|
|
|
<trim prefix="produceDate = case" suffix="end,">
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.producedate,jdbcType=TIMESTAMP}
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.produceDate,jdbcType=TIMESTAMP}
|
|
|
|
</foreach>
|
|
|
|
</foreach>
|
|
|
|
</trim>
|
|
|
|
</trim>
|
|
|
|
<trim prefix="expireDate = case" suffix="end,">
|
|
|
|
<trim prefix="expireDate = case" suffix="end,">
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.expiredate,jdbcType=TIMESTAMP}
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.expireDate,jdbcType=TIMESTAMP}
|
|
|
|
</foreach>
|
|
|
|
</foreach>
|
|
|
|
</trim>
|
|
|
|
</trim>
|
|
|
|
<trim prefix="serialNo = case" suffix="end,">
|
|
|
|
<trim prefix="serialNo = case" suffix="end,">
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.serialno,jdbcType=VARCHAR}
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.serialNo,jdbcType=VARCHAR}
|
|
|
|
</foreach>
|
|
|
|
</foreach>
|
|
|
|
</trim>
|
|
|
|
</trim>
|
|
|
|
<trim prefix="countNum = case" suffix="end,">
|
|
|
|
<trim prefix="countNum = case" suffix="end,">
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.countnum,jdbcType=INTEGER}
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.countNum,jdbcType=INTEGER}
|
|
|
|
</foreach>
|
|
|
|
</foreach>
|
|
|
|
</trim>
|
|
|
|
</trim>
|
|
|
|
<trim prefix="bookNum = case" suffix="end,">
|
|
|
|
<trim prefix="bookNum = case" suffix="end,">
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.booknum,jdbcType=INTEGER}
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.bookNum,jdbcType=INTEGER}
|
|
|
|
</foreach>
|
|
|
|
</foreach>
|
|
|
|
</trim>
|
|
|
|
</trim>
|
|
|
|
<trim prefix="profitNum = case" suffix="end,">
|
|
|
|
<trim prefix="profitNum = case" suffix="end,">
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.profitnum,jdbcType=INTEGER}
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.profitNum,jdbcType=INTEGER}
|
|
|
|
</foreach>
|
|
|
|
</foreach>
|
|
|
|
</trim>
|
|
|
|
</trim>
|
|
|
|
<trim prefix="lossNum = case" suffix="end,">
|
|
|
|
<trim prefix="lossNum = case" suffix="end,">
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.lossnum,jdbcType=INTEGER}
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.lossNum,jdbcType=INTEGER}
|
|
|
|
</foreach>
|
|
|
|
</foreach>
|
|
|
|
</trim>
|
|
|
|
</trim>
|
|
|
|
<trim prefix="`status` = case" suffix="end,">
|
|
|
|
<trim prefix="`status` = case" suffix="end,">
|
|
|
@ -240,18 +251,17 @@
|
|
|
|
#{item.id,jdbcType=INTEGER}
|
|
|
|
#{item.id,jdbcType=INTEGER}
|
|
|
|
</foreach>
|
|
|
|
</foreach>
|
|
|
|
</update>
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
|
|
<insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true">
|
|
|
|
<insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true">
|
|
|
|
<!--@mbg.generated-->
|
|
|
|
|
|
|
|
insert into inv_count_order_detail
|
|
|
|
insert into inv_count_order_detail
|
|
|
|
(orderIdFk, productId, batchNo, produceDate, expireDate, serialNo, countNum, bookNum,
|
|
|
|
(orderIdFk, productId, batchNo, produceDate, expireDate, serialNo, countNum, bookNum,
|
|
|
|
profitNum, lossNum, `status`)
|
|
|
|
profitNum, lossNum, `status`)
|
|
|
|
values
|
|
|
|
values
|
|
|
|
<foreach collection="list" item="item" separator=",">
|
|
|
|
<foreach collection="list" item="item" separator=",">
|
|
|
|
(#{item.orderidfk,jdbcType=VARCHAR}, #{item.productid,jdbcType=VARCHAR}, #{item.batchno,jdbcType=VARCHAR},
|
|
|
|
(#{item.orderIdFk,jdbcType=VARCHAR}, #{item.productId,jdbcType=VARCHAR}, #{item.batchNo,jdbcType=VARCHAR},
|
|
|
|
#{item.producedate,jdbcType=TIMESTAMP}, #{item.expiredate,jdbcType=TIMESTAMP},
|
|
|
|
#{item.produceDate,jdbcType=TIMESTAMP}, #{item.expireDate,jdbcType=TIMESTAMP},
|
|
|
|
#{item.serialno,jdbcType=VARCHAR}, #{item.countnum,jdbcType=INTEGER}, #{item.booknum,jdbcType=INTEGER},
|
|
|
|
#{item.serialNo,jdbcType=VARCHAR}, #{item.countNum,jdbcType=INTEGER}, #{item.bookNum,jdbcType=INTEGER},
|
|
|
|
#{item.profitnum,jdbcType=INTEGER}, #{item.lossnum,jdbcType=INTEGER}, #{item.status,jdbcType=BOOLEAN}
|
|
|
|
#{item.profitNum,jdbcType=INTEGER}, #{item.lossNum,jdbcType=INTEGER}, #{item.status,jdbcType=BOOLEAN})
|
|
|
|
)
|
|
|
|
|
|
|
|
</foreach>
|
|
|
|
</foreach>
|
|
|
|
</insert>
|
|
|
|
</insert>
|
|
|
|
</mapper>
|
|
|
|
</mapper>
|