|
@@ -5,45 +5,122 @@
|
|
|
<!-- 通用设置 -->
|
|
<!-- 通用设置 -->
|
|
|
<!-- 通用查询列 -->
|
|
<!-- 通用查询列 -->
|
|
|
<sql id="Base_Column_List">
|
|
<sql id="Base_Column_List">
|
|
|
- into_id, into_no, into_type, from_id, from_no, org_id, staff_id, cus_id, sup_id, into_status, intoing_qty, intoing_amt, into_qty, into_amt, return_qty, return_amt, into_date, remarks, annex_paths, make_staff, make_time, receivable_id, payable_id, 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
|
|
|
|
|
|
|
+ into_id
|
|
|
|
|
+ , into_no, into_type, from_id, from_no, org_id, staff_id, cus_id, sup_id, into_status, intoing_qty, intoing_amt, into_qty, into_amt, return_qty, return_amt, into_date, remarks, annex_paths, make_staff, make_time, receivable_id, payable_id, 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>
|
|
|
|
|
|
|
|
<!-- 通用查询映射结果 -->
|
|
<!-- 通用查询映射结果 -->
|
|
|
<resultMap id="BaseResultMap" type="com.dk.mdm.model.response.ivt.InboundResponse">
|
|
<resultMap id="BaseResultMap" type="com.dk.mdm.model.response.ivt.InboundResponse">
|
|
|
<id column="into_id" property="intoId"/>
|
|
<id column="into_id" property="intoId"/>
|
|
|
- <result column="into_no" property="intoNo"/>
|
|
|
|
|
- <result column="into_type" property="intoType"/>
|
|
|
|
|
- <result column="from_id" property="fromId" typeHandler="UuidTypeHandler"/>
|
|
|
|
|
- <result column="from_no" property="fromNo"/>
|
|
|
|
|
- <result column="org_id" property="orgId" typeHandler="UuidTypeHandler"/>
|
|
|
|
|
- <result column="staff_id" property="staffId" typeHandler="UuidTypeHandler"/>
|
|
|
|
|
- <result column="cus_id" property="cusId" typeHandler="UuidTypeHandler"/>
|
|
|
|
|
- <result column="sup_id" property="supId" typeHandler="UuidTypeHandler"/>
|
|
|
|
|
- <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="return_qty" property="returnQty"/>
|
|
|
|
|
- <result column="return_amt" property="returnAmt"/>
|
|
|
|
|
- <result column="into_date" property="intoDate" typeHandler="TimestampTypeHandler"/>
|
|
|
|
|
- <result column="remarks" property="remarks"/>
|
|
|
|
|
- <result column="annex_paths" property="annexPaths" typeHandler="JsonTypeHandler"/>
|
|
|
|
|
- <result column="make_staff" property="makeStaff" typeHandler="UuidTypeHandler"/>
|
|
|
|
|
- <result column="make_time" property="makeTime" typeHandler="TimestampTypeHandler"/>
|
|
|
|
|
- <result column="receivable_id" property="receivableId" typeHandler="UuidTypeHandler"/>
|
|
|
|
|
- <result column="payable_id" property="payableId" typeHandler="UuidTypeHandler"/>
|
|
|
|
|
- <result column="flg_valid" property="flgValid"/>
|
|
|
|
|
- <result column="cp_id" property="cpId"/>
|
|
|
|
|
- <result column="op_create_time" property="opCreateTime" typeHandler="TimestampTypeHandler"/>
|
|
|
|
|
- <result column="op_create_user_id" property="opCreateUserId" typeHandler="UuidTypeHandler"/>
|
|
|
|
|
- <result column="op_update_time" property="opUpdateTime" typeHandler="TimestampTypeHandler"/>
|
|
|
|
|
- <result column="op_update_user_id" property="opUpdateUserId" typeHandler="UuidTypeHandler"/>
|
|
|
|
|
- <result column="op_app_code" property="opAppCode"/>
|
|
|
|
|
- <result column="op_timestamp" property="opTimestamp" typeHandler="TimestampTypeHandler"/>
|
|
|
|
|
- <result column="op_db_user" property="opDbUser"/>
|
|
|
|
|
|
|
+ <result column="into_no" property="intoNo"/>
|
|
|
|
|
+ <result column="into_type" property="intoType"/>
|
|
|
|
|
+ <result column="from_id" property="fromId" typeHandler="UuidTypeHandler"/>
|
|
|
|
|
+ <result column="from_no" property="fromNo"/>
|
|
|
|
|
+ <result column="org_id" property="orgId" typeHandler="UuidTypeHandler"/>
|
|
|
|
|
+ <result column="staff_id" property="staffId" typeHandler="UuidTypeHandler"/>
|
|
|
|
|
+ <result column="cus_id" property="cusId" typeHandler="UuidTypeHandler"/>
|
|
|
|
|
+ <result column="sup_id" property="supId" typeHandler="UuidTypeHandler"/>
|
|
|
|
|
+ <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="return_qty" property="returnQty"/>
|
|
|
|
|
+ <result column="return_amt" property="returnAmt"/>
|
|
|
|
|
+ <result column="into_date" property="intoDate" typeHandler="TimestampTypeHandler"/>
|
|
|
|
|
+ <result column="remarks" property="remarks"/>
|
|
|
|
|
+ <result column="annex_paths" property="annexPaths" typeHandler="JsonTypeHandler"/>
|
|
|
|
|
+ <result column="make_staff" property="makeStaff" typeHandler="UuidTypeHandler"/>
|
|
|
|
|
+ <result column="make_time" property="makeTime" typeHandler="TimestampTypeHandler"/>
|
|
|
|
|
+ <result column="receivable_id" property="receivableId" typeHandler="UuidTypeHandler"/>
|
|
|
|
|
+ <result column="payable_id" property="payableId" typeHandler="UuidTypeHandler"/>
|
|
|
|
|
+ <result column="flg_valid" property="flgValid"/>
|
|
|
|
|
+ <result column="cp_id" property="cpId"/>
|
|
|
|
|
+ <result column="op_create_time" property="opCreateTime" typeHandler="TimestampTypeHandler"/>
|
|
|
|
|
+ <result column="op_create_user_id" property="opCreateUserId" typeHandler="UuidTypeHandler"/>
|
|
|
|
|
+ <result column="op_update_time" property="opUpdateTime" typeHandler="TimestampTypeHandler"/>
|
|
|
|
|
+ <result column="op_update_user_id" property="opUpdateUserId" typeHandler="UuidTypeHandler"/>
|
|
|
|
|
+ <result column="op_app_code" property="opAppCode"/>
|
|
|
|
|
+ <result column="op_timestamp" property="opTimestamp" typeHandler="TimestampTypeHandler"/>
|
|
|
|
|
+ <result column="op_db_user" property="opDbUser"/>
|
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <sql id="Base_Column_List_Item_Response">
|
|
|
|
|
+ tpi.into_id
|
|
|
|
|
+ , tpi.into_no, tpi.into_type, tpi.from_id, tpi.from_no, tpi.org_id, tpi.staff_id, tpi.cus_id, tpi.sup_id, tpi.into_status, tpi.intoing_qty, tpi.intoing_amt,
|
|
|
|
|
+ tpi.into_qty, tpi.into_amt, tpi.return_qty, tpi.return_amt, tpi.into_date, tpi.remarks, tpi.annex_paths, tpi.make_staff, tpi.make_time,
|
|
|
|
|
+ tpi.receivable_id, tpi.payable_id, tpi.flg_valid, tpi.cp_id
|
|
|
|
|
+ </sql>
|
|
|
|
|
+ <!-- 关联明细映射-->
|
|
|
|
|
+ <resultMap id="BaseResultMapItemResponse" type="com.dk.mdm.model.response.ivt.InboundResponse">
|
|
|
|
|
+ <id column="into_id" property="intoId"/>
|
|
|
|
|
+ <result column="into_no" property="intoNo"/>
|
|
|
|
|
+ <result column="into_type" property="intoType"/>
|
|
|
|
|
+ <result column="from_id" property="fromId" typeHandler="UuidTypeHandler"/>
|
|
|
|
|
+ <result column="from_no" property="fromNo"/>
|
|
|
|
|
+ <result column="org_id" property="orgId" typeHandler="UuidTypeHandler"/>
|
|
|
|
|
+ <result column="staff_id" property="staffId" typeHandler="UuidTypeHandler"/>
|
|
|
|
|
+ <result column="cus_id" property="cusId" typeHandler="UuidTypeHandler"/>
|
|
|
|
|
+ <result column="sup_id" property="supId" typeHandler="UuidTypeHandler"/>
|
|
|
|
|
+ <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="return_qty" property="returnQty"/>
|
|
|
|
|
+ <result column="return_amt" property="returnAmt"/>
|
|
|
|
|
+ <result column="into_date" property="intoDate" typeHandler="TimestampTypeHandler"/>
|
|
|
|
|
+ <result column="remarks" property="remarks"/>
|
|
|
|
|
+ <result column="annex_paths" property="annexPaths" typeHandler="JsonTypeHandler"/>
|
|
|
|
|
+ <result column="make_staff" property="makeStaff" typeHandler="UuidTypeHandler"/>
|
|
|
|
|
+ <result column="make_time" property="makeTime" typeHandler="TimestampTypeHandler"/>
|
|
|
|
|
+ <result column="receivable_id" property="receivableId" typeHandler="UuidTypeHandler"/>
|
|
|
|
|
+ <result column="payable_id" property="payableId" typeHandler="UuidTypeHandler"/>
|
|
|
|
|
+ <result column="flg_valid" property="flgValid"/>
|
|
|
|
|
+ <result column="cp_id" property="cpId"/>
|
|
|
|
|
+ <collection property="inboundItemList" resultMap="inboundItemListMap" columnPrefix="list_"/>
|
|
|
|
|
+ </resultMap>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 关联映射-->
|
|
|
|
|
+ <resultMap id="inboundItemListMap" type="java.util.Map">
|
|
|
|
|
+ <result column="item_id" property="itemId" typeHandler="UuidTypeHandler"/>
|
|
|
|
|
+ <result column="into_id" property="intoId" typeHandler="UuidTypeHandler"/>
|
|
|
|
|
+ <result column="into_type" property="intoType"/>
|
|
|
|
|
+ <result column="from_id" property="fromId" typeHandler="UuidTypeHandler"/>
|
|
|
|
|
+ <result column="from_item_id" property="fromItemId" 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_into" property="priceInto"/>
|
|
|
|
|
+ <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="return_qty" property="returnQty"/>
|
|
|
|
|
+ <result column="return_amt" property="returnAmt"/>
|
|
|
|
|
+ <result column="remarks" property="remarks"/>
|
|
|
|
|
+ <result column="inv_id" property="invId" typeHandler="UuidTypeHandler"/>
|
|
|
|
|
+ <result column="cost_price" property="costPrice"/>
|
|
|
|
|
+ <result column="cost_amt" property="costAmt"/>
|
|
|
|
|
+ <result column="out_qty" property="outQty"/>
|
|
|
|
|
+ <result column="inv_qty" property="invQty"/>
|
|
|
|
|
+ <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="price_purchase" property="pricePurchase"/>
|
|
|
|
|
+ <result column="reject_qty" property="rejectQty"/>
|
|
|
|
|
+ <result column="sku_images" property="skuImages" typeHandler="JsonTypeHandler"/>
|
|
|
|
|
+ </resultMap>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
<!-- 通用条件列 -->
|
|
<!-- 通用条件列 -->
|
|
|
<sql id="Condition">
|
|
<sql id="Condition">
|
|
|
<where>
|
|
<where>
|
|
@@ -143,6 +220,85 @@
|
|
|
</where>
|
|
</where>
|
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <sql id="Condition_Join">
|
|
|
|
|
+ <where>
|
|
|
|
|
+ <if test="intoNo != null and intoNo != ''">
|
|
|
|
|
+ AND tpi.into_no = #{intoNo}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="intoType != null and intoType != ''">
|
|
|
|
|
+ AND tpi.into_type = #{intoType}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="fromId != null and fromId != ''">
|
|
|
|
|
+ AND tpi.from_id = #{fromId}::uuid
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="fromNo != null and fromNo != ''">
|
|
|
|
|
+ AND tpi.from_no = #{fromNo}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="orgId != null and orgId != ''">
|
|
|
|
|
+ AND tpi.org_id = #{orgId}::uuid
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="staffId != null and staffId != ''">
|
|
|
|
|
+ AND tpi.staff_id = #{staffId}::uuid
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="cusId != null and cusId != ''">
|
|
|
|
|
+ AND tpi.cus_id = #{cusId}::uuid
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="supId != null and supId != ''">
|
|
|
|
|
+ AND tpi.sup_id = #{supId}::uuid
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="intoStatus != null and intoStatus != ''">
|
|
|
|
|
+ AND tpi.into_status = #{intoStatus}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="intoingQty != null">
|
|
|
|
|
+ AND tpi.intoing_qty = #{intoingQty}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="intoingAmt != null">
|
|
|
|
|
+ AND tpi.intoing_amt = #{intoingAmt}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="intoQty != null">
|
|
|
|
|
+ AND tpi.into_qty = #{intoQty}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="intoAmt != null">
|
|
|
|
|
+ AND tpi.into_amt = #{intoAmt}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="returnQty != null">
|
|
|
|
|
+ AND tpi.return_qty = #{returnQty}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="returnAmt != null">
|
|
|
|
|
+ AND tpi.return_amt = #{returnAmt}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="intoDate != null">
|
|
|
|
|
+ AND tpi.into_date = #{intoDate}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="remarks != null and remarks != ''">
|
|
|
|
|
+ AND tpi.remarks = #{remarks}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="annexPaths != null and annexPaths != ''">
|
|
|
|
|
+ AND tpi.annex_paths = #{annexPaths}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="makeStaff != null and makeStaff != ''">
|
|
|
|
|
+ AND tpi.make_staff = #{makeStaff}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="makeTime != null">
|
|
|
|
|
+ AND tpi.make_time = #{makeTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="receivableId != null and receivableId != ''">
|
|
|
|
|
+ AND tpi.receivable_id = #{receivableId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="payableId != null and payableId != ''">
|
|
|
|
|
+ AND tpi.payable_id = #{payableId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="flgValid != null">
|
|
|
|
|
+ AND tpi.flg_valid = #{flgValid}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="cpId != null">
|
|
|
|
|
+ AND tpi.cp_id = #{cpId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ </where>
|
|
|
|
|
+ </sql>
|
|
|
|
|
+
|
|
|
<sql id="idsForeach">
|
|
<sql id="idsForeach">
|
|
|
<!-- 根据主键intoId批量操作 -->
|
|
<!-- 根据主键intoId批量操作 -->
|
|
|
WHERE into_id in
|
|
WHERE into_id in
|
|
@@ -155,7 +311,7 @@
|
|
|
<select id="selectByCond" resultMap="BaseResultMap">
|
|
<select id="selectByCond" resultMap="BaseResultMap">
|
|
|
SELECT
|
|
SELECT
|
|
|
<include refid="Base_Column_List"/>
|
|
<include refid="Base_Column_List"/>
|
|
|
- FROM t_psi_inbound
|
|
|
|
|
|
|
+ FROM dkic_b.t_psi_inbound
|
|
|
<include refid="Condition"/>
|
|
<include refid="Condition"/>
|
|
|
<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}
|
|
@@ -166,7 +322,7 @@
|
|
|
<select id="countByCond" resultType="Long">
|
|
<select id="countByCond" resultType="Long">
|
|
|
SELECT
|
|
SELECT
|
|
|
count(1)
|
|
count(1)
|
|
|
- FROM t_psi_inbound
|
|
|
|
|
|
|
+ FROM dkic_b.t_psi_inbound
|
|
|
<include refid="Condition"/>
|
|
<include refid="Condition"/>
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
@@ -174,7 +330,7 @@
|
|
|
<select id="selectById" resultMap="BaseResultMap">
|
|
<select id="selectById" resultMap="BaseResultMap">
|
|
|
SELECT
|
|
SELECT
|
|
|
<include refid="Base_Column_List"/>
|
|
<include refid="Base_Column_List"/>
|
|
|
- FROM t_psi_inbound
|
|
|
|
|
|
|
+ FROM dkic_b.t_psi_inbound
|
|
|
WHERE into_id = #{intoId}::uuid
|
|
WHERE into_id = #{intoId}::uuid
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
@@ -182,7 +338,7 @@
|
|
|
<select id="selectByIdForUpdate" resultMap="BaseResultMap">
|
|
<select id="selectByIdForUpdate" resultMap="BaseResultMap">
|
|
|
SELECT
|
|
SELECT
|
|
|
<include refid="Base_Column_List"/>
|
|
<include refid="Base_Column_List"/>
|
|
|
- FROM t_psi_inbound
|
|
|
|
|
|
|
+ FROM dkic_b.t_psi_inbound
|
|
|
WHERE into_id = #{intoId}
|
|
WHERE into_id = #{intoId}
|
|
|
for update
|
|
for update
|
|
|
</select>
|
|
</select>
|
|
@@ -191,13 +347,13 @@
|
|
|
<select id="selectByIdsForUpdate" resultMap="BaseResultMap">
|
|
<select id="selectByIdsForUpdate" resultMap="BaseResultMap">
|
|
|
SELECT
|
|
SELECT
|
|
|
<include refid="Base_Column_List"/>
|
|
<include refid="Base_Column_List"/>
|
|
|
- FROM t_psi_inbound
|
|
|
|
|
|
|
+ FROM dkic_b.t_psi_inbound
|
|
|
<include refid="idsForeach"/>
|
|
<include refid="idsForeach"/>
|
|
|
for update
|
|
for update
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
<insert id="insertBatch">
|
|
<insert id="insertBatch">
|
|
|
- insert into t_psi_inbound
|
|
|
|
|
|
|
+ insert into dkic_b.t_psi_inbound
|
|
|
(
|
|
(
|
|
|
<trim suffixOverrides=",">
|
|
<trim suffixOverrides=",">
|
|
|
into_no,
|
|
into_no,
|
|
@@ -258,4 +414,67 @@
|
|
|
)
|
|
)
|
|
|
</foreach>
|
|
</foreach>
|
|
|
</insert>
|
|
</insert>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <sql id="Base_Column_List_Item_Response_Join">
|
|
|
|
|
+ tpii
|
|
|
|
|
+ .
|
|
|
|
|
+ item_id
|
|
|
|
|
+ AS list_item_id,
|
|
|
|
|
+ tpii.into_id AS list_into_id,
|
|
|
|
|
+ tpii.into_type AS list_into_type,
|
|
|
|
|
+ tpii.from_id AS list_from_id,
|
|
|
|
|
+ tpii.from_item_id AS list_from_item_id,
|
|
|
|
|
+ tpii.item_index AS list_item_index,
|
|
|
|
|
+ tpii.sku_id AS list_sku_id,
|
|
|
|
|
+ tpii.item_qty AS list_item_qty,
|
|
|
|
|
+ tpii.price_into AS list_price_into,
|
|
|
|
|
+ tpii.item_amt AS list_item_amt,
|
|
|
|
|
+ tpii.non_std_code AS list_non_std_code,
|
|
|
|
|
+ tpii.into_status AS list_into_status,
|
|
|
|
|
+ tpii.intoing_qty AS list_intoing_qty,
|
|
|
|
|
+ tpii.intoing_amt AS list_intoing_amt,
|
|
|
|
|
+ tpii.into_qty AS list_into_qty,
|
|
|
|
|
+ tpii.into_amt AS list_into_amt,
|
|
|
|
|
+ tpii.return_qty AS list_return_qty,
|
|
|
|
|
+ tpii.return_amt AS list_return_amt,
|
|
|
|
|
+ tpii.remarks AS list_remarks,
|
|
|
|
|
+ tpii.inv_id AS list_inv_id,
|
|
|
|
|
+ tpii.cost_price AS list_cost_price,
|
|
|
|
|
+ tpii.cost_amt AS list_cost_amt,
|
|
|
|
|
+ tpii.out_qty AS list_out_qty,
|
|
|
|
|
+ tpii.inv_qty AS list_inv_qty,
|
|
|
|
|
+ tpii.flg_valid AS list_flg_valids,
|
|
|
|
|
+ tpii.cp_id AS list_cp_id,
|
|
|
|
|
+ tmgs.sku_code AS list_sku_code,
|
|
|
|
|
+ tmgs.sku_name AS list_sku_name,
|
|
|
|
|
+ tmgs.sku_model AS list_sku_model,
|
|
|
|
|
+ tmgs.price_purchase AS list_price_purchase,
|
|
|
|
|
+ tmgs.sku_images AS list_sku_images,
|
|
|
|
|
+
|
|
|
|
|
+ ( tpii.into_qty - tpii.return_qty) AS list_reject_qty
|
|
|
|
|
+ </sql>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 查询表t_psi_inbound,(条件查询+分页)列表 -->
|
|
|
|
|
+ <select id="selectInboundAndItem" resultMap="BaseResultMapItemResponse">
|
|
|
|
|
+ SELECT
|
|
|
|
|
+ <include refid="Base_Column_List_Item_Response"/>,
|
|
|
|
|
+ <include refid="Base_Column_List_Item_Response_Join"/>
|
|
|
|
|
+ FROM dkic_b.t_psi_inbound tpi
|
|
|
|
|
+ left join dkic_b.t_psi_inbound_item tpii on tpi.into_id = tpii.into_id
|
|
|
|
|
+ left join dkic_b.t_mst_goods_sku tmgs on tmgs.sku_id = tpii.sku_id
|
|
|
|
|
+ <include refid="Condition_Join"/>
|
|
|
|
|
+ <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
|
|
|
|
|
+ limit #{end} offset #{start}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 查询表t_psi_inbound,(条件查询)个数 -->
|
|
|
|
|
+ <select id="selectInboundAndItemCountByCond" resultType="Long">
|
|
|
|
|
+ SELECT
|
|
|
|
|
+ count(1)
|
|
|
|
|
+ FROM dkic_b.t_psi_inbound tpi
|
|
|
|
|
+ <include refid="Condition_Join"/>
|
|
|
|
|
+ </select>
|
|
|
</mapper>
|
|
</mapper>
|