|
@@ -1,29 +1,35 @@
|
|
<?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.iamberry.rst.service.approval.mapper.ApplyPickItemMapper">
|
|
<mapper namespace="com.iamberry.rst.service.approval.mapper.ApplyPickItemMapper">
|
|
- <resultMap id="BaseResultMap" type="ApplyPickItem" >
|
|
|
|
|
|
+ <resultMap id="BaseResultMap" type="ApprovalApplyPickItem" >
|
|
<result column="apply_item_id" property="applyItemId" />
|
|
<result column="apply_item_id" property="applyItemId" />
|
|
<result column="apply_pick_id" property="applyPickId" />
|
|
<result column="apply_pick_id" property="applyPickId" />
|
|
- <result column="apply_item_product_id" property="applyItemProductId" />
|
|
|
|
- <result column="apply_item_color_id" property="applyItemColorId" />
|
|
|
|
- <result column="apply_item_product_name" property="applyItemProductName" />
|
|
|
|
- <result column="apply_item_color_name" property="applyItemColorName" />
|
|
|
|
- <result column="apply_item_product_num" property="applyItemProductNum" />
|
|
|
|
- <result column="apply_item_create_time" property="applyItemCreateTime" />
|
|
|
|
- <result column="apply_item_update_time" property="applyItemUpdateTime" />
|
|
|
|
|
|
+ <result column="product_id" property="productId" />
|
|
|
|
+ <result column="item_product_name" property="itemProductName" />
|
|
|
|
+ <result column="item_color_name" property="itemColorName" />
|
|
|
|
+ <result column="item_product_num" property="itemProductNum" />
|
|
|
|
+ <result column="item_brand_name" property="itemBrandName" />
|
|
|
|
+ <result column="item_product_model" property="itemProductModel" />
|
|
|
|
+ <result column="item_product_unit" property="itemProductUnit" />
|
|
|
|
+ <result column="item_product_box_number" property="itemProductBoxNumber" />
|
|
|
|
+ <result column="item_create_time" property="itemCreateTime" />
|
|
|
|
+ <result column="item_update_time" property="itemUpdateTime" />
|
|
</resultMap>
|
|
</resultMap>
|
|
<sql id="Base_List" >
|
|
<sql id="Base_List" >
|
|
t.apply_item_id,
|
|
t.apply_item_id,
|
|
t.apply_pick_id,
|
|
t.apply_pick_id,
|
|
- t.apply_item_product_id,
|
|
|
|
- t.apply_item_color_id,
|
|
|
|
- t.apply_item_product_name,
|
|
|
|
- t.apply_item_color_name,
|
|
|
|
- t.apply_item_product_num,
|
|
|
|
- t.apply_item_create_time,
|
|
|
|
- t.apply_item_update_time
|
|
|
|
|
|
+ t.product_id,
|
|
|
|
+ t.item_product_name,
|
|
|
|
+ t.item_color_name,
|
|
|
|
+ t.item_product_num,
|
|
|
|
+ t.item_brand_name,
|
|
|
|
+ t.item_product_model,
|
|
|
|
+ t.item_product_unit,
|
|
|
|
+ t.item_product_box_number,
|
|
|
|
+ t.item_create_time,
|
|
|
|
+ t.item_update_time
|
|
</sql>
|
|
</sql>
|
|
- <select id="getApplyPickItemList" resultMap="BaseResultMap" parameterType="ApplyPickItem" >
|
|
|
|
|
|
+ <select id="getApprovalApplyPickItemList" resultMap="BaseResultMap" parameterType="ApprovalApplyPickItem" >
|
|
select
|
|
select
|
|
<include refid="Base_List" />
|
|
<include refid="Base_List" />
|
|
from tb_rst_approval_apply_pick_item t
|
|
from tb_rst_approval_apply_pick_item t
|
|
@@ -34,62 +40,86 @@
|
|
<if test="applyPickId != null ">
|
|
<if test="applyPickId != null ">
|
|
AND t.apply_pick_id = #{applyPickId}
|
|
AND t.apply_pick_id = #{applyPickId}
|
|
</if >
|
|
</if >
|
|
- <if test="applyItemProductId != null ">
|
|
|
|
- AND t.apply_item_product_id = #{applyItemProductId}
|
|
|
|
|
|
+ <if test="productId != null ">
|
|
|
|
+ AND t.product_id = #{productId}
|
|
</if >
|
|
</if >
|
|
- <if test="applyItemColorId != null ">
|
|
|
|
- AND t.apply_item_color_id = #{applyItemColorId}
|
|
|
|
|
|
+ <if test="itemProductName != null and itemProductName != ''">
|
|
|
|
+ AND t.item_product_name like CONCAT ('%',#{itemProductName},'%')
|
|
|
|
+ </if >
|
|
|
|
+ <if test="itemColorName != null and itemColorName != ''">
|
|
|
|
+ AND t.item_color_name like CONCAT ('%',#{itemColorName},'%')
|
|
|
|
+ </if >
|
|
|
|
+ <if test="itemProductNum != null ">
|
|
|
|
+ AND t.item_product_num = #{itemProductNum}
|
|
|
|
+ </if >
|
|
|
|
+ <if test="itemProductBoxNumber != null ">
|
|
|
|
+ AND t.item_product_box_number = #{itemProductBoxNumber}
|
|
</if >
|
|
</if >
|
|
</where>
|
|
</where>
|
|
</select>
|
|
</select>
|
|
- <select id="getApplyPickItemById" resultMap="BaseResultMap" parameterType="Integer" >
|
|
|
|
|
|
+ <select id="getApprovalApplyPickItemById" resultMap="BaseResultMap" parameterType="Integer" >
|
|
select
|
|
select
|
|
<include refid="Base_List" />
|
|
<include refid="Base_List" />
|
|
from tb_rst_approval_apply_pick_item t
|
|
from tb_rst_approval_apply_pick_item t
|
|
where t.apply_item_id= #{applyItemId}
|
|
where t.apply_item_id= #{applyItemId}
|
|
</select>
|
|
</select>
|
|
- <insert id="save" parameterType="ApplyPickItem" >
|
|
|
|
|
|
+ <insert id="save" parameterType="ApprovalApplyPickItem" >
|
|
insert into
|
|
insert into
|
|
tb_rst_approval_apply_pick_item
|
|
tb_rst_approval_apply_pick_item
|
|
(
|
|
(
|
|
apply_pick_id,
|
|
apply_pick_id,
|
|
- apply_item_product_id,
|
|
|
|
- apply_item_color_id,
|
|
|
|
- apply_item_product_name,
|
|
|
|
- apply_item_color_name,
|
|
|
|
- apply_item_product_num
|
|
|
|
|
|
+ product_id,
|
|
|
|
+ item_product_name,
|
|
|
|
+ item_color_name,
|
|
|
|
+ item_product_num,
|
|
|
|
+ item_brand_name,
|
|
|
|
+ item_product_model,
|
|
|
|
+ item_product_unit,
|
|
|
|
+ item_product_box_number
|
|
)
|
|
)
|
|
values
|
|
values
|
|
(
|
|
(
|
|
#{applyPickId},
|
|
#{applyPickId},
|
|
- #{applyItemProductId},
|
|
|
|
- #{applyItemColorId},
|
|
|
|
- #{applyItemProductName},
|
|
|
|
- #{applyItemColorName},
|
|
|
|
- #{applyItemProductNum}
|
|
|
|
|
|
+ #{productId},
|
|
|
|
+ #{itemProductName},
|
|
|
|
+ #{itemColorName},
|
|
|
|
+ #{itemProductNum},
|
|
|
|
+ #{itemBrandName},
|
|
|
|
+ #{itemProductModel},
|
|
|
|
+ #{itemProductUnit},
|
|
|
|
+ #{itemProductBoxNumber}
|
|
)
|
|
)
|
|
</insert>
|
|
</insert>
|
|
- <update id="update" parameterType="ApplyPickItem" >
|
|
|
|
|
|
+ <update id="update" parameterType="ApprovalApplyPickItem" >
|
|
update
|
|
update
|
|
tb_rst_approval_apply_pick_item
|
|
tb_rst_approval_apply_pick_item
|
|
<set >
|
|
<set >
|
|
<if test="applyPickId != null ">
|
|
<if test="applyPickId != null ">
|
|
apply_pick_id = #{applyPickId},
|
|
apply_pick_id = #{applyPickId},
|
|
</if >
|
|
</if >
|
|
- <if test="applyItemProductId != null ">
|
|
|
|
- apply_item_product_id = #{applyItemProductId},
|
|
|
|
|
|
+ <if test="productId != null ">
|
|
|
|
+ product_id = #{productId},
|
|
|
|
+ </if >
|
|
|
|
+ <if test="itemProductName != null and itemProductName != ''">
|
|
|
|
+ item_product_name = #{itemProductName},
|
|
|
|
+ </if >
|
|
|
|
+ <if test="itemColorName != null and itemColorName != ''">
|
|
|
|
+ item_color_name = #{itemColorName},
|
|
|
|
+ </if >
|
|
|
|
+ <if test="itemProductNum != null ">
|
|
|
|
+ item_product_num = #{itemProductNum},
|
|
</if >
|
|
</if >
|
|
- <if test="applyItemColorId != null ">
|
|
|
|
- apply_item_color_id = #{applyItemColorId},
|
|
|
|
|
|
+ <if test="itemBrandName != null and itemBrandName != ''">
|
|
|
|
+ item_brand_name = #{itemBrandName},
|
|
</if >
|
|
</if >
|
|
- <if test="applyItemProductName != null and applyItemProductName != ''">
|
|
|
|
- apply_item_product_name = #{applyItemProductName},
|
|
|
|
|
|
+ <if test="itemProductModel != null and itemProductModel != ''">
|
|
|
|
+ item_product_model = #{itemProductModel},
|
|
</if >
|
|
</if >
|
|
- <if test="applyItemColorName != null and applyItemColorName != ''">
|
|
|
|
- apply_item_color_name = #{applyItemColorName},
|
|
|
|
|
|
+ <if test="itemProductUnit != null and itemProductUnit != ''">
|
|
|
|
+ item_product_unit = #{itemProductUnit},
|
|
</if >
|
|
</if >
|
|
- <if test="applyItemProductNum != null ">
|
|
|
|
- apply_item_product_num = #{applyItemProductNum},
|
|
|
|
|
|
+ <if test="itemProductBoxNumber != null ">
|
|
|
|
+ item_product_box_number = #{itemProductBoxNumber},
|
|
</if >
|
|
</if >
|
|
</set >
|
|
</set >
|
|
where apply_item_id= #{applyItemId}
|
|
where apply_item_id= #{applyItemId}
|