|
|
@@ -619,13 +619,17 @@
|
|
|
,ib.into_no as "intoNo"
|
|
|
,tmgs.sku_name as "skuName"
|
|
|
,tmgs.sku_model as "skuModel"
|
|
|
+ ,tmgs.sku_spec as "skuSpec"
|
|
|
,tppi.non_std_code as "nonStdCode"
|
|
|
+ ,tmw.wh_name as "whName"
|
|
|
,tmgb.short_name as "shortName"
|
|
|
+ ,tmgb.brand_name as "brandName"
|
|
|
,tmgc.cat_name as "catName"
|
|
|
,series.series_name as "seriesName"
|
|
|
, sys.f_get_name_i18n(tdk3.kind_name_i18n, #{i18n}) as "intoStatus"
|
|
|
,tppi.price_pur as "pricePur"
|
|
|
,tppi.item_qty as "itemQty"
|
|
|
+ ,concat(tppi.item_qty ,tmgu.unit_name) as "itemQtyPiece"
|
|
|
,tppi.item_amt as "itemAmt"
|
|
|
,tppi.intoing_qty as "intoingQty"
|
|
|
,tppi.intoing_amt as "intoingAmt"
|
|
|
@@ -633,6 +637,7 @@
|
|
|
,tppi.into_amt as "intoAmt"
|
|
|
,tppi.return_qty as "returnQty"
|
|
|
,tppi.return_amt as "returnAmt"
|
|
|
+ ,dkic_b.f_box_piece(tmgus.unit_name,tmgu.unit_name,tppi.box,tppi.piece) as "boxPiece"
|
|
|
FROM dkic_b.t_psi_purchase as tpp
|
|
|
Left join dkic_b.t_mst_org as tmo on tpp.org_id = tmo.org_id
|
|
|
Left join dkic_b.t_mst_supplier as tmp on tpp.sup_id = tmp.sup_id
|
|
|
@@ -650,6 +655,8 @@
|
|
|
left join dkic_b.t_psi_inbound_item as ibi on ibi.from_item_id=tppi.item_id
|
|
|
left join dkic_b.t_psi_inbound as ib on ibi.into_id=ib.into_id
|
|
|
left join sys.t_data_kind tdk3 on tdk3.kind_code = tppi.into_status
|
|
|
+ left join dkic_b.t_mst_unit as tmgu on tmgs.unit_id = tmgu.unit_id
|
|
|
+ left join dkic_b.t_mst_unit as tmgus on tmgs.sub_unit_id = tmgus.unit_id
|
|
|
<include refid="Condition_PurDetailReport"/>
|
|
|
order by tpp.op_create_time desc
|
|
|
<if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
|
|
|
@@ -765,12 +772,16 @@
|
|
|
,t.make_time as "makeTime"
|
|
|
,tmgs.sku_name as "skuName"
|
|
|
,tmgs.sku_model as "skuModel"
|
|
|
+ ,tmgs.sku_spec as "skuSpec"
|
|
|
,toi.non_std_code as "nonStdCode"
|
|
|
,tmgb.short_name as "shortName"
|
|
|
+ ,tmgb.brand_name as "brandName"
|
|
|
+ ,tmw.wh_name as "whName"
|
|
|
,tmgc.cat_name as "catName"
|
|
|
,series.series_name as "seriesName"
|
|
|
,toi.price_std as "priceStd"
|
|
|
,toi.item_qty as "itemQty"
|
|
|
+ ,concat(toi.item_qty ,tmgu.unit_name) as "itemQtyPiece"
|
|
|
,toi.amt_std as "amtStd"
|
|
|
,toi.price_sale as "priceSale"
|
|
|
,toi.item_amt as "itemAmt"
|
|
|
@@ -783,6 +794,7 @@
|
|
|
,toi.out_amt as "outAmt"
|
|
|
,toi.return_qty as "returnQty"
|
|
|
,toi.return_amt as "returnAmt"
|
|
|
+ ,dkic_b.f_box_piece(tmgus.unit_name,tmgu.unit_name,toi.box,toi.piece) as "boxPiece"
|
|
|
FROM dkic_b.t_psi_order as t
|
|
|
left join dkic_b.t_mst_sale_channel tmsc on t.sales_channel = tmsc.channel_id
|
|
|
left join dkic_b.t_mst_org tmo on t.org_id = tmo.org_id
|
|
|
@@ -799,6 +811,9 @@
|
|
|
left join dkic_b.t_mst_goods_series as series on series.series_id = tmgs.series_id
|
|
|
left join sys.t_data_kind as tdk3 on tdk3.kind_code = toi.out_status
|
|
|
left join dkic_b.t_psi_outbound as tpo on tpo.from_id=t.order_id
|
|
|
+ left join dkic_b.t_mst_unit as tmgu on tmgs.unit_id = tmgu.unit_id
|
|
|
+ left join dkic_b.t_mst_unit as tmgus on tmgs.sub_unit_id = tmgus.unit_id
|
|
|
+ left join dkic_b.t_mst_warehouse as tmw on tmw.wh_id = toi.wh_id
|
|
|
<include refid="Condition_OrdDetailReport"/>
|
|
|
order by toi.op_create_time desc
|
|
|
<if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
|
|
|
@@ -912,17 +927,23 @@
|
|
|
,makestaff.staff_name as "makeStaffName"
|
|
|
,tmgs.sku_name as "skuName"
|
|
|
,tmgs.sku_model as "skuModel"
|
|
|
+ ,tmgs.sku_spec as "skuSpec"
|
|
|
,tpi.non_std_code as "nonStdCode"
|
|
|
,tmgb.short_name as "shortName"
|
|
|
+ ,tmgb.brand_name as "brandName"
|
|
|
+ ,tmw.wh_name as "whName"
|
|
|
,tmgc.cat_name as "catName"
|
|
|
- ,series.series_name as "whName"
|
|
|
- ,tmw.wh_name as "seriesName"
|
|
|
+ ,series.series_name as "seriesName"
|
|
|
,tpoi.outing_qty as "outingQty"
|
|
|
+ ,concat(tpoi.outing_qty,tmgu.unit_name) as "outingQtyPiece"
|
|
|
,tpoi.outing_amt as "outingAmt"
|
|
|
+ ,concat(tpoi.out_qty,tmgu.unit_name) as "outQtyPiece"
|
|
|
,tpoi.out_qty as "outQty"
|
|
|
,tpoi.out_amt as "outAmt"
|
|
|
,tpoi.return_qty as "returnQty"
|
|
|
,tpoi.return_amt as "returnAmt"
|
|
|
+ ,dkic_b.f_box_piece(tmgus.unit_name,tmgu.unit_name,tpoi.outing_box,tpoi.outing_piece) as "outingBoxPiece"
|
|
|
+ ,dkic_b.f_box_piece(tmgus.unit_name,tmgu.unit_name,tpoi.out_box,tpoi.out_piece) as "outBoxPiece"
|
|
|
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
|
|
|
@@ -939,6 +960,8 @@
|
|
|
left join dkic_b.t_mst_goods_series as series on series.series_id = tmgs.series_id
|
|
|
left join dkic_b.t_psi_inventory as tpi on tpi.inv_id = tpoi.inv_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 tmgu on tmgs.unit_id = tmgu.unit_id
|
|
|
+ left join dkic_b.t_mst_unit as tmgus on tmgs.sub_unit_id = tmgus.unit_id
|
|
|
<include refid="Condition_OutboundDetailReport"/>
|
|
|
order by tpoi.op_create_time desc
|
|
|
<if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
|
|
|
@@ -1055,16 +1078,23 @@
|
|
|
,makestaff.staff_name as "makeStaffName"
|
|
|
,tmgs.sku_name as "skuName"
|
|
|
,tmgs.sku_model as "skuModel"
|
|
|
+ ,tmgs.sku_spec as "skuSpec"
|
|
|
,tpi.non_std_code as "nonStdCode"
|
|
|
,tmgb.short_name as "shortName"
|
|
|
+ ,tmgb.brand_name as "brandName"
|
|
|
+ ,tmw.wh_name as "whName"
|
|
|
,tmgc.cat_name as "catName"
|
|
|
,series.series_name as "seriesName"
|
|
|
,tpoi.intoing_qty as "intoingQty"
|
|
|
+ ,concat(tpoi.intoing_qty,tmgu.unit_name) as "intoingQtyPiece"
|
|
|
,tpoi.intoing_amt as "intoingAmt"
|
|
|
,tpoi.into_qty as "intoQty"
|
|
|
+ ,concat(tpoi.into_qty,tmgu.unit_name) as "intoQtyPiece"
|
|
|
,tpoi.into_amt as "intoAmt"
|
|
|
,tpoi.return_qty as "returnQty"
|
|
|
,tpoi.return_amt as "returnAmt"
|
|
|
+ ,dkic_b.f_box_piece(tmgus.unit_name,tmgu.unit_name,tpoi.intoing_box,tpoi.intoing_piece) as "intoingBoxPiece"
|
|
|
+ ,dkic_b.f_box_piece(tmgus.unit_name,tmgu.unit_name,tpoi.into_box,tpoi.into_piece) as "intoBoxPiece"
|
|
|
FROM dkic_b.t_psi_inbound 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
|
|
|
@@ -1080,6 +1110,9 @@
|
|
|
left join dkic_b.t_mst_goods_category as tmgc on tmgc.cat_id = tmgs.category_id
|
|
|
left join dkic_b.t_mst_goods_series as series on series.series_id = tmgs.series_id
|
|
|
left join dkic_b.t_psi_inventory as tpi on tpi.inv_id = tpoi.inv_id
|
|
|
+ left join dkic_b.t_mst_unit as tmgu on tmgs.unit_id = tmgu.unit_id
|
|
|
+ left join dkic_b.t_mst_unit as tmgus on tmgs.sub_unit_id = tmgus.unit_id
|
|
|
+ left join dkic_b.t_mst_warehouse as tmw on tmw.wh_id = tpi.wh_id
|
|
|
<include refid="Condition_IntoboundDetailReport"/>
|
|
|
order by tpoi.op_create_time desc
|
|
|
<if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
|