Commit d7c0aafb authored by Quxl's avatar Quxl

x

parent 25c37be3
......@@ -194,7 +194,8 @@ public class GoodsController {
@ApiOperation("商品详情")
@ApiImplicitParams({
@ApiImplicitParam(paramType = "query", name = "goodsId", dataType = "String", required = true, value = "商品编号", defaultValue = ""),
@ApiImplicitParam(paramType = "query", name = "orgNo", dataType = "String", required = true),
@ApiImplicitParam(paramType = "query", name = "goodsId", dataType = "String", required = true, value = "商品编号", defaultValue = ""),
@ApiImplicitParam(paramType = "query", name = "contractNo", dataType = "String", required = false, value = "合同编号", defaultValue = ""),
@ApiImplicitParam(paramType = "query", name = "terminal", dataType = "String", required = false, value = "终端标识", defaultValue = "wechat"),
@ApiImplicitParam(paramType = "query", name = "langID", dataType = "String", required = false, value = "语言", defaultValue = "936"),
......@@ -203,9 +204,10 @@ public class GoodsController {
})
@RequestMapping(value = "/goodsDetail",method=RequestMethod.GET)
public String goodsDetail(String goodsId, String contractNo, String terminal, String langID, HttpServletRequest request, HttpServletResponse response) {
public String goodsDetail(String orgNo, String goodsId, String contractNo, String terminal, String langID, HttpServletRequest request, HttpServletResponse response) {
Map<String,Object> params=new HashMap<>();
params.put("goodsId", goodsId);
params.put("orgNo", orgNo);
params.put("goodsId", goodsId);
params.put("contractNo", contractNo);
params.put("langID", langID);
params.put("terminal", terminal);
......
......@@ -369,10 +369,11 @@ public class GoodsServiceImpl implements GoodsService {
*/
@Override
public String goodsDetail(Map<String, Object> map) {
String orgNo = (String)map.get("orgNo");
String goodsId=(String) map.get("goodsId");
String contractNo=(String) map.get("contractNo");
String sql = "select acg.*, asa.sWarehouseNO, w.sWarehouseName, asa.nStockQty, asa.nOnlineStockQty, asa.nLockedQty from tAgentContractGoods acg LEFT JOIN tAgentContractWarehouse acw on acw.sAgentContractNO = acg.sAgentContractNO left join tWarehouse w on w.sWarehouseNO = acw.sWarehouseNO left join tAgentStockAccount asa on asa.nAgentID = acg.nAgentID and asa.nGoodsID = acg.nGoodsID and asa.sWarehouseNO = acw.sWarehouseNO where acg.sAgentContractNO = ? and acg.nGoodsID = ?";
Map<String, Object> detail = jdbcTemplate.queryForMap(sql, contractNo, goodsId);
String sql = "select * from V_OrgGoods where sOrgNO = ? and sAgentContractNO = ? and nGoodsID = ?";
Map<String, Object> detail = jdbcTemplate.queryForMap(sql, orgNo, contractNo, goodsId);
BigDecimal nMarketPrice = (BigDecimal)detail.get("nMarketPrice");
BigDecimal nRealSalePrice = (BigDecimal)detail.get("nRealSalePrice");
BigDecimal nProfitMargin = BigDecimal.ZERO;
......
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