|
@@ -69,6 +69,7 @@ sys.f_remove_zero(out_qty) as out_qty, out_amt, sys.f_remove_zero(return_qty) as
|
|
|
<result column="pack_box" property="packBox"/>
|
|
<result column="pack_box" property="packBox"/>
|
|
|
<result column="sku_name" property="skuName"/>
|
|
<result column="sku_name" property="skuName"/>
|
|
|
<result column="sku_model" property="skuModel"/>
|
|
<result column="sku_model" property="skuModel"/>
|
|
|
|
|
+ <result column="decimalPlaces" property="decimalPlaces"/>
|
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
|
|
<!-- 通用查询映射结果 -->
|
|
<!-- 通用查询映射结果 -->
|
|
@@ -131,7 +132,7 @@ sys.f_remove_zero(out_qty) as out_qty, out_amt, sys.f_remove_zero(return_qty) as
|
|
|
<result column="subUnitName" property="subUnitName"/>
|
|
<result column="subUnitName" property="subUnitName"/>
|
|
|
<result column="unitName" property="unitName"/>
|
|
<result column="unitName" property="unitName"/>
|
|
|
<result column="use_place" property="usePlace"/>
|
|
<result column="use_place" property="usePlace"/>
|
|
|
-
|
|
|
|
|
|
|
+ <result column="decimalPlaces" property="decimalPlaces"/>
|
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
|
|
<!-- 通用条件列 -->
|
|
<!-- 通用条件列 -->
|
|
@@ -252,6 +253,7 @@ sys.f_remove_zero(out_qty) as out_qty, out_amt, sys.f_remove_zero(return_qty) as
|
|
|
tmgb.short_name as "shortName",
|
|
tmgb.short_name as "shortName",
|
|
|
tmgs.sku_spec as "skuSpec",
|
|
tmgs.sku_spec as "skuSpec",
|
|
|
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"
|
|
|
FROM dkic_b.t_psi_outbound_item as tpoi
|
|
FROM dkic_b.t_psi_outbound_item as tpoi
|
|
|
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
|
|
|
LEFT JOIN dkic_b.t_mst_unit AS u2 ON tpoi.sub_unit_id = u2.unit_id
|
|
LEFT JOIN dkic_b.t_mst_unit AS u2 ON tpoi.sub_unit_id = u2.unit_id
|
|
@@ -283,6 +285,7 @@ sys.f_remove_zero(out_qty) as out_qty, out_amt, sys.f_remove_zero(return_qty) as
|
|
|
<select id="selectById" resultMap="BaseResultMapResponse">
|
|
<select id="selectById" resultMap="BaseResultMapResponse">
|
|
|
SELECT
|
|
SELECT
|
|
|
<include refid="Base_Column_List_Response"/>
|
|
<include refid="Base_Column_List_Response"/>
|
|
|
|
|
+ ,(select ul.decimal_places from dkic_b.t_mst_unit ul where tpoi.unit_id = ul.unit_id) as "decimalPlaces"
|
|
|
FROM dkic_b.t_psi_outbound_item tpoi
|
|
FROM dkic_b.t_psi_outbound_item tpoi
|
|
|
WHERE tpoi.item_id = #{id}::uuid
|
|
WHERE tpoi.item_id = #{id}::uuid
|
|
|
</select>
|
|
</select>
|
|
@@ -291,6 +294,7 @@ sys.f_remove_zero(out_qty) as out_qty, out_amt, sys.f_remove_zero(return_qty) as
|
|
|
<select id="selectByIdForUpdate" resultMap="BaseResultMap">
|
|
<select id="selectByIdForUpdate" resultMap="BaseResultMap">
|
|
|
SELECT
|
|
SELECT
|
|
|
<include refid="Base_Column_List"/>
|
|
<include refid="Base_Column_List"/>
|
|
|
|
|
+ ,(select ul.decimal_places from dkic_b.t_mst_unit ul where dkic_b.t_psi_outbound_item.unit_id = ul.unit_id) as "decimalPlaces"
|
|
|
FROM dkic_b.t_psi_outbound_item
|
|
FROM dkic_b.t_psi_outbound_item
|
|
|
WHERE item_id = #{id}::uuid
|
|
WHERE item_id = #{id}::uuid
|
|
|
for update
|
|
for update
|
|
@@ -300,6 +304,7 @@ sys.f_remove_zero(out_qty) as out_qty, out_amt, sys.f_remove_zero(return_qty) as
|
|
|
<select id="selectByIdsForUpdate" resultMap="BaseResultMap">
|
|
<select id="selectByIdsForUpdate" resultMap="BaseResultMap">
|
|
|
SELECT
|
|
SELECT
|
|
|
<include refid="Base_Column_List"/>
|
|
<include refid="Base_Column_List"/>
|
|
|
|
|
+ ,(select ul.decimal_places from dkic_b.t_mst_unit ul where dkic_b.t_psi_outbound_item.unit_id = ul.unit_id) as "decimalPlaces"
|
|
|
FROM dkic_b.t_psi_outbound_item
|
|
FROM dkic_b.t_psi_outbound_item
|
|
|
<include refid="idsForeach"/>
|
|
<include refid="idsForeach"/>
|
|
|
for update
|
|
for update
|
|
@@ -309,6 +314,7 @@ sys.f_remove_zero(out_qty) as out_qty, out_amt, sys.f_remove_zero(return_qty) as
|
|
|
<select id="selectByZIdForUpdate" resultMap="BaseResultMap">
|
|
<select id="selectByZIdForUpdate" resultMap="BaseResultMap">
|
|
|
SELECT
|
|
SELECT
|
|
|
<include refid="Base_Column_List"/>
|
|
<include refid="Base_Column_List"/>
|
|
|
|
|
+ ,(select ul.decimal_places from dkic_b.t_mst_unit ul where dkic_b.t_psi_outbound_item.unit_id = ul.unit_id) as "decimalPlaces"
|
|
|
FROM dkic_b.t_psi_outbound_item
|
|
FROM dkic_b.t_psi_outbound_item
|
|
|
WHERE out_id = #{id}::uuid
|
|
WHERE out_id = #{id}::uuid
|
|
|
for update
|
|
for update
|
|
@@ -412,6 +418,7 @@ 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",
|
|
|
t.use_place
|
|
t.use_place
|
|
|
|
|
+ ,tmgu.decimal_places as "decimalPlaces"
|
|
|
FROM dkic_b.t_psi_outbound_item as t
|
|
FROM dkic_b.t_psi_outbound_item as t
|
|
|
left join dkic_b.t_psi_order_item as tpoi on tpoi.item_id = t.from_item_id
|
|
left join dkic_b.t_psi_order_item as tpoi on tpoi.item_id = t.from_item_id
|
|
|
left join dkic_b.t_psi_order as tpo on tpo.order_id = t.from_id
|
|
left join dkic_b.t_psi_order as tpo on tpo.order_id = t.from_id
|
|
@@ -452,8 +459,10 @@ sys.f_remove_zero(out_qty) as out_qty, out_amt, sys.f_remove_zero(return_qty) as
|
|
|
sys.f_remove_zero(tpi.inv_qty) as "invQty",
|
|
sys.f_remove_zero(tpi.inv_qty) as "invQty",
|
|
|
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"
|
|
|
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_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
|
|
|
where t.flg_valid
|
|
where t.flg_valid
|
|
@@ -479,8 +488,10 @@ sys.f_remove_zero(out_qty) as out_qty, out_amt, sys.f_remove_zero(return_qty) as
|
|
|
t.inv_id,
|
|
t.inv_id,
|
|
|
t.non_std_code,
|
|
t.non_std_code,
|
|
|
t.remarks
|
|
t.remarks
|
|
|
|
|
+ ,tmgu.decimal_places as "decimalPlaces"
|
|
|
FROM dkic_b.t_psi_outbound_item as t
|
|
FROM dkic_b.t_psi_outbound_item as t
|
|
|
inner join dkic_b.t_mst_goods_sku tmgs on tmgs.sku_id = t.sku_id
|
|
inner 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
|
|
|
where t.flg_valid
|
|
where t.flg_valid
|
|
|
and t.out_type = '出库类型-销售出库'
|
|
and t.out_type = '出库类型-销售出库'
|
|
|
and t.out_qty > t.return_qty
|
|
and t.out_qty > t.return_qty
|
|
@@ -516,6 +527,7 @@ sys.f_remove_zero(out_qty) as out_qty, out_amt, sys.f_remove_zero(return_qty) as
|
|
|
t.outing_amt + t.out_amt as outing_amt,
|
|
t.outing_amt + t.out_amt as outing_amt,
|
|
|
t.non_std_code,
|
|
t.non_std_code,
|
|
|
t.remarks
|
|
t.remarks
|
|
|
|
|
+ ,tmgu.decimal_places as "decimalPlaces"
|
|
|
,tmgus.unit_name as "subUnitName"
|
|
,tmgus.unit_name as "subUnitName"
|
|
|
,tmgu.unit_name as "unitName"
|
|
,tmgu.unit_name as "unitName"
|
|
|
,t.pack_box
|
|
,t.pack_box
|
|
@@ -528,6 +540,7 @@ sys.f_remove_zero(out_qty) as out_qty, out_amt, sys.f_remove_zero(return_qty) as
|
|
|
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_mst_unit as tmgus on t.sub_unit_id = tmgus.unit_id
|
|
left join dkic_b.t_mst_unit as tmgus on t.sub_unit_id = tmgus.unit_id
|
|
|
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_goods_brand tmgb on tmgb.brand_id = tmgs.brand_id
|
|
left join dkic_b.t_mst_goods_brand tmgb on tmgb.brand_id = tmgs.brand_id
|
|
|
left join dkic_b.t_psi_inventory tpi on tpi.inv_id = t.inv_id
|
|
left join dkic_b.t_psi_inventory tpi on tpi.inv_id = t.inv_id
|
|
|
left join dkic_b.t_mst_warehouse tmw on tmw.wh_id = tpi.wh_id
|
|
left join dkic_b.t_mst_warehouse tmw on tmw.wh_id = tpi.wh_id
|
|
@@ -568,8 +581,10 @@ sys.f_remove_zero(out_qty) as out_qty, out_amt, sys.f_remove_zero(return_qty) as
|
|
|
t.out_amt,
|
|
t.out_amt,
|
|
|
t.non_std_code,
|
|
t.non_std_code,
|
|
|
t.remarks
|
|
t.remarks
|
|
|
|
|
+ ,tmgu.decimal_places as "decimalPlaces"
|
|
|
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_goods_brand tmgb on tmgb.brand_id = tmgs.brand_id
|
|
left join dkic_b.t_mst_goods_brand tmgb on tmgb.brand_id = tmgs.brand_id
|
|
|
left join dkic_b.t_psi_inventory tpi on tpi.inv_id = t.inv_id
|
|
left join dkic_b.t_psi_inventory tpi on tpi.inv_id = t.inv_id
|
|
|
left join dkic_b.t_mst_warehouse tmw on tmw.wh_id = tpi.wh_id
|
|
left join dkic_b.t_mst_warehouse tmw on tmw.wh_id = tpi.wh_id
|
|
@@ -665,6 +680,7 @@ sys.f_remove_zero(out_qty) as out_qty, out_amt, sys.f_remove_zero(return_qty) as
|
|
|
,tmu2.unit_code as "subUnitCode"
|
|
,tmu2.unit_code as "subUnitCode"
|
|
|
,tmu2.unit_name as "subUnitName"
|
|
,tmu2.unit_name as "subUnitName"
|
|
|
,dkic_b.f_box_piece(tmu2.unit_name,tmu.unit_name,tpoi.outing_box,tpoi.outing_piece) as "outingBoxPiece"
|
|
,dkic_b.f_box_piece(tmu2.unit_name,tmu.unit_name,tpoi.outing_box,tpoi.outing_piece) as "outingBoxPiece"
|
|
|
|
|
+ ,tmu.decimal_places as "decimalPlaces"
|
|
|
from dkic_b.t_psi_outbound_item tpoi
|
|
from dkic_b.t_psi_outbound_item tpoi
|
|
|
<include refid="Select_Inbound_Join_Table_Out"/>
|
|
<include refid="Select_Inbound_Join_Table_Out"/>
|
|
|
<where>
|
|
<where>
|
|
@@ -687,6 +703,7 @@ sys.f_remove_zero(out_qty) as out_qty, out_amt, sys.f_remove_zero(return_qty) as
|
|
|
,tmu2.unit_code as "subUnitCode"
|
|
,tmu2.unit_code as "subUnitCode"
|
|
|
,tmu2.unit_name as "subUnitName"
|
|
,tmu2.unit_name as "subUnitName"
|
|
|
,dkic_b.f_box_piece(tmu2.unit_name,tmu.unit_name,tpoi.out_box,tpoi.out_piece) as "outBoxPiece"
|
|
,dkic_b.f_box_piece(tmu2.unit_name,tmu.unit_name,tpoi.out_box,tpoi.out_piece) as "outBoxPiece"
|
|
|
|
|
+ ,tmu.decimal_places as "decimalPlaces"
|
|
|
FROM dkic_b.t_psi_inbound_item tpii
|
|
FROM dkic_b.t_psi_inbound_item tpii
|
|
|
<include refid="Select_Inbound_Join_Table_Into"/>
|
|
<include refid="Select_Inbound_Join_Table_Into"/>
|
|
|
<where>
|
|
<where>
|