Commit 7496b102 authored by 张永's avatar 张永

1

parent 522c4640
......@@ -938,7 +938,7 @@ public class OrderServiceImpl implements OrderService {
+ " and a.nOrderStatus&1 = 0 "
+ " and (a.nOrderStatus&16=16 or nOrderStatus&4=0) "
+ " and (datediff(dd, a.dOrderDate, getdate()) <= "+saleReturnDays+" or "+saleReturnDays+" = 0) "
+ " and exists(select 1 from tSalesOrderSubDtl where sSubOrderID = a.sSubOrderID and (nSaleQty - isnull(nReturnQty,0)) > 0) ";
+ " and exists(select 1 from tSalesOrderSubDtl where sSubOrderID = a.sSubOrderID and (nSendQty - isnull(nReturnQty,0)) > 0) ";
}else if (refundStatus == 2) { /*查询指定状态订单:2=平台确认*/
sql += " and a.sSalesOrderTypeID = '2' "
+ " and isnull(a.sOldSubOrderID,'') <> '' "
......@@ -1000,8 +1000,8 @@ public class OrderServiceImpl implements OrderService {
" DisAmount = case when b.sSalesOrderTypeID = '0' then a.nDisAmount else 0 end," +
" PromoPaperNO = a.sPromoPaperNO," +
" PromoActionTypeID = a.sPromoActionTypeID," +
" ReturnQty = case when b.sSalesOrderTypeID = '0' then isnull(a.nReturnQty,0) else abs(a.nSaleQty) end," +
" LeftRefundQty = case when b.sSalesOrderTypeID = '0' then a.nSaleQty - isnull(a.nReturnQty,0) else 0 end," +
" 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," +
" Memo = a.sMemo," +
" Tag = a.nTag," +
" GoodsURL = gp.sURL "
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment