Commit 6e024a89 authored by Quxl's avatar Quxl

x

parent d7c0aafb
......@@ -374,6 +374,8 @@ public class GoodsServiceImpl implements GoodsService {
String contractNo=(String) map.get("contractNo");
String sql = "select * from V_OrgGoods where sOrgNO = ? and sAgentContractNO = ? and nGoodsID = ?";
Map<String, Object> detail = jdbcTemplate.queryForMap(sql, orgNo, contractNo, goodsId);
String categoryNo = (String)detail.get("sCategoryNO");
String brandId = (String)detail.get("sBrandID");
BigDecimal nMarketPrice = (BigDecimal)detail.get("nMarketPrice");
BigDecimal nRealSalePrice = (BigDecimal)detail.get("nRealSalePrice");
BigDecimal nProfitMargin = BigDecimal.ZERO;
......@@ -382,6 +384,10 @@ public class GoodsServiceImpl implements GoodsService {
}
detail.put("nProfitMargin", nProfitMargin);
Map<String, List<Map<String, Object>>> picList = goodsPicList(goodsId, contractNo);
String promoSql = "select pm.* from tYWPromoMain pm, tYWPromoDtl pd where pm.sOrgNO = ? and pm.sPromoPaperNO = pd.sPromoPaperNO and pd.nTag&3 = 2 and (pd.sAgentContractNO = ? or pd.sAgentContractNO is null) and (pd.nGoodsID = ? or pd.sCategoryNO = ? and pd.sBrandID = ?)";
Object[] args = new Object[] {orgNo, contractNo, goodsId, categoryNo, brandId};
List<Map<String, Object>> promoList = jdbcTemplate.queryForList(promoSql, args);
detail.put("promoList", promoList);
Rjx rjx = Rjx.jsonOk().set("goodsDetail", detail);
rjx.putAll(picList);
return rjx.toJson();
......
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