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

1

parent 522c4640
...@@ -938,7 +938,7 @@ public class OrderServiceImpl implements OrderService { ...@@ -938,7 +938,7 @@ public class OrderServiceImpl implements OrderService {
+ " and a.nOrderStatus&1 = 0 " + " and a.nOrderStatus&1 = 0 "
+ " and (a.nOrderStatus&16=16 or nOrderStatus&4=0) " + " and (a.nOrderStatus&16=16 or nOrderStatus&4=0) "
+ " and (datediff(dd, a.dOrderDate, getdate()) <= "+saleReturnDays+" or "+saleReturnDays+" = 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=平台确认*/ }else if (refundStatus == 2) { /*查询指定状态订单:2=平台确认*/
sql += " and a.sSalesOrderTypeID = '2' " sql += " and a.sSalesOrderTypeID = '2' "
+ " and isnull(a.sOldSubOrderID,'') <> '' " + " and isnull(a.sOldSubOrderID,'') <> '' "
...@@ -993,15 +993,15 @@ public class OrderServiceImpl implements OrderService { ...@@ -993,15 +993,15 @@ public class OrderServiceImpl implements OrderService {
" GoodsDesc = a.sGoodsDesc," + " GoodsDesc = a.sGoodsDesc," +
" Spec = ag.sSpec," + " Spec = ag.sSpec," +
" Unit = a.sUnit," + " Unit = a.sUnit," +
" SaleQty = case when b.sSalesOrderTypeID = '0' then a.nSaleQty else 0 end," + " SaleQty = case when b.sSalesOrderTypeID = '0' then a.nSaleQty else 0 end," +
" SalePrice = a.nSalePrice," + " SalePrice = a.nSalePrice," +
" RealSalePrice = ag.nRealSalePrice," + " RealSalePrice = ag.nRealSalePrice," +
" SaleAmount = case when b.sSalesOrderTypeID = '0' then a.nSaleAmount else 0 end," + " SaleAmount = case when b.sSalesOrderTypeID = '0' then a.nSaleAmount else 0 end," +
" DisAmount = case when b.sSalesOrderTypeID = '0' then a.nDisAmount else 0 end," + " DisAmount = case when b.sSalesOrderTypeID = '0' then a.nDisAmount else 0 end," +
" PromoPaperNO = a.sPromoPaperNO," + " PromoPaperNO = a.sPromoPaperNO," +
" PromoActionTypeID = a.sPromoActionTypeID," + " PromoActionTypeID = a.sPromoActionTypeID," +
" ReturnQty = case when b.sSalesOrderTypeID = '0' then isnull(a.nReturnQty,0) else abs(a.nSaleQty) 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.nSaleQty - isnull(a.nReturnQty,0) else 0 end," + " LeftRefundQty = case when b.sSalesOrderTypeID = '0' then a.nSendQty - isnull(a.nReturnQty,0) else 0 end," +
" Memo = a.sMemo," + " Memo = a.sMemo," +
" Tag = a.nTag," + " Tag = a.nTag," +
" GoodsURL = gp.sURL " " 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