于继渤 1 год назад
Родитель
Сommit
f035162901

+ 3 - 1
src/main/java/com/dk/mdm/mapper/ivt/InboundMapper.xml

@@ -154,6 +154,7 @@
     <resultMap id="inboundItemListMap" type="java.util.Map">
         <result column="item_id" property="itemId" typeHandler="UuidTypeHandler"/>
         <result column="into_id" property="intoId" typeHandler="UuidTypeHandler"/>
+        <result column="into_no" property="intoNo" typeHandler="UuidTypeHandler"/>
         <result column="into_type" property="intoType"/>
         <result column="from_id" property="fromId" typeHandler="UuidTypeHandler"/>
         <result column="from_item_id" property="fromItemId" typeHandler="UuidTypeHandler"/>
@@ -503,6 +504,7 @@
         AS list_item_id,
         tpii.item_id  AS list_into_item_Id,
         tpii.into_id AS list_into_id,
+        tpi.into_no AS list_into_no,
         tpii.into_type AS list_into_type,
         tpii.from_id AS list_from_id,
         tpii.from_item_id AS list_from_item_id,
@@ -1066,7 +1068,7 @@
         Left join dkic_b.t_mst_warehouse tmw on tmw.wh_id = tpi.wh_id
         left join dkic_b.t_mst_dictionary_data tmd on tmd.data_id = tpi.into_reason
         left join dkic_b.t_mac_account_item tmai on tmai.item_id = tpi.receivable_id
-        WHERE tpi.into_id = #{intoId}::uuid AND tpi.flg_valid = true
+        WHERE tpi.into_id = #{id}::uuid AND tpi.flg_valid = true
     </select>
 
 

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

@@ -1260,7 +1260,9 @@
             tmgs.sku_code  as "skuCode",
             tmgs.sku_model as "skuModel",
             tmgs.sku_name  as "skuName",
+            tmgb.brand_name AS "brandName",
             t.item_qty AS "itemQty",
+            sys.f_get_name_i18n(tdk3.kind_name_i18n, #{i18n}) as "outStatusName",
             t.price_std AS "priceStd",
             t.amt_std AS "amtStd",
             t.price_sale AS "priceSale",
@@ -1276,10 +1278,20 @@
             t.return_amt AS "returnAmt",
             t.remarks,
             t.wh_id AS "whId",
-            tmw.wh_name AS "whName"
+            tmw.wh_name AS "whName",
+            tpo.order_no AS "orderNo",
+            tpo.make_time AS "makeTime",
+             tmc.cus_id AS "cusId",
+             tmc.cus_code AS "cusCode",
+             tmc.cus_name AS "cusName",
+             tmc.cus_phone AS "cusPhone"
         FROM dkic_b.t_psi_order_item as t
+        inner join dkic_b.t_psi_order tpo on tpo.order_id = t.order_id
         inner join dkic_b.t_mst_goods_sku tmgs on t.sku_id = tmgs.sku_id
         left join dkic_b.t_mst_warehouse tmw on tmw.wh_id = t.wh_id
+        left join dkic_b.t_mst_customer tmc on tmc.cus_id = tpo.cus_id
+        LEFT JOIN dkic_b.t_mst_goods_brand tmgb ON tmgb.brand_id = tmgs.brand_id
+        left join sys.t_data_kind as tdk3 on tpo.out_status = tdk3.kind_code
         <include refid="ConditionSaleItem"/>
         order by t.item_index
         <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
@@ -1355,7 +1367,7 @@
     <select id="getSalesItemReportCount" resultType="java.lang.Long">
         SELECT count(1)
         FROM
-        FROM dkic_b.t_psi_order_item t
+         dkic_b.t_psi_order_item t
         <include refid="ConditionSaleItem"/>
     </select>