|
@@ -124,10 +124,8 @@ sys.f_remove_zero(out_qty) as out_qty, out_amt, sys.f_remove_zero(return_qty) as
|
|
|
<result column="out_piece" property="outPiece"/>
|
|
<result column="out_piece" property="outPiece"/>
|
|
|
<result column="unit_id" property="unitId"/>
|
|
<result column="unit_id" property="unitId"/>
|
|
|
<result column="unit_code" property="unitCode"/>
|
|
<result column="unit_code" property="unitCode"/>
|
|
|
- <result column="unit_name" property="unitName"/>
|
|
|
|
|
<result column="sub_unit_id" property="subUnitId"/>
|
|
<result column="sub_unit_id" property="subUnitId"/>
|
|
|
<result column="sub_unit_code" property="subUnitCode"/>
|
|
<result column="sub_unit_code" property="subUnitCode"/>
|
|
|
- <result column="sub_unit_name" property="subUnitName"/>
|
|
|
|
|
<result column="pack_box" property="packBox"/>
|
|
<result column="pack_box" property="packBox"/>
|
|
|
<result column="flgSubUnit" property="flgSubUnit"/>
|
|
<result column="flgSubUnit" property="flgSubUnit"/>
|
|
|
<result column="subUnitName" property="subUnitName"/>
|
|
<result column="subUnitName" property="subUnitName"/>
|
|
@@ -258,7 +256,11 @@ sys.f_remove_zero(out_qty) as out_qty, out_amt, sys.f_remove_zero(return_qty) as
|
|
|
sys.f_get_name_i18n(tdk.kind_name_i18n, #{i18n}) as "outStatusName",
|
|
sys.f_get_name_i18n(tdk.kind_name_i18n, #{i18n}) as "outStatusName",
|
|
|
ul.decimal_places as "decimalPlaces",
|
|
ul.decimal_places as "decimalPlaces",
|
|
|
tpoi.sup_id,
|
|
tpoi.sup_id,
|
|
|
- tms.sup_name
|
|
|
|
|
|
|
+ tms.sup_name,
|
|
|
|
|
+ tpoi.unit_id,
|
|
|
|
|
+ tpoi.sub_unit_id,
|
|
|
|
|
+ ul.unit_name as "unitName",
|
|
|
|
|
+ u2.unit_name as "subUnitName"
|
|
|
FROM dkic_b.t_psi_outbound_item as tpoi
|
|
FROM dkic_b.t_psi_outbound_item as tpoi
|
|
|
LEFT JOIN dkic_b.t_mst_supplier as tms ON tpoi.sup_id = tms.sup_id
|
|
LEFT JOIN dkic_b.t_mst_supplier as tms ON tpoi.sup_id = tms.sup_id
|
|
|
LEFT JOIN dkic_b.t_mst_unit AS ul ON tpoi.unit_id = ul.unit_id
|
|
LEFT JOIN dkic_b.t_mst_unit AS ul ON tpoi.unit_id = ul.unit_id
|
|
@@ -469,11 +471,22 @@ sys.f_remove_zero(out_qty) as out_qty, out_amt, sys.f_remove_zero(return_qty) as
|
|
|
sys.f_remove_zero(tpi.usable_qty) as "usableQty",
|
|
sys.f_remove_zero(tpi.usable_qty) as "usableQty",
|
|
|
tmw.wh_name as "whName"
|
|
tmw.wh_name as "whName"
|
|
|
,tmgu.decimal_places as "decimalPlaces"
|
|
,tmgu.decimal_places as "decimalPlaces"
|
|
|
|
|
+ ,t.unit_id
|
|
|
|
|
+ ,t.sub_unit_id
|
|
|
|
|
+ ,ul.unit_name as "unitName"
|
|
|
|
|
+ ,u2.unit_name as "subUnitName"
|
|
|
|
|
+ ,dkic_b.f_box_piece(u2.unit_name,ul.unit_name,t.outing_box,t.outing_piece) AS "outingBoxPiece"
|
|
|
|
|
+ ,dkic_b.f_box_piece(u2.unit_name,ul.unit_name,t.out_box,t.out_piece) AS "outBoxPiece"
|
|
|
|
|
+ ,sys.f_get_name_i18n(tdk.kind_name_i18n, #{i18n}) as "outStatusName"
|
|
|
|
|
+ ,t.out_status
|
|
|
FROM dkic_b.t_psi_outbound_item as t
|
|
FROM dkic_b.t_psi_outbound_item as t
|
|
|
left join dkic_b.t_mst_goods_sku tmgs on tmgs.sku_id = t.sku_id
|
|
left join dkic_b.t_mst_goods_sku tmgs on tmgs.sku_id = t.sku_id
|
|
|
left join dkic_b.t_mst_unit as tmgu on t.unit_id = tmgu.unit_id
|
|
left join dkic_b.t_mst_unit as tmgu on t.unit_id = tmgu.unit_id
|
|
|
left join dkic_b.t_psi_inventory as tpi on tpi.inv_id = t.inv_id
|
|
left join dkic_b.t_psi_inventory as tpi on tpi.inv_id = t.inv_id
|
|
|
left join dkic_b.t_mst_warehouse as tmw on tmw.wh_id = tpi.wh_id
|
|
left join dkic_b.t_mst_warehouse as tmw on tmw.wh_id = tpi.wh_id
|
|
|
|
|
+ LEFT JOIN dkic_b.t_mst_unit AS ul ON t.unit_id = ul.unit_id
|
|
|
|
|
+ LEFT JOIN dkic_b.t_mst_unit AS u2 ON t.sub_unit_id = u2.unit_id
|
|
|
|
|
+ left join sys.t_data_kind as tdk on tdk.kind_code = t.out_status
|
|
|
where t.flg_valid
|
|
where t.flg_valid
|
|
|
and t.out_id = #{id}::uuid
|
|
and t.out_id = #{id}::uuid
|
|
|
order by t.item_index
|
|
order by t.item_index
|