|
|
|
@ -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); |
|
|
|
|