dongke 1 anno fa
parent
commit
e65a36c0f7

+ 4 - 0
src/main/java/com/dk/mdm/mapper/ivt/OutboundMapper.xml

@@ -196,6 +196,7 @@
     <!-- 通用条件列 -->
     <sql id="Condition">
         <where>
+
             <if test="outNo != null and outNo != ''">
                 AND t.out_no LIKE concat('%',my_ex.likequery(#{outNo}),'%')
             </if>
@@ -222,6 +223,9 @@
             <if test="orgName != null and orgName != ''">
                 AND tmo.org_name LIKE concat('%',my_ex.likequery(#{orgName}),'%')
             </if>
+            <if test="addressFull != null and addressFull != ''">
+                AND  tmc.address_full  LIKE concat('%',my_ex.likequery(#{addressFull}),'%')
+            </if>
             <if test="supName != null and supName != ''">
                 AND tmp.sup_name LIKE concat('%',my_ex.likequery(#{supName}),'%')
             </if>

+ 27 - 0
src/main/java/com/dk/mdm/mapper/mst/GoodsSkuMapper.xml

@@ -76,6 +76,13 @@
         <result column="inventoryCount" property="inventoryCount"/>
         <result column="subUnitName" property="subUnitName"/>
         <result column="unitName" property="unitName"/>
+        <result column="wh_id" property="whId" typeHandler="UuidTypeHandler"/>
+        <result column="wh_name" property="whName"/>
+        <result column="non_std_code" property="nonStdCode"/>
+        <result column="inv_qty" property="invQty"/>
+        <result column="cost_price" property="costPrice"/>
+        <result column="priceInto" property="priceInto"/>
+        <result column="intoQty" property="intoQty"/>
     </resultMap>
 
     <!-- 通用条件列 -->
@@ -203,7 +210,27 @@
         ,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
+        ,tpiid.wh_id,
+        tpiid.wh_name,
+        tpiid.non_std_code,
+        tpiid.inv_qty as "intoQty",
+        tpiid.cost_price  as "priceInto"
         FROM dkic_b.t_mst_goods_sku  tmgs
+        LEFT JOIN (
+        SELECT
+        tpii.sku_id,
+        tmwitem.wh_id,
+        tmwitem.wh_name,
+        tpivt.non_std_code,
+        tpivt.inv_qty,
+        tpivt.cost_price
+        FROM
+        dkic_b.t_psi_inbound_item tpii
+        LEFT JOIN dkic_b.t_psi_inventory tpivt ON tpii.inv_id = tpivt.inv_id
+        LEFT JOIN dkic_b.t_mst_warehouse tmwitem ON tpivt.wh_id = tmwitem.wh_id
+        WHERE
+        tpii.into_type = '入库类型-期初入库'
+        ) tpiid ON tpiid.sku_id = tmgs.sku_id
         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
         LEFT JOIN dkic_b.t_mst_unit tmu ON tmu.unit_id = tmgs.unit_id

+ 1 - 0
src/main/java/com/dk/mdm/model/query/ivt/OutboundQuery.java

@@ -41,6 +41,7 @@ public class OutboundQuery extends PageInfo<OutboundQuery> {
     @TableField(typeHandler = UuidTypeHandler.class)
     private String outId;
 
+    private String addressFull;
 
     /**
      * 出库单号

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

@@ -324,7 +324,46 @@ public class GoodsSkuResponse implements Serializable {
     @TableField(exist = false)
     @ApiModelProperty(value = "可售量")
     private Integer usableQty;
+    /**
+     * 仓库ID
+     */
+    @Excel(name = "仓库ID")
+    @ApiModelProperty(value = "仓库ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String whId;
+    /**
+     * 组织仓库
+     */
+    @Excel(name = "组织仓库")
+    @ApiModelProperty(value = "组织仓库")
+    private String whName;
+    /**
+     * 非标号
+     */
+    @Excel(name = "非标号")
+    @ApiModelProperty(value = "非标号")
+    private String nonStdCode;
+    /**
+     * 库存数量
+     */
+    @Excel(name = "库存数量")
+    @ApiModelProperty(value = "库存数量")
+    private BigDecimal invQty;
+
+    /**
+     * 成本单价
+     */
+    @ApiModelProperty(value = "成本单价")
+    private BigDecimal costPrice;
 
+    @ApiModelProperty(value = "")
+    private BigDecimal priceInto;
+
+    /**
+     * 已入库数量
+     */
+    @ApiModelProperty(value = "已入库数量")
+    private BigDecimal intoQty;
 
     /*
      * 相关属性