Browse Source

库存明细报错问题处理

liyuan 1 week ago
parent
commit
7144a1c7b7

+ 10 - 9
blade-service/gubersail-dealer-admin/src/main/java/com/gubersail/admin/order/mapper/OrderMapper.xml

@@ -88,14 +88,15 @@
     </select>
     <select id="stockDataDetailsOrder" resultType="com.gubersail.dealer.admin.api.excel.PjShipStockDetails">
         SELECT
-        ps.id as id,
-        ps.storage_id as stockId,
-        ps.ord_no AS billno,
-        ps.status AS statusName,
-        ps.create_time AS updateTime,
-        pgd.brand_item AS brandItem,
-        pgd.cname AS goodsName,
-        pgd.specification_and_model AS specificationAndModel,
+        ANY_VALUE(ps.id) AS id,
+        ANY_VALUE(ps.storage_id) AS stockId,
+        ANY_VALUE(ps.ord_no) AS billno,
+        ANY_VALUE(ps.STATUS) AS statusName,
+        ANY_VALUE(ps.create_time) AS updateTime,
+        ANY_VALUE(pgd.brand_item) AS brandItem,
+        ANY_VALUE(pgd.cname) AS goodsName,
+        ANY_VALUE(ps.busines_date) AS businesDate,
+        ANY_VALUE(pgd.specification_and_model) AS specificationAndModel,
         sum(psi.inventory) as totalNum,
         sum(if(psi.profit_loss_num,psi.profit_loss_num,0)) as profitLossNum
         FROM
@@ -122,7 +123,7 @@
         </if>
         GROUP BY
         ps.ord_no
-        ORDER BY ps.busines_date asc
+        ORDER BY businesDate asc
     </select>
     <select id="selectGoodsNumBySrcOrderNo" resultType="java.math.BigDecimal">
         SELECT

+ 3 - 1
blade-service/gubersail-dealer-admin/src/main/java/com/gubersail/admin/ship/mapper/ShipMapper.xml

@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<!--suppress ALL -->
 <mapper namespace="com.gubersail.admin.ship.mapper.ShipMapper">
 
     <!-- 通用查询映射结果 -->
@@ -47,6 +48,7 @@
         ANY_VALUE(ps.customer_name) AS corpName,
         ANY_VALUE(ps.status_name) AS statusName,
         ANY_VALUE(ps.create_time) AS updateTime,
+        any_value ( ps.busines_date ) AS businesDate,
         ANY_VALUE(pgd.brand_item) AS brandItem,
         ANY_VALUE(pgd.cname) AS goodsName,
         ANY_VALUE(pgd.specification_and_model) AS specificationAndModel,
@@ -142,7 +144,7 @@
         </if>
         GROUP BY
         ps.billno
-        ORDER BY ps.busines_date asc
+        ORDER BY businesDate asc
     </select>
 
 </mapper>