rev 更新
This commit is contained in:
@@ -24,6 +24,9 @@ import org.nl.acs.instruction.service.impl.InstructionServiceImpl;
|
|||||||
import org.nl.acs.log.service.DeviceExecuteLogService;
|
import org.nl.acs.log.service.DeviceExecuteLogService;
|
||||||
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.dto.TaskDto;
|
||||||
|
import org.nl.acs.task.service.impl.TaskServiceImpl;
|
||||||
import org.nl.modules.system.service.ParamService;
|
import org.nl.modules.system.service.ParamService;
|
||||||
import org.nl.modules.system.service.impl.ParamServiceImpl;
|
import org.nl.modules.system.service.impl.ParamServiceImpl;
|
||||||
import org.nl.modules.wql.util.SpringContextHolder;
|
import org.nl.modules.wql.util.SpringContextHolder;
|
||||||
@@ -45,8 +48,8 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
|||||||
NDCAgvService ndcAgvService = SpringContextHolder.getBean(NDCAgvServiceImpl.class);
|
NDCAgvService ndcAgvService = SpringContextHolder.getBean(NDCAgvServiceImpl.class);
|
||||||
DeviceAppService deviceAppService = SpringContextHolder.getBean(DeviceAppService.class);
|
DeviceAppService deviceAppService = SpringContextHolder.getBean(DeviceAppService.class);
|
||||||
DeviceService deviceService = SpringContextHolder.getBean(DeviceService.class);
|
DeviceService deviceService = SpringContextHolder.getBean(DeviceService.class);
|
||||||
@Autowired
|
|
||||||
DeviceExecuteLogService logServer = SpringContextHolder.getBean("deviceExecuteLogServiceImpl");
|
DeviceExecuteLogService logServer = SpringContextHolder.getBean("deviceExecuteLogServiceImpl");
|
||||||
|
TaskService taskService = SpringContextHolder.getBean(TaskServiceImpl.class);
|
||||||
int agvaddr = 0;
|
int agvaddr = 0;
|
||||||
int agvaddr_copy = 0;
|
int agvaddr_copy = 0;
|
||||||
int weight = 0;
|
int weight = 0;
|
||||||
@@ -202,9 +205,15 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// 4010 待处理
|
// 4010 待处理
|
||||||
if (StrUtil.equals(inst.getStart_device_code(), device_code)) {
|
// if (StrUtil.equals(inst.getStart_device_code(), device_code)) {
|
||||||
inst.setWeight(String.valueOf(weight));
|
inst.setWeight(String.valueOf(weight));
|
||||||
|
instructionService.update(inst);
|
||||||
|
TaskDto taskDto = taskService.findByCodeFromCache(inst.getTask_code());
|
||||||
|
if (taskDto != null) {
|
||||||
|
taskDto.setWeight(String.valueOf(weight));
|
||||||
|
taskService.update(taskDto);
|
||||||
}
|
}
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
data = ndcAgvService.sendAgvOneModeInst(phase, index, 0);
|
data = ndcAgvService.sendAgvOneModeInst(phase, index, 0);
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,9 @@ import org.nl.acs.log.service.DeviceExecuteLogService;
|
|||||||
import org.nl.acs.log.service.impl.DeviceExecuteLogServiceImpl;
|
import org.nl.acs.log.service.impl.DeviceExecuteLogServiceImpl;
|
||||||
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.dto.TaskDto;
|
||||||
|
import org.nl.acs.task.service.impl.TaskServiceImpl;
|
||||||
import org.nl.modules.wql.util.SpringContextHolder;
|
import org.nl.modules.wql.util.SpringContextHolder;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -40,7 +43,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
|||||||
private DeviceAppService deviceAppService = SpringContextHolder.getBean(DeviceAppService.class);
|
private DeviceAppService deviceAppService = SpringContextHolder.getBean(DeviceAppService.class);
|
||||||
private DeviceService deviceService = SpringContextHolder.getBean(DeviceService.class);
|
private DeviceService deviceService = SpringContextHolder.getBean(DeviceService.class);
|
||||||
private DeviceExecuteLogService logServer = SpringContextHolder.getBean(DeviceExecuteLogServiceImpl.class);
|
private DeviceExecuteLogService logServer = SpringContextHolder.getBean(DeviceExecuteLogServiceImpl.class);
|
||||||
|
private TaskService taskService = SpringContextHolder.getBean(TaskServiceImpl.class);
|
||||||
private int agvaddr = 0;
|
private int agvaddr = 0;
|
||||||
private int agvaddr_copy = 0;
|
private int agvaddr_copy = 0;
|
||||||
private int weight = 0;
|
private int weight = 0;
|
||||||
@@ -780,9 +783,15 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// 4010 待处理
|
// 4010 待处理
|
||||||
if (StrUtil.equals(inst.getStart_device_code(), device_code)) {
|
// if (StrUtil.equals(inst.getStart_device_code(), device_code)) {
|
||||||
inst.setWeight(String.valueOf(weight));
|
inst.setWeight(String.valueOf(weight));
|
||||||
|
instructionService.update(inst);
|
||||||
|
TaskDto taskDto = taskService.findByCodeFromCache(inst.getTask_code());
|
||||||
|
if (taskDto != null) {
|
||||||
|
taskDto.setWeight(String.valueOf(weight));
|
||||||
|
taskService.update(taskDto);
|
||||||
}
|
}
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
||||||
|
|
||||||
|
|||||||
@@ -434,6 +434,11 @@ public class HailiangAutoCacheLineDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
byte[] data = agvService.sendAgvTwoModeInst(agvphase, index, 0);
|
byte[] data = agvService.sendAgvTwoModeInst(agvphase, index, 0);
|
||||||
NDCSocketConnectionAutoRun.write(data);
|
NDCSocketConnectionAutoRun.write(data);
|
||||||
this.set(0, 0, null);
|
this.set(0, 0, null);
|
||||||
|
TaskDto taskDto = taskserver.findByCodeFromCache(inst.getTask_code());
|
||||||
|
if (taskDto != null) {
|
||||||
|
taskDto.setVehicle_code(String.valueOf(docking_barcode));
|
||||||
|
taskserver.update(taskDto);
|
||||||
|
}
|
||||||
noFeedAgvMessage = null;
|
noFeedAgvMessage = null;
|
||||||
message = this.messageInfo(agvphase);
|
message = this.messageInfo(agvphase);
|
||||||
logServer.deviceExecuteLog(device_code, "", "", this.messageInfo(agvphase));
|
logServer.deviceExecuteLog(device_code, "", "", this.messageInfo(agvphase));
|
||||||
@@ -485,6 +490,11 @@ public class HailiangAutoCacheLineDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
byte[] data = agvService.sendAgvTwoModeInst(agvphase, index, 0);
|
byte[] data = agvService.sendAgvTwoModeInst(agvphase, index, 0);
|
||||||
NDCSocketConnectionAutoRun.write(data);
|
NDCSocketConnectionAutoRun.write(data);
|
||||||
this.set(0, 0, null);
|
this.set(0, 0, null);
|
||||||
|
TaskDto taskDto = taskserver.findByCodeFromCache(inst.getTask_code());
|
||||||
|
if (taskDto != null) {
|
||||||
|
taskDto.setVehicle_code(String.valueOf(docking_barcode));
|
||||||
|
taskserver.update(taskDto);
|
||||||
|
}
|
||||||
this.noFeedAgvMessage = null;
|
this.noFeedAgvMessage = null;
|
||||||
message = this.messageInfo(agvphase);
|
message = this.messageInfo(agvphase);
|
||||||
logServer.deviceExecuteLog(device_code, "", "", this.messageInfo(agvphase));
|
logServer.deviceExecuteLog(device_code, "", "", this.messageInfo(agvphase));
|
||||||
@@ -839,21 +849,6 @@ public class HailiangAutoCacheLineDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void writing(List<Map<String, String>> list) {
|
|
||||||
Map<String, Object> itemMap = new HashMap<String, Object>();
|
|
||||||
for (int i = 0; i < list.size(); i++) {
|
|
||||||
Object ob = list.get(i);
|
|
||||||
JSONObject json = (JSONObject) JSONObject.toJSON(ob);
|
|
||||||
if (!StrUtil.isEmpty(json.getString("value"))) {
|
|
||||||
String to_param = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
|
|
||||||
+ "." + json.getString("code");
|
|
||||||
itemMap.put(to_param, json.getString("value"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
logServer.deviceExecuteLog(device_code, "", "", "下发电气信号:" + itemMap);
|
|
||||||
this.control(itemMap);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JSONObject getDeviceStatusName() throws Exception {
|
public JSONObject getDeviceStatusName() throws Exception {
|
||||||
JSONObject jo = new JSONObject();
|
JSONObject jo = new JSONObject();
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import com.alibaba.fastjson.JSONObject;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.nl.acs.device.device_driver.standard_inspect.ReadUtil;
|
|
||||||
import org.nl.acs.device_driver.DeviceDriver;
|
import org.nl.acs.device_driver.DeviceDriver;
|
||||||
import org.nl.acs.device_driver.RouteableDeviceDriver;
|
import org.nl.acs.device_driver.RouteableDeviceDriver;
|
||||||
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
|
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
|
||||||
@@ -19,12 +18,8 @@ import org.nl.acs.log.service.DeviceExecuteLogService;
|
|||||||
import org.nl.acs.monitor.DeviceStageMonitor;
|
import org.nl.acs.monitor.DeviceStageMonitor;
|
||||||
import org.nl.acs.opc.Device;
|
import org.nl.acs.opc.Device;
|
||||||
import org.nl.modules.wql.util.SpringContextHolder;
|
import org.nl.modules.wql.util.SpringContextHolder;
|
||||||
import org.openscada.opc.lib.da.Server;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 海亮清洗机
|
* 海亮清洗机
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
package org.nl.acs.device_driver.basedriver.hailiang_one.hailiang_cleaning_machine_storage_station;
|
package org.nl.acs.device_driver.basedriver.hailiang_one.hailiang_cleaning_machine_storage_station;
|
||||||
|
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
@@ -94,6 +93,7 @@ public class HailiangCleaningMachineStorageStationDeviceDriver extends AbstractO
|
|||||||
this.agvphase = agvphase;
|
this.agvphase = agvphase;
|
||||||
this.index = index;
|
this.index = index;
|
||||||
this.inst = inst;
|
this.inst = inst;
|
||||||
|
logServer.deviceExecuteLog(device_code, "", "", "设置phase值--->" + agvphase + ",index值--->" + index + ",指令信息关联编号--->" + inst.getLink_num());
|
||||||
}
|
}
|
||||||
|
|
||||||
String device_code;
|
String device_code;
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import org.nl.acs.device_driver.DeviceDriver;
|
|||||||
import org.nl.acs.device_driver.RouteableDeviceDriver;
|
import org.nl.acs.device_driver.RouteableDeviceDriver;
|
||||||
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
|
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
|
||||||
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
|
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
|
||||||
import org.nl.acs.history.ErrorUtil;
|
|
||||||
import org.nl.acs.instruction.service.InstructionService;
|
import org.nl.acs.instruction.service.InstructionService;
|
||||||
import org.nl.acs.instruction.service.dto.Instruction;
|
import org.nl.acs.instruction.service.dto.Instruction;
|
||||||
import org.nl.acs.log.service.DeviceExecuteLogService;
|
import org.nl.acs.log.service.DeviceExecuteLogService;
|
||||||
@@ -61,6 +60,7 @@ public class HailiangEngravingCacheDeviceDriver extends AbstractOpcDeviceDriver
|
|||||||
this.agvphase = agvphase;
|
this.agvphase = agvphase;
|
||||||
this.index = index;
|
this.index = index;
|
||||||
this.inst = inst;
|
this.inst = inst;
|
||||||
|
logServer.deviceExecuteLog(device_code, "", "", "设置phase值--->" + agvphase + ",index值--->" + index + ",指令信息关联编号--->" + inst.getLink_num());
|
||||||
}
|
}
|
||||||
|
|
||||||
String device_code;
|
String device_code;
|
||||||
|
|||||||
@@ -161,6 +161,7 @@ public class HailiangEngravingMachineDeviceDriver extends AbstractOpcDeviceDrive
|
|||||||
this.agvphase = agvphase;
|
this.agvphase = agvphase;
|
||||||
this.index = index;
|
this.index = index;
|
||||||
this.inst = inst;
|
this.inst = inst;
|
||||||
|
logServer.deviceExecuteLog(device_code, "", "", "设置phase值--->" + agvphase + ",index值--->" + index + ",指令信息关联编号--->" + inst.getLink_num());
|
||||||
}
|
}
|
||||||
|
|
||||||
String device_code;
|
String device_code;
|
||||||
@@ -381,6 +382,8 @@ public class HailiangEngravingMachineDeviceDriver extends AbstractOpcDeviceDrive
|
|||||||
//有货、联机、满料请求申请AGV搬运任务
|
//有货、联机、满料请求申请AGV搬运任务
|
||||||
if (move == 1 && mode == 1 && full_req == 1 && !requireSucess) {
|
if (move == 1 && mode == 1 && full_req == 1 && !requireSucess) {
|
||||||
apply_task();
|
apply_task();
|
||||||
|
this.noApplyTaskMessage = null;
|
||||||
|
this.message = "申请满料任务成功";
|
||||||
} else {
|
} else {
|
||||||
if (full_req == 1) {
|
if (full_req == 1) {
|
||||||
String notApplyTaskMessage = "";
|
String notApplyTaskMessage = "";
|
||||||
@@ -400,6 +403,8 @@ public class HailiangEngravingMachineDeviceDriver extends AbstractOpcDeviceDrive
|
|||||||
//无货、联机、空箱请求申请AGV搬运任务
|
//无货、联机、空箱请求申请AGV搬运任务
|
||||||
if (move == 0 && mode == 1 && empty_req == 1 && !requireSucess) {
|
if (move == 0 && mode == 1 && empty_req == 1 && !requireSucess) {
|
||||||
apply_empty_task();
|
apply_empty_task();
|
||||||
|
this.noApplyTaskMessage = null;
|
||||||
|
this.message = "申请空箱任务成功";
|
||||||
} else {
|
} else {
|
||||||
if (empty_req == 1) {
|
if (empty_req == 1) {
|
||||||
String notApplyTaskMessage = "";
|
String notApplyTaskMessage = "";
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import lombok.RequiredArgsConstructor;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.nl.acs.acsEnum.StatusEnum;
|
import org.nl.acs.acsEnum.StatusEnum;
|
||||||
import org.nl.acs.acsEnum.WorkerOrderEnum;
|
import org.nl.acs.acsEnum.WorkerOrderEnum;
|
||||||
import org.nl.acs.device.device_driver.standard_inspect.ReadUtil;
|
|
||||||
import org.nl.acs.device_driver.DeviceDriver;
|
import org.nl.acs.device_driver.DeviceDriver;
|
||||||
import org.nl.acs.device_driver.RouteableDeviceDriver;
|
import org.nl.acs.device_driver.RouteableDeviceDriver;
|
||||||
import org.nl.acs.device_driver.basedriver.hailiang_one.IssuedDeviceOrderInfo;
|
import org.nl.acs.device_driver.basedriver.hailiang_one.IssuedDeviceOrderInfo;
|
||||||
@@ -29,7 +28,6 @@ import org.nl.acs.order.service.ProduceshiftorderService;
|
|||||||
import org.nl.acs.order.service.dto.ProduceshiftorderDto;
|
import org.nl.acs.order.service.dto.ProduceshiftorderDto;
|
||||||
import org.nl.modules.common.exception.BadRequestException;
|
import org.nl.modules.common.exception.BadRequestException;
|
||||||
import org.nl.modules.wql.util.SpringContextHolder;
|
import org.nl.modules.wql.util.SpringContextHolder;
|
||||||
import org.openscada.opc.lib.da.Server;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@@ -401,9 +399,9 @@ public class HailiangOldSpecialDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void issuedOrderInfo(ProduceshiftorderDto dto) {
|
public void issuedOrderInfo(ProduceshiftorderDto dto) {
|
||||||
if (!this.getItemProtocol().getIsonline()) {
|
// if (!this.getItemProtocol().getIsonline()) {
|
||||||
throw new BadRequestException("设备未开机,开工失败!");
|
// throw new BadRequestException("设备未开机,开工失败!");
|
||||||
}
|
// }
|
||||||
Map<String, Object> map = new HashMap<>();
|
Map<String, Object> map = new HashMap<>();
|
||||||
map.put("to_clear", "1");
|
map.put("to_clear", "1");
|
||||||
map.put("to_order", dto.getOrder_code());
|
map.put("to_order", dto.getOrder_code());
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import org.nl.acs.acsEnum.InstActionEnum;
|
|||||||
import org.nl.acs.agv.server.NDCAgvService;
|
import org.nl.acs.agv.server.NDCAgvService;
|
||||||
import org.nl.acs.agv.server.impl.NDCAgvServiceImpl;
|
import org.nl.acs.agv.server.impl.NDCAgvServiceImpl;
|
||||||
import org.nl.acs.auto.run.NDCSocketConnectionAutoRun;
|
import org.nl.acs.auto.run.NDCSocketConnectionAutoRun;
|
||||||
import org.nl.acs.device.device_driver.standard_inspect.ReadUtil;
|
|
||||||
import org.nl.acs.device_driver.DeviceDriver;
|
import org.nl.acs.device_driver.DeviceDriver;
|
||||||
import org.nl.acs.device_driver.RouteableDeviceDriver;
|
import org.nl.acs.device_driver.RouteableDeviceDriver;
|
||||||
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
|
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
|
||||||
@@ -24,11 +23,8 @@ import org.nl.acs.log.service.DeviceExecuteLogService;
|
|||||||
import org.nl.acs.monitor.DeviceStageMonitor;
|
import org.nl.acs.monitor.DeviceStageMonitor;
|
||||||
import org.nl.acs.opc.Device;
|
import org.nl.acs.opc.Device;
|
||||||
import org.nl.modules.wql.util.SpringContextHolder;
|
import org.nl.modules.wql.util.SpringContextHolder;
|
||||||
import org.openscada.opc.lib.da.Server;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 海亮专机设备空框位
|
* 海亮专机设备空框位
|
||||||
@@ -90,6 +86,7 @@ public class HailiangOldSpecialEmptyStationDeviceDriver extends AbstractOpcDevic
|
|||||||
this.agvphase = agvphase;
|
this.agvphase = agvphase;
|
||||||
this.index = index;
|
this.index = index;
|
||||||
this.inst = inst;
|
this.inst = inst;
|
||||||
|
logServer.deviceExecuteLog(device_code, "", "", "设置phase值--->" + agvphase + ",index值--->" + index + ",指令信息关联编号--->" + inst.getLink_num());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import org.nl.acs.acsEnum.InstActionEnum;
|
|||||||
import org.nl.acs.agv.server.NDCAgvService;
|
import org.nl.acs.agv.server.NDCAgvService;
|
||||||
import org.nl.acs.agv.server.impl.NDCAgvServiceImpl;
|
import org.nl.acs.agv.server.impl.NDCAgvServiceImpl;
|
||||||
import org.nl.acs.auto.run.NDCSocketConnectionAutoRun;
|
import org.nl.acs.auto.run.NDCSocketConnectionAutoRun;
|
||||||
import org.nl.acs.device.device_driver.standard_inspect.ReadUtil;
|
|
||||||
import org.nl.acs.device_driver.DeviceDriver;
|
import org.nl.acs.device_driver.DeviceDriver;
|
||||||
import org.nl.acs.device_driver.RouteableDeviceDriver;
|
import org.nl.acs.device_driver.RouteableDeviceDriver;
|
||||||
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
|
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
|
||||||
@@ -32,12 +31,9 @@ import org.nl.acs.order.service.ProduceshiftorderService;
|
|||||||
import org.nl.acs.order.service.dto.ProduceshiftorderDto;
|
import org.nl.acs.order.service.dto.ProduceshiftorderDto;
|
||||||
import org.nl.acs.order.service.impl.ProduceshiftorderServiceImpl;
|
import org.nl.acs.order.service.impl.ProduceshiftorderServiceImpl;
|
||||||
import org.nl.modules.wql.util.SpringContextHolder;
|
import org.nl.modules.wql.util.SpringContextHolder;
|
||||||
import org.openscada.opc.lib.da.Server;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 海亮老车间专机设备满框位
|
* 海亮老车间专机设备满框位
|
||||||
@@ -104,6 +100,7 @@ public class HailiangOldSpecialFullStationDeviceDriver extends AbstractOpcDevice
|
|||||||
this.agvphase = agvphase;
|
this.agvphase = agvphase;
|
||||||
this.index = index;
|
this.index = index;
|
||||||
this.inst = inst;
|
this.inst = inst;
|
||||||
|
logServer.deviceExecuteLog(device_code, "", "", "设置phase值--->" + agvphase + ",index值--->" + index + ",指令信息关联编号--->" + inst.getLink_num());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -189,6 +186,8 @@ public class HailiangOldSpecialFullStationDeviceDriver extends AbstractOpcDevice
|
|||||||
//满料位满足联机,有货,有工单时向MES申请任务
|
//满料位满足联机,有货,有工单时向MES申请任务
|
||||||
if (mode == 1 && move == 1 && order > 0 && !requireSucess) {
|
if (mode == 1 && move == 1 && order > 0 && !requireSucess) {
|
||||||
apply_task();
|
apply_task();
|
||||||
|
this.noApplyTaskMessage = null;
|
||||||
|
this.message = "申请满料请求任务成功";
|
||||||
} else {
|
} else {
|
||||||
if (move == 1) {
|
if (move == 1) {
|
||||||
String notApplyTaskMessage = "";
|
String notApplyTaskMessage = "";
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import com.alibaba.fastjson.JSONObject;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.nl.acs.device.device_driver.standard_inspect.ReadUtil;
|
|
||||||
import org.nl.acs.device_driver.DeviceDriver;
|
import org.nl.acs.device_driver.DeviceDriver;
|
||||||
import org.nl.acs.device_driver.RouteableDeviceDriver;
|
import org.nl.acs.device_driver.RouteableDeviceDriver;
|
||||||
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
|
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
|
||||||
@@ -18,12 +17,8 @@ import org.nl.acs.log.service.DeviceExecuteLogService;
|
|||||||
import org.nl.acs.monitor.DeviceStageMonitor;
|
import org.nl.acs.monitor.DeviceStageMonitor;
|
||||||
import org.nl.acs.opc.Device;
|
import org.nl.acs.opc.Device;
|
||||||
import org.nl.modules.wql.util.SpringContextHolder;
|
import org.nl.modules.wql.util.SpringContextHolder;
|
||||||
import org.openscada.opc.lib.da.Server;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 海亮老车间专机设备接框位
|
* 海亮老车间专机设备接框位
|
||||||
*/
|
*/
|
||||||
@@ -135,17 +130,6 @@ public class HailiangOldSpecialPickStationDeviceDriver extends AbstractOpcDevice
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void writing(String key, String value) {
|
|
||||||
String to_command = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
|
|
||||||
+ "." + key;
|
|
||||||
String opcservcerid = this.getDevice().getOpc_server_id();
|
|
||||||
Server server = ReadUtil.getServer(opcservcerid);
|
|
||||||
Map<String, Object> itemMap = new HashMap<String, Object>();
|
|
||||||
itemMap.put(to_command, value);
|
|
||||||
ReadUtil.write(itemMap, server);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JSONObject getDeviceStatusName() {
|
public JSONObject getDeviceStatusName() {
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ import org.nl.acs.acsEnum.InstActionEnum;
|
|||||||
import org.nl.acs.agv.server.NDCAgvService;
|
import org.nl.acs.agv.server.NDCAgvService;
|
||||||
import org.nl.acs.agv.server.impl.NDCAgvServiceImpl;
|
import org.nl.acs.agv.server.impl.NDCAgvServiceImpl;
|
||||||
import org.nl.acs.auto.run.NDCSocketConnectionAutoRun;
|
import org.nl.acs.auto.run.NDCSocketConnectionAutoRun;
|
||||||
import org.nl.acs.device.device_driver.standard_inspect.ReadUtil;
|
|
||||||
import org.nl.acs.device_driver.DeviceDriver;
|
import org.nl.acs.device_driver.DeviceDriver;
|
||||||
import org.nl.acs.device_driver.RouteableDeviceDriver;
|
import org.nl.acs.device_driver.RouteableDeviceDriver;
|
||||||
import org.nl.acs.device_driver.basedriver.hailiang_one.MonitoringLargeScreenData;
|
import org.nl.acs.device_driver.basedriver.hailiang_one.MonitoringLargeScreenData;
|
||||||
@@ -29,12 +28,9 @@ import org.nl.acs.log.service.DeviceExecuteLogService;
|
|||||||
import org.nl.acs.monitor.DeviceStageMonitor;
|
import org.nl.acs.monitor.DeviceStageMonitor;
|
||||||
import org.nl.acs.opc.Device;
|
import org.nl.acs.opc.Device;
|
||||||
import org.nl.modules.wql.util.SpringContextHolder;
|
import org.nl.modules.wql.util.SpringContextHolder;
|
||||||
import org.openscada.opc.lib.da.Server;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 海亮专机设备倒料位
|
* 海亮专机设备倒料位
|
||||||
@@ -194,6 +190,8 @@ public class HailiangOldSpecialPourStationDeviceDriver extends AbstractOpcDevice
|
|||||||
|
|
||||||
if (mode == 1 && !requireSucess && Integer.parseInt(String.valueOf(this.getDevice().getExtraValue().get("min_num"))) >= this.storage_stock_num) {
|
if (mode == 1 && !requireSucess && Integer.parseInt(String.valueOf(this.getDevice().getExtraValue().get("min_num"))) >= this.storage_stock_num) {
|
||||||
applyOutCacheLineTask();
|
applyOutCacheLineTask();
|
||||||
|
this.noApplyTaskMessage = null;
|
||||||
|
this.message = "申请缓存线任务成功";
|
||||||
} else {
|
} else {
|
||||||
if (Integer.parseInt(String.valueOf(this.getDevice().getExtraValue().get("min_num"))) >= storage_stock_num) {
|
if (Integer.parseInt(String.valueOf(this.getDevice().getExtraValue().get("min_num"))) >= storage_stock_num) {
|
||||||
String notApplyTaskMessage = "";
|
String notApplyTaskMessage = "";
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ import org.nl.acs.acsEnum.WorkerOrderEnum;
|
|||||||
import org.nl.acs.agv.server.NDCAgvService;
|
import org.nl.acs.agv.server.NDCAgvService;
|
||||||
import org.nl.acs.agv.server.impl.NDCAgvServiceImpl;
|
import org.nl.acs.agv.server.impl.NDCAgvServiceImpl;
|
||||||
import org.nl.acs.auto.run.OneNDCSocketConnectionAutoRun;
|
import org.nl.acs.auto.run.OneNDCSocketConnectionAutoRun;
|
||||||
import org.nl.acs.device.device_driver.standard_inspect.ReadUtil;
|
|
||||||
import org.nl.acs.device_driver.DeviceDriver;
|
import org.nl.acs.device_driver.DeviceDriver;
|
||||||
import org.nl.acs.device_driver.RouteableDeviceDriver;
|
import org.nl.acs.device_driver.RouteableDeviceDriver;
|
||||||
import org.nl.acs.device_driver.basedriver.hailiang_one.IssuedDeviceOrderInfo;
|
import org.nl.acs.device_driver.basedriver.hailiang_one.IssuedDeviceOrderInfo;
|
||||||
@@ -35,7 +34,6 @@ import org.nl.acs.order.service.ProduceshiftorderService;
|
|||||||
import org.nl.acs.order.service.dto.ProduceshiftorderDto;
|
import org.nl.acs.order.service.dto.ProduceshiftorderDto;
|
||||||
import org.nl.modules.common.exception.BadRequestException;
|
import org.nl.modules.common.exception.BadRequestException;
|
||||||
import org.nl.modules.wql.util.SpringContextHolder;
|
import org.nl.modules.wql.util.SpringContextHolder;
|
||||||
import org.openscada.opc.lib.da.Server;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
@@ -123,6 +121,7 @@ public class HailiangPackerStationDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
this.agvphase = agvphase;
|
this.agvphase = agvphase;
|
||||||
this.index = index;
|
this.index = index;
|
||||||
this.inst = inst;
|
this.inst = inst;
|
||||||
|
logServer.deviceExecuteLog(device_code, "", "", "设置phase值--->" + agvphase + ",index值--->" + index + ",指令信息关联编号--->" + inst.getLink_num());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -315,6 +314,8 @@ public class HailiangPackerStationDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
|
|
||||||
if (mode == 1 && lack_req == 1 && !requireSucess) {
|
if (mode == 1 && lack_req == 1 && !requireSucess) {
|
||||||
apply_task();
|
apply_task();
|
||||||
|
this.noApplyTaskMessage = null;
|
||||||
|
this.message = "申请缺料请求任务成功";
|
||||||
} else {
|
} else {
|
||||||
if (lack_req == 1) {
|
if (lack_req == 1) {
|
||||||
String notApplyTaskMessage = "";
|
String notApplyTaskMessage = "";
|
||||||
@@ -330,6 +331,8 @@ public class HailiangPackerStationDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
|
|
||||||
if (mode == 1 && req_task_empty == 1 && !requireSucess) {
|
if (mode == 1 && req_task_empty == 1 && !requireSucess) {
|
||||||
apply_take_empty_task();
|
apply_take_empty_task();
|
||||||
|
this.noApplyTaskMessage = null;
|
||||||
|
this.message = "申请取空框任务成功";
|
||||||
} else {
|
} else {
|
||||||
if (req_task_empty == 1) {
|
if (req_task_empty == 1) {
|
||||||
String notApplyTaskMessage = "";
|
String notApplyTaskMessage = "";
|
||||||
@@ -508,9 +511,9 @@ public class HailiangPackerStationDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void issuedOrderInfo(ProduceshiftorderDto dto) {
|
public void issuedOrderInfo(ProduceshiftorderDto dto) {
|
||||||
if (!this.getItemProtocol().getIsonline()) {
|
// if (!this.getItemProtocol().getIsonline()) {
|
||||||
throw new BadRequestException("设备未开机,工单下发失败");
|
// throw new BadRequestException("设备未开机,工单下发失败");
|
||||||
}
|
// }
|
||||||
Map<String, Object> map = new HashMap<>();
|
Map<String, Object> map = new HashMap<>();
|
||||||
map.put("to_clear", "1");
|
map.put("to_clear", "1");
|
||||||
map.put("to_order", dto.getOrder_code());
|
map.put("to_order", dto.getOrder_code());
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import lombok.RequiredArgsConstructor;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.nl.acs.acsEnum.StatusEnum;
|
import org.nl.acs.acsEnum.StatusEnum;
|
||||||
import org.nl.acs.acsEnum.WorkerOrderEnum;
|
import org.nl.acs.acsEnum.WorkerOrderEnum;
|
||||||
import org.nl.acs.device.device_driver.standard_inspect.ReadUtil;
|
|
||||||
import org.nl.acs.device_driver.DeviceDriver;
|
import org.nl.acs.device_driver.DeviceDriver;
|
||||||
import org.nl.acs.device_driver.RouteableDeviceDriver;
|
import org.nl.acs.device_driver.RouteableDeviceDriver;
|
||||||
import org.nl.acs.device_driver.basedriver.hailiang_one.IssuedDeviceOrderInfo;
|
import org.nl.acs.device_driver.basedriver.hailiang_one.IssuedDeviceOrderInfo;
|
||||||
@@ -29,7 +28,6 @@ import org.nl.acs.order.service.ProduceshiftorderService;
|
|||||||
import org.nl.acs.order.service.dto.ProduceshiftorderDto;
|
import org.nl.acs.order.service.dto.ProduceshiftorderDto;
|
||||||
import org.nl.modules.common.exception.BadRequestException;
|
import org.nl.modules.common.exception.BadRequestException;
|
||||||
import org.nl.modules.wql.util.SpringContextHolder;
|
import org.nl.modules.wql.util.SpringContextHolder;
|
||||||
import org.openscada.opc.lib.da.Server;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@@ -389,9 +387,9 @@ public class HailiangSpecialDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void issuedOrderInfo(ProduceshiftorderDto dto) {
|
public void issuedOrderInfo(ProduceshiftorderDto dto) {
|
||||||
if (!this.getItemProtocol().getIsonline()) {
|
// if (!this.getItemProtocol().getIsonline()) {
|
||||||
throw new BadRequestException("设备未开机,开工失败!");
|
// throw new BadRequestException("设备未开机,开工失败!");
|
||||||
}
|
// }
|
||||||
Map<String, Object> map = new HashMap<>();
|
Map<String, Object> map = new HashMap<>();
|
||||||
map.put("to_clear", "1");
|
map.put("to_clear", "1");
|
||||||
map.put("to_order", dto.getOrder_code());
|
map.put("to_order", dto.getOrder_code());
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import org.nl.acs.acsEnum.InstActionEnum;
|
|||||||
import org.nl.acs.agv.server.NDCAgvService;
|
import org.nl.acs.agv.server.NDCAgvService;
|
||||||
import org.nl.acs.agv.server.impl.NDCAgvServiceImpl;
|
import org.nl.acs.agv.server.impl.NDCAgvServiceImpl;
|
||||||
import org.nl.acs.auto.run.NDCSocketConnectionAutoRun;
|
import org.nl.acs.auto.run.NDCSocketConnectionAutoRun;
|
||||||
import org.nl.acs.device.device_driver.standard_inspect.ReadUtil;
|
|
||||||
import org.nl.acs.device_driver.DeviceDriver;
|
import org.nl.acs.device_driver.DeviceDriver;
|
||||||
import org.nl.acs.device_driver.RouteableDeviceDriver;
|
import org.nl.acs.device_driver.RouteableDeviceDriver;
|
||||||
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
|
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
|
||||||
@@ -24,12 +23,8 @@ import org.nl.acs.log.service.DeviceExecuteLogService;
|
|||||||
import org.nl.acs.monitor.DeviceStageMonitor;
|
import org.nl.acs.monitor.DeviceStageMonitor;
|
||||||
import org.nl.acs.opc.Device;
|
import org.nl.acs.opc.Device;
|
||||||
import org.nl.modules.wql.util.SpringContextHolder;
|
import org.nl.modules.wql.util.SpringContextHolder;
|
||||||
import org.openscada.opc.lib.da.Server;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 海亮专机设备空框位
|
* 海亮专机设备空框位
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import org.nl.acs.acsEnum.InstActionEnum;
|
|||||||
import org.nl.acs.agv.server.NDCAgvService;
|
import org.nl.acs.agv.server.NDCAgvService;
|
||||||
import org.nl.acs.agv.server.impl.NDCAgvServiceImpl;
|
import org.nl.acs.agv.server.impl.NDCAgvServiceImpl;
|
||||||
import org.nl.acs.auto.run.NDCSocketConnectionAutoRun;
|
import org.nl.acs.auto.run.NDCSocketConnectionAutoRun;
|
||||||
import org.nl.acs.device.device_driver.standard_inspect.ReadUtil;
|
|
||||||
import org.nl.acs.device_driver.DeviceDriver;
|
import org.nl.acs.device_driver.DeviceDriver;
|
||||||
import org.nl.acs.device_driver.RouteableDeviceDriver;
|
import org.nl.acs.device_driver.RouteableDeviceDriver;
|
||||||
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
|
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
|
||||||
@@ -32,12 +31,9 @@ import org.nl.acs.order.service.ProduceshiftorderService;
|
|||||||
import org.nl.acs.order.service.dto.ProduceshiftorderDto;
|
import org.nl.acs.order.service.dto.ProduceshiftorderDto;
|
||||||
import org.nl.acs.order.service.impl.ProduceshiftorderServiceImpl;
|
import org.nl.acs.order.service.impl.ProduceshiftorderServiceImpl;
|
||||||
import org.nl.modules.wql.util.SpringContextHolder;
|
import org.nl.modules.wql.util.SpringContextHolder;
|
||||||
import org.openscada.opc.lib.da.Server;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 海亮专机设备满框位
|
* 海亮专机设备满框位
|
||||||
@@ -106,6 +102,7 @@ public class HailiangSpecialFullStationDeviceDriver extends AbstractOpcDeviceDri
|
|||||||
this.agvphase = agvphase;
|
this.agvphase = agvphase;
|
||||||
this.index = index;
|
this.index = index;
|
||||||
this.inst = inst;
|
this.inst = inst;
|
||||||
|
logServer.deviceExecuteLog(device_code, "", "", "设置phase值--->" + agvphase + ",index值--->" + index + ",指令信息关联编号--->" + inst.getLink_num());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -194,6 +191,8 @@ public class HailiangSpecialFullStationDeviceDriver extends AbstractOpcDeviceDri
|
|||||||
//工作模式联机、满料位有货、工单号大于0 就申请agv任务
|
//工作模式联机、满料位有货、工单号大于0 就申请agv任务
|
||||||
if (mode == 1 && move == 1 && order > 0 && !requireSucess) {
|
if (mode == 1 && move == 1 && order > 0 && !requireSucess) {
|
||||||
apply_task();
|
apply_task();
|
||||||
|
this.noApplyTaskMessage = null;
|
||||||
|
this.message = "申请满料请求任务成功";
|
||||||
} else {
|
} else {
|
||||||
if (move == 1) {
|
if (move == 1) {
|
||||||
String notApplyTaskMessage = "";
|
String notApplyTaskMessage = "";
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import com.alibaba.fastjson.JSONObject;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.nl.acs.device.device_driver.standard_inspect.ReadUtil;
|
|
||||||
import org.nl.acs.device_driver.DeviceDriver;
|
import org.nl.acs.device_driver.DeviceDriver;
|
||||||
import org.nl.acs.device_driver.RouteableDeviceDriver;
|
import org.nl.acs.device_driver.RouteableDeviceDriver;
|
||||||
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
|
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
|
||||||
@@ -18,12 +17,8 @@ import org.nl.acs.log.service.DeviceExecuteLogService;
|
|||||||
import org.nl.acs.monitor.DeviceStageMonitor;
|
import org.nl.acs.monitor.DeviceStageMonitor;
|
||||||
import org.nl.acs.opc.Device;
|
import org.nl.acs.opc.Device;
|
||||||
import org.nl.modules.wql.util.SpringContextHolder;
|
import org.nl.modules.wql.util.SpringContextHolder;
|
||||||
import org.openscada.opc.lib.da.Server;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 海亮专机设备接框位
|
* 海亮专机设备接框位
|
||||||
*/
|
*/
|
||||||
@@ -150,15 +145,6 @@ public class HailiangSpecialPickStationDeviceDriver extends AbstractOpcDeviceDri
|
|||||||
last_order = order;
|
last_order = order;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void writing(String key, String value) {
|
|
||||||
String to_command = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
|
|
||||||
+ "." + key;
|
|
||||||
String opcservcerid = this.getDevice().getOpc_server_id();
|
|
||||||
Server server = ReadUtil.getServer(opcservcerid);
|
|
||||||
Map<String, Object> itemMap = new HashMap<String, Object>();
|
|
||||||
itemMap.put(to_command, value);
|
|
||||||
ReadUtil.write(itemMap, server);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JSONObject getDeviceStatusName() throws Exception {
|
public JSONObject getDeviceStatusName() throws Exception {
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ import org.nl.acs.acsEnum.InstActionEnum;
|
|||||||
import org.nl.acs.agv.server.NDCAgvService;
|
import org.nl.acs.agv.server.NDCAgvService;
|
||||||
import org.nl.acs.agv.server.impl.NDCAgvServiceImpl;
|
import org.nl.acs.agv.server.impl.NDCAgvServiceImpl;
|
||||||
import org.nl.acs.auto.run.NDCSocketConnectionAutoRun;
|
import org.nl.acs.auto.run.NDCSocketConnectionAutoRun;
|
||||||
import org.nl.acs.device.device_driver.standard_inspect.ReadUtil;
|
|
||||||
import org.nl.acs.device_driver.DeviceDriver;
|
import org.nl.acs.device_driver.DeviceDriver;
|
||||||
import org.nl.acs.device_driver.RouteableDeviceDriver;
|
import org.nl.acs.device_driver.RouteableDeviceDriver;
|
||||||
import org.nl.acs.device_driver.basedriver.hailiang_one.MonitoringLargeScreenData;
|
import org.nl.acs.device_driver.basedriver.hailiang_one.MonitoringLargeScreenData;
|
||||||
@@ -29,12 +28,9 @@ import org.nl.acs.log.service.DeviceExecuteLogService;
|
|||||||
import org.nl.acs.monitor.DeviceStageMonitor;
|
import org.nl.acs.monitor.DeviceStageMonitor;
|
||||||
import org.nl.acs.opc.Device;
|
import org.nl.acs.opc.Device;
|
||||||
import org.nl.modules.wql.util.SpringContextHolder;
|
import org.nl.modules.wql.util.SpringContextHolder;
|
||||||
import org.openscada.opc.lib.da.Server;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 海亮专机设备倒料位
|
* 海亮专机设备倒料位
|
||||||
@@ -103,6 +99,7 @@ public class HailiangSpecialPourStationDeviceDriver extends AbstractOpcDeviceDri
|
|||||||
this.agvphase = agvphase;
|
this.agvphase = agvphase;
|
||||||
this.index = index;
|
this.index = index;
|
||||||
this.inst = inst;
|
this.inst = inst;
|
||||||
|
logServer.deviceExecuteLog(device_code, "", "", "设置phase值--->" + agvphase + ",index值--->" + index + ",指令信息关联编号--->" + inst.getLink_num());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -199,6 +196,8 @@ public class HailiangSpecialPourStationDeviceDriver extends AbstractOpcDeviceDri
|
|||||||
//倒料位满足联机,剩余数量小于最小数量申请缓存线出库任务
|
//倒料位满足联机,剩余数量小于最小数量申请缓存线出库任务
|
||||||
if (mode == 1 && !requireSucess && Integer.parseInt(String.valueOf(this.getDevice().getExtraValue().get("min_num"))) >= storage_stock_num) {
|
if (mode == 1 && !requireSucess && Integer.parseInt(String.valueOf(this.getDevice().getExtraValue().get("min_num"))) >= storage_stock_num) {
|
||||||
applyOutCacheLineTask();
|
applyOutCacheLineTask();
|
||||||
|
this.noApplyTaskMessage = null;
|
||||||
|
this.message = "申请缓存线任务成功";
|
||||||
} else {
|
} else {
|
||||||
if (Integer.parseInt(String.valueOf(this.getDevice().getExtraValue().get("min_num"))) >= storage_stock_num) {
|
if (Integer.parseInt(String.valueOf(this.getDevice().getExtraValue().get("min_num"))) >= storage_stock_num) {
|
||||||
String notApplyTaskMessage = "";
|
String notApplyTaskMessage = "";
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import lombok.Data;
|
|||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.nl.acs.acsEnum.StatusEnum;
|
import org.nl.acs.acsEnum.StatusEnum;
|
||||||
import org.nl.acs.device.device_driver.standard_inspect.ReadUtil;
|
|
||||||
import org.nl.acs.device_driver.DeviceDriver;
|
import org.nl.acs.device_driver.DeviceDriver;
|
||||||
import org.nl.acs.device_driver.RouteableDeviceDriver;
|
import org.nl.acs.device_driver.RouteableDeviceDriver;
|
||||||
import org.nl.acs.device_driver.basedriver.hailiang_one.IssuedDeviceOrderInfo;
|
import org.nl.acs.device_driver.basedriver.hailiang_one.IssuedDeviceOrderInfo;
|
||||||
@@ -27,7 +26,6 @@ import org.nl.acs.order.service.ProduceshiftorderService;
|
|||||||
import org.nl.acs.order.service.dto.ProduceshiftorderDto;
|
import org.nl.acs.order.service.dto.ProduceshiftorderDto;
|
||||||
import org.nl.modules.common.exception.BadRequestException;
|
import org.nl.modules.common.exception.BadRequestException;
|
||||||
import org.nl.modules.wql.util.SpringContextHolder;
|
import org.nl.modules.wql.util.SpringContextHolder;
|
||||||
import org.openscada.opc.lib.da.Server;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@@ -129,7 +127,6 @@ public class HailiangStackingStationDriver extends AbstractOpcDeviceDriver imple
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute() {
|
public void execute() {
|
||||||
String message = null;
|
|
||||||
try {
|
try {
|
||||||
device_code = this.getDeviceCode();
|
device_code = this.getDeviceCode();
|
||||||
mode = this.itemProtocol.getMode();
|
mode = this.itemProtocol.getMode();
|
||||||
@@ -352,22 +349,11 @@ public class HailiangStackingStationDriver extends AbstractOpcDeviceDriver imple
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void writing(String key, String value) {
|
|
||||||
String to_command = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
|
|
||||||
+ "." + key;
|
|
||||||
String opcservcerid = this.getDevice().getOpc_server_id();
|
|
||||||
Server server = ReadUtil.getServer(opcservcerid);
|
|
||||||
Map<String, Object> itemMap = new HashMap<String, Object>();
|
|
||||||
itemMap.put(to_command, value);
|
|
||||||
ReadUtil.write(itemMap, server);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void issuedOrderInfo(ProduceshiftorderDto dto) {
|
public void issuedOrderInfo(ProduceshiftorderDto dto) {
|
||||||
if (!this.getItemProtocol().getIsonline()) {
|
// if (!this.getItemProtocol().getIsonline()) {
|
||||||
throw new BadRequestException("设备未开机,工单下发失败");
|
// throw new BadRequestException("设备未开机,工单下发失败");
|
||||||
}
|
// }
|
||||||
String lane_tray_template = dto.getLane_tray_template();
|
String lane_tray_template = dto.getLane_tray_template();
|
||||||
String to_tray_info = "";
|
String to_tray_info = "";
|
||||||
if (lane_tray_template.equals("1")) {
|
if (lane_tray_template.equals("1")) {
|
||||||
|
|||||||
@@ -204,7 +204,7 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService, A
|
|||||||
//驱动类中有工单的设备 下发电气工单信息的方法
|
//驱动类中有工单的设备 下发电气工单信息的方法
|
||||||
if (device.getDeviceDriver() instanceof IssuedDeviceOrderInfo) {
|
if (device.getDeviceDriver() instanceof IssuedDeviceOrderInfo) {
|
||||||
IssuedDeviceOrderInfo issuedDeviceOrderInfo = (IssuedDeviceOrderInfo) device.getDeviceDriver();
|
IssuedDeviceOrderInfo issuedDeviceOrderInfo = (IssuedDeviceOrderInfo) device.getDeviceDriver();
|
||||||
try{
|
try {
|
||||||
issuedDeviceOrderInfo.issuedOrderInfo(dto);
|
issuedDeviceOrderInfo.issuedOrderInfo(dto);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
@@ -311,7 +311,7 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService, A
|
|||||||
} else {
|
} else {
|
||||||
status = WorkerOrderEnum.COMPLETE.getCode();
|
status = WorkerOrderEnum.COMPLETE.getCode();
|
||||||
}
|
}
|
||||||
this.addDeviceIsOnline(dto.getDevice_code(), pdto);
|
// this.addDeviceIsOnline(dto.getDevice_code(), pdto);
|
||||||
pdto.setOrder_status(status);
|
pdto.setOrder_status(status);
|
||||||
this.update(pdto);
|
this.update(pdto);
|
||||||
}
|
}
|
||||||
@@ -330,7 +330,7 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService, A
|
|||||||
if (ObjectUtil.isEmpty(dto)) {
|
if (ObjectUtil.isEmpty(dto)) {
|
||||||
throw new BadRequestException("不存在该工单外部标识:" + ext_order_id);
|
throw new BadRequestException("不存在该工单外部标识:" + ext_order_id);
|
||||||
}
|
}
|
||||||
this.addDeviceIsOnline(dto.getDevice_code(), dto);
|
// this.addDeviceIsOnline(dto.getDevice_code(), dto);
|
||||||
WQLObject wo = WQLObject.getWQLObject("acs_produceshiftorder");
|
WQLObject wo = WQLObject.getWQLObject("acs_produceshiftorder");
|
||||||
dto.setOrder_status(type);
|
dto.setOrder_status(type);
|
||||||
dto.setUpdate_time(DateUtil.now());
|
dto.setUpdate_time(DateUtil.now());
|
||||||
|
|||||||
Reference in New Issue
Block a user