diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/indoor_manipulator/IndoorManipulatorDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/indoor_manipulator/IndoorManipulatorDeviceDriver.java index e410abc8e..b338c56ca 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/indoor_manipulator/IndoorManipulatorDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/indoor_manipulator/IndoorManipulatorDeviceDriver.java @@ -397,7 +397,12 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple try { this.checkcontrol(itemMap); } catch (Exception e) { - throw new RuntimeException(e); + try { + Thread.sleep(1000); + this.checkcontrol(itemMap); + } catch (Exception ex) { + throw new RuntimeException(ex); + } } logServer.deviceExecuteLog(this.getDevice().getDevice_code(), "", "", "下发多个电气信号:" + itemMap); } diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/plugging_unplugging_machine/PluggingUnpluggingMachineDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/plugging_unplugging_machine/PluggingUnpluggingMachineDeviceDriver.java index 95f1b9aed..e89644ebd 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/plugging_unplugging_machine/PluggingUnpluggingMachineDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/plugging_unplugging_machine/PluggingUnpluggingMachineDeviceDriver.java @@ -161,6 +161,11 @@ public class PluggingUnpluggingMachineDeviceDriver extends AbstractOpcDeviceDriv pullingSucess(); } break; + case 7: + if (task1 > 0 && !requireSucess) { + deliveryCompleted(); + } + break; default: break; @@ -174,6 +179,28 @@ public class PluggingUnpluggingMachineDeviceDriver extends AbstractOpcDeviceDriv last_to_command = to_command; } + /** + * 取货完成 + */ + private void deliveryCompleted() { + ApplyManipulatorActionRequest applyManipulatorActionRequest = new ApplyManipulatorActionRequest(); + applyManipulatorActionRequest.setAction("1"); + applyManipulatorActionRequest.setTask_code1(String.valueOf(task1)); + ApplyManipulatorActionResponse applyManipulatorActionResponse = acsToWmsService.actionFinishRequest(applyManipulatorActionRequest); + if (applyManipulatorActionResponse.getstatus() == 200) { + logServer.deviceExecuteLog(this.device_code, "", "", "插拔机取货完成,请求成功响应参数:" + JSON.toJSONString(applyManipulatorActionResponse)); + Map map = new LinkedHashMap<>(); + map.put("to_command", 7); + this.writing(map); + requireSucess = true; + message = "缓存库放货成功"; + } else { + requireSucess = false; + logServer.deviceExecuteLog(this.device_code, "", "", "插拔机取货完成,请求失败响应参数:" + JSON.toJSONString(applyManipulatorActionResponse)); + message = "缓存库放货失败"; + } + } + private synchronized void pullingSucess() { List list = new ArrayList(); ApplyManipulatorActionRequest applyManipulatorActionRequest = new ApplyManipulatorActionRequest(); diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/rgv/RgvDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/rgv/RgvDeviceDriver.java index 58985a5d7..993fa5c68 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/rgv/RgvDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/rgv/RgvDeviceDriver.java @@ -65,10 +65,10 @@ public class RgvDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDr int last_move1 = 0; Integer move2 = 0; Integer last_move2 = 0; - float qty1 = 0f; - float last_qty1 = 0f; - float qty2 = 0f; - float last_qty2 = 0f; + Float qty1 = 0f; + Float last_qty1 = 0f; + Float qty2 = 0f; + Float last_qty2 = 0f; int task = 0; int last_task = 0; @@ -117,14 +117,14 @@ public class RgvDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDr if(!move2.equals(last_move2)){ logServer.deviceExecuteLog(this.device_code, "", "", "信号move2:" + last_move2 + "->" + move2); } - if(qty1 != last_qty1){ - logServer.deviceExecuteLog(this.device_code, "", "", "信号move2:" + last_qty1 + "->" + qty1); + if(!qty1.equals(last_qty1)){ + logServer.deviceExecuteLog(this.device_code, "", "", "信号qty1:" + last_qty1 + "->" + qty1); } - if(qty2 != last_qty2){ - logServer.deviceExecuteLog(this.device_code, "", "", "信号move2:" + last_qty2 + "->" + qty2); + if(!qty2.equals(last_qty2)){ + logServer.deviceExecuteLog(this.device_code, "", "", "信号qty2:" + last_qty2 + "->" + qty2); } if(task != last_task){ - logServer.deviceExecuteLog(this.device_code, "", "", "信号move2:" + last_task + "->" + task); + logServer.deviceExecuteLog(this.device_code, "", "", "信号task:" + last_task + "->" + task); } @@ -162,7 +162,7 @@ public class RgvDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDr } break; case 5: - if (task > 0 && !requireSucess && (qty1 > 0 || qty2 > 0)) { + if (task > 0 && !requireSucess) { manualFeedbackQty(); } break; diff --git a/acs/nladmin-ui/src/views/acs/task/index.vue b/acs/nladmin-ui/src/views/acs/task/index.vue index e97158864..20a170eb3 100644 --- a/acs/nladmin-ui/src/views/acs/task/index.vue +++ b/acs/nladmin-ui/src/views/acs/task/index.vue @@ -599,13 +599,7 @@ export default { device_code: '', material_code: '', qty: '' - }/* , - { - device_code: '', - material_code: '', - qty: '' - } */ - ] + }] }, rules: { start_height: [ diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java index 4f000e66b..ddc7fa02b 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java @@ -1318,7 +1318,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService { JSONObject point1_jo = ivt_shaftivt.query("point_code = '" + task_jo.getString("point_code1") + "'").uniqueResult(0); point1_jo.put("have_qzz", "0"); ivt_shaftivt.update(point1_jo); - } else if ("010607".equals(point_type)) { + } else if ("010607".equals(point_type) || "010603".equals(point_type)) { JSONObject point1_jo = ivt_shaftivt.query("point_code = '" + task_jo.getString("point_code1") + "'").uniqueResult(0); point1_jo.put("qzz_size", ""); point1_jo.put("qzz_generation", ""); diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/PaperTrussTask.java b/lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/PaperTrussTask.java index 3b3cfd553..7cb5c869c 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/PaperTrussTask.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/PaperTrussTask.java @@ -108,15 +108,6 @@ public class PaperTrussTask extends AbstractAcsTask { goal_point.put("have_qzz", "1"); ivt_shaftivt.update(goal_point); } - //空轴放货任务 - if ("010603".equals(task_type)) { - String point_code = task_jo.getString("point_code1"); - JSONObject goal_point = ivt_shaftivt.query("point_code = '" + point_code + "'").uniqueResult(0); - goal_point.put("qzz_size", ""); - goal_point.put("qzz_generation", ""); - goal_point.put("have_qzz", "0"); - ivt_shaftivt.update(goal_point); - } //空轴换货任务 if ("010604".equals(task_type)) { String point_code = task_jo.getString("point_code1");