提交代码

dev-discount
胡锐 3 years ago
parent f173557c15
commit ffab15405b
  1. 1
      hai-bweb/src/main/java/com/bweb/controller/HighTyAgentController.java
  2. 17
      hai-cweb/src/main/java/com/cweb/controller/HighGasController.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);

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

Loading…
Cancel
Save