zhangnaisong
2024-07-02 d85713cca5443547a7d4646d4e80abfce136eff8
ard-work/src/main/java/com/ruoyi/sy/controller/ArdSyCarController.java
@@ -79,6 +79,12 @@
    @Value("${syCar.enabled}")
    private Boolean syCarEnabled;
    @Value("${syCar.userId}")
    private String userId;
    @Value("${syCar.password}")
    private String password;
    @PostConstruct
    public void init(){
        ardSyCarController = this;
@@ -101,7 +107,8 @@
        {
            return;
        }
        PushClientImplPosition pushClientImplPosition = new PushClientImplPosition(ip,ardSyUserList.get(0).getUserId(),ardSyUserList.get(0).getPassword());
        //PushClientImplPosition pushClientImplPosition = new PushClientImplPosition(ip,ardSyUserList.get(0).getUserId(),ardSyUserList.get(0).getPassword());
        PushClientImplPosition pushClientImplPosition = new PushClientImplPosition(ip,userId,password);
        Thread pushClientImplPositionThread = new Thread(pushClientImplPosition);
        pushClientImplPositionThread.start();
@@ -115,7 +122,8 @@
        };
        //carPositionTimer.scheduleAtFixedRate(carPositionTask,date,3*1000);//弃用
        //车辆实时报警线程
        PushClientImplAlarm pushClientImplAlarm = new PushClientImplAlarm(ip,ardSyUserList.get(0).getUserId(),ardSyUserList.get(0).getPassword());
        //PushClientImplAlarm pushClientImplAlarm = new PushClientImplAlarm(ip,ardSyUserList.get(0).getUserId(),ardSyUserList.get(0).getPassword());
        PushClientImplAlarm pushClientImplAlarm = new PushClientImplAlarm(ip,userId,password);
        Thread pushClientImplAlarmThread = new Thread(pushClientImplAlarm);
        pushClientImplAlarmThread.start();
    }
@@ -369,7 +377,7 @@
        SysUser sysUser = sysUserService.selectUserById(usersId);
        Map<String, Map<String,Map<String,Object>>> deptPositionMap = PositionContainer.getDeptPositionMap();
        if(deptPositionMap.isEmpty()){
            return Results.succeed();
            return Results.error("31平台无车辆位置返回");
        }else {
//            return Results.succeed(deptPositionMap.get(sysUser.getDeptId().toString()).get(map.get("carId")));
            return Results.succeed(deptPositionMap.get(sysUser.getDeptId().toString()));