Commit 88983e77 authored by 张永's avatar 张永

1

parent c16a1347
...@@ -248,7 +248,8 @@ public class OrderServiceImpl implements OrderService { ...@@ -248,7 +248,8 @@ public class OrderServiceImpl implements OrderService {
} }
List<Map<String, Object>> orderDtlList = new ArrayList<Map<String, Object>>(); List<Map<String, Object>> orderDtlList = new ArrayList<Map<String, Object>>();
if (orderMap.size() > 0) { if (orderMap.size() > 0) {
String sql2 = "select sod.*,sos.nSendQty, PromoSalePrice=CONVERT(NUMERIC(12,2),ROUND((sod.nSaleAmount)/sod.nSaleQty,2)),OriginaSaleAmount=sod.nSaleAmount+sod.nDisAmount,ISGift = sod.nTag&1," String sql2 = "select sod.*, sos.nSendQty, PromoSalePrice = CONVERT(NUMERIC(12,2),ROUND((sod.nSaleAmount)/sod.nSaleQty,2)), "
+ " OriginaSaleAmount = sod.nSaleAmount + sod.nDisAmount, ISGift = sod.nTag&1, "
+ " agp.sURL, pm.sPromoName, pm.sPromoTheme, pm.sPromoActionType sPromoType, pm.sPromoActionTypeID sPromoTypeID " + " agp.sURL, pm.sPromoName, pm.sPromoTheme, pm.sPromoActionType sPromoType, pm.sPromoActionTypeID sPromoTypeID "
+ " from tSalesOrderDtl sod left join (select a.sPromoPaperNO, a.sPromoName, a.sPromoTheme, a.sPromoActionTypeID, a.sPromoActionType, b.nGoodsID " + " from tSalesOrderDtl sod left join (select a.sPromoPaperNO, a.sPromoName, a.sPromoTheme, a.sPromoActionTypeID, a.sPromoActionType, b.nGoodsID "
+ " from tYWPromoMain a, tYWPromoDtl b " + " from tYWPromoMain a, tYWPromoDtl b "
...@@ -257,8 +258,11 @@ public class OrderServiceImpl implements OrderService { ...@@ -257,8 +258,11 @@ public class OrderServiceImpl implements OrderService {
+ " and a.nTag&1=0 " + " and a.nTag&1=0 "
+ " and b.nTag&1=0 " + " and b.nTag&1=0 "
+ " ) pm on pm.sPromoPaperNO = sod.sPromoPaperNO and pm.nGoodsID = sod.nGoodsID " + " ) pm on pm.sPromoPaperNO = sod.sPromoPaperNO and pm.nGoodsID = sod.nGoodsID "
+ " left join V_GetminAgentGoodsPic agp on agp.nAgentID = sod.nAgentID and agp.nGoodsID = sod.nGoodsID and agp.sPicTypeID = 1" + " left join V_GetminAgentGoodsPic agp on agp.nAgentID = sod.nAgentID and agp.nGoodsID = sod.nGoodsID and agp.sPicTypeID = 1 "
+ " left join tSalesOrderSubDtl sos on sos.sSalesOrderID = sod.sSalesOrderID and sos.nGoodsID = sod.nGoodsID " + " left join tSalesOrderSubDtl sos on sos.sSalesOrderID = sod.sSalesOrderID "
+ " and sos.sAgentContractNO = sod.sAgentContractNO "
+ " and sos.nGoodsID = sod.nGoodsID "
+ " and (sos.nTag&1 = sod.nTag&1 or sos.nTag&1-1 = sod.nTag&1-1) "
+ " where sod.sSalesOrderID = ?"; + " where sod.sSalesOrderID = ?";
orderDtlList = jdbcTemplate.queryForList(sql2, salesOrderId); orderDtlList = jdbcTemplate.queryForList(sql2, salesOrderId);
} }
......
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