rev:更新

This commit is contained in:
2024-04-28 14:10:55 +08:00
parent 75f964bc9f
commit d2df5add29
7 changed files with 13 additions and 8 deletions

View File

@@ -235,10 +235,10 @@ public class NDCAgvServiceImpl implements NDCAgvService {
byte low;
if ("1".equals(option)) {
high = (byte) IntToHexHigh(00);
low = (byte) IntToHexHigh(01);
low = (byte) IntToHexLow(01);
} else if ("2".equals(option)) {
high = (byte) IntToHexHigh(00);
low = (byte) IntToHexHigh(00);
low = (byte) IntToHexLow(00);
} else {
throw new BadRequestException("操作类型有误!");
}

View File

@@ -28,6 +28,7 @@ import java.io.DataOutputStream;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.net.Socket;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
@@ -289,6 +290,7 @@ public class OneNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
System.out.println("Agv链接异常");
log.info("Agv链接异常");
log.error("agv连接出现异常:{}", e);
log.error("agv连接出现异常:{}", Arrays.toString(e.getStackTrace()));
logServer.deviceExecuteLog("1", "", "", "agv异常" + e.getMessage());
logServer.deviceExecuteLog("1", "", "", "agv异常" + e);
if (ObjectUtil.isNotEmpty(s)) {

View File

@@ -452,7 +452,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
//agv状态
jo.put("device_status", status_name);
//电量
jo.put("electricity", this.getElectric_qty());
jo.put("energyLevel", this.getElectric_qty());
//任务号
jo.put("transportOrder", ObjectUtil.isEmpty(instruction) ? "0" : instruction.getTask_code());
//x坐标

View File

@@ -10,7 +10,6 @@ import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.nl.acs.ext.wms.data.CancelTaskRequest;
import org.nl.acs.ext.wms.data.CreateTaskRequest;
import org.nl.acs.ext.wms.data.CreateTaskResponse;
import org.nl.acs.ext.wms.service.WmsToAcsService;
import org.nl.modules.logging.InterfaceLogType;
import org.nl.modules.logging.annotation.Log;

View File

@@ -466,6 +466,8 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
@Override
public Map<String, Object> deviceOption(JSONObject param) {
MDC.put(log_file_type, log_type);
log.info("deviceOption-----输入参数{}", param);
String option = param.getString("option");
Assert.notBlank(option, "参数不能为空");
try {
@@ -475,12 +477,14 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
map.put("status", 400);
map.put("message", e.getMessage());
map.put("data", new JSONObject());
log.info("deviceOption--------------:输出参数:" + JSON.toJSONString(map));
return map;
}
Map<String, Object> map = new HashMap<>();
map.put("status", 200);
map.put("message", "操作成功!");
map.put("data", new JSONObject());
log.info("deviceOption--------------:输出参数:" + JSON.toJSONString(map));
return map;
}

View File

@@ -700,7 +700,7 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
}
// 判断是否为WMS下发的任务如果是反馈任务状态给WMS
String hasWms = paramService.findByCode(AcsConfig.HASWMS).getValue();
if (!StrUtil.startWith(dto.getTask_code(), "-") && StrUtil.equals(hasWms, "1")) {
if (!StrUtil.startWith(dto.getTask_code(), "-") && StrUtil.equals(hasWms, "1") && !StrUtil.equals(dto.getTask_status(), "0")) {
TaskFeedbackDto feefbackdto = taskFeedbackService.findByCode(entity.getTask_code());
JSONObject feed_jo = new JSONObject();
feed_jo.put("task_id", entity.getExt_task_id());
@@ -966,7 +966,7 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
entity.getStart_device_code(),
entity.getNext_device_code(),
entity.getRoute_plan_code());
if (ObjectUtil.isNotEmpty(shortPathsList)){
if (ObjectUtil.isNotEmpty(shortPathsList)) {
String type = shortPathsList.get(0).getType();
// != 0 为agv任务
if (!StrUtil.equals(type, "0")) {
@@ -1015,7 +1015,7 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
entity.getStart_device_code(),
entity.getNext_device_code(),
entity.getRoute_plan_code());
if (ObjectUtil.isNotEmpty(shortPathsList)){
if (ObjectUtil.isNotEmpty(shortPathsList)) {
String type = shortPathsList.get(0).getType();
// != 0 为agv任务
if (!StrUtil.equals(type, "0")) {

View File

@@ -44,7 +44,7 @@ public class AutoCreateInst {
DeviceAppService appService = SpringContextHolder.getBean(DeviceAppServiceImpl.class);
List<TaskDto> list = taskserver.queryAll("task_status = '0' ORDER BY create_time ASC");
List<TaskDto> list2 = taskserver.queryAll("task_status = '1' ORDER BY create_time ASC");
Map<String, List<TaskDto>> collect = list.stream().sorted(Comparator.comparing(TaskDto::getCreate_time))
Map<String, List<TaskDto>> collect = list.stream().sorted(Comparator.comparing(TaskDto::getCreate_time).thenComparing(TaskDto::getTask_code))
.collect(Collectors.groupingBy(TaskDto::getPriority));
TreeMap<String, List<TaskDto>> treeMap = new TreeMap<>(new Comparator<String>() {
@Override