From 46463e7b6514eacdfd3417a756d5bfbbcdf38eb7 Mon Sep 17 00:00:00 2001 From: yanps Date: Wed, 8 Nov 2023 17:30:33 +0800 Subject: [PATCH] =?UTF-8?q?opt:=20=E7=BA=B8=E7=AE=A1=E5=BA=93,=E5=A5=97?= =?UTF-8?q?=E7=AE=A1=E5=B7=A5=E4=BD=8D=E9=A9=B1=E5=8A=A8=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/org/nl/acs/device/wql/task_inst.xls | Bin 167424 -> 167936 bytes .../CasingStationConveyorDeviceDriver.java | 2 +- .../casing_station/ItemProtocol.java | 2 +- .../paper_tube_device2/ItemProtocol.java | 94 +++++ .../basedriver/paper_tube_device2/Paper.java | 2 +- .../PaperTubeConveyor2DeviceDriver.java | 372 ++++++++++++++++-- .../device_driver/driver/OpcDeviceDriver.java | 16 + .../acs/ext/wms/data/CreateTaskRequest.java | 4 + .../wms/service/impl/AcsToWmsServiceImpl.java | 3 + .../wms/service/impl/WmsToAcsServiceImpl.java | 5 + .../org/nl/acs/task/service/dto/TaskDto.java | 10 +- 11 files changed, 465 insertions(+), 45 deletions(-) diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device/wql/task_inst.xls b/acs/nladmin-system/src/main/java/org/nl/acs/device/wql/task_inst.xls index 7470984f1b975aa75f7771b3840aaf0f499a2cc4..136a812e81e915eea21b20e8461ad4313f33d810 100644 GIT binary patch delta 16461 zcmeHOd3aStmaqG^yd)$qkc1?>07(ctvM*sz++dV_O9%o95ENx>HWegt5dlFIfl>pq zyDM(^)VOpb-7{nNjLWD!w%vZywp-M3#h#uX_nz}RRj=N=H)YR%^L;blQ>c#Y(A8=`B>JTInLcJjl-P$*6JOB{m#BXD07bx;xOGeC2|6b1Cdn&UVD0F z$HbaY#0gxGE3Xc3a%LsI4j&F=JRh#9Ey#K*aX7lmiA97nMVu$5iRoe<-Ev4)quif$ zS?Ixe-769q*{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*KQ0{g~KE1*T|#Vf3qbpIQZXN Cvv!sM diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/casing_station/CasingStationConveyorDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/casing_station/CasingStationConveyorDeviceDriver.java index 48c33ca87..0c7406519 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/casing_station/CasingStationConveyorDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/casing_station/CasingStationConveyorDeviceDriver.java @@ -298,7 +298,7 @@ public class CasingStationConveyorDeviceDriver extends AbstractOpcDeviceDriver i } else { message = applyPaperActionResponse.getMessage(); map.put("code", "to_command"); - map.put("value", "5"); + map.put("value", "99"); this.writing(map); requireSucess = false; message = "纸管不匹配"; diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/casing_station/ItemProtocol.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/casing_station/ItemProtocol.java index feb67bc19..6e560b925 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/casing_station/ItemProtocol.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/casing_station/ItemProtocol.java @@ -107,7 +107,7 @@ public class ItemProtocol { list.add(new ItemDto(item_error, "报警", "DB101.W58")); list.add(new ItemDto(item_task, "任务号", "DB101.W6")); list.add(new ItemDto(item_material1, "物料1", "DB101.W7")); - list.add(new ItemDto(item_material2, "物料1", "DB101.W8")); + list.add(new ItemDto(item_material2, "物料2", "DB101.W8")); return list; } diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/paper_tube_device2/ItemProtocol.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/paper_tube_device2/ItemProtocol.java index 8a14a2ad5..79da1956a 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/paper_tube_device2/ItemProtocol.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/paper_tube_device2/ItemProtocol.java @@ -7,6 +7,7 @@ import cn.hutool.json.JSONUtil; import lombok.Data; import lombok.extern.slf4j.Slf4j; import org.apache.poi.ss.formula.functions.T; +import org.jinterop.dcom.core.JIUnsignedInteger; import org.nl.acs.device.device_driver.standard_inspect.ItemDto; import java.util.ArrayList; @@ -110,6 +111,47 @@ public class ItemProtocol { this.driver = driver; } + public String getTo_material1() { + return this.getOpcStringValue(item_to_material1); + } + public String getTo_material2() { + return this.getOpcStringValue(item_to_material2); + } + public String getTo_material3() { + return this.getOpcStringValue(item_to_material3); + } + + public int getTo_out_qty1() { + return this.getOpcIntegerValue(item_to_out_qty1); + } + public int getTo_out_qty2() { + return this.getOpcIntegerValue(item_to_out_qty2); + } + public int getTo_out_qty3() { + return this.getOpcIntegerValue(item_to_out_qty3); + } + + public int getTo_seq1() { + return this.getOpcIntegerValue(item_to_seq1); + } + public int getTo_seq2() { + return this.getOpcIntegerValue(item_to_seq2); + } + public int getTo_seq3() { + return this.getOpcIntegerValue(item_to_seq3); + } + + public int getTo_position1() { + return this.getOpcIntegerValue(item_to_position1); + } + public int getTo_position2() { + return this.getOpcIntegerValue(item_to_position2); + } + public int getTo_position3() { + return this.getOpcIntegerValue(item_to_position3); + } + + public int getHeartbeat() { return this.getOpcIntegerValue(item_heartbeat); } @@ -201,6 +243,48 @@ public class ItemProtocol { } + public int getQty1() { + return this.getOpcIntegerValue(item_qty1); + } + public int getQty2() { + return this.getOpcIntegerValue(item_qty2); + } + public int getQty3() { + return this.getOpcIntegerValue(item_qty3); + } + public int getQty4() { + return this.getOpcIntegerValue(item_qty4); + } + public int getQty5() { + return this.getOpcIntegerValue(item_qty5); + } + public int getQty6() { + return this.getOpcIntegerValue(item_qty6); + } + public int getQty7() { + return this.getOpcIntegerValue(item_qty7); + } + public int getQty8() { + return this.getOpcIntegerValue(item_qty8); + } + public int getQty9() { + return this.getOpcIntegerValue(item_qty9); + } + public int getQty10() { + return this.getOpcIntegerValue(item_qty10); + } + public int getQty11() { + return this.getOpcIntegerValue(item_qty11); + } + public int getQty12() { + return this.getOpcIntegerValue(item_qty12); + } + + + + + + public int getTotarget() { return this.getOpcIntegerValue(item_to_target); } @@ -244,6 +328,16 @@ public class ItemProtocol { return new int[3]; } + public int[] getJIUnsignedInteger(String protocol) { + int[] jiUnsignedIntegerArrayValue = this.driver.getJIUnsignedIntegerArrayValue(protocol); + if (ObjectUtil.isNull(jiUnsignedIntegerArrayValue)) { + + } else { + return jiUnsignedIntegerArrayValue; + } + return new int[3]; + } + public List getOpcArrayValue1(String protocol) { List arrayValue = this.driver.getArrayValue(protocol); if (ObjectUtil.isNull(arrayValue)) { diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/paper_tube_device2/Paper.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/paper_tube_device2/Paper.java index e088a576e..fad8e0cd6 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/paper_tube_device2/Paper.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/paper_tube_device2/Paper.java @@ -13,7 +13,7 @@ public class Paper implements Serializable { //设备号 private String device_code; // - private String meterial_code; + private String material_code; private String qty; } diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/paper_tube_device2/PaperTubeConveyor2DeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/paper_tube_device2/PaperTubeConveyor2DeviceDriver.java index 8bee5865e..b522eb139 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/paper_tube_device2/PaperTubeConveyor2DeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/paper_tube_device2/PaperTubeConveyor2DeviceDriver.java @@ -8,9 +8,12 @@ import cn.hutool.json.JSON; import cn.hutool.json.JSONArray; import cn.hutool.json.JSONUtil; import com.alibaba.fastjson.JSONObject; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; import lombok.Data; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; +import org.jinterop.dcom.core.JIUnsignedInteger; import org.nl.acs.agv.server.AgvService; import org.nl.acs.device.service.DeviceService; import org.nl.acs.device_driver.DeviceDriver; @@ -108,13 +111,93 @@ public class PaperTubeConveyor2DeviceDriver extends AbstractOpcDeviceDriver impl //下发任务号 int to_task = 0; int last_to_task = 0; - + //出库顺序数组 String item_out_seq_arr = null; - List item_out_seq_arr1 = null; String last_item_out_seq_arr = null; + //出库数量数组 int[] item_out_qty_arr = null; int[] last_item_out_qty_arr = null; + + String item_material1 = null; + String last_item_material1 = null; + String item_material2 = null; + String last_item_material2 = null; + String item_material3 = null; + String last_item_material3 = null; + String item_material4 = null; + String last_item_material4 = null; + String item_material5 = null; + String last_item_material5 = null; + String item_material6 = null; + String last_item_material6 = null; + String item_material7 = null; + String last_item_material7 = null; + String item_material8 = null; + String last_item_material8 = null; + String item_material9 = null; + String last_item_material9 = null; + String item_material10 = null; + String last_item_material10 = null; + String item_material11 = null; + String last_item_material11 = null; + String item_material12 = null; + String last_item_material12 = null; + + int item_qty1 = 0; + int last_item_qty1 = 0; + int item_qty2 = 0; + int last_item_qty2 = 0; + int item_qty3 = 0; + int last_item_qty3 = 0; + int item_qty4 = 0; + int last_item_qty4 = 0; + int item_qty5 = 0; + int last_item_qty5 = 0; + int item_qty6 = 0; + int last_item_qty6 = 0; + int item_qty7 = 0; + int last_item_qty7 = 0; + int item_qty8 = 0; + int last_item_qty8 = 0; + int item_qty9 = 0; + int last_item_qty9 = 0; + int item_qty10 = 0; + int last_item_qty10 = 0; + int item_qty11 = 0; + int last_item_qty11 = 0; + int item_qty12 = 0; + int last_item_qty12 = 0; + + String item_to_material1 = null; + String last_item_to_material1 = null; + String item_to_material2 = null; + String last_item_to_material2 = null; + String item_to_material3 = null; + String last_item_to_material3 = null; + + int item_to_out_qty1 = 0; + int last_item_to_out_qty1 = 0; + int item_to_out_qty2 = 0; + int last_item_to_out_qty2 = 0; + int item_to_out_qty3 = 0; + int last_item_to_out_qty3 = 0; + + int item_to_seq1 = 0; + int last_item_to_seq1 = 0; + int item_to_seq2 = 0; + int last_item_to_seq2 = 0; + int item_to_seq3 = 0; + int last_item_to_seq3 = 0; + + int item_to_position1 = 0; + int last_item_to_position1 = 0; + int item_to_position2 = 0; + int last_item_to_position2 = 0; + int item_to_position3 = 0; + int last_item_to_position3 = 0; + + //当前指令 Instruction inst = null; @@ -149,7 +232,6 @@ public class PaperTubeConveyor2DeviceDriver extends AbstractOpcDeviceDriver impl @Override public void execute() { try { - String message = null; device_code = this.getDeviceCode(); heartbeat = this.itemProtocol.getHeartbeat(); mode = this.itemProtocol.getMode(); @@ -160,20 +242,48 @@ public class PaperTubeConveyor2DeviceDriver extends AbstractOpcDeviceDriver impl to_command = this.itemProtocol.getTo_command(); to_target = this.itemProtocol.getTotarget(); to_task = this.itemProtocol.getTo_task(); - //item_out_seq_arr1 = this.itemProtocol.getItem_out_seq_arr1(); item_out_seq_arr = this.itemProtocol.getItem_out_seq_arr(); item_out_qty_arr = this.itemProtocol.getItem_out_qty_arr(); + item_material1 = this.itemProtocol.getMaterial1(); + item_material2 = this.itemProtocol.getMaterial2(); + item_material3 = this.itemProtocol.getMaterial3(); + item_material4 = this.itemProtocol.getMaterial4(); + item_material5 = this.itemProtocol.getMaterial5(); + item_material6 = this.itemProtocol.getMaterial6(); + item_material7 = this.itemProtocol.getMaterial7(); + item_material8 = this.itemProtocol.getMaterial8(); + item_material9 = this.itemProtocol.getMaterial9(); + item_material10 = this.itemProtocol.getMaterial10(); + item_material11 = this.itemProtocol.getMaterial11(); + item_material12 = this.itemProtocol.getMaterial12(); + item_qty1 = this.itemProtocol.getQty1(); + item_qty2 = this.itemProtocol.getQty2(); + item_qty3 = this.itemProtocol.getQty3(); + item_qty4 = this.itemProtocol.getQty4(); + item_qty5 = this.itemProtocol.getQty5(); + item_qty6 = this.itemProtocol.getQty6(); + item_qty7 = this.itemProtocol.getQty7(); + item_qty8 = this.itemProtocol.getQty8(); + item_qty9 = this.itemProtocol.getQty9(); + item_qty10 = this.itemProtocol.getQty10(); + item_qty11 = this.itemProtocol.getQty11(); + item_qty12 = this.itemProtocol.getQty12(); + item_to_material1 = this.itemProtocol.getTo_material1(); + item_to_material2 = this.itemProtocol.getTo_material2(); + item_to_material3 = this.itemProtocol.getTo_material3(); + item_to_out_qty1 = this.itemProtocol.getTo_out_qty1(); + item_to_out_qty2 = this.itemProtocol.getTo_out_qty2(); + item_to_out_qty3 = this.itemProtocol.getTo_out_qty3(); + item_to_seq1 = this.itemProtocol.getTo_seq1(); + item_to_seq2 = this.itemProtocol.getTo_seq2(); + item_to_seq3 = this.itemProtocol.getTo_seq3(); + item_to_position1 = this.itemProtocol.getTo_position1(); + item_to_position2 = this.itemProtocol.getTo_position2(); + item_to_position3 = this.itemProtocol.getTo_position3(); - if (to_command != last_to_command) { - logServer.deviceExecuteLog(this.device_code, "", "", "信号to_command:" + last_to_command + "->" + to_command); - } - if (to_target != last_to_target) { - logServer.deviceExecuteLog(this.device_code, "", "", "信号to_target:" + last_to_target + "->" + to_target); - } - if (to_task != last_to_task) { - logServer.deviceExecuteLog(this.device_code, "", "", "信号to_task:" + last_to_task + "->" + to_task); - } + //信号位置校验,记录日志 + signal_verification(); if (mode != last_mode) { JSONObject param = new JSONObject(); @@ -254,10 +364,13 @@ public class PaperTubeConveyor2DeviceDriver extends AbstractOpcDeviceDriver impl request_for_shipment(String.valueOf(mode), item_out_seq_arr, item_out_qty_arr); } break; + default: + break; } } last_heartbeat = heartbeat; last_mode = mode; + last_move = move; last_error = error; last_carrier_direction = carrier_direction; last_task = task; @@ -266,6 +379,42 @@ public class PaperTubeConveyor2DeviceDriver extends AbstractOpcDeviceDriver impl last_to_task = to_task; last_item_out_seq_arr = item_out_seq_arr; last_item_out_qty_arr = item_out_qty_arr; + last_item_material1 = item_material1; + last_item_material2 = item_material2; + last_item_material3 = item_material3; + last_item_material4 = item_material4; + last_item_material5 = item_material5; + last_item_material6 = item_material6; + last_item_material7 = item_material7; + last_item_material8 = item_material8; + last_item_material9 = item_material9; + last_item_material10 = item_material10; + last_item_material11 = item_material11; + last_item_material12 = item_material12; + last_item_qty1 = item_qty1; + last_item_qty2 = item_qty2; + last_item_qty3 = item_qty3; + last_item_qty4 = item_qty4; + last_item_qty5 = item_qty5; + last_item_qty6 = item_qty6; + last_item_qty7 = item_qty7; + last_item_qty8 = item_qty8; + last_item_qty9 = item_qty9; + last_item_qty10 = item_qty10; + last_item_qty11 = item_qty11; + last_item_qty12 = item_qty12; + last_item_to_material1 = item_to_material1; + last_item_to_material2 = item_to_material2; + last_item_to_material3 = item_to_material3; + last_item_to_out_qty1 = item_to_out_qty1; + last_item_to_out_qty2 = item_to_out_qty2; + last_item_to_out_qty3 = item_to_out_qty3; + last_item_to_seq1 = item_to_seq1; + last_item_to_seq2 = item_to_seq2; + last_item_to_seq3 = item_to_seq3; + last_item_to_position1 = item_to_position1; + last_item_to_position2 = item_to_position2; + last_item_to_position3 = item_to_position3; } @@ -331,26 +480,29 @@ public class PaperTubeConveyor2DeviceDriver extends AbstractOpcDeviceDriver impl applyPaperActionRequest.setTask_code(String.valueOf(task)); //获取出库顺序 boolean contains = item_out_seq_arr.contains(","); - //String s = item_out_seq_arr.replaceAll("[\\[\\]]", ""); + boolean contains1 = item_out_seq_arr.contains(","); + if (contains) { String[] split = item_out_seq_arr.split(","); applyPaperActionRequest.setMaterial1(split[0]); - applyPaperActionRequest.setMaterial2(split[1]); + applyPaperActionRequest.setMaterial1(split[1]); + } else if (contains1) { + String[] split = item_out_seq_arr.split(","); + applyPaperActionRequest.setMaterial1(split[0]); + applyPaperActionRequest.setMaterial1(split[1]); } else { applyPaperActionRequest.setMaterial1(item_out_seq_arr); } - /*if (item_out_qty_arr.length == 2) { - // 去除方括号 - applyPaperActionRequest.setMaterial1(String.valueOf(item_out_qty_arr[0])); - applyPaperActionRequest.setMaterial2(String.valueOf(item_out_qty_arr[1])); - } else if (item_out_qty_arr.length == 1) { - applyPaperActionRequest.setMaterial1(String.valueOf(item_out_qty_arr[0])); - }*/ if (item_out_qty_arr.length >= 1 && item_out_qty_arr.length < 4) { applyPaperActionRequest.setQty1(String.valueOf(item_out_qty_arr[0])); applyPaperActionRequest.setQty2(String.valueOf(item_out_qty_arr[1])); } ApplyPaperActionResponse applyPaperActionResponse = acsToWmsService.applyPaperActionRequest(applyPaperActionRequest); + if (ObjectUtil.isNull(applyPaperActionResponse)) { + message = "请求失败"; + requireSucess = false; + return; + } Map map3 = new HashMap(); if (applyPaperActionResponse.getstatus() == 200) { map3.put("to_command", "4"); @@ -383,10 +535,7 @@ public class PaperTubeConveyor2DeviceDriver extends AbstractOpcDeviceDriver impl //查找有没有对应的指令 //找指令类型是10的 Instruction inst = instructionService.findByDeviceCodeFromCache(this.device_code); - if (ObjectUtil.isNull(inst)) { - return false; - } - if (ObjectUtil.isNotNull(inst) && "10".equals(inst.getInstruction_code())) { + if (ObjectUtil.isNotNull(inst) && "10".equals(inst.getInstruction_type())) { Device nextdevice = deviceAppservice.findDeviceByCode(inst.getNext_device_code()); String next_addr = nextdevice.getExtraValue().get("address").toString(); TaskDto taskDto = taskserver.findByCodeFromCache(inst.getTask_code()); @@ -424,10 +573,12 @@ public class PaperTubeConveyor2DeviceDriver extends AbstractOpcDeviceDriver impl } //判断当前任务号是否存在指令 Instruction inst1 = instructionService.findByTaskcodeAndStatus(taskdto.getTask_code()); - Device nextdevice = deviceAppservice.findDeviceByCode(inst1.getNext_device_code()); - String next_addr = nextdevice.getExtraValue().get("address").toString(); - Device pointdevice = deviceAppservice.findDeviceByCode(inst1.getNext_point_code()); - String point_addr = pointdevice.getExtraValue().get("address").toString(); + /*if(ObjectUtil.isNotNull(inst1)){ + Device nextdevice = deviceAppservice.findDeviceByCode(inst1.getNext_device_code()); + String next_addr = nextdevice.getExtraValue().get("address").toString(); + Device pointdevice = deviceAppservice.findDeviceByCode(inst1.getNext_point_code()); + String point_addr = pointdevice.getExtraValue().get("address").toString(); + }*/ //没有就创建指令 String taskid = taskdto.getTask_id(); String taskcode = taskdto.getTask_code(); @@ -435,7 +586,6 @@ public class PaperTubeConveyor2DeviceDriver extends AbstractOpcDeviceDriver impl String start_point_code = taskdto.getStart_point_code(); String start_device_code = taskdto.getStart_device_code(); String route_plan_code = taskdto.getRoute_plan_code(); - Instruction instdto = new Instruction(); instdto.setInstruction_id(IdUtil.simpleUUID()); instdto.setRoute_plan_code(route_plan_code); @@ -448,9 +598,9 @@ public class PaperTubeConveyor2DeviceDriver extends AbstractOpcDeviceDriver impl instdto.setCreate_time(now); instdto.setCreate_by("auto"); instdto.setStart_device_code(start_device_code); - instdto.setNext_device_code(next_addr); + instdto.setNext_device_code(taskdto.getNext_device_code()); instdto.setStart_point_code(start_point_code); - instdto.setNext_point_code(point_addr); + instdto.setNext_point_code(taskdto.getNext_point_code()); instdto.setPriority(priority); instdto.setInstruction_status("0"); instdto.setExecute_device_code(start_point_code); @@ -475,7 +625,7 @@ public class PaperTubeConveyor2DeviceDriver extends AbstractOpcDeviceDriver impl writeStatus(paperArray, map, 2); writeStatus(paperArray, map, 3); } - writeData(next_addr, instdto, map); + writeData(taskdto.getNext_device_code(), instdto, map); this.writing(map); requireSucess = true; return true; @@ -502,11 +652,13 @@ public class PaperTubeConveyor2DeviceDriver extends AbstractOpcDeviceDriver impl } public void writeStatus(List paperArray, Map map, Integer status) { - Paper paper = paperArray.get(status); - map.put("to_material" + status, paper.getMeterial_code()); + Paper paper = paperArray.get(status - 1); + map.put("to_material" + status, paper.getMaterial_code()); map.put("to_out_qty" + status, paper.getQty()); - map.put("to_seq" + status, "1"); - map.put("to_position" + status, paper.getDevice_code()); + map.put("to_seq" + status, status); + Device nextdevice = deviceAppservice.findDeviceByCode(paper.getDevice_code()); + String next_addr = nextdevice.getExtraValue().get("address").toString(); + map.put("to_position" + status, next_addr); } @@ -560,8 +712,7 @@ public class PaperTubeConveyor2DeviceDriver extends AbstractOpcDeviceDriver impl * 解析出库的顺序 */ public List getPaperArray(String paper_array) { - JSONArray jsonArray = JSONUtil.parseArray(paper_array); - List papers = jsonArray.toList(Paper.class); + List papers = JSONUtil.toList(paper_array, Paper.class); return papers; } @@ -573,7 +724,6 @@ public class PaperTubeConveyor2DeviceDriver extends AbstractOpcDeviceDriver impl Date date = new Date(); if (date.getTime() - this.instruction_update_time.getTime() < (long) this.instruction_update_time_out) { log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_update_time_out); - } else { this.instruction_update_time = date; inst = checkInst(); @@ -614,9 +764,149 @@ public class PaperTubeConveyor2DeviceDriver extends AbstractOpcDeviceDriver impl return null; } + private void signal_verification() { + if (!item_out_seq_arr.equals(last_item_out_seq_arr)) { + logServer.deviceExecuteLog(this.device_code, "", "", "信号item_out_seq_arr:" + last_item_out_seq_arr + "->" + item_out_seq_arr); + } + if (!arrayEquals(item_out_qty_arr, last_item_out_qty_arr)) { + logServer.deviceExecuteLog(this.device_code, "", "", "信号item_out_qty_arr:" + Arrays.toString(last_item_out_qty_arr) + "->" + Arrays.toString(item_out_qty_arr)); + } + if (item_qty1 != (last_item_qty1)) { + logServer.deviceExecuteLog(this.device_code, "", "", "信号qty1:" + last_item_qty1 + "->" + item_qty1); + } + if (item_qty2 != (last_item_qty2)) { + logServer.deviceExecuteLog(this.device_code, "", "", "信号qty2:" + last_item_qty2 + "->" + item_qty2); + } + if (item_qty3 != (last_item_qty3)) { + logServer.deviceExecuteLog(this.device_code, "", "", "信号qty3:" + last_item_qty3 + "->" + item_qty3); + } + if (item_qty4 != (last_item_qty4)) { + logServer.deviceExecuteLog(this.device_code, "", "", "信号qty4:" + last_item_qty4 + "->" + item_qty4); + } + if (item_qty5 != (last_item_qty5)) { + logServer.deviceExecuteLog(this.device_code, "", "", "信号qty5:" + last_item_qty5 + "->" + item_qty5); + } + if (item_qty6 != (last_item_qty6)) { + logServer.deviceExecuteLog(this.device_code, "", "", "信号qty6:" + last_item_qty6 + "->" + item_qty6); + } + if (item_qty7 != (last_item_qty7)) { + logServer.deviceExecuteLog(this.device_code, "", "", "信号qty7:" + last_item_qty7 + "->" + item_qty7); + } + if (item_qty8 != (last_item_qty8)) { + logServer.deviceExecuteLog(this.device_code, "", "", "信号qty8:" + last_item_qty8 + "->" + item_qty8); + } + if (item_qty9 != (last_item_qty9)) { + logServer.deviceExecuteLog(this.device_code, "", "", "信号qty9:" + last_item_qty9 + "->" + item_qty9); + } + if (item_qty10 != (last_item_qty10)) { + logServer.deviceExecuteLog(this.device_code, "", "", "信号qty10:" + last_item_qty10 + "->" + item_qty10); + } + if (item_qty11 != (last_item_qty11)) { + logServer.deviceExecuteLog(this.device_code, "", "", "信号qty11:" + last_item_qty11 + "->" + item_qty11); + } + if (item_qty12 != (last_item_qty12)) { + logServer.deviceExecuteLog(this.device_code, "", "", "信号qty12:" + last_item_qty12 + "->" + item_qty12); + } + if (item_material1.equals(last_item_material1)) { + logServer.deviceExecuteLog(this.device_code, "", "", "信号material1:" + last_item_material1 + "->" + item_material1); + } + if (!item_material2.equals(last_item_material2)) { + logServer.deviceExecuteLog(this.device_code, "", "", "信号material2:" + last_item_material2 + "->" + item_material2); + } + if (!item_material3.equals(last_item_material3)) { + logServer.deviceExecuteLog(this.device_code, "", "", "信号material3:" + last_item_material3 + "->" + item_material3); + } + if (!item_material4.equals(last_item_material4)) { + logServer.deviceExecuteLog(this.device_code, "", "", "信号material4:" + last_item_material4 + "->" + item_material4); + } + if (!item_material5.equals(last_item_material5)) { + logServer.deviceExecuteLog(this.device_code, "", "", "信号material5:" + last_item_material5 + "->" + item_material5); + } + if (!item_material6.equals(last_item_material6)) { + logServer.deviceExecuteLog(this.device_code, "", "", "信号material6:" + last_item_material6 + "->" + item_material6); + } + if (!item_material7.equals(last_item_material7)) { + logServer.deviceExecuteLog(this.device_code, "", "", "信号material7:" + last_item_material7 + "->" + item_material7); + } + if (!item_material8.equals(last_item_material8)) { + logServer.deviceExecuteLog(this.device_code, "", "", "信号material8:" + last_item_material8 + "->" + item_material8); + } + if (!item_material9.equals(last_item_material9)) { + logServer.deviceExecuteLog(this.device_code, "", "", "信号material9:" + last_item_material9 + "->" + item_material9); + } + if (!item_material10.equals(last_item_material10)) { + logServer.deviceExecuteLog(this.device_code, "", "", "信号material10:" + last_item_material10 + "->" + item_material10); + } + if (!item_material11.equals(last_item_material11)) { + logServer.deviceExecuteLog(this.device_code, "", "", "信号material11:" + last_item_material11 + "->" + item_material11); + } + if (!item_material12.equals(last_item_material12)) { + logServer.deviceExecuteLog(this.device_code, "", "", "信号material12:" + last_item_material12 + "->" + item_material12); + } + if (to_command != last_to_command) { + logServer.deviceExecuteLog(this.device_code, "", "", "信号to_command:" + last_to_command + "->" + to_command); + } + if (to_target != last_to_target) { + logServer.deviceExecuteLog(this.device_code, "", "", "信号to_target:" + last_to_target + "->" + to_target); + } + if (to_task != last_to_task) { + logServer.deviceExecuteLog(this.device_code, "", "", "信号to_task:" + last_to_task + "->" + to_task); + } + if (!item_to_material1.equals(last_item_to_material1)) { + logServer.deviceExecuteLog(this.device_code, "", "", "信号to_material1:" + last_item_to_material1 + "->" + item_to_material1); + } + if (!item_to_material2.equals(last_item_to_material2)) { + logServer.deviceExecuteLog(this.device_code, "", "", "信号to_material2:" + last_item_to_material2 + "->" + item_to_material2); + } + if (!item_to_material3.equals(last_item_to_material3)) { + logServer.deviceExecuteLog(this.device_code, "", "", "信号to_material3:" + last_item_to_material2 + "->" + item_to_material2); + } + if (item_to_out_qty1 != (last_item_to_out_qty1)) { + logServer.deviceExecuteLog(this.device_code, "", "", "信号to_out_qty1:" + last_item_to_out_qty1 + "->" + item_to_out_qty1); + } + if (item_to_out_qty2 != (last_item_to_out_qty2)) { + logServer.deviceExecuteLog(this.device_code, "", "", "信号to_out_qty2:" + last_item_to_out_qty2 + "->" + item_to_out_qty2); + } + if (item_to_out_qty3 != (last_item_to_out_qty3)) { + logServer.deviceExecuteLog(this.device_code, "", "", "信号to_out_qty3:" + last_item_to_out_qty3 + "->" + item_to_out_qty3); + } + if (item_to_seq1 != (last_item_to_seq1)) { + logServer.deviceExecuteLog(this.device_code, "", "", "信号to_seq1:" + last_item_to_seq1 + "->" + item_to_seq1); + } + if (item_to_seq2 != (last_item_to_seq2)) { + logServer.deviceExecuteLog(this.device_code, "", "", "信号to_seq2:" + last_item_to_seq2 + "->" + item_to_seq2); + } + if (item_to_seq3 != (last_item_to_seq3)) { + logServer.deviceExecuteLog(this.device_code, "", "", "信号to_seq3:" + last_item_to_seq3 + "->" + item_to_seq3); + } + if (item_to_position1 != (last_item_to_position1)) { + logServer.deviceExecuteLog(this.device_code, "", "", "信号to_position1:" + last_item_to_position1 + "->" + item_to_position1); + } + if (item_to_position2 != (last_item_to_position2)) { + logServer.deviceExecuteLog(this.device_code, "", "", "信号to_position2:" + last_item_to_position2 + "->" + item_to_position2); + } + if (item_to_position3 != (last_item_to_position3)) { + logServer.deviceExecuteLog(this.device_code, "", "", "信号to_position3:" + last_item_to_position3 + "->" + item_to_position3); + } + + } @Override public void setDeviceStatus(JSONObject data) { } + + public static boolean arrayEquals(int[] a, int[] b) { + // 判断两个数组长度是否相等 + if (a.length != b.length) { + return false; + } + // 判断两个数组对应位置上的元素是否相同 + for (int i = 0; i < a.length; i++) { + if (a[i] != b[i]) { + return false; + } + } + return true; + } } diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/driver/OpcDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/driver/OpcDeviceDriver.java index 157d4f3f1..b51132023 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/driver/OpcDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/driver/OpcDeviceDriver.java @@ -4,6 +4,7 @@ package org.nl.acs.device_driver.driver; import cn.hutool.core.util.ObjectUtil; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; +import org.jinterop.dcom.core.JIUnsignedInteger; import org.nl.acs.device_driver.DeviceDriver; import org.nl.acs.opc.Device; import org.nl.acs.opc.OpcItemDto; @@ -77,6 +78,21 @@ public interface OpcDeviceDriver extends DeviceDriver { return (int[]) this.getOpcValueAccessor().getValue(this.getItem(protocol)); } + + default int[] getJIUnsignedIntegerArrayValue(String protocol) { + JIUnsignedInteger[] jiUnsignedIntegers = (JIUnsignedInteger[]) this.getOpcValueAccessor().getValue(this.getItem(protocol)); + if(ObjectUtil.isNull(jiUnsignedIntegers)){ + return new int[3]; + } + // 将 JIUnsignedInteger[] 转换为 int[] + int[] intArray = new int[jiUnsignedIntegers.length]; + for (int i = 0; i < jiUnsignedIntegers.length; i++) { + intArray[i] = jiUnsignedIntegers[i].getValue().intValue(); + } + + return intArray; + } + default String getStringValue(String protocol) { return (String) this.getOpcValueAccessor().getValue(this.getItem(protocol)); } diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/data/CreateTaskRequest.java b/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/data/CreateTaskRequest.java index d9b4cb330..226fb0a07 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/data/CreateTaskRequest.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/data/CreateTaskRequest.java @@ -1,7 +1,9 @@ package org.nl.acs.ext.wms.data; import lombok.Data; +import org.nl.acs.device_driver.basedriver.paper_tube_device2.Paper; +import java.util.List; import java.util.Map; @Data @@ -120,4 +122,6 @@ public class CreateTaskRequest extends BaseRequest { */ Map params; + private List paper_array; + } diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/AcsToWmsServiceImpl.java b/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/AcsToWmsServiceImpl.java index 4e305c38f..9ed99ea66 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/AcsToWmsServiceImpl.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/AcsToWmsServiceImpl.java @@ -488,6 +488,9 @@ public class AcsToWmsServiceImpl implements AcsToWmsService { if (StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(), "1")) { String wmsUrl = paramService.findByCode(AcsConfig.WMSURL).getValue(); AddressDto addressDto = addressService.findByCode("applyPaperAction"); + if(ObjectUtil.isNull(addressDto)){ + return null; + } String methods_url = addressDto.getMethods_url(); String url = wmsUrl + methods_url; log.info("ApplyPaperActionRequest----请求参数{}", param); diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java b/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java index 4ac9b6396..3ae28e74c 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java @@ -3,6 +3,7 @@ package org.nl.acs.ext.wms.service.impl; import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; +import cn.hutool.json.JSONUtil; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; @@ -27,6 +28,7 @@ import org.nl.acs.device_driver.basedriver.hongxiang_device.HongXiangConveyorDev import org.nl.acs.device_driver.basedriver.lamp_three_color.LampThreecolorDeviceDriver; import org.nl.acs.device_driver.basedriver.oven_manipulator.OvenGantryManipulatorDeviceDriver; import org.nl.acs.device_driver.basedriver.paper_tube_device.PaperTubeConveyorDeviceDriver; +import org.nl.acs.device_driver.basedriver.paper_tube_device2.Paper; import org.nl.acs.device_driver.basedriver.plug_pull_device_site.PlugPullDeviceSiteDeviceDriver; import org.nl.acs.device_driver.basedriver.siemens_conveyor.SiemensConveyorDeviceDriver; import org.nl.acs.device_driver.basedriver.siemens_conveyor_ckk.SiemensConveyorCkkDeviceDriver; @@ -614,6 +616,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { for (int i = 0; i < datas.size(); i++) { String data = datas.get(i).toString(); CreateTaskRequest request = JsonUtl.format(data, CreateTaskRequest.class); + List paper_array = request.getPaper_array(); String ext_task_id = request.getExt_task_id(); String task_code = request.getTask_code(); String start_device_code = request.getStart_device_code(); @@ -823,6 +826,8 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { jo.put("remark", remark); jo.put("params", params); jo.put("task_type", StrUtil.isEmpty(task_type) ? 1 : Integer.parseInt(task_type)); + jo.put("paper_array", JSONUtil.toJsonStr(paper_array)); + if (!StrUtil.isEmpty(ext_task_id)) { jo.put("ext_task_id", ext_task_id); diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/task/service/dto/TaskDto.java b/acs/nladmin-system/src/main/java/org/nl/acs/task/service/dto/TaskDto.java index f770f33b3..3db2e300a 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/task/service/dto/TaskDto.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/task/service/dto/TaskDto.java @@ -1,8 +1,16 @@ package org.nl.acs.task.service.dto; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; import lombok.Data; +import org.jinterop.dcom.core.JIUnsignedFactory; +import org.jinterop.dcom.core.JIUnsignedInteger; +import org.nl.acs.device_driver.basedriver.paper_tube_device2.Paper; import java.io.Serializable; +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; + /** * @author ldjun @@ -329,11 +337,11 @@ public class TaskDto implements Serializable { private String bushing_num; - //array device_code\material_code\qty private String paper_array; + @Override public String toString(){ return "task_code:" + this.getTask_code()