|
|
@@ -5,14 +5,14 @@
|
|
|
<!-- 通用设置 -->
|
|
|
<!-- 通用查询列 -->
|
|
|
<sql id="Base_Column_List">
|
|
|
- out_id, out_no, out_type, from_id, from_no, org_id, staff_id, cus_id, sup_id, out_status, outing_qty, outing_amt, out_qty, out_amt, return_qty, return_amt, out_date, remarks, annex_paths, make_staff, make_time, receivable_id, payable_id, flg_valid, cp_id
|
|
|
+ out_id, out_no, out_type, from_id, from_no, org_id, staff_id, cus_id, sup_id, out_status, outing_qty, outing_amt, out_qty, out_amt, return_qty, return_amt, out_date, remarks, annex_paths, make_staff, make_time, receivable_id, payable_id, flg_valid, cp_id,out_reason
|
|
|
</sql>
|
|
|
|
|
|
<sql id="Base_Column_List_Response">
|
|
|
tpo.out_id, tpo.out_no, tpo.out_type, tpo.from_id, tpo.from_no, tpo.org_id, tpo.staff_id,
|
|
|
tpo.cus_id, tpo.sup_id, tpo.out_status, tpo.outing_qty, tpo.outing_amt, tpo.out_qty, tpo.out_amt,
|
|
|
tpo.return_qty, tpo.return_amt, tpo.out_date, tpo.remarks, tpo.annex_paths, tpo.make_staff,
|
|
|
- tpo.make_time, tpo.receivable_id, tpo.payable_id, tpo.flg_valid, tpo.cp_id
|
|
|
+ tpo.make_time, tpo.receivable_id, tpo.payable_id, tpo.flg_valid, tpo.cp_id,tpo.out_reason
|
|
|
</sql>
|
|
|
|
|
|
<!-- 通用查询映射结果 -->
|
|
|
@@ -49,6 +49,7 @@
|
|
|
<result column="op_app_code" property="opAppCode"/>
|
|
|
<result column="op_timestamp" property="opTimestamp" typeHandler="TimestampTypeHandler"/>
|
|
|
<result column="op_db_user" property="opDbUser"/>
|
|
|
+ <result column="out_reason" property="outReason" typeHandler="UuidTypeHandler"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<!-- 通用查询映射结果 -->
|
|
|
@@ -92,6 +93,9 @@
|
|
|
<result column="address_full" property="addressFull"/>
|
|
|
<result column="channel_name" property="channelName"/>
|
|
|
<result column="cus_from_name" property="cusFromName"/>
|
|
|
+ <result column="out_reason" property="outReason" typeHandler="UuidTypeHandler"/>
|
|
|
+ <result column="out_reason_name" property="outReasonName" />
|
|
|
+
|
|
|
</resultMap>
|
|
|
|
|
|
<!-- 通用条件列 -->
|
|
|
@@ -240,7 +244,8 @@
|
|
|
t.receivable_id,
|
|
|
t.payable_id,
|
|
|
t.cp_id,
|
|
|
- t.flg_valid
|
|
|
+ t.flg_valid,
|
|
|
+ tmd.data_value as into_reason_name
|
|
|
FROM dkic_b.t_psi_outbound as t
|
|
|
left join dkic_b.t_mst_org tmo on tmo.org_id = t.org_id
|
|
|
Left join dkic_b.t_mst_supplier tmp on tmp.sup_id = t.sup_id
|
|
|
@@ -250,6 +255,7 @@
|
|
|
left join dkic_b.t_mst_dictionary_data tmdd on tmdd.data_id = tmc.cus_from
|
|
|
left join sys.t_data_kind as tdk1 on tdk1.kind_code = t.out_status
|
|
|
LEFT JOIN sys.t_data_kind tdktype ON tdktype.kind_code = t.out_type
|
|
|
+ left join dkic_b.t_mst_dictionary_data tmd on tmd.data_id = t.out_reason
|
|
|
<include refid="Condition"/>
|
|
|
<if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
|
|
|
limit #{end} offset #{start}
|
|
|
@@ -261,8 +267,17 @@
|
|
|
SELECT
|
|
|
count(1)
|
|
|
FROM dkic_b.t_psi_outbound as t
|
|
|
- left join dkic_b.t_mst_customer tmc on t.cus_id = tmc.cus_id
|
|
|
+ left join dkic_b.t_mst_org tmo on tmo.org_id = t.org_id
|
|
|
+ Left join dkic_b.t_mst_supplier tmp on tmp.sup_id = t.sup_id
|
|
|
+ left join dkic_b.t_mst_staff tms on tms.staff_id = t.staff_id
|
|
|
+ left join dkic_b.t_mst_staff as makestaff on makestaff.staff_id = t.make_staff
|
|
|
+ left join dkic_b.t_mst_customer tmc on tmc.cus_id = t.cus_id
|
|
|
+ left join dkic_b.t_mst_dictionary_data tmdd on tmdd.data_id = tmc.cus_from
|
|
|
+ left join sys.t_data_kind as tdk1 on tdk1.kind_code = t.out_status
|
|
|
+ LEFT JOIN sys.t_data_kind tdktype ON tdktype.kind_code = t.out_type
|
|
|
+ left join dkic_b.t_mst_dictionary_data tmd on tmd.data_id = t.out_reason
|
|
|
<include refid="Condition"/>
|
|
|
+
|
|
|
</select>
|
|
|
|
|
|
<!-- 根据主键查询表dkic_b.t_psi_outbound的一行数据 -->
|
|
|
@@ -312,7 +327,8 @@
|
|
|
t.receivable_id,
|
|
|
t.payable_id,
|
|
|
t.cp_id,
|
|
|
- t.flg_valid
|
|
|
+ t.flg_valid,
|
|
|
+ tmd.data_value as into_reason_name
|
|
|
FROM dkic_b.t_psi_outbound as t
|
|
|
left join dkic_b.t_psi_order as tpo1 on tpo1.order_id = t.from_id
|
|
|
left join dkic_b.t_mst_sale_channel tmsc on tmsc.channel_id = tpo1.sales_channel
|
|
|
@@ -322,6 +338,7 @@
|
|
|
left join dkic_b.t_mst_customer tmc on tmc.cus_id = t.cus_id
|
|
|
left join dkic_b.t_mst_dictionary_data tmdd on tmdd.data_id = tmc.cus_from
|
|
|
left join sys.t_data_kind as tdk1 on tdk1.kind_code = t.out_status
|
|
|
+ left join dkic_b.t_mst_dictionary_data tmd on tmd.data_id = t.out_reason
|
|
|
WHERE t.out_id = #{id}::uuid
|
|
|
</select>
|
|
|
|