Merge branch 'master' of http://121.40.234.130:8899/root/lanzhouhailiang_one
This commit is contained in:
@@ -81,6 +81,9 @@ public class NDCAgvServiceImpl implements NDCAgvService {
|
|||||||
@LokiLog(type = LokiLogType.AGV)
|
@LokiLog(type = LokiLogType.AGV)
|
||||||
@Override
|
@Override
|
||||||
public void sendAgvInstToNDC(String agv_system_type, Instruction inst) {
|
public void sendAgvInstToNDC(String agv_system_type, Instruction inst) {
|
||||||
|
log.info("sendAgvInstToNDC 指令下发NDC:" + "inst_code:" + inst.getInstruction_code() + ",agv_system_type:" + agv_system_type + ",agv_inst_type:" + inst.getAgv_inst_type() +
|
||||||
|
",priority:" + inst.getPriority() + ",startAddress:" + inst.getStart_point_code() +
|
||||||
|
",nextAddress:" + inst.getNext_point_code());
|
||||||
if (StrUtil.equals(paramService.findByCode(AcsConfig.FORKAGV).getValue(), "1")) {
|
if (StrUtil.equals(paramService.findByCode(AcsConfig.FORKAGV).getValue(), "1")) {
|
||||||
if (!StrUtil.equals(agv_system_type, "1")) {
|
if (!StrUtil.equals(agv_system_type, "1")) {
|
||||||
String instcode = inst.getInstruction_code();
|
String instcode = inst.getInstruction_code();
|
||||||
|
|||||||
@@ -720,6 +720,7 @@ public class DeviceServiceImpl implements DeviceService, ApplicationAutoInitial
|
|||||||
String vehicle_code = form.getString("vehicle_code");
|
String vehicle_code = form.getString("vehicle_code");
|
||||||
String islock = form.getString("islock");
|
String islock = form.getString("islock");
|
||||||
String requireSucess = form.getString("requireSucess");
|
String requireSucess = form.getString("requireSucess");
|
||||||
|
String is_force = form.getString("is_force");
|
||||||
String fullrequireSucess = form.getString("fullrequireSucess");
|
String fullrequireSucess = form.getString("fullrequireSucess");
|
||||||
if (device_code.indexOf(".") != -1) {
|
if (device_code.indexOf(".") != -1) {
|
||||||
device_code = device_code.substring(0, device_code.indexOf("."));
|
device_code = device_code.substring(0, device_code.indexOf("."));
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
|||||||
//普通-光电检测
|
//普通-光电检测
|
||||||
PhotoelectricInspectionSiteDeviceDriver photoelectricInspectionSiteDeviceDriver;
|
PhotoelectricInspectionSiteDeviceDriver photoelectricInspectionSiteDeviceDriver;
|
||||||
//标准-光电检测
|
//标准-光电检测
|
||||||
StandardInspectSiteDeviceDriver standardInspectSiteDeviceDriver;
|
StandardInspectSiteDeviceDriver standardInspectSiteDeviceDriver = null;
|
||||||
//自动门
|
//自动门
|
||||||
StandardAutodoorDeviceDriver standardAutodoorDeviceDriver;
|
StandardAutodoorDeviceDriver standardAutodoorDeviceDriver;
|
||||||
|
|
||||||
@@ -237,8 +237,13 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
|||||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
||||||
} else if (device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) {
|
} else if (device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) {
|
||||||
standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) device.getDeviceDriver();
|
standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) device.getDeviceDriver();
|
||||||
standardInspectSiteDeviceDriver.writing("to_command", "1");
|
try {
|
||||||
if (standardInspectSiteDeviceDriver.getMove() == 1 && standardInspectSiteDeviceDriver.getAction() == 1) {
|
standardInspectSiteDeviceDriver.writing("to_command", "1");
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((standardInspectSiteDeviceDriver.getMove() == 1 && standardInspectSiteDeviceDriver.getAction() == 1 )|| standardInspectSiteDeviceDriver.getIs_force()==1 ) {
|
||||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
||||||
} else {
|
} else {
|
||||||
message = "设备号:" + device_code + "光电信号:" + standardInspectSiteDeviceDriver.getMove() + ",动作信号:" + standardInspectSiteDeviceDriver.getAction() + ",指令号:" + ikey +"不满足取货条件";
|
message = "设备号:" + device_code + "光电信号:" + standardInspectSiteDeviceDriver.getMove() + ",动作信号:" + standardInspectSiteDeviceDriver.getAction() + ",指令号:" + ikey +"不满足取货条件";
|
||||||
@@ -247,7 +252,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
|||||||
} else {
|
} else {
|
||||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
||||||
}
|
}
|
||||||
|
standardInspectSiteDeviceDriver.setIs_force(0);
|
||||||
}
|
}
|
||||||
// 取货完毕
|
// 取货完毕
|
||||||
//(Itype=1/2/3,需要WCS反馈Phase)
|
//(Itype=1/2/3,需要WCS反馈Phase)
|
||||||
@@ -305,12 +310,13 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
|||||||
} else if (device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) {
|
} else if (device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) {
|
||||||
standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) device.getDeviceDriver();
|
standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) device.getDeviceDriver();
|
||||||
standardInspectSiteDeviceDriver.writing("to_command", "0");
|
standardInspectSiteDeviceDriver.writing("to_command", "0");
|
||||||
if (standardInspectSiteDeviceDriver.getMove() == 0) {
|
if (standardInspectSiteDeviceDriver.getMove() == 0|| standardInspectSiteDeviceDriver.getIs_force()==1) {
|
||||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
||||||
} else {
|
} else {
|
||||||
message = "设备号:" + device_code + "光电信号:" + standardInspectSiteDeviceDriver.getMove() + ",动作信号:" + standardInspectSiteDeviceDriver.getAction() + ",指令号:" + ikey + "不满足取货条件";
|
message = "设备号:" + device_code + "光电信号:" + standardInspectSiteDeviceDriver.getMove() + ",动作信号:" + standardInspectSiteDeviceDriver.getAction() + ",指令号:" + ikey + "不满足取货条件";
|
||||||
log.info("设备{}当前光电信号{},动作信号{},不满足取货条件", device_code, standardInspectSiteDeviceDriver.getMove());
|
log.info("设备{}当前光电信号{},动作信号{},不满足取货条件", device_code, standardInspectSiteDeviceDriver.getMove());
|
||||||
}
|
}
|
||||||
|
standardInspectSiteDeviceDriver.setIs_force(0);
|
||||||
} else {
|
} else {
|
||||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
||||||
}
|
}
|
||||||
@@ -500,12 +506,13 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
|||||||
} else if (device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) {
|
} else if (device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) {
|
||||||
standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) device.getDeviceDriver();
|
standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) device.getDeviceDriver();
|
||||||
standardInspectSiteDeviceDriver.writing("to_command", "1");
|
standardInspectSiteDeviceDriver.writing("to_command", "1");
|
||||||
if (standardInspectSiteDeviceDriver.getMove() == 0 && standardInspectSiteDeviceDriver.getAction() == 1) {
|
if ((standardInspectSiteDeviceDriver.getMove() == 0 && standardInspectSiteDeviceDriver.getAction() == 1)||standardInspectSiteDeviceDriver.getIs_force()==1) {
|
||||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
||||||
}
|
}
|
||||||
|
standardInspectSiteDeviceDriver.setIs_force(0);
|
||||||
}
|
}
|
||||||
//放货完成
|
//放货完成
|
||||||
//(Itype=1/2/3,需要WCS反馈)
|
//(Itype=1/2/3,需要WCS反馈)
|
||||||
@@ -561,12 +568,13 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
|||||||
} else if (device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) {
|
} else if (device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) {
|
||||||
standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) device.getDeviceDriver();
|
standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) device.getDeviceDriver();
|
||||||
standardInspectSiteDeviceDriver.writing("to_command", "0");
|
standardInspectSiteDeviceDriver.writing("to_command", "0");
|
||||||
if (standardInspectSiteDeviceDriver.getMove() == 1) {
|
if ((standardInspectSiteDeviceDriver.getMove() == 1)||standardInspectSiteDeviceDriver.getIs_force()==1) {
|
||||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
||||||
}
|
}
|
||||||
|
standardInspectSiteDeviceDriver.setIs_force(0);
|
||||||
}
|
}
|
||||||
//到达放货点
|
//到达放货点
|
||||||
//(Itype=1、3,需要WCS反馈)
|
//(Itype=1、3,需要WCS反馈)
|
||||||
|
|||||||
@@ -380,6 +380,14 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
//按照优先级排序 优先级相等按照创建时间排序
|
//按照优先级排序 优先级相等按照创建时间排序
|
||||||
taskDtos = this.sortTask(taskDtos);
|
taskDtos = this.sortTask(taskDtos);
|
||||||
TaskDto taskDto = taskDtos.get(0);
|
TaskDto taskDto = taskDtos.get(0);
|
||||||
|
|
||||||
|
//存在行架->暂存的AGV任务 需要过滤
|
||||||
|
// 6 行架任务 8烘箱任务
|
||||||
|
if(!StrUtil.equals(taskDto.getTask_type(),"6") || StrUtil.equals(taskDto.getTask_type(),"8")){
|
||||||
|
taskDto = null;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
Instruction instruction = instructionService.findByTaskcodeAndStatus(taskDto.getTask_code());
|
Instruction instruction = instructionService.findByTaskcodeAndStatus(taskDto.getTask_code());
|
||||||
String start_device_code = instruction.getStart_device_code();
|
String start_device_code = instruction.getStart_device_code();
|
||||||
String next_device_code = instruction.getNext_device_code();
|
String next_device_code = instruction.getNext_device_code();
|
||||||
@@ -465,11 +473,18 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
} else {
|
} else {
|
||||||
List<TaskDto> taskDtoList = taskserver.queryTaskByDeviceCode(startDeviceCode);
|
List<TaskDto> taskDtoList = taskserver.queryTaskByDeviceCode(startDeviceCode);
|
||||||
if (ObjectUtil.isNotEmpty(taskDtoList)) {
|
if (ObjectUtil.isNotEmpty(taskDtoList)) {
|
||||||
//按照优先级排序 优先级相等按照创建时间排序
|
for(int j=0; j <taskDtoList.size();j++ ){
|
||||||
taskDtoList = this.sortTask(taskDtoList);
|
//按照优先级排序 优先级相等按照创建时间排序
|
||||||
task = taskDtoList.get(0);
|
taskDtoList = this.sortTask(taskDtoList);
|
||||||
|
task = taskDtoList.get(j);
|
||||||
|
// 6 行架任务 8烘箱任务
|
||||||
|
if(!StrUtil.equals(task.getTask_type(),"6") || StrUtil.equals(task.getTask_type(),"8")){
|
||||||
|
task = null;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (ObjectUtil.isNotEmpty(task)) break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (ObjectUtil.isNotEmpty(task)) break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!ObjectUtil.isEmpty(task)) {
|
if (!ObjectUtil.isEmpty(task)) {
|
||||||
|
|||||||
@@ -986,7 +986,6 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
this.require_empty_in_time = date;
|
this.require_empty_in_time = date;
|
||||||
|
|
||||||
if (StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(), "1")) {
|
if (StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(), "1")) {
|
||||||
message = "申请空盘入库任务中...";
|
|
||||||
|
|
||||||
// if(taskserver.querySameOriginTask(this.device_code) > 0 ){
|
// if(taskserver.querySameOriginTask(this.device_code) > 0 ){
|
||||||
// message = "已存在空盘出库任务不再请求";
|
// message = "已存在空盘出库任务不再请求";
|
||||||
@@ -998,6 +997,7 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
apply.put("type", "2");
|
apply.put("type", "2");
|
||||||
String str = acsToWmsService.applyTaskToWms(apply);
|
String str = acsToWmsService.applyTaskToWms(apply);
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "申请空盘入库,请求参数:" + apply);
|
logServer.deviceExecuteLog(this.device_code, "", "", "申请空盘入库,请求参数:" + apply);
|
||||||
|
message = "申请空盘入库任务,请求参数:"+apply;
|
||||||
|
|
||||||
JSONObject jo = JSON.parseObject(str);
|
JSONObject jo = JSON.parseObject(str);
|
||||||
if (ObjectUtil.isEmpty(jo)) {
|
if (ObjectUtil.isEmpty(jo)) {
|
||||||
|
|||||||
@@ -32,6 +32,9 @@ public class ItemProtocol {
|
|||||||
//重量
|
//重量
|
||||||
public static String item_weight = "weight";
|
public static String item_weight = "weight";
|
||||||
|
|
||||||
|
public static String item_height = "height";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//下发命令
|
//下发命令
|
||||||
public static String item_to_command = "to_command";
|
public static String item_to_command = "to_command";
|
||||||
@@ -68,10 +71,14 @@ public class ItemProtocol {
|
|||||||
public int getMove() {
|
public int getMove() {
|
||||||
return this.getOpcIntegerValue(item_move);
|
return this.getOpcIntegerValue(item_move);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getWeight() {
|
public int getWeight() {
|
||||||
return this.getOpcIntegerValue(item_weight);
|
return this.getOpcIntegerValue(item_weight);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getHeight() {
|
||||||
|
return this.getOpcIntegerValue(item_height);
|
||||||
|
}
|
||||||
public int getCarrier_direction() {
|
public int getCarrier_direction() {
|
||||||
return this.getOpcIntegerValue(item_carrier_direction);
|
return this.getOpcIntegerValue(item_carrier_direction);
|
||||||
}
|
}
|
||||||
@@ -140,6 +147,7 @@ public class ItemProtocol {
|
|||||||
list.add(new ItemDto(item_barcode_length, "条码长度", "DB101.B800"));
|
list.add(new ItemDto(item_barcode_length, "条码长度", "DB101.B800"));
|
||||||
list.add(new ItemDto(item_barcode, "条码", "DB101.STRING802.50"));
|
list.add(new ItemDto(item_barcode, "条码", "DB101.STRING802.50"));
|
||||||
list.add(new ItemDto(item_weight, "重量", "DB101.D702"));
|
list.add(new ItemDto(item_weight, "重量", "DB101.D702"));
|
||||||
|
list.add(new ItemDto(item_height, "高度", "DB101.D704"));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -95,6 +95,8 @@ public class StandardCoveyorControlWithScannerDeviceDriver extends AbstractOpcDe
|
|||||||
int error = 0;
|
int error = 0;
|
||||||
int task = 0;
|
int task = 0;
|
||||||
int weight = 0;
|
int weight = 0;
|
||||||
|
|
||||||
|
int height = 0;
|
||||||
String plcbarcode = null;
|
String plcbarcode = null;
|
||||||
String last_plcbarcode = null;
|
String last_plcbarcode = null;
|
||||||
int plcbarcode_length = 0;
|
int plcbarcode_length = 0;
|
||||||
@@ -112,6 +114,9 @@ public class StandardCoveyorControlWithScannerDeviceDriver extends AbstractOpcDe
|
|||||||
int last_error = 0;
|
int last_error = 0;
|
||||||
int last_task = 0;
|
int last_task = 0;
|
||||||
int last_weight = 0;
|
int last_weight = 0;
|
||||||
|
|
||||||
|
int last_height = 0;
|
||||||
|
|
||||||
String last_container;
|
String last_container;
|
||||||
String inst_message;
|
String inst_message;
|
||||||
String device_code;
|
String device_code;
|
||||||
@@ -215,6 +220,7 @@ public class StandardCoveyorControlWithScannerDeviceDriver extends AbstractOpcDe
|
|||||||
task = this.itemProtocol.getTask();
|
task = this.itemProtocol.getTask();
|
||||||
plcbarcode = this.itemProtocol.getplcBarCode();
|
plcbarcode = this.itemProtocol.getplcBarCode();
|
||||||
plcbarcode_length = this.itemProtocol.getBarCode_length();
|
plcbarcode_length = this.itemProtocol.getBarCode_length();
|
||||||
|
height = this.itemProtocol.getHeight();
|
||||||
to_command = this.itemProtocol.getTo_command();
|
to_command = this.itemProtocol.getTo_command();
|
||||||
to_target = this.itemProtocol.getTo_target();
|
to_target = this.itemProtocol.getTo_target();
|
||||||
to_task = this.itemProtocol.getTo_task();
|
to_task = this.itemProtocol.getTo_task();
|
||||||
@@ -279,6 +285,9 @@ public class StandardCoveyorControlWithScannerDeviceDriver extends AbstractOpcDe
|
|||||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号plcbarcode:" + last_plcbarcode + "->" + plcbarcode);
|
logServer.deviceExecuteLog(this.device_code, "", "", "信号plcbarcode:" + last_plcbarcode + "->" + plcbarcode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (height != last_height){
|
||||||
|
logServer.deviceExecuteLog(this.device_code, "", "", "信号height:" + last_height + "->" + height);
|
||||||
|
}
|
||||||
if (task != last_task) {
|
if (task != last_task) {
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号task:" + last_task + "->" + task);
|
logServer.deviceExecuteLog(this.device_code, "", "", "信号task:" + last_task + "->" + task);
|
||||||
}
|
}
|
||||||
@@ -341,10 +350,10 @@ public class StandardCoveyorControlWithScannerDeviceDriver extends AbstractOpcDe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (move > 0 && !StrUtil.isEmpty(newBarcode) && !requireSucess) {
|
if (move > 0 && !StrUtil.isEmpty(newBarcode) && !requireSucess && height>0) {
|
||||||
instruction_require(newBarcode.trim());
|
instruction_require(newBarcode.trim());
|
||||||
}
|
}
|
||||||
if (move > 0 && !StrUtil.isEmpty(newBarcode) && !applySucess) {
|
if (move > 0 && !StrUtil.isEmpty(newBarcode) && !applySucess && height>0) {
|
||||||
instruction_apply(newBarcode.trim());
|
instruction_apply(newBarcode.trim());
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -363,7 +372,7 @@ public class StandardCoveyorControlWithScannerDeviceDriver extends AbstractOpcDe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 申请贴标
|
// 申请贴标
|
||||||
if (move > 0 && !StrUtil.isEmpty(newBarcodes) && !requireSucess) {
|
if (move > 0 && !StrUtil.isEmpty(newBarcodes) && !requireSucess ) {
|
||||||
applyLabeling(newBarcodes);
|
applyLabeling(newBarcodes);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -859,6 +868,7 @@ public class StandardCoveyorControlWithScannerDeviceDriver extends AbstractOpcDe
|
|||||||
JSONObject apply = new JSONObject();
|
JSONObject apply = new JSONObject();
|
||||||
apply.put("vehicle_code", container_code);
|
apply.put("vehicle_code", container_code);
|
||||||
apply.put("device_code", device_code);
|
apply.put("device_code", device_code);
|
||||||
|
apply.put("height", height);
|
||||||
apply.put("type", "1");
|
apply.put("type", "1");
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "申请入库,木箱号:"+ container_code + ",请求参数:" + apply.toString());
|
logServer.deviceExecuteLog(this.device_code, "", "", "申请入库,木箱号:"+ container_code + ",请求参数:" + apply.toString());
|
||||||
String str = acsToWmsService.applyTaskToWms(apply);
|
String str = acsToWmsService.applyTaskToWms(apply);
|
||||||
@@ -1074,6 +1084,7 @@ public class StandardCoveyorControlWithScannerDeviceDriver extends AbstractOpcDe
|
|||||||
jo.put("inst_message", this.inst_message);
|
jo.put("inst_message", this.inst_message);
|
||||||
jo.put("task", this.getTask());
|
jo.put("task", this.getTask());
|
||||||
jo.put("barcode", plcbarcode);
|
jo.put("barcode", plcbarcode);
|
||||||
|
jo.put("height", height);
|
||||||
jo.put("barcode_length", plcbarcode_length);
|
jo.put("barcode_length", plcbarcode_length);
|
||||||
String requireSucess = "0";
|
String requireSucess = "0";
|
||||||
if (this.requireSucess) {
|
if (this.requireSucess) {
|
||||||
|
|||||||
@@ -113,6 +113,9 @@ public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver imp
|
|||||||
//申请物料
|
//申请物料
|
||||||
private Boolean apply_material = false;
|
private Boolean apply_material = false;
|
||||||
|
|
||||||
|
//是否强制 0否 1是
|
||||||
|
private int is_force = 0;
|
||||||
|
|
||||||
//暂定 0就绪 1请求取货 2取货完成 3请求放货 4放货完成 5取货完成离开 6放货完成离开 7请求进入区域 8请求离开区域
|
//暂定 0就绪 1请求取货 2取货完成 3请求放货 4放货完成 5取货完成离开 6放货完成离开 7请求进入区域 8请求离开区域
|
||||||
int flag;
|
int flag;
|
||||||
|
|
||||||
@@ -201,6 +204,8 @@ public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver imp
|
|||||||
String mode = "";
|
String mode = "";
|
||||||
String action = "";
|
String action = "";
|
||||||
String move = "";
|
String move = "";
|
||||||
|
String is_force = "";
|
||||||
|
|
||||||
if (this.getMode() == 0) {
|
if (this.getMode() == 0) {
|
||||||
mode = "未联机";
|
mode = "未联机";
|
||||||
} else if (this.getMode() == 1) {
|
} else if (this.getMode() == 1) {
|
||||||
@@ -211,6 +216,12 @@ public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver imp
|
|||||||
mode = "运行中";
|
mode = "运行中";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.getIs_force() == 0) {
|
||||||
|
is_force = "正常";
|
||||||
|
} else if (this.getIs_force() == 1) {
|
||||||
|
is_force = "禁用";
|
||||||
|
}
|
||||||
|
|
||||||
if (this.getMove() == 0) {
|
if (this.getMove() == 0) {
|
||||||
move = "无货";
|
move = "无货";
|
||||||
jo.put("hasGoods", false);
|
jo.put("hasGoods", false);
|
||||||
@@ -229,11 +240,23 @@ public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver imp
|
|||||||
jo.put("error", this.getError());
|
jo.put("error", this.getError());
|
||||||
jo.put("isError", this.getIserror());
|
jo.put("isError", this.getIserror());
|
||||||
jo.put("task", this.getTask());
|
jo.put("task", this.getTask());
|
||||||
|
jo.put("is_click", true);
|
||||||
|
jo.put("is_force", this.getIs_force());
|
||||||
return jo;
|
return jo;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setDeviceStatus(JSONObject data) {
|
public void setDeviceStatus(JSONObject data) {
|
||||||
|
String is_force = data.getString("is_force");
|
||||||
|
if (StrUtil.isNotEmpty(is_force)) {
|
||||||
|
this.setIs_force(Integer.parseInt(is_force));
|
||||||
|
}
|
||||||
|
String requestSucess = data.getString("requireSucess");
|
||||||
|
if (StrUtil.equals(requestSucess, "0")) {
|
||||||
|
this.requireSucess = false;
|
||||||
|
} else if (StrUtil.equals(requestSucess, "1")) {
|
||||||
|
this.requireSucess = true;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -395,8 +395,13 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
|
|||||||
if (!StrUtil.equals(task.getAgv_system_type(), "0")
|
if (!StrUtil.equals(task.getAgv_system_type(), "0")
|
||||||
&& ObjectUtil.isNotEmpty(task.getAgv_system_type())) {
|
&& ObjectUtil.isNotEmpty(task.getAgv_system_type())) {
|
||||||
NDCAgvService ndcAgvService = SpringContextHolder.getBean(NDCAgvService.class);
|
NDCAgvService ndcAgvService = SpringContextHolder.getBean(NDCAgvService.class);
|
||||||
log.warn("下发AGV指令数据,"+ "指令号:" + dto.getInstruction_code() + ",AGV系统类型:"+ task.getAgv_system_type());
|
log.warn("下发AGV指令数据,"+ "指令号:" + dto.getInstruction_code() + ",AGV系统类型:"+ dto.getAgv_system_type()
|
||||||
|
+ ",AGV指令类型:" + dto.getInstruction_type() );
|
||||||
try {
|
try {
|
||||||
|
if(StrUtil.isEmpty(dto.getAgv_inst_type()) || StrUtil.isEmpty(dto.getAgv_system_type())){
|
||||||
|
log.info("sendAgvInstToNDC 指令校验:" + dto.getInstruction_code() + ",inst_type:" +dto.getInstruction_type()
|
||||||
|
+",inst_system_type:" + dto.getAgv_system_type());
|
||||||
|
}
|
||||||
ndcAgvService.sendAgvInstToNDC(task.getAgv_system_type(), dto);
|
ndcAgvService.sendAgvInstToNDC(task.getAgv_system_type(), dto);
|
||||||
} catch (Exception e){
|
} catch (Exception e){
|
||||||
dto.setSend_status("2");
|
dto.setSend_status("2");
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ public class AutoCreateInst {
|
|||||||
//判断agv系统
|
//判断agv系统
|
||||||
//1、1楼叉车系统
|
//1、1楼叉车系统
|
||||||
//2、2楼1区域AGV系统
|
//2、2楼1区域AGV系统
|
||||||
//3、2楼2区域AGV系统
|
//3、2楼2区域AGV系统 -已废弃
|
||||||
if (!StrUtil.equals(agv_system_type, "1")) {
|
if (!StrUtil.equals(agv_system_type, "1")) {
|
||||||
// task_type
|
// task_type
|
||||||
//1、生箔; Itype=1:取空,取满,放空,放满;
|
//1、生箔; Itype=1:取空,取满,放空,放满;
|
||||||
@@ -164,11 +164,13 @@ public class AutoCreateInst {
|
|||||||
instdto.setAgv_inst_type("3");
|
instdto.setAgv_inst_type("3");
|
||||||
} else if (StrUtil.equals(task_type, "8")) {
|
} else if (StrUtil.equals(task_type, "8")) {
|
||||||
instdto.setAgv_inst_type("2");
|
instdto.setAgv_inst_type("2");
|
||||||
|
} else {
|
||||||
|
log.info("未找到对应的AGV指令类型,任务号:" + acsTask.getTask_code() + ",task_type:" + acsTask.getTask_type()) ;
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
instdto.setAgv_inst_type("4");
|
instdto.setAgv_inst_type("4");
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
instructionService.create(instdto);
|
instructionService.create(instdto);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|||||||
@@ -56,14 +56,14 @@ public class DictController {
|
|||||||
|
|
||||||
@ApiOperation("查询字典")
|
@ApiOperation("查询字典")
|
||||||
@GetMapping(value = "/all")
|
@GetMapping(value = "/all")
|
||||||
@SaCheckPermission("dict:list")
|
// @SaCheckPermission("dict:list")
|
||||||
public ResponseEntity<Object> queryAll(){
|
public ResponseEntity<Object> queryAll(){
|
||||||
return new ResponseEntity<>(dictService.queryAll(new DictQueryCriteria()),HttpStatus.OK);
|
return new ResponseEntity<>(dictService.queryAll(new DictQueryCriteria()),HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("查询字典")
|
@ApiOperation("查询字典")
|
||||||
@GetMapping
|
@GetMapping
|
||||||
@SaCheckPermission("dict:list")
|
// @SaCheckPermission("dict:list")
|
||||||
public ResponseEntity<Object> query(DictQueryCriteria resources, Pageable pageable){
|
public ResponseEntity<Object> query(DictQueryCriteria resources, Pageable pageable){
|
||||||
return new ResponseEntity<>(dictService.queryAll(resources,pageable),HttpStatus.OK);
|
return new ResponseEntity<>(dictService.queryAll(resources,pageable),HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
</logger>-->
|
</logger>-->
|
||||||
|
|
||||||
<!-- 打印sql -->
|
<!-- 打印sql -->
|
||||||
<logger name="org.nl.modules.quartz.task.AutoCreateInst" level="info" additivity="false">
|
<logger name="org.nl.modules.quartz.task.AutoCreateInst" level="info" additivity="true">
|
||||||
<appender-ref ref="FILE3"/>
|
<appender-ref ref="FILE3"/>
|
||||||
</logger>
|
</logger>
|
||||||
</included>
|
</included>
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ https://juejin.cn/post/6844903775631572999
|
|||||||
<include resource="log/LkToAcs.xml"/>
|
<include resource="log/LkToAcs.xml"/>
|
||||||
<include resource="log/AcsToWms.xml"/>
|
<include resource="log/AcsToWms.xml"/>
|
||||||
<include resource="log/WmsToAcs.xml"/>
|
<include resource="log/WmsToAcs.xml"/>
|
||||||
|
<include resource="log/AutoCreateInst.xml"/>
|
||||||
<include resource="log/OpcUtil.xml"/>
|
<include resource="log/OpcUtil.xml"/>
|
||||||
<include resource="log/TwoNDCSocketConnectionAutoRun.xml"/>
|
<include resource="log/TwoNDCSocketConnectionAutoRun.xml"/>
|
||||||
<include resource="log/AgvNdcTwoDeviceDriver.xml"/>
|
<include resource="log/AgvNdcTwoDeviceDriver.xml"/>
|
||||||
|
|||||||
@@ -33,8 +33,8 @@
|
|||||||
"url": "https://github.com/elunez/eladmin/issues"
|
"url": "https://github.com/elunez/eladmin/issues"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@logicflow/core": "^1.1.22",
|
"@logicflow/core": "1.2.1",
|
||||||
"@logicflow/extension": "^1.1.22",
|
"@logicflow/extension": "1.2.1",
|
||||||
"@riophae/vue-treeselect": "0.4.0",
|
"@riophae/vue-treeselect": "0.4.0",
|
||||||
"af-table-column": "^1.0.3",
|
"af-table-column": "^1.0.3",
|
||||||
"ansi_up": "^5.1.0",
|
"ansi_up": "^5.1.0",
|
||||||
|
|||||||
@@ -137,6 +137,24 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<el-dialog title="设备设置" :visible.sync="dialogFormVisible8" width="35%">
|
||||||
|
<el-form :model="form" size="small">
|
||||||
|
<el-form-item label="设备编号" prop="device_code" label-width="120px">
|
||||||
|
<el-input v-model="form.device_code" :disabled="true" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="是否强制" prop="is_force" label-width="120px">
|
||||||
|
<el-radio-group v-model="form.is_force">
|
||||||
|
<el-radio-button :label="0">否</el-radio-button>
|
||||||
|
<el-radio-button :label="1">是</el-radio-button>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="dialogFormVisible8 = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="dialogSave">确 定</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
<el-dialog title="设备设置" :visible.sync="dialogFormVisible6" width="35%">
|
<el-dialog title="设备设置" :visible.sync="dialogFormVisible6" width="35%">
|
||||||
<el-form :model="form" size="small">
|
<el-form :model="form" size="small">
|
||||||
<el-form-item label="设备编号" prop="device_code" label-width="120px">
|
<el-form-item label="设备编号" prop="device_code" label-width="120px">
|
||||||
@@ -212,6 +230,7 @@ export default {
|
|||||||
dialogFormVisible5: false,
|
dialogFormVisible5: false,
|
||||||
dialogFormVisible6: false,
|
dialogFormVisible6: false,
|
||||||
dialogFormVisible7: false,
|
dialogFormVisible7: false,
|
||||||
|
dialogFormVisible8: false,
|
||||||
form: {
|
form: {
|
||||||
device_code: '',
|
device_code: '',
|
||||||
hasGoodStatus: null,
|
hasGoodStatus: null,
|
||||||
@@ -220,6 +239,7 @@ export default {
|
|||||||
suspended: null,
|
suspended: null,
|
||||||
material_type: '',
|
material_type: '',
|
||||||
requireSucess: '',
|
requireSucess: '',
|
||||||
|
is_force: '',
|
||||||
fullrequireSucess: '',
|
fullrequireSucess: '',
|
||||||
is_disable: '',
|
is_disable: '',
|
||||||
applySucess: ''
|
applySucess: ''
|
||||||
@@ -362,10 +382,12 @@ export default {
|
|||||||
this.dialogFormVisible7 = true
|
this.dialogFormVisible7 = true
|
||||||
} else if (clickObj.data.driver_type === 'siemens_conveyor_ckk') {
|
} else if (clickObj.data.driver_type === 'siemens_conveyor_ckk') {
|
||||||
this.dialogFormVisible7 = true
|
this.dialogFormVisible7 = true
|
||||||
|
} else if (clickObj.data.driver_type === 'standard_inspect_site') {
|
||||||
|
this.dialogFormVisible8 = true
|
||||||
} else if (clickObj.data.driver_type === 'standard_conveyor_control_with_scanner') {
|
} else if (clickObj.data.driver_type === 'standard_conveyor_control_with_scanner') {
|
||||||
this.dialogFormVisible6 = true
|
this.dialogFormVisible6 = true
|
||||||
} else {
|
} else {
|
||||||
this.dialogFormVisible = true
|
this.dialogFormVisible8 = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.form.angle = clickObj.angle
|
this.form.angle = clickObj.angle
|
||||||
@@ -374,6 +396,7 @@ export default {
|
|||||||
this.form.hasGoodStatus = clickObj.data.hasGoods
|
this.form.hasGoodStatus = clickObj.data.hasGoods
|
||||||
this.form.material_type = clickObj.data.material_type
|
this.form.material_type = clickObj.data.material_type
|
||||||
this.form.requireSucess = clickObj.data.requireSucess
|
this.form.requireSucess = clickObj.data.requireSucess
|
||||||
|
this.form.is_force = clickObj.data.is_force
|
||||||
this.form.fullrequireSucess = clickObj.data.fullrequireSucess
|
this.form.fullrequireSucess = clickObj.data.fullrequireSucess
|
||||||
this.form.is_disable = clickObj.data.is_disable1
|
this.form.is_disable = clickObj.data.is_disable1
|
||||||
this.form.applySucess = clickObj.data.applySucess
|
this.form.applySucess = clickObj.data.applySucess
|
||||||
@@ -560,6 +583,9 @@ export default {
|
|||||||
} else if (val === 'requireSucess') {
|
} else if (val === 'requireSucess') {
|
||||||
const obj = { name: '请求成功标记', value: data[val] }
|
const obj = { name: '请求成功标记', value: data[val] }
|
||||||
this.arr.push(obj)
|
this.arr.push(obj)
|
||||||
|
} else if (val === 'is_force') {
|
||||||
|
const obj = { name: '是否强制', value: data[val] }
|
||||||
|
this.arr.push(obj)
|
||||||
} else if (val === 'applySucess') {
|
} else if (val === 'applySucess') {
|
||||||
const obj = { name: 'applySucess', value: data[val] }
|
const obj = { name: 'applySucess', value: data[val] }
|
||||||
this.arr.push(obj)
|
this.arr.push(obj)
|
||||||
@@ -657,6 +683,7 @@ export default {
|
|||||||
this.dialogFormVisible5 = false
|
this.dialogFormVisible5 = false
|
||||||
this.dialogFormVisible6 = false
|
this.dialogFormVisible6 = false
|
||||||
this.dialogFormVisible7 = false
|
this.dialogFormVisible7 = false
|
||||||
|
this.dialogFormVisible8 = false
|
||||||
this.initStageData()
|
this.initStageData()
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
this.dialogFormVisible = false
|
this.dialogFormVisible = false
|
||||||
@@ -664,6 +691,7 @@ export default {
|
|||||||
this.dialogFormVisible4 = false
|
this.dialogFormVisible4 = false
|
||||||
this.dialogFormVisible5 = false
|
this.dialogFormVisible5 = false
|
||||||
this.dialogFormVisible7 = false
|
this.dialogFormVisible7 = false
|
||||||
|
this.dialogFormVisible8 = false
|
||||||
console.log(err.response.data.message)
|
console.log(err.response.data.message)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user