rev 反馈agv状态、取消任务反馈
This commit is contained in:
@@ -196,7 +196,7 @@ public class OneNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
|
|||||||
} else {
|
} else {
|
||||||
//上报异常信息
|
//上报异常信息
|
||||||
//(不需要WCS反馈)
|
//(不需要WCS反馈)
|
||||||
if (phase == 0x67) {
|
if (phase == 0x67 || phase == 0x71 || phase == 0x72 || phase == 0x73 || phase == 0x74 || phase == 0x75) {
|
||||||
device = deviceAppService.findDeviceByCode(Integer.toString(arr[27]));
|
device = deviceAppService.findDeviceByCode(Integer.toString(arr[27]));
|
||||||
} else {
|
} else {
|
||||||
device = deviceAppService.findDeviceByCode(Integer.toString(arr[20]));
|
device = deviceAppService.findDeviceByCode(Integer.toString(arr[20]));
|
||||||
@@ -218,16 +218,15 @@ public class OneNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (
|
} catch ( Exception e) {
|
||||||
Exception e) {
|
|
||||||
System.out.println("OneAgv链接异常");
|
System.out.println("OneAgv链接异常");
|
||||||
log.info("OneAgv链接异常");
|
log.info("OneAgv链接异常");
|
||||||
log.error("agv连接出现异常:{}", e);
|
log.error("agv连接出现异常:{}", e);
|
||||||
logServer.deviceExecuteLog("1", "", "", "agv异常" + e.getMessage());
|
logServer.deviceExecuteLog("1", "", "", "agv异常" + e.getMessage());
|
||||||
logServer.deviceExecuteLog("1", "", "", "agv异常" + e);
|
logServer.deviceExecuteLog("1", "", "", "agv异常" + e);
|
||||||
if (ObjectUtil.isNotEmpty(s)) {
|
// if (ObjectUtil.isNotEmpty(s)) {
|
||||||
s.close();
|
// s.close();
|
||||||
}
|
// }
|
||||||
System.out.println(e.getMessage());
|
System.out.println(e.getMessage());
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package org.nl.acs.device_driver.basedriver.agv.ndcone;
|
package org.nl.acs.device_driver.basedriver.agv.ndcone;
|
||||||
|
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.util.IdUtil;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
@@ -23,6 +24,7 @@ import org.nl.acs.instruction.service.impl.InstructionServiceImpl;
|
|||||||
import org.nl.acs.log.LokiLog;
|
import org.nl.acs.log.LokiLog;
|
||||||
import org.nl.acs.log.LokiLogType;
|
import org.nl.acs.log.LokiLogType;
|
||||||
import org.nl.acs.log.service.DeviceExecuteLogService;
|
import org.nl.acs.log.service.DeviceExecuteLogService;
|
||||||
|
import org.nl.acs.monitor.DeviceStageMonitor;
|
||||||
import org.nl.acs.opc.Device;
|
import org.nl.acs.opc.Device;
|
||||||
import org.nl.acs.opc.DeviceAppService;
|
import org.nl.acs.opc.DeviceAppService;
|
||||||
import org.nl.acs.task.service.TaskService;
|
import org.nl.acs.task.service.TaskService;
|
||||||
@@ -43,7 +45,7 @@ import java.util.Map;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
@Data
|
@Data
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements DeviceDriver {
|
public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements DeviceDriver, DeviceStageMonitor {
|
||||||
|
|
||||||
ParamService paramService = SpringContextHolder.getBean(ParamServiceImpl.class);
|
ParamService paramService = SpringContextHolder.getBean(ParamServiceImpl.class);
|
||||||
InstructionService instructionService = SpringContextHolder.getBean(InstructionServiceImpl.class);
|
InstructionService instructionService = SpringContextHolder.getBean(InstructionServiceImpl.class);
|
||||||
@@ -72,6 +74,8 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
|||||||
int last_status = 0;
|
int last_status = 0;
|
||||||
int last_error = 0;
|
int last_error = 0;
|
||||||
|
|
||||||
|
private Instruction instruction;
|
||||||
|
|
||||||
@LokiLog(type = LokiLogType.ACS_TO_LMS)
|
@LokiLog(type = LokiLogType.ACS_TO_LMS)
|
||||||
public synchronized void processSocket(int[] arr) throws Exception {
|
public synchronized void processSocket(int[] arr) throws Exception {
|
||||||
device_code = this.getDeviceCode();
|
device_code = this.getDeviceCode();
|
||||||
@@ -94,10 +98,14 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
|||||||
agv_device = deviceAppService.findDeviceByCode(String.valueOf(carno));
|
agv_device = deviceAppService.findDeviceByCode(String.valueOf(carno));
|
||||||
}
|
}
|
||||||
if (ikey != 0) {
|
if (ikey != 0) {
|
||||||
|
if (phase != 0x67 && phase != 0x71 && phase != 0x72 && phase != 0x73 && phase != 0x74 && phase != 0x75) {
|
||||||
inst = instructionService.findByCodeFromCache(String.valueOf(ikey));
|
inst = instructionService.findByCodeFromCache(String.valueOf(ikey));
|
||||||
if (ObjectUtil.isEmpty(inst)){
|
this.instruction = inst;
|
||||||
inst = instructionService.findByCode(String.valueOf(ikey));
|
|
||||||
}
|
}
|
||||||
|
// inst = instructionService.findByCodeFromCache(String.valueOf(ikey));
|
||||||
|
// if (ObjectUtil.isEmpty(inst)){
|
||||||
|
// inst = instructionService.findByCode(String.valueOf(ikey));
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
if (!ObjectUtil.isEmpty(link_inst)) {
|
if (!ObjectUtil.isEmpty(link_inst)) {
|
||||||
link_flag = true;
|
link_flag = true;
|
||||||
@@ -108,13 +116,13 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
|||||||
String emptyNum = null;
|
String emptyNum = null;
|
||||||
String device_code = null;
|
String device_code = null;
|
||||||
|
|
||||||
if (phase == 0x67) {
|
// if (phase == 0x67) {
|
||||||
//故障信息
|
// //故障信息
|
||||||
if (arr[18] * 256 + arr[19] == 0) {
|
// if (arr[18] * 256 + arr[19] == 0) {
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0);
|
// data = NDCAgvService.sendAgvOneModeInst(phase, index, 0);
|
||||||
}
|
// }
|
||||||
|
|
||||||
//普通站点
|
//普通站点
|
||||||
StandardOrdinarySiteDeviceDriver standardOrdinarySiteDeviceDriver;
|
StandardOrdinarySiteDeviceDriver standardOrdinarySiteDeviceDriver;
|
||||||
@@ -142,9 +150,9 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
|||||||
request.put("METHOD", "1");
|
request.put("METHOD", "1");
|
||||||
request.put("AGVCODE", this.device_code);
|
request.put("AGVCODE", this.device_code);
|
||||||
request.put("REQTIME", DateUtil.now());
|
request.put("REQTIME", DateUtil.now());
|
||||||
log.info("atrAgvCallback 请求参数:"+request.toJSONString());
|
log.info("atrAgvCallback 请求参数:" + request.toJSONString());
|
||||||
String str = new RTMSAGVSERVICE().getBasicHttpBindingIRTMSAGVSERVICE().atrAgvCallback(request.toJSONString());
|
String str = new RTMSAGVSERVICE().getBasicHttpBindingIRTMSAGVSERVICE().atrAgvCallback(request.toJSONString());
|
||||||
log.info("atrAgvCallback 返回参数:"+str);
|
log.info("atrAgvCallback 返回参数:" + str);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//到达取货点
|
//到达取货点
|
||||||
@@ -218,9 +226,9 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
|||||||
request.put("METHOD", "2");
|
request.put("METHOD", "2");
|
||||||
request.put("AGVCODE", this.device_code);
|
request.put("AGVCODE", this.device_code);
|
||||||
request.put("REQTIME", DateUtil.now());
|
request.put("REQTIME", DateUtil.now());
|
||||||
log.info("atrAgvCallback 请求参数:"+request.toJSONString());
|
log.info("atrAgvCallback 请求参数:" + request.toJSONString());
|
||||||
String str = new RTMSAGVSERVICE().getBasicHttpBindingIRTMSAGVSERVICE().atrAgvCallback(request.toJSONString());
|
String str = new RTMSAGVSERVICE().getBasicHttpBindingIRTMSAGVSERVICE().atrAgvCallback(request.toJSONString());
|
||||||
log.info("atrAgvCallback 返回参数:"+str);
|
log.info("atrAgvCallback 返回参数:" + str);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -307,9 +315,9 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
|||||||
request.put("METHOD", "3");
|
request.put("METHOD", "3");
|
||||||
request.put("AGVCODE", this.device_code);
|
request.put("AGVCODE", this.device_code);
|
||||||
request.put("REQTIME", DateUtil.now());
|
request.put("REQTIME", DateUtil.now());
|
||||||
log.info("atrAgvCallback 请求参数:"+request.toJSONString());
|
log.info("atrAgvCallback 请求参数:" + request.toJSONString());
|
||||||
String str = new RTMSAGVSERVICE().getBasicHttpBindingIRTMSAGVSERVICE().atrAgvCallback(request.toJSONString());
|
String str = new RTMSAGVSERVICE().getBasicHttpBindingIRTMSAGVSERVICE().atrAgvCallback(request.toJSONString());
|
||||||
log.info("atrAgvCallback 返回参数:"+str);
|
log.info("atrAgvCallback 返回参数:" + str);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -371,9 +379,9 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
|||||||
request.put("METHOD", "4");
|
request.put("METHOD", "4");
|
||||||
request.put("AGVCODE", this.device_code);
|
request.put("AGVCODE", this.device_code);
|
||||||
request.put("REQTIME", DateUtil.now());
|
request.put("REQTIME", DateUtil.now());
|
||||||
log.info("atrAgvCallback 请求参数:"+request.toJSONString());
|
log.info("atrAgvCallback 请求参数:" + request.toJSONString());
|
||||||
String str = new RTMSAGVSERVICE().getBasicHttpBindingIRTMSAGVSERVICE().atrAgvCallback(request.toJSONString());
|
String str = new RTMSAGVSERVICE().getBasicHttpBindingIRTMSAGVSERVICE().atrAgvCallback(request.toJSONString());
|
||||||
log.info("atrAgvCallback 返回参数:"+str);
|
log.info("atrAgvCallback 返回参数:" + str);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -444,6 +452,24 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
|||||||
} else if (phase == 0x51) {//离开交通灯区域
|
} else if (phase == 0x51) {//离开交通灯区域
|
||||||
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0);
|
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0);
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data);
|
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data);
|
||||||
|
} else if (phase == 0x67) {//agv异常
|
||||||
|
error = ikey;
|
||||||
|
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0);
|
||||||
|
} else if (phase == 0x71) {
|
||||||
|
//x坐标
|
||||||
|
x = ikey;
|
||||||
|
} else if (phase == 0x72) {
|
||||||
|
//y坐标
|
||||||
|
y = ikey;
|
||||||
|
} else if (phase == 0x73) {
|
||||||
|
//车辆角度
|
||||||
|
angle = ikey;
|
||||||
|
} else if (phase == 0x74) {
|
||||||
|
//agv电量
|
||||||
|
electric_qty = ikey;
|
||||||
|
} else if (phase == 0x75) {
|
||||||
|
//三色灯状态
|
||||||
|
status = ikey;
|
||||||
}
|
}
|
||||||
if (!ObjectUtil.isEmpty(data)) {
|
if (!ObjectUtil.isEmpty(data)) {
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data);
|
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data);
|
||||||
@@ -451,4 +477,32 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONObject getDeviceStatusName() throws Exception {
|
||||||
|
JSONObject jo = new JSONObject();
|
||||||
|
jo.put("REQCODE", IdUtil.getSnowflake().nextId());
|
||||||
|
|
||||||
|
jo.put("REQTIME", DateUtil.now());
|
||||||
|
//agv编码
|
||||||
|
jo.put("AGVCODE", this.getDevice().getDevice_code());
|
||||||
|
//角度
|
||||||
|
jo.put("AGVDIR", this.getAngle());
|
||||||
|
//IP
|
||||||
|
jo.put("AGVIP", ObjectUtil.isEmpty(this.getDevice().getExtraValue()) ? "" : this.getDevice().getExtraValue().get("ip_address"));
|
||||||
|
//电量
|
||||||
|
jo.put("AGVBATTERY", this.getElectric_qty());
|
||||||
|
//x坐标
|
||||||
|
jo.put("POSX", this.getX());
|
||||||
|
//y坐标
|
||||||
|
jo.put("POSY", this.getY());
|
||||||
|
String status_name = this.status == 1 ? "关机" : this.status == 2 ? "工作中" : this.status == 3 ? "交通管制" : this.status == 4 ? "任务等待" : this.status == 5 ? "充电中" : this.status == 6 ? "故障中" : this.status == 7 ? "电量低" : "正常";
|
||||||
|
//agv状态
|
||||||
|
jo.put("STATUS", status_name);
|
||||||
|
return jo;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setDeviceStatus(JSONObject data) {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -229,7 +229,7 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
|
|||||||
@Override
|
@Override
|
||||||
public Instruction findByCode(String code) {
|
public Instruction findByCode(String code) {
|
||||||
WQLObject wo = WQLObject.getWQLObject("acs_instruction");
|
WQLObject wo = WQLObject.getWQLObject("acs_instruction");
|
||||||
JSONObject json = wo.query("instruction_code ='" + code + "'").uniqueResult(0);
|
JSONObject json = wo.query("instruction_code ='" + code + "'", "create_time").uniqueResult(0);
|
||||||
if (ObjectUtil.isEmpty(json)) {
|
if (ObjectUtil.isEmpty(json)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -945,8 +945,11 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
removeByCodeFromCache(entity.getInstruction_code());
|
removeByCodeFromCache(entity.getInstruction_code());
|
||||||
|
TaskDto taskDto = taskService.findByCodeFromCache(entity.getTask_code());
|
||||||
|
if (taskDto != null) {
|
||||||
|
taskService.cancel(taskDto.getTask_id());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// this.reload();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -1002,6 +1005,10 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
removeByCodeFromCache(entity.getInstruction_code());
|
removeByCodeFromCache(entity.getInstruction_code());
|
||||||
|
TaskDto taskDto = taskService.findByCodeFromCache(entity.getTask_code());
|
||||||
|
if (taskDto != null) {
|
||||||
|
taskService.cancel(taskDto.getTask_id());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -1059,6 +1066,10 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
|
|||||||
}
|
}
|
||||||
|
|
||||||
removeByCodeFromCache(entity.getInstruction_code());
|
removeByCodeFromCache(entity.getInstruction_code());
|
||||||
|
TaskDto taskDto = taskService.findByCodeFromCache(entity.getTask_code());
|
||||||
|
if (taskDto != null) {
|
||||||
|
taskService.cancel(taskDto.getTask_id());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -764,9 +764,9 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
|
|||||||
request.put("TASKTYPE", entity.getTask_type());
|
request.put("TASKTYPE", entity.getTask_type());
|
||||||
request.put("METHOD", "5");
|
request.put("METHOD", "5");
|
||||||
request.put("REQTIME", DateUtil.now());
|
request.put("REQTIME", DateUtil.now());
|
||||||
log.info("atrAgvCallback 请求参数:"+request.toString());
|
log.info("atrAgvCallback 请求参数:" + request.toString());
|
||||||
String str = new RTMSAGVSERVICE().getBasicHttpBindingIRTMSAGVSERVICE().atrAgvCallback(request.toJSONString());
|
String str = new RTMSAGVSERVICE().getBasicHttpBindingIRTMSAGVSERVICE().atrAgvCallback(request.toJSONString());
|
||||||
log.info("atrAgvCallback 返回参数:"+str);
|
log.info("atrAgvCallback 返回参数:" + str);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new BadRequestException(e.getMessage());
|
throw new BadRequestException(e.getMessage());
|
||||||
@@ -814,6 +814,33 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
|
|||||||
// }}
|
// }}
|
||||||
|
|
||||||
removeByCodeFromCache(entity.getTask_code());
|
removeByCodeFromCache(entity.getTask_code());
|
||||||
|
// 判断是否为WMS下发的任务,如果是反馈任务状态给WMS
|
||||||
|
String hasWms = paramService.findByCode(AcsConfig.HASWMS).getValue();
|
||||||
|
if (!StrUtil.startWith(entity.getTask_code(), "-") && StrUtil.equals(hasWms, "1")) {
|
||||||
|
TaskFeedbackDto feefbackdto = taskFeedbackService.findByCode(entity.getTask_code());
|
||||||
|
System.out.println(feefbackdto == null);
|
||||||
|
JSONObject feed_jo = new JSONObject();
|
||||||
|
feed_jo.put("task_id", entity.getTask_id());
|
||||||
|
feed_jo.put("task_code", entity.getTask_code());
|
||||||
|
feed_jo.put("task_status", entity.getTask_status());
|
||||||
|
JSONArray ja = new JSONArray();
|
||||||
|
ja.add(feed_jo);
|
||||||
|
try {
|
||||||
|
JSONObject request = new JSONObject();
|
||||||
|
request.put("REQCODE", entity.getExt_task_id());
|
||||||
|
request.put("TASKCODE", entity.getTask_code());
|
||||||
|
request.put("TASKTYPE", entity.getTask_type());
|
||||||
|
request.put("METHOD", "9");
|
||||||
|
request.put("AGVCODE", instructionService.findByCode(entity.getTask_code()) == null ? "" : instructionService.findByCode(entity.getTask_code()).getCarno());
|
||||||
|
request.put("REQTIME", DateUtil.now());
|
||||||
|
log.info("atrAgvCallback 请求参数:" + request.toString());
|
||||||
|
String str = new RTMSAGVSERVICE().getBasicHttpBindingIRTMSAGVSERVICE().atrAgvCallback(request.toJSONString());
|
||||||
|
log.info("atrAgvCallback 返回参数:" + str);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
throw new BadRequestException(e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
List<RouteLineDto> shortPathsList =
|
List<RouteLineDto> shortPathsList =
|
||||||
routeLineService.getShortPathLines(
|
routeLineService.getShortPathLines(
|
||||||
entity.getStart_device_code(),
|
entity.getStart_device_code(),
|
||||||
|
|||||||
@@ -0,0 +1,50 @@
|
|||||||
|
package org.nl.modules.quartz.task;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nl.acs.device_driver.basedriver.agv.ndcone.AgvNdcOneDeviceDriver;
|
||||||
|
import org.nl.acs.opc.Device;
|
||||||
|
import org.nl.acs.opc.DeviceAppService;
|
||||||
|
import org.nl.acs.opc.DeviceType;
|
||||||
|
import org.nl.acs.wsdl.org.tempuri.RTMSAGVSERVICE;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author: geng by
|
||||||
|
* @createDate: 2023/5/9
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Component
|
||||||
|
public class AutoFeedAgvStatus {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DeviceAppService deviceAppService;
|
||||||
|
|
||||||
|
public void run() throws Exception {
|
||||||
|
List<Device> devices = deviceAppService.findDevice(DeviceType.agv);
|
||||||
|
JSONArray data = new JSONArray();
|
||||||
|
if (ObjectUtil.isNotEmpty(devices)) {
|
||||||
|
for (int i = 0; i < devices.size(); i++) {
|
||||||
|
Device device = devices.get(i);
|
||||||
|
Device agvDevice = deviceAppService.findDeviceByCode(device.getDevice_code());
|
||||||
|
if (agvDevice.getDeviceDriver() instanceof AgvNdcOneDeviceDriver) {
|
||||||
|
AgvNdcOneDeviceDriver agvNdcOneDeviceDriver = (AgvNdcOneDeviceDriver) agvDevice.getDeviceDriver();
|
||||||
|
JSONObject jo = agvNdcOneDeviceDriver.getDeviceStatusName();
|
||||||
|
data.add(jo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
log.info("atrAgvCallback 请求参数:" + data.toJSONString());
|
||||||
|
String str = new RTMSAGVSERVICE().getBasicHttpBindingIRTMSAGVSERVICE().atrAgvCallback(data.toJSONString());
|
||||||
|
log.info("atrAgvCallback 返回参数:" + str);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("atrAgvCallback,反馈失败:{}", e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -13,11 +13,11 @@ spring:
|
|||||||
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
|
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
|
||||||
# url: jdbc:log4jdbc:mysql://${DB_HOST:10.1.3.91}:${DB_PORT:3306}/${DB_NAME:acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
# url: jdbc:log4jdbc:mysql://${DB_HOST:10.1.3.91}:${DB_PORT:3306}/${DB_NAME:acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||||
# url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.81.252}:${DB_PORT:3306}/${DB_NAME:lzhl_one_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
# url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.81.252}:${DB_PORT:3306}/${DB_NAME:lzhl_one_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||||
url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:lzhl_one_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:huaYan_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||||
username: ${DB_USER:root}
|
username: ${DB_USER:root}
|
||||||
# password: ${DB_PWD:P@ssw0rd}
|
# password: ${DB_PWD:P@ssw0rd}
|
||||||
# password: ${DB_PWD:Root.123456}
|
# password: ${DB_PWD:Root.123456}
|
||||||
password: ${DB_PWD:123456}
|
password: ${DB_PWD:password}
|
||||||
|
|
||||||
# 初始连接数
|
# 初始连接数
|
||||||
initial-size: 5
|
initial-size: 5
|
||||||
|
|||||||
Reference in New Issue
Block a user