Parcourir la source

Merge branch 'master' of http://s.dev01.dkiboss.com:9001/iBOSS-2.0-Mini/iboss-server-mdm

liuyao il y a 1 an
Parent
commit
e5622129fa

+ 6 - 2
src/main/java/com/dk/mdm/mapper/ivt/OutboundItemMapper.xml

@@ -403,6 +403,8 @@ sys.f_remove_zero(out_qty) as out_qty, out_amt, sys.f_remove_zero(return_qty) as
                tmgs.flg_sub_unit AS "flgSubUnit",
                t.outing_box ,
                t.outing_piece ,
+               t.out_box ,
+               t.out_piece ,
                tmgs.price_standard AS "priceStandard",
                t.pack_box  ,
                 tmgus.unit_name         as "subUnitName",
@@ -412,7 +414,7 @@ sys.f_remove_zero(out_qty) as out_qty, out_amt, sys.f_remove_zero(return_qty) as
                tmgs.sku_code            as "skuCode",
                sys.f_remove_zero(tpoi.item_qty)    as "orderQty",
                sys.f_remove_zero(tpoi.item_qty - tpoi.outing_qty - tpoi.out_qty + t.outing_qty + t.out_qty) as "canOutingQty",
-               tmgb.brand_name AS "brandName",
+               case when t.sku_id is null then tmp.sup_name || '(外协)' else  tmgb.brand_name end AS brandName,
                tmgb.short_name AS "shortName",
                t.price_out,
                sys.f_remove_zero(t.outing_qty + t.out_qty)                                                  as outing_qty,
@@ -432,6 +434,7 @@ sys.f_remove_zero(out_qty) as out_qty, out_amt, sys.f_remove_zero(return_qty) as
                tms.sup_name
                ,t.out_status
         FROM dkic_b.t_psi_outbound_item as t
+                 Left join dkic_b.t_mst_supplier tmp on t.sup_id = tmp.sup_id
                  left join dkic_b.t_mst_warehouse as tmw on tmw.wh_id = t.wh_id
                  left join dkic_b.t_mst_supplier as tms on t.sup_id = tms.sup_id
                  left join dkic_b.t_psi_order_item as tpoi on tpoi.item_id = t.from_item_id
@@ -534,7 +537,7 @@ sys.f_remove_zero(out_qty) as out_qty, out_amt, sys.f_remove_zero(return_qty) as
                t.item_index,
                t.sku_id,
                tmgs.sku_images,
-               tmgb.brand_name,
+               case when t.sku_id is null then tmp.sup_name || '(外协)' else  tmgb.brand_name end AS brand_name,
                tmgb.short_name,
                tmgs.sku_code                                                                         as "skuCode",
                case when t.sku_id is null then t.sku_model  else  tmgs.sku_model end                 as "skuModel",
@@ -569,6 +572,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_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_outbound_item as tpobi on tpobi.item_id = t.s_out_item_id
+                 Left join dkic_b.t_mst_supplier tmp on t.sup_id = tmp.sup_id
         where t.flg_valid
           and t.out_id = #{id}::uuid
         order by t.item_index

+ 10 - 1
src/main/java/com/dk/mdm/mapper/sale/OrderItemMapper.xml

@@ -414,11 +414,20 @@
                tpobi.remarks,
                t.wh_id,
                tmw.wh_name
-                ,(select ul.decimal_places from  dkic_b.t_mst_unit ul where dkic_b.t_psi_order_item.unit_id = ul.unit_id) as "decimalPlaces"
+                ,(select ul.decimal_places from  dkic_b.t_mst_unit ul where tpobi.unit_id = ul.unit_id) as "decimalPlaces"
+               ,tpobi.pack_box
+               ,tpobi.unit_id
+               ,tpobi.sub_unit_id
+               ,ul.unit_name as "unitName"
+               ,u2.unit_name as "subUnitName"
+               ,dkic_b.f_box_piece(u2.unit_name,ul.unit_name,tpobi.outing_box,tpobi.outing_piece) AS "outingBoxPiece"
+               ,dkic_b.f_box_piece(u2.unit_name,ul.unit_name,tpobi.out_box,tpobi.out_piece) AS "outBoxPiece"
         FROM dkic_b.t_psi_outbound_item as tpobi
                  inner join dkic_b.t_psi_order_item as t on t.item_id = tpobi.from_item_id
                  inner join dkic_b.t_mst_goods_sku tmgs on t.sku_id = tmgs.sku_id
                  left join dkic_b.t_mst_warehouse as tmw on tmw.wh_id = t.wh_id
+                 LEFT JOIN dkic_b.t_mst_unit AS ul ON tpobi.unit_id = ul.unit_id
+                 LEFT JOIN dkic_b.t_mst_unit AS u2 ON tpobi.sub_unit_id = u2.unit_id
         where tpobi.flg_valid
           and tpobi.out_type = '出库类型-销售出库'
           and tpobi.out_qty > tpobi.return_qty

+ 8 - 0
src/main/java/com/dk/mdm/model/response/sale/OrderItemResponse.java

@@ -374,6 +374,14 @@ public class OrderItemResponse extends PageInfo<OrderItemResponse> implements Se
     @ApiModelProperty(value = "辅助单位")
     private String subUnitName;
 
+    @Excel(name = "出库中箱数")
+    @ApiModelProperty(value = "出库中箱数")
+    private String outingBoxPiece;
+
+    @Excel(name = "已出库箱数")
+    @ApiModelProperty(value = "已出库箱数")
+    private String outBoxPiece;
+
     private static final long serialVersionUID = 1L;
 
 }