Commit 9df0610fb451ad35ef82960718684e18df169406

Authored by 潘钊
1 parent 93332032

update...

src/main/java/com/bsth/data/directive/DirectivesPstThread.java
... ... @@ -45,6 +45,8 @@ public class DirectivesPstThread extends Thread {
45 45 for (int i = 0; i < 1000; i++) {
46 46 try {
47 47 directive = list.poll();
  48 + if(null == directive)
  49 + break;
48 50 //日期
49 51 directive.setRq(fmtyyyyMMdd.print(directive.getTimestamp()));
50 52 if (directive instanceof D60) {
... ...
src/main/java/com/bsth/data/gpsdata_v2/handlers/GpsStateProcess.java
... ... @@ -28,15 +28,15 @@ public class GpsStateProcess {
28 28 return;
29 29  
30 30 byte upDown = Byte.parseByte(sch.getXlDir());
  31 + int schState = dayOfSchedule.emptyService(sch)?1:0;
31 32  
32   - if (gps.getUpDown() != upDown) {
33   - gps.setUpDown(upDown);//修正走向
  33 + if(gps.getState() != schState || gps.getUpDown() != upDown){
  34 + //下发指令纠正车载的 营运状态 和 走向
  35 + gpsStatusManager.changeServiceState(gps.getNbbm(), upDown, schState, "同步@系统");
34 36 }
35 37  
36   - if ((!gps.isService() || gps.getUpDown() != upDown) &&
37   - !dayOfSchedule.emptyService(sch)) {
38   - //下发指令纠正车载的 营运状态 和 走向
39   - gpsStatusManager.changeServiceState(gps.getNbbm(), upDown, 0, "同步@系统");
  38 + if (gps.getUpDown() != upDown) {
  39 + gps.setUpDown(upDown);//修正走向
40 40 }
41 41  
42 42 if (!sch.getXlBm().equals(gps.getLineId())) {
... ...
src/main/java/com/bsth/data/schedule/thread/SchedulePstThread.java
... ... @@ -66,22 +66,11 @@ public class SchedulePstThread extends Thread {
66 66 }
67 67 }
68 68  
69   -/* PropertyFilter filter = new PropertyFilter() {
70   - //过滤不需要的字段
71   - public boolean apply(Object source, String name, Object value) {
72   - if("cTasks".equals(name)||"createBy".equals(name)||"updateBy".equals(name)){
73   - return false;
74   - }
75   - return true;
76   - }
77   - };*/
78   -
79 69 private void save(){
80 70 if(saveList.size() == 0)
81 71 return;
82 72 //记录同步数据
83 73 logger.info("real schedule update size: " + saveList.size());
84   - //logger.info(JSON.toJSONString(saveList, filter));
85 74  
86 75 //批量入库
87 76 update2Db();
... ...