|
|
|
@ -1,5 +1,6 @@ |
|
|
|
package org.springblade.modules.business.controller; |
|
|
|
package org.springblade.modules.business.controller; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
import io.swagger.annotations.Api; |
|
|
|
import io.swagger.annotations.Api; |
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
@ -15,6 +16,8 @@ import org.springblade.core.tenant.annotation.TenantDS; |
|
|
|
import org.springblade.core.tool.api.R; |
|
|
|
import org.springblade.core.tool.api.R; |
|
|
|
import org.springblade.core.tool.utils.Func; |
|
|
|
import org.springblade.core.tool.utils.Func; |
|
|
|
import org.springblade.modules.business.entity.BusLine; |
|
|
|
import org.springblade.modules.business.entity.BusLine; |
|
|
|
|
|
|
|
import org.springblade.modules.business.entity.CarAdmin; |
|
|
|
|
|
|
|
import org.springblade.modules.business.service.ICarAdminService; |
|
|
|
import org.springblade.modules.business.service.ICarInfoService; |
|
|
|
import org.springblade.modules.business.service.ICarInfoService; |
|
|
|
import org.springblade.modules.business.service.IStationHintService; |
|
|
|
import org.springblade.modules.business.service.IStationHintService; |
|
|
|
import org.springblade.modules.business.service.impl.PublishService; |
|
|
|
import org.springblade.modules.business.service.impl.PublishService; |
|
|
|
@ -59,9 +62,25 @@ public class CommonApiController extends BladeController { |
|
|
|
|
|
|
|
|
|
|
|
private final IStationHintService stationHintService; |
|
|
|
private final IStationHintService stationHintService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private final IProBusLineImgService proBusLineImgService; |
|
|
|
private final IProBusLineImgService proBusLineImgService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private final ICarAdminService carAdminService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 设置车牌号 |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @return |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
@GetMapping("set-push-car-and-stat") |
|
|
|
|
|
|
|
public R setPushCarAndStat(@RequestParam String clientId, @RequestParam String carStat) { |
|
|
|
|
|
|
|
CarAdmin carAdmin = carAdminService.getOne(Wrappers.<CarAdmin>lambdaQuery().eq(CarAdmin::getReceiverId, clientId)); |
|
|
|
|
|
|
|
String carNo = Func.isEmpty(carAdmin) ? "" : carAdmin.getName(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
redisTemplate.opsForValue().set("car-current-number", carNo); |
|
|
|
|
|
|
|
redisTemplate.opsForValue().set("set-current-Facility-stat" + carNo, carStat); |
|
|
|
|
|
|
|
publishService.publishToWeb(carNo, carStat); |
|
|
|
|
|
|
|
return R.status(true); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 设置车牌号 |
|
|
|
* 设置车牌号 |
|
|
|
@ -99,6 +118,7 @@ public class CommonApiController extends BladeController { |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 获取车牌号 |
|
|
|
* 获取车牌号 |
|
|
|
|
|
|
|
* |
|
|
|
* @return |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@GetMapping("get-car-no") |
|
|
|
@GetMapping("get-car-no") |
|
|
|
@ -435,7 +455,7 @@ public class CommonApiController extends BladeController { |
|
|
|
resultMap.put("articleData", busLine.getActicle()); |
|
|
|
resultMap.put("articleData", busLine.getActicle()); |
|
|
|
resultMap.put("activityData", busLine.getActivity()); |
|
|
|
resultMap.put("activityData", busLine.getActivity()); |
|
|
|
resultMap.put("scenicData", busLine.getScenic()); |
|
|
|
resultMap.put("scenicData", busLine.getScenic()); |
|
|
|
resultMap.put("speed",info.getSpeed()); |
|
|
|
resultMap.put("speed", info.getSpeed()); |
|
|
|
List<BusLine> busLineList = stationHintService.getBusLineByName(nextSite.getSname()); |
|
|
|
List<BusLine> busLineList = stationHintService.getBusLineByName(nextSite.getSname()); |
|
|
|
Long busLineId = busLineList.get(0).getId(); |
|
|
|
Long busLineId = busLineList.get(0).getId(); |
|
|
|
List<imgVo> imgList = proBusLineImgService.getImgByid(busLineId); |
|
|
|
List<imgVo> imgList = proBusLineImgService.getImgByid(busLineId); |
|
|
|
|