add:第一版测试版本功能优化。1.F机器人修改调度上报异常信息,后端存储异常信息和异常处理,增加异常信息和异常处理方法excel导入功能。2.添加密码校验、修改密码功能。

This commit is contained in:
2026-01-04 09:34:07 +08:00
parent 6e554b6bf7
commit acf269e92a
33 changed files with 1089 additions and 9 deletions

View File

@@ -0,0 +1,26 @@
package org.nl.schedule.modular.init;
import jakarta.annotation.PostConstruct;
import jakarta.annotation.Resource;
import org.nl.api.setting.api.SettingAPI;
import org.nl.util.URLConstant;
import org.springframework.stereotype.Component;
/**
* @author dsh
* 2025/12/29
*/
@Component
public class ScheduleInit {
@Resource
private SettingAPI settingAPI;
@PostConstruct
public void init() {
URLConstant.SCHEDULE_IP_PORT = settingAPI.querySettingParamByCode("schedule_ip")
.getJSONObject("data")
.getString("value");
}
}

View File

@@ -55,7 +55,7 @@ public class ScheduleTaskServiceImpl implements ScheduleTaskService {
boolean flag = false;
// 到达时等待设置参数
JSONObject jsonObject = settingAPI.querySttingParamIsActiveByCode("call_arrival_waiting_time").getJSONObject("data");
JSONObject jsonObject = settingAPI.querySettingParamByCode("call_arrival_waiting_time").getJSONObject("data");
String is_active = jsonObject.getString("is_active");
String arrive_waiting_time = jsonObject.getString("value");
if (StrUtil.isNotBlank(is_active) && YesOrNoEnum.YES.getCode().equals(is_active)){

View File

@@ -1,5 +1,6 @@
package org.nl.schedule.modular.vehicle.dto;
import com.alibaba.fastjson.JSONObject;
import lombok.Data;
import org.nl.schedule.modular.vehicle.entity.Location;
@@ -54,9 +55,19 @@ public class VehicleInfoDto{
private int signalStrength;
/**
* 异常信息集合
* 异常信息编码
*/
private List<String> exceptions;
private Integer error_code;
/**
* 异常信息内容
*/
private String error_msg;
/**
* 异常信息
*/
private JSONObject error_info;
/**
* 当前位置

View File

@@ -7,6 +7,7 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.nl.api.sys.anomalyInfo.api.ErrorInfoAPI;
import org.nl.api.task.api.TaskAPI;
import org.nl.response.WebResponse;
import org.nl.schedule.core.websocket.WebSocketVehicleInfoServer;
@@ -38,6 +39,9 @@ public class VehicleServiceImpl implements VehicleService {
@Resource
private TaskAPI taskAPI;
@Resource
private ErrorInfoAPI errorInfoAPI;
/**
* 定时更新车辆信息(每秒执行)
*/
@@ -52,6 +56,9 @@ public class VehicleServiceImpl implements VehicleService {
// 更新缓存
for (VehicleInfoDto vehicle : vehicles) {
if (vehicle.getError_code()!=0) {
vehicle.setError_info(errorInfoAPI.queryErrorInfoByCode(vehicle.getError_code()));
}
vehicleCache.put(vehicle.getVehicleNumber(), vehicle);
}
@@ -78,7 +85,6 @@ public class VehicleServiceImpl implements VehicleService {
@Override
public List<VehicleInfoDto> getAllVehicles() {
String url = URLConstant.SCHEDULE_IP_PORT+"/vehicles";
List<VehicleInfoDto> vehicles = new ArrayList<>();
try {
try (HttpResponse response = HttpRequest.get(URLConstant.SCHEDULE_IP_PORT+"/vehicles")