|
@@ -8,6 +8,14 @@
|
|
|
item_id, return_id, into_id, into_item_id, pur_id, pur_item_id, item_index, sku_id, item_qty, price_std, amt_std, price_return, item_amt, non_std_code, into_status, intoing_qty, intoing_amt, into_qty, into_amt, remarks, flg_valid, cp_id, op_create_time, op_create_user_id, op_update_time, op_update_user_id, op_app_code, op_timestamp, op_db_user
|
|
item_id, return_id, into_id, into_item_id, pur_id, pur_item_id, item_index, sku_id, item_qty, price_std, amt_std, price_return, item_amt, non_std_code, into_status, intoing_qty, intoing_amt, into_qty, into_amt, remarks, flg_valid, cp_id, op_create_time, op_create_user_id, op_update_time, op_update_user_id, op_app_code, op_timestamp, op_db_user
|
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <sql id="Base_Column_List_Join">
|
|
|
|
|
+ tpiri.item_id, tpiri.return_id, tpiri.into_id, tpiri.into_item_id, tpiri.pur_id, tpiri.pur_item_id, tpiri.item_index, tpiri.sku_id, tpiri.item_qty,
|
|
|
|
|
+ tpiri.price_std,tpiri.amt_std, tpiri.price_return,
|
|
|
|
|
+ tpiri.item_amt, tpiri.non_std_code, tpiri.into_status, tpiri.intoing_qty, tpiri.intoing_amt, tpiri.into_qty, tpiri.into_amt,
|
|
|
|
|
+ tpiri.remarks, tpiri.flg_valid, tpiri.cp_id
|
|
|
|
|
+ </sql>
|
|
|
|
|
+
|
|
|
<!-- 通用查询映射结果 -->
|
|
<!-- 通用查询映射结果 -->
|
|
|
<resultMap id="BaseResultMap" type="com.dk.mdm.model.pojo.ivt.IntoReturnItem">
|
|
<resultMap id="BaseResultMap" type="com.dk.mdm.model.pojo.ivt.IntoReturnItem">
|
|
|
<id column="item_id" property="itemId"/>
|
|
<id column="item_id" property="itemId"/>
|
|
@@ -41,6 +49,37 @@
|
|
|
<result column="op_db_user" property="opDbUser"/>
|
|
<result column="op_db_user" property="opDbUser"/>
|
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
+ <resultMap id="BaseResultMapResponse" type="com.dk.mdm.model.response.ivt.IntoReturnItemResponse">
|
|
|
|
|
+ <id column="item_id" property="itemId"/>
|
|
|
|
|
+ <result column="return_id" property="returnId" typeHandler="UuidTypeHandler"/>
|
|
|
|
|
+ <result column="into_id" property="intoId" typeHandler="UuidTypeHandler"/>
|
|
|
|
|
+ <result column="into_item_id" property="intoItemId" typeHandler="UuidTypeHandler"/>
|
|
|
|
|
+ <result column="pur_id" property="purId" typeHandler="UuidTypeHandler"/>
|
|
|
|
|
+ <result column="pur_item_id" property="purItemId" typeHandler="UuidTypeHandler"/>
|
|
|
|
|
+ <result column="item_index" property="itemIndex"/>
|
|
|
|
|
+ <result column="sku_id" property="skuId" typeHandler="UuidTypeHandler"/>
|
|
|
|
|
+ <result column="item_qty" property="itemQty"/>
|
|
|
|
|
+ <result column="price_std" property="priceStd"/>
|
|
|
|
|
+ <result column="amt_std" property="amtStd"/>
|
|
|
|
|
+ <result column="price_return" property="priceReturn"/>
|
|
|
|
|
+ <result column="item_amt" property="itemAmt"/>
|
|
|
|
|
+ <result column="non_std_code" property="nonStdCode"/>
|
|
|
|
|
+ <result column="into_status" property="intoStatus"/>
|
|
|
|
|
+ <result column="intoing_qty" property="intoingQty"/>
|
|
|
|
|
+ <result column="intoing_amt" property="intoingAmt"/>
|
|
|
|
|
+ <result column="into_qty" property="intoQty"/>
|
|
|
|
|
+ <result column="into_amt" property="intoAmt"/>
|
|
|
|
|
+ <result column="remarks" property="remarks"/>
|
|
|
|
|
+ <result column="flg_valid" property="flgValid"/>
|
|
|
|
|
+ <result column="cp_id" property="cpId"/>
|
|
|
|
|
+ <result column="sku_code" property="skuCode"/>
|
|
|
|
|
+ <result column="sku_name" property="skuName"/>
|
|
|
|
|
+ <result column="sku_model" property="skuModel"/>
|
|
|
|
|
+ <result column="sku_images" property="skuImages"/>
|
|
|
|
|
+
|
|
|
|
|
+ </resultMap>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
<!-- 通用条件列 -->
|
|
<!-- 通用条件列 -->
|
|
|
<sql id="Condition">
|
|
<sql id="Condition">
|
|
|
<where>
|
|
<where>
|
|
@@ -131,6 +170,75 @@
|
|
|
</where>
|
|
</where>
|
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
+ <sql id="Condition_Join">
|
|
|
|
|
+ <where>
|
|
|
|
|
+ <if test="returnId != null and returnId != ''">
|
|
|
|
|
+ AND tpiri.return_id = #{returnId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="intoId != null and intoId != ''">
|
|
|
|
|
+ AND tpiri.into_id = #{intoId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="intoItemId != null and intoItemId != ''">
|
|
|
|
|
+ AND tpiri.into_item_id = #{intoItemId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="purId != null and purId != ''">
|
|
|
|
|
+ AND tpiri.pur_id = #{purId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="purItemId != null and purItemId != ''">
|
|
|
|
|
+ AND tpiri.pur_item_id = #{purItemId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="itemIndex != null">
|
|
|
|
|
+ AND tpiri.item_index = #{itemIndex}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="skuId != null and skuId != ''">
|
|
|
|
|
+ AND tpiri.sku_id = #{skuId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="itemQty != null">
|
|
|
|
|
+ AND tpiri.item_qty = #{itemQty}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="priceStd != null">
|
|
|
|
|
+ AND tpiri.price_std = #{priceStd}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="amtStd != null">
|
|
|
|
|
+ AND tpiri.amt_std = #{amtStd}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="priceReturn != null">
|
|
|
|
|
+ AND tpiri.price_return = #{priceReturn}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="itemAmt != null">
|
|
|
|
|
+ AND tpiri.item_amt = #{itemAmt}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="nonStdCode != null and nonStdCode != ''">
|
|
|
|
|
+ AND tpiri.non_std_code = #{nonStdCode}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="intoStatus != null and intoStatus != ''">
|
|
|
|
|
+ AND tpiri.into_status = #{intoStatus}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="intoingQty != null">
|
|
|
|
|
+ AND tpiri.intoing_qty = #{intoingQty}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="intoingAmt != null">
|
|
|
|
|
+ AND tpiri.intoing_amt = #{intoingAmt}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="intoQty != null">
|
|
|
|
|
+ AND tpiri.into_qty = #{intoQty}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="intoAmt != null">
|
|
|
|
|
+ AND tpiri.into_amt = #{intoAmt}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="remarks != null and remarks != ''">
|
|
|
|
|
+ AND tpiri.remarks = #{remarks}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="flgValid != null">
|
|
|
|
|
+ AND tpiri.flg_valid = #{flgValid}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="cpId != null">
|
|
|
|
|
+ AND tpiri.cp_id = #{cpId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ </where>
|
|
|
|
|
+ </sql>
|
|
|
|
|
+
|
|
|
<sql id="idsForeach">
|
|
<sql id="idsForeach">
|
|
|
<!-- 根据主键itemId批量操作 -->
|
|
<!-- 根据主键itemId批量操作 -->
|
|
|
WHERE item_id in
|
|
WHERE item_id in
|
|
@@ -140,11 +248,16 @@
|
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
|
|
<!-- 查询表t_psi_into_return_item,(条件查询+分页)列表 -->
|
|
<!-- 查询表t_psi_into_return_item,(条件查询+分页)列表 -->
|
|
|
- <select id="selectByCond" resultMap="BaseResultMap">
|
|
|
|
|
|
|
+ <select id="selectByCond" resultMap="BaseResultMapResponse">
|
|
|
SELECT
|
|
SELECT
|
|
|
- <include refid="Base_Column_List"/>
|
|
|
|
|
- FROM t_psi_into_return_item
|
|
|
|
|
- <include refid="Condition"/>
|
|
|
|
|
|
|
+ <include refid="Base_Column_List_Join"/>,
|
|
|
|
|
+ tmgs.sku_code AS sku_code,
|
|
|
|
|
+ tmgs.sku_name AS sku_name,
|
|
|
|
|
+ tmgs.sku_model AS sku_model,
|
|
|
|
|
+ tmgs.sku_images AS sku_images
|
|
|
|
|
+ FROM dkic_b.t_psi_into_return_item tpiri
|
|
|
|
|
+ left join dkic_b.t_mst_goods_sku tmgs on tmgs.sku_id = tpiri.sku_id
|
|
|
|
|
+ <include refid="Condition_Join"/>
|
|
|
<if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
|
|
<if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
|
|
|
limit #{end} offset #{start}
|
|
limit #{end} offset #{start}
|
|
|
</if>
|
|
</if>
|
|
@@ -154,8 +267,8 @@
|
|
|
<select id="countByCond" resultType="Long">
|
|
<select id="countByCond" resultType="Long">
|
|
|
SELECT
|
|
SELECT
|
|
|
count(1)
|
|
count(1)
|
|
|
- FROM t_psi_into_return_item
|
|
|
|
|
- <include refid="Condition"/>
|
|
|
|
|
|
|
+ FROM t_psi_into_return_item tpiri
|
|
|
|
|
+ <include refid="Condition_Join"/>
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
<!-- 根据主键查询表t_psi_into_return_item的一行数据 -->
|
|
<!-- 根据主键查询表t_psi_into_return_item的一行数据 -->
|