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