diff --git a/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java b/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java index 3817311..09f4d85 100644 --- a/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java +++ b/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java @@ -15,6 +15,7 @@ import org.nl.acs.device.domain.Device; import org.nl.acs.device.service.DeviceService; import org.nl.acs.device_driver.DeviceDriver; import org.nl.acs.device_driver.basedriver.siemens_conveyor.SiemensConveyorDeviceDriver; +import org.nl.acs.device_driver.basedriver.ssx_site.SsxSiteDeviceDriver; import org.nl.acs.device_driver.basedriver.standard_inspect_site.StandardInspectSiteDeviceDriver; import org.nl.acs.device_driver.basedriver.standard_ordinary_site.StandardOrdinarySiteDeviceDriver; import org.nl.acs.device_driver.basedriver.standard_storage.StandardStorageDeviceDriver; @@ -224,6 +225,12 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic } } + SsxSiteDeviceDriver ssxSiteDeviceDriver; + if(device.getDeviceDriver() instanceof SsxSiteDeviceDriver){ + ssxSiteDeviceDriver = (SsxSiteDeviceDriver) device.getDeviceDriver(); + ssxSiteDeviceDriver.writing(9); + } + data = NDCAgvService.sendAgvOneModeInst(phase, index, 0, 0, 0, 0, 0); //到达放货等待点 //(需要WCS反馈) @@ -298,6 +305,13 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic log.info("未找到编号{}对应的指令", ikey); return; } + + SsxSiteDeviceDriver ssxSiteDeviceDriver; + if(device.getDeviceDriver() instanceof SsxSiteDeviceDriver){ + ssxSiteDeviceDriver = (SsxSiteDeviceDriver) device.getDeviceDriver(); + ssxSiteDeviceDriver.writing(9); + } + data = NDCAgvService.sendAgvOneModeInst(phase, index, 0, 0, 0, 0, 0); } //到达位置点 diff --git a/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/fold_disc_site/FoldDiscSiteDefinition.java b/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/fold_disc_site/FoldDiscSiteDefinition.java index f181a24..b53d106 100644 --- a/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/fold_disc_site/FoldDiscSiteDefinition.java +++ b/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/fold_disc_site/FoldDiscSiteDefinition.java @@ -4,7 +4,6 @@ import org.nl.acs.device.device_driver.standard_inspect.ItemDto; import org.nl.acs.device.domain.Device; import org.nl.acs.device.enums.DeviceType; import org.nl.acs.device_driver.DeviceDriver; -import org.nl.acs.device_driver.basedriver.ssx_site.ItemProtocol; import org.nl.acs.device_driver.defination.OpcDeviceDriverDefination; import org.springframework.stereotype.Service; @@ -50,7 +49,7 @@ public class FoldDiscSiteDefinition implements OpcDeviceDriverDefination { @Override public List getReadableItemDtos() { - return org.nl.acs.device_driver.basedriver.ssx_site.ItemProtocol.getReadableItemDtos(); + return ItemProtocol.getReadableItemDtos(); } @Override diff --git a/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/fold_disc_site/ItemProtocol.java b/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/fold_disc_site/ItemProtocol.java index 7652066..153a928 100644 --- a/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/fold_disc_site/ItemProtocol.java +++ b/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/fold_disc_site/ItemProtocol.java @@ -98,7 +98,7 @@ public class ItemProtocol { ArrayList list = new ArrayList<>(); list.add(new ItemDto(item_heartbeat, "心跳", "DB1.B0")); list.add(new ItemDto(item_mode, "工作模式", "DB1.B1", Boolean.TRUE)); - list.add(new ItemDto(item_move, "广电信号", "DB1.B2")); + list.add(new ItemDto(item_move, "光电信号", "DB1.B2")); list.add(new ItemDto(item_number, "数量", "DB1.B3")); list.add(new ItemDto(item_error, "error", "DB1.B5")); list.add(new ItemDto(item_task, "任务号", "DB1.D6")); diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/controller/MesController.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/controller/MesController.java index 7125631..f3bf969 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/controller/MesController.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/mes/controller/MesController.java @@ -95,7 +95,7 @@ public class MesController { List qpmes098ResponseBodyArrayList=new ArrayList<>(); PdmBdWorkorder entity = new PdmBdWorkorder(); if("1".equals(qpmes098Request.getBODY().get(0).getZSTAT())) { - entity.setExt_data(qpmes098Request.toString()); + entity.setExt_data(JSONObject.toJSONString(qpmes098Request)); entity.setWorkorder_code(qpmes098Request.getBODY().get(0).getAUFNR()); entity.setPlan_qty(new BigDecimal((qpmes098Request.getBODY().get(0).getGAMNG()))); entity.setMaterial_id(qpmes098Request.getBODY().get(0).getPLNBEZ()); diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/KJRKTask.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/KJRKTask.java index 59821e7..0ff84db 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/KJRKTask.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/KJRKTask.java @@ -109,7 +109,7 @@ public class KJRKTask extends AbstractTask { */ private SchBasePoint findNextPoint() { String regionCode = "YL"; - List schBasePointList = pointMapper.findPointByRegion(regionCode, "2"); + List schBasePointList = pointMapper.findPointByRegion(regionCode, "0"); for (SchBasePoint schBasePoint : schBasePointList) { if ("2".equals(schBasePoint.getPoint_status()) && schBasePoint.getVehicle_qty() ==0) { diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/SSXBKJTask.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/SSXBKJTask.java index 75ce254..fec91a3 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/SSXBKJTask.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/SSXBKJTask.java @@ -109,10 +109,9 @@ public class SSXBKJTask extends AbstractTask { */ private SchBasePoint findNextPoint() { String regionCode = "YL"; - List schBasePointList = pointMapper.findPointByRegion(regionCode, "2"); + List schBasePointList = pointMapper.findPointByRegion(regionCode, "0"); for (SchBasePoint schBasePoint : schBasePointList) { - if ("2".equals(schBasePoint.getPoint_status()) - && schBasePoint.getVehicle_qty() ==0) { + if (schBasePoint.getVehicle_qty() ==1) { log.info("原材料入库找到当前符合条件的点位{}", schBasePoint.getPoint_code()); return schBasePoint; } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/YCLCKTask.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/YCLCKTask.java index 74c3b14..be51633 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/YCLCKTask.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/YCLCKTask.java @@ -157,6 +157,10 @@ public class YCLCKTask extends AbstractTask { if (taskObj.getTask_status().equals(TaskStatus.CANCELED.getCode())) { throw new BadRequestException("该任务已取消!"); } + // 获取参数 + JSONObject extGroupData = ObjectUtil.isNotEmpty(taskObj.getExt_group_data()) + ? JSONObject.parseObject(taskObj.getExt_group_data()) + : null; String startPoint = taskObj.getPoint_code1(); // 获取起点 String endPoint = taskObj.getPoint_code2(); // 获取终点 SchBasePoint startPointObj = pointService.getById(startPoint); @@ -228,8 +232,6 @@ public class YCLCKTask extends AbstractTask { .eq(Material::getPalletSN, taskObj.getVehicle_code2()) .eq(Material::getGroup_bind_material_status, GroupBindMaterialStatusEnum.BOUND.getValue())); if (ObjectUtil.isNotEmpty(materialList)) { - PdmBdWorkorder pdmBdWorkorder=workorderService.getOne(new LambdaQueryWrapper() - .eq(PdmBdWorkorder::getMaterial_id, materialList.get(0).getProductName())); String url = "http://192.168.9.5/sitAppWebApi/PDSToWMS/Api/QPMES065"; QPMES065Request qpmes065Request = new QPMES065Request(); List qpmes065RequestBodyList=new ArrayList<>(); @@ -241,11 +243,11 @@ public class YCLCKTask extends AbstractTask { qpmes065Request.setHEAD(head); for(Material material:materialList) { QPMES065RequestBody qpmes065RequestBody=new QPMES065RequestBody(); - qpmes065RequestBody.setMoname(pdmBdWorkorder!=null?pdmBdWorkorder.getWorkorder_code():null); + qpmes065RequestBody.setMoname(extGroupData.getString("workorder_code")); qpmes065RequestBody.setLotSN(material.getPalletSN()); qpmes065RequestBody.setQty(String.valueOf(one.getMaterial_qty())); qpmes065RequestBody.setSiteName(material.getLocationCode()); - qpmes065RequestBody.setZXXV01(pdmBdWorkorder!=null?"1":"0"); + qpmes065RequestBody.setZXXV01(extGroupData.getString("workorder_code")!=null?"1":"0"); qpmes065RequestBodyList.add(qpmes065RequestBody); } qpmes065Request.setBODY(qpmes065RequestBodyList); diff --git a/lms/nladmin-ui/src/views/wms/pdm/workerorder/index.vue b/lms/nladmin-ui/src/views/wms/pdm/workerorder/index.vue index b857d89..46183c4 100644 --- a/lms/nladmin-ui/src/views/wms/pdm/workerorder/index.vue +++ b/lms/nladmin-ui/src/views/wms/pdm/workerorder/index.vue @@ -96,7 +96,7 @@ - +