Преглед изворни кода

出入库添加基本单位,包装单位,包装

koushanshan пре 1 година
родитељ
комит
4563c4d50a

+ 29 - 5
src/main/java/com/dk/mdm/mapper/ivt/InboundItemMapper.xml

@@ -9,7 +9,8 @@
         into_status, intoing_qty, intoing_amt, into_qty, into_amt, return_qty, return_amt,
         remarks, inv_id, cost_price, cost_amt, out_qty, inv_qty, flg_valid, cp_id, op_create_time,
         op_create_user_id, op_update_time, op_update_user_id, op_app_code, op_timestamp, op_db_user,
-        s_into_id,s_into_item_id,s_pur_id,s_pur_item_id,intoing_box,intoing_piece,into_box,into_piece
+        s_into_id,s_into_item_id,s_pur_id,s_pur_item_id,intoing_box,intoing_piece,into_box,into_piece,
+        unit_id,sub_unit_id, pack_box
     </sql>
 
     <!-- response通用查询列 -->
@@ -18,7 +19,8 @@
         tpii.non_std_code, tpii.into_status, tpii.intoing_qty, tpii.intoing_amt, tpii.into_qty, tpii.into_amt, tpii.return_qty,
         tpii.return_amt, tpii.remarks, tpii.inv_id, tpii.cost_price, tpii.cost_amt, tpii.out_qty, tpii.inv_qty, tpii.flg_valid,
         tpii.cp_id,tpii.s_into_id,tpii.s_into_item_id,tpii.s_pur_id,tpii.s_pur_item_id,
-        tpii.intoing_box,tpii.intoing_piece,tpii.into_box,tpii.into_piece
+        tpii.intoing_box,tpii.intoing_piece,tpii.into_box,tpii.into_piece,
+        tpii.unit_id,tpii.sub_unit_id,tpii.pack_box
     </sql>
 
 
@@ -103,6 +105,8 @@
         <result column="intoing_piece" property="intoingPiece" />
         <result column="into_box" property="intoBox" />
         <result column="into_piece" property="intoPiece" />
+        <result column="unit_id" property="unitId"/>
+        <result column="sub_unit_id" property="subUnitId"/>
         <result column="pack_box" property="packBox"/>
     </resultMap>
 <!--    退货用-->
@@ -156,7 +160,13 @@
         <result column="intoing_piece" property="intoingPiece" />
         <result column="into_box" property="intoBox" />
         <result column="into_piece" property="intoPiece" />
-
+        <result column="unit_id" property="unitId"/>
+        <result column="unit_code" property="unitCode"/>
+        <result column="unit_name" property="unitName"/>
+        <result column="sub_unit_id" property="subUnitId"/>
+        <result column="sub_unit_code" property="subUnitCode"/>
+        <result column="sub_unit_name" property="subUnitName"/>
+        <result column="pack_box" property="packBox"/>
     </resultMap>
 
     <!-- 通用条件列 -->
@@ -387,7 +397,8 @@
         tpii.intoing_box,
         tpii.intoing_piece,
         tpii.into_box,
-        tpii.into_piece
+        tpii.into_piece,
+        tpii.pack_box
     </sql>
     <sql id="Base_Column_List_Response_Out">
         tpoi.item_id,
@@ -415,7 +426,8 @@
         tpoi.outing_box as intoing_box,
         tpoi.outing_piece as intoing_piece,
         tpoi.out_box as into_box,
-        tpoi.out_piece as into_piece
+        tpoi.out_piece as into_piece,
+        tpoi.pack_box
     </sql>
     <!--条件查询 web端入库办理用-->
     <select id="selectInboundItem" resultMap="BaseResultMapResponse">
@@ -428,6 +440,10 @@
         ,tmgb.brand_name  as "brandName"
         ,tmgb.short_name  as "shortName"
         ,tmw.wh_name as "whName"
+        ,tmu.unit_code as "unitCode"
+        ,tmu.unit_name as "unitName"
+        ,tmu2.unit_code as "subUnitCode"
+        ,tmu2.unit_name as "subUnitName"
         FROM dkic_b.t_psi_inbound_item tpii
         <include refid="Select_Inbound_Join_Table_Into"/>
         <where>
@@ -446,6 +462,10 @@
         ,tmgb.brand_name  as "brandName"
         ,tmgb.short_name  as "shortName"
         ,null as "whName"
+        ,tmu.unit_code as "unitCode"
+        ,tmu.unit_name as "unitName"
+        ,tmu2.unit_code as "subUnitCode"
+        ,tmu2.unit_name as "subUnitName"
         from dkic_b.t_psi_outbound_item tpoi
         <include refid="Select_Inbound_Join_Table_Out"/>
         <where>
@@ -461,11 +481,15 @@
         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 = tpii.inv_id
         left join dkic_b.t_mst_warehouse tmw on tmw.wh_id = tpii.wh_id
+        left join dkic_b.t_mst_unit tmu on tmu.unit_id = tpii.unit_id
+        left join dkic_b.t_mst_unit tmu2 on tmu2.unit_id = tpii.unit_id
     </sql>
     <sql id="Select_Inbound_Join_Table_Out">
         left join dkic_b.t_mst_goods_sku tmgs on tmgs.sku_id = tpoi.sku_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 = tpoi.inv_id
+        left join dkic_b.t_mst_unit tmu on tmu.unit_id = tpoi.unit_id
+        left join dkic_b.t_mst_unit tmu2 on tmu2.unit_id = tpoi.sub_unit_id
     </sql>
 
 

+ 31 - 8
src/main/java/com/dk/mdm/mapper/ivt/OutboundItemMapper.xml

@@ -10,19 +10,18 @@
         out_status, outing_qty, outing_amt, out_qty, out_amt, return_qty, return_amt, remarks,
         inv_id, cost_price, cost_amt, flg_valid, cp_id, op_create_time, op_create_user_id,
         op_update_time, op_update_user_id, op_app_code, op_timestamp, op_db_user,
-        s_out_id,s_out_item_id,s_order_id,s_order_item_id,outing_box,outing_piece,out_box,out_piece
+        s_out_id,s_out_item_id,s_order_id,s_order_item_id,outing_box,outing_piece,out_box,out_piece,
+        unit_id,sub_unit_id, pack_box
     </sql>
 
     <sql id="Base_Column_List_Response">
-        tpoi
-        .
-        item_id
-        , tpoi.out_id, tpoi.out_type, tpoi.from_id, tpoi.from_item_id, tpoi.item_index,
+        tpoi.item_idY, tpoi.out_id, tpoi.out_type, tpoi.from_id, tpoi.from_item_id, tpoi.item_index,
         tpoi.sku_id, tpoi.price_out, tpoi.non_std_code, tpoi.out_status, tpoi.outing_qty, tpoi.outing_amt,
         tpoi.out_qty, tpoi.out_amt, tpoi.return_qty, tpoi.return_amt, tpoi.remarks, tpoi.inv_id,
         tpoi.cost_price, tpoi.cost_amt, tpoi.flg_valid, tpoi.cp_id,
         tpoi.s_out_id,tpoi.s_out_item_id,tpoi.s_order_id,tpoi.s_order_item_id,
-        tpoi.outing_box,tpoi.outing_piece,tpoi.out_box,tpoi.out_piece
+        tpoi.outing_box,tpoi.outing_piece,tpoi.out_box,tpoi.out_piece,
+        tpoi.unit_id,tpoi.sub_unit_id,tpoi.pack_box
     </sql>
 
     <!-- 通用查询映射结果 -->
@@ -64,6 +63,9 @@
         <result column="outing_piece" property="outingPiece"/>
         <result column="out_box" property="outBox"/>
         <result column="out_piece" property="outPiece"/>
+        <result column="unit_id" property="unitId"/>
+        <result column="sub_unit_id" property="subUnitId"/>
+        <result column="pack_box" property="packBox"/>
     </resultMap>
 
     <!-- 通用查询映射结果 -->
@@ -113,6 +115,13 @@
         <result column="outing_piece" property="outingPiece"/>
         <result column="out_box" property="outBox"/>
         <result column="out_piece" property="outPiece"/>
+        <result column="unit_id" property="unitId"/>
+        <result column="unit_code" property="unitCode"/>
+        <result column="unit_name" property="unitName"/>
+        <result column="sub_unit_id" property="subUnitId"/>
+        <result column="sub_unit_code" property="subUnitCode"/>
+        <result column="sub_unit_name" property="subUnitName"/>
+        <result column="pack_box" property="packBox"/>
     </resultMap>
 
     <!-- 通用条件列 -->
@@ -526,7 +535,8 @@
         tpoi.outing_box,
         tpoi.outing_piece,
         tpoi.out_box,
-        tpoi.out_piece
+        tpoi.out_piece,
+        tpoi.pack_box
     </sql>
     <sql id="Base_Column_List_Response_Into">
         tpii.item_id ,
@@ -552,7 +562,8 @@
         tpii.intoing_box as outing_box,
         tpii.intoing_piece as outing_piece,
         tpii.into_box as out_box,
-        tpii.into_piece as out_piece
+        tpii.into_piece as out_piece,
+        tpii.pack_box
     </sql>
     <!--条件查询 web端出库办理用-->
     <select id="selectOutboundItem" resultMap="BaseResultMapResponse">
@@ -564,6 +575,10 @@
         ,tmgs.sku_spec as "skuSpec"
         ,tmgb.brand_name as "brandName"
         ,tmgb.short_name as "shortName"
+        ,tmu.unit_code as "unitCode"
+        ,tmu.unit_name as "unitName"
+        ,tmu2.unit_code as "subUnitCode"
+        ,tmu2.unit_name as "subUnitName"
         from dkic_b.t_psi_outbound_item tpoi
         <include refid="Select_Inbound_Join_Table_Out"/>
         <where>
@@ -581,6 +596,10 @@
         ,tmgs.sku_spec as "skuSpec"
         ,tmgb.brand_name as "brandName"
         ,tmgb.short_name as "shortName"
+        ,tmu.unit_code as "unitCode"
+        ,tmu.unit_name as "unitName"
+        ,tmu2.unit_code as "subUnitCode"
+        ,tmu2.unit_name as "subUnitName"
         FROM dkic_b.t_psi_inbound_item tpii
         <include refid="Select_Inbound_Join_Table_Into"/>
         <where>
@@ -595,11 +614,15 @@
         left join dkic_b.t_mst_goods_sku tmgs on tmgs.sku_id = tpoi.sku_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 = tpoi.inv_id
+        left join dkic_b.t_mst_unit tmu on tmu.unit_id = tpoi.unit_id
+        left join dkic_b.t_mst_unit tmu2 on tmu2.unit_id = tpoi.sub_unit_id
     </sql>
     <sql id="Select_Inbound_Join_Table_Into">
         left join dkic_b.t_mst_goods_sku tmgs on tmgs.sku_id = tpii.sku_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 = tpii.inv_id
+        left join dkic_b.t_mst_unit tmu on tmu.unit_id = tpii.unit_id
+        left join dkic_b.t_mst_unit tmu2 on tmu2.unit_id = tpii.unit_id
     </sql>
 
     <!--修改出库明细成本单价 金额 -->

+ 14 - 0
src/main/java/com/dk/mdm/model/pojo/ivt/InboundItem.java

@@ -344,6 +344,20 @@ public class InboundItem extends PageInfo<InboundItem> implements Serializable {
     @ApiModelProperty(value = "片(已入库)")
     private  Integer intoPiece;
 
+    @Excel(name = "基本单位")
+    @ApiModelProperty(value = "基本单位")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String unitId;
+
+    @Excel(name = "包装单位")
+    @ApiModelProperty(value = "包装单位")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String subUnitId;
+
+    @Excel(name = "包装")
+    @ApiModelProperty(value = "包装")
+    private Integer packBox;
+
 
 
     private static final long serialVersionUID = 1L;

+ 15 - 0
src/main/java/com/dk/mdm/model/pojo/ivt/OutboundItem.java

@@ -321,6 +321,21 @@ public class OutboundItem extends PageInfo<OutboundItem> implements Serializable
     @ApiModelProperty(value = "片(已出库)")
     private  Integer outPiece;
 
+    @Excel(name = "基本单位")
+    @ApiModelProperty(value = "基本单位")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String unitId;
+
+    @Excel(name = "包装单位")
+    @ApiModelProperty(value = "包装单位")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String subUnitId;
+
+    @Excel(name = "包装")
+    @ApiModelProperty(value = "包装")
+    private Integer packBox;
+
+
 
     private static final long serialVersionUID = 1L;
 

+ 31 - 6
src/main/java/com/dk/mdm/model/response/ivt/InboundItemResponse.java

@@ -26,12 +26,7 @@ public class InboundItemResponse  {
     /*
      * 数据库字段
      */
-    /**
-     * 包装
-     */
-    @Excel(name = "包装")
-    @ApiModelProperty(value = "包装")
-    private Integer packBox;
+
     /**
      * 明细ID
      */
@@ -283,6 +278,20 @@ public class InboundItemResponse  {
     @ApiModelProperty(value = "片(已入库)")
     private  Integer intoPiece;
 
+    @Excel(name = "基本单位")
+    @ApiModelProperty(value = "基本单位")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String unitId;
+
+    @Excel(name = "包装单位")
+    @ApiModelProperty(value = "包装单位")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String subUnitId;
+
+    @Excel(name = "包装")
+    @ApiModelProperty(value = "包装")
+    private Integer packBox;
+
 
 
     /**
@@ -451,6 +460,22 @@ public class InboundItemResponse  {
     @ApiModelProperty(value = "供应商名称")
     private String supName;
 
+    @Excel(name = "基本单位编码")
+    @ApiModelProperty(value = "基本单位编码")
+    private String unitCode;
+
+    @Excel(name = "基本单位名称")
+    @ApiModelProperty(value = "基本单位名称")
+    private String unitName;
+
+    @Excel(name = "包装单位编码")
+    @ApiModelProperty(value = "包装单位编码")
+    private String subUnitCode;
+
+    @Excel(name = "包装单位名称")
+    @ApiModelProperty(value = "包装单位名称")
+    private String subUnitName;
+
 
 
     private static final long serialVersionUID = 1L;

+ 31 - 0
src/main/java/com/dk/mdm/model/response/ivt/OutboundItemResponse.java

@@ -220,6 +220,19 @@ public class OutboundItemResponse {
     @ApiModelProperty(value = "片(已出库)")
     private  Integer outPiece;
 
+    @Excel(name = "基本单位")
+    @ApiModelProperty(value = "基本单位")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String unitId;
+
+    @Excel(name = "包装单位")
+    @ApiModelProperty(value = "包装单位")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String subUnitId;
+
+    @Excel(name = "包装")
+    @ApiModelProperty(value = "包装")
+    private Integer packBox;
 
 
     /**
@@ -331,6 +344,24 @@ public class OutboundItemResponse {
     @TableField(typeHandler = JsonTypeHandler.class)
     private JSONArray skuImages;
 
+
+    @Excel(name = "基本单位编码")
+    @ApiModelProperty(value = "基本单位编码")
+    private String unitCode;
+
+    @Excel(name = "基本单位名称")
+    @ApiModelProperty(value = "基本单位名称")
+    private String unitName;
+
+    @Excel(name = "包装单位编码")
+    @ApiModelProperty(value = "包装单位编码")
+    private String subUnitCode;
+
+    @Excel(name = "包装单位名称")
+    @ApiModelProperty(value = "包装单位名称")
+    private String subUnitName;
+
+
     private static final long serialVersionUID = 1L;
 
 }

+ 12 - 0
src/main/java/com/dk/mdm/model/vo/ivt/InboundItemVO.java

@@ -1,5 +1,6 @@
 package com.dk.mdm.model.vo.ivt;
 
+import cn.afterturn.easypoi.excel.annotation.Excel;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.dk.common.infrastructure.handler.UuidTypeHandler;
 import com.fasterxml.jackson.annotation.JsonProperty;
@@ -230,6 +231,17 @@ public class InboundItemVO  {
     @ApiModelProperty(value = "片(已入库)")
     private  Integer intoPiece;
 
+    @ApiModelProperty(value = "基本单位")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String unitId;
+
+    @ApiModelProperty(value = "包装单位")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String subUnitId;
+
+    @ApiModelProperty(value = "包装")
+    private Integer packBox;
+
 
 
     /*

+ 12 - 0
src/main/java/com/dk/mdm/model/vo/ivt/OutboundItemVO.java

@@ -255,6 +255,18 @@ public class OutboundItemVO {
     @TableField(typeHandler = UuidTypeHandler.class)
     private String supId;
 
+    @ApiModelProperty(value = "基本单位")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String unitId;
+
+    @ApiModelProperty(value = "包装单位")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String subUnitId;
+
+    @ApiModelProperty(value = "包装")
+    private Integer packBox;
+
+
 
 
     private static final long serialVersionUID = 1L;