优化周期计算触发条件
This commit is contained in:
parent
27b87538d9
commit
86776c2405
@ -153,15 +153,15 @@ public class SingleLineGNSSCalcService implements GNSSDataCalcService {
|
||||
|
||||
@Override
|
||||
public void calSingleDone(Device device, GnssGroupCalc groupCalc, LocalDateTime resultTime) {
|
||||
// executor已经在线程处理了
|
||||
/* ThreadManager.getScheduledThreadPool().schedule(() -> {
|
||||
try {
|
||||
calCycleResult(device, groupCalc, resultTime);
|
||||
} catch (Exception e) {
|
||||
logger.error(e.toString());
|
||||
}
|
||||
},50, TimeUnit.MILLISECONDS);
|
||||
*/
|
||||
ScheduledFuture<?> future = timerMap.get(device.getDeviceId());
|
||||
if (future != null && !future.isDone()) {
|
||||
future.cancel(true);
|
||||
future = null;
|
||||
}
|
||||
if(null == groupCalc){
|
||||
groupCalc = getGroupCalc(device.getCalcGroupId());
|
||||
if(groupCalc == null) return;
|
||||
}
|
||||
calCycleResult(device, groupCalc, resultTime);
|
||||
}
|
||||
|
||||
@ -181,7 +181,7 @@ public class SingleLineGNSSCalcService implements GNSSDataCalcService {
|
||||
} catch (Exception e) {
|
||||
logger.error(e.toString());
|
||||
}
|
||||
},30, TimeUnit.SECONDS);
|
||||
},90, TimeUnit.SECONDS);
|
||||
timerMap.put(device.getDeviceId(), future);
|
||||
}
|
||||
|
||||
|
||||
@ -3,6 +3,7 @@ package com.imdroid.sideslope.executor;
|
||||
import com.imdroid.common.util.ThreadManager;
|
||||
import com.imdroid.secapi.client.BeidouClient;
|
||||
import com.imdroid.secapi.dto.GnssTrxMsg;
|
||||
import com.imdroid.sideslope.calc.GNSSDataCalcService;
|
||||
import com.imdroid.sideslope.calc.MultiLineGNSSCalcService;
|
||||
import com.imdroid.sideslope.message.D3F2StopIndicationMessage;
|
||||
import com.imdroid.sideslope.sal.Device;
|
||||
@ -34,6 +35,8 @@ public class D3F2StopIndicationMessageExecutor implements Executor<D3F2StopIndic
|
||||
@Autowired
|
||||
private BeidouClient beidouClient;
|
||||
@Autowired
|
||||
private GNSSDataCalcService gnssCalcService;
|
||||
@Autowired
|
||||
MultiLineGNSSCalcService multiLineGNSSCalcService;
|
||||
@Autowired
|
||||
WarningService warningService;
|
||||
@ -82,6 +85,8 @@ public class D3F2StopIndicationMessageExecutor implements Executor<D3F2StopIndic
|
||||
else{
|
||||
warningService.checkB562Num(device);
|
||||
}
|
||||
// 开始周期解算
|
||||
gnssCalcService.calSingleDone(device, null, message.getCreateTime());
|
||||
});
|
||||
|
||||
return null;
|
||||
|
||||
@ -35,9 +35,11 @@
|
||||
<div class="layui-input-inline">
|
||||
<select name="type" lay-filter="type">
|
||||
<option value="0">GNSS</option>
|
||||
<option value="1">DTU</option>
|
||||
<option value="10">DTU</option>
|
||||
<option value="2">MPU</option>
|
||||
<option value="11">DTU2</option>
|
||||
<option value="3">DEBUG</option>
|
||||
<option value="16">V3.2 DEBUG</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user