Commit 2d6cdf9acf2b140a13e036c8afb34276b9055805

Authored by 潘钊
1 parent c13b906b

update

src/main/java/com/bsth/data/gpsdata/arrival/handlers/CorrectSignalHandle.java
... ... @@ -6,6 +6,9 @@ import com.bsth.data.gpsdata.arrival.utils.CircleQueue;
6 6 import com.bsth.data.schedule.DayOfSchedule;
7 7 import com.bsth.entity.realcontrol.ChildTaskPlan;
8 8 import com.bsth.entity.realcontrol.ScheduleRealInfo;
  9 +import com.bsth.service.directive.DirectiveService;
  10 +import org.slf4j.Logger;
  11 +import org.slf4j.LoggerFactory;
9 12 import org.springframework.beans.factory.annotation.Autowired;
10 13 import org.springframework.stereotype.Component;
11 14  
... ... @@ -18,6 +21,10 @@ public class CorrectSignalHandle extends SignalHandle {
18 21  
19 22 @Autowired
20 23 DayOfSchedule dayOfSchedule;
  24 + @Autowired
  25 + DirectiveService directiveService;
  26 +
  27 + Logger logger = LoggerFactory.getLogger(this.getClass());
21 28  
22 29 @Override
23 30 public boolean handle(GpsEntity gps, CircleQueue<GpsEntity> prevs) {
... ... @@ -41,6 +48,11 @@ public class CorrectSignalHandle extends SignalHandle {
41 48 gps.setState(0);
42 49 }
43 50  
  51 + if(gps.getState() != 0){
  52 + logger.info(gps.getNbbm() + " 纠正状态到营运");
  53 + //切换到营运状态
  54 + directiveService.send60Operation(sch.getClZbh(), 0, Integer.parseInt(sch.getXlDir()), null, "纠正@系统");
  55 + }
44 56  
45 57 return true;
46 58 }
... ...