Commit 2ab3eb48 authored by Quxl's avatar Quxl

x

parent 77e5d54d
...@@ -657,6 +657,7 @@ public class OrderServiceImpl implements OrderService { ...@@ -657,6 +657,7 @@ public class OrderServiceImpl implements OrderService {
XException.assertNotBlank(terminal, "Terminal不能为空"); XException.assertNotBlank(terminal, "Terminal不能为空");
Map<String, Object> custMap = jdbcTemplate.queryForMap("select c.* from tCustomer c, tShop s where c.sCustNO = s.sCustNO and s.sShopNO = ?", shopNo); Map<String, Object> custMap = jdbcTemplate.queryForMap("select c.* from tCustomer c, tShop s where c.sCustNO = s.sCustNO and s.sShopNO = ?", shopNo);
String sCustTypeID = (String)custMap.get("sCustTypeID");
String sCustNO = (String)custMap.get("sCustNO"); String sCustNO = (String)custMap.get("sCustNO");
this.saveOrderBankAccount(sCustNO, bankType, bankAccount); this.saveOrderBankAccount(sCustNO, bankType, bankAccount);
BigDecimal Qty = BigDecimal.valueOf(saleQty); BigDecimal Qty = BigDecimal.valueOf(saleQty);
...@@ -672,6 +673,7 @@ public class OrderServiceImpl implements OrderService { ...@@ -672,6 +673,7 @@ public class OrderServiceImpl implements OrderService {
String sPostalcode = (String)addrMap.get("sPostalcode"); String sPostalcode = (String)addrMap.get("sPostalcode");
String sContacts = (String)addrMap.get("sContacts"); 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 = ?"; String gSql = "select * from V_OrgGoods where sOrgNO = ? and sAgentContractNO = ? and nGoodsID = ?";
Map<String, Object> gMap = jdbcTemplate.queryForMap(gSql, orgNo, contractNo, goodsId); Map<String, Object> gMap = jdbcTemplate.queryForMap(gSql, orgNo, contractNo, goodsId);
BigDecimal nStockQty = (BigDecimal)gMap.get("nStockQty"); BigDecimal nStockQty = (BigDecimal)gMap.get("nStockQty");
...@@ -691,7 +693,13 @@ public class OrderServiceImpl implements OrderService { ...@@ -691,7 +693,13 @@ public class OrderServiceImpl implements OrderService {
} }
BigDecimal nTotalSaleAmount = BigDecimal.ZERO; BigDecimal nTotalSaleAmount = BigDecimal.ZERO;
BigDecimal nRealSalePrice = (BigDecimal)gMap.get("nRealSalePrice"); BigDecimal nRealSalePrice = null;
if(priceList != null && priceList.size() > 0) {
nRealSalePrice = (BigDecimal)priceList.get(0).get("nRealSalePrice");
}
if(nRealSalePrice == null) {
nRealSalePrice = (BigDecimal)gMap.get("nRealSalePrice");
}
nTotalSaleAmount = nTotalSaleAmount.add(nRealSalePrice.multiply(Qty)); nTotalSaleAmount = nTotalSaleAmount.add(nRealSalePrice.multiply(Qty));
TSalesOrder order = new TSalesOrder(); TSalesOrder order = new TSalesOrder();
......
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