Commit 073c4d21 authored by 张永's avatar 张永

1

parent f843f168
......@@ -176,7 +176,7 @@ public class OrderServiceImpl implements OrderService {
List<Map<String, Object>> orderList = jdbcTemplate.limit(sql, page);
if(orderList.size() > 0) {
List<String> orderIds = orderList.stream().map(o-> (String)o.get("sSalesOrderID")).collect(Collectors.toList());
String sql2 = "select sod.*,PromoSalePrice=CONVERT(NUMERIC(12,2),ROUND((sod.nSaleAmount)/sod.nSaleQty,2)),OriginaSaleAmount=sod.nSaleAmount+sod.nDisAmount,ISGift = sod.nTag&1,agp.sURL "
String sql2 = "select sod.*,PromoSalePrice=CONVERT(NUMERIC(12,2),case when sod.nSaleQty = 0 then 0 else ROUND((sod.nSaleAmount)/sod.nSaleQty,2) end),OriginaSaleAmount=sod.nSaleAmount+sod.nDisAmount,ISGift = sod.nTag&1,agp.sURL "
+ " from tSalesOrderDtl sod left join V_GetminAgentGoodsPic agp on agp.nAgentID = sod.nAgentID and agp.nGoodsID = sod.nGoodsID and agp.sPicTypeID = 1 "
+ " where sod.sSalesOrderID in (" + StringUtil.join("', '", "'", "'", orderIds) + ")";
List<Map<String, Object>> orderDtlList = jdbcTemplate.queryForList(sql2);
......
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