Commit 2d03a05d authored by 张永's avatar 张永

需求 #14448

parent a06df101
......@@ -215,6 +215,8 @@ public class GoodsServiceImpl implements GoodsService {
}
List<Map<String, Object>> promoList = jdbcTemplate.queryForList(promoSql, args);
detail.put("promoList", promoList);
Rjx rjx = Rjx.jsonOk().set("goodsDetail", detail).set("specList", specList).set("specMap", specMap).set("specNames", specNames).set("specs", specs);
rjx.putAll(picList);
return rjx.toJson();
......@@ -232,8 +234,25 @@ public class GoodsServiceImpl implements GoodsService {
* @throws
*/
public Map<String, List<Map<String, Object>>> goodsPicList(String goodsID,String agentContractNO ){
String sql1 = "select agp.sURL, agp.nLength, agp.sPicTypeID from tAgentGoodsPic agp, tAgentContractGoods acg where agp.nAgentID = acg.nAgentID and agp.nGoodsID = acg.nGoodsID and acg.sAgentContractNO = ? and acg.nGoodsID = ? and agp.nTag&1 = 0 order by agp.nIdx";
List<Map<String, Object>> picList1 = jdbcTemplate.queryForList(sql1, agentContractNO, goodsID);
String sql1 = "select agp.sURL, agp.nLength, agp.sPicTypeID, agp.nIdx " +
"from tAgentGoodsPic agp, tAgentContractGoods acg " +
"where agp.nAgentID = acg.nAgentID " +
" and agp.nGoodsID = acg.nGoodsID " +
" and acg.sAgentContractNO = ? " +
" and acg.nGoodsID = ? " +
" and agp.nTag&1 = 0 " +
" and agp.sPicTypeID <> '5' " +
"union " +
"select a.sURL, a.nLength, sPicTypeID = '5', a.nIdx " +
"from tAgentGoodsReport a, tAgentContractGoods acg " +
"where a.nAgentID = acg.nAgentID " +
" and a.nGoodsID = acg.nGoodsID " +
" and a.nTag&3=2 " +
" and acg.sAgentContractNO = ? " +
" and a.nGoodsID = ? " +
"order by sPicTypeID, nIdx " +
" ";
List<Map<String, Object>> picList1 = jdbcTemplate.queryForList(sql1, agentContractNO, goodsID, agentContractNO, goodsID);
Map<String, List<Map<String,Object>>> picML1 = Util.listToML(picList1, "sPicTypeID");
Map<String, List<Map<String, Object>>> pics = new HashMap<String, List<Map<String, Object>>>();
for(String sPicTypeID : new String[] {"1", "2", "3", "4","5"}) {
......
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