Commit d00a6805 authored by Quxl's avatar Quxl

x

parent 3cd8f24a
......@@ -673,9 +673,8 @@ public class OrderServiceImpl implements OrderService {
String sPostalcode = (String)addrMap.get("sPostalcode");
String sContacts = (String)addrMap.get("sContacts");
List<Map<String, Object>> priceList = jdbcTemplate.queryForList("select * from tAgentCustTypePrice where sCustTypeID = ? and sAgengContractNO = ? and nGoodsID = ?", sCustTypeID, contractNo, goodsId);
String gSql = "select * from V_OrgGoods where sOrgNO = ? and sAgentContractNO = ? and nGoodsID = ?";
Map<String, Object> gMap = jdbcTemplate.queryForMap(gSql, orgNo, contractNo, goodsId);
String gSql = "select t.*, ap.nRealSalePrice nApSalePrice from V_OrgGoods t left join tAgentCustTypePrice ap on ap.sCustTypeID = ? and ap.sAgentContractNO = t.sAgentContractNO and ap.nGoodsID = t.nGoodsID where t.sOrgNO = ? and t.sAgentContractNO = ? and t.nGoodsID = ?";
Map<String, Object> gMap = jdbcTemplate.queryForMap(gSql, sCustTypeID, orgNo, contractNo, goodsId);
BigDecimal nStockQty = (BigDecimal)gMap.get("nStockQty");
BigDecimal nLockedQty = (BigDecimal)gMap.get("nLockedQty");
BigDecimal stock = nStockQty.subtract(nLockedQty);
......@@ -693,10 +692,7 @@ public class OrderServiceImpl implements OrderService {
}
BigDecimal nTotalSaleAmount = BigDecimal.ZERO;
BigDecimal nRealSalePrice = null;
if(priceList != null && priceList.size() > 0) {
nRealSalePrice = (BigDecimal)priceList.get(0).get("nRealSalePrice");
}
BigDecimal nRealSalePrice = (BigDecimal)gMap.get("nApSalePrice");
if(nRealSalePrice == null) {
nRealSalePrice = (BigDecimal)gMap.get("nRealSalePrice");
}
......
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