diff --git a/hd/nladmin-system/src/main/java/org/nl/acs/common/AbstractDriverService.java b/hd/nladmin-system/src/main/java/org/nl/acs/common/AbstractDriverService.java index 6551da2..f427228 100644 --- a/hd/nladmin-system/src/main/java/org/nl/acs/common/AbstractDriverService.java +++ b/hd/nladmin-system/src/main/java/org/nl/acs/common/AbstractDriverService.java @@ -163,7 +163,7 @@ public class AbstractDriverService implements DriverDeviceService { Method methodMode = driverClass.getMethod("getMode"); Integer nowMode = (Integer) methodMode.invoke(driver); Integer nowMove = (Integer) methodMove.invoke(driver); - if (nowMode != mode || nowMove != move) { + if (nowMove != move) { log.info("指令创建失败,起点mode或move不满足条件! 任务号:" + taskDto.getTask_code() + ",终点:" + startDeviceCode); taskDto.setRemark("指令创建失败,起点mode或move不满足条件! 起点:" + startDeviceCode); taskService.updateByCodeFromCache(taskDto); @@ -187,7 +187,7 @@ public class AbstractDriverService implements DriverDeviceService { Method methodMode = driverClass.getMethod("getMode"); Integer nowMode = (Integer) methodMode.invoke(driver); Integer nowMove = (Integer) methodMove.invoke(driver); - if (nowMode != mode || nowMove != move) { + if (nowMove != move) { log.info("指令创建失败,终点mode或move不满足条件! 任务号:" + taskDto.getTask_code() + ",终点:" + nextDeviceCode); taskDto.setRemark("指令创建失败,终点mode或move不满足条件! 终点:" + nextDeviceCode); taskService.updateByCodeFromCache(taskDto); diff --git a/hd/nladmin-system/src/main/java/org/nl/acs/device/wql/task_inst.xls b/hd/nladmin-system/src/main/java/org/nl/acs/device/wql/task_inst.xls index 59b80ac..f3629c1 100644 Binary files a/hd/nladmin-system/src/main/java/org/nl/acs/device/wql/task_inst.xls and b/hd/nladmin-system/src/main/java/org/nl/acs/device/wql/task_inst.xls differ diff --git a/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/driver/AbstractOpcDeviceDriver.java b/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/driver/AbstractOpcDeviceDriver.java index 9f68aac..e657255 100644 --- a/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/driver/AbstractOpcDeviceDriver.java +++ b/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/driver/AbstractOpcDeviceDriver.java @@ -5,6 +5,7 @@ import cn.hutool.core.util.StrUtil; import io.swagger.models.auth.In; import org.nl.acs.device.device_driver.standard_inspect.ReadUtil; import org.nl.acs.device_driver.standard_conveyor_line.ItemProtocol; +import org.nl.acs.device_driver.standard_conveyor_line.StandardConveyorLineDeviceDriver; import org.nl.acs.opc.OpcConfig; import org.nl.modules.udw.UnifiedDataAccessor; import org.nl.modules.udw.UnifiedDataAccessorFactory; @@ -28,7 +29,7 @@ public class AbstractOpcDeviceDriver extends AbstractDeviceDriver implements } //信号值与上次值不一致时的日志 - public void writeLogInfo(String device_code,String name, int lastNumber, int nowNumber) { + public void writeLogInfo(String device_code, String name, int lastNumber, int nowNumber) { if (lastNumber != nowNumber) { this.execute_log.setResource(device_code, this.device.getDevice_name()); this.execute_log.log("设备:" + device_code + ",last_'" + name + "' -> '" + name + "':" + lastNumber + "->" + nowNumber); @@ -36,7 +37,7 @@ public class AbstractOpcDeviceDriver extends AbstractDeviceDriver implements } //判断信号是否异常 - public synchronized void signalIsException(T sonDriver){ + public synchronized void signalIsException(T sonDriver) { Class sonDriverClass = sonDriver.getClass(); try { Method methodItemProtocol = sonDriverClass.getMethod("getItemProtocol"); @@ -48,31 +49,31 @@ public class AbstractOpcDeviceDriver extends AbstractDeviceDriver implements for (Field field : fields) { //获取属性名字 String fieldName = field.getName(); - if (fieldName.contains("item_")){ - if (!fieldName.contains("to_")){ + if (fieldName.contains("item_")) { + if (!fieldName.contains("to_")) { String fieldValue = (String) field.get(fieldName); Method methodGet = null; try { methodGet = itemProtocol.getClass().getMethod("get" + initialUpperCase(fieldValue)); - }catch (Exception e){ + } catch (Exception e) { } Integer itemValue = 0; - if (ObjectUtil.isNotEmpty(methodGet)){ + if (ObjectUtil.isNotEmpty(methodGet)) { itemValue = (Integer) methodGet.invoke(itemProtocol); } - if (!fieldValue.equals("heartbeat")){ - Method methodSet =null; + if (!fieldValue.equals("heartbeat")) { + Method methodSet = null; try { methodSet = sonDriverClass.getMethod("set" + initialUpperCase(fieldValue), int.class); - } catch (Exception e){ + } catch (Exception e) { } - if (ObjectUtil.isNotEmpty(methodSet)){ + if (ObjectUtil.isNotEmpty(methodSet)) { try { - methodSet.invoke(sonDriver,itemValue); + methodSet.invoke(sonDriver, itemValue); Integer last_Number = (Integer) sonDriverClass.getMethod("getLast_" + fieldValue).invoke(sonDriver); Method writeLogInfo = sonDriverClass.getMethod("writeLogInfo", String.class, String.class, int.class, int.class); - writeLogInfo.invoke(sonDriver,deviceCode,fieldValue,last_Number,itemValue); - }catch (Exception e){ + writeLogInfo.invoke(sonDriver, deviceCode, fieldValue, last_Number, itemValue); + } catch (Exception e) { } } } @@ -80,41 +81,41 @@ public class AbstractOpcDeviceDriver extends AbstractDeviceDriver implements } } - Method methodIsonline = sonDriverClass.getMethod("setIsonline",Boolean.class); - Method methodIserror = sonDriverClass.getMethod("setIserror",Boolean.class); - Method methodMessage = sonDriverClass.getMethod("setMessage",String.class); + Method methodIsonline = sonDriverClass.getMethod("setIsonline", Boolean.class); + Method methodIserror = sonDriverClass.getMethod("setIserror", Boolean.class); + Method methodMessage = sonDriverClass.getMethod("setMessage", String.class); Method methodMode = sonDriverClass.getMethod("getMode"); Method methodError = sonDriverClass.getMethod("getError"); Integer mode = (Integer) methodMode.invoke(sonDriver); Integer error = (Integer) methodError.invoke(sonDriver); Boolean isonline = (Boolean) itemProtocol.getClass().getMethod("getIsonline").invoke(itemProtocol); - if (!isonline){ - methodIsonline.invoke(sonDriver,false); - methodIserror.invoke(sonDriver,true); - methodMessage.invoke(sonDriver,"信号量同步异常"); - }else if (mode == 0){ - methodIsonline.invoke(sonDriver,false); - methodIserror.invoke(sonDriver,true); - methodMessage.invoke(sonDriver,"未联机"); - }else if (error != 0){ - methodIsonline.invoke(sonDriver,false); - methodIserror.invoke(sonDriver,true); - methodMessage.invoke(sonDriver,"有报警"); + if (!isonline) { + methodIsonline.invoke(sonDriver, false); + methodIserror.invoke(sonDriver, true); + methodMessage.invoke(sonDriver, "信号量同步异常"); + } else if (mode == 0) { + methodIsonline.invoke(sonDriver, false); + methodIserror.invoke(sonDriver, true); + methodMessage.invoke(sonDriver, "未联机"); + } else if (error != 0) { + methodIsonline.invoke(sonDriver, false); + methodIserror.invoke(sonDriver, true); + methodMessage.invoke(sonDriver, "有报警"); } else { - methodIsonline.invoke(sonDriver,true); - methodIserror.invoke(sonDriver,false); + methodIsonline.invoke(sonDriver, true); + methodIserror.invoke(sonDriver, false); //判断是否符合生成任务的条件 Method methodIsSatisfyCreateTask = sonDriverClass.getMethod("isSatisfyCreateTask"); String methodName = (String) methodIsSatisfyCreateTask.invoke(sonDriver); - if (StrUtil.isNotEmpty(methodName)){ + if (StrUtil.isNotEmpty(methodName)) { Method methodTask = null; try { methodTask = sonDriverClass.getMethod(methodName); - }catch (Exception e){ + } catch (Exception e) { } - if (ObjectUtil.isNotEmpty(methodTask)){ + if (ObjectUtil.isNotEmpty(methodTask)) { methodTask.invoke(sonDriver); } //sonDriverClass.getMethod(methodName).invoke(sonDriver); @@ -125,12 +126,12 @@ public class AbstractOpcDeviceDriver extends AbstractDeviceDriver implements for (Field declaredField : declaredFields) { String fieldName = declaredField.getName(); Class fieldType = declaredField.getType(); - if (fieldType == int.class || fieldType == Integer.class){ - if (fieldName.contains("last_")){ + if (fieldType == int.class || fieldType == Integer.class) { + if (fieldName.contains("last_")) { Method method = null; try { - method = sonDriverClass.getMethod("set" + initialUpperCase(fieldName),int.class); - }catch(Exception e){ + method = sonDriverClass.getMethod("set" + initialUpperCase(fieldName), int.class); + } catch (Exception e) { } int index = fieldName.indexOf("last_"); @@ -138,15 +139,15 @@ public class AbstractOpcDeviceDriver extends AbstractDeviceDriver implements Method methodSub = null; try { methodSub = sonDriverClass.getMethod("get" + initialUpperCase(subName)); - }catch(Exception e){ + } catch (Exception e) { } int nowItemValue = 0; - if (ObjectUtil.isNotEmpty(methodSub)){ + if (ObjectUtil.isNotEmpty(methodSub)) { nowItemValue = (int) methodSub.invoke(sonDriver); } - if (ObjectUtil.isNotEmpty(method)){ - method.invoke(sonDriver,nowItemValue); + if (ObjectUtil.isNotEmpty(method)) { + method.invoke(sonDriver, nowItemValue); } } } @@ -156,46 +157,8 @@ public class AbstractOpcDeviceDriver extends AbstractDeviceDriver implements } } - public void commonCreateTask(T driver){ - - } - //首字母转大写 - public String initialUpperCase(String str){ - return str.substring(0,1).toUpperCase() + str.substring(1,str.length()); - } - - public void writing(int command) { - String to_command = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code() - + "." + ItemProtocol.item_to_command; - - String opcservcerid = this.getDevice().getOpc_server_id(); - Server server = ReadUtil.getServer(opcservcerid); - Map itemMap = new HashMap(); - itemMap.put(to_command, command); - ReadUtil.write(itemMap, server); - - } - - public void writing(int type, int command) { - String to_command = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code() - + "." + ItemProtocol.item_to_command; - String to_target = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code() - + "." + ItemProtocol.item_to_target; - String to_task = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code() - + "." + ItemProtocol.item_to_task; - String opcservcerid = this.getDevice().getOpc_server_id(); - Server server = ReadUtil.getServer(opcservcerid); - Map itemMap = new HashMap(); - if (type == 1) { - itemMap.put(to_command, command); - } else if (type == 2) { - itemMap.put(to_target, command); - - } else if (type == 3) { - itemMap.put(to_task, command); - } - ReadUtil.write(itemMap, server); - + public String initialUpperCase(String str) { + return str.substring(0, 1).toUpperCase() + str.substring(1, str.length()); } } diff --git a/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/standard_conveyor_line/StandardConveyorLineDeviceDriver.java b/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/standard_conveyor_line/StandardConveyorLineDeviceDriver.java index 7e89fa2..cd225cf 100644 --- a/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/standard_conveyor_line/StandardConveyorLineDeviceDriver.java +++ b/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/standard_conveyor_line/StandardConveyorLineDeviceDriver.java @@ -4,12 +4,14 @@ import cn.hutool.core.util.ObjectUtil; import lombok.Data; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; +import org.nl.acs.common.aspect.TaskAnnotation; import org.nl.acs.device.device_driver.standard_inspect.ReadUtil; import org.nl.acs.device.service.DeviceService; import org.nl.acs.device_driver.DeviceDriver; import org.nl.acs.device_driver.RouteableDeviceDriver; import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver; import org.nl.acs.device_driver.driver.ExecutableDeviceDriver; +import org.nl.acs.device_driver.driver.OpcDeviceDriver; import org.nl.acs.instruction.service.InstructionService; import org.nl.acs.instruction.service.dto.Instruction; import org.nl.acs.opc.Device; @@ -17,7 +19,11 @@ import org.nl.acs.route.service.RouteLineService; import org.nl.acs.task.service.TaskService; import org.nl.utils.SpringContextHolder; import org.openscada.opc.lib.da.Server; +import org.springframework.aop.framework.AopContext; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.ApplicationContext; +import org.springframework.stereotype.Component; +import org.springframework.stereotype.Service; import java.util.Date; import java.util.HashMap; @@ -39,6 +45,7 @@ public class StandardConveyorLineDeviceDriver extends AbstractOpcDeviceDriver im RouteLineService routelineserver = SpringContextHolder.getBean("routeLineServiceImpl"); @Autowired TaskService taskserver = SpringContextHolder.getBean("taskServiceImpl"); + String container; String container_type_desc; String last_container_type_desc; @@ -122,7 +129,7 @@ public class StandardConveyorLineDeviceDriver extends AbstractOpcDeviceDriver im } //判断是否符合生成任务的条件 - public String isSatisfyCreateTask(){ + public String isSatisfyCreateTask() { switch (flag) { //取货完成 case 1: @@ -134,9 +141,11 @@ public class StandardConveyorLineDeviceDriver extends AbstractOpcDeviceDriver im return null; } - return null; + return "createTask"; } + + public boolean exe_business() { return true; } @@ -171,32 +180,64 @@ public class StandardConveyorLineDeviceDriver extends AbstractOpcDeviceDriver im ReadUtil.write(itemMap, server); } + public void writing(int command) { + String to_command = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code() + + "." + ItemProtocol.item_to_command; + + String opcservcerid = this.getDevice().getOpc_server_id(); + Server server = ReadUtil.getServer(opcservcerid); + Map itemMap = new HashMap(); + itemMap.put(to_command, command); + ReadUtil.write(itemMap, server); + } + + public void writing(int type, int command) { + String to_command = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code() + + "." + ItemProtocol.item_to_command; + String to_target = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code() + + "." + ItemProtocol.item_to_target; + String to_task = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code() + + "." + ItemProtocol.item_to_task; + String opcservcerid = this.getDevice().getOpc_server_id(); + Server server = ReadUtil.getServer(opcservcerid); + Map itemMap = new HashMap(); + if (type == 1) { + itemMap.put(to_command, command); + } else if (type == 2) { + itemMap.put(to_target, command); + + } else if (type == 3) { + itemMap.put(to_task, command); + } + ReadUtil.write(itemMap, server); + + } - public void writeLogInfo(String device_code,String name, int lastNumber, int nowNumber) { - super.writeLogInfo(device_code,name,lastNumber,nowNumber); + public void writeLogInfo(String device_code, String name, int lastNumber, int nowNumber) { + super.writeLogInfo(device_code, name, lastNumber, nowNumber); if (lastNumber != nowNumber) { - if (name.equals("mode")){ + if (name.equals("mode")) { this.setRequireSucess(false); } } } - public String getStringValue(String key,int value){ - Map> map = new HashMap<>(); - Map modeMap = new HashMap<>(); - modeMap.put(0,"脱机"); - modeMap.put(1,""); - modeMap.put(2,"待机"); - map.put("mode",modeMap); - Map moveMap = new HashMap<>(); - moveMap.put(0,"无货"); - moveMap.put(1,"有货"); - map.put("move",moveMap); + public String getStringValue(String key, int value) { + Map> map = new HashMap<>(); + Map modeMap = new HashMap<>(); + modeMap.put(0, "脱机"); + modeMap.put(1, ""); + modeMap.put(2, "待机"); + map.put("mode", modeMap); + Map moveMap = new HashMap<>(); + moveMap.put(0, "无货"); + moveMap.put(1, "有货"); + map.put("move", moveMap); Map valuesMap = map.get(key); - if (ObjectUtil.isNotEmpty(valuesMap)){ - for(Map.Entry entry:valuesMap.entrySet()){ - if (value == (Integer)entry.getKey()){ + if (ObjectUtil.isNotEmpty(valuesMap)) { + for (Map.Entry entry : valuesMap.entrySet()) { + if (value == (Integer) entry.getKey()) { return (String) entry.getValue(); } } diff --git a/hd/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/AcsToWmsZDServiceImpl.java b/hd/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/AcsToWmsZDServiceImpl.java index e46ab17..e03d9ad 100644 --- a/hd/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/AcsToWmsZDServiceImpl.java +++ b/hd/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/AcsToWmsZDServiceImpl.java @@ -178,7 +178,7 @@ public class AcsToWmsZDServiceImpl implements AcsToWmsZDService { String taskCode = (String) whereJson.get("task_code"); String vehicle_code = (String) whereJson.get("carId"); HttpResponse result = null; - AddressDto addressDto = addressService.findByCode("feedbackTask"); + AddressDto addressDto = addressService.findByCode("taskFeedback"); String wcsurl = acsConfigService.findConfigFromCache().get(AcsConfig.WCSURL); String methods_url = addressDto.getMethods_url(); String url = wcsurl + methods_url; diff --git a/hd/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/AgvToAcsServiceImpl.java b/hd/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/AgvToAcsServiceImpl.java index a3946a1..3fb70aa 100644 --- a/hd/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/AgvToAcsServiceImpl.java +++ b/hd/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/AgvToAcsServiceImpl.java @@ -64,6 +64,7 @@ public class AgvToAcsServiceImpl implements AgvToAcsService { private final TaskService taskService; private final DeviceAppService deviceAppService; private final AcsToWmsZDServiceImpl acsToWmsZDService; + private final InstructionService instructionService; @Autowired LogServer logServer; @@ -71,25 +72,26 @@ public class AgvToAcsServiceImpl implements AgvToAcsService { @Override public Map waitpointRequest(JSONObject param) { // TODO 待定 - String task_code = param.getString("task_code"); + String inst_code = param.getString("task_code"); String car_id = param.getString("device_code"); String address = param.getString("address"); StandardInspectSiteDeviceDriver standardInspectSiteDeviceDriver; StandardConveyorLineDeviceDriver standardConveyorLineDeviceDriver; - TaskDto taskDto = taskService.findByCode(task_code); + Instruction instructionDto = instructionService.findByCode(inst_code); + String task_code = instructionDto.getTask_code(); Map map = new HashMap<>(); Map feedMap = new HashMap(); feedMap.put("taskCode", task_code); feedMap.put("carId", car_id); - feedMap.put("taskType", taskDto.getTask_type()); - if (ObjectUtil.isEmpty(taskDto)) { + feedMap.put("taskType", instructionDto.getInstruction_type()); + if (ObjectUtil.isEmpty(instructionDto)) { map.put("status", 400); map.put("message", "操作失败"); return map; } String type = ""; - String start_device_code = taskDto.getStart_device_code(); - String next_device_code = taskDto.getNext_device_code(); + String start_device_code = instructionDto.getStart_device_code(); + String next_device_code = instructionDto.getNext_device_code(); if (address.contains("IN")) { String deviceCodeNow = address.substring(0, address.length() - 2); Device deviceNow = deviceAppService.findDeviceByCode(deviceCodeNow); @@ -99,14 +101,16 @@ public class AgvToAcsServiceImpl implements AgvToAcsService { if (standardConveyorLineDeviceDriver.getMove() == 1) { feedMap.put("feedbackStatus", "applyTake"); Map feedback = acsToWmsZDService.taskFeedback(feedMap); - int responseCode = (int) feedback.get("responseCode"); + int responseCode = Integer.parseInt((String) feedback.get("responseCode")); String responseMessage = (String) feedback.get("responseMessage"); if (responseCode == 0) { + feedback.put("feedbackStatus","“taking"); + acsToWmsZDService.taskFeedback(feedMap); map.put("status", 200); map.put("message", "操作成功"); type = "info"; } else { - logServer.log(task_code, "waitpointRequest", "waitpointRequest", param.toString(), feedback.toString(), responseCode + "", "", car_id); + logServer.log(inst_code, "waitpointRequest", "waitpointRequest", param.toString(), feedback.toString(), responseCode + "", "", car_id); map.put("status", 400); map.put("message", "操作失败"); type = "erro"; @@ -124,14 +128,16 @@ public class AgvToAcsServiceImpl implements AgvToAcsService { } else { feedMap.put("feedbackStatus", "applyPut"); Map feedback = acsToWmsZDService.taskFeedback(feedMap); - int responseCode = (int) feedback.get("responseCode"); + int responseCode = Integer.parseInt((String) feedback.get("responseCode")) ; String responseMessage = (String) feedback.get("responseMessage"); if (responseCode == 0) { + feedback.put("feedbackStatus","puting"); + acsToWmsZDService.taskFeedback(feedMap); map.put("status", 200); map.put("message", "操作成功"); type = "info"; } else { - logServer.log(task_code, "waitpointRequest", "waitpointRequest", param.toString(), feedback.toString(), responseCode + "", "", car_id); + logServer.log(inst_code, "waitpointRequest", "waitpointRequest", param.toString(), feedback.toString(), responseCode + "", "", car_id); map.put("status", 400); map.put("message", "操作失败"); type = "erro"; @@ -140,6 +146,7 @@ public class AgvToAcsServiceImpl implements AgvToAcsService { } } + return map; } if (address.contains("OUT")) { String deviceCodeNow = address.substring(0, address.length() - 3); @@ -158,7 +165,7 @@ public class AgvToAcsServiceImpl implements AgvToAcsService { map.put("message", "操作成功"); type = "info"; } else { - logServer.log(task_code, "waitpointRequest", "waitpointRequest", param.toString(), feedback.toString(), responseCode + "", "", car_id); + logServer.log(inst_code, "waitpointRequest", "waitpointRequest", param.toString(), feedback.toString(), responseCode + "", "", car_id); map.put("status", 400); map.put("message", "操作失败"); type = "erro"; @@ -166,13 +173,14 @@ public class AgvToAcsServiceImpl implements AgvToAcsService { } else { map.put("status", 400); map.put("message", "操作失败"); + type = "erro"; } } else if (next_device_code.equals(deviceCodeNow)) { if (standardConveyorLineDeviceDriver.getMove() == 0) { map.put("status", 400); map.put("message", "操作失败"); type = "info"; - logServer.log(task_code, "waitpointRequest", type, param.toString(), "取货完成时,光电信号为0", "400", "waitpointRequest", car_id); + logServer.log(inst_code, "waitpointRequest", type, param.toString(), "取货完成时,光电信号为0", "400", "waitpointRequest", car_id); } else { //standardConveyorLineDeviceDriver.writing(1,2); feedMap.put("feedbackStatus", "putFinish"); @@ -191,7 +199,10 @@ public class AgvToAcsServiceImpl implements AgvToAcsService { } } } + return map; } + map.put("status",400); + map.put("message","操作失败,IN OUT 站点错误!"); return map; } } diff --git a/hd/nladmin-system/src/main/java/org/nl/modules/quartz/task/AutoCreateInst.java b/hd/nladmin-system/src/main/java/org/nl/modules/quartz/task/AutoCreateInst.java index 9f5eff7..0f31790 100644 --- a/hd/nladmin-system/src/main/java/org/nl/modules/quartz/task/AutoCreateInst.java +++ b/hd/nladmin-system/src/main/java/org/nl/modules/quartz/task/AutoCreateInst.java @@ -125,7 +125,6 @@ public class AutoCreateInst { instdto.setTask_id(taskid); instdto.setTask_code(taskcode); instdto.setVehicle_code(vehiclecode); - instdto.setRoute_plan_code(route_plan_code); String now = DateUtil.now(); instdto.setCreate_time(now); instdto.setCreate_by("auto"); diff --git a/hd/nladmin-system/src/main/java/org/nl/start/Init.java b/hd/nladmin-system/src/main/java/org/nl/start/Init.java index 6a63249..39a3100 100644 --- a/hd/nladmin-system/src/main/java/org/nl/start/Init.java +++ b/hd/nladmin-system/src/main/java/org/nl/start/Init.java @@ -36,7 +36,6 @@ public class Init implements ApplicationRunner { //初始化WQL initWql(); //随线程启动 - Thread.sleep(1000); initApplicationAutoInitialExecuter(); initWebAutoInitialExecuter(); //初始化任务调度