Commit 15585b06 authored by 张永's avatar 张永

需求 #14779

parent 2007e1a9
...@@ -222,11 +222,11 @@ public class OrderServiceImpl implements OrderService { ...@@ -222,11 +222,11 @@ 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.sPromoTheme, pm.sPromoActionType sPromoType, pm.sPromoActionTypeID sPromoTypeID " + " agp.sURL, pm.sPromoName, pm.sPromoTheme, pm.sPromoActionType sPromoType, pm.sPromoActionTypeID sPromoTypeID "
+ " from tSalesOrderDtl sod left join tYWPromoMain pm on pm.sPromoPaperNO = sod.sPromoPaperNO " + " from tSalesOrderDtl sod left join tYWPromoMain pm on pm.sPromoPaperNO = sod.sPromoPaperNO "
+ " 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.nGoodsID = sod.nGoodsID "
+ " where sod.sSalesOrderID = ?"; + " where sod.sSalesOrderID = ?";
orderDtlList = jdbcTemplate.queryForList(sql2, salesOrderId); orderDtlList = jdbcTemplate.queryForList(sql2, salesOrderId);
} }
String sqlPay = "" String sqlPay = ""
...@@ -403,19 +403,20 @@ public class OrderServiceImpl implements OrderService { ...@@ -403,19 +403,20 @@ public class OrderServiceImpl implements OrderService {
+ "case when so.nOrderStatus&145 = 144 then '已完成' when so.nOrderStatus&145 = 128 then '配送中' when so.nOrderStatus&145 = 0 then '待发货' when so.nOrderStatus&5 = 4 then '已审核' else '未审核' end sOrderStatusText " + "case when so.nOrderStatus&145 = 144 then '已完成' when so.nOrderStatus&145 = 128 then '配送中' when so.nOrderStatus&145 = 0 then '待发货' when so.nOrderStatus&5 = 4 then '已审核' else '未审核' end sOrderStatusText "
+ "from tSalesOrder so where so.sSalesOrderID = ?", subOrderMap.get("sSalesOrderID")); + "from tSalesOrder so where so.sSalesOrderID = ?", subOrderMap.get("sSalesOrderID"));
String sql = "" String sql = ""
+ "select " + "select "
+ "sosd.*, PromoSalePrice=CONVERT(NUMERIC(12,2),ROUND((sosd.nSaleAmount)/sosd.nSaleQty,2)),OriginaSaleAmount=sosd.nSaleAmount+sosd.nDisAmount,ISGift = sosd.nTag&1, " + "sosd.*, PromoSalePrice=CONVERT(NUMERIC(12,2),ROUND((sosd.nSaleAmount)/sosd.nSaleQty,2)),OriginaSaleAmount=sosd.nSaleAmount+sosd.nDisAmount,ISGift = sosd.nTag&1, "
+ "sosd.nSendQty - isnull(sosd.nReturnQty,0) LeftReturnQty, ag.nSaleUnits SaleMulti, ag.sSpec sSpec," + "sosd.nSendQty - isnull(sosd.nReturnQty,0) LeftReturnQty, ag.nSaleUnits SaleMulti, ag.sSpec sSpec,"
+ "ag.sGoodTypeID GoodTypeID, " + "ag.sGoodTypeID GoodTypeID, "
+ "agp.sURL, " + "agp.sURL, "
+ "pm.sPromoTheme, " + "pm.sPromoName, "
+ "pm.sPromoActionType sPromoType, " + "pm.sPromoTheme, "
+ "pm.sPromoActionTypeID sPromoTypeID " + "pm.sPromoActionType sPromoType, "
+ "from tSalesOrderSubDtl sosd " + "pm.sPromoActionTypeID sPromoTypeID "
+ "left join tYWPromoMain pm on pm.sPromoPaperNO = sosd.sPromoPaperNO " + "from tSalesOrderSubDtl sosd "
+ "left join V_GetminAgentGoodsPic agp on agp.nAgentID = sosd.nAgentID and agp.nGoodsID = sosd.nGoodsID and agp.sPicTypeID = 1 " + "left join tYWPromoMain pm on pm.sPromoPaperNO = sosd.sPromoPaperNO "
+ "left join tAgentContractGoods ag on sosd.sAgentContractNO = ag.sAgentContractNO and sosd.nGoodsID = ag.nGoodsID " + "left join V_GetminAgentGoodsPic agp on agp.nAgentID = sosd.nAgentID and agp.nGoodsID = sosd.nGoodsID and agp.sPicTypeID = 1 "
+ " where sosd.sSubOrderID = ?"; + "left join tAgentContractGoods ag on sosd.sAgentContractNO = ag.sAgentContractNO and sosd.nGoodsID = ag.nGoodsID "
+ " where sosd.sSubOrderID = ?";
List<Map<String, Object>> dtlList = jdbcTemplate.queryForList(sql, subOrderID); List<Map<String, Object>> dtlList = jdbcTemplate.queryForList(sql, subOrderID);
Map<String, Object> deliver = jdbcTemplate.queryForMap("SELECT sum(a.nNum) nTotalCount, sum(a.nPrice * a.nNum) nTotalAmount FROM tSalesOrderDeliverSubDtl a where a.sSubOrderID = ?", subOrderID); Map<String, Object> deliver = jdbcTemplate.queryForMap("SELECT sum(a.nNum) nTotalCount, sum(a.nPrice * a.nNum) nTotalAmount FROM tSalesOrderDeliverSubDtl a where a.sSubOrderID = ?", subOrderID);
String sql3 = "select sSubOrderID, nOrderMoney, sAocOrderID, sAocOrderNumber, nOrderNum, nPickupNum, sExpressNO, sExpressName from tSalesOrderDeliverSub where nTag&1 = 0 and sSubOrderID = ?"; String sql3 = "select sSubOrderID, nOrderMoney, sAocOrderID, sAocOrderNumber, nOrderNum, nPickupNum, sExpressNO, sExpressName from tSalesOrderDeliverSub where nTag&1 = 0 and sSubOrderID = ?";
......
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