Просмотр исходного кода

Merge remote-tracking branch 'origin/master'

songyang 1 год назад
Родитель
Сommit
c3923d08c6

+ 3 - 0
src/main/java/com/dk/mdm/mapper/common/CommonMapper.xml

@@ -480,6 +480,8 @@
         tmgs.unit_id           as "unitId",
         tmgu.unit_name         as "unitName",
         tmgs.sub_unit_id       as "subUnitId",
+        tmgus.unit_name         as "subUnitName",
+        tmgs.flg_sub_unit       as "flgSubUnit",
         tmgs.conversion_factor as "conversionFactor",
         tmgs.series_id         as "seriesId",
         tmgseries.series_name  as "seriesName",
@@ -496,6 +498,7 @@
         left join dkic_b.t_mst_goods_category as tmgc on tmgs.category_id = tmgc.cat_id
         left join dkic_b.t_mst_goods_series as tmgseries on tmgs.series_id = tmgseries.series_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
         where tmgs.flg_valid
         AND tmgs.cp_id = #{cpId}
         <if test="skuCode != null">

+ 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>
 
 

+ 14 - 0
src/main/java/com/dk/mdm/mapper/ivt/InventoryMapper.xml

@@ -61,6 +61,12 @@
                 <result column="price_standard" property="priceStandard"/>
                 <result column="price_wholesale" property="priceWholesale"/>
                 <result column="price_limited" property="priceLimited"/>
+        <result column="unit_id" property="unitId" typeHandler="UuidTypeHandler"/>
+        <result column="sub_unit_id" property="subUnitId" typeHandler="UuidTypeHandler"/>
+        <result column="pack_box" property="packBox"/>
+        <result column="subUnitName" property="subUnitName"/>
+        <result column="unitName" property="unitName"/>
+        <result column="flg_sub_unit" property="flgSubUnit"/>
         <result column="sku_images" property="skuImages" typeHandler="JsonTypeHandler"/>
 
     </resultMap>
@@ -141,6 +147,12 @@
         ,tmgs.price_wholesale
         ,tmgs.price_limited
         ,tmgs.sku_images
+        ,tmgs.unit_id
+        ,tmgs.sub_unit_id
+        ,tmgs.pack_box
+        ,tmu.unit_name    AS "unitName"
+        ,subtmu.unit_name AS "subUnitName"
+        ,tmgs.flg_sub_unit
         ,tmgb.brand_name
         ,tmgb.short_name
         ,tmw.wh_name
@@ -171,6 +183,8 @@
         left join dkic_b.t_mst_goods_sku tmgs on tmgs.sku_id = tpi.sku_id
         left join dkic_b.t_mst_warehouse tmw on tmw.wh_id = tpi.wh_id
         LEFT JOIN dkic_b.t_mst_goods_brand tmgb ON tmgb.brand_id = tmgs.brand_id
+        LEFT JOIN dkic_b.t_mst_unit tmu ON tmu.unit_id = tmgs.unit_id
+        LEFT JOIN dkic_b.t_mst_unit subtmu ON subtmu.unit_id = tmgs.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>
 
     <!--修改出库明细成本单价 金额 -->

+ 13 - 2
src/main/java/com/dk/mdm/mapper/mst/GoodsSkuMapper.xml

@@ -31,7 +31,10 @@
                 <result column="price_other" property="priceOther"/>
                 <result column="sku_images" property="skuImages" typeHandler="JsonTypeHandler"/>
                 <result column="remarks" property="remarks"/>
-                <result column="flg_valid" property="flgValid"/>
+        <result column="flg_valid" property="flgValid"/>
+        <result column="flg_sub_unit" property="flgSubUnit"/>
+        <result column="flg_opening_inv" property="flgOpeningInv"/>
+        <result column="flg_price" property="flgPrice"/>
                 <result column="cp_id" property="cpId"/>
             <result column="op_create_time" property="opCreateTime" typeHandler="TimestampTypeHandler"/>
                 <result column="op_create_user_id" property="opCreateUserId" typeHandler="UuidTypeHandler"/>
@@ -45,7 +48,7 @@
     <sql id="Base_Column_List_JOIN">
         tmgs.price_other,tmgs.sku_id, tmgs.sku_code, tmgs.sku_name, tmgs.sku_model, tmgs.brand_id, tmgs.category_id, tmgs.unit_id, tmgs.sub_unit_id,
               tmgs.conversion_factor, tmgs.series_id, tmgs.sku_spec, tmgs.price_purchase, tmgs.price_standard,
-           tmgs.pack_box,   tmgs.price_wholesale, tmgs.price_limited, tmgs.price_other,tmgs.sku_images, tmgs.remarks, tmgs.flg_valid, tmgs.cp_id
+           tmgs.pack_box,   tmgs.price_wholesale, tmgs.price_limited, tmgs.price_other,tmgs.sku_images, tmgs.remarks, tmgs.flg_valid, tmgs.flg_sub_unit,  tmgs.flg_opening_inv,  tmgs.flg_price,  tmgs.cp_id
     </sql>
     <resultMap id="BaseResultMapResponse" type="com.dk.mdm.model.response.mst.GoodsSkuResponse">
         <id column="sku_id" property="skuId"/>
@@ -70,6 +73,9 @@
         <result column="remarks" property="remarks"/>
         <result column="flg_valid" property="flgValid"/>
         <result column="cp_id" property="cpId"/>
+        <result column="inventoryCount" property="inventoryCount"/>
+        <result column="subUnitName" property="subUnitName"/>
+        <result column="unitName" property="unitName"/>
     </resultMap>
 
     <!-- 通用条件列 -->
@@ -162,8 +168,12 @@
         <include refid="Base_Column_List_JOIN"/>
         ,tmgb.short_name AS "shortName"
         ,tmgb.brand_name AS "brandName",tmgsr.series_name AS "seriesName"
+        ,tmgus.unit_name         as "subUnitName"
+        ,tmgu.unit_name         as "unitName"
         ,COALESCE((SELECT sum(tpi.usable_qty)  from dkic_b.t_psi_inventory tpi where tpi.sku_id = tmgs.sku_id and tpi.cp_id =  #{cpId} ),0) AS "usableQty"
         FROM dkic_b.t_mst_goods_sku  tmgs
+        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_goods_brand tmgb ON tmgb.brand_id = tmgs.brand_id
         LEFT JOIN dkic_b.t_mst_goods_series tmgsr ON tmgsr.series_id = tmgs.series_id
         <include refid="Condition"/>
@@ -192,6 +202,7 @@
         ,tmu.unit_name AS "unitName"
         ,subtmu.unit_name AS "subUnitName"
         ,tmgsr.series_name AS "seriesName"
+        ,(SELECT  count(1) FROM  dkic_b.t_psi_inventory tsic WHERE tsic.sku_id = tmgs.sku_id ) AS inventoryCount
         FROM dkic_b.t_mst_goods_sku  tmgs
         LEFT JOIN dkic_b.t_mst_goods_brand tmgb ON tmgb.brand_id = tmgs.brand_id
         LEFT JOIN dkic_b.t_mst_goods_category tmgc ON tmgc.cat_id = tmgs.category_id

+ 14 - 1
src/main/java/com/dk/mdm/mapper/pur/PurchaseItemMapper.xml

@@ -43,6 +43,9 @@
         tppi.from_item_id
         ,tppi.box
         ,tppi.piece
+        ,tppi.unit_id
+        ,tppi.sub_unit_id
+        ,tppi.pack_box
     </sql>
 
     <!-- 通用查询映射结果 -->
@@ -113,6 +116,11 @@
         <result column="box" property="box"/>
         <result column="piece" property="piece"/>
         <result column="pack_box" property="packBox"/>
+        <result column="unit_id" property="unitId"/>
+        <result column="sub_unit_id" property="subUnitId"/>
+        <result column="subUnitName" property="subUnitName"/>
+        <result column="unitName" property="unitName"/>
+        <result column="flg_sub_unit" property="flgSubUnit"/>
         <result column="skuImages" property="skuImages" typeHandler="JsonTypeHandler"/>
     </resultMap>
 
@@ -321,8 +329,13 @@
         i.inv_qty,
         i.usable_qty
         ,tpp.pur_no as "purNo"
-        ,tmgs.pack_box
+        ,tmgus.unit_name         as "subUnitName"
+        ,tmgu.unit_name         as "unitName"
+        ,tmgs.flg_sub_unit
         FROM dkic_b.t_psi_purchase_item tppi
+        left join dkic_b.t_mst_unit as tmgu on tppi.unit_id = tmgu.unit_id
+        left join dkic_b.t_mst_unit as tmgus on tppi.sub_unit_id = tmgus.unit_id
+
         left join(SELECT T.*
         FROM (select tpi.inv_id,
         tpi.wh_id,

+ 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;
 

+ 18 - 0
src/main/java/com/dk/mdm/model/pojo/mst/GoodsSku.java

@@ -48,6 +48,24 @@ public class GoodsSku extends PageInfo<GoodsSku> implements Serializable {
     private String skuId;
 
     /**
+     * 辅助单位标识
+     */
+    @Excel(name = "辅助单位标识")
+    @ApiModelProperty(value = "辅助单位标识")
+    private Boolean flgSubUnit;
+    /**
+     * 期初库存标识
+     */
+    @Excel(name = "期初库存标识")
+    @ApiModelProperty(value = "期初库存标识")
+    private Boolean flgOpeningInv;
+    /**
+     * 价格体系标识
+     */
+    @Excel(name = "价格体系标识")
+    @ApiModelProperty(value = "价格体系标识")
+    private Boolean flgPrice;
+    /**
      * 包装
      */
     @Excel(name = "包装")

+ 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;

+ 36 - 0
src/main/java/com/dk/mdm/model/response/ivt/InventoryResponse.java

@@ -229,6 +229,42 @@ public class InventoryResponse {
     private BigDecimal priceLimited;
 
 
+    /**
+     * 计量单位
+     */
+    @ApiModelProperty(value = "计量单位")
+    @TableField(exist = false,typeHandler = UuidTypeHandler.class)
+    private String unitId;
+
+
+    /**
+     * 辅助单位
+     */
+    @ApiModelProperty(value = "辅助单位")
+    @TableField(exist = false,typeHandler = UuidTypeHandler.class)
+    private String subUnitId;
+
+    @TableField(exist = false)
+    @ApiModelProperty(value = "计量单位")
+    private String unitName;
+
+    @TableField(exist = false)
+    @ApiModelProperty(value = "辅助单位")
+    private String subUnitName;
+
+    /**
+     * 包装
+     */
+    @TableField(exist = false)
+    @ApiModelProperty(value = "包装")
+    private Integer packBox;
+
+    /**
+     * 辅助单位标识
+     */
+    @TableField(exist = false)
+    @ApiModelProperty(value = "辅助单位标识")
+    private Boolean flgSubUnit;
 
 
 

+ 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;
 
 }

+ 24 - 0
src/main/java/com/dk/mdm/model/response/mst/GoodsSkuResponse.java

@@ -39,6 +39,12 @@ public class GoodsSkuResponse implements Serializable {
      * 数据库字段
      */
     /**
+     * 出库中数量
+     */
+    @Excel(name = "存货数量")
+    @ApiModelProperty(value = "存货数量")
+    private BigDecimal inventoryCount;
+    /**
      * 包装
      */
     @Excel(name = "包装")
@@ -53,6 +59,24 @@ public class GoodsSkuResponse implements Serializable {
     private String skuId;
 
     /**
+     * 辅助单位标识
+     */
+    @Excel(name = "辅助单位标识")
+    @ApiModelProperty(value = "辅助单位标识")
+    private Boolean flgSubUnit;
+    /**
+     * 期初库存标识
+     */
+    @Excel(name = "期初库存标识")
+    @ApiModelProperty(value = "期初库存标识")
+    private Boolean flgOpeningInv;
+    /**
+     * 价格体系标识
+     */
+    @Excel(name = "价格体系标识")
+    @ApiModelProperty(value = "价格体系标识")
+    private Boolean flgPrice;
+    /**
      * 批发价
      */
     @Excel(name = "其他价格")

+ 24 - 0
src/main/java/com/dk/mdm/model/response/pur/PurchaseItemResponse.java

@@ -48,6 +48,30 @@ public class PurchaseItemResponse extends PageInfo<PurchaseItemResponse> impleme
     @Excel(name = "包装")
     @ApiModelProperty(value = "包装")
     private Integer packBox;
+    @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 String unitName;
+
+    @Excel(name = "包装单位名称")
+    @ApiModelProperty(value = "包装单位名称")
+    private String subUnitName;
+    /**
+     * 辅助单位标识
+     */
+    @TableField(exist = false)
+    @ApiModelProperty(value = "辅助单位标识")
+    private Boolean flgSubUnit;
+
+
     /**
      * 明细ID
      */

+ 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;

+ 18 - 0
src/main/java/com/dk/mdm/model/vo/mst/GoodsSkuVO.java

@@ -229,6 +229,24 @@ public class GoodsSkuVO implements Serializable {
     @ApiModelProperty(value = "有效标识 (1:正常 0:停用)")
     private Boolean flgValid;
 
+    /**
+     * 辅助单位标识
+     */
+    @Excel(name = "辅助单位标识")
+    @ApiModelProperty(value = "辅助单位标识")
+    private Boolean flgSubUnit;
+    /**
+     * 期初库存标识
+     */
+    @Excel(name = "期初库存标识")
+    @ApiModelProperty(value = "期初库存标识")
+    private Boolean flgOpeningInv;
+    /**
+     * 价格体系标识
+     */
+    @Excel(name = "价格体系标识")
+    @ApiModelProperty(value = "价格体系标识")
+    private Boolean flgPrice;
 
     /**
      * 企业ID

+ 2 - 2
src/main/java/com/dk/mdm/service/mst/StaffService.java

@@ -273,10 +273,10 @@ public class StaffService extends BaseService<Staff> {
             List<SettingValue> settingValueList = new ArrayList<>();
             // 自动办理
             settingValueList.add(new SettingValue().setCpId(cpId).setSettingCode(Constant.SystemConstant.IVT_001.getValue())
-                    .setSettingValue("true"));
+                    .setSettingValue("false"));
             // 欠货销售
             settingValueList.add(new SettingValue().setCpId(cpId).setSettingCode(Constant.SystemConstant.IVT_002.getValue())
-                    .setSettingValue("true"));
+                    .setSettingValue("false"));
             settingValueMapper.insertBatch(settingValueList);
         }
         for (int i = 0; i < listRoles.size(); i++) {

+ 1 - 1
src/main/java/com/dk/mdm/service/sale/OrderService.java

@@ -340,7 +340,7 @@ public class OrderService extends BaseService<Order> {
         }
         /**************************************** 客户收款end ********************************/
         //开单并出库办理
-        if (orderVO.getOutboundProcessingFlag()){
+        if (orderVO.getOutboundProcessingFlag()!=null&& orderVO.getOutboundProcessingFlag()){
             for (OrderItemVO orderItemVO : orderVO.getItemList()) {
                 orderItemVO.setOutingQty(orderItemVO.getItemQty());
                 orderItemVO.setOutingAmt(orderItemVO.getItemAmt());