Commit 4a518974 authored by Quxl's avatar Quxl

x

parent f0c9f604
......@@ -7,6 +7,7 @@ import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
import org.apache.commons.logging.Log;
......@@ -186,13 +187,8 @@ public class GoodsServiceImpl implements GoodsService {
String sql = "select t.nGoodsID, t.sSubCode, t.nParentID, t.sSpecName, t.sSpec, isnull(ap.nRealSalePrice, og.nRealSalePrice) nRealSalePrice, og.nStockQty, og.nLockedQty from tGoodsSubCode t left join V_OrgGoods og on og.sOrgNO = ? and og.sAgentContractNO = ? and og.nGoodsID = t.nGoodsID left join tAgentCustTypePrice ap on ap.sCustTypeID = ? and ap.sAgentContractNO = og.sAgentContractNO and ap.nGoodsID = og.nGoodsID where t.nParentID = ? and t.nTag&1 = 0";
List<Map<String, Object>> specList = jdbcTemplate.queryForList(sql, orgNo, contractNo, custTypeId, goodsId);
Map<String, Map<String, Object>> specMap = Util.listToMM(specList, ";", "sSpecName", "sSpec");
List<String> specNames = specList.stream().map(o -> (String)o.get("sSpecName")).collect(Collectors.toList());
List<String> specs = specList.stream().map(o -> (String)o.get("sSpec")).collect(Collectors.toList());
Set<String> specNames = specList.stream().map(o -> (String)o.get("sSpecName")).collect(Collectors.toSet());
Set<String> specs = specList.stream().map(o -> (String)o.get("sSpec")).collect(Collectors.toSet());
BigDecimal nMarketPrice = (BigDecimal)detail.get("nMarketPrice");
BigDecimal nRealSalePrice = (BigDecimal)detail.get("nRealSalePrice");
BigDecimal nProfitMargin = BigDecimal.ZERO;
......
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