Browse Source

rev:更新

master
gengby 9 months ago
parent
commit
d2df5add29
  1. 4
      acs/nladmin-system/src/main/java/org/nl/acs/agv/server/impl/NDCAgvServiceImpl.java
  2. 2
      acs/nladmin-system/src/main/java/org/nl/acs/auto/run/OneNDCSocketConnectionAutoRun.java
  3. 2
      acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java
  4. 1
      acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/rest/WmsToAcsController.java
  5. 4
      acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java
  6. 2
      acs/nladmin-system/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java
  7. 2
      acs/nladmin-system/src/main/java/org/nl/modules/quartz/task/AutoCreateInst.java

4
acs/nladmin-system/src/main/java/org/nl/acs/agv/server/impl/NDCAgvServiceImpl.java

@ -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("操作类型有误!");
}

2
acs/nladmin-system/src/main/java/org/nl/acs/auto/run/OneNDCSocketConnectionAutoRun.java

@ -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)) {

2
acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java

@ -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坐标

1
acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/rest/WmsToAcsController.java

@ -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;

4
acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java

@ -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;
}

2
acs/nladmin-system/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java

@ -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());

2
acs/nladmin-system/src/main/java/org/nl/modules/quartz/task/AutoCreateInst.java

@ -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

Loading…
Cancel
Save