diff --git a/hai-bweb/src/main/java/com/bweb/controller/HighTyAgentController.java b/hai-bweb/src/main/java/com/bweb/controller/HighTyAgentController.java index 5919fd40..772895fd 100644 --- a/hai-bweb/src/main/java/com/bweb/controller/HighTyAgentController.java +++ b/hai-bweb/src/main/java/com/bweb/controller/HighTyAgentController.java @@ -184,7 +184,6 @@ public class HighTyAgentController { } param.put("agentKey", agentKey); param.put("agentName", agentName); - param.put("orgId", orgId); param.put("agentUser", agentUser); param.put("agentPhone", agentPhone); diff --git a/hai-cweb/src/main/java/com/cweb/controller/HighGasController.java b/hai-cweb/src/main/java/com/cweb/controller/HighGasController.java index da9a16be..d670ccf9 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/HighGasController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/HighGasController.java @@ -66,7 +66,8 @@ public class HighGasController { @RequestMapping(value="/getGasStoreList",method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询加油站列表") - public ResponseData getGasStoreList(@RequestParam(name = "storeName", required = false) String storeName, + public ResponseData getGasStoreList(@RequestParam(name = "isTyAgent", required = false) Boolean isTyAgent, + @RequestParam(name = "storeName", required = false) String storeName, @RequestParam(name = "distance", required = true) Integer distanceRecent, @RequestParam(name = "regionId", required = true) Long regionId, @RequestParam(name = "oilNoName", required = true) String oilNoName, @@ -104,6 +105,20 @@ public class HighGasController { // 油品国标价 * 最终优惠比例 map.put("price_vip", new BigDecimal(MapUtils.getString(map, "price_official")).multiply(priceRate).setScale(2, BigDecimal.ROUND_DOWN)); } + + if (isTyAgent != null && isTyAgent == true) { + // 查询是否配置了优惠比例 + HighTyAgentOilStation tyAgentOilStation = tyAgentOilStationService.getDetailByOilStationId(MapUtils.getLong(map, "id")); + if (tyAgentOilStation != null) { + HighTyAgentPrice tyAgentPrice = tyAgentPriceService.getDetail(tyAgentOilStation.getId(), MapUtils.getString(map, "oil_no")); + if (tyAgentPrice != null) { + // 优惠比例 / 100 = 最终优惠比例 + BigDecimal priceRate = tyAgentPrice.getPriceRate().divide(new BigDecimal("100").setScale(2, BigDecimal.ROUND_DOWN)); + // 油品国标价 * 最终优惠比例 + map.put("price_vip", new BigDecimal(MapUtils.getString(map, "price_official")).multiply(priceRate).setScale(2, BigDecimal.ROUND_DOWN)); + } + } + } } } return ResponseMsgUtil.success(mapPageInfo);