姜永辉 1 سال پیش
والد
کامیت
204e247a1d
1فایلهای تغییر یافته به همراه24 افزوده شده و 2 حذف شده
  1. 24 2
      src/main/java/com/dk/mdm/mapper/report/ReportMapper.xml

+ 24 - 2
src/main/java/com/dk/mdm/mapper/report/ReportMapper.xml

@@ -619,13 +619,17 @@
         ,ib.into_no as "intoNo"
         ,ib.into_no as "intoNo"
         ,tmgs.sku_name as "skuName"
         ,tmgs.sku_name as "skuName"
         ,tmgs.sku_model as "skuModel"
         ,tmgs.sku_model as "skuModel"
+        ,tmgs.sku_spec as "skuSpec"
         ,tppi.non_std_code as "nonStdCode"
         ,tppi.non_std_code as "nonStdCode"
+        ,tmw.wh_name as "whName"
         ,tmgb.short_name as "shortName"
         ,tmgb.short_name as "shortName"
+        ,tmgb.brand_name as "brandName"
         ,tmgc.cat_name as "catName"
         ,tmgc.cat_name as "catName"
         ,series.series_name as "seriesName"
         ,series.series_name as "seriesName"
         , sys.f_get_name_i18n(tdk3.kind_name_i18n, #{i18n}) as "intoStatus"
         , sys.f_get_name_i18n(tdk3.kind_name_i18n, #{i18n}) as "intoStatus"
         ,tppi.price_pur as "pricePur"
         ,tppi.price_pur as "pricePur"
         ,tppi.item_qty as "itemQty"
         ,tppi.item_qty as "itemQty"
+        ,concat(tppi.item_qty ,tmgu.unit_name)  as "itemQtyPiece"
         ,tppi.item_amt as "itemAmt"
         ,tppi.item_amt as "itemAmt"
         ,tppi.intoing_qty as "intoingQty"
         ,tppi.intoing_qty as "intoingQty"
         ,tppi.intoing_amt as "intoingAmt"
         ,tppi.intoing_amt as "intoingAmt"
@@ -633,6 +637,7 @@
         ,tppi.into_amt as "intoAmt"
         ,tppi.into_amt as "intoAmt"
         ,tppi.return_qty as "returnQty"
         ,tppi.return_qty as "returnQty"
         ,tppi.return_amt as "returnAmt"
         ,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
         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_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
         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_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 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 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"/>
         <include refid="Condition_PurDetailReport"/>
         order by tpp.op_create_time desc
         order by tpp.op_create_time desc
         <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">
@@ -765,12 +772,16 @@
         ,t.make_time as "makeTime"
         ,t.make_time as "makeTime"
         ,tmgs.sku_name as "skuName"
         ,tmgs.sku_name as "skuName"
         ,tmgs.sku_model as "skuModel"
         ,tmgs.sku_model as "skuModel"
+        ,tmgs.sku_spec as "skuSpec"
         ,toi.non_std_code as "nonStdCode"
         ,toi.non_std_code as "nonStdCode"
         ,tmgb.short_name as "shortName"
         ,tmgb.short_name as "shortName"
+        ,tmgb.brand_name as "brandName"
+        ,tmw.wh_name as "whName"
         ,tmgc.cat_name as "catName"
         ,tmgc.cat_name as "catName"
         ,series.series_name as "seriesName"
         ,series.series_name as "seriesName"
         ,toi.price_std as "priceStd"
         ,toi.price_std as "priceStd"
         ,toi.item_qty as "itemQty"
         ,toi.item_qty as "itemQty"
+        ,concat(toi.item_qty ,tmgu.unit_name)  as "itemQtyPiece"
         ,toi.amt_std as "amtStd"
         ,toi.amt_std as "amtStd"
         ,toi.price_sale as "priceSale"
         ,toi.price_sale as "priceSale"
         ,toi.item_amt as "itemAmt"
         ,toi.item_amt as "itemAmt"
@@ -783,6 +794,7 @@
         ,toi.out_amt as "outAmt"
         ,toi.out_amt as "outAmt"
         ,toi.return_qty as "returnQty"
         ,toi.return_qty as "returnQty"
         ,toi.return_amt as "returnAmt"
         ,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
         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_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
         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 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 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_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"/>
         <include refid="Condition_OrdDetailReport"/>
         order by toi.op_create_time desc
         order by toi.op_create_time desc
         <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">
@@ -915,9 +930,10 @@
         ,tmgs.sku_spec as "skuSpec"
         ,tmgs.sku_spec as "skuSpec"
         ,tpi.non_std_code as "nonStdCode"
         ,tpi.non_std_code as "nonStdCode"
         ,tmgb.short_name as "shortName"
         ,tmgb.short_name as "shortName"
+        ,tmgb.brand_name as "brandName"
+        ,tmw.wh_name as "whName"
         ,tmgc.cat_name as "catName"
         ,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"
         ,tpoi.outing_qty as "outingQty"
         ,concat(tpoi.outing_qty,tmgu.unit_name)  as "outingQtyPiece"
         ,concat(tpoi.outing_qty,tmgu.unit_name)  as "outingQtyPiece"
         ,tpoi.outing_amt as "outingAmt"
         ,tpoi.outing_amt as "outingAmt"
@@ -1062,13 +1078,18 @@
         ,makestaff.staff_name as "makeStaffName"
         ,makestaff.staff_name as "makeStaffName"
         ,tmgs.sku_name as "skuName"
         ,tmgs.sku_name as "skuName"
         ,tmgs.sku_model as "skuModel"
         ,tmgs.sku_model as "skuModel"
+        ,tmgs.sku_spec as "skuSpec"
         ,tpi.non_std_code as "nonStdCode"
         ,tpi.non_std_code as "nonStdCode"
         ,tmgb.short_name as "shortName"
         ,tmgb.short_name as "shortName"
+        ,tmgb.brand_name as "brandName"
+        ,tmw.wh_name as "whName"
         ,tmgc.cat_name as "catName"
         ,tmgc.cat_name as "catName"
         ,series.series_name as "seriesName"
         ,series.series_name as "seriesName"
         ,tpoi.intoing_qty as "intoingQty"
         ,tpoi.intoing_qty as "intoingQty"
+        ,concat(tpoi.intoing_qty,tmgu.unit_name)  as "intoingQtyPiece"
         ,tpoi.intoing_amt as "intoingAmt"
         ,tpoi.intoing_amt as "intoingAmt"
         ,tpoi.into_qty as "intoQty"
         ,tpoi.into_qty as "intoQty"
+        ,concat(tpoi.into_qty,tmgu.unit_name)  as "intoQtyPiece"
         ,tpoi.into_amt as "intoAmt"
         ,tpoi.into_amt as "intoAmt"
         ,tpoi.return_qty as "returnQty"
         ,tpoi.return_qty as "returnQty"
         ,tpoi.return_amt as "returnAmt"
         ,tpoi.return_amt as "returnAmt"
@@ -1091,6 +1112,7 @@
         left join dkic_b.t_psi_inventory as tpi on tpi.inv_id = tpoi.inv_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 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_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"/>
         <include refid="Condition_IntoboundDetailReport"/>
         order by tpoi.op_create_time desc
         order by tpoi.op_create_time desc
         <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">