Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
S
shop
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
曲欣亮
shop
Commits
0850230c
Commit
0850230c
authored
Jun 26, 2023
by
张永
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
需求 #15246
parent
58889776
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
7 deletions
+14
-7
OrderServiceImpl.java
...ava/com/egolm/shop/api/service/impl/OrderServiceImpl.java
+14
-7
No files found.
src/main/java/com/egolm/shop/api/service/impl/OrderServiceImpl.java
View file @
0850230c
...
...
@@ -1001,12 +1001,13 @@ public class OrderServiceImpl implements OrderService {
String
sql
=
"select "
+
" SalesOrderID = a.sSalesOrderID, "
+
" SubOrderID = a.sSubOrderID, "
+
" OrderDate = a.dOrderDate, "
+
" SalesOrderTypeID = a.sSalesOrderTypeID,"
+
" SalesOrderType = a.sSalesOrderType,"
+
" TotalSaleQty =
a.nTotalSaleQty
,"
+
" TotalSaleAmount =
a.nTotalSaleAmount,"
+
" TotalDisAmount = a.nTotalDisAmount
,"
+
" SalesOrderType = a.sSalesOrderType,"
+
" TotalSaleQty =
sum(b.nSaleQty/b.nOrderRate)
,"
+
" TotalSaleAmount =
sum(b.nSaleAmount),"
+
" TotalDisAmount = sum(b.nDisAmount)
,"
+
" DeliveryTypeID = a.sDeliveryTypeID,"
+
" DeliveryType = a.sDeliveryType,"
+
" Contacts = a.sContacts,"
+
" Mobile = a.sMobile,"
+
" Address = a.sAddress,"
+
" ExpressFee = a.nExpressFee,"
+
" OrderStatus = a.nOrderStatus,"
+
" OrderStatusName = a.nOrderStatusName,"
+
" OrderMemo = a.sOrderMemo"
+
" from tSalesOrderSub a "
+
" OrderStatusName = a.nOrderStatusName,"
+
" OrderMemo = a.sOrderMemo"
+
" "
+
" from tSalesOrderSub a join tSalesOrderSubDtl b on a.sSubOrderID = b.sSubOrderID "
+
" where a.sShopNO = '"
+
shopNo
+
"' "
;
if
(
refundStatus
==
1
)
{
/* 查询指定状态订单:1=申请售后 */
...
...
@@ -1025,6 +1026,11 @@ public class OrderServiceImpl implements OrderService {
sql
+=
" and a.sSalesOrderTypeID = '2' "
+
" and isnull(a.sOldSubOrderID,'') <> '' "
+
" and a.nOrderStatus&1=0 "
+
" and a.nOrderStatus&16=16 "
;
}
sql
+=
" group by a.sSalesOrderID, a.sSubOrderID, a.dOrderDate, a.sSalesOrderTypeID, a.sSalesOrderType, "
+
" a.sDeliveryTypeID, a.sDeliveryType, a.sContacts, a.sMobile, a.sAddress, a.nExpressFee, "
+
" a.nOrderStatus, a.nOrderStatusName, a.sOrderMemo "
+
" order by a.dOrderDate DESC "
;
List
<
Map
<
String
,
Object
>>
orderList
=
jdbcTemplate
.
limit
(
sql
,
page
);
sortList
.
addAll
(
orderList
);
...
...
@@ -1062,15 +1068,16 @@ public class OrderServiceImpl implements OrderService {
+
" GoodsID = a.nGoodsID,"
+
" GoodsNO = ag.sGoodsNO,"
+
" GoodsDesc = a.sGoodsDesc,"
+
" Spec = ag.sSpec,"
+
" Unit = a.sUnit,"
+
" SaleQty = case when b.sSalesOrderTypeID = '0' then a.nSaleQty else 0 end,"
+
" SalePrice = a.nSalePrice,"
+
" RealSalePrice = ag.nRealSalePrice,"
+
" SaleQty = case when b.sSalesOrderTypeID = '0' then a.nSaleQty/a.nOrderRate else 0 end, "
+
" SalePrice = a.nSalePrice*a.nOrderRate, "
+
" RealSalePrice = a.nSalePrice*a.nOrderRate, "
+
" SaleAmount = case when b.sSalesOrderTypeID = '0' then a.nSaleAmount else 0 end,"
+
" DisAmount = case when b.sSalesOrderTypeID = '0' then a.nDisAmount else 0 end,"
+
" PromoSalePrice = CONVERT(NUMERIC(12,2),ROUND((a.nSaleAmount)/a.nSaleQty,2)),"
+
" OriginaSaleAmount = a.nSaleAmount+a.nDisAmount,"
+
" ISGift = a.nTag&1,"
+
" PromoPaperNO = a.sPromoPaperNO,"
+
" PromoActionTypeID = a.sPromoActionTypeID,"
+
" ReturnQty =
case when b.sSalesOrderTypeID = '0' then isnull(a.nReturnQty,0) else abs(a.nSendQty) end,
"
+
" LeftRefundQty =
case when b.sSalesOrderTypeID = '0' then a.nSendQty - isnull(a.nReturnQty,0) else 0 end,
"
+
" ReturnQty =
case when b.sSalesOrderTypeID = '0' then isnull(a.nReturnQty,0)/a.nOrderRate else abs(a.nSendQty)/a.nOrderRate end,
"
+
" LeftRefundQty =
case when b.sSalesOrderTypeID = '0' then (a.nSendQty - isnull(a.nReturnQty,0))/a.nOrderRate else 0 end,
"
+
" Memo = a.sMemo,"
+
" Tag = a.nTag,"
+
" GoodsURL = gp.sURL "
+
" from tSalesOrderSubDtl a join tSalesOrderSub b on a.sSubOrderID = b.sSubOrderID left join tAgentContractGoods ag on a.nAgentID = ag.nAgentID "
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment