fix: mes对接
This commit is contained in:
@@ -1,2 +1,532 @@
|
||||
# nladmin
|
||||
|
||||
## ACS文件下的目录结构
|
||||
```java
|
||||
acs
|
||||
├── AcsConfig.java
|
||||
├── agv
|
||||
│ ├── AgvUtil.java
|
||||
│ ├── agv说明
|
||||
│ ├── rest
|
||||
│ │ ├── MagicAgvController.java
|
||||
│ │ ├── NDCAgvController.java
|
||||
│ │ ├── XianGongAgvController.java
|
||||
│ │ └── ZheDaAgvController.java
|
||||
│ └── server
|
||||
│ ├── AgvService.java
|
||||
│ ├── dto
|
||||
│ │ └── AgvDto.java
|
||||
│ ├── impl
|
||||
│ │ ├── AgvServiceImpl.java
|
||||
│ │ ├── MagicAgvServiceImpl.java
|
||||
│ │ ├── NDCAgvServiceImpl.java
|
||||
│ │ └── XianGongAgvServiceImpl.java
|
||||
│ ├── MagicAgvService.java
|
||||
│ ├── NDCAgvService.java
|
||||
│ └── XianGongAgvService.java
|
||||
├── auto
|
||||
│ ├── AcsInit.java
|
||||
│ ├── AutoRunController.java
|
||||
│ ├── initial
|
||||
│ │ ├── ApplicationAutoInitial.java
|
||||
│ │ ├── ApplicationAutoInitialExecuter.java
|
||||
│ │ ├── WebAutoInitial.java
|
||||
│ │ └── WebAutoInitialExecuter.java
|
||||
│ └── run
|
||||
│ ├── AbstractAutoRunnable.java
|
||||
│ ├── AutoRunService.java
|
||||
│ ├── AutoRunServiceImpl.java
|
||||
│ ├── DevelopConfig.java
|
||||
│ ├── SystemConfig.java
|
||||
│ ├── ThreadDto.java
|
||||
│ ├── ThreadStatusEnum.java
|
||||
│ └── ThreadUsedStatusEnum.java
|
||||
├── autotask
|
||||
│ └── CleanLog.java
|
||||
├── common
|
||||
│ ├── AbstractDriverService.java
|
||||
│ ├── IDriverService.java
|
||||
│ ├── StandardCoveyorControlWithPlcScannerDevice.java
|
||||
│ ├── StandardInspectSiteDevice.java
|
||||
│ └── StandardOrdinarySiteDevice.java
|
||||
├── config
|
||||
│ ├── AcsConfig.java
|
||||
│ ├── dto
|
||||
│ │ └── AcsConfigDto.java
|
||||
│ ├── rest
|
||||
│ │ └── AcsConfigController.java
|
||||
│ ├── server
|
||||
│ │ ├── AcsConfigService.java
|
||||
│ │ └── impl
|
||||
│ │ └── AcsConfigServiceImpl.java
|
||||
│ └── wql
|
||||
│ └── sys_config.xls
|
||||
├── device
|
||||
│ ├── address
|
||||
│ │ ├── rest
|
||||
│ │ │ └── AddressController.java
|
||||
│ │ ├── service
|
||||
│ │ │ ├── AddressService.java
|
||||
│ │ │ ├── dto
|
||||
│ │ │ │ └── AddressDto.java
|
||||
│ │ │ └── impl
|
||||
│ │ │ └── AddressServiceImpl.java
|
||||
│ │ └── wql
|
||||
│ │ └── sys_config.xls
|
||||
│ ├── device_driver
|
||||
│ │ ├── DeviceDriverConfigController.java
|
||||
│ │ ├── DeviceDriverConfigDto.java
|
||||
│ │ ├── DeviceDriverConfigService.java
|
||||
│ │ ├── DeviceDriverConfigServiceImpl.java
|
||||
│ │ ├── DriverTypeEnum.java
|
||||
│ │ └── standard_inspect
|
||||
│ │ ├── BaseDeviceDriver.java
|
||||
│ │ ├── ItemDto.java
|
||||
│ │ ├── ItemProtocol.java
|
||||
│ │ ├── OpcPlcDto.java
|
||||
│ │ └── ReadUtil.java
|
||||
│ ├── rest
|
||||
│ │ ├── AcsDeviceErpmappingController.java
|
||||
│ │ ├── DeviceAssignedController.java
|
||||
│ │ ├── DeviceController.java
|
||||
│ │ ├── DeviceDbitemController.java
|
||||
│ │ ├── DeviceExtraController.java
|
||||
│ │ ├── OpcController.java
|
||||
│ │ ├── OpcPlcController.java
|
||||
│ │ └── StorageCellController.java
|
||||
│ ├── service
|
||||
│ │ ├── AcsDeviceErpmappingService.java
|
||||
│ │ ├── DeviceAssignedService.java
|
||||
│ │ ├── DeviceDbitemService.java
|
||||
│ │ ├── DeviceDriverDefinationAppService.java
|
||||
│ │ ├── DeviceExtraService.java
|
||||
│ │ ├── DeviceService.java
|
||||
│ │ ├── dto
|
||||
│ │ │ ├── AcsDeviceErpmappingDto.java
|
||||
│ │ │ ├── DeviceAssignedDto.java
|
||||
│ │ │ ├── DeviceDbitemDto.java
|
||||
│ │ │ ├── DeviceDriverDto.java
|
||||
│ │ │ ├── DeviceDto.java
|
||||
│ │ │ ├── DeviceExtraDto.java
|
||||
│ │ │ ├── DeviceRunpointDto.java
|
||||
│ │ │ ├── OpcDto.java
|
||||
│ │ │ ├── OpcPlcDto.java
|
||||
│ │ │ └── StorageCellDto.java
|
||||
│ │ ├── impl
|
||||
│ │ │ ├── AcsDeviceErpmappingServiceImpl.java
|
||||
│ │ │ ├── ConveyorDevice.java
|
||||
│ │ │ ├── DeviceAssignedServiceImpl.java
|
||||
│ │ │ ├── DeviceDbitemServiceImpl.java
|
||||
│ │ │ ├── DeviceExtraServiceImpl.java
|
||||
│ │ │ ├── DeviceServiceImpl.java
|
||||
│ │ │ ├── ExportCSVUtil.java
|
||||
│ │ │ ├── OpcPlcServiceImpl.java
|
||||
│ │ │ ├── OpcServiceImpl.java
|
||||
│ │ │ ├── StorageCellServiceImpl.java
|
||||
│ │ │ └── Test.java
|
||||
│ │ ├── OpcPlcService.java
|
||||
│ │ ├── OpcService.java
|
||||
│ │ └── StorageCellService.java
|
||||
│ └── wql
|
||||
│ ├── Qdevice_query_002.wql
|
||||
│ ├── QStage_01.wql
|
||||
│ ├── route.xls
|
||||
│ └── task_inst.xls
|
||||
├── device.xls
|
||||
├── device_driver
|
||||
│ ├── basedriver
|
||||
│ │ ├── agv
|
||||
│ │ │ ├── magic_agv
|
||||
│ │ │ │ ├── MagicAgvDefination.java
|
||||
│ │ │ │ └── MagicAgvDeviceDriver.java
|
||||
│ │ │ ├── ndcone
|
||||
│ │ │ │ ├── AgvNdcOneDefination.java
|
||||
│ │ │ │ └── AgvNdcOneDeviceDriver.java
|
||||
│ │ │ └── utils
|
||||
│ │ │ ├── IAgv.java
|
||||
│ │ │ ├── OneAgvPhase.java
|
||||
│ │ │ └── TwoAgvPhase.java
|
||||
│ │ ├── cargo_lift_conveyor
|
||||
│ │ │ ├── CargoLiftConveyorDefination.java
|
||||
│ │ │ ├── CargoLiftConveyorDeviceDriver.java
|
||||
│ │ │ └── ItemProtocol.java
|
||||
│ │ ├── empty_vehicle_stacking_position
|
||||
│ │ │ ├── EmptyVehicleStackingPositionDefination.java
|
||||
│ │ │ ├── EmptyVehicleStackingPositionDeviceDriver.java
|
||||
│ │ │ └── ItemProtocol.java
|
||||
│ │ ├── standard_conveyor_control
|
||||
│ │ │ ├── ItemProtocol.java
|
||||
│ │ │ ├── StandardConveyorControlDefination.java
|
||||
│ │ │ └── StandardCoveyorControlDeviceDriver.java
|
||||
│ │ ├── standard_conveyor_control_with_plcscanner
|
||||
│ │ │ ├── ItemProtocol.java
|
||||
│ │ │ ├── StandardConveyorControlWithPlcScannerDefination.java
|
||||
│ │ │ ├── StandardConveyorWithPlcScannerConfig.java
|
||||
│ │ │ └── StandardCoveyorControlWithPlcScannerDeviceDriver.java
|
||||
│ │ ├── standard_inspect_site
|
||||
│ │ │ ├── ItemProtocol.java
|
||||
│ │ │ ├── StandardInspectSiteDefination.java
|
||||
│ │ │ └── StandardInspectSiteDeviceDriver.java
|
||||
│ │ ├── standard_ordinary_site
|
||||
│ │ │ ├── StandardOrdinarySiteDefination.java
|
||||
│ │ │ └── StandardOrdinarySiteDeviceDriver.java
|
||||
│ │ ├── standard_scanner
|
||||
│ │ │ ├── StandardScannerDefination.java
|
||||
│ │ │ └── StandardScannerDeviceDriver.java
|
||||
│ │ └── standard_storage
|
||||
│ │ ├── StandardStorageDefination.java
|
||||
│ │ └── StandardStorageDeviceDriver.java
|
||||
│ ├── defination
|
||||
│ │ └── OpcDeviceDriverDefination.java
|
||||
│ ├── DeviceDriver.java
|
||||
│ ├── DeviceDriverDefination.java
|
||||
│ ├── driver
|
||||
│ │ ├── AbstractDeviceDriver.java
|
||||
│ │ ├── AbstractOpcDeviceDriver.java
|
||||
│ │ ├── ExecutableDeviceDriver.java
|
||||
│ │ └── OpcDeviceDriver.java
|
||||
│ ├── lamp_three_color
|
||||
│ │ ├── ItemProtocol.java
|
||||
│ │ ├── LampThreecolorDefination.java
|
||||
│ │ └── LampThreecolorDeviceDriver.java
|
||||
│ ├── LinewayDeviceDriver.java
|
||||
│ ├── lnsh
|
||||
│ │ ├── converor_barcode
|
||||
│ │ │ ├── ConveyorBarcodeDefination.java
|
||||
│ │ │ ├── ConveyorBarcodeDeviceDriver.java
|
||||
│ │ │ └── ItemProtocol.java
|
||||
│ │ ├── conveyor_press_station
|
||||
│ │ │ ├── ConveyorPressStationDefination.java
|
||||
│ │ │ ├── ConveyorPressStationDeviceDriver.java
|
||||
│ │ │ └── ItemProtocol.java
|
||||
│ │ ├── lnsh_crusher
|
||||
│ │ │ ├── ItemProtocol.java
|
||||
│ │ │ ├── LnshCrusherDefination.java
|
||||
│ │ │ └── LnshCrusherDeviceDriver.java
|
||||
│ │ ├── lnsh_fold_disc_site
|
||||
│ │ │ ├── ItemProtocol.java
|
||||
│ │ │ ├── LnshFoldDiscSiteDefination.java
|
||||
│ │ │ └── LnshFoldDiscSiteDeviceDriver.java
|
||||
│ │ ├── lnsh_kiln_lane
|
||||
│ │ │ ├── ItemProtocol.java
|
||||
│ │ │ ├── LnshKilnLaneDefination.java
|
||||
│ │ │ └── LnshKilnLaneDeviceDriver.java
|
||||
│ │ ├── lnsh_kiln_truss
|
||||
│ │ │ ├── ItemProtocol.java
|
||||
│ │ │ ├── LnshKilnTrussDefination.java
|
||||
│ │ │ └── LnshKilnTrussDeviceDriver.java
|
||||
│ │ ├── lnsh_labeling_machine
|
||||
│ │ │ ├── ItemProtocol.java
|
||||
│ │ │ ├── LnshLabelingMachineDefination.java
|
||||
│ │ │ └── LnshLabelingMachineDeviceDriver.java
|
||||
│ │ ├── lnsh_Laminating_machine
|
||||
│ │ │ ├── ItemProtocol.java
|
||||
│ │ │ ├── LnshLaminatingMachineDefination.java
|
||||
│ │ │ └── LnshLaminatingMachineDeviceDriver.java
|
||||
│ │ ├── lnsh_mixing_mill
|
||||
│ │ │ ├── ItemProtocol.java
|
||||
│ │ │ ├── LnshMixingMillDefination.java
|
||||
│ │ │ └── LnshMixingMillDeviceDriver.java
|
||||
│ │ ├── lnsh_out_kiln_truss
|
||||
│ │ │ ├── ItemProtocol.java
|
||||
│ │ │ ├── LnshOutKilnTrussDefination.java
|
||||
│ │ │ └── LnshOutKilnTrussDeviceDriver.java
|
||||
│ │ ├── lnsh_package_line
|
||||
│ │ │ ├── ItemProtocol.java
|
||||
│ │ │ ├── LnshPackageLineDefination.java
|
||||
│ │ │ └── LnshPackageLineDeviceDriver.java
|
||||
│ │ ├── lnsh_package_pallet_manipulator
|
||||
│ │ │ ├── ItemProtocol.java
|
||||
│ │ │ ├── LnshPackagePalletManipulatorDefination.java
|
||||
│ │ │ └── LnshPackagePalletManipulatorDeviceDriver.java
|
||||
│ │ ├── lnsh_package_site
|
||||
│ │ │ ├── ItemProtocol.java
|
||||
│ │ │ ├── LnshPackageSiteDefination.java
|
||||
│ │ │ └── LnshPackageSiteDeviceDriver.java
|
||||
│ │ ├── lnsh_palletizing_manipulator
|
||||
│ │ │ ├── ItemProtocol.java
|
||||
│ │ │ ├── LnshPalletizingManipulatorDefination.java
|
||||
│ │ │ └── LnshPalletizingManipulatorDeviceDriver.java
|
||||
│ │ ├── lnsh_palletizing_manipulator_site
|
||||
│ │ │ ├── ItemProtocol.java
|
||||
│ │ │ ├── LnshPalletizingManipulatorSiteDefination.java
|
||||
│ │ │ └── LnshPalletizingManipulatorSiteDeviceDriver.java
|
||||
│ │ ├── lnsh_pallet_storage
|
||||
│ │ │ ├── ItemProtocol.java
|
||||
│ │ │ ├── LnshPalletStorageDefination.java
|
||||
│ │ │ └── LnshPalletStorageDeviceDriver.java
|
||||
│ │ ├── lnsh_press
|
||||
│ │ │ ├── ItemProtocol.java
|
||||
│ │ │ ├── LnshPressDefination.java
|
||||
│ │ │ └── LnshPressDeviceDriver.java
|
||||
│ │ ├── lnsh_rgv
|
||||
│ │ │ ├── ItemProtocol.java
|
||||
│ │ │ ├── LnshRGVDefination.java
|
||||
│ │ │ └── LnshRGVDeviceDriver.java
|
||||
│ │ ├── lnsh_split_manipulator
|
||||
│ │ │ ├── ItemProtocol.java
|
||||
│ │ │ ├── LnshSplitManipulatorDefination.java
|
||||
│ │ │ └── LnshSplitManipulatorDeviceDriver.java
|
||||
│ │ ├── lnsh_station
|
||||
│ │ │ ├── ItemProtocol.java
|
||||
│ │ │ ├── LnshStationDefination.java
|
||||
│ │ │ └── LnshStationDeviceDriver.java
|
||||
│ │ └── package_site
|
||||
│ │ ├── ItemProtocol.java
|
||||
│ │ ├── PackageSiteDefination.java
|
||||
│ │ └── PackageSiteDeviceDriver.java
|
||||
│ ├── RequestMethodEnum.java
|
||||
│ ├── RouteableDeviceDriver.java
|
||||
│ ├── ScannerDeviceDriver.java
|
||||
│ ├── StandardRequestMethod.java
|
||||
│ ├── standard_autodoor
|
||||
│ │ ├── ItemProtocol.java
|
||||
│ │ ├── StandardAutodoorDefination.java
|
||||
│ │ └── StandardAutodoorDeviceDriver.java
|
||||
│ ├── standard_emptypallet_site
|
||||
│ │ ├── ItemProtocol.java
|
||||
│ │ ├── StandardEmptyPalletSiteDefination.java
|
||||
│ │ └── StandardEmptyPalletSiteDeviceDriver.java
|
||||
│ └── StorageDeviceDriver.java
|
||||
├── ext
|
||||
│ └── wms
|
||||
│ ├── data
|
||||
│ │ ├── AcsToWmsData
|
||||
│ │ │ ├── applySignalStaus
|
||||
│ │ │ │ ├── ApplySignalStatusRequest.java
|
||||
│ │ │ │ └── ApplySignalStatusResponse.java
|
||||
│ │ │ ├── applyTask
|
||||
│ │ │ │ ├── ApplyDeviceDto.java
|
||||
│ │ │ │ ├── ApplyTaskRequest.java
|
||||
│ │ │ │ └── ApplyTaskResponse.java
|
||||
│ │ │ ├── feedBackSplitPalletStation
|
||||
│ │ │ │ ├── feedBackSplitPalletStationRequest.java
|
||||
│ │ │ │ └── feedBackSplitPalletStationResponse.java
|
||||
│ │ │ ├── feedBackTaskStatus
|
||||
│ │ │ │ ├── FeedBackTaskStatusRequest.java
|
||||
│ │ │ │ └── FeedBackTaskStatusResponse.java
|
||||
│ │ │ ├── getVehicle
|
||||
│ │ │ │ ├── GetPalletizeRequest.java
|
||||
│ │ │ │ └── GetPalletizeResponse.java
|
||||
│ │ │ ├── grab
|
||||
│ │ │ │ ├── GrabRequest.java
|
||||
│ │ │ │ └── GrabResponse.java
|
||||
│ │ │ └── grab_place_station
|
||||
│ │ │ ├── GrabPlaceStationRequest.java
|
||||
│ │ │ └── GrabPlaceStationResponse.java
|
||||
│ │ ├── BaseRequest.java
|
||||
│ │ ├── BaseResponse.java
|
||||
│ │ ├── PalletizeDto.java
|
||||
│ │ ├── Resp.java
|
||||
│ │ └── WmstoAcsData
|
||||
│ │ ├── cancelTask
|
||||
│ │ │ ├── CancelTaskRequest.java
|
||||
│ │ │ └── CancelTaskResponse.java
|
||||
│ │ ├── createOrder
|
||||
│ │ │ ├── CreateOrderRequest.java
|
||||
│ │ │ ├── CreateOrderResponse.java
|
||||
│ │ │ └── OrderDto.java
|
||||
│ │ ├── createTask
|
||||
│ │ │ ├── CreateTaskRequest.java
|
||||
│ │ │ └── CreateTaskResponse.java
|
||||
│ │ └── putAction
|
||||
│ │ ├── PutActionRequest.java
|
||||
│ │ ├── PutActionResponse.java
|
||||
│ │ └── SignalData.java
|
||||
│ ├── LmsUtil.java
|
||||
│ ├── RespUtil.java
|
||||
│ ├── rest
|
||||
│ │ ├── AcsToWmsController.java
|
||||
│ │ └── WmsToAcsController.java
|
||||
│ └── service
|
||||
│ ├── AcsToWmsService.java
|
||||
│ ├── impl
|
||||
│ │ ├── AcsToWmsServiceImpl.java
|
||||
│ │ └── WmsToAcsServiceImpl.java
|
||||
│ └── WmsToAcsService.java
|
||||
├── heartbeat
|
||||
│ ├── CompareOrder.java
|
||||
│ ├── domain
|
||||
│ │ ├── Domain.java
|
||||
│ │ ├── HeartbeatDomain.java
|
||||
│ │ └── SqlUtilFactory.java
|
||||
│ ├── dto
|
||||
│ │ ├── Dto.java
|
||||
│ │ └── HeartbeatManageDto.java
|
||||
│ ├── enums
|
||||
│ │ ├── HeartbeatType.java
|
||||
│ │ └── OptionType.java
|
||||
│ ├── event
|
||||
│ │ ├── HeartbeatChangeEvent.java
|
||||
│ │ └── HeartbeatOfflineEvent.java
|
||||
│ ├── EventObject.java
|
||||
│ ├── HeartbeatEvent.java
|
||||
│ ├── OrderType.java
|
||||
│ ├── service
|
||||
│ │ ├── HeartbeatManageService.java
|
||||
│ │ └── HeartbeatUnifiedService.java
|
||||
│ └── service_impl
|
||||
│ ├── HeartbeatManageServiceimpl.java
|
||||
│ └── HeartbeatUnifiedServiceimpl.java
|
||||
├── instruction
|
||||
│ ├── common
|
||||
│ │ ├── InstructFinishTypeEnum.java
|
||||
│ │ ├── InstructStatusEnum.java
|
||||
│ │ └── InstructTypeEnum.java
|
||||
│ ├── enums
|
||||
│ │ ├── InstCreateEnum.java
|
||||
│ │ ├── InstErrorEnum.java
|
||||
│ │ ├── InstFinishEnum.java
|
||||
│ │ ├── InstStatusEnum.java
|
||||
│ │ └── InstTypeEnum.java
|
||||
│ ├── rest
|
||||
│ │ └── InstructionController.java
|
||||
│ ├── service
|
||||
│ │ ├── dto
|
||||
│ │ │ ├── Instruction.java
|
||||
│ │ │ └── InstructionDto.java
|
||||
│ │ ├── impl
|
||||
│ │ │ └── InstructionServiceImpl.java
|
||||
│ │ ├── InstructionService.java
|
||||
│ │ └── wql
|
||||
│ │ └── QINST_QUERY.wql
|
||||
│ └── TestToAgv.java
|
||||
├── log
|
||||
│ ├── LokiLog.java
|
||||
│ ├── LokiLogAspect.java
|
||||
│ ├── LokiLogType.java
|
||||
│ └── service
|
||||
│ ├── DeviceExecuteLogService.java
|
||||
│ ├── dto
|
||||
│ │ ├── DeviceLogDto.java
|
||||
│ │ └── LogDto.java
|
||||
│ └── impl
|
||||
│ └── DeviceExecuteLogServiceImpl.java
|
||||
├── monitor
|
||||
│ ├── DeviceStageMonitor.java
|
||||
│ ├── rest
|
||||
│ │ └── DeviceStageMonitorController.java
|
||||
│ ├── service
|
||||
│ │ ├── DeviceStageMonitorService.java
|
||||
│ │ └── impl
|
||||
│ │ └── DeviceStageMonitorServiceImpl.java
|
||||
│ └── test.txt
|
||||
├── opc
|
||||
│ ├── BlockedRunable.java
|
||||
│ ├── Device.java
|
||||
│ ├── DeviceAppService.java
|
||||
│ ├── DeviceAppServiceImpl.java
|
||||
│ ├── DeviceDriverDefinationAppServiceImpl.java
|
||||
│ ├── DeviceExecuteAutoRun.java
|
||||
│ ├── DeviceExtraManageDto.java
|
||||
│ ├── DeviceManageDto.java
|
||||
│ ├── DeviceManageService.java
|
||||
│ ├── DeviceManageServiceImpl.java
|
||||
│ ├── DeviceOpcProtocolRunable.java
|
||||
│ ├── DeviceOpcSynchronizeAutoRun.java
|
||||
│ ├── DeviceType.java
|
||||
│ ├── enums
|
||||
│ │ └── HeartbeatTypeEnum.java
|
||||
│ ├── ItemValue.java
|
||||
│ ├── JsonUtl.java
|
||||
│ ├── ObjectUtl.java
|
||||
│ ├── OpcConfig.java
|
||||
│ ├── OpcEntity.java
|
||||
│ ├── OpcItemDto.java
|
||||
│ ├── OpcServerManageDto.java
|
||||
│ ├── OpcServerManageService.java
|
||||
│ ├── opcServerManageServiceImpl.java
|
||||
│ ├── OpcServerService.java
|
||||
│ ├── OpcServerServiceImpl.java
|
||||
│ ├── OpcServerUtl.java
|
||||
│ ├── OpcStartTag.java
|
||||
│ ├── OpcUtl.java
|
||||
│ ├── QualityTypeValue.java
|
||||
│ ├── ThreadUtl.java
|
||||
│ ├── UtgardTutorial1.java
|
||||
│ └── WcsConfig.java
|
||||
├── order
|
||||
│ ├── rest
|
||||
│ │ └── ProduceshiftorderController.java
|
||||
│ └── service
|
||||
│ ├── dto
|
||||
│ │ └── ProduceshiftorderDto.java
|
||||
│ ├── impl
|
||||
│ │ └── ProduceshiftorderServiceImpl.java
|
||||
│ ├── ProduceshiftorderService.java
|
||||
│ └── wql
|
||||
│ ├── order.xls
|
||||
│ └── QPRODUCESHIFTORDER.wql
|
||||
├── route
|
||||
│ ├── rest
|
||||
│ │ ├── RouteLineController.java
|
||||
│ │ ├── RouteLocController.java
|
||||
│ │ └── RoutePlanController.java
|
||||
│ ├── service
|
||||
│ │ ├── dto
|
||||
│ │ │ ├── RouteLineDto.java
|
||||
│ │ │ ├── RouteLocDto.java
|
||||
│ │ │ ├── RoutePlanDto.java
|
||||
│ │ │ └── RouteWeightDto.java
|
||||
│ │ ├── impl
|
||||
│ │ │ ├── RouteLineServiceImpl.java
|
||||
│ │ │ ├── RouteLocServiceImpl.java
|
||||
│ │ │ └── RoutePlanServiceImpl.java
|
||||
│ │ ├── RouteLineService.java
|
||||
│ │ ├── RouteLocService.java
|
||||
│ │ └── RoutePlanService.java
|
||||
│ └── wql
|
||||
│ └── QROUTE.wql
|
||||
├── socket
|
||||
│ ├── ClientUDWReceive.java
|
||||
│ ├── SocketConfig.java
|
||||
│ ├── SocketListenerAutoRun.java
|
||||
│ ├── SocketProperties.java
|
||||
│ └── SocketService.java
|
||||
├── task
|
||||
│ ├── enums
|
||||
│ │ ├── TaskCreateEnum.java
|
||||
│ │ ├── TaskErrorEnum.java
|
||||
│ │ ├── TaskFinishEnum.java
|
||||
│ │ ├── TaskStatusEnum.java
|
||||
│ │ └── TaskTypeEnum.java
|
||||
│ ├── rest
|
||||
│ │ ├── TaskController.java
|
||||
│ │ └── TaskFeedbackController.java
|
||||
│ └── service
|
||||
│ ├── dto
|
||||
│ │ ├── TaskDto.java
|
||||
│ │ └── TaskFeedbackDto.java
|
||||
│ ├── impl
|
||||
│ │ ├── TaskFeedbackServiceImpl.java
|
||||
│ │ └── TaskServiceImpl.java
|
||||
│ ├── TaskFeedbackService.java
|
||||
│ ├── TaskService.java
|
||||
│ └── wql
|
||||
│ └── QTASK_QUERY.wql
|
||||
├── test
|
||||
│ ├── rest
|
||||
│ │ └── TestController.java
|
||||
│ └── service
|
||||
│ ├── impl
|
||||
│ │ └── TestServiceImpl.java
|
||||
│ └── TestService.java
|
||||
├── udw
|
||||
│ ├── dto
|
||||
│ │ └── UdwDto.java
|
||||
│ ├── rest
|
||||
│ │ └── UdwManagerController.java
|
||||
│ ├── service
|
||||
│ │ ├── impl
|
||||
│ │ │ ├── UdwManagerServiceImpl.java
|
||||
│ │ │ ├── UnifiedDataAccessorImpl.java
|
||||
│ │ │ ├── UnifiedDataAppServiceImpl.java
|
||||
│ │ │ └── UnifiedDataUnit.java
|
||||
│ │ └── UdwManageService.java
|
||||
│ ├── UdwConfig.java
|
||||
│ ├── UnifiedData.java
|
||||
│ ├── UnifiedDataAccessor.java
|
||||
│ ├── UnifiedDataAccessorFactory.java
|
||||
│ └── UnifiedDataAppService.java
|
||||
└── util
|
||||
└── DateUtil.java
|
||||
|
||||
@@ -4,6 +4,9 @@ import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 线程父类:抽象类
|
||||
*/
|
||||
@Slf4j
|
||||
public abstract class AbstractAutoRunnable implements Runnable {
|
||||
private ThreadStatusEnum status;
|
||||
|
||||
@@ -4,15 +4,40 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface AutoRunService {
|
||||
/** 启动线程 */
|
||||
void startThread(String arg0);
|
||||
|
||||
/**
|
||||
* 停止线程
|
||||
* @param arg0
|
||||
*/
|
||||
void stopThread(String arg0);
|
||||
|
||||
/**
|
||||
* 获取线程
|
||||
* @param arg0:线程编码
|
||||
* @param arg1:线程ID
|
||||
* @return
|
||||
*/
|
||||
ThreadDto findByCode(String arg0, String arg1);
|
||||
|
||||
/**
|
||||
* 获取所有线程
|
||||
* @return
|
||||
*/
|
||||
List<ThreadDto> findAll();
|
||||
|
||||
/**
|
||||
* 根据条件获取线程
|
||||
* @param whereJson
|
||||
* @return
|
||||
*/
|
||||
List<ThreadDto> findByCondition(Map whereJson);
|
||||
|
||||
/**
|
||||
* 通过线程编码获取线程
|
||||
* @param code:线程key
|
||||
* @return
|
||||
*/
|
||||
Thread getThreadByCode(String code);
|
||||
}
|
||||
|
||||
@@ -15,11 +15,26 @@ import java.util.*;
|
||||
@Service
|
||||
@Slf4j
|
||||
public class AutoRunServiceImpl implements AutoRunService, ApplicationAutoInitial {
|
||||
/**
|
||||
* 获取所有继承次抽象类->AbstractAutoRunnable的bean对象
|
||||
*/
|
||||
@Autowired(required = false)
|
||||
private List<AbstractAutoRunnable> abstractAutoRunnableList;
|
||||
/**
|
||||
* 线程索引(类名)
|
||||
*/
|
||||
private List<String> autoRun_code_index = new ArrayList();
|
||||
/**
|
||||
* 存放线程
|
||||
*/
|
||||
private List<Thread> threads = new ArrayList();
|
||||
/**
|
||||
* 存放AbstractAutoRunnable的子类
|
||||
*/
|
||||
private List<AbstractAutoRunnable> thread_autoRun = new ArrayList();
|
||||
/**
|
||||
* 存储运行中线程下标(类名)
|
||||
*/
|
||||
private List<String> thread_code_index = new ArrayList();
|
||||
|
||||
@Override
|
||||
@@ -166,6 +181,7 @@ public class AutoRunServiceImpl implements AutoRunService, ApplicationAutoInitia
|
||||
|
||||
|
||||
private List<AbstractAutoRunnable> getAllAutoThread() {
|
||||
// 如果此bean存在就直接返回
|
||||
return ObjectUtil.isNotEmpty(abstractAutoRunnableList)
|
||||
? this.abstractAutoRunnableList
|
||||
: new LinkedList();
|
||||
@@ -173,6 +189,7 @@ public class AutoRunServiceImpl implements AutoRunService, ApplicationAutoInitia
|
||||
|
||||
@Override
|
||||
public void autoInitial() throws Exception {
|
||||
// 获取自动线程
|
||||
List<AbstractAutoRunnable> list = this.getAllAutoThread();
|
||||
Iterator it = list.iterator();
|
||||
|
||||
@@ -185,11 +202,13 @@ public class AutoRunServiceImpl implements AutoRunService, ApplicationAutoInitia
|
||||
a = "code 因为空而未加载";
|
||||
log.warn(a);
|
||||
t.setStopMessage(a);
|
||||
// todo: 编码为空,此时应该不能插入
|
||||
this.autoRun_code_index.add(t.getCode());
|
||||
} else if (this.autoRun_code_index.contains(t.getCode())) {
|
||||
a = String.format("code:%s 因为重复而未加载", new Object[]{t.getCode()});
|
||||
log.warn(a);
|
||||
t.setStopMessage(a);
|
||||
// todo: 既然已经包含,再次添加会构成重复
|
||||
this.autoRun_code_index.add(t.getCode());
|
||||
} else {
|
||||
t.setUsedStatus(ThreadUsedStatusEnum.used);
|
||||
|
||||
@@ -1597,6 +1597,7 @@ public class DeviceServiceImpl implements DeviceService, ApplicationAutoInitial
|
||||
|
||||
@Override
|
||||
public void reload() {
|
||||
// 将货位信息存到内存中
|
||||
this.storageCells = queryAllStorageCell();
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,9 @@ import org.nl.acs.opc.DeviceType;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备驱动定义
|
||||
*/
|
||||
public interface DeviceDriverDefination {
|
||||
String getDriverCode();
|
||||
|
||||
|
||||
@@ -323,7 +323,7 @@ public class DeviceAppServiceImpl implements DeviceAppService, ApplicationAutoIn
|
||||
this.code_indexs = new ArrayList();
|
||||
Collections.synchronizedList(this.code_indexs);
|
||||
int i = 0;
|
||||
|
||||
// 将设备与opc对应的数据装入内存变量之中
|
||||
for (int size = deviceManageDtos.size(); i < size; ++i) {
|
||||
DeviceManageDto deviceManage = (DeviceManageDto) deviceManageDtos.get(i);
|
||||
Device device = new Device();
|
||||
@@ -347,7 +347,7 @@ public class DeviceAppServiceImpl implements DeviceAppService, ApplicationAutoIn
|
||||
|
||||
@Override
|
||||
public void removeDevice(String deviceCode) {
|
||||
|
||||
// 移除内存变量的设备实体
|
||||
Iterator<Device> iterator = devices.iterator();
|
||||
while (iterator.hasNext()) {
|
||||
Device device = iterator.next();
|
||||
@@ -355,6 +355,7 @@ public class DeviceAppServiceImpl implements DeviceAppService, ApplicationAutoIn
|
||||
iterator.remove();
|
||||
}
|
||||
}
|
||||
// 移除设备的内存key
|
||||
Iterator<String> iterator2 = code_indexs.iterator();
|
||||
while (iterator2.hasNext()) {
|
||||
String str = iterator2.next();
|
||||
|
||||
@@ -28,167 +28,169 @@ import java.util.Map;
|
||||
@Service
|
||||
public class OpcServerServiceImpl implements OpcServerService, ApplicationAutoInitial {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(OpcServerServiceImpl.class);
|
||||
@Autowired OpcServerManageService opcServerManageService;
|
||||
Map<String, OpcServerManageDto> opcServerManageDtos = new HashMap();
|
||||
Map<String, Server> servers = Collections.synchronizedMap(new HashMap());
|
||||
Map<String, Group> groups = Collections.synchronizedMap(new HashMap());
|
||||
private static final Logger log = LoggerFactory.getLogger(OpcServerServiceImpl.class);
|
||||
@Autowired
|
||||
OpcServerManageService opcServerManageService;
|
||||
Map<String, OpcServerManageDto> opcServerManageDtos = new HashMap();
|
||||
Map<String, Server> servers = Collections.synchronizedMap(new HashMap());
|
||||
Map<String, Group> groups = Collections.synchronizedMap(new HashMap());
|
||||
|
||||
public OpcServerServiceImpl() {}
|
||||
public OpcServerServiceImpl() {
|
||||
}
|
||||
|
||||
public void autoInitial() throws Exception {
|
||||
this.reload();
|
||||
if (OpcConfig.auto_start_opc) {
|
||||
Thread t =
|
||||
new Thread() {
|
||||
public void run() {
|
||||
Iterator var1 = OpcServerServiceImpl.this.opcServerManageDtos.values().iterator();
|
||||
public void autoInitial() throws Exception {
|
||||
this.reload();
|
||||
if (OpcConfig.auto_start_opc) {
|
||||
Thread t = new Thread(() -> {
|
||||
Iterator var1 = OpcServerServiceImpl.this.opcServerManageDtos.values().iterator();
|
||||
|
||||
while (var1.hasNext()) {
|
||||
OpcServerManageDto dto = (OpcServerManageDto) var1.next();
|
||||
while (var1.hasNext()) {
|
||||
OpcServerManageDto dto = (OpcServerManageDto) var1.next();
|
||||
|
||||
try {
|
||||
OpcServerServiceImpl.this.getServer(dto.getOpc_code());
|
||||
OpcServerServiceImpl.log.info("加载opc server {}", dto.getOpc_code());
|
||||
} catch (Exception var4) {
|
||||
OpcServerServiceImpl.log.warn("启动无法载入servers", var4);
|
||||
try {
|
||||
OpcServerServiceImpl.this.getServer(dto.getOpc_code());
|
||||
OpcServerServiceImpl.log.info("加载opc server {}", dto.getOpc_code());
|
||||
} catch (Exception var4) {
|
||||
OpcServerServiceImpl.log.warn("启动无法载入servers", var4);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
t.start();
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized void reload() {
|
||||
this.opcServerManageDtos = this.opcServerManageService.queryAllServerMap();
|
||||
this.opcServerManageDtos = Collections.synchronizedMap(this.opcServerManageDtos);
|
||||
}
|
||||
|
||||
public void cleanGroups(String opcCode) {
|
||||
Group group = (Group)this.groups.get(opcCode);
|
||||
if (group != null) {
|
||||
Server server = group.getServer();
|
||||
|
||||
try {
|
||||
group.remove();
|
||||
} catch (JIException var5) {
|
||||
var5.printStackTrace();
|
||||
}
|
||||
|
||||
this.groups.remove(opcCode);
|
||||
server.disconnect();
|
||||
this.servers.remove(opcCode);
|
||||
});
|
||||
t.start();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
public synchronized void reload() {
|
||||
this.opcServerManageDtos = this.opcServerManageService.queryAllServerMap();
|
||||
this.opcServerManageDtos = Collections.synchronizedMap(this.opcServerManageDtos);
|
||||
}
|
||||
|
||||
public Group getServer(String code) throws Exception {
|
||||
synchronized(this.buildLock(code)) {
|
||||
Group group = null;
|
||||
group = (Group)this.groups.get(code);
|
||||
if (group != null) {
|
||||
label68: {
|
||||
Group var10000;
|
||||
try {
|
||||
if (!group.isActive()) {
|
||||
break label68;
|
||||
public void cleanGroups(String opcCode) {
|
||||
Group group = (Group) this.groups.get(opcCode);
|
||||
if (group != null) {
|
||||
Server server = group.getServer();
|
||||
|
||||
try {
|
||||
group.remove();
|
||||
} catch (JIException var5) {
|
||||
var5.printStackTrace();
|
||||
}
|
||||
|
||||
var10000 = group;
|
||||
} catch (JIException var14) {
|
||||
log.error(code, var14);
|
||||
break label68;
|
||||
}
|
||||
|
||||
return var10000;
|
||||
this.groups.remove(opcCode);
|
||||
server.disconnect();
|
||||
this.servers.remove(opcCode);
|
||||
}
|
||||
}
|
||||
|
||||
Server server = (Server)this.servers.get(code);
|
||||
boolean needcreate = false;
|
||||
String groupName = code;
|
||||
if (server == null) {
|
||||
needcreate = true;
|
||||
} else {
|
||||
try {
|
||||
group = server.findGroup(groupName);
|
||||
} catch (UnknownHostException | JIException | UnknownGroupException | NotConnectedException | IllegalArgumentException var13) {
|
||||
log.error(code, var13);
|
||||
needcreate = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (needcreate) {
|
||||
OpcServerManageDto dto = (OpcServerManageDto)this.opcServerManageDtos.get(code);
|
||||
if (dto == null) {
|
||||
throw new RuntimeException(code+"不存在");
|
||||
}
|
||||
public Group getServer(String code) throws Exception {
|
||||
synchronized (this.buildLock(code)) {
|
||||
Group group = null;
|
||||
group = (Group) this.groups.get(code);
|
||||
if (group != null) {
|
||||
label68:
|
||||
{
|
||||
Group var10000;
|
||||
try {
|
||||
if (!group.isActive()) {
|
||||
break label68;
|
||||
}
|
||||
|
||||
var10000 = group;
|
||||
} catch (JIException var14) {
|
||||
log.error(code, var14);
|
||||
break label68;
|
||||
}
|
||||
|
||||
return var10000;
|
||||
}
|
||||
}
|
||||
|
||||
Server server = (Server) this.servers.get(code);
|
||||
boolean needcreate = false;
|
||||
String groupName = code;
|
||||
if (server == null) {
|
||||
needcreate = true;
|
||||
} else {
|
||||
try {
|
||||
group = server.findGroup(groupName);
|
||||
} catch (UnknownHostException | JIException | UnknownGroupException | NotConnectedException |
|
||||
IllegalArgumentException var13) {
|
||||
log.error(code, var13);
|
||||
needcreate = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (needcreate) {
|
||||
OpcServerManageDto dto = (OpcServerManageDto) this.opcServerManageDtos.get(code);
|
||||
if (dto == null) {
|
||||
throw new RuntimeException(code + "不存在");
|
||||
}
|
||||
|
||||
// if (server!=null){
|
||||
// server.disconnect();
|
||||
// server=null;
|
||||
// }
|
||||
|
||||
if (server == null) {
|
||||
server = OpcServerUtl.getServerWithOutException(dto.getOpc_host(), StrUtil.trim(dto.getCls_id()), dto.getUser(), dto.getPassword(), StrUtil.trim(dto.getDomain())); }
|
||||
if (server == null) {
|
||||
server = OpcServerUtl.getServerWithOutException(dto.getOpc_host(), StrUtil.trim(dto.getCls_id()), dto.getUser(), dto.getPassword(), StrUtil.trim(dto.getDomain()));
|
||||
}
|
||||
|
||||
try {
|
||||
group = server.addGroup(groupName);
|
||||
} catch (Exception var12) {
|
||||
this.clearServer(code);
|
||||
ThreadUtl.sleep(5000L);
|
||||
log.warn("获取opc出错重新获取", code, var12);
|
||||
server = OpcServerUtl.getServerWithOutException(dto.getOpc_host(), StrUtil.trim(dto.getCls_id()), dto.getUser(), dto.getPassword(), StrUtil.trim(dto.getDomain()));
|
||||
try {
|
||||
group = server.addGroup(groupName);
|
||||
} catch (Exception var11) {
|
||||
throw new RuntimeException(var12);
|
||||
}
|
||||
try {
|
||||
group = server.addGroup(groupName);
|
||||
} catch (Exception var12) {
|
||||
this.clearServer(code);
|
||||
ThreadUtl.sleep(5000L);
|
||||
log.warn("获取opc出错重新获取", code, var12);
|
||||
server = OpcServerUtl.getServerWithOutException(dto.getOpc_host(), StrUtil.trim(dto.getCls_id()), dto.getUser(), dto.getPassword(), StrUtil.trim(dto.getDomain()));
|
||||
try {
|
||||
group = server.addGroup(groupName);
|
||||
} catch (Exception var11) {
|
||||
throw new RuntimeException(var12);
|
||||
}
|
||||
}
|
||||
|
||||
this.servers.put(code, server);
|
||||
this.groups.put(code, group);
|
||||
}
|
||||
|
||||
return group;
|
||||
}
|
||||
|
||||
this.servers.put(code, server);
|
||||
this.groups.put(code, group);
|
||||
}
|
||||
|
||||
return group;
|
||||
}
|
||||
}
|
||||
|
||||
public void clearServer(String code) {
|
||||
synchronized(this.buildLock(code)) {
|
||||
try {
|
||||
Server server = (Server)this.servers.get(code);
|
||||
server.disconnect();
|
||||
} catch (Exception var5) {
|
||||
}
|
||||
public void clearServer(String code) {
|
||||
synchronized (this.buildLock(code)) {
|
||||
try {
|
||||
Server server = (Server) this.servers.get(code);
|
||||
server.disconnect();
|
||||
} catch (Exception var5) {
|
||||
}
|
||||
|
||||
this.servers.remove(code);
|
||||
this.groups.remove(code);
|
||||
this.servers.remove(code);
|
||||
this.groups.remove(code);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void writeInteger(String code, ItemValue... values) {
|
||||
try {
|
||||
Group group = this.getServer(code);
|
||||
OpcUtl.writeValue(group, values);
|
||||
} catch (Exception var4) {
|
||||
this.clearServer(code);
|
||||
log.warn("写入出错opc server {} 重新加载", code, var4);
|
||||
ThreadUtl.sleep(5000L);
|
||||
public void writeInteger(String code, ItemValue... values) {
|
||||
try {
|
||||
Group group = this.getServer(code);
|
||||
OpcUtl.writeValue(group, values);
|
||||
} catch (Exception var4) {
|
||||
this.clearServer(code);
|
||||
log.warn("写入出错opc server {} 重新加载", code, var4);
|
||||
ThreadUtl.sleep(5000L);
|
||||
// throw var4;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private String buildLock(String key) {
|
||||
if (StrUtil.isEmpty(key)) {
|
||||
key = "";
|
||||
private String buildLock(String key) {
|
||||
if (StrUtil.isEmpty(key)) {
|
||||
key = "";
|
||||
}
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.append("OpcServerService.");
|
||||
builder.append(key);
|
||||
String lock = builder.toString().intern();
|
||||
return lock;
|
||||
}
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.append("OpcServerService.");
|
||||
builder.append(key);
|
||||
String lock = builder.toString().intern();
|
||||
return lock;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user