diff --git a/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/standard_autodoor/StandardAutodoorDeviceDriver.java b/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/standard_autodoor/StandardAutodoorDeviceDriver.java index a430f0b..aec310b 100644 --- a/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/standard_autodoor/StandardAutodoorDeviceDriver.java +++ b/acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/standard_autodoor/StandardAutodoorDeviceDriver.java @@ -119,10 +119,13 @@ public class StandardAutodoorDeviceDriver extends AbstractOpcDeviceDriver implem FeedBackTaskStatusRequest request = new FeedBackTaskStatusRequest(); request.setState(String.valueOf(state)); request.setDevice_code(this.getDeviceCode()); - request.setType("1"); - acsToWmsService.notify(request); - if(state==4) { - this. writing(ItemProtocol.item_to_state,4); + if(state==4){ + request.setType("4"); + acsToWmsService.notify(request); + this.writing(ItemProtocol.item_to_state,4); + }else { + request.setType("1"); + acsToWmsService.notify(request); } } last_action = action; diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/service/impl/AcsToWmsServiceImpl.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/service/impl/AcsToWmsServiceImpl.java index eb7ebdc..36b8886 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/service/impl/AcsToWmsServiceImpl.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/service/impl/AcsToWmsServiceImpl.java @@ -200,11 +200,11 @@ public class AcsToWmsServiceImpl implements AcsToWmsService { List vehicleCodeList = Arrays.stream(schBasePoint.getVehicle_code().split(",")).collect(Collectors.toList()); //组盘全部解绑 for (String vehicleCode : vehicleCodeList) { - SchBaseVehiclematerialgroup groupEntity = vehiclematerialgroupService.getOne(new LambdaQueryWrapper() + List schBaseVehiclematerialgroupList=vehiclematerialgroupService.list(new LambdaQueryWrapper() .eq(SchBaseVehiclematerialgroup::getVehicle_code, vehicleCode) .eq(SchBaseVehiclematerialgroup::getGroup_bind_material_status, GroupBindMaterialStatusEnum.BOUND.getValue())); - if (ObjectUtil.isNotEmpty(groupEntity)) { + for(SchBaseVehiclematerialgroup groupEntity:schBaseVehiclematerialgroupList){ groupEntity.setGroup_bind_material_status(GroupBindMaterialStatusEnum.UNBOUND.getValue()); groupEntity.setUpdate_id(GeneralDefinition.ACS_ID); groupEntity.setUpdate_name(GeneralDefinition.ACS_NAME);