Commit 9aa23b9e authored by Quxl's avatar Quxl

x

parent 04359fec
...@@ -327,7 +327,12 @@ public class GoodsServiceImpl implements GoodsService { ...@@ -327,7 +327,12 @@ public class GoodsServiceImpl implements GoodsService {
args.add("(t.sAgentContractNO = '" + kv[0] + "' and t.nGoodsID = " + kv[1] + ")"); args.add("(t.sAgentContractNO = '" + kv[0] + "' and t.nGoodsID = " + kv[1] + ")");
} }
String sCustTypeID = jdbcTemplate.queryForString("select c.sCustTypeID from tCustomer c, tShop s where c.sCustNO = s.sCustNO and s.sShopNO = ?", shopNo); String sCustTypeID = "99999999999999";
try {
sCustTypeID = jdbcTemplate.queryForString("select c.sCustTypeID from tCustomer c, tShop s where c.sCustNO = s.sCustNO and s.sShopNO = ?", shopNo);
} catch (Exception e) {
e.printStackTrace();
}
String sql = "select t.sAgentContractNO, t.nGoodsID, t.nStockQty, 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, t.nStockQty, 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); List<Map<String, Object>> datas = jdbcTemplate.queryForList(sql);
Map<String, Map<String, Object>> mm = Util.listToMM(datas, ":", "sAgentContractNO", "nGoodsID"); 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