Commit cde77267 authored by Quxl's avatar Quxl

x

parent 97320b74
......@@ -172,7 +172,7 @@ public class GoodsServiceImpl implements GoodsService {
} catch (EmptyResultDataAccessException e) {
throw new XException("商品已下架");
}
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";
String sql = "select t.nGoodsID, t.sSubCode, t.nParentID, t.sSpecName, t.sSpec, isnull(ap.nRealSalePrice, og.nRealSalePrice) nRealSalePrice, nStockQty = og.nRealStockQty, 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");
Set<String> specNames = specList.stream().map(o -> (String)o.get("sSpecName")).collect(Collectors.toSet());
......@@ -274,7 +274,7 @@ public class GoodsServiceImpl implements GoodsService {
} catch (Exception e) {
//shopNo为空,没有登陆
}
String sql = "select t.sAgentContractNO, t.nGoodsID, t.nStockQty, t.nRealStockQty, t.nDefaultPrice, isnull(ap.nRealSalePrice, t.nRealSalePrice) nRealSalePrice from V_OrgGoods t left join tAgentCustTypePrice ap on ap.sCustTypeID = '" + sCustTypeID + "' and t.sAgentContractNO = ap.sAgentContractNO and t.nGoodsID = ap.nGoodsID where t.sOrgNO = '" + orgNo + "' " + StringUtil.join(" OR ", " and (", ")", " and (1 = 0) ", args);
String sql = "select t.sAgentContractNO, t.nGoodsID, nStockQty = t.nRealStockQty, t.nDefaultPrice, isnull(ap.nRealSalePrice, t.nRealSalePrice) nRealSalePrice from V_OrgGoods t left join tAgentCustTypePrice ap on ap.sCustTypeID = '" + sCustTypeID + "' and t.sAgentContractNO = ap.sAgentContractNO and t.nGoodsID = ap.nGoodsID where t.sOrgNO = '" + orgNo + "' " + StringUtil.join(" OR ", " and (", ")", " and (1 = 0) ", args);
List<Map<String, Object>> datas = jdbcTemplate.queryForList(sql);
Map<String, Map<String, Object>> mm = Util.listToMM(datas, ":", "sAgentContractNO", "nGoodsID");
......
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