|
@@ -2,10 +2,7 @@ package com.jpsoft.bus.modules.mq.listener;
|
|
|
|
|
|
import com.jpsoft.bus.config.WxConfig;
|
|
import com.jpsoft.bus.config.WxConfig;
|
|
import com.jpsoft.bus.modules.bus.entity.*;
|
|
import com.jpsoft.bus.modules.bus.entity.*;
|
|
-import com.jpsoft.bus.modules.bus.service.RouteInfoService;
|
|
|
|
-import com.jpsoft.bus.modules.bus.service.StationInfoService;
|
|
|
|
-import com.jpsoft.bus.modules.bus.service.StationRemindService;
|
|
|
|
-import com.jpsoft.bus.modules.bus.service.VehicleInfoService;
|
|
|
|
|
|
+import com.jpsoft.bus.modules.bus.service.*;
|
|
import com.jpsoft.bus.modules.common.utils.CommonUtil;
|
|
import com.jpsoft.bus.modules.common.utils.CommonUtil;
|
|
import com.jpsoft.bus.modules.common.utils.WechatMessageUtil;
|
|
import com.jpsoft.bus.modules.common.utils.WechatMessageUtil;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
@@ -31,6 +28,9 @@ public class StationRemindListener {
|
|
@Autowired
|
|
@Autowired
|
|
private VehicleInfoService vehicleInfoService;
|
|
private VehicleInfoService vehicleInfoService;
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private DriverInfoService driverInfoService;
|
|
|
|
+
|
|
@Autowired
|
|
@Autowired
|
|
private StationRemindService stationRemindService;
|
|
private StationRemindService stationRemindService;
|
|
|
|
|
|
@@ -57,13 +57,14 @@ public class StationRemindListener {
|
|
StationInfo endStation = stationInfoService.get(shiftInfo.getEndStationId());
|
|
StationInfo endStation = stationInfoService.get(shiftInfo.getEndStationId());
|
|
|
|
|
|
VehicleInfo vehicleInfo = vehicleInfoService.get(shiftInfo.getVehicleId());
|
|
VehicleInfo vehicleInfo = vehicleInfoService.get(shiftInfo.getVehicleId());
|
|
|
|
+ DriverInfo driverInfo = driverInfoService.get(shiftInfo.getDriverId());
|
|
|
|
|
|
//当前车辆所在站点
|
|
//当前车辆所在站点
|
|
StationInfo stationInfo = stationInfoService.get(shiftInfo.getCurrentStationId());
|
|
StationInfo stationInfo = stationInfoService.get(shiftInfo.getCurrentStationId());
|
|
|
|
|
|
for (StationRemind stationRemind : stationRemindList) {
|
|
for (StationRemind stationRemind : stationRemindList) {
|
|
try {
|
|
try {
|
|
- String remindStr = "上车刷脸听到“感谢乘车”通行,入座扫码手机购票。";
|
|
|
|
|
|
+ String remindStr = "上车刷脸听到“感谢乘车”通行,入座扫码手机购票。司机:"+driverInfo.getName() + ",电话:"+ driverInfo.getPhone();
|
|
|
|
|
|
if (stationRemind.getRemindType() != null && stationRemind.getRemindType() == 2) {
|
|
if (stationRemind.getRemindType() != null && stationRemind.getRemindType() == 2) {
|
|
//下车提醒要判断是不是同一个班次
|
|
//下车提醒要判断是不是同一个班次
|