From e2ac14719b4520f00ad35af6a51aac1a2322fa4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=8D=E7=BC=96=E8=AF=91=E5=B7=A5=E4=BD=9C=E5=8C=BA?= Date: Fri, 24 Apr 2026 10:35:31 +0800 Subject: [PATCH] Initial commit: five Maven reactors and docs only Track maven-cloudwalk-cloud, maven-cw-elevator-application, maven-intelligent-cwoscomponent, maven-ninca-crk, maven-ninca-qk-alarm, and docs/. Other workspace paths ignored via .gitignore. Made-with: Cursor --- .gitignore | 23 + docs/README.md | 46 + docs/architecture/Maven聚合工程说明.md | 197 ++ docs/build/ORIGINAL_BUILD_JDK.txt | 20 + docs/business/租户访客默认楼层技术产品方案.md | 424 ++++ .../访客注册与派梯楼层业务流程走查.md | 323 +++ .../deploy_cw_elevator_v1_lib_to_nexus.py | 150 ++ docs/style/alibaba-eclipse-codestyle.xml | 603 +++++ .../cloudwalk-cloud-common/pom.xml | 19 + .../cloudwalk-common-event/pom.xml | 73 + .../event/CloudwalkEventInitializing.java | 361 +++ .../event/CloudwalkEventManager.java | 76 + .../cloudwalk/event/EnableCloudwalkEvent.java | 18 + .../event/annotation/ConsumerGroup.java | 18 + .../event/annotation/CustomTopic.java | 26 + .../event/annotation/EventTopicSuffix.java | 24 + .../event/autoconfig/EventConfiguration.java | 22 + .../event/autoconfig/EventProperties.java | 93 + .../event/client/EventSubscribeHandlers.java | 35 + .../event/handler/CustomEventHandler.java | 4 + .../cloudwalk/event/handler/EventHandler.java | 5 + .../event/handler/EventHandlerMapping.java | 74 + .../event/handler/EventHandlerWorker.java | 22 + .../event/handler/NamedThreadFactory.java | 36 + .../listener/CloudwalkEventListener.java | 3 + .../event/listener/GroupEventListener.java | 24 + .../listener/GroupListnerClassMapping.java | 26 + .../java/cn/cloudwalk/event/package-info.java | 7 + .../cloudwalk/event/task/EventHandleTask.java | 35 + .../src/main/resources/META-INF/MANIFEST.MF | 6 + .../spring-configuration-metadata.json | 58 + .../cloudwalk-common-service/pom.xml | 64 + .../aop/CloudwalkParamsValidateAspect.java | 79 + .../service/config/ValidatorConfig.java | 31 + .../cn/cloudwalk/service/package-info.java | 6 + .../src/main/resources/META-INF/MANIFEST.MF | 6 + maven-cloudwalk-cloud/pom.xml | 150 ++ .../cw-elevator-application-common/pom.xml | 92 + .../elevator/annontation/DavinciPic.java | 15 + .../elevator/cache/CacheOverrideConfig.java | 49 + .../elevator/config/AcsConstants.java | 13 + .../elevator/config/AcsLockConstants.java | 11 + .../elevator/config/ElevatorCwosConfig.java | 18 + .../cloudwalk/elevator/config/ErrorCode.java | 457 ++++ .../elevator/config/FeignRemoteConfig.java | 17 + .../elevator/config/FeignThreadLocalUtil.java | 79 + .../elevator/config/ImageStoreConstants.java | 65 + .../context/CloudWalkExtendContextValue.java | 22 + .../elevator/em/AcsApplicationSourceEnum.java | 30 + .../em/AcsDeviceIdentifyTypeEnum.java | 30 + .../elevator/em/AcsDeviceQueryTypeEnum.java | 30 + .../elevator/em/AcsDeviceSettingEnum.java | 59 + .../elevator/em/AcsOpenDoorStatusEnum.java | 30 + .../elevator/em/AcsOperateStatusEnum.java | 30 + .../elevator/em/AcsOperateTypeEnum.java | 30 + .../elevator/em/AcsPassTypeEnum.java | 30 + .../elevator/em/AlarmStateCodeEnum.java | 55 + .../elevator/em/CompareTypeEnum.java | 31 + .../elevator/em/EngineAddressEnum.java | 70 + .../elevator/em/OpenDoorTypeEnum.java | 41 + .../cloudwalk/elevator/em/YesNoTypeEnum.java | 30 + .../cn/cloudwalk/elevator/package-info.java | 7 + .../elevator/util/AcsCacheKeyUtil.java | 19 + .../elevator/util/CollectionUtils.java | 806 +++++++ .../elevator/util/CommunityConstants.java | 114 + .../cn/cloudwalk/elevator/util/DateUtils.java | 436 ++++ .../cn/cloudwalk/elevator/util/JsonUtils.java | 74 + .../elevator/util/RestTemplateUtil.java | 163 ++ .../elevator/util/StartTimeAndEndTime.java | 37 + .../cloudwalk/elevator/util/StringUtils.java | 2095 +++++++++++++++++ .../cn/cloudwalk/elevator/util/ToolUtil.java | 19 + .../src/main/resources/META-INF/MANIFEST.MF | 12 + .../cw-elevator-application-data/pom.xml | 91 + .../elevator/YearlyShardingAlgorithm.java | 51 + .../dao/AcsElevatorCodeDao.java | 15 + .../dto/AcsElevatorCodeDTO.java | 43 + .../dto/AcsElevatorCodeQueryDTO.java | 58 + .../dto/AcsElevatorCodeResultDTO.java | 31 + .../impl/AcsElevatorCodeDaoImpl.java | 31 + .../mapper/AcsElevatorCodeMapper.java | 14 + .../mapper/AcsElevatorCodeMapper.xml | 50 + .../elevator/device/dao/AcsDeviceTaskDao.java | 14 + .../device/dao/AcsElevatorDeviceDao.java | 46 + .../device/dao/DeviceImageStoreDao.java | 9 + .../device/dto/AcsDeviceQueryDTO.java | 98 + .../device/dto/AcsDeviceResultDTO.java | 71 + .../device/dto/AcsDeviceTaskAddDto.java | 35 + .../elevator/device/dto/AcsDeviceTaskDTO.java | 43 + .../device/dto/AcsElevatorDeviceAddDTO.java | 151 ++ .../device/dto/AcsElevatorDeviceEditDTO.java | 77 + .../AcsElevatorDeviceListByBuildingIdDto.java | 58 + .../device/dto/AcsElevatorDeviceListDto.java | 35 + .../dto/AcsElevatorDeviceListResultDto.java | 208 ++ .../dto/AcsElevatorDeviceQueryByIdDTO.java | 16 + .../device/dto/AcsElevatorDeviceQueryDTO.java | 99 + .../dto/AcsElevatorDeviceQueryFoDTO.java | 235 ++ .../dto/AcsElevatorDeviceQueryResultDTO.java | 30 + .../dto/AcsElevatorDeviceResultDTO.java | 323 +++ .../device/impl/AcsDeviceTaskDaoImpl.java | 30 + .../device/impl/AcsElevatorDeviceDaoImpl.java | 121 + .../device/impl/DeviceImageStoreDaoImpl.java | 21 + .../device/mapper/AcsDeviceTaskMapper.java | 14 + .../device/mapper/AcsDeviceTaskMapper.xml | 45 + .../mapper/AcsElevatorDeviceMapper.java | 37 + .../device/mapper/AcsElevatorDeviceMapper.xml | 273 +++ .../device/mapper/DeviceImageStoreMapper.java | 9 + .../device/mapper/DeviceImageStoreMapper.xml | 17 + .../elevator/device/package-info.java | 6 + .../elevator/passrule/dao/AcsPassRuleDao.java | 32 + .../passrule/dao/ImageRuleRefDao.java | 77 + .../passrule/dto/AcsPassRuleAddDto.java | 98 + .../passrule/dto/AcsPassRuleDeleteDto.java | 62 + .../passrule/dto/AcsPassRuleEditDto.java | 71 + .../passrule/dto/AcsPassRuleImageDto.java | 54 + .../dto/AcsPassRuleImageResultDto.java | 31 + .../passrule/dto/AcsPassRuleIsDefaultDto.java | 26 + .../dto/AcsPassRuleLabelResultDto.java | 31 + .../dto/AcsPassRulePersonListDto.java | 44 + .../dto/AcsPassRulePersonListResultDto.java | 24 + .../passrule/dto/AcsPassRuleQueryDto.java | 71 + .../passrule/dto/AcsPassRuleResultDto.java | 98 + .../passrule/dto/ImageRuleRefAddDto.java | 222 ++ .../passrule/dto/ImageRuleRefListResult.java | 151 ++ .../passrule/dto/ImageRuleRefResultDto.java | 143 ++ .../passrule/impl/AcsPassRuleDaoImpl.java | 76 + .../passrule/impl/ImageRuleRefDaoImpl.java | 145 ++ .../passrule/mapper/AcsPassRuleMapper.java | 25 + .../passrule/mapper/ImageRuleRefMapper.java | 72 + .../record/dao/AcsElevatorRecordDao.java | 39 + .../elevator/record/dao/AcsPersonInfoDao.java | 3 + .../record/dao/AcsRecogRecordDao.java | 15 + .../record/dao/SendRecordTimeDao.java | 14 + ...ElevatorAnalyseCycleBusinessResultDTO.java | 27 + .../AcsElevatorPageRequestInfoResultDTO.java | 33 + .../record/dto/AcsElevatorQueryCountDTO.java | 49 + .../record/dto/AcsElevatorRecordAddDTO.java | 255 ++ .../dto/AcsElevatorRecordDetailQueryDTO.java | 151 ++ ...AcsElevatorRecordDetailQueryResultDTO.java | 378 +++ .../record/dto/AcsElevatorRecordExtraDTO.java | 46 + .../dto/AcsElevatorRecordQueryResultDTO.java | 256 ++ .../record/dto/AcsOpenDoorRecordEditDTO.java | 144 ++ .../record/dto/AcsOpenDoorRecordQueryDTO.java | 61 + .../record/dto/AcsPersonInfoResultDTO.java | 24 + .../record/dto/AcsRecogRecordAddDTO.java | 332 +++ .../record/dto/AcsRecogRecordPageDTO.java | 97 + .../record/dto/AcsRecogRecordResultDTO.java | 377 +++ .../dto/AcsRecordDetailQueryResultDTO.java | 244 ++ .../dto/AcsRecordThreeSendQueryDTO.java | 34 + .../record/dto/SendRecordTimeAddDTO.java | 24 + .../record/dto/SendRecordTimeEditDTO.java | 24 + .../record/dto/SendRecordTimeResultDTO.java | 24 + .../record/impl/AcsElevatorRecordDaoImpl.java | 113 + .../record/impl/AcsRecogRecordDaoImpl.java | 47 + .../record/impl/SendRecordTimeDaoImpl.java | 46 + .../mapper/AcsElevatorRecordMapper.java | 40 + .../record/mapper/AcsElevatorRecordMapper.xml | 423 ++++ .../record/mapper/AcsPassRuleMapper.xml | 126 + .../record/mapper/AcsRecogRecordMapper.java | 14 + .../record/mapper/AcsRecogRecordMapper.xml | 149 ++ .../record/mapper/ImageRuleRefMapper.xml | 350 +++ .../record/mapper/SendRecordTimeMapper.java | 14 + .../record/mapper/SendRecordTimeMapper.xml | 32 + .../src/main/resources/META-INF/MANIFEST.MF | 12 + .../cw-elevator-application-service/pom.xml | 82 + .../elevator/AcsFeignConfiguration.java | 68 + .../AcsAreaTreeCacheableService.java | 23 + .../impl/AcsElevatorCodeServiceImpl.java | 49 + .../param/AcsElevatorCodeParam.java | 43 + .../result/AcsElevatorCodeResult.java | 31 + .../service/AcsElevatorCodeService.java | 15 + .../common/AbstractAcsDeviceService.java | 40 + .../common/AbstractCloudwalkService.java | 39 + .../common/AcsApplicationServiceImpl.java | 41 + .../common/UpdateFloorsPoolProperties.java | 54 + .../common/UpdateFloorsTaskExecutor.java | 26 + .../elevator/common/package-info.java | 6 + .../common/service/AcsApplicationService.java | 7 + .../device/impl/AcsDeviceTaskServiceImpl.java | 127 + .../impl/AcsElevatorDeviceServiceImpl.java | 929 ++++++++ .../device/param/AcsDeviceQueryParam.java | 34 + .../param/AcsDeviceRestructureTaskParam.java | 43 + .../param/AcsElevatorDeviceAddParam.java | 157 ++ .../param/AcsElevatorDeviceEditParam.java | 123 + .../param/AcsElevatorDeviceListParam.java | 27 + .../AcsElevatorDeviceQueryByIdParam.java | 16 + .../param/AcsElevatorDeviceQueryParam.java | 91 + .../param/AcsRestructureBindingParam.java | 143 ++ .../param/AcsRestructureQueryParam.java | 116 + .../device/result/AcsDeviceNewResult.java | 178 ++ .../result/AcsDeviceRestructureResult.java | 99 + .../result/AcsElevatorDeviceListResult.java | 208 ++ .../result/AcsElevatorDeviceResult.java | 115 + .../device/result/AcsLabelElevatorResult.java | 58 + .../device/result/KeyValueResult.java | 68 + .../device/service/AcsDeviceTaskService.java | 13 + .../service/AcsElevatorDeviceService.java | 74 + ...AcsDeviceImageStoreAppBindServiceImpl.java | 160 ++ .../impl/AcsDeviceSettingServiceImpl.java | 74 + .../AcsDeviceTemperatureSettingParam.java | 17 + .../param/DeviceImageStoreAppBindParam.java | 34 + .../param/DeviceImageStoreAppUnbindParam.java | 42 + .../result/AcsDeviceSettingResult.java | 26 + .../device/setting/result/AcsSettingAttr.java | 61 + .../AcsDeviceImageStoreAppBindService.java | 26 + .../service/AcsDeviceSettingService.java | 13 + .../AcsDownloadCenterService.java | 12 + .../impl/AcsDownloadCenterServiceImpl.java | 81 + .../param/AcsFileFinishParam.java | 61 + .../export/AcsAbstractExportAsyncService.java | 539 +++++ .../elevator/export/AcsFileStatusEnum.java | 31 + .../elevator/export/ExcelAttribute.java | 24 + .../elevator/export/ExcelCallback.java | 9 + .../impl/ElevatorDeviceExportService.java | 72 + .../ElevatorDeviceRecordExcelResult.java | 200 ++ .../elevator/export/utils/ExcelUtil.java | 476 ++++ .../elevator/export/utils/FolderUtils.java | 37 + .../elevator/mqtt/client/MqttFeignClient.java | 16 + .../fallback/MqttFeignClientFallback.java | 14 + .../elevator/mqtt/impl/MqttServiceImpl.java | 75 + .../param/AcsElevatorRecordMqttParam.java | 78 + .../mqtt/param/MqttSendMessageParam.java | 56 + .../elevator/mqtt/service/MqttService.java | 8 + .../passrule/impl/AbstractAcsPassService.java | 63 + .../passrule/impl/AcsPassRuleServiceImpl.java | 477 ++++ .../impl/ImageRuleRefServiceImpl.java | 779 ++++++ .../param/AcsPassRuleDeleteParam.java | 37 + .../passrule/param/AcsPassRuleEditParam.java | 112 + .../passrule/param/AcsPassRuleFloorParam.java | 17 + .../passrule/param/AcsPassRuleImageParam.java | 53 + .../param/AcsPassRuleIsDefaultParam.java | 16 + .../passrule/param/AcsPassRuleNewParam.java | 102 + .../param/AcsPassRulePersonListParam.java | 18 + .../passrule/param/AcsPassRuleQueryParam.java | 61 + .../passrule/param/AcsPassTimeAddParam.java | 48 + .../passrule/param/AcsPassTimeCycleParam.java | 26 + .../param/AcsPassTimeDeleteParam.java | 19 + .../passrule/param/AcsPassTimeEditParam.java | 58 + .../passrule/param/AcsPassTimeParam.java | 25 + .../passrule/param/AcsPassTimeQueryParam.java | 18 + .../result/AcsPassRuleDetailResult.java | 136 ++ .../result/AcsPassRuleFloorResult.java | 101 + .../passrule/result/AcsPassRuleResult.java | 155 ++ .../result/ImageRuleRefDetailResult.java | 136 ++ .../result/ImageRuleRefPageResult.java | 154 ++ .../passrule/service/AcsPassRuleService.java | 49 + .../passrule/service/ImageRuleRefService.java | 49 + .../person/impl/AcsPersonServiceImpl.java | 547 +++++ .../person/impl/PersonRuleServiceImpl.java | 542 +++++ .../person/param/AcsPersonAddNewParam.java | 47 + .../person/param/AcsPersonAddParam.java | 64 + .../param/AcsPersonAddVisitorParam.java | 105 + .../person/param/AcsPersonCheckTimeParam.java | 35 + .../person/param/AcsPersonDeleteParam.java | 57 + .../person/param/AcsPersonDetailParam.java | 27 + .../person/param/AcsPersonEditParam.java | 55 + .../person/param/AcsPersonFaceParam.java | 28 + .../param/AcsPersonPropertiesParam.java | 487 ++++ .../param/AcsPersonQueryByAppParam.java | 37 + .../person/param/AcsPersonQueryParam.java | 198 ++ .../param/AcsPersonTimeDetailParam.java | 27 + .../person/param/PersonDetailQueryParam.java | 87 + .../elevator/person/result/AcsAppResult.java | 35 + .../result/AcsImageStoreStatisticsResult.java | 34 + .../AcsImagestorePersonStatisticsResult.java | 17 + .../person/result/AcsPersonDetailResult.java | 44 + .../person/result/AcsPersonFaceResult.java | 17 + .../person/result/AcsPersonResult.java | 162 ++ .../result/AcsPersonTimeDetailResult.java | 83 + .../result/AppImageStoreStatisticsResult.java | 53 + .../person/service/AcsPersonService.java | 37 + .../person/service/PersonRuleService.java | 47 + .../impl/AcsElevatorRecordServiceImpl.java | 406 ++++ .../impl/AcsRecogRecordServiceImpl.java | 114 + .../record/impl/PersonFileServiceImpl.java | 72 + .../impl/SendRecordTimeServiceImpl.java | 13 + .../param/AcsElevatorRecordAddParam.java | 167 ++ .../AcsElevatorRecordAnalyseCountParam.java | 36 + .../AcsElevatorRecordAnalyseCycleParam.java | 30 + .../param/AcsElevatorRecordDetailParam.java | 136 ++ .../param/AcsOpenDoorRecordAddParam.java | 122 + .../param/AcsOpenDoorRecordEditParam.java | 104 + .../record/param/AcsRecogRecordAddParam.java | 188 ++ .../record/param/SendRecordSendInfoParam.java | 31 + .../record/param/SendRecordSendParam.java | 15 + .../record/param/SendRecordTokenParam.java | 31 + ...AcsElevatorAnalyseCycleBusinessResult.java | 31 + .../result/AcsElevatorAnalyseCycleResult.java | 24 + .../AcsElevatorPageRequestInfoResult.java | 33 + .../result/AcsElevatorRecordResult.java | 343 +++ .../record/result/SendRecordTokenResult.java | 22 + .../record/result/VisitorRecordPushEvent.java | 201 ++ .../service/AcsElevatorRecordService.java | 39 + .../record/service/AcsRecogRecordService.java | 11 + .../record/service/PersonFileService.java | 10 + .../record/service/SendRecordTimeService.java | 3 + .../storage/AcsFileStorageService.java | 19 + .../impl/AcsFileStorageServiceImpl.java | 117 + .../elevator/task/ElevatorRecordSendTask.java | 142 ++ .../visitor/client/VisitorFeignClient.java | 18 + .../fallback/VisitorFeignClientFallback.java | 15 + .../visitor/param/VisitorGetsParam.java | 26 + .../visitor/param/VisitorRecordQueryForm.java | 13 + .../param/VisitorRecordQueryParam.java | 26 + .../visitor/result/VisitorQueryResult.java | 26 + .../visitor/result/VisitorRecordResult.java | 296 +++ .../visitor/result/VisitorResult.java | 262 +++ .../elevator/zone/client/ZoneFeignClient.java | 24 + .../fallback/ZoneFeignClientFallback.java | 23 + .../elevator/zone/impl/ZoneServiceImpl.java | 33 + .../zone/param/ZoneNextTreeParam.java | 49 + .../elevator/zone/param/ZoneQueryParam.java | 133 ++ .../zone/result/AgImageUploadResult.java | 25 + .../elevator/zone/result/ZoneResult.java | 310 +++ .../elevator/zone/result/ZoneTreeResult.java | 295 +++ .../elevator/zone/service/ZoneService.java | 19 + .../src/main/resources/META-INF/MANIFEST.MF | 12 + .../cw-elevator-application-web/pom.xml | 45 + .../common/AbstractCloudwalkController.java | 77 + .../common/CloudwalkCallNewContext.java | 3 + .../handler/AbstractEventHandler.java | 80 + .../handler/OpenDoorRecordEventHandler.java | 97 + .../handler/PersonRecordEventHandler.java | 83 + .../AcsElevatorDeviceController.java | 285 +++ .../AcsElevatorDeviceGetWayController.java | 226 ++ .../AcsElevatorRestructureController.java | 122 + .../device/controller/FileController.java | 44 + .../device/form/AcsDeviceQueryForm.java | 34 + .../form/AcsDeviceRestructureTaskForm.java | 43 + .../device/form/AcsElevatorCodeForm.java | 43 + .../device/form/AcsElevatorCodeQueryForm.java | 20 + .../device/form/AcsElevatorDeviceAddForm.java | 148 ++ .../form/AcsElevatorDeviceDeleteForm.java | 17 + .../form/AcsElevatorDeviceEditForm.java | 123 + .../form/AcsElevatorDeviceQueryByIdForm.java | 16 + .../form/AcsElevatorDeviceQueryForm.java | 91 + .../device/form/AcsElevatorRecordAddForm.java | 176 ++ .../form/AcsRestructureBindingForm.java | 129 + .../device/form/AcsRestructureQueryForm.java | 116 + .../elevator/handler/package-info.java | 6 + .../controller/AcsPassRuleController.java | 148 ++ .../passrule/form/AcsPassRuleDeleteForm.java | 35 + .../passrule/form/AcsPassRuleEditForm.java | 107 + .../passrule/form/AcsPassRuleFloorForm.java | 17 + .../passrule/form/AcsPassRuleImageForm.java | 53 + .../passrule/form/AcsPassRuleNewForm.java | 89 + .../form/AcsPassRulePersonListForm.java | 18 + .../passrule/form/AcsPassRuleQueryForm.java | 70 + .../controller/AcsPersonController.java | 140 ++ .../person/form/AcsPersonAddForm.java | 53 + .../person/form/AcsPersonAddNewForm.java | 44 + .../person/form/AcsPersonAddVisitorForm.java | 105 + .../person/form/AcsPersonDeleteForm.java | 53 + .../person/form/AcsPersonDetailForm.java | 25 + .../person/form/AcsPersonEditForm.java | 52 + .../person/form/AcsPersonFaceForm.java | 25 + .../person/form/AcsPersonQueryForm.java | 135 ++ .../person/form/AcsPersonTimeDetailForm.java | 25 + .../person/form/PersonDetailQueryForm.java | 87 + .../AcsElevatorRecordController.java | 110 + .../AcsElevatorRecordAnalyseCountForm.java | 33 + .../AcsElevatorRecordAnalyseCycleForm.java | 24 + .../form/AcsElevatorRecordQueryForm.java | 137 ++ .../src/main/resources/META-INF/MANIFEST.MF | 12 + maven-cw-elevator-application/pom.xml | 274 +++ .../pom.xml | 43 + .../account/param/AccountLoginParam.java | 88 + .../account/result/AccountLoginResult.java | 133 ++ .../account/service/AccountLoginService.java | 12 + .../ai/v2/face/param/FaceAddParam.java | 61 + .../ai/v2/face/param/FaceRemoveParam.java | 25 + .../ai/v2/face/service/FaceService.java | 15 + .../v2/feature/param/FeatureExtractParam.java | 25 + .../feature/result/FeatureExtractResult.java | 25 + .../ai/v2/feature/service/FeatureService.java | 12 + .../ai/v2/group/param/GroupAddParam.java | 43 + .../ai/v2/group/param/GroupGetParam.java | 16 + .../ai/v2/group/result/GroupResult.java | 61 + .../ai/v2/group/service/GroupService.java | 16 + .../staticdb/param/SearchMultipleParam.java | 70 + .../ai/v2/staticdb/result/SearchResult.java | 34 + .../ai/v2/staticdb/service/SearchService.java | 11 + .../param/ApplicationImageStoreAddParam.java | 25 + .../param/ApplicationImageStoreDelParam.java | 25 + .../ApplicationImageStoreQueryParam.java | 25 + .../application/param/SceneAppsGetParam.java | 125 + .../result/ApplicationImageStoreResult.java | 43 + .../application/result/SceneAppsResult.java | 79 + .../service/ApplicationImageStoreService.java | 22 + .../service/ApplicationService.java | 13 + .../biology/param/FeatureExtractParam.java | 25 + .../biology/param/FeatureQueryParam.java | 53 + .../biology/result/FeatureExtractResult.java | 52 + .../biology/result/FeatureQueryResult.java | 88 + .../biology/service/BiologyToolService.java | 22 + .../device/param/DeviceApplicationParam.java | 25 + .../param/DeviceApplicationQueryParam.java | 25 + .../device/param/DeviceAreaDeleteParam.java | 25 + .../param/DeviceAreaQueryDeviceParam.java | 25 + .../device/param/DeviceAreaQueryParam.java | 62 + .../device/param/DeviceDeleteParam.java | 17 + .../param/DeviceDistrictQueryParam.java | 71 + .../device/param/DeviceImageStoreParam.java | 25 + .../param/DeviceImageStoreQueryParam.java | 25 + .../param/DeviceImageStoreSaveParam.java | 26 + .../device/param/DeviceQueryParam.java | 216 ++ .../device/param/DeviceSettingInitParam.java | 17 + .../param/DeviceSettingNotifyParam.java | 98 + .../device/param/DeviceSettingQueryParam.java | 26 + .../device/param/DeviceTypeQueryParam.java | 16 + .../param/EntranceGuardControlParam.java | 59 + .../result/DeviceApplicationResult.java | 52 + .../device/result/DeviceAreaResult.java | 70 + .../device/result/DeviceDistrictResult.java | 70 + .../device/result/DeviceImageStoreResult.java | 43 + .../device/result/DeviceResult.java | 322 +++ .../result/DeviceSettingInitResult.java | 102 + .../result/DeviceSettingNotifyResult.java | 34 + .../device/result/DeviceSettingResult.java | 102 + .../device/result/DeviceStatusResult.java | 48 + .../device/result/DeviceTypeResult.java | 75 + .../result/EntranceGuardControlResult.java | 34 + .../service/DeviceApplicationService.java | 20 + .../device/service/DeviceAreaService.java | 15 + .../device/service/DeviceDistrictService.java | 12 + .../service/DeviceImageStoreService.java | 29 + .../device/service/DeviceKitService.java | 12 + .../device/service/DeviceNotifyService.java | 16 + .../device/service/DeviceService.java | 28 + .../device/service/DeviceSettingService.java | 17 + .../device/service/DeviceTypeService.java | 11 + .../param/AcsPersonAddVisitorParam.java | 53 + .../service/ElevatorPersonService.java | 11 + .../email/param/EmailSendParam.java | 43 + .../email/service/EmailSendService.java | 11 + .../file/param/FileFinishParam.java | 58 + .../intelligent/file/param/FileGetParam.java | 13 + .../intelligent/file/param/FileInitParam.java | 22 + .../intelligent/file/result/FileDetail.java | 175 ++ .../intelligent/file/service/FileService.java | 20 + .../param/DevicePersonResyncParam.java | 31 + .../param/DevicePersonResyncRequestParam.java | 15 + .../imagestore/param/ImageStoreAddParam.java | 125 + .../imagestore/param/ImageStoreDelParam.java | 25 + .../imagestore/param/ImageStoreEditParam.java | 116 + .../param/ImageStorePersonBindParam.java | 71 + .../param/ImageStorePersonData.java | 44 + .../param/ImageStorePersonDelParam.java | 25 + .../param/ImageStorePersonQueryParam.java | 125 + .../param/ImageStorePersonSaveParam.java | 70 + .../param/ImageStoreQueryParam.java | 125 + .../param/QueryDevicePersonSyncLogParam.java | 51 + .../param/QueryDevicePersonSyncParam.java | 33 + .../param/UpdateGroupPersonRefParam.java | 51 + .../result/DeviceImageStoreReSyncResult.java | 35 + .../result/DevicePersonResyncResult.java | 40 + .../result/DevicePersonSyncDetailResult.java | 42 + .../result/DevicePersonSyncLogResult.java | 121 + .../result/DevicePersonSyncResult.java | 51 + .../result/ImageStoreDetailResult.java | 136 ++ .../result/ImageStoreListResult.java | 194 ++ .../result/ImageStorePersonResult.java | 134 ++ .../result/ImageStorePersonSaveResult.java | 70 + .../imagestore/result/ImageStoreResult.java | 152 ++ .../result/ImgStoreBatchBindPersonResult.java | 26 + .../result/ImgStorePersonResult.java | 152 ++ .../service/DeviceImageStoreSyncService.java | 43 + .../service/ImageStorePersonService.java | 35 + .../imagestore/service/ImageStoreService.java | 34 + .../label/param/LabelAddParam.java | 34 + .../label/param/LabelDetailParam.java | 34 + .../label/param/LabelGroupDelParam.java | 22 + .../label/param/LabelGroupEditParam.java | 61 + .../label/param/LabelPersonAddParam.java | 31 + .../label/param/LabelPersonDelParam.java | 31 + .../label/param/LabelQueryParam.java | 16 + .../label/result/LabelDetailResult.java | 34 + .../intelligent/label/result/LabelResult.java | 88 + .../label/service/LabelService.java | 37 + .../message/param/GetShortUrlParam.java | 15 + .../message/param/SmsSendParam.java | 66 + .../message/result/ShotUrlResult.java | 15 + .../message/service/SmsSendService.java | 16 + .../param/OrganizationAddParam.java | 322 +++ .../param/OrganizationDeleteParam.java | 17 + .../param/OrganizationDetailQueryParam.java | 16 + .../param/OrganizationEditParam.java | 98 + .../param/OrganizationListParam.java | 80 + .../param/OrganizationQueryParam.java | 5 + .../param/OrganizationTreeParam.java | 34 + .../organization/param/RentUpdateParam.java | 76 + .../result/OrganizationDetailResult.java | 340 +++ .../result/OrganizationResult.java | 61 + .../result/OrganizationTreeResult.java | 80 + .../service/OrganizationService.java | 44 + .../intelligent/package-info.java | 6 + .../person/param/PersonAddParam.java | 512 ++++ .../person/param/PersonDelParam.java | 17 + .../person/param/PersonDetailParam.java | 25 + .../person/param/PersonEditParam.java | 521 ++++ .../person/param/PersonImportParam.java | 16 + .../person/param/PersonQueryParam.java | 116 + .../result/AcsPassRuleImageResultDto.java | 31 + .../person/result/PersonResult.java | 251 ++ .../person/service/PersonService.java | 37 + .../record/param/AcsRecordThreeSendParam.java | 26 + .../result/AcsRecordThreeSendResult.java | 269 +++ .../service/AcsRecordThreeSendService.java | 12 + .../resource/param/RoleAddParam.java | 89 + .../resource/param/RoleDeltParam.java | 16 + .../resource/param/RoleEditParam.java | 98 + .../resource/param/RoleGetsParam.java | 17 + .../resource/param/RoleResourceAddParam.java | 26 + .../resource/param/RoleResourceDelParam.java | 26 + .../param/RoleResourceQueryParam.java | 16 + .../param/ValidateLoginTokenParam.java | 33 + .../resource/result/RoleDetailResult.java | 142 ++ .../resource/result/RoleResourceResult.java | 70 + .../result/ValidateLoginTokenResult.java | 79 + .../resource/service/LoginService.java | 11 + .../resource/service/RoleService.java | 38 + .../sysetting/param/DeviceAreaTreeParam.java | 16 + .../sysetting/result/AreaTreeResult.java | 80 + .../service/SysettingAreaService.java | 12 + .../user/param/UserChangePwdParam.java | 24 + .../user/param/UserDetailParam.java | 25 + .../user/param/UserQueryParam.java | 89 + .../user/result/UserAcountDetailResult.java | 116 + .../user/result/UserDetailResult.java | 295 +++ .../intelligent/user/service/UserService.java | 25 + .../src/main/resources/META-INF/MANIFEST.MF | 6 + .../intelligent-cwoscomponent-parent/pom.xml | 19 + .../intelligent-cwoscomponent-rest/pom.xml | 67 + .../feign/AccountLoginFeignClient.java | 17 + .../AccountLoginFeignClientFallback.java | 12 + .../service/RestAccountLoginServiceImpl.java | 25 + .../ai/v2/face/feign/FaceFeignClient.java | 20 + .../fallback/FaceFeignClientFallback.java | 18 + .../v2/face/service/RestFaceServiceImpl.java | 28 + .../v2/feature/feign/FeatureFeignClient.java | 17 + .../fallback/FeatureFeignClientFallback.java | 14 + .../service/RestFeatureServiceImpl.java | 24 + .../ai/v2/group/feign/GroupFeignClient.java | 21 + .../fallback/GroupFeignClientFallback.java | 19 + .../group/service/RestGroupServiceImpl.java | 28 + .../v2/staticdb/feign/SearchFeignClient.java | 18 + .../fallback/SearchFeignClientFallback.java | 15 + .../service/RestSearchServiceImpl.java | 23 + .../feign/ApplicationFeignClient.java | 18 + .../ApplicationImageStoreFeignClient.java | 27 + .../ApplicationFeignClientFallback.java | 15 + ...licationImageStoreFeignClientFallback.java | 25 + .../RestApplicationImageStoreServiceImpl.java | 38 + .../service/RestApplicationServiceImpl.java | 26 + .../biology/feign/BiologyToolFeignClient.java | 27 + .../BiologyToolFeignClientFallback.java | 26 + .../service/RestBiologyToolServiceImpl.java | 38 + .../config/DeviceCategoryProperties.java | 28 + .../feign/DeviceApplicationFeignClient.java | 26 + .../device/feign/DeviceAreaFeignClient.java | 22 + .../feign/DeviceDistrictFeignClient.java | 19 + .../device/feign/DeviceFeignClient.java | 31 + .../feign/DeviceImageStoreFeignClient.java | 35 + .../device/feign/DeviceKitFeignClient.java | 17 + .../device/feign/DeviceNotifyFeignClient.java | 24 + .../feign/DeviceSettingFeignClient.java | 24 + .../device/feign/DeviceTypeFeignClient.java | 18 + .../DeviceApplicationFeignClientFallback.java | 24 + .../DeviceAreaFeignClientFallback.java | 20 + .../DeviceDistrictFeignClientFallback.java | 15 + .../fallback/DeviceFeignClientFallback.java | 30 + .../DeviceImageStoreFeignClientFallback.java | 34 + .../DeviceKitFeignClientFallback.java | 14 + .../DeviceNotifyFeignClientFallback.java | 20 + .../DeviceSettingFeignClientFallback.java | 21 + .../DeviceTypeFeignClientFallback.java | 15 + .../RestDeviceApplicationServiceImpl.java | 37 + .../service/RestDeviceAreaServiceImpl.java | 28 + .../RestDeviceDistrictServiceImpl.java | 23 + .../RestDeviceImageStoreServiceImpl.java | 49 + .../service/RestDeviceKitServiceImpl.java | 24 + .../service/RestDeviceNotifyServiceImpl.java | 30 + .../device/service/RestDeviceServiceImpl.java | 87 + .../service/RestDeviceSettingServiceImpl.java | 30 + .../service/RestDeviceTypeServiceImpl.java | 27 + .../feign/ElevatorPersonFeignClient.java | 16 + .../ElevatorPersonFeignClientFallback.java | 13 + .../RestElevatorPersonServiceImpl.java | 24 + .../email/feign/EmailSendFeign.java | 16 + .../fallback/EmailSendFeignFallback.java | 13 + .../service/RestEmailSendServiceImpl.java | 22 + .../intelligent/file/feign/FileFeign.java | 24 + .../feign/fallback/FileFeignFallback.java | 24 + .../file/service/RestFileServiceImpl.java | 32 + .../DeviceImageStoreSyncFeignClient.java | 49 + .../feign/ImageStoreFeignClient.java | 40 + .../feign/ImageStorePersonFeignClient.java | 43 + ...viceImageStoreSyncFeignClientFallback.java | 45 + .../ImageStoreFeignClientFallback.java | 41 + .../ImageStorePersonFeignClientFallback.java | 41 + .../RestDeviceImageStoreSyncServiceImpl.java | 60 + .../RestImageStorePersonServiceImpl.java | 57 + .../service/RestImageStoreServiceImpl.java | 55 + .../label/feign/LabelFeignClient.java | 42 + .../fallback/LabelFeignClientFallback.java | 45 + .../label/service/RestLabelServiceImpl.java | 60 + .../message/feign/SmsSendFeign.java | 21 + .../feign/fallback/SmsSendFeignFallback.java | 19 + .../service/RestSmsSendServiceImpl.java | 29 + .../feign/OrganizationFeignClient.java | 51 + .../OrganizationFeignClientFallback.java | 53 + .../service/RestOrganizationServiceImpl.java | 71 + .../intelligent/package-info.java | 6 + .../person/feign/PersonFeignClient.java | 42 + .../fallback/PersonFeignClientFallback.java | 45 + .../person/service/RestPersonServiceImpl.java | 58 + .../feign/AcsRecordThreeSendFeignClient.java | 19 + ...AcsRecordThreeSendFeignClientFallback.java | 15 + .../AcsRecordThreeSendServiceImpl.java | 24 + .../resource/feign/LoginFeignClient.java | 18 + .../resource/feign/RoleFeignClient.java | 44 + .../fallback/LoginFeignClientFallback.java | 14 + .../fallback/RoleFeignClientFallback.java | 46 + .../service/RestLoginServiceImpl.java | 23 + .../resource/service/RestRoleServiceImpl.java | 61 + .../feign/SysettingAreaFeignClient.java | 18 + .../SysettingAreaFeignClientFallback.java | 15 + .../service/RestSysettingAreaServiceImpl.java | 23 + .../user/feign/UserFeignClient.java | 31 + .../fallback/UserFeignClientFallback.java | 30 + .../user/service/RestUserServiceImpl.java | 43 + .../src/main/resources/META-INF/MANIFEST.MF | 6 + maven-intelligent-cwoscomponent/pom.xml | 153 ++ maven-ninca-crk/ninca-crk-gpu-std/pom.xml | 162 ++ .../main/java/cn/cloudwalk/Application.java | 39 + .../main/java/cn/cloudwalk/package-info.java | 6 + .../src/main/resources/META-INF/MANIFEST.MF | 9 + .../application-access-control.properties | 68 + ...plication-conference-attendance.properties | 6 + .../application-smart-attendance.properties | 37 + .../application-visitor-management.properties | 26 + .../src/main/resources/application.properties | 136 ++ .../src/main/resources/bootstrap.properties | 14 + .../main/resources/mapper/mybatis-config.xml | 10 + maven-ninca-crk/pom.xml | 156 ++ .../ninca-qk-alarm-app-starter/pom.xml | 103 + .../java/cn/cloudwalk/AlarmApplication.java | 23 + .../main/java/cn/cloudwalk/package-info.java | 6 + .../src/main/resources/META-INF/MANIFEST.MF | 12 + .../src/main/resources/application.properties | 238 ++ .../src/main/resources/bootstrap.properties | 21 + .../src/main/resources/log/logback.xml | 92 + .../src/main/resources/sh/check-restart.sh | 3 + maven-ninca-qk-alarm/pom.xml | 168 ++ 653 files changed, 50372 insertions(+) create mode 100644 .gitignore create mode 100644 docs/README.md create mode 100644 docs/architecture/Maven聚合工程说明.md create mode 100644 docs/build/ORIGINAL_BUILD_JDK.txt create mode 100644 docs/business/租户访客默认楼层技术产品方案.md create mode 100644 docs/business/访客注册与派梯楼层业务流程走查.md create mode 100755 docs/operations/deploy_cw_elevator_v1_lib_to_nexus.py create mode 100644 docs/style/alibaba-eclipse-codestyle.xml create mode 100644 maven-cloudwalk-cloud/cloudwalk-cloud-common/pom.xml create mode 100644 maven-cloudwalk-cloud/cloudwalk-common-event/pom.xml create mode 100644 maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/CloudwalkEventInitializing.java create mode 100644 maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/CloudwalkEventManager.java create mode 100644 maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/EnableCloudwalkEvent.java create mode 100644 maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/annotation/ConsumerGroup.java create mode 100644 maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/annotation/CustomTopic.java create mode 100644 maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/annotation/EventTopicSuffix.java create mode 100644 maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/autoconfig/EventConfiguration.java create mode 100644 maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/autoconfig/EventProperties.java create mode 100644 maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/client/EventSubscribeHandlers.java create mode 100644 maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/handler/CustomEventHandler.java create mode 100644 maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/handler/EventHandler.java create mode 100644 maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/handler/EventHandlerMapping.java create mode 100644 maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/handler/EventHandlerWorker.java create mode 100644 maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/handler/NamedThreadFactory.java create mode 100644 maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/listener/CloudwalkEventListener.java create mode 100644 maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/listener/GroupEventListener.java create mode 100644 maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/listener/GroupListnerClassMapping.java create mode 100644 maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/package-info.java create mode 100644 maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/task/EventHandleTask.java create mode 100644 maven-cloudwalk-cloud/cloudwalk-common-event/src/main/resources/META-INF/MANIFEST.MF create mode 100644 maven-cloudwalk-cloud/cloudwalk-common-event/src/main/resources/META-INF/spring-configuration-metadata.json create mode 100644 maven-cloudwalk-cloud/cloudwalk-common-service/pom.xml create mode 100644 maven-cloudwalk-cloud/cloudwalk-common-service/src/main/java/cn/cloudwalk/service/aop/CloudwalkParamsValidateAspect.java create mode 100644 maven-cloudwalk-cloud/cloudwalk-common-service/src/main/java/cn/cloudwalk/service/config/ValidatorConfig.java create mode 100644 maven-cloudwalk-cloud/cloudwalk-common-service/src/main/java/cn/cloudwalk/service/package-info.java create mode 100644 maven-cloudwalk-cloud/cloudwalk-common-service/src/main/resources/META-INF/MANIFEST.MF create mode 100644 maven-cloudwalk-cloud/pom.xml create mode 100644 maven-cw-elevator-application/cw-elevator-application-common/pom.xml create mode 100644 maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/annontation/DavinciPic.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/cache/CacheOverrideConfig.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/config/AcsConstants.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/config/AcsLockConstants.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/config/ElevatorCwosConfig.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/config/ErrorCode.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/config/FeignRemoteConfig.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/config/FeignThreadLocalUtil.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/config/ImageStoreConstants.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/context/CloudWalkExtendContextValue.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/em/AcsApplicationSourceEnum.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/em/AcsDeviceIdentifyTypeEnum.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/em/AcsDeviceQueryTypeEnum.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/em/AcsDeviceSettingEnum.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/em/AcsOpenDoorStatusEnum.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/em/AcsOperateStatusEnum.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/em/AcsOperateTypeEnum.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/em/AcsPassTypeEnum.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/em/AlarmStateCodeEnum.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/em/CompareTypeEnum.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/em/EngineAddressEnum.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/em/OpenDoorTypeEnum.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/em/YesNoTypeEnum.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/package-info.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/util/AcsCacheKeyUtil.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/util/CollectionUtils.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/util/CommunityConstants.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/util/DateUtils.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/util/JsonUtils.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/util/RestTemplateUtil.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/util/StartTimeAndEndTime.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/util/StringUtils.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/util/ToolUtil.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-common/src/main/resources/META-INF/MANIFEST.MF create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/pom.xml create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/YearlyShardingAlgorithm.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/codeElevatorArea/dao/AcsElevatorCodeDao.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/codeElevatorArea/dto/AcsElevatorCodeDTO.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/codeElevatorArea/dto/AcsElevatorCodeQueryDTO.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/codeElevatorArea/dto/AcsElevatorCodeResultDTO.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/codeElevatorArea/impl/AcsElevatorCodeDaoImpl.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/codeElevatorArea/mapper/AcsElevatorCodeMapper.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/codeElevatorArea/mapper/AcsElevatorCodeMapper.xml create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dao/AcsDeviceTaskDao.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dao/AcsElevatorDeviceDao.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dao/DeviceImageStoreDao.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dto/AcsDeviceQueryDTO.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dto/AcsDeviceResultDTO.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dto/AcsDeviceTaskAddDto.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dto/AcsDeviceTaskDTO.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dto/AcsElevatorDeviceAddDTO.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dto/AcsElevatorDeviceEditDTO.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dto/AcsElevatorDeviceListByBuildingIdDto.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dto/AcsElevatorDeviceListDto.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dto/AcsElevatorDeviceListResultDto.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dto/AcsElevatorDeviceQueryByIdDTO.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dto/AcsElevatorDeviceQueryDTO.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dto/AcsElevatorDeviceQueryFoDTO.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dto/AcsElevatorDeviceQueryResultDTO.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dto/AcsElevatorDeviceResultDTO.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/impl/AcsDeviceTaskDaoImpl.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/impl/AcsElevatorDeviceDaoImpl.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/impl/DeviceImageStoreDaoImpl.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/mapper/AcsDeviceTaskMapper.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/mapper/AcsDeviceTaskMapper.xml create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/mapper/AcsElevatorDeviceMapper.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/mapper/AcsElevatorDeviceMapper.xml create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/mapper/DeviceImageStoreMapper.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/mapper/DeviceImageStoreMapper.xml create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/package-info.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dao/AcsPassRuleDao.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dao/ImageRuleRefDao.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dto/AcsPassRuleAddDto.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dto/AcsPassRuleDeleteDto.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dto/AcsPassRuleEditDto.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dto/AcsPassRuleImageDto.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dto/AcsPassRuleImageResultDto.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dto/AcsPassRuleIsDefaultDto.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dto/AcsPassRuleLabelResultDto.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dto/AcsPassRulePersonListDto.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dto/AcsPassRulePersonListResultDto.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dto/AcsPassRuleQueryDto.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dto/AcsPassRuleResultDto.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dto/ImageRuleRefAddDto.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dto/ImageRuleRefListResult.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dto/ImageRuleRefResultDto.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/impl/AcsPassRuleDaoImpl.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/impl/ImageRuleRefDaoImpl.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/mapper/AcsPassRuleMapper.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/mapper/ImageRuleRefMapper.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dao/AcsElevatorRecordDao.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dao/AcsPersonInfoDao.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dao/AcsRecogRecordDao.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dao/SendRecordTimeDao.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsElevatorAnalyseCycleBusinessResultDTO.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsElevatorPageRequestInfoResultDTO.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsElevatorQueryCountDTO.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsElevatorRecordAddDTO.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsElevatorRecordDetailQueryDTO.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsElevatorRecordDetailQueryResultDTO.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsElevatorRecordExtraDTO.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsElevatorRecordQueryResultDTO.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsOpenDoorRecordEditDTO.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsOpenDoorRecordQueryDTO.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsPersonInfoResultDTO.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsRecogRecordAddDTO.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsRecogRecordPageDTO.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsRecogRecordResultDTO.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsRecordDetailQueryResultDTO.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsRecordThreeSendQueryDTO.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/SendRecordTimeAddDTO.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/SendRecordTimeEditDTO.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/SendRecordTimeResultDTO.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/impl/AcsElevatorRecordDaoImpl.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/impl/AcsRecogRecordDaoImpl.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/impl/SendRecordTimeDaoImpl.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/mapper/AcsElevatorRecordMapper.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/mapper/AcsElevatorRecordMapper.xml create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/mapper/AcsPassRuleMapper.xml create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/mapper/AcsRecogRecordMapper.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/mapper/AcsRecogRecordMapper.xml create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/mapper/ImageRuleRefMapper.xml create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/mapper/SendRecordTimeMapper.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/mapper/SendRecordTimeMapper.xml create mode 100644 maven-cw-elevator-application/cw-elevator-application-data/src/main/resources/META-INF/MANIFEST.MF create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/pom.xml create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/AcsFeignConfiguration.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/cacheable/AcsAreaTreeCacheableService.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/codeElevatorArea/impl/AcsElevatorCodeServiceImpl.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/codeElevatorArea/param/AcsElevatorCodeParam.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/codeElevatorArea/result/AcsElevatorCodeResult.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/codeElevatorArea/service/AcsElevatorCodeService.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/common/AbstractAcsDeviceService.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/common/AbstractCloudwalkService.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/common/AcsApplicationServiceImpl.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/common/UpdateFloorsPoolProperties.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/common/UpdateFloorsTaskExecutor.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/common/package-info.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/common/service/AcsApplicationService.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/impl/AcsDeviceTaskServiceImpl.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/impl/AcsElevatorDeviceServiceImpl.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/param/AcsDeviceQueryParam.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/param/AcsDeviceRestructureTaskParam.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/param/AcsElevatorDeviceAddParam.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/param/AcsElevatorDeviceEditParam.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/param/AcsElevatorDeviceListParam.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/param/AcsElevatorDeviceQueryByIdParam.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/param/AcsElevatorDeviceQueryParam.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/param/AcsRestructureBindingParam.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/param/AcsRestructureQueryParam.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/result/AcsDeviceNewResult.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/result/AcsDeviceRestructureResult.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/result/AcsElevatorDeviceListResult.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/result/AcsElevatorDeviceResult.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/result/AcsLabelElevatorResult.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/result/KeyValueResult.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/service/AcsDeviceTaskService.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/service/AcsElevatorDeviceService.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/setting/impl/AcsDeviceImageStoreAppBindServiceImpl.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/setting/impl/AcsDeviceSettingServiceImpl.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/setting/param/AcsDeviceTemperatureSettingParam.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/setting/param/DeviceImageStoreAppBindParam.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/setting/param/DeviceImageStoreAppUnbindParam.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/setting/result/AcsDeviceSettingResult.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/setting/result/AcsSettingAttr.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/setting/service/AcsDeviceImageStoreAppBindService.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/setting/service/AcsDeviceSettingService.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/downloadcenter/AcsDownloadCenterService.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/downloadcenter/impl/AcsDownloadCenterServiceImpl.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/downloadcenter/param/AcsFileFinishParam.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/export/AcsAbstractExportAsyncService.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/export/AcsFileStatusEnum.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/export/ExcelAttribute.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/export/ExcelCallback.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/export/impl/ElevatorDeviceExportService.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/export/result/ElevatorDeviceRecordExcelResult.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/export/utils/ExcelUtil.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/export/utils/FolderUtils.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/mqtt/client/MqttFeignClient.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/mqtt/fallback/MqttFeignClientFallback.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/mqtt/impl/MqttServiceImpl.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/mqtt/param/AcsElevatorRecordMqttParam.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/mqtt/param/MqttSendMessageParam.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/mqtt/service/MqttService.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/impl/AbstractAcsPassService.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/impl/AcsPassRuleServiceImpl.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/impl/ImageRuleRefServiceImpl.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/param/AcsPassRuleDeleteParam.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/param/AcsPassRuleEditParam.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/param/AcsPassRuleFloorParam.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/param/AcsPassRuleImageParam.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/param/AcsPassRuleIsDefaultParam.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/param/AcsPassRuleNewParam.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/param/AcsPassRulePersonListParam.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/param/AcsPassRuleQueryParam.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/param/AcsPassTimeAddParam.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/param/AcsPassTimeCycleParam.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/param/AcsPassTimeDeleteParam.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/param/AcsPassTimeEditParam.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/param/AcsPassTimeParam.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/param/AcsPassTimeQueryParam.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/result/AcsPassRuleDetailResult.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/result/AcsPassRuleFloorResult.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/result/AcsPassRuleResult.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/result/ImageRuleRefDetailResult.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/result/ImageRuleRefPageResult.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/service/AcsPassRuleService.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/service/ImageRuleRefService.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/impl/AcsPersonServiceImpl.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/impl/PersonRuleServiceImpl.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/AcsPersonAddNewParam.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/AcsPersonAddParam.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/AcsPersonAddVisitorParam.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/AcsPersonCheckTimeParam.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/AcsPersonDeleteParam.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/AcsPersonDetailParam.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/AcsPersonEditParam.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/AcsPersonFaceParam.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/AcsPersonPropertiesParam.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/AcsPersonQueryByAppParam.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/AcsPersonQueryParam.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/AcsPersonTimeDetailParam.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/PersonDetailQueryParam.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/result/AcsAppResult.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/result/AcsImageStoreStatisticsResult.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/result/AcsImagestorePersonStatisticsResult.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/result/AcsPersonDetailResult.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/result/AcsPersonFaceResult.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/result/AcsPersonResult.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/result/AcsPersonTimeDetailResult.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/result/AppImageStoreStatisticsResult.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/service/AcsPersonService.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/service/PersonRuleService.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/impl/AcsElevatorRecordServiceImpl.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/impl/AcsRecogRecordServiceImpl.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/impl/PersonFileServiceImpl.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/impl/SendRecordTimeServiceImpl.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/param/AcsElevatorRecordAddParam.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/param/AcsElevatorRecordAnalyseCountParam.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/param/AcsElevatorRecordAnalyseCycleParam.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/param/AcsElevatorRecordDetailParam.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/param/AcsOpenDoorRecordAddParam.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/param/AcsOpenDoorRecordEditParam.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/param/AcsRecogRecordAddParam.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/param/SendRecordSendInfoParam.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/param/SendRecordSendParam.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/param/SendRecordTokenParam.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/result/AcsElevatorAnalyseCycleBusinessResult.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/result/AcsElevatorAnalyseCycleResult.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/result/AcsElevatorPageRequestInfoResult.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/result/AcsElevatorRecordResult.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/result/SendRecordTokenResult.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/result/VisitorRecordPushEvent.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/service/AcsElevatorRecordService.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/service/AcsRecogRecordService.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/service/PersonFileService.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/service/SendRecordTimeService.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/storage/AcsFileStorageService.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/storage/impl/AcsFileStorageServiceImpl.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/task/ElevatorRecordSendTask.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/visitor/client/VisitorFeignClient.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/visitor/fallback/VisitorFeignClientFallback.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/visitor/param/VisitorGetsParam.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/visitor/param/VisitorRecordQueryForm.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/visitor/param/VisitorRecordQueryParam.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/visitor/result/VisitorQueryResult.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/visitor/result/VisitorRecordResult.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/visitor/result/VisitorResult.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/zone/client/ZoneFeignClient.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/zone/fallback/ZoneFeignClientFallback.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/zone/impl/ZoneServiceImpl.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/zone/param/ZoneNextTreeParam.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/zone/param/ZoneQueryParam.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/zone/result/AgImageUploadResult.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/zone/result/ZoneResult.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/zone/result/ZoneTreeResult.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/zone/service/ZoneService.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-service/src/main/resources/META-INF/MANIFEST.MF create mode 100644 maven-cw-elevator-application/cw-elevator-application-web/pom.xml create mode 100644 maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/common/AbstractCloudwalkController.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/common/CloudwalkCallNewContext.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/AbstractEventHandler.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/OpenDoorRecordEventHandler.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/PersonRecordEventHandler.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/controller/AcsElevatorDeviceController.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/controller/AcsElevatorDeviceGetWayController.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/controller/AcsElevatorRestructureController.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/controller/FileController.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/form/AcsDeviceQueryForm.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/form/AcsDeviceRestructureTaskForm.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/form/AcsElevatorCodeForm.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/form/AcsElevatorCodeQueryForm.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/form/AcsElevatorDeviceAddForm.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/form/AcsElevatorDeviceDeleteForm.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/form/AcsElevatorDeviceEditForm.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/form/AcsElevatorDeviceQueryByIdForm.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/form/AcsElevatorDeviceQueryForm.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/form/AcsElevatorRecordAddForm.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/form/AcsRestructureBindingForm.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/form/AcsRestructureQueryForm.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/package-info.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/passrule/controller/AcsPassRuleController.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/passrule/form/AcsPassRuleDeleteForm.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/passrule/form/AcsPassRuleEditForm.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/passrule/form/AcsPassRuleFloorForm.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/passrule/form/AcsPassRuleImageForm.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/passrule/form/AcsPassRuleNewForm.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/passrule/form/AcsPassRulePersonListForm.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/passrule/form/AcsPassRuleQueryForm.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/person/controller/AcsPersonController.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/person/form/AcsPersonAddForm.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/person/form/AcsPersonAddNewForm.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/person/form/AcsPersonAddVisitorForm.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/person/form/AcsPersonDeleteForm.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/person/form/AcsPersonDetailForm.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/person/form/AcsPersonEditForm.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/person/form/AcsPersonFaceForm.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/person/form/AcsPersonQueryForm.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/person/form/AcsPersonTimeDetailForm.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/person/form/PersonDetailQueryForm.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/record/controller/AcsElevatorRecordController.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/record/form/AcsElevatorRecordAnalyseCountForm.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/record/form/AcsElevatorRecordAnalyseCycleForm.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/record/form/AcsElevatorRecordQueryForm.java create mode 100644 maven-cw-elevator-application/cw-elevator-application-web/src/main/resources/META-INF/MANIFEST.MF create mode 100644 maven-cw-elevator-application/pom.xml create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/pom.xml create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/account/param/AccountLoginParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/account/result/AccountLoginResult.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/account/service/AccountLoginService.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/ai/v2/face/param/FaceAddParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/ai/v2/face/param/FaceRemoveParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/ai/v2/face/service/FaceService.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/ai/v2/feature/param/FeatureExtractParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/ai/v2/feature/result/FeatureExtractResult.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/ai/v2/feature/service/FeatureService.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/ai/v2/group/param/GroupAddParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/ai/v2/group/param/GroupGetParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/ai/v2/group/result/GroupResult.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/ai/v2/group/service/GroupService.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/ai/v2/staticdb/param/SearchMultipleParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/ai/v2/staticdb/result/SearchResult.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/ai/v2/staticdb/service/SearchService.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/application/param/ApplicationImageStoreAddParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/application/param/ApplicationImageStoreDelParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/application/param/ApplicationImageStoreQueryParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/application/param/SceneAppsGetParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/application/result/ApplicationImageStoreResult.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/application/result/SceneAppsResult.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/application/service/ApplicationImageStoreService.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/application/service/ApplicationService.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/biology/param/FeatureExtractParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/biology/param/FeatureQueryParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/biology/result/FeatureExtractResult.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/biology/result/FeatureQueryResult.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/biology/service/BiologyToolService.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/DeviceApplicationParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/DeviceApplicationQueryParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/DeviceAreaDeleteParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/DeviceAreaQueryDeviceParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/DeviceAreaQueryParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/DeviceDeleteParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/DeviceDistrictQueryParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/DeviceImageStoreParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/DeviceImageStoreQueryParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/DeviceImageStoreSaveParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/DeviceQueryParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/DeviceSettingInitParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/DeviceSettingNotifyParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/DeviceSettingQueryParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/DeviceTypeQueryParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/EntranceGuardControlParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/result/DeviceApplicationResult.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/result/DeviceAreaResult.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/result/DeviceDistrictResult.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/result/DeviceImageStoreResult.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/result/DeviceResult.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/result/DeviceSettingInitResult.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/result/DeviceSettingNotifyResult.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/result/DeviceSettingResult.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/result/DeviceStatusResult.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/result/DeviceTypeResult.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/result/EntranceGuardControlResult.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/service/DeviceApplicationService.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/service/DeviceAreaService.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/service/DeviceDistrictService.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/service/DeviceImageStoreService.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/service/DeviceKitService.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/service/DeviceNotifyService.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/service/DeviceService.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/service/DeviceSettingService.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/service/DeviceTypeService.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/elevator/param/AcsPersonAddVisitorParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/elevator/service/ElevatorPersonService.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/email/param/EmailSendParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/email/service/EmailSendService.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/file/param/FileFinishParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/file/param/FileGetParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/file/param/FileInitParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/file/result/FileDetail.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/file/service/FileService.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/param/DevicePersonResyncParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/param/DevicePersonResyncRequestParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/param/ImageStoreAddParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/param/ImageStoreDelParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/param/ImageStoreEditParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/param/ImageStorePersonBindParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/param/ImageStorePersonData.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/param/ImageStorePersonDelParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/param/ImageStorePersonQueryParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/param/ImageStorePersonSaveParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/param/ImageStoreQueryParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/param/QueryDevicePersonSyncLogParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/param/QueryDevicePersonSyncParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/param/UpdateGroupPersonRefParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/result/DeviceImageStoreReSyncResult.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/result/DevicePersonResyncResult.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/result/DevicePersonSyncDetailResult.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/result/DevicePersonSyncLogResult.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/result/DevicePersonSyncResult.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/result/ImageStoreDetailResult.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/result/ImageStoreListResult.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/result/ImageStorePersonResult.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/result/ImageStorePersonSaveResult.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/result/ImageStoreResult.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/result/ImgStoreBatchBindPersonResult.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/result/ImgStorePersonResult.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/service/DeviceImageStoreSyncService.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/service/ImageStorePersonService.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/service/ImageStoreService.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/label/param/LabelAddParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/label/param/LabelDetailParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/label/param/LabelGroupDelParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/label/param/LabelGroupEditParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/label/param/LabelPersonAddParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/label/param/LabelPersonDelParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/label/param/LabelQueryParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/label/result/LabelDetailResult.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/label/result/LabelResult.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/label/service/LabelService.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/message/param/GetShortUrlParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/message/param/SmsSendParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/message/result/ShotUrlResult.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/message/service/SmsSendService.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/organization/param/OrganizationAddParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/organization/param/OrganizationDeleteParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/organization/param/OrganizationDetailQueryParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/organization/param/OrganizationEditParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/organization/param/OrganizationListParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/organization/param/OrganizationQueryParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/organization/param/OrganizationTreeParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/organization/param/RentUpdateParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/organization/result/OrganizationDetailResult.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/organization/result/OrganizationResult.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/organization/result/OrganizationTreeResult.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/organization/service/OrganizationService.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/package-info.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/person/param/PersonAddParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/person/param/PersonDelParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/person/param/PersonDetailParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/person/param/PersonEditParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/person/param/PersonImportParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/person/param/PersonQueryParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/person/result/AcsPassRuleImageResultDto.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/person/result/PersonResult.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/person/service/PersonService.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/record/param/AcsRecordThreeSendParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/record/result/AcsRecordThreeSendResult.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/record/service/AcsRecordThreeSendService.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/resource/param/RoleAddParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/resource/param/RoleDeltParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/resource/param/RoleEditParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/resource/param/RoleGetsParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/resource/param/RoleResourceAddParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/resource/param/RoleResourceDelParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/resource/param/RoleResourceQueryParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/resource/param/ValidateLoginTokenParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/resource/result/RoleDetailResult.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/resource/result/RoleResourceResult.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/resource/result/ValidateLoginTokenResult.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/resource/service/LoginService.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/resource/service/RoleService.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/sysetting/param/DeviceAreaTreeParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/sysetting/result/AreaTreeResult.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/sysetting/service/SysettingAreaService.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/user/param/UserChangePwdParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/user/param/UserDetailParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/user/param/UserQueryParam.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/user/result/UserAcountDetailResult.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/user/result/UserDetailResult.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/user/service/UserService.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/resources/META-INF/MANIFEST.MF create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-parent/pom.xml create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/pom.xml create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/account/feign/AccountLoginFeignClient.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/account/feign/fallback/AccountLoginFeignClientFallback.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/account/service/RestAccountLoginServiceImpl.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/ai/v2/face/feign/FaceFeignClient.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/ai/v2/face/feign/fallback/FaceFeignClientFallback.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/ai/v2/face/service/RestFaceServiceImpl.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/ai/v2/feature/feign/FeatureFeignClient.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/ai/v2/feature/feign/fallback/FeatureFeignClientFallback.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/ai/v2/feature/service/RestFeatureServiceImpl.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/ai/v2/group/feign/GroupFeignClient.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/ai/v2/group/feign/fallback/GroupFeignClientFallback.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/ai/v2/group/service/RestGroupServiceImpl.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/ai/v2/staticdb/feign/SearchFeignClient.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/ai/v2/staticdb/feign/fallback/SearchFeignClientFallback.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/ai/v2/staticdb/service/RestSearchServiceImpl.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/application/feign/ApplicationFeignClient.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/application/feign/ApplicationImageStoreFeignClient.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/application/feign/fallback/ApplicationFeignClientFallback.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/application/feign/fallback/ApplicationImageStoreFeignClientFallback.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/application/service/RestApplicationImageStoreServiceImpl.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/application/service/RestApplicationServiceImpl.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/biology/feign/BiologyToolFeignClient.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/biology/feign/fallback/BiologyToolFeignClientFallback.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/biology/service/RestBiologyToolServiceImpl.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/config/DeviceCategoryProperties.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/DeviceApplicationFeignClient.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/DeviceAreaFeignClient.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/DeviceDistrictFeignClient.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/DeviceFeignClient.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/DeviceImageStoreFeignClient.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/DeviceKitFeignClient.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/DeviceNotifyFeignClient.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/DeviceSettingFeignClient.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/DeviceTypeFeignClient.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/fallback/DeviceApplicationFeignClientFallback.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/fallback/DeviceAreaFeignClientFallback.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/fallback/DeviceDistrictFeignClientFallback.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/fallback/DeviceFeignClientFallback.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/fallback/DeviceImageStoreFeignClientFallback.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/fallback/DeviceKitFeignClientFallback.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/fallback/DeviceNotifyFeignClientFallback.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/fallback/DeviceSettingFeignClientFallback.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/fallback/DeviceTypeFeignClientFallback.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/service/RestDeviceApplicationServiceImpl.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/service/RestDeviceAreaServiceImpl.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/service/RestDeviceDistrictServiceImpl.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/service/RestDeviceImageStoreServiceImpl.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/service/RestDeviceKitServiceImpl.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/service/RestDeviceNotifyServiceImpl.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/service/RestDeviceServiceImpl.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/service/RestDeviceSettingServiceImpl.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/service/RestDeviceTypeServiceImpl.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/elevator/feign/ElevatorPersonFeignClient.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/elevator/feign/fallback/ElevatorPersonFeignClientFallback.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/elevator/service/RestElevatorPersonServiceImpl.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/email/feign/EmailSendFeign.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/email/feign/fallback/EmailSendFeignFallback.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/email/service/RestEmailSendServiceImpl.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/file/feign/FileFeign.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/file/feign/fallback/FileFeignFallback.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/file/service/RestFileServiceImpl.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/imagestore/feign/DeviceImageStoreSyncFeignClient.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/imagestore/feign/ImageStoreFeignClient.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/imagestore/feign/ImageStorePersonFeignClient.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/imagestore/feign/fallback/DeviceImageStoreSyncFeignClientFallback.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/imagestore/feign/fallback/ImageStoreFeignClientFallback.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/imagestore/feign/fallback/ImageStorePersonFeignClientFallback.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/imagestore/service/RestDeviceImageStoreSyncServiceImpl.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/imagestore/service/RestImageStorePersonServiceImpl.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/imagestore/service/RestImageStoreServiceImpl.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/label/feign/LabelFeignClient.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/label/feign/fallback/LabelFeignClientFallback.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/label/service/RestLabelServiceImpl.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/message/feign/SmsSendFeign.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/message/feign/fallback/SmsSendFeignFallback.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/message/service/RestSmsSendServiceImpl.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/organization/feign/OrganizationFeignClient.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/organization/feign/fallback/OrganizationFeignClientFallback.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/organization/service/RestOrganizationServiceImpl.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/package-info.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/person/feign/PersonFeignClient.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/person/feign/fallback/PersonFeignClientFallback.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/person/service/RestPersonServiceImpl.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/record/feign/AcsRecordThreeSendFeignClient.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/record/feign/fallback/AcsRecordThreeSendFeignClientFallback.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/record/service/AcsRecordThreeSendServiceImpl.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/resource/feign/LoginFeignClient.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/resource/feign/RoleFeignClient.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/resource/feign/fallback/LoginFeignClientFallback.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/resource/feign/fallback/RoleFeignClientFallback.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/resource/service/RestLoginServiceImpl.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/resource/service/RestRoleServiceImpl.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/sysetting/feign/SysettingAreaFeignClient.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/sysetting/feign/fallback/SysettingAreaFeignClientFallback.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/sysetting/service/RestSysettingAreaServiceImpl.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/user/feign/UserFeignClient.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/user/feign/fallback/UserFeignClientFallback.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/user/service/RestUserServiceImpl.java create mode 100644 maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/resources/META-INF/MANIFEST.MF create mode 100644 maven-intelligent-cwoscomponent/pom.xml create mode 100644 maven-ninca-crk/ninca-crk-gpu-std/pom.xml create mode 100644 maven-ninca-crk/ninca-crk-gpu-std/src/main/java/cn/cloudwalk/Application.java create mode 100644 maven-ninca-crk/ninca-crk-gpu-std/src/main/java/cn/cloudwalk/package-info.java create mode 100644 maven-ninca-crk/ninca-crk-gpu-std/src/main/resources/META-INF/MANIFEST.MF create mode 100644 maven-ninca-crk/ninca-crk-gpu-std/src/main/resources/application-access-control.properties create mode 100644 maven-ninca-crk/ninca-crk-gpu-std/src/main/resources/application-conference-attendance.properties create mode 100644 maven-ninca-crk/ninca-crk-gpu-std/src/main/resources/application-smart-attendance.properties create mode 100644 maven-ninca-crk/ninca-crk-gpu-std/src/main/resources/application-visitor-management.properties create mode 100644 maven-ninca-crk/ninca-crk-gpu-std/src/main/resources/application.properties create mode 100644 maven-ninca-crk/ninca-crk-gpu-std/src/main/resources/bootstrap.properties create mode 100644 maven-ninca-crk/ninca-crk-gpu-std/src/main/resources/mapper/mybatis-config.xml create mode 100644 maven-ninca-crk/pom.xml create mode 100644 maven-ninca-qk-alarm/ninca-qk-alarm-app-starter/pom.xml create mode 100644 maven-ninca-qk-alarm/ninca-qk-alarm-app-starter/src/main/java/cn/cloudwalk/AlarmApplication.java create mode 100644 maven-ninca-qk-alarm/ninca-qk-alarm-app-starter/src/main/java/cn/cloudwalk/package-info.java create mode 100644 maven-ninca-qk-alarm/ninca-qk-alarm-app-starter/src/main/resources/META-INF/MANIFEST.MF create mode 100644 maven-ninca-qk-alarm/ninca-qk-alarm-app-starter/src/main/resources/application.properties create mode 100644 maven-ninca-qk-alarm/ninca-qk-alarm-app-starter/src/main/resources/bootstrap.properties create mode 100644 maven-ninca-qk-alarm/ninca-qk-alarm-app-starter/src/main/resources/log/logback.xml create mode 100644 maven-ninca-qk-alarm/ninca-qk-alarm-app-starter/src/main/resources/sh/check-restart.sh create mode 100644 maven-ninca-qk-alarm/pom.xml diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..4b746d4f --- /dev/null +++ b/.gitignore @@ -0,0 +1,23 @@ +# 仅跟踪:docs/ 与五个 maven-* 聚合工程;其余根目录内容不纳入版本库。 +/* +!.gitignore +!/docs/ +!/docs/** +!/maven-cloudwalk-cloud/ +!/maven-cloudwalk-cloud/** +!/maven-cw-elevator-application/ +!/maven-cw-elevator-application/** +!/maven-intelligent-cwoscomponent/ +!/maven-intelligent-cwoscomponent/** +!/maven-ninca-crk/ +!/maven-ninca-crk/** +!/maven-ninca-qk-alarm/ +!/maven-ninca-qk-alarm/** + +# 已跟踪目录内的常见构建/IDE 产物(仍保留源码与 pom) +**/target/ +**/.idea/ +**/*.iml +**/.classpath +**/.project +**/.settings/ diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 00000000..e71fdd1a --- /dev/null +++ b/docs/README.md @@ -0,0 +1,46 @@ +# 文档索引(反编译工作区) + +本目录集中存放说明类文档与配套资源,按类别分子目录。 + +## 目录结构 + +| 目录 | 说明 | +|------|------| +| [business/](business/) | 业务走查、接口流、用例说明 | +| [build/](build/) | 构建环境、JDK 版本依据等 | +| [style/](style/) | 代码风格配置(P3C / Eclipse Formatter XML,供 Maven `formatter-maven-plugin` 引用) | +| [operations/](operations/) | 发布、私服上传等运维脚本 | +| [architecture/](architecture/) | 工程结构、Maven 聚合模块说明与模块间关系 | + +反编译归档与解压树不在 `docs/` 内,而在仓库根目录 [**`artifacts/decompiled/`**](../artifacts/decompiled/)(与本文并列,见该目录 README)。 + +## 文档列表 + +### 工程说明(architecture) + +- [Maven 聚合工程说明](architecture/Maven聚合工程说明.md) — 五个 `maven-*` 聚合工程的定位、子模块、技术栈、工程间依赖与 `artifacts`/运行包分工。 + +### 业务(business) + +- [访客注册与派梯楼层业务流程走查](business/访客注册与派梯楼层业务流程走查.md) — 从第三方获取默认楼层到指定楼层、电梯 `add/visitor`、Feign 调用链与用例。 +- [租户访客默认楼层技术产品方案](business/租户访客默认楼层技术产品方案.md) — 从第三方登记页初始化(数据项与接口溯源)到派梯开通的**闭环**、多租户默认楼层的实现路径评估与落地建议。 + +### 构建(build) + +- [ORIGINAL_BUILD_JDK.txt](build/ORIGINAL_BUILD_JDK.txt) — 原始运行包与构件体现的 **JDK 8** 依据;与各聚合父 POM 中 `maven-enforcer-plugin` 提示一致。 + +### 风格(style) + +- [alibaba-eclipse-codestyle.xml](style/alibaba-eclipse-codestyle.xml) — 阿里巴巴 P3C Eclipse 格式化配置;各 `maven-*/pom.xml` 中 `alibaba.eclipse.codestyle.path` 指向此处。 + +### 运维(operations) + +- [deploy_cw_elevator_v1_lib_to_nexus.py](operations/deploy_cw_elevator_v1_lib_to_nexus.py) — 将 V1 运行包 `lib` 下 JAR 批量 `deploy-file` 到 Nexus 的脚本。 + +## 反编译二进制与解压树(`artifacts/`) + +说明类文档在 **`docs/`**;从 JAR 反编译得到的 **`*.jar.src.zip` / `*.jar.src/`** 已归纳至仓库根目录 **`artifacts/decompiled/`**(`archives` 与 `trees` 分类),详见 [artifacts/decompiled/README.md](../artifacts/decompiled/README.md)。 + +## 与 `dev-support` 的关系 + +原 `dev-support/` 下文档与配置已迁入 `docs/` 对应子目录。若本地仍有旧路径书签,请改为以 `docs/` 为准。 diff --git a/docs/architecture/Maven聚合工程说明.md b/docs/architecture/Maven聚合工程说明.md new file mode 100644 index 00000000..1f480920 --- /dev/null +++ b/docs/architecture/Maven聚合工程说明.md @@ -0,0 +1,197 @@ +# Maven 聚合工程说明(反编译工作区) + +> **适用范围**:本仓库根目录下五个以 `maven-` 为前缀的 **Maven Reactor(聚合父工程)**,由反编译产物整理而来,用于本地编译、走查与增量修改。 +> **不适用范围**:各工程依赖的大量 **NINCA / 云从内部 JAR** 仍须通过 Nexus 等私服解析,本文仅描述**本仓库内可见的模块边界与协作关系**。 + +--- + +## 1. 文档目的 + +- 说明五个聚合工程各自的 **业务定位、子模块划分、技术栈选型原因**。 +- 说明工程之间的 **Maven 依赖与调用链上的协作**(与 `docs/business/` 中接口走查互补:本文偏「工程与构件」,走查文档偏「接口与数据流」)。 +- 说明 **`maven-*`** 目录与 **`artifacts/decompiled/`**、**运行包目录** `cw-elevator-application-V1.0.0.20211103/` 的分工,避免混淆「可改源码树」与「仅对照归档」。 + +--- + +## 2. 五工程一览 + +| 仓库目录 | 聚合 artifactId(父 POM) | `groupId` | 版本(父 POM) | 子模块(`modules`) | +|----------|---------------------------|-----------|----------------|----------------------| +| `maven-cloudwalk-cloud/` | `cloudwalk-cloud-decompiled-reactor` | `cn.cloudwalk.cloud` | `3.7.2-Brussels-SRX` | `cloudwalk-cloud-common`、`cloudwalk-common-event`、`cloudwalk-common-service` | +| `maven-cw-elevator-application/` | `cw-elevator-application-decompiled-reactor` | `cn.cloudwalk.elevator` | `1.0-SNAPSHOT` | `cw-elevator-application-common`、`data`、`service`、`web` | +| `maven-intelligent-cwoscomponent/` | `intelligent-cwoscomponent-decompiled-reactor` | `cn.cloudwalk.intelligent` | `2.9.2-xinghewan` | `intelligent-cwoscomponent-parent`、`interface`、`rest` | +| `maven-ninca-crk/` | `ninca-crk-decompiled-reactor` | `cn.cloudwalk.ninca` | `1.0.0` | `ninca-crk-gpu-std` | +| `maven-ninca-qk-alarm/` | `ninca-qk-alarm-decompiled-reactor` | `cn.cloudwalk.ninca` | `0.0.2-SNAPSHOT` | `ninca-qk-alarm-app-starter`(其下再含 web / interface 等子模块) | + +--- + +## 3. 各工程详细说明 + +### 3.1 `maven-cloudwalk-cloud` — 云从公共云底座(事件与服务) + +**定位** +聚合 **CloudWalk 内部通用能力**:消息与事件封装(`cloudwalk-common-event`)、通用服务侧抽象与实现(`cloudwalk-common-service`)。电梯应用、智能组件等上层工程普遍依赖这里的 **`CloudwalkResult`、Feign 封装、事件注解** 等构件。 + +**为何存在「`cloudwalk-cloud-common`」子模块** +反编译得到的子 JAR 原 `parent` 指向 **`cloudwalk-cloud-common`**,而原始父 POM 在工作区中缺失。本聚合工程增加 **`cloudwalk-cloud-common`** 模块,使子模块能 **先 `install` 到本地 `~/.m2`**,满足其它构件对「父 POM 坐标」的解析,同时由本 reactor **继承 Spring Boot**,统一 **Spring Cloud Greenwich** 与内部版本属性(如 `cwos-sdk-event` 与 V1 运行包 `lib` 对齐的说明见父 `pom.xml` 注释)。 + +**技术栈摘要** +- Spring Boot **2.1.x**(与父 POM 声明一致) +- Spring Cloud **Greenwich**(`spring-cloud-dependencies` import) +- Java **1.8** + +**与其它工程关系** +被 **`maven-cw-elevator-application`**、**`maven-intelligent-cwoscomponent`**、**`maven-ninca-crk`** 等通过 `dependencyManagement` 或直连依赖引用 `cloudwalk-common-event` / `cloudwalk-common-service` 等坐标。 + +--- + +### 3.2 `maven-cw-elevator-application` — 电梯 / ACS 通行应用 + +**定位** +**电梯与门禁派梯相关业务应用**:人员通行规则(含访客 `add/visitor`)、设备、区域/空间 Feign、乘梯记录、MQTT 等。对应运行环境中常部署的 **`elevator-app`** 一类服务;业务走查见 `docs/business/访客注册与派梯楼层业务流程走查.md`。 + +**子模块分层(推荐理解顺序)** + +| 子模块 | 典型职责 | +|--------|----------| +| `cw-elevator-application-common` | 公共枚举、常量、工具、跨层 DTO/注解等 | +| `cw-elevator-application-data` | MyBatis 实体、Mapper、DAO 与数据源相关 | +| `cw-elevator-application-service` | 业务实现:`PersonRuleServiceImpl`、设备服务、记录服务等 | +| `cw-elevator-application-web` | Spring MVC 控制器,对外 HTTP API(如 `/elevator/person/add/visitor`) | + +**技术栈摘要** +- Spring Boot **2.1.x**、Java **1.8** +- MyBatis、分库分表(ShardingSphere 等版本在父 POM 属性中集中管理) +- 依赖 **`cloudwalk-common-*`**、**`intelligent-cwoscomponent-rest`** 等(与智能侧、组织侧集成) + +**与运行包、反编译归档的关系** +- 父 POM 中属性 **`cw.elevator.v1.lib.dir`** 指向根目录 **`cw-elevator-application-V1.0.0.20211103/lib`**,用于与 **V1 运行包内 JAR 文件名** 对齐,便于 `install-file` 或私服核对。 +- **`artifacts/decompiled/trees/cw-elevator-application-*-SNAPSHOT.jar.src`** 为历史解压对照;**日常改代码以 `maven-cw-elevator-application` 下各模块为准**。 + +--- + +### 3.3 `maven-intelligent-cwoscomponent` — 智能组件(接口 + REST) + +**定位** +**智能操作系统组件(CWOS Component)**:对上提供 **REST / Feign Client** 入口,对下通过 **Feign** 调用组织人员、电梯、图库、空间等微服务。在业务文档中常作为「第三方或网关」与 **`cw-elevator-application`** 之间的中转层(例如 `ElevatorPersonService.addVisitor` → Feign → `POST /elevator/person/add/visitor`)。 + +**子模块说明** + +| 子模块 | 职责 | +|--------|------| +| `intelligent-cwoscomponent-parent` | 占位/对齐原多模块父工程坐标(若子模块引用需要) | +| `intelligent-cwoscomponent-interface` | API、参数、结果 DTO、对外 Service 接口定义 | +| `intelligent-cwoscomponent-rest` | 接口实现、Feign 客户端声明、与 Spring Cloud 集成 | + +**技术栈摘要** +- Spring Boot **2.1.x**、Spring Cloud **Greenwich** +- 管理 **`cloudwalk-device-sdk-protocol-entity`** 等与设备协议相关的版本(父 POM 注释与 V1 `lib` 对齐) + +**与其它工程关系** +- **`maven-cw-elevator-application`** 依赖 **`intelligent-cwoscomponent-rest`**(或同版本构件),形成「智能组件编排 ↔ 电梯落地」的链路。 +- **`maven-ninca-crk`** 的 `ninca-crk-gpu-std` 对 **`intelligent-cwoscomponent-rest`** 存在 **exclusion** 等精细依赖控制,说明 CRK 打包场景下需避免重复引入或版本冲突,以实际 **`ninca-crk-gpu-std/pom.xml`** 为准。 + +--- + +### 3.4 `maven-ninca-crk` — NINCA CRK 产品线(当前聚合 GPU 标准后端) + +**定位** +**NINCA CRK**(门禁、考勤、访客、会议等组合能力)产品族中的 **标准 GPU 出入口后端** 工程 **`ninca-crk-gpu-std`**。子模块描述中体现为轻舟 1.4 体系下的 **标准 GPU 服务器-出入口版**;考勤、访客、门禁等大量 **web 模块以私服版本依赖** 引入,**不在本 reactor 的 `modules` 列表中展开**。 + +**为何使用 Boot 1.5 + Edgware** +父 POM 说明:为 **贴近原 `spring-boot-maven-plugin` 1.3.x 时代栈**,采用 Spring Boot **1.5.22** 与 Spring Cloud **Edgware**,减少与历史 fat jar 字节码、依赖树差异带来的构建问题。 + +**技术栈摘要** +- Spring Boot **1.5.x**、Cloud **Edgware** +- Java **1.8** +- 与 **`intelligent-cwoscomponent-rest`**、**`cloudwalk-common-event`** 等版本在父 POM `dependencyManagement` 中锁定 + +**与其它工程关系** +依赖本仓库整理的 **`intelligent-cwoscomponent-rest`**、**`cloudwalk-common-event`** 等;更多 `ninca-crk-*` 构件从 Nexus 拉取。 + +--- + +### 3.5 `maven-ninca-qk-alarm` — 轻舟告警应用(Starter 聚合) + +**定位** +**区域告警 / 轻舟告警(qk-alarm)** 可执行应用的 Maven 化聚合:原 **`ninca-qk-alarm-app`** 父 POM 缺失,由本 **`ninca-qk-alarm-decompiled-reactor`** 补齐 **`dependencyManagement`、插件版本、编码** 等,当前 reactor **直接列出的模块**为 **`ninca-qk-alarm-app-starter`**(可执行 JAR 形态业务的启动与组装入口)。 + +**子模块 `ninca-qk-alarm-app-starter` 说明** +- 依赖 **`ninca-qk-alarm-app-web`**、**`ninca-qk-alarm-app-interface`** 等同版本子构件,形成完整 Web + 接口层。 +- 使用 **Curator + ZooKeeper**(版本在父 POM 统一管理),适用于注册发现或分布式协调类能力(以实际代码为准)。 + +**技术栈摘要** +- Spring Boot **2.1.x**、Java **1.8** +- MyBatis Spring Boot、Jacoco 等插件在父 POM `pluginManagement` 中声明 + +**与其它工程关系** +主要依赖 **`cloudwalk-common-web`** 等云从公共 Web 能力;与电梯、智能组件无强绑定,相对 **独立部署单元**。 + +--- + +## 4. 工程间依赖与协作(简图) + +下列关系表示 **Maven 依赖 / 常见运行时调用方向**,非严格部署拓扑。 + +```mermaid +flowchart LR + subgraph cloud [maven-cloudwalk-cloud] + CE[cloudwalk-common-event] + CS[cloudwalk-common-service] + end + subgraph intel [maven-intelligent-cwoscomponent] + IR[intelligent-cwoscomponent-rest] + end + subgraph elev [maven-cw-elevator-application] + EW[cw-elevator-application-web] + ES[cw-elevator-application-service] + end + subgraph crk [maven-ninca-crk] + GPU[ninca-crk-gpu-std] + end + subgraph alarm [maven-ninca-qk-alarm] + ST[ninca-qk-alarm-app-starter] + end + CE --> ES + CS --> ES + IR --> ES + ES --> EW + CE --> GPU + IR -.->|可能被 exclusion| GPU + CS --> ST +``` + +**文字归纳** + +- **电梯应用** 依赖 **公共云模块** + **智能组件 REST**,对外暴露电梯 HTTP API;智能组件再通过 Feign 回调电梯、组织等。 +- **CRK GPU 标准后端** 依赖公共事件、智能组件等,与考勤/访客等 **NINCA 模块** 打成一个可部署单元(具体以 `ninca-crk-gpu-std/pom.xml` 为准)。 +- **告警应用** 相对独立,主要挂 **CloudWalk Web 公共栈**。 + +--- + +## 5. 源码目录、`artifacts`、运行包三者的分工 + +| 位置 | 性质 | 建议使用方式 | +|------|------|----------------| +| **`maven-*/*/src/main/java`** | 已整理为 Maven 标准目录的 **主修改区** | 日常开发、编译、`mvn validate/package` | +| **`artifacts/decompiled/trees/*.jar.src`** | 反编译解压树 **归档对照** | 查历史包内资源、与 `META-INF/maven` 对照版本 | +| **`artifacts/decompiled/archives/*.jar.src.zip`** | 未解压的 **zip 备份** | 备份、交付留档 | +| **`cw-elevator-application-V1.0.0.20211103/`** | **V1 运行包展开**(含 `lib/`) | 对齐线上依赖列表;`docs/operations/deploy_cw_elevator_v1_lib_to_nexus.py` 默认读取其 `lib` | + +详见 [artifacts/decompiled/README.md](../../artifacts/decompiled/README.md)。 + +--- + +## 6. 构建与环境(延伸阅读) + +- **JDK 版本依据**:[ORIGINAL_BUILD_JDK.txt](../build/ORIGINAL_BUILD_JDK.txt) +- **各父 POM** 中 **`maven-enforcer-plugin`** 要求使用 JDK 8 范围,与上述依据一致。 +- **代码风格**:`docs/style/alibaba-eclipse-codestyle.xml`,各聚合工程通过属性 **`alibaba.eclipse.codestyle.path`** 引用。 +- **私服与上传脚本**:`docs/operations/deploy_cw_elevator_v1_lib_to_nexus.py`;Nexus 地址见各父 POM 中 `nexus.baseUrl` 注释。 + +--- + +## 7. 文档维护 + +- 若新增第六个聚合工程,请在本表与各节补充 **目录、artifactId、modules、与其它工程的依赖边**。 +- 若 Spring Boot / Cloud 版本升级,请以各 **`maven-*/pom.xml`** 为准同步更新本文「技术栈摘要」小节。 diff --git a/docs/build/ORIGINAL_BUILD_JDK.txt b/docs/build/ORIGINAL_BUILD_JDK.txt new file mode 100644 index 00000000..9db0a416 --- /dev/null +++ b/docs/build/ORIGINAL_BUILD_JDK.txt @@ -0,0 +1,20 @@ +原始运行包 / 官方构件体现的 Java 版本:Java 8(1.8) + +依据(摘录自本工作区内文件,便于审计): + +1) cw-elevator-application-V1.0.0.20211103 + - META-INF/MANIFEST.MF:Build-Jdk: 1.8.0_144 + - META-INF/maven/.../cw-elevator-application-starter/pom.xml: + maven.compiler.source=8,maven.compiler.target=8 + +2) cw-elevator-application-V1.0.0.20211103/lib/cw-elevator-application-common-1.0-SNAPSHOT.jar + - META-INF/MANIFEST.MF:Build-Jdk: 1.8.0_144 + +3) cw-elevator-application-V1.0.0.20211103/lib/cloudwalk-common-event-3.7.2-Brussels-SRX.jar + - META-INF/MANIFEST.MF:Build-Jdk: 1.8.0_191 + +4) artifacts/decompiled/trees/ninca-crk-std-backend-V2.9.1_20210630.jar.src/META-INF/maven/.../pom.xml + - maven.compiler.source=1.8,maven.compiler.target=1.8 + +结论:五个聚合 Maven 工程应与上述一致,使用 JDK 8 作为运行 Maven 的 JVM(JAVA_HOME 指向 1.8.x), +字节码目标为 1.8。各聚合父 POM 已配置 maven-enforcer-plugin,要求 [1.8,1.9),避免误用 JDK 11+ 仅当“编译目标 8”导致注解处理器等问题。 diff --git a/docs/business/租户访客默认楼层技术产品方案.md b/docs/business/租户访客默认楼层技术产品方案.md new file mode 100644 index 00000000..6bb0a60e --- /dev/null +++ b/docs/business/租户访客默认楼层技术产品方案.md @@ -0,0 +1,424 @@ +# 租户访客默认楼层:技术产品方案 + +> **文档类型**:产品与工程技术方案(含**登记页数据项与接口溯源**、端到端闭环、数据模型与实施路线)。 +> **前置阅读**:[访客注册与派梯楼层业务流程走查](访客注册与派梯楼层业务流程走查.md)(UC-01~UC-06、对外 HTTP/Feign 与代码位置)。 +> **关联工程**:[Maven 聚合工程说明](../architecture/Maven聚合工程说明.md)(`maven-cw-elevator-application`、`maven-intelligent-cwoscomponent` 等边界)。 + +--- + +## 1. 背景与问题陈述 + +### 1.1 业务背景 + +多租户部署下,不同机构对**访客可达楼层**的策略不一致: + +- **默认诉求**:访客开通派梯时,若业务侧**不显式传楼层列表**(与 [UC-01](访客注册与派梯楼层业务流程走查.md) 一致),系统仍应开通派梯,但**不应简单等同于被访人组织侧 `floorList` 全集**。 +- **典型例子(产品化名)**:**「广发基金」类租户**要求:访客**默认仅可派梯至 28 楼**(或某固定接待层),而被访人本人在组织中可能仍具备多层办公权限。 + +### 1.2 `floorIds` 是谁的字段、空与非空分别代表什么 + +#### 1.2.1 字段归属(哪个主体的属性) + +`floorIds` **不是**组织人员主数据里「被访人」的持久化字段,也**不是**访客人员档案在组织库里的固定属性;在现有实现中,它是 **电梯应用对外接口** 的一次请求参数。 + +| 项目 | 说明 | +|------|------| +| **载体** | HTTP **`POST /elevator/person/add/visitor`** 的请求体(`AcsPersonAddVisitorForm` / 服务层 `AcsPersonAddVisitorParam`,见 `maven-cw-elevator-application`)。 | +| **语义** | **本次「给访客开通派梯」操作**中,调用方希望电梯在哪些 **空间分区(`zoneId`)** 上为 `visitorId` 写入默认通行规则并绑图库。 | +| **主体** | 归属主体是 **「派梯开通请求」**(一次 API 调用),由 **调用方**(第三方 BFF、访客业务后台、或 `intelligent-cwoscomponent-rest` 等)填入;电梯服务**读取**后执行落库与远程绑图库。 | + +因此:在集成文档中应写清——**`floorIds` 列出的是「本次开通涉及的楼层 zoneId 列表」,由调用方在请求时提供;缺省(空)时电梯才按约定去组织侧拉被访人的 `floorList` 补全。** + +#### 1.2.2 `floorIds` 非空时:业务含义与电梯行为 + +当调用方传入 **非空** `floorIds` 时(走查文档中的 **UC-02:访客派梯-第三方指定楼层**): + +| 项目 | 说明 | +|------|------| +| **业务含义** | 调用方已明确「本次访客只(或优先)开通这些楼层」的意图;常见来源包括:登记/审批流程里已算好的**生效楼层**、访客在允许范围内**勾选的多层**、或业务规则直接指定的接待层列表。 | +| **电梯侧行为** | **不再**为补楼层去调 **`POST /component/person/detail`**;直接使用请求中的 `floorIds` 作为待写入规则的楼层列表,后续步骤(`zone/page` 取楼栋、`getDefaultByZoneId`、写 `image_rule_ref`、`batchBind` 等)与「列表来自组织补全」时相同,**仅楼层列表来源不同**。 | +| **责任边界** | **正确性、合法性、与租户策略及被访人授权的一致性**由调用方负责(或通过 BFF 统一校验);电梯按列表执行;若需「仍不得超过被访人 `floorList`」的硬约束,须在 **BFF、intelligent 或电梯增强**中择一层实现(见 §4、§5)。 | + +#### 1.2.3 为什么调用方会选择「非空」(不依赖空列表) + +| 动机 | 说明 | +|------|------| +| **与 UI/审批结果一致** | 登记页或审批单已确定可访楼层,开通时**显式写入**同一列表,避免电梯侧再解释「默认」。 | +| **多租户策略在域外已算完** | 推荐做法(§4):在第三方 BFF 做 `tenantAllow ∩ hostFloors`,把结果作为 `floorIds` 传入,电梯无需理解租户表。 | +| **避免 UC-01 与产品语义冲突** | 不传 `floorIds` 时电梯等价于「被访人 `floorList` 全集」;若产品要「小于全集」,**应传非空** `floorIds`,否则现网电梯逻辑无法满足。 | +| **集成契约清晰** | 显式列表便于审计、重放、幂等比对(可与登记快照 `effective_preview_json` 逐字一致)。 | + +#### 1.2.4 `floorIds` 为空时:电梯侧补全(与上文对照) + +当前电梯侧实现(`PersonRuleServiceImpl.addVisitor`)在 **`floorIds` 为空或缺省** 时: + +1. 调用组织 **`/component/person/detail`**(`personId` + `businessId`); +2. 将返回的 **`PersonResult.getFloorList()`** 赋给本次执行使用的楼层列表; +3. **不使用** `defaultFloor` 单字段作为补全依据。 + +因此:**仅在「调用方不传 `floorIds`」这一模式下**,现网电梯无法表达租户级收敛;多租户默认接待层需在 **调用方传非空 `floorIds`** 或 **电梯/ BFF 增强兜底** 中实现(见全文 §4、§6)。 + +### 1.3 文档目标 + +| 维度 | 目标 | +|------|------| +| **产品** | 定义租户策略、角色权限、配置流程、登记/邀约 **UX 与开通结果一致**、验收标准。 | +| **闭环** | 从**第三方系统在注册/邀约流程中初始化访客登记页**开始,明确**每个数据项从哪个系统、哪类接口获取**;经提交、审批(若有)到 **`add/visitor`** 生效,并给出**一致性校验**与回读建议。 | +| **技术** | 可选架构、推荐组合、数据模型与接口草案、改造边界、安全求交、**多租户默认访客楼层的实现路径综合评估**。 | + +--- + +## 2. 端到端闭环:从第三方登记页初始化到派梯生效 + +本章回答:**登记页打开时要拉哪些数据、按什么顺序调接口、算出什么给 UI 存什么草稿、审批后如何与电梯开通对齐**,从而形成可审计、可测试的闭环。 + +### 2.1 闭环目标 + +| 目标 | 说明 | +|------|------| +| **同源计算** | 「页面上展示的预计可派梯楼层」与「最终调用 `add/visitor` 的 `floorIds`(或电梯兜底前的逻辑输入)」由**同一套规则函数**得出,避免两套逻辑漂移。 | +| **接口可追溯** | 每个 UI 字段可映射到**具体外部接口或本地配置**;本仓库已明确的接口见走查文档 §3~§4。 | +| **租户可配置** | `businessId`(机构 ID)贯穿上下文;租户策略变更后,**进行中的登记单**行为需在产品中定义(见 §2.7)。 | + +### 2.2 阶段划分(第三方视角) + +| 阶段 | 名称 | 参与系统 | 产出 | +|------|------|----------|------| +| **P0** | 登记页/邀约页 **初始化** | 第三方 + 组织 + 空间 +(可选)租户策略服务 | 表单默认值、`effectiveFloorsPreview`、可选楼层展示文案 | +| **P1** | 用户填写与 **校验** | 第三方前端 + 后端 | 通过校验的草稿 DTO | +| **P2** | **提交**登记/发起邀约 | 第三方 DB、工作流引擎 | 业务主键、状态机(待审批/已登记) | +| **P3** | **审批**(若存在) | 第三方审批流 | 通过/驳回;通过则触发 P4 | +| **P4** | **组织侧** 写入访客人员、拿到 `visitorId` | 组织/访客模块(**不在本反编译仓**,以实际 API 为准) | `visitorId` | +| **P5** | **派梯开通** | 第三方或 intelligent → **电梯** `POST /elevator/person/add/visitor` | 规则写入、图库绑定 | +| **P6** | **回读与告知** | 第三方查询电梯/通行结果或异步任务状态 | 与 P0 展示一致的「已开通楼层」说明 | + +### 2.3 访客登记/邀约页:数据项定义与数据来源 + +下表面向**第三方业务系统**实现同学:列的是**逻辑字段**;物理表名由各自系统定义。接口路径以走查文档为准;**组织人员搜索**(选被访人)在走查中未展开,行内标注为**待对接清单**。 + +| 逻辑数据项 | 典型 UI 表现 | 数据来源 | 接口或服务(已知/占位) | 关键入参 / 出参 | 与租户楼层关系 | +|-------------|--------------|----------|---------------------------|-----------------|----------------| +| **租户/机构 ID** | 隐藏或顶部切换 | 登录态 / 网关注入 | 上下文 `businessId`,与 `CloudwalkCallContext.company` 一致 | `businessId` | 策略表主键维度 | +| **被访人 `personId`** | 选人组件 | **组织人员检索**(具体路径以 `ninca-common-component-organization` 或网关文档为准) | 占位:`POST .../person/page` 或等价检索 API | 选中行 → `personId` | 后续 `detail` 入参 | +| **被访人姓名/部门等展示** | 选人后回显 | 同上检索结果或二次 `detail` | 检索结果字段 **或** `POST /component/person/detail` | `PersonResult` 展示字段 | 非楼层核心 | +| **被访人授权楼层 ID 列表 `hostFloors`** | 一般不直接展示 ID | **组织**(与电梯 UC-01 同源) | **`POST /component/person/detail`** | 请求:`id`=被访人 `personId`,`businessId`;响应:`PersonResult.floorList` | 求交上界 | +| **`defaultFloor` / `floorInfoList` 等** | 若产品要展示「默认办公层」文案 | **组织** `detail` 同响应 | 同上 | `PersonResult.defaultFloor`、`floorInfoList` | **电梯补全不用 `defaultFloor`**;若 UI 用其展示,须与 `floorList` 语义对齐(走查 §8 风险 1) | +| **空间树/楼层名称** | 楼层中文名、楼栋 | **空间服务** `ninca-common` | **`POST /sysetting/zone/tree`**、**`POST /sysetting/zone/page`** | 用 `hostFloors` 中 `zoneId` **反查** `zoneName`、楼栋 | 仅展示增强 | +| **租户访客楼层策略** | 管理员配置页;登记页可不直接展示 | **租户策略存储**(自建表或配置中心) | 草案 §4.3 管理 API **或** 第三方本地表 + 管理端 | `policy_type`、`allow_zone_ids`、版本号 | **与 `hostFloors` 求交**得预览 | +| **`effectiveFloorsPreview`** | 「本次访问预计可开通派梯的楼层」 | **计算字段**(禁止手写死) | `computeEffective(policy, hostFloors, userOverride?)` | 输出 `List`,可附 `displayNames` | **必须与 P5 输入一致** | +| **访客可选楼层(若产品允许访客改)** | 多选框,默认选中 `effectiveFloorsPreview` | `effectiveFloorsPreview` 的子集 | 前端约束:用户勾选 ⊆ 预览集 | 提交 `userSelectedZoneIds` | 高敏租户可关闭多选 | +| **访客姓名、证件、事由、到访时间等** | 表单 | 用户输入 + 机构规则 | 第三方本地 | — | 与楼层正交 | +| **人脸/照片** | 采集/上传 | 用户 + 第三方存储 | 组织图库/人像接口以实际为准 | — | 走查未展开 | +| **策略版本号 `policyVersion`** | 可不展示 | 租户策略表 | 读取策略时返回 | 写入登记草稿 | 审计与回放 | +| **登记单草稿持久化** | — | 第三方 DB | 本地表建议字段:`draft_id, business_id, host_person_id, host_floors_snapshot_json, policy_snapshot_json, effective_preview_json, policy_version, status` | P5 时读出 `effective_preview` 或重算 | 支持审批前后回放 | + +**不在本仓库的接口**(须在集成清单中单独列出):访客人员创建、`visitorId` 发放、审批流回调 URL、人像入库等——闭环在 P4 前依赖这些能力,本文仅要求:**P5 的 `floorIds` 与 P0 预览同源**。 + +### 2.4 接口编排顺序(推荐:登记页初始化一次请求链) + +第三方**后端聚合接口**(推荐由自有 **BFF** 实现,避免前端直连多枚令牌)建议内部按序调用: + +``` +1) 校验 businessId、操作者权限 +2) GET 租户访客楼层策略(若无则视为 HOST_FLOOR_LIST) +3) POST /component/person/detail(id=被访人 personId, businessId) + → 得 hostFloors = floorList(可能 null/空) +4) computeEffective(policy, hostFloors, requestedFromClient=null) + → 若空:返回明确错误码,登记页展示「无法为该被访人开通访客派梯,请联系管理员」 +5) 可选:POST /sysetting/zone/page 或 tree 子集调用,将 zoneId 映射为 zoneName / 楼栋 +6) 返回给前端:{ hostPerson, effectiveFloorsPreview, displayNames, policyVersion, warnings } +``` + +前端**仅展示**第 6 步结果,**不在前端重复实现求交**(防篡改可签短期 token 或仅信服务端字段)。 + +### 2.5 可选:统一「预览」能力(降低集成方重复劳动) + +可在 **第三方 BFF** 或 **intelligent** 增加只读接口(路径示例): + +| 方法 | 路径(示例) | 入参 | 出参 | +|------|----------------|------|------| +| `POST` | `/api/visitor/register/preview-floors` | `businessId`, `hostPersonId`, 可选 `userSelectedZoneIds` | `hostFloors`, `tenantPolicy`, `effectiveZoneIds`, `displayFloors[]`, `policyVersion`, `canSubmit` | + +**契约**:`effectiveZoneIds` 的计算规则须与 P5 调用 `add/visitor` 时组装的 `floorIds` **完全一致**(同一服务端模块单元测试)。 + +### 2.6 P5 派梯开通:与登记页的衔接 + +| 路径 | 做法 | +|------|------| +| **推荐(方案 B)** | 审批通过后,从登记单读出 **快照**或 **用相同函数重算**(若策略允许重算):组装 **`floorIds` = `effectiveZoneIds`**,调用 **`POST /elevator/person/add/visitor`**(或 `ElevatorPersonFeignClient.addVisitor`),走 **UC-02**。 | +| **兜底(方案 C/D)** | 若历史集成方坚持不传 `floorIds`,则由电梯或 intelligent 在服务端求交(见 §4);登记页仍应按 §2.3 展示**与兜底后一致**的预览(通过同一预览 API 或文档约定算法)。 | + +**时间参数**:`begVisitorTime` / `endVisitorTime` 与走查一致,须与登记单有效期对齐。 + +### 2.7 闭环一致性:策略中途变更、重试与幂等 + +| 场景 | 产品建议 | +|------|----------| +| 管理员在**登记草稿未提交**时修改策略 | 下次打开登记页重新走 P0,**以新策略为准**。 | +| 草稿已提交、**待审批**期间策略变更 | 二选一并在需求中写死:**(a)** 审批节点展示「策略已变更请重审」并阻塞直到人工确认;**(b)** 以提交时刻 `policyVersion` **冻结**计算结果,审批通过仍按旧结果开通(需评估合规)。 | +| **审批通过瞬间**策略变更 | P5 使用**出队消息中的快照** `effective_preview_json`,避免 TOCTOU。 | +| 重复点击开通 | `visitorId` + 时间窗幂等;与电梯侧是否已存在规则引用需对齐(可查电梯侧人员规则再调,属增强项)。 | + +### 2.8 端到端泳道图(闭环) + +```mermaid +sequenceDiagram + participant U as 访客用户 + participant FE as 第三方前端 + participant BFF as 第三方BFF + participant Pol as 租户策略存储 + participant Org as 组织 person/detail + participant Zone as 空间 zone/tree|page + participant Reg as 第三方登记库 + participant Apv as 审批流 + participant OrgW as 组织写访客 + participant Elv as 电梯 add/visitor + + U->>FE: 打开登记页 + FE->>BFF: 初始化(被访人personId) + BFF->>Pol: 读策略(businessId) + BFF->>Org: detail(personId) + Org-->>BFF: floorList + BFF->>BFF: computeEffective + opt 展示楼层名 + BFF->>Zone: page/tree(zoneIds) + Zone-->>BFF: names + end + BFF-->>FE: 预览+policyVersion + U->>FE: 填写并提交 + FE->>BFF: 提交草稿 + BFF->>Reg: 持久化快照 + Reg-->>FE: draftId + opt 需审批 + BFF->>Apv: 发起 + Apv-->>BFF: 通过+token + end + BFF->>OrgW: 创建访客→visitorId + BFF->>Elv: add/visitor(visitorId,personId,floorIds=effective,...) + Elv-->>BFF: 成功/失败 + BFF-->>FE: 结果与楼层说明 +``` + +--- + +## 3. 产品方案 + +### 3.1 目标用户与角色 + +| 角色 | 职责 | +|------|------| +| **平台/租户管理员** | 在本机构内配置「访客默认楼层策略」、维护允许的 `zoneId` 列表或与楼栋的映射、查看审计日志。 | +| **被访人员工** | 日常办公权限仍在组织侧维护;不强制要求其理解访客策略。 | +| **访客** | 通过邀约/登记获得限时通行;仅应看到**实际可派梯楼层**(与开通结果一致)。 | +| **运维/实施** | 将「28 楼」等业务语言映射为空间服务中的 **`zoneId`**,并录入策略或导入模板。 | + +### 3.2 用户故事(示例) + +1. **作为租户管理员**,我希望为本机构配置「访客默认仅开放指定楼层集合」,以便满足物业/合规对访客活动范围的要求。 +2. **作为租户管理员**,我希望可选策略为「与员工授权楼层求交」或「固定楼层但必须仍在员工授权内」,以便在**不放大访客权限**的前提下简化配置。 +3. **作为访客业务系统**,在调用电梯开通接口时,我可以在不传 `floorIds` 的情况下仍得到符合租户策略的派梯结果(若采用电梯或 BFF 兜底策略)。 +4. **作为访客**,我在登记完成前看到的「可访问楼层」说明,应与最终开通的楼层**一致**,避免纠纷。 + +### 3.3 策略类型(产品枚举建议) + +| 策略代码(建议) | 产品名称 | 行为摘要 | 适用场景 | +|------------------|----------|----------|----------| +| `HOST_FLOOR_LIST` | 与现网 UC-01 一致 | 不传 `floorIds` 时,等价于被访人 **`floorList` 全集** | 默认租户、未配置策略时的回退 | +| `INTERSECT_ALLOWLIST` | 租户允许列表 ∩ 被访人楼层 | 最终楼层 = **`allowZoneIds` ∩ `floorList`**(交集为空则失败并提示) | **广发基金类**:员工多层、访客只允许接待层等 | +| `FIXED_ZONES` | 固定楼层(仍 ∩ 被访人) | 最终楼层 = **`fixedZoneIds` ∩ `floorList`** | 强固定少量楼层且必须与员工授权一致 | +| `EXPLICIT_ONLY` | 仅显式开通 | 业务侧**必须**传 `floorIds`(等价 UC-02);租户策略关闭「空列表自动补全」 | 金融高敏楼栋 | + +**产品原则(建议写进需求)**:凡涉及「租户默认/固定楼层」的,**最终生效楼层必须 ⊆ 被访人 `floorList`**(安全底线,见第 5 章)。 + +### 3.4 管理端功能清单(MVP → 完整) + +**MVP(最小可用)** + +- 租户级开关:是否启用「访客楼层策略」。 +- 策略类型选择 + **允许楼层多选**(选项数据来自空间树 `/sysetting/zone/tree` 或分页接口,与走查文档一致)。 +- 保存后**审计**:操作人、时间、前后 JSON 快照。 + +**增强** + +- 按**楼栋**分别配置(多栋园区)。 +- 按**被访部门**或**职级**附加规则(优先级:部门规则 > 租户默认)。 +- 导入/导出 CSV(`businessId, zoneName, zoneId`)。 +- 与「访客类型」联动(VIP 可走多层等,需单独权限模型)。 + +### 3.5 验收标准(补充闭环相关) + +| 编号 | 场景 | 期望 | +|------|------|------| +| AC-1 | 租户配置「允许 {28F}」,被访人 `floorList` 含 28F 与其它层 | 不传 `floorIds` 时(若走兜底),访客**仅**开通 28F | +| AC-2 | 同上,被访人 `floorList` **不含** 28F | **开通失败**,返回明确错误(禁止静默落到其它层) | +| AC-3 | 租户未配置策略 | 行为与现网 **UC-01** 一致 | +| AC-4 | 业务显式传 `floorIds`(UC-02) | **以传入为准**(或启用「显式也求交」须在集成合同写明) | +| AC-5 | 注册前 UI 展示楼层 | 与 `add/visitor` **最终生效楼层**一致(含策略与求交) | +| **AC-6** | 登记页初始化与 P5 开通相隔任意时间(策略不变) | **两次 `computeEffective` 结果一致**(或均使用快照) | +| **AC-7** | 仅改展示文案、不改服务端 | **禁止**;展示必须以服务端预览为准 | + +--- + +## 4. 技术方案 + +### 4.1 方案族对比 + +| 方案 | 实现位置 | 优点 | 缺点 | 新租户扩展 | +|------|----------|------|------|------------| +| **A. 组织侧收窄 `floorList`** | `ninca-common-component-organization` | 不改电梯;与 UC-01 完全一致 | 员工本人权限与「访客可继承列表」易混 | 每租户数据治理 | +| **B. 业务/访客层显式传 `floorIds`** | 第三方 BFF:登记页与 P5 **同源计算** | 不改电梯;闭环最清晰(UC-02) | 多调用入口需统一 | 租户表在**业务库** | +| **C. 电梯侧策略引擎** | `PersonRuleServiceImpl.addVisitor` | 直连电梯的旧集成也能兜底 | 电梯存策略、发版耦合 | `businessId` 维表 | +| **D. intelligent BFF** | `intelligent-cwoscomponent-rest` | 不直接改电梯包 | 绕过 intelligent 的直连须约束 | 表可在 intelligent 库 | +| **E. 配置中心** | Nacos 等 | 变更快 | 审计弱 | 适合灰度,长期建议落库 | + +**推荐组合(工程上较稳)** + +1. **首选**:**方案 B** — 第三方 **BFF** 在 **P0 与 P5 共用** `computeEffective`;`add/visitor` **始终传 `floorIds`**。 +2. **可选兜底**:**方案 C 或 D** 仅在 `floorIds` 为空时求交;登记页预览仍应调用**同一预览逻辑**(可部署在 BFF 或 D),避免「兜底路径」与「预览路径」算法分叉。 + +### 4.2 核心算法(推荐伪代码) + +设: + +- `hostFloors` = 组织 `detail` 返回的 `floorList`(可能为空)。 +- `tenantAllow` = 租户配置的允许访客楼层 `zoneId` 集合。 +- `requested` = 调用方传入的 `floorIds`(可能为空)。 + +``` +if requested 非空: + effective = requested // 默认信任;高敏合同可改为 requested ∩ tenantAllow ∩ hostFloors +else: + effective = tenantAllow ∩ hostFloors // 或 policy=HOST 时 tenantAllow 视为全集 +if effective 为空: + 返回业务错误(勿继续 zone page / insert) +``` + +**电梯 `addVisitor` 当前风险点**:补全后未校验空列表即使用 `floorIds.get(0)`。无论采用何种产品方案,**建议在生效列表计算完成后统一做空集校验**,与 [UC-04](访客注册与派梯楼层业务流程走查.md) 治理合并。 + +### 4.3 数据模型草案(租户策略落库) + +```sql +CREATE TABLE tenant_visitor_floor_policy ( + id VARCHAR(32) PRIMARY KEY, + business_id VARCHAR(64) NOT NULL COMMENT '机构/租户 ID', + policy_type VARCHAR(32) NOT NULL, + allow_zone_ids TEXT COMMENT 'JSON 数组 zoneId', + building_id VARCHAR(64) COMMENT '可选', + enabled TINYINT(1) NOT NULL DEFAULT 1, + policy_version BIGINT NOT NULL DEFAULT 1 COMMENT '每次更新+1,供登记快照引用', + remark VARCHAR(256), + created_by VARCHAR(64), + created_at BIGINT, + updated_by VARCHAR(64), + updated_at BIGINT, + UNIQUE KEY uk_biz_building (business_id, building_id) +); +``` + +**缓存**:按 `businessId` 缓存;更新策略时递增 `policy_version` 并使缓存失效。 + +### 4.4 管理 API 草案(REST) + +| 方法 | 路径 | 说明 | +|------|------|------| +| `GET` | `/admin/tenant/{businessId}/visitor-floor-policy` | 查询当前策略 | +| `PUT` | `/admin/tenant/{businessId}/visitor-floor-policy` | 全量更新;**递增** `policy_version` | +| `POST` | `/admin/tenant/{businessId}/visitor-floor-policy/preview` | body:`hostPersonId`;返回与登记页同源结构 | + +### 4.5 电梯服务改造要点(若采用方案 C) + +见前文;补充:**登记页预览若不走电梯**,则电梯内求交逻辑须与 BFF **算法对齐**(共享库或 OpenAPI 生成的客户端 stub 中携带版本号)。 + +### 4.6 「28 楼」与 zoneId 映射 + +- 空间:**`/sysetting/zone/tree`**、**`/sysetting/zone/page`**(走查 §3.2)。 +- 台账:`businessId`、`buildingId`、`display_name`、`zoneId`、生效日期。 + +### 4.7 兼容性与集成契约 + +| 项目 | 建议 | +|------|------| +| **与 UC-02** | 集成合同写明:`floorIds` 非空是否二次求交。 | +| **幂等** | 审批消息带 `draft_id` + `effective_hash`;P5 去重。 | +| **版本** | 请求带 `policyVersion`,与快照比对可告警。 | + +--- + +## 5. 安全与合规 + +1. **权限上界**:访客生效楼层 ⊆ 被访人 **`floorList`**。 +2. **禁止静默降级**:交集为空则失败并记录。 +3. **审计**:策略变更、预览请求、开通请求(可采样)。 +4. **数据隔离**:所有查询带 `businessId`。 + +--- + +## 6. 多租户「默认访客楼层」实现路径综合评估 + +在已具备 **§2 闭环**(登记页初始化 → 快照 → 审批 → `add/visitor`)的前提下,对各实现路径按维度打分(**高 / 中 / 低** 为实施与维护成本或风险的主观分级,供选型会使用)。 + +### 6.1 评估维度说明 + +| 维度 | 含义 | +|------|------| +| **登记页契合** | 能否自然地在 **P0** 提供准确预览、少调接口。 | +| **闭环一致性** | 单源计算、快照、防 TOCTOU 是否易实现。 | +| **新租户成本** | 新开租户时配置、实施、回归工作量。 | +| **入侵性** | 对电梯/组织/第三方存量改动的范围。 | +| **绕过风险** | 存在不经过 BFF 直连电梯时是否仍安全。 | + +### 6.2 综合对比表 + +| 路径 | 登记页契合 | 闭环一致性 | 新租户成本 | 入侵性 | 绕过风险 | 结论 | +|------|------------|------------|------------|--------|----------|------| +| **B:第三方 BFF + 显式 `floorIds`** | **高**(BFF 聚合 detail+策略+zone) | **高**(同函数+快照) | **低**(插策略行 + 空间台账) | **低**(电梯可不改) | **中**(依赖网关禁止直连) | **首推** | +| **D:intelligent 预览 + 转发** | **高** | **高**(预览与转发同模块) | **中**(需发布 intelligent) | **中** | **中** | 适合已统一走 intelligent 的客户 | +| **C:仅电梯兜底** | **低**(预览仍需别处算,否则与 UI 不一致) | **中**(易双算法) | **低** | **高** | **低** | 作**兜底**,不宜单独承担预览 | +| **A:仅组织改 `floorList`** | **中** | **中**(与员工权限耦合) | **高**(组织数据治理难) | **高** | **低** | 仅当组织域已区分访客继承列时考虑 | +| **B + C** | **高** | **高** | **低** | **中** | **低** | **大型项目推荐**:B 主路径 + C 防直连漏传 | + +### 6.3 新租户接入检查清单(SOP) + +1. 在空间服务确认 **`zoneId`** 与接待层名称。 +2. 在租户策略表插入 **`business_id` + `INTERSECT_ALLOWLIST` + allow_zone_ids**(或走管理端保存)。 +3. 第三方 BFF 配置 **Nexus/网关** 指向组织与空间。 +4. 跑通 **P0 预览** 与 **P5 add/visitor** 自动化用例(覆盖 AC-1~AC-7)。 +5. 培训租户管理员:**改策略会影响后续新单**;进行中单据策略见 §2.7。 + +--- + +## 7. 实施路线(建议阶段) + +| 阶段 | 内容 | 产出 | +|------|------|------| +| **0** | 盘点所有 `add/visitor` 入口;登记页是否已有 `detail` 调用 | 调用方与数据项缺口表 | +| **1** | 定稿:§2.3 数据项表 + §2.7 策略变更策略 + AC-6/7 | PRD、接口契约 | +| **2** | 实现 BFF 聚合初始化 + 登记快照 + P5 显式 `floorIds` | 广发基金类租户上线 | +| **3** | 可选:电梯空列表校验 + C/D 兜底 + 监控 | 零 NPE、直连防护 | + +--- + +## 8. 测试用例矩阵(摘录) + +| ID | 阶段 | 条件 | 期望 | +|----|------|------|------| +| T0 | P0 | 被访人无 `floorList` | 预览失败,禁止提交 | +| T1 | P0→P5 | INTERSECT,有交集 | 预览与开通均为交集 | +| T6 | P0→P5 | 审批期间策略变更 + 冻结快照 | 开通结果与提交时预览一致 | +| T7 | P0 | 仅前端改楼层展示 | 服务端拒绝或覆盖(AC-7) | + +(原 T1~T5 矩阵仍适用于纯开通层逻辑,可与上表合并维护。) + +--- + +## 9. 文档版本与维护 + +| 项目 | 内容 | +|------|------| +| 输出路径 | `docs/business/租户访客默认楼层技术产品方案.md` | +| 依据代码 | `maven-cw-elevator-application`、`maven-intelligent-cwoscomponent`;闭环 P4 依赖组织访客 API(仓外) | +| 修订触发 | 登记页字段增减;`person/detail` 字段变更;`add/visitor` 契约变更 | + +--- + +*本文档为方案级输出;组织人员检索、访客建档等接口以实际部署与网关路由为准。表结构与路径在实施前需经安全评审。* diff --git a/docs/business/访客注册与派梯楼层业务流程走查.md b/docs/business/访客注册与派梯楼层业务流程走查.md new file mode 100644 index 00000000..08205af3 --- /dev/null +++ b/docs/business/访客注册与派梯楼层业务流程走查.md @@ -0,0 +1,323 @@ +# 访客注册与派梯楼层:完整业务流程走查 + +> **范围说明**:本文基于当前反编译工作区内的源码(`maven-cw-elevator-application`、`maven-intelligent-cwoscomponent` 等)梳理**接口调用链、业务逻辑与用例**。 +> **访客业务后台**(如「轻舟 / intelligent/three」访客注册、审批流)若不在本仓库,文中以「第三方业务系统」统称,并标明本仓库可见的**被调接口**与**出站 Feign/HTTP**。 + +--- + +## 1. 术语与角色 + +| 术语 | 含义 | +|------|------| +| 第三方业务系统 | 访客注册、邀约、审批等上层应用;可经 intelligent 组件或直接调电梯服务 | +| 组织人员服务 | `ninca-common-component-organization`(可配置),提供人员详情、图库人员绑定等 | +| 空间/区域服务 | `ninca-common` 的 `/sysetting/zone`,提供楼栋-楼层树、分区 page | +| 电梯应用 | `cw-elevator-application`,维护派梯规则 `image_rule_ref`、设备图库绑定等 | +| 被访人 | `personId`,组织侧人员主键 | +| 访客 | `visitorId`,组织侧访客人员主键 | +| 楼层 | 以 **分区/空间 ID**(`zoneId` / `floorId`)表示,与 `PersonResult.floorList` 元素一致 | + +--- + +## 2. 业务总览(从「默认楼层」到「指定楼层」) + +```mermaid +flowchart TB + subgraph third [第三方业务系统] + A[访客注册/邀约完成] + B{是否已知具体楼层 zoneId 列表?} + C[调组织服务拉人员详情] + D[组装 floorIds 显式列表] + end + + subgraph org [组织人员服务 ninca-common-component-organization] + P["POST /component/person/detail"] + I["POST /component/imagestore/person/batchBind 等"] + end + + subgraph intel [intelligent-cwoscomponent-rest 可选] + E["ElevatorPersonService.addVisitor → Feign"] + end + + subgraph elev [电梯 cw-elevator-application] + F["POST /elevator/person/add/visitor"] + G["PersonRuleServiceImpl.addVisitor"] + end + + A --> B + B -->|否 需默认| C + C --> P + P -->|PersonResult.floorList| third + B -->|是 或 已补全| D + D --> E + C --> E + E --> F + F --> G + G -->|缺 floorIds 时内部再调 P 取 floorList| P + G --> I +``` + +**要点**: + +- 「**默认有哪些楼层**」在本仓库电梯侧的实现是:**未传 `floorIds` 时**,调用 **`PersonService.detail`**(Feign → **`POST /component/person/detail`**),取 **`PersonResult.getFloorList()`**,**不是** `PersonResult.defaultFloor` 单字段。 +- 「**第三方设定具体楼层**」:**在请求体中携带非空的 `floorIds`** 调用 **`POST /elevator/person/add/visitor`**(或经 `ElevatorPersonService` 转发),电梯侧**不再**调人员详情补楼层。 + +--- + +## 3. 流程 A:第三方如何获知「默认」楼层(可走的接口) + +第三方若**自行**在注册前展示「被访人默认可达楼层」,应在**组织侧**完成数据拉取;本仓库可见的**权威数据源**为人员详情返回的 **`floorList`**(及可能同时返回的 `defaultFloor`、`floorInfoList` 等,但电梯访客派梯**仅用** `floorList` 补全逻辑)。 + +### 3.1 推荐:人员详情(与电梯补全逻辑一致) + +| 项目 | 内容 | +|------|------| +| 调用方 | 任意有权限的服务;intelligent 中为 `RestPersonServiceImpl` → `PersonFeignClient` | +| 服务名配置 | `${feign.component-organization.name:ninca-common-component-organization}` | +| HTTP | **`POST /component/person/detail`** | +| 请求体 | `PersonDetailParam`:`id` = 被访人 `personId`,`businessId` = 机构 | +| 响应 | `CloudwalkResult`,关注 **`floorList`**(`List` 楼层/分区 ID) | + +代码位置(Feign 声明): + +```19:32:maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/person/feign/PersonFeignClient.java +@FeignClient(name = "${feign.component-organization.name:ninca-common-component-organization}", + path = "/component/person", fallback = PersonFeignClientFallback.class) +public interface PersonFeignClient { + ... + @RequestMapping(value = {"/detail"}, method = {RequestMethod.POST}) + CloudwalkResult detail(@RequestBody PersonDetailParam paramPersonDetailParam); +``` + +`PersonResult` 中与楼层相关的字段(电梯 `addVisitor` **补全时只用 `floorList`**): + +```27:34:maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/person/result/PersonResult.java + private String defaultFloor; + private String chooseFloor; + private List floorList; + private List floorInfoList; + ... + private String defaultChooseFloor; +``` + +### 3.2 辅助:空间树 / 楼层分页(电梯网关或管理端常用) + +| 项目 | 内容 | +|------|------| +| Feign | `ZoneFeignClient` → `${feign.ninca-common.name:ninca-common}` | +| HTTP | **`POST /sysetting/zone/tree`**、**`POST /sysetting/zone/page`** | +| 用途 | 按楼栋展示树、按条件查分区;**不替代**人员已授权楼层列表 | + +```16:23:maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/zone/client/ZoneFeignClient.java +@FeignClient(name = "${feign.ninca-common.name:ninca-common}", path = "/sysetting/zone", + fallback = ZoneFeignClientFallback.class) +public interface ZoneFeignClient { + @RequestMapping(value = {"/tree"}, method = {RequestMethod.POST}) + ... + @RequestMapping(value = {"/page"}, method = {RequestMethod.POST}) + CloudwalkResult> page(ZoneQueryParam paramZoneQueryParam) throws ServiceException; +} +``` + +### 3.3 辅助:通行规则-楼层列表(管理派梯规则维度) + +| 项目 | 内容 | +|------|------| +| Controller | `AcsPassRuleController` | +| HTTP | **`POST /elevator/passRule/floor`** 等 | +| 用途 | 规则/图库与楼层关系维护与查询;与「人员 floorList」不同维度 | + +```45:55:maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/passrule/controller/AcsPassRuleController.java + @RequestMapping({"/floor"}) + public CloudwalkResult> + listFloor(@RequestBody AcsPassRuleFloorForm form) { + ... + return this.imageRuleRefService.listFloor(param, getCloudwalkContext()); +``` + +### 3.4 访客记录查询(识别访客身份,非楼层来源) + +电梯乘梯记录中通过 **RestTemplate** 调 **`intelligent/three/visitor/record/query`**,用于判断是否访客及被访人,**不参与** `addVisitor` 楼层列表计算: + +```262:274:maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/impl/AcsElevatorRecordServiceImpl.java + URI uri = + combineAuthClientURI("intelligent/three/visitor/record/query", (MultiValueMap)null); + VisitorRecordQueryParam form = new VisitorRecordQueryParam(); + form.setVisitorId(addDTO.getRecognitionFaceId()); + ... +``` + +另有 Feign **`VisitorFeignClient`**:`ninca-crk-std` 的 **`/intelligent/visitor/record/query`**,与上为不同网关路径,同属访客记录查询能力。 + +--- + +## 4. 流程 B:第三方设定「具体楼层」并开通访客派梯 + +### 4.1 对外 HTTP(电梯应用) + +| 项目 | 内容 | +|------|------| +| Method / Path | **`POST /elevator/person/add/visitor`** | +| Controller | `AcsPersonController#addVisitor` | +| Body | `AcsPersonAddVisitorForm` → `AcsPersonAddVisitorParam` | + +```53:62:maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/person/controller/AcsPersonController.java + @RequestMapping({"/add/visitor"}) + public CloudwalkResult addVisitor(@RequestBody AcsPersonAddVisitorForm form) { + AcsPersonAddVisitorParam param = + (AcsPersonAddVisitorParam)BeanCopyUtils.copyProperties(form, AcsPersonAddVisitorParam.class); + try { + return this.personRuleService.addVisitor(param, getCloudwalkContext()); +``` + +### 4.2 经 intelligent 的 Feign(业务方 SDK 式调用) + +| 项目 | 内容 | +|------|------| +| 接口 | `ElevatorPersonService.addVisitor` | +| 实现 | `RestElevatorPersonServiceImpl` | +| Feign | `ElevatorPersonFeignClient` | +| 目标 | `${feign.elevator.name:elevator-app}` **`POST /elevator/person/add/visitor`** | + +```11:15:maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/elevator/feign/ElevatorPersonFeignClient.java +@FeignClient(name = "${feign.elevator.name:elevator-app}", path = "/elevator/person", + fallback = ElevatorPersonFeignClientFallback.class) +public interface ElevatorPersonFeignClient { + @RequestMapping(value = {"/add/visitor"}, method = {RequestMethod.POST}) + CloudwalkResult addVisitor(@RequestBody AcsPersonAddVisitorParam paramAcsPersonAddVisitorParam); +``` + +### 4.3 请求字段语义(用例输入) + +| 字段 | 必填性 | 说明 | +|------|--------|------| +| `visitorId` | 是 | 访客在组织侧人员 ID | +| `personId` | 是 | 被访人 ID;**补全楼层时**用于 `detail` | +| `begVisitorTime` / `endVisitorTime` | 视图库接口 | 传入图库绑定有效期 | +| `floorIds` | 否 | **非空**:第三方显式指定可派梯楼层;**空/缺省**:由电梯侧按被访人 **`floorList`** 补全 | + +--- + +## 5. 电梯侧核心业务逻辑:`PersonRuleServiceImpl.addVisitor` + +实现类:`PersonRuleServiceImpl`(`maven-cw-elevator-application/.../PersonRuleServiceImpl.java`)。 + +### 5.1 步骤分解 + +| 步骤 | 逻辑 | 外部依赖 | +|------|------|----------| +| 1 | 若 `floorIds` 为空 → `PersonDetailParam(personId, businessId)` → **`personService.detail`** | Feign → **`POST /component/person/detail`**,取 **`getFloorList()`** 赋给 `floorIds` | +| 2 | 用 **`floorIds.get(0)`** 构造 `ZoneQueryParam`,**`zoneService.page`** 查分区页,取首条 `ZoneResult` 得 **`parentId`(楼栋)** | Feign → **`POST /sysetting/zone/page`** | +| 3 | **`deviceImageStoreDao.getByBuildingId(parentId)`** 得图库 `imageStoreId` | 本地 DAO | +| 4 | 对 **每个 `floorId`**:`imageRuleRefDao.getDefaultByZoneId(floorId)` 取默认通行规则,组装 **`ImageRuleRefAddDto`**(访客 `visitorId` 挂父规则) | 本地 DAO | +| 5 | **`imageRuleRefDao.insertList`** 批量写入派梯规则引用 | 本地 DAO | +| 6 | 组装 **`ImageStorePersonBindParam`**(图库、访客 ID、有效期),**`imageStorePersonService.batchBind`** | Feign → **`POST /component/imagestore/person/batchBind`** | +| 7 | **`imageStorePersonService.updateGroupPersonRef`** 更新组与人员引用 | Feign → **`POST /component/imagestore/person/updateGroupPersonRef`** | + +关键代码(补全楼层 + 循环写规则 + 绑图库): + +```170:223:maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/impl/PersonRuleServiceImpl.java + if (CollectionUtils.isEmpty(param.getFloorIds())) { + PersonDetailParam detailParam = new PersonDetailParam(); + detailParam.setId(param.getPersonId()); + detailParam.setBusinessId(context.getCompany().getCompanyId()); + CloudwalkResult detail = this.personService.detail(detailParam, context); + param.setFloorIds(((PersonResult)detail.getData()).getFloorList()); + } + ZoneQueryParam zoneQueryParam = new ZoneQueryParam(); + zoneQueryParam.setId(param.getFloorIds().get(0)); + ... + for (String floorId : param.getFloorIds()) { + ImageRuleRefResultDto defaultRule = this.imageRuleRefDao.getDefaultByZoneId(floorId); + ... + addDto.setPersonId(param.getVisitorId()); + ... + } + ... + CloudwalkResult bindResult = + this.imageStorePersonService.batchBind(imageStorePersonBindParam, context); + ... + this.imageStorePersonService.updateGroupPersonRef(refParam, context); +``` + +图库 Feign(与上表一致): + +```19:41:maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/imagestore/feign/ImageStorePersonFeignClient.java +@FeignClient(name = "${feign.component-organization.name:ninca-common-component-organization}", + path = "/component/imagestore/person", fallback = ImageStorePersonFeignClientFallback.class) +public interface ImageStorePersonFeignClient { + ... + @RequestMapping(value = {"/batchBind"}, method = {RequestMethod.POST}) + CloudwalkResult + batchBind(@RequestBody ImageStorePersonBindParam paramImageStorePersonBindParam); + @RequestMapping(value = {"/updateGroupPersonRef"}, method = {RequestMethod.POST}) + CloudwalkResult + updateGroupPersonRef(@RequestBody UpdateGroupPersonRefParam paramUpdateGroupPersonRefParam); +``` + +### 5.2 与「内部员工」派梯开通的对比(非访客) + +**`POST /elevator/person/add`** → `PersonRuleServiceImpl.add`:按**单个** `zoneId`(楼层)与 `parentId`(楼栋)给多名 **`personIds`** 写规则并绑图库;**不**调人员 `detail` 取 `floorList`。用于从已有人员批量加通行权限的另一条业务线。 + +```79:136:maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/impl/PersonRuleServiceImpl.java + public CloudwalkResult add(AcsPersonAddParam param, CloudwalkCallContext context) throws ServiceException { + ... + ImageRuleRefResultDto defaultRule = this.imageRuleRefDao.getDefaultByZoneId(param.getZoneId()); + ... + for (String personId : param.getPersonIds()) { + ... + addDto.setZoneId(param.getZoneId()); +``` + +--- + +## 6. 接口调用流转汇总表 + +| 序号 | 调用方向 | 协议与路径 | 典型触发 | +|------|----------|------------|----------| +| 1 | 第三方 / intelligent → 电梯 | `POST /elevator/person/add/visitor` | 访客开通派梯 | +| 2 | 电梯 → 组织 | `POST /component/person/detail` | `floorIds` 为空时补全 | +| 3 | 电梯 → 空间 | `POST /sysetting/zone/page` | 取楼层所属楼栋 | +| 4 | 电梯 → 组织 | `POST /component/imagestore/person/batchBind` | 访客绑图库 | +| 5 | 电梯 → 组织 | `POST /component/imagestore/person/updateGroupPersonRef` | 更新组人关系 | +| 6 | 第三方自行(可选) | `POST /component/person/detail` | 注册前展示默认可达楼层 | +| 7 | 管理端(可选) | `POST /elevator/passRule/floor` 等 | 规则/楼层维护 | +| 8 | 电梯 → 网关 HTTP | `POST intelligent/three/visitor/record/query` | 乘梯记录识别访客 | + +--- + +## 7. 用例(UC)说明 + +| 用例 ID | 名称 | 前置条件 | 主流程 | 期望结果 | +|---------|------|----------|--------|----------| +| UC-01 | 访客派梯-使用被访人默认楼层列表 | 被访人 `personId` 在组织侧 `detail` 返回**非空** `floorList`;访客已注册 | 调 `add/visitor` 且 **不传 `floorIds`** | 电梯取 `floorList` 为访客写入各层默认规则并绑图库 | +| UC-02 | 访客派梯-第三方指定楼层 | `floorIds` 为合法 zoneId 列表 | 调 `add/visitor` 且 **传入 `floorIds`** | **不再**调 `person/detail` 补楼层;按列表写规则 | +| UC-03 | 注册前展示「可访楼层」 | 需与被访人授权一致 | 第三方先调 **`/component/person/detail`**,展示 `floorList`(或产品定义的 `defaultFloor` 映射) | UI 与电梯补全逻辑对齐(若仅用 `defaultFloor` 需与产品确认是否与 `floorList` 一致) | +| UC-04 | `floorList` 为空 | 被访人无派梯楼层 | `add/visitor` 不传 `floorIds` | `floorIds` 仍为空 → 后续 `get(0)` 等**可能异常**;第三方应校验或传显式楼层 | +| UC-05 | 内部人员加单层派梯 | 已知 `zoneId`、楼栋 `parentId` | `POST /elevator/person/add` | 单层规则 + 图库绑定 | +| UC-06 | 乘梯记录标记访客 | 识别到人脸 | 记录服务调 **`visitor/record/query`** | 回填 `isVisitor`、被访人 | + +**扩展(租户访客默认楼层)**:若需「在 UC-01 不传 `floorIds` 的前提下,按租户策略收敛访客楼层(如默认仅开放某接待层)」的产品与技术设计,以及**从第三方登记页初始化数据项、接口编排到 `add/visitor` 的端到端闭环**,见 [租户访客默认楼层技术产品方案](租户访客默认楼层技术产品方案.md)(文中 **§2**)。 + +--- + +## 8. 风险与待确认项(走查结论) + +1. **`PersonResult.defaultFloor` 与 `floorList`**:电梯 `addVisitor` **仅使用 `floorList`**。若产品「默认访问楼层」对应 `defaultFloor` 标量,需核对组织服务是否在 `detail` 中把二者对齐,否则存在**语义偏差**。 +2. **`floorIds.get(0)`**:补全后若列表为空,会在取首元素时失败;第三方或组织数据需保证一致性。 +3. **`cwos-sdk-event` 等**与本文无关的依赖问题不影响本业务链结论。 +4. **访客注册主流程**(表单、审批、写组织人员表)若在三方工程,需在对应仓库继续搜 **`ElevatorPersonService`**、**`addVisitor`**、**`/elevator/person/add/visitor`** 的引用以闭合「从注册到派梯」的端到端文档。 + +--- + +## 9. 文档版本信息 + +| 项目 | 内容 | +|------|------| +| 输出路径 | `docs/business/访客注册与派梯楼层业务流程走查.md` | +| 依据代码根目录 | `maven-cw-elevator-application`、`maven-intelligent-cwoscomponent` | +| 说明 | 外部服务行为以接口契约为准,组织服务内部如何组装 `floorList` 需在 **ninca-common-component-organization** 源码中二次走查 | + +--- + +*本文档由代码走查自动生成梳理,若接口路径随部署配置变化,请以运行环境 `application*.yml` 中 `feign.*` 为准。* diff --git a/docs/operations/deploy_cw_elevator_v1_lib_to_nexus.py b/docs/operations/deploy_cw_elevator_v1_lib_to_nexus.py new file mode 100755 index 00000000..fdfb0422 --- /dev/null +++ b/docs/operations/deploy_cw_elevator_v1_lib_to_nexus.py @@ -0,0 +1,150 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +""" +将 cw-elevator-application-V1.0.0.20211103/lib 下全部 JAR 作为初始构件上传到 Nexus。 + +脚本位置:docs/operations/deploy_cw_elevator_v1_lib_to_nexus.py(与文档同目录,便于运维查找)。 + +规则: +1. 若 JAR 内含 META-INF/maven/**/pom.properties,则使用其中的 groupId / artifactId / version。 +2. 否则使用后备坐标:cn.cloudwalk.elevator.v1.bootlib:<文件名去 .jar>:V1.0.0.20211103 + (保证与 Maven Central 坐标不冲突,且一文件一构件。) + +version 含 SNAPSHOT 时上传到 maven-snapshots,否则 maven-releases。 +需 ~/.m2/settings.xml 中配置 server id:nexus-releases、nexus-snapshots(与 URL 对应)。 +""" +from __future__ import annotations + +import argparse +import os +import subprocess +import sys +import zipfile +from pathlib import Path + + +DEFAULT_LIB = Path( + "/media/zebra/9e8fa357-7db6-4d70-88ed-d5de5a059a663/星河湾星中星/反编译" + "/cw-elevator-application-V1.0.0.20211103/lib" +) +RELEASES_URL = "http://192.168.3.12:8081/repository/maven-releases/" +SNAPSHOTS_URL = "http://192.168.3.12:8081/repository/maven-snapshots/" +RELEASES_ID = "nexus-releases" +SNAPSHOTS_ID = "nexus-snapshots" +FALLBACK_GROUP = "cn.cloudwalk.elevator.v1.bootlib" +FALLBACK_VERSION = "V1.0.0.20211103" + + +def read_maven_coords(jar: Path) -> tuple[str, str, str] | None: + try: + with zipfile.ZipFile(jar, "r") as zf: + for name in zf.namelist(): + if name.endswith("pom.properties") and "META-INF/maven" in name.replace( + "\\", "/" + ): + raw = zf.read(name).decode("utf-8", errors="replace") + props: dict[str, str] = {} + for line in raw.splitlines(): + line = line.strip() + if not line or line.startswith("#") or "=" not in line: + continue + k, _, v = line.partition("=") + props[k.strip()] = v.strip() + gid = props.get("groupId") + aid = props.get("artifactId") + ver = props.get("version") + if gid and aid and ver: + return gid, aid, ver + except (zipfile.BadZipFile, OSError): + return None + return None + + +def fallback_coords(jar: Path) -> tuple[str, str, str]: + stem = jar.name[:-4] if jar.name.lower().endswith(".jar") else jar.name + return FALLBACK_GROUP, stem, FALLBACK_VERSION + + +def is_snapshot_version(version: str) -> bool: + return "SNAPSHOT" in version.upper() + + +def deploy_one( + jar: Path, + group_id: str, + artifact_id: str, + version: str, + dry_run: bool, +) -> int: + url = SNAPSHOTS_URL if is_snapshot_version(version) else RELEASES_URL + rid = SNAPSHOTS_ID if is_snapshot_version(version) else RELEASES_ID + cmd = [ + "mvn", + "-q", + "deploy:deploy-file", + f"-DrepositoryId={rid}", + f"-Durl={url}", + f"-Dfile={jar}", + f"-DgroupId={group_id}", + f"-DartifactId={artifact_id}", + f"-Dversion={version}", + "-Dpackaging=jar", + "-DgeneratePom=true", + ] + if dry_run: + print("DRY-RUN:", " ".join(cmd)) + return 0 + r = subprocess.run(cmd, capture_output=True, text=True) + if r.returncode != 0: + combined = (r.stdout or "") + (r.stderr or "") + # Nexus maven-releases 对已存在 release 坐标禁止覆盖 + if "cannot be updated" in combined: + print(f"SKIP (already in repo): {jar.name} -> {group_id}:{artifact_id}:{version}") + return 0 + sys.stderr.write(f"FAIL {jar.name} -> {group_id}:{artifact_id}:{version}\n") + if r.stdout: + sys.stderr.write(r.stdout) + if r.stderr: + sys.stderr.write(r.stderr) + return r.returncode + + +def main() -> int: + p = argparse.ArgumentParser(description="Deploy all JARs from elevator V1 lib to Nexus.") + p.add_argument( + "--lib", + type=Path, + default=DEFAULT_LIB, + help="Directory containing .jar files", + ) + p.add_argument("--dry-run", action="store_true", help="Print mvn commands only") + args = p.parse_args() + lib: Path = args.lib + if not lib.is_dir(): + print("Not a directory:", lib, file=sys.stderr) + return 2 + jars = sorted(lib.glob("*.jar")) + if not jars: + print("No JAR files in", lib, file=sys.stderr) + return 2 + ok, fail = 0, 0 + for i, jar in enumerate(jars, 1): + coords = read_maven_coords(jar) + if coords: + gid, aid, ver = coords + src = "embedded" + else: + gid, aid, ver = fallback_coords(jar) + src = "fallback" + print(f"[{i}/{len(jars)}] {jar.name} -> {gid}:{aid}:{ver} ({src})") + rc = deploy_one(jar, gid, aid, ver, args.dry_run) + if rc == 0: + ok += 1 + else: + fail += 1 + print(f"Done. ok={ok} fail={fail}") + return 0 if fail == 0 else 1 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/docs/style/alibaba-eclipse-codestyle.xml b/docs/style/alibaba-eclipse-codestyle.xml new file mode 100644 index 00000000..0faa9575 --- /dev/null +++ b/docs/style/alibaba-eclipse-codestyle.xml @@ -0,0 +1,603 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/maven-cloudwalk-cloud/cloudwalk-cloud-common/pom.xml b/maven-cloudwalk-cloud/cloudwalk-cloud-common/pom.xml new file mode 100644 index 00000000..7e3b5e34 --- /dev/null +++ b/maven-cloudwalk-cloud/cloudwalk-cloud-common/pom.xml @@ -0,0 +1,19 @@ + + + 4.0.0 + + + org.springframework.boot + spring-boot-starter-parent + 2.1.18.RELEASE + + + + cn.cloudwalk.cloud + cloudwalk-cloud-common + 3.7.2-Brussels-SRX + pom + cloudwalk-cloud-common (stub parent) + 与历史/私服已发布 JAR 中声明的 parent 对齐;反编译聚合工程见 cloudwalk-cloud-decompiled-reactor。 + diff --git a/maven-cloudwalk-cloud/cloudwalk-common-event/pom.xml b/maven-cloudwalk-cloud/cloudwalk-common-event/pom.xml new file mode 100644 index 00000000..24daa578 --- /dev/null +++ b/maven-cloudwalk-cloud/cloudwalk-common-event/pom.xml @@ -0,0 +1,73 @@ + + + 4.0.0 + + + cn.cloudwalk.cloud + cloudwalk-cloud-decompiled-reactor + 3.7.2-Brussels-SRX + ../pom.xml + + + cloudwalk-common-event + jar + 云从科技-消息总线封装(源码已迁入本模块 src/main/java) + + + ${project.basedir}/../../docs/style/alibaba-eclipse-codestyle.xml + + + + + org.apache.kafka + kafka-clients + + + cn.cloudwalk.cloud + cwos-sdk-event + + + + org.reflections + reflections-maven + + + + + org.springframework.boot + spring-boot-autoconfigure + + + org.springframework.boot + spring-boot-configuration-processor + true + + + commons-logging + commons-logging + + + org.slf4j + slf4j-api + + + ch.qos.logback + logback-classic + + + org.springframework.boot + spring-boot-starter-test + test + + + + + + + net.revelc.code.formatter + formatter-maven-plugin + + + + diff --git a/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/CloudwalkEventInitializing.java b/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/CloudwalkEventInitializing.java new file mode 100644 index 00000000..bf939cf0 --- /dev/null +++ b/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/CloudwalkEventInitializing.java @@ -0,0 +1,361 @@ +package cn.cloudwalk.event; + +import cn.cloudwalk.cwos.client.event.EventClient; +import cn.cloudwalk.cwos.client.event.event.BaseEvent; +import cn.cloudwalk.cwos.client.event.event.CustomEvent; +import cn.cloudwalk.cwos.client.event.event.EventType; +import cn.cloudwalk.cwos.client.event.handler.EventListener; +import cn.cloudwalk.event.annotation.ConsumerGroup; +import cn.cloudwalk.event.annotation.CustomTopic; +import cn.cloudwalk.event.annotation.EventTopicSuffix; +import cn.cloudwalk.event.autoconfig.EventProperties; +import cn.cloudwalk.event.handler.CustomEventHandler; +import cn.cloudwalk.event.handler.EventHandler; +import cn.cloudwalk.event.handler.EventHandlerMapping; +import cn.cloudwalk.event.handler.EventHandlerWorker; +import cn.cloudwalk.event.handler.NamedThreadFactory; +import cn.cloudwalk.event.listener.CloudwalkEventListener; +import cn.cloudwalk.event.listener.GroupEventListener; +import cn.cloudwalk.event.listener.GroupListnerClassMapping; +import java.lang.reflect.ParameterizedType; +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.concurrent.SynchronousQueue; +import java.util.concurrent.ThreadFactory; +import java.util.concurrent.ThreadPoolExecutor; +import java.util.concurrent.TimeUnit; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.BeansException; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.CommandLineRunner; +import org.springframework.context.ApplicationContext; +import org.springframework.core.env.Environment; +import org.springframework.util.CollectionUtils; +import org.springframework.util.StringUtils; + +/** + * 应用启动阶段扫描 Spring 容器中的监听器与处理器,构建 {@link cn.cloudwalk.event.handler.EventHandlerMapping} 等运行时结构。 + */ +public class CloudwalkEventInitializing implements CommandLineRunner { + private static final Logger LOGGER = LoggerFactory.getLogger(CloudwalkEventInitializing.class); + @Autowired(required = false) + private List eventHandlers; + @Autowired + private CloudwalkEventManager cloudwalkEventManager; + @Autowired + private Environment environment; + private static final Pattern pattern = Pattern.compile("^\\$\\{(.*?)\\}$"); + private static final String DEFAULT_SUFFIX = ""; + private String defaultGroup; + private EventClient defaultEventClient; + private Map eventClientMap = new HashMap<>(); + private EventProperties eventProperties; + private static boolean isHandlerEnable = false; + + public void run(String... args) throws Exception { + init(); + } + + public void init() throws Exception { + initEventClient(); + initHandlerMapping(); + initHandlerExecutor(); + subscribeEvent(); + } + + public CloudwalkEventInitializing(EventProperties eventProperties) { + this.eventProperties = eventProperties; + } + + private void initEventClient() throws ClassNotFoundException { + String[] groupIds = this.eventProperties.getGroupId().split(","); + if (groupIds.length == 0) { + throw new IllegalArgumentException("消费组ID不能为空"); + } + Map listenerClassMap = this.eventProperties.getListenerClass(); + GroupListnerClassMapping groupListnerClassMapping = new GroupListnerClassMapping(); + for (int i = 0; i < groupIds.length; i++) { + Class listenerClass; + boolean isFirst = (i == 0); + String groupId = groupIds[i]; + if (null == listenerClassMap || StringUtils.isEmpty(listenerClassMap.get(groupId))) { + if (isFirst) { + listenerClass = CloudwalkEventListener.class; + } else { + throw new IllegalArgumentException( + String.format("groupId[%s]缺少listener-class的配置", new Object[] {groupId})); + } + } else { + listenerClass = (Class)Class.forName(listenerClassMap.get(groupId)); + } + initEventClient(this.eventProperties.getBootstrapServers(), groupId, listenerClass, isFirst); + groupListnerClassMapping.register(listenerClass, groupId); + } + this.cloudwalkEventManager.setGroupListnerClassMapping(groupListnerClassMapping); + this.cloudwalkEventManager.setEventClient(this.defaultEventClient); + } + + @Autowired + public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { + GroupEventListener.applicationContext = applicationContext; + } + + private List extractGroupIds(EventHandler eventHandler) { + if (eventHandler.getClass().isAnnotationPresent((Class)ConsumerGroup.class)) { + ConsumerGroup consumerGroup = eventHandler.getClass().getAnnotation(ConsumerGroup.class); + List groupIds = new LinkedList<>(); + for (String groupId : consumerGroup.groupIds()) { + Matcher matcher = pattern.matcher(groupId); + if (matcher.find()) { + String propertyKey = groupId.substring(2, groupId.length() - 1).trim(); + String propertyValue = this.environment.getProperty(propertyKey); + if (!StringUtils.isEmpty(propertyValue)) { + groupId = propertyValue; + } + } + groupIds.add(groupId); + } + return groupIds; + } + return new ArrayList<>(Collections.singletonList(this.defaultGroup)); + } + + private void initHandlerMapping() { + if (CollectionUtils.isEmpty(this.eventHandlers)) { + return; + } + isHandlerEnable = true; + EventHandlerMapping eventHandlerMapping = new EventHandlerMapping(); + for (EventHandler handler : this.eventHandlers) { + if (handler.getClass().isAnnotationPresent((Class)EventTopicSuffix.class)) { + Type type = handler.getClass().getGenericInterfaces()[0]; + ParameterizedType p = (ParameterizedType)type; + Class eventClass = (Class)p.getActualTypeArguments()[0]; + EventTopicSuffix eventTopicSuffix = + handler.getClass().getAnnotation(EventTopicSuffix.class); + registerHandlerMapping(eventHandlerMapping, handler, eventClass, eventTopicSuffix.value()); + continue; + } + if (handler.getClass().isAnnotationPresent((Class)CustomTopic.class)) { + CustomTopic customTopic = handler.getClass().getAnnotation(CustomTopic.class); + String topic = customTopic.topic(); + if (StringUtils.isEmpty(topic)) { + continue; + } + registerCustomHandlerMapping(eventHandlerMapping, (EventHandler)handler, topic, customTopic.suffix()); + } + } + this.cloudwalkEventManager.setEventHandlerMapping(eventHandlerMapping); + } + + private void initHandlerExecutor() { + if (isHandlerEnable) { + EventHandlerWorker eventHandlerWorker = new EventHandlerWorker(); + EventProperties.HandlerExecutorConfig handlerExecutorConfig = + this.eventProperties.getHandlerExecutorConfig(); + eventHandlerWorker + .setPoolExecutor(new ThreadPoolExecutor(handlerExecutorConfig.getCorePoolSize().intValue(), + handlerExecutorConfig.getMaximumPoolSize().intValue(), 1000L, TimeUnit.MILLISECONDS, + new SynchronousQueue<>(), + (ThreadFactory)new NamedThreadFactory(this.eventProperties.getWorkerNamePrefix()), + new ThreadPoolExecutor.CallerRunsPolicy())); + this.cloudwalkEventManager.setEventHandlerWorker(eventHandlerWorker); + } + } + + private EventType getEventType(Class eventClass) { + for (EventType eventType : EventType.values()) { + if (eventType.getEventClass().getClass().equals(eventClass)) { + return eventType; + } + } + return null; + } + + private void subscribeEvent() throws IllegalAccessException, InstantiationException { + EventHandlerMapping eventHandlerMapping = this.cloudwalkEventManager.getEventHandlerMapping(); + Map>> subscribedMap = new HashMap<>(); + for (Map.Entry>>> entry : (Iterable< + Map.Entry>>>>)eventHandlerMapping.getHandlerMap() + .entrySet()) { + for (Map.Entry>> eventTypeMapEntry : (Iterable< + Map.Entry>>>)((Map)entry.getValue()).entrySet()) { + for (Object serviceCodeObj : ((Map)eventTypeMapEntry.getValue()).keySet()) { + String serviceCode = (String)serviceCodeObj; + subscribe(subscribedMap, entry.getKey(), eventTypeMapEntry.getKey(), serviceCode); + } + } + } + Map>> customSubscribedMap = new HashMap<>(); + for (Map.Entry>>> entry : (Iterable< + Map.Entry>>>>)eventHandlerMapping + .getCustomHandlerMap().entrySet()) { + for (Map.Entry>> subEntry : (Iterable< + Map.Entry>>>)((Map)entry.getValue()).entrySet()) { + for (Map.Entry> handlerEntry : (Iterable< + Map.Entry>>)((Map)subEntry.getValue()).entrySet()) { + for (CustomEventHandler customEventHandler : handlerEntry.getValue()) { + Type type = customEventHandler.getClass().getGenericInterfaces()[0]; + ParameterizedType p = (ParameterizedType)type; + Class eventClass = (Class)p.getActualTypeArguments()[0]; + customSubscribe(customSubscribedMap, entry.getKey(), subEntry.getKey(), handlerEntry.getKey(), + eventClass); + } + } + } + } + } + + private void subscribe(Map>> subscribedMap, String groupId, EventType eventType, + String serviceCode) { + if (StringUtils.isEmpty(groupId)) { + groupId = this.defaultGroup; + } + Map> eventTypeServiceCodeMap = subscribedMap.get(groupId); + if (null != eventTypeServiceCodeMap) { + Set serviceCodesSet = eventTypeServiceCodeMap.get(eventType); + if (CollectionUtils.isEmpty(serviceCodesSet)) { + eventTypeServiceCodeMap.put(eventType, new HashSet<>(Collections.singleton(serviceCode))); + } else { + serviceCodesSet.add(serviceCode); + } + } else { + eventTypeServiceCodeMap = new HashMap<>(); + eventTypeServiceCodeMap.put(eventType, new HashSet<>(Collections.singleton(serviceCode))); + subscribedMap.put(groupId, eventTypeServiceCodeMap); + } + ((EventClient)this.eventClientMap.get(groupId)).subEvent(eventType, serviceCode); + } + + private void customSubscribe(Map>> customSubscribedMap, String groupId, + String topic, String serviceCode, Class eventClass) + throws IllegalAccessException, InstantiationException { + if (StringUtils.isEmpty(groupId)) { + groupId = this.defaultGroup; + } + Map> topicServiceCodeMap = customSubscribedMap.get(groupId); + if (null != topicServiceCodeMap) { + Set serviceCodesSet = topicServiceCodeMap.get(topic); + if (CollectionUtils.isEmpty(serviceCodesSet)) { + topicServiceCodeMap.put(topic, new HashSet<>(Collections.singleton(serviceCode))); + } else { + serviceCodesSet.add(serviceCode); + } + } else { + topicServiceCodeMap = new HashMap<>(); + topicServiceCodeMap.put(topic, new HashSet<>(Collections.singleton(serviceCode))); + customSubscribedMap.put(groupId, topicServiceCodeMap); + } + EventClient eventClient = this.eventClientMap.get(groupId); + if (null == eventClient) { + throw new IllegalArgumentException( + String.format("没有找到groupId[%s]对应的配置,请检查 ${cloudwalk.event.group-id} 配置", new Object[] {groupId})); + } + eventClient.subEvent(topic, serviceCode, eventClass.newInstance()); + } + + private void initEventClient(String bootstrapServers, String groupId, Class listenerClass, + boolean isDefault) { + EventClient eventClient = this.eventClientMap.get(groupId); + if (null == eventClient) { + eventClient = EventClient.getInstance(bootstrapServers, groupId); + eventClient.init(); + if (null != this.eventProperties.getFetchDataWorkerNumber()) { + eventClient.setWorkNum(this.eventProperties.getFetchDataWorkerNumber()); + } + eventClient.setListenerClass(listenerClass); + this.eventClientMap.put(groupId, eventClient); + } + if (isDefault) { + this.defaultGroup = groupId; + this.defaultEventClient = eventClient; + } + } + + private void registerHandlerMapping(EventHandlerMapping eventHandlerMapping, + EventHandler handler, Class eventClass, String[] suffixes) { + List groupIds = extractGroupIds(handler); + EventType eventType = getEventType(eventClass); + for (String groupId : groupIds) { + Map> handlers = + eventHandlerMapping.getServiceCodeHandlerListMap(groupId, eventType); + if (CollectionUtils.isEmpty(handlers)) { + handlers = new HashMap<>(); + if (null == suffixes || suffixes.length == 0) { + handlers.put("", new ArrayList(Collections.singletonList((EventHandler)handler))); + } else { + for (String suffix : suffixes) { + handlers.put(suffix, new ArrayList(Collections.singletonList((EventHandler)handler))); + } + } + eventHandlerMapping.registerHandlers(groupId, eventType, handlers); + continue; + } + if (null == suffixes || suffixes.length == 0) { + List currentHandlers = handlers.get(""); + if (CollectionUtils.isEmpty(currentHandlers)) { + currentHandlers = new ArrayList<>(); + } + currentHandlers.add(handler); + handlers.put("", currentHandlers); + continue; + } + for (String suffix : suffixes) { + List currentHandlers = handlers.get(suffix); + if (CollectionUtils.isEmpty(currentHandlers)) { + currentHandlers = new ArrayList<>(); + } + currentHandlers.add(handler); + handlers.put(suffix, currentHandlers); + } + } + } + + private void registerCustomHandlerMapping(EventHandlerMapping eventHandlerMapping, + EventHandler handler, String topic, String serviceCode) { + List groupIds = extractGroupIds(handler); + for (String groupId : groupIds) { + Map> customHandlers = + eventHandlerMapping.getServiceCodeCustomHandlerListMap(groupId, topic); + if (null == customHandlers) { + customHandlers = new HashMap<>(); + if (StringUtils.isEmpty(topic)) { + customHandlers.put("", + new ArrayList( + Collections.singletonList((CustomEventHandler)handler))); + } else { + customHandlers.put(serviceCode, + new ArrayList( + Collections.singletonList((CustomEventHandler)handler))); + } + eventHandlerMapping.registerCustomHandlers(groupId, topic, customHandlers); + continue; + } + if (StringUtils.isEmpty(serviceCode)) { + List list = customHandlers.get(""); + if (CollectionUtils.isEmpty(list)) { + list = new ArrayList<>(); + } + list.add((CustomEventHandler)handler); + customHandlers.put("", list); + continue; + } + List currentHandlers = customHandlers.get(serviceCode); + if (CollectionUtils.isEmpty(currentHandlers)) { + currentHandlers = new ArrayList<>(); + } + currentHandlers.add((CustomEventHandler)handler); + customHandlers.put(serviceCode, currentHandlers); + } + } +} diff --git a/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/CloudwalkEventManager.java b/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/CloudwalkEventManager.java new file mode 100644 index 00000000..bbba9b0b --- /dev/null +++ b/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/CloudwalkEventManager.java @@ -0,0 +1,76 @@ +package cn.cloudwalk.event; + +import cn.cloudwalk.cwos.client.event.EventClient; +import cn.cloudwalk.cwos.client.event.event.BaseEvent; +import cn.cloudwalk.cwos.client.event.event.CustomEvent; +import cn.cloudwalk.event.handler.CustomEventHandler; +import cn.cloudwalk.event.handler.EventHandler; +import cn.cloudwalk.event.handler.EventHandlerMapping; +import cn.cloudwalk.event.handler.EventHandlerWorker; +import cn.cloudwalk.event.listener.GroupEventListener; +import cn.cloudwalk.event.listener.GroupListnerClassMapping; +import cn.cloudwalk.event.task.EventHandleTask; +import java.util.List; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.util.CollectionUtils; + +/** + * 事件派发入口:基于 {@link cn.cloudwalk.event.handler.EventHandlerMapping} 选择处理器并委托 + * {@link cn.cloudwalk.event.handler.EventHandlerWorker} 执行。 + */ +public class CloudwalkEventManager { + private static final Logger LOGGER = LoggerFactory.getLogger(CloudwalkEventManager.class); + private EventHandlerMapping eventHandlerMapping; + private EventHandlerWorker eventHandlerWorker; + private GroupListnerClassMapping groupListnerClassMapping; + private EventClient eventClient; + + public void handle(Class eventListnerClass, BaseEvent baseEvent) { + String groupId = this.groupListnerClassMapping.getGroupId(eventListnerClass); + if (baseEvent instanceof CustomEvent) { + List customEventHandlers = (List)this.eventHandlerMapping + .getServiceCodeCustomHandlerListMap(groupId, ((CustomEvent)baseEvent).getTopic()) + .get(baseEvent.getServiceCode()); + eventHandle(baseEvent, customEventHandlers); + return; + } + List handlerList = (List)this.eventHandlerMapping + .getServiceCodeHandlerListMap(groupId, baseEvent.getClass()).get(baseEvent.getServiceCode()); + eventHandle(baseEvent, handlerList); + } + + private void eventHandle(BaseEvent baseEvent, List handlers) { + if (CollectionUtils.isEmpty(handlers)) { + LOGGER.error("没有相应的事件处理程序"); + return; + } + for (EventHandler eventHandler : handlers) { + this.eventHandlerWorker.work(new EventHandleTask(baseEvent, eventHandler)); + } + } + + public void publish(BaseEvent baseEvent) { + this.eventClient.pubEvent(baseEvent); + } + + public void setEventHandlerMapping(EventHandlerMapping eventHandlerMapping) { + this.eventHandlerMapping = eventHandlerMapping; + } + + public EventHandlerMapping getEventHandlerMapping() { + return this.eventHandlerMapping; + } + + public void setEventHandlerWorker(EventHandlerWorker eventHandlerWorker) { + this.eventHandlerWorker = eventHandlerWorker; + } + + public void setEventClient(EventClient eventClient) { + this.eventClient = eventClient; + } + + public void setGroupListnerClassMapping(GroupListnerClassMapping groupListnerClassMapping) { + this.groupListnerClassMapping = groupListnerClassMapping; + } +} diff --git a/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/EnableCloudwalkEvent.java b/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/EnableCloudwalkEvent.java new file mode 100644 index 00000000..60aa6a68 --- /dev/null +++ b/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/EnableCloudwalkEvent.java @@ -0,0 +1,18 @@ +package cn.cloudwalk.event; + +import cn.cloudwalk.event.autoconfig.EventConfiguration; +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; +import org.springframework.context.annotation.Import; + +/** + * 启用云从事件总线自动配置,导入 {@link EventConfiguration} 并绑定 {@code cloudwalk.event.*} 配置项。 + */ +@Target({ElementType.TYPE}) +@Retention(RetentionPolicy.RUNTIME) +@Documented +@Import({EventConfiguration.class}) +public @interface EnableCloudwalkEvent {} diff --git a/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/annotation/ConsumerGroup.java b/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/annotation/ConsumerGroup.java new file mode 100644 index 00000000..ce04dc87 --- /dev/null +++ b/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/annotation/ConsumerGroup.java @@ -0,0 +1,18 @@ +package cn.cloudwalk.event.annotation; + +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * 声明类型级 Kafka 消费组标识,用于与事件监听/路由配置对齐。 + */ +@Target({ElementType.TYPE}) +@Retention(RetentionPolicy.RUNTIME) +@Documented +public @interface ConsumerGroup { + /** 消费组 ID 列表,与平台侧配置保持一致。 */ + String[] groupIds() default {}; +} diff --git a/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/annotation/CustomTopic.java b/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/annotation/CustomTopic.java new file mode 100644 index 00000000..b4bcea0e --- /dev/null +++ b/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/annotation/CustomTopic.java @@ -0,0 +1,26 @@ +package cn.cloudwalk.event.annotation; + +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; +import org.springframework.core.annotation.AliasFor; + +/** + * 为自定义事件主题提供显式 {@code topic},并通过 {@link EventTopicSuffix} 组合后缀。 + */ +@Target({ElementType.TYPE}) +@Retention(RetentionPolicy.RUNTIME) +@Documented +@EventTopicSuffix +public @interface CustomTopic { + /** 逻辑主题名。 */ + String topic(); + + /** + * 与 {@link EventTopicSuffix#suffix()} 互为别名,用于拼接完整主题。 + */ + @AliasFor(annotation = EventTopicSuffix.class) + String suffix() default ""; +} diff --git a/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/annotation/EventTopicSuffix.java b/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/annotation/EventTopicSuffix.java new file mode 100644 index 00000000..e37bdd5a --- /dev/null +++ b/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/annotation/EventTopicSuffix.java @@ -0,0 +1,24 @@ +package cn.cloudwalk.event.annotation; + +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; +import org.springframework.core.annotation.AliasFor; + +/** + * 为主题名追加可配置后缀,避免多环境/多租户下 Kafka Topic 冲突。 + */ +@Target({ElementType.TYPE}) +@Retention(RetentionPolicy.RUNTIME) +@Documented +public @interface EventTopicSuffix { + /** 与 {@link #suffix()} 互为别名。 */ + @AliasFor(attribute = "suffix") + String[] value() default {}; + + /** 追加在基础主题后的后缀片段。 */ + @AliasFor(attribute = "value") + String[] suffix() default {}; +} diff --git a/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/autoconfig/EventConfiguration.java b/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/autoconfig/EventConfiguration.java new file mode 100644 index 00000000..d0a8f6d6 --- /dev/null +++ b/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/autoconfig/EventConfiguration.java @@ -0,0 +1,22 @@ +package cn.cloudwalk.event.autoconfig; + +import cn.cloudwalk.event.CloudwalkEventInitializing; +import cn.cloudwalk.event.CloudwalkEventManager; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.annotation.Bean; + +/** + * 事件模块 Spring 配置:注册 {@link cn.cloudwalk.event.CloudwalkEventManager} 与初始化组件。 + */ +@EnableConfigurationProperties({EventProperties.class}) +public class EventConfiguration { + @Bean + public CloudwalkEventManager cloudwalkEventManager() { + return new CloudwalkEventManager(); + } + + @Bean + public CloudwalkEventInitializing CloudwalkEventInitializing(EventProperties eventProperties) { + return new CloudwalkEventInitializing(eventProperties); + } +} diff --git a/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/autoconfig/EventProperties.java b/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/autoconfig/EventProperties.java new file mode 100644 index 00000000..db8d35d5 --- /dev/null +++ b/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/autoconfig/EventProperties.java @@ -0,0 +1,93 @@ +package cn.cloudwalk.event.autoconfig; + +import java.util.Map; +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + * {@code cloudwalk.event} 前缀下的绑定配置:Kafka 地址、消费组、监听器映射与线程池等。 + */ +@ConfigurationProperties(prefix = "cloudwalk.event") +public class EventProperties { + protected static final String CONF_PREFIX = "cloudwalk.event"; + private String bootstrapServers; + private String groupId; + private Map listenerClass; + private Integer fetchDataWorkerNumber; + private String workerNamePrefix; + private HandlerExecutorConfig handlerExecutorConfig = + new HandlerExecutorConfig(Integer.valueOf(5), Integer.valueOf(10)); + + public static class HandlerExecutorConfig { + private Integer corePoolSize; + private Integer maximumPoolSize; + + public HandlerExecutorConfig(Integer corePoolSize, Integer maximumPoolSize) { + this.corePoolSize = corePoolSize; + this.maximumPoolSize = maximumPoolSize; + } + + public Integer getCorePoolSize() { + return this.corePoolSize; + } + + public void setCorePoolSize(Integer corePoolSize) { + this.corePoolSize = corePoolSize; + } + + public Integer getMaximumPoolSize() { + return this.maximumPoolSize; + } + + public void setMaximumPoolSize(Integer maximumPoolSize) { + this.maximumPoolSize = maximumPoolSize; + } + } + + public String getBootstrapServers() { + return this.bootstrapServers; + } + + public void setBootstrapServers(String bootstrapServers) { + this.bootstrapServers = bootstrapServers; + } + + public String getGroupId() { + return this.groupId; + } + + public void setGroupId(String groupId) { + this.groupId = groupId; + } + + public Map getListenerClass() { + return this.listenerClass; + } + + public void setListenerClass(Map listenerClass) { + this.listenerClass = listenerClass; + } + + public Integer getFetchDataWorkerNumber() { + return this.fetchDataWorkerNumber; + } + + public void setFetchDataWorkerNumber(Integer fetchDataWorkerNumber) { + this.fetchDataWorkerNumber = fetchDataWorkerNumber; + } + + public HandlerExecutorConfig getHandlerExecutorConfig() { + return this.handlerExecutorConfig; + } + + public void setHandlerExecutorConfig(HandlerExecutorConfig handlerExecutorConfig) { + this.handlerExecutorConfig = handlerExecutorConfig; + } + + public String getWorkerNamePrefix() { + return this.workerNamePrefix; + } + + public void setWorkerNamePrefix(String workerNamePrefix) { + this.workerNamePrefix = workerNamePrefix; + } +} diff --git a/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/client/EventSubscribeHandlers.java b/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/client/EventSubscribeHandlers.java new file mode 100644 index 00000000..d9af3a7b --- /dev/null +++ b/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/client/EventSubscribeHandlers.java @@ -0,0 +1,35 @@ +package cn.cloudwalk.event.client; + +import cn.cloudwalk.cwos.client.event.event.EventType; +import cn.cloudwalk.event.handler.EventHandler; +import java.util.List; + +public class EventSubscribeHandlers { + private EventType eventType; + private String serviceCode; + private List eventHandlerList; + + public EventType getEventType() { + return this.eventType; + } + + public void setEventType(EventType eventType) { + this.eventType = eventType; + } + + public String getServiceCode() { + return this.serviceCode; + } + + public void setServiceCode(String serviceCode) { + this.serviceCode = serviceCode; + } + + public List getEventHandlerList() { + return this.eventHandlerList; + } + + public void setEventHandlerList(List eventHandlerList) { + this.eventHandlerList = eventHandlerList; + } +} diff --git a/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/handler/CustomEventHandler.java b/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/handler/CustomEventHandler.java new file mode 100644 index 00000000..63fa3d14 --- /dev/null +++ b/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/handler/CustomEventHandler.java @@ -0,0 +1,4 @@ +package cn.cloudwalk.event.handler; + +public interface CustomEventHandler + extends EventHandler {} diff --git a/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/handler/EventHandler.java b/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/handler/EventHandler.java new file mode 100644 index 00000000..9bfa391c --- /dev/null +++ b/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/handler/EventHandler.java @@ -0,0 +1,5 @@ +package cn.cloudwalk.event.handler; + +public interface EventHandler { + void onEvent(E paramE); +} diff --git a/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/handler/EventHandlerMapping.java b/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/handler/EventHandlerMapping.java new file mode 100644 index 00000000..decd14ff --- /dev/null +++ b/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/handler/EventHandlerMapping.java @@ -0,0 +1,74 @@ +package cn.cloudwalk.event.handler; + +import cn.cloudwalk.cwos.client.event.event.BaseEvent; +import cn.cloudwalk.cwos.client.event.event.EventType; +import cn.cloudwalk.cwos.client.event.handler.EventListener; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class EventHandlerMapping { + private final Map>>> handlerMap = new HashMap<>(); + private final Map>>> customHandlerMap = new HashMap<>(); + private final Map, String> listenerClassGroupMap = new HashMap<>(); + + public void registerHandlers(String groupId, EventType eventType, Map> handlers) { + Map>> map = this.handlerMap.get(groupId); + if (null == map) { + map = new HashMap<>(); + map.put(eventType, handlers); + this.handlerMap.put(groupId, map); + } else { + map.put(eventType, handlers); + } + } + + public Map> getServiceCodeHandlerListMap(String groupId, + Class eventClass) { + for (EventType eventType : EventType.values()) { + if (eventType.getEventClass().getClass().equals(eventClass)) { + return getServiceCodeHandlerListMap(groupId, eventType); + } + } + throw new IllegalArgumentException("没有找到合适的事件类型"); + } + + public Map> getServiceCodeHandlerListMap(String groupId, EventType eventType) { + Map>> map = this.handlerMap.get(groupId); + if (null != map) { + return map.get(eventType); + } + return null; + } + + public Map> getServiceCodeCustomHandlerListMap(String groupId, String topic) { + Map>> map = this.customHandlerMap.get(groupId); + if (null != map) { + return map.get(topic); + } + return null; + } + + public void registerCustomHandlers(String groupId, String topic, Map> handlers) { + Map>> map = this.customHandlerMap.get(groupId); + if (null == map) { + map = new HashMap<>(); + map.put(topic, handlers); + this.customHandlerMap.put(groupId, map); + } else { + map.put(topic, handlers); + } + } + + public Map>>> getHandlerMap() { + return this.handlerMap; + } + + public Map>>> getCustomHandlerMap() { + return this.customHandlerMap; + } + + public Map, String> getListenerClassGroupMap() { + return this.listenerClassGroupMap; + } +} diff --git a/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/handler/EventHandlerWorker.java b/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/handler/EventHandlerWorker.java new file mode 100644 index 00000000..9b8bb62a --- /dev/null +++ b/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/handler/EventHandlerWorker.java @@ -0,0 +1,22 @@ +package cn.cloudwalk.event.handler; + +import cn.cloudwalk.event.task.EventHandleTask; +import java.util.concurrent.Callable; +import java.util.concurrent.Future; +import java.util.concurrent.ThreadPoolExecutor; + +public class EventHandlerWorker { + private ThreadPoolExecutor poolExecutor; + + public void setPoolExecutor(ThreadPoolExecutor poolExecutor) { + this.poolExecutor = poolExecutor; + } + + public Future work(final EventHandleTask task) { + return this.poolExecutor.submit(new Callable() { + public String call() throws Exception { + return task.start(); + } + }); + } +} diff --git a/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/handler/NamedThreadFactory.java b/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/handler/NamedThreadFactory.java new file mode 100644 index 00000000..94c93ba1 --- /dev/null +++ b/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/handler/NamedThreadFactory.java @@ -0,0 +1,36 @@ +package cn.cloudwalk.event.handler; + +import java.util.concurrent.ThreadFactory; +import java.util.concurrent.atomic.AtomicInteger; + +public class NamedThreadFactory implements ThreadFactory { + private static final String DEFAULT_POOL_NAME = "cloudwalk-common-event"; + protected static final AtomicInteger POOL_SEQ = new AtomicInteger(1); + private final AtomicInteger threadNumber = new AtomicInteger(1); + private final String namePrefix; + private final ThreadGroup threadGroup; + + public NamedThreadFactory() { + this("cloudwalk-common-event"); + } + + public NamedThreadFactory(String namePrefix) { + SecurityManager s = System.getSecurityManager(); + this.threadGroup = (s != null) ? s.getThreadGroup() : Thread.currentThread().getThreadGroup(); + if (null == namePrefix || "".equals(namePrefix.trim())) { + namePrefix = "cloudwalk-common-event"; + } + this.namePrefix = namePrefix + "-" + POOL_SEQ.getAndIncrement() + "-thread-"; + } + + public Thread newThread(Runnable r) { + Thread t = new Thread(this.threadGroup, r, this.namePrefix + this.threadNumber.getAndIncrement(), 0L); + if (t.isDaemon()) { + t.setDaemon(false); + } + if (t.getPriority() != 5) { + t.setPriority(5); + } + return t; + } +} diff --git a/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/listener/CloudwalkEventListener.java b/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/listener/CloudwalkEventListener.java new file mode 100644 index 00000000..08e26562 --- /dev/null +++ b/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/listener/CloudwalkEventListener.java @@ -0,0 +1,3 @@ +package cn.cloudwalk.event.listener; + +public class CloudwalkEventListener extends GroupEventListener {} diff --git a/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/listener/GroupEventListener.java b/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/listener/GroupEventListener.java new file mode 100644 index 00000000..fe7c5353 --- /dev/null +++ b/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/listener/GroupEventListener.java @@ -0,0 +1,24 @@ +package cn.cloudwalk.event.listener; + +import cn.cloudwalk.cwos.client.event.event.BaseEvent; +import cn.cloudwalk.cwos.client.event.handler.EventListener; +import cn.cloudwalk.event.CloudwalkEventManager; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.context.ApplicationContext; + +public abstract class GroupEventListener implements EventListener { + public static ApplicationContext applicationContext; + private static final Logger LOGGER = LoggerFactory.getLogger(CloudwalkEventListener.class); + + public void messageListener(BaseEvent baseEvent) throws RuntimeException { + try { + CloudwalkEventManager cloudwalkEventManager = + (CloudwalkEventManager)applicationContext.getBean(CloudwalkEventManager.class); + cloudwalkEventManager.handle(getClass(), baseEvent); + } catch (Exception e) { + LOGGER.error("事件处理出现异常,原因:", e); + throw new RuntimeException(e); + } + } +} diff --git a/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/listener/GroupListnerClassMapping.java b/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/listener/GroupListnerClassMapping.java new file mode 100644 index 00000000..745ecb5e --- /dev/null +++ b/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/listener/GroupListnerClassMapping.java @@ -0,0 +1,26 @@ +package cn.cloudwalk.event.listener; + +import cn.cloudwalk.cwos.client.event.handler.EventListener; +import java.util.HashMap; +import java.util.Map; + +/** + * 监听类型与 Kafka 消费组 ID 的注册表。 + *

+ * 类名中的 {@code Listner} 为历史产物,与既有字节码/配置引用保持一致,请勿随意重命名。 + */ +public class GroupListnerClassMapping { + private final Map, String> mapping = new HashMap<>(); + + public void register(Class eventListnerClass, String groupId) { + if (this.mapping.containsKey(eventListnerClass)) { + throw new IllegalArgumentException( + String.format("eventListnerClass[%s]已经存在,不允许重复", new Object[] {eventListnerClass.toString()})); + } + this.mapping.put(eventListnerClass, groupId); + } + + public String getGroupId(Class eventListnerClass) { + return this.mapping.get(eventListnerClass); + } +} diff --git a/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/package-info.java b/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/package-info.java new file mode 100644 index 00000000..b1c0f2cc --- /dev/null +++ b/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/package-info.java @@ -0,0 +1,7 @@ +/** + * 云从消息总线(Kafka)封装:监听器注册、事件处理链、与 CWOS SDK 的集成。 + *

+ * 入口:在 Spring Boot 启动类或配置类上使用 {@link cn.cloudwalk.event.EnableCloudwalkEvent}, 通过 {@code cloudwalk.event.*} 配置项(参见 + * {@link cn.cloudwalk.event.autoconfig.EventProperties})完成连接与线程池等参数绑定。 + */ +package cn.cloudwalk.event; diff --git a/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/task/EventHandleTask.java b/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/task/EventHandleTask.java new file mode 100644 index 00000000..f13d4d0d --- /dev/null +++ b/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/java/cn/cloudwalk/event/task/EventHandleTask.java @@ -0,0 +1,35 @@ +package cn.cloudwalk.event.task; + +import cn.cloudwalk.cwos.client.event.event.BaseEvent; +import cn.cloudwalk.event.handler.EventHandler; + +public class EventHandleTask { + private E event; + private EventHandler handler; + + public EventHandleTask(E event, EventHandler handler) { + this.event = event; + this.handler = handler; + } + + public String start() { + this.handler.onEvent(this.event); + return this.event.getMessageId(); + } + + public E getEvent() { + return this.event; + } + + public void setEvent(E event) { + this.event = event; + } + + public EventHandler getHandler() { + return this.handler; + } + + public void setHandler(EventHandler handler) { + this.handler = handler; + } +} diff --git a/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/resources/META-INF/MANIFEST.MF b/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/resources/META-INF/MANIFEST.MF new file mode 100644 index 00000000..63a23bde --- /dev/null +++ b/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/resources/META-INF/MANIFEST.MF @@ -0,0 +1,6 @@ +Manifest-Version: 1.0 +Archiver-Version: Plexus Archiver +Built-By: hechunjie +Created-By: Apache Maven 3.6.0 +Build-Jdk: 1.8.0_191 + diff --git a/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/resources/META-INF/spring-configuration-metadata.json b/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/resources/META-INF/spring-configuration-metadata.json new file mode 100644 index 00000000..766e1b82 --- /dev/null +++ b/maven-cloudwalk-cloud/cloudwalk-common-event/src/main/resources/META-INF/spring-configuration-metadata.json @@ -0,0 +1,58 @@ +{ + "hints": [], + "groups": [ + { + "sourceType": "cn.cloudwalk.event.autoconfig.EventProperties", + "name": "cloudwalk.event", + "type": "cn.cloudwalk.event.autoconfig.EventProperties" + }, + { + "sourceType": "cn.cloudwalk.event.autoconfig.EventProperties", + "name": "cloudwalk.event.handler-executor-config", + "sourceMethod": "getHandlerExecutorConfig()", + "type": "cn.cloudwalk.event.autoconfig.EventProperties$HandlerExecutorConfig" + } + ], + "properties": [ + { + "sourceType": "cn.cloudwalk.event.autoconfig.EventProperties", + "name": "cloudwalk.event.bootstrap-servers", + "description": "服务器地址", + "type": "java.lang.String" + }, + { + "sourceType": "cn.cloudwalk.event.autoconfig.EventProperties", + "name": "cloudwalk.event.fetch-data-worker-number", + "description": "获取数据的工作线程数", + "type": "java.lang.Integer" + }, + { + "sourceType": "cn.cloudwalk.event.autoconfig.EventProperties", + "name": "cloudwalk.event.group-id", + "description": "组ID", + "type": "java.lang.String" + }, + { + "sourceType": "cn.cloudwalk.event.autoconfig.EventProperties$HandlerExecutorConfig", + "name": "cloudwalk.event.handler-executor-config.core-pool-size", + "type": "java.lang.Integer" + }, + { + "sourceType": "cn.cloudwalk.event.autoconfig.EventProperties$HandlerExecutorConfig", + "name": "cloudwalk.event.handler-executor-config.maximum-pool-size", + "type": "java.lang.Integer" + }, + { + "sourceType": "cn.cloudwalk.event.autoconfig.EventProperties", + "name": "cloudwalk.event.listener-class", + "description": "组与EventListener对应关系", + "type": "java.util.Map" + }, + { + "sourceType": "cn.cloudwalk.event.autoconfig.EventProperties", + "name": "cloudwalk.event.worker-name-prefix", + "description": "工作线程名字前缀", + "type": "java.lang.String" + } + ] +} \ No newline at end of file diff --git a/maven-cloudwalk-cloud/cloudwalk-common-service/pom.xml b/maven-cloudwalk-cloud/cloudwalk-common-service/pom.xml new file mode 100644 index 00000000..268c35b0 --- /dev/null +++ b/maven-cloudwalk-cloud/cloudwalk-common-service/pom.xml @@ -0,0 +1,64 @@ + + + 4.0.0 + + + cn.cloudwalk.cloud + cloudwalk-cloud-decompiled-reactor + 3.7.2-Brussels-SRX + ../pom.xml + + + cloudwalk-common-service + jar + 云从科技-公共组件 service 通用层(源码已迁入本模块 src/main/java) + + + ${project.basedir}/../../docs/style/alibaba-eclipse-codestyle.xml + + + + + cn.cloudwalk.cloud + cloudwalk-common-result + + + org.hibernate + hibernate-validator + + + org.springframework + spring-aop + + + org.springframework + spring-aspects + + + org.springframework + spring-beans + + + org.springframework + spring-context + + + org.springframework + spring-webmvc + + + org.springframework.boot + spring-boot-starter-data-redis + + + + + + + net.revelc.code.formatter + formatter-maven-plugin + + + + diff --git a/maven-cloudwalk-cloud/cloudwalk-common-service/src/main/java/cn/cloudwalk/service/aop/CloudwalkParamsValidateAspect.java b/maven-cloudwalk-cloud/cloudwalk-common-service/src/main/java/cn/cloudwalk/service/aop/CloudwalkParamsValidateAspect.java new file mode 100644 index 00000000..0aea373c --- /dev/null +++ b/maven-cloudwalk-cloud/cloudwalk-common-service/src/main/java/cn/cloudwalk/service/aop/CloudwalkParamsValidateAspect.java @@ -0,0 +1,79 @@ +package cn.cloudwalk.service.aop; + +import cn.cloudwalk.cloud.annotation.CloudwalkParamsValidate; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import java.lang.reflect.Method; +import java.util.Iterator; +import java.util.Set; +import javax.validation.ConstraintViolation; +import javax.validation.Validator; +import javax.validation.groups.Default; +import org.aspectj.lang.ProceedingJoinPoint; +import org.aspectj.lang.annotation.Around; +import org.aspectj.lang.annotation.Aspect; +import org.aspectj.lang.annotation.Pointcut; +import org.aspectj.lang.reflect.MethodSignature; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.MessageSource; +import org.springframework.context.i18n.LocaleContextHolder; +import org.springframework.core.annotation.Order; +import org.springframework.stereotype.Component; + +/** + * 对标注了 {@link cn.cloudwalk.cloud.annotation.CloudwalkParamsValidate} 的入口进行 Bean Validation 校验。 + */ +@Aspect +@Order(-100) +@Component +public class CloudwalkParamsValidateAspect { + private final Logger logger = LoggerFactory.getLogger(getClass()); + @Autowired + private Validator validator; + @Autowired + private MessageSource messageSource; + + public String getMessage(String code) { + return this.messageSource.getMessage(code, null, LocaleContextHolder.getLocale()); + } + + @Pointcut("@annotation(cn.cloudwalk.cloud.annotation.CloudwalkParamsValidate)") + public void validatePointcat() {} + + @Around("validatePointcat()") + public Object around(ProceedingJoinPoint joinPoint) throws Throwable { + MethodSignature methodSignature = (MethodSignature)joinPoint.getSignature(); + Method targetMethod = + joinPoint.getTarget().getClass().getMethod(methodSignature.getName(), methodSignature.getParameterTypes()); + this.logger.debug("正在进行对类{}中方法{}进行参数检查开始", joinPoint.getTarget().getClass().getName(), targetMethod.getName()); + CloudwalkParamsValidate paramsValidate = + targetMethod.getAnnotation(CloudwalkParamsValidate.class); + if (paramsValidate == null) { + return joinPoint.proceed(); + } + int[] needCheckParamIndexs = paramsValidate.argsIndexs(); + if (needCheckParamIndexs == null) { + return joinPoint.proceed(); + } + Class[] groupsClazz = paramsValidate.groups(); + if (groupsClazz == null) { + groupsClazz = new Class[] {Default.class}; + } + Object[] args = joinPoint.getArgs(); + for (int index : needCheckParamIndexs) { + Object arg = args[index]; + Set> constraintViolationSet = this.validator.validate(arg, groupsClazz); + if (constraintViolationSet != null && constraintViolationSet.size() > 0) { + Iterator> iterator = constraintViolationSet.iterator(); + if (iterator.hasNext()) { + ConstraintViolation constraintViolation = iterator.next(); + String code = constraintViolation.getMessage(); + return CloudwalkResult.fail(code, getMessage(code)); + } + } + } + this.logger.debug("正在进行对类{}中方法{}进行参数检查通过", joinPoint.getTarget().getClass().getName(), targetMethod.getName()); + return joinPoint.proceed(); + } +} diff --git a/maven-cloudwalk-cloud/cloudwalk-common-service/src/main/java/cn/cloudwalk/service/config/ValidatorConfig.java b/maven-cloudwalk-cloud/cloudwalk-common-service/src/main/java/cn/cloudwalk/service/config/ValidatorConfig.java new file mode 100644 index 00000000..874de4da --- /dev/null +++ b/maven-cloudwalk-cloud/cloudwalk-common-service/src/main/java/cn/cloudwalk/service/config/ValidatorConfig.java @@ -0,0 +1,31 @@ +package cn.cloudwalk.service.config; + +import javax.validation.Validation; +import javax.validation.Validator; +import javax.validation.ValidatorFactory; +import org.hibernate.validator.HibernateValidator; +import org.hibernate.validator.HibernateValidatorConfiguration; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.validation.beanvalidation.MethodValidationPostProcessor; + +/** + * Hibernate Validator 与 Spring {@link org.springframework.validation.beanvalidation.MethodValidationPostProcessor} 注册。 + */ +@Configuration +public class ValidatorConfig { + @Bean + public Validator validator() { + ValidatorFactory validatorFactory = + ((HibernateValidatorConfiguration)Validation.byProvider(HibernateValidator.class).configure()) + .failFast(true).buildValidatorFactory(); + return validatorFactory.getValidator(); + } + + @Bean + public MethodValidationPostProcessor methodValidationPostProcessor() { + MethodValidationPostProcessor postProcessor = new MethodValidationPostProcessor(); + postProcessor.setValidator(validator()); + return postProcessor; + } +} diff --git a/maven-cloudwalk-cloud/cloudwalk-common-service/src/main/java/cn/cloudwalk/service/package-info.java b/maven-cloudwalk-cloud/cloudwalk-common-service/src/main/java/cn/cloudwalk/service/package-info.java new file mode 100644 index 00000000..40289ac0 --- /dev/null +++ b/maven-cloudwalk-cloud/cloudwalk-common-service/src/main/java/cn/cloudwalk/service/package-info.java @@ -0,0 +1,6 @@ +/** + * 云从公共 Web/Service 横切能力:参数校验 AOP、校验器与 Spring 集成等。 + *

+ * 典型用法:在依赖了 {@code cloudwalk-common-result} 的应用中注册切面与 {@link org.springframework.validation.Validator}。 + */ +package cn.cloudwalk.service; diff --git a/maven-cloudwalk-cloud/cloudwalk-common-service/src/main/resources/META-INF/MANIFEST.MF b/maven-cloudwalk-cloud/cloudwalk-common-service/src/main/resources/META-INF/MANIFEST.MF new file mode 100644 index 00000000..63a23bde --- /dev/null +++ b/maven-cloudwalk-cloud/cloudwalk-common-service/src/main/resources/META-INF/MANIFEST.MF @@ -0,0 +1,6 @@ +Manifest-Version: 1.0 +Archiver-Version: Plexus Archiver +Built-By: hechunjie +Created-By: Apache Maven 3.6.0 +Build-Jdk: 1.8.0_191 + diff --git a/maven-cloudwalk-cloud/pom.xml b/maven-cloudwalk-cloud/pom.xml new file mode 100644 index 00000000..6a624f28 --- /dev/null +++ b/maven-cloudwalk-cloud/pom.xml @@ -0,0 +1,150 @@ + + + 4.0.0 + + + org.springframework.boot + spring-boot-starter-parent + 2.1.18.RELEASE + + + + cn.cloudwalk.cloud + cloudwalk-cloud-decompiled-reactor + 3.7.2-Brussels-SRX + pom + cloudwalk-cloud (decompiled reactor) + 聚合反编译模块:cloudwalk-common-event、cloudwalk-common-service。原父 POM cloudwalk-cloud-common 缺失,由本工程继承 Spring Boot 并集中管理云从内部构件版本。 + + + + cloudwalk-cloud-common + cloudwalk-common-event + cloudwalk-common-service + + + + 1.8 + Greenwich.SR6 + 3.7.2-Brussels-SRX + + 1.5.0-SNAPSHOT + + http://192.168.3.12 + ${nexus.baseUrl}/repository/maven-public/ + 2.24.1 + + ${project.basedir}/../docs/style/alibaba-eclipse-codestyle.xml + + + + + + org.springframework.cloud + spring-cloud-dependencies + ${spring-cloud.version} + pom + import + + + cn.cloudwalk.cloud + cloudwalk-common-result + ${cloudwalk.internal.version} + + + cn.cloudwalk.cloud + cwos-sdk-event + ${cwos.sdk.event.version} + + + + commons-logging + commons-logging + 1.2 + + + org.hibernate + hibernate-validator + 6.0.22.Final + + + + + + + nexus-public + Nexus maven-public + ${nexus.public.repo} + + true + + + true + + + + + + + nexus-public-plugins + Nexus maven-public + ${nexus.public.repo} + + true + + + true + + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + 1.8 + 1.8 + UTF-8 + + + + net.revelc.code.formatter + formatter-maven-plugin + ${formatter.maven.plugin.version} + + ${alibaba.eclipse.codestyle.path} + LF + UTF-8 + + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.4.1 + + + enforce-jdk8 + + enforce + + + + + [1.8,1.9) + 与原始运行包一致须使用 JDK 8 启动 Maven;见 docs/build/ORIGINAL_BUILD_JDK.txt + + + + + + + + + diff --git a/maven-cw-elevator-application/cw-elevator-application-common/pom.xml b/maven-cw-elevator-application/cw-elevator-application-common/pom.xml new file mode 100644 index 00000000..735b0573 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-common/pom.xml @@ -0,0 +1,92 @@ + + + 4.0.0 + + + cn.cloudwalk.elevator + cw-elevator-application-decompiled-reactor + 1.0-SNAPSHOT + ../pom.xml + + + cw-elevator-application-common + jar + + + ${project.basedir}/../../docs/style/alibaba-eclipse-codestyle.xml + + + + + cn.cloudwalk.cloud + cloudwalk-common-result + + + com.google.guava + guava + + + org.apache.poi + poi + + + org.apache.poi + poi-ooxml + + + org.apache.ant + ant + + + net.coobird + thumbnailator + + + commons-io + commons-io + + + com.alibaba + fastjson + + + org.apache.tomcat.embed + tomcat-embed-core + + + cn.cloudwalk.cloud + cloudwalk-common-web + + + com.google.zxing + core + + + net.lingala.zip4j + zip4j + + + org.springframework.data + spring-data-redis + + + org.projectlombok + lombok + compile + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + + + + + + + net.revelc.code.formatter + formatter-maven-plugin + + + + diff --git a/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/annontation/DavinciPic.java b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/annontation/DavinciPic.java new file mode 100644 index 00000000..83a409ff --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/annontation/DavinciPic.java @@ -0,0 +1,15 @@ +package cn.cloudwalk.elevator.annontation; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * 标记字段与达芬奇(Davinci)图片存储或展示相关的元信息。 + *

+ * 所在包名 {@code annontation} 为历史拼写,与既有引用保持一致,请勿单独重命名包路径。 + */ +@Target({ElementType.FIELD}) +@Retention(RetentionPolicy.RUNTIME) +public @interface DavinciPic {} diff --git a/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/cache/CacheOverrideConfig.java b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/cache/CacheOverrideConfig.java new file mode 100644 index 00000000..269e08c6 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/cache/CacheOverrideConfig.java @@ -0,0 +1,49 @@ +package cn.cloudwalk.elevator.cache; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.PropertyAccessor; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Primary; +import org.springframework.data.redis.connection.RedisConnectionFactory; +import org.springframework.data.redis.core.RedisTemplate; +import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer; +import org.springframework.data.redis.serializer.RedisSerializer; +import org.springframework.data.redis.serializer.StringRedisSerializer; + +@Configuration +public class CacheOverrideConfig { + public static final String CACHE_NAME_APPLICATIONIDS = "ACS_Applicationids"; + public static final String CACHE_NAME_ACS_DEVICE_TYPES = "ACS_DeviceTypesCache"; + public static final String CACHE_NAME_ACS_DEVICE_TYPE_FEATURES = "ACS_DeviceTypeFeaturesCache"; + public static final String CACHE_NAME_ACS_DEVICE_ATTRS = "ACS_DeviceAttrsCache"; + public static final String CACHE_NAME_ACS_RECORD_STATISTICS = "ACS_RecordStatisticsCache"; + public static final String CACHE_NAME_ACS_DEVICE_TREE = "ACS_DeviceTreeCache"; + public static final String CACHE_NAME_ACS_AREA_TREE = "ACS_AreaTreeCache"; + public static final String CACHE_KEY_APPLICATION_IDS_PREFIX = "acs_applicationIds:"; + public static final String CACHE_KEY_ACS_DEVICE_TYPES_PREFIX = "acs_deviceTypes:"; + public static final String CACHE_KEY_ACS_DEVICE_TYPE_FEATURES_PREFIX = "acs_deviceTypeFeatures:"; + public static final String CACHE_KEY_ACS_EXPORT_PREFIX = "acs_export_prefix:"; + public static final String CACHE_KEY_ACS_DEVICE_ATTRS_PREFIX = "acs_deviceAttrs:"; + public static final String CACHE_KEY_ACS_RECORD_STATISTICS_PREFIX = "acs_recordStatistics:"; + public static final String CACHE_KEY_ACS_DEVICE_TREE_PREFIX = "acs_deviceTreeCache"; + public static final String CACHE_KEY_ACS_AREA_TREE_PREFIX = "acs_areaTreeCache:"; + + @Primary + @Bean({"redisTemplate"}) + public RedisTemplate redisTemplate(RedisConnectionFactory redisConnectionFactory) { + RedisTemplate redisTemplate = new RedisTemplate(); + redisTemplate.setConnectionFactory(redisConnectionFactory); + StringRedisSerializer stringRedisSerializer = new StringRedisSerializer(); + Jackson2JsonRedisSerializer jackson2JsonRedisSerializer = new Jackson2JsonRedisSerializer(Object.class); + ObjectMapper objectMapper = new ObjectMapper(); + objectMapper.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY); + objectMapper.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL); + jackson2JsonRedisSerializer.setObjectMapper(objectMapper); + redisTemplate.setValueSerializer((RedisSerializer)jackson2JsonRedisSerializer); + redisTemplate.setKeySerializer((RedisSerializer)stringRedisSerializer); + redisTemplate.afterPropertiesSet(); + return redisTemplate; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/config/AcsConstants.java b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/config/AcsConstants.java new file mode 100644 index 00000000..58284d62 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/config/AcsConstants.java @@ -0,0 +1,13 @@ +package cn.cloudwalk.elevator.config; + +public class AcsConstants { + public static final String SUCCESS_CODE = "00000000"; + public static final String SERVICE_CODE = "elevator-app"; + public static final Long ONE_DAY_MILLISECONDS = Long.valueOf(86400000L); + public static final Long ONE_YEAR_MILLISECONDS = Long.valueOf(31536000000L); + public static final String DEFAULT_CALLER = "defaultUserId"; + public static final String DEFAULT_CALLER_NAME = "defaultUserName"; + public static final String ACS_OPEN_DOOR_RECORD_EVENT_TOPIC = "ACS_OPEN_DOOR_RECORD_EVENT_TOPIC"; + public static final String ACS_BACKEND_REG_LOG_ID_KEY_PREFIX = "acs:backendRegLogId:"; + public static final String ACS_BACKEND_REG_EXPIRE_PREFIX = "acs:backendRegExpire:"; +} diff --git a/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/config/AcsLockConstants.java b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/config/AcsLockConstants.java new file mode 100644 index 00000000..982efb61 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/config/AcsLockConstants.java @@ -0,0 +1,11 @@ +package cn.cloudwalk.elevator.config; + +public class AcsLockConstants { + public static final String LOCK_EXPORT_BUSINESSID_PREFIX = "AcsExport:"; + + public static final String LOCK_RECORD_STATISTICS_BUSINESSID_PREFIX = "AcsRecordStatistics:"; + + public static final String LOCK_BACKEND_REG_LOG_ID_PREFIX = "AcsBackendRegLogId:"; + + public static final String LOCK_URGENT_GROUP_DEVICE_ID_PREFIX = "AcsUrgentGroupDeviceIds:"; +} diff --git a/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/config/ElevatorCwosConfig.java b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/config/ElevatorCwosConfig.java new file mode 100644 index 00000000..b809fcbf --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/config/ElevatorCwosConfig.java @@ -0,0 +1,18 @@ +package cn.cloudwalk.elevator.config; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.stereotype.Component; + +@Component +@ConfigurationProperties(prefix = "cloudwalk.elevator.common") +public class ElevatorCwosConfig { + private String relativePrefix; + + public String getRelativePrefix() { + return this.relativePrefix; + } + + public void setRelativePrefix(String relativePrefix) { + this.relativePrefix = relativePrefix; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/config/ErrorCode.java b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/config/ErrorCode.java new file mode 100644 index 00000000..f41a5651 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/config/ErrorCode.java @@ -0,0 +1,457 @@ +package cn.cloudwalk.elevator.config; + +public class ErrorCode { + public static final String OTHER_ERROR = "00000001"; + + public static final String ID_IS_NULL = "53060410"; + + public static final String ID_ARRAY_IS_NULL = "53060411"; + + public static final String ADD_IMAGE_STORE_ERROR = "53060413"; + + public static final String ID_IS_ERROR = "53060414"; + + public static final String EDIT_IMAGE_STORE_IS_ERROR = "53060415"; + + public static final String IMAGE_STORE_REF_IS_ALL_NULL = "53060416"; + + public static final String IMAGFE_STORE_ORG_ID_ARRAY_IS_ERROR = "53060417"; + + public static final String IMAGFE_STORE_LABEL_ID_ARRAY_IS_ERROR = "53060418"; + + public static final String IMAGFE_STORE_PERSON_ID_ARRAY_IS_ERROR = "53060419"; + + public static final String IMAGFE_STORE_LABEL_ID_EXCLUDE_ARRAY_IS_ERROR = "53060420"; + + public static final String IMAGFE_STORE_PERSON_ID_EXCLUDE_ARRAY_IS_ERROR = "53060421"; + + public static final String IMAGE_STORE_DELETE_ERROR = "53060422"; + + public static final String IMAGE_STORE_NAME_IS_ERROR = "53060423"; + + public static final String ID_LENGTH_IS_ERROR = "53060424"; + + public static final String ORG_PARENT_NODE_IS_ERROR = "53060425"; + + public static final String GET_BUSINESS_NAME_IS_ERROR = "53060426"; + + public static final String PARENT_ID_LENGTH_IS_ERROR = "53060427"; + + public static final String FILE_UPLOAD_ERROR = "80014001"; + + public static final String FILE_UPLOAD_CONTROLLER_ERROR = "80014013"; + + public static final String FILE_TYPE_IS_INVALID = "53060429"; + + public static final String FILE_MAX_IS_ERROR = "53060428"; + + public static final String ROTATE_IMAGE_ERROR = "53060430"; + + public static final String EXTRACT_FEATURE_FAIL = "53060431"; + + public static final String FACE_DETECT_IS_EMPTY = "53060432"; + + public static final String FACE_DETECT_OVER_SIZE = "53060433"; + + public static final String IMAGE_IS_EMPTY = "53060434"; + + public static final String EXTRACT_FEATURE_EXCEPTION = "53060435"; + + public static final String EXTRACT_FEATURE_RESULT_IS_EMPTY = "53060436"; + + public static final String UPLOAD_SINGLE_FACE = "53060437"; + + public static final String GROUP_ID_IS_EMPTY = "53060438"; + + public static final String FACE_DETECT_EXCEPTION = "53060439"; + + public static final String FACE_DETECT_RESULT_IS_EMPTY = "53060440"; + + public static final String QUERY_ALL_GROUP_TOPN_FAIL = "53060441"; + + public static final String QUERY_EVERY_GROUP_TOPN_FAIL = "53060442"; + + public static final String QUERY_FEATURE_RESULT_IS_EMPTY = "53060443"; + + public static final String QUERY_FEATURE_RESULT_FAIL = "53060444"; + + public static final String IMAGE_UNDER_SIZE = "53060445"; + + public static final String IMAGE_PIXEL_UNDER_SIZE = "53060446"; + + public static final String ADD_FACE_FAIL = "53060447"; + + public static final String REMOVE_FACE_FAIL = "53060448"; + + public static final String FILE_MANAGER_READ_FILE_ERROR = "80014016"; + + public static final String FILE_MANAGER_DEL_ERROR = "80014017"; + + public static final String ADD_ORG_TYPE_ERROR = "53003800"; + + public static final String EDIT_ORG_TYPE_ERROR = "53003801"; + + public static final String DEL_ORG_TYPE_ERROR = "53003802"; + + public static final String ADD_ORG_TYPE_DUPLICATE_NAME = "53003803"; + + public static final String QUERY_ORG_TYPE_ERROR = "53003804"; + + public static final String PROPERTIES_DUPLICATE_NAME_ERROR = "53003805"; + + public static final String ADD_AREA_TYPE_ERROR = "53004800"; + + public static final String EDIT_AREA_TYPE_ERROR = "53004801"; + + public static final String DEL_AREA_TYPE_ERROR = "53004802"; + + public static final String ADD_AREA_TYPE_DUPLICATE_NAME = "53004803"; + + public static final String QUERY_AREA_TYPE_ERROR = "53004804"; + + public static final String AREA_TYPE_NAME_NOT_NULL = "53004806"; + + public static final String AREA_TYPE_NAME_LENGTH_INVAILD = "53004807"; + + public static final String AREA_TYPE_PRO_NAME_NOT_NULL = "53004810"; + + public static final String AREA_TYPE_PRO_REQUIRED_NOT_NULL = "53004811"; + + public static final String AREA_TYPE_PRO_REQUIRED_RANGE_INVAILD = "53004812"; + + public static final String AREA_TYPE_HAS_LOWER_DATA = "53004813"; + + public static final String AREA_TYPE_NOT_EDIT_DEFAULT = "53004815"; + + public static final String EXIST_AREA_WITH_TYPE = "53004854"; + + public static final String AREA_TYPE_PRO_ORDER_NOT_NULL = "53004816"; + + public static final String AREA_TYPE_PRO_ORDER_RANGE_INVAILD = "53004817"; + + public static final String QUERY_ORG_ERROR = "53003300"; + + public static final String TYPE_ID_IS_NULL = "53003301"; + + public static final String TYPE_ID_LENGTH_IS_ERROR = "53003302"; + + public static final String PARAM_LENGTH_IS_ERROR = "53003303"; + + public static final String EXIST_ORG_WITH_TYPE = "53003304"; + + public static final String ORG_ID_IS_NULL = "53003305"; + + public static final String ORG_PARENT_HSH_LOWER_LEVEL_ERROR = "53003306"; + + public static final String ORG_PARENT_ID_IS_NULL = "53003307"; + + public static final String ORG_LEVEL_IS_ERROR = "53003308"; + + public static final String ORG_NAME_IS_EXIST = "53003309"; + + public static final String ORG_ID_IS_ERROR = "53003310"; + + public static final String PERSON_ID_ARRAY_IS_ERROR = "53003311"; + + public static final String ORG_NAME_IS_NULL = "53003312"; + + public static final String ORG_YI_IS_NOT_DELETE = "53003313"; + + public static final String ORG_PARENT_IS_HAVING = "53003314"; + + public static final String ORG_CANNOT_DELETE = "53003315"; + + public static final String QZ_BUSINESS_ID_INVALID = "53014000"; + + public static final String QZ_PERSON_CODE_INVALID = "53014001"; + + public static final String QZ_PERSON_NAME_INVALID = "53014002"; + + public static final String QZ_PERSON_USER_NAME_INVALID = "53014003"; + + public static final String QZ_PERSON_PHONE_INVALID = "53014004"; + + public static final String QZ_PERSON_EMAIL_INVALID = "53014005"; + + public static final String QZ_PERSON_SYNC_ACCOUNT_INVALID = "53014006"; + + public static final String QZ_PERSON_CUSTOM_FIELD_INVALID = "53014007"; + + public static final String QZ_PERSON_ADD_ERROR = "53014008"; + + public static final String QZ_PERSON_EDIT_ERROR = "53014009"; + + public static final String QZ_PERSON_DEL_ERROR = "53014010"; + + public static final String QZ_PERSON_QUERY_ERROR = "53014011"; + + public static final String QZ_PERSON_CODE_DUPLICATE = "53014012"; + + public static final String QZ_PERSON_USER_NAME_DUPLICATE = "53014013"; + + public static final String QZ_PERSON_PHONE_DUPLICATE = "53014014"; + + public static final String QZ_PERSON_EMAIL_DUPLICATE = "53014015"; + + public static final String QZ_PERSON_FILED_LOSE = "53014016"; + + public static final String QZ_PERSON_FILED_INVALID = "53014017"; + + public static final String QZ_PERSON_FILED_NOT_EXISTS = "53014018"; + + public static final String QZ_PERSON_NO_SYSTEM_ID = "53014019"; + + public static final String QZ_PERSON_FILED_LABEL_ORGANIZATION_LOSE = "53014020"; + + public static final String QZ_PERSON_SOURCE_ILLEGAL = "53014021"; + + public static final String QZ_PERSON_PROPERTIES_CERT_LOSE = "53014022"; + + public static final String QZ_PERSON_CERT_ID_DUPLICATE = "53014023"; + + public static final String PERSON_ID_LIST_IS_EMPTY = "53014024"; + + public static final String IMAGE_ID_LIST_IS_EMPTY = "53014025"; + + public static final String IMAGE_ID_IS_EMPTY = "53014026"; + + public static final String QZ_SYSTEM_ID_VALUE_EMPTY = "53014027"; + + public static final String QZ_SYSTEM_ID_VALUE_DUPLICATE = "53014028"; + + public static final String PERSONNEL_ATTRIBUTES_ARE_NOT_SET = "53014029"; + + public static final String QZ_BATCH_ID_INVALID = "53014030"; + + public static final String QZ_BATCH_STATUS_INVALID = "53014031"; + + public static final String QZ_BATCH_ADD_ERROR = "53014032"; + + public static final String QZ_BATCH_QUERY_ERROR = "53014033"; + + public static final String QZ_BATCH_DETAIL_QUERY_ERROR = "53014034"; + + public static final String BATCH_IMPORT_INSERT_ERROR = "53014035"; + + public static final String BATCH_IMPORT_PROCESS_EXCEPTION = "53014036"; + + public static final String BATCH_IMPORT_ZIP_FILE_EMPTY = "53014037"; + + public static final String BATCH_IMPORT_UNZIP_FAILED = "53014038"; + + public static final String BATCH_IMPORT_EXCEL_FILE_NOTFOUND = "53014039"; + + public static final String BATCH_IMPORT_DATA_EMPTY = "53014040"; + + public static final String FILE_INIT_FAIL = "53014041"; + + public static final String FILE_FINISHI_FAIL = "53014042"; + + public static final String FILE_GET_FAIL = "53014043"; + + public static final String LABEL_NAME_IS_EXIST = "53003700"; + + public static final String LABEL_ID_IS_ERROR = "53003701"; + + public static final String LABEL_PAGE_IS_ERROR = "53003702"; + + public static final String QZ_LABEL_NAME_INVALID = "53003703"; + + public static final String QZ_LABEL_CODE_INVALID = "53003704"; + + public static final String LABEL_CODE_IS_EXIST = "53003705"; + + public static final String QZ_LABEL_ADD_TYPE_INVALID = "53003706"; + + public static final String QZ_LABEL_DEL_PERSON_RELATION = "53003707"; + + public static final String PERSON_PRO_NAME_NOT_NULL = "53014800"; + + public static final String PERSON_PRO_NAME_LENGTH_INVAILD = "53014801"; + + public static final String PERSON_PRO_TYPE_NOT_NULL = "53014802"; + + public static final String PERSON_PRO_TYPE_RANGE_INVAILD = "53014803"; + + public static final String PERSON_PRO_SYSACCOUNT_RANGE_INVAILD = "53014804"; + + public static final String PERSON_PRO_REQUIRED_RANGE_INVAILD = "53014805"; + + public static final String PERSON_PRO_ORDER_NOT_NULL = "53014806"; + + public static final String PERSON_PRO_REMINDER_NOT_NULL = "53014807"; + + public static final String PERSON_PRO_REMINDER_LENGTH_INVAILD = "53014808"; + + public static final String PERSON_PRO_ARRAYDATA_LENGTH_INVAILD = "53014809"; + + public static final String PERSON_PRO_MULTIPLE_RANGE_INVAILD = "53014810"; + + public static final String DEFAULT_ACCOUNT_CAN_NOT_CHANGE = "53014811"; + + public static final String REQUIRED_CAN_NOT_CHANGE = "53014812"; + + public static final String SWITCH_SIZE_PARAM_INVALID = "53014813"; + + public static final String SWITCH_BACKGROUND_OBJECT_INVALID = "53014814"; + + public static final String ORG_TYPE_NAME_NOT_NULL = "53003806"; + + public static final String ORG_TYPE_NAME_LENGTH_INVAILD = "53003807"; + + public static final String ORG_TYPE_LOWER_NOT_NULL = "53003808"; + + public static final String ORG_TYPE_LOWER_RANGE_INVAILD = "53003809"; + + public static final String ORG_TYPE_PRO_NAME_NOT_NULL = "53003810"; + + public static final String ORG_TYPE_PRO_REQUIRED_NOT_NULL = "53003811"; + + public static final String ORG_TYPE_PRO_REQUIRED_RANGE_INVAILD = "53003812"; + + public static final String ORG_TYPE_HAS_LOWER_DATA = "53003813"; + + public static final String ORG_TYPE_NOT_NEW_DEFAULT = "53003814"; + + public static final String ORG_TYPE_NOT_EDIT_DEFAULT = "53003815"; + + public static final String ORG_TYPE_PRO_ORDER_NOT_NULL = "53003816"; + + public static final String ORG_TYPE_PRO_ORDER_RANGE_INVAILD = "53003817"; + + public static final String CAT_NOT_EDIT_DEFAULT_TYPE = "53003818"; + + public static final String PERSON_NOT_EXIST = "53003819"; + + public static final String PERSON_IMAGE_SCORE_FAILE = "53003820"; + + public static final String ORG_SEARCH_PARAM_FAILE = "53003821"; + + public static final String PERSON_REGISTRY_STATUS_IS_NULL = "53014500"; + + public static final String PERSON_REGISTRY_DEVICESTATUS_IS_NULL = "53014501"; + + public static final String PERSON_REGISTRY_CODESTATUS_IS_NULL = "53014502"; + + public static final String PERSON_REGISTRY_PROPERTY_IS_NULL = "53014503"; + + public static final String PERSON_REGISTRY_DEVICE_IS_NULL = "53014504"; + + public static final String PERSON_REGISTRY_STATUS_INVALID = "53014505"; + + public static final String PERSON_REGISTRY_DEVICESTATUS_INVALID = "53014506"; + + public static final String PERSON_REGISTRY_CODESTATUS_INVALID = "53014507"; + + public static final String PERSON_REGISTRY_PRO_ID_LIST_IS_ERROR = "53014508"; + + public static final String PERSON_REGISTRY_PRO_NAME_IS_REQUIRED = "53014509"; + + public static final String PERSON_REGISTRY_PRO_ORG_LABEL_IS_REQUIRED = "53014510"; + + public static final String PERSON_REGISTRY_PRO_IS_REQUIRED = "53014511"; + + public static final String PERSON_REGISTRY_ORG_IDS_IS_ERROR = "53014512"; + + public static final String PERSON_REGISTRY_LABEL_IDS_IS_ERROR = "53014513"; + + public static final String PERSON_REGISTRY_DEVICE_IS_ERROR = "53014514"; + + public static final String PERSON_REGISTRY_ADD_FAIL = "53014515"; + + public static final String PERSON_REGISTRY_SAVE_FAIL = "53014516"; + + public static final String PERSON_REGISTRY_IS_NULL = "53014517"; + + public static final String PERSON_REGISTRY_STATUS_IS_CLOSED = "53014518"; + + public static final String PERSON_REGISTRY_DEVICE_IS_NOT_ADD = "53014519"; + + public static final String PERSON_REGISTRY_DETAIL_FAIL = "53014520"; + + public static final String PERSON_REGISTRY_PRO_LIST_FAIL = "53014521"; + + public static final String PERSON_REGISTRY_UNIQUE_PRO_IS_NULL = "53014522"; + + public static final String PERSON_REGISTRY_UNIQUE_PRO_FAIL = "53014523"; + + public static final String PERSON_PRO_IS_NULL = "53014524"; + + public static final String PERSON_CERT_PRO_IS_NULL = "53014525"; + + public static final String CARDID_NOT_BIND_PRO = "53014526"; + + public static final String NAME_NOT_BIND_PRO = "53014527"; + + public static final String BIND_PRO_ONE_TO_MANY = "53014528"; + + public static final String DEFAULT_PRO_ORG_LABEL_IS_REQUIRED = "53014529"; + + public static final String PERSON_REGISTRY_TYPE_INVALID = "53014530"; + + public static final String QUERY_DISTRICT_TREE_FAIL = "53014600"; + + public static final String QUERY_DEVICE_LIST_FAIL = "53014700"; + + public static final String DEVICE_ID_IS_NULL = "53014701"; + + public static final String QUERY_PERSON_GROUP_RELATIONS_FAIL = "53014702"; + + public static final String QUERY_QR_CODE_URL_FAIL = "53014900"; + + public static final String PERSON_AUDIT_PARAM_SOURCE = "53060533"; + + public static final String PERSON_AUDIT_DEVICE_FORBID = "53060534"; + + public static final String PERSON_AUDIT_ADD_EXCEPTION = "53060535"; + + public static final String PERSON_AUDIT_ID_INVALID = "53060536"; + + public static final String PERSON_AUDIT_ID_ISNULL = "53060537"; + + public static final String PERSON_AUDIT_QUERY_FAILED = "53060538"; + + public static final String PERSON_AUDIT_APPLY_FAILED = "53060539"; + + public static final String PERSON_AUDIT_PAGE_FAILED = "53060540"; + + public static final String PERSON_AUDIT_REGISTRY_SETTING_FAILED = "53060541"; + + public static final String PERSON_AUDIT_DEVICECODE_EMPTY = "53060542"; + + public static final String PERSON_AUDIT_DEVICE_INVALID = "53060543"; + + public static final String PERSON_AUDIT_UPLOAD_BASE64_EMPTY = "53060544"; + + public static final String PERSON_AUDIT_CHECK_NAME_EMPTY = "53060545"; + + public static final String PERSON_AUDIT_CHECK_WRONG_CAPTCHA = "53060546"; + + public static final String PERSON_AUDIT_UNIQUE_PROPERTY_ERROR = "53060547"; + + public static final String PERSON_AUDIT_QUERY_AUDIT_EMPTY = "53060548"; + + public static final String PERSON_AUDIT_AGREE_CAN_NOT_EDIT = "53060549"; + + public static final String AREA_PARENT_ID_IS_NULL = "53015100"; + + public static final String AREA_PARENT_HSH_LOWER_LEVEL_ERROR = "53015101"; + + public static final String AREA_PARENT_IS_HAVING = "53015102"; + + public static final String AREA_NAME_IS_EXIST = "53015103"; + + public static final String AREA_ID_IS_ERROR = "53015104"; + + public static final String AREA_PARENT_NODE_IS_ERROR = "53015105"; + + public static final String AREA_YI_IS_NOT_DELETE = "53015106"; + + public static final String AREA_TYPE_ID_IS_NULL = "53015107"; + + public static final String UNIT_ID_ARRAY_IS_ERROR = "53015108"; + + public static final String QUERY_AREA_ERROR = "53015109"; + + public static final String DETAIL_AREA_ERROR = "53015110"; +} diff --git a/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/config/FeignRemoteConfig.java b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/config/FeignRemoteConfig.java new file mode 100644 index 00000000..78e693a5 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/config/FeignRemoteConfig.java @@ -0,0 +1,17 @@ +package cn.cloudwalk.elevator.config; + +public class FeignRemoteConfig { + public static final String PLATFORM_USER_ID = "platformuserid"; + + public static final String LOGIN_ID = "loginid"; + + public static final String BUSINESS_ID = "businessid"; + + public static final String USER_NAME = "username"; + + public static final String APPLICATION_ID = "applicationid"; + + public static final String AUTHORIZATION = "authorization"; + + public static final String SERVICE_CODE = "elevator-app"; +} diff --git a/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/config/FeignThreadLocalUtil.java b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/config/FeignThreadLocalUtil.java new file mode 100644 index 00000000..af592f9c --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/config/FeignThreadLocalUtil.java @@ -0,0 +1,79 @@ +package cn.cloudwalk.elevator.config; + +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.session.extend.DefaultExtendContext; +import cn.cloudwalk.elevator.context.CloudWalkExtendContextValue; +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; +import javax.servlet.http.HttpServletRequest; +import org.apache.commons.lang3.StringUtils; + +public class FeignThreadLocalUtil { + private static ThreadLocal> threadLocal = new ThreadLocal<>(); + + public static void set(Map t) { + threadLocal.remove(); + threadLocal.set(t); + } + + public static Map get() { + return threadLocal.get(); + } + + public static void remove() { + threadLocal.remove(); + } + + public static Map getRequestHeader(HttpServletRequest request) { + Map map = new ConcurrentHashMap<>(10); + if (null != request.getHeader("platformuserid")) { + map.put("platformuserid", request.getHeader("platformuserid")); + } + if (null != request.getHeader("loginid")) { + map.put("loginid", request.getHeader("loginid")); + } + if (null != request.getHeader("businessid")) { + map.put("businessid", request.getHeader("businessid")); + } + if (null != request.getHeader("username")) { + map.put("username", request.getHeader("username")); + } + if (null != request.getHeader("applicationid")) { + map.put("applicationid", request.getHeader("applicationid")); + } + if (null != request.getHeader("authorization")) { + map.put("authorization", request.getHeader("authorization")); + } + return map; + } + + public static Map getDefaultReqesutHeader(String businessId) { + Map map = new ConcurrentHashMap<>(2); + map.put("businessid", businessId); + map.put("username", "default"); + return map; + } + + public static void setRequestHeader(Map headerMap) { + set(headerMap); + } + + public static Map getDefaultRequestHeader(CloudwalkCallContext context) { + Map map = new HashMap<>(10); + DefaultExtendContext extendContext = + (DefaultExtendContext)context.getExt(); + map.put("platformuserid", context.getUser().getCaller()); + map.put("loginid", ((CloudWalkExtendContextValue)extendContext.getValue()).getLoginId()); + map.put("businessid", context.getCompany().getCompanyId()); + map.put("username", + StringUtils.isEmpty(context.getUser().getCallerName()) ? "default" : context.getUser().getCallerName()); + map.put("applicationid", context.getApplicationId()); + map.put("authorization", ((CloudWalkExtendContextValue)extendContext.getValue()).getAuthorization()); + return map; + } + + public static void setRequestHeader(CloudwalkCallContext context) { + set(getDefaultRequestHeader(context)); + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/config/ImageStoreConstants.java b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/config/ImageStoreConstants.java new file mode 100644 index 00000000..484f6cae --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/config/ImageStoreConstants.java @@ -0,0 +1,65 @@ +package cn.cloudwalk.elevator.config; + +import java.util.Arrays; +import java.util.List; + +public class ImageStoreConstants { + public static final short IS_NOT_DEL = 0; + public static final short IS_DEL = 1; + public static final int ASSOCIATED_ACTION_INCLUDE = 0; + public static final int ASSOCIATED_ACTION_EXCLUDE = 1; + public static final int ASSOCIATED_OBJECT_ORG_TYPE = 1; + public static final int ASSOCIATED_OBJECT_LABEL_TYPE = 2; + public static final int ASSOCIATED_OBJECT_PERSON_TYPE = 3; + public static final int ASSOCIATED_OBJECT_MATCHPATTERN_TYPE = 4; + public static final int ASSOCIATED_OBJECT_IMAGE_STORE_TYPE = 5; + public static final String COMMON_BUSINESS_ID = "cloudwalk"; + public static final Integer COMMON_PROPERTIES_STATUS = Integer.valueOf(99); + public static final Integer COMMON_UNIT_PROPERTIES_STATUS = Integer.valueOf(98); + public static final Integer COMMON_PARK_PROPERTIES_STATUS = Integer.valueOf(97); + private static final List CUST_PROPERTIES = Arrays.asList(new String[] {"ext1", "ext2", "ext3", "ext4", + "ext5", "ext6", "ext7", "ext8", "ext9", "ext10", "ext11", "ext12", "ext13", "ext14", "ext15", "ext16", "ext17", + "ext18", "ext19", "ext20", "ext21", "ext22", "ext23", "ext24", "ext25", "ext26", "ext27", "ext28", "ext29", + "ext30", "ext31", "ext32", "ext33", "ext34", "ext35", "ext36", "ext37", "ext38", "ext39", "ext40"}); + public static final String PERSON_PROPERTY_USER_NAME = "userName"; + + public static List getCustProperties() { + return CUST_PROPERTIES; + } + + public static final String PERSON_PROPERTY_PHONE = "phone"; + public static final String PERSON_PROPERTY_EMAIL = "email"; + public static final String COMPARE_PICTURE = "comparePicture"; + public static final String PERSON_PROPERTY_PERSON_CODE = "personCode"; + public static final String IC_CAED_NO = "icCardNo"; + public static final String IC_CAED_TYPE = "icCardType"; + public static final String FLOORS = "floors"; + public static final String PROPERTY_CODE = "code"; + public static final String PROPERTY_HAS_REQUIRED = "hasRequired"; + public static final int PROPERTY_REQUIRED = 1; + public static final int PROPERTY_UNREQUIRED = 0; + public static final String PERSON_PROPERTY_NAME = "name"; + public static final String PERSON_PROPERTY_ORGANIZATIONIDS = "organizationIds"; + public static final String PERSON_PROPERTY_LABELIDS = "labelIds"; + public static final String CREATE_SYS_ACCOUNT_CODE = "createSysAccount"; + public static final String CREATE_SYS_ACCOUNT_NAME = "同步创建账号"; + public static final String SYS_ACCOUNT_ID_CODE = "sysAccountId"; + public static final String SYS_ACCOUNT_ID_NAME = "同步创建账号系统ID"; + public static final Integer AGREE = Integer.valueOf(0); + public static final String SYSTEM_USER = "system"; + public static final String IMAGE_STORE_ID = "imageStoreId"; + public static final String PASS_CRONS = "passCrons"; + public static final short PERSON_DELETED = -1; + public static final short PERSON_VALIDATE = 0; + public static final short PERSON_INVALIDATE = 1; + public static final short DEVICE_PERSON_VALIDATE = 1; + public static final short DEVICE_PERSON_INVALIDATE = 0; + public static final Integer MAX_FILE = Integer.valueOf(3145728); + public static final String SYSTEM_GROUP_CREATE_USER_ID = "group"; + public static final int PERSON_ACTION_DELETE = -1; + public static final int PERSON_ACTION_ADD = 0; + public static final int PERSON_ACTION_UPDATE = 1; + public static final short GROUP_MODEL_STATUS_NO_IMG = 0; + public static final int PERSON_VALIDATE_UNPROCESSED = 0; + public static final int PERSON_VALIDATE_PROCESSED = 1; +} diff --git a/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/context/CloudWalkExtendContextValue.java b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/context/CloudWalkExtendContextValue.java new file mode 100644 index 00000000..b1b6262e --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/context/CloudWalkExtendContextValue.java @@ -0,0 +1,22 @@ +package cn.cloudwalk.elevator.context; + +public class CloudWalkExtendContextValue { + private String loginId; + private String authorization; + + public String getLoginId() { + return this.loginId; + } + + public void setLoginId(String loginId) { + this.loginId = loginId; + } + + public String getAuthorization() { + return this.authorization; + } + + public void setAuthorization(String authorization) { + this.authorization = authorization; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/em/AcsApplicationSourceEnum.java b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/em/AcsApplicationSourceEnum.java new file mode 100644 index 00000000..a7efac74 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/em/AcsApplicationSourceEnum.java @@ -0,0 +1,30 @@ +package cn.cloudwalk.elevator.em; + +public enum AcsApplicationSourceEnum { + ACCESS_CONTROL("ACCESS_CONTROL", "门禁应用"), CWOS_PORTAL("CWOS_PORTAL", "平台应用"); + + private final String code; + private final String name; + + AcsApplicationSourceEnum(String code, String name) { + this.code = code; + this.name = name; + } + + public static AcsApplicationSourceEnum getEnumByCode(String code) { + for (AcsApplicationSourceEnum item : values()) { + if (code.equals(item.code)) { + return item; + } + } + return null; + } + + public String getCode() { + return this.code; + } + + public String getName() { + return this.name; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/em/AcsDeviceIdentifyTypeEnum.java b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/em/AcsDeviceIdentifyTypeEnum.java new file mode 100644 index 00000000..6e893982 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/em/AcsDeviceIdentifyTypeEnum.java @@ -0,0 +1,30 @@ +package cn.cloudwalk.elevator.em; + +public enum AcsDeviceIdentifyTypeEnum { + FRONT_REG(Integer.valueOf(0), "前端识别"), BACKEND_REG(Integer.valueOf(1), "后端识别"); + + private Integer code; + private String name; + + AcsDeviceIdentifyTypeEnum(Integer code, String name) { + this.code = code; + this.name = name; + } + + public static AcsDeviceIdentifyTypeEnum getEnumByCode(Integer code) { + for (AcsDeviceIdentifyTypeEnum item : values()) { + if (code.equals(item.getCode())) { + return item; + } + } + return null; + } + + public Integer getCode() { + return this.code; + } + + public String getName() { + return this.name; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/em/AcsDeviceQueryTypeEnum.java b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/em/AcsDeviceQueryTypeEnum.java new file mode 100644 index 00000000..b4c8913f --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/em/AcsDeviceQueryTypeEnum.java @@ -0,0 +1,30 @@ +package cn.cloudwalk.elevator.em; + +public enum AcsDeviceQueryTypeEnum { + QUERY_MAIN(Integer.valueOf(1), "只查询主设备"), QUERY_MAIN_AND_SUB(Integer.valueOf(2), "查询主设备及其子设备"); + + private Integer code; + private String message; + + AcsDeviceQueryTypeEnum(Integer code, String message) { + this.code = code; + this.message = message; + } + + public static AcsDeviceQueryTypeEnum getEnumByCode(Integer code) { + for (AcsDeviceQueryTypeEnum item : values()) { + if (code.equals(item.getCode())) { + return item; + } + } + return null; + } + + public Integer getCode() { + return this.code; + } + + public String getMessage() { + return this.message; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/em/AcsDeviceSettingEnum.java b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/em/AcsDeviceSettingEnum.java new file mode 100644 index 00000000..9d3d88e9 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/em/AcsDeviceSettingEnum.java @@ -0,0 +1,59 @@ +package cn.cloudwalk.elevator.em; + +import java.util.ArrayList; +import java.util.List; + +public enum AcsDeviceSettingEnum { + QUALITY_SCORE("qualityScore", "人脸抓拍质量分", AcsApplicationSourceEnum.CWOS_PORTAL), + TEMP_THRESHOLD("tempThreshold", "温度报警阈值", AcsApplicationSourceEnum.CWOS_PORTAL), + TEMP_MIN("tempMin", "温度最低值", AcsApplicationSourceEnum.CWOS_PORTAL), + MASK_THRESHOLD("maskThreshold", "口罩阈值", AcsApplicationSourceEnum.CWOS_PORTAL), + LIVE_STATE("liveState", "活体检测开关", AcsApplicationSourceEnum.CWOS_PORTAL), + TEMP_STATE("tempState", "温度控制开关", AcsApplicationSourceEnum.CWOS_PORTAL), + FACE_SIZE_MIN("faceSizeMin", "人脸最小尺寸", AcsApplicationSourceEnum.CWOS_PORTAL), + FACE_SIZE_MAX("faceSizeMax", "人脸最大尺寸", AcsApplicationSourceEnum.CWOS_PORTAL), + FACE_ONE_THRESHOLD("faceOneThreshold", "人脸1:1识别阈值", AcsApplicationSourceEnum.CWOS_PORTAL), + FACE_MANY_THRESHOLD("faceManyThreshold", "人脸1:N识别阈值", AcsApplicationSourceEnum.CWOS_PORTAL), + ACS_FACE_REG_THRESHOLD("ACS_FACE_REG_THRESHOLD", "人脸抓拍识别阈值", AcsApplicationSourceEnum.ACCESS_CONTROL); + + private String code; + private String remark; + private AcsApplicationSourceEnum source; + + public String getCode() { + return this.code; + } + + public String getRemark() { + return this.remark; + } + + public AcsApplicationSourceEnum getSource() { + return this.source; + } + + AcsDeviceSettingEnum(String code, String remark, AcsApplicationSourceEnum source) { + this.code = code; + this.remark = remark; + this.source = source; + } + + public static AcsDeviceSettingEnum getEnumByCode(String code) { + for (AcsDeviceSettingEnum item : values()) { + if (code.equals(item.code)) { + return item; + } + } + return null; + } + + public static List getEnumBySource(String source) { + List list = new ArrayList<>(); + for (AcsDeviceSettingEnum item : values()) { + if (source.equals(item.source.getCode())) { + list.add(item); + } + } + return list; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/em/AcsOpenDoorStatusEnum.java b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/em/AcsOpenDoorStatusEnum.java new file mode 100644 index 00000000..dec88638 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/em/AcsOpenDoorStatusEnum.java @@ -0,0 +1,30 @@ +package cn.cloudwalk.elevator.em; + +public enum AcsOpenDoorStatusEnum { + INIT(Integer.valueOf(0), "初始化"), SUCESS(Integer.valueOf(1), "成功"), FAIL(Integer.valueOf(2), "失败"); + + private Integer code; + private String message; + + AcsOpenDoorStatusEnum(Integer code, String message) { + this.code = code; + this.message = message; + } + + public static AcsOpenDoorStatusEnum getEnumByCode(Integer code) { + for (AcsOpenDoorStatusEnum item : values()) { + if (code.equals(item.getCode())) { + return item; + } + } + return null; + } + + public Integer getCode() { + return this.code; + } + + public String getMessage() { + return this.message; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/em/AcsOperateStatusEnum.java b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/em/AcsOperateStatusEnum.java new file mode 100644 index 00000000..20182ba5 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/em/AcsOperateStatusEnum.java @@ -0,0 +1,30 @@ +package cn.cloudwalk.elevator.em; + +public enum AcsOperateStatusEnum { + INIT(Integer.valueOf(0), "初始化"), MATCHED(Integer.valueOf(1), "已匹配"); + + private Integer code; + private String message; + + AcsOperateStatusEnum(Integer code, String message) { + this.code = code; + this.message = message; + } + + public static AcsOperateStatusEnum getEnumByCode(Integer code) { + for (AcsOperateStatusEnum item : values()) { + if (code.equals(item.getCode())) { + return item; + } + } + return null; + } + + public Integer getCode() { + return this.code; + } + + public String getMessage() { + return this.message; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/em/AcsOperateTypeEnum.java b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/em/AcsOperateTypeEnum.java new file mode 100644 index 00000000..edfba1c1 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/em/AcsOperateTypeEnum.java @@ -0,0 +1,30 @@ +package cn.cloudwalk.elevator.em; + +public enum AcsOperateTypeEnum { + REMOTE_OPEN_DOOR("REMOTE_OPEN_DOOR", "远程开门"), QRCODE_OPEN_DOOR("QRCODE_OPEN_DOOR", "小程序扫码开门"); + + private String code; + private String message; + + AcsOperateTypeEnum(String code, String message) { + this.code = code; + this.message = message; + } + + public static AcsOperateTypeEnum getEnumByCode(String code) { + for (AcsOperateTypeEnum item : values()) { + if (code.equals(item.getCode())) { + return item; + } + } + return null; + } + + public String getCode() { + return this.code; + } + + public String getMessage() { + return this.message; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/em/AcsPassTypeEnum.java b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/em/AcsPassTypeEnum.java new file mode 100644 index 00000000..66220ac8 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/em/AcsPassTypeEnum.java @@ -0,0 +1,30 @@ +package cn.cloudwalk.elevator.em; + +public enum AcsPassTypeEnum { + LONG_TIME(Integer.valueOf(0), "长期"), AUTO_PASS(Integer.valueOf(1), "自定义时间"), PASS_TIME(Integer.valueOf(2), "通行时间段"); + + private Integer code; + private String message; + + AcsPassTypeEnum(Integer code, String message) { + this.code = code; + this.message = message; + } + + public static YesNoTypeEnum getEnumByCode(Integer code) { + for (YesNoTypeEnum item : YesNoTypeEnum.values()) { + if (code.equals(item.getCode())) { + return item; + } + } + return null; + } + + public Integer getCode() { + return this.code; + } + + public String getMessage() { + return this.message; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/em/AlarmStateCodeEnum.java b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/em/AlarmStateCodeEnum.java new file mode 100644 index 00000000..8d6ed6d1 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/em/AlarmStateCodeEnum.java @@ -0,0 +1,55 @@ +package cn.cloudwalk.elevator.em; + +public enum AlarmStateCodeEnum { + OPERATION_FAILED("36000001", "操作失败"), EMPTY_PARAMETERS_WRONG("36000002", "参数不能为空"), + INSERT_DATABSE_EREEOR("36000003", "插入数据库异常"), EMPTY_USER_ID("36000004", "ID不能为空"), + PARAM_ERROR("36000005", "参数不符合要求"), SEARCH_INFORMATION_FAILED("36000006", "查询信息失败"), + TASK_NAME_EXIST("36000007", "布控名称重复"), TASK_TYPE_NAME_EXIST("36000012", "布控类型名称重复"), + DELETE_NOT_EXIST("36000008", "被删除资源不存在"), CONTROL_TASK_TYPE_HAS_TASK("36000009", "存在关联任务"), + SAVE_TASK_TYPE_ERROR("36000010", "保存区控类型失败"), UPDATE_TASK_TYPE_ERROR("36000011", "更新区控类型失败"), + FILE_SIZE_ILLEGAL("3600030", "文件大小超过"), WRONG_PARAMETERS("400", "参数错误"), SERVER_EXCEPTION("500", "服务器异常"), + SUCCESS("00000000", "成功"), CWOS_FEIGN_FAILED("36000007", "调用cwos接口异常"), PAGE_QUERY_FAILED("36000008", "分页查询失败"), + PARAM_REPEAT("36000009", "证件类型+证件号重复"), CONTROL_TASK_ID_NOT_EXIST("36000010", "任务编号不存在"), + DEVICE_NOT_EXIST("36000011", "回放链接已失效"), LABEL_NAME_DUPLICATE_FAILED("10001056", "库名称重复"), + LABEL_NAME_INVALID("10001050", "库名称无效"), LABEL_QUERY_FAILED("10001051", "标签查询失败"), + LABEL_SAVE_FAILED("10001052", "标签保存失败"), LABEL_UPDATE_FAILED("10001053", "标签更新失败"), + LABEL_DELETE_FAILED("10001054", "标签删除失败"), EMPTY_LABEL_NAME("10001055", "标签名称为空"), + LABEL_PAGE_FAILED("10001055", "分页查询标签异常"), LABEL_LIST_FAILED("10001057", "列表查询标签异常"), + LABEL_BRAND_FAILED("10001060", "查询车辆品牌异常"), VEHICLE_TYPE_FAILED("10001061", "查询车辆类型异常"), + VEHICLE_DETAIL_ERROR("10001062", "车辆详情查询失败"), CODE_QUERY_ERROR("10001063", "查询失败"), + LABEL_SIZE_FAILED("10001067", "库名称超过最大长度"), PLATE_NO_DUPLICATE("10001070", "车牌号重复添加"), + VEHICLE_ADD_ERROR("10001071", "车辆添加失败"), VEHICLE_PROPERTY_UNQUALIFIED("10001087", "车辆属性不合格"), + PLATE_NO_INVALID("10005202", "车牌号无效"), VEHICLE_TYPE_INVALID("10005203", "车牌类型无效"), + VEHICLE_BRAND_INVALID("10005204", "车辆品牌无效"), VEHICLE_EDIT_FAIL("10001069", "车辆编辑失败"), + VEHICLE_DELETE_ERROR("10001076", "车辆删除失败"), VEHICLE_PAGE_FAILED("10001064", "车辆分页查询失败"), + VEHICLE_LIST_FAILED("10001065", "车辆LIST查询失败"), LABEL_BIND_VEHICLE("10001058", "该标签已被绑定具体车辆"), + EMPTY_PIC_NAME("10001059", "图片地址为空"), PICTURE_FAILED("10001070", "图片不合法"), + LABEL_BIND_PERSON("10002058", "该标签已被绑定具体人员"), LABEL_BIND_FIELD("10002059", "该标签绑定人员失败"), + PERSON_PROPERTY_UNQUALIFIED("10002087", "人脸属性不合格"), PERSON_PIC_UNQUALIFIED("10002088", "人脸图片不合格"), + PERSON_ORG_ADD_FEILD("10002089", "人员管理添加人员失败"), PERSON_ADD_ERROR("10002071", "人员添加失败"), + PERSON_DUPLICATE("10002070", "人员重复添加"), PHONE_NO_INVALID("10005205", "手机号无效"), CARD_NO_INVALID("10005206", "身份证无效"), + NAME_NO_INVALID("10005207", "名称无效"), CARD_NO_DUPLICATE("10005208", "身份证重复添加"), + PERSON_EDIT_FAIL("10002069", "人员编辑失败"), PERSON_DELETE_ERROR("10002076", "人员删除失败"), + PERSON_PAGE_FAILED("10002064", "人员分页查询失败"), PERSON_LIST_FAILED("10002065", "人员LIST查询失败"), + ORGANIZATION_PERSONS_EMPTY("10002066", "人员管理人员信息为空"), FILE_TYPE_IS_INVALID("53060429", "上传文件类型不合法"), + FILE_MAX_IS_ERROR("53060428", "上传文件超过最大大小"), FILE_UPLOAD_CONTROLLER_ERROR("80014013", "模块文件上传异常"), + PIC_DELETE_ERROR("10001084", "图片删除失败"), EXPORT_TASK_DOWNLOAD_CENTER_FAILURE("36000008", "下载中心创建下载任务失败"), + EXPORT_TASK_FAILURE("36000009", "添加导出任务失败"), EXPORT_TASK_TYPE_ERROR("36000010", "导出任务类型错误"), + EXPORT_TASK_OVERLOAD_THRESHOLD("36000011", "查询导出记录超过设定阈值"); + + private String code; + private String message; + + AlarmStateCodeEnum(String code, String message) { + this.code = code; + this.message = message; + } + + public String getCode() { + return this.code; + } + + public String getMessage() { + return this.message; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/em/CompareTypeEnum.java b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/em/CompareTypeEnum.java new file mode 100644 index 00000000..8631cec2 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/em/CompareTypeEnum.java @@ -0,0 +1,31 @@ +package cn.cloudwalk.elevator.em; + +public enum CompareTypeEnum { + RECOG(Integer.valueOf(1), "1:N比对"), PERSON_CARD(Integer.valueOf(2), "人证比对"), + ACS_BACK_RECOG(Integer.valueOf(3), "门禁1:N比对"), APP_BACK_RECOG(Integer.valueOf(4), "应用端1:N比对"); + + private Integer code; + private String message; + + CompareTypeEnum(Integer code, String message) { + this.code = code; + this.message = message; + } + + public static CompareTypeEnum getEnumByCode(Integer code) { + for (CompareTypeEnum item : values()) { + if (code.equals(item.getCode())) { + return item; + } + } + return null; + } + + public Integer getCode() { + return this.code; + } + + public String getMessage() { + return this.message; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/em/EngineAddressEnum.java b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/em/EngineAddressEnum.java new file mode 100644 index 00000000..89aad925 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/em/EngineAddressEnum.java @@ -0,0 +1,70 @@ +package cn.cloudwalk.elevator.em; + +public enum EngineAddressEnum { + PORTAL_USER_PAGE("用户查询接口", "/portal/user/manage/page"), + PERSON_PROPERTIES_LIST("查询商户对应的员工属性", "/component/person/properties/list"), + NINCACOMMON_AREA_GET_ALL_TREE("获取区域树状结构", "/sysetting/deviceArea/tree"), + COMMON_VEHICLE_GET_ALL_LABLES("获取车辆管理标签信息", "/vm/label/list"), + COMMON_VEHICLE_VM_VEHICLE_LABELREF("获取车辆管理车辆分页信息", "/vm/vehicle/control/labelRef"), + COMMON_VEHICLE_VM_VEHICLE_LIST("批量获取车辆管理车辆信息", "/vm/vehicle/list"), + CWOS_DEVICE_GET("设备列表查询", "/component/device/list"), CW0S_DEVICE_DETAIL("设备详情", "/core/atomic/device/detail"), + CWOS_DEVICE_SETTING("下发参数到设备", "/server/push/55000"), + CWOS_AREA_GET_ALL_TREE("获取区域树状结构", "/component/device/area/get/alltree"), + CWOS_QUERY_DEVICE_APPLICATION("查询设备与应用关联列表", "/component/device/app/list"), + CWOS_BIND_DEVICE_APPLICATION("绑定设备与应用", "/component/device/app/add"), + CWOS_SPLIT_DEVICE_APPLICATION("解绑设备与应用", "/component/device/app/delete"), + CWOS_QUERY_APPLICATION_ID("查询应用ID", "/res/application/instance/query"), + CWOS_BIND_DEVICE_IMAGESTORE("绑定图库与设备", "/component/device/imagestore/add"), + CWOS_SPLIT_DEVICE_IMAGESTORE("解除绑定图库与设备", "/component/device/imagestore/delete"), + CWOS_BIND_IMAGESTORE_APPLICATION("绑定图库与应用", "/core/application/group/add"), + CWOS_SPLIT_IMAGESTORE_APPLICATION("解绑图库与应用", "/core/application/group/delete"), + CWOS_ORGANIZATION_TREE("查询机构树型结构", "/component/organization/tree"), + CWOS_BIOLOGY_IMAGE_COMPARE("单库或多库比对", "/component/biology/tool/feature/query"), + CWOS_BIOLOGY_PERSON_DETAIL("查询人员信息详情", "/component/person/detail"), + CWOS_BIOLOGY_PERSON_LIST("查询人员信息", "/component/person/listPerson"), + CWOS_BIOLOGY_IMAGESTORE_ADD("新增图库", "/component/imagestore/add"), + CWOS_BIOLOGY_IMAGESTORE_EDIT("编辑图库", "/component/imagestore/edit"), + CWOS_BIOLOGY_IMAGESTORE_LIST("查询图库", "/component/imagestore/list"), + COWS_BIOLOGY_IMAGESTORE_DELETE("删除图库", "/component/imagestore/delete"), + CWOS_BIOLOGY_IMAGESTORE_DETAIL("图库详情", "/component/imagestore/detail"), + CWOS_BIOLOGY_PERSON_PAGE("分页查询人员", "/component/person/page"), + CWOS_BIOLOGY_PERSON_ADD("新增人员", "/component/person/add"), + CWOS_BIOLOGY_PERSON_EDIT("编辑人员", "/component/person/edit"), + CWOS_BIOLOGY_PERSON_DELETE("删除人员", "/component/person/delete"), + CWOS_BIOLOGY_LABEL_GETALLLABELS("查询标签列表", "/biology/label/getAllLabels"), + CWOS_BIOLOGY_LABLE_ADD("新增标签", "/biology/label/add"), CWOS_BIOLOGY_LABLE_EDIT("编辑标签", "/biology/label/edit"), + CWOS_BIOLOGY_LABLE_DELETE("删除标签", "/biology/label/delete"), + CWOS_BIOLOGY_LABLE_PERSONS_ADD("标签人员新增", "/biology/label/personsAdd"), + CWOS_BIOLOGY_LABLE_PERSONS_DEL("标签人员删除", "/biology/label/personsDel"), + CWOS_FILE_UPLOAD("文件上传", "/portal/fileManager/{moduleCategory}/fileUpload"), + CWOS_FILE_DELETE("文件删除", "/portal/fileManager/remove/images"), + CWOS_FILE_PART_INIT("分片上传文件初始化", "/portal/file/part/init"), + CWOS_FILE_PART_FINISH("分片上传文件结束", "/portal/file/part/finish"), CWOS_FILE_APPEND("文件追加", "/portal/file/part/append"), + PINEAPPLE_FACE_FEATURE_GET("人脸特征提取", "staticdb/search/feature"), + PINEAPPLE_FACE_SEARCH_MULTIPLE("多库人脸检索", "staticdb/search/multiple"), + PINEAPPLE_STRUCTURE_ATTRIBUTE("全结构化属性", "structure/recognize"), + PINEAPPLE_CLUSTER_FACE_ADD("特征入库", "api/cluster/feature/add"), + PINEAPPLE_CLUSTER_START_DEVICE("按groupId聚类", "api/cluster/doClusterByDeviceId"), + PINEAPPLE_CLUSTER_GET_TASK_INFO("获取聚类任务信息", "api/cluster/getAllTaskInfo"), + PINEAPPLE_CLUSTER_STOP("停止聚类", "api/cluster/stopIncreCluster"), + PINEAPPLE_CLUSTER_GROUP_REMOVE("删除聚类库", "api/cluster/group/base/remove"), + PINEAPPLE_ENGINE_PAGE_INFO("引擎分页查询", "gateway/config/server/getbypage"), + SEND_MESSAGE_TO_MQTT("发送数据到mqtt", "mqtt/publish"), GET_ALIVE_CLIENTS_OF_MQTT("获得所有存活的客户端", "mqtt/getClients"), + ALARM_OCCUR("声光报警器触发", "mqtt/publish"), VISITOR_QUERY("查询识别记录详情", "/intelligent/visitor/record/query"); + + private final String api; + private final String address; + + EngineAddressEnum(String api, String address) { + this.api = api; + this.address = address; + } + + public String getApi() { + return this.api; + } + + public String getAddress() { + return this.address; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/em/OpenDoorTypeEnum.java b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/em/OpenDoorTypeEnum.java new file mode 100644 index 00000000..cddd943a --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/em/OpenDoorTypeEnum.java @@ -0,0 +1,41 @@ +package cn.cloudwalk.elevator.em; + +public enum OpenDoorTypeEnum { + FACE("FACE", "人脸开门"), APP("APP", "远程开门"), GUARD_CARD("GUARD_CARD", "门禁卡开门"), PASSWORD("PASSWORD", "密码开门"), + ID_CARD("ID_CARD", "身份证开门"), FACE_GUARD_CARD("FACE_GUARD_CARD", "人脸门禁卡开门"), INTERCOM("INTERCOM", "室内机开门"), + ONE("01", "人脸开门"), TWO("02", "门禁卡开门"), THREE("03", "二维码开门"); + + private String code; + private String remark; + + public String getCode() { + return this.code; + } + + public String getRemark() { + return this.remark; + } + + OpenDoorTypeEnum(String code, String remark) { + this.code = code; + this.remark = remark; + } + + public static String getEnumByCode(String code) { + for (OpenDoorTypeEnum item : values()) { + if (code.equals(item.code) || code.toUpperCase().equals(item.code)) { + return item.remark; + } + } + return code; + } + + public static OpenDoorTypeEnum getOpenDoorTypeEnumByCode(String code) { + for (OpenDoorTypeEnum item : values()) { + if (code.equals(item.code) || code.toUpperCase().equals(item.code)) { + return item; + } + } + return null; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/em/YesNoTypeEnum.java b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/em/YesNoTypeEnum.java new file mode 100644 index 00000000..f8d6160a --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/em/YesNoTypeEnum.java @@ -0,0 +1,30 @@ +package cn.cloudwalk.elevator.em; + +public enum YesNoTypeEnum { + N(Integer.valueOf(0), "否"), Y(Integer.valueOf(1), "是"); + + private Integer code; + private String message; + + YesNoTypeEnum(Integer code, String message) { + this.code = code; + this.message = message; + } + + public static YesNoTypeEnum getEnumByCode(Integer code) { + for (YesNoTypeEnum item : values()) { + if (code.equals(item.getCode())) { + return item; + } + } + return null; + } + + public Integer getCode() { + return this.code; + } + + public String getMessage() { + return this.message; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/package-info.java b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/package-info.java new file mode 100644 index 00000000..0f79a380 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/package-info.java @@ -0,0 +1,7 @@ +/** + * 电梯应用公共层:工具、上下文、注解与跨模块复用的领域模型片段。 + *

+ * 被 {@code cw-elevator-application-data}、{@code cw-elevator-application-service}、{@code cw-elevator-application-web} + * 等模块依赖, 请勿在本包引入对上层 Web 或具体业务编排的反向依赖。 + */ +package cn.cloudwalk.elevator; diff --git a/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/util/AcsCacheKeyUtil.java b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/util/AcsCacheKeyUtil.java new file mode 100644 index 00000000..1d69704a --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/util/AcsCacheKeyUtil.java @@ -0,0 +1,19 @@ +package cn.cloudwalk.elevator.util; + +public class AcsCacheKeyUtil { + public static String getOpenDoorCountKey(String date, String businessId) { + return "elevator:passCount:" + date + ":" + businessId; + } + + public static String getRecogCountKey(String date, String businessId) { + return "acs_recogCount_" + date + "_" + businessId; + } + + public static String getBackendRegLogIdKey(String deviceCode, String businessId, String captureId) { + return "acs:backendRegLogId:" + deviceCode + "_" + businessId + "_" + captureId; + } + + public static String getBackendRegExpireKey(String businessId, String openDoorLogId) { + return "acs:backendRegExpire:#" + businessId + "#" + openDoorLogId; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/util/CollectionUtils.java b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/util/CollectionUtils.java new file mode 100644 index 00000000..6b50de0b --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/util/CollectionUtils.java @@ -0,0 +1,806 @@ +package cn.cloudwalk.elevator.util; + +import java.io.IOException; +import java.io.ObjectOutputStream; +import java.io.Serializable; +import java.lang.reflect.Array; +import java.util.AbstractList; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.Enumeration; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.NoSuchElementException; +import java.util.Queue; +import java.util.Set; +import java.util.Stack; +import org.springframework.util.Assert; +import org.springframework.util.MultiValueMap; + +public class CollectionUtils { + private static final int HASH_MAP_DEFAULT_INITIAL_CAPACITY = 16; + private static final float HASH_MAP_DEFAULT_LOAD_FACTOR = 0.75F; + + public static E getFirst(Collection c) { + if (c == null) { + return null; + } + if (c instanceof List) { + List list = (List)c; + return list.isEmpty() ? null : list.get(0); + } + if (c instanceof Set) + return c.isEmpty() ? null : c.iterator().next(); + if (c instanceof Queue) { + return c.isEmpty() ? null : ((Queue)c).peek(); + } + return c.isEmpty() ? null : c.iterator().next(); + } + + public static List removeList(List listA, List listB) { + HashSet hs1 = new HashSet<>(listA); + HashSet hs2 = new HashSet<>(listB); + hs1.removeAll(hs2); + List listC = new ArrayList<>(); + listC.addAll(hs1); + return listC; + } + + public static List> split(List list, E element) { + if (list == null) { + return new ArrayList<>(0); + } + List> result = new ArrayList<>(); + int start = 0, end = 0; + for (E e : list) { + if ((element == null) ? (e == null) : element.equals(e)) { + result.add(new ArrayList<>(list.subList(start, end))); + start = end + 1; + } + end++; + } + if (start == list.size()) { + result.add(new ArrayList<>(0)); + } else if (start < list.size()) { + result.add(new ArrayList<>(list.subList(start, list.size()))); + } + return result; + } + + public static List> split(List list, int... index) { + if (list == null) { + return new ArrayList<>(0); + } + if (index == null || index.length == 0) { + ArrayList> arrayList = new ArrayList<>(); + arrayList.add(new ArrayList<>(list)); + return arrayList; + } + if (index.length > list.size()) { + throw new IllegalArgumentException("{index}数量不能大于{list}长度。"); + } + List> result = new ArrayList<>(); + int temp = 0; + for (int i : index) { + if (i < temp) { + throw new IllegalArgumentException("{index}的每个值必须比前一个大。"); + } + if (i > list.size()) { + throw new IllegalArgumentException("{index}值不能大于{list}长度。"); + } + result.add(new ArrayList<>(list.subList(temp, i))); + temp = i; + } + if (temp == list.size()) { + result.add(new ArrayList<>(0)); + } else if (temp < list.size()) { + result.add(new ArrayList<>(list.subList(temp, list.size()))); + } + return result; + } + + public static List wrap(final T[] array) { + if (array == null) { + return null; + } + return new AbstractList() { + public T get(int index) { + return (T)array[index]; + } + + public int size() { + return array.length; + } + + public T set(int index, T element) { + T old = (T)array[index]; + array[index] = element; + return old; + } + + public void clear() { + throw new UnsupportedOperationException(); + } + + public int indexOf(Object o) { + if (o == null) { + for (int i = 0; i < array.length; i++) { + if (null == array[i]) { + return i; + } + } + } else { + for (int i = 0; i < array.length; i++) { + if (o.equals(array[i])) { + return i; + } + } + } + return -1; + } + + public int lastIndexOf(Object o) { + if (o == null) { + for (int i = array.length - 1; i > -1; i--) { + if (null == array[i]) { + return i; + } + } + } else { + for (int i = array.length - 1; i > -1; i--) { + if (o.equals(array[i])) { + return i; + } + } + } + return -1; + } + + public boolean removeAll(Collection c) { + throw new UnsupportedOperationException(); + } + + public boolean retainAll(Collection c) { + throw new UnsupportedOperationException(); + } + }; + } + + public static List values(Map map) { + if (map == null) { + return null; + } + List list = new ArrayList<>(map.size()); + for (T t : map.values()) { + list.add(t); + } + return list; + } + + public static List keys(Map map) { + if (map == null) { + return null; + } + List list = new ArrayList<>(map.size()); + for (T t : map.keySet()) { + list.add(t); + } + return list; + } + + public static int countOccurrence(E element, Iterable elements) { + if (elements == null) { + return 0; + } + int i = 0; + if (element == null) { + for (E e : elements) { + if (null == e) { + i++; + } + } + } else { + for (E e : elements) { + if (element.equals(e)) { + i++; + } + } + } + return i; + } + + public static E[] toArray(Collection collection, Class typeClass) { + E[] t = (E[])Array.newInstance(typeClass, collection.size()); + int i = 0; + for (Iterator iterator = collection.iterator(); iterator.hasNext(); i++) { + t[i] = iterator.next(); + } + return t; + } + + public static Iterator iterator(final Enumeration enumeration) { + return new Iterator() { + public boolean hasNext() { + return enumeration.hasMoreElements(); + } + + public E next() { + if (!hasNext()) { + throw new NoSuchElementException(); + } + return enumeration.nextElement(); + } + + public void remove() { + throw new UnsupportedOperationException("该迭代器没有指向的集合,所以移除元素为不支持的操作。"); + } + }; + } + + public static Enumeration enumeration(final Iterator iterator) { + return new Enumeration() { + public boolean hasMoreElements() { + return iterator.hasNext(); + } + + public E nextElement() { + return iterator.next(); + } + }; + } + + public static void add(Collection collection, Object value) { + if (value == null) { + collection.add(null); + } else if (value.getClass().isArray()) { + if (value instanceof Object[]) { + for (Object o : (Object[])value) { + collection.add((T)o); + } + } else { + int length = Array.getLength(value); + for (int i = 0; i < length; i++) { + collection.add((T)Array.get(value, i)); + } + } + } else if (value instanceof Collection || value instanceof Stack) { + for (Object object : value) { + collection.add((T)object); + } + } else if (value instanceof Iterator) { + for (Iterator iterator = (Iterator)value; iterator.hasNext();) { + collection.add(iterator.next()); + } + } else { + collection.add((T)value); + } + } + + public static void push(Stack stack, Object value) { + if (value == null) { + stack.push((T)null); + } else if (value.getClass().isArray()) { + if (value instanceof Object[]) { + for (Object o : (Object[])value) { + stack.push((T)o); + } + } else { + int length = Array.getLength(value); + for (int i = 0; i < length; i++) { + stack.push((T)Array.get(value, i)); + } + } + } else if (value instanceof Collection || value instanceof Stack) { + for (Object object : value) { + stack.push((T)object); + } + } else { + stack.push((T)value); + } + } + + public static MultiValueMap synchronizedMultiValueMap(MultiValueMap multiValueMap) { + if (multiValueMap == null) { + throw new IllegalArgumentException("The input argument is null!"); + } + return new SynchronizedMultiValueMap<>(multiValueMap); + } + + public static MultiValueMap + unmodifiableMultiValueMap(MultiValueMap multiValueMap) { + if (multiValueMap == null) { + throw new IllegalArgumentException("The input argument is null!"); + } + return new UnmodifiableMultiValueMap<>(multiValueMap); + } + + public static boolean isEmpty(Collection collection) { + return (collection == null || collection.isEmpty()); + } + + public static boolean isEmpty(Stack stack) { + return (stack == null || stack.isEmpty()); + } + + public static boolean isEmpty(Map map) { + return (map == null || map.isEmpty()); + } + + public static boolean isNotEmpty(Collection collection) { + return (collection != null && !collection.isEmpty()); + } + + public static boolean isNotEmpty(Stack stack) { + return (stack != null && !stack.isEmpty()); + } + + public static boolean isNotEmpty(Map map) { + return (map != null && !map.isEmpty()); + } + + private static boolean isComparable(List list, List compareList, int index) { + if (isEmpty(list) || isEmpty(compareList)) { + return false; + } + Assert.isTrue((index >= 0 && index < list.size()), "{index} 的值必须从0 至 list.size() - 1 之间。"); + if (list.size() < compareList.size()) { + return false; + } + return true; + } + + public static String[] toStringArray(Collection collection) { + if (collection == null) { + return null; + } + String[] stringArray = new String[collection.size()]; + int i = 0; + for (Object o : collection) { + stringArray[i] = StringUtils.toString(o); + i++; + } + return stringArray; + } + + public static void putAllIfAbsent(Map map, Map paramMap) { + if (map == null || paramMap == null) { + return; + } + for (Map.Entry entry : paramMap.entrySet()) { + if (!map.containsKey(entry.getKey())) { + map.put(entry.getKey(), entry.getValue()); + } + } + } + + public static int calculateHashMapMinInitialCapacity(int size) { + return calculateHashMapMinInitialCapacity(size, 0.75F, 16); + } + + public static int calculateHashMapMinInitialCapacity(int size, float loadFactor, int initlalCapcity) { + return Math.max((int)(size / loadFactor) + 1, initlalCapcity); + } + + public static List strArrayToList(String var) { + List list = new ArrayList<>(); + for (String v : var.split(",")) { + list.add(Integer.valueOf(Integer.parseInt(v))); + } + return list; + } + + static class SynchronizedMultiValueMap implements MultiValueMap { + final MultiValueMap multiValueMap; + final Object mutex; + private transient Set keySet = null; + private transient Set>> entrySet; + private transient Collection> values; + private transient Set> singleValueEntrySet; + private transient Collection singleValues; + + SynchronizedMultiValueMap(MultiValueMap multiValueMap) { + if (multiValueMap == null) { + throw new IllegalArgumentException("The input argument is null!"); + } + this.multiValueMap = multiValueMap; + this.mutex = this; + } + + SynchronizedMultiValueMap(MultiValueMap multiValueMap, Object mutex) { + if (multiValueMap == null) { + throw new IllegalArgumentException("The input argument is null!"); + } + this.multiValueMap = multiValueMap; + this.mutex = mutex; + } + + public void add(K key, V value) { + synchronized (this.mutex) { + this.multiValueMap.add(key, value); + } + } + + public void addAll(K k, List list) {} + + public void addAll(MultiValueMap multiValueMap) {} + + public void clear() { + synchronized (this.mutex) { + this.multiValueMap.clear(); + } + } + + public boolean containsKey(Object key) { + synchronized (this.mutex) { + return this.multiValueMap.containsKey(key); + } + } + + public boolean containsValue(Object value) { + synchronized (this.mutex) { + return this.multiValueMap.containsValue(value); + } + } + + public Set>> entrySet() { + synchronized (this.mutex) { + if (this.entrySet == null) { + this.entrySet = new CollectionUtils.SynchronizedSet<>(this.multiValueMap.entrySet(), this.mutex); + } + return this.entrySet; + } + } + + public boolean equals(Object o) { + synchronized (this.mutex) { + return this.multiValueMap.equals(o); + } + } + + public List get(Object key) { + synchronized (this.mutex) { + return (List)this.multiValueMap.get(key); + } + } + + public V getFirst(K key) { + synchronized (this.mutex) { + return (V)this.multiValueMap.getFirst(key); + } + } + + public int hashCode() { + synchronized (this.mutex) { + return this.multiValueMap.hashCode(); + } + } + + public boolean isEmpty() { + synchronized (this.mutex) { + return this.multiValueMap.isEmpty(); + } + } + + public Set keySet() { + synchronized (this.mutex) { + if (this.keySet == null) { + this.keySet = new CollectionUtils.SynchronizedSet<>(this.multiValueMap.keySet(), this.mutex); + } + return this.keySet; + } + } + + public List put(K key, List value) { + synchronized (this.mutex) { + return (List)this.multiValueMap.put(key, value); + } + } + + public void putAll(Map> t) { + synchronized (this.mutex) { + this.multiValueMap.putAll(t); + } + } + + public List remove(Object key) { + synchronized (this.mutex) { + return (List)this.multiValueMap.remove(key); + } + } + + public void set(K key, V value) { + synchronized (this.mutex) { + this.multiValueMap.set(key, value); + } + } + + public void setAll(Map values) { + synchronized (this.mutex) { + this.multiValueMap.setAll(values); + } + } + + public int size() { + synchronized (this.mutex) { + return this.multiValueMap.size(); + } + } + + public Map toSingleValueMap() { + synchronized (this.mutex) { + return this.multiValueMap.toSingleValueMap(); + } + } + + public Collection> values() { + synchronized (this.mutex) { + if (this.values == null) { + this.values = new CollectionUtils.SynchronizedCollection<>(this.multiValueMap.values(), this.mutex); + } + return this.values; + } + } + + public String toString() { + synchronized (this.mutex) { + return this.multiValueMap.toString(); + } + } + + private void writeObject(ObjectOutputStream s) throws IOException { + synchronized (this.mutex) { + s.defaultWriteObject(); + } + } + } + + static class SynchronizedCollection implements Collection, Serializable { + private static final long serialVersionUID = -7540724106974451779L; + final Collection collection; + final Object mutex; + + SynchronizedCollection(Collection collection) { + if (collection == null) { + throw new IllegalArgumentException("The input argument is null!"); + } + this.collection = collection; + this.mutex = this; + } + + SynchronizedCollection(Collection collection, Object mutex) { + if (collection == null) { + throw new IllegalArgumentException("The input argument is null!"); + } + this.collection = collection; + this.mutex = mutex; + } + + public int size() { + synchronized (this.mutex) { + return this.collection.size(); + } + } + + public boolean isEmpty() { + synchronized (this.mutex) { + return this.collection.isEmpty(); + } + } + + public boolean contains(Object o) { + synchronized (this.mutex) { + return this.collection.contains(o); + } + } + + public Object[] toArray() { + synchronized (this.mutex) { + return this.collection.toArray(); + } + } + + public T[] toArray(T[] a) { + synchronized (this.mutex) { + return this.collection.toArray(a); + } + } + + public Iterator iterator() { + return this.collection.iterator(); + } + + public boolean add(E o) { + synchronized (this.mutex) { + return this.collection.add(o); + } + } + + public boolean remove(Object o) { + synchronized (this.mutex) { + return this.collection.remove(o); + } + } + + public boolean containsAll(Collection coll) { + synchronized (this.mutex) { + return this.collection.containsAll(coll); + } + } + + public boolean addAll(Collection coll) { + synchronized (this.mutex) { + return this.collection.addAll(coll); + } + } + + public boolean removeAll(Collection coll) { + synchronized (this.mutex) { + return this.collection.removeAll(coll); + } + } + + public boolean retainAll(Collection coll) { + synchronized (this.mutex) { + return this.collection.retainAll(coll); + } + } + + public void clear() { + synchronized (this.mutex) { + this.collection.clear(); + } + } + + public String toString() { + synchronized (this.mutex) { + return this.collection.toString(); + } + } + + private void writeObject(ObjectOutputStream s) throws IOException { + synchronized (this.mutex) { + s.defaultWriteObject(); + } + } + } + + static class SynchronizedSet extends SynchronizedCollection implements Set { + private static final long serialVersionUID = 6982504952424781802L; + + SynchronizedSet(Set set) { + super(set); + } + + SynchronizedSet(Set set, Object mutex) { + super(set, mutex); + } + + public boolean equals(Object o) { + synchronized (this.mutex) { + return this.collection.equals(o); + } + } + + public int hashCode() { + synchronized (this.mutex) { + return this.collection.hashCode(); + } + } + } + + static class UnmodifiableMultiValueMap implements MultiValueMap, Serializable { + private static final long serialVersionUID = 7629840602579792180L; + final MultiValueMap multiValueMap; + Set>> entrySet; + Collection> values; + Set keySet; + Map singleValueMap; + + UnmodifiableMultiValueMap(MultiValueMap multiValueMap) { + this.multiValueMap = (MultiValueMap)multiValueMap; + } + + public void add(K key, V value) { + throw new UnsupportedOperationException(); + } + + public void addAll(K k, List list) {} + + public void addAll(MultiValueMap multiValueMap) {} + + public void clear() { + throw new UnsupportedOperationException(); + } + + public boolean containsKey(Object key) { + return this.multiValueMap.containsKey(key); + } + + public boolean containsValue(Object value) { + return this.multiValueMap.containsValue(value); + } + + public Set>> entrySet() { + if (this.entrySet == null) { + this.entrySet = Collections.unmodifiableSet(this.multiValueMap.entrySet()); + } + return this.entrySet; + } + + public boolean equals(Object o) { + return this.multiValueMap.equals(o); + } + + public List get(Object key) { + return (List)this.multiValueMap.get(key); + } + + public V getFirst(K key) { + return (V)this.multiValueMap.getFirst(key); + } + + public int hashCode() { + return this.multiValueMap.hashCode(); + } + + public boolean isEmpty() { + return this.multiValueMap.isEmpty(); + } + + public Set keySet() { + if (this.keySet == null) { + this.keySet = Collections.unmodifiableSet(this.multiValueMap.keySet()); + } + return this.keySet; + } + + public List put(K key, List value) { + throw new UnsupportedOperationException(); + } + + public void putAll(Map> t) { + throw new UnsupportedOperationException(); + } + + public List remove(Object key) { + throw new UnsupportedOperationException(); + } + + public void set(K key, V value) { + throw new UnsupportedOperationException(); + } + + public void setAll(Map values) { + throw new UnsupportedOperationException(); + } + + public Set> singleValueEntrySet() { + return toSingleValueMap().entrySet(); + } + + public Collection singleValues() { + return toSingleValueMap().values(); + } + + public int size() { + return this.multiValueMap.size(); + } + + public Map toSingleValueMap() { + if (this.singleValueMap == null) { + this.singleValueMap = Collections.unmodifiableMap(this.multiValueMap.toSingleValueMap()); + } + return this.singleValueMap; + } + + public Collection> values() { + if (this.values == null) { + this.values = Collections.unmodifiableCollection(this.multiValueMap.values()); + } + return this.values; + } + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/util/CommunityConstants.java b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/util/CommunityConstants.java new file mode 100644 index 00000000..8d418c88 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/util/CommunityConstants.java @@ -0,0 +1,114 @@ +package cn.cloudwalk.elevator.util; + +public class CommunityConstants { + public static interface Common { + public static final String NOTE_TYPE_ORG = "1"; + public static final String NOTE_TYPE_TAG = "2"; + public static final String NOTE_TYPE_PERSON = "3"; + public static final String NOTE_TYPE_EDG = "4"; + public static final String ACCESS_NAME_SUFFIX = "门禁"; + public static final Integer ACCESS_AUTO = Integer.valueOf(0); + public static final Integer ONE_HUNDRED = Integer.valueOf(100); + public static final Integer BATCH_SIZE = Integer.valueOf(500); + public static final Integer MAX_SHOW_CAPTURE = Integer.valueOf(7); + public static final String TEMP_PATH = "java.io.tmpdir"; + public static final String FONT_PATH = "font/simsun.ttc"; + public static final String TEMPLATE_NAME = "appraiseReportTemplate"; + public static final String FONT_SUFFIX = ".ttc"; + public static final String DASH = "-"; + public static final String HTTP_PREFIX = "http://"; + public static final String BR = "
"; + public static final String FORMAT = "yyyy/MM/dd/HH"; + public static final String CLIENT_IP = "ClientIP"; + } + + public static interface Snap { + public static final String IMG_DOWNLOAD_PARSE_ERROR = "img_download_parse_error"; + public static final String DATA_IMAGE_BASE64_HEAD = "data:image/"; + } + + public static interface Symbol { + public static final String COMMA = ","; + public static final String HYPHEN = "-"; + public static final String COLON = ":"; + } + + public static interface Alarm { + public static final Integer IN = Integer.valueOf(1); + public static final Integer OUT = Integer.valueOf(0); + public static final String STRANGER = "STRANGER"; + public static final String BLACK_LIST = "BLACK_LIST"; + } + + public static interface Redis { + public static final String EVENT_CODE_INC_KEY = "EVENT_CODE:INC_KEY"; + public static final Integer EVENT_CODE_INC_MAX_VALUE = Integer.valueOf(9999); + public static final String TF_BRAIN_ACCESS_TOKEN = "tfbrain_access_token"; + public static final String USER_TOKEN_KEY = "USER_TOKEN:%s"; + public static final String OUT_IN_IMAGE_STORE = "upOutInStore"; + public static final String AGREEMENT = "redis://"; + public static final String LOCK = "redisLock"; + public static final String OLD_AUTO_CREATE_SETTING = "OLD:AUTO_CREATE"; + public static final String CHILD_AUTO_CREATE_SETTING = "CHILD:AUTO_CREATE:%s"; + public static final String IMPORT_FAILURE_MSG = "IMPORT:FAILURE:%s"; + public static final String VILLAGE_RECORD_LIST = "village:list"; + public static final String COMMUNITY_LIST = "community:list"; + public static final Long VALUE_CHANGE_EXPIRE_TIME = Long.valueOf(1L); + public static final String PROVINCE_TREE = "tree:province:level:%s"; + } + + public static interface Data { + public static final String MALE = "男"; + public static final String FEMALE = "女"; + public static final String ID = "id"; + public static final String CREATE_TIME = "createTime"; + public static final String LAST_UPDATE_TIME = "lastUpdateTime"; + public static final String REGISTER_PERSON_ID = "register_person_id"; + public static final String GRID_ID = "grid_id"; + public static final Integer TOP_VALUE = Integer.valueOf(1); + public static final Integer NO_TOP_VALUE = Integer.valueOf(0); + public static final Integer PUBLISH_STATUS_1 = Integer.valueOf(1); + public static final Integer PUBLISH_STATUS_2 = Integer.valueOf(2); + public static final Integer PUBLISH_STATUS_3 = Integer.valueOf(3); + public static final String AGE = "age"; + public static final String SEX = "sex"; + public static final String COMMUNITY_ID = "community_id"; + public static final String VILLAGE_ID = "village_id"; + } + + public static interface Dcs { + public static final String DCS_URL_ID_FORMAT = "%s:%s@%s:2015?dcsID="; + public static final String DCS_URL_FORMAT = "%s:%s@%s:2015"; + } + + public static interface Dcr { + public static final String HTTPS_PREFIX = "https://"; + public static final String MID_PART_DOWNLOAD_URL = "/object/download?pool="; + public static final String MID_PART_UPLOAD_URL = "/object/upload/do?token="; + public static final String MID_DOWNLOAD_FILE_URL = "/simple-file/download?pool="; + public static final String MID_UPLOAD_FILE_URL = "/simple-file/upload/full?pool="; + public static final String PARA_PATH = "&path="; + public static final String PARA_SIZE = "&offset=0&size="; + public static final String PARA_ID = "&id="; + public static final String ID = "ID"; + public static final String AUTH_TYPE = "Basic "; + public static final String AUTH = "authorization"; + public static final String POOL = "pool"; + public static final String TOKEN = "Token"; + public static final String ADDRESS = "Address"; + public static final String AUTH_SUFFIX = "/object/upload"; + public static final Integer MAX_DOWNLOAD_SIZE = Integer.valueOf(16000000); + public static final String OFFSET = "&offset="; + public static final String SIZE = "&size="; + } + + public static interface Icc { + public static final String ICC_RTSP_URL = "rtsp://%s:9090/dss/monitor/param?cameraid=%s%%24%s&substream=1"; + public static final String ICC_PLAYBACK_RTSP_URL = + "rtsp://%s:9090/dss/playback/param?cameraid=%s%%24%s&substream=1&type=3"; + public static final String ICC_OUTSIDE_HLS_URL = "/live/cameraid/%s%%24%s/substream/1.m3u8"; + public static final String ICC_PLAYBACK_OUTSIDE_HLS_URL = "/vod/center/cameraid/%s%%24%s/substream/1"; + public static final int DEVICE_TYPE_NVR = 6; + public static final int DEVICE_TYPE_IPC = 2; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/util/DateUtils.java b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/util/DateUtils.java new file mode 100644 index 00000000..8a4a6176 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/util/DateUtils.java @@ -0,0 +1,436 @@ +package cn.cloudwalk.elevator.util; + +import java.security.Timestamp; +import java.text.DateFormat; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.time.DayOfWeek; +import java.time.Instant; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.time.LocalTime; +import java.time.ZoneOffset; +import java.time.temporal.ChronoField; +import java.time.temporal.TemporalAdjusters; +import java.time.temporal.WeekFields; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Collections; +import java.util.Date; +import java.util.List; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class DateUtils { + private static final Logger logger = LoggerFactory.getLogger(DateUtils.class); + public static final long ONE_DAY_LONG = 86400000L; + public static final String YYYYMMDD = "yyyyMMdd"; + public static final String STANDARD_FORMAT = "yyyy-MM-dd HH:mm"; + public static final String YYYY_MM_DD = "yyyy-MM-dd"; + public static final String YYYY_MM_DD_HMS = "yyyy-MM-dd HH:mm:ss"; + public static final String HHMMSS = "HH:mm:ss"; + public static final String YYYYMM = "yyyyMM"; + public static final String YYYYMMDDHHMMSS = "yyyyMMddHHmmss"; + + public static long getCurrentTime() { + return System.currentTimeMillis(); + } + + public static String timestamp2String(Timestamp time, String pattern) { + SimpleDateFormat sdf = new SimpleDateFormat(pattern); + return sdf.format(time.getTimestamp()); + } + + public static String formatDate(Date date, String pattern) { + SimpleDateFormat sdf = new SimpleDateFormat(pattern); + return sdf.format(date); + } + + public static int defaultFormat(Date date) { + return Integer.valueOf(formatDate(date, "yyyyMMdd")).intValue(); + } + + public static Date defaultFormat(String str) { + SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd"); + try { + return sdf.parse(str); + } catch (ParseException e) { + logger.error("日期格式转换失败", e); + return null; + } + } + + public static Date customFormat(String str, String pattern) { + SimpleDateFormat sdf = new SimpleDateFormat(pattern); + try { + return sdf.parse(str); + } catch (ParseException e) { + logger.error("日期格式转换失败", e); + return null; + } + } + + public static int defaultFormat(long millis) { + Calendar cal = Calendar.getInstance(); + cal.setTimeInMillis(millis); + return defaultFormat(cal.getTime()); + } + + public static String parseTimestamp(Timestamp time) { + return parseDate(time.getTimestamp()); + } + + public static String parseDate(Date date) { + try { + SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd"); + return sdf.format(date); + } catch (Exception e) { + logger.error("日期格式转换失败", e); + return null; + } + } + + public static String parseDate(Date date, String partern) { + try { + SimpleDateFormat sdf = new SimpleDateFormat(partern); + return sdf.format(date); + } catch (Exception e) { + logger.error("日期格式转换失败", e); + return null; + } + } + + public static int getYear() { + Calendar cal = Calendar.getInstance(); + cal.setTime(new Date()); + return cal.get(1); + } + + public static long getMonthFirstDate(Date date) { + Calendar calendar = Calendar.getInstance(); + calendar.setTime(date); + calendar.set(5, 1); + calendar.set(11, 0); + calendar.set(12, 0); + calendar.set(13, 0); + calendar.set(14, 0); + return calendar.getTime().getTime(); + } + + public static long getMonthLastDate(Date date) { + Calendar calendar = Calendar.getInstance(); + calendar.setTime(date); + calendar.set(5, calendar.getActualMaximum(5)); + calendar.set(11, 23); + calendar.set(12, 59); + calendar.set(13, 59); + calendar.set(14, 999); + return calendar.getTime().getTime(); + } + + public static Long dateToStamp(String s) { + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd"); + try { + Date date = simpleDateFormat.parse(s); + long ts = date.getTime(); + return Long.valueOf(ts); + } catch (Exception e) { + logger.error("日期转为时间戳失败", e); + return Long.valueOf(0L); + } + } + + public static String stampToDate(String s) { + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + long lt = (new Long(s)).longValue(); + Date date = new Date(lt); + String res = simpleDateFormat.format(date); + return res; + } + + public static String getTwoDaysDesc(Integer startTime, Integer endTime) { + String twoDayDesc; + List days = new ArrayList<>(); + if (null == startTime || null == endTime) { + return "日"; + } + DateFormat dateFormat = new SimpleDateFormat("yyyyMMdd"); + try { + Date start = dateFormat.parse(String.valueOf(startTime)); + Date end = dateFormat.parse(String.valueOf(endTime)); + Calendar tempStart = Calendar.getInstance(); + tempStart.setTime(start); + Calendar tempEnd = Calendar.getInstance(); + tempEnd.setTime(end); + tempEnd.add(5, 1); + while (tempStart.before(tempEnd)) { + days.add(Integer.valueOf(Integer.parseInt(dateFormat.format(tempStart.getTime())))); + tempStart.add(6, 1); + } + } catch (ParseException e) { + logger.error("时间转换失败", e); + } + int dayOfWeek = 7; + if (days.size() > dayOfWeek) { + twoDayDesc = "月"; + } else if (days.size() > 1) { + twoDayDesc = "周"; + } else { + twoDayDesc = "日"; + } + return twoDayDesc; + } + + public static Long todayStart() { + Calendar calendar = Calendar.getInstance(); + calendar.set(11, 0); + calendar.set(12, 0); + calendar.set(13, 0); + calendar.set(14, 0); + return Long.valueOf(calendar.getTimeInMillis()); + } + + public static Long dateToStampTomorrow(String s) { + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd"); + try { + Date date = simpleDateFormat.parse(s); + Calendar cal = Calendar.getInstance(); + cal.setTime(date); + cal.add(5, 1); + long ts = cal.getTimeInMillis(); + return Long.valueOf(ts); + } catch (Exception e) { + logger.error("日期转换失败", e); + return Long.valueOf(0L); + } + } + + public static Date getDateSubDay(int day) { + Calendar cal = Calendar.getInstance(); + cal.setTime(new Date()); + cal.add(5, day); + return cal.getTime(); + } + + public static Date getDateSubDay(Date date, int day) { + Calendar cal = Calendar.getInstance(); + cal.setTime(date); + cal.add(5, day); + return cal.getTime(); + } + + public static Long todayStart(Date date) { + Calendar calendar = Calendar.getInstance(); + calendar.setTime(date); + calendar.set(11, 0); + calendar.set(12, 0); + calendar.set(13, 0); + calendar.set(14, 0); + return Long.valueOf(calendar.getTimeInMillis()); + } + + public static Long todayEnd(Date date) { + Calendar calendar = Calendar.getInstance(); + calendar.setTime(date); + calendar.set(11, 23); + calendar.set(12, 59); + calendar.set(13, 59); + calendar.set(14, 999); + return Long.valueOf(calendar.getTimeInMillis()); + } + + public static Long todayEnd() { + Calendar calendar = Calendar.getInstance(); + calendar.set(11, 23); + calendar.set(12, 59); + calendar.set(13, 59); + calendar.set(14, 999); + return Long.valueOf(calendar.getTimeInMillis()); + } + + public static String formatTimeDuration(long duration, int format) { + boolean fu = false; + long fduration = duration; + if (duration < 0L) { + fu = true; + fduration = Math.abs(duration); + } + StringBuilder builder = new StringBuilder(); + long sec = fduration / 1000L % 60L; + long min = fduration / 1000L / 60L % 60L; + long hour = fduration / 1000L / 60L / 60L % 24L; + long day = fduration / 1000L / 60L / 60L / 24L; + if (day > 0L && format > 0) { + format--; + builder.append(day).append("天"); + } + format--; + if (hour > 0L && format > 0) { + builder.append(hour).append("小时"); + } + format--; + if (min > 0L && format > 0) { + builder.append(min).append("分钟"); + } + format--; + if (sec > 0L && format > 0) { + builder.append(sec).append("秒"); + } + if (fu) { + builder.insert(0, "-"); + } + return builder.toString(); + } + + public static String formatTimeDurationHour(long duration, int format) { + if (duration == 0L) { + return "-"; + } + long fduration = Math.abs(duration); + StringBuilder builder = new StringBuilder(); + long sec = fduration / 1000L % 60L; + long min = fduration / 1000L / 60L % 60L; + long hour = fduration / 1000L / 60L / 60L; + if (hour > 0L && format > 0) { + builder.append(hour).append("小时"); + } + format--; + if (min > 0L && format > 0) { + builder.append(min).append("分钟"); + } + format--; + if (sec > 0L && format > 0) { + builder.append(sec).append("秒"); + } + return builder.toString(); + } + + public static Date getMonth(Date date, int count) { + Calendar calendar = Calendar.getInstance(); + calendar.setTime(date); + int month = calendar.get(2); + calendar.set(2, month - count); + return calendar.getTime(); + } + + public static int getYear(Date date) { + Calendar calendar = Calendar.getInstance(); + calendar.setTime(date); + return calendar.get(1); + } + + public static int getMonth(Date date) { + Calendar calendar = Calendar.getInstance(); + calendar.setTime(date); + return calendar.get(2) + 1; + } + + public static Long dateToStampFormat(String s, String format) { + SimpleDateFormat simpleDateFormat = new SimpleDateFormat(format); + try { + Date date = simpleDateFormat.parse(s); + return Long.valueOf(date.getTime()); + } catch (Exception e) { + logger.error("日期转换失败", e); + return Long.valueOf(0L); + } + } + + public static boolean timeIsInRound(String now, String start, String end, String format) { + Date nowTime, beginTime, endTime; + SimpleDateFormat df = new SimpleDateFormat(format); + try { + nowTime = df.parse(now); + beginTime = df.parse(start); + endTime = df.parse(end); + } catch (Exception e) { + logger.error("时间格式转换异常,原因=[{}]", e.getMessage(), e); + return false; + } + if (nowTime.getTime() >= beginTime.getTime() && nowTime.getTime() <= endTime.getTime()) { + return true; + } + return false; + } + + public static int getDayOfWeek(Date date) { + Calendar calendar = Calendar.getInstance(); + calendar.setTime(date); + return calendar.get(7); + } + + public static LocalDateTime millToDate(Long mill) { + return LocalDateTime.ofInstant(Instant.ofEpochMilli(mill.longValue()), ZoneOffset.ofHours(8)); + } + + public static List getCycle(Integer timeType, int cycleNum) { + LocalDateTime nowStartTime, nowEndTime; + int i; + LocalDateTime nowMonday, nowSunday; + int j; + LocalDateTime nowFirstDay, nowLastDay; + int k; + if (timeType == null) { + return Collections.emptyList(); + } + List timeList = new ArrayList<>(cycleNum); + switch (timeType.intValue()) { + case 0: + nowStartTime = LocalDateTime.of(LocalDate.now(), LocalTime.MIN); + nowEndTime = LocalDateTime.of(LocalDate.now(), LocalTime.MAX); + timeList.add( + new StartTimeAndEndTime(Long.valueOf(nowStartTime.toInstant(ZoneOffset.of("+8")).toEpochMilli()), + Long.valueOf(nowEndTime.toInstant(ZoneOffset.of("+8")).toEpochMilli()), + nowStartTime.getDayOfMonth() + "号")); + for (i = 1; i < cycleNum; i++) { + LocalDateTime firstDay = nowStartTime.minusDays(i); + LocalDateTime lastDay = nowEndTime.minusDays(i); + timeList.add( + new StartTimeAndEndTime(Long.valueOf(firstDay.toInstant(ZoneOffset.of("+8")).toEpochMilli()), + Long.valueOf(lastDay.toInstant(ZoneOffset.of("+8")).toEpochMilli()), + firstDay.getDayOfMonth() + "号")); + } + break; + case 1: + nowMonday = LocalDateTime.of(LocalDate.now(), LocalTime.MIN).with(DayOfWeek.MONDAY); + nowSunday = LocalDateTime.of(LocalDate.now(), LocalTime.MAX).with(DayOfWeek.SUNDAY); + timeList + .add(new StartTimeAndEndTime(Long.valueOf(nowMonday.toInstant(ZoneOffset.of("+8")).toEpochMilli()), + Long.valueOf(nowSunday.toInstant(ZoneOffset.of("+8")).toEpochMilli()), + nowMonday.get(WeekFields.ISO.weekOfWeekBasedYear()) + "周")); + for (j = 1; j < cycleNum; j++) { + LocalDateTime lastMonday = nowMonday.minusWeeks(j); + LocalDateTime lastSunday = nowSunday.minusWeeks(j); + timeList.add( + new StartTimeAndEndTime(Long.valueOf(lastMonday.toInstant(ZoneOffset.of("+8")).toEpochMilli()), + Long.valueOf(lastSunday.toInstant(ZoneOffset.of("+8")).toEpochMilli()), + lastMonday.get(WeekFields.ISO.weekOfWeekBasedYear()) + "周")); + } + break; + case 2: + nowFirstDay = + LocalDateTime.of(LocalDate.now(), LocalTime.MIN).with(TemporalAdjusters.firstDayOfMonth()); + nowLastDay = LocalDateTime.of(LocalDate.now(), LocalTime.MAX).with(TemporalAdjusters.lastDayOfMonth()); + timeList.add( + new StartTimeAndEndTime(Long.valueOf(nowFirstDay.toInstant(ZoneOffset.of("+8")).toEpochMilli()), + Long.valueOf(nowLastDay.toInstant(ZoneOffset.of("+8")).toEpochMilli()), + nowFirstDay.get(ChronoField.MONTH_OF_YEAR) + "月")); + for (k = 1; k < cycleNum; k++) { + LocalDateTime firstDay = LocalDateTime.now().minusMonths(k) + .with(TemporalAdjusters.firstDayOfMonth()).with(LocalTime.MIN); + LocalDateTime lastDay = + LocalDateTime.now().minusMonths(k).with(TemporalAdjusters.lastDayOfMonth()).with(LocalTime.MAX); + timeList.add( + new StartTimeAndEndTime(Long.valueOf(firstDay.toInstant(ZoneOffset.of("+8")).toEpochMilli()), + Long.valueOf(lastDay.toInstant(ZoneOffset.of("+8")).toEpochMilli()), + firstDay.get(ChronoField.MONTH_OF_YEAR) + "月")); + } + break; + } + return timeList; + } + + public static void main(String[] args) { + System.out.println(">>>>>>>>>>>>>>" + dateToStampFormat("202002", "yyyyMM")); + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/util/JsonUtils.java b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/util/JsonUtils.java new file mode 100644 index 00000000..cfb6fff6 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/util/JsonUtils.java @@ -0,0 +1,74 @@ +package cn.cloudwalk.elevator.util; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.JavaType; +import com.fasterxml.jackson.databind.Module; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class JsonUtils { + private static final Logger log = LoggerFactory.getLogger(JsonUtils.class); + private static final Logger logger = LoggerFactory.getLogger(DateUtils.class); + + public static String toJson(Object obj) { + ObjectMapper mapper = objectMapper(); + try { + return mapper.writeValueAsString(obj); + } catch (JsonProcessingException e) { + logger.warn("json parase exception :{}", e.getMessage()); + return null; + } + } + + public static T toObj(String json, Class clazz) { + ObjectMapper mapper = objectMapper(); + T value = null; + try { + value = (T)mapper.readValue(json, clazz); + } catch (IOException e) { + logger.warn("json parase exception :{}", e.getMessage()); + } + return value; + } + + public static T toObj(String json, TypeReference tTypeReference) { + ObjectMapper mapper = objectMapper(); + T value = null; + try { + value = (T)mapper.readValue(json, tTypeReference); + } catch (IOException e) { + logger.warn("json parase exception :{}", e.getMessage()); + } + return value; + } + + public static List toObjList(String json, Class clazz) { + ObjectMapper mapper = objectMapper(); + List value = null; + try { + JavaType jt = mapper.getTypeFactory().constructParametricType(ArrayList.class, new Class[] {clazz}); + value = (List)mapper.readValue(json, jt); + } catch (IOException e) { + logger.warn("json parase exception :{}", e.getMessage()); + } + return value; + } + + public static ObjectMapper objectMapper() { + ObjectMapper mapper = new ObjectMapper(); + mapper.registerModule((Module)new JavaTimeModule()); + mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); + mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); + return mapper; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/util/RestTemplateUtil.java b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/util/RestTemplateUtil.java new file mode 100644 index 00000000..6cd1e87e --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/util/RestTemplateUtil.java @@ -0,0 +1,163 @@ +package cn.cloudwalk.elevator.util; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import java.net.URI; +import java.util.List; +import javax.annotation.PostConstruct; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.http.HttpEntity; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpMethod; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.http.client.ClientHttpRequestFactory; +import org.springframework.http.client.SimpleClientHttpRequestFactory; +import org.springframework.http.converter.HttpMessageConverter; +import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; +import org.springframework.stereotype.Component; +import org.springframework.util.MultiValueMap; +import org.springframework.web.client.RestTemplate; + +@Component +public class RestTemplateUtil { + private static final Logger logger = LoggerFactory.getLogger(DateUtils.class); + private static RestTemplate restTemplate; + + private static class SingletonRestTemplate { + static SimpleClientHttpRequestFactory requestFactory = new SimpleClientHttpRequestFactory(); + static { + requestFactory.setConnectTimeout(10000); + requestFactory.setReadTimeout(10000); + } + static final RestTemplate INSTANCE = new RestTemplate((ClientHttpRequestFactory)requestFactory); + } + + @PostConstruct + public void getInstance() { + RestTemplate restTemplate = SingletonRestTemplate.INSTANCE; + List> converterList = restTemplate.getMessageConverters(); + HttpMessageConverter converterTarget = null; + for (HttpMessageConverter item : converterList) { + if (MappingJackson2HttpMessageConverter.class == item.getClass()) { + converterTarget = item; + break; + } + } + if (null != converterTarget) { + converterList.remove(converterTarget); + } + ObjectMapper objectMapper = new ObjectMapper(); + objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); + converterList.add(new MappingJackson2HttpMessageConverter(objectMapper)); + RestTemplateUtil.restTemplate = restTemplate; + } + + public static String get(String url) { + HttpHeaders headers = new HttpHeaders(); + headers.add("Accept", "application/json"); + headers.add("Content-Encoding", "UTF-8"); + headers.add("Content-Type", "application/json; charset=UTF-8"); + HttpEntity requestEntity = new HttpEntity(null, (MultiValueMap)headers); + ResponseEntity response = + restTemplate.exchange(url, HttpMethod.GET, requestEntity, String.class, new Object[0]); + return (String)response.getBody(); + } + + public static String get(URI url, HttpHeaders headers) { + HttpEntity requestEntity = new HttpEntity(null, (MultiValueMap)headers); + ResponseEntity response = restTemplate.exchange(url, HttpMethod.GET, requestEntity, String.class); + return (String)response.getBody(); + } + + public static T get(URI url, HttpHeaders headers, Class responseType) { + HttpEntity requestEntity = new HttpEntity(null, (MultiValueMap)headers); + T resultEntity = null; + try { + ResponseEntity result = restTemplate.exchange(url, HttpMethod.GET, requestEntity, responseType); + resultEntity = getResultEntity(result, url); + } catch (Exception e) { + logger.warn(">>>>>>>>>>>>>>>>>【{}】接口调用失败,错误信息", url, e); + } + return resultEntity; + } + + public static T post(URI url, Object data, HttpHeaders headers, Class responseType) { + HttpEntity requestEntity = new HttpEntity(data, (MultiValueMap)headers); + T resultEntity = null; + try { + logger.info(">>>>>>>>>>>>>>>>>开始请求接口:{},payload:{},", url.toString(), data); + ResponseEntity result = restTemplate.postForEntity(url, requestEntity, responseType); + resultEntity = getResultEntity(result, url); + } catch (Exception e) { + logger.warn(">>>>>>>>>>>>>>>>>接口调用失败,错误信息:{}", e.getMessage()); + } + return resultEntity; + } + + public static T postTf(URI url, Object data, HttpHeaders headers, Class responseType) throws Exception { + HttpEntity requestEntity = new HttpEntity(data, (MultiValueMap)headers); + T resultEntity = null; + try { + logger.info(">>>>>>>>>>>>>>>>>开始请求接口:{},payload:{},", url.toString(), data); + ResponseEntity result = restTemplate.postForEntity(url, requestEntity, responseType); + resultEntity = getTfResultEntity(result, url); + } catch (Exception e) { + logger.warn(">>>>>>>>>>>>>>>>>接口调用失败,错误信息:{}", e.getMessage()); + throw e; + } + return resultEntity; + } + + public static T post(URI url, Object data, HttpHeaders headers, TypeReference tTypeReference) { + HttpEntity requestEntity = new HttpEntity(data, (MultiValueMap)headers); + T resultEntity = null; + try { + ResponseEntity result = restTemplate.postForEntity(url, requestEntity, String.class); + if (HttpStatus.OK == result.getStatusCode()) { + if (logger.isDebugEnabled()) { + logger.debug("接口返回值:{}", JsonUtils.toJson(result.getBody())); + } + return JsonUtils.toObj((String)result.getBody(), tTypeReference); + } + logger.info(">>>>>>>>>>>>>>>>>接口调用失败,状态码:{},错误原因:{}", result.getStatusCode(), + JsonUtils.toJson(result.getBody())); + } catch (Exception e) { + logger.warn(">>>>>>>>>>>>>>>>>接口调用失败,错误信息:{}", e.getMessage()); + } + return resultEntity; + } + + private static T getTfResultEntity(ResponseEntity result, URI url) throws Exception { + HttpStatus statusCode = result.getStatusCode(); + if (HttpStatus.OK == statusCode) { + logger.info(">>>>>>>>>>>>>>>>>接口:{} 调用成功", url); + if (logger.isDebugEnabled()) { + logger.debug("接口返回值:{}", JsonUtils.toJson(result.getBody())); + } + return (T)result.getBody(); + } + logger.info(">>>>>>>>>>>>>>>>>接口调用失败,状态码:{},错误原因:{}", statusCode, JsonUtils.toJson(result.getBody())); + if (HttpStatus.UNAUTHORIZED == statusCode) { + throw new Exception(statusCode.toString()); + } + return null; + } + + private static T getResultEntity(ResponseEntity result, URI url) { + if (HttpStatus.OK == result.getStatusCode()) { + logger.info(">>>>>>>>>>>>>>>>>接口:{} 调用成功", url); + if (logger.isDebugEnabled()) { + logger.debug("接口返回值:{}", JsonUtils.toJson(result.getBody())); + } + return (T)result.getBody(); + } + logger.info(">>>>>>>>>>>>>>>>>接口调用失败,状态码:{},错误原因:{}", result.getStatusCode(), + JsonUtils.toJson(result.getBody())); + return null; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/util/StartTimeAndEndTime.java b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/util/StartTimeAndEndTime.java new file mode 100644 index 00000000..3d0bc4eb --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/util/StartTimeAndEndTime.java @@ -0,0 +1,37 @@ +package cn.cloudwalk.elevator.util; + +public class StartTimeAndEndTime { + public StartTimeAndEndTime(Long startTime, Long endTime, String currentTime) { + this.startTime = startTime; + this.endTime = endTime; + this.currentTime = currentTime; + } + + private Long startTime; + private Long endTime; + private String currentTime; + + public Long getStartTime() { + return this.startTime; + } + + public void setStartTime(Long startTime) { + this.startTime = startTime; + } + + public Long getEndTime() { + return this.endTime; + } + + public void setEndTime(Long endTime) { + this.endTime = endTime; + } + + public String getCurrentTime() { + return this.currentTime; + } + + public void setCurrentTime(String currentTime) { + this.currentTime = currentTime; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/util/StringUtils.java b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/util/StringUtils.java new file mode 100644 index 00000000..68c8f75a --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/util/StringUtils.java @@ -0,0 +1,2095 @@ +package cn.cloudwalk.elevator.util; + +import java.io.UnsupportedEncodingException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Iterator; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.util.Assert; + +public class StringUtils { + private static final Logger logger = LoggerFactory.getLogger(DateUtils.class); + public static final String[] EMPTY_STRINGS = new String[0]; + public static final String EMPTY_STRING = ""; + private static final Pattern MAIL_PATTERN = Pattern.compile(".+@.+\\.[a-zA-Z]{2,}"); + private static final char SEPARATOR_CHAR_ASTERISK = '*'; + private static final WordTokenizer CAMEL_CASE_TOKENIZER = new WordTokenizer() { + protected void startSentence(StringBuffer buffer, char ch) { + buffer.append(Character.toLowerCase(ch)); + } + + protected void startWord(StringBuffer buffer, char ch) { + if (!isDelimiter(buffer.charAt(buffer.length() - 1))) { + buffer.append(Character.toUpperCase(ch)); + } else { + buffer.append(Character.toLowerCase(ch)); + } + } + + protected void inWord(StringBuffer buffer, char ch) { + buffer.append(Character.toLowerCase(ch)); + } + + protected void startDigitSentence(StringBuffer buffer, char ch) { + buffer.append(ch); + } + + protected void startDigitWord(StringBuffer buffer, char ch) { + buffer.append(ch); + } + + protected void inDigitWord(StringBuffer buffer, char ch) { + buffer.append(ch); + } + + protected void inDelimiter(StringBuffer buffer, char ch) { + if (ch != '_') + buffer.append(ch); + } + }; + private static final WordTokenizer PASCAL_CASE_TOKENIZER = new WordTokenizer() { + protected void startSentence(StringBuffer buffer, char ch) { + buffer.append(Character.toUpperCase(ch)); + } + + protected void startWord(StringBuffer buffer, char ch) { + buffer.append(Character.toUpperCase(ch)); + } + + protected void inWord(StringBuffer buffer, char ch) { + buffer.append(Character.toLowerCase(ch)); + } + + protected void startDigitSentence(StringBuffer buffer, char ch) { + buffer.append(ch); + } + + protected void startDigitWord(StringBuffer buffer, char ch) { + buffer.append(ch); + } + + protected void inDigitWord(StringBuffer buffer, char ch) { + buffer.append(ch); + } + + protected void inDelimiter(StringBuffer buffer, char ch) { + if (ch != '_') + buffer.append(ch); + } + }; + private static final WordTokenizer UPPER_CASE_WITH_UNDERSCORES_TOKENIZER = new WordTokenizer() { + protected void startSentence(StringBuffer buffer, char ch) { + buffer.append(Character.toUpperCase(ch)); + } + + protected void startWord(StringBuffer buffer, char ch) { + if (!isDelimiter(buffer.charAt(buffer.length() - 1))) { + buffer.append('_'); + } + buffer.append(Character.toUpperCase(ch)); + } + + protected void inWord(StringBuffer buffer, char ch) { + buffer.append(Character.toUpperCase(ch)); + } + + protected void startDigitSentence(StringBuffer buffer, char ch) { + buffer.append(ch); + } + + protected void startDigitWord(StringBuffer buffer, char ch) { + if (!isDelimiter(buffer.charAt(buffer.length() - 1))) { + buffer.append('_'); + } + buffer.append(ch); + } + + protected void inDigitWord(StringBuffer buffer, char ch) { + buffer.append(ch); + } + + protected void inDelimiter(StringBuffer buffer, char ch) { + buffer.append(ch); + } + }; + private static final WordTokenizer LOWER_CASE_WITH_UNDERSCORES_TOKENIZER = new WordTokenizer() { + protected void startSentence(StringBuffer buffer, char ch) { + buffer.append(Character.toLowerCase(ch)); + } + + protected void startWord(StringBuffer buffer, char ch) { + if (!isDelimiter(buffer.charAt(buffer.length() - 1))) { + buffer.append('_'); + } + buffer.append(Character.toLowerCase(ch)); + } + + protected void inWord(StringBuffer buffer, char ch) { + buffer.append(Character.toLowerCase(ch)); + } + + protected void startDigitSentence(StringBuffer buffer, char ch) { + buffer.append(ch); + } + + protected void startDigitWord(StringBuffer buffer, char ch) { + if (!isDelimiter(buffer.charAt(buffer.length() - 1))) { + buffer.append('_'); + } + buffer.append(ch); + } + + protected void inDigitWord(StringBuffer buffer, char ch) { + buffer.append(ch); + } + + protected void inDelimiter(StringBuffer buffer, char ch) { + buffer.append(ch); + } + }; + + public static String strTruncate(String source, int len, String delim) { + if (source == null) { + return null; + } + int alen = (source.getBytes()).length; + if (len > 0) { + if (alen <= len) { + return source; + } + int byteLen = 0, stop = byteLen, start = stop; + while (byteLen <= len) { + if ((source.substring(stop, stop + 1).getBytes()).length == 1) { + byteLen++; + } else { + byteLen += 2; + } + stop++; + } + if (alen > len) { + StringBuilder sb = new StringBuilder(source.substring(start, stop - 1)); + sb.append(delim); + } + return source.substring(start, stop - 1); + } + return source; + } + + public static String toUpperCase(String str, int index) { + StringBuilder sb = new StringBuilder(str); + char s = Character.toUpperCase(sb.charAt(index - 1)); + sb.setCharAt(index - 1, s); + return sb.toString(); + } + + public static String toLowerCase(String str, int index) { + StringBuilder sb = new StringBuilder(str); + char s = Character.toLowerCase(sb.charAt(index - 1)); + sb.setCharAt(index - 1, s); + return sb.toString(); + } + + public static String toString(Object param) { + return toString(param, null); + } + + public static String toString(Object param, String defaultString) { + if (param == null) { + return defaultString; + } + return param.toString(); + } + + public static String checkEmptyString(String string, String defaultValue) { + if (isEmpty(string)) { + return defaultValue; + } + return string; + } + + public static boolean hasLength(CharSequence charSequence) { + return (charSequence != null && charSequence.length() > 0); + } + + public static boolean hasText(CharSequence charSequence) { + if (!hasLength(charSequence)) { + return false; + } + int strLen = charSequence.length(); + for (int i = 0; i < strLen; i++) { + if (!Character.isWhitespace(charSequence.charAt(i))) { + return true; + } + } + return false; + } + + public static int occurrence(String string, String s, int beginIndex, int endIndex) { + if (string == null || isEmpty(s)) { + return 0; + } + return occurrence0(string, s, beginIndex, endIndex); + } + + public static int occurrence(String string, String s, int beginIndex) { + if (string == null || isEmpty(s)) { + return 0; + } + return occurrence0(string, s, beginIndex, string.length()); + } + + public static int occurrence(String string, String s) { + if (string == null || isEmpty(s)) { + return 0; + } + return occurrence0(string, s, 0, string.length()); + } + + private static int occurrence0(String string, String s, int beginIndex, int endIndex) { + if (endIndex == 0 && beginIndex == 0) { + return 0; + } + Assert.isTrue((beginIndex >= 0 && beginIndex < endIndex)); + Assert.isTrue((endIndex <= string.length())); + int i = 0; + while (true) { + beginIndex = string.indexOf(s, beginIndex); + if (beginIndex == -1 || beginIndex >= endIndex) { + break; + } + i++; + beginIndex += s.length(); + } + return i; + } + + public static int consecutive(String string, String s) { + if (string == null || isEmpty(s)) { + return 0; + } + return consecutive0(string, s, 0, string.length()); + } + + public static int consecutive(String string, String s, int beginIndex) { + if (string == null || isEmpty(s)) { + return 0; + } + return consecutive0(string, s, beginIndex, string.length()); + } + + public static int consecutive(String string, String s, int beginIndex, int endIndex) { + if (string == null || isEmpty(s)) { + return 0; + } + return consecutive0(string, s, beginIndex, endIndex); + } + + private static int consecutive0(String string, String s, int beginIndex, int endIndex) { + if (endIndex == 0 && beginIndex == 0) { + return 0; + } + Assert.isTrue((beginIndex >= 0 && beginIndex < endIndex)); + Assert.isTrue((endIndex <= string.length())); + int i = 0; + while (true) { + beginIndex = string.indexOf(s, beginIndex); + if (beginIndex == -1 || beginIndex >= endIndex) + break; + if (beginIndex != endIndex - 1 && s.charAt(0) != string.charAt(beginIndex + 1)) { + i++; + break; + } + i++; + beginIndex += s.length(); + } + return i; + } + + public static int lastConsecutive(String string, String s) { + if (string == null || isEmpty(s)) { + return 0; + } + return lastConsecutive0(string, s, string.length(), 0); + } + + public static int lastConsecutive(String string, String s, int lastBeginIndex) { + if (string == null || isEmpty(s)) { + return 0; + } + return lastConsecutive0(string, s, lastBeginIndex, 0); + } + + public static int lastConsecutive(String string, String s, int lastBeginIndex, int lastEndIndex) { + if (string == null || isEmpty(s)) { + return 0; + } + return lastConsecutive0(string, s, lastBeginIndex, lastEndIndex); + } + + private static int lastConsecutive0(String string, String s, int lastBeginIndex, int lastEndIndex) { + if (lastBeginIndex == 0 && lastEndIndex == 0) { + return 0; + } + Assert.isTrue((lastBeginIndex <= string.length() && lastBeginIndex > lastEndIndex)); + Assert.isTrue((lastEndIndex >= 0)); + int i = 0; + StringBuilder builder = new StringBuilder(string); + builder.delete(0, lastEndIndex); + char sEndChar = s.charAt(s.length() - 1); + while (true) { + lastBeginIndex = builder.lastIndexOf(s, --lastBeginIndex); + if (lastBeginIndex == -1) + break; + if (lastBeginIndex == 0) { + i++; + break; + } + if (sEndChar != builder.charAt(lastBeginIndex - 1)) { + i++; + break; + } + i++; + builder.delete(lastBeginIndex - s.length(), lastBeginIndex); + } + return i; + } + + public static int indexOf(String string, String s, int count) { + if (string == null) { + return -1; + } + Assert.isTrue((count > 0)); + int index = -s.length(); + for (int i = 0; i < count; i++) { + index = string.indexOf(s, index + s.length()); + if (index == -1) { + return -1; + } + } + return index; + } + + public static int lastIndexOf(String string, String s, int count) { + if (string == null) { + return -1; + } + Assert.isTrue((count > 0)); + int index = string.length(); + for (int i = 0; i < count; i++) { + index = string.lastIndexOf(s, index - 1); + if (index == -1) { + return -1; + } + } + return index; + } + + public static String substring(String string, int beginIndex) { + if (string == null) { + return null; + } + return string.substring(beginIndex); + } + + public static String substring(String string, int beginIndex, int endIndex) { + if (string == null) { + return null; + } + return string.substring(beginIndex, endIndex); + } + + public static String leftByByte(String str, int len) { + String DEFAULT_CHAR_SET = "UTF-8"; + return leftByByte(str, len, "UTF-8"); + } + + public static String leftByByte(String str, int len, String charset) { + if (str != null && !"".equals(str)) { + String strValue = str; + try { + strValue = new String(str.getBytes(charset), charset); + if (len < (strValue.getBytes(charset)).length) { + int intPos = (len + 1) / 2; + int intPosI = intPos; + String strSubStrTemp = strValue.substring(0, intPos); + while ((strSubStrTemp.getBytes(charset)).length < len) { + intPosI = (intPosI + 1) / 2; + intPos += intPosI; + strSubStrTemp = strValue.substring(0, intPos); + } + strValue = + strSubStrTemp.substring(0, (intPos > strSubStrTemp.length()) ? strSubStrTemp.length() : intPos); + while ((strValue.getBytes(charset)).length > len) { + strValue = strValue.substring(0, strValue.length() - 1); + } + } + } catch (UnsupportedEncodingException e) { + logger.error("不支持的字符编码", e); + } + return strValue; + } + return str; + } + + public static String rightByByte(String str, int len) { + String DEFAULT_CHAR_SET = "UTF-8"; + return rightByByte(str, len, "UTF-8"); + } + + public static String rightByByte(String str, int len, String charset) { + return reverse(leftByByte(reverse(str), len, charset)); + } + + public static String substringByByte(String str, int beginIndex, int endIndex) { + String DEFAULT_CHAR_SET = "GBK"; + if (str != null && !"".equals(str)) { + String strValue = str; + try { + strValue = new String(str.getBytes("GBK"), "GBK"); + String strSubStrTemp = ""; + if (beginIndex > 0) { + int intPos = (beginIndex + 1) / 2; + int intPosI = intPos; + strSubStrTemp = strValue.substring(0, intPos); + while ((strSubStrTemp.getBytes()).length < beginIndex) { + intPosI = (intPosI + 1) / 2; + intPos += intPosI; + intPos = Math.min(intPos, strValue.length()); + strSubStrTemp = strValue.substring(0, intPos); + } + } + if (!"".equals(strSubStrTemp)) { + strValue = strValue.substring(strSubStrTemp.length()); + } + endIndex -= beginIndex; + if (endIndex < (strValue.getBytes("GBK")).length) { + int intPos = (endIndex + 1) / 2; + int intPosI = intPos; + strSubStrTemp = strValue.substring(0, intPos); + while ((strSubStrTemp.getBytes("GBK")).length < endIndex) { + intPosI = (intPosI + 1) / 2; + intPos += intPosI; + intPos = Math.min(intPos, strValue.length()); + strSubStrTemp = strValue.substring(0, intPos); + } + strValue = + strSubStrTemp.substring(0, (intPos > strSubStrTemp.length()) ? strSubStrTemp.length() : intPos); + while ((strValue.getBytes("GBK")).length > endIndex) { + strValue = strValue.substring(0, strValue.length() - 1); + } + } + } catch (UnsupportedEncodingException e) { + logger.error("不支持的字符编码", e); + } + return strValue; + } + return str; + } + + public static Set stringSplitToSet(String value, String regex) { + return stringSplitToSet(value, regex, true); + } + + public static Set stringSplitToSet(String value, String regex, boolean ignoreEmptyTokens) { + if (value == null) { + return new LinkedHashSet<>(6); + } + Set set = new LinkedHashSet<>(); + stringSplitToCollection(value, regex, set, ignoreEmptyTokens); + return set; + } + + public static List stringSplitToList(String value, String regex) { + return stringSplitToList(value, regex, true); + } + + public static List stringSplitToList(String value, String regex, boolean ignoreEmptyTokens) { + if (value == null) { + return new ArrayList<>(5); + } + List list = new ArrayList<>(); + stringSplitToCollection(value, regex, list, ignoreEmptyTokens); + return list; + } + + private static void stringSplitToCollection(String value, String regex, Collection set, + boolean ignoreEmptyTokens) { + String[] split = value.split(regex); + for (String aSplit : split) { + if (!ignoreEmptyTokens || aSplit.length() > 0) { + set.add(aSplit); + } + } + } + + public static String[] stringSplitToArray(String value, String regex) { + return stringSplitToArray(value, regex, true); + } + + public static String[] stringSplitToArray(String value, String regex, boolean ignoreEmptyTokens) { + if (value == null) { + return EMPTY_STRINGS; + } + List list = stringSplitToList(value, regex, ignoreEmptyTokens); + if (list.isEmpty()) { + return EMPTY_STRINGS; + } + return list.toArray(new String[list.size()]); + } + + public static boolean isEmpty(String str) { + return (str == null || str.length() == 0); + } + + public static boolean isNotEmpty(String str) { + return (str != null && str.length() > 0); + } + + public static boolean isBlank(String str) { + int length; + if (str == null || (length = str.length()) == 0) { + return true; + } + for (int i = 0; i < length; i++) { + if (!Character.isWhitespace(str.charAt(i))) { + return false; + } + } + return true; + } + + public static boolean isNotBlank(String str) { + int length; + if (str == null || (length = str.length()) == 0) { + return false; + } + for (int i = 0; i < length; i++) { + if (!Character.isWhitespace(str.charAt(i))) { + return true; + } + } + return false; + } + + public static boolean hasBlank(String... str) { + if (str == null) { + return true; + } + for (int i = 0; i < str.length; i++) { + if (isBlank(str[i])) { + return true; + } + } + return false; + } + + public static String defaultIfNull(String str) { + return (str == null) ? "" : str; + } + + public static String defaultIfNull(String str, String defaultStr) { + return (str == null) ? defaultStr : str; + } + + public static String defaultIfEmpty(String str) { + return (str == null) ? "" : str; + } + + public static String defaultIfEmpty(String str, String defaultStr) { + return (str == null || str.length() == 0) ? defaultStr : str; + } + + public static String defaultIfBlank(String str) { + return isBlank(str) ? "" : str; + } + + public static String defaultIfBlank(String str, String defaultStr) { + return isBlank(str) ? defaultStr : str; + } + + public static String trim(String str) { + return trim(str, null, 0); + } + + public static String trim(String str, String stripChars) { + return trim(str, stripChars, 0); + } + + public static String trimStart(String str) { + return trim(str, null, -1); + } + + public static String trimStart(String str, String stripChars) { + return trim(str, stripChars, -1); + } + + public static String trimEnd(String str) { + return trim(str, null, 1); + } + + public static String trimEnd(String str, String stripChars) { + return trim(str, stripChars, 1); + } + + public static String trimToNull(String str) { + return trimToNull(str, null); + } + + public static String trimToNull(String str, String stripChars) { + String result = trim(str, stripChars); + if (result == null || result.length() == 0) { + return null; + } + return result; + } + + public static String trimToEmpty(String str) { + return trimToEmpty(str, null); + } + + public static String trimToEmpty(String str, String stripChars) { + String result = trim(str, stripChars); + if (result == null) { + return ""; + } + return result; + } + + private static String trim(String str, String stripChars, int mode) { + if (str == null) { + return null; + } + int length = str.length(); + int start = 0; + int end = length; + if (mode <= 0) { + if (stripChars == null) { + while (start < end && Character.isWhitespace(str.charAt(start))) + start++; + } else { + if (stripChars.length() == 0) { + return str; + } + while (start < end && stripChars.indexOf(str.charAt(start)) != -1) { + start++; + } + } + } + if (mode >= 0) { + if (stripChars == null) { + while (start < end && Character.isWhitespace(str.charAt(end - 1))) + end--; + } else { + if (stripChars.length() == 0) { + return str; + } + while (start < end && stripChars.indexOf(str.charAt(end - 1)) != -1) { + end--; + } + } + } + if (start > 0 || end < length) { + return str.substring(start, end); + } + return str; + } + + public static boolean equals(String str1, String str2) { + if (str1 == null) { + return (str2 == null); + } + return str1.equals(str2); + } + + public static boolean equalsIgnoreCase(String str1, String str2) { + if (str1 == null) { + return (str2 == null); + } + return str1.equalsIgnoreCase(str2); + } + + public static boolean isAlpha(String str) { + if (str == null) { + return false; + } + int length = str.length(); + for (int i = 0; i < length; i++) { + if (!Character.isLetter(str.charAt(i))) { + return false; + } + } + return true; + } + + public static boolean isAlphaSpace(String str) { + if (str == null) { + return false; + } + int length = str.length(); + for (int i = 0; i < length; i++) { + if (!Character.isLetter(str.charAt(i)) && str.charAt(i) != ' ') { + return false; + } + } + return true; + } + + public static boolean isAlphanumeric(String str) { + if (str == null) { + return false; + } + int length = str.length(); + for (int i = 0; i < length; i++) { + if (!Character.isLetterOrDigit(str.charAt(i))) { + return false; + } + } + return true; + } + + public static boolean isAlphanumericSpace(String str) { + if (str == null) { + return false; + } + int length = str.length(); + for (int i = 0; i < length; i++) { + if (!Character.isLetterOrDigit(str.charAt(i)) && str.charAt(i) != ' ') { + return false; + } + } + return true; + } + + public static boolean isNumeric(String str) { + if (str == null) { + return false; + } + int length = str.length(); + for (int i = 0; i < length; i++) { + if (!Character.isDigit(str.charAt(i))) { + return false; + } + } + return true; + } + + public static boolean isInteger(String s) { + if (s == null) { + return false; + } + try { + Integer.parseInt(s); + return true; + } catch (NumberFormatException e) { + int idx = s.indexOf(".00"); + if (idx > -1) { + try { + Integer.parseInt(s.substring(0, idx)); + return true; + } catch (NumberFormatException numberFormatException) { + } + } + return false; + } + } + + public static boolean isNumericSpace(String str) { + if (str == null) { + return false; + } + int length = str.length(); + for (int i = 0; i < length; i++) { + if (!Character.isDigit(str.charAt(i)) && str.charAt(i) != ' ') { + return false; + } + } + return true; + } + + public static boolean isWhitespace(String str) { + if (str == null) { + return false; + } + int length = str.length(); + for (int i = 0; i < length; i++) { + if (!Character.isWhitespace(str.charAt(i))) { + return false; + } + } + return true; + } + + public static String toUpperCase(String str) { + if (str == null) { + return null; + } + return str.toUpperCase(); + } + + public static String toLowerCase(String str) { + if (str == null) { + return null; + } + return str.toLowerCase(); + } + + public static String capitalize(String str) { + int strLen; + if (str == null || (strLen = str.length()) == 0) { + return str; + } + return (new StringBuffer(strLen)).append(Character.toTitleCase(str.charAt(0))).append(str.substring(1)) + .toString(); + } + + public static String uncapitalize(String str) { + int strLen; + if (str == null || (strLen = str.length()) == 0) { + return str; + } + return (new StringBuffer(strLen)).append(Character.toLowerCase(str.charAt(0))).append(str.substring(1)) + .toString(); + } + + public static String swapCase(String str) { + int strLen; + if (str == null || (strLen = str.length()) == 0) { + return str; + } + StringBuffer buffer = new StringBuffer(strLen); + char ch = Character.MIN_VALUE; + for (int i = 0; i < strLen; i++) { + ch = str.charAt(i); + if (Character.isUpperCase(ch)) { + ch = Character.toLowerCase(ch); + } else if (Character.isTitleCase(ch)) { + ch = Character.toLowerCase(ch); + } else if (Character.isLowerCase(ch)) { + ch = Character.toUpperCase(ch); + } + buffer.append(ch); + } + return buffer.toString(); + } + + public static String toCamelCase(String str) { + return CAMEL_CASE_TOKENIZER.parse(str); + } + + public static String toPascalCase(String str) { + return PASCAL_CASE_TOKENIZER.parse(str); + } + + public static String toUpperCaseWithUnderscores(String str) { + return UPPER_CASE_WITH_UNDERSCORES_TOKENIZER.parse(str); + } + + public static String toLowerCaseWithUnderscores(String str) { + return LOWER_CASE_WITH_UNDERSCORES_TOKENIZER.parse(str); + } + + public static String[] split(String str) { + return split(str, null, -1); + } + + public static String[] split(String str, char separatorChar) { + if (str == null) { + return null; + } + int length = str.length(); + if (length == 0) { + return EMPTY_STRINGS; + } + List list = new ArrayList(); + int i = 0; + int start = 0; + boolean match = false; + while (i < length) { + if (str.charAt(i) == separatorChar) { + if (match) { + list.add(str.substring(start, i)); + match = false; + } + start = ++i; + continue; + } + match = true; + i++; + } + if (match) { + list.add(str.substring(start, i)); + } + return list.toArray(new String[list.size()]); + } + + public static String[] split(String str, String separatorChars) { + return split(str, separatorChars, -1); + } + + public static String[] split(String str, String separatorChars, int max) { + if (str == null) { + return null; + } + int length = str.length(); + if (length == 0) { + return EMPTY_STRINGS; + } + List list = new ArrayList(); + int sizePlus1 = 1; + int i = 0; + int start = 0; + boolean match = false; + if (separatorChars == null) { + while (i < length) { + if (Character.isWhitespace(str.charAt(i))) { + if (match) { + if (sizePlus1++ == max) { + i = length; + } + list.add(str.substring(start, i)); + match = false; + } + start = ++i; + continue; + } + match = true; + i++; + } + } else if (separatorChars.length() == 1) { + char sep = separatorChars.charAt(0); + while (i < length) { + if (str.charAt(i) == sep) { + if (match) { + if (sizePlus1++ == max) { + i = length; + } + list.add(str.substring(start, i)); + match = false; + } + start = ++i; + continue; + } + match = true; + i++; + } + } else { + while (i < length) { + if (separatorChars.indexOf(str.charAt(i)) >= 0) { + if (match) { + if (sizePlus1++ == max) { + i = length; + } + list.add(str.substring(start, i)); + match = false; + } + start = ++i; + continue; + } + match = true; + i++; + } + } + if (match) { + list.add(str.substring(start, i)); + } + return list.toArray(new String[list.size()]); + } + + public static String join(Object[] array) { + return join(array, (String)null); + } + + public static String join(Object[] array, char separator) { + if (array == null) { + return null; + } + int arraySize = array.length; + int bufSize = + (arraySize == 0) ? 0 : ((((array[0] == null) ? 16 : array[0].toString().length()) + 1) * arraySize); + StringBuffer buf = new StringBuffer(bufSize); + for (int i = 0; i < arraySize; i++) { + if (i > 0) { + buf.append(separator); + } + if (array[i] != null) { + buf.append(array[i]); + } + } + return buf.toString(); + } + + public static String join(Object[] array, String separator) { + if (array == null) { + return null; + } + if (separator == null) { + separator = ""; + } + int arraySize = array.length; + int bufSize = (arraySize == 0) ? 0 + : (arraySize * (((array[0] == null) ? 16 : array[0].toString().length()) + separator.length())); + StringBuffer buf = new StringBuffer(bufSize); + for (int i = 0; i < arraySize; i++) { + if (i > 0) { + buf.append(separator); + } + if (array[i] != null) { + buf.append(array[i]); + } + } + return buf.toString(); + } + + public static String join(Iterator iterator, char separator) { + if (iterator == null) { + return null; + } + StringBuffer buf = new StringBuffer(256); + while (iterator.hasNext()) { + Object obj = iterator.next(); + if (obj != null) { + buf.append(obj); + } + if (iterator.hasNext()) { + buf.append(separator); + } + } + return buf.toString(); + } + + public static String join(Iterator iterator, String separator) { + if (iterator == null) { + return null; + } + StringBuffer buf = new StringBuffer(256); + while (iterator.hasNext()) { + Object obj = iterator.next(); + if (obj != null) { + buf.append(obj); + } + if (separator != null && iterator.hasNext()) { + buf.append(separator); + } + } + return buf.toString(); + } + + public static String find(String str, String matcher) { + Pattern p = Pattern.compile(matcher); + Matcher m = p.matcher(str); + if (m.find()) { + return m.group(); + } + return null; + } + + public static List findAll(String str, String matcher) { + Pattern p = Pattern.compile(matcher); + Matcher m = p.matcher(str); + if (m.find()) { + List findStrs = new ArrayList<>(); + while (true) { + findStrs.add(m.group()); + if (!m.find(m.end())) + return findStrs; + } + } + return null; + } + + public static int indexOf(String str, char searchChar) { + if (str == null || str.length() == 0) { + return -1; + } + return str.indexOf(searchChar); + } + + public static int indexOf(String str, char searchChar, int startPos) { + if (str == null || str.length() == 0) { + return -1; + } + return str.indexOf(searchChar, startPos); + } + + public static int indexOf(String str, String searchStr) { + if (str == null || searchStr == null) { + return -1; + } + return str.indexOf(searchStr); + } + + public static int indexOfAny(String str, char[] searchChars) { + if (str == null || str.length() == 0 || searchChars == null || searchChars.length == 0) { + return -1; + } + for (int i = 0; i < str.length(); i++) { + char ch = str.charAt(i); + for (int j = 0; j < searchChars.length; j++) { + if (searchChars[j] == ch) { + return i; + } + } + } + return -1; + } + + public static int indexOfAny(String str, String searchChars) { + if (str == null || str.length() == 0 || searchChars == null || searchChars.length() == 0) { + return -1; + } + for (int i = 0; i < str.length(); i++) { + char ch = str.charAt(i); + for (int j = 0; j < searchChars.length(); j++) { + if (searchChars.charAt(j) == ch) { + return i; + } + } + } + return -1; + } + + public static int indexOfAny(String str, String[] searchStrs) { + if (str == null || searchStrs == null) { + return -1; + } + int sz = searchStrs.length; + int ret = Integer.MAX_VALUE; + int tmp = 0; + for (int i = 0; i < sz; i++) { + String search = searchStrs[i]; + if (search != null) { + tmp = str.indexOf(search); + if (tmp != -1) { + if (tmp < ret) + ret = tmp; + } + } + } + return (ret == Integer.MAX_VALUE) ? -1 : ret; + } + + public static int indexOfAnyBut(String str, char[] searchChars) { + if (str == null || str.length() == 0 || searchChars == null || searchChars.length == 0) { + return -1; + } + for (int i = 0; i < str.length(); i++) { + char ch = str.charAt(i); + int j = 0; + while (true) { + if (j < searchChars.length) { + if (searchChars[j] == ch) + break; + j++; + continue; + } + return i; + } + } + return -1; + } + + public static int indexOfAnyBut(String str, String searchChars) { + if (str == null || str.length() == 0 || searchChars == null || searchChars.length() == 0) { + return -1; + } + for (int i = 0; i < str.length(); i++) { + if (searchChars.indexOf(str.charAt(i)) < 0) { + return i; + } + } + return -1; + } + + public static int lastIndexOf(String str, char searchChar) { + if (str == null || str.length() == 0) { + return -1; + } + return str.lastIndexOf(searchChar); + } + + public static int lastIndexOf(String str, char searchChar, int startPos) { + if (str == null || str.length() == 0) { + return -1; + } + return str.lastIndexOf(searchChar, startPos); + } + + public static int lastIndexOf(String str, String searchStr) { + if (str == null || searchStr == null) { + return -1; + } + return str.lastIndexOf(searchStr); + } + + public static int lastIndexOfAny(String str, String[] searchStrs) { + if (str == null || searchStrs == null) { + return -1; + } + int searchStrsLength = searchStrs.length; + int index = -1; + int tmp = 0; + for (int i = 0; i < searchStrsLength; i++) { + String search = searchStrs[i]; + if (search != null) { + tmp = str.lastIndexOf(search); + if (tmp > index) { + index = tmp; + } + } + } + return index; + } + + public static boolean contains(String str, char searchChar) { + if (str == null || str.length() == 0) { + return false; + } + return (str.indexOf(searchChar) >= 0); + } + + public static boolean contains(String str, String searchStr) { + if (str == null || searchStr == null) { + return false; + } + return (str.indexOf(searchStr) >= 0); + } + + public static boolean containsOnly(String str, char[] valid) { + if (valid == null || str == null) { + return false; + } + if (str.length() == 0) { + return true; + } + if (valid.length == 0) { + return false; + } + return (indexOfAnyBut(str, valid) == -1); + } + + public static boolean containsOnly(String str, String valid) { + if (str == null || valid == null) { + return false; + } + return containsOnly(str, valid.toCharArray()); + } + + public static boolean containsNone(String str, char[] invalid) { + if (str == null || invalid == null) { + return true; + } + int strSize = str.length(); + int validSize = invalid.length; + for (int i = 0; i < strSize; i++) { + char ch = str.charAt(i); + for (int j = 0; j < validSize; j++) { + if (invalid[j] == ch) { + return false; + } + } + } + return true; + } + + public static boolean containsNone(String str, String invalidChars) { + if (str == null || invalidChars == null) { + return true; + } + return containsNone(str, invalidChars.toCharArray()); + } + + public static int countMatches(String str, String subStr) { + if (str == null || str.length() == 0 || subStr == null || subStr.length() == 0) { + return 0; + } + int count = 0; + int index = 0; + while ((index = str.indexOf(subStr, index)) != -1) { + count++; + index += subStr.length(); + } + return count; + } + + public static String compressString(String str, int start) { + if (str == null) { + return null; + } + if (start < 0) { + start = str.length() + start; + } + if (start < 0) { + start = 0; + } + if (start > str.length()) { + return ""; + } + return str.substring(start); + } + + public static String compressString(String str, int start, int end) { + if (str == null) { + return null; + } + if (end < 0) { + end = str.length() + end; + } + if (start < 0) { + start = str.length() + start; + } + if (end > str.length()) { + end = str.length(); + } + if (start > end) { + return ""; + } + if (start < 0) { + start = 0; + } + if (end < 0) { + end = 0; + } + return str.substring(start, end); + } + + public static String left(String str, int len) { + if (str == null) { + return null; + } + if (len < 0) { + return ""; + } + if (str.length() <= len) { + return str; + } + return str.substring(0, len); + } + + public static String right(String str, int len) { + if (str == null) { + return null; + } + if (len < 0) { + return ""; + } + if (str.length() <= len) { + return str; + } + return str.substring(str.length() - len); + } + + public static String mid(String str, int pos, int len) { + if (str == null) { + return null; + } + if (len < 0 || pos > str.length()) { + return ""; + } + if (pos < 0) { + pos = 0; + } + if (str.length() <= pos + len) { + return str.substring(pos); + } + return str.substring(pos, pos + len); + } + + public static String lpad(String str, int len, char padding) { + if (str == null || str.length() < len) { + StringBuilder sb = new StringBuilder(len); + int toPadLen = (str == null) ? len : (len - str.length()); + sb.append(fillCharr(padding, toPadLen)); + sb.append((str == null) ? "" : str); + return sb.toString(); + } + return str; + } + + public static String rpad(String str, int len, char padding) { + if (str == null || str.length() < len) { + StringBuilder sb = new StringBuilder(len); + sb.append((str == null) ? "" : str); + int toPadLen = (str == null) ? len : (len - str.length()); + sb.append(fillCharr(padding, toPadLen)); + return sb.toString(); + } + return str; + } + + public static String newRepeatCharString(char c, int len) { + return new String(fillCharr(c, len)); + } + + protected static char[] fillCharr(char c, int len) { + char[] chars = new char[len]; + if (len > 0) { + Arrays.fill(chars, c); + } + return chars; + } + + public static String substringBefore(String str, String separator) { + if (str == null || separator == null || str.length() == 0) { + return str; + } + if (separator.length() == 0) { + return ""; + } + int pos = str.indexOf(separator); + if (pos == -1) { + return str; + } + return str.substring(0, pos); + } + + public static String substringAfter(String str, String separator) { + if (str == null || str.length() == 0) { + return str; + } + if (separator == null) { + return ""; + } + int pos = str.indexOf(separator); + if (pos == -1) { + return ""; + } + return str.substring(pos + separator.length()); + } + + public static String substringBeforeLast(String str, String separator) { + if (str == null || separator == null || str.length() == 0 || separator.length() == 0) { + return str; + } + int pos = str.lastIndexOf(separator); + if (pos == -1) { + return str; + } + return str.substring(0, pos); + } + + public static String substringAfterLast(String str, String separator) { + if (str == null || str.length() == 0) { + return str; + } + if (separator == null || separator.length() == 0) { + return ""; + } + int pos = str.lastIndexOf(separator); + if (pos == -1 || pos == str.length() - separator.length()) { + return ""; + } + return str.substring(pos + separator.length()); + } + + public static String substringBetween(String str, String tag) { + return substringBetween(str, tag, tag, 0); + } + + public static String substringBetween(String str, String open, String close) { + return substringBetween(str, open, close, 0); + } + + public static String substringBetween(String str, String open, String close, int fromIndex) { + if (str == null || open == null || close == null) { + return null; + } + int start = str.indexOf(open, fromIndex); + if (start != -1) { + int end = str.indexOf(close, start + open.length()); + if (end != -1) { + return str.substring(start + open.length(), end); + } + } + return null; + } + + public static String deleteWhitespace(String str) { + if (str == null) { + return null; + } + int sz = str.length(); + StringBuffer buffer = new StringBuffer(sz); + for (int i = 0; i < sz; i++) { + if (!Character.isWhitespace(str.charAt(i))) { + buffer.append(str.charAt(i)); + } + } + return buffer.toString(); + } + + public static String replaceOnce(String text, String repl, String with) { + return replace(text, repl, with, 1); + } + + public static String replace(String text, String repl, String with) { + return replace(text, repl, with, -1); + } + + public static String replace(String text, String repl, String with, int max) { + if (text == null || repl == null || with == null || repl.length() == 0 || max == 0) { + return text; + } + StringBuffer buf = new StringBuffer(text.length()); + int start = 0; + int end = 0; + while ((end = text.indexOf(repl, start)) != -1) { + buf.append(text.substring(start, end)).append(with); + start = end + repl.length(); + if (--max == 0) { + break; + } + } + buf.append(text.substring(start)); + return buf.toString(); + } + + public static String replaceChars(String str, char searchChar, char replaceChar) { + if (str == null) { + return null; + } + return str.replace(searchChar, replaceChar); + } + + public static String replaceChars(String str, String searchChars, String replaceChars) { + if (str == null || str.length() == 0 || searchChars == null || searchChars.length() == 0) { + return str; + } + char[] chars = str.toCharArray(); + int len = chars.length; + boolean modified = false; + for (int i = 0, isize = searchChars.length(); i < isize; i++) { + char searchChar = searchChars.charAt(i); + if (replaceChars == null || i >= replaceChars.length()) { + int pos = 0; + for (int j = 0; j < len; j++) { + if (chars[j] != searchChar) { + chars[pos++] = chars[j]; + } else { + modified = true; + } + } + len = pos; + } else { + for (int j = 0; j < len; j++) { + if (chars[j] == searchChar) { + chars[j] = replaceChars.charAt(i); + modified = true; + } + } + } + } + if (!modified) { + return str; + } + return new String(chars, 0, len); + } + + public static String overlay(String str, String overlay, int start, int end) { + if (str == null) { + return null; + } + if (overlay == null) { + overlay = ""; + } + int len = str.length(); + if (start < 0) { + start = 0; + } + if (start > len) { + start = len; + } + if (end < 0) { + end = 0; + } + if (end > len) { + end = len; + } + if (start > end) { + int temp = start; + start = end; + end = temp; + } + return (new StringBuffer(len + start - end + overlay.length() + 1)).append(str.substring(0, start)) + .append(overlay).append(str.substring(end)).toString(); + } + + public static String chomp(String str) { + if (str == null || str.length() == 0) { + return str; + } + if (str.length() == 1) { + char ch = str.charAt(0); + if (ch == '\r' || ch == '\n') { + return ""; + } + return str; + } + int lastIdx = str.length() - 1; + char last = str.charAt(lastIdx); + if (last == '\n') { + if (str.charAt(lastIdx - 1) == '\r') { + lastIdx--; + } + } else if (last != '\r') { + lastIdx++; + } + return str.substring(0, lastIdx); + } + + public static String chomp(String str, String separator) { + if (str == null || str.length() == 0 || separator == null) { + return str; + } + if (str.endsWith(separator)) { + return str.substring(0, str.length() - separator.length()); + } + return str; + } + + public static String chop(String str) { + if (str == null) { + return null; + } + int strLen = str.length(); + if (strLen < 2) { + return ""; + } + int lastIdx = strLen - 1; + String ret = str.substring(0, lastIdx); + char last = str.charAt(lastIdx); + if (last == '\n' && ret.charAt(lastIdx - 1) == '\r') { + return ret.substring(0, lastIdx - 1); + } + return ret; + } + + public static String repeat(String str, int repeat) { + char ch, output1[]; + int i; + char ch0, ch1, output2[]; + int j; + if (str == null) { + return null; + } + if (repeat <= 0) { + return ""; + } + int inputLength = str.length(); + if (repeat == 1 || inputLength == 0) { + return str; + } + int outputLength = inputLength * repeat; + switch (inputLength) { + case 1: + ch = str.charAt(0); + output1 = new char[outputLength]; + for (i = repeat - 1; i >= 0; i--) { + output1[i] = ch; + } + return new String(output1); + case 2: + ch0 = str.charAt(0); + ch1 = str.charAt(1); + output2 = new char[outputLength]; + for (j = repeat * 2 - 2; j >= 0; j--, j--) { + output2[j] = ch0; + output2[j + 1] = ch1; + } + return new String(output2); + } + StringBuffer buf = new StringBuffer(outputLength); + for (int k = 0; k < repeat; k++) { + buf.append(str); + } + return buf.toString(); + } + + public static String alignLeft(String str, int size) { + return alignLeft(str, size, ' '); + } + + public static String alignLeft(String str, int size, char padChar) { + if (str == null) { + return null; + } + int pads = size - str.length(); + if (pads <= 0) { + return str; + } + return alignLeft(str, size, String.valueOf(padChar)); + } + + public static String alignLeft(String str, int size, String padStr) { + if (str == null) { + return null; + } + if (padStr == null || padStr.length() == 0) { + padStr = " "; + } + int padLen = padStr.length(); + int strLen = str.length(); + int pads = size - strLen; + if (pads <= 0) { + return str; + } + if (pads == padLen) + return str.concat(padStr); + if (pads < padLen) { + return str.concat(padStr.substring(0, pads)); + } + char[] padding = new char[pads]; + char[] padChars = padStr.toCharArray(); + for (int i = 0; i < pads; i++) { + padding[i] = padChars[i % padLen]; + } + return str.concat(new String(padding)); + } + + public static String alignRight(String str, int size) { + return alignRight(str, size, ' '); + } + + public static String alignRight(String str, int size, char padChar) { + if (str == null) { + return null; + } + int pads = size - str.length(); + if (pads <= 0) { + return str; + } + return alignRight(str, size, String.valueOf(padChar)); + } + + public static String alignRight(String str, int size, String padStr) { + if (str == null) { + return null; + } + if (padStr == null || padStr.length() == 0) { + padStr = " "; + } + int padLen = padStr.length(); + int strLen = str.length(); + int pads = size - strLen; + if (pads <= 0) { + return str; + } + if (pads == padLen) + return padStr.concat(str); + if (pads < padLen) { + return padStr.substring(0, pads).concat(str); + } + char[] padding = new char[pads]; + char[] padChars = padStr.toCharArray(); + for (int i = 0; i < pads; i++) { + padding[i] = padChars[i % padLen]; + } + return (new String(padding)).concat(str); + } + + public static String center(String str, int size) { + return center(str, size, ' '); + } + + public static String center(String str, int size, char padChar) { + if (str == null || size <= 0) { + return str; + } + int strLen = str.length(); + int pads = size - strLen; + if (pads <= 0) { + return str; + } + str = alignRight(str, strLen + pads / 2, padChar); + str = alignLeft(str, size, padChar); + return str; + } + + public static String center(String str, int size, String padStr) { + if (str == null || size <= 0) { + return str; + } + if (padStr == null || padStr.length() == 0) { + padStr = " "; + } + int strLen = str.length(); + int pads = size - strLen; + if (pads <= 0) { + return str; + } + str = alignRight(str, strLen + pads / 2, padStr); + str = alignLeft(str, size, padStr); + return str; + } + + public static String reverse(String str) { + if (str == null || str.length() == 0) { + return str; + } + return (new StringBuffer(str)).reverse().toString(); + } + + public static String abbreviate(String str, int maxWidth) { + return abbreviate(str, 0, maxWidth); + } + + public static String abbreviate(String str, int offset, int maxWidth) { + if (str == null) { + return null; + } + if (maxWidth < 4) { + maxWidth = 4; + } + if (str.length() <= maxWidth) { + return str; + } + if (offset > str.length()) { + offset = str.length(); + } + if (str.length() - offset < maxWidth - 3) { + offset = str.length() - maxWidth - 3; + } + if (offset <= 4) { + return str.substring(0, maxWidth - 3) + "..."; + } + if (maxWidth < 7) { + maxWidth = 7; + } + if (offset + maxWidth - 3 < str.length()) { + return "..." + abbreviate(str.substring(offset), maxWidth - 3); + } + return "..." + str.substring(str.length() - maxWidth - 3); + } + + public static String difference(String str1, String str2) { + if (str1 == null) { + return str2; + } + if (str2 == null) { + return str1; + } + int index = indexOfDifference(str1, str2); + if (index == -1) { + return ""; + } + return str2.substring(index); + } + + public static int indexOfDifference(String str1, String str2) { + if (str1 == null || str2 == null || str1.equals(str2)) { + return -1; + } + int i; + for (i = 0; i < str1.length() && i < str2.length() && str1.charAt(i) == str2.charAt(i); i++); + if (i < str2.length() || i < str1.length()) { + return i; + } + return -1; + } + + public static int getLevenshteinDistance(String s, String t) { + s = defaultIfNull(s); + t = defaultIfNull(t); + int n = s.length(); + int m = t.length(); + if (n == 0) { + return m; + } + if (m == 0) { + return n; + } + int[][] d = new int[n + 1][m + 1]; + int i; + for (i = 0; i <= n; i++) { + d[i][0] = i; + } + int j; + for (j = 0; j <= m; j++) { + d[0][j] = j; + } + for (i = 1; i <= n; i++) { + char s_i = s.charAt(i - 1); + for (j = 1; j <= m; j++) { + int cost; + char t_j = t.charAt(j - 1); + if (s_i == t_j) { + cost = 0; + } else { + cost = 1; + } + d[i][j] = min(d[i - 1][j] + 1, d[i][j - 1] + 1, d[i - 1][j - 1] + cost); + } + } + return d[n][m]; + } + + private static int min(int a, int b, int c) { + if (b < a) { + a = b; + } + if (c < a) { + a = c; + } + return a; + } + + public static boolean notEquals(String str1, String str2) { + if (str1 == null) { + return (str2 != null); + } + return !str1.equals(str2); + } + + public static int getNum(String origin, String ch) { + int chLength = ch.length(); + if (origin.length() == 0) { + return 0; + } + if (chLength == 0) { + return -1; + } + int index = 0; + int count = 0; + while (origin.indexOf(ch, index) != -1) { + count++; + index = origin.indexOf(ch, index) + chLength; + } + return count; + } + + private static abstract class WordTokenizer { + protected static final char UNDERSCORE = '_'; + + private WordTokenizer() {} + + public String parse(String str) { + if (StringUtils.isEmpty(str)) { + return str; + } + int length = str.length(); + StringBuffer buffer = new StringBuffer(length); + for (int index = 0; index < length; index++) { + char ch = str.charAt(index); + if (!Character.isWhitespace(ch)) { + if (Character.isUpperCase(ch)) { + int wordIndex = index + 1; + while (wordIndex < length) { + char wordChar = str.charAt(wordIndex); + if (Character.isUpperCase(wordChar)) { + wordIndex++; + continue; + } + if (Character.isLowerCase(wordChar)) { + wordIndex--; + } + } + if (wordIndex == length || wordIndex > index) { + index = parseUpperCaseWord(buffer, str, index, wordIndex); + } else { + index = parseTitleCaseWord(buffer, str, index); + } + } else if (Character.isLowerCase(ch)) { + index = parseLowerCaseWord(buffer, str, index); + } else if (Character.isDigit(ch)) { + index = parseDigitWord(buffer, str, index); + } else { + inDelimiter(buffer, ch); + } + } + } + return buffer.toString(); + } + + private int parseUpperCaseWord(StringBuffer buffer, String str, int index, int length) { + char ch = str.charAt(index++); + if (buffer.length() == 0) { + startSentence(buffer, ch); + } else { + startWord(buffer, ch); + } + for (; index < length; index++) { + ch = str.charAt(index); + inWord(buffer, ch); + } + return index - 1; + } + + private int parseLowerCaseWord(StringBuffer buffer, String str, int index) { + char ch = str.charAt(index++); + if (buffer.length() == 0) { + startSentence(buffer, ch); + } else { + startWord(buffer, ch); + } + int length = str.length(); + while (index < length) { + ch = str.charAt(index); + if (Character.isLowerCase(ch)) { + inWord(buffer, ch); + index++; + } + } + return index - 1; + } + + private int parseTitleCaseWord(StringBuffer buffer, String str, int index) { + char ch = str.charAt(index++); + if (buffer.length() == 0) { + startSentence(buffer, ch); + } else { + startWord(buffer, ch); + } + int length = str.length(); + while (index < length) { + ch = str.charAt(index); + if (Character.isLowerCase(ch)) { + inWord(buffer, ch); + index++; + } + } + return index - 1; + } + + private int parseDigitWord(StringBuffer buffer, String str, int index) { + char ch = str.charAt(index++); + if (buffer.length() == 0) { + startDigitSentence(buffer, ch); + } else { + startDigitWord(buffer, ch); + } + int length = str.length(); + while (index < length) { + ch = str.charAt(index); + if (Character.isDigit(ch)) { + inDigitWord(buffer, ch); + index++; + } + } + return index - 1; + } + + protected boolean isDelimiter(char ch) { + return (!Character.isUpperCase(ch) && !Character.isLowerCase(ch) && !Character.isDigit(ch)); + } + + protected abstract void startSentence(StringBuffer param1StringBuffer, char param1Char); + + protected abstract void startWord(StringBuffer param1StringBuffer, char param1Char); + + protected abstract void inWord(StringBuffer param1StringBuffer, char param1Char); + + protected abstract void startDigitSentence(StringBuffer param1StringBuffer, char param1Char); + + protected abstract void startDigitWord(StringBuffer param1StringBuffer, char param1Char); + + protected abstract void inDigitWord(StringBuffer param1StringBuffer, char param1Char); + + protected abstract void inDelimiter(StringBuffer param1StringBuffer, char param1Char); + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/util/ToolUtil.java b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/util/ToolUtil.java new file mode 100644 index 00000000..ce170172 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-common/src/main/java/cn/cloudwalk/elevator/util/ToolUtil.java @@ -0,0 +1,19 @@ +package cn.cloudwalk.elevator.util; + +import java.util.Set; +import java.util.UUID; +import java.util.concurrent.ConcurrentHashMap; +import java.util.function.Function; +import java.util.function.Predicate; + +public class ToolUtil { + public static String generateUUID() { + String uuid = UUID.randomUUID().toString(); + return uuid.replaceAll("-", ""); + } + + public static Predicate distinctByKey(Function keyExtractor) { + Set seen = ConcurrentHashMap.newKeySet(); + return t -> seen.add(keyExtractor.apply(t)); + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-common/src/main/resources/META-INF/MANIFEST.MF b/maven-cw-elevator-application/cw-elevator-application-common/src/main/resources/META-INF/MANIFEST.MF new file mode 100644 index 00000000..18570ae7 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-common/src/main/resources/META-INF/MANIFEST.MF @@ -0,0 +1,12 @@ +Manifest-Version: 1.0 +Implementation-Title: cw-elevator-application-common +Implementation-Version: 1.0-SNAPSHOT +Archiver-Version: Plexus Archiver +Built-By: YCWB0304 +Implementation-Vendor-Id: cn.cloudwalk.elevator +Created-By: Apache Maven 3.6.1 +Build-Jdk: 1.8.0_144 +Implementation-URL: http://projects.spring.io/spring-boot/cw-elevator- + application/cw-elevator-application-common/ +Implementation-Vendor: Pivotal Software, Inc. + diff --git a/maven-cw-elevator-application/cw-elevator-application-data/pom.xml b/maven-cw-elevator-application/cw-elevator-application-data/pom.xml new file mode 100644 index 00000000..bd6ee299 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/pom.xml @@ -0,0 +1,91 @@ + + + 4.0.0 + + + cn.cloudwalk.elevator + cw-elevator-application-decompiled-reactor + 1.0-SNAPSHOT + ../pom.xml + + + cw-elevator-application-data + jar + + + ${project.basedir}/../../docs/style/alibaba-eclipse-codestyle.xml + + + + + cn.cloudwalk.elevator + cw-elevator-application-common + ${project.version} + + + cn.cloudwalk.cloud + cloudwalk-common-result + + + org.springframework + spring-beans + + + org.springframework + spring-context + + + org.mybatis + mybatis-spring + + + org.mybatis + mybatis + + + mysql + mysql-connector-java + + + org.mybatis.spring.boot + mybatis-spring-boot-starter + + + com.zaxxer + HikariCP + + + com.github.pagehelper + pagehelper + + + com.github.pagehelper + pagehelper-spring-boot-autoconfigure + + + org.apache.shardingsphere + sharding-jdbc-spring-boot-starter + + + + + + + net.revelc.code.formatter + formatter-maven-plugin + + + + + src/main/java + + **/*.xml + + + + src/main/resources + + + + diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/YearlyShardingAlgorithm.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/YearlyShardingAlgorithm.java new file mode 100644 index 00000000..8066015a --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/YearlyShardingAlgorithm.java @@ -0,0 +1,51 @@ +package cn.cloudwalk.elevator; + +import cn.cloudwalk.elevator.util.DateUtils; +import com.google.common.collect.Range; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Date; +import org.apache.shardingsphere.api.sharding.standard.PreciseShardingAlgorithm; +import org.apache.shardingsphere.api.sharding.standard.PreciseShardingValue; +import org.apache.shardingsphere.api.sharding.standard.RangeShardingAlgorithm; +import org.apache.shardingsphere.api.sharding.standard.RangeShardingValue; +import org.springframework.util.CollectionUtils; + +public class YearlyShardingAlgorithm implements PreciseShardingAlgorithm, RangeShardingAlgorithm { + public String doSharding(Collection availableTargetNames, PreciseShardingValue shardingValue) { + Long time = (Long)shardingValue.getValue(); + String suffix = DateUtils.formatDate(new Date(time.longValue()), "yyyy"); + String logicTableName = shardingValue.getLogicTableName(); + String actualTableName = logicTableName + "_" + suffix; + if (!availableTargetNames.contains(actualTableName)) + ; + return actualTableName; + } + + public Collection doSharding(Collection availableTargetNames, + RangeShardingValue shardingValue) { + Collection availables = new ArrayList<>(); + Range valueRange = shardingValue.getValueRange(); + if (!CollectionUtils.isEmpty(availableTargetNames)) { + Integer lowerBoundYear = Integer.valueOf(-2147483648); + Integer upperBoundYear = Integer.valueOf(2147483647); + if (valueRange.hasLowerBound()) { + lowerBoundYear = Integer.valueOf(Integer + .parseInt(DateUtils.formatDate(new Date(((Long)valueRange.lowerEndpoint()).longValue()), "YYYY"))); + } + if (valueRange.hasUpperBound()) { + upperBoundYear = Integer.valueOf(Integer + .parseInt(DateUtils.formatDate(new Date(((Long)valueRange.upperEndpoint()).longValue()), "YYYY"))); + } + for (String targetTable : availableTargetNames) { + Integer tableNameSuffix = Integer.valueOf(Integer.parseInt( + targetTable.substring(targetTable.lastIndexOf('_') + 1, targetTable.lastIndexOf('_') + 5))); + if (tableNameSuffix.compareTo(lowerBoundYear) < 0 || tableNameSuffix.compareTo(upperBoundYear) > 0) { + continue; + } + availables.add(targetTable); + } + } + return availables; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/codeElevatorArea/dao/AcsElevatorCodeDao.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/codeElevatorArea/dao/AcsElevatorCodeDao.java new file mode 100644 index 00000000..07602358 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/codeElevatorArea/dao/AcsElevatorCodeDao.java @@ -0,0 +1,15 @@ +package cn.cloudwalk.elevator.codeElevatorArea.dao; + +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.elevator.codeElevatorArea.dto.AcsElevatorCodeDTO; +import cn.cloudwalk.elevator.codeElevatorArea.dto.AcsElevatorCodeResultDTO; + +public interface AcsElevatorCodeDao { + Integer insertNew(AcsElevatorCodeDTO paramAcsElevatorCodeDTO) throws ServiceException; + + Integer updateOld(AcsElevatorCodeDTO paramAcsElevatorCodeDTO) throws ServiceException; + + AcsElevatorCodeResultDTO get(AcsElevatorCodeDTO paramAcsElevatorCodeDTO); + + AcsElevatorCodeResultDTO getFirstByParentId(String paramString); +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/codeElevatorArea/dto/AcsElevatorCodeDTO.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/codeElevatorArea/dto/AcsElevatorCodeDTO.java new file mode 100644 index 00000000..d79671ab --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/codeElevatorArea/dto/AcsElevatorCodeDTO.java @@ -0,0 +1,43 @@ +package cn.cloudwalk.elevator.codeElevatorArea.dto; + +import cn.cloudwalk.cloud.entity.CloudwalkBaseTimes; +import java.io.Serializable; + +public class AcsElevatorCodeDTO extends CloudwalkBaseTimes implements Serializable { + private String zoneId; + private String code; + private String parentId; + private Integer isFirst; + + public String getZoneId() { + return this.zoneId; + } + + public void setZoneId(String zoneId) { + this.zoneId = zoneId; + } + + public String getCode() { + return this.code; + } + + public void setCode(String code) { + this.code = code; + } + + public Integer getIsFirst() { + return this.isFirst; + } + + public void setIsFirst(Integer isFirst) { + this.isFirst = isFirst; + } + + public String getParentId() { + return this.parentId; + } + + public void setParentId(String parentId) { + this.parentId = parentId; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/codeElevatorArea/dto/AcsElevatorCodeQueryDTO.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/codeElevatorArea/dto/AcsElevatorCodeQueryDTO.java new file mode 100644 index 00000000..0c515fca --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/codeElevatorArea/dto/AcsElevatorCodeQueryDTO.java @@ -0,0 +1,58 @@ +package cn.cloudwalk.elevator.codeElevatorArea.dto; + +public class AcsElevatorCodeQueryDTO { + private String zoneId; + private String id; + private String zoneName; + private String zoneType; + private String code; + private Integer isFirst; + + public String getZoneId() { + return this.zoneId; + } + + public void setZoneId(String zoneId) { + this.zoneId = zoneId; + } + + public String getCode() { + return this.code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getZoneName() { + return this.zoneName; + } + + public void setZoneName(String zoneName) { + this.zoneName = zoneName; + } + + public String getZoneType() { + return this.zoneType; + } + + public void setZoneType(String zoneType) { + this.zoneType = zoneType; + } + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public Integer getIsFirst() { + return this.isFirst; + } + + public void setIsFirst(Integer isFirst) { + this.isFirst = isFirst; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/codeElevatorArea/dto/AcsElevatorCodeResultDTO.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/codeElevatorArea/dto/AcsElevatorCodeResultDTO.java new file mode 100644 index 00000000..c7405a5c --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/codeElevatorArea/dto/AcsElevatorCodeResultDTO.java @@ -0,0 +1,31 @@ +package cn.cloudwalk.elevator.codeElevatorArea.dto; + +public class AcsElevatorCodeResultDTO { + private String zoneId; + private String code; + private Integer isFirst; + + public String getZoneId() { + return this.zoneId; + } + + public void setZoneId(String zoneId) { + this.zoneId = zoneId; + } + + public String getCode() { + return this.code; + } + + public void setCode(String code) { + this.code = code; + } + + public Integer getIsFirst() { + return this.isFirst; + } + + public void setIsFirst(Integer isFirst) { + this.isFirst = isFirst; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/codeElevatorArea/impl/AcsElevatorCodeDaoImpl.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/codeElevatorArea/impl/AcsElevatorCodeDaoImpl.java new file mode 100644 index 00000000..2b9658c2 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/codeElevatorArea/impl/AcsElevatorCodeDaoImpl.java @@ -0,0 +1,31 @@ +package cn.cloudwalk.elevator.codeElevatorArea.impl; + +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.elevator.codeElevatorArea.dao.AcsElevatorCodeDao; +import cn.cloudwalk.elevator.codeElevatorArea.dto.AcsElevatorCodeDTO; +import cn.cloudwalk.elevator.codeElevatorArea.dto.AcsElevatorCodeResultDTO; +import cn.cloudwalk.elevator.codeElevatorArea.mapper.AcsElevatorCodeMapper; +import javax.annotation.Resource; +import org.springframework.stereotype.Repository; + +@Repository +public class AcsElevatorCodeDaoImpl implements AcsElevatorCodeDao { + @Resource + private AcsElevatorCodeMapper acsElevatorCodeMapper; + + public Integer insertNew(AcsElevatorCodeDTO dto) throws ServiceException { + return Integer.valueOf(this.acsElevatorCodeMapper.insertNew(dto)); + } + + public Integer updateOld(AcsElevatorCodeDTO dto) throws ServiceException { + return Integer.valueOf(this.acsElevatorCodeMapper.updateOld(dto)); + } + + public AcsElevatorCodeResultDTO get(AcsElevatorCodeDTO dto) { + return this.acsElevatorCodeMapper.get(dto); + } + + public AcsElevatorCodeResultDTO getFirstByParentId(String parentId) { + return this.acsElevatorCodeMapper.getFirstByParentId(parentId); + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/codeElevatorArea/mapper/AcsElevatorCodeMapper.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/codeElevatorArea/mapper/AcsElevatorCodeMapper.java new file mode 100644 index 00000000..553592cf --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/codeElevatorArea/mapper/AcsElevatorCodeMapper.java @@ -0,0 +1,14 @@ +package cn.cloudwalk.elevator.codeElevatorArea.mapper; + +import cn.cloudwalk.elevator.codeElevatorArea.dto.AcsElevatorCodeDTO; +import cn.cloudwalk.elevator.codeElevatorArea.dto.AcsElevatorCodeResultDTO; + +public interface AcsElevatorCodeMapper { + AcsElevatorCodeResultDTO get(AcsElevatorCodeDTO paramAcsElevatorCodeDTO); + + int insertNew(AcsElevatorCodeDTO paramAcsElevatorCodeDTO); + + int updateOld(AcsElevatorCodeDTO paramAcsElevatorCodeDTO); + + AcsElevatorCodeResultDTO getFirstByParentId(String paramString); +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/codeElevatorArea/mapper/AcsElevatorCodeMapper.xml b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/codeElevatorArea/mapper/AcsElevatorCodeMapper.xml new file mode 100644 index 00000000..e42dad97 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/codeElevatorArea/mapper/AcsElevatorCodeMapper.xml @@ -0,0 +1,50 @@ + + + + + + + insert into code_elevator_area (zone_id, code, create_time, last_update_time,is_first,parent_id) + values (#{zoneId,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR}, + #{createTime,jdbcType=BIGINT}, + #{lastUpdateTime,jdbcType=BIGINT},#{isFirst,jdbcType=TINYINT}, #{parentId,jdbcType=VARCHAR}) + + + + + + + + + + update code_elevator_area + + + last_update_time = #{lastUpdateTime, jdbcType=BIGINT}, + + + + code = #{code, jdbcType=VARCHAR}, + + + is_first = #{isFirst, jdbcType=TINYINT}, + + + + zone_id = #{zoneId, jdbcType=VARCHAR} + + + + + + diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dao/AcsDeviceTaskDao.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dao/AcsDeviceTaskDao.java new file mode 100644 index 00000000..75164e5b --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dao/AcsDeviceTaskDao.java @@ -0,0 +1,14 @@ +package cn.cloudwalk.elevator.device.dao; + +import cn.cloudwalk.elevator.device.dto.AcsDeviceTaskAddDto; +import cn.cloudwalk.elevator.device.dto.AcsDeviceTaskDTO; + +public interface AcsDeviceTaskDao { + Integer insert(AcsDeviceTaskAddDto paramAcsDeviceTaskAddDto); + + Integer updateBingDevices(AcsDeviceTaskAddDto paramAcsDeviceTaskAddDto); + + Integer updateIsStop(AcsDeviceTaskAddDto paramAcsDeviceTaskAddDto); + + AcsDeviceTaskDTO getById(String paramString); +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dao/AcsElevatorDeviceDao.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dao/AcsElevatorDeviceDao.java new file mode 100644 index 00000000..bbc41df6 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dao/AcsElevatorDeviceDao.java @@ -0,0 +1,46 @@ +package cn.cloudwalk.elevator.device.dao; + +import cn.cloudwalk.cloud.exception.DataAccessException; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.page.CloudwalkPageInfo; +import cn.cloudwalk.elevator.device.dto.AcsElevatorDeviceAddDTO; +import cn.cloudwalk.elevator.device.dto.AcsElevatorDeviceEditDTO; +import cn.cloudwalk.elevator.device.dto.AcsElevatorDeviceListByBuildingIdDto; +import cn.cloudwalk.elevator.device.dto.AcsElevatorDeviceListDto; +import cn.cloudwalk.elevator.device.dto.AcsElevatorDeviceQueryByIdDTO; +import cn.cloudwalk.elevator.device.dto.AcsElevatorDeviceQueryDTO; +import cn.cloudwalk.elevator.device.dto.AcsElevatorDeviceResultDTO; +import java.util.List; + +public interface AcsElevatorDeviceDao { + Integer add(AcsElevatorDeviceAddDTO paramAcsElevatorDeviceAddDTO) throws DataAccessException; + + Integer edit(AcsElevatorDeviceEditDTO paramAcsElevatorDeviceEditDTO) throws DataAccessException; + + Integer delete(List paramList) throws DataAccessException; + + CloudwalkPageAble page(AcsElevatorDeviceQueryDTO paramAcsElevatorDeviceQueryDTO, + CloudwalkPageInfo paramCloudwalkPageInfo) throws DataAccessException; + + List listByZoneId(AcsElevatorDeviceListDto paramAcsElevatorDeviceListDto) + throws DataAccessException; + + List listByZoneIds(AcsElevatorDeviceListDto paramAcsElevatorDeviceListDto) + throws DataAccessException; + + List listBuBuildingId( + AcsElevatorDeviceListByBuildingIdDto paramAcsElevatorDeviceListByBuildingIdDto) throws DataAccessException; + + List get(AcsElevatorDeviceQueryDTO paramAcsElevatorDeviceQueryDTO) + throws ServiceException; + + AcsElevatorDeviceResultDTO getById(AcsElevatorDeviceQueryByIdDTO paramAcsElevatorDeviceQueryByIdDTO) + throws ServiceException; + + AcsElevatorDeviceResultDTO getByDeciveCode(String paramString) throws ServiceException; + + String getBuildingId(AcsElevatorDeviceQueryDTO paramAcsElevatorDeviceQueryDTO) throws ServiceException; + + String getBusinessId(AcsElevatorDeviceQueryDTO paramAcsElevatorDeviceQueryDTO) throws ServiceException; +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dao/DeviceImageStoreDao.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dao/DeviceImageStoreDao.java new file mode 100644 index 00000000..768eed01 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dao/DeviceImageStoreDao.java @@ -0,0 +1,9 @@ +package cn.cloudwalk.elevator.device.dao; + +import cn.cloudwalk.cloud.exception.ServiceException; + +public interface DeviceImageStoreDao { + Boolean save(String paramString1, String paramString2) throws ServiceException; + + String getByBuildingId(String paramString) throws ServiceException; +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dto/AcsDeviceQueryDTO.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dto/AcsDeviceQueryDTO.java new file mode 100644 index 00000000..6b5b4c6c --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dto/AcsDeviceQueryDTO.java @@ -0,0 +1,98 @@ +package cn.cloudwalk.elevator.device.dto; + +import java.io.Serializable; +import java.util.List; + +public class AcsDeviceQueryDTO implements Serializable { + private static final long serialVersionUID = -9107652629099620576L; + private String id; + private List ids; + private String businessId; + private String deviceId; + private List deviceIds; + private String deviceCode; + private String parentDeviceId; + private List parentDeviceIds; + private Integer openStatus; + private Integer queryParent; + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public List getIds() { + return this.ids; + } + + public void setIds(List ids) { + this.ids = ids; + } + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getDeviceId() { + return this.deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public List getDeviceIds() { + return this.deviceIds; + } + + public void setDeviceIds(List deviceIds) { + this.deviceIds = deviceIds; + } + + public String getDeviceCode() { + return this.deviceCode; + } + + public void setDeviceCode(String deviceCode) { + this.deviceCode = deviceCode; + } + + public String getParentDeviceId() { + return this.parentDeviceId; + } + + public void setParentDeviceId(String parentDeviceId) { + this.parentDeviceId = parentDeviceId; + } + + public List getParentDeviceIds() { + return this.parentDeviceIds; + } + + public void setParentDeviceIds(List parentDeviceIds) { + this.parentDeviceIds = parentDeviceIds; + } + + public Integer getQueryParent() { + return this.queryParent; + } + + public void setQueryParent(Integer queryParent) { + this.queryParent = queryParent; + } + + public Integer getOpenStatus() { + return this.openStatus; + } + + public void setOpenStatus(Integer openStatus) { + this.openStatus = openStatus; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dto/AcsDeviceResultDTO.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dto/AcsDeviceResultDTO.java new file mode 100644 index 00000000..60338235 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dto/AcsDeviceResultDTO.java @@ -0,0 +1,71 @@ +package cn.cloudwalk.elevator.device.dto; + +import cn.cloudwalk.cloud.entity.CloudwalkBaseTimes; +import java.io.Serializable; + +public class AcsDeviceResultDTO extends CloudwalkBaseTimes implements Serializable { + private static final long serialVersionUID = 6868258119634367362L; + private String id; + private String businessId; + private String deviceId; + private String deviceCode; + private String parentDeviceId; + private String imageStoreId; + private Integer openStatus; + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getDeviceId() { + return this.deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public String getDeviceCode() { + return this.deviceCode; + } + + public void setDeviceCode(String deviceCode) { + this.deviceCode = deviceCode; + } + + public String getParentDeviceId() { + return this.parentDeviceId; + } + + public void setParentDeviceId(String parentDeviceId) { + this.parentDeviceId = parentDeviceId; + } + + public String getImageStoreId() { + return this.imageStoreId; + } + + public void setImageStoreId(String imageStoreId) { + this.imageStoreId = imageStoreId; + } + + public Integer getOpenStatus() { + return this.openStatus; + } + + public void setOpenStatus(Integer openStatus) { + this.openStatus = openStatus; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dto/AcsDeviceTaskAddDto.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dto/AcsDeviceTaskAddDto.java new file mode 100644 index 00000000..e15e20e7 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dto/AcsDeviceTaskAddDto.java @@ -0,0 +1,35 @@ +package cn.cloudwalk.elevator.device.dto; + +import cn.cloudwalk.cloud.entity.CloudwalkBaseTimes; +import java.io.Serializable; + +public class AcsDeviceTaskAddDto extends CloudwalkBaseTimes implements Serializable { + private static final long serialVersionUID = 6909321999650444051L; + private Integer allDevices; + private Integer bindDevices; + private Integer isStop; + + public Integer getAllDevices() { + return this.allDevices; + } + + public void setAllDevices(Integer allDevices) { + this.allDevices = allDevices; + } + + public Integer getBindDevices() { + return this.bindDevices; + } + + public void setBindDevices(Integer bindDevices) { + this.bindDevices = bindDevices; + } + + public Integer getIsStop() { + return this.isStop; + } + + public void setIsStop(Integer isStop) { + this.isStop = isStop; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dto/AcsDeviceTaskDTO.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dto/AcsDeviceTaskDTO.java new file mode 100644 index 00000000..dcfcca8c --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dto/AcsDeviceTaskDTO.java @@ -0,0 +1,43 @@ +package cn.cloudwalk.elevator.device.dto; + +import java.io.Serializable; + +public class AcsDeviceTaskDTO implements Serializable { + private static final long serialVersionUID = -3746361327881264974L; + private String id; + private Integer allDevices; + private Integer bindDevices; + private Integer isStop; + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public Integer getAllDevices() { + return this.allDevices; + } + + public void setAllDevices(Integer allDevices) { + this.allDevices = allDevices; + } + + public Integer getBindDevices() { + return this.bindDevices; + } + + public void setBindDevices(Integer bindDevices) { + this.bindDevices = bindDevices; + } + + public Integer getIsStop() { + return this.isStop; + } + + public void setIsStop(Integer isStop) { + this.isStop = isStop; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dto/AcsElevatorDeviceAddDTO.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dto/AcsElevatorDeviceAddDTO.java new file mode 100644 index 00000000..de8f49f9 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dto/AcsElevatorDeviceAddDTO.java @@ -0,0 +1,151 @@ +package cn.cloudwalk.elevator.device.dto; + +import cn.cloudwalk.cloud.entity.CloudwalkBaseTimes; +import java.io.Serializable; + +public class AcsElevatorDeviceAddDTO extends CloudwalkBaseTimes implements Serializable { + private String businessId; + private String deviceId; + private String deviceCode; + private String deviceName; + private String deviceTypeName; + private String elevatorFloorList; + private String currentFloorId; + private String currentFloor; + private String currentBuilding; + private String currentBuildingId; + private String areaName; + private Integer status; + private Integer deleteFlag; + private String areaId; + private String elevatorFloorIdList; + + public String getElevatorFloorIdList() { + return this.elevatorFloorIdList; + } + + public void setElevatorFloorIdList(String elevatorFloorIdList) { + this.elevatorFloorIdList = elevatorFloorIdList; + } + + public String getCurrentBuildingId() { + return this.currentBuildingId; + } + + public void setCurrentBuildingId(String currentBuildingId) { + this.currentBuildingId = currentBuildingId; + } + + public String getAreaId() { + return this.areaId; + } + + public void setAreaId(String areaId) { + this.areaId = areaId; + } + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getDeviceId() { + return this.deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public String getDeviceCode() { + return this.deviceCode; + } + + public void setDeviceCode(String deviceCode) { + this.deviceCode = deviceCode; + } + + public String getDeviceName() { + return this.deviceName; + } + + public void setDeviceName(String deviceName) { + this.deviceName = deviceName; + } + + public String getDeviceTypeName() { + return this.deviceTypeName; + } + + public void setDeviceTypeName(String deviceTypeName) { + this.deviceTypeName = deviceTypeName; + } + + public String getElevatorFloorList() { + return this.elevatorFloorList; + } + + public void setElevatorFloorList(String elevatorFloorList) { + this.elevatorFloorList = elevatorFloorList; + } + + public String getCurrentFloorId() { + return this.currentFloorId; + } + + public void setCurrentFloorId(String currentFloorId) { + this.currentFloorId = currentFloorId; + } + + public String getCurrentFloor() { + return this.currentFloor; + } + + public void setCurrentFloor(String currentFloor) { + this.currentFloor = currentFloor; + } + + public String getCurrentBuilding() { + return this.currentBuilding; + } + + public void setCurrentBuilding(String currentBuilding) { + this.currentBuilding = currentBuilding; + } + + public String getAreaName() { + return this.areaName; + } + + public void setAreaName(String areaName) { + this.areaName = areaName; + } + + public Integer getStatus() { + return this.status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Integer getDeleteFlag() { + return this.deleteFlag; + } + + public void setDeleteFlag(Integer deleteFlag) { + this.deleteFlag = deleteFlag; + } + + public String toString() { + return "AcsElevatorDeviceAddDTO{businessId='" + this.businessId + '\'' + ", deviceId='" + this.deviceId + '\'' + + ", deviceCode='" + this.deviceCode + '\'' + ", deviceName='" + this.deviceName + '\'' + + ", deviceTypeName='" + this.deviceTypeName + '\'' + ", elevatorFloorList='" + this.elevatorFloorList + + '\'' + ", currentFloorId='" + this.currentFloorId + '\'' + ", currentFloor='" + this.currentFloor + '\'' + + ", currentBuilding='" + this.currentBuilding + '\'' + ", areaName='" + this.areaName + '\'' + ", status=" + + this.status + ", deleteFlag=" + this.deleteFlag + '}'; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dto/AcsElevatorDeviceEditDTO.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dto/AcsElevatorDeviceEditDTO.java new file mode 100644 index 00000000..f31c5981 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dto/AcsElevatorDeviceEditDTO.java @@ -0,0 +1,77 @@ +package cn.cloudwalk.elevator.device.dto; + +import cn.cloudwalk.cloud.entity.CloudwalkBaseTimes; +import java.io.Serializable; + +public class AcsElevatorDeviceEditDTO extends CloudwalkBaseTimes implements Serializable { + private static final long serialVersionUID = 885170301572808321L; + private String elevatorFloorList; + private String currentFloorId; + private String currentFloor; + private String currentBuilding; + private String currentBuildingId; + private String areaId; + private String elevatorFloorIdList; + + public String getElevatorFloorIdList() { + return this.elevatorFloorIdList; + } + + public void setElevatorFloorIdList(String elevatorFloorIdList) { + this.elevatorFloorIdList = elevatorFloorIdList; + } + + public String getAreaId() { + return this.areaId; + } + + public void setAreaId(String areaId) { + this.areaId = areaId; + } + + public String getElevatorFloorList() { + return this.elevatorFloorList; + } + + public void setElevatorFloorList(String elevatorFloorList) { + this.elevatorFloorList = elevatorFloorList; + } + + public String getCurrentFloorId() { + return this.currentFloorId; + } + + public void setCurrentFloorId(String currentFloorId) { + this.currentFloorId = currentFloorId; + } + + public String getCurrentFloor() { + return this.currentFloor; + } + + public void setCurrentFloor(String currentFloor) { + this.currentFloor = currentFloor; + } + + public String getCurrentBuilding() { + return this.currentBuilding; + } + + public void setCurrentBuilding(String currentBuilding) { + this.currentBuilding = currentBuilding; + } + + public String getCurrentBuildingId() { + return this.currentBuildingId; + } + + public void setCurrentBuildingId(String currentBuildingId) { + this.currentBuildingId = currentBuildingId; + } + + public String toString() { + return "AcsElevatorDeciveEditDTO{elevatorFloorList='" + this.elevatorFloorList + '\'' + ", currentFloorId='" + + this.currentFloorId + '\'' + ", currentFloor='" + this.currentFloor + '\'' + ", currentBuilding='" + + this.currentBuilding + '\'' + ", currentBuildingId='" + this.currentBuildingId + '\'' + '}'; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dto/AcsElevatorDeviceListByBuildingIdDto.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dto/AcsElevatorDeviceListByBuildingIdDto.java new file mode 100644 index 00000000..cd02f327 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dto/AcsElevatorDeviceListByBuildingIdDto.java @@ -0,0 +1,58 @@ +package cn.cloudwalk.elevator.device.dto; + +import java.io.Serializable; + +public class AcsElevatorDeviceListByBuildingIdDto implements Serializable { + private String businessId; + private String currentBuildingId; + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public void setCurrentBuildingId(String currentBuildingId) { + this.currentBuildingId = currentBuildingId; + } + + public boolean equals(Object o) { + if (o == this) + return true; + if (!(o instanceof AcsElevatorDeviceListByBuildingIdDto)) + return false; + AcsElevatorDeviceListByBuildingIdDto other = (AcsElevatorDeviceListByBuildingIdDto)o; + if (!other.canEqual(this)) + return false; + Object this$businessId = getBusinessId(), other$businessId = other.getBusinessId(); + if ((this$businessId == null) ? (other$businessId != null) : !this$businessId.equals(other$businessId)) + return false; + Object this$currentBuildingId = getCurrentBuildingId(), other$currentBuildingId = other.getCurrentBuildingId(); + return !((this$currentBuildingId == null) ? (other$currentBuildingId != null) + : !this$currentBuildingId.equals(other$currentBuildingId)); + } + + protected boolean canEqual(Object other) { + return other instanceof AcsElevatorDeviceListByBuildingIdDto; + } + + public int hashCode() { + int PRIME = 59; + result = 1; + Object $businessId = getBusinessId(); + result = result * 59 + (($businessId == null) ? 43 : $businessId.hashCode()); + Object $currentBuildingId = getCurrentBuildingId(); + return result * 59 + (($currentBuildingId == null) ? 43 : $currentBuildingId.hashCode()); + } + + public String toString() { + return "AcsElevatorDeviceListByBuildingIdDto(businessId=" + getBusinessId() + ", currentBuildingId=" + + getCurrentBuildingId() + ")"; + } + + public String getBusinessId() { + return this.businessId; + } + + public String getCurrentBuildingId() { + return this.currentBuildingId; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dto/AcsElevatorDeviceListDto.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dto/AcsElevatorDeviceListDto.java new file mode 100644 index 00000000..0f23736a --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dto/AcsElevatorDeviceListDto.java @@ -0,0 +1,35 @@ +package cn.cloudwalk.elevator.device.dto; + +import cn.cloudwalk.cloud.entity.CloudwalkBaseTimes; +import java.io.Serializable; +import java.util.List; + +public class AcsElevatorDeviceListDto extends CloudwalkBaseTimes implements Serializable { + private String businessId; + private String currentFloorId; + private List currentFloorIds; + + public List getCurrentFloorIds() { + return this.currentFloorIds; + } + + public void setCurrentFloorIds(List currentFloorIds) { + this.currentFloorIds = currentFloorIds; + } + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getCurrentFloorId() { + return this.currentFloorId; + } + + public void setCurrentFloorId(String currentFloorId) { + this.currentFloorId = currentFloorId; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dto/AcsElevatorDeviceListResultDto.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dto/AcsElevatorDeviceListResultDto.java new file mode 100644 index 00000000..feaeb2a6 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dto/AcsElevatorDeviceListResultDto.java @@ -0,0 +1,208 @@ +package cn.cloudwalk.elevator.device.dto; + +import cn.cloudwalk.cloud.entity.CloudwalkBaseTimes; +import java.io.Serializable; + +public class AcsElevatorDeviceListResultDto extends CloudwalkBaseTimes implements Serializable { + private String businessId; + private String deviceId; + private String deviceCode; + private String deviceName; + private String deviceTypeName; + private String elevatorFloorList; + + public boolean equals(Object o) { + if (o == this) + return true; + if (!(o instanceof AcsElevatorDeviceListResultDto)) + return false; + AcsElevatorDeviceListResultDto other = (AcsElevatorDeviceListResultDto)o; + if (!other.canEqual(this)) + return false; + Object this$businessId = getBusinessId(), other$businessId = other.getBusinessId(); + if ((this$businessId == null) ? (other$businessId != null) : !this$businessId.equals(other$businessId)) + return false; + Object this$deviceId = getDeviceId(), other$deviceId = other.getDeviceId(); + if ((this$deviceId == null) ? (other$deviceId != null) : !this$deviceId.equals(other$deviceId)) + return false; + Object this$deviceCode = getDeviceCode(), other$deviceCode = other.getDeviceCode(); + if ((this$deviceCode == null) ? (other$deviceCode != null) : !this$deviceCode.equals(other$deviceCode)) + return false; + Object this$deviceName = getDeviceName(), other$deviceName = other.getDeviceName(); + if ((this$deviceName == null) ? (other$deviceName != null) : !this$deviceName.equals(other$deviceName)) + return false; + Object this$deviceTypeName = getDeviceTypeName(), other$deviceTypeName = other.getDeviceTypeName(); + if ((this$deviceTypeName == null) ? (other$deviceTypeName != null) + : !this$deviceTypeName.equals(other$deviceTypeName)) + return false; + Object this$elevatorFloorList = getElevatorFloorList(), other$elevatorFloorList = other.getElevatorFloorList(); + if ((this$elevatorFloorList == null) ? (other$elevatorFloorList != null) + : !this$elevatorFloorList.equals(other$elevatorFloorList)) + return false; + Object this$currentFloorId = getCurrentFloorId(), other$currentFloorId = other.getCurrentFloorId(); + if ((this$currentFloorId == null) ? (other$currentFloorId != null) + : !this$currentFloorId.equals(other$currentFloorId)) + return false; + Object this$currentFloor = getCurrentFloor(), other$currentFloor = other.getCurrentFloor(); + if ((this$currentFloor == null) ? (other$currentFloor != null) : !this$currentFloor.equals(other$currentFloor)) + return false; + Object this$currentBuilding = getCurrentBuilding(), other$currentBuilding = other.getCurrentBuilding(); + if ((this$currentBuilding == null) ? (other$currentBuilding != null) + : !this$currentBuilding.equals(other$currentBuilding)) + return false; + Object this$currentBuildingId = getCurrentBuildingId(), other$currentBuildingId = other.getCurrentBuildingId(); + if ((this$currentBuildingId == null) ? (other$currentBuildingId != null) + : !this$currentBuildingId.equals(other$currentBuildingId)) + return false; + Object this$areaName = getAreaName(), other$areaName = other.getAreaName(); + if ((this$areaName == null) ? (other$areaName != null) : !this$areaName.equals(other$areaName)) + return false; + Object this$status = getStatus(), other$status = other.getStatus(); + return !((this$status == null) ? (other$status != null) : !this$status.equals(other$status)); + } + + private String currentFloorId; + private String currentFloor; + private String currentBuilding; + private String currentBuildingId; + private String areaName; + private Integer status; + + protected boolean canEqual(Object other) { + return other instanceof AcsElevatorDeviceListResultDto; + } + + public int hashCode() { + int PRIME = 59; + result = 1; + Object $businessId = getBusinessId(); + result = result * 59 + (($businessId == null) ? 43 : $businessId.hashCode()); + Object $deviceId = getDeviceId(); + result = result * 59 + (($deviceId == null) ? 43 : $deviceId.hashCode()); + Object $deviceCode = getDeviceCode(); + result = result * 59 + (($deviceCode == null) ? 43 : $deviceCode.hashCode()); + Object $deviceName = getDeviceName(); + result = result * 59 + (($deviceName == null) ? 43 : $deviceName.hashCode()); + Object $deviceTypeName = getDeviceTypeName(); + result = result * 59 + (($deviceTypeName == null) ? 43 : $deviceTypeName.hashCode()); + Object $elevatorFloorList = getElevatorFloorList(); + result = result * 59 + (($elevatorFloorList == null) ? 43 : $elevatorFloorList.hashCode()); + Object $currentFloorId = getCurrentFloorId(); + result = result * 59 + (($currentFloorId == null) ? 43 : $currentFloorId.hashCode()); + Object $currentFloor = getCurrentFloor(); + result = result * 59 + (($currentFloor == null) ? 43 : $currentFloor.hashCode()); + Object $currentBuilding = getCurrentBuilding(); + result = result * 59 + (($currentBuilding == null) ? 43 : $currentBuilding.hashCode()); + Object $currentBuildingId = getCurrentBuildingId(); + result = result * 59 + (($currentBuildingId == null) ? 43 : $currentBuildingId.hashCode()); + Object $areaName = getAreaName(); + result = result * 59 + (($areaName == null) ? 43 : $areaName.hashCode()); + Object $status = getStatus(); + return result * 59 + (($status == null) ? 43 : $status.hashCode()); + } + + public String toString() { + return "AcsElevatorDeviceListResultDto(businessId=" + getBusinessId() + ", deviceId=" + getDeviceId() + + ", deviceCode=" + getDeviceCode() + ", deviceName=" + getDeviceName() + ", deviceTypeName=" + + getDeviceTypeName() + ", elevatorFloorList=" + getElevatorFloorList() + ", currentFloorId=" + + getCurrentFloorId() + ", currentFloor=" + getCurrentFloor() + ", currentBuilding=" + getCurrentBuilding() + + ", currentBuildingId=" + getCurrentBuildingId() + ", areaName=" + getAreaName() + ", status=" + + getStatus() + ")"; + } + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getDeviceId() { + return this.deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public String getDeviceCode() { + return this.deviceCode; + } + + public void setDeviceCode(String deviceCode) { + this.deviceCode = deviceCode; + } + + public String getDeviceName() { + return this.deviceName; + } + + public void setDeviceName(String deviceName) { + this.deviceName = deviceName; + } + + public String getDeviceTypeName() { + return this.deviceTypeName; + } + + public void setDeviceTypeName(String deviceTypeName) { + this.deviceTypeName = deviceTypeName; + } + + public String getElevatorFloorList() { + return this.elevatorFloorList; + } + + public void setElevatorFloorList(String elevatorFloorList) { + this.elevatorFloorList = elevatorFloorList; + } + + public String getCurrentFloorId() { + return this.currentFloorId; + } + + public void setCurrentFloorId(String currentFloorId) { + this.currentFloorId = currentFloorId; + } + + public String getCurrentFloor() { + return this.currentFloor; + } + + public void setCurrentFloor(String currentFloor) { + this.currentFloor = currentFloor; + } + + public String getCurrentBuilding() { + return this.currentBuilding; + } + + public void setCurrentBuilding(String currentBuilding) { + this.currentBuilding = currentBuilding; + } + + public String getCurrentBuildingId() { + return this.currentBuildingId; + } + + public void setCurrentBuildingId(String currentBuildingId) { + this.currentBuildingId = currentBuildingId; + } + + public String getAreaName() { + return this.areaName; + } + + public void setAreaName(String areaName) { + this.areaName = areaName; + } + + public Integer getStatus() { + return this.status; + } + + public void setStatus(Integer status) { + this.status = status; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dto/AcsElevatorDeviceQueryByIdDTO.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dto/AcsElevatorDeviceQueryByIdDTO.java new file mode 100644 index 00000000..fe3f7e4c --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dto/AcsElevatorDeviceQueryByIdDTO.java @@ -0,0 +1,16 @@ +package cn.cloudwalk.elevator.device.dto; + +import cn.cloudwalk.cloud.page.CloudwalkBasePageForm; +import java.io.Serializable; + +public class AcsElevatorDeviceQueryByIdDTO extends CloudwalkBasePageForm implements Serializable { + private String id; + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dto/AcsElevatorDeviceQueryDTO.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dto/AcsElevatorDeviceQueryDTO.java new file mode 100644 index 00000000..63b50dd5 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dto/AcsElevatorDeviceQueryDTO.java @@ -0,0 +1,99 @@ +package cn.cloudwalk.elevator.device.dto; + +import cn.cloudwalk.cloud.entity.CloudwalkBaseTimes; +import java.io.Serializable; +import java.util.List; + +public class AcsElevatorDeviceQueryDTO extends CloudwalkBaseTimes implements Serializable { + private static final long serialVersionUID = -761586737506722816L; + private String areaName; + private String deviceCode; + private String deviceName; + private String deviceTypeName; + private List areaIds; + private String deviceId; + private String businessId; + private String ip; + private Integer status; + private Integer onlineStatus; + + public String getIp() { + return this.ip; + } + + public void setIp(String ip) { + this.ip = ip; + } + + public Integer getStatus() { + return this.status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Integer getOnlineStatus() { + return this.onlineStatus; + } + + public void setOnlineStatus(Integer onlineStatus) { + this.onlineStatus = onlineStatus; + } + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getDeviceId() { + return this.deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public List getAreaIds() { + return this.areaIds; + } + + public void setAreaIds(List areaIds) { + this.areaIds = areaIds; + } + + public String getAreaName() { + return this.areaName; + } + + public void setAreaName(String areaName) { + this.areaName = areaName; + } + + public String getDeviceCode() { + return this.deviceCode; + } + + public void setDeviceCode(String deviceCode) { + this.deviceCode = deviceCode; + } + + public String getDeviceName() { + return this.deviceName; + } + + public void setDeviceName(String deviceName) { + this.deviceName = deviceName; + } + + public String getDeviceTypeName() { + return this.deviceTypeName; + } + + public void setDeviceTypeName(String deviceTypeName) { + this.deviceTypeName = deviceTypeName; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dto/AcsElevatorDeviceQueryFoDTO.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dto/AcsElevatorDeviceQueryFoDTO.java new file mode 100644 index 00000000..2aaa8eb4 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dto/AcsElevatorDeviceQueryFoDTO.java @@ -0,0 +1,235 @@ +package cn.cloudwalk.elevator.device.dto; + +public class AcsElevatorDeviceQueryFoDTO { + private String id; + private String businessId; + private String deviceId; + private String deviceCode; + private String deviceName; + private String deviceTypeName; + private String elevatorFloorList; + + public void setId(String id) { + this.id = id; + } + + private String currentFloorId; + private String currentFloor; + private String currentBuilding; + private String currentBuildingId; + private String areaName; + private String areaId; + private String elevatorFloorIdList; + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public void setDeviceCode(String deviceCode) { + this.deviceCode = deviceCode; + } + + public void setDeviceName(String deviceName) { + this.deviceName = deviceName; + } + + public void setDeviceTypeName(String deviceTypeName) { + this.deviceTypeName = deviceTypeName; + } + + public void setElevatorFloorList(String elevatorFloorList) { + this.elevatorFloorList = elevatorFloorList; + } + + public void setCurrentFloorId(String currentFloorId) { + this.currentFloorId = currentFloorId; + } + + public void setCurrentFloor(String currentFloor) { + this.currentFloor = currentFloor; + } + + public void setCurrentBuilding(String currentBuilding) { + this.currentBuilding = currentBuilding; + } + + public void setCurrentBuildingId(String currentBuildingId) { + this.currentBuildingId = currentBuildingId; + } + + public void setAreaName(String areaName) { + this.areaName = areaName; + } + + public void setAreaId(String areaId) { + this.areaId = areaId; + } + + public void setElevatorFloorIdList(String elevatorFloorIdList) { + this.elevatorFloorIdList = elevatorFloorIdList; + } + + public boolean equals(Object o) { + if (o == this) + return true; + if (!(o instanceof AcsElevatorDeviceQueryFoDTO)) + return false; + AcsElevatorDeviceQueryFoDTO other = (AcsElevatorDeviceQueryFoDTO)o; + if (!other.canEqual(this)) + return false; + Object this$id = getId(), other$id = other.getId(); + if ((this$id == null) ? (other$id != null) : !this$id.equals(other$id)) + return false; + Object this$businessId = getBusinessId(), other$businessId = other.getBusinessId(); + if ((this$businessId == null) ? (other$businessId != null) : !this$businessId.equals(other$businessId)) + return false; + Object this$deviceId = getDeviceId(), other$deviceId = other.getDeviceId(); + if ((this$deviceId == null) ? (other$deviceId != null) : !this$deviceId.equals(other$deviceId)) + return false; + Object this$deviceCode = getDeviceCode(), other$deviceCode = other.getDeviceCode(); + if ((this$deviceCode == null) ? (other$deviceCode != null) : !this$deviceCode.equals(other$deviceCode)) + return false; + Object this$deviceName = getDeviceName(), other$deviceName = other.getDeviceName(); + if ((this$deviceName == null) ? (other$deviceName != null) : !this$deviceName.equals(other$deviceName)) + return false; + Object this$deviceTypeName = getDeviceTypeName(), other$deviceTypeName = other.getDeviceTypeName(); + if ((this$deviceTypeName == null) ? (other$deviceTypeName != null) + : !this$deviceTypeName.equals(other$deviceTypeName)) + return false; + Object this$elevatorFloorList = getElevatorFloorList(), other$elevatorFloorList = other.getElevatorFloorList(); + if ((this$elevatorFloorList == null) ? (other$elevatorFloorList != null) + : !this$elevatorFloorList.equals(other$elevatorFloorList)) + return false; + Object this$currentFloorId = getCurrentFloorId(), other$currentFloorId = other.getCurrentFloorId(); + if ((this$currentFloorId == null) ? (other$currentFloorId != null) + : !this$currentFloorId.equals(other$currentFloorId)) + return false; + Object this$currentFloor = getCurrentFloor(), other$currentFloor = other.getCurrentFloor(); + if ((this$currentFloor == null) ? (other$currentFloor != null) : !this$currentFloor.equals(other$currentFloor)) + return false; + Object this$currentBuilding = getCurrentBuilding(), other$currentBuilding = other.getCurrentBuilding(); + if ((this$currentBuilding == null) ? (other$currentBuilding != null) + : !this$currentBuilding.equals(other$currentBuilding)) + return false; + Object this$currentBuildingId = getCurrentBuildingId(), other$currentBuildingId = other.getCurrentBuildingId(); + if ((this$currentBuildingId == null) ? (other$currentBuildingId != null) + : !this$currentBuildingId.equals(other$currentBuildingId)) + return false; + Object this$areaName = getAreaName(), other$areaName = other.getAreaName(); + if ((this$areaName == null) ? (other$areaName != null) : !this$areaName.equals(other$areaName)) + return false; + Object this$areaId = getAreaId(), other$areaId = other.getAreaId(); + if ((this$areaId == null) ? (other$areaId != null) : !this$areaId.equals(other$areaId)) + return false; + Object this$elevatorFloorIdList = getElevatorFloorIdList(), + other$elevatorFloorIdList = other.getElevatorFloorIdList(); + return !((this$elevatorFloorIdList == null) ? (other$elevatorFloorIdList != null) + : !this$elevatorFloorIdList.equals(other$elevatorFloorIdList)); + } + + protected boolean canEqual(Object other) { + return other instanceof AcsElevatorDeviceQueryFoDTO; + } + + public int hashCode() { + int PRIME = 59; + result = 1; + Object $id = getId(); + result = result * 59 + (($id == null) ? 43 : $id.hashCode()); + Object $businessId = getBusinessId(); + result = result * 59 + (($businessId == null) ? 43 : $businessId.hashCode()); + Object $deviceId = getDeviceId(); + result = result * 59 + (($deviceId == null) ? 43 : $deviceId.hashCode()); + Object $deviceCode = getDeviceCode(); + result = result * 59 + (($deviceCode == null) ? 43 : $deviceCode.hashCode()); + Object $deviceName = getDeviceName(); + result = result * 59 + (($deviceName == null) ? 43 : $deviceName.hashCode()); + Object $deviceTypeName = getDeviceTypeName(); + result = result * 59 + (($deviceTypeName == null) ? 43 : $deviceTypeName.hashCode()); + Object $elevatorFloorList = getElevatorFloorList(); + result = result * 59 + (($elevatorFloorList == null) ? 43 : $elevatorFloorList.hashCode()); + Object $currentFloorId = getCurrentFloorId(); + result = result * 59 + (($currentFloorId == null) ? 43 : $currentFloorId.hashCode()); + Object $currentFloor = getCurrentFloor(); + result = result * 59 + (($currentFloor == null) ? 43 : $currentFloor.hashCode()); + Object $currentBuilding = getCurrentBuilding(); + result = result * 59 + (($currentBuilding == null) ? 43 : $currentBuilding.hashCode()); + Object $currentBuildingId = getCurrentBuildingId(); + result = result * 59 + (($currentBuildingId == null) ? 43 : $currentBuildingId.hashCode()); + Object $areaName = getAreaName(); + result = result * 59 + (($areaName == null) ? 43 : $areaName.hashCode()); + Object $areaId = getAreaId(); + result = result * 59 + (($areaId == null) ? 43 : $areaId.hashCode()); + Object $elevatorFloorIdList = getElevatorFloorIdList(); + return result * 59 + (($elevatorFloorIdList == null) ? 43 : $elevatorFloorIdList.hashCode()); + } + + public String toString() { + return "AcsElevatorDeviceQueryFoDTO(id=" + getId() + ", businessId=" + getBusinessId() + ", deviceId=" + + getDeviceId() + ", deviceCode=" + getDeviceCode() + ", deviceName=" + getDeviceName() + + ", deviceTypeName=" + getDeviceTypeName() + ", elevatorFloorList=" + getElevatorFloorList() + + ", currentFloorId=" + getCurrentFloorId() + ", currentFloor=" + getCurrentFloor() + ", currentBuilding=" + + getCurrentBuilding() + ", currentBuildingId=" + getCurrentBuildingId() + ", areaName=" + getAreaName() + + ", areaId=" + getAreaId() + ", elevatorFloorIdList=" + getElevatorFloorIdList() + ")"; + } + + public String getId() { + return this.id; + } + + public String getBusinessId() { + return this.businessId; + } + + public String getDeviceId() { + return this.deviceId; + } + + public String getDeviceCode() { + return this.deviceCode; + } + + public String getDeviceName() { + return this.deviceName; + } + + public String getDeviceTypeName() { + return this.deviceTypeName; + } + + public String getElevatorFloorList() { + return this.elevatorFloorList; + } + + public String getCurrentFloorId() { + return this.currentFloorId; + } + + public String getCurrentFloor() { + return this.currentFloor; + } + + public String getCurrentBuilding() { + return this.currentBuilding; + } + + public String getCurrentBuildingId() { + return this.currentBuildingId; + } + + public String getAreaName() { + return this.areaName; + } + + public String getAreaId() { + return this.areaId; + } + + public String getElevatorFloorIdList() { + return this.elevatorFloorIdList; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dto/AcsElevatorDeviceQueryResultDTO.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dto/AcsElevatorDeviceQueryResultDTO.java new file mode 100644 index 00000000..0a970462 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dto/AcsElevatorDeviceQueryResultDTO.java @@ -0,0 +1,30 @@ +package cn.cloudwalk.elevator.device.dto; + +import cn.cloudwalk.cloud.entity.CloudwalkBaseTimes; +import java.io.Serializable; + +public class AcsElevatorDeviceQueryResultDTO extends CloudwalkBaseTimes implements Serializable { + private static final long serialVersionUID = -761586737506722816L; + + private String businessId; + + private String deviceId; + + private String deviceCode; + + private String deviceName; + + private String deviceTypeName; + + private String elevatorFloorList; + + private String currentFloorId; + + private String currentFloor; + + private String currentBuilding; + + private String currentBuildingId; + + private Integer status; +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dto/AcsElevatorDeviceResultDTO.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dto/AcsElevatorDeviceResultDTO.java new file mode 100644 index 00000000..f4abc45e --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/dto/AcsElevatorDeviceResultDTO.java @@ -0,0 +1,323 @@ +package cn.cloudwalk.elevator.device.dto; + +public class AcsElevatorDeviceResultDTO { + private String id; + private String businessId; + private String deviceId; + private String deviceCode; + private String deviceName; + private String deviceTypeName; + private String elevatorFloorList; + private String currentFloorId; + private String currentFloor; + private String currentBuilding; + + public void setId(String id) { + this.id = id; + } + + private String currentBuildingId; + private String areaName; + private String areaId; + private Integer status; + private String statusString; + private String elevatorFloorIdList; + private Long lastHeartbeatTime; + private String imageStoreId; + private String ip; + private Integer onlineStatus; + + public void setIp(String ip) { + this.ip = ip; + } + + public boolean equals(Object o) { + if (o == this) + return true; + if (!(o instanceof AcsElevatorDeviceResultDTO)) + return false; + AcsElevatorDeviceResultDTO other = (AcsElevatorDeviceResultDTO)o; + if (!other.canEqual(this)) + return false; + Object this$id = getId(), other$id = other.getId(); + if ((this$id == null) ? (other$id != null) : !this$id.equals(other$id)) + return false; + Object this$businessId = getBusinessId(), other$businessId = other.getBusinessId(); + if ((this$businessId == null) ? (other$businessId != null) : !this$businessId.equals(other$businessId)) + return false; + Object this$deviceId = getDeviceId(), other$deviceId = other.getDeviceId(); + if ((this$deviceId == null) ? (other$deviceId != null) : !this$deviceId.equals(other$deviceId)) + return false; + Object this$deviceCode = getDeviceCode(), other$deviceCode = other.getDeviceCode(); + if ((this$deviceCode == null) ? (other$deviceCode != null) : !this$deviceCode.equals(other$deviceCode)) + return false; + Object this$deviceName = getDeviceName(), other$deviceName = other.getDeviceName(); + if ((this$deviceName == null) ? (other$deviceName != null) : !this$deviceName.equals(other$deviceName)) + return false; + Object this$deviceTypeName = getDeviceTypeName(), other$deviceTypeName = other.getDeviceTypeName(); + if ((this$deviceTypeName == null) ? (other$deviceTypeName != null) + : !this$deviceTypeName.equals(other$deviceTypeName)) + return false; + Object this$elevatorFloorList = getElevatorFloorList(), other$elevatorFloorList = other.getElevatorFloorList(); + if ((this$elevatorFloorList == null) ? (other$elevatorFloorList != null) + : !this$elevatorFloorList.equals(other$elevatorFloorList)) + return false; + Object this$currentFloorId = getCurrentFloorId(), other$currentFloorId = other.getCurrentFloorId(); + if ((this$currentFloorId == null) ? (other$currentFloorId != null) + : !this$currentFloorId.equals(other$currentFloorId)) + return false; + Object this$currentFloor = getCurrentFloor(), other$currentFloor = other.getCurrentFloor(); + if ((this$currentFloor == null) ? (other$currentFloor != null) : !this$currentFloor.equals(other$currentFloor)) + return false; + Object this$currentBuilding = getCurrentBuilding(), other$currentBuilding = other.getCurrentBuilding(); + if ((this$currentBuilding == null) ? (other$currentBuilding != null) + : !this$currentBuilding.equals(other$currentBuilding)) + return false; + Object this$currentBuildingId = getCurrentBuildingId(), other$currentBuildingId = other.getCurrentBuildingId(); + if ((this$currentBuildingId == null) ? (other$currentBuildingId != null) + : !this$currentBuildingId.equals(other$currentBuildingId)) + return false; + Object this$areaName = getAreaName(), other$areaName = other.getAreaName(); + if ((this$areaName == null) ? (other$areaName != null) : !this$areaName.equals(other$areaName)) + return false; + Object this$areaId = getAreaId(), other$areaId = other.getAreaId(); + if ((this$areaId == null) ? (other$areaId != null) : !this$areaId.equals(other$areaId)) + return false; + Object this$status = getStatus(), other$status = other.getStatus(); + if ((this$status == null) ? (other$status != null) : !this$status.equals(other$status)) + return false; + Object this$statusString = getStatusString(), other$statusString = other.getStatusString(); + if ((this$statusString == null) ? (other$statusString != null) : !this$statusString.equals(other$statusString)) + return false; + Object this$elevatorFloorIdList = getElevatorFloorIdList(), + other$elevatorFloorIdList = other.getElevatorFloorIdList(); + if ((this$elevatorFloorIdList == null) ? (other$elevatorFloorIdList != null) + : !this$elevatorFloorIdList.equals(other$elevatorFloorIdList)) + return false; + Object this$lastHeartbeatTime = getLastHeartbeatTime(), other$lastHeartbeatTime = other.getLastHeartbeatTime(); + if ((this$lastHeartbeatTime == null) ? (other$lastHeartbeatTime != null) + : !this$lastHeartbeatTime.equals(other$lastHeartbeatTime)) + return false; + Object this$imageStoreId = getImageStoreId(), other$imageStoreId = other.getImageStoreId(); + if ((this$imageStoreId == null) ? (other$imageStoreId != null) : !this$imageStoreId.equals(other$imageStoreId)) + return false; + Object this$ip = getIp(), other$ip = other.getIp(); + if ((this$ip == null) ? (other$ip != null) : !this$ip.equals(other$ip)) + return false; + Object this$onlineStatus = getOnlineStatus(), other$onlineStatus = other.getOnlineStatus(); + return !((this$onlineStatus == null) ? (other$onlineStatus != null) + : !this$onlineStatus.equals(other$onlineStatus)); + } + + protected boolean canEqual(Object other) { + return other instanceof AcsElevatorDeviceResultDTO; + } + + public int hashCode() { + int PRIME = 59; + result = 1; + Object $id = getId(); + result = result * 59 + (($id == null) ? 43 : $id.hashCode()); + Object $businessId = getBusinessId(); + result = result * 59 + (($businessId == null) ? 43 : $businessId.hashCode()); + Object $deviceId = getDeviceId(); + result = result * 59 + (($deviceId == null) ? 43 : $deviceId.hashCode()); + Object $deviceCode = getDeviceCode(); + result = result * 59 + (($deviceCode == null) ? 43 : $deviceCode.hashCode()); + Object $deviceName = getDeviceName(); + result = result * 59 + (($deviceName == null) ? 43 : $deviceName.hashCode()); + Object $deviceTypeName = getDeviceTypeName(); + result = result * 59 + (($deviceTypeName == null) ? 43 : $deviceTypeName.hashCode()); + Object $elevatorFloorList = getElevatorFloorList(); + result = result * 59 + (($elevatorFloorList == null) ? 43 : $elevatorFloorList.hashCode()); + Object $currentFloorId = getCurrentFloorId(); + result = result * 59 + (($currentFloorId == null) ? 43 : $currentFloorId.hashCode()); + Object $currentFloor = getCurrentFloor(); + result = result * 59 + (($currentFloor == null) ? 43 : $currentFloor.hashCode()); + Object $currentBuilding = getCurrentBuilding(); + result = result * 59 + (($currentBuilding == null) ? 43 : $currentBuilding.hashCode()); + Object $currentBuildingId = getCurrentBuildingId(); + result = result * 59 + (($currentBuildingId == null) ? 43 : $currentBuildingId.hashCode()); + Object $areaName = getAreaName(); + result = result * 59 + (($areaName == null) ? 43 : $areaName.hashCode()); + Object $areaId = getAreaId(); + result = result * 59 + (($areaId == null) ? 43 : $areaId.hashCode()); + Object $status = getStatus(); + result = result * 59 + (($status == null) ? 43 : $status.hashCode()); + Object $statusString = getStatusString(); + result = result * 59 + (($statusString == null) ? 43 : $statusString.hashCode()); + Object $elevatorFloorIdList = getElevatorFloorIdList(); + result = result * 59 + (($elevatorFloorIdList == null) ? 43 : $elevatorFloorIdList.hashCode()); + Object $lastHeartbeatTime = getLastHeartbeatTime(); + result = result * 59 + (($lastHeartbeatTime == null) ? 43 : $lastHeartbeatTime.hashCode()); + Object $imageStoreId = getImageStoreId(); + result = result * 59 + (($imageStoreId == null) ? 43 : $imageStoreId.hashCode()); + Object $ip = getIp(); + result = result * 59 + (($ip == null) ? 43 : $ip.hashCode()); + Object $onlineStatus = getOnlineStatus(); + return result * 59 + (($onlineStatus == null) ? 43 : $onlineStatus.hashCode()); + } + + public String toString() { + return "AcsElevatorDeviceResultDTO(id=" + getId() + ", businessId=" + getBusinessId() + ", deviceId=" + + getDeviceId() + ", deviceCode=" + getDeviceCode() + ", deviceName=" + getDeviceName() + + ", deviceTypeName=" + getDeviceTypeName() + ", elevatorFloorList=" + getElevatorFloorList() + + ", currentFloorId=" + getCurrentFloorId() + ", currentFloor=" + getCurrentFloor() + ", currentBuilding=" + + getCurrentBuilding() + ", currentBuildingId=" + getCurrentBuildingId() + ", areaName=" + getAreaName() + + ", areaId=" + getAreaId() + ", status=" + getStatus() + ", statusString=" + getStatusString() + + ", elevatorFloorIdList=" + getElevatorFloorIdList() + ", lastHeartbeatTime=" + getLastHeartbeatTime() + + ", imageStoreId=" + getImageStoreId() + ", ip=" + getIp() + ", onlineStatus=" + getOnlineStatus() + ")"; + } + + public String getId() { + return this.id; + } + + public String getIp() { + return this.ip; + } + + public String getElevatorFloorIdList() { + return this.elevatorFloorIdList; + } + + public void setElevatorFloorIdList(String elevatorFloorIdList) { + this.elevatorFloorIdList = elevatorFloorIdList; + } + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getDeviceId() { + return this.deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public String getDeviceCode() { + return this.deviceCode; + } + + public void setDeviceCode(String deviceCode) { + this.deviceCode = deviceCode; + } + + public String getDeviceName() { + return this.deviceName; + } + + public void setDeviceName(String deviceName) { + this.deviceName = deviceName; + } + + public String getDeviceTypeName() { + return this.deviceTypeName; + } + + public void setDeviceTypeName(String deviceTypeName) { + this.deviceTypeName = deviceTypeName; + } + + public String getElevatorFloorList() { + return this.elevatorFloorList; + } + + public void setElevatorFloorList(String elevatorFloorList) { + this.elevatorFloorList = elevatorFloorList; + } + + public String getCurrentFloorId() { + return this.currentFloorId; + } + + public void setCurrentFloorId(String currentFloorId) { + this.currentFloorId = currentFloorId; + } + + public String getCurrentFloor() { + return this.currentFloor; + } + + public void setCurrentFloor(String currentFloor) { + this.currentFloor = currentFloor; + } + + public String getCurrentBuilding() { + return this.currentBuilding; + } + + public void setCurrentBuilding(String currentBuilding) { + this.currentBuilding = currentBuilding; + } + + public String getCurrentBuildingId() { + return this.currentBuildingId; + } + + public void setCurrentBuildingId(String currentBuildingId) { + this.currentBuildingId = currentBuildingId; + } + + public String getAreaName() { + return this.areaName; + } + + public void setAreaName(String areaName) { + this.areaName = areaName; + } + + public Integer getStatus() { + return this.status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Long getLastHeartbeatTime() { + return this.lastHeartbeatTime; + } + + public void setLastHeartbeatTime(Long lastHeartbeatTime) { + this.lastHeartbeatTime = lastHeartbeatTime; + } + + public String getAreaId() { + return this.areaId; + } + + public void setAreaId(String areaId) { + this.areaId = areaId; + } + + public String getStatusString() { + return this.statusString; + } + + public void setStatusString(String statusString) { + this.statusString = statusString; + } + + public String getImageStoreId() { + return this.imageStoreId; + } + + public void setImageStoreId(String imageStoreId) { + this.imageStoreId = imageStoreId; + } + + public Integer getOnlineStatus() { + return this.onlineStatus; + } + + public void setOnlineStatus(Integer onlineStatus) { + this.onlineStatus = onlineStatus; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/impl/AcsDeviceTaskDaoImpl.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/impl/AcsDeviceTaskDaoImpl.java new file mode 100644 index 00000000..8f8bb6ab --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/impl/AcsDeviceTaskDaoImpl.java @@ -0,0 +1,30 @@ +package cn.cloudwalk.elevator.device.impl; + +import cn.cloudwalk.elevator.device.dao.AcsDeviceTaskDao; +import cn.cloudwalk.elevator.device.dto.AcsDeviceTaskAddDto; +import cn.cloudwalk.elevator.device.dto.AcsDeviceTaskDTO; +import cn.cloudwalk.elevator.device.mapper.AcsDeviceTaskMapper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Repository; + +@Repository +public class AcsDeviceTaskDaoImpl implements AcsDeviceTaskDao { + @Autowired + private AcsDeviceTaskMapper acsDeviceTaskMapper; + + public Integer insert(AcsDeviceTaskAddDto dto) { + return this.acsDeviceTaskMapper.insert(dto); + } + + public Integer updateBingDevices(AcsDeviceTaskAddDto dto) { + return this.acsDeviceTaskMapper.updateBingDevices(dto); + } + + public Integer updateIsStop(AcsDeviceTaskAddDto dto) { + return this.acsDeviceTaskMapper.updateIsStop(dto); + } + + public AcsDeviceTaskDTO getById(String taskId) { + return this.acsDeviceTaskMapper.getById(taskId); + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/impl/AcsElevatorDeviceDaoImpl.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/impl/AcsElevatorDeviceDaoImpl.java new file mode 100644 index 00000000..407c6ca3 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/impl/AcsElevatorDeviceDaoImpl.java @@ -0,0 +1,121 @@ +package cn.cloudwalk.elevator.device.impl; + +import cn.cloudwalk.cloud.exception.DataAccessException; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.page.CloudwalkPageInfo; +import cn.cloudwalk.cloud.utils.BeanCopyUtils; +import cn.cloudwalk.elevator.device.dao.AcsElevatorDeviceDao; +import cn.cloudwalk.elevator.device.dto.AcsElevatorDeviceAddDTO; +import cn.cloudwalk.elevator.device.dto.AcsElevatorDeviceEditDTO; +import cn.cloudwalk.elevator.device.dto.AcsElevatorDeviceListByBuildingIdDto; +import cn.cloudwalk.elevator.device.dto.AcsElevatorDeviceListDto; +import cn.cloudwalk.elevator.device.dto.AcsElevatorDeviceQueryByIdDTO; +import cn.cloudwalk.elevator.device.dto.AcsElevatorDeviceQueryDTO; +import cn.cloudwalk.elevator.device.dto.AcsElevatorDeviceResultDTO; +import cn.cloudwalk.elevator.device.mapper.AcsElevatorDeviceMapper; +import com.github.pagehelper.Page; +import com.github.pagehelper.PageHelper; +import java.util.List; +import javax.annotation.Resource; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Repository; + +@Repository +public class AcsElevatorDeviceDaoImpl implements AcsElevatorDeviceDao { + @Resource + private AcsElevatorDeviceMapper acsElevatorDeviceMapper; + protected final Logger logger = LoggerFactory.getLogger(getClass()); + + public Integer add(AcsElevatorDeviceAddDTO dto) throws DataAccessException { + try { + return Integer.valueOf(this.acsElevatorDeviceMapper.add(dto)); + } catch (Exception e) { + this.logger.error("保存派梯设备信息失败,原因:", e); + throw new DataAccessException(e); + } + } + + public Integer edit(AcsElevatorDeviceEditDTO dto) throws DataAccessException { + try { + return Integer.valueOf(this.acsElevatorDeviceMapper.edit(dto)); + } catch (Exception e) { + this.logger.error("保存派梯设备信息失败,原因:", e); + throw new DataAccessException(e); + } + } + + public Integer delete(List ids) throws DataAccessException { + try { + return Integer.valueOf(this.acsElevatorDeviceMapper.delete(ids)); + } catch (Exception e) { + this.logger.error("删除派梯设备信息失败,原因:", e); + throw new DataAccessException(e); + } + } + + public CloudwalkPageAble page(AcsElevatorDeviceQueryDTO dto, CloudwalkPageInfo page) + throws DataAccessException { + try { + PageHelper.startPage(page.getCurrentPage(), page.getPageSize()); + Page result = + (Page)this.acsElevatorDeviceMapper.page(dto); + return new CloudwalkPageAble(BeanCopyUtils.copy(result.getResult(), AcsElevatorDeviceResultDTO.class), page, + result.getTotal()); + } catch (Exception e) { + this.logger.error("设备分页查询失败,原因:", e); + throw new DataAccessException(e); + } + } + + public List listByZoneId(AcsElevatorDeviceListDto dto) throws DataAccessException { + try { + return this.acsElevatorDeviceMapper.listByZoneId(dto); + } catch (Exception e) { + this.logger.error("根据楼层id获取设备信息失败,原因:", e); + throw new DataAccessException(e); + } + } + + public List listByZoneIds(AcsElevatorDeviceListDto dto) throws DataAccessException { + try { + return this.acsElevatorDeviceMapper.listByZoneIds(dto); + } catch (Exception e) { + this.logger.error("根据楼层id集合获取设备信息失败,原因:", e); + throw new DataAccessException(e); + } + } + + public List listBuBuildingId(AcsElevatorDeviceListByBuildingIdDto dto) + throws DataAccessException { + try { + return this.acsElevatorDeviceMapper.listBuBuildingId(dto); + } catch (Exception e) { + this.logger.error("根据楼栋id获取设备信息失败,原因:", e); + throw new DataAccessException(e); + } + } + + public List get(AcsElevatorDeviceQueryDTO dto) throws ServiceException { + return this.acsElevatorDeviceMapper.get(dto); + } + + public AcsElevatorDeviceResultDTO getById(AcsElevatorDeviceQueryByIdDTO dto) throws ServiceException { + return this.acsElevatorDeviceMapper.getById(dto); + } + + public AcsElevatorDeviceResultDTO getByDeciveCode(String deviceCode) throws ServiceException { + AcsElevatorDeviceQueryDTO dto = new AcsElevatorDeviceQueryDTO(); + dto.setDeviceCode(deviceCode); + return this.acsElevatorDeviceMapper.getByDeciveCode(dto); + } + + public String getBuildingId(AcsElevatorDeviceQueryDTO dto) throws ServiceException { + return this.acsElevatorDeviceMapper.getBuildingId(dto); + } + + public String getBusinessId(AcsElevatorDeviceQueryDTO dto) throws ServiceException { + return this.acsElevatorDeviceMapper.getBusinessId(dto); + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/impl/DeviceImageStoreDaoImpl.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/impl/DeviceImageStoreDaoImpl.java new file mode 100644 index 00000000..93b8172e --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/impl/DeviceImageStoreDaoImpl.java @@ -0,0 +1,21 @@ +package cn.cloudwalk.elevator.device.impl; + +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.elevator.device.dao.DeviceImageStoreDao; +import cn.cloudwalk.elevator.device.mapper.DeviceImageStoreMapper; +import javax.annotation.Resource; +import org.springframework.stereotype.Repository; + +@Repository +public class DeviceImageStoreDaoImpl implements DeviceImageStoreDao { + @Resource + private DeviceImageStoreMapper deviceImageStoreMapper; + + public Boolean save(String buildingId, String imageStoreId) throws ServiceException { + return this.deviceImageStoreMapper.save(buildingId, imageStoreId); + } + + public String getByBuildingId(String buildingId) throws ServiceException { + return this.deviceImageStoreMapper.getByBuildingId(buildingId); + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/mapper/AcsDeviceTaskMapper.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/mapper/AcsDeviceTaskMapper.java new file mode 100644 index 00000000..04ad871f --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/mapper/AcsDeviceTaskMapper.java @@ -0,0 +1,14 @@ +package cn.cloudwalk.elevator.device.mapper; + +import cn.cloudwalk.elevator.device.dto.AcsDeviceTaskAddDto; +import cn.cloudwalk.elevator.device.dto.AcsDeviceTaskDTO; + +public interface AcsDeviceTaskMapper { + Integer insert(AcsDeviceTaskAddDto paramAcsDeviceTaskAddDto); + + Integer updateBingDevices(AcsDeviceTaskAddDto paramAcsDeviceTaskAddDto); + + Integer updateIsStop(AcsDeviceTaskAddDto paramAcsDeviceTaskAddDto); + + AcsDeviceTaskDTO getById(String paramString); +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/mapper/AcsDeviceTaskMapper.xml b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/mapper/AcsDeviceTaskMapper.xml new file mode 100644 index 00000000..988b9c05 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/mapper/AcsDeviceTaskMapper.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + insert into it_acs_device_task (ID, ALL_DEVICES, BIND_DEVICES, IS_STOP) + values (#{id,jdbcType=VARCHAR}, #{allDevices,jdbcType=TINYINT}, #{bindDevices,jdbcType=TINYINT}, #{isStop,jdbcType=TINYINT}) + + + + update it_acs_device_task + + BIND_DEVICES = #{bindDevices,jdbcType=TINYINT}, + + + + and ID = #{id,jdbcType=VARCHAR} + + + + + + update it_acs_device_task + + IS_STOP = #{isStop,jdbcType=TINYINT}, + + + + and ID = #{id,jdbcType=VARCHAR} + + + + + + + diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/mapper/AcsElevatorDeviceMapper.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/mapper/AcsElevatorDeviceMapper.java new file mode 100644 index 00000000..7bb4c313 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/mapper/AcsElevatorDeviceMapper.java @@ -0,0 +1,37 @@ +package cn.cloudwalk.elevator.device.mapper; + +import cn.cloudwalk.elevator.device.dto.AcsElevatorDeviceAddDTO; +import cn.cloudwalk.elevator.device.dto.AcsElevatorDeviceEditDTO; +import cn.cloudwalk.elevator.device.dto.AcsElevatorDeviceListByBuildingIdDto; +import cn.cloudwalk.elevator.device.dto.AcsElevatorDeviceListDto; +import cn.cloudwalk.elevator.device.dto.AcsElevatorDeviceQueryByIdDTO; +import cn.cloudwalk.elevator.device.dto.AcsElevatorDeviceQueryDTO; +import cn.cloudwalk.elevator.device.dto.AcsElevatorDeviceResultDTO; +import java.util.List; + +public interface AcsElevatorDeviceMapper { + int add(AcsElevatorDeviceAddDTO paramAcsElevatorDeviceAddDTO); + + int edit(AcsElevatorDeviceEditDTO paramAcsElevatorDeviceEditDTO); + + int delete(List paramList); + + List listByZoneId(AcsElevatorDeviceListDto paramAcsElevatorDeviceListDto); + + List listByZoneIds(AcsElevatorDeviceListDto paramAcsElevatorDeviceListDto); + + List page(AcsElevatorDeviceQueryDTO paramAcsElevatorDeviceQueryDTO); + + List + listBuBuildingId(AcsElevatorDeviceListByBuildingIdDto paramAcsElevatorDeviceListByBuildingIdDto); + + List get(AcsElevatorDeviceQueryDTO paramAcsElevatorDeviceQueryDTO); + + AcsElevatorDeviceResultDTO getById(AcsElevatorDeviceQueryByIdDTO paramAcsElevatorDeviceQueryByIdDTO); + + AcsElevatorDeviceResultDTO getByDeciveCode(AcsElevatorDeviceQueryDTO paramAcsElevatorDeviceQueryDTO); + + String getBuildingId(AcsElevatorDeviceQueryDTO paramAcsElevatorDeviceQueryDTO); + + String getBusinessId(AcsElevatorDeviceQueryDTO paramAcsElevatorDeviceQueryDTO); +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/mapper/AcsElevatorDeviceMapper.xml b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/mapper/AcsElevatorDeviceMapper.xml new file mode 100644 index 00000000..bddbbdae --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/mapper/AcsElevatorDeviceMapper.xml @@ -0,0 +1,273 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + insert into elevator_device (ID, create_time, last_update_time, delete_flag, + device_id, device_name, device_code, device_type_name, + area_name, current_building_id, current_building, current_floor_id, + current_floor, elevator_floor_list, business_id, area_id,elevator_floor_id_list) + values ( + #{id,jdbcType=VARCHAR}, + #{createTime,jdbcType=BIGINT}, + #{lastUpdateTime,jdbcType=BIGINT}, + #{deleteFlag,jdbcType=TINYINT}, + #{deviceId,jdbcType=VARCHAR}, + #{deviceName,jdbcType=VARCHAR}, + #{deviceCode,jdbcType=VARCHAR}, + #{deviceTypeName,jdbcType=VARCHAR}, + #{areaName,jdbcType=VARCHAR}, + #{currentBuildingId,jdbcType=VARCHAR}, + #{currentBuilding,jdbcType=VARCHAR}, + #{currentFloorId,jdbcType=VARCHAR}, + #{currentFloor,jdbcType=VARCHAR}, + #{elevatorFloorList,jdbcType=VARCHAR}, + #{businessId,jdbcType=VARCHAR}, + #{areaId,jdbcType=VARCHAR}, + #{elevatorFloorIdList,jdbcType=VARCHAR} + ) + + + + update elevator_device + + + last_update_time = #{lastUpdateTime, jdbcType=BIGINT}, + + + + elevator_floor_list = #{elevatorFloorList, jdbcType=VARCHAR}, + + + current_floor_id = #{currentFloorId, jdbcType=VARCHAR}, + + + current_floor = #{currentFloor, jdbcType=VARCHAR}, + + + current_building = #{currentBuilding, jdbcType=VARCHAR}, + + + current_building_id = #{currentBuildingId, jdbcType=VARCHAR}, + + + area_id = #{areaId,jdbcType=VARCHAR}, + + + elevator_floor_id_list = #{elevatorFloorIdList,jdbcType=VARCHAR}, + + + + ID = #{id, jdbcType=VARCHAR} + + + + + + delete from elevator_device + where ID in + + #{id} + + + + + + + + + + diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/mapper/DeviceImageStoreMapper.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/mapper/DeviceImageStoreMapper.java new file mode 100644 index 00000000..5103e435 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/mapper/DeviceImageStoreMapper.java @@ -0,0 +1,9 @@ +package cn.cloudwalk.elevator.device.mapper; + +import org.apache.ibatis.annotations.Param; + +public interface DeviceImageStoreMapper { + Boolean save(@Param("buildingId") String paramString1, @Param("imageStoreId") String paramString2); + + String getByBuildingId(String paramString); +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/mapper/DeviceImageStoreMapper.xml b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/mapper/DeviceImageStoreMapper.xml new file mode 100644 index 00000000..589dd870 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/mapper/DeviceImageStoreMapper.xml @@ -0,0 +1,17 @@ + + + + + + insert into device_image_store (building_id, image_store_id) + values (#{buildingId}, + #{imageStoreId}) + + + + diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/package-info.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/package-info.java new file mode 100644 index 00000000..70d0e81f --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/device/package-info.java @@ -0,0 +1,6 @@ +/** + * 电梯设备与通行相关的持久化与 MyBatis 映射:DAO、DTO、Mapper XML 等。 + *

+ * Mapper XML 与接口同包存放,由本模块 {@code pom.xml} 中 {@code build.resources} 一并打包进产物。 + */ +package cn.cloudwalk.elevator.device; diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dao/AcsPassRuleDao.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dao/AcsPassRuleDao.java new file mode 100644 index 00000000..5e1c7ed5 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dao/AcsPassRuleDao.java @@ -0,0 +1,32 @@ +package cn.cloudwalk.elevator.passrule.dao; + +import cn.cloudwalk.cloud.exception.DataAccessException; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.page.CloudwalkPageInfo; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleAddDto; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleDeleteDto; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleEditDto; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleImageDto; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleImageResultDto; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleIsDefaultDto; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleQueryDto; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleResultDto; +import java.util.List; + +public interface AcsPassRuleDao { + Integer insert(AcsPassRuleAddDto paramAcsPassRuleAddDto) throws DataAccessException; + + Integer update(AcsPassRuleEditDto paramAcsPassRuleEditDto) throws DataAccessException; + + Integer delete(AcsPassRuleDeleteDto paramAcsPassRuleDeleteDto) throws DataAccessException; + + CloudwalkPageAble page(AcsPassRuleQueryDto paramAcsPassRuleQueryDto, + CloudwalkPageInfo paramCloudwalkPageInfo) throws DataAccessException; + + List list(AcsPassRuleQueryDto paramAcsPassRuleQueryDto) throws DataAccessException; + + String getIsDefaultByZoneId(AcsPassRuleIsDefaultDto paramAcsPassRuleIsDefaultDto) throws DataAccessException; + + List listByImageId(AcsPassRuleImageDto paramAcsPassRuleImageDto) + throws DataAccessException; +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dao/ImageRuleRefDao.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dao/ImageRuleRefDao.java new file mode 100644 index 00000000..49dac6b8 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dao/ImageRuleRefDao.java @@ -0,0 +1,77 @@ +package cn.cloudwalk.elevator.passrule.dao; + +import cn.cloudwalk.cloud.exception.DataAccessException; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.page.CloudwalkPageInfo; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleDeleteDto; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleImageDto; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleImageResultDto; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleLabelResultDto; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRulePersonListDto; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleQueryDto; +import cn.cloudwalk.elevator.passrule.dto.ImageRuleRefAddDto; +import cn.cloudwalk.elevator.passrule.dto.ImageRuleRefResultDto; +import java.util.List; + +public interface ImageRuleRefDao { + CloudwalkPageAble page(AcsPassRuleQueryDto paramAcsPassRuleQueryDto, + CloudwalkPageInfo paramCloudwalkPageInfo) throws DataAccessException; + + List listRuleByZoneIdExtDefault(String paramString); + + List listByParentRule(List paramList); + + List listByPersonId(String paramString) throws DataAccessException; + + List listByLabelId(String paramString) throws DataAccessException; + + List listByOrgId(String paramString) throws DataAccessException; + + List listByPersonInfo(AcsPassRuleImageDto paramAcsPassRuleImageDto) + throws DataAccessException; + + List listByRestructure(AcsPassRuleImageDto paramAcsPassRuleImageDto) + throws DataAccessException; + + List listFloorsByRestructure(AcsPassRuleImageDto paramAcsPassRuleImageDto) + throws DataAccessException; + + List listZoneInfoByIds(List paramList) throws DataAccessException; + + List listByNotZoneIds(AcsPassRuleQueryDto paramAcsPassRuleQueryDto) + throws DataAccessException; + + List listByPersonList(AcsPassRulePersonListDto paramAcsPassRulePersonListDto) + throws DataAccessException; + + List listPersonDelByZoneId(String paramString) throws DataAccessException; + + List listPersonDelByPersonId(String paramString) throws DataAccessException; + + ImageRuleRefResultDto getDefaultByZoneId(String paramString) throws DataAccessException; + + ImageRuleRefResultDto getById(String paramString) throws DataAccessException; + + String getByRuleName(String paramString1, String paramString2) throws DataAccessException; + + ImageRuleRefResultDto getByPersonIdAndZoneId(List paramList, String paramString) throws DataAccessException; + + ImageRuleRefResultDto getDelByPersonIdAndZoneId(String paramString1, String paramString2) + throws DataAccessException; + + List countPersonIdByZoneId(String paramString) throws DataAccessException; + + Boolean insert(ImageRuleRefAddDto paramImageRuleRefAddDto) throws DataAccessException; + + Boolean insertList(List paramList) throws DataAccessException; + + Boolean deleteById(String paramString) throws DataAccessException; + + Boolean deleteByZoneIdAndName(String paramString1, String paramString2) throws DataAccessException; + + Boolean deleteByPersonIdsIsDel(List paramList, String paramString) throws DataAccessException; + + Boolean deleteByPersonId(String paramString1, String paramString2) throws DataAccessException; + + Boolean deleteByOrgAndLabel(AcsPassRuleDeleteDto paramAcsPassRuleDeleteDto) throws DataAccessException; +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dto/AcsPassRuleAddDto.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dto/AcsPassRuleAddDto.java new file mode 100644 index 00000000..ba3c0ba5 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dto/AcsPassRuleAddDto.java @@ -0,0 +1,98 @@ +package cn.cloudwalk.elevator.passrule.dto; + +import cn.cloudwalk.cloud.entity.CloudwalkBaseTimes; +import java.io.Serializable; + +public class AcsPassRuleAddDto extends CloudwalkBaseTimes implements Serializable { + private static final long serialVersionUID = 6909321999650444051L; + private String businessId; + private String name; + private String zoneId; + private String zoneName; + private String validDateCron; + private String validDateJson; + private Long beginDate; + private Long endDate; + private String imageStoreId; + private Integer isDefault; + + public String getZoneId() { + return this.zoneId; + } + + public void setZoneId(String zoneId) { + this.zoneId = zoneId; + } + + public String getZoneName() { + return this.zoneName; + } + + public void setZoneName(String zoneName) { + this.zoneName = zoneName; + } + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public String getValidDateCron() { + return this.validDateCron; + } + + public void setValidDateCron(String validDateCron) { + this.validDateCron = validDateCron; + } + + public String getValidDateJson() { + return this.validDateJson; + } + + public void setValidDateJson(String validDateJson) { + this.validDateJson = validDateJson; + } + + public Long getBeginDate() { + return this.beginDate; + } + + public void setBeginDate(Long beginDate) { + this.beginDate = beginDate; + } + + public Long getEndDate() { + return this.endDate; + } + + public void setEndDate(Long endDate) { + this.endDate = endDate; + } + + public String getImageStoreId() { + return this.imageStoreId; + } + + public void setImageStoreId(String imageStoreId) { + this.imageStoreId = imageStoreId; + } + + public Integer getIsDefault() { + return this.isDefault; + } + + public void setIsDefault(Integer isDefault) { + this.isDefault = isDefault; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dto/AcsPassRuleDeleteDto.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dto/AcsPassRuleDeleteDto.java new file mode 100644 index 00000000..3241cc4e --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dto/AcsPassRuleDeleteDto.java @@ -0,0 +1,62 @@ +package cn.cloudwalk.elevator.passrule.dto; + +import java.io.Serializable; +import java.util.List; + +public class AcsPassRuleDeleteDto implements Serializable { + private static final long serialVersionUID = -6255045079103336579L; + private String businessId; + private String deviceId; + private List ids; + private String zoneId; + private String orgId; + private String labelId; + + public String getZoneId() { + return this.zoneId; + } + + public void setZoneId(String zoneId) { + this.zoneId = zoneId; + } + + public String getOrgId() { + return this.orgId; + } + + public void setOrgId(String orgId) { + this.orgId = orgId; + } + + public String getLabelId() { + return this.labelId; + } + + public void setLabelId(String labelId) { + this.labelId = labelId; + } + + public String getDeviceId() { + return this.deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public List getIds() { + return this.ids; + } + + public void setIds(List ids) { + this.ids = ids; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dto/AcsPassRuleEditDto.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dto/AcsPassRuleEditDto.java new file mode 100644 index 00000000..84f54e9c --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dto/AcsPassRuleEditDto.java @@ -0,0 +1,71 @@ +package cn.cloudwalk.elevator.passrule.dto; + +import cn.cloudwalk.cloud.entity.CloudwalkBaseTimes; +import java.io.Serializable; + +public class AcsPassRuleEditDto extends CloudwalkBaseTimes implements Serializable { + private static final long serialVersionUID = -9212159235737030371L; + private String businessId; + private String name; + private String validDateCron; + private String validDateJson; + private Long beginDate; + private Long endDate; + private String imageStoreId; + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public String getValidDateCron() { + return this.validDateCron; + } + + public void setValidDateCron(String validDateCron) { + this.validDateCron = validDateCron; + } + + public String getValidDateJson() { + return this.validDateJson; + } + + public void setValidDateJson(String validDateJson) { + this.validDateJson = validDateJson; + } + + public Long getBeginDate() { + return this.beginDate; + } + + public void setBeginDate(Long beginDate) { + this.beginDate = beginDate; + } + + public Long getEndDate() { + return this.endDate; + } + + public void setEndDate(Long endDate) { + this.endDate = endDate; + } + + public String getImageStoreId() { + return this.imageStoreId; + } + + public void setImageStoreId(String imageStoreId) { + this.imageStoreId = imageStoreId; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dto/AcsPassRuleImageDto.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dto/AcsPassRuleImageDto.java new file mode 100644 index 00000000..a759c6e8 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dto/AcsPassRuleImageDto.java @@ -0,0 +1,54 @@ +package cn.cloudwalk.elevator.passrule.dto; + +import cn.cloudwalk.cloud.page.CloudwalkBasePageForm; +import java.io.Serializable; +import java.util.List; + +public class AcsPassRuleImageDto extends CloudwalkBasePageForm implements Serializable { + private static final long serialVersionUID = -52687427633888290L; + private List imageStoreIds; + private String businessId; + private String personId; + private List includeOrganizations; + private List includeLabels; + + public List getImageStoreIds() { + return this.imageStoreIds; + } + + public void setImageStoreIds(List imageStoreIds) { + this.imageStoreIds = imageStoreIds; + } + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getPersonId() { + return this.personId; + } + + public void setPersonId(String personId) { + this.personId = personId; + } + + public List getIncludeOrganizations() { + return this.includeOrganizations; + } + + public void setIncludeOrganizations(List includeOrganizations) { + this.includeOrganizations = includeOrganizations; + } + + public List getIncludeLabels() { + return this.includeLabels; + } + + public void setIncludeLabels(List includeLabels) { + this.includeLabels = includeLabels; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dto/AcsPassRuleImageResultDto.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dto/AcsPassRuleImageResultDto.java new file mode 100644 index 00000000..dfb6e9e7 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dto/AcsPassRuleImageResultDto.java @@ -0,0 +1,31 @@ +package cn.cloudwalk.elevator.passrule.dto; + +public class AcsPassRuleImageResultDto { + private String zoneId; + private String zoneName; + private String imageStoreId; + + public String getZoneId() { + return this.zoneId; + } + + public void setZoneId(String zoneId) { + this.zoneId = zoneId; + } + + public String getZoneName() { + return this.zoneName; + } + + public void setZoneName(String zoneName) { + this.zoneName = zoneName; + } + + public String getImageStoreId() { + return this.imageStoreId; + } + + public void setImageStoreId(String imageStoreId) { + this.imageStoreId = imageStoreId; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dto/AcsPassRuleIsDefaultDto.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dto/AcsPassRuleIsDefaultDto.java new file mode 100644 index 00000000..c504ec30 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dto/AcsPassRuleIsDefaultDto.java @@ -0,0 +1,26 @@ +package cn.cloudwalk.elevator.passrule.dto; + +import cn.cloudwalk.cloud.entity.CloudwalkBaseTimes; +import java.io.Serializable; + +public class AcsPassRuleIsDefaultDto extends CloudwalkBaseTimes implements Serializable { + private static final long serialVersionUID = 6909321999650444051L; + private String businessId; + private String zoneId; + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getZoneId() { + return this.zoneId; + } + + public void setZoneId(String zoneId) { + this.zoneId = zoneId; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dto/AcsPassRuleLabelResultDto.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dto/AcsPassRuleLabelResultDto.java new file mode 100644 index 00000000..4d78fc92 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dto/AcsPassRuleLabelResultDto.java @@ -0,0 +1,31 @@ +package cn.cloudwalk.elevator.passrule.dto; + +public class AcsPassRuleLabelResultDto { + private String zoneId; + private String zoneName; + private String labelId; + + public String getZoneId() { + return this.zoneId; + } + + public void setZoneId(String zoneId) { + this.zoneId = zoneId; + } + + public String getZoneName() { + return this.zoneName; + } + + public void setZoneName(String zoneName) { + this.zoneName = zoneName; + } + + public String getLabelId() { + return this.labelId; + } + + public void setLabelId(String labelId) { + this.labelId = labelId; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dto/AcsPassRulePersonListDto.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dto/AcsPassRulePersonListDto.java new file mode 100644 index 00000000..55be3eef --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dto/AcsPassRulePersonListDto.java @@ -0,0 +1,44 @@ +package cn.cloudwalk.elevator.passrule.dto; + +import java.io.Serializable; +import java.util.List; + +public class AcsPassRulePersonListDto implements Serializable { + private static final long serialVersionUID = -52687427633888290L; + private String businessId; + private List personIds; + private List includeOrganizations; + private List includeLabels; + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public List getPersonIds() { + return this.personIds; + } + + public void setPersonIds(List personIds) { + this.personIds = personIds; + } + + public List getIncludeOrganizations() { + return this.includeOrganizations; + } + + public void setIncludeOrganizations(List includeOrganizations) { + this.includeOrganizations = includeOrganizations; + } + + public List getIncludeLabels() { + return this.includeLabels; + } + + public void setIncludeLabels(List includeLabels) { + this.includeLabels = includeLabels; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dto/AcsPassRulePersonListResultDto.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dto/AcsPassRulePersonListResultDto.java new file mode 100644 index 00000000..da3bbb35 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dto/AcsPassRulePersonListResultDto.java @@ -0,0 +1,24 @@ +package cn.cloudwalk.elevator.passrule.dto; + +import java.util.List; + +public class AcsPassRulePersonListResultDto { + private String personId; + private List zoneList; + + public String getPersonId() { + return this.personId; + } + + public void setPersonId(String personId) { + this.personId = personId; + } + + public List getZoneList() { + return this.zoneList; + } + + public void setZoneList(List zoneList) { + this.zoneList = zoneList; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dto/AcsPassRuleQueryDto.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dto/AcsPassRuleQueryDto.java new file mode 100644 index 00000000..1c1d708c --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dto/AcsPassRuleQueryDto.java @@ -0,0 +1,71 @@ +package cn.cloudwalk.elevator.passrule.dto; + +import java.io.Serializable; +import java.util.List; + +public class AcsPassRuleQueryDto implements Serializable { + private static final long serialVersionUID = 7280163220219331909L; + private String id; + private String zoneId; + private String businessId; + private String imageStoreId; + private List imageStoreIds; + private List ids; + private List zoneIds; + + public List getZoneIds() { + return this.zoneIds; + } + + public void setZoneIds(List zoneIds) { + this.zoneIds = zoneIds; + } + + public List getIds() { + return this.ids; + } + + public void setIds(List ids) { + this.ids = ids; + } + + public String getZoneId() { + return this.zoneId; + } + + public void setZoneId(String zoneId) { + this.zoneId = zoneId; + } + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getImageStoreId() { + return this.imageStoreId; + } + + public void setImageStoreId(String imageStoreId) { + this.imageStoreId = imageStoreId; + } + + public List getImageStoreIds() { + return this.imageStoreIds; + } + + public void setImageStoreIds(List imageStoreIds) { + this.imageStoreIds = imageStoreIds; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dto/AcsPassRuleResultDto.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dto/AcsPassRuleResultDto.java new file mode 100644 index 00000000..2b5ef3be --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dto/AcsPassRuleResultDto.java @@ -0,0 +1,98 @@ +package cn.cloudwalk.elevator.passrule.dto; + +import cn.cloudwalk.cloud.entity.CloudwalkBaseTimes; +import java.io.Serializable; + +public class AcsPassRuleResultDto extends CloudwalkBaseTimes implements Serializable { + private static final long serialVersionUID = -8387459232695360257L; + private String businessId; + private String zoneId; + private String zoneName; + private String name; + private String validDateCron; + private String validDateJson; + private Long beginDate; + private Long endDate; + private String imageStoreId; + private Integer isDefault; + + public String getZoneId() { + return this.zoneId; + } + + public void setZoneId(String zoneId) { + this.zoneId = zoneId; + } + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public String getValidDateCron() { + return this.validDateCron; + } + + public void setValidDateCron(String validDateCron) { + this.validDateCron = validDateCron; + } + + public String getValidDateJson() { + return this.validDateJson; + } + + public void setValidDateJson(String validDateJson) { + this.validDateJson = validDateJson; + } + + public Long getBeginDate() { + return this.beginDate; + } + + public void setBeginDate(Long beginDate) { + this.beginDate = beginDate; + } + + public Long getEndDate() { + return this.endDate; + } + + public void setEndDate(Long endDate) { + this.endDate = endDate; + } + + public String getImageStoreId() { + return this.imageStoreId; + } + + public void setImageStoreId(String imageStoreId) { + this.imageStoreId = imageStoreId; + } + + public String getZoneName() { + return this.zoneName; + } + + public void setZoneName(String zoneName) { + this.zoneName = zoneName; + } + + public Integer getIsDefault() { + return this.isDefault; + } + + public void setIsDefault(Integer isDefault) { + this.isDefault = isDefault; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dto/ImageRuleRefAddDto.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dto/ImageRuleRefAddDto.java new file mode 100644 index 00000000..0de2290f --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dto/ImageRuleRefAddDto.java @@ -0,0 +1,222 @@ +package cn.cloudwalk.elevator.passrule.dto; + +import cn.cloudwalk.cloud.entity.CloudwalkBaseTimes; +import java.io.Serializable; + +public class ImageRuleRefAddDto extends CloudwalkBaseTimes implements Serializable { + private static final long serialVersionUID = 6909321999650444051L; + private String businessId; + private String name; + private String zoneId; + private String zoneName; + private String personId; + private String includeLabels; + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + private String includeOrganizations; + private String excludeLabels; + private Long startTime; + private Long endTime; + private Integer isDefault; + private String parentRule; + private Integer personDelete; + + public void setName(String name) { + this.name = name; + } + + public void setZoneId(String zoneId) { + this.zoneId = zoneId; + } + + public void setZoneName(String zoneName) { + this.zoneName = zoneName; + } + + public void setPersonId(String personId) { + this.personId = personId; + } + + public void setIncludeLabels(String includeLabels) { + this.includeLabels = includeLabels; + } + + public void setIncludeOrganizations(String includeOrganizations) { + this.includeOrganizations = includeOrganizations; + } + + public void setExcludeLabels(String excludeLabels) { + this.excludeLabels = excludeLabels; + } + + public void setStartTime(Long startTime) { + this.startTime = startTime; + } + + public void setEndTime(Long endTime) { + this.endTime = endTime; + } + + public void setIsDefault(Integer isDefault) { + this.isDefault = isDefault; + } + + public void setParentRule(String parentRule) { + this.parentRule = parentRule; + } + + public void setPersonDelete(Integer personDelete) { + this.personDelete = personDelete; + } + + public boolean equals(Object o) { + if (o == this) + return true; + if (!(o instanceof ImageRuleRefAddDto)) + return false; + ImageRuleRefAddDto other = (ImageRuleRefAddDto)o; + if (!other.canEqual(this)) + return false; + Object this$businessId = getBusinessId(), other$businessId = other.getBusinessId(); + if ((this$businessId == null) ? (other$businessId != null) : !this$businessId.equals(other$businessId)) + return false; + Object this$name = getName(), other$name = other.getName(); + if ((this$name == null) ? (other$name != null) : !this$name.equals(other$name)) + return false; + Object this$zoneId = getZoneId(), other$zoneId = other.getZoneId(); + if ((this$zoneId == null) ? (other$zoneId != null) : !this$zoneId.equals(other$zoneId)) + return false; + Object this$zoneName = getZoneName(), other$zoneName = other.getZoneName(); + if ((this$zoneName == null) ? (other$zoneName != null) : !this$zoneName.equals(other$zoneName)) + return false; + Object this$personId = getPersonId(), other$personId = other.getPersonId(); + if ((this$personId == null) ? (other$personId != null) : !this$personId.equals(other$personId)) + return false; + Object this$includeLabels = getIncludeLabels(), other$includeLabels = other.getIncludeLabels(); + if ((this$includeLabels == null) ? (other$includeLabels != null) + : !this$includeLabels.equals(other$includeLabels)) + return false; + Object this$includeOrganizations = getIncludeOrganizations(), + other$includeOrganizations = other.getIncludeOrganizations(); + if ((this$includeOrganizations == null) ? (other$includeOrganizations != null) + : !this$includeOrganizations.equals(other$includeOrganizations)) + return false; + Object this$excludeLabels = getExcludeLabels(), other$excludeLabels = other.getExcludeLabels(); + if ((this$excludeLabels == null) ? (other$excludeLabels != null) + : !this$excludeLabels.equals(other$excludeLabels)) + return false; + Object this$startTime = getStartTime(), other$startTime = other.getStartTime(); + if ((this$startTime == null) ? (other$startTime != null) : !this$startTime.equals(other$startTime)) + return false; + Object this$endTime = getEndTime(), other$endTime = other.getEndTime(); + if ((this$endTime == null) ? (other$endTime != null) : !this$endTime.equals(other$endTime)) + return false; + Object this$isDefault = getIsDefault(), other$isDefault = other.getIsDefault(); + if ((this$isDefault == null) ? (other$isDefault != null) : !this$isDefault.equals(other$isDefault)) + return false; + Object this$parentRule = getParentRule(), other$parentRule = other.getParentRule(); + if ((this$parentRule == null) ? (other$parentRule != null) : !this$parentRule.equals(other$parentRule)) + return false; + Object this$personDelete = getPersonDelete(), other$personDelete = other.getPersonDelete(); + return !((this$personDelete == null) ? (other$personDelete != null) + : !this$personDelete.equals(other$personDelete)); + } + + protected boolean canEqual(Object other) { + return other instanceof ImageRuleRefAddDto; + } + + public int hashCode() { + int PRIME = 59; + result = 1; + Object $businessId = getBusinessId(); + result = result * 59 + (($businessId == null) ? 43 : $businessId.hashCode()); + Object $name = getName(); + result = result * 59 + (($name == null) ? 43 : $name.hashCode()); + Object $zoneId = getZoneId(); + result = result * 59 + (($zoneId == null) ? 43 : $zoneId.hashCode()); + Object $zoneName = getZoneName(); + result = result * 59 + (($zoneName == null) ? 43 : $zoneName.hashCode()); + Object $personId = getPersonId(); + result = result * 59 + (($personId == null) ? 43 : $personId.hashCode()); + Object $includeLabels = getIncludeLabels(); + result = result * 59 + (($includeLabels == null) ? 43 : $includeLabels.hashCode()); + Object $includeOrganizations = getIncludeOrganizations(); + result = result * 59 + (($includeOrganizations == null) ? 43 : $includeOrganizations.hashCode()); + Object $excludeLabels = getExcludeLabels(); + result = result * 59 + (($excludeLabels == null) ? 43 : $excludeLabels.hashCode()); + Object $startTime = getStartTime(); + result = result * 59 + (($startTime == null) ? 43 : $startTime.hashCode()); + Object $endTime = getEndTime(); + result = result * 59 + (($endTime == null) ? 43 : $endTime.hashCode()); + Object $isDefault = getIsDefault(); + result = result * 59 + (($isDefault == null) ? 43 : $isDefault.hashCode()); + Object $parentRule = getParentRule(); + result = result * 59 + (($parentRule == null) ? 43 : $parentRule.hashCode()); + Object $personDelete = getPersonDelete(); + return result * 59 + (($personDelete == null) ? 43 : $personDelete.hashCode()); + } + + public String toString() { + return "ImageRuleRefAddDto(businessId=" + getBusinessId() + ", name=" + getName() + ", zoneId=" + getZoneId() + + ", zoneName=" + getZoneName() + ", personId=" + getPersonId() + ", includeLabels=" + getIncludeLabels() + + ", includeOrganizations=" + getIncludeOrganizations() + ", excludeLabels=" + getExcludeLabels() + + ", startTime=" + getStartTime() + ", endTime=" + getEndTime() + ", isDefault=" + getIsDefault() + + ", parentRule=" + getParentRule() + ", personDelete=" + getPersonDelete() + ")"; + } + + public String getBusinessId() { + return this.businessId; + } + + public String getName() { + return this.name; + } + + public String getZoneId() { + return this.zoneId; + } + + public String getZoneName() { + return this.zoneName; + } + + public String getPersonId() { + return this.personId; + } + + public String getIncludeLabels() { + return this.includeLabels; + } + + public String getIncludeOrganizations() { + return this.includeOrganizations; + } + + public String getExcludeLabels() { + return this.excludeLabels; + } + + public Long getStartTime() { + return this.startTime; + } + + public Long getEndTime() { + return this.endTime; + } + + public Integer getIsDefault() { + return this.isDefault; + } + + public String getParentRule() { + return this.parentRule; + } + + public Integer getPersonDelete() { + return this.personDelete; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dto/ImageRuleRefListResult.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dto/ImageRuleRefListResult.java new file mode 100644 index 00000000..09d503f4 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dto/ImageRuleRefListResult.java @@ -0,0 +1,151 @@ +package cn.cloudwalk.elevator.passrule.dto; + +import java.io.Serializable; +import java.util.List; + +public class ImageRuleRefListResult extends CloudwalkBaseTimes implements Serializable { + private static final long serialVersionUID = 6909321999650444051L; + private String businessId; + private String name; + private String zoneId; + private String zoneName; + private String personId; + private List includeLabels; + private List includeOrganizations; + private List excludeLabels; + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public void setName(String name) { + this.name = name; + } + + public void setZoneId(String zoneId) { + this.zoneId = zoneId; + } + + public void setZoneName(String zoneName) { + this.zoneName = zoneName; + } + + public void setPersonId(String personId) { + this.personId = personId; + } + + public void setIncludeLabels(List includeLabels) { + this.includeLabels = includeLabels; + } + + public void setIncludeOrganizations(List includeOrganizations) { + this.includeOrganizations = includeOrganizations; + } + + public void setExcludeLabels(List excludeLabels) { + this.excludeLabels = excludeLabels; + } + + public boolean equals(Object o) { + if (o == this) + return true; + if (!(o instanceof ImageRuleRefListResult)) + return false; + ImageRuleRefListResult other = (ImageRuleRefListResult)o; + if (!other.canEqual(this)) + return false; + Object this$businessId = getBusinessId(), other$businessId = other.getBusinessId(); + if ((this$businessId == null) ? (other$businessId != null) : !this$businessId.equals(other$businessId)) + return false; + Object this$name = getName(), other$name = other.getName(); + if ((this$name == null) ? (other$name != null) : !this$name.equals(other$name)) + return false; + Object this$zoneId = getZoneId(), other$zoneId = other.getZoneId(); + if ((this$zoneId == null) ? (other$zoneId != null) : !this$zoneId.equals(other$zoneId)) + return false; + Object this$zoneName = getZoneName(), other$zoneName = other.getZoneName(); + if ((this$zoneName == null) ? (other$zoneName != null) : !this$zoneName.equals(other$zoneName)) + return false; + Object this$personId = getPersonId(), other$personId = other.getPersonId(); + if ((this$personId == null) ? (other$personId != null) : !this$personId.equals(other$personId)) + return false; + Object this$includeLabels = (Object)getIncludeLabels(), + other$includeLabels = (Object)other.getIncludeLabels(); + if ((this$includeLabels == null) ? (other$includeLabels != null) + : !this$includeLabels.equals(other$includeLabels)) + return false; + Object this$includeOrganizations = (Object)getIncludeOrganizations(), + other$includeOrganizations = (Object)other.getIncludeOrganizations(); + if ((this$includeOrganizations == null) ? (other$includeOrganizations != null) + : !this$includeOrganizations.equals(other$includeOrganizations)) + return false; + Object this$excludeLabels = (Object)getExcludeLabels(), + other$excludeLabels = (Object)other.getExcludeLabels(); + return !((this$excludeLabels == null) ? (other$excludeLabels != null) + : !this$excludeLabels.equals(other$excludeLabels)); + } + + protected boolean canEqual(Object other) { + return other instanceof ImageRuleRefListResult; + } + + public int hashCode() { + int PRIME = 59; + result = 1; + Object $businessId = getBusinessId(); + result = result * 59 + (($businessId == null) ? 43 : $businessId.hashCode()); + Object $name = getName(); + result = result * 59 + (($name == null) ? 43 : $name.hashCode()); + Object $zoneId = getZoneId(); + result = result * 59 + (($zoneId == null) ? 43 : $zoneId.hashCode()); + Object $zoneName = getZoneName(); + result = result * 59 + (($zoneName == null) ? 43 : $zoneName.hashCode()); + Object $personId = getPersonId(); + result = result * 59 + (($personId == null) ? 43 : $personId.hashCode()); + Object $includeLabels = (Object)getIncludeLabels(); + result = result * 59 + (($includeLabels == null) ? 43 : $includeLabels.hashCode()); + Object $includeOrganizations = (Object)getIncludeOrganizations(); + result = result * 59 + (($includeOrganizations == null) ? 43 : $includeOrganizations.hashCode()); + Object $excludeLabels = (Object)getExcludeLabels(); + return result * 59 + (($excludeLabels == null) ? 43 : $excludeLabels.hashCode()); + } + + public String toString() { + return "ImageRuleRefListResult(businessId=" + getBusinessId() + ", name=" + getName() + ", zoneId=" + + getZoneId() + ", zoneName=" + getZoneName() + ", personId=" + getPersonId() + ", includeLabels=" + + getIncludeLabels() + ", includeOrganizations=" + getIncludeOrganizations() + ", excludeLabels=" + + getExcludeLabels() + ")"; + } + + public String getBusinessId() { + return this.businessId; + } + + public String getName() { + return this.name; + } + + public String getZoneId() { + return this.zoneId; + } + + public String getZoneName() { + return this.zoneName; + } + + public String getPersonId() { + return this.personId; + } + + public List getIncludeLabels() { + return this.includeLabels; + } + + public List getIncludeOrganizations() { + return this.includeOrganizations; + } + + public List getExcludeLabels() { + return this.excludeLabels; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dto/ImageRuleRefResultDto.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dto/ImageRuleRefResultDto.java new file mode 100644 index 00000000..57e5d5ce --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/dto/ImageRuleRefResultDto.java @@ -0,0 +1,143 @@ +package cn.cloudwalk.elevator.passrule.dto; + +import java.io.Serializable; + +public class ImageRuleRefResultDto implements Serializable { + private static final long serialVersionUID = 6909321999650444051L; + private String id; + private Long createTime; + private Long lastUpdateTime; + private String businessId; + private String name; + private String zoneId; + private String zoneName; + + public void setId(String id) { + this.id = id; + } + + private String personId; + private String includeLabels; + private String includeOrganizations; + private String excludeLabels; + private Long startTime; + private Long endTime; + private Integer isDefault; + private String parentRule; + + public void setCreateTime(Long createTime) { + this.createTime = createTime; + } + + public void setLastUpdateTime(Long lastUpdateTime) { + this.lastUpdateTime = lastUpdateTime; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public void setName(String name) { + this.name = name; + } + + public void setZoneId(String zoneId) { + this.zoneId = zoneId; + } + + public void setZoneName(String zoneName) { + this.zoneName = zoneName; + } + + public void setPersonId(String personId) { + this.personId = personId; + } + + public void setIncludeLabels(String includeLabels) { + this.includeLabels = includeLabels; + } + + public void setIncludeOrganizations(String includeOrganizations) { + this.includeOrganizations = includeOrganizations; + } + + public void setExcludeLabels(String excludeLabels) { + this.excludeLabels = excludeLabels; + } + + public void setStartTime(Long startTime) { + this.startTime = startTime; + } + + public void setEndTime(Long endTime) { + this.endTime = endTime; + } + + public void setIsDefault(Integer isDefault) { + this.isDefault = isDefault; + } + + public void setParentRule(String parentRule) { + this.parentRule = parentRule; + } + + public String getId() { + return this.id; + } + + public Long getCreateTime() { + return this.createTime; + } + + public Long getLastUpdateTime() { + return this.lastUpdateTime; + } + + public String getBusinessId() { + return this.businessId; + } + + public String getName() { + return this.name; + } + + public String getZoneId() { + return this.zoneId; + } + + public String getZoneName() { + return this.zoneName; + } + + public String getPersonId() { + return this.personId; + } + + public String getIncludeLabels() { + return this.includeLabels; + } + + public String getIncludeOrganizations() { + return this.includeOrganizations; + } + + public String getExcludeLabels() { + return this.excludeLabels; + } + + public Long getStartTime() { + return this.startTime; + } + + public Long getEndTime() { + return this.endTime; + } + + public Integer getIsDefault() { + return this.isDefault; + } + + public String getParentRule() { + return this.parentRule; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/impl/AcsPassRuleDaoImpl.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/impl/AcsPassRuleDaoImpl.java new file mode 100644 index 00000000..0b7a8197 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/impl/AcsPassRuleDaoImpl.java @@ -0,0 +1,76 @@ +package cn.cloudwalk.elevator.passrule.impl; + +import cn.cloudwalk.cloud.exception.DataAccessException; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.page.CloudwalkPageInfo; +import cn.cloudwalk.cloud.utils.BeanCopyUtils; +import cn.cloudwalk.elevator.passrule.dao.AcsPassRuleDao; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleAddDto; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleDeleteDto; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleEditDto; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleImageDto; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleImageResultDto; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleIsDefaultDto; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleQueryDto; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleResultDto; +import cn.cloudwalk.elevator.passrule.mapper.AcsPassRuleMapper; +import com.github.pagehelper.Page; +import com.github.pagehelper.PageHelper; +import java.util.List; +import javax.annotation.Resource; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Repository; + +@Repository +public class AcsPassRuleDaoImpl implements AcsPassRuleDao { + @Resource + private AcsPassRuleMapper acsPassRuleMapper; + protected final Logger logger = LoggerFactory.getLogger(getClass()); + + public Integer insert(AcsPassRuleAddDto dto) { + return this.acsPassRuleMapper.insert(dto); + } + + public Integer update(AcsPassRuleEditDto dto) { + return this.acsPassRuleMapper.update(dto); + } + + public Integer delete(AcsPassRuleDeleteDto dto) { + return this.acsPassRuleMapper.delete(dto); + } + + public CloudwalkPageAble page(AcsPassRuleQueryDto dto, CloudwalkPageInfo page) { + PageHelper.startPage(page.getCurrentPage(), page.getPageSize()); + Page result = (Page)this.acsPassRuleMapper.list(dto); + return new CloudwalkPageAble(BeanCopyUtils.copy(result.getResult(), AcsPassRuleResultDto.class), page, + result.getTotal()); + } + + public List list(AcsPassRuleQueryDto dto) throws DataAccessException { + try { + return this.acsPassRuleMapper.list(dto); + } catch (Exception e) { + this.logger.error("查询紧通行规则异常,原因:[{}]", e.getMessage(), e); + throw new DataAccessException(e); + } + } + + public String getIsDefaultByZoneId(AcsPassRuleIsDefaultDto dto) throws DataAccessException { + try { + return this.acsPassRuleMapper.getIsDefaultByZoneId(dto); + } catch (Exception e) { + this.logger.error("根据楼层id获取默认图库id异常,原因:[{}]", e.getMessage(), e); + throw new DataAccessException(e); + } + } + + public List listByImageId(AcsPassRuleImageDto dto) throws DataAccessException { + try { + return this.acsPassRuleMapper.listByImageId(dto); + } catch (Exception e) { + this.logger.error("根据图库id集合查询对应楼层信息异常,原因:[{}]", e.getMessage(), e); + throw new DataAccessException(e); + } + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/impl/ImageRuleRefDaoImpl.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/impl/ImageRuleRefDaoImpl.java new file mode 100644 index 00000000..5d6f205f --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/impl/ImageRuleRefDaoImpl.java @@ -0,0 +1,145 @@ +package cn.cloudwalk.elevator.passrule.impl; + +import cn.cloudwalk.cloud.exception.DataAccessException; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.page.CloudwalkPageInfo; +import cn.cloudwalk.cloud.utils.BeanCopyUtils; +import cn.cloudwalk.elevator.passrule.dao.ImageRuleRefDao; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleDeleteDto; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleImageDto; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleImageResultDto; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleLabelResultDto; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRulePersonListDto; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleQueryDto; +import cn.cloudwalk.elevator.passrule.dto.ImageRuleRefAddDto; +import cn.cloudwalk.elevator.passrule.dto.ImageRuleRefResultDto; +import cn.cloudwalk.elevator.passrule.mapper.ImageRuleRefMapper; +import com.github.pagehelper.Page; +import com.github.pagehelper.PageHelper; +import java.util.List; +import javax.annotation.Resource; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Repository; + +@Repository +public class ImageRuleRefDaoImpl implements ImageRuleRefDao { + @Resource + private ImageRuleRefMapper imageRuleRefMapper; + protected final Logger logger = LoggerFactory.getLogger(getClass()); + + public CloudwalkPageAble page(AcsPassRuleQueryDto dto, CloudwalkPageInfo page) + throws DataAccessException { + PageHelper.startPage(page.getCurrentPage(), page.getPageSize()); + Page result = (Page)this.imageRuleRefMapper.page(dto); + return new CloudwalkPageAble(BeanCopyUtils.copy(result.getResult(), ImageRuleRefResultDto.class), page, + result.getTotal()); + } + + public List listRuleByZoneIdExtDefault(String zoneId) { + return this.imageRuleRefMapper.listRuleByZoneIdExtDefault(zoneId); + } + + public List listByParentRule(List parentRuleIds) { + return this.imageRuleRefMapper.listByParentRule(parentRuleIds); + } + + public List listByPersonId(String personId) throws DataAccessException { + return this.imageRuleRefMapper.listByPersonId(personId); + } + + public List listByLabelId(String labelId) throws DataAccessException { + return this.imageRuleRefMapper.listByLabelId(labelId); + } + + public List listByOrgId(String orgId) throws DataAccessException { + return this.imageRuleRefMapper.listByOrgId(orgId); + } + + public List listByPersonInfo(AcsPassRuleImageDto dto) throws DataAccessException { + return this.imageRuleRefMapper.listByPersonInfo(dto); + } + + public List listByRestructure(AcsPassRuleImageDto dto) throws DataAccessException { + return this.imageRuleRefMapper.listByRestructure(dto); + } + + public List listFloorsByRestructure(AcsPassRuleImageDto dto) throws DataAccessException { + return this.imageRuleRefMapper.listFloorsByRestructure(dto); + } + + public List listZoneInfoByIds(List zoneIds) throws DataAccessException { + return this.imageRuleRefMapper.listZoneInfoByIds(zoneIds); + } + + public List listByNotZoneIds(AcsPassRuleQueryDto dto) throws DataAccessException { + return this.imageRuleRefMapper.listByNotZoneIds(dto); + } + + public List listByPersonList(AcsPassRulePersonListDto dto) throws DataAccessException { + return this.imageRuleRefMapper.listByPersonList(dto); + } + + public List listPersonDelByZoneId(String zoneId) throws DataAccessException { + return this.imageRuleRefMapper.listPersonDelByZoneId(zoneId); + } + + public List listPersonDelByPersonId(String personId) throws DataAccessException { + return this.imageRuleRefMapper.listPersonDelByPersonId(personId); + } + + public ImageRuleRefResultDto getDefaultByZoneId(String zoneId) throws DataAccessException { + return this.imageRuleRefMapper.getDefaultByZoneId(zoneId); + } + + public ImageRuleRefResultDto getById(String id) throws DataAccessException { + return this.imageRuleRefMapper.getById(id); + } + + public String getByRuleName(String ruleName, String zoneId) throws DataAccessException { + return this.imageRuleRefMapper.getByRuleName(ruleName, zoneId); + } + + public ImageRuleRefResultDto getByPersonIdAndZoneId(List personId, String zoneId) + throws DataAccessException { + return this.imageRuleRefMapper.getByPersonIdAndZoneId(personId, zoneId); + } + + public ImageRuleRefResultDto getDelByPersonIdAndZoneId(String personId, String zoneId) throws DataAccessException { + return this.imageRuleRefMapper.getDelByPersonIdAndZoneId(personId, zoneId); + } + + public List countPersonIdByZoneId(String zoneId) throws DataAccessException { + return this.imageRuleRefMapper.countPersonIdByZoneId(zoneId); + } + + public Boolean insert(ImageRuleRefAddDto dto) { + return this.imageRuleRefMapper.insert(dto); + } + + public Boolean insertList(List insertList) throws DataAccessException { + return this.imageRuleRefMapper.insertList(insertList); + } + + public Boolean deleteById(String id) throws DataAccessException { + this.imageRuleRefMapper.deleteById(id); + this.imageRuleRefMapper.deleteByParentRule(id); + return Boolean.valueOf(true); + } + + public Boolean deleteByZoneIdAndName(String zoneId, String oldName) throws DataAccessException { + return this.imageRuleRefMapper.deleteByZoneIdAndName(zoneId, oldName); + } + + public Boolean deleteByPersonIdsIsDel(List personId, String zoneId) throws DataAccessException { + return this.imageRuleRefMapper.deleteByPersonIdsIsDel(personId, zoneId); + } + + public Boolean deleteByPersonId(String personId, String zoneId) throws DataAccessException { + return this.imageRuleRefMapper.deleteByPersonId(personId, zoneId); + } + + public Boolean deleteByOrgAndLabel(AcsPassRuleDeleteDto dto) throws DataAccessException { + return this.imageRuleRefMapper.deleteByOrgAndLabel(dto); + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/mapper/AcsPassRuleMapper.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/mapper/AcsPassRuleMapper.java new file mode 100644 index 00000000..21fa3787 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/mapper/AcsPassRuleMapper.java @@ -0,0 +1,25 @@ +package cn.cloudwalk.elevator.passrule.mapper; + +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleAddDto; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleDeleteDto; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleEditDto; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleImageDto; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleImageResultDto; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleIsDefaultDto; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleQueryDto; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleResultDto; +import java.util.List; + +public interface AcsPassRuleMapper { + Integer insert(AcsPassRuleAddDto paramAcsPassRuleAddDto); + + Integer update(AcsPassRuleEditDto paramAcsPassRuleEditDto); + + Integer delete(AcsPassRuleDeleteDto paramAcsPassRuleDeleteDto); + + List list(AcsPassRuleQueryDto paramAcsPassRuleQueryDto); + + String getIsDefaultByZoneId(AcsPassRuleIsDefaultDto paramAcsPassRuleIsDefaultDto); + + List listByImageId(AcsPassRuleImageDto paramAcsPassRuleImageDto); +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/mapper/ImageRuleRefMapper.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/mapper/ImageRuleRefMapper.java new file mode 100644 index 00000000..3e329b98 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/passrule/mapper/ImageRuleRefMapper.java @@ -0,0 +1,72 @@ +package cn.cloudwalk.elevator.passrule.mapper; + +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleDeleteDto; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleImageDto; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleImageResultDto; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleLabelResultDto; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRulePersonListDto; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleQueryDto; +import cn.cloudwalk.elevator.passrule.dto.ImageRuleRefAddDto; +import cn.cloudwalk.elevator.passrule.dto.ImageRuleRefResultDto; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface ImageRuleRefMapper { + List page(AcsPassRuleQueryDto paramAcsPassRuleQueryDto); + + List listRuleByZoneIdExtDefault(String paramString); + + List listPersonDelByZoneId(@Param("zoneId") String paramString); + + List listPersonDelByPersonId(@Param("personId") String paramString); + + List listByParentRule(@Param("parentRuleIds") List paramList); + + List listByPersonId(@Param("personId") String paramString); + + List listByLabelId(@Param("labelId") String paramString); + + List listByOrgId(@Param("orgId") String paramString); + + List listByPersonInfo(AcsPassRuleImageDto paramAcsPassRuleImageDto); + + List listByRestructure(AcsPassRuleImageDto paramAcsPassRuleImageDto); + + List listFloorsByRestructure(AcsPassRuleImageDto paramAcsPassRuleImageDto); + + List listZoneInfoByIds(@Param("zoneIds") List paramList); + + List listByNotZoneIds(@Param("request") AcsPassRuleQueryDto paramAcsPassRuleQueryDto); + + List listByPersonList(AcsPassRulePersonListDto paramAcsPassRulePersonListDto); + + ImageRuleRefResultDto getDefaultByZoneId(String paramString); + + ImageRuleRefResultDto getById(String paramString); + + String getByRuleName(@Param("ruleName") String paramString1, @Param("zoneId") String paramString2); + + ImageRuleRefResultDto getByPersonIdAndZoneId(@Param("personIds") List paramList, + @Param("zoneId") String paramString); + + ImageRuleRefResultDto getDelByPersonIdAndZoneId(@Param("personId") String paramString1, + @Param("zoneId") String paramString2); + + List countPersonIdByZoneId(String paramString); + + Boolean insert(ImageRuleRefAddDto paramImageRuleRefAddDto); + + Boolean insertList(@Param("dtoList") List paramList); + + Boolean deleteByZoneIdAndName(String paramString1, String paramString2); + + Boolean deleteById(String paramString); + + Boolean deleteByParentRule(String paramString); + + Boolean deleteByPersonIdsIsDel(@Param("personIds") List paramList, @Param("zoneId") String paramString); + + Boolean deleteByPersonId(@Param("personId") String paramString1, @Param("zoneId") String paramString2); + + Boolean deleteByOrgAndLabel(AcsPassRuleDeleteDto paramAcsPassRuleDeleteDto); +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dao/AcsElevatorRecordDao.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dao/AcsElevatorRecordDao.java new file mode 100644 index 00000000..22d5e10c --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dao/AcsElevatorRecordDao.java @@ -0,0 +1,39 @@ +package cn.cloudwalk.elevator.record.dao; + +import cn.cloudwalk.cloud.exception.DataAccessException; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.page.CloudwalkPageInfo; +import cn.cloudwalk.elevator.record.dto.AcsElevatorAnalyseCycleBusinessResultDTO; +import cn.cloudwalk.elevator.record.dto.AcsElevatorPageRequestInfoResultDTO; +import cn.cloudwalk.elevator.record.dto.AcsElevatorQueryCountDTO; +import cn.cloudwalk.elevator.record.dto.AcsElevatorRecordAddDTO; +import cn.cloudwalk.elevator.record.dto.AcsElevatorRecordDetailQueryDTO; +import cn.cloudwalk.elevator.record.dto.AcsElevatorRecordDetailQueryResultDTO; +import cn.cloudwalk.elevator.record.dto.AcsElevatorRecordQueryResultDTO; +import cn.cloudwalk.elevator.record.dto.AcsOpenDoorRecordEditDTO; +import cn.cloudwalk.elevator.record.dto.AcsOpenDoorRecordQueryDTO; +import cn.cloudwalk.elevator.record.dto.AcsRecordThreeSendQueryDTO; +import java.util.List; + +public interface AcsElevatorRecordDao { + Integer add(AcsElevatorRecordAddDTO paramAcsElevatorRecordAddDTO) throws DataAccessException; + + int update(AcsOpenDoorRecordEditDTO paramAcsOpenDoorRecordEditDTO) throws DataAccessException; + + CloudwalkPageAble detail( + AcsElevatorRecordDetailQueryDTO paramAcsElevatorRecordDetailQueryDTO, CloudwalkPageInfo paramCloudwalkPageInfo) + throws DataAccessException; + + List query(AcsOpenDoorRecordQueryDTO paramAcsOpenDoorRecordQueryDTO) + throws DataAccessException; + + AcsElevatorPageRequestInfoResultDTO pageRequestInfo(String paramString) throws DataAccessException; + + Integer analyseCount(AcsElevatorQueryCountDTO paramAcsElevatorQueryCountDTO) throws DataAccessException; + + List analyseGroup(AcsElevatorQueryCountDTO paramAcsElevatorQueryCountDTO) + throws DataAccessException; + + List + listByRecognitionTime(AcsRecordThreeSendQueryDTO paramAcsRecordThreeSendQueryDTO) throws DataAccessException; +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dao/AcsPersonInfoDao.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dao/AcsPersonInfoDao.java new file mode 100644 index 00000000..b5f9392e --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dao/AcsPersonInfoDao.java @@ -0,0 +1,3 @@ +package cn.cloudwalk.elevator.record.dao; + +public interface AcsPersonInfoDao {} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dao/AcsRecogRecordDao.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dao/AcsRecogRecordDao.java new file mode 100644 index 00000000..d10ac305 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dao/AcsRecogRecordDao.java @@ -0,0 +1,15 @@ +package cn.cloudwalk.elevator.record.dao; + +import cn.cloudwalk.cloud.exception.DataAccessException; +import cn.cloudwalk.elevator.record.dto.AcsRecogRecordAddDTO; +import cn.cloudwalk.elevator.record.dto.AcsRecogRecordPageDTO; +import cn.cloudwalk.elevator.record.dto.AcsRecogRecordResultDTO; +import java.util.List; + +public interface AcsRecogRecordDao { + Integer add(AcsRecogRecordAddDTO paramAcsRecogRecordAddDTO) throws DataAccessException; + + List page(AcsRecogRecordPageDTO paramAcsRecogRecordPageDTO) throws DataAccessException; + + AcsRecogRecordResultDTO getByPersonId(String paramString) throws DataAccessException; +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dao/SendRecordTimeDao.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dao/SendRecordTimeDao.java new file mode 100644 index 00000000..d1388ed1 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dao/SendRecordTimeDao.java @@ -0,0 +1,14 @@ +package cn.cloudwalk.elevator.record.dao; + +import cn.cloudwalk.cloud.exception.DataAccessException; +import cn.cloudwalk.elevator.record.dto.SendRecordTimeAddDTO; +import cn.cloudwalk.elevator.record.dto.SendRecordTimeEditDTO; +import cn.cloudwalk.elevator.record.dto.SendRecordTimeResultDTO; + +public interface SendRecordTimeDao { + SendRecordTimeResultDTO getByType(Integer paramInteger) throws DataAccessException; + + Integer add(SendRecordTimeAddDTO paramSendRecordTimeAddDTO) throws DataAccessException; + + Integer update(SendRecordTimeEditDTO paramSendRecordTimeEditDTO) throws DataAccessException; +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsElevatorAnalyseCycleBusinessResultDTO.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsElevatorAnalyseCycleBusinessResultDTO.java new file mode 100644 index 00000000..21497071 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsElevatorAnalyseCycleBusinessResultDTO.java @@ -0,0 +1,27 @@ +package cn.cloudwalk.elevator.record.dto; + +public class AcsElevatorAnalyseCycleBusinessResultDTO { + private String businessId; + private Integer count; + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public Integer getCount() { + return this.count; + } + + public void setCount(Integer count) { + this.count = count; + } + + public String toString() { + return "AcsElevatorAnalyseCycleBusinessResultDTO{businessId='" + this.businessId + '\'' + ", count=" + + this.count + '}'; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsElevatorPageRequestInfoResultDTO.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsElevatorPageRequestInfoResultDTO.java new file mode 100644 index 00000000..080432f2 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsElevatorPageRequestInfoResultDTO.java @@ -0,0 +1,33 @@ +package cn.cloudwalk.elevator.record.dto; + +import java.util.List; + +public class AcsElevatorPageRequestInfoResultDTO { + private List srcFloorList; + private List destFloorList; + private List dispatchElevatorNoList; + + public List getSrcFloorList() { + return this.srcFloorList; + } + + public void setSrcFloorList(List srcFloorList) { + this.srcFloorList = srcFloorList; + } + + public List getDestFloorList() { + return this.destFloorList; + } + + public void setDestFloorList(List destFloorList) { + this.destFloorList = destFloorList; + } + + public List getDispatchElevatorNoList() { + return this.dispatchElevatorNoList; + } + + public void setDispatchElevatorNoList(List dispatchElevatorNoList) { + this.dispatchElevatorNoList = dispatchElevatorNoList; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsElevatorQueryCountDTO.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsElevatorQueryCountDTO.java new file mode 100644 index 00000000..cd2a3a9e --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsElevatorQueryCountDTO.java @@ -0,0 +1,49 @@ +package cn.cloudwalk.elevator.record.dto; + +public class AcsElevatorQueryCountDTO { + private Long startTime; + private Long endTime; + private Integer recordResult; + private String businessId; + private String srcFloor; + + public Long getStartTime() { + return this.startTime; + } + + public void setStartTime(Long startTime) { + this.startTime = startTime; + } + + public Long getEndTime() { + return this.endTime; + } + + public void setEndTime(Long endTime) { + this.endTime = endTime; + } + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public Integer getRecordResult() { + return this.recordResult; + } + + public void setRecordResult(Integer recordResult) { + this.recordResult = recordResult; + } + + public String getSrcFloor() { + return this.srcFloor; + } + + public void setSrcFloor(String srcFloor) { + this.srcFloor = srcFloor; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsElevatorRecordAddDTO.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsElevatorRecordAddDTO.java new file mode 100644 index 00000000..96996a14 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsElevatorRecordAddDTO.java @@ -0,0 +1,255 @@ +package cn.cloudwalk.elevator.record.dto; + +import cn.cloudwalk.cloud.entity.CloudwalkBaseTimes; +import java.io.Serializable; + +public class AcsElevatorRecordAddDTO extends CloudwalkBaseTimes implements Serializable { + private String businessId; + private String deviceId; + private String deviceCode; + private String deviceName; + private String deviceTypeId; + private String deviceTypeName; + private String districtId; + private String areaId; + private String openDoorType; + private String operateName; + private String faceImagePath; + private String panoramaImagePath; + private Integer recordResult; + private String recognitionNo; + private Long recognitionTime; + private String logId; + private String recognitionFaceId; + private String srcFloor; + private String destFloor; + private String dispatchElevatorNo; + private Long dispatchElevatorTime; + private Integer isVisitor; + private String interviewee; + private String personCode; + private String orgId; + private String orgName; + private static final long serialVersionUID = 1L; + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getDeviceId() { + return this.deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public String getDeviceCode() { + return this.deviceCode; + } + + public void setDeviceCode(String deviceCode) { + this.deviceCode = deviceCode; + } + + public String getDeviceName() { + return this.deviceName; + } + + public void setDeviceName(String deviceName) { + this.deviceName = deviceName; + } + + public String getDeviceTypeId() { + return this.deviceTypeId; + } + + public void setDeviceTypeId(String deviceTypeId) { + this.deviceTypeId = deviceTypeId; + } + + public String getDeviceTypeName() { + return this.deviceTypeName; + } + + public void setDeviceTypeName(String deviceTypeName) { + this.deviceTypeName = deviceTypeName; + } + + public String getDistrictId() { + return this.districtId; + } + + public void setDistrictId(String districtId) { + this.districtId = districtId; + } + + public String getAreaId() { + return this.areaId; + } + + public void setAreaId(String areaId) { + this.areaId = areaId; + } + + public String getOpenDoorType() { + return this.openDoorType; + } + + public void setOpenDoorType(String openDoorType) { + this.openDoorType = openDoorType; + } + + public String getOperateName() { + return this.operateName; + } + + public void setOperateName(String operateName) { + this.operateName = operateName; + } + + public String getFaceImagePath() { + return this.faceImagePath; + } + + public void setFaceImagePath(String faceImagePath) { + this.faceImagePath = faceImagePath; + } + + public String getPanoramaImagePath() { + return this.panoramaImagePath; + } + + public void setPanoramaImagePath(String panoramaImagePath) { + this.panoramaImagePath = panoramaImagePath; + } + + public Integer getRecordResult() { + return this.recordResult; + } + + public void setRecordResult(Integer recordResult) { + this.recordResult = recordResult; + } + + public String getRecognitionNo() { + return this.recognitionNo; + } + + public void setRecognitionNo(String recognitionNo) { + this.recognitionNo = recognitionNo; + } + + public Long getRecognitionTime() { + return this.recognitionTime; + } + + public void setRecognitionTime(Long recognitionTime) { + this.recognitionTime = recognitionTime; + } + + public String getLogId() { + return this.logId; + } + + public void setLogId(String logId) { + this.logId = logId; + } + + public String getRecognitionFaceId() { + return this.recognitionFaceId; + } + + public void setRecognitionFaceId(String recognitionFaceId) { + this.recognitionFaceId = recognitionFaceId; + } + + public String getSrcFloor() { + return this.srcFloor; + } + + public void setSrcFloor(String srcFloor) { + this.srcFloor = srcFloor; + } + + public String getDestFloor() { + return this.destFloor; + } + + public void setDestFloor(String destFloor) { + this.destFloor = destFloor; + } + + public String getDispatchElevatorNo() { + return this.dispatchElevatorNo; + } + + public void setDispatchElevatorNo(String dispatchElevatorNo) { + this.dispatchElevatorNo = dispatchElevatorNo; + } + + public Long getDispatchElevatorTime() { + return this.dispatchElevatorTime; + } + + public void setDispatchElevatorTime(Long dispatchElevatorTime) { + this.dispatchElevatorTime = dispatchElevatorTime; + } + + public Integer getIsVisitor() { + return this.isVisitor; + } + + public void setIsVisitor(Integer isVisitor) { + this.isVisitor = isVisitor; + } + + public String getInterviewee() { + return this.interviewee; + } + + public void setInterviewee(String interviewee) { + this.interviewee = interviewee; + } + + public String getPersonCode() { + return this.personCode; + } + + public void setPersonCode(String personCode) { + this.personCode = personCode; + } + + public String getOrgId() { + return this.orgId; + } + + public void setOrgId(String orgId) { + this.orgId = orgId; + } + + public String getOrgName() { + return this.orgName; + } + + public void setOrgName(String orgName) { + this.orgName = orgName; + } + + public String toString() { + return "AcsElevatorRecordAddDTO{businessId='" + this.businessId + '\'' + ", deviceId='" + this.deviceId + '\'' + + ", deviceCode='" + this.deviceCode + '\'' + ", deviceName='" + this.deviceName + '\'' + ", deviceTypeId='" + + this.deviceTypeId + '\'' + ", deviceTypeName='" + this.deviceTypeName + '\'' + ", districtId='" + + this.districtId + '\'' + ", areaId='" + this.areaId + '\'' + ", openDoorType='" + this.openDoorType + '\'' + + ", operateName='" + this.operateName + '\'' + ", faceImagePath='" + this.faceImagePath + '\'' + + ", panoramaImagePath='" + this.panoramaImagePath + '\'' + ", recordResult=" + this.recordResult + + ", recognitionNo='" + this.recognitionNo + '\'' + ", recognitionTime=" + this.recognitionTime + + ", logId='" + this.logId + '\'' + ", recognitionFaceId='" + this.recognitionFaceId + '\'' + ", srcFloor='" + + this.srcFloor + '\'' + ", destFloor='" + this.destFloor + '\'' + ", dispatchElevatorNo='" + + this.dispatchElevatorNo + '\'' + ", dispatchElevatorTime=" + this.dispatchElevatorTime + '}'; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsElevatorRecordDetailQueryDTO.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsElevatorRecordDetailQueryDTO.java new file mode 100644 index 00000000..cc5559f1 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsElevatorRecordDetailQueryDTO.java @@ -0,0 +1,151 @@ +package cn.cloudwalk.elevator.record.dto; + +import java.io.Serializable; +import java.util.List; + +public class AcsElevatorRecordDetailQueryDTO implements Serializable { + private String businessId; + private Long startTime; + private Long endTime; + private String personName; + private String personId; + private List districtIds; + private List areaIds; + private List deviceIds; + private String openDoorTypeCode; + private Integer recordResult; + private String srcFloor; + private String destFloor; + private String dispatchElevatorNo; + private String personCode; + private String orgId; + private Integer isVisitor; + + public Integer getIsVisitor() { + return this.isVisitor; + } + + public void setIsVisitor(Integer isVisitor) { + this.isVisitor = isVisitor; + } + + public String getPersonCode() { + return this.personCode; + } + + public void setPersonCode(String personCode) { + this.personCode = personCode; + } + + public String getOrgId() { + return this.orgId; + } + + public void setOrgId(String orgId) { + this.orgId = orgId; + } + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public Long getStartTime() { + return this.startTime; + } + + public void setStartTime(Long startTime) { + this.startTime = startTime; + } + + public Long getEndTime() { + return this.endTime; + } + + public void setEndTime(Long endTime) { + this.endTime = endTime; + } + + public String getPersonName() { + return this.personName; + } + + public void setPersonName(String personName) { + this.personName = personName; + } + + public List getDistrictIds() { + return this.districtIds; + } + + public void setDistrictIds(List districtIds) { + this.districtIds = districtIds; + } + + public List getDeviceIds() { + return this.deviceIds; + } + + public void setDeviceIds(List deviceIds) { + this.deviceIds = deviceIds; + } + + public List getAreaIds() { + return this.areaIds; + } + + public void setAreaIds(List areaIds) { + this.areaIds = areaIds; + } + + public String getOpenDoorTypeCode() { + return this.openDoorTypeCode; + } + + public void setOpenDoorTypeCode(String openDoorTypeCode) { + this.openDoorTypeCode = openDoorTypeCode; + } + + public Integer getRecordResult() { + return this.recordResult; + } + + public void setRecordResult(Integer recordResult) { + this.recordResult = recordResult; + } + + public String getSrcFloor() { + return this.srcFloor; + } + + public void setSrcFloor(String srcFloor) { + this.srcFloor = srcFloor; + } + + public String getDestFloor() { + return this.destFloor; + } + + public void setDestFloor(String destFloor) { + this.destFloor = destFloor; + } + + public String getDispatchElevatorNo() { + return this.dispatchElevatorNo; + } + + public void setDispatchElevatorNo(String dispatchElevatorNo) { + this.dispatchElevatorNo = dispatchElevatorNo; + } + + public String getPersonId() { + return this.personId; + } + + public void setPersonId(String personId) { + this.personId = personId; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsElevatorRecordDetailQueryResultDTO.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsElevatorRecordDetailQueryResultDTO.java new file mode 100644 index 00000000..97d908d0 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsElevatorRecordDetailQueryResultDTO.java @@ -0,0 +1,378 @@ +package cn.cloudwalk.elevator.record.dto; + +import cn.cloudwalk.elevator.annontation.DavinciPic; +import java.io.Serializable; +import java.math.BigDecimal; + +public class AcsElevatorRecordDetailQueryResultDTO implements Serializable { + private String openDoorId; + private String panoramaImageRecog; + private String panoramaImageOpen; + private String faceImage; + @DavinciPic + private String registerImage; + private String personName; + private long recognitionTime; + private String districtId; + private String areaId; + private String deviceTypeName; + private String deviceId; + private String deviceCode; + private String deviceName; + private String openDoorType; + private String operateName; + private BigDecimal score; + private Integer recordResult; + private String recognitionNo; + private String recognitionFaceId; + private String personId; + private Integer isVisitor; + private String interviewee; + private String regRecordId; + private BigDecimal threshold; + private Integer recognitionResult; + private String groupId; + private String faceId; + private BigDecimal qualityScore; + private String logId; + private BigDecimal tempScore; + private BigDecimal maskScore; + private BigDecimal tempThreshold; + private String srcFloor; + private String destFloor; + private String dispatchElevatorNo; + private Long dispatchElevatorTime; + private String personCode; + private String orgId; + private String orgName; + + public String getPersonCode() { + return this.personCode; + } + + public void setPersonCode(String personCode) { + this.personCode = personCode; + } + + public String getOrgId() { + return this.orgId; + } + + public void setOrgId(String orgId) { + this.orgId = orgId; + } + + public String getOrgName() { + return this.orgName; + } + + public void setOrgName(String orgName) { + this.orgName = orgName; + } + + public String getOpenDoorId() { + return this.openDoorId; + } + + public void setOpenDoorId(String openDoorId) { + this.openDoorId = openDoorId; + } + + public String getPanoramaImageRecog() { + return this.panoramaImageRecog; + } + + public void setPanoramaImageRecog(String panoramaImageRecog) { + this.panoramaImageRecog = panoramaImageRecog; + } + + public String getPanoramaImageOpen() { + return this.panoramaImageOpen; + } + + public void setPanoramaImageOpen(String panoramaImageOpen) { + this.panoramaImageOpen = panoramaImageOpen; + } + + public String getFaceImage() { + return this.faceImage; + } + + public void setFaceImage(String faceImage) { + this.faceImage = faceImage; + } + + public String getRegisterImage() { + return this.registerImage; + } + + public void setRegisterImage(String registerImage) { + this.registerImage = registerImage; + } + + public String getPersonName() { + return this.personName; + } + + public void setPersonName(String personName) { + this.personName = personName; + } + + public long getRecognitionTime() { + return this.recognitionTime; + } + + public void setRecognitionTime(long recognitionTime) { + this.recognitionTime = recognitionTime; + } + + public String getDistrictId() { + return this.districtId; + } + + public void setDistrictId(String districtId) { + this.districtId = districtId; + } + + public String getAreaId() { + return this.areaId; + } + + public void setAreaId(String areaId) { + this.areaId = areaId; + } + + public String getDeviceTypeName() { + return this.deviceTypeName; + } + + public void setDeviceTypeName(String deviceTypeName) { + this.deviceTypeName = deviceTypeName; + } + + public String getDeviceName() { + return this.deviceName; + } + + public void setDeviceName(String deviceName) { + this.deviceName = deviceName; + } + + public String getOpenDoorType() { + return this.openDoorType; + } + + public void setOpenDoorType(String openDoorType) { + this.openDoorType = openDoorType; + } + + public String getOperateName() { + return this.operateName; + } + + public void setOperateName(String operateName) { + this.operateName = operateName; + } + + public BigDecimal getScore() { + return this.score; + } + + public void setScore(BigDecimal score) { + this.score = score; + } + + public Integer getRecordResult() { + return this.recordResult; + } + + public void setRecordResult(Integer recordResult) { + this.recordResult = recordResult; + } + + public String getRecognitionNo() { + return this.recognitionNo; + } + + public void setRecognitionNo(String recognitionNo) { + this.recognitionNo = recognitionNo; + } + + public String getRegRecordId() { + return this.regRecordId; + } + + public void setRegRecordId(String regRecordId) { + this.regRecordId = regRecordId; + } + + public BigDecimal getThreshold() { + return this.threshold; + } + + public void setThreshold(BigDecimal threshold) { + this.threshold = threshold; + } + + public Integer getRecognitionResult() { + return this.recognitionResult; + } + + public void setRecognitionResult(Integer recognitionResult) { + this.recognitionResult = recognitionResult; + } + + public String getGroupId() { + return this.groupId; + } + + public void setGroupId(String groupId) { + this.groupId = groupId; + } + + public String getFaceId() { + return this.faceId; + } + + public void setFaceId(String faceId) { + this.faceId = faceId; + } + + public BigDecimal getQualityScore() { + return this.qualityScore; + } + + public void setQualityScore(BigDecimal qualityScore) { + this.qualityScore = qualityScore; + } + + public String getLogId() { + return this.logId; + } + + public void setLogId(String logId) { + this.logId = logId; + } + + public BigDecimal getTempScore() { + return this.tempScore; + } + + public void setTempScore(BigDecimal tempScore) { + this.tempScore = tempScore; + } + + public BigDecimal getMaskScore() { + return this.maskScore; + } + + public void setMaskScore(BigDecimal maskScore) { + this.maskScore = maskScore; + } + + public BigDecimal getTempThreshold() { + return this.tempThreshold; + } + + public void setTempThreshold(BigDecimal tempThreshold) { + this.tempThreshold = tempThreshold; + } + + public String getSrcFloor() { + return this.srcFloor; + } + + public void setSrcFloor(String srcFloor) { + this.srcFloor = srcFloor; + } + + public String getDestFloor() { + return this.destFloor; + } + + public void setDestFloor(String destFloor) { + this.destFloor = destFloor; + } + + public String getDispatchElevatorNo() { + return this.dispatchElevatorNo; + } + + public void setDispatchElevatorNo(String dispatchElevatorNo) { + this.dispatchElevatorNo = dispatchElevatorNo; + } + + public Long getDispatchElevatorTime() { + return this.dispatchElevatorTime; + } + + public void setDispatchElevatorTime(Long dispatchElevatorTime) { + this.dispatchElevatorTime = dispatchElevatorTime; + } + + public String getRecognitionFaceId() { + return this.recognitionFaceId; + } + + public void setRecognitionFaceId(String recognitionFaceId) { + this.recognitionFaceId = recognitionFaceId; + } + + public Integer getIsVisitor() { + return this.isVisitor; + } + + public void setIsVisitor(Integer isVisitor) { + this.isVisitor = isVisitor; + } + + public String getInterviewee() { + return this.interviewee; + } + + public void setInterviewee(String interviewee) { + this.interviewee = interviewee; + } + + public String getPersonId() { + return this.personId; + } + + public void setPersonId(String personId) { + this.personId = personId; + } + + public String getDeviceId() { + return this.deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public String getDeviceCode() { + return this.deviceCode; + } + + public void setDeviceCode(String deviceCode) { + this.deviceCode = deviceCode; + } + + public String toString() { + return "AcsElevatorRecordDetailQueryResultDTO{openDoorId='" + this.openDoorId + '\'' + ", panoramaImageRecog='" + + this.panoramaImageRecog + '\'' + ", panoramaImageOpen='" + this.panoramaImageOpen + '\'' + ", faceImage='" + + this.faceImage + '\'' + ", registerImage='" + this.registerImage + '\'' + ", personName='" + + this.personName + '\'' + ", recognitionTime=" + this.recognitionTime + ", districtId='" + this.districtId + + '\'' + ", areaId='" + this.areaId + '\'' + ", deviceTypeName='" + this.deviceTypeName + '\'' + + ", deviceName='" + this.deviceName + '\'' + ", openDoorType='" + this.openDoorType + '\'' + + ", operateName='" + this.operateName + '\'' + ", score=" + this.score + ", recordResult=" + + this.recordResult + ", recognitionNo='" + this.recognitionNo + '\'' + ", recognitionFaceId='" + + this.recognitionFaceId + '\'' + ", isVisitor=" + this.isVisitor + ", interviewee=" + this.interviewee + + ", regRecordId='" + this.regRecordId + '\'' + ", threshold=" + this.threshold + ", recognitionResult=" + + this.recognitionResult + ", groupId='" + this.groupId + '\'' + ", faceId='" + this.faceId + '\'' + + ", qualityScore=" + this.qualityScore + ", logId='" + this.logId + '\'' + ", tempScore=" + this.tempScore + + ", maskScore=" + this.maskScore + ", tempThreshold=" + this.tempThreshold + ", srcFloor='" + this.srcFloor + + '\'' + ", destFloor='" + this.destFloor + '\'' + ", dispatchElevatorNo='" + this.dispatchElevatorNo + '\'' + + ", dispatchElevatorTime=" + this.dispatchElevatorTime + '}'; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsElevatorRecordExtraDTO.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsElevatorRecordExtraDTO.java new file mode 100644 index 00000000..91ce2b37 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsElevatorRecordExtraDTO.java @@ -0,0 +1,46 @@ +package cn.cloudwalk.elevator.record.dto; + +public class AcsElevatorRecordExtraDTO { + private String srcFloor; + private String destFloor; + private String dispatchElevatorNo; + private Long dispatchElevatorTime; + + public String getSrcFloor() { + return this.srcFloor; + } + + public void setSrcFloor(String srcFloor) { + this.srcFloor = srcFloor; + } + + public String getDestFloor() { + return this.destFloor; + } + + public void setDestFloor(String destFloor) { + this.destFloor = destFloor; + } + + public String getDispatchElevatorNo() { + return this.dispatchElevatorNo; + } + + public void setDispatchElevatorNo(String dispatchElevatorNo) { + this.dispatchElevatorNo = dispatchElevatorNo; + } + + public Long getDispatchElevatorTime() { + return this.dispatchElevatorTime; + } + + public void setDispatchElevatorTime(Long dispatchElevatorTime) { + this.dispatchElevatorTime = dispatchElevatorTime; + } + + public String toString() { + return "AcsElevatorRecordExtraDTO{srcFloor='" + this.srcFloor + '\'' + ", destFloor='" + this.destFloor + '\'' + + ", dispatchElevatorNo='" + this.dispatchElevatorNo + '\'' + ", dispatchElevatorTime=" + + this.dispatchElevatorTime + '}'; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsElevatorRecordQueryResultDTO.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsElevatorRecordQueryResultDTO.java new file mode 100644 index 00000000..2a247c3f --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsElevatorRecordQueryResultDTO.java @@ -0,0 +1,256 @@ +package cn.cloudwalk.elevator.record.dto; + +import cn.cloudwalk.cloud.entity.CloudwalkBaseTimes; +import java.io.Serializable; + +public class AcsElevatorRecordQueryResultDTO extends CloudwalkBaseTimes implements Serializable { + private static final long serialVersionUID = -761586737506722816L; + private String businessId; + private String deviceId; + private String deviceCode; + private String deviceName; + private String deviceTypeId; + private String deviceTypeName; + private String districtId; + private String areaId; + private String openDoorType; + private String operateName; + private String faceImagePath; + private String panoramaImagePath; + private Integer recordResult; + private String recognitionNo; + private Long recognitionTime; + private String logId; + private String recognitionFaceId; + private String srcFloor; + private String destFloor; + private String dispatchElevatorNo; + private Long dispatchElevatorTime; + private Integer isVisitor; + private String interviewee; + private String personCode; + private String orgId; + private String orgName; + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getDeviceId() { + return this.deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public String getDeviceCode() { + return this.deviceCode; + } + + public void setDeviceCode(String deviceCode) { + this.deviceCode = deviceCode; + } + + public String getDeviceName() { + return this.deviceName; + } + + public void setDeviceName(String deviceName) { + this.deviceName = deviceName; + } + + public String getDeviceTypeId() { + return this.deviceTypeId; + } + + public void setDeviceTypeId(String deviceTypeId) { + this.deviceTypeId = deviceTypeId; + } + + public String getDeviceTypeName() { + return this.deviceTypeName; + } + + public void setDeviceTypeName(String deviceTypeName) { + this.deviceTypeName = deviceTypeName; + } + + public String getDistrictId() { + return this.districtId; + } + + public void setDistrictId(String districtId) { + this.districtId = districtId; + } + + public String getAreaId() { + return this.areaId; + } + + public void setAreaId(String areaId) { + this.areaId = areaId; + } + + public String getOpenDoorType() { + return this.openDoorType; + } + + public void setOpenDoorType(String openDoorType) { + this.openDoorType = openDoorType; + } + + public String getOperateName() { + return this.operateName; + } + + public void setOperateName(String operateName) { + this.operateName = operateName; + } + + public String getFaceImagePath() { + return this.faceImagePath; + } + + public void setFaceImagePath(String faceImagePath) { + this.faceImagePath = faceImagePath; + } + + public String getPanoramaImagePath() { + return this.panoramaImagePath; + } + + public void setPanoramaImagePath(String panoramaImagePath) { + this.panoramaImagePath = panoramaImagePath; + } + + public Integer getRecordResult() { + return this.recordResult; + } + + public void setRecordResult(Integer recordResult) { + this.recordResult = recordResult; + } + + public String getRecognitionNo() { + return this.recognitionNo; + } + + public void setRecognitionNo(String recognitionNo) { + this.recognitionNo = recognitionNo; + } + + public Long getRecognitionTime() { + return this.recognitionTime; + } + + public void setRecognitionTime(Long recognitionTime) { + this.recognitionTime = recognitionTime; + } + + public String getLogId() { + return this.logId; + } + + public void setLogId(String logId) { + this.logId = logId; + } + + public String getRecognitionFaceId() { + return this.recognitionFaceId; + } + + public void setRecognitionFaceId(String recognitionFaceId) { + this.recognitionFaceId = recognitionFaceId; + } + + public String getSrcFloor() { + return this.srcFloor; + } + + public void setSrcFloor(String srcFloor) { + this.srcFloor = srcFloor; + } + + public String getDestFloor() { + return this.destFloor; + } + + public void setDestFloor(String destFloor) { + this.destFloor = destFloor; + } + + public String getDispatchElevatorNo() { + return this.dispatchElevatorNo; + } + + public void setDispatchElevatorNo(String dispatchElevatorNo) { + this.dispatchElevatorNo = dispatchElevatorNo; + } + + public Long getDispatchElevatorTime() { + return this.dispatchElevatorTime; + } + + public void setDispatchElevatorTime(Long dispatchElevatorTime) { + this.dispatchElevatorTime = dispatchElevatorTime; + } + + public Integer getIsVisitor() { + return this.isVisitor; + } + + public void setIsVisitor(Integer isVisitor) { + this.isVisitor = isVisitor; + } + + public String getInterviewee() { + return this.interviewee; + } + + public void setInterviewee(String interviewee) { + this.interviewee = interviewee; + } + + public String getPersonCode() { + return this.personCode; + } + + public void setPersonCode(String personCode) { + this.personCode = personCode; + } + + public String getOrgId() { + return this.orgId; + } + + public void setOrgId(String orgId) { + this.orgId = orgId; + } + + public String getOrgName() { + return this.orgName; + } + + public void setOrgName(String orgName) { + this.orgName = orgName; + } + + public String toString() { + return "AcsElevatorRecordQueryResultDTO{businessId='" + this.businessId + '\'' + ", deviceId='" + this.deviceId + + '\'' + ", deviceCode='" + this.deviceCode + '\'' + ", deviceName='" + this.deviceName + '\'' + + ", deviceTypeId='" + this.deviceTypeId + '\'' + ", deviceTypeName='" + this.deviceTypeName + '\'' + + ", districtId='" + this.districtId + '\'' + ", areaId='" + this.areaId + '\'' + ", openDoorType='" + + this.openDoorType + '\'' + ", operateName='" + this.operateName + '\'' + ", faceImagePath='" + + this.faceImagePath + '\'' + ", panoramaImagePath='" + this.panoramaImagePath + '\'' + ", recordResult=" + + this.recordResult + ", recognitionNo='" + this.recognitionNo + '\'' + ", recognitionTime=" + + this.recognitionTime + ", logId='" + this.logId + '\'' + ", recognitionFaceId='" + this.recognitionFaceId + + '\'' + ", srcFloor='" + this.srcFloor + '\'' + ", destFloor='" + this.destFloor + '\'' + + ", dispatchElevatorNo='" + this.dispatchElevatorNo + '\'' + ", dispatchElevatorTime=" + + this.dispatchElevatorTime + '}'; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsOpenDoorRecordEditDTO.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsOpenDoorRecordEditDTO.java new file mode 100644 index 00000000..bd9e4146 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsOpenDoorRecordEditDTO.java @@ -0,0 +1,144 @@ +package cn.cloudwalk.elevator.record.dto; + +import cn.cloudwalk.cloud.entity.CloudwalkBaseTimes; +import java.io.Serializable; + +public class AcsOpenDoorRecordEditDTO extends CloudwalkBaseTimes implements Serializable { + private static final long serialVersionUID = 885170301572808321L; + private String businessId; + private String deviceId; + private String deviceCode; + private String openDoorType; + private String operateName; + private String faceImagePath; + private String panoramaImagePath; + private Integer recordResult; + private String recognitionNo; + private Long recognitionTime; + private String logId; + private String recognitionFaceId; + private Long startDay; + private Long endDay; + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getDeviceId() { + return this.deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public String getDeviceCode() { + return this.deviceCode; + } + + public void setDeviceCode(String deviceCode) { + this.deviceCode = deviceCode; + } + + public String getOpenDoorType() { + return this.openDoorType; + } + + public void setOpenDoorType(String openDoorType) { + this.openDoorType = openDoorType; + } + + public String getOperateName() { + return this.operateName; + } + + public void setOperateName(String operateName) { + this.operateName = operateName; + } + + public String getFaceImagePath() { + return this.faceImagePath; + } + + public void setFaceImagePath(String faceImagePath) { + this.faceImagePath = faceImagePath; + } + + public String getPanoramaImagePath() { + return this.panoramaImagePath; + } + + public void setPanoramaImagePath(String panoramaImagePath) { + this.panoramaImagePath = panoramaImagePath; + } + + public Integer getRecordResult() { + return this.recordResult; + } + + public void setRecordResult(Integer recordResult) { + this.recordResult = recordResult; + } + + public String getRecognitionNo() { + return this.recognitionNo; + } + + public void setRecognitionNo(String recognitionNo) { + this.recognitionNo = recognitionNo; + } + + public Long getRecognitionTime() { + return this.recognitionTime; + } + + public void setRecognitionTime(Long recognitionTime) { + this.recognitionTime = recognitionTime; + } + + public String getLogId() { + return this.logId; + } + + public void setLogId(String logId) { + this.logId = logId; + } + + public String getRecognitionFaceId() { + return this.recognitionFaceId; + } + + public void setRecognitionFaceId(String recognitionFaceId) { + this.recognitionFaceId = recognitionFaceId; + } + + public Long getStartDay() { + return this.startDay; + } + + public void setStartDay(Long startDay) { + this.startDay = startDay; + } + + public Long getEndDay() { + return this.endDay; + } + + public void setEndDay(Long endDay) { + this.endDay = endDay; + } + + public String toString() { + return "AcsOpenDoorRecordEditDTO{businessId='" + this.businessId + '\'' + ", deviceId='" + this.deviceId + '\'' + + ", deviceCode='" + this.deviceCode + '\'' + ", openDoorType='" + this.openDoorType + '\'' + + ", operateName='" + this.operateName + '\'' + ", faceImagePath='" + this.faceImagePath + '\'' + + ", panoramaImagePath='" + this.panoramaImagePath + '\'' + ", recordResult=" + this.recordResult + + ", recognitionNo='" + this.recognitionNo + '\'' + ", recognitionTime=" + this.recognitionTime + + ", logId='" + this.logId + '\'' + ", recognitionFaceId='" + this.recognitionFaceId + '\'' + ", startDay=" + + this.startDay + ", endDay=" + this.endDay + '}'; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsOpenDoorRecordQueryDTO.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsOpenDoorRecordQueryDTO.java new file mode 100644 index 00000000..c84d51e6 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsOpenDoorRecordQueryDTO.java @@ -0,0 +1,61 @@ +package cn.cloudwalk.elevator.record.dto; + +import java.io.Serializable; + +public class AcsOpenDoorRecordQueryDTO implements Serializable { + private static final long serialVersionUID = 2759536962618796129L; + private String id; + private String businessId; + private Long startDay; + private Long endDay; + private Integer recordResult; + private String logId; + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public Long getStartDay() { + return this.startDay; + } + + public void setStartDay(Long startDay) { + this.startDay = startDay; + } + + public Long getEndDay() { + return this.endDay; + } + + public void setEndDay(Long endDay) { + this.endDay = endDay; + } + + public Integer getRecordResult() { + return this.recordResult; + } + + public void setRecordResult(Integer recordResult) { + this.recordResult = recordResult; + } + + public String getLogId() { + return this.logId; + } + + public void setLogId(String logId) { + this.logId = logId; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsPersonInfoResultDTO.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsPersonInfoResultDTO.java new file mode 100644 index 00000000..34dbc96d --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsPersonInfoResultDTO.java @@ -0,0 +1,24 @@ +package cn.cloudwalk.elevator.record.dto; + +import java.io.Serializable; + +public class AcsPersonInfoResultDTO implements Serializable { + private String id; + private String comparePicture; + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public String getComparePicture() { + return this.comparePicture; + } + + public void setComparePicture(String comparePicture) { + this.comparePicture = comparePicture; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsRecogRecordAddDTO.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsRecogRecordAddDTO.java new file mode 100644 index 00000000..6db2a672 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsRecogRecordAddDTO.java @@ -0,0 +1,332 @@ +package cn.cloudwalk.elevator.record.dto; + +import cn.cloudwalk.cloud.entity.CloudwalkBaseTimes; +import java.io.Serializable; +import java.math.BigDecimal; + +public class AcsRecogRecordAddDTO extends CloudwalkBaseTimes implements Serializable { + private String personId; + private String personName; + private String businessId; + private String deviceId; + private String deviceCode; + private String deviceName; + private BigDecimal threshold; + private String districtId; + private String areaId; + private String deviceTypeId; + private String deviceTypeName; + private String subDeviceId; + private String subDeviceCode; + private String subDeviceName; + private String subDeviceTypeId; + private String subDeviceTypeName; + private String registerImagePath; + private String faceImagePath; + private String panoramaImagePath; + private BigDecimal score; + private Integer recognitionResult; + private Long recognitionTime; + private String groupId; + private String faceId; + private BigDecimal qualityScore; + private String logId; + private BigDecimal tempScore; + private BigDecimal maskScore; + private BigDecimal tempThreshold; + private String cardType; + private Integer source; + private String tempImagePath; + private String remark; + private String personLabelIds; + + public String getPersonId() { + return this.personId; + } + + public void setPersonId(String personId) { + this.personId = personId; + } + + public String getPersonName() { + return this.personName; + } + + public void setPersonName(String personName) { + this.personName = personName; + } + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getDeviceId() { + return this.deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public String getDeviceCode() { + return this.deviceCode; + } + + public void setDeviceCode(String deviceCode) { + this.deviceCode = deviceCode; + } + + public String getDeviceName() { + return this.deviceName; + } + + public void setDeviceName(String deviceName) { + this.deviceName = deviceName; + } + + public BigDecimal getThreshold() { + return this.threshold; + } + + public void setThreshold(BigDecimal threshold) { + this.threshold = threshold; + } + + public String getDistrictId() { + return this.districtId; + } + + public void setDistrictId(String districtId) { + this.districtId = districtId; + } + + public String getAreaId() { + return this.areaId; + } + + public void setAreaId(String areaId) { + this.areaId = areaId; + } + + public String getDeviceTypeId() { + return this.deviceTypeId; + } + + public void setDeviceTypeId(String deviceTypeId) { + this.deviceTypeId = deviceTypeId; + } + + public String getDeviceTypeName() { + return this.deviceTypeName; + } + + public void setDeviceTypeName(String deviceTypeName) { + this.deviceTypeName = deviceTypeName; + } + + public String getRegisterImagePath() { + return this.registerImagePath; + } + + public void setRegisterImagePath(String registerImagePath) { + this.registerImagePath = registerImagePath; + } + + public String getFaceImagePath() { + return this.faceImagePath; + } + + public void setFaceImagePath(String faceImagePath) { + this.faceImagePath = faceImagePath; + } + + public String getPanoramaImagePath() { + return this.panoramaImagePath; + } + + public void setPanoramaImagePath(String panoramaImagePath) { + this.panoramaImagePath = panoramaImagePath; + } + + public BigDecimal getScore() { + return this.score; + } + + public void setScore(BigDecimal score) { + this.score = score; + } + + public Integer getRecognitionResult() { + return this.recognitionResult; + } + + public void setRecognitionResult(Integer recognitionResult) { + this.recognitionResult = recognitionResult; + } + + public Long getRecognitionTime() { + return this.recognitionTime; + } + + public void setRecognitionTime(Long recognitionTime) { + this.recognitionTime = recognitionTime; + } + + public String getGroupId() { + return this.groupId; + } + + public void setGroupId(String groupId) { + this.groupId = groupId; + } + + public String getFaceId() { + return this.faceId; + } + + public void setFaceId(String faceId) { + this.faceId = faceId; + } + + public BigDecimal getQualityScore() { + return this.qualityScore; + } + + public void setQualityScore(BigDecimal qualityScore) { + this.qualityScore = qualityScore; + } + + public String getLogId() { + return this.logId; + } + + public void setLogId(String logId) { + this.logId = logId; + } + + public BigDecimal getTempScore() { + return this.tempScore; + } + + public void setTempScore(BigDecimal tempScore) { + this.tempScore = tempScore; + } + + public BigDecimal getMaskScore() { + return this.maskScore; + } + + public void setMaskScore(BigDecimal maskScore) { + this.maskScore = maskScore; + } + + public BigDecimal getTempThreshold() { + return this.tempThreshold; + } + + public void setTempThreshold(BigDecimal tempThreshold) { + this.tempThreshold = tempThreshold; + } + + public String getCardType() { + return this.cardType; + } + + public void setCardType(String cardType) { + this.cardType = cardType; + } + + public Integer getSource() { + return this.source; + } + + public void setSource(Integer source) { + this.source = source; + } + + public String getTempImagePath() { + return this.tempImagePath; + } + + public void setTempImagePath(String tempImagePath) { + this.tempImagePath = tempImagePath; + } + + public String getRemark() { + return this.remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public String getSubDeviceId() { + return this.subDeviceId; + } + + public void setSubDeviceId(String subDeviceId) { + this.subDeviceId = subDeviceId; + } + + public String getSubDeviceCode() { + return this.subDeviceCode; + } + + public void setSubDeviceCode(String subDeviceCode) { + this.subDeviceCode = subDeviceCode; + } + + public String getSubDeviceName() { + return this.subDeviceName; + } + + public void setSubDeviceName(String subDeviceName) { + this.subDeviceName = subDeviceName; + } + + public String getSubDeviceTypeId() { + return this.subDeviceTypeId; + } + + public void setSubDeviceTypeId(String subDeviceTypeId) { + this.subDeviceTypeId = subDeviceTypeId; + } + + public String getSubDeviceTypeName() { + return this.subDeviceTypeName; + } + + public void setSubDeviceTypeName(String subDeviceTypeName) { + this.subDeviceTypeName = subDeviceTypeName; + } + + public String getPersonLabelIds() { + return this.personLabelIds; + } + + public void setPersonLabelIds(String personLabelIds) { + this.personLabelIds = personLabelIds; + } + + public String toString() { + return "AcsRecogRecordAddDTO{personId='" + this.personId + '\'' + ", personName='" + this.personName + '\'' + + ", businessId='" + this.businessId + '\'' + ", deviceId='" + this.deviceId + '\'' + ", deviceCode='" + + this.deviceCode + '\'' + ", deviceName='" + this.deviceName + '\'' + ", threshold=" + this.threshold + + ", districtId='" + this.districtId + '\'' + ", areaId='" + this.areaId + '\'' + ", deviceTypeId='" + + this.deviceTypeId + '\'' + ", deviceTypeName='" + this.deviceTypeName + '\'' + ", subDeviceId='" + + this.subDeviceId + '\'' + ", subDeviceCode='" + this.subDeviceCode + '\'' + ", subDeviceName='" + + this.subDeviceName + '\'' + ", subDeviceTypeId='" + this.subDeviceTypeId + '\'' + ", subDeviceTypeName='" + + this.subDeviceTypeName + '\'' + ", registerImagePath='" + this.registerImagePath + '\'' + + ", faceImagePath='" + this.faceImagePath + '\'' + ", panoramaImagePath='" + this.panoramaImagePath + '\'' + + ", score=" + this.score + ", recognitionResult=" + this.recognitionResult + ", recognitionTime=" + + this.recognitionTime + ", groupId='" + this.groupId + '\'' + ", faceId='" + this.faceId + '\'' + + ", qualityScore=" + this.qualityScore + ", logId='" + this.logId + '\'' + ", tempScore=" + this.tempScore + + ", maskScore=" + this.maskScore + ", tempThreshold=" + this.tempThreshold + ", cardType='" + this.cardType + + '\'' + ", source=" + this.source + ", tempImagePath='" + this.tempImagePath + '\'' + ", remark='" + + this.remark + '\'' + ", personLabelIds='" + this.personLabelIds + '\'' + '}'; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsRecogRecordPageDTO.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsRecogRecordPageDTO.java new file mode 100644 index 00000000..4cef196e --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsRecogRecordPageDTO.java @@ -0,0 +1,97 @@ +package cn.cloudwalk.elevator.record.dto; + +import java.io.Serializable; +import java.util.List; + +public class AcsRecogRecordPageDTO implements Serializable { + private String businessId; + private Long startTime; + private Long endTime; + private String personName; + private String logId; + private List districtIds; + private List areaIds; + private List deviceIds; + private Integer recognitionResult; + private Integer compareType; + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public void setStartTime(Long startTime) { + this.startTime = startTime; + } + + public void setEndTime(Long endTime) { + this.endTime = endTime; + } + + public void setPersonName(String personName) { + this.personName = personName; + } + + public void setLogId(String logId) { + this.logId = logId; + } + + public void setDistrictIds(List districtIds) { + this.districtIds = districtIds; + } + + public void setAreaIds(List areaIds) { + this.areaIds = areaIds; + } + + public void setDeviceIds(List deviceIds) { + this.deviceIds = deviceIds; + } + + public void setRecognitionResult(Integer recognitionResult) { + this.recognitionResult = recognitionResult; + } + + public void setCompareType(Integer compareType) { + this.compareType = compareType; + } + + public String getBusinessId() { + return this.businessId; + } + + public Long getStartTime() { + return this.startTime; + } + + public Long getEndTime() { + return this.endTime; + } + + public String getPersonName() { + return this.personName; + } + + public String getLogId() { + return this.logId; + } + + public List getDistrictIds() { + return this.districtIds; + } + + public List getAreaIds() { + return this.areaIds; + } + + public List getDeviceIds() { + return this.deviceIds; + } + + public Integer getRecognitionResult() { + return this.recognitionResult; + } + + public Integer getCompareType() { + return this.compareType; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsRecogRecordResultDTO.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsRecogRecordResultDTO.java new file mode 100644 index 00000000..94f73def --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsRecogRecordResultDTO.java @@ -0,0 +1,377 @@ +package cn.cloudwalk.elevator.record.dto; + +import java.io.Serializable; +import java.math.BigDecimal; + +public class AcsRecogRecordResultDTO implements Serializable { + private String id; + private String personId; + private String personName; + private String businessId; + private String deviceId; + private String deviceCode; + private String deviceName; + private BigDecimal threshold; + private String districtId; + private String areaId; + private String deviceTypeId; + private String deviceTypeName; + private String subDeviceId; + private String subDeviceCode; + private String subDeviceName; + private String subDeviceTypeId; + private String subDeviceTypeName; + private String registerImagePath; + private String faceImagePath; + private String panoramaImagePath; + private BigDecimal score; + private Integer recognitionResult; + private Long recognitionTime; + private String groupId; + private String faceId; + private BigDecimal qualityScore; + private String logId; + private BigDecimal tempScore; + private BigDecimal maskScore; + private BigDecimal tempThreshold; + private String remark; + private Long createTime; + private String createUserId; + private Long lastUpdateTime; + private String lastUpdateUserId; + private String personLabelIds; + private static final long serialVersionUID = 1L; + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public String getPersonId() { + return this.personId; + } + + public void setPersonId(String personId) { + this.personId = personId; + } + + public String getPersonName() { + return this.personName; + } + + public void setPersonName(String personName) { + this.personName = personName; + } + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getDeviceId() { + return this.deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public String getDeviceCode() { + return this.deviceCode; + } + + public void setDeviceCode(String deviceCode) { + this.deviceCode = deviceCode; + } + + public String getDeviceName() { + return this.deviceName; + } + + public void setDeviceName(String deviceName) { + this.deviceName = deviceName; + } + + public BigDecimal getThreshold() { + return this.threshold; + } + + public void setThreshold(BigDecimal threshold) { + this.threshold = threshold; + } + + public String getDistrictId() { + return this.districtId; + } + + public void setDistrictId(String districtId) { + this.districtId = districtId; + } + + public String getAreaId() { + return this.areaId; + } + + public void setAreaId(String areaId) { + this.areaId = areaId; + } + + public String getDeviceTypeId() { + return this.deviceTypeId; + } + + public void setDeviceTypeId(String deviceTypeId) { + this.deviceTypeId = deviceTypeId; + } + + public String getDeviceTypeName() { + return this.deviceTypeName; + } + + public void setDeviceTypeName(String deviceTypeName) { + this.deviceTypeName = deviceTypeName; + } + + public String getRegisterImagePath() { + return this.registerImagePath; + } + + public void setRegisterImagePath(String registerImagePath) { + this.registerImagePath = registerImagePath; + } + + public String getFaceImagePath() { + return this.faceImagePath; + } + + public void setFaceImagePath(String faceImagePath) { + this.faceImagePath = faceImagePath; + } + + public String getPanoramaImagePath() { + return this.panoramaImagePath; + } + + public void setPanoramaImagePath(String panoramaImagePath) { + this.panoramaImagePath = panoramaImagePath; + } + + public BigDecimal getScore() { + return this.score; + } + + public void setScore(BigDecimal score) { + this.score = score; + } + + public Integer getRecognitionResult() { + return this.recognitionResult; + } + + public void setRecognitionResult(Integer recognitionResult) { + this.recognitionResult = recognitionResult; + } + + public Long getRecognitionTime() { + return this.recognitionTime; + } + + public void setRecognitionTime(Long recognitionTime) { + this.recognitionTime = recognitionTime; + } + + public String getGroupId() { + return this.groupId; + } + + public void setGroupId(String groupId) { + this.groupId = groupId; + } + + public String getFaceId() { + return this.faceId; + } + + public void setFaceId(String faceId) { + this.faceId = faceId; + } + + public BigDecimal getQualityScore() { + return this.qualityScore; + } + + public void setQualityScore(BigDecimal qualityScore) { + this.qualityScore = qualityScore; + } + + public String getLogId() { + return this.logId; + } + + public void setLogId(String logId) { + this.logId = logId; + } + + public BigDecimal getTempScore() { + return this.tempScore; + } + + public void setTempScore(BigDecimal tempScore) { + this.tempScore = tempScore; + } + + public BigDecimal getMaskScore() { + return this.maskScore; + } + + public void setMaskScore(BigDecimal maskScore) { + this.maskScore = maskScore; + } + + public BigDecimal getTempThreshold() { + return this.tempThreshold; + } + + public void setTempThreshold(BigDecimal tempThreshold) { + this.tempThreshold = tempThreshold; + } + + public String getRemark() { + return this.remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public Long getCreateTime() { + return this.createTime; + } + + public void setCreateTime(Long createTime) { + this.createTime = createTime; + } + + public String getCreateUserId() { + return this.createUserId; + } + + public void setCreateUserId(String createUserId) { + this.createUserId = createUserId; + } + + public Long getLastUpdateTime() { + return this.lastUpdateTime; + } + + public void setLastUpdateTime(Long lastUpdateTime) { + this.lastUpdateTime = lastUpdateTime; + } + + public String getLastUpdateUserId() { + return this.lastUpdateUserId; + } + + public void setLastUpdateUserId(String lastUpdateUserId) { + this.lastUpdateUserId = lastUpdateUserId; + } + + public String getSubDeviceId() { + return this.subDeviceId; + } + + public void setSubDeviceId(String subDeviceId) { + this.subDeviceId = subDeviceId; + } + + public String getSubDeviceCode() { + return this.subDeviceCode; + } + + public void setSubDeviceCode(String subDeviceCode) { + this.subDeviceCode = subDeviceCode; + } + + public String getSubDeviceName() { + return this.subDeviceName; + } + + public void setSubDeviceName(String subDeviceName) { + this.subDeviceName = subDeviceName; + } + + public String getSubDeviceTypeId() { + return this.subDeviceTypeId; + } + + public void setSubDeviceTypeId(String subDeviceTypeId) { + this.subDeviceTypeId = subDeviceTypeId; + } + + public String getSubDeviceTypeName() { + return this.subDeviceTypeName; + } + + public void setSubDeviceTypeName(String subDeviceTypeName) { + this.subDeviceTypeName = subDeviceTypeName; + } + + public String getPersonLabelIds() { + return this.personLabelIds; + } + + public void setPersonLabelIds(String personLabelIds) { + this.personLabelIds = personLabelIds; + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(this.id); + sb.append(", personId=").append(this.personId); + sb.append(", personName=").append(this.personName); + sb.append(", businessId=").append(this.businessId); + sb.append(", deviceId=").append(this.deviceId); + sb.append(", deviceCode=").append(this.deviceCode); + sb.append(", deviceName=").append(this.deviceName); + sb.append(", threshold=").append(this.threshold); + sb.append(", districtId=").append(this.districtId); + sb.append(", areaId=").append(this.areaId); + sb.append(", deviceTypeId=").append(this.deviceTypeId); + sb.append(", deviceTypeName=").append(this.deviceTypeName); + sb.append(", subDeviceId=").append(this.subDeviceId); + sb.append(", subDeviceCode=").append(this.subDeviceCode); + sb.append(", subDeviceName=").append(this.subDeviceName); + sb.append(", subDeviceTypeId=").append(this.subDeviceTypeId); + sb.append(", subDeviceTypeName=").append(this.subDeviceTypeName); + sb.append(", registerImagePath=").append(this.registerImagePath); + sb.append(", faceImagePath=").append(this.faceImagePath); + sb.append(", panoramaImagePath=").append(this.panoramaImagePath); + sb.append(", score=").append(this.score); + sb.append(", recognitionResult=").append(this.recognitionResult); + sb.append(", recognitionTime=").append(this.recognitionTime); + sb.append(", groupId=").append(this.groupId); + sb.append(", faceId=").append(this.faceId); + sb.append(", qualityScore=").append(this.qualityScore); + sb.append(", logId=").append(this.logId); + sb.append(", tempScore=").append(this.tempScore); + sb.append(", maskScore=").append(this.maskScore); + sb.append(", tempThreshold=").append(this.tempThreshold); + sb.append(", remark=").append(this.remark); + sb.append(", createTime=").append(this.createTime); + sb.append(", createUserId=").append(this.createUserId); + sb.append(", lastUpdateTime=").append(this.lastUpdateTime); + sb.append(", lastUpdateUserId=").append(this.lastUpdateUserId); + sb.append(", personLabelIds=").append(this.personLabelIds); + sb.append("]"); + return sb.toString(); + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsRecordDetailQueryResultDTO.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsRecordDetailQueryResultDTO.java new file mode 100644 index 00000000..a8471e6f --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsRecordDetailQueryResultDTO.java @@ -0,0 +1,244 @@ +package cn.cloudwalk.elevator.record.dto; + +import cn.cloudwalk.elevator.annontation.DavinciPic; +import java.io.Serializable; +import java.math.BigDecimal; + +public class AcsRecordDetailQueryResultDTO implements Serializable { + private static final long serialVersionUID = 4497772884928418301L; + private String openDoorId; + private String panoramaImageRecog; + private String panoramaImageOpen; + private String faceImage; + @DavinciPic + private String registerImage; + private String personName; + private long recognitionTime; + private String districtId; + private String areaId; + private String deviceTypeName; + private String deviceName; + private String openDoorType; + private String operateName; + private BigDecimal score; + private Integer recordResult; + private String recognitionNo; + private String regRecordId; + private BigDecimal threshold; + private Integer recognitionResult; + private String groupId; + private String faceId; + private BigDecimal qualityScore; + private String logId; + private BigDecimal tempScore; + private BigDecimal maskScore; + private BigDecimal tempThreshold; + + public String getOpenDoorId() { + return this.openDoorId; + } + + public void setOpenDoorId(String openDoorId) { + this.openDoorId = openDoorId; + } + + public String getPanoramaImageRecog() { + return this.panoramaImageRecog; + } + + public void setPanoramaImageRecog(String panoramaImageRecog) { + this.panoramaImageRecog = panoramaImageRecog; + } + + public String getPanoramaImageOpen() { + return this.panoramaImageOpen; + } + + public void setPanoramaImageOpen(String panoramaImageOpen) { + this.panoramaImageOpen = panoramaImageOpen; + } + + public String getFaceImage() { + return this.faceImage; + } + + public void setFaceImage(String faceImage) { + this.faceImage = faceImage; + } + + public String getRegisterImage() { + return this.registerImage; + } + + public void setRegisterImage(String registerImage) { + this.registerImage = registerImage; + } + + public String getPersonName() { + return this.personName; + } + + public void setPersonName(String personName) { + this.personName = personName; + } + + public long getRecognitionTime() { + return this.recognitionTime; + } + + public void setRecognitionTime(long recognitionTime) { + this.recognitionTime = recognitionTime; + } + + public String getDistrictId() { + return this.districtId; + } + + public void setDistrictId(String districtId) { + this.districtId = districtId; + } + + public String getAreaId() { + return this.areaId; + } + + public void setAreaId(String areaId) { + this.areaId = areaId; + } + + public String getDeviceTypeName() { + return this.deviceTypeName; + } + + public void setDeviceTypeName(String deviceTypeName) { + this.deviceTypeName = deviceTypeName; + } + + public String getDeviceName() { + return this.deviceName; + } + + public void setDeviceName(String deviceName) { + this.deviceName = deviceName; + } + + public String getOpenDoorType() { + return this.openDoorType; + } + + public void setOpenDoorType(String openDoorType) { + this.openDoorType = openDoorType; + } + + public String getOperateName() { + return this.operateName; + } + + public void setOperateName(String operateName) { + this.operateName = operateName; + } + + public BigDecimal getScore() { + return this.score; + } + + public void setScore(BigDecimal score) { + this.score = score; + } + + public Integer getRecordResult() { + return this.recordResult; + } + + public void setRecordResult(Integer recordResult) { + this.recordResult = recordResult; + } + + public String getRecognitionNo() { + return this.recognitionNo; + } + + public void setRecognitionNo(String recognitionNo) { + this.recognitionNo = recognitionNo; + } + + public String getRegRecordId() { + return this.regRecordId; + } + + public void setRegRecordId(String regRecordId) { + this.regRecordId = regRecordId; + } + + public BigDecimal getThreshold() { + return this.threshold; + } + + public void setThreshold(BigDecimal threshold) { + this.threshold = threshold; + } + + public Integer getRecognitionResult() { + return this.recognitionResult; + } + + public void setRecognitionResult(Integer recognitionResult) { + this.recognitionResult = recognitionResult; + } + + public String getGroupId() { + return this.groupId; + } + + public void setGroupId(String groupId) { + this.groupId = groupId; + } + + public String getFaceId() { + return this.faceId; + } + + public void setFaceId(String faceId) { + this.faceId = faceId; + } + + public BigDecimal getQualityScore() { + return this.qualityScore; + } + + public void setQualityScore(BigDecimal qualityScore) { + this.qualityScore = qualityScore; + } + + public String getLogId() { + return this.logId; + } + + public void setLogId(String logId) { + this.logId = logId; + } + + public BigDecimal getTempScore() { + return this.tempScore; + } + + public void setTempScore(BigDecimal tempScore) { + this.tempScore = tempScore; + } + + public BigDecimal getMaskScore() { + return this.maskScore; + } + + public void setMaskScore(BigDecimal maskScore) { + this.maskScore = maskScore; + } + + public BigDecimal getTempThreshold() { + return this.tempThreshold; + } + + public void setTempThreshold(BigDecimal tempThreshold) { + this.tempThreshold = tempThreshold; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsRecordThreeSendQueryDTO.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsRecordThreeSendQueryDTO.java new file mode 100644 index 00000000..571fbf08 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/AcsRecordThreeSendQueryDTO.java @@ -0,0 +1,34 @@ +package cn.cloudwalk.elevator.record.dto; + +import java.io.Serializable; + +public class AcsRecordThreeSendQueryDTO implements Serializable { + private static final long serialVersionUID = -4419274892857176883L; + private String businessId; + private Long startTime; + private Long endTime; + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public Long getStartTime() { + return this.startTime; + } + + public void setStartTime(Long startTime) { + this.startTime = startTime; + } + + public Long getEndTime() { + return this.endTime; + } + + public void setEndTime(Long endTime) { + this.endTime = endTime; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/SendRecordTimeAddDTO.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/SendRecordTimeAddDTO.java new file mode 100644 index 00000000..39fd3f3b --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/SendRecordTimeAddDTO.java @@ -0,0 +1,24 @@ +package cn.cloudwalk.elevator.record.dto; + +import java.io.Serializable; + +public class SendRecordTimeAddDTO implements Serializable { + private Long time; + private Integer type; + + public Long getTime() { + return this.time; + } + + public void setTime(Long time) { + this.time = time; + } + + public Integer getType() { + return this.type; + } + + public void setType(Integer type) { + this.type = type; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/SendRecordTimeEditDTO.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/SendRecordTimeEditDTO.java new file mode 100644 index 00000000..2aa7a3c8 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/SendRecordTimeEditDTO.java @@ -0,0 +1,24 @@ +package cn.cloudwalk.elevator.record.dto; + +import java.io.Serializable; + +public class SendRecordTimeEditDTO implements Serializable { + private Long time; + private Integer type; + + public Long getTime() { + return this.time; + } + + public void setTime(Long time) { + this.time = time; + } + + public Integer getType() { + return this.type; + } + + public void setType(Integer type) { + this.type = type; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/SendRecordTimeResultDTO.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/SendRecordTimeResultDTO.java new file mode 100644 index 00000000..cf7269c3 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/dto/SendRecordTimeResultDTO.java @@ -0,0 +1,24 @@ +package cn.cloudwalk.elevator.record.dto; + +import java.io.Serializable; + +public class SendRecordTimeResultDTO implements Serializable { + private Long time; + private Integer type; + + public Long getTime() { + return this.time; + } + + public void setTime(Long time) { + this.time = time; + } + + public Integer getType() { + return this.type; + } + + public void setType(Integer type) { + this.type = type; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/impl/AcsElevatorRecordDaoImpl.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/impl/AcsElevatorRecordDaoImpl.java new file mode 100644 index 00000000..9794ffcc --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/impl/AcsElevatorRecordDaoImpl.java @@ -0,0 +1,113 @@ +package cn.cloudwalk.elevator.record.impl; + +import cn.cloudwalk.cloud.exception.DataAccessException; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.page.CloudwalkPageInfo; +import cn.cloudwalk.elevator.record.dao.AcsElevatorRecordDao; +import cn.cloudwalk.elevator.record.dto.AcsElevatorAnalyseCycleBusinessResultDTO; +import cn.cloudwalk.elevator.record.dto.AcsElevatorPageRequestInfoResultDTO; +import cn.cloudwalk.elevator.record.dto.AcsElevatorQueryCountDTO; +import cn.cloudwalk.elevator.record.dto.AcsElevatorRecordAddDTO; +import cn.cloudwalk.elevator.record.dto.AcsElevatorRecordDetailQueryDTO; +import cn.cloudwalk.elevator.record.dto.AcsElevatorRecordDetailQueryResultDTO; +import cn.cloudwalk.elevator.record.dto.AcsElevatorRecordQueryResultDTO; +import cn.cloudwalk.elevator.record.dto.AcsOpenDoorRecordEditDTO; +import cn.cloudwalk.elevator.record.dto.AcsOpenDoorRecordQueryDTO; +import cn.cloudwalk.elevator.record.dto.AcsRecordThreeSendQueryDTO; +import cn.cloudwalk.elevator.record.mapper.AcsElevatorRecordMapper; +import com.github.pagehelper.Page; +import com.github.pagehelper.page.PageMethod; +import java.util.List; +import javax.annotation.Resource; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Repository; + +@Repository +public class AcsElevatorRecordDaoImpl implements AcsElevatorRecordDao { + @Resource + private AcsElevatorRecordMapper acsElevatorRecordMapper; + protected final Logger logger = LoggerFactory.getLogger(getClass()); + + public CloudwalkPageAble detail(AcsElevatorRecordDetailQueryDTO queryDTO, + CloudwalkPageInfo pageInfo) throws DataAccessException { + try { + PageMethod.startPage(pageInfo.getCurrentPage(), pageInfo.getPageSize()); + Page result = + (Page)this.acsElevatorRecordMapper.page(queryDTO); + return new CloudwalkPageAble(result.getResult(), pageInfo, result.getTotal()); + } catch (Exception e) { + this.logger.error("保存刷脸派梯记录失败,原因:", e); + throw new DataAccessException(e); + } + } + + public Integer add(AcsElevatorRecordAddDTO dto) throws DataAccessException { + try { + return Integer.valueOf(this.acsElevatorRecordMapper.add(dto)); + } catch (Exception e) { + this.logger.error("保存刷脸派梯记录失败,原因:", e); + throw new DataAccessException(e); + } + } + + public int update(AcsOpenDoorRecordEditDTO dto) throws DataAccessException { + try { + return this.acsElevatorRecordMapper.update(dto); + } catch (Exception e) { + this.logger.error("保存刷脸派梯记录失败,原因:", e); + throw new DataAccessException(e); + } + } + + public List query(AcsOpenDoorRecordQueryDTO dto) throws DataAccessException { + try { + return this.acsElevatorRecordMapper.query(dto); + } catch (Exception e) { + this.logger.error("保存刷脸派梯记录失败,原因:", e); + throw new DataAccessException(e); + } + } + + public List listByRecognitionTime(AcsRecordThreeSendQueryDTO queryDTO) + throws DataAccessException { + try { + return this.acsElevatorRecordMapper.listByRecognitionTime(queryDTO); + } catch (Exception e) { + this.logger.error("根据识别时间查询派梯记录失败,原因:", e); + throw new DataAccessException(e); + } + } + + public AcsElevatorPageRequestInfoResultDTO pageRequestInfo(String businessId) throws DataAccessException { + try { + AcsElevatorPageRequestInfoResultDTO infoResultDTO = new AcsElevatorPageRequestInfoResultDTO(); + infoResultDTO.setSrcFloorList(this.acsElevatorRecordMapper.srcFloor(businessId)); + infoResultDTO.setDestFloorList(this.acsElevatorRecordMapper.destFloor(businessId)); + infoResultDTO.setDispatchElevatorNoList(this.acsElevatorRecordMapper.dispatchElevatorNo(businessId)); + return infoResultDTO; + } catch (Exception e) { + this.logger.error("开门记录分页请求数据查询失败,原因:", e); + throw new DataAccessException(e); + } + } + + public Integer analyseCount(AcsElevatorQueryCountDTO acsElevatorQueryCountDTO) throws DataAccessException { + try { + return this.acsElevatorRecordMapper.analyseCount(acsElevatorQueryCountDTO); + } catch (Exception e) { + this.logger.error("开门记录统计分析查询失败,原因:", e); + throw new DataAccessException(e); + } + } + + public List + analyseGroup(AcsElevatorQueryCountDTO acsElevatorQueryCountDTO) throws DataAccessException { + try { + return this.acsElevatorRecordMapper.analyseGroup(acsElevatorQueryCountDTO); + } catch (Exception e) { + this.logger.error("开门记录统计分析分组查询失败,原因:", e); + throw new DataAccessException(e); + } + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/impl/AcsRecogRecordDaoImpl.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/impl/AcsRecogRecordDaoImpl.java new file mode 100644 index 00000000..ad58f777 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/impl/AcsRecogRecordDaoImpl.java @@ -0,0 +1,47 @@ +package cn.cloudwalk.elevator.record.impl; + +import cn.cloudwalk.cloud.exception.DataAccessException; +import cn.cloudwalk.elevator.record.dao.AcsRecogRecordDao; +import cn.cloudwalk.elevator.record.dto.AcsRecogRecordAddDTO; +import cn.cloudwalk.elevator.record.dto.AcsRecogRecordPageDTO; +import cn.cloudwalk.elevator.record.dto.AcsRecogRecordResultDTO; +import cn.cloudwalk.elevator.record.mapper.AcsRecogRecordMapper; +import java.util.List; +import javax.annotation.Resource; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Repository; + +@Repository +public class AcsRecogRecordDaoImpl implements AcsRecogRecordDao { + @Resource + private AcsRecogRecordMapper acsRecogRecordMapper; + protected final Logger logger = LoggerFactory.getLogger(getClass()); + + public Integer add(AcsRecogRecordAddDTO dto) throws DataAccessException { + try { + return Integer.valueOf(this.acsRecogRecordMapper.add(dto)); + } catch (Exception e) { + this.logger.error("保存识别记录失败,原因:", e); + throw new DataAccessException(e); + } + } + + public List page(AcsRecogRecordPageDTO dto) throws DataAccessException { + try { + return this.acsRecogRecordMapper.page(dto); + } catch (Exception e) { + this.logger.error("分页查询识别记录失败,原因:", e); + throw new DataAccessException(e); + } + } + + public AcsRecogRecordResultDTO getByPersonId(String personId) throws DataAccessException { + try { + return this.acsRecogRecordMapper.getByPersonId(personId); + } catch (Exception e) { + this.logger.error("根据人员id查询识别记录失败,原因:", e); + throw new DataAccessException(e); + } + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/impl/SendRecordTimeDaoImpl.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/impl/SendRecordTimeDaoImpl.java new file mode 100644 index 00000000..debbfb01 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/impl/SendRecordTimeDaoImpl.java @@ -0,0 +1,46 @@ +package cn.cloudwalk.elevator.record.impl; + +import cn.cloudwalk.cloud.exception.DataAccessException; +import cn.cloudwalk.elevator.record.dao.SendRecordTimeDao; +import cn.cloudwalk.elevator.record.dto.SendRecordTimeAddDTO; +import cn.cloudwalk.elevator.record.dto.SendRecordTimeEditDTO; +import cn.cloudwalk.elevator.record.dto.SendRecordTimeResultDTO; +import cn.cloudwalk.elevator.record.mapper.SendRecordTimeMapper; +import javax.annotation.Resource; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Repository; + +@Repository +public class SendRecordTimeDaoImpl implements SendRecordTimeDao { + @Resource + private SendRecordTimeMapper sendRecordTimeMapper; + protected final Logger logger = LoggerFactory.getLogger(getClass()); + + public SendRecordTimeResultDTO getByType(Integer type) throws DataAccessException { + try { + return this.sendRecordTimeMapper.getByType(type); + } catch (Exception e) { + this.logger.error("根据类型获取时间戳失败,原因:", e); + throw new DataAccessException(e); + } + } + + public Integer add(SendRecordTimeAddDTO timeAddDTO) throws DataAccessException { + try { + return this.sendRecordTimeMapper.add(timeAddDTO); + } catch (Exception e) { + this.logger.error("新增时间戳失败,原因:", e); + throw new DataAccessException(e); + } + } + + public Integer update(SendRecordTimeEditDTO editDTO) throws DataAccessException { + try { + return this.sendRecordTimeMapper.update(editDTO); + } catch (Exception e) { + this.logger.error("根据类型修改时间戳失败,原因:", e); + throw new DataAccessException(e); + } + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/mapper/AcsElevatorRecordMapper.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/mapper/AcsElevatorRecordMapper.java new file mode 100644 index 00000000..09a606ce --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/mapper/AcsElevatorRecordMapper.java @@ -0,0 +1,40 @@ +package cn.cloudwalk.elevator.record.mapper; + +import cn.cloudwalk.elevator.record.dto.AcsElevatorAnalyseCycleBusinessResultDTO; +import cn.cloudwalk.elevator.record.dto.AcsElevatorQueryCountDTO; +import cn.cloudwalk.elevator.record.dto.AcsElevatorRecordAddDTO; +import cn.cloudwalk.elevator.record.dto.AcsElevatorRecordDetailQueryDTO; +import cn.cloudwalk.elevator.record.dto.AcsElevatorRecordDetailQueryResultDTO; +import cn.cloudwalk.elevator.record.dto.AcsElevatorRecordQueryResultDTO; +import cn.cloudwalk.elevator.record.dto.AcsOpenDoorRecordEditDTO; +import cn.cloudwalk.elevator.record.dto.AcsOpenDoorRecordQueryDTO; +import cn.cloudwalk.elevator.record.dto.AcsRecordThreeSendQueryDTO; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface AcsElevatorRecordMapper { + List + detail(AcsElevatorRecordDetailQueryDTO paramAcsElevatorRecordDetailQueryDTO); + + List + page(AcsElevatorRecordDetailQueryDTO paramAcsElevatorRecordDetailQueryDTO); + + int add(AcsElevatorRecordAddDTO paramAcsElevatorRecordAddDTO); + + int update(AcsOpenDoorRecordEditDTO paramAcsOpenDoorRecordEditDTO); + + List query(AcsOpenDoorRecordQueryDTO paramAcsOpenDoorRecordQueryDTO); + + List srcFloor(@Param("businessId") String paramString); + + List destFloor(@Param("businessId") String paramString); + + List dispatchElevatorNo(@Param("businessId") String paramString); + + Integer analyseCount(AcsElevatorQueryCountDTO paramAcsElevatorQueryCountDTO); + + List analyseGroup(AcsElevatorQueryCountDTO paramAcsElevatorQueryCountDTO); + + List + listByRecognitionTime(AcsRecordThreeSendQueryDTO paramAcsRecordThreeSendQueryDTO); +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/mapper/AcsElevatorRecordMapper.xml b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/mapper/AcsElevatorRecordMapper.xml new file mode 100644 index 00000000..b2cb3dca --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/mapper/AcsElevatorRecordMapper.xml @@ -0,0 +1,423 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + insert into it_acs_elevator_record (ID, BUSINESS_ID, DEVICE_ID, DEVICE_CODE, + DEVICE_NAME, DEVICE_TYPE_ID, DEVICE_TYPE_NAME, DISTRICT_ID, AREA_ID, + OPEN_DOOR_TYPE, OPERATE_NAME, FACE_IMAGE_PATH, PANORAMA_IMAGE_PATH, + RECORD_RESULT, RECOGNITION_NO, RECOGNITION_TIME, + LOG_ID, RECOGNITION_FACE_ID, CREATE_TIME, + CREATE_USER_ID, LAST_UPDATE_TIME, LAST_UPDATE_USER_ID, SRC_FLOOR + ,DEST_FLOOR,DISPATCH_ELEVATOR_NO,DISPATCH_ELEVATOR_TIME,IS_VISITOR,INTERVIEWEE,PERSON_CODE,ORG_ID,ORG_NAME) + values (#{id,jdbcType=VARCHAR}, #{businessId,jdbcType=VARCHAR}, + #{deviceId,jdbcType=VARCHAR}, + #{deviceCode,jdbcType=VARCHAR}, #{deviceName,jdbcType=VARCHAR}, + #{deviceTypeId,jdbcType=VARCHAR}, + #{deviceTypeName,jdbcType=VARCHAR}, #{districtId,jdbcType=VARCHAR}, + #{areaId,jdbcType=VARCHAR}, + #{openDoorType,jdbcType=VARCHAR}, #{operateName,jdbcType=VARCHAR}, + #{faceImagePath,jdbcType=VARCHAR}, + #{panoramaImagePath,jdbcType=VARCHAR}, #{recordResult,jdbcType=TINYINT}, + #{recognitionNo,jdbcType=VARCHAR}, #{recognitionTime,jdbcType=BIGINT}, + #{logId,jdbcType=VARCHAR}, + #{recognitionFaceId,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, + #{createUserId,jdbcType=VARCHAR}, #{lastUpdateTime,jdbcType=BIGINT}, + #{lastUpdateUserId,jdbcType=VARCHAR},#{srcFloor,jdbcType=VARCHAR}, + #{destFloor,jdbcType=VARCHAR},#{dispatchElevatorNo,jdbcType=VARCHAR},#{dispatchElevatorTime,jdbcType=BIGINT}, + #{isVisitor,jdbcType=TINYINT},#{interviewee,jdbcType=VARCHAR}, + #{personCode,jdbcType=VARCHAR},#{orgId,jdbcType=VARCHAR},#{orgName,jdbcType=VARCHAR}) + + + + update it_acs_elevator_record + + + LAST_UPDATE_TIME = #{lastUpdateTime, jdbcType=BIGINT}, + + + + RECORD_RESULT = #{recordResult, jdbcType=TINYINT}, + + + OPEN_DOOR_TYPE = #{openDoorType, jdbcType=VARCHAR}, + + + OPERATE_NAME = #{operateName, jdbcType=VARCHAR}, + + + FACE_IMAGE_PATH = #{faceImagePath, jdbcType=VARCHAR}, + + + PANORAMA_IMAGE_PATH = #{panoramaImagePath, jdbcType=VARCHAR}, + + + RECOGNITION_NO = #{recognitionNo, jdbcType=VARCHAR}, + + + LAST_UPDATE_USER_ID = #{lastUpdateUserId, jdbcType=VARCHAR}, + + + + + and ID = #{id, jdbcType=VARCHAR} + + + and BUSINESS_ID = #{businessId, jdbcType=VARCHAR} + + + and LOG_ID = #{logId, jdbcType=VARCHAR} + + + and DEVICE_ID = #{deviceId, jdbcType=VARCHAR} + + + and DEVICE_CODE = #{deviceCode, jdbcType=VARCHAR} + + + and RECOGNITION_TIME >= #{startDay, jdbcType=BIGINT} + + + and RECOGNITION_TIME <= #{endDay, jdbcType=BIGINT} + + + + + + + + + + + + + + diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/mapper/AcsPassRuleMapper.xml b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/mapper/AcsPassRuleMapper.xml new file mode 100644 index 00000000..5d84896f --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/mapper/AcsPassRuleMapper.xml @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + insert into it_acs_pass_rule (ID, BUSINESS_ID, NAME, VALID_DATE_CRON, VALID_DATE_JSON, + BEGIN_DATE, END_DATE, IMAGE_STORE_ID, ZONE_ID,ZONE_NAME, + CREATE_TIME, CREATE_USER_ID, LAST_UPDATE_TIME, LAST_UPDATE_USER_ID,IS_DEFAULT) + values (#{id,jdbcType=VARCHAR}, #{businessId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, + #{validDateCron,jdbcType=LONGVARCHAR}, #{validDateJson,jdbcType=LONGVARCHAR}, + #{beginDate,jdbcType=BIGINT}, #{endDate,jdbcType=BIGINT}, + #{imageStoreId,jdbcType=VARCHAR}, + #{zoneId,jdbcType=VARCHAR}, + #{zoneName,jdbcType=VARCHAR}, + #{createTime,jdbcType=BIGINT}, #{createUserId,jdbcType=VARCHAR}, + #{lastUpdateTime,jdbcType=BIGINT}, #{lastUpdateUserId,jdbcType=VARCHAR}, + #{isDefault,jdbcType=INTEGER}) + + + + delete from it_acs_pass_rule + where BUSINESS_ID = #{businessId,jdbcType=VARCHAR} + + and ID in + + #{item,jdbcType=VARCHAR} + + + + + + update it_acs_pass_rule + + + NAME = #{name,jdbcType=VARCHAR}, + + VALID_DATE_CRON = #{validDateCron,jdbcType=LONGVARCHAR}, + VALID_DATE_JSON = #{validDateJson,jdbcType=LONGVARCHAR}, + BEGIN_DATE = #{beginDate,jdbcType=BIGINT}, + END_DATE = #{endDate,jdbcType=BIGINT}, + + + + and ID = #{id,jdbcType=VARCHAR} + + + and BUSINESS_ID = #{businessId,jdbcType=VARCHAR} + + + + + + + + + + + \ No newline at end of file diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/mapper/AcsRecogRecordMapper.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/mapper/AcsRecogRecordMapper.java new file mode 100644 index 00000000..7a3dbb89 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/mapper/AcsRecogRecordMapper.java @@ -0,0 +1,14 @@ +package cn.cloudwalk.elevator.record.mapper; + +import cn.cloudwalk.elevator.record.dto.AcsRecogRecordAddDTO; +import cn.cloudwalk.elevator.record.dto.AcsRecogRecordPageDTO; +import cn.cloudwalk.elevator.record.dto.AcsRecogRecordResultDTO; +import java.util.List; + +public interface AcsRecogRecordMapper { + int add(AcsRecogRecordAddDTO paramAcsRecogRecordAddDTO); + + List page(AcsRecogRecordPageDTO paramAcsRecogRecordPageDTO); + + AcsRecogRecordResultDTO getByPersonId(String paramString); +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/mapper/AcsRecogRecordMapper.xml b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/mapper/AcsRecogRecordMapper.xml new file mode 100644 index 00000000..b3215e61 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/mapper/AcsRecogRecordMapper.xml @@ -0,0 +1,149 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + insert into it_acs_recog_record (ID, PERSON_ID, PERSON_NAME, + BUSINESS_ID, DEVICE_ID, DEVICE_CODE, + DEVICE_NAME, THRESHOLD, DISTRICT_ID, + AREA_ID, DEVICE_TYPE_ID, DEVICE_TYPE_NAME, + SUB_DEVICE_ID, SUB_DEVICE_CODE, SUB_DEVICE_NAME, SUB_DEVICE_TYPE_ID, SUB_DEVICE_TYPE_NAME, + REGISTER_IMAGE_PATH, FACE_IMAGE_PATH, PANORAMA_IMAGE_PATH, + SCORE, RECOGNITION_RESULT, RECOGNITION_TIME, + GROUP_ID, FACE_ID, QUALITY_SCORE, + LOG_ID, TEMP_SCORE, MASK_SCORE, + TEMP_THRESHOLD, CARD_TYPE, `SOURCE`, + TEMP_IMAGE_PATH, REMARK, CREATE_TIME, + CREATE_USER_ID, LAST_UPDATE_TIME, LAST_UPDATE_USER_ID, PERSON_LABEL_IDS + ) + values (#{id,jdbcType=VARCHAR}, #{personId,jdbcType=VARCHAR}, #{personName,jdbcType=VARCHAR}, + #{businessId,jdbcType=VARCHAR}, #{deviceId,jdbcType=VARCHAR}, #{deviceCode,jdbcType=VARCHAR}, + #{deviceName,jdbcType=VARCHAR}, #{threshold,jdbcType=DECIMAL}, #{districtId,jdbcType=VARCHAR}, + #{areaId,jdbcType=VARCHAR}, #{deviceTypeId,jdbcType=VARCHAR}, #{deviceTypeName,jdbcType=VARCHAR}, + #{subDeviceId,jdbcType=VARCHAR}, #{subDeviceCode,jdbcType=VARCHAR}, #{subDeviceName,jdbcType=VARCHAR}, + #{subDeviceTypeId,jdbcType=VARCHAR}, #{subDeviceTypeName,jdbcType=VARCHAR}, + #{registerImagePath,jdbcType=VARCHAR}, #{faceImagePath,jdbcType=VARCHAR}, #{panoramaImagePath,jdbcType=VARCHAR}, + #{score,jdbcType=DECIMAL}, #{recognitionResult,jdbcType=TINYINT}, #{recognitionTime,jdbcType=BIGINT}, + #{groupId,jdbcType=VARCHAR}, #{faceId,jdbcType=VARCHAR}, #{qualityScore,jdbcType=DECIMAL}, + #{logId,jdbcType=VARCHAR}, #{tempScore,jdbcType=DECIMAL}, #{maskScore,jdbcType=DECIMAL}, + #{tempThreshold,jdbcType=DECIMAL}, #{cardType,jdbcType=VARCHAR}, #{source,jdbcType=TINYINT}, + #{tempImagePath,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, + #{createUserId,jdbcType=VARCHAR}, #{lastUpdateTime,jdbcType=BIGINT}, + #{lastUpdateUserId,jdbcType=VARCHAR},#{personLabelIds,jdbcType=VARCHAR} + ) + + + + + + \ No newline at end of file diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/mapper/ImageRuleRefMapper.xml b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/mapper/ImageRuleRefMapper.xml new file mode 100644 index 00000000..7e252f0b --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/mapper/ImageRuleRefMapper.xml @@ -0,0 +1,350 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + insert into image_rule_ref (id, business_id, name, zone_id, zone_name, + start_time, end_time, person_id, include_labels,include_organizations, + exclude_labels, is_default, create_time, last_update_time,parent_rule,person_delete) + values (#{id,jdbcType=VARCHAR}, #{businessId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, + #{zoneId,jdbcType=VARCHAR}, #{zoneName,jdbcType=VARCHAR}, + #{startTime,jdbcType=BIGINT},#{endTime,jdbcType=BIGINT}, + #{personId,jdbcType=VARCHAR}, #{includeLabels,jdbcType=VARCHAR}, + #{includeOrganizations,jdbcType=VARCHAR}, + #{excludeLabels,jdbcType=VARCHAR}, + #{isDefault,jdbcType=INTEGER}, + #{createTime,jdbcType=BIGINT}, + #{lastUpdateTime,jdbcType=BIGINT},#{parentRule,jdbcType=VARCHAR},#{personDelete,jdbcType=INTEGER}) + + + + insert into image_rule_ref (id, business_id, name, zone_id, zone_name, + start_time, end_time, person_id, include_labels,include_organizations, + exclude_labels, is_default, create_time, last_update_time,parent_rule,person_delete) + values + + (#{item.id,jdbcType=VARCHAR}, #{item.businessId,jdbcType=VARCHAR}, #{item.name,jdbcType=VARCHAR}, + #{item.zoneId,jdbcType=VARCHAR}, #{item.zoneName,jdbcType=VARCHAR}, + #{item.startTime,jdbcType=BIGINT},#{item.endTime,jdbcType=BIGINT}, + #{item.personId,jdbcType=VARCHAR}, #{item.includeLabels,jdbcType=VARCHAR}, + #{item.includeOrganizations,jdbcType=VARCHAR}, + #{item.excludeLabels,jdbcType=VARCHAR}, + #{item.isDefault,jdbcType=INTEGER}, + #{item.createTime,jdbcType=BIGINT}, + #{item.lastUpdateTime,jdbcType=BIGINT},#{item.parentRule,jdbcType=VARCHAR},#{item.personDelete,jdbcType=INTEGER}) + + + + + DELETE FROM image_rule_ref + WHERE zone_id = #{zoneId,jdbcType=VARCHAR} + and name = #{oldName,jdbcType=VARCHAR} + + + + DELETE FROM image_rule_ref + WHERE id = #{id,jdbcType=VARCHAR} + + + + DELETE FROM image_rule_ref + WHERE parent_rule = #{parentRule,jdbcType=VARCHAR} + + + + DELETE FROM image_rule_ref + WHERE zone_id = #{zoneId} + AND person_delete = 1 + AND person_id in + + #{item,jdbcType=VARCHAR} + + + + + UPDATE image_rule_ref + SET person_delete = 1 + WHERE zone_id = #{zoneId} + AND person_delete = 0 + AND person_id = #{personId} + + + + DELETE FROM image_rule_ref + WHERE zone_id = #{zoneId} + + and include_organizations = #{orgId, jdbcType=VARCHAR} + + + and include_labels = #{labelId, jdbcType=VARCHAR} + + + + \ No newline at end of file diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/mapper/SendRecordTimeMapper.java b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/mapper/SendRecordTimeMapper.java new file mode 100644 index 00000000..b2ed5fd9 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/mapper/SendRecordTimeMapper.java @@ -0,0 +1,14 @@ +package cn.cloudwalk.elevator.record.mapper; + +import cn.cloudwalk.elevator.record.dto.SendRecordTimeAddDTO; +import cn.cloudwalk.elevator.record.dto.SendRecordTimeEditDTO; +import cn.cloudwalk.elevator.record.dto.SendRecordTimeResultDTO; +import org.apache.ibatis.annotations.Param; + +public interface SendRecordTimeMapper { + SendRecordTimeResultDTO getByType(@Param("type") Integer paramInteger); + + Integer add(SendRecordTimeAddDTO paramSendRecordTimeAddDTO); + + Integer update(SendRecordTimeEditDTO paramSendRecordTimeEditDTO); +} diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/mapper/SendRecordTimeMapper.xml b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/mapper/SendRecordTimeMapper.xml new file mode 100644 index 00000000..9b773cf8 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/java/cn/cloudwalk/elevator/record/mapper/SendRecordTimeMapper.xml @@ -0,0 +1,32 @@ + + + + + + + + + insert into send_record_time (time, type) + values (#{time,jdbcType=BIGINT}, #{type,jdbcType=TINYINT} + + + + update send_record_time + + + time = #{time, jdbcType=BIGINT}, + + + + type = #{type, jdbcType=TINYINT} + + + + + + + \ No newline at end of file diff --git a/maven-cw-elevator-application/cw-elevator-application-data/src/main/resources/META-INF/MANIFEST.MF b/maven-cw-elevator-application/cw-elevator-application-data/src/main/resources/META-INF/MANIFEST.MF new file mode 100644 index 00000000..b84e8841 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-data/src/main/resources/META-INF/MANIFEST.MF @@ -0,0 +1,12 @@ +Manifest-Version: 1.0 +Implementation-Title: cw-elevator-application-data +Implementation-Version: 1.0-SNAPSHOT +Archiver-Version: Plexus Archiver +Built-By: YCWB0304 +Implementation-Vendor-Id: cn.cloudwalk.elevator +Created-By: Apache Maven 3.6.1 +Build-Jdk: 1.8.0_144 +Implementation-URL: http://projects.spring.io/spring-boot/cw-elevator- + application/cw-elevator-application-data/ +Implementation-Vendor: Pivotal Software, Inc. + diff --git a/maven-cw-elevator-application/cw-elevator-application-service/pom.xml b/maven-cw-elevator-application/cw-elevator-application-service/pom.xml new file mode 100644 index 00000000..aab948e4 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/pom.xml @@ -0,0 +1,82 @@ + + + 4.0.0 + + + cn.cloudwalk.elevator + cw-elevator-application-decompiled-reactor + 1.0-SNAPSHOT + ../pom.xml + + + cw-elevator-application-service + jar + + + ${project.basedir}/../../docs/style/alibaba-eclipse-codestyle.xml + + + + + cn.cloudwalk.cloud + cloudwalk-common-service + + + org.springframework + spring-tx + + + cn.cloudwalk.cloud + cloudwalk-common-serial + + + javax.el + javax.el-api + test + + + org.glassfish + javax.el + test + + + cn.cloudwalk + cwos-java-sdk-resource + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + + + cn.cloudwalk.intelligent + cloudwalk-intelligent-component-lock + + + cn.cloudwalk.cloud + cloudwalk-common-event + + + cn.cloudwalk.elevator + cw-elevator-application-data + ${project.version} + + + cn.cloudwalk.intelligent + davinci-manager-storage + + + cn.cloudwalk.intelligent + intelligent-cwoscomponent-rest + + + + + + + net.revelc.code.formatter + formatter-maven-plugin + + + + diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/AcsFeignConfiguration.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/AcsFeignConfiguration.java new file mode 100644 index 00000000..a47953bc --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/AcsFeignConfiguration.java @@ -0,0 +1,68 @@ +package cn.cloudwalk.elevator; + +import cn.cloudwalk.cloud.context.CloudwalkSessionContextHolder; +import cn.cloudwalk.cloud.context.CloudwalkSessionObject; +import cn.cloudwalk.elevator.config.FeignThreadLocalUtil; +import feign.RequestInterceptor; +import feign.RequestTemplate; +import java.util.Collection; +import java.util.Map; +import javax.servlet.http.HttpServletRequest; +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Configuration; +import org.springframework.web.context.request.RequestContextHolder; +import org.springframework.web.context.request.ServletRequestAttributes; + +@Configuration +public class AcsFeignConfiguration implements RequestInterceptor { + protected final Logger logger = LoggerFactory.getLogger(AcsFeignConfiguration.class); + @Autowired + private CloudwalkSessionContextHolder cloudwalkSessionContextHolder; + + public void apply(RequestTemplate requestTemplate) { + Map map = FeignThreadLocalUtil.get(); + if (map != null && !map.isEmpty()) { + requestTemplate.header("platformuserid", new String[] {map.get("platformuserid")}); + requestTemplate.header("loginid", new String[] {map.get("loginid")}); + requestTemplate.header("businessid", new String[] {map.get("businessid")}); + requestTemplate.header("username", new String[] {map.get("username")}); + requestTemplate.header("applicationid", new String[] {map.get("applicationid")}); + requestTemplate.header("authorization", new String[] {map.get("authorization")}); + this.logger.info("feign调用配置header参数, businessId={}, threadId={}", + requestTemplate.headers().get("businessid"), Long.valueOf(Thread.currentThread().getId())); + } else { + Map> headerMap = requestTemplate.headers(); + ServletRequestAttributes attributes = (ServletRequestAttributes)RequestContextHolder.getRequestAttributes(); + if (null != attributes) { + HttpServletRequest request = attributes.getRequest(); + if (!headerMap.containsKey("platformuserid")) { + requestTemplate.header("platformuserid", new String[] {request.getHeader("platformuserid")}); + } + if (!headerMap.containsKey("loginid")) { + requestTemplate.header("loginid", new String[] {request.getHeader("loginid")}); + } + if (!headerMap.containsKey("businessid")) { + requestTemplate.header("businessid", new String[] {request.getHeader("businessid")}); + } + if (!headerMap.containsKey("username")) { + requestTemplate.header("username", new String[] {request.getHeader("username")}); + } + if (!headerMap.containsKey("applicationid")) { + requestTemplate.header("applicationid", new String[] {request.getHeader("applicationid")}); + } + if (!headerMap.containsKey("authorization")) { + requestTemplate.header("authorization", new String[] {request.getHeader("authorization")}); + } + CloudwalkSessionObject session = this.cloudwalkSessionContextHolder.getSession(); + if (StringUtils.isBlank(request.getHeader("businessid")) && session != null) { + requestTemplate.header("businessid", new String[] {session.getCompany().getCompanyId()}); + } + if (StringUtils.isBlank(request.getHeader("applicationid")) && session != null) + requestTemplate.header("applicationid", new String[] {session.getApplicationId()}); + } + } + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/cacheable/AcsAreaTreeCacheableService.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/cacheable/AcsAreaTreeCacheableService.java new file mode 100644 index 00000000..15dce80a --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/cacheable/AcsAreaTreeCacheableService.java @@ -0,0 +1,23 @@ +package cn.cloudwalk.elevator.cacheable; + +import cn.cloudwalk.client.cwoscomponent.intelligent.sysetting.param.DeviceAreaTreeParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.sysetting.result.AreaTreeResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.sysetting.service.SysettingAreaService; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import java.util.List; +import javax.annotation.Resource; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.stereotype.Service; + +@Service +public class AcsAreaTreeCacheableService { + @Resource + private SysettingAreaService sysettingAreaService; + + @Cacheable(cacheNames = {"ACS_AreaTreeCache"}, + key = "T(cn.cloudwalk.elevator.cache.CacheOverrideConfig).CACHE_KEY_ACS_AREA_TREE_PREFIX + #param.businessId") + public CloudwalkResult> tree(DeviceAreaTreeParam param, CloudwalkCallContext context) { + return this.sysettingAreaService.tree(param, context); + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/codeElevatorArea/impl/AcsElevatorCodeServiceImpl.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/codeElevatorArea/impl/AcsElevatorCodeServiceImpl.java new file mode 100644 index 00000000..278bfe41 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/codeElevatorArea/impl/AcsElevatorCodeServiceImpl.java @@ -0,0 +1,49 @@ +package cn.cloudwalk.elevator.codeElevatorArea.impl; + +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.utils.BeanCopyUtils; +import cn.cloudwalk.elevator.codeElevatorArea.dao.AcsElevatorCodeDao; +import cn.cloudwalk.elevator.codeElevatorArea.dto.AcsElevatorCodeDTO; +import cn.cloudwalk.elevator.codeElevatorArea.dto.AcsElevatorCodeResultDTO; +import cn.cloudwalk.elevator.codeElevatorArea.param.AcsElevatorCodeParam; +import cn.cloudwalk.elevator.codeElevatorArea.service.AcsElevatorCodeService; +import javax.annotation.Resource; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Repository; +import org.springframework.util.ObjectUtils; + +@Repository +public class AcsElevatorCodeServiceImpl implements AcsElevatorCodeService { + @Resource + private AcsElevatorCodeDao acsElevatorCodeDao; + protected final Logger logger = LoggerFactory.getLogger(getClass()); + + public Integer insertNew(AcsElevatorCodeParam param) throws ServiceException { + AcsElevatorCodeDTO dto = (AcsElevatorCodeDTO)BeanCopyUtils.copyProperties(param, AcsElevatorCodeDTO.class); + Long createTime = Long.valueOf(System.currentTimeMillis()); + dto.setCreateTime(createTime); + dto.setLastUpdateTime(createTime); + return this.acsElevatorCodeDao.insertNew(dto); + } + + public Integer updateOld(AcsElevatorCodeParam param) throws ServiceException { + AcsElevatorCodeDTO dto = (AcsElevatorCodeDTO)BeanCopyUtils.copyProperties(param, AcsElevatorCodeDTO.class); + Long nowTime = Long.valueOf(System.currentTimeMillis()); + dto.setLastUpdateTime(nowTime); + return this.acsElevatorCodeDao.updateOld(dto); + } + + public AcsElevatorCodeResultDTO get(AcsElevatorCodeParam param) throws ServiceException { + AcsElevatorCodeDTO dto = (AcsElevatorCodeDTO)BeanCopyUtils.copyProperties(param, AcsElevatorCodeDTO.class); + AcsElevatorCodeResultDTO result = this.acsElevatorCodeDao.get(dto); + if (!ObjectUtils.isEmpty(result)) { + return result; + } + return null; + } + + public AcsElevatorCodeResultDTO getFirstByParentId(String parentId) throws ServiceException { + return this.acsElevatorCodeDao.getFirstByParentId(parentId); + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/codeElevatorArea/param/AcsElevatorCodeParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/codeElevatorArea/param/AcsElevatorCodeParam.java new file mode 100644 index 00000000..56bf4ac6 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/codeElevatorArea/param/AcsElevatorCodeParam.java @@ -0,0 +1,43 @@ +package cn.cloudwalk.elevator.codeElevatorArea.param; + +import cn.cloudwalk.cloud.entity.CloudwalkBaseTimes; +import java.io.Serializable; + +public class AcsElevatorCodeParam extends CloudwalkBaseTimes implements Serializable { + private String zoneId; + private String parentId; + private String code; + private Integer isFirst; + + public String getZoneId() { + return this.zoneId; + } + + public void setZoneId(String zoneId) { + this.zoneId = zoneId; + } + + public String getParentId() { + return this.parentId; + } + + public void setParentId(String parentId) { + this.parentId = parentId; + } + + public String getCode() { + return this.code; + } + + public void setCode(String code) { + this.code = code; + } + + public Integer getIsFirst() { + return this.isFirst; + } + + public void setIsFirst(Integer isFirst) { + this.isFirst = isFirst; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/codeElevatorArea/result/AcsElevatorCodeResult.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/codeElevatorArea/result/AcsElevatorCodeResult.java new file mode 100644 index 00000000..8ce0ca1c --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/codeElevatorArea/result/AcsElevatorCodeResult.java @@ -0,0 +1,31 @@ +package cn.cloudwalk.elevator.codeElevatorArea.result; + +public class AcsElevatorCodeResult { + private String zoneId; + private String code; + private Integer isFirst; + + public String getZoneId() { + return this.zoneId; + } + + public void setZoneId(String zoneId) { + this.zoneId = zoneId; + } + + public String getCode() { + return this.code; + } + + public void setCode(String code) { + this.code = code; + } + + public Integer getIsFirst() { + return this.isFirst; + } + + public void setIsFirst(Integer isFirst) { + this.isFirst = isFirst; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/codeElevatorArea/service/AcsElevatorCodeService.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/codeElevatorArea/service/AcsElevatorCodeService.java new file mode 100644 index 00000000..190069a7 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/codeElevatorArea/service/AcsElevatorCodeService.java @@ -0,0 +1,15 @@ +package cn.cloudwalk.elevator.codeElevatorArea.service; + +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.elevator.codeElevatorArea.dto.AcsElevatorCodeResultDTO; +import cn.cloudwalk.elevator.codeElevatorArea.param.AcsElevatorCodeParam; + +public interface AcsElevatorCodeService { + Integer insertNew(AcsElevatorCodeParam paramAcsElevatorCodeParam) throws ServiceException; + + Integer updateOld(AcsElevatorCodeParam paramAcsElevatorCodeParam) throws ServiceException; + + AcsElevatorCodeResultDTO get(AcsElevatorCodeParam paramAcsElevatorCodeParam) throws ServiceException; + + AcsElevatorCodeResultDTO getFirstByParentId(String paramString) throws ServiceException; +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/common/AbstractAcsDeviceService.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/common/AbstractAcsDeviceService.java new file mode 100644 index 00000000..57b6915e --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/common/AbstractAcsDeviceService.java @@ -0,0 +1,40 @@ +package cn.cloudwalk.elevator.common; + +import cn.cloudwalk.client.cwoscomponent.intelligent.sysetting.result.AreaTreeResult; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.session.company.CompanyContext; +import cn.cloudwalk.cloud.session.user.UserContext; +import cn.cloudwalk.cloud.utils.CloudwalkDateUtils; +import cn.cloudwalk.elevator.config.FeignThreadLocalUtil; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class AbstractAcsDeviceService extends AbstractCloudwalkService { + protected void getAreaMap(List areaTreeResultList, Map areaMap) { + for (AreaTreeResult areaTree : areaTreeResultList) { + areaMap.put(areaTree.getId(), areaTree.getName()); + if (areaTree.getChildren() != null) { + getAreaMap(areaTree.getChildren(), areaMap); + } + } + } + + public CloudwalkCallContext getCloudwalkContext(String businessId) { + CloudwalkCallContext context = new CloudwalkCallContext(); + CompanyContext companyContext = new CompanyContext(); + companyContext.setCompanyId(businessId); + context.setCompany(companyContext); + UserContext userContext = new UserContext(); + userContext.setCaller("defaultUserId"); + userContext.setCallerName("defaultUserName"); + context.setUser(userContext); + context.setCallTime(CloudwalkDateUtils.getCurrentDate()); + Map feignThreadLoaclMap = new HashMap<>(3); + feignThreadLoaclMap.put("businessid", businessId); + feignThreadLoaclMap.put("platformuserid", "defaultUserId"); + feignThreadLoaclMap.put("username", "defaultUserName"); + FeignThreadLocalUtil.set(feignThreadLoaclMap); + return context; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/common/AbstractCloudwalkService.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/common/AbstractCloudwalkService.java new file mode 100644 index 00000000..02397b39 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/common/AbstractCloudwalkService.java @@ -0,0 +1,39 @@ +package cn.cloudwalk.elevator.common; + +import cn.cloudwalk.client.cwoscomponent.intelligent.device.service.DeviceService; +import cn.cloudwalk.cloud.serial.UUIDSerial; +import cn.cloudwalk.cloud.utils.CloudwalkDateUtils; +import cn.cloudwalk.serial.code.AbstractGeneralCode; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.MessageSource; +import org.springframework.context.i18n.LocaleContextHolder; + +public class AbstractCloudwalkService { + @Autowired + protected DeviceService deviceService; + protected final Logger logger = LoggerFactory.getLogger(getClass()); + private static final int GENGRAL_CODE_LENGTH = 8; + @Autowired + private MessageSource messageSource; + @Autowired + protected AbstractGeneralCode generalCode; + @Autowired(required = false) + private UUIDSerial uuidSerial; + + public String getMessage(String code) { + return this.messageSource.getMessage(code, null, "", LocaleContextHolder.getLocale()); + } + + public String createGeneralCode() { + return this.generalCode.generalCode(CloudwalkDateUtils.getDate8YMD(), Integer.valueOf(8)); + } + + public String genUUID() { + if (null != this.uuidSerial) { + return this.uuidSerial.uuid(); + } + return CloudwalkDateUtils.getUUID(); + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/common/AcsApplicationServiceImpl.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/common/AcsApplicationServiceImpl.java new file mode 100644 index 00000000..e3fda840 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/common/AcsApplicationServiceImpl.java @@ -0,0 +1,41 @@ +package cn.cloudwalk.elevator.common; + +import cn.cloudwalk.client.resource.application.param.ApplicationQueryParam; +import cn.cloudwalk.client.resource.application.result.ApplicationResult; +import cn.cloudwalk.client.resource.application.service.ApplicationService; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.elevator.common.service.AcsApplicationService; +import java.util.Collection; +import java.util.List; +import javax.annotation.Resource; +import org.apache.commons.collections4.CollectionUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.stereotype.Service; + +@Service +public class AcsApplicationServiceImpl implements AcsApplicationService { + private static final Logger logger = LoggerFactory.getLogger(AcsApplicationServiceImpl.class); + @Resource + private ApplicationService applicationService; + + @Cacheable(cacheNames = {"ACS_Applicationids"}, + key = "T(cn.cloudwalk.biz.ninca.accesscontrol.cache.CacheOverrideConfig).CACHE_KEY_APPLICATION_IDS_PREFIX + #businessId") + public String getApplicationId(String businessId) throws ServiceException { + ApplicationQueryParam param = new ApplicationQueryParam(); + param.setBusinessId(businessId); + param.setServiceCode("elevator-app"); + CloudwalkResult> cloudwalkResult = this.applicationService.query(param); + if (cloudwalkResult.isSuccess()) { + if (CollectionUtils.isNotEmpty((Collection)cloudwalkResult.getData())) { + return ((ApplicationResult)((List)cloudwalkResult.getData()).get(0)).getId(); + } + logger.info("未查到applicationId"); + throw new ServiceException("76260005", "未查到applicationId"); + } + logger.info("查询applicationId失败"); + throw new ServiceException("76260006", "查询applicationId失败"); + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/common/UpdateFloorsPoolProperties.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/common/UpdateFloorsPoolProperties.java new file mode 100644 index 00000000..e2563d2d --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/common/UpdateFloorsPoolProperties.java @@ -0,0 +1,54 @@ +package cn.cloudwalk.elevator.common; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.context.annotation.Configuration; + +@Configuration +@ConfigurationProperties(prefix = "ninca.update.floor.pool") +public class UpdateFloorsPoolProperties { + private int corePoolSize = 3; + private int maxPoolSize = 5; + private int keepAliveSeconds = 150; + private int queueCapacity = 100; + private boolean allowCoreThreadTimeOut = true; + + public int getCorePoolSize() { + return this.corePoolSize; + } + + public void setCorePoolSize(int corePoolSize) { + this.corePoolSize = corePoolSize; + } + + public int getMaxPoolSize() { + return this.maxPoolSize; + } + + public void setMaxPoolSize(int maxPoolSize) { + this.maxPoolSize = maxPoolSize; + } + + public int getKeepAliveSeconds() { + return this.keepAliveSeconds; + } + + public void setKeepAliveSeconds(int keepAliveSeconds) { + this.keepAliveSeconds = keepAliveSeconds; + } + + public int getQueueCapacity() { + return this.queueCapacity; + } + + public void setQueueCapacity(int queueCapacity) { + this.queueCapacity = queueCapacity; + } + + public boolean isAllowCoreThreadTimeOut() { + return this.allowCoreThreadTimeOut; + } + + public void setAllowCoreThreadTimeOut(boolean allowCoreThreadTimeOut) { + this.allowCoreThreadTimeOut = allowCoreThreadTimeOut; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/common/UpdateFloorsTaskExecutor.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/common/UpdateFloorsTaskExecutor.java new file mode 100644 index 00000000..0c2c6df8 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/common/UpdateFloorsTaskExecutor.java @@ -0,0 +1,26 @@ +package cn.cloudwalk.elevator.common; + +import java.util.concurrent.ThreadPoolExecutor; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; + +@Configuration +public class UpdateFloorsTaskExecutor { + @Autowired + private UpdateFloorsPoolProperties updateFloorsPoolProperties; + + @Bean(name = {"updateFloorsExecutor"}) + public ThreadPoolTaskExecutor pictureRevisionTaskExecutor() { + ThreadPoolTaskExecutor threadPoolTaskExecutor = new ThreadPoolTaskExecutor(); + threadPoolTaskExecutor.setCorePoolSize(this.updateFloorsPoolProperties.getCorePoolSize()); + threadPoolTaskExecutor.setAllowCoreThreadTimeOut(this.updateFloorsPoolProperties.isAllowCoreThreadTimeOut()); + threadPoolTaskExecutor.setMaxPoolSize(this.updateFloorsPoolProperties.getMaxPoolSize()); + threadPoolTaskExecutor.setQueueCapacity(this.updateFloorsPoolProperties.getQueueCapacity()); + threadPoolTaskExecutor.setThreadNamePrefix("update-floors-pool-"); + threadPoolTaskExecutor.setRejectedExecutionHandler(new ThreadPoolExecutor.AbortPolicy()); + threadPoolTaskExecutor.initialize(); + return threadPoolTaskExecutor; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/common/package-info.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/common/package-info.java new file mode 100644 index 00000000..166557be --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/common/package-info.java @@ -0,0 +1,6 @@ +/** + * 电梯应用业务编排层中的公共抽象与基础服务实现(与 common 模块中的“工具型 common”区分)。 + *

+ * 放置跨领域的服务基类、模板方法等,供本模块内各子包复用。 + */ +package cn.cloudwalk.elevator.common; diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/common/service/AcsApplicationService.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/common/service/AcsApplicationService.java new file mode 100644 index 00000000..83f814bf --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/common/service/AcsApplicationService.java @@ -0,0 +1,7 @@ +package cn.cloudwalk.elevator.common.service; + +import cn.cloudwalk.cloud.exception.ServiceException; + +public interface AcsApplicationService { + String getApplicationId(String paramString) throws ServiceException; +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/impl/AcsDeviceTaskServiceImpl.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/impl/AcsDeviceTaskServiceImpl.java new file mode 100644 index 00000000..4696b5da --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/impl/AcsDeviceTaskServiceImpl.java @@ -0,0 +1,127 @@ +package cn.cloudwalk.elevator.device.impl; + +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.elevator.common.AbstractAcsDeviceService; +import cn.cloudwalk.elevator.device.dao.AcsDeviceTaskDao; +import cn.cloudwalk.elevator.device.dto.AcsDeviceTaskAddDto; +import cn.cloudwalk.elevator.device.dto.AcsDeviceTaskDTO; +import cn.cloudwalk.elevator.device.param.AcsRestructureBindingParam; +import cn.cloudwalk.elevator.device.service.AcsDeviceTaskService; +import cn.cloudwalk.elevator.passrule.dao.ImageRuleRefDao; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleDeleteDto; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleImageResultDto; +import cn.cloudwalk.elevator.passrule.param.AcsPassRuleDeleteParam; +import cn.cloudwalk.elevator.passrule.param.AcsPassRuleNewParam; +import cn.cloudwalk.elevator.passrule.service.ImageRuleRefService; +import cn.cloudwalk.elevator.person.param.AcsPersonAddParam; +import cn.cloudwalk.elevator.person.param.AcsPersonDeleteParam; +import cn.cloudwalk.elevator.person.service.PersonRuleService; +import cn.cloudwalk.elevator.util.CollectionUtils; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.annotation.Resource; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.scheduling.annotation.Async; +import org.springframework.stereotype.Service; +import org.springframework.util.ObjectUtils; + +@Service +public class AcsDeviceTaskServiceImpl extends AbstractAcsDeviceService implements AcsDeviceTaskService { + @Autowired + private PersonRuleService personRuleService; + @Autowired + private ImageRuleRefService imageRuleRefService; + @Resource + private AcsDeviceTaskDao acsDeviceTaskDao; + @Resource + private ImageRuleRefDao imageRuleRefDao; + + @Async("updateFloorsExecutor") + public void updateFloors(AcsRestructureBindingParam param, List addFloors, + List delFloorIds, CloudwalkCallContext context) throws ServiceException { + try { + if (!CollectionUtils.isEmpty(addFloors)) { + for (AcsPassRuleImageResultDto addFloor : addFloors) { + AcsDeviceTaskDTO task = this.acsDeviceTaskDao.getById(param.getTaskId()); + if (task.getIsStop().intValue() == 0) { + if (!ObjectUtils.isEmpty(param.getPersonId())) { + AcsPersonAddParam addParam = new AcsPersonAddParam(); + addParam.setPersonIds(Collections.singletonList(param.getPersonId())); + addParam.setParentId(param.getParentId()); + addParam.setZoneId(addFloor.getZoneId()); + addParam.setZoneName(addFloor.getZoneName()); + this.personRuleService.add(addParam, context); + } else { + AcsPassRuleNewParam ruleParam = new AcsPassRuleNewParam(); + ruleParam.setParentId(param.getParentId()); + ruleParam.setZoneId(addFloor.getZoneId()); + ruleParam.setZoneName(addFloor.getZoneName()); + if (!ObjectUtils.isEmpty(param.getLabelId())) { + ruleParam.setIncludeLabels(Collections.singletonList(param.getLabelId())); + ruleParam.setRuleName(addFloor.getZoneName() + param.getLabelName()); + } + if (!ObjectUtils.isEmpty(param.getOrgId())) { + ruleParam.setIncludeOrganizations(Collections.singletonList(param.getOrgId())); + ruleParam.setRuleName(addFloor.getZoneName() + param.getOrgName()); + } + this.imageRuleRefService.addOnlyRule(ruleParam, context); + } + AcsDeviceTaskAddDto addDto = new AcsDeviceTaskAddDto(); + addDto.setId(task.getId()); + addDto.setBindDevices(Integer.valueOf(task.getBindDevices().intValue() + 1)); + this.acsDeviceTaskDao.updateBingDevices(addDto); + } + } + } + if (!CollectionUtils.isEmpty(delFloorIds)) { + List ruleList = this.imageRuleRefDao.listZoneInfoByIds(delFloorIds); + Map ruleMap = new HashMap<>(); + ruleList.forEach(rule -> (String)ruleMap.put(rule.getZoneId(), rule.getZoneName())); + for (String delFloorId : delFloorIds) { + AcsDeviceTaskDTO task = this.acsDeviceTaskDao.getById(param.getTaskId()); + if (task.getIsStop().intValue() == 0) { + if (!ObjectUtils.isEmpty(param.getPersonId())) { + AcsPersonDeleteParam delParam = new AcsPersonDeleteParam(); + delParam.setParentId(param.getParentId()); + delParam.setZoneId(delFloorId); + delParam.setPersonIds(Collections.singletonList(param.getPersonId())); + this.personRuleService.delete(delParam, context); + } else { + String ruleName = ""; + if (!ObjectUtils.isEmpty(param.getLabelName())) { + ruleName = (String)ruleMap.get(delFloorId) + param.getLabelName(); + } + if (!ObjectUtils.isEmpty(param.getOrgName())) { + ruleName = (String)ruleMap.get(delFloorId) + param.getOrgName(); + } + String ruleId = this.imageRuleRefDao.getByRuleName(ruleName, delFloorId); + if (!ObjectUtils.isEmpty(ruleId)) { + AcsPassRuleDeleteParam deleteParam = new AcsPassRuleDeleteParam(); + deleteParam.setIds(Collections.singletonList(ruleId)); + deleteParam.setZoneId(delFloorId); + deleteParam.setParentId(param.getParentId()); + this.imageRuleRefService.delete(deleteParam, context); + } else { + AcsPassRuleDeleteDto dto = new AcsPassRuleDeleteDto(); + dto.setZoneId(delFloorId); + dto.setLabelId(param.getLabelId()); + dto.setOrgId(param.getOrgId()); + this.imageRuleRefDao.deleteByOrgAndLabel(dto); + } + } + AcsDeviceTaskAddDto addDto = new AcsDeviceTaskAddDto(); + addDto.setId(task.getId()); + addDto.setBindDevices(Integer.valueOf(task.getBindDevices().intValue() + 1)); + this.acsDeviceTaskDao.updateBingDevices(addDto); + } + } + } + } catch (Exception e) { + this.logger.error("处理设备任务失败,失败原因:{}", e); + throw new ServiceException(e.getMessage()); + } + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/impl/AcsElevatorDeviceServiceImpl.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/impl/AcsElevatorDeviceServiceImpl.java new file mode 100644 index 00000000..68760c22 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/impl/AcsElevatorDeviceServiceImpl.java @@ -0,0 +1,929 @@ +package cn.cloudwalk.elevator.device.impl; + +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.service.DeviceService; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStoreAddParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStoreDelParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.service.ImageStoreService; +import cn.cloudwalk.client.cwoscomponent.intelligent.person.param.PersonDetailParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.person.result.PersonResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.person.service.PersonService; +import cn.cloudwalk.client.cwoscomponent.intelligent.sysetting.param.DeviceAreaTreeParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.sysetting.result.AreaTreeResult; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.page.CloudwalkPageInfo; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.cloud.utils.BeanCopyUtils; +import cn.cloudwalk.elevator.cacheable.AcsAreaTreeCacheableService; +import cn.cloudwalk.elevator.common.service.AcsApplicationService; +import cn.cloudwalk.elevator.device.dao.AcsDeviceTaskDao; +import cn.cloudwalk.elevator.device.dao.AcsElevatorDeviceDao; +import cn.cloudwalk.elevator.device.dao.DeviceImageStoreDao; +import cn.cloudwalk.elevator.device.dto.AcsDeviceTaskAddDto; +import cn.cloudwalk.elevator.device.dto.AcsDeviceTaskDTO; +import cn.cloudwalk.elevator.device.dto.AcsElevatorDeviceAddDTO; +import cn.cloudwalk.elevator.device.dto.AcsElevatorDeviceEditDTO; +import cn.cloudwalk.elevator.device.dto.AcsElevatorDeviceListDto; +import cn.cloudwalk.elevator.device.dto.AcsElevatorDeviceQueryByIdDTO; +import cn.cloudwalk.elevator.device.dto.AcsElevatorDeviceQueryDTO; +import cn.cloudwalk.elevator.device.dto.AcsElevatorDeviceQueryFoDTO; +import cn.cloudwalk.elevator.device.dto.AcsElevatorDeviceResultDTO; +import cn.cloudwalk.elevator.device.param.AcsDeviceQueryParam; +import cn.cloudwalk.elevator.device.param.AcsDeviceRestructureTaskParam; +import cn.cloudwalk.elevator.device.param.AcsElevatorDeviceAddParam; +import cn.cloudwalk.elevator.device.param.AcsElevatorDeviceEditParam; +import cn.cloudwalk.elevator.device.param.AcsElevatorDeviceQueryByIdParam; +import cn.cloudwalk.elevator.device.param.AcsElevatorDeviceQueryParam; +import cn.cloudwalk.elevator.device.param.AcsRestructureBindingParam; +import cn.cloudwalk.elevator.device.param.AcsRestructureQueryParam; +import cn.cloudwalk.elevator.device.result.AcsDeviceNewResult; +import cn.cloudwalk.elevator.device.result.AcsDeviceRestructureResult; +import cn.cloudwalk.elevator.device.result.AcsLabelElevatorResult; +import cn.cloudwalk.elevator.device.service.AcsDeviceTaskService; +import cn.cloudwalk.elevator.device.service.AcsElevatorDeviceService; +import cn.cloudwalk.elevator.device.setting.impl.AcsDeviceImageStoreAppBindServiceImpl; +import cn.cloudwalk.elevator.device.setting.param.DeviceImageStoreAppBindParam; +import cn.cloudwalk.elevator.device.setting.param.DeviceImageStoreAppUnbindParam; +import cn.cloudwalk.elevator.device.setting.service.AcsDeviceImageStoreAppBindService; +import cn.cloudwalk.elevator.passrule.dao.AcsPassRuleDao; +import cn.cloudwalk.elevator.passrule.dao.ImageRuleRefDao; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleImageDto; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleImageResultDto; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleLabelResultDto; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleQueryDto; +import cn.cloudwalk.elevator.passrule.impl.AbstractAcsPassService; +import cn.cloudwalk.elevator.passrule.service.AcsPassRuleService; +import cn.cloudwalk.elevator.util.CollectionUtils; +import cn.cloudwalk.elevator.util.StringUtils; +import com.alibaba.fastjson.JSONObject; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import javax.annotation.Resource; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Repository; +import org.springframework.util.ObjectUtils; + +@Repository +public class AcsElevatorDeviceServiceImpl extends AbstractAcsPassService implements AcsElevatorDeviceService { + @Value("${floor.building.id}") + private String floorBuildingId; + @Resource + private ImageStoreService imageStoreService; + @Resource + private AcsElevatorDeviceDao acsElevatorDeviceDao; + @Resource + private AcsPassRuleDao acsPassRuleDao; + @Resource + private ImageRuleRefDao imageRuleRefDao; + @Autowired + private AcsDeviceTaskService acsDeviceTaskService; + @Resource + private AcsDeviceTaskDao acsDeviceTaskDao; + @Resource + private DeviceImageStoreDao deviceImageStoreDao; + @Resource + private PersonService personService; + @Resource + private AcsDeviceImageStoreAppBindService acsDeviceImageStoreAppBindService; + @Resource + private AcsDeviceImageStoreAppBindServiceImpl acsDeviceImageStoreAppBindServiceImpl; + @Resource + private DeviceService deviceService; + @Autowired + private AcsApplicationService acsApplicationService; + @Resource + private AcsPassRuleService acsPassRuleService; + @Resource + private AcsAreaTreeCacheableService acsAreaTreeCacheableService; + protected final Logger logger = LoggerFactory.getLogger(getClass()); + + public Integer add(AcsElevatorDeviceAddParam param, CloudwalkCallContext context) throws ServiceException { + AcsElevatorDeviceAddDTO dto = + (AcsElevatorDeviceAddDTO)BeanCopyUtils.copyProperties(param, AcsElevatorDeviceAddDTO.class); + try { + Long createTime = Long.valueOf(System.currentTimeMillis()); + dto.setCreateTime(createTime); + dto.setLastUpdateTime(createTime); + String currentBuildingId = dto.getCurrentBuildingId(); + if (dto.getDeleteFlag() == null) { + dto.setDeleteFlag(Integer.valueOf(1)); + } + if (StringUtils.isNotBlank(currentBuildingId)) { + String imageStoreId = this.deviceImageStoreDao.getByBuildingId(currentBuildingId); + if (ObjectUtils.isEmpty(imageStoreId)) { + String bigImageStoreId = addImageStore(param, context); + this.deviceImageStoreDao.save(currentBuildingId, bigImageStoreId); + } else { + String applicationId = + this.acsApplicationService.getApplicationId(context.getCompany().getCompanyId()); + DeviceImageStoreAppBindParam bindParam = new DeviceImageStoreAppBindParam(); + bindParam.setImageStoreId(imageStoreId); + bindParam.setDeviceId(param.getDeviceId()); + bindParam.setApplicationId(applicationId); + this.acsDeviceImageStoreAppBindService.bindDeviceAndImageStore(bindParam, context); + } + } + return this.acsElevatorDeviceDao.add(dto); + } catch (Exception e) { + this.logger.error("保存派梯设备信息失败,原因:", e); + throw new ServiceException(e); + } + } + + public Integer edit(AcsElevatorDeviceEditParam param, CloudwalkCallContext context) throws ServiceException { + AcsElevatorDeviceEditDTO dto = + (AcsElevatorDeviceEditDTO)BeanCopyUtils.copyProperties(param, AcsElevatorDeviceEditDTO.class); + try { + AcsElevatorDeviceQueryByIdDTO deviceQueryByIdDTO = new AcsElevatorDeviceQueryByIdDTO(); + deviceQueryByIdDTO.setId(param.getId()); + AcsElevatorDeviceResultDTO deviceResultDTO = this.acsElevatorDeviceDao.getById(deviceQueryByIdDTO); + String oldImageStoreId = this.deviceImageStoreDao.getByBuildingId(deviceResultDTO.getCurrentBuildingId()); + if (deviceResultDTO != null && StringUtils.isNotBlank(deviceResultDTO.getCurrentFloorId())) { + if (!deviceResultDTO.getCurrentBuildingId().equals(param.getCurrentBuildingId())) { + String applicationId = + this.acsApplicationService.getApplicationId(context.getCompany().getCompanyId()); + DeviceImageStoreAppUnbindParam unbindParam = new DeviceImageStoreAppUnbindParam(); + unbindParam.setApplicationId(applicationId); + unbindParam.setImageStoreId(oldImageStoreId); + unbindParam.setDeviceId(deviceResultDTO.getDeviceId()); + unbindParam.setDeviceCode(deviceResultDTO.getDeviceCode()); + this.acsDeviceImageStoreAppBindService.unbindAppImageStoreDeviceNotDeleteImage(unbindParam, + context); + String imageStoreId = this.deviceImageStoreDao.getByBuildingId(param.getCurrentBuildingId()); + if (ObjectUtils.isEmpty(imageStoreId)) { + AcsElevatorDeviceAddParam addParam = (AcsElevatorDeviceAddParam)BeanCopyUtils + .copyProperties(param, AcsElevatorDeviceAddParam.class); + String bigImageStoreId = addImageStore(addParam, context); + this.deviceImageStoreDao.save(param.getCurrentBuildingId(), bigImageStoreId); + } else { + DeviceImageStoreAppBindParam bindParam = new DeviceImageStoreAppBindParam(); + bindParam.setImageStoreId(imageStoreId); + bindParam.setDeviceId(deviceResultDTO.getDeviceId()); + bindParam.setApplicationId(applicationId); + this.acsDeviceImageStoreAppBindService.bindDeviceAndImageStore(bindParam, context); + } + } + } + Long nowTime = Long.valueOf(System.currentTimeMillis()); + dto.setLastUpdateTime(nowTime); + return this.acsElevatorDeviceDao.edit(dto); + } catch (Exception e) { + this.logger.error("更新派梯设备信息失败,原因:", e); + throw new ServiceException(e); + } + } + + public Integer delete(List ids, CloudwalkCallContext context) throws ServiceException { + try { + String applicationId = this.acsApplicationService.getApplicationId(context.getCompany().getCompanyId()); + for (String id : ids) { + AcsElevatorDeviceQueryByIdDTO byIdDTO = new AcsElevatorDeviceQueryByIdDTO(); + byIdDTO.setId(id); + AcsElevatorDeviceResultDTO deviceResultDTO = this.acsElevatorDeviceDao.getById(byIdDTO); + String imageStoreId = this.deviceImageStoreDao.getByBuildingId(deviceResultDTO.getCurrentBuildingId()); + DeviceImageStoreAppUnbindParam unbindParam = new DeviceImageStoreAppUnbindParam(); + unbindParam.setApplicationId(applicationId); + unbindParam.setImageStoreId(imageStoreId); + unbindParam.setDeviceId(deviceResultDTO.getDeviceId()); + unbindParam.setDeviceCode(deviceResultDTO.getDeviceCode()); + this.acsDeviceImageStoreAppBindService.unbindAppImageStoreDeviceNotDeleteImage(unbindParam, context); + } + int result = this.acsElevatorDeviceDao.delete(ids).intValue(); + return Integer.valueOf(1); + } catch (Exception e) { + this.logger.error("更新派梯设备信息失败,原因:", e); + throw new ServiceException(e); + } + } + + public String getBuildingId(AcsElevatorDeviceQueryParam param) throws ServiceException { + AcsElevatorDeviceQueryDTO dto = + (AcsElevatorDeviceQueryDTO)BeanCopyUtils.copyProperties(param, AcsElevatorDeviceQueryDTO.class); + return this.acsElevatorDeviceDao.getBuildingId(dto); + } + + public String getBusinessId(AcsElevatorDeviceQueryParam param) throws ServiceException { + AcsElevatorDeviceQueryDTO dto = + (AcsElevatorDeviceQueryDTO)BeanCopyUtils.copyProperties(param, AcsElevatorDeviceQueryDTO.class); + return this.acsElevatorDeviceDao.getBusinessId(dto); + } + + public CloudwalkResult> get(AcsElevatorDeviceQueryParam param, + CloudwalkCallContext context) throws ServiceException { + AcsElevatorDeviceQueryDTO dto = + (AcsElevatorDeviceQueryDTO)BeanCopyUtils.copyProperties(param, AcsElevatorDeviceQueryDTO.class); + dto.setBusinessId(context.getCompany().getCompanyId()); + CloudwalkPageInfo page = new CloudwalkPageInfo(param.getCurrentPage(), param.getRowsOfPage()); + try { + CloudwalkPageAble deviceList = this.acsElevatorDeviceDao.page(dto, page); + return CloudwalkResult.success(deviceList); + } catch (Exception e) { + this.logger.error("分页查询派梯设备失败,失败原因:", e); + throw new ServiceException("76260108", getMessage("76260108")); + } + } + + public CloudwalkResult> devicePage(AcsDeviceQueryParam param, + CloudwalkPageInfo pageInfo, CloudwalkCallContext context) throws ServiceException { + try { + DeviceQueryParam queryParam = new DeviceQueryParam(); + if (!ObjectUtils.isEmpty(param.getDeviceName())) { + queryParam.setDeviceName(param.getDeviceName()); + } + if (!ObjectUtils.isEmpty(param.getAreaId())) { + queryParam.setAreaIds(Collections.singletonList(param.getAreaId())); + } + if (!ObjectUtils.isEmpty(param.getDeviceCategoryId())) { + queryParam.setDeviceTypeCategoryId(param.getDeviceCategoryId()); + } + queryParam.setBusinessId(context.getCompany().getCompanyId()); + CloudwalkResult> pageResult = this.deviceService.list(queryParam, context); + List result = new ArrayList<>(); + if (!pageResult.isSuccess() || CollectionUtils.isEmpty((Collection)pageResult.getData())) { + return CloudwalkResult.success(new CloudwalkPageAble(result, pageInfo, 0L)); + } + List deviceResult = deviceFilter((List)pageResult.getData(), context); + if (CollectionUtils.isEmpty(deviceResult)) { + return CloudwalkResult.success(new CloudwalkPageAble(result, pageInfo, 0L)); + } + Map areaMap = getAllAreaMap(context); + result = + page(convertDeviceNewResult(deviceResult, areaMap), pageInfo.getPageSize(), pageInfo.getCurrentPage()); + return CloudwalkResult.success(new CloudwalkPageAble(result, pageInfo, deviceResult.size())); + } catch (Exception e) { + this.logger.error("分页查询设备异常,原因:", e); + throw new ServiceException(e); + } + } + + public List getFo(AcsElevatorDeviceQueryParam param) throws ServiceException { + AcsElevatorDeviceQueryDTO dto = + (AcsElevatorDeviceQueryDTO)BeanCopyUtils.copyProperties(param, AcsElevatorDeviceQueryDTO.class); + List deviceList = this.acsElevatorDeviceDao.get(dto); + List deviceFoList = new ArrayList<>(); + for (AcsElevatorDeviceResultDTO resultDTO : deviceList) { + AcsElevatorDeviceQueryFoDTO foDto = + (AcsElevatorDeviceQueryFoDTO)BeanCopyUtils.copyProperties(resultDTO, AcsElevatorDeviceQueryFoDTO.class); + deviceFoList.add(foDto); + } + return deviceFoList; + } + + public AcsElevatorDeviceResultDTO getById(AcsElevatorDeviceQueryByIdParam param, CloudwalkCallContext var2) + throws ServiceException { + AcsElevatorDeviceQueryByIdDTO dto = + (AcsElevatorDeviceQueryByIdDTO)BeanCopyUtils.copyProperties(param, AcsElevatorDeviceQueryByIdDTO.class); + AcsElevatorDeviceResultDTO resultDTO = this.acsElevatorDeviceDao.getById(dto); + if (resultDTO != null && StringUtils.isNotBlank(resultDTO.getDeviceId())) { + DeviceQueryParam deviceQueryParam = new DeviceQueryParam(); + deviceQueryParam.setId(resultDTO.getId()); + CloudwalkResult> result = this.deviceService.list(deviceQueryParam, var2); + List list = (List)result.getData(); + if (list != null && list.size() > 0) { + DeviceResult deviceResult = list.get(0); + if (deviceResult != null) { + String id = deviceResult.getId(); + Long lastHeartbeatTime = deviceResult.getLastHeartbeatTime(); + String status = deviceResult.getOnlineStatus(); + resultDTO.setStatusString(status); + resultDTO.setLastHeartbeatTime(lastHeartbeatTime); + } + } + } + return resultDTO; + } + + public AcsElevatorDeviceResultDTO getByDeciveCode(String deviceCode) throws ServiceException { + return this.acsElevatorDeviceDao.getByDeciveCode(deviceCode); + } + + public CloudwalkResult listUnbindFloors(AcsRestructureQueryParam param, CloudwalkCallContext context) + throws ServiceException { + try { + List floorList; + List results = new ArrayList<>(); + if (!ObjectUtils.isEmpty(param.getPersonId())) { + AcsPassRuleImageDto dto = new AcsPassRuleImageDto(); + dto.setPersonId(param.getPersonId()); + PersonDetailParam detailParam = new PersonDetailParam(); + detailParam.setId(param.getPersonId()); + detailParam.setBusinessId(context.getCompany().getCompanyId()); + CloudwalkResult detail = this.personService.detail(detailParam, context); + if (!CollectionUtils.isEmpty(((PersonResult)detail.getData()).getLabelIds())) { + dto.setIncludeLabels(((PersonResult)detail.getData()).getLabelIds()); + } + if (!CollectionUtils.isEmpty(((PersonResult)detail.getData()).getOrganizationIds())) { + dto.setIncludeOrganizations(((PersonResult)detail.getData()).getOrganizationIds()); + } + floorList = this.imageRuleRefDao.listByPersonInfo(dto); + } else { + AcsPassRuleImageDto dto = new AcsPassRuleImageDto(); + if (!ObjectUtils.isEmpty(param.getLabelId())) { + dto.setIncludeLabels(Collections.singletonList(param.getLabelId())); + } + if (!ObjectUtils.isEmpty(param.getOrgId())) { + dto.setIncludeOrganizations(Collections.singletonList(param.getOrgId())); + } + floorList = this.imageRuleRefDao.listByRestructure(dto); + } + List floorIds = new ArrayList<>(); + if (!CollectionUtils.isEmpty(floorList)) { + floorList.forEach(floor -> floorIds.add(floor.getZoneId())); + } + AcsPassRuleQueryDto queryDto = new AcsPassRuleQueryDto(); + queryDto.setZoneIds(floorIds); + return CloudwalkResult.success(this.imageRuleRefDao.listByNotZoneIds(queryDto)); + } catch (Exception e) { + this.logger.error("查询未绑定的派梯楼层异常,原因:", e); + throw new ServiceException(e); + } + } + + public CloudwalkResult listFloors(AcsRestructureQueryParam param, CloudwalkCallContext context) + throws ServiceException { + try { + List floorList, unBindFloors; + List results = new ArrayList<>(); + if (!ObjectUtils.isEmpty(param.getPersonId())) { + AcsPassRuleImageDto acsPassRuleImageDto = new AcsPassRuleImageDto(); + acsPassRuleImageDto.setPersonId(param.getPersonId()); + PersonDetailParam detailParam = new PersonDetailParam(); + detailParam.setId(param.getPersonId()); + detailParam.setBusinessId(context.getCompany().getCompanyId()); + CloudwalkResult detail = this.personService.detail(detailParam, context); + if (!CollectionUtils.isEmpty(((PersonResult)detail.getData()).getLabelIds())) { + acsPassRuleImageDto.setIncludeLabels(((PersonResult)detail.getData()).getLabelIds()); + } + if (!CollectionUtils.isEmpty(((PersonResult)detail.getData()).getOrganizationIds())) { + acsPassRuleImageDto.setIncludeOrganizations(((PersonResult)detail.getData()).getOrganizationIds()); + } + floorList = this.imageRuleRefDao.listByPersonInfo(acsPassRuleImageDto); + } else { + AcsPassRuleImageDto acsPassRuleImageDto = new AcsPassRuleImageDto(); + if (!ObjectUtils.isEmpty(param.getLabelId())) { + acsPassRuleImageDto.setIncludeLabels(Collections.singletonList(param.getLabelId())); + } + if (!ObjectUtils.isEmpty(param.getOrgId())) { + acsPassRuleImageDto.setIncludeOrganizations(Collections.singletonList(param.getOrgId())); + } + floorList = this.imageRuleRefDao.listByRestructure(acsPassRuleImageDto); + } + AcsElevatorDeviceListDto dto = new AcsElevatorDeviceListDto(); + List floorIds = new ArrayList<>(); + if (!CollectionUtils.isEmpty(floorList)) { + floorList.forEach(floor -> floorIds.add(floor.getZoneId())); + } + AcsPassRuleQueryDto queryDto = new AcsPassRuleQueryDto(); + if (!ObjectUtils.isEmpty(param.getZoneId())) { + if (floorIds.contains(param.getZoneId())) { + return CloudwalkResult.success(results); + } + queryDto.setZoneId(param.getZoneId()); + unBindFloors = this.imageRuleRefDao.listByNotZoneIds(queryDto); + } else { + queryDto.setZoneIds(floorIds); + unBindFloors = this.imageRuleRefDao.listByNotZoneIds(queryDto); + } + List unBindFloorIds = new ArrayList<>(); + if (!CollectionUtils.isEmpty(unBindFloors)) { + unBindFloors.forEach(floor -> unBindFloorIds.add(floor.getZoneId())); + } else { + return CloudwalkResult.success(results); + } + if (!ObjectUtils.isEmpty(param.getZoneId())) { + dto.setCurrentFloorId(param.getZoneId()); + } else { + dto.setCurrentFloorIds(unBindFloorIds); + } + List deviceList = this.acsElevatorDeviceDao.listByZoneIds(dto); + List deviceIds = new ArrayList<>(); + Map mapDevice = new HashMap<>(); + if (!CollectionUtils.isEmpty(deviceList)) { + deviceList.forEach(device -> deviceIds.add(device.getDeviceId())); + DeviceQueryParam queryParam = new DeviceQueryParam(); + queryParam.setBusinessId(context.getCompany().getCompanyId()); + queryParam.setIds(deviceIds); + CloudwalkResult> resultList = this.deviceService.list(queryParam, context); + List list = (List)resultList.getData(); + if (list != null && list.size() > 0) { + for (DeviceResult deviceResult : list) { + mapDevice.put(deviceResult.getId(), deviceResult); + } + } + } + for (AcsPassRuleImageResultDto floor : unBindFloors) { + AcsDeviceRestructureResult result = new AcsDeviceRestructureResult(); + result.setZoneId(floor.getZoneId()); + result.setZoneName(floor.getZoneName()); + if (!CollectionUtils.isEmpty(deviceList)) { + result.setParentId(((AcsElevatorDeviceResultDTO)deviceList.get(0)).getCurrentBuildingId()); + } else { + result.setParentId(this.floorBuildingId); + } + String online = ""; + String offline = ""; + if (!CollectionUtils.isEmpty(deviceList)) { + for (int i = 0; i < deviceList.size(); i++) { + if (floor.getZoneId() + .equals(((AcsElevatorDeviceResultDTO)deviceList.get(i)).getCurrentFloorId())) { + DeviceResult deviceResult = + mapDevice.get(((AcsElevatorDeviceResultDTO)deviceList.get(i)).getDeviceId()); + if (!ObjectUtils.isEmpty(deviceResult)) { + if ("2".equals(deviceResult.getOnlineStatus())) { + if ("".equals(online)) { + online = online + deviceResult.getDeviceName(); + } else { + online = online + "," + deviceResult.getDeviceName(); + } + } else if ("".equals(offline)) { + offline = offline + deviceResult.getDeviceName(); + } else { + offline = offline + ',' + deviceResult.getDeviceName(); + } + } + } + } + } + result.setOnlineDevices(online); + result.setOfflineDevices(offline); + results.add(result); + } + return CloudwalkResult.success(results); + } catch (Exception e) { + this.logger.error("查询未绑定的派梯楼层异常,原因:", e); + throw new ServiceException(e); + } + } + + public CloudwalkResult listCondition(AcsRestructureQueryParam param, CloudwalkCallContext context) + throws ServiceException { + try { + List floorList; + List results = new ArrayList<>(); + if (!ObjectUtils.isEmpty(param.getBusinessId())) { + context.getCompany().setCompanyId(param.getBusinessId()); + } + if (!ObjectUtils.isEmpty(param.getPersonId())) { + AcsPassRuleImageDto dto = new AcsPassRuleImageDto(); + dto.setPersonId(param.getPersonId()); + PersonDetailParam detailParam = new PersonDetailParam(); + detailParam.setId(param.getPersonId()); + detailParam.setBusinessId(context.getCompany().getCompanyId()); + CloudwalkResult detail = this.personService.detail(detailParam, context); + if (!CollectionUtils.isEmpty(((PersonResult)detail.getData()).getLabelIds())) { + dto.setIncludeLabels(((PersonResult)detail.getData()).getLabelIds()); + } + if (!CollectionUtils.isEmpty(((PersonResult)detail.getData()).getOrganizationIds())) { + dto.setIncludeOrganizations(((PersonResult)detail.getData()).getOrganizationIds()); + } + floorList = this.imageRuleRefDao.listByPersonInfo(dto); + } else { + AcsPassRuleImageDto dto = new AcsPassRuleImageDto(); + if (!ObjectUtils.isEmpty(param.getLabelId())) { + dto.setIncludeLabels(Collections.singletonList(param.getLabelId())); + } + if (!ObjectUtils.isEmpty(param.getOrgId())) { + dto.setIncludeOrganizations(Collections.singletonList(param.getOrgId())); + } + floorList = this.imageRuleRefDao.listByRestructure(dto); + } + if (!CollectionUtils.isEmpty(floorList)) { + AcsElevatorDeviceListDto dto = new AcsElevatorDeviceListDto(); + List floorIds = new ArrayList<>(); + floorList.forEach(floor -> floorIds.add(floor.getZoneId())); + if (!ObjectUtils.isEmpty(param.getZoneId())) { + if (floorIds.contains(param.getZoneId())) { + dto.setCurrentFloorIds(Collections.singletonList(param.getZoneId())); + } else { + return CloudwalkResult.success(results); + } + } else { + dto.setCurrentFloorIds(floorIds); + } + List deviceList = this.acsElevatorDeviceDao.listByZoneIds(dto); + if (!CollectionUtils.isEmpty(deviceList)) { + List deviceIds = new ArrayList<>(); + deviceList.forEach(device -> deviceIds.add(device.getDeviceId())); + Map mapDevice = new HashMap<>(); + DeviceQueryParam queryParam = new DeviceQueryParam(); + queryParam.setBusinessId(context.getCompany().getCompanyId()); + queryParam.setIds(deviceIds); + CloudwalkResult> resultList = this.deviceService.list(queryParam, context); + List list = (List)resultList.getData(); + if (list != null && list.size() > 0) { + for (DeviceResult deviceResult : list) { + mapDevice.put(deviceResult.getId(), deviceResult); + } + } + for (AcsPassRuleImageResultDto floor : floorList) { + if (!ObjectUtils.isEmpty(param.getZoneId()) && !param.getZoneId().equals(floor.getZoneId())) { + continue; + } + AcsDeviceRestructureResult result = new AcsDeviceRestructureResult(); + result.setZoneId(floor.getZoneId()); + result.setZoneName(floor.getZoneName()); + result.setParentId(this.floorBuildingId); + String online = ""; + String offline = ""; + for (int i = 0; i < deviceList.size(); i++) { + if (floor.getZoneId() + .equals(((AcsElevatorDeviceResultDTO)deviceList.get(i)).getCurrentFloorId())) { + DeviceResult deviceResult = + mapDevice.get(((AcsElevatorDeviceResultDTO)deviceList.get(i)).getDeviceId()); + result.setParentId( + ((AcsElevatorDeviceResultDTO)deviceList.get(i)).getCurrentBuildingId()); + if (!ObjectUtils.isEmpty(deviceResult)) { + if ("2".equals(deviceResult.getOnlineStatus())) { + if ("".equals(online)) { + online = online + deviceResult.getDeviceName(); + } else { + online = online + "," + deviceResult.getDeviceName(); + } + } else if ("".equals(offline)) { + offline = offline + deviceResult.getDeviceName(); + } else { + offline = offline + ',' + deviceResult.getDeviceName(); + } + } + } + } + result.setOnlineDevices(online); + result.setOfflineDevices(offline); + results.add(result); + } + } else if (!ObjectUtils.isEmpty(param.getZoneId())) { + for (AcsPassRuleImageResultDto floor : floorList) { + if (floor.getZoneId().equals(param.getZoneId())) { + AcsDeviceRestructureResult result = new AcsDeviceRestructureResult(); + result.setZoneId(floor.getZoneId()); + result.setZoneName(floor.getZoneName()); + result.setParentId(this.floorBuildingId); + results.add(result); + break; + } + } + } else { + for (AcsPassRuleImageResultDto floor : floorList) { + AcsDeviceRestructureResult result = new AcsDeviceRestructureResult(); + result.setZoneId(floor.getZoneId()); + result.setZoneName(floor.getZoneName()); + result.setParentId(this.floorBuildingId); + results.add(result); + } + } + } + return CloudwalkResult.success(results); + } catch (Exception e) { + this.logger.error("根据机构id、标签id、人员id查询派梯设备异常,原因:", e); + throw new ServiceException(e); + } + } + + public CloudwalkResult listConditionByLabelIds(AcsRestructureQueryParam param, CloudwalkCallContext context) + throws ServiceException { + try { + List results = new ArrayList<>(); + if (CollectionUtils.isEmpty(param.getLabelIds())) { + return CloudwalkResult.success(null); + } + AcsPassRuleImageDto dto = new AcsPassRuleImageDto(); + dto.setIncludeLabels(param.getLabelIds()); + List floorList = this.imageRuleRefDao.listFloorsByRestructure(dto); + Map> maps = new HashMap<>(); + if (CollectionUtils.isEmpty(floorList)) { + for (String label : param.getLabelIds()) { + AcsLabelElevatorResult result = new AcsLabelElevatorResult(); + result.setLabelId(label); + result.setDetails(null); + results.add(result); + } + } else { + for (AcsPassRuleLabelResultDto resultDto : floorList) { + List dtos = maps.get(resultDto.getLabelId()); + if (!CollectionUtils.isEmpty(dtos)) { + dtos.add(resultDto); + maps.put(resultDto.getLabelId(), dtos); + continue; + } + List dtoList = new ArrayList<>(); + dtoList.add(resultDto); + maps.put(resultDto.getLabelId(), dtoList); + } + for (String label : param.getLabelIds()) { + List dtoList = maps.get(label); + AcsLabelElevatorResult result = new AcsLabelElevatorResult(); + result.setLabelId(label); + if (!CollectionUtils.isEmpty(dtoList)) { + result.setDetails(dtoList); + } else { + result.setDetails(null); + } + results.add(result); + } + } + return CloudwalkResult.success(results); + } catch (Exception e) { + this.logger.error("根据标签id集合查询派梯楼层权限异常,原因:", e); + throw new ServiceException(e); + } + } + + public CloudwalkResult bindingFloors(AcsRestructureBindingParam param, CloudwalkCallContext context) + throws ServiceException { + try { + AcsPassRuleImageDto dto = new AcsPassRuleImageDto(); + if (!ObjectUtils.isEmpty(param.getLabelId())) { + dto.setIncludeLabels(Collections.singletonList(param.getLabelId())); + } + if (!ObjectUtils.isEmpty(param.getOrgId())) { + dto.setIncludeOrganizations(Collections.singletonList(param.getOrgId())); + } + List floorList = this.imageRuleRefDao.listByRestructure(dto); + List floorIds = new ArrayList<>(); + Map zoneMap = new HashMap<>(); + for (AcsPassRuleImageResultDto resultDto : floorList) { + floorIds.add(resultDto.getZoneId()); + zoneMap.put(resultDto.getZoneId(), resultDto); + } + List addFloors = new ArrayList<>(); + List delFloorIds = new ArrayList<>(); + List addFloorIds = new ArrayList<>(); + if (!CollectionUtils.isEmpty(floorList)) { + for (AcsPassRuleImageResultDto floor : floorList) { + if (!param.getZoneIds().contains(floor.getZoneId())) { + delFloorIds.add(floor.getZoneId()); + } + } + for (String zoneId : param.getZoneIds()) { + if (!floorIds.contains(zoneId)) { + addFloorIds.add(zoneId); + } + } + if (!CollectionUtils.isEmpty(addFloorIds)) { + addFloors.addAll(this.imageRuleRefDao.listZoneInfoByIds(addFloorIds)); + } + } else { + addFloors.addAll(this.imageRuleRefDao.listZoneInfoByIds(param.getZoneIds())); + } + if (!CollectionUtils.isEmpty(addFloors) || !CollectionUtils.isEmpty(delFloorIds)) { + String taskId = genUUID(); + AcsDeviceTaskAddDto addDto = new AcsDeviceTaskAddDto(); + addDto.setId(taskId); + addDto.setAllDevices(Integer.valueOf(addFloors.size() + delFloorIds.size())); + addDto.setBindDevices(Integer.valueOf(0)); + addDto.setIsStop(Integer.valueOf(0)); + this.acsDeviceTaskDao.insert(addDto); + param.setTaskId(taskId); + this.acsDeviceTaskService.updateFloors(param, addFloors, delFloorIds, context); + return CloudwalkResult.success(taskId); + } + return CloudwalkResult.success(null); + } catch (Exception e) { + this.logger.error("根据机构id、标签id、人员id查询派梯设备异常,原因:", e); + throw new ServiceException(e); + } + } + + public CloudwalkResult bindingPerson(AcsRestructureBindingParam param, CloudwalkCallContext context) + throws ServiceException { + try { + AcsPassRuleImageDto dto = new AcsPassRuleImageDto(); + dto.setPersonId(param.getPersonId()); + PersonDetailParam detailParam = new PersonDetailParam(); + detailParam.setId(param.getPersonId()); + detailParam.setBusinessId(context.getCompany().getCompanyId()); + CloudwalkResult detail = this.personService.detail(detailParam, context); + if (!CollectionUtils.isEmpty(((PersonResult)detail.getData()).getLabelIds())) { + dto.setIncludeLabels(((PersonResult)detail.getData()).getLabelIds()); + } + if (!CollectionUtils.isEmpty(((PersonResult)detail.getData()).getLabelIds())) { + dto.setIncludeOrganizations(((PersonResult)detail.getData()).getOrganizationIds()); + } + List floorList = this.imageRuleRefDao.listByPersonInfo(dto); + List floorIds = new ArrayList<>(); + Map zoneMap = new HashMap<>(); + floorList.forEach(floor -> floorIds.add(floor.getZoneId())); + for (AcsPassRuleImageResultDto resultDto : floorList) { + floorIds.add(resultDto.getZoneId()); + zoneMap.put(resultDto.getZoneId(), resultDto); + } + List addFloors = new ArrayList<>(); + List delFloorIds = new ArrayList<>(); + List addFloorIds = new ArrayList<>(); + if (!CollectionUtils.isEmpty(floorList)) { + for (AcsPassRuleImageResultDto floor : floorList) { + if (!param.getZoneIds().contains(floor.getZoneId())) { + delFloorIds.add(floor.getZoneId()); + } + } + for (String zoneId : param.getZoneIds()) { + if (!floorIds.contains(zoneId)) { + addFloorIds.add(zoneId); + } + } + if (!CollectionUtils.isEmpty(addFloorIds)) { + addFloors.addAll(this.imageRuleRefDao.listZoneInfoByIds(addFloorIds)); + } + } else { + addFloors.addAll(this.imageRuleRefDao.listZoneInfoByIds(param.getZoneIds())); + } + if (!CollectionUtils.isEmpty(addFloors) || !CollectionUtils.isEmpty(delFloorIds)) { + String taskId = genUUID(); + AcsDeviceTaskAddDto addDto = new AcsDeviceTaskAddDto(); + addDto.setId(taskId); + addDto.setAllDevices(Integer.valueOf(addFloors.size() + delFloorIds.size())); + addDto.setBindDevices(Integer.valueOf(0)); + addDto.setIsStop(Integer.valueOf(0)); + this.acsDeviceTaskDao.insert(addDto); + param.setTaskId(taskId); + this.acsDeviceTaskService.updateFloors(param, addFloors, delFloorIds, context); + return CloudwalkResult.success(taskId); + } + return CloudwalkResult.success(null); + } catch (Exception e) { + this.logger.error("根人员批量绑定派梯楼层异常,原因:", e); + throw new ServiceException(e); + } + } + + public CloudwalkResult getTask(AcsDeviceRestructureTaskParam param, CloudwalkCallContext context) + throws ServiceException { + try { + return CloudwalkResult.success(this.acsDeviceTaskDao.getById(param.getTaskId())); + } catch (Exception e) { + this.logger.error("根据任务id查询任务详情异常,原因:", e); + throw new ServiceException(e); + } + } + + public CloudwalkResult setTaskStop(AcsDeviceRestructureTaskParam param, CloudwalkCallContext context) + throws ServiceException { + try { + AcsDeviceTaskAddDto dto = new AcsDeviceTaskAddDto(); + dto.setId(param.getTaskId()); + dto.setIsStop(Integer.valueOf(1)); + this.acsDeviceTaskDao.updateIsStop(dto); + return CloudwalkResult.success(Boolean.valueOf(true)); + } catch (Exception e) { + this.logger.error("编辑任务进程异常,原因:", e); + throw new ServiceException(e); + } + } + + private String addImageStore(AcsElevatorDeviceAddParam param, CloudwalkCallContext context) + throws ServiceException { + ImageStoreAddParam imageStoreAddParam = new ImageStoreAddParam(); + String applicationId = this.acsApplicationService.getApplicationId(context.getCompany().getCompanyId()); + imageStoreAddParam.setName(param.getCurrentBuilding() + "-默认图库"); + imageStoreAddParam.setType(Short.valueOf((short)1)); + imageStoreAddParam.setSourceApplicationId(applicationId); + imageStoreAddParam.setBusinessId(context.getCompany().getCompanyId()); + CloudwalkResult imageStoreId = this.imageStoreService.add(imageStoreAddParam, context); + if (!imageStoreId.isSuccess()) { + this.logger.info("远程调用新增图库失败,原因:" + imageStoreId.getMessage()); + throw new ServiceException(imageStoreId.getCode(), imageStoreId.getMessage()); + } + this.logger.info("远程调用新增图库出参:imageStoreId=[{}]", imageStoreId.getData()); + DeviceImageStoreAppBindParam appBindParam = new DeviceImageStoreAppBindParam(); + appBindParam.setImageStoreId((String)imageStoreId.getData()); + appBindParam.setApplicationId(applicationId); + this.acsDeviceImageStoreAppBindService.bindAppImageStoreDevice(appBindParam, context); + try { + DeviceImageStoreAppBindParam bindParam = new DeviceImageStoreAppBindParam(); + bindParam.setImageStoreId((String)imageStoreId.getData()); + bindParam.setDeviceId(param.getDeviceId()); + bindParam.setApplicationId(applicationId); + this.acsDeviceImageStoreAppBindService.bindDeviceAndImageStore(bindParam, context); + } catch (ServiceException e) { + this.logger.error("图库关联失败,图库id={},原因:{}", imageStoreId.getData(), e.getMessage()); + ImageStoreDelParam delParam = new ImageStoreDelParam(); + delParam.setId((String)imageStoreId.getData()); + delParam.setBusinessId(context.getCompany().getCompanyId()); + this.logger.info("回滚删除图库开始,delParam={},context={}", JSONObject.toJSON(delParam), + JSONObject.toJSON(context)); + CloudwalkResult deleteResult = this.imageStoreService.delete(delParam, context); + this.logger.info("删除图库:图库id={},结果:{}", imageStoreId, deleteResult.getMessage()); + throw new ServiceException(e.getCode(), e.getMessage()); + } + return (String)imageStoreId.getData(); + } + + private List deviceFilter(List pageResult, CloudwalkCallContext context) + throws ServiceException { + List acsDeviceNewResults = getAcsDeviceIds(context); + List acsDeviceIds = (List)acsDeviceNewResults.stream().map(AcsDeviceNewResult::getDeviceId) + .collect(Collectors.toList()); + List deviceIds = + (List)pageResult.stream().map(DeviceResult::getId).collect(Collectors.toList()); + List newList = CollectionUtils.removeList(deviceIds, acsDeviceIds); + List newDeviceResultList = new ArrayList<>(); + Map deviceResultMap = + (Map)pageResult.stream().collect(Collectors.toMap(DeviceResult::getId, d -> d)); + for (String id : newList) { + newDeviceResultList.add(deviceResultMap.get(id)); + } + return newDeviceResultList; + } + + private List getAcsDeviceIds(CloudwalkCallContext context) throws ServiceException { + List acsDeviceList; + List acsDeviceNewResultList = new ArrayList<>(); + AcsElevatorDeviceQueryDTO dto = new AcsElevatorDeviceQueryDTO(); + dto.setBusinessId(context.getCompany().getCompanyId()); + try { + acsDeviceList = this.acsElevatorDeviceDao.get(dto); + } catch (ServiceException e) { + throw new ServiceException("76260007", getMessage("76260007")); + } + Map areaMap = getAllAreaMap(context); + if (CollectionUtils.isNotEmpty(acsDeviceList)) { + List deviceIds = (List)acsDeviceList.stream().map(AcsElevatorDeviceResultDTO::getDeviceId) + .collect(Collectors.toList()); + DeviceQueryParam queryParam = new DeviceQueryParam(); + queryParam.setIds(deviceIds); + queryParam.setBusinessId(context.getCompany().getCompanyId()); + CloudwalkResult> deviceResult = this.deviceService.list(queryParam, context); + if (deviceResult.isSuccess()) { + if (CollectionUtils.isNotEmpty((Collection)deviceResult.getData())) { + acsDeviceNewResultList = + convertDeviceNewResult((Collection)deviceResult.getData(), areaMap); + } + } else { + this.logger.error("查询设备信息列表失败,原因={}", deviceResult.getMessage()); + throw new ServiceException("查询设备信息列表失败"); + } + } + return acsDeviceNewResultList; + } + + protected Map getAllAreaMap(CloudwalkCallContext context) { + DeviceAreaTreeParam areaTreeParam = new DeviceAreaTreeParam(); + areaTreeParam.setBusinessId(context.getCompany().getCompanyId()); + CloudwalkResult> areaTree = this.acsAreaTreeCacheableService.tree(areaTreeParam, context); + Map areaMap = new HashMap<>(); + getAreaMap((List)areaTree.getData(), areaMap); + return areaMap; + } + + protected void getAreaMap(List areaTreeResultList, Map areaMap) { + for (AreaTreeResult areaTree : areaTreeResultList) { + areaMap.put(areaTree.getId(), areaTree.getName()); + if (areaTree.getChildren() != null) { + getAreaMap(areaTree.getChildren(), areaMap); + } + } + } + + protected List convertDeviceNewResult(Collection datas, + Map areaMap) { + List result = new ArrayList<>(); + for (DeviceResult data : datas) { + AcsDeviceNewResult acsDeviceResult = new AcsDeviceNewResult(); + BeanCopyUtils.copyProperties(data, acsDeviceResult); + acsDeviceResult.setId(data.getId()); + acsDeviceResult.setDeviceId(data.getId()); + acsDeviceResult.setDeviceStatus(Integer.valueOf(data.getStatus())); + acsDeviceResult.setDeviceOnlineStatus(Integer.valueOf(data.getOnlineStatus())); + acsDeviceResult.setAddress(getAddress(data)); + acsDeviceResult.setAreaName(areaMap.get(data.getAreaId())); + result.add(acsDeviceResult); + } + return result; + } + + protected String getAddress(DeviceResult data) { + StringBuffer sb = new StringBuffer(); + if (StringUtils.isNotBlank(data.getDistrictMergeName())) { + sb.append(data.getDistrictMergeName()); + } + if (StringUtils.isNotBlank(data.getAreaName())) { + sb.append(" "); + sb.append(data.getAreaName()); + } + return sb.toString().trim(); + } + + private List page(List dataList, int pageSize, int currentPage) { + List currentPageList = new ArrayList<>(); + if (dataList != null && dataList.size() > 0) { + int currIdx = (currentPage > 1) ? ((currentPage - 1) * pageSize) : 0; + for (int i = 0; i < pageSize && i < dataList.size() - currIdx; i++) { + AcsDeviceNewResult data = dataList.get(currIdx + i); + DeviceResult deviceResult = (DeviceResult)BeanCopyUtils.copyProperties(data, DeviceResult.class); + currentPageList.add(deviceResult); + } + } + return currentPageList; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/param/AcsDeviceQueryParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/param/AcsDeviceQueryParam.java new file mode 100644 index 00000000..530877e1 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/param/AcsDeviceQueryParam.java @@ -0,0 +1,34 @@ +package cn.cloudwalk.elevator.device.param; + +import cn.cloudwalk.cloud.page.CloudwalkBasePageForm; +import java.io.Serializable; + +public class AcsDeviceQueryParam extends CloudwalkBasePageForm implements Serializable { + private String deviceName; + private String deviceCategoryId; + private String areaId; + + public String getDeviceName() { + return this.deviceName; + } + + public void setDeviceName(String deviceName) { + this.deviceName = deviceName; + } + + public String getDeviceCategoryId() { + return this.deviceCategoryId; + } + + public void setDeviceCategoryId(String deviceCategoryId) { + this.deviceCategoryId = deviceCategoryId; + } + + public String getAreaId() { + return this.areaId; + } + + public void setAreaId(String areaId) { + this.areaId = areaId; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/param/AcsDeviceRestructureTaskParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/param/AcsDeviceRestructureTaskParam.java new file mode 100644 index 00000000..1c3a8840 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/param/AcsDeviceRestructureTaskParam.java @@ -0,0 +1,43 @@ +package cn.cloudwalk.elevator.device.param; + +import java.io.Serializable; + +public class AcsDeviceRestructureTaskParam implements Serializable { + private static final long serialVersionUID = -7349123760464380004L; + private String taskId; + + public String toString() { + return "AcsDeviceRestructureTaskParam(taskId=" + getTaskId() + ")"; + } + + public int hashCode() { + int PRIME = 59; + result = 1; + Object $taskId = getTaskId(); + return result * 59 + (($taskId == null) ? 43 : $taskId.hashCode()); + } + + protected boolean canEqual(Object other) { + return other instanceof AcsDeviceRestructureTaskParam; + } + + public boolean equals(Object o) { + if (o == this) + return true; + if (!(o instanceof AcsDeviceRestructureTaskParam)) + return false; + AcsDeviceRestructureTaskParam other = (AcsDeviceRestructureTaskParam)o; + if (!other.canEqual(this)) + return false; + Object this$taskId = getTaskId(), other$taskId = other.getTaskId(); + return !((this$taskId == null) ? (other$taskId != null) : !this$taskId.equals(other$taskId)); + } + + public void setTaskId(String taskId) { + this.taskId = taskId; + } + + public String getTaskId() { + return this.taskId; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/param/AcsElevatorDeviceAddParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/param/AcsElevatorDeviceAddParam.java new file mode 100644 index 00000000..cd1eeb72 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/param/AcsElevatorDeviceAddParam.java @@ -0,0 +1,157 @@ +package cn.cloudwalk.elevator.device.param; + +import cn.cloudwalk.cloud.entity.CloudwalkBaseTimes; +import java.io.Serializable; +import javax.validation.constraints.NotNull; +import org.hibernate.validator.constraints.NotEmpty; + +public class AcsElevatorDeviceAddParam extends CloudwalkBaseTimes implements Serializable { + private String businessId; + @NotEmpty + private String deviceId; + @NotEmpty + private String deviceCode; + @NotNull + private String deviceName; + private String deviceTypeName; + private String elevatorFloorList; + @NotNull + private String currentFloorId; + private String currentFloor; + private String currentBuilding; + private String currentBuildingId; + private String areaName; + private Integer status; + private Integer deleteFlag; + private String areaId; + private String elevatorFloorIdList; + + public String getElevatorFloorIdList() { + return this.elevatorFloorIdList; + } + + public void setElevatorFloorIdList(String elevatorFloorIdList) { + this.elevatorFloorIdList = elevatorFloorIdList; + } + + public String getAreaId() { + return this.areaId; + } + + public void setAreaId(String areaId) { + this.areaId = areaId; + } + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getDeviceId() { + return this.deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public String getDeviceCode() { + return this.deviceCode; + } + + public void setDeviceCode(String deviceCode) { + this.deviceCode = deviceCode; + } + + public String getDeviceName() { + return this.deviceName; + } + + public void setDeviceName(String deviceName) { + this.deviceName = deviceName; + } + + public String getDeviceTypeName() { + return this.deviceTypeName; + } + + public void setDeviceTypeName(String deviceTypeName) { + this.deviceTypeName = deviceTypeName; + } + + public String getElevatorFloorList() { + return this.elevatorFloorList; + } + + public void setElevatorFloorList(String elevatorFloorList) { + this.elevatorFloorList = elevatorFloorList; + } + + public String getCurrentFloorId() { + return this.currentFloorId; + } + + public void setCurrentFloorId(String currentFloorId) { + this.currentFloorId = currentFloorId; + } + + public String getCurrentFloor() { + return this.currentFloor; + } + + public void setCurrentFloor(String currentFloor) { + this.currentFloor = currentFloor; + } + + public String getCurrentBuilding() { + return this.currentBuilding; + } + + public void setCurrentBuilding(String currentBuilding) { + this.currentBuilding = currentBuilding; + } + + public String getAreaName() { + return this.areaName; + } + + public void setAreaName(String areaName) { + this.areaName = areaName; + } + + public Integer getStatus() { + return this.status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Integer getDeleteFlag() { + return this.deleteFlag; + } + + public void setDeleteFlag(Integer deleteFlag) { + this.deleteFlag = deleteFlag; + } + + public String getCurrentBuildingId() { + return this.currentBuildingId; + } + + public void setCurrentBuildingId(String currentBuildingId) { + this.currentBuildingId = currentBuildingId; + } + + public String toString() { + return "AcsElevatorDeviceAddDTO{businessId='" + this.businessId + '\'' + ", deviceId='" + this.deviceId + '\'' + + ", deviceCode='" + this.deviceCode + '\'' + ", deviceName='" + this.deviceName + '\'' + + ", deviceTypeName='" + this.deviceTypeName + '\'' + ", elevatorFloorList='" + this.elevatorFloorList + + '\'' + ", currentFloorId='" + this.currentFloorId + '\'' + ", currentFloor='" + this.currentFloor + '\'' + + ", currentBuilding='" + this.currentBuilding + '\'' + ", areaName='" + this.areaName + '\'' + ", status=" + + this.status + ", deleteFlag=" + this.deleteFlag + '}'; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/param/AcsElevatorDeviceEditParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/param/AcsElevatorDeviceEditParam.java new file mode 100644 index 00000000..d3713071 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/param/AcsElevatorDeviceEditParam.java @@ -0,0 +1,123 @@ +package cn.cloudwalk.elevator.device.param; + +import cn.cloudwalk.cloud.entity.CloudwalkBaseTimes; +import java.io.Serializable; +import javax.validation.constraints.NotNull; + +public class AcsElevatorDeviceEditParam extends CloudwalkBaseTimes implements Serializable { + private String elevatorFloorList; + @NotNull + private String currentFloorId; + private String currentFloor; + private String currentBuilding; + private String currentBuildingId; + private String areaId; + private String elevatorFloorIdList; + private String businessId; + private String deviceId; + private String deviceCode; + private String deviceName; + private String deviceTypeName; + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getDeviceId() { + return this.deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public String getDeviceCode() { + return this.deviceCode; + } + + public void setDeviceCode(String deviceCode) { + this.deviceCode = deviceCode; + } + + public String getDeviceName() { + return this.deviceName; + } + + public void setDeviceName(String deviceName) { + this.deviceName = deviceName; + } + + public String getDeviceTypeName() { + return this.deviceTypeName; + } + + public void setDeviceTypeName(String deviceTypeName) { + this.deviceTypeName = deviceTypeName; + } + + public String getElevatorFloorIdList() { + return this.elevatorFloorIdList; + } + + public void setElevatorFloorIdList(String elevatorFloorIdList) { + this.elevatorFloorIdList = elevatorFloorIdList; + } + + public String getAreaId() { + return this.areaId; + } + + public void setAreaId(String areaId) { + this.areaId = areaId; + } + + public String getElevatorFloorList() { + return this.elevatorFloorList; + } + + public void setElevatorFloorList(String elevatorFloorList) { + this.elevatorFloorList = elevatorFloorList; + } + + public String getCurrentFloorId() { + return this.currentFloorId; + } + + public void setCurrentFloorId(String currentFloorId) { + this.currentFloorId = currentFloorId; + } + + public String getCurrentFloor() { + return this.currentFloor; + } + + public void setCurrentFloor(String currentFloor) { + this.currentFloor = currentFloor; + } + + public String getCurrentBuilding() { + return this.currentBuilding; + } + + public void setCurrentBuilding(String currentBuilding) { + this.currentBuilding = currentBuilding; + } + + public String getCurrentBuildingId() { + return this.currentBuildingId; + } + + public void setCurrentBuildingId(String currentBuildingId) { + this.currentBuildingId = currentBuildingId; + } + + public String toString() { + return "AcsElevatorDeviceAddDTO{, elevatorFloorList='" + this.elevatorFloorList + '\'' + ", currentFloorId='" + + this.currentFloorId + '\'' + ", currentFloor='" + this.currentFloor + '\'' + ", currentBuilding='" + + this.currentBuilding + '\'' + '}'; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/param/AcsElevatorDeviceListParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/param/AcsElevatorDeviceListParam.java new file mode 100644 index 00000000..659017fa --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/param/AcsElevatorDeviceListParam.java @@ -0,0 +1,27 @@ +package cn.cloudwalk.elevator.device.param; + +import cn.cloudwalk.cloud.entity.CloudwalkBaseTimes; +import java.io.Serializable; +import javax.validation.constraints.NotNull; + +public class AcsElevatorDeviceListParam extends CloudwalkBaseTimes implements Serializable { + private String businessId; + @NotNull + private String currentFloorId; + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getCurrentFloorId() { + return this.currentFloorId; + } + + public void setCurrentFloorId(String currentFloorId) { + this.currentFloorId = currentFloorId; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/param/AcsElevatorDeviceQueryByIdParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/param/AcsElevatorDeviceQueryByIdParam.java new file mode 100644 index 00000000..1bf21dcf --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/param/AcsElevatorDeviceQueryByIdParam.java @@ -0,0 +1,16 @@ +package cn.cloudwalk.elevator.device.param; + +import cn.cloudwalk.cloud.page.CloudwalkBasePageForm; +import java.io.Serializable; + +public class AcsElevatorDeviceQueryByIdParam extends CloudwalkBasePageForm implements Serializable { + private String id; + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/param/AcsElevatorDeviceQueryParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/param/AcsElevatorDeviceQueryParam.java new file mode 100644 index 00000000..0943da27 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/param/AcsElevatorDeviceQueryParam.java @@ -0,0 +1,91 @@ +package cn.cloudwalk.elevator.device.param; + +import cn.cloudwalk.cloud.page.CloudwalkBasePageForm; +import java.io.Serializable; +import java.util.List; +import javax.validation.constraints.NotNull; + +public class AcsElevatorDeviceQueryParam extends CloudwalkBasePageForm implements Serializable { + @NotNull + private String deviceName; + private String deviceTypeName; + private String areaName; + private String deviceId; + private String deviceCode; + private List areaIds; + private Integer status; + private Integer onlineStatus; + private String ip; + + public Integer getStatus() { + return this.status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Integer getOnlineStatus() { + return this.onlineStatus; + } + + public void setOnlineStatus(Integer onlineStatus) { + this.onlineStatus = onlineStatus; + } + + public String getIp() { + return this.ip; + } + + public void setIp(String ip) { + this.ip = ip; + } + + public String getDeviceId() { + return this.deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public List getAreaIds() { + return this.areaIds; + } + + public void setAreaIds(List areaIds) { + this.areaIds = areaIds; + } + + public String getDeviceName() { + return this.deviceName; + } + + public void setDeviceName(String deviceName) { + this.deviceName = deviceName; + } + + public String getDeviceTypeName() { + return this.deviceTypeName; + } + + public void setDeviceTypeName(String deviceTypeName) { + this.deviceTypeName = deviceTypeName; + } + + public String getAreaName() { + return this.areaName; + } + + public void setAreaName(String areaName) { + this.areaName = areaName; + } + + public String getDeviceCode() { + return this.deviceCode; + } + + public void setDeviceCode(String deviceCode) { + this.deviceCode = deviceCode; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/param/AcsRestructureBindingParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/param/AcsRestructureBindingParam.java new file mode 100644 index 00000000..fcf4f5a9 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/param/AcsRestructureBindingParam.java @@ -0,0 +1,143 @@ +package cn.cloudwalk.elevator.device.param; + +import java.io.Serializable; +import java.util.List; + +public class AcsRestructureBindingParam implements Serializable { + private String parentId; + private String orgId; + private String orgName; + private String labelId; + private String labelName; + private String personId; + private List zoneIds; + private String taskId; + + public void setParentId(String parentId) { + this.parentId = parentId; + } + + public void setOrgId(String orgId) { + this.orgId = orgId; + } + + public void setOrgName(String orgName) { + this.orgName = orgName; + } + + public void setLabelId(String labelId) { + this.labelId = labelId; + } + + public void setLabelName(String labelName) { + this.labelName = labelName; + } + + public void setPersonId(String personId) { + this.personId = personId; + } + + public void setZoneIds(List zoneIds) { + this.zoneIds = zoneIds; + } + + public void setTaskId(String taskId) { + this.taskId = taskId; + } + + public boolean equals(Object o) { + if (o == this) + return true; + if (!(o instanceof AcsRestructureBindingParam)) + return false; + AcsRestructureBindingParam other = (AcsRestructureBindingParam)o; + if (!other.canEqual(this)) + return false; + Object this$parentId = getParentId(), other$parentId = other.getParentId(); + if ((this$parentId == null) ? (other$parentId != null) : !this$parentId.equals(other$parentId)) + return false; + Object this$orgId = getOrgId(), other$orgId = other.getOrgId(); + if ((this$orgId == null) ? (other$orgId != null) : !this$orgId.equals(other$orgId)) + return false; + Object this$orgName = getOrgName(), other$orgName = other.getOrgName(); + if ((this$orgName == null) ? (other$orgName != null) : !this$orgName.equals(other$orgName)) + return false; + Object this$labelId = getLabelId(), other$labelId = other.getLabelId(); + if ((this$labelId == null) ? (other$labelId != null) : !this$labelId.equals(other$labelId)) + return false; + Object this$labelName = getLabelName(), other$labelName = other.getLabelName(); + if ((this$labelName == null) ? (other$labelName != null) : !this$labelName.equals(other$labelName)) + return false; + Object this$personId = getPersonId(), other$personId = other.getPersonId(); + if ((this$personId == null) ? (other$personId != null) : !this$personId.equals(other$personId)) + return false; + Object this$zoneIds = (Object)getZoneIds(), other$zoneIds = (Object)other.getZoneIds(); + if ((this$zoneIds == null) ? (other$zoneIds != null) : !this$zoneIds.equals(other$zoneIds)) + return false; + Object this$taskId = getTaskId(), other$taskId = other.getTaskId(); + return !((this$taskId == null) ? (other$taskId != null) : !this$taskId.equals(other$taskId)); + } + + protected boolean canEqual(Object other) { + return other instanceof AcsRestructureBindingParam; + } + + public int hashCode() { + int PRIME = 59; + result = 1; + Object $parentId = getParentId(); + result = result * 59 + (($parentId == null) ? 43 : $parentId.hashCode()); + Object $orgId = getOrgId(); + result = result * 59 + (($orgId == null) ? 43 : $orgId.hashCode()); + Object $orgName = getOrgName(); + result = result * 59 + (($orgName == null) ? 43 : $orgName.hashCode()); + Object $labelId = getLabelId(); + result = result * 59 + (($labelId == null) ? 43 : $labelId.hashCode()); + Object $labelName = getLabelName(); + result = result * 59 + (($labelName == null) ? 43 : $labelName.hashCode()); + Object $personId = getPersonId(); + result = result * 59 + (($personId == null) ? 43 : $personId.hashCode()); + Object $zoneIds = (Object)getZoneIds(); + result = result * 59 + (($zoneIds == null) ? 43 : $zoneIds.hashCode()); + Object $taskId = getTaskId(); + return result * 59 + (($taskId == null) ? 43 : $taskId.hashCode()); + } + + public String toString() { + return "AcsRestructureBindingParam(parentId=" + getParentId() + ", orgId=" + getOrgId() + ", orgName=" + + getOrgName() + ", labelId=" + getLabelId() + ", labelName=" + getLabelName() + ", personId=" + + getPersonId() + ", zoneIds=" + getZoneIds() + ", taskId=" + getTaskId() + ")"; + } + + public String getParentId() { + return this.parentId; + } + + public String getOrgId() { + return this.orgId; + } + + public String getOrgName() { + return this.orgName; + } + + public String getLabelId() { + return this.labelId; + } + + public String getLabelName() { + return this.labelName; + } + + public String getPersonId() { + return this.personId; + } + + public List getZoneIds() { + return this.zoneIds; + } + + public String getTaskId() { + return this.taskId; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/param/AcsRestructureQueryParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/param/AcsRestructureQueryParam.java new file mode 100644 index 00000000..083b8148 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/param/AcsRestructureQueryParam.java @@ -0,0 +1,116 @@ +package cn.cloudwalk.elevator.device.param; + +import java.io.Serializable; +import java.util.List; + +public class AcsRestructureQueryParam implements Serializable { + private String orgId; + private String labelId; + private List labelIds; + private String personId; + private String zoneId; + private String businessId; + + public void setOrgId(String orgId) { + this.orgId = orgId; + } + + public void setLabelId(String labelId) { + this.labelId = labelId; + } + + public void setLabelIds(List labelIds) { + this.labelIds = labelIds; + } + + public void setPersonId(String personId) { + this.personId = personId; + } + + public void setZoneId(String zoneId) { + this.zoneId = zoneId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public boolean equals(Object o) { + if (o == this) + return true; + if (!(o instanceof AcsRestructureQueryParam)) + return false; + AcsRestructureQueryParam other = (AcsRestructureQueryParam)o; + if (!other.canEqual(this)) + return false; + Object this$orgId = getOrgId(), other$orgId = other.getOrgId(); + if ((this$orgId == null) ? (other$orgId != null) : !this$orgId.equals(other$orgId)) + return false; + Object this$labelId = getLabelId(), other$labelId = other.getLabelId(); + if ((this$labelId == null) ? (other$labelId != null) : !this$labelId.equals(other$labelId)) + return false; + Object this$labelIds = (Object)getLabelIds(), + other$labelIds = (Object)other.getLabelIds(); + if ((this$labelIds == null) ? (other$labelIds != null) : !this$labelIds.equals(other$labelIds)) + return false; + Object this$personId = getPersonId(), other$personId = other.getPersonId(); + if ((this$personId == null) ? (other$personId != null) : !this$personId.equals(other$personId)) + return false; + Object this$zoneId = getZoneId(), other$zoneId = other.getZoneId(); + if ((this$zoneId == null) ? (other$zoneId != null) : !this$zoneId.equals(other$zoneId)) + return false; + Object this$businessId = getBusinessId(), other$businessId = other.getBusinessId(); + return !((this$businessId == null) ? (other$businessId != null) : !this$businessId.equals(other$businessId)); + } + + protected boolean canEqual(Object other) { + return other instanceof AcsRestructureQueryParam; + } + + public int hashCode() { + int PRIME = 59; + result = 1; + Object $orgId = getOrgId(); + result = result * 59 + (($orgId == null) ? 43 : $orgId.hashCode()); + Object $labelId = getLabelId(); + result = result * 59 + (($labelId == null) ? 43 : $labelId.hashCode()); + Object $labelIds = (Object)getLabelIds(); + result = result * 59 + (($labelIds == null) ? 43 : $labelIds.hashCode()); + Object $personId = getPersonId(); + result = result * 59 + (($personId == null) ? 43 : $personId.hashCode()); + Object $zoneId = getZoneId(); + result = result * 59 + (($zoneId == null) ? 43 : $zoneId.hashCode()); + Object $businessId = getBusinessId(); + return result * 59 + (($businessId == null) ? 43 : $businessId.hashCode()); + } + + public String toString() { + return "AcsRestructureQueryParam(orgId=" + getOrgId() + ", labelId=" + getLabelId() + ", labelIds=" + + getLabelIds() + ", personId=" + getPersonId() + ", zoneId=" + getZoneId() + ", businessId=" + + getBusinessId() + ")"; + } + + public String getOrgId() { + return this.orgId; + } + + public String getLabelId() { + return this.labelId; + } + + public List getLabelIds() { + return this.labelIds; + } + + public String getPersonId() { + return this.personId; + } + + public String getZoneId() { + return this.zoneId; + } + + public String getBusinessId() { + return this.businessId; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/result/AcsDeviceNewResult.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/result/AcsDeviceNewResult.java new file mode 100644 index 00000000..86748699 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/result/AcsDeviceNewResult.java @@ -0,0 +1,178 @@ +package cn.cloudwalk.elevator.device.result; + +import java.io.Serializable; + +public class AcsDeviceNewResult implements Serializable { + private static final long serialVersionUID = -3535840233209237358L; + private String id; + private String deviceId; + private String deviceName; + private String deviceCode; + private String deviceTypeId; + private String deviceTypeCode; + private String deviceTypeName; + private Integer deviceStatus; + private Integer deviceOnlineStatus; + private String address; + private String imageStoreId; + private int identifyType; + private String areaId; + private String areaName; + private Long lastHeartbeatTime; + private Integer deviceOpenStatus; + private String deviceTypeCategoryId; + private String status; + private String onlineStatus; + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public String getAreaId() { + return this.areaId; + } + + public void setAreaId(String areaId) { + this.areaId = areaId; + } + + public String getAreaName() { + return this.areaName; + } + + public void setAreaName(String areaName) { + this.areaName = areaName; + } + + public String getDeviceId() { + return this.deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public String getDeviceName() { + return this.deviceName; + } + + public void setDeviceName(String deviceName) { + this.deviceName = deviceName; + } + + public String getDeviceCode() { + return this.deviceCode; + } + + public void setDeviceCode(String deviceCode) { + this.deviceCode = deviceCode; + } + + public String getDeviceTypeId() { + return this.deviceTypeId; + } + + public void setDeviceTypeId(String deviceTypeId) { + this.deviceTypeId = deviceTypeId; + } + + public String getDeviceTypeCode() { + return this.deviceTypeCode; + } + + public void setDeviceTypeCode(String deviceTypeCode) { + this.deviceTypeCode = deviceTypeCode; + } + + public String getDeviceTypeName() { + return this.deviceTypeName; + } + + public void setDeviceTypeName(String deviceTypeName) { + this.deviceTypeName = deviceTypeName; + } + + public Integer getDeviceStatus() { + return this.deviceStatus; + } + + public void setDeviceStatus(Integer deviceStatus) { + this.deviceStatus = deviceStatus; + } + + public Integer getDeviceOnlineStatus() { + return this.deviceOnlineStatus; + } + + public void setDeviceOnlineStatus(Integer deviceOnlineStatus) { + this.deviceOnlineStatus = deviceOnlineStatus; + } + + public String getAddress() { + return this.address; + } + + public void setAddress(String address) { + this.address = address; + } + + public String getImageStoreId() { + return this.imageStoreId; + } + + public void setImageStoreId(String imageStoreId) { + this.imageStoreId = imageStoreId; + } + + public int getIdentifyType() { + return this.identifyType; + } + + public void setIdentifyType(int identifyType) { + this.identifyType = identifyType; + } + + public Long getLastHeartbeatTime() { + return this.lastHeartbeatTime; + } + + public void setLastHeartbeatTime(Long lastHeartbeatTime) { + this.lastHeartbeatTime = lastHeartbeatTime; + } + + public Integer getDeviceOpenStatus() { + return this.deviceOpenStatus; + } + + public void setDeviceOpenStatus(Integer deviceOpenStatus) { + this.deviceOpenStatus = deviceOpenStatus; + } + + public String getDeviceTypeCategoryId() { + return this.deviceTypeCategoryId; + } + + public void setDeviceTypeCategoryId(String deviceTypeCategoryId) { + this.deviceTypeCategoryId = deviceTypeCategoryId; + } + + public String getStatus() { + return this.status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getOnlineStatus() { + return this.onlineStatus; + } + + public void setOnlineStatus(String onlineStatus) { + this.onlineStatus = onlineStatus; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/result/AcsDeviceRestructureResult.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/result/AcsDeviceRestructureResult.java new file mode 100644 index 00000000..823faa3a --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/result/AcsDeviceRestructureResult.java @@ -0,0 +1,99 @@ +package cn.cloudwalk.elevator.device.result; + +public class AcsDeviceRestructureResult { + private String parentId; + private String zoneId; + private String zoneName; + private String onlineDevices; + private String offlineDevices; + + public void setParentId(String parentId) { + this.parentId = parentId; + } + + public void setZoneId(String zoneId) { + this.zoneId = zoneId; + } + + public void setZoneName(String zoneName) { + this.zoneName = zoneName; + } + + public void setOnlineDevices(String onlineDevices) { + this.onlineDevices = onlineDevices; + } + + public void setOfflineDevices(String offlineDevices) { + this.offlineDevices = offlineDevices; + } + + public boolean equals(Object o) { + if (o == this) + return true; + if (!(o instanceof AcsDeviceRestructureResult)) + return false; + AcsDeviceRestructureResult other = (AcsDeviceRestructureResult)o; + if (!other.canEqual(this)) + return false; + Object this$parentId = getParentId(), other$parentId = other.getParentId(); + if ((this$parentId == null) ? (other$parentId != null) : !this$parentId.equals(other$parentId)) + return false; + Object this$zoneId = getZoneId(), other$zoneId = other.getZoneId(); + if ((this$zoneId == null) ? (other$zoneId != null) : !this$zoneId.equals(other$zoneId)) + return false; + Object this$zoneName = getZoneName(), other$zoneName = other.getZoneName(); + if ((this$zoneName == null) ? (other$zoneName != null) : !this$zoneName.equals(other$zoneName)) + return false; + Object this$onlineDevices = getOnlineDevices(), other$onlineDevices = other.getOnlineDevices(); + if ((this$onlineDevices == null) ? (other$onlineDevices != null) + : !this$onlineDevices.equals(other$onlineDevices)) + return false; + Object this$offlineDevices = getOfflineDevices(), other$offlineDevices = other.getOfflineDevices(); + return !((this$offlineDevices == null) ? (other$offlineDevices != null) + : !this$offlineDevices.equals(other$offlineDevices)); + } + + protected boolean canEqual(Object other) { + return other instanceof AcsDeviceRestructureResult; + } + + public int hashCode() { + int PRIME = 59; + result = 1; + Object $parentId = getParentId(); + result = result * 59 + (($parentId == null) ? 43 : $parentId.hashCode()); + Object $zoneId = getZoneId(); + result = result * 59 + (($zoneId == null) ? 43 : $zoneId.hashCode()); + Object $zoneName = getZoneName(); + result = result * 59 + (($zoneName == null) ? 43 : $zoneName.hashCode()); + Object $onlineDevices = getOnlineDevices(); + result = result * 59 + (($onlineDevices == null) ? 43 : $onlineDevices.hashCode()); + Object $offlineDevices = getOfflineDevices(); + return result * 59 + (($offlineDevices == null) ? 43 : $offlineDevices.hashCode()); + } + + public String toString() { + return "AcsDeviceRestructureResult(parentId=" + getParentId() + ", zoneId=" + getZoneId() + ", zoneName=" + + getZoneName() + ", onlineDevices=" + getOnlineDevices() + ", offlineDevices=" + getOfflineDevices() + ")"; + } + + public String getParentId() { + return this.parentId; + } + + public String getZoneId() { + return this.zoneId; + } + + public String getZoneName() { + return this.zoneName; + } + + public String getOnlineDevices() { + return this.onlineDevices; + } + + public String getOfflineDevices() { + return this.offlineDevices; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/result/AcsElevatorDeviceListResult.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/result/AcsElevatorDeviceListResult.java new file mode 100644 index 00000000..119fd635 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/result/AcsElevatorDeviceListResult.java @@ -0,0 +1,208 @@ +package cn.cloudwalk.elevator.device.result; + +import cn.cloudwalk.cloud.entity.CloudwalkBaseTimes; +import java.io.Serializable; + +public class AcsElevatorDeviceListResult extends CloudwalkBaseTimes implements Serializable { + private String businessId; + private String deviceId; + private String deviceCode; + private String deviceName; + private String deviceTypeName; + private String elevatorFloorList; + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + private String currentFloorId; + private String currentFloor; + private String currentBuilding; + private String currentBuildingId; + private String areaName; + private Integer status; + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public void setDeviceCode(String deviceCode) { + this.deviceCode = deviceCode; + } + + public void setDeviceName(String deviceName) { + this.deviceName = deviceName; + } + + public void setDeviceTypeName(String deviceTypeName) { + this.deviceTypeName = deviceTypeName; + } + + public void setElevatorFloorList(String elevatorFloorList) { + this.elevatorFloorList = elevatorFloorList; + } + + public void setCurrentFloorId(String currentFloorId) { + this.currentFloorId = currentFloorId; + } + + public void setCurrentFloor(String currentFloor) { + this.currentFloor = currentFloor; + } + + public void setCurrentBuilding(String currentBuilding) { + this.currentBuilding = currentBuilding; + } + + public void setCurrentBuildingId(String currentBuildingId) { + this.currentBuildingId = currentBuildingId; + } + + public void setAreaName(String areaName) { + this.areaName = areaName; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public boolean equals(Object o) { + if (o == this) + return true; + if (!(o instanceof AcsElevatorDeviceListResult)) + return false; + AcsElevatorDeviceListResult other = (AcsElevatorDeviceListResult)o; + if (!other.canEqual(this)) + return false; + Object this$businessId = getBusinessId(), other$businessId = other.getBusinessId(); + if ((this$businessId == null) ? (other$businessId != null) : !this$businessId.equals(other$businessId)) + return false; + Object this$deviceId = getDeviceId(), other$deviceId = other.getDeviceId(); + if ((this$deviceId == null) ? (other$deviceId != null) : !this$deviceId.equals(other$deviceId)) + return false; + Object this$deviceCode = getDeviceCode(), other$deviceCode = other.getDeviceCode(); + if ((this$deviceCode == null) ? (other$deviceCode != null) : !this$deviceCode.equals(other$deviceCode)) + return false; + Object this$deviceName = getDeviceName(), other$deviceName = other.getDeviceName(); + if ((this$deviceName == null) ? (other$deviceName != null) : !this$deviceName.equals(other$deviceName)) + return false; + Object this$deviceTypeName = getDeviceTypeName(), other$deviceTypeName = other.getDeviceTypeName(); + if ((this$deviceTypeName == null) ? (other$deviceTypeName != null) + : !this$deviceTypeName.equals(other$deviceTypeName)) + return false; + Object this$elevatorFloorList = getElevatorFloorList(), other$elevatorFloorList = other.getElevatorFloorList(); + if ((this$elevatorFloorList == null) ? (other$elevatorFloorList != null) + : !this$elevatorFloorList.equals(other$elevatorFloorList)) + return false; + Object this$currentFloorId = getCurrentFloorId(), other$currentFloorId = other.getCurrentFloorId(); + if ((this$currentFloorId == null) ? (other$currentFloorId != null) + : !this$currentFloorId.equals(other$currentFloorId)) + return false; + Object this$currentFloor = getCurrentFloor(), other$currentFloor = other.getCurrentFloor(); + if ((this$currentFloor == null) ? (other$currentFloor != null) : !this$currentFloor.equals(other$currentFloor)) + return false; + Object this$currentBuilding = getCurrentBuilding(), other$currentBuilding = other.getCurrentBuilding(); + if ((this$currentBuilding == null) ? (other$currentBuilding != null) + : !this$currentBuilding.equals(other$currentBuilding)) + return false; + Object this$currentBuildingId = getCurrentBuildingId(), other$currentBuildingId = other.getCurrentBuildingId(); + if ((this$currentBuildingId == null) ? (other$currentBuildingId != null) + : !this$currentBuildingId.equals(other$currentBuildingId)) + return false; + Object this$areaName = getAreaName(), other$areaName = other.getAreaName(); + if ((this$areaName == null) ? (other$areaName != null) : !this$areaName.equals(other$areaName)) + return false; + Object this$status = getStatus(), other$status = other.getStatus(); + return !((this$status == null) ? (other$status != null) : !this$status.equals(other$status)); + } + + protected boolean canEqual(Object other) { + return other instanceof AcsElevatorDeviceListResult; + } + + public int hashCode() { + int PRIME = 59; + result = 1; + Object $businessId = getBusinessId(); + result = result * 59 + (($businessId == null) ? 43 : $businessId.hashCode()); + Object $deviceId = getDeviceId(); + result = result * 59 + (($deviceId == null) ? 43 : $deviceId.hashCode()); + Object $deviceCode = getDeviceCode(); + result = result * 59 + (($deviceCode == null) ? 43 : $deviceCode.hashCode()); + Object $deviceName = getDeviceName(); + result = result * 59 + (($deviceName == null) ? 43 : $deviceName.hashCode()); + Object $deviceTypeName = getDeviceTypeName(); + result = result * 59 + (($deviceTypeName == null) ? 43 : $deviceTypeName.hashCode()); + Object $elevatorFloorList = getElevatorFloorList(); + result = result * 59 + (($elevatorFloorList == null) ? 43 : $elevatorFloorList.hashCode()); + Object $currentFloorId = getCurrentFloorId(); + result = result * 59 + (($currentFloorId == null) ? 43 : $currentFloorId.hashCode()); + Object $currentFloor = getCurrentFloor(); + result = result * 59 + (($currentFloor == null) ? 43 : $currentFloor.hashCode()); + Object $currentBuilding = getCurrentBuilding(); + result = result * 59 + (($currentBuilding == null) ? 43 : $currentBuilding.hashCode()); + Object $currentBuildingId = getCurrentBuildingId(); + result = result * 59 + (($currentBuildingId == null) ? 43 : $currentBuildingId.hashCode()); + Object $areaName = getAreaName(); + result = result * 59 + (($areaName == null) ? 43 : $areaName.hashCode()); + Object $status = getStatus(); + return result * 59 + (($status == null) ? 43 : $status.hashCode()); + } + + public String toString() { + return "AcsElevatorDeviceListResult(businessId=" + getBusinessId() + ", deviceId=" + getDeviceId() + + ", deviceCode=" + getDeviceCode() + ", deviceName=" + getDeviceName() + ", deviceTypeName=" + + getDeviceTypeName() + ", elevatorFloorList=" + getElevatorFloorList() + ", currentFloorId=" + + getCurrentFloorId() + ", currentFloor=" + getCurrentFloor() + ", currentBuilding=" + getCurrentBuilding() + + ", currentBuildingId=" + getCurrentBuildingId() + ", areaName=" + getAreaName() + ", status=" + + getStatus() + ")"; + } + + public String getBusinessId() { + return this.businessId; + } + + public String getDeviceId() { + return this.deviceId; + } + + public String getDeviceCode() { + return this.deviceCode; + } + + public String getDeviceName() { + return this.deviceName; + } + + public String getDeviceTypeName() { + return this.deviceTypeName; + } + + public String getElevatorFloorList() { + return this.elevatorFloorList; + } + + public String getCurrentFloorId() { + return this.currentFloorId; + } + + public String getCurrentFloor() { + return this.currentFloor; + } + + public String getCurrentBuilding() { + return this.currentBuilding; + } + + public String getCurrentBuildingId() { + return this.currentBuildingId; + } + + public String getAreaName() { + return this.areaName; + } + + public Integer getStatus() { + return this.status; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/result/AcsElevatorDeviceResult.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/result/AcsElevatorDeviceResult.java new file mode 100644 index 00000000..cc1705e1 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/result/AcsElevatorDeviceResult.java @@ -0,0 +1,115 @@ +package cn.cloudwalk.elevator.device.result; + +import java.io.Serializable; + +public class AcsElevatorDeviceResult implements Serializable { + private static final long serialVersionUID = -90554404684210529L; + private String businessId; + private String deviceId; + private String deviceCode; + private String deviceName; + private String deviceTypeName; + private String elevatorFloorList; + private String currentFloorId; + private String currentFloor; + private String currentBuilding; + private String currentBuildingId; + private String areaName; + private Integer status; + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getDeviceId() { + return this.deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public String getDeviceCode() { + return this.deviceCode; + } + + public void setDeviceCode(String deviceCode) { + this.deviceCode = deviceCode; + } + + public String getElevatorFloorList() { + return this.elevatorFloorList; + } + + public void setElevatorFloorList(String elevatorFloorList) { + this.elevatorFloorList = elevatorFloorList; + } + + public String getCurrentFloorId() { + return this.currentFloorId; + } + + public void setCurrentFloorId(String currentFloorId) { + this.currentFloorId = currentFloorId; + } + + public String getCurrentFloor() { + return this.currentFloor; + } + + public void setCurrentFloor(String currentFloor) { + this.currentFloor = currentFloor; + } + + public String getCurrentBuilding() { + return this.currentBuilding; + } + + public void setCurrentBuilding(String currentBuilding) { + this.currentBuilding = currentBuilding; + } + + public String getCurrentBuildingId() { + return this.currentBuildingId; + } + + public void setCurrentBuildingId(String currentBuildingId) { + this.currentBuildingId = currentBuildingId; + } + + public Integer getStatus() { + return this.status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public String getDeviceName() { + return this.deviceName; + } + + public void setDeviceName(String deviceName) { + this.deviceName = deviceName; + } + + public String getDeviceTypeName() { + return this.deviceTypeName; + } + + public void setDeviceTypeName(String deviceTypeName) { + this.deviceTypeName = deviceTypeName; + } + + public String getAreaName() { + return this.areaName; + } + + public void setAreaName(String areaName) { + this.areaName = areaName; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/result/AcsLabelElevatorResult.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/result/AcsLabelElevatorResult.java new file mode 100644 index 00000000..266907c4 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/result/AcsLabelElevatorResult.java @@ -0,0 +1,58 @@ +package cn.cloudwalk.elevator.device.result; + +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleLabelResultDto; +import java.util.List; + +public class AcsLabelElevatorResult { + private String labelId; + private List details; + + public void setLabelId(String labelId) { + this.labelId = labelId; + } + + public void setDetails(List details) { + this.details = details; + } + + public boolean equals(Object o) { + if (o == this) + return true; + if (!(o instanceof AcsLabelElevatorResult)) + return false; + AcsLabelElevatorResult other = (AcsLabelElevatorResult)o; + if (!other.canEqual(this)) + return false; + Object this$labelId = getLabelId(), other$labelId = other.getLabelId(); + if ((this$labelId == null) ? (other$labelId != null) : !this$labelId.equals(other$labelId)) + return false; + Object this$details = (Object)getDetails(), + other$details = (Object)other.getDetails(); + return !((this$details == null) ? (other$details != null) : !this$details.equals(other$details)); + } + + protected boolean canEqual(Object other) { + return other instanceof AcsLabelElevatorResult; + } + + public int hashCode() { + int PRIME = 59; + result = 1; + Object $labelId = getLabelId(); + result = result * 59 + (($labelId == null) ? 43 : $labelId.hashCode()); + Object $details = (Object)getDetails(); + return result * 59 + (($details == null) ? 43 : $details.hashCode()); + } + + public String toString() { + return "AcsLabelElevatorResult(labelId=" + getLabelId() + ", details=" + getDetails() + ")"; + } + + public String getLabelId() { + return this.labelId; + } + + public List getDetails() { + return this.details; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/result/KeyValueResult.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/result/KeyValueResult.java new file mode 100644 index 00000000..40ea5d51 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/result/KeyValueResult.java @@ -0,0 +1,68 @@ +package cn.cloudwalk.elevator.device.result; + +public class KeyValueResult { + private String key; + private Long time; + private String keyA; + + public void setKey(String key) { + this.key = key; + } + + public void setTime(Long time) { + this.time = time; + } + + public void setKeyA(String keyA) { + this.keyA = keyA; + } + + public boolean equals(Object o) { + if (o == this) + return true; + if (!(o instanceof KeyValueResult)) + return false; + KeyValueResult other = (KeyValueResult)o; + if (!other.canEqual(this)) + return false; + Object this$key = getKey(), other$key = other.getKey(); + if ((this$key == null) ? (other$key != null) : !this$key.equals(other$key)) + return false; + Object this$time = getTime(), other$time = other.getTime(); + if ((this$time == null) ? (other$time != null) : !this$time.equals(other$time)) + return false; + Object this$keyA = getKeyA(), other$keyA = other.getKeyA(); + return !((this$keyA == null) ? (other$keyA != null) : !this$keyA.equals(other$keyA)); + } + + protected boolean canEqual(Object other) { + return other instanceof KeyValueResult; + } + + public int hashCode() { + int PRIME = 59; + result = 1; + Object $key = getKey(); + result = result * 59 + (($key == null) ? 43 : $key.hashCode()); + Object $time = getTime(); + result = result * 59 + (($time == null) ? 43 : $time.hashCode()); + Object $keyA = getKeyA(); + return result * 59 + (($keyA == null) ? 43 : $keyA.hashCode()); + } + + public String toString() { + return "KeyValueResult(key=" + getKey() + ", time=" + getTime() + ", keyA=" + getKeyA() + ")"; + } + + public String getKey() { + return this.key; + } + + public Long getTime() { + return this.time; + } + + public String getKeyA() { + return this.keyA; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/service/AcsDeviceTaskService.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/service/AcsDeviceTaskService.java new file mode 100644 index 00000000..95997066 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/service/AcsDeviceTaskService.java @@ -0,0 +1,13 @@ +package cn.cloudwalk.elevator.device.service; + +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.elevator.device.param.AcsRestructureBindingParam; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleImageResultDto; +import java.util.List; + +public interface AcsDeviceTaskService { + void updateFloors(AcsRestructureBindingParam paramAcsRestructureBindingParam, + List paramList, List paramList1, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/service/AcsElevatorDeviceService.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/service/AcsElevatorDeviceService.java new file mode 100644 index 00000000..486b139d --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/service/AcsElevatorDeviceService.java @@ -0,0 +1,74 @@ +package cn.cloudwalk.elevator.device.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceResult; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.page.CloudwalkPageInfo; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.elevator.device.dto.AcsDeviceTaskDTO; +import cn.cloudwalk.elevator.device.dto.AcsElevatorDeviceQueryFoDTO; +import cn.cloudwalk.elevator.device.dto.AcsElevatorDeviceResultDTO; +import cn.cloudwalk.elevator.device.param.AcsDeviceQueryParam; +import cn.cloudwalk.elevator.device.param.AcsDeviceRestructureTaskParam; +import cn.cloudwalk.elevator.device.param.AcsElevatorDeviceAddParam; +import cn.cloudwalk.elevator.device.param.AcsElevatorDeviceEditParam; +import cn.cloudwalk.elevator.device.param.AcsElevatorDeviceQueryByIdParam; +import cn.cloudwalk.elevator.device.param.AcsElevatorDeviceQueryParam; +import cn.cloudwalk.elevator.device.param.AcsRestructureBindingParam; +import cn.cloudwalk.elevator.device.param.AcsRestructureQueryParam; +import java.util.List; + +public interface AcsElevatorDeviceService { + Integer add(AcsElevatorDeviceAddParam paramAcsElevatorDeviceAddParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + Integer edit(AcsElevatorDeviceEditParam paramAcsElevatorDeviceEditParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + Integer delete(List paramList, CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + String getBuildingId(AcsElevatorDeviceQueryParam paramAcsElevatorDeviceQueryParam) throws ServiceException; + + String getBusinessId(AcsElevatorDeviceQueryParam paramAcsElevatorDeviceQueryParam) throws ServiceException; + + CloudwalkResult> get( + AcsElevatorDeviceQueryParam paramAcsElevatorDeviceQueryParam, CloudwalkCallContext paramCloudwalkCallContext) + throws ServiceException; + + CloudwalkResult> devicePage(AcsDeviceQueryParam paramAcsDeviceQueryParam, + CloudwalkPageInfo paramCloudwalkPageInfo, CloudwalkCallContext paramCloudwalkCallContext) + throws ServiceException; + + List getFo(AcsElevatorDeviceQueryParam paramAcsElevatorDeviceQueryParam) + throws ServiceException; + + AcsElevatorDeviceResultDTO getById(AcsElevatorDeviceQueryByIdParam paramAcsElevatorDeviceQueryByIdParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + AcsElevatorDeviceResultDTO getByDeciveCode(String paramString) throws ServiceException; + + CloudwalkResult listUnbindFloors(AcsRestructureQueryParam paramAcsRestructureQueryParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult listFloors(AcsRestructureQueryParam paramAcsRestructureQueryParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult listCondition(AcsRestructureQueryParam paramAcsRestructureQueryParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult listConditionByLabelIds(AcsRestructureQueryParam paramAcsRestructureQueryParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult bindingFloors(AcsRestructureBindingParam paramAcsRestructureBindingParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult bindingPerson(AcsRestructureBindingParam paramAcsRestructureBindingParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult getTask(AcsDeviceRestructureTaskParam paramAcsDeviceRestructureTaskParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult setTaskStop(AcsDeviceRestructureTaskParam paramAcsDeviceRestructureTaskParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/setting/impl/AcsDeviceImageStoreAppBindServiceImpl.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/setting/impl/AcsDeviceImageStoreAppBindServiceImpl.java new file mode 100644 index 00000000..5c7d6799 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/setting/impl/AcsDeviceImageStoreAppBindServiceImpl.java @@ -0,0 +1,160 @@ +package cn.cloudwalk.elevator.device.setting.impl; + +import cn.cloudwalk.client.cwoscomponent.intelligent.application.param.ApplicationImageStoreAddParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.application.param.ApplicationImageStoreDelParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.application.service.ApplicationImageStoreService; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceImageStoreParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.service.DeviceImageStoreService; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStoreDelParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStoreQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.ImageStoreListResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.service.ImageStoreService; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.elevator.common.AbstractAcsDeviceService; +import cn.cloudwalk.elevator.device.setting.param.DeviceImageStoreAppBindParam; +import cn.cloudwalk.elevator.device.setting.param.DeviceImageStoreAppUnbindParam; +import cn.cloudwalk.elevator.device.setting.service.AcsDeviceImageStoreAppBindService; +import cn.cloudwalk.elevator.util.CollectionUtils; +import java.util.Collections; +import java.util.List; +import javax.annotation.Resource; +import org.springframework.stereotype.Service; + +@Service +public class AcsDeviceImageStoreAppBindServiceImpl extends AbstractAcsDeviceService + implements AcsDeviceImageStoreAppBindService { + @Resource + private ApplicationImageStoreService applicationImageStoreService; + @Resource + private DeviceImageStoreService deviceImageStoreService; + @Resource + private ImageStoreService imageStoreService; + + public CloudwalkResult bindAppImageStoreDevice(DeviceImageStoreAppBindParam param, + CloudwalkCallContext context) throws ServiceException { + bindApplicationImageStore(param, context); + return CloudwalkResult.success(Boolean.valueOf(true)); + } + + public CloudwalkResult bindDeviceAndImageStore(DeviceImageStoreAppBindParam param, + CloudwalkCallContext context) throws ServiceException { + try { + bindDeviceImageStore(param, context); + } catch (ServiceException e) { + this.logger.error("设备图库关联失败,图库id={},原因:{}", param.getImageStoreId(), e.getMessage()); + throw new ServiceException("设备图库关联失败"); + } + return CloudwalkResult.success(Boolean.valueOf(true)); + } + + private void bindApplicationImageStore(DeviceImageStoreAppBindParam param, CloudwalkCallContext context) + throws ServiceException { + ApplicationImageStoreAddParam applicationImageStoreAddParam = new ApplicationImageStoreAddParam(); + applicationImageStoreAddParam.setApplicationId(param.getApplicationId()); + applicationImageStoreAddParam.setImageStoreId(param.getImageStoreId()); + CloudwalkResult applicationImageStoreAddResult = + this.applicationImageStoreService.add(applicationImageStoreAddParam, context); + if (!applicationImageStoreAddResult.isSuccess()) { + this.logger.error("添加应用图库关联失败,原因:{}", applicationImageStoreAddResult.getMessage()); + throw new ServiceException(applicationImageStoreAddResult.getCode(), + "添加应用图库关联失败,原因:" + applicationImageStoreAddResult.getMessage()); + } + } + + private void bindDeviceImageStore(DeviceImageStoreAppBindParam param, CloudwalkCallContext context) + throws ServiceException { + DeviceImageStoreParam imageStoreSaveParam = new DeviceImageStoreParam(); + imageStoreSaveParam.setDeviceId(param.getDeviceId()); + imageStoreSaveParam.setImageStoreId(param.getImageStoreId()); + CloudwalkResult saveDeviceResult = this.deviceImageStoreService.add(imageStoreSaveParam, context); + if (!saveDeviceResult.isSuccess()) { + this.logger.error("绑定设备与图库失败,设备id={},图库id={},原因:{}", + new Object[] {param.getDeviceId(), param.getImageStoreId(), saveDeviceResult.getMessage()}); + throw new ServiceException("绑定设备与图库失败"); + } + } + + public CloudwalkResult unbindAppImageStoreDevice(DeviceImageStoreAppUnbindParam param, + CloudwalkCallContext context) throws ServiceException { + deviceUnBindImageStore(context, param.getDeviceId(), param.getImageStoreId(), param.getDeviceCode()); + applicationUnBindImageStore(param.getApplicationId(), param.getImageStoreId(), context); + List imageStoreList = + getImageStoreResult(param.getImageStoreId(), param.getDeviceCode(), context); + if (!CollectionUtils.isEmpty(imageStoreList)) { + deleteImageStore(param.getImageStoreId(), context); + } + return CloudwalkResult.success(Boolean.valueOf(true)); + } + + public CloudwalkResult deleteImageStore(DeviceImageStoreAppUnbindParam param, CloudwalkCallContext context) + throws ServiceException { + applicationUnBindImageStore(param.getApplicationId(), param.getImageStoreId(), context); + deleteImageStore(param.getImageStoreId(), context); + return CloudwalkResult.success(Boolean.valueOf(true)); + } + + public CloudwalkResult unbindAppImageStoreDeviceNotDeleteImage(DeviceImageStoreAppUnbindParam param, + CloudwalkCallContext context) throws ServiceException { + deviceUnBindImageStore(context, param.getDeviceId(), param.getImageStoreId(), param.getDeviceCode()); + return CloudwalkResult.success(Boolean.valueOf(true)); + } + + private List getImageStoreResult(String imageStoreId, String deviceCode, + CloudwalkCallContext context) throws ServiceException { + ImageStoreQueryParam imageStoreQueryParam = new ImageStoreQueryParam(); + imageStoreQueryParam.setIds(Collections.singletonList(imageStoreId)); + imageStoreQueryParam.setBusinessId(context.getCompany().getCompanyId()); + CloudwalkResult> imageStoreList = + this.imageStoreService.list(imageStoreQueryParam, context); + if (!imageStoreList.isSuccess()) { + this.logger.error("查询设备图库失败,设备编号:{},图库id:{},原因:{}", + new Object[] {deviceCode, imageStoreId, imageStoreList.getMessage()}); + throw new ServiceException("查询设备图库失败,设备编号:{}" + deviceCode); + } + return (List)imageStoreList.getData(); + } + + private void deviceUnBindImageStore(CloudwalkCallContext context, String deviceId, String imageStoreId, + String deviceCode) throws ServiceException { + DeviceImageStoreParam deviceImageStoreParam = new DeviceImageStoreParam(); + deviceImageStoreParam.setDeviceId(deviceId); + deviceImageStoreParam.setImageStoreId(imageStoreId); + CloudwalkResult deleteDeviceImageStoreResult = + this.deviceImageStoreService.delete(deviceImageStoreParam, context); + this.logger.info("删除设备图库关联:图库id={},结果:{}", imageStoreId, deleteDeviceImageStoreResult.getMessage()); + if (!deleteDeviceImageStoreResult.isSuccess()) { + this.logger.error("删除设备图库关联失败,设备编号:{},图库id:{},原因:{}", + new Object[] {deviceCode, imageStoreId, deleteDeviceImageStoreResult.getMessage()}); + throw new ServiceException("删除设备图库关联失败,设备编号:" + deviceCode); + } + } + + private void deleteImageStore(String imageStoreId, CloudwalkCallContext context) throws ServiceException { + ImageStoreDelParam imageStoreDelParam = new ImageStoreDelParam(); + imageStoreDelParam.setId(imageStoreId); + imageStoreDelParam.setBusinessId(context.getCompany().getCompanyId()); + CloudwalkResult deleteImageStoreResult = this.imageStoreService.delete(imageStoreDelParam, context); + if (!deleteImageStoreResult.isSuccess()) { + this.logger.error("删除图库失败,图库id:{},原因:{}", imageStoreId, deleteImageStoreResult.getMessage()); + throw new ServiceException("删除图库失败"); + } + } + + public void applicationUnBindImageStore(String applicationId, String imageStoreId, CloudwalkCallContext context) + throws ServiceException { + ApplicationImageStoreDelParam applicationImageStoreDelParam = new ApplicationImageStoreDelParam(); + applicationImageStoreDelParam.setApplicationId(applicationId); + applicationImageStoreDelParam.setImageStoreId(imageStoreId); + CloudwalkResult deleteApplicationImageStoreResult = + this.applicationImageStoreService.delete(applicationImageStoreDelParam, context); + this.logger.info("删除应用图库关联:图库id={},应用id={},结果:{}", + new Object[] {imageStoreId, applicationId, deleteApplicationImageStoreResult.getMessage()}); + if (!deleteApplicationImageStoreResult.isSuccess()) { + this.logger.error("应用与图库解绑失败,应用id:{},图库id:{},原因:{}", + new Object[] {applicationId, imageStoreId, deleteApplicationImageStoreResult.getMessage()}); + throw new ServiceException("应用与图库解绑失败"); + } + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/setting/impl/AcsDeviceSettingServiceImpl.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/setting/impl/AcsDeviceSettingServiceImpl.java new file mode 100644 index 00000000..fadcd770 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/setting/impl/AcsDeviceSettingServiceImpl.java @@ -0,0 +1,74 @@ +package cn.cloudwalk.elevator.device.setting.impl; + +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceSettingQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceSettingResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.service.DeviceSettingService; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.elevator.common.AbstractAcsDeviceService; +import cn.cloudwalk.elevator.device.setting.param.AcsDeviceTemperatureSettingParam; +import cn.cloudwalk.elevator.device.setting.result.AcsDeviceSettingResult; +import cn.cloudwalk.elevator.device.setting.result.AcsSettingAttr; +import cn.cloudwalk.elevator.device.setting.service.AcsDeviceSettingService; +import cn.cloudwalk.elevator.em.AcsDeviceSettingEnum; +import com.google.common.collect.Lists; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.stream.Collectors; +import org.apache.commons.collections4.CollectionUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class AcsDeviceSettingServiceImpl extends AbstractAcsDeviceService implements AcsDeviceSettingService { + @Autowired + private DeviceSettingService deviceSettingService; + + public CloudwalkResult getTemperatureSetting(AcsDeviceTemperatureSettingParam param, + CloudwalkCallContext context) throws ServiceException { + AcsDeviceSettingResult result = new AcsDeviceSettingResult(); + result.setDeviceId(param.getDeviceId()); + DeviceSettingQueryParam deviceSettingQueryParam = new DeviceSettingQueryParam(); + deviceSettingQueryParam.setDeviceIds(Lists.newArrayList((Object[])new String[] {param.getDeviceId()})); + deviceSettingQueryParam.setHasDefault(Short.valueOf((short)0)); + CloudwalkResult> deviceSettingQueryResult = + this.deviceSettingService.query(deviceSettingQueryParam); + if (deviceSettingQueryResult.isSuccess()) { + if (CollectionUtils.isNotEmpty((Collection)deviceSettingQueryResult.getData())) { + DeviceSettingResult deviceSettingResult = + ((List)deviceSettingQueryResult.getData()).get(0); + List settingResult = deviceSettingResult.getSettings(); + if (CollectionUtils.isNotEmpty(settingResult)) { + List acsSettingAttrs = new ArrayList<>(); + recursionSettingAttr(acsSettingAttrs, settingResult); + List attrs = (List)acsSettingAttrs.stream() + .filter(s -> (AcsDeviceSettingEnum.TEMP_MIN.getCode().equals(s.getCode()) + || AcsDeviceSettingEnum.TEMP_STATE.getCode().equals(s.getCode()) + || AcsDeviceSettingEnum.TEMP_THRESHOLD.getCode().equals(s.getCode()))) + .collect(Collectors.toList()); + result.setAttrs(attrs); + } + } + return CloudwalkResult.success(result); + } + return CloudwalkResult.fail(deviceSettingQueryResult.getCode(), deviceSettingQueryResult.getMessage()); + } + + private void recursionSettingAttr(List acsSettingAttrs, + List deviceSettings) { + if (CollectionUtils.isNotEmpty(deviceSettings)) + for (DeviceSettingResult.DeviceSettings deviceSetting : deviceSettings) { + AcsSettingAttr acsSettingAttr = new AcsSettingAttr(); + acsSettingAttr.setName(deviceSetting.getSettingAttrName()); + acsSettingAttr.setValue(deviceSetting.getSettingAttrValue()); + acsSettingAttr.setRemark(deviceSetting.getSettingAttrRemark()); + acsSettingAttr.setCode(deviceSetting.getSettingAttrCode()); + acsSettingAttr.setId(deviceSetting.getId()); + acsSettingAttr.setParentId(deviceSetting.getSettingParentId()); + acsSettingAttrs.add(acsSettingAttr); + recursionSettingAttr(acsSettingAttrs, deviceSetting.getChild()); + } + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/setting/param/AcsDeviceTemperatureSettingParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/setting/param/AcsDeviceTemperatureSettingParam.java new file mode 100644 index 00000000..f55104a2 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/setting/param/AcsDeviceTemperatureSettingParam.java @@ -0,0 +1,17 @@ +package cn.cloudwalk.elevator.device.setting.param; + +import java.io.Serializable; +import org.hibernate.validator.constraints.NotBlank; + +public class AcsDeviceTemperatureSettingParam implements Serializable { + @NotBlank(message = "76260003") + private String deviceId; + + public String getDeviceId() { + return this.deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/setting/param/DeviceImageStoreAppBindParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/setting/param/DeviceImageStoreAppBindParam.java new file mode 100644 index 00000000..fff73e0f --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/setting/param/DeviceImageStoreAppBindParam.java @@ -0,0 +1,34 @@ +package cn.cloudwalk.elevator.device.setting.param; + +import java.io.Serializable; + +public class DeviceImageStoreAppBindParam implements Serializable { + private static final long serialVersionUID = -5165610910023828727L; + private String applicationId; + private String imageStoreId; + private String deviceId; + + public String getApplicationId() { + return this.applicationId; + } + + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + public String getImageStoreId() { + return this.imageStoreId; + } + + public void setImageStoreId(String imageStoreId) { + this.imageStoreId = imageStoreId; + } + + public String getDeviceId() { + return this.deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/setting/param/DeviceImageStoreAppUnbindParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/setting/param/DeviceImageStoreAppUnbindParam.java new file mode 100644 index 00000000..003feb3f --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/setting/param/DeviceImageStoreAppUnbindParam.java @@ -0,0 +1,42 @@ +package cn.cloudwalk.elevator.device.setting.param; + +import java.io.Serializable; + +public class DeviceImageStoreAppUnbindParam implements Serializable { + private String applicationId; + private String imageStoreId; + private String deviceId; + private String deviceCode; + + public String getApplicationId() { + return this.applicationId; + } + + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + public String getImageStoreId() { + return this.imageStoreId; + } + + public void setImageStoreId(String imageStoreId) { + this.imageStoreId = imageStoreId; + } + + public String getDeviceId() { + return this.deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public String getDeviceCode() { + return this.deviceCode; + } + + public void setDeviceCode(String deviceCode) { + this.deviceCode = deviceCode; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/setting/result/AcsDeviceSettingResult.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/setting/result/AcsDeviceSettingResult.java new file mode 100644 index 00000000..22be20cd --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/setting/result/AcsDeviceSettingResult.java @@ -0,0 +1,26 @@ +package cn.cloudwalk.elevator.device.setting.result; + +import java.io.Serializable; +import java.util.List; + +public class AcsDeviceSettingResult implements Serializable { + private static final long serialVersionUID = -6934487366934322212L; + private String deviceId; + private List attrs; + + public String getDeviceId() { + return this.deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public List getAttrs() { + return this.attrs; + } + + public void setAttrs(List attrs) { + this.attrs = attrs; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/setting/result/AcsSettingAttr.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/setting/result/AcsSettingAttr.java new file mode 100644 index 00000000..eb221553 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/setting/result/AcsSettingAttr.java @@ -0,0 +1,61 @@ +package cn.cloudwalk.elevator.device.setting.result; + +import java.io.Serializable; + +public class AcsSettingAttr implements Serializable { + private static final long serialVersionUID = 1670487736253830287L; + private String name; + private String value; + private String remark; + private String code; + private String id; + private String parentId; + + public String getParentId() { + return this.parentId; + } + + public void setParentId(String parentId) { + this.parentId = parentId; + } + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public String getValue() { + return this.value; + } + + public void setValue(String value) { + this.value = value; + } + + public String getRemark() { + return this.remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public String getCode() { + return this.code; + } + + public void setCode(String code) { + this.code = code; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/setting/service/AcsDeviceImageStoreAppBindService.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/setting/service/AcsDeviceImageStoreAppBindService.java new file mode 100644 index 00000000..3a733a3e --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/setting/service/AcsDeviceImageStoreAppBindService.java @@ -0,0 +1,26 @@ +package cn.cloudwalk.elevator.device.setting.service; + +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.elevator.device.setting.param.DeviceImageStoreAppBindParam; +import cn.cloudwalk.elevator.device.setting.param.DeviceImageStoreAppUnbindParam; + +public interface AcsDeviceImageStoreAppBindService { + CloudwalkResult bindAppImageStoreDevice(DeviceImageStoreAppBindParam paramDeviceImageStoreAppBindParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult bindDeviceAndImageStore(DeviceImageStoreAppBindParam paramDeviceImageStoreAppBindParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult unbindAppImageStoreDevice( + DeviceImageStoreAppUnbindParam paramDeviceImageStoreAppUnbindParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult deleteImageStore(DeviceImageStoreAppUnbindParam paramDeviceImageStoreAppUnbindParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult unbindAppImageStoreDeviceNotDeleteImage( + DeviceImageStoreAppUnbindParam paramDeviceImageStoreAppUnbindParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/setting/service/AcsDeviceSettingService.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/setting/service/AcsDeviceSettingService.java new file mode 100644 index 00000000..197ec9ea --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/device/setting/service/AcsDeviceSettingService.java @@ -0,0 +1,13 @@ +package cn.cloudwalk.elevator.device.setting.service; + +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.elevator.device.setting.param.AcsDeviceTemperatureSettingParam; +import cn.cloudwalk.elevator.device.setting.result.AcsDeviceSettingResult; + +public interface AcsDeviceSettingService { + CloudwalkResult getTemperatureSetting( + AcsDeviceTemperatureSettingParam paramAcsDeviceTemperatureSettingParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/downloadcenter/AcsDownloadCenterService.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/downloadcenter/AcsDownloadCenterService.java new file mode 100644 index 00000000..311cb1ad --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/downloadcenter/AcsDownloadCenterService.java @@ -0,0 +1,12 @@ +package cn.cloudwalk.elevator.downloadcenter; + +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.elevator.downloadcenter.param.AcsFileFinishParam; + +public interface AcsDownloadCenterService { + String createDownload(String paramString, CloudwalkCallContext paramCloudwalkCallContext); + + boolean finishDownload(AcsFileFinishParam paramAcsFileFinishParam, CloudwalkCallContext paramCloudwalkCallContext); + + int queryDownloadStatus(String paramString, CloudwalkCallContext paramCloudwalkCallContext); +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/downloadcenter/impl/AcsDownloadCenterServiceImpl.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/downloadcenter/impl/AcsDownloadCenterServiceImpl.java new file mode 100644 index 00000000..9f7453bd --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/downloadcenter/impl/AcsDownloadCenterServiceImpl.java @@ -0,0 +1,81 @@ +package cn.cloudwalk.elevator.downloadcenter.impl; + +import cn.cloudwalk.client.cwoscomponent.intelligent.file.param.FileFinishParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.file.param.FileGetParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.file.param.FileInitParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.file.result.FileDetail; +import cn.cloudwalk.client.cwoscomponent.intelligent.file.service.FileService; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.cloud.utils.BeanCopyUtils; +import cn.cloudwalk.elevator.common.AbstractCloudwalkService; +import cn.cloudwalk.elevator.common.service.AcsApplicationService; +import cn.cloudwalk.elevator.config.FeignThreadLocalUtil; +import cn.cloudwalk.elevator.downloadcenter.AcsDownloadCenterService; +import cn.cloudwalk.elevator.downloadcenter.param.AcsFileFinishParam; +import cn.cloudwalk.elevator.export.AcsFileStatusEnum; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class AcsDownloadCenterServiceImpl extends AbstractCloudwalkService implements AcsDownloadCenterService { + @Autowired + private FileService fileService; + @Autowired + private AcsApplicationService acsApplicationService; + + public String createDownload(String fileName, CloudwalkCallContext context) { + try { + FileInitParam fileInitParam = new FileInitParam(); + fileInitParam.setFileName(fileName); + context.setApplicationId(this.acsApplicationService.getApplicationId(context.getCompany().getCompanyId())); + fileInitParam.setApplicationId(context.getApplicationId()); + FeignThreadLocalUtil.setRequestHeader(context); + CloudwalkResult result = this.fileService.init(fileInitParam, context); + if ("00000000".equals(result.getCode())) { + return (String)result.getData(); + } + this.logger.error("下载任务初始化失败:code={},message={}", result.getCode(), result.getMessage()); + throw new RuntimeException("下载任务创建失败!"); + } catch (ServiceException e) { + this.logger.error("下载任务初始化接口错误", (Throwable)e); + throw new RuntimeException("下载任务创建失败!"); + } finally { + FeignThreadLocalUtil.remove(); + } + } + + public boolean finishDownload(AcsFileFinishParam param, CloudwalkCallContext context) { + try { + FeignThreadLocalUtil.setRequestHeader(context); + FileFinishParam fileFinishParam = + (FileFinishParam)BeanCopyUtils.copyProperties(param, FileFinishParam.class); + CloudwalkResult result = this.fileService.finish(fileFinishParam, context); + if ("00000000".equals(result.getCode())) { + return true; + } + this.logger.error("下载任务完成失败:code={},message={}", result.getCode(), result.getMessage()); + } catch (ServiceException e) { + this.logger.error("下载任务完成接口错误", (Throwable)e); + } finally { + FeignThreadLocalUtil.remove(); + } + return false; + } + + public int queryDownloadStatus(String fileId, CloudwalkCallContext context) { + try { + FileGetParam fileGetParam = new FileGetParam(); + fileGetParam.setFileId(fileId); + CloudwalkResult result = this.fileService.get(fileGetParam, context); + if ("00000000".equals(result.getCode())) { + return ((FileDetail)result.getData()).getStatus().intValue(); + } + this.logger.error("下载任务初始化失败:code={},message={}", result.getCode(), result.getMessage()); + } catch (ServiceException e) { + this.logger.error("下载任务完成接口错误", (Throwable)e); + } + return AcsFileStatusEnum.PRODUCING.getCode().intValue(); + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/downloadcenter/param/AcsFileFinishParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/downloadcenter/param/AcsFileFinishParam.java new file mode 100644 index 00000000..75dc14da --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/downloadcenter/param/AcsFileFinishParam.java @@ -0,0 +1,61 @@ +package cn.cloudwalk.elevator.downloadcenter.param; + +import java.io.Serializable; + +public class AcsFileFinishParam implements Serializable { + private static final long serialVersionUID = 4334332744642479052L; + private String fileId; + private Long fileSize; + private String filePath; + private Integer fileStatus; + private String errorCode; + private String errorMessage; + + public String getFileId() { + return this.fileId; + } + + public void setFileId(String fileId) { + this.fileId = fileId; + } + + public Long getFileSize() { + return this.fileSize; + } + + public void setFileSize(Long fileSize) { + this.fileSize = fileSize; + } + + public String getFilePath() { + return this.filePath; + } + + public void setFilePath(String filePath) { + this.filePath = filePath; + } + + public Integer getFileStatus() { + return this.fileStatus; + } + + public void setFileStatus(Integer fileStatus) { + this.fileStatus = fileStatus; + } + + public String getErrorCode() { + return this.errorCode; + } + + public void setErrorCode(String errorCode) { + this.errorCode = errorCode; + } + + public String getErrorMessage() { + return this.errorMessage; + } + + public void setErrorMessage(String errorMessage) { + this.errorMessage = errorMessage; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/export/AcsAbstractExportAsyncService.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/export/AcsAbstractExportAsyncService.java new file mode 100644 index 00000000..677e6d3d --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/export/AcsAbstractExportAsyncService.java @@ -0,0 +1,539 @@ +package cn.cloudwalk.elevator.export; + +import cn.cloudwalk.client.davinci.portal.file.param.part.FilePartAppendParam; +import cn.cloudwalk.client.davinci.portal.file.param.part.FilePartFinishParam; +import cn.cloudwalk.client.davinci.portal.file.param.part.FilePartInitParam; +import cn.cloudwalk.client.davinci.portal.file.result.FilePartResult; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.page.CloudwalkPageInfo; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.elevator.common.AbstractCloudwalkService; +import cn.cloudwalk.elevator.config.FeignThreadLocalUtil; +import cn.cloudwalk.elevator.downloadcenter.AcsDownloadCenterService; +import cn.cloudwalk.elevator.downloadcenter.param.AcsFileFinishParam; +import cn.cloudwalk.elevator.export.utils.ExcelUtil; +import cn.cloudwalk.elevator.storage.AcsFileStorageService; +import cn.cloudwalk.elevator.util.CollectionUtils; +import cn.cloudwalk.elevator.util.DateUtils; +import cn.cloudwalk.elevator.util.StringUtils; +import cn.cloudwalk.intelligent.davinci.common.exception.DavinciServiceException; +import cn.cloudwalk.intelligent.davinci.storage.bean.file.dto.FileRemoveDTO; +import cn.cloudwalk.intelligent.davinci.storage.manager.FileStorageManager; +import cn.cloudwalk.intelligent.lock.annotation.RequiredLock; +import com.github.pagehelper.PageInfo; +import com.google.common.collect.Lists; +import java.io.ByteArrayOutputStream; +import java.lang.reflect.Field; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Date; +import java.util.List; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; +import java.util.concurrent.ThreadPoolExecutor; +import java.util.concurrent.TimeUnit; +import javax.annotation.Resource; +import org.apache.commons.lang3.StringUtils; +import org.apache.poi.hssf.usermodel.HSSFCell; +import org.apache.poi.hssf.usermodel.HSSFCellStyle; +import org.apache.poi.hssf.usermodel.HSSFClientAnchor; +import org.apache.poi.hssf.usermodel.HSSFFont; +import org.apache.poi.hssf.usermodel.HSSFPatriarch; +import org.apache.poi.hssf.usermodel.HSSFRichTextString; +import org.apache.poi.hssf.usermodel.HSSFRow; +import org.apache.poi.hssf.usermodel.HSSFSheet; +import org.apache.poi.hssf.usermodel.HSSFWorkbook; +import org.apache.poi.ss.usermodel.Font; +import org.apache.poi.ss.usermodel.HorizontalAlignment; +import org.apache.poi.ss.usermodel.RichTextString; +import org.apache.poi.ss.usermodel.VerticalAlignment; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.data.redis.core.RedisTemplate; +import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; + +public abstract class AcsAbstractExportAsyncService extends AbstractCloudwalkService { + protected static final Logger LOGGER = LoggerFactory.getLogger(AcsAbstractExportAsyncService.class); + private static final Integer FILE_PART_BATCH_SIZE = Integer.valueOf(5242881); + @Value("${cloudwalk.access-control.export-max-record:1000}") + private long EXPORT_MAX_RECORD; + @Autowired + private AcsFileStorageService acsFileStorageService; + @Autowired + private AcsDownloadCenterService acsDownloadCenterService; + @Resource + private RedisTemplate redisTemplate; + @Autowired + private FileStorageManager fileStorageManager; + + @RequiredLock( + name = "T(cn.cloudwalk.elevator.config.AcsLockConstants).LOCK_EXPORT_BUSINESSID_PREFIX.concat(#context.company.companyId)", + lockWaitTime = 5000L) + public CloudwalkResult startExportTask(T param, Class clazz, String fileName, + CloudwalkCallContext context) throws ServiceException { + String cacheKey = "acs_export_prefix:#" + context.getCompany().getCompanyId(); + try { + String taskId = (String)this.redisTemplate.opsForValue().get(cacheKey); + if (StringUtils.isNotBlank(taskId)) { + return CloudwalkResult.fail("76260308", getMessage("76260308")); + } + String exportFileName = StringUtils.isNotBlank(fileName) ? fileName : getDefaultFileName(); + ExportRecordContext.Builder builder = new ExportRecordContext.Builder(); + ExportRecordContext exportRecordContext = builder.withFileName(exportFileName) + .withTaskStatus(AcsFileStatusEnum.PRODUCING.getCode().intValue()).build(); + CompletableFuture.runAsync(() -> { + try { + String fileId = this.acsDownloadCenterService.createDownload(exportFileName, context); + this.redisTemplate.opsForValue().set(cacheKey, fileId, 5L, TimeUnit.MINUTES); + exportRecordContext.setFileId(fileId); + } catch (Exception e) { + LOGGER.info("导出时,初始化导出任务失败,原因:", e); + this.redisTemplate.delete(cacheKey); + throw new CompletionException(e); + } + }).thenAccept(n -> { + try { + export((T)param, clazz, exportRecordContext, (ExcelCallback)null, context); + } catch (Exception e) { + LOGGER.info("导出时异常,原因=[{}]", e.getMessage(), e); + throw new CompletionException(e); + } finally { + FeignThreadLocalUtil.remove(); + this.redisTemplate.delete(cacheKey); + } + }).whenComplete((n, e) -> { + if (null != e) { + LOGGER.error("异步导出任务运行失败,原因:", e); + AcsFileFinishParam fileFinishParam = new AcsFileFinishParam(); + if (e.getCause() instanceof ServiceException) { + ServiceException serviceException = (ServiceException)e.getCause(); + fileFinishParam.setErrorCode(serviceException.getCode()); + fileFinishParam.setErrorMessage(serviceException.getMessage()); + } else { + fileFinishParam.setErrorCode("76260000"); + fileFinishParam.setErrorMessage(getMessage("76260000")); + } + fileFinishParam.setFileId(exportRecordContext.getFileId()); + fileFinishParam.setFileStatus(AcsFileStatusEnum.FAIL.getCode()); + this.acsDownloadCenterService.finishDownload(fileFinishParam, context); + } else if (AcsFileStatusEnum.CANCELED.getCode().intValue() != exportRecordContext.getTaskStatus()) { + LOGGER.info("异步导出成功。[{}]", exportRecordContext.toString()); + AcsFileFinishParam fileFinishParam = new AcsFileFinishParam(); + fileFinishParam.setFileId(exportRecordContext.getFileId()); + fileFinishParam.setFilePath(exportRecordContext.getFilePath()); + fileFinishParam.setFileSize(exportRecordContext.getFileSize()); + fileFinishParam.setFileStatus(AcsFileStatusEnum.FINISH.getCode()); + this.acsDownloadCenterService.finishDownload(fileFinishParam, context); + } else if (StringUtils.isNotBlank(exportRecordContext.getFilePath())) { + FileRemoveDTO fileRemoveDTO = new FileRemoveDTO(); + fileRemoveDTO + .setFileList(Lists.newArrayList((Object[])new String[] {exportRecordContext.getFilePath()})); + try { + this.fileStorageManager.remove(fileRemoveDTO); + } catch (DavinciServiceException e1) { + this.logger.error("删除文件失败,fileId=[{}],原因:", exportRecordContext.getFileId(), e1); + } + } + }); + return CloudwalkResult.success(Boolean.valueOf(true)); + } catch (Exception e) { + this.logger.error("异步导出任务异常,原因:", e); + throw new ServiceException(e); + } + } + + private void export(T param, Class clazz, ExportRecordContext exportRecordContext, ExcelCallback callback, + CloudwalkCallContext context) throws Exception { + ByteArrayOutputStream output = new ByteArrayOutputStream(); + String sheetName = exportRecordContext.getFileName(); + FeignThreadLocalUtil.setRequestHeader(context); + int startPage = 1; + int pageSize = 100; + long maxPageSize = this.EXPORT_MAX_RECORD / 100L; + PageInfo pageInfo = new PageInfo(); + List list = getList(param, context, startPage, 100, pageInfo); + Long totalRows = Long.valueOf(pageInfo.getTotal()); + Long totalPages = Long.valueOf(pageInfo.getPages()); + try (HSSFWorkbook workbook = new HSSFWorkbook()) { + int sheetSize = 65536; + Field[] allFields = clazz.getDeclaredFields(); + List fields = new ArrayList<>(); + for (Field field : allFields) { + ExcelAttribute attr = field.getAnnotation(ExcelAttribute.class); + if (attr != null && attr.isExport()) { + fields.add(field); + } + } + long listSize = + (this.EXPORT_MAX_RECORD < totalRows.longValue()) ? this.EXPORT_MAX_RECORD : totalRows.longValue(); + int startRow = 0; + int sheetNo = (int)listSize / sheetSize; + for (int index = 0; index <= sheetNo; index++) { + HSSFSheet sheet = workbook.createSheet(); + workbook.setSheetName(index, sheetName + index); + ExcelUtil.createRowHeard(sheet, fields, workbook, startRow); + while (true) { + if (isCancelDownload(exportRecordContext, context)) { + output.close(); + return; + } + if (CollectionUtils.isEmpty(list)) { + list = getList(param, context, startPage, 100, pageInfo); + } + createRowContent(sheet, fields, workbook, list, (startPage - 1) * 100, + (startPage - 1) * 100 + list.size(), startRow + 1); + if (null != callback) { + callback.call(workbook, sheet); + } + startPage++; + if (startPage > totalPages.longValue() || startPage > maxPageSize) { + break; + } + list = new ArrayList<>(); + } + } + output.flush(); + workbook.write(output); + output.close(); + byte[] fileByte = output.toByteArray(); + exportRecordContext.setFileSize(Long.valueOf(fileByte.length)); + String filePath = + fileStore(exportRecordContext.getFileName() + ".xls", fileByte, exportRecordContext, context); + exportRecordContext.setFilePath(filePath); + } catch (Exception e) { + throw new Exception("将list数据源的数据导入到excel表单异常!", e); + } + } + + private boolean isCancelDownload(ExportRecordContext exportRecordContext, CloudwalkCallContext context) { + int taskStatus = this.acsDownloadCenterService.queryDownloadStatus(exportRecordContext.getFileId(), context); + if (AcsFileStatusEnum.CANCELED.getCode().intValue() == taskStatus) { + this.logger.info("导出任务已取消,fileID=[{}]", exportRecordContext.getFileId()); + exportRecordContext.setTaskStatus(taskStatus); + return true; + } + return false; + } + + private ArrayList getList(T param, CloudwalkCallContext context, int startPage, int pageSize, PageInfo pageInfo) + throws ServiceException { + CloudwalkPageInfo cloudwalkPageInfo = new CloudwalkPageInfo(startPage, pageSize); + CloudwalkPageAble dataPage = queryPage(param, cloudwalkPageInfo, context); + pageInfo.setTotal(dataPage.getTotalRows()); + pageInfo.setPages((int)dataPage.getTotalPages()); + return Lists.newArrayList(dataPage.getDatas()); + } + + private int getColumnSize(Class clazz) { + Field[] allFields = clazz.getDeclaredFields(); + int size = 0; + for (Field field : allFields) { + ExcelAttribute attr = field.getAnnotation(ExcelAttribute.class); + if (attr != null && attr.isExport()) { + size++; + } + } + return size; + } + + private void setRow1(HSSFWorkbook workBook, HSSFSheet sheet, String row1Str) { + HSSFCellStyle cellStyle1 = workBook.createCellStyle(); + HSSFFont font1 = workBook.createFont(); + font1.setFontHeightInPoints((short)15); + font1.setBold(Boolean.TRUE.booleanValue()); + cellStyle1.setAlignment(HorizontalAlignment.LEFT); + cellStyle1.setVerticalAlignment(VerticalAlignment.CENTER); + HSSFRichTextString row1String = new HSSFRichTextString(row1Str); + row1String.applyFont(0, row1Str.length(), (Font)font1); + sheet.getRow(0).getCell(0).setCellValue((RichTextString)row1String); + sheet.getRow(0).getCell(0).setCellStyle(cellStyle1); + } + + private String fileStore(String fileName, byte[] bytes, ExportRecordContext exportRecordContext, + CloudwalkCallContext context) throws ServiceException { + int size = bytes.length; + LOGGER.info("文件大小为: {}", Integer.valueOf(size)); + FilePartInitParam param = new FilePartInitParam(); + param.setFileName(fileName); + LOGGER.info("文件分片初始化开始"); + CloudwalkResult result = this.acsFileStorageService.filePartInit(param); + if (result.isSuccess()) { + LOGGER.info("文件分片初始化结束,uploadId = {}, filePath = {}", ((FilePartResult)result.getData()).getUploadId(), + ((FilePartResult)result.getData()).getFilePath()); + FilePartResult filePartResult = (FilePartResult)result.getData(); + int times = 0; + while (true) { + if (isCancelDownload(exportRecordContext, context)) { + return ((FilePartResult)result.getData()).getFilePath(); + } + int start = times++ * FILE_PART_BATCH_SIZE.intValue(); + int end = + (start + FILE_PART_BATCH_SIZE.intValue() > size) ? size : (start + FILE_PART_BATCH_SIZE.intValue()); + byte[] trunk = Arrays.copyOfRange(bytes, start, end); + LOGGER.info("第{}个分片开始追加,uploadId = {}, filePath = {}, size ; {}", new Object[] {Integer.valueOf(times), + filePartResult.getUploadId(), filePartResult.getFilePath(), Integer.valueOf(trunk.length)}); + FilePartAppendParam appendParam = new FilePartAppendParam(); + appendParam.setFilePath(filePartResult.getFilePath()); + appendParam.setPartNumber(Integer.valueOf(times)); + appendParam.setUploadId(filePartResult.getUploadId()); + appendParam.setContent(trunk); + this.acsFileStorageService.filePartAppend(appendParam); + LOGGER.info("第{}个分片完成追加,uploadId = {}, filePath = {}", + new Object[] {Integer.valueOf(times), filePartResult.getUploadId(), filePartResult.getFilePath()}); + if (end >= size) { + LOGGER.info("追加完成,准备结束,uploadId = {}, filePath = {}", filePartResult.getUploadId(), + filePartResult.getFilePath()); + FilePartFinishParam finishParam = new FilePartFinishParam(); + finishParam.setFilePath(filePartResult.getFilePath()); + finishParam.setUploadId(filePartResult.getUploadId()); + finishParam.setFileSize(Long.valueOf(size)); + finishParam.setReturnType(Integer.valueOf(1)); + CloudwalkResult finishResult = this.acsFileStorageService.filePartFinish(finishParam); + LOGGER.info("结束完成,uploadId = {}, filePath = {}, finishFilePath = {}", new Object[] { + filePartResult.getUploadId(), filePartResult.getFilePath(), finishResult.getData()}); + if (finishResult.isSuccess()) { + return ((String)finishResult.getData()).split("=")[1]; + } + } + } + } + throw new ServiceException(result.getCode(), result.getMessage()); + } + + protected ThreadPoolTaskExecutor getExportExecutor() { + ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); + executor.setCorePoolSize(5); + executor.setMaxPoolSize(30); + executor.setThreadNamePrefix("Export-Pool-Executor"); + executor.setQueueCapacity(25); + executor.initialize(); + executor.setRejectedExecutionHandler(new ThreadPoolExecutor.AbortPolicy()); + return executor; + } + + private static class ExportRecordContext { + private String fileId; + private String filePath; + private String fileName; + private Long fileSize; + private int taskStatus; + + private ExportRecordContext() {} + + public int getTaskStatus() { + return this.taskStatus; + } + + public void setTaskStatus(int taskStatus) { + this.taskStatus = taskStatus; + } + + public String getFileId() { + return this.fileId; + } + + public void setFileId(String fileId) { + this.fileId = fileId; + } + + public String getFilePath() { + return this.filePath; + } + + public void setFilePath(String filePath) { + this.filePath = filePath; + } + + public String getFileName() { + return this.fileName; + } + + public void setFileName(String fileName) { + this.fileName = fileName; + } + + public Long getFileSize() { + return this.fileSize; + } + + public void setFileSize(Long fileSize) { + this.fileSize = fileSize; + } + + public String toString() { + return "ExportRecordContext{fileId='" + this.fileId + '\'' + ", filePath='" + this.filePath + '\'' + + ", fileName='" + this.fileName + '\'' + ", fileSize=" + this.fileSize + ", taskStatus=" + + this.taskStatus + '}'; + } + + private static class Builder { + private String fileId; + private String filePath; + private String fileName; + private Long fileSize; + private int taskStatus; + + private Builder() {} + + public Builder withTaskStatus(int taskStatus) { + this.taskStatus = taskStatus; + return this; + } + + public Builder withFileId(String fileId) { + this.fileId = fileId; + return this; + } + + public Builder withFilePath(String filePath) { + this.filePath = filePath; + return this; + } + + public Builder withFileName(String fileName) { + this.fileName = fileName; + return this; + } + + public Builder withFileSize(Long fileSize) { + this.fileSize = fileSize; + return this; + } + + public AcsAbstractExportAsyncService.ExportRecordContext build() { + AcsAbstractExportAsyncService.ExportRecordContext context = + new AcsAbstractExportAsyncService.ExportRecordContext(); + context.setFileId(this.fileId); + context.setFileSize(this.fileSize); + context.setFilePath(this.filePath); + context.setFileName(this.fileName); + context.setTaskStatus(this.taskStatus); + return context; + } + } + } + + private static class Builder { + private String fileId; + private String filePath; + + public AcsAbstractExportAsyncService.ExportRecordContext build() { + AcsAbstractExportAsyncService.ExportRecordContext context = + new AcsAbstractExportAsyncService.ExportRecordContext(); + context.setFileId(this.fileId); + context.setFileSize(this.fileSize); + context.setFilePath(this.filePath); + context.setFileName(this.fileName); + context.setTaskStatus(this.taskStatus); + return context; + } + + private String fileName; + private Long fileSize; + private int taskStatus; + + private Builder() {} + + public Builder withTaskStatus(int taskStatus) { + this.taskStatus = taskStatus; + return this; + } + + public Builder withFileId(String fileId) { + this.fileId = fileId; + return this; + } + + public Builder withFilePath(String filePath) { + this.filePath = filePath; + return this; + } + + public Builder withFileName(String fileName) { + this.fileName = fileName; + return this; + } + + public Builder withFileSize(Long fileSize) { + this.fileSize = fileSize; + return this; + } + } + + private void createRowContent(HSSFSheet sheet, List fields, HSSFWorkbook workbook, List list, + int startNo, int endNo, int rowIndex) throws Exception { + String value = null; + int hwPicType = 0; + byte[] picByte = null; + int listIndex = 0; + for (int i = startNo; i < endNo; i++) { + HSSFRow row = sheet.createRow(i + 1); + T vo = list.get(listIndex); + listIndex++; + for (int j = 0; j < fields.size(); j++) { + Field field = fields.get(j); + field.setAccessible(true); + ExcelAttribute attr = field.getAnnotation(ExcelAttribute.class); + int col = j; + if (StringUtils.isNotBlank(attr.column())) { + col = ExcelUtil.getExcelCol(attr.column()); + } + if (attr.isExport()) { + HSSFCell cell = row.createCell(col); + Class classType = field.getType(); + if (field.get(vo) != null) { + value = null; + if (classType.isAssignableFrom(Date.class)) { + value = DateUtils.formatDate((Date)field.get(vo), "yyyy-MM-dd HH:mm:ss"); + } + if (classType.isAssignableFrom(Long.class) && attr.isDate()) { + value = DateUtils.formatDate(new Date(((Long)field.get(vo)).longValue()), + "yyyy-MM-dd HH:mm:ss"); + } + if (attr.isPic()) { + try { + if (field.getType().equals(String.class)) { + picByte = ExcelUtil.getBytesByUrl((String)field.get(vo)); + } + picByte = (byte[])field.get(vo); + } catch (Exception exception) { + } + hwPicType = 5; + HSSFPatriarch patriarch = sheet.createDrawingPatriarch(); + HSSFClientAnchor anchor = new HSSFClientAnchor(0, 0, 1020, 250, (short)col, row.getRowNum(), + (short)col, row.getRowNum()); + patriarch.createPicture(anchor, workbook.addPicture(picByte, hwPicType)); + row.setHeight((short)1000); + } else { + cell.setCellValue((field.get(vo) == null) ? "" + : ((value == null) ? String.valueOf(field.get(vo)) : value)); + } + } + } + } + } + } + + public CloudwalkResult exportCount() throws ServiceException { + try { + return CloudwalkResult.success(Long.valueOf(this.EXPORT_MAX_RECORD)); + } catch (Exception e) { + this.logger.error("获取最大导出记录失败", e); + throw new ServiceException(e); + } + } + + protected abstract CloudwalkPageAble queryPage(T paramT, CloudwalkPageInfo paramCloudwalkPageInfo, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + protected abstract CloudwalkResult createLocalFile(T paramT, String paramString, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + protected abstract String getDefaultFileName(); + + protected abstract String getDefaultFileTitleName(); +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/export/AcsFileStatusEnum.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/export/AcsFileStatusEnum.java new file mode 100644 index 00000000..bfa866f2 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/export/AcsFileStatusEnum.java @@ -0,0 +1,31 @@ +package cn.cloudwalk.elevator.export; + +public enum AcsFileStatusEnum { + FINISH(Integer.valueOf(0), "已完成"), PRODUCING(Integer.valueOf(1), "生成中"), DELETED(Integer.valueOf(2), "已删除"), + CANCELED(Integer.valueOf(3), "已取消"), EXPIRED(Integer.valueOf(4), "已过期"), FAIL(Integer.valueOf(5), "失败"); + + private Integer code; + private String message; + + AcsFileStatusEnum(Integer code, String message) { + this.code = code; + this.message = message; + } + + public static AcsFileStatusEnum getEnumByCode(Integer code) { + for (AcsFileStatusEnum item : values()) { + if (code.equals(item.getCode())) { + return item; + } + } + return null; + } + + public Integer getCode() { + return this.code; + } + + public String getMessage() { + return this.message; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/export/ExcelAttribute.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/export/ExcelAttribute.java new file mode 100644 index 00000000..d96d96b9 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/export/ExcelAttribute.java @@ -0,0 +1,24 @@ +package cn.cloudwalk.elevator.export; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.FIELD}) +public @interface ExcelAttribute { + String name(); + + String column() default ""; + + String[] combo() default {}; + + boolean isExport() default true; + + boolean isMark() default false; + + boolean isDate() default false; + + boolean isPic() default false; +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/export/ExcelCallback.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/export/ExcelCallback.java new file mode 100644 index 00000000..d74aa4ba --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/export/ExcelCallback.java @@ -0,0 +1,9 @@ +package cn.cloudwalk.elevator.export; + +import cn.cloudwalk.cloud.exception.ServiceException; +import org.apache.poi.hssf.usermodel.HSSFSheet; +import org.apache.poi.hssf.usermodel.HSSFWorkbook; + +public interface ExcelCallback { + void call(HSSFWorkbook paramHSSFWorkbook, HSSFSheet paramHSSFSheet) throws ServiceException; +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/export/impl/ElevatorDeviceExportService.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/export/impl/ElevatorDeviceExportService.java new file mode 100644 index 00000000..de7670ea --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/export/impl/ElevatorDeviceExportService.java @@ -0,0 +1,72 @@ +package cn.cloudwalk.elevator.export.impl; + +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.page.CloudwalkPageInfo; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.cloud.utils.BeanCopyUtils; +import cn.cloudwalk.elevator.device.dto.AcsElevatorDeviceResultDTO; +import cn.cloudwalk.elevator.device.param.AcsElevatorDeviceQueryParam; +import cn.cloudwalk.elevator.device.service.AcsElevatorDeviceService; +import cn.cloudwalk.elevator.export.AcsAbstractExportAsyncService; +import cn.cloudwalk.elevator.export.result.ElevatorDeviceRecordExcelResult; +import cn.cloudwalk.elevator.util.CollectionUtils; +import cn.cloudwalk.elevator.util.DateUtils; +import java.util.Date; +import java.util.List; +import java.util.Objects; +import javax.annotation.Resource; +import org.springframework.stereotype.Service; + +@Service +public class ElevatorDeviceExportService + extends AcsAbstractExportAsyncService { + @Resource + private AcsElevatorDeviceService elevatorDeviceService; + + protected CloudwalkPageAble queryPage(AcsElevatorDeviceQueryParam param, + CloudwalkPageInfo pageInfo, CloudwalkCallContext context) throws ServiceException { + param.setCurrentPage(pageInfo.getCurrentPage()); + param.setRowsOfPage(pageInfo.getPageSize()); + CloudwalkResult> result = + this.elevatorDeviceService.get(param, context); + if (result.isSuccess()) { + CloudwalkPageAble data = + (CloudwalkPageAble)result.getData(); + if (CollectionUtils.isNotEmpty(data.getDatas())) { + List targetList = + BeanCopyUtils.copy(data.getDatas(), ElevatorDeviceRecordExcelResult.class); + for (ElevatorDeviceRecordExcelResult item : targetList) { + if (Objects.equals(item.getStatus(), Integer.valueOf(1))) { + item.setDeviceOnlineStatus("禁用"); + continue; + } + if (Objects.equals(item.getOnlineStatus(), Integer.valueOf(2))) { + item.setDeviceOnlineStatus("在线"); + continue; + } + if (Objects.equals(item.getOnlineStatus(), Integer.valueOf(3))) { + item.setDeviceOnlineStatus("离线"); + } + } + return new CloudwalkPageAble(targetList, pageInfo, + ((CloudwalkPageAble)result.getData()).getTotalRows()); + } + } + throw new ServiceException(result.getCode(), result.getMessage()); + } + + protected CloudwalkResult createLocalFile(AcsElevatorDeviceQueryParam param, String fileName, + CloudwalkCallContext context) throws ServiceException { + return null; + } + + protected String getDefaultFileName() { + return "派梯设备导出" + DateUtils.formatDate(new Date(), "yyyyMMddHHmmss"); + } + + protected String getDefaultFileTitleName() { + return "派梯设备"; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/export/result/ElevatorDeviceRecordExcelResult.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/export/result/ElevatorDeviceRecordExcelResult.java new file mode 100644 index 00000000..835972e5 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/export/result/ElevatorDeviceRecordExcelResult.java @@ -0,0 +1,200 @@ +package cn.cloudwalk.elevator.export.result; + +public class ElevatorDeviceRecordExcelResult implements Serializable { + @ExcelAttribute(name = "设备名称", column = "A") + private String deviceName; + @ExcelAttribute(name = "设备编号", column = "B") + private String deviceCode; + @ExcelAttribute(name = "设备型号", column = "C") + private String deviceTypeName; + @ExcelAttribute(name = "安装区域", column = "D") + private String areaName; + @ExcelAttribute(name = "当前楼层", column = "E") + private String currentFloor; + + public void setDeviceName(String deviceName) { + this.deviceName = deviceName; + } + + @ExcelAttribute(name = "派梯楼层", column = "F") + private String elevatorFloorList; + @ExcelAttribute(name = "设备状态", column = "G") + private String deviceOnlineStatus; + @ExcelAttribute(name = "设备IP", column = "H") + private String ip; + @ExcelAttribute(name = "最后心跳", column = "I", isDate = true) + private Long lastHeartbeatTime; + private Integer status; + private Integer onlineStatus; + + public void setDeviceCode(String deviceCode) { + this.deviceCode = deviceCode; + } + + public void setDeviceTypeName(String deviceTypeName) { + this.deviceTypeName = deviceTypeName; + } + + public void setAreaName(String areaName) { + this.areaName = areaName; + } + + public void setCurrentFloor(String currentFloor) { + this.currentFloor = currentFloor; + } + + public void setElevatorFloorList(String elevatorFloorList) { + this.elevatorFloorList = elevatorFloorList; + } + + public void setDeviceOnlineStatus(String deviceOnlineStatus) { + this.deviceOnlineStatus = deviceOnlineStatus; + } + + public void setIp(String ip) { + this.ip = ip; + } + + public void setLastHeartbeatTime(Long lastHeartbeatTime) { + this.lastHeartbeatTime = lastHeartbeatTime; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public void setOnlineStatus(Integer onlineStatus) { + this.onlineStatus = onlineStatus; + } + + public boolean equals(Object o) { + if (o == this) + return true; + if (!(o instanceof ElevatorDeviceRecordExcelResult)) + return false; + ElevatorDeviceRecordExcelResult other = (ElevatorDeviceRecordExcelResult)o; + if (!other.canEqual(this)) + return false; + Object this$deviceName = getDeviceName(), other$deviceName = other.getDeviceName(); + if ((this$deviceName == null) ? (other$deviceName != null) : !this$deviceName.equals(other$deviceName)) + return false; + Object this$deviceCode = getDeviceCode(), other$deviceCode = other.getDeviceCode(); + if ((this$deviceCode == null) ? (other$deviceCode != null) : !this$deviceCode.equals(other$deviceCode)) + return false; + Object this$deviceTypeName = getDeviceTypeName(), other$deviceTypeName = other.getDeviceTypeName(); + if ((this$deviceTypeName == null) ? (other$deviceTypeName != null) + : !this$deviceTypeName.equals(other$deviceTypeName)) + return false; + Object this$areaName = getAreaName(), other$areaName = other.getAreaName(); + if ((this$areaName == null) ? (other$areaName != null) : !this$areaName.equals(other$areaName)) + return false; + Object this$currentFloor = getCurrentFloor(), other$currentFloor = other.getCurrentFloor(); + if ((this$currentFloor == null) ? (other$currentFloor != null) : !this$currentFloor.equals(other$currentFloor)) + return false; + Object this$elevatorFloorList = getElevatorFloorList(), other$elevatorFloorList = other.getElevatorFloorList(); + if ((this$elevatorFloorList == null) ? (other$elevatorFloorList != null) + : !this$elevatorFloorList.equals(other$elevatorFloorList)) + return false; + Object this$deviceOnlineStatus = getDeviceOnlineStatus(), + other$deviceOnlineStatus = other.getDeviceOnlineStatus(); + if ((this$deviceOnlineStatus == null) ? (other$deviceOnlineStatus != null) + : !this$deviceOnlineStatus.equals(other$deviceOnlineStatus)) + return false; + Object this$ip = getIp(), other$ip = other.getIp(); + if ((this$ip == null) ? (other$ip != null) : !this$ip.equals(other$ip)) + return false; + Object this$lastHeartbeatTime = getLastHeartbeatTime(), other$lastHeartbeatTime = other.getLastHeartbeatTime(); + if ((this$lastHeartbeatTime == null) ? (other$lastHeartbeatTime != null) + : !this$lastHeartbeatTime.equals(other$lastHeartbeatTime)) + return false; + Object this$status = getStatus(), other$status = other.getStatus(); + if ((this$status == null) ? (other$status != null) : !this$status.equals(other$status)) + return false; + Object this$onlineStatus = getOnlineStatus(), other$onlineStatus = other.getOnlineStatus(); + return !((this$onlineStatus == null) ? (other$onlineStatus != null) + : !this$onlineStatus.equals(other$onlineStatus)); + } + + protected boolean canEqual(Object other) { + return other instanceof ElevatorDeviceRecordExcelResult; + } + + public int hashCode() { + int PRIME = 59; + result = 1; + Object $deviceName = getDeviceName(); + result = result * 59 + (($deviceName == null) ? 43 : $deviceName.hashCode()); + Object $deviceCode = getDeviceCode(); + result = result * 59 + (($deviceCode == null) ? 43 : $deviceCode.hashCode()); + Object $deviceTypeName = getDeviceTypeName(); + result = result * 59 + (($deviceTypeName == null) ? 43 : $deviceTypeName.hashCode()); + Object $areaName = getAreaName(); + result = result * 59 + (($areaName == null) ? 43 : $areaName.hashCode()); + Object $currentFloor = getCurrentFloor(); + result = result * 59 + (($currentFloor == null) ? 43 : $currentFloor.hashCode()); + Object $elevatorFloorList = getElevatorFloorList(); + result = result * 59 + (($elevatorFloorList == null) ? 43 : $elevatorFloorList.hashCode()); + Object $deviceOnlineStatus = getDeviceOnlineStatus(); + result = result * 59 + (($deviceOnlineStatus == null) ? 43 : $deviceOnlineStatus.hashCode()); + Object $ip = getIp(); + result = result * 59 + (($ip == null) ? 43 : $ip.hashCode()); + Object $lastHeartbeatTime = getLastHeartbeatTime(); + result = result * 59 + (($lastHeartbeatTime == null) ? 43 : $lastHeartbeatTime.hashCode()); + Object $status = getStatus(); + result = result * 59 + (($status == null) ? 43 : $status.hashCode()); + Object $onlineStatus = getOnlineStatus(); + return result * 59 + (($onlineStatus == null) ? 43 : $onlineStatus.hashCode()); + } + + public String toString() { + return "ElevatorDeviceRecordExcelResult(deviceName=" + getDeviceName() + ", deviceCode=" + getDeviceCode() + + ", deviceTypeName=" + getDeviceTypeName() + ", areaName=" + getAreaName() + ", currentFloor=" + + getCurrentFloor() + ", elevatorFloorList=" + getElevatorFloorList() + ", deviceOnlineStatus=" + + getDeviceOnlineStatus() + ", ip=" + getIp() + ", lastHeartbeatTime=" + getLastHeartbeatTime() + + ", status=" + getStatus() + ", onlineStatus=" + getOnlineStatus() + ")"; + } + + public String getDeviceName() { + return this.deviceName; + } + + public String getDeviceCode() { + return this.deviceCode; + } + + public String getDeviceTypeName() { + return this.deviceTypeName; + } + + public String getAreaName() { + return this.areaName; + } + + public String getCurrentFloor() { + return this.currentFloor; + } + + public String getElevatorFloorList() { + return this.elevatorFloorList; + } + + public String getDeviceOnlineStatus() { + return this.deviceOnlineStatus; + } + + public String getIp() { + return this.ip; + } + + public Long getLastHeartbeatTime() { + return this.lastHeartbeatTime; + } + + public Integer getStatus() { + return this.status; + } + + public Integer getOnlineStatus() { + return this.onlineStatus; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/export/utils/ExcelUtil.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/export/utils/ExcelUtil.java new file mode 100644 index 00000000..8423d626 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/export/utils/ExcelUtil.java @@ -0,0 +1,476 @@ +package cn.cloudwalk.elevator.export.utils; + +import cn.cloudwalk.elevator.export.ExcelAttribute; +import cn.cloudwalk.elevator.export.ExcelCallback; +import cn.cloudwalk.elevator.util.DateUtils; +import java.io.BufferedInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.lang.reflect.Field; +import java.lang.reflect.InvocationHandler; +import java.lang.reflect.Proxy; +import java.math.BigDecimal; +import java.net.HttpURLConnection; +import java.net.URL; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import org.apache.commons.io.IOUtils; +import org.apache.commons.lang3.StringUtils; +import org.apache.poi.hssf.usermodel.DVConstraint; +import org.apache.poi.hssf.usermodel.HSSFCell; +import org.apache.poi.hssf.usermodel.HSSFCellStyle; +import org.apache.poi.hssf.usermodel.HSSFClientAnchor; +import org.apache.poi.hssf.usermodel.HSSFDataValidation; +import org.apache.poi.hssf.usermodel.HSSFFont; +import org.apache.poi.hssf.usermodel.HSSFPatriarch; +import org.apache.poi.hssf.usermodel.HSSFRow; +import org.apache.poi.hssf.usermodel.HSSFSheet; +import org.apache.poi.hssf.usermodel.HSSFWorkbook; +import org.apache.poi.ss.usermodel.Cell; +import org.apache.poi.ss.usermodel.DataValidation; +import org.apache.poi.ss.usermodel.DataValidationConstraint; +import org.apache.poi.ss.usermodel.Row; +import org.apache.poi.ss.usermodel.Sheet; +import org.apache.poi.ss.usermodel.Workbook; +import org.apache.poi.ss.usermodel.WorkbookFactory; +import org.apache.poi.ss.util.CellRangeAddressList; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class ExcelUtil { + public static final String FONT_CODE = "1"; + private static final int BUF_SIZE = 8096; + private static Logger logger = LoggerFactory.getLogger(ExcelUtil.class); + private static String EXPORT_KEY = "isExport"; + private static String ANNOTATION_FIELD = "memberValues"; + + public static List getExcelToList(String sheetName, Integer startNo, InputStream input, Class clazz) + throws Exception { + List list = new ArrayList<>(); + try (Workbook book = WorkbookFactory.create(input)) { + Sheet sheet = null; + if (StringUtils.isNotBlank(sheetName)) { + sheet = book.getSheet(sheetName); + } + if (sheet == null) { + sheet = book.getSheetAt(0); + } + int rows = sheet.getLastRowNum(); + int startLine = 1; + if (null != startNo && startNo.intValue() >= 0) { + startLine = startNo.intValue(); + } + if (rows > 0) { + Field[] allFields = clazz.getDeclaredFields(); + Map fieldsMap = getStringFieldMap(allFields); + Row firstRow = sheet.getRow(sheet.getFirstRowNum() + startLine - 1); + for (int i = sheet.getFirstRowNum() + startLine; i <= rows; i++) { + Row row = sheet.getRow(i); + if (row != null) { + Iterator cells = row.cellIterator(); + T entity = null; + boolean isNull = true; + while (cells.hasNext()) { + Cell cell = cells.next(); + String fieldName = firstRow.getCell(cell.getColumnIndex()).getStringCellValue(); + if (!fieldsMap.containsKey(fieldName)) { + continue; + } + cell.setCellType(1); + String c = cell.getStringCellValue(); + if (StringUtils.isNotEmpty(c)) { + isNull = false; + } + entity = (entity == null) ? clazz.newInstance() : entity; + Field field = fieldsMap.get(fieldName); + Class fieldType = field.getType(); + if (fieldType == null) { + continue; + } + setValue(entity, c, field, fieldType); + } + if (entity != null && !isNull) + list.add(entity); + } + } + } + } catch (Exception e) { + throw new Exception("将excel表单数据源的数据导入到list异常!", e); + } + return list; + } + + private static void setValue(T entity, String c, Field field, Class fieldType) + throws IllegalAccessException { + if (String.class == fieldType) { + field.set(entity, String.valueOf(c)); + } else if (BigDecimal.class == fieldType) { + field.set(entity, BigDecimal.valueOf(Double.valueOf(c).doubleValue())); + } else if (int.class == fieldType || Integer.class == fieldType) { + field.set(entity, Integer.valueOf(Integer.parseInt(c))); + } else if (long.class == fieldType || Long.class == fieldType) { + field.set(entity, Long.valueOf(c)); + } else if (float.class == fieldType || Float.class == fieldType) { + field.set(entity, Float.valueOf(c)); + } else if (short.class == fieldType || Short.class == fieldType) { + field.set(entity, Short.valueOf(c)); + } else if (double.class == fieldType || Double.class == fieldType) { + field.set(entity, Double.valueOf(c)); + } + } + + private static Map getStringFieldMap(Field[] allFields) { + Map fieldsMap = new HashMap<>(allFields.length); + for (Field field : allFields) { + if (field.isAnnotationPresent((Class)ExcelAttribute.class)) { + ExcelAttribute attribute = field.getAnnotation(ExcelAttribute.class); + if (!StringUtils.isBlank(attribute.name())) { + field.setAccessible(true); + fieldsMap.put(attribute.name(), field); + } + } + } + return fieldsMap; + } + + public static boolean matchExcel(String sheetName, InputStream input, Class clazz) throws Exception { + try { + HSSFWorkbook book = new HSSFWorkbook(input); + HSSFSheet sheet = null; + if (StringUtils.isNotBlank(sheetName)) { + sheet = book.getSheet(sheetName); + } + if (sheet == null) { + sheet = book.getSheetAt(0); + } + int rows = sheet.getLastRowNum(); + if (rows > 0) { + Field[] allFields = clazz.getDeclaredFields(); + Map fieldsMap = getStringFieldMap(allFields); + HSSFRow firstRow = sheet.getRow(sheet.getFirstRowNum()); + Iterator cells = firstRow.cellIterator(); + while (cells.hasNext()) { + Cell cell = cells.next(); + String fieldName = firstRow.getCell(cell.getColumnIndex()).getStringCellValue(); + if (!fieldsMap.containsKey(fieldName)) { + return false; + } + } + } else { + return false; + } + } catch (Exception e) { + throw new Exception("将excel表单数据源的数据导入到list异常!", e); + } + return true; + } + + public static boolean getListToExcel(List list, List listHead, String sheetName, OutputStream output, + Class clazz) throws Exception { + try (HSSFWorkbook workbook = new HSSFWorkbook()) { + Field[] allFields = clazz.getDeclaredFields(); + List fields = new ArrayList<>(); + for (Field field : allFields) { + if (field.isAnnotationPresent((Class)ExcelAttribute.class)) { + fields.add(field); + } + } + HSSFSheet sheet = workbook.createSheet(); + workbook.setSheetName(0, sheetName); + createRowContent(sheet, fields, workbook, listHead, 0, listHead.size(), 0); + createRowHeard(sheet, fields, workbook, 1); + createRowContent(sheet, fields, workbook, list, 0, list.size(), 2); + output.flush(); + workbook.write(output); + output.close(); + return Boolean.TRUE.booleanValue(); + } catch (Exception e) { + throw new Exception("将list数据源的数据导入到excel表单异常!", e); + } + } + + public static boolean getListToExcel(List list, String sheetName, OutputStream output, Class clazz) + throws Exception { + try (HSSFWorkbook workbook = new HSSFWorkbook()) { + int sheetSize = 65536; + Field[] allFields = clazz.getDeclaredFields(); + List fields = new ArrayList<>(); + for (Field field : allFields) { + ExcelAttribute attr = field.getAnnotation(ExcelAttribute.class); + if (attr != null && attr.isExport()) { + fields.add(field); + } + } + int listSize = 0; + if (list != null && list.size() > 0) { + listSize = list.size(); + } + int sheetNo = listSize / sheetSize; + for (int index = 0; index <= sheetNo; index++) { + HSSFSheet sheet = workbook.createSheet(); + workbook.setSheetName(index, sheetName + index); + createRowHeard(sheet, fields, workbook, 2); + int startNo = index * sheetSize; + int endNo = Math.min(startNo + sheetSize, listSize); + createRowContent(sheet, fields, workbook, list, startNo, endNo, 3); + } + output.flush(); + workbook.write(output); + output.close(); + return Boolean.TRUE.booleanValue(); + } catch (Exception e) { + throw new Exception("将list数据源的数据导入到excel表单异常!", e); + } + } + + public static boolean getListToExcel(List list, String sheetName, OutputStream output, Class clazz, + Integer startRow, ExcelCallback callback) throws Exception { + try (HSSFWorkbook workbook = new HSSFWorkbook()) { + int sheetSize = 65536; + Field[] allFields = clazz.getDeclaredFields(); + List fields = new ArrayList<>(); + for (Field field : allFields) { + ExcelAttribute attr = field.getAnnotation(ExcelAttribute.class); + if (attr != null && attr.isExport()) { + fields.add(field); + } + } + int listSize = 0; + if (list != null && list.size() > 0) { + listSize = list.size(); + } + int sheetNo = listSize / sheetSize; + for (int index = 0; index <= sheetNo; index++) { + HSSFSheet sheet = workbook.createSheet(); + workbook.setSheetName(index, sheetName + index); + createRowHeard(sheet, fields, workbook, startRow.intValue()); + int startNo = index * sheetSize; + int endNo = Math.min(startNo + sheetSize, listSize); + createRowContent(sheet, fields, workbook, list, startNo, endNo, startRow.intValue() + 1); + if (null != callback) { + callback.call(workbook, sheet); + } + } + output.flush(); + workbook.write(output); + output.close(); + return Boolean.TRUE.booleanValue(); + } catch (Exception e) { + throw new Exception("将list数据源的数据导入到excel表单异常!", e); + } + } + + private static void createRowContent(HSSFSheet sheet, List fields, HSSFWorkbook workbook, List list, + int startNo, int endNo, int rowIndex) throws Exception { + String value = null; + int hwPicType = 0; + byte[] picByte = null; + for (int i = startNo; i < endNo; i++) { + HSSFRow row = sheet.createRow(i - startNo + rowIndex); + T vo = list.get(i); + for (int j = 0; j < fields.size(); j++) { + Field field = fields.get(j); + field.setAccessible(true); + ExcelAttribute attr = field.getAnnotation(ExcelAttribute.class); + int col = j; + if (StringUtils.isNotBlank(attr.column())) { + col = getExcelCol(attr.column()); + } + if (attr.isExport()) { + HSSFCell cell = row.createCell(col); + Class classType = field.getType(); + if (field.get(vo) != null) { + value = null; + if (classType.isAssignableFrom(Date.class)) { + value = DateUtils.formatDate((Date)field.get(vo), "yyyy-MM-dd HH:mm:ss"); + } + if (classType.isAssignableFrom(Long.class) && attr.isDate()) { + value = DateUtils.formatDate(new Date(((Long)field.get(vo)).longValue()), + "yyyy-MM-dd HH:mm:ss"); + } + if (attr.isPic()) { + try { + if (field.getType().equals(String.class)) { + picByte = getBytesByUrl((String)field.get(vo)); + } + picByte = (byte[])field.get(vo); + } catch (Exception exception) { + } + hwPicType = 5; + HSSFPatriarch patriarch = sheet.createDrawingPatriarch(); + HSSFClientAnchor anchor = new HSSFClientAnchor(0, 0, 1020, 250, (short)col, row.getRowNum(), + (short)col, row.getRowNum()); + patriarch.createPicture(anchor, workbook.addPicture(picByte, hwPicType)); + row.setHeight((short)1000); + } else { + cell.setCellValue((field.get(vo) == null) ? "" + : ((value == null) ? String.valueOf(field.get(vo)) : value)); + } + } + } + } + } + } + + public static void createRowHeard(HSSFSheet sheet, List fields, HSSFWorkbook workbook, int index) { + HSSFRow row = sheet.createRow(index); + for (int i = 0; i < fields.size(); i++) { + int col = i; + Field field = fields.get(i); + ExcelAttribute attr = field.getAnnotation(ExcelAttribute.class); + if (StringUtils.isNotBlank(attr.column())) { + col = getExcelCol(attr.column()); + } + HSSFCell cell = row.createCell(col); + HSSFCellStyle cellStyle = createCellStyle(workbook, attr.isMark() ? "2" : "1"); + cell.setCellStyle(cellStyle); + sheet.setColumnWidth(i, + (int)((((attr.name().getBytes()).length <= 4) ? 6 : (attr.name().getBytes()).length) * 1.5D * 256.0D)); + cell.setCellType(1); + cell.setCellValue(attr.name()); + } + } + + private static HSSFCellStyle createCellStyle(HSSFWorkbook workbook, String type) { + HSSFFont font = workbook.createFont(); + HSSFCellStyle cellStyle = workbook.createCellStyle(); + font.setFontName("Arail narrow"); + font.setBoldweight((short)700); + if ("1".equals(type)) { + font.setColor('翿'); + cellStyle.setFont(font); + } else { + font.setColor((short)10); + cellStyle.setFont(font); + } + return cellStyle; + } + + public static int getExcelCol(String col) { + col = col.toUpperCase(); + int count = -1; + char[] cs = col.toCharArray(); + for (int i = 0; i < cs.length; i++) { + count = (int)(count + (cs[i] - 64) * Math.pow(26.0D, cs.length - 1.0D - i)); + } + return count; + } + + public static HSSFSheet setHSSFPrompt(HSSFSheet sheet, String promptTitle, String promptContent, int firstRow, + int endRow, int firstCol, int endCol) { + DVConstraint constraint = DVConstraint.createCustomFormulaConstraint("DD1"); + CellRangeAddressList regions = new CellRangeAddressList(firstRow, endRow, firstCol, endCol); + HSSFDataValidation dataValidationView = new HSSFDataValidation(regions, (DataValidationConstraint)constraint); + dataValidationView.createPromptBox(promptTitle, promptContent); + sheet.addValidationData((DataValidation)dataValidationView); + return sheet; + } + + public static HSSFSheet setHSSFValidation(HSSFSheet sheet, String[] textlist, int firstRow, int endRow, + int firstCol, int endCol) { + DVConstraint constraint = DVConstraint.createExplicitListConstraint(textlist); + CellRangeAddressList regions = new CellRangeAddressList(firstRow, endRow, firstCol, endCol); + HSSFDataValidation dataValidationList = new HSSFDataValidation(regions, (DataValidationConstraint)constraint); + sheet.addValidationData((DataValidation)dataValidationList); + return sheet; + } + + public static byte[] getBytesByUrl(String imgUrl) throws Exception { + if (StringUtils.isEmpty(imgUrl)) { + return null; + } + BufferedInputStream bis = null; + ByteArrayOutputStream bos = null; + try { + URL url = new URL(imgUrl); + HttpURLConnection http = (HttpURLConnection)url.openConnection(); + http.setConnectTimeout(3000); + http.connect(); + bis = new BufferedInputStream(http.getInputStream()); + bos = new ByteArrayOutputStream(); + byte[] buf = new byte[8096]; + int size; + while ((size = bis.read(buf)) != -1) { + bos.write(buf, 0, size); + } + http.disconnect(); + return bos.toByteArray(); + } finally { + if (bis != null) { + try { + bis.close(); + } catch (IOException e) { + logger.error("流关闭失败,原因:" + e.getMessage(), e); + } + } + if (bos != null) { + try { + bos.close(); + } catch (IOException e) { + logger.error("流关闭失败,原因:" + e.getMessage(), e); + } + } + } + } + + public static void setExcelAttribute(ExcelAttribute excelAttribute, String key, Object obj, boolean isExport) { + if (excelAttribute == null) { + return; + } + InvocationHandler invocationHandler = Proxy.getInvocationHandler(excelAttribute); + Field value = null; + try { + value = invocationHandler.getClass().getDeclaredField(ANNOTATION_FIELD); + } catch (Exception e) { + logger.warn("反射获取ExcelAttribute注解的成员字段异常", e); + } + if (value == null) { + return; + } + value.setAccessible(true); + Map memberValues = null; + try { + memberValues = (Map)value.get(invocationHandler); + } catch (Exception e) { + logger.warn("反射获取ExcelAttribute注解的成员值异常", e); + } + if (memberValues == null) { + return; + } + if (obj != null) { + memberValues.put(key, obj); + } + if (!isExport) { + memberValues.put(EXPORT_KEY, Boolean.valueOf(isExport)); + } + } + + public static boolean appendListToExcel(InputStream inputStream, List list, int sheetIndex, + OutputStream output, Class clazz, Integer startRow) throws Exception { + try (HSSFWorkbook workbook = new HSSFWorkbook(inputStream)) { + Field[] allFields = clazz.getDeclaredFields(); + List fields = new ArrayList<>(); + for (Field field : allFields) { + ExcelAttribute attr = field.getAnnotation(ExcelAttribute.class); + if (attr != null && attr.isExport()) { + fields.add(field); + } + } + HSSFSheet sheet = workbook.getSheetAt(sheetIndex); + createRowContent(sheet, fields, workbook, list, 0, list.size(), startRow.intValue()); + output.flush(); + workbook.write(IOUtils.buffer(output)); + return Boolean.TRUE.booleanValue(); + } catch (IOException e) { + throw new Exception("将list数据源的数据导入到excel表单异常!", e); + } finally { + output.close(); + } + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/export/utils/FolderUtils.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/export/utils/FolderUtils.java new file mode 100644 index 00000000..9b49d2e5 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/export/utils/FolderUtils.java @@ -0,0 +1,37 @@ +package cn.cloudwalk.elevator.export.utils; + +import java.io.File; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class FolderUtils { + private static Logger logger = LoggerFactory.getLogger(FolderUtils.class); + + public static void deleteFolder(String path) { + File file = new File(path); + if (file.exists()) { + File[] files = file.listFiles(); + int len = files.length; + for (int i = 0; i < len; i++) { + if (files[i].isDirectory()) { + deleteFolder(files[i].getPath()); + } else { + doDelete(files[i]); + } + } + doDelete(file); + } + } + + public static void deleteFile(String path) { + File file = new File(path); + if (file.exists()) { + doDelete(file); + } + } + + public static void doDelete(File file) { + if (file.exists() && !file.delete()) + logger.error("文件删除失败"); + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/mqtt/client/MqttFeignClient.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/mqtt/client/MqttFeignClient.java new file mode 100644 index 00000000..21e8718b --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/mqtt/client/MqttFeignClient.java @@ -0,0 +1,16 @@ +package cn.cloudwalk.elevator.mqtt.client; + +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.elevator.mqtt.fallback.MqttFeignClientFallback; +import cn.cloudwalk.elevator.mqtt.param.MqttSendMessageParam; +import org.springframework.cloud.netflix.feign.FeignClient; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; + +@FeignClient(name = "${feign.mqtt.name:cloudwalk-device-thirdparty}", path = "/mqtt", + fallback = MqttFeignClientFallback.class) +public interface MqttFeignClient { + @RequestMapping(value = {"/publish"}, method = {RequestMethod.POST}) + CloudwalkResult publish(MqttSendMessageParam paramMqttSendMessageParam) throws ServiceException; +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/mqtt/fallback/MqttFeignClientFallback.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/mqtt/fallback/MqttFeignClientFallback.java new file mode 100644 index 00000000..7584b87c --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/mqtt/fallback/MqttFeignClientFallback.java @@ -0,0 +1,14 @@ +package cn.cloudwalk.elevator.mqtt.fallback; + +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.elevator.mqtt.client.MqttFeignClient; +import cn.cloudwalk.elevator.mqtt.param.MqttSendMessageParam; +import org.springframework.stereotype.Component; + +@Component +public class MqttFeignClientFallback implements MqttFeignClient { + public CloudwalkResult publish(MqttSendMessageParam param) throws ServiceException { + throw new RuntimeException("mqtt发送数据失败"); + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/mqtt/impl/MqttServiceImpl.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/mqtt/impl/MqttServiceImpl.java new file mode 100644 index 00000000..c11ed722 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/mqtt/impl/MqttServiceImpl.java @@ -0,0 +1,75 @@ +package cn.cloudwalk.elevator.mqtt.impl; + +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.cloud.utils.BeanCopyUtils; +import cn.cloudwalk.elevator.common.AbstractAcsDeviceService; +import cn.cloudwalk.elevator.mqtt.client.MqttFeignClient; +import cn.cloudwalk.elevator.mqtt.param.AcsElevatorRecordMqttParam; +import cn.cloudwalk.elevator.mqtt.param.MqttSendMessageParam; +import cn.cloudwalk.elevator.mqtt.service.MqttService; +import cn.cloudwalk.elevator.record.dao.AcsRecogRecordDao; +import cn.cloudwalk.elevator.record.dto.AcsElevatorRecordAddDTO; +import cn.cloudwalk.elevator.record.dto.AcsRecogRecordPageDTO; +import cn.cloudwalk.elevator.record.dto.AcsRecogRecordResultDTO; +import cn.cloudwalk.elevator.util.DateUtils; +import com.alibaba.fastjson.JSON; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Resource; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.scheduling.annotation.Async; +import org.springframework.stereotype.Component; + +@Component +public class MqttServiceImpl extends AbstractAcsDeviceService implements MqttService { + private static final String VISITOR_LABEL_CODE = "1"; + private static final String VISITOR_LABEL_NAME = "访客"; + private static final String ELEVATOR_RECORD_SUFFIX = "_elevator_record"; + @Qualifier("cn.cloudwalk.elevator.mqtt.client.MqttFeignClient") + @Resource + private MqttFeignClient mqttFeignClient; + @Resource + private AcsRecogRecordDao acsRecogRecordDao; + + @Async + public void sendInfoToOne(AcsElevatorRecordAddDTO addDTO) throws ServiceException { + this.logger.info("防止人员识别记录未入库即开始推送消息,休眠10秒"); + try { + TimeUnit.SECONDS.sleep(10L); + } catch (InterruptedException e) { + this.logger.error("休眠失败,失败原因:{}", e.getMessage()); + throw new ServiceException(e.getMessage()); + } + try { + AcsRecogRecordPageDTO recordPageDTO = new AcsRecogRecordPageDTO(); + recordPageDTO.setLogId(addDTO.getRecognitionFaceId()); + recordPageDTO.setStartTime(DateUtils.todayStart()); + recordPageDTO.setEndTime(DateUtils.todayEnd()); + List recogRecordResultDTOS = this.acsRecogRecordDao.page(recordPageDTO); + if (!CollectionUtils.isEmpty(recogRecordResultDTOS)) { + AcsRecogRecordResultDTO acsRecogRecordResultDTO = recogRecordResultDTOS.get(0); + AcsElevatorRecordMqttParam acsElevatorRecordMqttParam = + (AcsElevatorRecordMqttParam)BeanCopyUtils.copyProperties(addDTO, AcsElevatorRecordMqttParam.class); + acsElevatorRecordMqttParam.setOpenDoorId(addDTO.getId()); + acsElevatorRecordMqttParam.setPersonName(acsRecogRecordResultDTO.getPersonName()); + if (StringUtils.isNotBlank(acsRecogRecordResultDTO.getPersonLabelIds()) + && acsRecogRecordResultDTO.getPersonLabelIds().contains("1")) { + acsElevatorRecordMqttParam.setIsVisitor(Boolean.TRUE); + } + CloudwalkResult publish = this.mqttFeignClient + .publish(MqttSendMessageParam.builder().topic(addDTO.getBusinessId() + "_elevator_record") + .data(JSON.toJSONString(acsElevatorRecordMqttParam)).build()); + if (publish.isSuccess()) { + this.logger.info("推送数据成功!!!,数据,{}", JSON.toJSONString(acsElevatorRecordMqttParam)); + } else { + this.logger.debug("推送数据失败!!!"); + } + } + } catch (Exception e) { + this.logger.error("发送消息失败 param:{} {}", addDTO, e.getMessage()); + } + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/mqtt/param/AcsElevatorRecordMqttParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/mqtt/param/AcsElevatorRecordMqttParam.java new file mode 100644 index 00000000..f0cb0281 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/mqtt/param/AcsElevatorRecordMqttParam.java @@ -0,0 +1,78 @@ +package cn.cloudwalk.elevator.mqtt.param; + +public class AcsElevatorRecordMqttParam { + private String openDoorId; + private String openDoorType; + private String srcFloor; + + public void setOpenDoorId(String openDoorId) { + this.openDoorId = openDoorId; + } + + private String destFloor; + private String dispatchElevatorNo; + private Long dispatchElevatorTime; + private String personName; + + public void setOpenDoorType(String openDoorType) { + this.openDoorType = openDoorType; + } + + public void setSrcFloor(String srcFloor) { + this.srcFloor = srcFloor; + } + + public void setDestFloor(String destFloor) { + this.destFloor = destFloor; + } + + public void setDispatchElevatorNo(String dispatchElevatorNo) { + this.dispatchElevatorNo = dispatchElevatorNo; + } + + public void setDispatchElevatorTime(Long dispatchElevatorTime) { + this.dispatchElevatorTime = dispatchElevatorTime; + } + + public void setPersonName(String personName) { + this.personName = personName; + } + + public void setIsVisitor(Boolean isVisitor) { + this.isVisitor = isVisitor; + } + + public String getOpenDoorId() { + return this.openDoorId; + } + + public String getOpenDoorType() { + return this.openDoorType; + } + + public String getSrcFloor() { + return this.srcFloor; + } + + public String getDestFloor() { + return this.destFloor; + } + + public String getDispatchElevatorNo() { + return this.dispatchElevatorNo; + } + + public Long getDispatchElevatorTime() { + return this.dispatchElevatorTime; + } + + public String getPersonName() { + return this.personName; + } + + private Boolean isVisitor = Boolean.valueOf(false); + + public Boolean getIsVisitor() { + return this.isVisitor; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/mqtt/param/MqttSendMessageParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/mqtt/param/MqttSendMessageParam.java new file mode 100644 index 00000000..ef6470c1 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/mqtt/param/MqttSendMessageParam.java @@ -0,0 +1,56 @@ +package cn.cloudwalk.elevator.mqtt.param; + +public class MqttSendMessageParam { + private String topic; + private String data; + + @ConstructorProperties({"topic", "data"}) + MqttSendMessageParam(String topic, String data) { + this.topic = topic; + this.data = data; + } + + public static MqttSendMessageParamBuilder builder() { + return new MqttSendMessageParamBuilder(); + } + + public static class MqttSendMessageParamBuilder { + private String topic; + + public MqttSendMessageParamBuilder topic(String topic) { + this.topic = topic; + return this; + } + + private String data; + + public MqttSendMessageParamBuilder data(String data) { + this.data = data; + return this; + } + + public MqttSendMessageParam build() { + return new MqttSendMessageParam(this.topic, this.data); + } + + public String toString() { + return "MqttSendMessageParam.MqttSendMessageParamBuilder(topic=" + this.topic + ", data=" + this.data + ")"; + } + } + + public void setTopic(String topic) { + this.topic = topic; + } + + public void setData(String data) { + this.data = data; + } + + public String getTopic() { + return this.topic; + } + + public String getData() { + return this.data; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/mqtt/service/MqttService.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/mqtt/service/MqttService.java new file mode 100644 index 00000000..88ad5150 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/mqtt/service/MqttService.java @@ -0,0 +1,8 @@ +package cn.cloudwalk.elevator.mqtt.service; + +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.elevator.record.dto.AcsElevatorRecordAddDTO; + +public interface MqttService { + void sendInfoToOne(AcsElevatorRecordAddDTO paramAcsElevatorRecordAddDTO) throws ServiceException; +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/impl/AbstractAcsPassService.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/impl/AbstractAcsPassService.java new file mode 100644 index 00000000..a7a6993e --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/impl/AbstractAcsPassService.java @@ -0,0 +1,63 @@ +package cn.cloudwalk.elevator.passrule.impl; + +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStoreEditParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStorePersonData; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStoreQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.ImageStoreDetailResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.ImgStorePersonResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.service.ImageStoreService; +import cn.cloudwalk.client.cwoscomponent.intelligent.label.result.LabelResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.organization.result.OrganizationResult; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.cloud.utils.BeanCopyUtils; +import cn.cloudwalk.elevator.common.AbstractCloudwalkService; +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Collectors; +import javax.annotation.Resource; + +public class AbstractAcsPassService extends AbstractCloudwalkService { + @Resource + private ImageStoreService imageStoreService; + + protected ImageStoreDetailResult getImageStoreDetail(String imageStoreId, CloudwalkCallContext context) + throws ServiceException { + ImageStoreQueryParam param = new ImageStoreQueryParam(); + param.setId(imageStoreId); + param.setBusinessId(context.getCompany().getCompanyId()); + CloudwalkResult imageStoreDetail = this.imageStoreService.detail(param, context); + if (!imageStoreDetail.isSuccess()) { + this.logger.error("远程调用查询图库详情失败,原因:" + imageStoreDetail.getMessage()); + throw new ServiceException("远程调用查询图库详情失败"); + } + return (ImageStoreDetailResult)imageStoreDetail.getData(); + } + + protected ImageStoreEditParam getEditParamByImageStore(ImageStoreDetailResult imageStoreDetail) { + ImageStoreEditParam param = new ImageStoreEditParam(); + BeanCopyUtils.copyProperties(imageStoreDetail, param); + param.setIncludeOrganizations((List)imageStoreDetail.getIncludeOrganizations().stream() + .map(OrganizationResult::getId).collect(Collectors.toList())); + param.setIncludeLabels( + (List)imageStoreDetail.getIncludeLabels().stream().map(LabelResult::getId).collect(Collectors.toList())); + param.setIncludePersons(getImageStorePersonData(imageStoreDetail.getIncludePersons())); + param.setExcludeLabels( + (List)imageStoreDetail.getExcludeLabels().stream().map(LabelResult::getId).collect(Collectors.toList())); + param.setExcludePersons((List)imageStoreDetail.getExcludePersons().stream().map(ImgStorePersonResult::getId) + .collect(Collectors.toList())); + return param; + } + + private List getImageStorePersonData(List imgStorePersonResults) { + List personDataList = new ArrayList<>(); + for (ImgStorePersonResult personResult : imgStorePersonResults) { + ImageStorePersonData personData = new ImageStorePersonData(); + BeanCopyUtils.copyProperties(personResult, personData); + personData.setObjectId(personResult.getId()); + personDataList.add(personData); + } + return personDataList; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/impl/AcsPassRuleServiceImpl.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/impl/AcsPassRuleServiceImpl.java new file mode 100644 index 00000000..561054b1 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/impl/AcsPassRuleServiceImpl.java @@ -0,0 +1,477 @@ +package cn.cloudwalk.elevator.passrule.impl; + +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStoreAddParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStoreDelParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStoreEditParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStoreQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.ImageStoreDetailResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.ImageStoreListResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.service.ImageStorePersonService; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.service.ImageStoreService; +import cn.cloudwalk.client.cwoscomponent.intelligent.person.service.PersonService; +import cn.cloudwalk.cloud.annotation.CloudwalkParamsValidate; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.DataAccessException; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.page.CloudwalkPageInfo; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.cloud.utils.BeanCopyUtils; +import cn.cloudwalk.elevator.common.service.AcsApplicationService; +import cn.cloudwalk.elevator.device.dao.AcsElevatorDeviceDao; +import cn.cloudwalk.elevator.device.dto.AcsElevatorDeviceListDto; +import cn.cloudwalk.elevator.device.dto.AcsElevatorDeviceResultDTO; +import cn.cloudwalk.elevator.device.setting.param.DeviceImageStoreAppBindParam; +import cn.cloudwalk.elevator.device.setting.param.DeviceImageStoreAppUnbindParam; +import cn.cloudwalk.elevator.device.setting.service.AcsDeviceImageStoreAppBindService; +import cn.cloudwalk.elevator.em.AcsPassTypeEnum; +import cn.cloudwalk.elevator.passrule.dao.AcsPassRuleDao; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleAddDto; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleDeleteDto; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleEditDto; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleImageDto; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleImageResultDto; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleIsDefaultDto; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleQueryDto; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleResultDto; +import cn.cloudwalk.elevator.passrule.param.AcsPassRuleDeleteParam; +import cn.cloudwalk.elevator.passrule.param.AcsPassRuleEditParam; +import cn.cloudwalk.elevator.passrule.param.AcsPassRuleFloorParam; +import cn.cloudwalk.elevator.passrule.param.AcsPassRuleImageParam; +import cn.cloudwalk.elevator.passrule.param.AcsPassRuleIsDefaultParam; +import cn.cloudwalk.elevator.passrule.param.AcsPassRuleNewParam; +import cn.cloudwalk.elevator.passrule.param.AcsPassRuleQueryParam; +import cn.cloudwalk.elevator.passrule.param.AcsPassTimeCycleParam; +import cn.cloudwalk.elevator.passrule.result.AcsPassRuleDetailResult; +import cn.cloudwalk.elevator.passrule.result.AcsPassRuleFloorResult; +import cn.cloudwalk.elevator.passrule.result.AcsPassRuleResult; +import cn.cloudwalk.elevator.passrule.service.AcsPassRuleService; +import cn.cloudwalk.elevator.person.param.AcsPersonQueryParam; +import cn.cloudwalk.elevator.person.result.AcsPersonResult; +import cn.cloudwalk.elevator.person.service.AcsPersonService; +import cn.cloudwalk.elevator.util.CollectionUtils; +import cn.cloudwalk.elevator.zone.param.ZoneNextTreeParam; +import cn.cloudwalk.elevator.zone.result.ZoneTreeResult; +import cn.cloudwalk.elevator.zone.service.ZoneService; +import com.alibaba.fastjson.JSONObject; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import javax.annotation.Resource; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.ObjectUtils; + +@Service +public class AcsPassRuleServiceImpl extends AbstractAcsPassService implements AcsPassRuleService { + @Resource + private ImageStoreService imageStoreService; + @Resource + private ImageStorePersonService imageStorePersonService; + @Resource + private PersonService personService; + @Resource + private ZoneService zoneService; + @Autowired + private AcsApplicationService acsApplicationService; + @Autowired + private AcsPersonService acsPersonService; + @Resource + private AcsPassRuleDao acsPassRuleDao; + @Resource + private AcsDeviceImageStoreAppBindService acsDeviceImageStoreAppBindService; + @Resource + private AcsElevatorDeviceDao acsElevatorDeviceDao; + + public CloudwalkResult> listFloor(AcsPassRuleFloorParam param, + CloudwalkCallContext context) throws ServiceException { + ZoneNextTreeParam treeParam = new ZoneNextTreeParam(); + treeParam.setParentId(param.getZoneId()); + CloudwalkResult> zoneTree = this.zoneService.tree(treeParam, context); + if (!zoneTree.isSuccess()) { + this.logger.info("远程调用查询区域树状图失败,原因:" + zoneTree.getMessage()); + throw new ServiceException(zoneTree.getCode(), zoneTree.getMessage()); + } + try { + List passRuleResults = new ArrayList<>(); + if (!CollectionUtils.isEmpty((Collection)zoneTree.getData())) { + for (ZoneTreeResult zoneTreeResult : zoneTree.getData()) { + getZoneTypeIsThree(zoneTreeResult, passRuleResults); + } + } else { + return CloudwalkResult.success(passRuleResults); + } + for (AcsPassRuleFloorResult passRuleResult : passRuleResults) { + AcsElevatorDeviceListDto dto = new AcsElevatorDeviceListDto(); + dto.setBusinessId(context.getCompany().getCompanyId()); + dto.setCurrentFloorId(passRuleResult.getId()); + List deviceList = this.acsElevatorDeviceDao.listByZoneId(dto); + passRuleResult.setDeviceNumber(Integer.valueOf(deviceList.size())); + AcsPersonQueryParam personParam = new AcsPersonQueryParam(); + personParam.setZoneId(passRuleResult.getId()); + CloudwalkPageInfo pageInfo = new CloudwalkPageInfo(1, 10); + CloudwalkResult> page = + this.acsPersonService.page(personParam, pageInfo, context); + passRuleResult.setPersonNumber(Long.valueOf(((CloudwalkPageAble)page.getData()).getTotalRows())); + } + return CloudwalkResult.success(passRuleResults); + } catch (DataAccessException e) { + this.logger.error("查询所有楼层信息失败"); + throw new ServiceException("76260520", getMessage("76260520")); + } + } + + public CloudwalkResult getIsDefaultByZoneId(AcsPassRuleIsDefaultParam param, CloudwalkCallContext context) + throws ServiceException { + try { + AcsPassRuleIsDefaultDto dto = new AcsPassRuleIsDefaultDto(); + dto.setZoneId(param.getZoneId()); + dto.setBusinessId(context.getCompany().getCompanyId()); + return CloudwalkResult.success(this.acsPassRuleDao.getIsDefaultByZoneId(dto)); + } catch (DataAccessException e) { + this.logger.error("根据楼层id获取默认图库id失败"); + throw new ServiceException("76260524", getMessage("76260524")); + } + } + + @CloudwalkParamsValidate(argsIndexs = {0, 1}) + @Transactional(propagation = Propagation.REQUIRED, rollbackFor = {Exception.class}) + public CloudwalkResult add(AcsPassRuleNewParam param, CloudwalkCallContext context) + throws ServiceException { + String imageStoreId = addImageStore(param, context); + AcsPassRuleAddDto dto = new AcsPassRuleAddDto(); + dto.setId(genUUID()); + dto.setBusinessId(context.getCompany().getCompanyId()); + dto.setName(param.getRuleName()); + dto.setImageStoreId(imageStoreId); + dto.setZoneId(param.getZoneId()); + dto.setZoneName(param.getZoneName()); + dto.setBeginDate(param.getStartTime()); + dto.setEndDate(param.getEndTime()); + dto.setIsDefault(param.getIsDefault()); + try { + this.acsPassRuleDao.insert(dto); + return CloudwalkResult.success(imageStoreId); + } catch (DataAccessException e) { + this.logger.error("添加通行规则失败"); + throw new ServiceException("76260505", getMessage("76260505")); + } + } + + private String addImageStore(AcsPassRuleNewParam param, CloudwalkCallContext context) throws ServiceException { + ImageStoreAddParam imageStoreAddParam = new ImageStoreAddParam(); + String applicationId = this.acsApplicationService.getApplicationId(context.getCompany().getCompanyId()); + BeanCopyUtils.copyProperties(param, imageStoreAddParam); + imageStoreAddParam.setExpiryBeginDate(param.getStartTime()); + imageStoreAddParam.setExpiryEndDate(param.getEndTime()); + imageStoreAddParam.setName(param.getZoneName() + "-" + param.getRuleName()); + imageStoreAddParam.setType(Short.valueOf((short)1)); + imageStoreAddParam.setSourceApplicationId(applicationId); + imageStoreAddParam.setBusinessId(context.getCompany().getCompanyId()); + CloudwalkResult imageStoreId = this.imageStoreService.add(imageStoreAddParam, context); + if (!imageStoreId.isSuccess()) { + this.logger.info("远程调用新增图库失败,原因:" + imageStoreId.getMessage()); + throw new ServiceException(imageStoreId.getCode(), imageStoreId.getMessage()); + } + AcsElevatorDeviceListDto dto = new AcsElevatorDeviceListDto(); + dto.setBusinessId(context.getCompany().getCompanyId()); + dto.setCurrentFloorId(param.getZoneId()); + List deviceList = null; + try { + deviceList = this.acsElevatorDeviceDao.listByZoneId(dto); + } catch (DataAccessException e) { + this.logger.error("根据楼层id获取设备信息失败,原因是:{}", e.getMessage()); + } + DeviceImageStoreAppBindParam appBindParam = new DeviceImageStoreAppBindParam(); + appBindParam.setImageStoreId((String)imageStoreId.getData()); + appBindParam.setApplicationId(applicationId); + this.acsDeviceImageStoreAppBindService.bindAppImageStoreDevice(appBindParam, context); + if (!CollectionUtils.isEmpty(deviceList)) { + for (AcsElevatorDeviceResultDTO device : deviceList) { + try { + DeviceImageStoreAppBindParam bindParam = new DeviceImageStoreAppBindParam(); + bindParam.setImageStoreId((String)imageStoreId.getData()); + bindParam.setDeviceId(device.getDeviceId()); + bindParam.setApplicationId(applicationId); + this.acsDeviceImageStoreAppBindService.bindDeviceAndImageStore(bindParam, context); + } catch (ServiceException e) { + this.logger.error("图库关联失败,图库id={},原因:{}", imageStoreId.getData(), e.getMessage()); + ImageStoreDelParam delParam = new ImageStoreDelParam(); + delParam.setId((String)imageStoreId.getData()); + delParam.setBusinessId(context.getCompany().getCompanyId()); + this.logger.info("回滚删除图库开始,delParam={},context={}", JSONObject.toJSON(delParam), + JSONObject.toJSON(context)); + CloudwalkResult deleteResult = this.imageStoreService.delete(delParam, context); + this.logger.info("删除图库:图库id={},结果:{}", imageStoreId, deleteResult.getMessage()); + throw new ServiceException(e.getCode(), e.getMessage()); + } + } + } + return (String)imageStoreId.getData(); + } + + @CloudwalkParamsValidate(argsIndexs = {0, 1}) + @Transactional(propagation = Propagation.REQUIRED, rollbackFor = {Exception.class}) + public CloudwalkResult update(AcsPassRuleEditParam param, CloudwalkCallContext context) + throws ServiceException { + checkDefaultRule(Collections.singletonList(param.getId()), context); + AcsPassRuleEditDto dto = new AcsPassRuleEditDto(); + BeanCopyUtils.copyProperties(param, context, dto); + dto.setValidDateCron(null); + dto.setValidDateJson(null); + dto.setBeginDate(param.getStartTime()); + dto.setEndDate(param.getEndTime()); + dto.setBusinessId(context.getCompany().getCompanyId()); + dto.setName(param.getRuleName()); + try { + this.acsPassRuleDao.update(dto); + List ruleList = getRuleByIds(Collections.singletonList(dto.getId()), context); + updateImageStore(param, ruleList.get(0), context); + return CloudwalkResult.success(Boolean.valueOf(true)); + } catch (DataAccessException e) { + this.logger.error("编辑通行规则编辑失败"); + throw new ServiceException("76260506", getMessage("76260506")); + } + } + + private List checkDefaultRule(List ruleIds, CloudwalkCallContext context) + throws ServiceException { + List resultDtoList = getRuleByIds(ruleIds, context); + for (AcsPassRuleResultDto resultDto : resultDtoList) { + if (!ObjectUtils.isEmpty(resultDto.getIsDefault()) && resultDto.getIsDefault().intValue() == 1) { + throw new ServiceException("门禁默认规则不可编辑和删除"); + } + } + return resultDtoList; + } + + private void updateImageStore(AcsPassRuleEditParam param, AcsPassRuleResultDto ruleResultDto, + CloudwalkCallContext context) throws ServiceException { + ImageStoreDetailResult imageStoreDetail = getImageStoreDetail(ruleResultDto.getImageStoreId(), context); + ImageStoreEditParam imageStoreEditParam = getEditParamByImageStore(imageStoreDetail); + BeanCopyUtils.copyProperties(ruleResultDto, imageStoreEditParam); + BeanCopyUtils.copyProperties(param, imageStoreEditParam); + imageStoreEditParam.setName(param.getZoneName() + "-" + param.getRuleName()); + imageStoreEditParam.setExpiryBeginDate(param.getStartTime()); + imageStoreEditParam.setExpiryEndDate(param.getEndTime()); + imageStoreEditParam.setValidDateCron(null); + imageStoreEditParam.setBusinessId(context.getCompany().getCompanyId()); + CloudwalkResult result = this.imageStoreService.edit(imageStoreEditParam, context); + if (!result.isSuccess()) { + this.logger.info("远程调用编辑图库失败:原因:" + result.getMessage()); + throw new ServiceException(result.getCode(), result.getMessage()); + } + } + + private List getRuleByIds(List ruleIds, CloudwalkCallContext context) + throws ServiceException { + AcsPassRuleQueryDto dto = new AcsPassRuleQueryDto(); + dto.setIds(ruleIds); + dto.setBusinessId(context.getCompany().getCompanyId()); + try { + return this.acsPassRuleDao.list(dto); + } catch (DataAccessException e) { + this.logger.error("通行规则查询失败"); + throw new ServiceException("通行规则查询失败"); + } + } + + @CloudwalkParamsValidate(argsIndexs = {0, 1}) + @Transactional(propagation = Propagation.REQUIRED, rollbackFor = {Exception.class}) + public CloudwalkResult delete(AcsPassRuleDeleteParam param, CloudwalkCallContext context) + throws ServiceException { + List resultDtos = checkDefaultRule(param.getIds(), context); + String applicationId = this.acsApplicationService.getApplicationId(context.getCompany().getCompanyId()); + AcsElevatorDeviceListDto deviceListDto = new AcsElevatorDeviceListDto(); + deviceListDto.setBusinessId(context.getCompany().getCompanyId()); + deviceListDto.setCurrentFloorId(param.getZoneId()); + List deviceList = null; + try { + deviceList = this.acsElevatorDeviceDao.listByZoneId(deviceListDto); + } catch (DataAccessException e) { + this.logger.error("根据楼层id获取设备信息失败,原因是:{}", e.getMessage()); + } + for (AcsPassRuleResultDto acsPassRuleResultDto : resultDtos) { + if (!CollectionUtils.isEmpty(deviceList)) { + for (AcsElevatorDeviceResultDTO device : deviceList) { + DeviceImageStoreAppUnbindParam deviceImageStoreAppUnbindParam = + new DeviceImageStoreAppUnbindParam(); + deviceImageStoreAppUnbindParam.setApplicationId(applicationId); + deviceImageStoreAppUnbindParam.setDeviceId(device.getDeviceId()); + deviceImageStoreAppUnbindParam.setDeviceCode(device.getDeviceCode()); + deviceImageStoreAppUnbindParam.setImageStoreId(acsPassRuleResultDto.getImageStoreId()); + this.acsDeviceImageStoreAppBindService.unbindAppImageStoreDevice(deviceImageStoreAppUnbindParam, + context); + } + continue; + } + DeviceImageStoreAppUnbindParam unbindParam = new DeviceImageStoreAppUnbindParam(); + unbindParam.setApplicationId(applicationId); + unbindParam.setImageStoreId(acsPassRuleResultDto.getImageStoreId()); + this.acsDeviceImageStoreAppBindService.deleteImageStore(unbindParam, context); + } + AcsPassRuleDeleteDto dto = new AcsPassRuleDeleteDto(); + dto.setBusinessId(context.getCompany().getCompanyId()); + dto.setIds(param.getIds()); + try { + this.acsPassRuleDao.delete(dto); + return CloudwalkResult.success(Boolean.valueOf(true)); + } catch (DataAccessException e) { + this.logger.error("通行规则删除失败"); + throw new ServiceException("76260507", getMessage("76260507")); + } + } + + @CloudwalkParamsValidate(argsIndexs = {0, 1}) + public CloudwalkResult detail(AcsPassRuleQueryParam param, CloudwalkCallContext context) + throws ServiceException { + try { + AcsPassRuleQueryDto dto = new AcsPassRuleQueryDto(); + BeanCopyUtils.copyProperties(param, dto); + dto.setBusinessId(context.getCompany().getCompanyId()); + List passRuleResult = this.acsPassRuleDao.list(dto); + if (CollectionUtils.isEmpty(passRuleResult)) { + return CloudwalkResult.fail("76260517", getMessage("76260517")); + } + AcsPassRuleDetailResult result = coverRuleDetailResult(passRuleResult.get(0), context); + return CloudwalkResult.success(result); + } catch (DataAccessException e) { + this.logger.error("查询通行规则详情失败"); + throw new ServiceException("76260508", getMessage("76260508")); + } + } + + private List coverRulePageResult(List passRuleResultDtos, + CloudwalkCallContext context, boolean needDetail) throws ServiceException { + List results = new ArrayList<>(); + Map imageStoreResultMap = null; + if (needDetail) { + List imageStoreIds = (List)passRuleResultDtos.stream() + .map(AcsPassRuleResultDto::getImageStoreId).collect(Collectors.toList()); + List imageStoreListResult = getImageStorePageResult(imageStoreIds, context); + imageStoreResultMap = (Map)imageStoreListResult.stream() + .collect(Collectors.toMap(ImageStoreListResult::getId, imageStoreListResult -> imageStoreListResult)); + } + for (AcsPassRuleResultDto dto : passRuleResultDtos) { + AcsPassRuleResult result = new AcsPassRuleResult(); + BeanCopyUtils.copyProperties(dto, result); + result.setRuleName(dto.getName()); + result.setPassType(AcsPassTypeEnum.LONG_TIME.getCode()); + if (dto.getBeginDate() != null || dto.getEndDate() != null) { + result.setPassType(AcsPassTypeEnum.AUTO_PASS.getCode()); + } + if (needDetail && imageStoreResultMap.containsKey(dto.getImageStoreId())) { + ImageStoreListResult imageStoreListResult = imageStoreResultMap.get(dto.getImageStoreId()); + result.setPersonSum(imageStoreListResult.getPersonNum().intValue()); + result.setIncludeOrganizations(imageStoreListResult.getIncludeOrganizations()); + result.setIncludeLabels(imageStoreListResult.getIncludeLabels()); + result.setExcludeLabels(imageStoreListResult.getExcludeLabels()); + } + results.add(result); + } + return results; + } + + private List getImageStorePageResult(List imageStoreIds, CloudwalkCallContext context) + throws ServiceException { + ImageStoreQueryParam param = new ImageStoreQueryParam(); + param.setIds(imageStoreIds); + param.setBusinessId(context.getCompany().getCompanyId()); + CloudwalkResult> imageStoreResult = this.imageStoreService.list(param, context); + if (!imageStoreResult.isSuccess()) { + this.logger.info("远程调用分页查询图库失败,原因:" + imageStoreResult.getMessage()); + throw new ServiceException(imageStoreResult.getCode(), imageStoreResult.getMessage()); + } + return (List)imageStoreResult.getData(); + } + + private AcsPassRuleDetailResult coverRuleDetailResult(AcsPassRuleResultDto dto, CloudwalkCallContext context) + throws ServiceException { + AcsPassRuleDetailResult result = new AcsPassRuleDetailResult(); + BeanCopyUtils.copyProperties(dto, result); + result.setRuleName(dto.getName()); + ImageStoreDetailResult imageStoreDetailResult = getImageStoreDetail(dto.getImageStoreId(), context); + result.setIncludeOrganizations(imageStoreDetailResult.getIncludeOrganizations()); + result.setIncludeLabels(imageStoreDetailResult.getIncludeLabels()); + result.setExcludeLabels(imageStoreDetailResult.getExcludeLabels()); + List timeCycleParams = + JSONObject.parseArray(dto.getValidDateJson(), AcsPassTimeCycleParam.class); + result.setPassableCycle(timeCycleParams); + result.setPassType(AcsPassTypeEnum.LONG_TIME.getCode()); + if (dto.getBeginDate() != null || dto.getEndDate() != null) { + result.setPassType(AcsPassTypeEnum.AUTO_PASS.getCode()); + } + return result; + } + + @CloudwalkParamsValidate(argsIndexs = {0, 1}) + public CloudwalkResult> page(AcsPassRuleQueryParam param, + CloudwalkPageInfo page, CloudwalkCallContext context) throws ServiceException { + try { + AcsPassRuleQueryDto dto = new AcsPassRuleQueryDto(); + dto.setZoneId(param.getZoneId()); + dto.setBusinessId(context.getCompany().getCompanyId()); + CloudwalkPageAble passRuleResult = this.acsPassRuleDao.page(dto, page); + if (CollectionUtils.isEmpty(passRuleResult.getDatas()) && ObjectUtils.isEmpty(param.getIsDefault())) { + AcsPassRuleNewParam ruleNewParam = new AcsPassRuleNewParam(); + ruleNewParam.setZoneId(param.getZoneId()); + ruleNewParam.setZoneName(param.getZoneName()); + ruleNewParam.setRuleName("默认规则"); + ruleNewParam.setIsDefault(Integer.valueOf(1)); + add(ruleNewParam, context); + passRuleResult = this.acsPassRuleDao.page(dto, page); + } + List results = + coverRulePageResult((List)passRuleResult.getDatas(), context, true); + return CloudwalkResult.success(new CloudwalkPageAble(results, page, passRuleResult.getTotalRows())); + } catch (DataAccessException e) { + this.logger.error("分页查询通行规则失败"); + throw new ServiceException("76260508", getMessage("76260508")); + } + } + + public CloudwalkResult> list(AcsPassRuleQueryParam param, CloudwalkCallContext context) + throws ServiceException { + try { + AcsPassRuleQueryDto dto = new AcsPassRuleQueryDto(); + BeanCopyUtils.copyProperties(param, dto); + dto.setBusinessId(context.getCompany().getCompanyId()); + List passRuleResult = this.acsPassRuleDao.list(dto); + return CloudwalkResult.success(coverRulePageResult(passRuleResult, context, false)); + } catch (DataAccessException e) { + this.logger.error("查询通行规则失败"); + throw new ServiceException("76260508", getMessage("76260508")); + } + } + + public CloudwalkResult> listByImageId(AcsPassRuleImageParam param, + CloudwalkCallContext context) throws ServiceException { + try { + AcsPassRuleImageDto dto = new AcsPassRuleImageDto(); + BeanCopyUtils.copyProperties(param, dto); + List resultDtos = this.acsPassRuleDao.listByImageId(dto); + return CloudwalkResult.success(resultDtos); + } catch (DataAccessException e) { + this.logger.error("根据图库id集合查询对应楼层信息失败"); + throw new ServiceException("76260526", getMessage("76260526")); + } + } + + private void getZoneTypeIsThree(ZoneTreeResult zoneTreeResult, List passRuleResults) { + if ("FLOOR".equals(zoneTreeResult.getType())) { + AcsPassRuleFloorResult result = new AcsPassRuleFloorResult(); + result.setId(zoneTreeResult.getId()); + result.setName(zoneTreeResult.getName()); + result.setUnitNumber(zoneTreeResult.getUnitCount()); + passRuleResults.add(result); + } else if (!CollectionUtils.isEmpty(zoneTreeResult.getChildren())) { + for (ZoneTreeResult treeResult : zoneTreeResult.getChildren()) + getZoneTypeIsThree(treeResult, passRuleResults); + } + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/impl/ImageRuleRefServiceImpl.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/impl/ImageRuleRefServiceImpl.java new file mode 100644 index 00000000..6049e251 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/impl/ImageRuleRefServiceImpl.java @@ -0,0 +1,779 @@ +package cn.cloudwalk.elevator.passrule.impl; + +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStoreEditParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStorePersonData; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStorePersonQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStoreQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.UpdateGroupPersonRefParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.ImageStoreDetailResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.ImageStorePersonResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.ImgStorePersonResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.service.ImageStorePersonService; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.service.ImageStoreService; +import cn.cloudwalk.client.cwoscomponent.intelligent.label.param.LabelDetailParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.label.result.LabelDetailResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.label.result.LabelResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.label.service.LabelService; +import cn.cloudwalk.client.cwoscomponent.intelligent.organization.param.OrganizationListParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.organization.result.OrganizationResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.organization.service.OrganizationService; +import cn.cloudwalk.cloud.annotation.CloudwalkParamsValidate; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.DataAccessException; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.page.CloudwalkPageInfo; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.cloud.utils.BeanCopyUtils; +import cn.cloudwalk.elevator.device.dao.AcsElevatorDeviceDao; +import cn.cloudwalk.elevator.device.dao.DeviceImageStoreDao; +import cn.cloudwalk.elevator.device.dto.AcsElevatorDeviceListByBuildingIdDto; +import cn.cloudwalk.elevator.device.dto.AcsElevatorDeviceListDto; +import cn.cloudwalk.elevator.device.dto.AcsElevatorDeviceResultDTO; +import cn.cloudwalk.elevator.em.AcsPassTypeEnum; +import cn.cloudwalk.elevator.passrule.dao.ImageRuleRefDao; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleImageDto; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleImageResultDto; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRulePersonListDto; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRulePersonListResultDto; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleQueryDto; +import cn.cloudwalk.elevator.passrule.dto.ImageRuleRefAddDto; +import cn.cloudwalk.elevator.passrule.dto.ImageRuleRefListResult; +import cn.cloudwalk.elevator.passrule.dto.ImageRuleRefResultDto; +import cn.cloudwalk.elevator.passrule.param.AcsPassRuleDeleteParam; +import cn.cloudwalk.elevator.passrule.param.AcsPassRuleEditParam; +import cn.cloudwalk.elevator.passrule.param.AcsPassRuleFloorParam; +import cn.cloudwalk.elevator.passrule.param.AcsPassRuleImageParam; +import cn.cloudwalk.elevator.passrule.param.AcsPassRuleNewParam; +import cn.cloudwalk.elevator.passrule.param.AcsPassRulePersonListParam; +import cn.cloudwalk.elevator.passrule.param.AcsPassRuleQueryParam; +import cn.cloudwalk.elevator.passrule.result.AcsPassRuleFloorResult; +import cn.cloudwalk.elevator.passrule.result.ImageRuleRefDetailResult; +import cn.cloudwalk.elevator.passrule.result.ImageRuleRefPageResult; +import cn.cloudwalk.elevator.passrule.service.ImageRuleRefService; +import cn.cloudwalk.elevator.person.param.AcsPersonQueryParam; +import cn.cloudwalk.elevator.person.result.AcsPersonResult; +import cn.cloudwalk.elevator.person.service.PersonRuleService; +import cn.cloudwalk.elevator.util.CollectionUtils; +import cn.cloudwalk.elevator.zone.param.ZoneQueryParam; +import cn.cloudwalk.elevator.zone.result.ZoneResult; +import cn.cloudwalk.elevator.zone.service.ZoneService; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.annotation.Resource; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.ObjectUtils; + +@Service +public class ImageRuleRefServiceImpl extends AbstractAcsPassService implements ImageRuleRefService { + @Autowired + private ImageStorePersonService imageStorePersonService; + @Autowired + private OrganizationService organizationService; + @Autowired + private LabelService labelService; + @Resource + private ImageRuleRefDao imageRuleRefDao; + @Resource + private DeviceImageStoreDao deviceImageStoreDao; + @Resource + private ImageStoreService imageStoreService; + @Resource + private ZoneService zoneService; + @Resource + private AcsElevatorDeviceDao acsElevatorDeviceDao; + @Resource + private PersonRuleService personRuleService; + + public CloudwalkResult> page(AcsPassRuleQueryParam param, + CloudwalkPageInfo page, CloudwalkCallContext context) throws ServiceException { + try { + AcsPassRuleQueryDto dto = new AcsPassRuleQueryDto(); + dto.setZoneId(param.getZoneId()); + dto.setBusinessId(context.getCompany().getCompanyId()); + CloudwalkPageAble passRuleResult = this.imageRuleRefDao.page(dto, page); + if (CollectionUtils.isEmpty(passRuleResult.getDatas()) && ObjectUtils.isEmpty(param.getIsDefault())) { + AcsPassRuleNewParam ruleNewParam = new AcsPassRuleNewParam(); + ruleNewParam.setZoneId(param.getZoneId()); + ruleNewParam.setZoneName(param.getZoneName()); + ruleNewParam.setRuleName("默认规则"); + ruleNewParam.setIsDefault(Integer.valueOf(1)); + ruleNewParam.setParentId(param.getParentId()); + addOnlyRule(ruleNewParam, context); + passRuleResult = this.imageRuleRefDao.page(dto, page); + } + List results = coverRulePageResult( + (List)passRuleResult.getDatas(), param.getParentId(), context); + return CloudwalkResult.success(new CloudwalkPageAble(results, page, passRuleResult.getTotalRows())); + } catch (Exception e) { + this.logger.error("分页查询通行规则失败", e); + throw new ServiceException("76260508", getMessage("76260508")); + } + } + + public CloudwalkResult> listFloor(AcsPassRuleFloorParam param, + CloudwalkCallContext context) throws ServiceException { + ZoneQueryParam queryParam = new ZoneQueryParam(); + queryParam.setParentId(param.getZoneId()); + queryParam.setRowsOfPage(param.getRowsOfPage()); + queryParam.setCurrentPage(param.getCurrentPage()); + CloudwalkResult> zonePageData = this.zoneService.page(queryParam, context); + if (!zonePageData.isSuccess()) { + this.logger.info("远程调用分页查询区域失败,原因:" + zonePageData.getMessage()); + throw new ServiceException(zonePageData.getCode(), zonePageData.getMessage()); + } + try { + CloudwalkPageInfo page = new CloudwalkPageInfo(param.getCurrentPage(), param.getRowsOfPage()); + CloudwalkPageAble ruleFloorResult = null; + if (!ObjectUtils.isEmpty(zonePageData.getData()) + && !CollectionUtils.isEmpty(((CloudwalkPageAble)zonePageData.getData()).getDatas())) { + List resultList = BeanCopyUtils + .copy(((CloudwalkPageAble)zonePageData.getData()).getDatas(), AcsPassRuleFloorResult.class); + String imageStoreId = this.deviceImageStoreDao.getByBuildingId(param.getZoneId()); + for (AcsPassRuleFloorResult floorResult : resultList) { + AcsElevatorDeviceListDto dto = new AcsElevatorDeviceListDto(); + dto.setBusinessId(context.getCompany().getCompanyId()); + dto.setCurrentFloorId(floorResult.getId()); + List deviceList = this.acsElevatorDeviceDao.listByZoneId(dto); + floorResult.setDeviceNumber(Integer.valueOf(deviceList.size())); + Long number = Long.valueOf(0L); + floorResult.setPersonNumber(number); + if (!ObjectUtils.isEmpty(imageStoreId)) { + AcsPersonQueryParam personQueryParam = new AcsPersonQueryParam(); + personQueryParam.setImageStoreId(imageStoreId); + personQueryParam.setZoneId(floorResult.getId()); + personQueryParam.setParentId(param.getZoneId()); + CloudwalkPageInfo pageInfo = new CloudwalkPageInfo(1, 10); + CloudwalkResult> result = + this.personRuleService.page(personQueryParam, pageInfo, context); + floorResult.setPersonNumber(Long.valueOf(((CloudwalkPageAble)result.getData()).getTotalRows())); + } + } + ruleFloorResult = + new CloudwalkPageAble(resultList, page, ((CloudwalkPageAble)zonePageData.getData()).getTotalRows()); + } + return CloudwalkResult.success(ruleFloorResult); + } catch (DataAccessException e) { + this.logger.error("查询所有楼层信息失败", (Throwable)e); + throw new ServiceException("76260520", getMessage("76260520")); + } + } + + public CloudwalkResult> listByPersonInfo(AcsPassRuleImageParam param, + CloudwalkCallContext context) throws ServiceException { + try { + AcsPassRuleImageDto dto = new AcsPassRuleImageDto(); + BeanCopyUtils.copyProperties(param, dto); + List resultDtos = this.imageRuleRefDao.listByPersonInfo(dto); + return CloudwalkResult.success(resultDtos); + } catch (DataAccessException e) { + this.logger.error("根据人员id、标签集合、机构集合获取楼层权限失败", (Throwable)e); + throw new ServiceException("76260526", getMessage("76260526")); + } + } + + public CloudwalkResult> listByPersonList(AcsPassRulePersonListParam param, + CloudwalkCallContext context) throws ServiceException { + try { + AcsPassRulePersonListDto dto = new AcsPassRulePersonListDto(); + List personIds = new ArrayList<>(); + List labelIds = new ArrayList<>(); + List orgIds = new ArrayList<>(); + for (AcsPassRuleImageParam imageParam : param.getPersonList()) { + personIds.add(imageParam.getPersonId()); + if (!CollectionUtils.isEmpty(imageParam.getIncludeLabels())) { + labelIds.addAll(imageParam.getIncludeLabels()); + } + if (!CollectionUtils.isEmpty(imageParam.getIncludeOrganizations())) { + orgIds.addAll(imageParam.getIncludeOrganizations()); + } + } + dto.setPersonIds(personIds); + dto.setIncludeLabels(labelIds); + dto.setIncludeOrganizations(orgIds); + List resultDtos = this.imageRuleRefDao.listByPersonList(dto); + Map> personIdMap = new HashMap<>(); + Map> labelIdMap = new HashMap<>(); + Map> orgIdMap = new HashMap<>(); + for (ImageRuleRefResultDto resultDto : resultDtos) { + if (!ObjectUtils.isEmpty(resultDto.getPersonId())) { + List personList = personIdMap.get(resultDto.getPersonId()); + if (!CollectionUtils.isEmpty(personList)) { + personList.add(resultDto); + continue; + } + List personListDto = new ArrayList<>(); + personListDto.add(resultDto); + personIdMap.put(resultDto.getPersonId(), personListDto); + continue; + } + if (!ObjectUtils.isEmpty(resultDto.getIncludeLabels())) { + List labelList = labelIdMap.get(resultDto.getIncludeLabels()); + if (!CollectionUtils.isEmpty(labelList)) { + labelList.add(resultDto); + continue; + } + List labelListDto = new ArrayList<>(); + labelListDto.add(resultDto); + labelIdMap.put(resultDto.getIncludeLabels(), labelListDto); + continue; + } + if (!ObjectUtils.isEmpty(resultDto.getIncludeOrganizations())) { + List orgList = orgIdMap.get(resultDto.getIncludeOrganizations()); + if (!CollectionUtils.isEmpty(orgList)) { + orgList.add(resultDto); + continue; + } + List orgListDto = new ArrayList<>(); + orgListDto.add(resultDto); + orgIdMap.put(resultDto.getIncludeOrganizations(), orgListDto); + } + } + List returnList = new ArrayList<>(); + for (AcsPassRuleImageParam imageParam : param.getPersonList()) { + List zoneIdList = this.imageRuleRefDao.listPersonDelByPersonId(imageParam.getPersonId()); + AcsPassRulePersonListResultDto listResultDto = new AcsPassRulePersonListResultDto(); + listResultDto.setPersonId(imageParam.getPersonId()); + List zoneList = new ArrayList<>(); + List listZoneIds = new ArrayList<>(); + List personMapDto = personIdMap.get(imageParam.getPersonId()); + if (!CollectionUtils.isEmpty(personMapDto)) { + for (ImageRuleRefResultDto resultDto : personMapDto) { + if (!zoneIdList.contains(resultDto.getZoneId())) { + listZoneIds.add(resultDto.getZoneId()); + AcsPassRuleImageResultDto result = new AcsPassRuleImageResultDto(); + result.setZoneId(resultDto.getZoneId()); + result.setZoneName(resultDto.getZoneName()); + zoneList.add(result); + } + } + } + if (!CollectionUtils.isEmpty(imageParam.getIncludeLabels())) { + for (String labelId : imageParam.getIncludeLabels()) { + List labelMapDto = labelIdMap.get(labelId); + if (!CollectionUtils.isEmpty(labelMapDto)) { + for (ImageRuleRefResultDto resultDto : labelMapDto) { + if (!zoneIdList.contains(resultDto.getZoneId()) + && !listZoneIds.contains(resultDto.getZoneId())) { + listZoneIds.add(resultDto.getZoneId()); + AcsPassRuleImageResultDto result = new AcsPassRuleImageResultDto(); + result.setZoneId(resultDto.getZoneId()); + result.setZoneName(resultDto.getZoneName()); + zoneList.add(result); + } + } + } + } + } + if (!CollectionUtils.isEmpty(imageParam.getIncludeOrganizations())) { + for (String orgId : imageParam.getIncludeOrganizations()) { + List orgMapDto = orgIdMap.get(orgId); + if (!CollectionUtils.isEmpty(orgMapDto)) { + for (ImageRuleRefResultDto resultDto : orgMapDto) { + if (!zoneIdList.contains(resultDto.getZoneId()) + && !listZoneIds.contains(resultDto.getZoneId())) { + listZoneIds.add(resultDto.getZoneId()); + AcsPassRuleImageResultDto result = new AcsPassRuleImageResultDto(); + result.setZoneId(resultDto.getZoneId()); + result.setZoneName(resultDto.getZoneName()); + zoneList.add(result); + } + } + } + } + } + listResultDto.setZoneList(zoneList); + returnList.add(listResultDto); + } + return CloudwalkResult.success(returnList); + } catch (DataAccessException e) { + this.logger.error("根据人员id、标签集合、机构集合批量获取楼层权限失败", (Throwable)e); + throw new ServiceException("76260526", getMessage("76260526")); + } + } + + public CloudwalkResult detail(AcsPassRuleQueryParam param, CloudwalkCallContext context) + throws ServiceException { + try { + ImageRuleRefResultDto byId = this.imageRuleRefDao.getById(param.getId()); + List includeLabels = new ArrayList<>(); + List includeOrganizations = new ArrayList<>(); + List child = + this.imageRuleRefDao.listByParentRule(Collections.singletonList(param.getId())); + if (!CollectionUtils.isEmpty(child)) { + for (ImageRuleRefResultDto resultDto : child) { + if (!ObjectUtils.isEmpty(resultDto.getIncludeLabels())) { + includeLabels.add(resultDto.getIncludeLabels()); + continue; + } + if (!ObjectUtils.isEmpty(resultDto.getIncludeOrganizations())) { + includeOrganizations.add(resultDto.getIncludeOrganizations()); + } + } + } + ImageRuleRefDetailResult result = + (ImageRuleRefDetailResult)BeanCopyUtils.copyProperties(byId, ImageRuleRefDetailResult.class); + result.setRuleName(byId.getName()); + if (!CollectionUtils.isEmpty(includeLabels)) { + List labelDetailResultList = new ArrayList<>(); + for (String label : includeLabels) { + LabelDetailParam labelDetailParam = new LabelDetailParam(); + labelDetailParam.setId(label); + CloudwalkResult detail = this.labelService.detail(labelDetailParam, context); + labelDetailResultList.add(detail.getData()); + } + result.setIncludeLabels(labelDetailResultList); + } + if (!CollectionUtils.isEmpty(includeOrganizations)) { + OrganizationListParam orgParam = new OrganizationListParam(); + orgParam.setIds(includeOrganizations); + CloudwalkResult> orglist = this.organizationService.list(orgParam, context); + result.setIncludeOrganizations((List)orglist.getData()); + } + return CloudwalkResult.success(result); + } catch (DataAccessException e) { + this.logger.error("查询通行规则详情失败", (Throwable)e); + throw new ServiceException("76260508", getMessage("76260508")); + } + } + + @CloudwalkParamsValidate(argsIndexs = {0, 1}) + @Transactional(propagation = Propagation.REQUIRED, rollbackFor = {Exception.class}) + public CloudwalkResult addOnlyRule(AcsPassRuleNewParam param, CloudwalkCallContext context) + throws ServiceException { + try { + AcsElevatorDeviceListByBuildingIdDto buildingIdDto = new AcsElevatorDeviceListByBuildingIdDto(); + buildingIdDto.setCurrentBuildingId(param.getParentId()); + buildingIdDto.setBusinessId(context.getCompany().getCompanyId()); + List deviceList = this.acsElevatorDeviceDao.listBuBuildingId(buildingIdDto); + if (CollectionUtils.isEmpty(deviceList)) { + return CloudwalkResult.fail("76260527", getMessage("76260527")); + } + String imageStoreId = this.deviceImageStoreDao.getByBuildingId(param.getParentId()); + ImageRuleRefAddDto addDto = createAddDto(param, context); + this.imageRuleRefDao.insert(addDto); + if (!ObjectUtils.isEmpty(param.getIsDefault()) && param.getIsDefault().intValue() == 1) { + return CloudwalkResult.success(Boolean.valueOf(true)); + } + ImageStoreQueryParam queryParam = new ImageStoreQueryParam(); + queryParam.setId(imageStoreId); + queryParam.setBusinessId(context.getCompany().getCompanyId()); + CloudwalkResult imageDetail = this.imageStoreService.detail(queryParam, context); + ImageStoreEditParam editParam = + (ImageStoreEditParam)BeanCopyUtils.copyProperties(imageDetail.getData(), ImageStoreEditParam.class); + editParam.setImageStoreId(((ImageStoreDetailResult)imageDetail.getData()).getId()); + if (!CollectionUtils.isEmpty(((ImageStoreDetailResult)imageDetail.getData()).getIncludePersons())) { + List includePersons = new ArrayList<>(); + for (ImgStorePersonResult personResult : ((ImageStoreDetailResult)imageDetail.getData()) + .getIncludePersons()) { + ImageStorePersonData data = new ImageStorePersonData(); + data.setObjectId(personResult.getId()); + includePersons.add(data); + } + editParam.setIncludePersons(includePersons); + } + List oldIncludeLabels = new ArrayList<>(); + List oldIncludeOrganizations = new ArrayList<>(); + List includeLabels = new ArrayList<>(); + List includeOrganizations = new ArrayList<>(); + if (!CollectionUtils.isEmpty(((ImageStoreDetailResult)imageDetail.getData()).getIncludeLabels())) { + for (LabelResult labelResult : ((ImageStoreDetailResult)imageDetail.getData()).getIncludeLabels()) { + oldIncludeLabels.add(labelResult.getId()); + } + } + if (!CollectionUtils.isEmpty(((ImageStoreDetailResult)imageDetail.getData()).getIncludeOrganizations())) { + for (OrganizationResult organizationResult : ((ImageStoreDetailResult)imageDetail.getData()) + .getIncludeOrganizations()) { + oldIncludeOrganizations.add(organizationResult.getId()); + } + } + if (!CollectionUtils.isEmpty(param.getIncludeLabels())) { + for (String label : param.getIncludeLabels()) { + ImageRuleRefAddDto dto = createAddDto(param, context); + dto.setParentRule(addDto.getId()); + dto.setIncludeLabels(label); + this.imageRuleRefDao.insert(dto); + if (!oldIncludeLabels.contains(label)) { + includeLabels.add(label); + } + } + } + if (!CollectionUtils.isEmpty(param.getIncludeOrganizations())) { + for (String org : param.getIncludeOrganizations()) { + ImageRuleRefAddDto dto = createAddDto(param, context); + dto.setParentRule(addDto.getId()); + dto.setIncludeOrganizations(org); + this.imageRuleRefDao.insert(dto); + if (!oldIncludeOrganizations.contains(org)) { + includeOrganizations.add(org); + } + } + } + if (!CollectionUtils.isEmpty(includeLabels) || !CollectionUtils.isEmpty(includeOrganizations)) { + includeLabels.addAll(oldIncludeLabels); + includeOrganizations.addAll(oldIncludeOrganizations); + editParam.setIncludeLabels(includeLabels); + editParam.setIncludeOrganizations(includeOrganizations); + editParam.setBusinessId(context.getCompany().getCompanyId()); + if (!CollectionUtils.isEmpty(((ImageStoreDetailResult)imageDetail.getData()).getExcludePersons())) { + List excPersonIds = new ArrayList<>(); + for (ImgStorePersonResult personResult : ((ImageStoreDetailResult)imageDetail.getData()) + .getExcludePersons()) { + excPersonIds.add(personResult.getId()); + } + editParam.setExcludePersons(excPersonIds); + } + CloudwalkResult edit = this.imageStoreService.edit(editParam, context); + if (ObjectUtils.isEmpty(edit.getData()) || !((Boolean)edit.getData()).booleanValue()) { + throw new ServiceException(edit.getCode(), edit.getMessage()); + } + } + UpdateGroupPersonRefParam refParam = new UpdateGroupPersonRefParam(); + refParam.setImageStoreId(imageStoreId); + refParam.setBusinessId(context.getCompany().getCompanyId()); + refParam.setLabelIds(param.getIncludeLabels()); + refParam.setOrganizationIds(param.getIncludeOrganizations()); + this.imageStorePersonService.updateGroupPersonRef(refParam, context); + return CloudwalkResult.success(Boolean.valueOf(true)); + } catch (DataAccessException e) { + this.logger.error("添加通行规则失败", (Throwable)e); + throw new ServiceException("76260505", getMessage("76260505")); + } + } + + public CloudwalkResult update(AcsPassRuleEditParam param, CloudwalkCallContext context) + throws ServiceException { + checkDefaultRule(param.getId()); + String imageStoreId = this.deviceImageStoreDao.getByBuildingId(param.getParentId()); + ImageStoreQueryParam queryParam = new ImageStoreQueryParam(); + queryParam.setId(imageStoreId); + queryParam.setBusinessId(context.getCompany().getCompanyId()); + CloudwalkResult imageDetail = this.imageStoreService.detail(queryParam, context); + ImageStoreEditParam editParam = + (ImageStoreEditParam)BeanCopyUtils.copyProperties(imageDetail.getData(), ImageStoreEditParam.class); + editParam.setImageStoreId(imageStoreId); + List oldIncludeLabels = new ArrayList<>(); + List oldIncludeOrganizations = new ArrayList<>(); + List includeLabels = new ArrayList<>(); + List includeOrganizations = new ArrayList<>(); + List includeLabels2 = new ArrayList<>(); + List includeOrganizations2 = new ArrayList<>(); + if (!CollectionUtils.isEmpty(((ImageStoreDetailResult)imageDetail.getData()).getIncludeLabels())) { + for (LabelResult labelResult : ((ImageStoreDetailResult)imageDetail.getData()).getIncludeLabels()) { + oldIncludeLabels.add(labelResult.getId()); + } + } + if (!CollectionUtils.isEmpty(((ImageStoreDetailResult)imageDetail.getData()).getIncludeOrganizations())) { + for (OrganizationResult organizationResult : ((ImageStoreDetailResult)imageDetail.getData()) + .getIncludeOrganizations()) { + oldIncludeOrganizations.add(organizationResult.getId()); + } + } + try { + List oldRule = + this.imageRuleRefDao.listByParentRule(Collections.singletonList(param.getId())); + List updateLabels = new ArrayList<>(param.getIncludeLabels()); + List updateOrgIds = new ArrayList<>(param.getIncludeOrganizations()); + Boolean isTrue = Boolean.valueOf(true); + if (!CollectionUtils.isEmpty(oldRule)) { + for (ImageRuleRefResultDto dto : oldRule) { + if (!ObjectUtils.isEmpty(dto.getIncludeLabels()) + && !updateLabels.contains(dto.getIncludeLabels())) { + updateLabels.add(dto.getIncludeLabels()); + isTrue = Boolean.valueOf(false); + } + if (!ObjectUtils.isEmpty(dto.getIncludeOrganizations()) + && !updateOrgIds.contains(dto.getIncludeOrganizations())) { + updateOrgIds.add(dto.getIncludeOrganizations()); + isTrue = Boolean.valueOf(false); + } + } + } + this.imageRuleRefDao.deleteById(param.getId()); + ImageRuleRefAddDto addDto = createUpdateDto(param, context); + this.imageRuleRefDao.insert(addDto); + if (!CollectionUtils.isEmpty(param.getIncludeLabels())) { + for (String label : param.getIncludeLabels()) { + ImageRuleRefAddDto dto = createUpdateDto(param, context); + dto.setIncludeLabels(label); + dto.setParentRule(addDto.getId()); + this.imageRuleRefDao.insert(dto); + if (!editParam.getIncludeLabels().contains(label)) { + includeLabels.add(label); + includeLabels2.add(label); + } + } + } + if (!CollectionUtils.isEmpty(param.getExcludeLabels())) { + for (String label : param.getExcludeLabels()) { + ImageRuleRefAddDto dto = createUpdateDto(param, context); + dto.setExcludeLabels(label); + dto.setParentRule(addDto.getId()); + this.imageRuleRefDao.insert(dto); + } + } + if (!CollectionUtils.isEmpty(param.getIncludeOrganizations())) { + for (String org : param.getIncludeOrganizations()) { + ImageRuleRefAddDto dto = createUpdateDto(param, context); + dto.setIncludeOrganizations(org); + dto.setParentRule(addDto.getId()); + this.imageRuleRefDao.insert(dto); + if (!editParam.getIncludeOrganizations().contains(org)) { + includeOrganizations.add(org); + includeOrganizations2.add(org); + } + } + } + if (!CollectionUtils.isEmpty(includeLabels) || !CollectionUtils.isEmpty(includeOrganizations)) { + includeLabels.addAll(oldIncludeLabels); + includeOrganizations.addAll(oldIncludeOrganizations); + editParam.setIncludeLabels(includeLabels); + editParam.setIncludeOrganizations(includeOrganizations); + if (!CollectionUtils.isEmpty(((ImageStoreDetailResult)imageDetail.getData()).getExcludePersons())) { + List excPersonIds = new ArrayList<>(); + for (ImgStorePersonResult personResult : ((ImageStoreDetailResult)imageDetail.getData()) + .getExcludePersons()) { + excPersonIds.add(personResult.getId()); + } + editParam.setExcludePersons(excPersonIds); + } + if (!CollectionUtils.isEmpty(((ImageStoreDetailResult)imageDetail.getData()).getIncludePersons())) { + List includePersons = new ArrayList<>(); + for (ImgStorePersonResult personResult : ((ImageStoreDetailResult)imageDetail.getData()) + .getIncludePersons()) { + ImageStorePersonData personData = new ImageStorePersonData(); + personData.setObjectId(personResult.getId()); + includePersons.add(personData); + } + editParam.setIncludePersons(includePersons); + } + editParam.setBusinessId(context.getCompany().getCompanyId()); + CloudwalkResult cloudwalkResult = this.imageStoreService.edit(editParam, context); + } + if (!isTrue.booleanValue()) { + UpdateGroupPersonRefParam refParam = new UpdateGroupPersonRefParam(); + refParam.setImageStoreId(imageStoreId); + refParam.setBusinessId(context.getCompany().getCompanyId()); + refParam.setLabelIds(updateLabels); + refParam.setOrganizationIds(updateOrgIds); + this.imageStorePersonService.updateGroupPersonRef(refParam, context); + } + return CloudwalkResult.success(Boolean.valueOf(true)); + } catch (DataAccessException e) { + this.logger.error("添加通行规则失败", (Throwable)e); + throw new ServiceException("76260505", getMessage("76260505")); + } + } + + public CloudwalkResult delete(AcsPassRuleDeleteParam param, CloudwalkCallContext context) + throws ServiceException { + try { + String imageStoreId = this.deviceImageStoreDao.getByBuildingId(param.getParentId()); + for (String id : param.getIds()) { + checkDefaultRule(id); + List includeLabels = new ArrayList<>(); + List includeOrganizations = new ArrayList<>(); + List child = + this.imageRuleRefDao.listByParentRule(Collections.singletonList(id)); + if (!CollectionUtils.isEmpty(child)) { + for (ImageRuleRefResultDto resultDto : child) { + if (!ObjectUtils.isEmpty(resultDto.getIncludeLabels())) { + includeLabels.add(resultDto.getIncludeLabels()); + continue; + } + if (!ObjectUtils.isEmpty(resultDto.getIncludeOrganizations())) { + includeOrganizations.add(resultDto.getIncludeOrganizations()); + } + } + } + this.imageRuleRefDao.deleteById(id); + UpdateGroupPersonRefParam refParam = new UpdateGroupPersonRefParam(); + refParam.setBusinessId(context.getCompany().getCompanyId()); + refParam.setImageStoreId(imageStoreId); + refParam.setLabelIds(includeLabels); + refParam.setOrganizationIds(includeOrganizations); + this.imageStorePersonService.updateGroupPersonRef(refParam, context); + } + return CloudwalkResult.success(Boolean.valueOf(true)); + } catch (DataAccessException e) { + this.logger.error("通行规则删除失败", (Throwable)e); + throw new ServiceException("76260507", getMessage("76260507")); + } + } + + private List coverRulePageResult(List datas, String parentId, + CloudwalkCallContext context) throws Exception { + List detailResultList = new ArrayList<>(); + if (CollectionUtils.isEmpty(datas)) { + return detailResultList; + } + List personSum = + this.imageRuleRefDao.countPersonIdByZoneId(((ImageRuleRefResultDto)datas.get(0)).getZoneId()); + for (ImageRuleRefResultDto data : datas) { + ImageRuleRefPageResult detailResult = new ImageRuleRefPageResult(); + AcsPersonQueryParam personQueryParam = new AcsPersonQueryParam(); + BeanCopyUtils.copyProperties(data, detailResult); + detailResult.setRuleName(data.getName()); + detailResult.setPassType(AcsPassTypeEnum.LONG_TIME.getCode()); + if (data.getIsDefault().intValue() == 1) { + detailResult.setPersonSum(personSum.size()); + } else { + personQueryParam.setDelPersonIds(personSum); + List includeLabels = new ArrayList<>(); + List includeOrganizations = new ArrayList<>(); + List child = + this.imageRuleRefDao.listByParentRule(Collections.singletonList(data.getId())); + if (!CollectionUtils.isEmpty(child)) { + for (ImageRuleRefResultDto resultDto : child) { + if (!ObjectUtils.isEmpty(resultDto.getIncludeLabels())) { + includeLabels.add(resultDto.getIncludeLabels()); + continue; + } + if (!ObjectUtils.isEmpty(resultDto.getIncludeOrganizations())) { + includeOrganizations.add(resultDto.getIncludeOrganizations()); + } + } + String imageStoreId = this.deviceImageStoreDao.getByBuildingId(parentId); + personQueryParam.setImageStoreId(imageStoreId); + personQueryParam.setLabelIds(includeLabels); + personQueryParam.setOrganizationIds(includeOrganizations); + if (!CollectionUtils.isEmpty(personQueryParam.getOrganizationIds()) + && !CollectionUtils.isEmpty(personQueryParam.getLabelIds())) { + personQueryParam.setIsElevator(Integer.valueOf(3)); + } else if (!CollectionUtils.isEmpty(personQueryParam.getOrganizationIds())) { + personQueryParam.setIsElevator(Integer.valueOf(1)); + } else if (!CollectionUtils.isEmpty(personQueryParam.getLabelIds())) { + personQueryParam.setIsElevator(Integer.valueOf(2)); + } + CloudwalkPageInfo page = new CloudwalkPageInfo(1, 10); + CloudwalkPageAble pageResult = + getImageStorePerson(personQueryParam, page, context); + List delPerson = this.imageRuleRefDao.listPersonDelByZoneId(data.getZoneId()); + if (!ObjectUtils.isEmpty(pageResult.getDatas())) { + detailResult.setPersonSum(Math.toIntExact(pageResult.getTotalRows()) - delPerson.size()); + } else { + detailResult.setPersonSum(0); + } + if (!CollectionUtils.isEmpty(includeLabels)) { + List labelDetailResultList = new ArrayList<>(); + for (String label : includeLabels) { + LabelDetailParam param = new LabelDetailParam(); + param.setId(label); + CloudwalkResult detail = this.labelService.detail(param, context); + labelDetailResultList.add(detail.getData()); + } + detailResult.setIncludeLabels(labelDetailResultList); + } + if (!CollectionUtils.isEmpty(includeOrganizations)) { + OrganizationListParam orgParam = new OrganizationListParam(); + orgParam.setIds(includeOrganizations); + CloudwalkResult> orglist = + this.organizationService.list(orgParam, context); + detailResult.setIncludeOrganizations((List)orglist.getData()); + } + } + } + detailResultList.add(detailResult); + } + return detailResultList; + } + + private CloudwalkPageAble getImageStorePerson(AcsPersonQueryParam param, + CloudwalkPageInfo pageInfo, CloudwalkCallContext context) throws ServiceException { + CloudwalkPageAble results = new CloudwalkPageAble(); + ImageStorePersonQueryParam imageStorePersonQueryParam = new ImageStorePersonQueryParam(); + imageStorePersonQueryParam.setImageStoreId(param.getImageStoreId()); + imageStorePersonQueryParam.setOrganizationIds(param.getOrganizationIds()); + imageStorePersonQueryParam.setLabelIds(param.getLabelIds()); + imageStorePersonQueryParam.setCurrentPage(pageInfo.getCurrentPage()); + imageStorePersonQueryParam.setRowsOfPage(pageInfo.getPageSize()); + imageStorePersonQueryParam.setIsElevator(param.getIsElevator()); + imageStorePersonQueryParam.setDelPersonIds(param.getDelPersonIds()); + CloudwalkResult> pageResult = + this.imageStorePersonService.page(imageStorePersonQueryParam, context); + if (!pageResult.isSuccess()) { + this.logger.error("远程调用查询图库人员失败,原因:[{}]", pageResult.getMessage()); + throw new ServiceException(pageResult.getCode(), pageResult.getMessage()); + } + if (!CollectionUtils.isEmpty(((CloudwalkPageAble)pageResult.getData()).getDatas())) { + results = (CloudwalkPageAble)pageResult.getData(); + } + return results; + } + + private ImageRuleRefListResult refListByZoneId(String zoneId) { + ImageRuleRefListResult listResult = new ImageRuleRefListResult(); + List includeLabels = new ArrayList<>(); + List includeOrganizations = new ArrayList<>(); + List parentRuleList = this.imageRuleRefDao.listRuleByZoneIdExtDefault(zoneId); + if (!CollectionUtils.isEmpty(parentRuleList)) { + List child = this.imageRuleRefDao.listByParentRule(parentRuleList); + if (!CollectionUtils.isEmpty(child)) { + for (ImageRuleRefResultDto resultDto : child) { + if (!ObjectUtils.isEmpty(resultDto.getIncludeLabels())) { + includeLabels.add(resultDto.getExcludeLabels()); + continue; + } + if (!ObjectUtils.isEmpty(resultDto.getIncludeOrganizations())) { + includeOrganizations.add(resultDto.getIncludeOrganizations()); + } + } + } + } + listResult.setIncludeLabels(includeLabels); + listResult.setIncludeOrganizations(includeOrganizations); + return listResult; + } + + private ImageRuleRefAddDto createAddDto(AcsPassRuleNewParam param, CloudwalkCallContext context) { + ImageRuleRefAddDto dto = new ImageRuleRefAddDto(); + dto.setId(genUUID()); + dto.setBusinessId(context.getCompany().getCompanyId()); + dto.setName(param.getRuleName()); + dto.setZoneId(param.getZoneId()); + dto.setZoneName(param.getZoneName()); + dto.setStartTime(param.getStartTime()); + dto.setEndTime(param.getEndTime()); + if (!ObjectUtils.isEmpty(param.getIsDefault())) { + dto.setIsDefault(param.getIsDefault()); + } else { + dto.setIsDefault(Integer.valueOf(0)); + } + dto.setCreateTime(Long.valueOf(System.currentTimeMillis())); + dto.setLastUpdateTime(Long.valueOf(System.currentTimeMillis())); + return dto; + } + + private ImageRuleRefAddDto createUpdateDto(AcsPassRuleEditParam param, CloudwalkCallContext context) { + ImageRuleRefAddDto dto = new ImageRuleRefAddDto(); + dto.setId(genUUID()); + dto.setBusinessId(context.getCompany().getCompanyId()); + dto.setName(param.getRuleName()); + dto.setZoneId(param.getZoneId()); + dto.setZoneName(param.getZoneName()); + dto.setStartTime(param.getStartTime()); + dto.setEndTime(param.getEndTime()); + dto.setCreateTime(Long.valueOf(System.currentTimeMillis())); + dto.setLastUpdateTime(Long.valueOf(System.currentTimeMillis())); + dto.setIsDefault(Integer.valueOf(0)); + return dto; + } + + private ImageRuleRefResultDto checkDefaultRule(String id) throws ServiceException { + try { + ImageRuleRefResultDto resultDto = this.imageRuleRefDao.getById(id); + if (!ObjectUtils.isEmpty(resultDto.getIsDefault()) && resultDto.getIsDefault().intValue() == 1) { + throw new ServiceException("派梯默认规则不可编辑和删除"); + } + return resultDto; + } catch (DataAccessException e) { + throw new ServiceException("派梯默认规则不可编辑和删除"); + } + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/param/AcsPassRuleDeleteParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/param/AcsPassRuleDeleteParam.java new file mode 100644 index 00000000..d6b19863 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/param/AcsPassRuleDeleteParam.java @@ -0,0 +1,37 @@ +package cn.cloudwalk.elevator.passrule.param; + +import java.io.Serializable; +import java.util.List; +import org.hibernate.validator.constraints.NotEmpty; + +public class AcsPassRuleDeleteParam implements Serializable { + private static final long serialVersionUID = -40026518356914854L; + @NotEmpty(message = "76260515") + private List ids; + private String zoneId; + private String parentId; + + public List getIds() { + return this.ids; + } + + public void setIds(List ids) { + this.ids = ids; + } + + public String getZoneId() { + return this.zoneId; + } + + public void setZoneId(String zoneId) { + this.zoneId = zoneId; + } + + public String getParentId() { + return this.parentId; + } + + public void setParentId(String parentId) { + this.parentId = parentId; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/param/AcsPassRuleEditParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/param/AcsPassRuleEditParam.java new file mode 100644 index 00000000..348ac271 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/param/AcsPassRuleEditParam.java @@ -0,0 +1,112 @@ +package cn.cloudwalk.elevator.passrule.param; + +import java.io.Serializable; +import java.util.List; +import javax.validation.constraints.Size; +import org.hibernate.validator.constraints.NotBlank; + +public class AcsPassRuleEditParam implements Serializable { + private static final long serialVersionUID = 924203126937866288L; + @NotBlank(message = "76260515") + private String id; + private String parentId; + private String zoneId; + private String zoneName; + @NotBlank(message = "76260514") + @Size(min = 1, max = 32, message = "76260518") + private String ruleName; + private String oldName; + private List includeOrganizations; + private List includeLabels; + private List excludeLabels; + private Long startTime; + private Long endTime; + + public String getParentId() { + return this.parentId; + } + + public void setParentId(String parentId) { + this.parentId = parentId; + } + + public String getOldName() { + return this.oldName; + } + + public void setOldName(String oldName) { + this.oldName = oldName; + } + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public String getZoneId() { + return this.zoneId; + } + + public void setZoneId(String zoneId) { + this.zoneId = zoneId; + } + + public String getZoneName() { + return this.zoneName; + } + + public void setZoneName(String zoneName) { + this.zoneName = zoneName; + } + + public String getRuleName() { + return this.ruleName; + } + + public void setRuleName(String ruleName) { + this.ruleName = ruleName; + } + + public List getIncludeOrganizations() { + return this.includeOrganizations; + } + + public void setIncludeOrganizations(List includeOrganizations) { + this.includeOrganizations = includeOrganizations; + } + + public List getIncludeLabels() { + return this.includeLabels; + } + + public void setIncludeLabels(List includeLabels) { + this.includeLabels = includeLabels; + } + + public List getExcludeLabels() { + return this.excludeLabels; + } + + public void setExcludeLabels(List excludeLabels) { + this.excludeLabels = excludeLabels; + } + + public Long getStartTime() { + return this.startTime; + } + + public void setStartTime(Long startTime) { + this.startTime = startTime; + } + + public Long getEndTime() { + return this.endTime; + } + + public void setEndTime(Long endTime) { + this.endTime = endTime; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/param/AcsPassRuleFloorParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/param/AcsPassRuleFloorParam.java new file mode 100644 index 00000000..87dbc674 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/param/AcsPassRuleFloorParam.java @@ -0,0 +1,17 @@ +package cn.cloudwalk.elevator.passrule.param; + +import cn.cloudwalk.cloud.page.CloudwalkBasePageForm; +import java.io.Serializable; + +public class AcsPassRuleFloorParam extends CloudwalkBasePageForm implements Serializable { + private static final long serialVersionUID = 137892620174267456L; + private String zoneId; + + public String getZoneId() { + return this.zoneId; + } + + public void setZoneId(String zoneId) { + this.zoneId = zoneId; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/param/AcsPassRuleImageParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/param/AcsPassRuleImageParam.java new file mode 100644 index 00000000..b0d6aa6c --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/param/AcsPassRuleImageParam.java @@ -0,0 +1,53 @@ +package cn.cloudwalk.elevator.passrule.param; + +import java.io.Serializable; +import java.util.List; + +public class AcsPassRuleImageParam implements Serializable { + private static final long serialVersionUID = -52687427633888290L; + private List imageStoreIds; + private String businessId; + private String personId; + private List includeOrganizations; + private List includeLabels; + + public List getImageStoreIds() { + return this.imageStoreIds; + } + + public void setImageStoreIds(List imageStoreIds) { + this.imageStoreIds = imageStoreIds; + } + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getPersonId() { + return this.personId; + } + + public void setPersonId(String personId) { + this.personId = personId; + } + + public List getIncludeOrganizations() { + return this.includeOrganizations; + } + + public void setIncludeOrganizations(List includeOrganizations) { + this.includeOrganizations = includeOrganizations; + } + + public List getIncludeLabels() { + return this.includeLabels; + } + + public void setIncludeLabels(List includeLabels) { + this.includeLabels = includeLabels; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/param/AcsPassRuleIsDefaultParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/param/AcsPassRuleIsDefaultParam.java new file mode 100644 index 00000000..4c2bbd1f --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/param/AcsPassRuleIsDefaultParam.java @@ -0,0 +1,16 @@ +package cn.cloudwalk.elevator.passrule.param; + +import java.io.Serializable; + +public class AcsPassRuleIsDefaultParam implements Serializable { + private static final long serialVersionUID = 137892620174267456L; + private String zoneId; + + public String getZoneId() { + return this.zoneId; + } + + public void setZoneId(String zoneId) { + this.zoneId = zoneId; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/param/AcsPassRuleNewParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/param/AcsPassRuleNewParam.java new file mode 100644 index 00000000..47355964 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/param/AcsPassRuleNewParam.java @@ -0,0 +1,102 @@ +package cn.cloudwalk.elevator.passrule.param; + +import java.io.Serializable; +import java.util.List; +import javax.validation.constraints.Size; +import org.hibernate.validator.constraints.NotBlank; + +public class AcsPassRuleNewParam implements Serializable { + private static final long serialVersionUID = 137892620174267456L; + private String parentId; + private String zoneId; + private String zoneName; + @NotBlank(message = "76260514") + @Size(min = 1, max = 32, message = "76260518") + private String ruleName; + private List includeLabels; + private List includeOrganizations; + private List excludeLabels; + private Long startTime; + private Long endTime; + private Integer isDefault; + + public String getParentId() { + return this.parentId; + } + + public void setParentId(String parentId) { + this.parentId = parentId; + } + + public String getZoneId() { + return this.zoneId; + } + + public void setZoneId(String zoneId) { + this.zoneId = zoneId; + } + + public String getZoneName() { + return this.zoneName; + } + + public void setZoneName(String zoneName) { + this.zoneName = zoneName; + } + + public String getRuleName() { + return this.ruleName; + } + + public void setRuleName(String ruleName) { + this.ruleName = ruleName; + } + + public List getIncludeLabels() { + return this.includeLabels; + } + + public void setIncludeLabels(List includeLabels) { + this.includeLabels = includeLabels; + } + + public List getIncludeOrganizations() { + return this.includeOrganizations; + } + + public void setIncludeOrganizations(List includeOrganizations) { + this.includeOrganizations = includeOrganizations; + } + + public List getExcludeLabels() { + return this.excludeLabels; + } + + public void setExcludeLabels(List excludeLabels) { + this.excludeLabels = excludeLabels; + } + + public Long getStartTime() { + return this.startTime; + } + + public void setStartTime(Long startTime) { + this.startTime = startTime; + } + + public Long getEndTime() { + return this.endTime; + } + + public void setEndTime(Long endTime) { + this.endTime = endTime; + } + + public Integer getIsDefault() { + return this.isDefault; + } + + public void setIsDefault(Integer isDefault) { + this.isDefault = isDefault; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/param/AcsPassRulePersonListParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/param/AcsPassRulePersonListParam.java new file mode 100644 index 00000000..226267d7 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/param/AcsPassRulePersonListParam.java @@ -0,0 +1,18 @@ +package cn.cloudwalk.elevator.passrule.param; + +import cn.cloudwalk.cloud.page.CloudwalkBasePageForm; +import java.io.Serializable; +import java.util.List; + +public class AcsPassRulePersonListParam extends CloudwalkBasePageForm implements Serializable { + private static final long serialVersionUID = -52687427633888290L; + private List personList; + + public List getPersonList() { + return this.personList; + } + + public void setPersonList(List personList) { + this.personList = personList; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/param/AcsPassRuleQueryParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/param/AcsPassRuleQueryParam.java new file mode 100644 index 00000000..58be31cc --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/param/AcsPassRuleQueryParam.java @@ -0,0 +1,61 @@ +package cn.cloudwalk.elevator.passrule.param; + +import java.io.Serializable; + +public class AcsPassRuleQueryParam implements Serializable { + private static final long serialVersionUID = -31004388036379268L; + private String id; + private String parentId; + private String zoneId; + private String zoneName; + private String imageStoreId; + private Integer isDefault; + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public String getParentId() { + return this.parentId; + } + + public void setParentId(String parentId) { + this.parentId = parentId; + } + + public String getZoneId() { + return this.zoneId; + } + + public void setZoneId(String zoneId) { + this.zoneId = zoneId; + } + + public String getImageStoreId() { + return this.imageStoreId; + } + + public void setImageStoreId(String imageStoreId) { + this.imageStoreId = imageStoreId; + } + + public String getZoneName() { + return this.zoneName; + } + + public void setZoneName(String zoneName) { + this.zoneName = zoneName; + } + + public Integer getIsDefault() { + return this.isDefault; + } + + public void setIsDefault(Integer isDefault) { + this.isDefault = isDefault; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/param/AcsPassTimeAddParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/param/AcsPassTimeAddParam.java new file mode 100644 index 00000000..1952f23a --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/param/AcsPassTimeAddParam.java @@ -0,0 +1,48 @@ +package cn.cloudwalk.elevator.passrule.param; + +import java.io.Serializable; +import java.util.List; +import javax.validation.constraints.Size; +import org.hibernate.validator.constraints.NotBlank; + +public class AcsPassTimeAddParam implements Serializable { + private static final long serialVersionUID = 8600793178515359164L; + @NotBlank(message = "76260512") + @Size(min = 1, max = 64, message = "76260519") + private String passableTimeName; + private Long beginDate; + private Long endDate; + private List passableCycle; + + public String getPassableTimeName() { + return this.passableTimeName; + } + + public void setPassableTimeName(String passableTimeName) { + this.passableTimeName = passableTimeName; + } + + public Long getBeginDate() { + return this.beginDate; + } + + public void setBeginDate(Long beginDate) { + this.beginDate = beginDate; + } + + public Long getEndDate() { + return this.endDate; + } + + public void setEndDate(Long endDate) { + this.endDate = endDate; + } + + public List getPassableCycle() { + return this.passableCycle; + } + + public void setPassableCycle(List passableCycle) { + this.passableCycle = passableCycle; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/param/AcsPassTimeCycleParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/param/AcsPassTimeCycleParam.java new file mode 100644 index 00000000..fdca962c --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/param/AcsPassTimeCycleParam.java @@ -0,0 +1,26 @@ +package cn.cloudwalk.elevator.passrule.param; + +import java.io.Serializable; +import java.util.List; + +public class AcsPassTimeCycleParam implements Serializable { + private static final long serialVersionUID = 9084516985152275888L; + private int weekday; + private List time; + + public int getWeekday() { + return this.weekday; + } + + public void setWeekday(int weekday) { + this.weekday = weekday; + } + + public List getTime() { + return this.time; + } + + public void setTime(List time) { + this.time = time; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/param/AcsPassTimeDeleteParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/param/AcsPassTimeDeleteParam.java new file mode 100644 index 00000000..3a25584b --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/param/AcsPassTimeDeleteParam.java @@ -0,0 +1,19 @@ +package cn.cloudwalk.elevator.passrule.param; + +import java.io.Serializable; +import java.util.List; +import org.hibernate.validator.constraints.NotEmpty; + +public class AcsPassTimeDeleteParam implements Serializable { + private static final long serialVersionUID = -1142611457619464538L; + @NotEmpty(message = "76260513") + private List ids; + + public List getIds() { + return this.ids; + } + + public void setIds(List ids) { + this.ids = ids; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/param/AcsPassTimeEditParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/param/AcsPassTimeEditParam.java new file mode 100644 index 00000000..56f73892 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/param/AcsPassTimeEditParam.java @@ -0,0 +1,58 @@ +package cn.cloudwalk.elevator.passrule.param; + +import java.io.Serializable; +import java.util.List; +import javax.validation.constraints.Size; +import org.hibernate.validator.constraints.NotBlank; + +public class AcsPassTimeEditParam implements Serializable { + private static final long serialVersionUID = -8271994630899900554L; + @NotBlank(message = "76260513") + private String id; + @NotBlank(message = "76260512") + @Size(min = 1, max = 64, message = "76260519") + private String passableTimeName; + private Long beginDate; + private Long endDate; + private List passableCycle; + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public String getPassableTimeName() { + return this.passableTimeName; + } + + public void setPassableTimeName(String passableTimeName) { + this.passableTimeName = passableTimeName; + } + + public Long getBeginDate() { + return this.beginDate; + } + + public void setBeginDate(Long beginDate) { + this.beginDate = beginDate; + } + + public Long getEndDate() { + return this.endDate; + } + + public void setEndDate(Long endDate) { + this.endDate = endDate; + } + + public List getPassableCycle() { + return this.passableCycle; + } + + public void setPassableCycle(List passableCycle) { + this.passableCycle = passableCycle; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/param/AcsPassTimeParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/param/AcsPassTimeParam.java new file mode 100644 index 00000000..41961a9e --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/param/AcsPassTimeParam.java @@ -0,0 +1,25 @@ +package cn.cloudwalk.elevator.passrule.param; + +import java.io.Serializable; + +public class AcsPassTimeParam implements Serializable { + private static final long serialVersionUID = 7496987389322298594L; + private String beginTime; + private String endTime; + + public String getBeginTime() { + return this.beginTime; + } + + public void setBeginTime(String beginTime) { + this.beginTime = beginTime; + } + + public String getEndTime() { + return this.endTime; + } + + public void setEndTime(String endTime) { + this.endTime = endTime; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/param/AcsPassTimeQueryParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/param/AcsPassTimeQueryParam.java new file mode 100644 index 00000000..fbc36f8f --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/param/AcsPassTimeQueryParam.java @@ -0,0 +1,18 @@ +package cn.cloudwalk.elevator.passrule.param; + +import java.io.Serializable; +import org.hibernate.validator.constraints.NotBlank; + +public class AcsPassTimeQueryParam implements Serializable { + private static final long serialVersionUID = 7311660131290856391L; + @NotBlank(message = "76260513") + private String id; + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/result/AcsPassRuleDetailResult.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/result/AcsPassRuleDetailResult.java new file mode 100644 index 00000000..32ed47ac --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/result/AcsPassRuleDetailResult.java @@ -0,0 +1,136 @@ +package cn.cloudwalk.elevator.passrule.result; + +import cn.cloudwalk.client.cwoscomponent.intelligent.label.result.LabelResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.organization.result.OrganizationResult; +import cn.cloudwalk.elevator.passrule.param.AcsPassTimeCycleParam; +import java.util.List; + +public class AcsPassRuleDetailResult { + private static final long serialVersionUID = -90554404684210529L; + private String id; + private String ruleName; + private String imageStoreId; + private String zoneId; + private String zoneName; + private Long beginDate; + private Long endDate; + private String validDateCron; + private String validDateJson; + private List excludeLabels; + private List includeOrganizations; + private List includeLabels; + private List passableCycle; + private Integer passType; + + public String getRuleName() { + return this.ruleName; + } + + public void setRuleName(String ruleName) { + this.ruleName = ruleName; + } + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public String getImageStoreId() { + return this.imageStoreId; + } + + public void setImageStoreId(String imageStoreId) { + this.imageStoreId = imageStoreId; + } + + public Long getBeginDate() { + return this.beginDate; + } + + public void setBeginDate(Long beginDate) { + this.beginDate = beginDate; + } + + public Long getEndDate() { + return this.endDate; + } + + public void setEndDate(Long endDate) { + this.endDate = endDate; + } + + public String getValidDateCron() { + return this.validDateCron; + } + + public void setValidDateCron(String validDateCron) { + this.validDateCron = validDateCron; + } + + public String getValidDateJson() { + return this.validDateJson; + } + + public void setValidDateJson(String validDateJson) { + this.validDateJson = validDateJson; + } + + public List getExcludeLabels() { + return this.excludeLabels; + } + + public void setExcludeLabels(List excludeLabels) { + this.excludeLabels = excludeLabels; + } + + public List getIncludeOrganizations() { + return this.includeOrganizations; + } + + public void setIncludeOrganizations(List includeOrganizations) { + this.includeOrganizations = includeOrganizations; + } + + public List getIncludeLabels() { + return this.includeLabels; + } + + public void setIncludeLabels(List includeLabels) { + this.includeLabels = includeLabels; + } + + public List getPassableCycle() { + return this.passableCycle; + } + + public void setPassableCycle(List passableCycle) { + this.passableCycle = passableCycle; + } + + public Integer getPassType() { + return this.passType; + } + + public void setPassType(Integer passType) { + this.passType = passType; + } + + public String getZoneId() { + return this.zoneId; + } + + public void setZoneId(String zoneId) { + this.zoneId = zoneId; + } + + public String getZoneName() { + return this.zoneName; + } + + public void setZoneName(String zoneName) { + this.zoneName = zoneName; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/result/AcsPassRuleFloorResult.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/result/AcsPassRuleFloorResult.java new file mode 100644 index 00000000..2c43fd9d --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/result/AcsPassRuleFloorResult.java @@ -0,0 +1,101 @@ +package cn.cloudwalk.elevator.passrule.result; + +import java.io.Serializable; + +public class AcsPassRuleFloorResult implements Serializable { + private static final long serialVersionUID = -90554404684210529L; + private String id; + private String name; + private Integer deviceNumber; + private Integer unitNumber; + private Long personNumber; + + public void setId(String id) { + this.id = id; + } + + public void setName(String name) { + this.name = name; + } + + public void setDeviceNumber(Integer deviceNumber) { + this.deviceNumber = deviceNumber; + } + + public void setUnitNumber(Integer unitNumber) { + this.unitNumber = unitNumber; + } + + public void setPersonNumber(Long personNumber) { + this.personNumber = personNumber; + } + + public boolean equals(Object o) { + if (o == this) + return true; + if (!(o instanceof AcsPassRuleFloorResult)) + return false; + AcsPassRuleFloorResult other = (AcsPassRuleFloorResult)o; + if (!other.canEqual(this)) + return false; + Object this$id = getId(), other$id = other.getId(); + if ((this$id == null) ? (other$id != null) : !this$id.equals(other$id)) + return false; + Object this$name = getName(), other$name = other.getName(); + if ((this$name == null) ? (other$name != null) : !this$name.equals(other$name)) + return false; + Object this$deviceNumber = getDeviceNumber(), other$deviceNumber = other.getDeviceNumber(); + if ((this$deviceNumber == null) ? (other$deviceNumber != null) : !this$deviceNumber.equals(other$deviceNumber)) + return false; + Object this$unitNumber = getUnitNumber(), other$unitNumber = other.getUnitNumber(); + if ((this$unitNumber == null) ? (other$unitNumber != null) : !this$unitNumber.equals(other$unitNumber)) + return false; + Object this$personNumber = getPersonNumber(), other$personNumber = other.getPersonNumber(); + return !((this$personNumber == null) ? (other$personNumber != null) + : !this$personNumber.equals(other$personNumber)); + } + + protected boolean canEqual(Object other) { + return other instanceof AcsPassRuleFloorResult; + } + + public int hashCode() { + int PRIME = 59; + result = 1; + Object $id = getId(); + result = result * 59 + (($id == null) ? 43 : $id.hashCode()); + Object $name = getName(); + result = result * 59 + (($name == null) ? 43 : $name.hashCode()); + Object $deviceNumber = getDeviceNumber(); + result = result * 59 + (($deviceNumber == null) ? 43 : $deviceNumber.hashCode()); + Object $unitNumber = getUnitNumber(); + result = result * 59 + (($unitNumber == null) ? 43 : $unitNumber.hashCode()); + Object $personNumber = getPersonNumber(); + return result * 59 + (($personNumber == null) ? 43 : $personNumber.hashCode()); + } + + public String toString() { + return "AcsPassRuleFloorResult(id=" + getId() + ", name=" + getName() + ", deviceNumber=" + getDeviceNumber() + + ", unitNumber=" + getUnitNumber() + ", personNumber=" + getPersonNumber() + ")"; + } + + public String getId() { + return this.id; + } + + public String getName() { + return this.name; + } + + public Integer getDeviceNumber() { + return this.deviceNumber; + } + + public Integer getUnitNumber() { + return this.unitNumber; + } + + public Long getPersonNumber() { + return this.personNumber; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/result/AcsPassRuleResult.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/result/AcsPassRuleResult.java new file mode 100644 index 00000000..6b3708cc --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/result/AcsPassRuleResult.java @@ -0,0 +1,155 @@ +package cn.cloudwalk.elevator.passrule.result; + +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.ImgStorePersonResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.label.result.LabelResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.organization.result.OrganizationResult; +import java.io.Serializable; +import java.util.List; + +public class AcsPassRuleResult implements Serializable { + private static final long serialVersionUID = -90554404684210529L; + private String id; + private String ruleName; + private int personSum; + private String imageStoreId; + private String passableTimeName; + private String zoneId; + private Long beginDate; + private Long endDate; + private String validDateCron; + private String validDateJson; + private List excludeLabels; + private List includeOrganizations; + private List includeLabels; + private List includePersons; + private Integer passType; + private Integer isDefault; + + public String getRuleName() { + return this.ruleName; + } + + public void setRuleName(String ruleName) { + this.ruleName = ruleName; + } + + public int getPersonSum() { + return this.personSum; + } + + public void setPersonSum(int personSum) { + this.personSum = personSum; + } + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public String getImageStoreId() { + return this.imageStoreId; + } + + public void setImageStoreId(String imageStoreId) { + this.imageStoreId = imageStoreId; + } + + public String getZoneId() { + return this.zoneId; + } + + public void setZoneId(String zoneId) { + this.zoneId = zoneId; + } + + public Long getBeginDate() { + return this.beginDate; + } + + public void setBeginDate(Long beginDate) { + this.beginDate = beginDate; + } + + public Long getEndDate() { + return this.endDate; + } + + public void setEndDate(Long endDate) { + this.endDate = endDate; + } + + public String getValidDateCron() { + return this.validDateCron; + } + + public void setValidDateCron(String validDateCron) { + this.validDateCron = validDateCron; + } + + public String getValidDateJson() { + return this.validDateJson; + } + + public void setValidDateJson(String validDateJson) { + this.validDateJson = validDateJson; + } + + public List getExcludeLabels() { + return this.excludeLabels; + } + + public void setExcludeLabels(List excludeLabels) { + this.excludeLabels = excludeLabels; + } + + public List getIncludeOrganizations() { + return this.includeOrganizations; + } + + public void setIncludeOrganizations(List includeOrganizations) { + this.includeOrganizations = includeOrganizations; + } + + public List getIncludeLabels() { + return this.includeLabels; + } + + public void setIncludeLabels(List includeLabels) { + this.includeLabels = includeLabels; + } + + public String getPassableTimeName() { + return this.passableTimeName; + } + + public void setPassableTimeName(String passableTimeName) { + this.passableTimeName = passableTimeName; + } + + public List getIncludePersons() { + return this.includePersons; + } + + public void setIncludePersons(List includePersons) { + this.includePersons = includePersons; + } + + public Integer getPassType() { + return this.passType; + } + + public void setPassType(Integer passType) { + this.passType = passType; + } + + public Integer getIsDefault() { + return this.isDefault; + } + + public void setIsDefault(Integer isDefault) { + this.isDefault = isDefault; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/result/ImageRuleRefDetailResult.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/result/ImageRuleRefDetailResult.java new file mode 100644 index 00000000..43197b7d --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/result/ImageRuleRefDetailResult.java @@ -0,0 +1,136 @@ +package cn.cloudwalk.elevator.passrule.result; + +import cn.cloudwalk.client.cwoscomponent.intelligent.label.result.LabelDetailResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.organization.result.OrganizationResult; +import cn.cloudwalk.elevator.passrule.param.AcsPassTimeCycleParam; +import java.util.List; + +public class ImageRuleRefDetailResult { + private static final long serialVersionUID = -90554404684210529L; + private String id; + private String ruleName; + private String imageStoreId; + private String zoneId; + private String zoneName; + private Long beginDate; + private Long endDate; + private String validDateCron; + private String validDateJson; + private List excludeLabels; + private List includeOrganizations; + private List includeLabels; + private List passableCycle; + private Integer passType; + + public String getRuleName() { + return this.ruleName; + } + + public void setRuleName(String ruleName) { + this.ruleName = ruleName; + } + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public String getImageStoreId() { + return this.imageStoreId; + } + + public void setImageStoreId(String imageStoreId) { + this.imageStoreId = imageStoreId; + } + + public Long getBeginDate() { + return this.beginDate; + } + + public void setBeginDate(Long beginDate) { + this.beginDate = beginDate; + } + + public Long getEndDate() { + return this.endDate; + } + + public void setEndDate(Long endDate) { + this.endDate = endDate; + } + + public String getValidDateCron() { + return this.validDateCron; + } + + public void setValidDateCron(String validDateCron) { + this.validDateCron = validDateCron; + } + + public String getValidDateJson() { + return this.validDateJson; + } + + public void setValidDateJson(String validDateJson) { + this.validDateJson = validDateJson; + } + + public List getExcludeLabels() { + return this.excludeLabels; + } + + public void setExcludeLabels(List excludeLabels) { + this.excludeLabels = excludeLabels; + } + + public List getIncludeOrganizations() { + return this.includeOrganizations; + } + + public void setIncludeOrganizations(List includeOrganizations) { + this.includeOrganizations = includeOrganizations; + } + + public List getIncludeLabels() { + return this.includeLabels; + } + + public void setIncludeLabels(List includeLabels) { + this.includeLabels = includeLabels; + } + + public List getPassableCycle() { + return this.passableCycle; + } + + public void setPassableCycle(List passableCycle) { + this.passableCycle = passableCycle; + } + + public Integer getPassType() { + return this.passType; + } + + public void setPassType(Integer passType) { + this.passType = passType; + } + + public String getZoneId() { + return this.zoneId; + } + + public void setZoneId(String zoneId) { + this.zoneId = zoneId; + } + + public String getZoneName() { + return this.zoneName; + } + + public void setZoneName(String zoneName) { + this.zoneName = zoneName; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/result/ImageRuleRefPageResult.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/result/ImageRuleRefPageResult.java new file mode 100644 index 00000000..f34cbe34 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/result/ImageRuleRefPageResult.java @@ -0,0 +1,154 @@ +package cn.cloudwalk.elevator.passrule.result; + +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.ImgStorePersonResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.label.result.LabelDetailResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.organization.result.OrganizationResult; +import java.util.List; + +public class ImageRuleRefPageResult { + private static final long serialVersionUID = -90554404684210529L; + private String id; + private String ruleName; + private int personSum; + private String imageStoreId; + private String passableTimeName; + private String zoneId; + private Long beginDate; + private Long endDate; + private String validDateCron; + private String validDateJson; + private List excludeLabels; + private List includeOrganizations; + private List includeLabels; + private List includePersons; + private Integer passType; + private Integer isDefault; + + public String getRuleName() { + return this.ruleName; + } + + public void setRuleName(String ruleName) { + this.ruleName = ruleName; + } + + public int getPersonSum() { + return this.personSum; + } + + public void setPersonSum(int personSum) { + this.personSum = personSum; + } + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public String getImageStoreId() { + return this.imageStoreId; + } + + public void setImageStoreId(String imageStoreId) { + this.imageStoreId = imageStoreId; + } + + public String getZoneId() { + return this.zoneId; + } + + public void setZoneId(String zoneId) { + this.zoneId = zoneId; + } + + public Long getBeginDate() { + return this.beginDate; + } + + public void setBeginDate(Long beginDate) { + this.beginDate = beginDate; + } + + public Long getEndDate() { + return this.endDate; + } + + public void setEndDate(Long endDate) { + this.endDate = endDate; + } + + public String getValidDateCron() { + return this.validDateCron; + } + + public void setValidDateCron(String validDateCron) { + this.validDateCron = validDateCron; + } + + public String getValidDateJson() { + return this.validDateJson; + } + + public void setValidDateJson(String validDateJson) { + this.validDateJson = validDateJson; + } + + public List getExcludeLabels() { + return this.excludeLabels; + } + + public void setExcludeLabels(List excludeLabels) { + this.excludeLabels = excludeLabels; + } + + public List getIncludeOrganizations() { + return this.includeOrganizations; + } + + public void setIncludeOrganizations(List includeOrganizations) { + this.includeOrganizations = includeOrganizations; + } + + public List getIncludeLabels() { + return this.includeLabels; + } + + public void setIncludeLabels(List includeLabels) { + this.includeLabels = includeLabels; + } + + public String getPassableTimeName() { + return this.passableTimeName; + } + + public void setPassableTimeName(String passableTimeName) { + this.passableTimeName = passableTimeName; + } + + public List getIncludePersons() { + return this.includePersons; + } + + public void setIncludePersons(List includePersons) { + this.includePersons = includePersons; + } + + public Integer getPassType() { + return this.passType; + } + + public void setPassType(Integer passType) { + this.passType = passType; + } + + public Integer getIsDefault() { + return this.isDefault; + } + + public void setIsDefault(Integer isDefault) { + this.isDefault = isDefault; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/service/AcsPassRuleService.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/service/AcsPassRuleService.java new file mode 100644 index 00000000..63bf6606 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/service/AcsPassRuleService.java @@ -0,0 +1,49 @@ +package cn.cloudwalk.elevator.passrule.service; + +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.page.CloudwalkPageInfo; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleImageResultDto; +import cn.cloudwalk.elevator.passrule.param.AcsPassRuleDeleteParam; +import cn.cloudwalk.elevator.passrule.param.AcsPassRuleEditParam; +import cn.cloudwalk.elevator.passrule.param.AcsPassRuleFloorParam; +import cn.cloudwalk.elevator.passrule.param.AcsPassRuleImageParam; +import cn.cloudwalk.elevator.passrule.param.AcsPassRuleIsDefaultParam; +import cn.cloudwalk.elevator.passrule.param.AcsPassRuleNewParam; +import cn.cloudwalk.elevator.passrule.param.AcsPassRuleQueryParam; +import cn.cloudwalk.elevator.passrule.result.AcsPassRuleDetailResult; +import cn.cloudwalk.elevator.passrule.result.AcsPassRuleFloorResult; +import cn.cloudwalk.elevator.passrule.result.AcsPassRuleResult; +import java.util.List; + +public interface AcsPassRuleService { + CloudwalkResult> listFloor(AcsPassRuleFloorParam paramAcsPassRuleFloorParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult getIsDefaultByZoneId(AcsPassRuleIsDefaultParam paramAcsPassRuleIsDefaultParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult add(AcsPassRuleNewParam paramAcsPassRuleNewParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult update(AcsPassRuleEditParam paramAcsPassRuleEditParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult delete(AcsPassRuleDeleteParam paramAcsPassRuleDeleteParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult detail(AcsPassRuleQueryParam paramAcsPassRuleQueryParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult> page(AcsPassRuleQueryParam paramAcsPassRuleQueryParam, + CloudwalkPageInfo paramCloudwalkPageInfo, CloudwalkCallContext paramCloudwalkCallContext) + throws ServiceException; + + CloudwalkResult> list(AcsPassRuleQueryParam paramAcsPassRuleQueryParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult> listByImageId(AcsPassRuleImageParam paramAcsPassRuleImageParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/service/ImageRuleRefService.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/service/ImageRuleRefService.java new file mode 100644 index 00000000..d55c56e7 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/passrule/service/ImageRuleRefService.java @@ -0,0 +1,49 @@ +package cn.cloudwalk.elevator.passrule.service; + +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.page.CloudwalkPageInfo; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleImageResultDto; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRulePersonListResultDto; +import cn.cloudwalk.elevator.passrule.param.AcsPassRuleDeleteParam; +import cn.cloudwalk.elevator.passrule.param.AcsPassRuleEditParam; +import cn.cloudwalk.elevator.passrule.param.AcsPassRuleFloorParam; +import cn.cloudwalk.elevator.passrule.param.AcsPassRuleImageParam; +import cn.cloudwalk.elevator.passrule.param.AcsPassRuleNewParam; +import cn.cloudwalk.elevator.passrule.param.AcsPassRulePersonListParam; +import cn.cloudwalk.elevator.passrule.param.AcsPassRuleQueryParam; +import cn.cloudwalk.elevator.passrule.result.AcsPassRuleFloorResult; +import cn.cloudwalk.elevator.passrule.result.ImageRuleRefDetailResult; +import cn.cloudwalk.elevator.passrule.result.ImageRuleRefPageResult; +import java.util.List; + +public interface ImageRuleRefService { + CloudwalkResult> page(AcsPassRuleQueryParam paramAcsPassRuleQueryParam, + CloudwalkPageInfo paramCloudwalkPageInfo, CloudwalkCallContext paramCloudwalkCallContext) + throws ServiceException; + + CloudwalkResult> + listFloor(AcsPassRuleFloorParam paramAcsPassRuleFloorParam, CloudwalkCallContext paramCloudwalkCallContext) + throws ServiceException; + + CloudwalkResult> listByPersonInfo(AcsPassRuleImageParam paramAcsPassRuleImageParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult> listByPersonList( + AcsPassRulePersonListParam paramAcsPassRulePersonListParam, CloudwalkCallContext paramCloudwalkCallContext) + throws ServiceException; + + CloudwalkResult detail(AcsPassRuleQueryParam paramAcsPassRuleQueryParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult addOnlyRule(AcsPassRuleNewParam paramAcsPassRuleNewParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult update(AcsPassRuleEditParam paramAcsPassRuleEditParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult delete(AcsPassRuleDeleteParam paramAcsPassRuleDeleteParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/impl/AcsPersonServiceImpl.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/impl/AcsPersonServiceImpl.java new file mode 100644 index 00000000..c41eb966 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/impl/AcsPersonServiceImpl.java @@ -0,0 +1,547 @@ +package cn.cloudwalk.elevator.person.impl; + +import cn.cloudwalk.client.cwoscomponent.intelligent.application.param.ApplicationImageStoreQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.biology.service.BiologyToolService; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceImageStoreQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceApplicationResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceImageStoreResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.service.DeviceApplicationService; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.service.DeviceImageStoreService; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStorePersonBindParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStorePersonDelParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStorePersonQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStoreQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.ImageStoreListResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.ImageStorePersonResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.ImgStoreBatchBindPersonResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.service.ImageStorePersonService; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.service.ImageStoreService; +import cn.cloudwalk.client.cwoscomponent.intelligent.person.param.PersonAddParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.person.param.PersonQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.person.result.PersonResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.person.service.PersonService; +import cn.cloudwalk.cloud.annotation.CloudwalkParamsValidate; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.entity.CloudwalkBaseIdentify; +import cn.cloudwalk.cloud.exception.DataAccessException; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.page.CloudwalkPageInfo; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.cloud.utils.BeanCopyUtils; +import cn.cloudwalk.elevator.em.AcsPassTypeEnum; +import cn.cloudwalk.elevator.passrule.dao.AcsPassRuleDao; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleQueryDto; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleResultDto; +import cn.cloudwalk.elevator.passrule.impl.AbstractAcsPassService; +import cn.cloudwalk.elevator.passrule.param.AcsPassRuleIsDefaultParam; +import cn.cloudwalk.elevator.passrule.param.AcsPassRuleQueryParam; +import cn.cloudwalk.elevator.passrule.param.AcsPassTimeCycleParam; +import cn.cloudwalk.elevator.passrule.result.AcsPassRuleResult; +import cn.cloudwalk.elevator.passrule.service.AcsPassRuleService; +import cn.cloudwalk.elevator.person.param.AcsPersonAddNewParam; +import cn.cloudwalk.elevator.person.param.AcsPersonAddParam; +import cn.cloudwalk.elevator.person.param.AcsPersonDeleteParam; +import cn.cloudwalk.elevator.person.param.AcsPersonEditParam; +import cn.cloudwalk.elevator.person.param.AcsPersonQueryByAppParam; +import cn.cloudwalk.elevator.person.param.AcsPersonQueryParam; +import cn.cloudwalk.elevator.person.param.AcsPersonTimeDetailParam; +import cn.cloudwalk.elevator.person.result.AcsPersonResult; +import cn.cloudwalk.elevator.person.result.AcsPersonTimeDetailResult; +import cn.cloudwalk.elevator.person.service.AcsPersonService; +import cn.cloudwalk.elevator.util.CollectionUtils; +import cn.cloudwalk.elevator.util.DateUtils; +import cn.cloudwalk.elevator.util.StringUtils; +import com.alibaba.fastjson.JSONObject; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.Date; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import javax.annotation.Resource; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class AcsPersonServiceImpl extends AbstractAcsPassService implements AcsPersonService { + private static final int ROWS_OF_PAGE = 1000; + @Autowired + private BiologyToolService biologyToolService; + @Autowired + private DeviceImageStoreService deviceImageStoreService; + @Autowired + private ImageStorePersonService imageStorePersonService; + @Autowired + private DeviceApplicationService deviceApplicationService; + @Autowired + private PersonService personService; + @Autowired + private ImageStoreService imageStoreService; + @Resource + private AcsPassRuleService acsPassRuleService; + @Resource + private AcsPassRuleDao acsPassRuleDao; + + @CloudwalkParamsValidate + public CloudwalkResult add(AcsPersonAddParam param, CloudwalkCallContext context) throws ServiceException { + this.logger.info("从现有人员添加通行人员开始,AcsPersonAddParam=[{}], CloudwalkCallContext=[{}]", + JSONObject.toJSONString(param), JSONObject.toJSONString(context)); + String acsImageStoreId = getAcsImageStore(param.getZoneId(), context); + ImageStorePersonBindParam imageStorePersonBindParam = new ImageStorePersonBindParam(); + imageStorePersonBindParam.setImageStoreId(acsImageStoreId); + imageStorePersonBindParam.setPersonIds(param.getPersonIds()); + imageStorePersonBindParam.setNullDateIsLongTerm(Boolean.valueOf(true)); + imageStorePersonBindParam.setExpiryBeginDate(param.getStartTime()); + imageStorePersonBindParam.setExpiryEndDate(param.getEndTime()); + this.logger.info("远程调用绑定人员图库开始,imageStorePersonBindParam=[{}], CloudwalkCallContext=[{}]", + JSONObject.toJSONString(imageStorePersonBindParam), JSONObject.toJSONString(context)); + CloudwalkResult bindResult = + this.imageStorePersonService.batchBind(imageStorePersonBindParam, context); + if (!bindResult.isSuccess()) { + this.logger.error("远程调用绑定人员图库异常,原因:[{}],失败人员id:[{}]", bindResult.getMessage(), + ((ImgStoreBatchBindPersonResult)bindResult.getData()).getFailPersonIds()); + return CloudwalkResult.fail(bindResult.getCode(), bindResult.getMessage()); + } + return CloudwalkResult.success(Boolean.valueOf(true)); + } + + private void bindImageStorePerson(String acsImageStoreId, String personId, Long startTime, Long endTime, + CloudwalkCallContext context) throws ServiceException { + ImageStorePersonBindParam imageStorePersonBindParam = new ImageStorePersonBindParam(); + imageStorePersonBindParam.setImageStoreId(acsImageStoreId); + imageStorePersonBindParam.setNullDateIsLongTerm(Boolean.valueOf(true)); + imageStorePersonBindParam.setPersonId(personId); + imageStorePersonBindParam.setExpiryBeginDate(startTime); + imageStorePersonBindParam.setExpiryEndDate(endTime); + this.logger.info("图库人员关系绑定开始,imageStorePersonBindParam:[{}],context:[{}]", + JSONObject.toJSONString(imageStorePersonBindParam), JSONObject.toJSONString(context)); + CloudwalkResult bindResult = this.imageStorePersonService.bind(imageStorePersonBindParam, context); + if (!bindResult.isSuccess()) { + this.logger.error("图库人员关系绑定失败,imageStoreId=[{}],personId=[{}],原因:[{}]", + new Object[] {acsImageStoreId, personId, bindResult.getMessage()}); + throw new ServiceException(bindResult.getCode(), bindResult.getMessage()); + } + } + + private String addPerson(AcsPersonAddNewParam param, CloudwalkCallContext context) throws ServiceException { + PersonAddParam personAddParam = new PersonAddParam(); + BeanCopyUtils.copyProperties(param.getPersonProperties(), personAddParam); + CloudwalkResult addPersonResult = this.personService.add(personAddParam, context); + if (!addPersonResult.isSuccess()) { + this.logger.info("新增人员失败,原因:[{}]", addPersonResult.getMessage()); + throw new ServiceException(addPersonResult.getCode(), addPersonResult.getMessage()); + } + return (String)addPersonResult.getData(); + } + + @CloudwalkParamsValidate + public CloudwalkResult edit(AcsPersonEditParam param, CloudwalkCallContext context) + throws ServiceException { + this.logger.info("编辑通行人员开始,AcsPersonEditParam=[{}], CloudwalkCallContext=[{}]", JSONObject.toJSONString(param), + JSONObject.toJSONString(context)); + checkPersonIdByImageStore(param.getPersonId(), param.getImageStoreId(), context); + ImageStorePersonDelParam delParam = new ImageStorePersonDelParam(); + delParam.setImageStoreId(param.getImageStoreId()); + delParam.setPersonId(param.getPersonId()); + this.logger.info("远程调用解绑图库人员开始,ImageStorePersonDelParam=[{}], CloudwalkCallContext=[{}]", + JSONObject.toJSONString(delParam), JSONObject.toJSONString(context)); + CloudwalkResult deleteResult = this.imageStorePersonService.delete(delParam, context); + if (!deleteResult.isSuccess()) { + this.logger.error("图库人员更新之前先解绑失败,原因:[{}]", deleteResult.getMessage()); + return CloudwalkResult.fail("76260406", getMessage("76260406") + " " + deleteResult.getMessage()); + } + bindImageStorePerson(param.getImageStoreId(), param.getPersonId(), param.getStartTime(), param.getEndTime(), + context); + return CloudwalkResult.success(Boolean.valueOf(true)); + } + + @CloudwalkParamsValidate + public CloudwalkResult delete(AcsPersonDeleteParam param, CloudwalkCallContext context) + throws ServiceException { + this.logger.info("删除门禁通行人员开始,AcsPersonDeleteParam=[{}], CloudwalkCallContext=[{}]", + JSONObject.toJSONString(param), JSONObject.toJSONString(context)); + for (String personId : param.getPersonIds()) { + ImageStorePersonDelParam imageStorePersonDelParam = new ImageStorePersonDelParam(); + imageStorePersonDelParam.setPersonId(personId); + imageStorePersonDelParam.setImageStoreId(param.getImageStoreId()); + CloudwalkResult imageStorePersonDeleteResult = + this.imageStorePersonService.delete(imageStorePersonDelParam, context); + if (!imageStorePersonDeleteResult.isSuccess()) { + return CloudwalkResult.fail("76260407", + getMessage("76260407") + " " + imageStorePersonDeleteResult.getMessage()); + } + } + return CloudwalkResult.success(Boolean.valueOf(true)); + } + + private List + sortedDeviceAppList(CloudwalkResult> deviceAppResult) { + List deviceAppList = (List)deviceAppResult.getData(); + List sortedDeviceAppList = new ArrayList<>(); + List acsAppList = (List)deviceAppList.stream() + .filter(s -> "elevator-app".equals(s.getServiceCode())).collect(Collectors.toList()); + List otherAppList = (List)deviceAppList.stream() + .filter(s -> !"elevator-app".equals(s.getServiceCode())).collect(Collectors.toList()); + sortedDeviceAppList.addAll(acsAppList); + sortedDeviceAppList.addAll(otherAppList); + return sortedDeviceAppList; + } + + @CloudwalkParamsValidate + public CloudwalkResult> page(AcsPersonQueryParam param, + CloudwalkPageInfo pageInfo, CloudwalkCallContext context) throws ServiceException { + this.logger.info("分页查询通行人员开始,AcsPersonQueryParam=[{}], CloudwalkPageInfo=[{}], CloudwalkCallContext=[{}]", + new Object[] {JSONObject.toJSONString(param), JSONObject.toJSONString(pageInfo), + JSONObject.toJSONString(context)}); + List result = new ArrayList<>(); + List personIds = null; + List ruleResults = getRuleListByZoneId(param.getZoneId(), context); + if (CollectionUtils.isEmpty(ruleResults)) { + return CloudwalkResult.success(new CloudwalkPageAble(result, pageInfo, 0L)); + } + List imageStoreIds = + (List)ruleResults.stream().map(AcsPassRuleResult::getImageStoreId).collect(Collectors.toList()); + if (StringUtils.isNotBlank(param.getImageStoreId()) && !imageStoreIds.contains(param.getImageStoreId())) { + return CloudwalkResult.success(new CloudwalkPageAble(result, pageInfo, 0L)); + } + Map ruleMap = (Map)ruleResults.stream() + .collect(Collectors.toMap(AcsPassRuleResult::getImageStoreId, r -> r)); + if (!StringUtils.isEmpty(param.getPersonName())) { + personIds = getPersonIdsByName(param.getPersonName(), context); + if (CollectionUtils.isEmpty(personIds)) { + return CloudwalkResult.success(new CloudwalkPageAble(result, pageInfo, 0L)); + } + } + CloudwalkPageAble pageResult = + getImageStorePerson(param, pageInfo, context, personIds, imageStoreIds); + if (!CollectionUtils.isEmpty(pageResult.getDatas())) { + covertPageResult(result, pageResult.getDatas(), ruleMap, context); + } + return CloudwalkResult.success(new CloudwalkPageAble(result, pageInfo, pageResult.getTotalRows())); + } + + private List getImageStoreIdsByAppAndDevice(String applicationId, String deviceId, + CloudwalkCallContext context) throws ServiceException { + ApplicationImageStoreQueryParam queryParam = new ApplicationImageStoreQueryParam(); + queryParam.setApplicationId(applicationId); + List deviceImageStore = getDeviceImageStore(deviceId, context); + if (deviceImageStore.isEmpty()) { + return new ArrayList<>(); + } + List imageStoreIdByDevice = (List)deviceImageStore.stream() + .map(DeviceImageStoreResult::getImageStoreId).collect(Collectors.toList()); + ImageStoreQueryParam imageStoreQueryParam = new ImageStoreQueryParam(); + imageStoreQueryParam.setBusinessId(context.getCompany().getCompanyId()); + imageStoreQueryParam.setApplicationId(applicationId); + imageStoreQueryParam.setIds(imageStoreIdByDevice); + CloudwalkResult> imageStoreResult = + this.imageStoreService.list(imageStoreQueryParam, context); + return (List)imageStoreResult.getData(); + } + + private CloudwalkPageAble getImageStorePerson(AcsPersonQueryParam param, + CloudwalkPageInfo pageInfo, CloudwalkCallContext context, List personIds, List imageStoreIds) + throws ServiceException { + CloudwalkPageAble results = new CloudwalkPageAble(); + ImageStorePersonQueryParam imageStorePersonQueryParam = new ImageStorePersonQueryParam(); + imageStorePersonQueryParam.setImageStoreId(param.getImageStoreId()); + if (StringUtils.isEmpty(param.getImageStoreId())) { + imageStorePersonQueryParam.setImageStoreIds(imageStoreIds); + } + imageStorePersonQueryParam.setPersonIds(personIds); + imageStorePersonQueryParam.setOrganizationIds(param.getOrganizationIds()); + imageStorePersonQueryParam.setLabelIds(param.getLabelIds()); + imageStorePersonQueryParam.setCurrentPage(pageInfo.getCurrentPage()); + imageStorePersonQueryParam.setRowsOfPage(pageInfo.getPageSize()); + CloudwalkResult> pageResult = + this.imageStorePersonService.page(imageStorePersonQueryParam, context); + if (!pageResult.isSuccess()) { + this.logger.error("远程调用查询图库人员失败,原因:[{}]", pageResult.getMessage()); + throw new ServiceException(pageResult.getCode(), pageResult.getMessage()); + } + if (!CollectionUtils.isEmpty(((CloudwalkPageAble)pageResult.getData()).getDatas())) { + results = (CloudwalkPageAble)pageResult.getData(); + } + return results; + } + + public CloudwalkResult timeDetail(AcsPersonTimeDetailParam param, + CloudwalkCallContext context) throws ServiceException { + this.logger.info("查询通行人员时间详情开始,AcsPersonTimeDetailParam=[{}], CloudwalkCallContext=[{}]", + JSONObject.toJSONString(param), JSONObject.toJSONString(context)); + AcsPersonTimeDetailResult result = new AcsPersonTimeDetailResult(); + ImageStorePersonResult imageStorePersonResult = getImageStorePersonResult(param, context); + AcsPassRuleResult rule = getRuleByImageStore(param.getImageStoreId(), context); + result.setBeginDate(imageStorePersonResult.getExpiryBeginDate()); + result.setEndDate(imageStorePersonResult.getExpiryEndDate()); + result.setPassType(AcsPassTypeEnum.LONG_TIME.getCode()); + if (imageStorePersonResult.getExpiryBeginDate() != null || imageStorePersonResult.getExpiryEndDate() != null) { + result.setPassType(AcsPassTypeEnum.AUTO_PASS.getCode()); + } + if (!CollectionUtils.isEmpty(imageStorePersonResult.getValidDateCron())) { + BeanCopyUtils.copyProperties(rule, result); + result.setPassableTimeName(rule.getPassableTimeName()); + List timeCycleParams = + JSONObject.parseArray(rule.getValidDateJson(), AcsPassTimeCycleParam.class); + result.setPassableCycle(timeCycleParams); + result.setPassType(AcsPassTypeEnum.PASS_TIME.getCode()); + } + ImageStorePersonQueryParam imageStorePersonQueryParam = new ImageStorePersonQueryParam(); + imageStorePersonQueryParam.setPersonId(param.getPersonId()); + imageStorePersonQueryParam.setRowsOfPage(1000); + CloudwalkResult> imageStorePersonPageResult = + this.imageStorePersonService.page(imageStorePersonQueryParam, context); + ImageStorePersonResult imageStoreResult = + ((CloudwalkPageAble)imageStorePersonPageResult.getData()).getDatas().iterator().next(); + result.setComparePicture(imageStoreResult.getComparePicture()); + result.setPersonName(imageStoreResult.getName()); + result.setPersonId(imageStoreResult.getPersonId()); + return CloudwalkResult.success(result); + } + + private AcsPassRuleResult getRuleByImageStore(String imageStoreId, CloudwalkCallContext context) + throws ServiceException { + AcsPassRuleQueryParam ruleQueryParam = new AcsPassRuleQueryParam(); + ruleQueryParam.setImageStoreId(imageStoreId); + CloudwalkResult> results = this.acsPassRuleService.list(ruleQueryParam, context); + return ((List)results.getData()).get(0); + } + + private ImageStorePersonResult getImageStorePersonResult(AcsPersonTimeDetailParam param, + CloudwalkCallContext context) throws ServiceException { + ImageStorePersonQueryParam imageStorePersonQueryParam = new ImageStorePersonQueryParam(); + imageStorePersonQueryParam.setImageStoreId(param.getImageStoreId()); + imageStorePersonQueryParam.setPersonId(param.getPersonId()); + CloudwalkResult> pageResult = + this.imageStorePersonService.page(imageStorePersonQueryParam, context); + if (!pageResult.isSuccess() || CollectionUtils.isEmpty(((CloudwalkPageAble)pageResult.getData()).getDatas())) { + this.logger.error("远程调用查询通行人员失败,原因:" + pageResult.getMessage()); + throw new ServiceException("远程调用查询通行人员失败"); + } + List list = + (List)((CloudwalkPageAble)pageResult.getData()).getDatas(); + return list.get(0); + } + + private List mergeTime(List imageStorePersonList) { + List passIntervals = new ArrayList<>(); + List personLongTerm = (List)imageStorePersonList.stream() + .filter(s -> (s.getExpiryBeginDate() == null && s.getExpiryEndDate() == null)).collect(Collectors.toList()); + if (CollectionUtils.isNotEmpty(personLongTerm)) { + passIntervals.add("长期"); + } else { + Collections.sort(imageStorePersonList, + (t1, t2) -> t1.getExpiryBeginDate().compareTo(t2.getExpiryEndDate())); + for (int i = 0; i < imageStorePersonList.size() - 1; i++) { + int j = i + 1; + if (((ImageStorePersonResult)imageStorePersonList.get(i)).getExpiryEndDate() + .longValue() >= ((ImageStorePersonResult)imageStorePersonList.get(j)).getExpiryBeginDate() + .longValue()) { + if (((ImageStorePersonResult)imageStorePersonList.get(i)).getExpiryEndDate() + .longValue() >= ((ImageStorePersonResult)imageStorePersonList.get(j)).getExpiryEndDate() + .longValue()) { + imageStorePersonList.set(j, imageStorePersonList.get(i)); + } else { + ((ImageStorePersonResult)imageStorePersonList.get(j)).setExpiryBeginDate( + ((ImageStorePersonResult)imageStorePersonList.get(i)).getExpiryBeginDate()); + } + imageStorePersonList.set(i, (ImageStorePersonResult)null); + } + } + List personTimeMergeList = (List)imageStorePersonList + .stream().filter(s -> (s != null)).collect(Collectors.toList()); + for (ImageStorePersonResult personTimeMerge : personTimeMergeList) { + String beginDate = DateUtils.parseDate(new Date(personTimeMerge.getExpiryBeginDate().longValue()), + "yyyy-MM-dd HH:mm:ss"); + String endDate = DateUtils.parseDate(new Date(personTimeMerge.getExpiryEndDate().longValue()), + "yyyy-MM-dd HH:mm:ss"); + passIntervals.add(beginDate + " 至 " + endDate); + } + } + return passIntervals; + } + + private void covertPageResult(List result, Collection datas, + Map ruleMap, CloudwalkCallContext context) throws ServiceException { + List personIds = + (List)datas.stream().map(ImageStorePersonResult::getPersonId).collect(Collectors.toList()); + Map personIcCardMap = getPersonIcCardByIds(personIds, context); + for (ImageStorePersonResult data : datas) { + AcsPassRuleResult rule = null; + AcsPersonResult acsPersonResult = new AcsPersonResult(); + if (ruleMap != null && ruleMap.get(data.getImageStoreId()) != null) { + rule = ruleMap.get(data.getImageStoreId()); + acsPersonResult.setRuleName(rule.getRuleName()); + acsPersonResult.setRuleId(rule.getId()); + } + BeanCopyUtils.copyProperties(data, acsPersonResult); + acsPersonResult.setPersonName(data.getName()); + acsPersonResult.setStartTime(data.getExpiryBeginDate()); + acsPersonResult.setEndTime(data.getExpiryEndDate()); + acsPersonResult.setPassType(AcsPassTypeEnum.LONG_TIME.getCode()); + if (data.getExpiryBeginDate() != null || data.getExpiryEndDate() != null) { + acsPersonResult.setPassType(AcsPassTypeEnum.AUTO_PASS.getCode()); + } + if (personIcCardMap != null && personIcCardMap.get(data.getPersonId()) != null) { + acsPersonResult.setIcCardNo(((PersonResult)personIcCardMap.get(data.getPersonId())).getIcCardNo()); + } + result.add(acsPersonResult); + } + } + + private Map getPersonIcCardByIds(List personIds, CloudwalkCallContext context) + throws ServiceException { + Map personIcCardMap = null; + PersonQueryParam param = new PersonQueryParam(); + param.setIds(personIds); + CloudwalkResult> personResult = this.personService.list(param, context); + List personList = (List)personResult.getData(); + if (personResult.isSuccess() && CollectionUtils.isNotEmpty(personList)) { + personIcCardMap = (Map)personList.stream() + .collect(Collectors.toMap(CloudwalkBaseIdentify::getId, personResult -> personResult)); + } + return personIcCardMap; + } + + private List getPersonIdsByName(String personName, CloudwalkCallContext context) throws ServiceException { + List personIdsByName = new ArrayList<>(); + if (StringUtils.isNotBlank(personName)) { + PersonQueryParam personQueryParam = new PersonQueryParam(); + personQueryParam.setName(personName); + CloudwalkResult> personResult = this.personService.list(personQueryParam, context); + List personList = (List)personResult.getData(); + if (personResult.isSuccess() && CollectionUtils.isNotEmpty(personList)) { + personIdsByName = + (List)personList.stream().map(CloudwalkBaseIdentify::getId).collect(Collectors.toList()); + } + } + return personIdsByName; + } + + private List getRuleListByZoneId(String zoneId, CloudwalkCallContext context) + throws ServiceException { + AcsPassRuleQueryParam param = new AcsPassRuleQueryParam(); + param.setZoneId(zoneId); + CloudwalkResult> ruleResult = this.acsPassRuleService.list(param, context); + if (!ruleResult.isSuccess()) { + this.logger.error("查询通行规则失败,原因:[{}]", ruleResult.getMessage()); + throw new ServiceException("76260508", ruleResult.getMessage()); + } + return (List)ruleResult.getData(); + } + + private String getAcsImageStore(String zoneId, CloudwalkCallContext context) throws ServiceException { + AcsPassRuleIsDefaultParam param = new AcsPassRuleIsDefaultParam(); + param.setZoneId(zoneId); + CloudwalkResult imageStore = this.acsPassRuleService.getIsDefaultByZoneId(param, context); + if (imageStore.isSuccess()) { + if (imageStore.getData() != null) { + return (String)imageStore.getData(); + } + throw new ServiceException("默认规则绑定的图库不存在"); + } + throw new ServiceException(imageStore.getCode(), imageStore.getMessage()); + } + + private void checkPersonIdByImageStore(String personId, String acsImageStoreId, CloudwalkCallContext context) + throws ServiceException { + ImageStorePersonQueryParam imageStorePersonQueryParam = new ImageStorePersonQueryParam(); + imageStorePersonQueryParam.setPersonId(personId); + imageStorePersonQueryParam.setImageStoreId(acsImageStoreId); + CloudwalkResult> imageStorePersonResult = + this.imageStorePersonService.page(imageStorePersonQueryParam, context); + if (imageStorePersonResult.isSuccess()) { + if (imageStorePersonResult.getData() == null + || CollectionUtils.isEmpty(((CloudwalkPageAble)imageStorePersonResult.getData()).getDatas())) { + throw new ServiceException("该人员未绑定门禁图库,人员id为:" + personId); + } + } else { + throw new ServiceException(imageStorePersonResult.getCode(), imageStorePersonResult.getMessage()); + } + } + + private List getDeviceImageStore(String deviceId, CloudwalkCallContext context) + throws ServiceException { + DeviceImageStoreQueryParam deviceImageStoreQueryParam = new DeviceImageStoreQueryParam(); + deviceImageStoreQueryParam.setDeviceId(deviceId); + CloudwalkResult> imageStoreResult = + this.deviceImageStoreService.list(deviceImageStoreQueryParam, context); + if (imageStoreResult.isSuccess()) { + if (CollectionUtils.isNotEmpty((Collection)imageStoreResult.getData())) { + return (List)imageStoreResult.getData(); + } + throw new ServiceException("该设备未绑定图库"); + } + throw new ServiceException(imageStoreResult.getCode(), imageStoreResult.getMessage()); + } + + @CloudwalkParamsValidate + public CloudwalkResult> pageByApp(AcsPersonQueryByAppParam param, + CloudwalkPageInfo pageInfo, CloudwalkCallContext context) throws ServiceException { + List personIds = null; + List result = new ArrayList<>(); + List imageStoreResult = + getImageStoreIdsByAppAndDevice(param.getApplicationId(), param.getDeviceId(), context); + List imageStoreIds = + (List)imageStoreResult.stream().map(ImageStoreListResult::getId).collect(Collectors.toList()); + if (CollectionUtils.isEmpty(imageStoreIds)) { + return CloudwalkResult.success(new CloudwalkPageAble(result, pageInfo, 0L)); + } + if (!StringUtils.isEmpty(param.getPersonName())) { + personIds = getPersonIdsByName(param.getPersonName(), context); + if (CollectionUtils.isEmpty(personIds)) { + return CloudwalkResult.success(new CloudwalkPageAble(result, pageInfo, 0L)); + } + } + CloudwalkPageAble pageResult = + getAppImageStorePerson(imageStoreIds, personIds, pageInfo, context); + if (!CollectionUtils.isEmpty(pageResult.getDatas())) { + covertPageResult(result, pageResult.getDatas(), (Map)null, context); + } + return CloudwalkResult.success(new CloudwalkPageAble(result, pageInfo, pageResult.getTotalRows())); + } + + private CloudwalkPageAble getAppImageStorePerson(List imageStoreIds, + List personIds, CloudwalkPageInfo pageInfo, CloudwalkCallContext context) throws ServiceException { + ImageStorePersonQueryParam param = new ImageStorePersonQueryParam(); + param.setImageStoreIds(imageStoreIds); + param.setPersonIds(personIds); + param.setCurrentPage(pageInfo.getCurrentPage()); + param.setRowsOfPage(pageInfo.getPageSize()); + CloudwalkResult> pageResult = + this.imageStorePersonService.page(param, context); + if (!pageResult.isSuccess()) { + this.logger.error("远程调用查询图库人员失败,原因:[{}]", pageResult.getMessage()); + throw new ServiceException(pageResult.getCode(), pageResult.getMessage()); + } + return (CloudwalkPageAble)pageResult.getData(); + } + + private List getRuleByImageStoreIds(List imageStoreIds, CloudwalkCallContext context) + throws ServiceException { + try { + AcsPassRuleQueryDto dto = new AcsPassRuleQueryDto(); + dto.setBusinessId(context.getCompany().getCompanyId()); + dto.setImageStoreIds(imageStoreIds); + return this.acsPassRuleDao.list(dto); + } catch (DataAccessException e) { + this.logger.error("查询通行规则失败"); + throw new ServiceException("76260508", getMessage("76260508")); + } + } + + private List getPersonImageStore(String personId, List imageStoreIds, + CloudwalkCallContext context) throws ServiceException { + ImageStorePersonQueryParam param = new ImageStorePersonQueryParam(); + param.setImageStoreIds(imageStoreIds); + param.setPersonId(personId); + CloudwalkResult> imageStorePersonResult = + this.imageStorePersonService.page(param, context); + if (!imageStorePersonResult.isSuccess()) { + throw new ServiceException(imageStorePersonResult.getCode(), imageStorePersonResult.getMessage()); + } + return (List)((CloudwalkPageAble)imageStorePersonResult.getData()).getDatas(); + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/impl/PersonRuleServiceImpl.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/impl/PersonRuleServiceImpl.java new file mode 100644 index 00000000..89e8d723 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/impl/PersonRuleServiceImpl.java @@ -0,0 +1,542 @@ +package cn.cloudwalk.elevator.person.impl; + +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStorePersonBindParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStorePersonQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.UpdateGroupPersonRefParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.ImageStorePersonResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.ImgStoreBatchBindPersonResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.service.ImageStorePersonService; +import cn.cloudwalk.client.cwoscomponent.intelligent.person.param.PersonDetailParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.person.param.PersonQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.person.result.PersonResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.person.service.PersonService; +import cn.cloudwalk.cloud.annotation.CloudwalkParamsValidate; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.entity.CloudwalkBaseIdentify; +import cn.cloudwalk.cloud.exception.DataAccessException; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.page.CloudwalkPageInfo; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.cloud.utils.BeanCopyUtils; +import cn.cloudwalk.elevator.device.dao.AcsElevatorDeviceDao; +import cn.cloudwalk.elevator.device.dao.DeviceImageStoreDao; +import cn.cloudwalk.elevator.device.dto.AcsElevatorDeviceListByBuildingIdDto; +import cn.cloudwalk.elevator.device.dto.AcsElevatorDeviceResultDTO; +import cn.cloudwalk.elevator.em.AcsPassTypeEnum; +import cn.cloudwalk.elevator.passrule.dao.ImageRuleRefDao; +import cn.cloudwalk.elevator.passrule.dto.ImageRuleRefAddDto; +import cn.cloudwalk.elevator.passrule.dto.ImageRuleRefResultDto; +import cn.cloudwalk.elevator.passrule.impl.AbstractAcsPassService; +import cn.cloudwalk.elevator.passrule.result.AcsPassRuleResult; +import cn.cloudwalk.elevator.person.param.AcsPersonAddParam; +import cn.cloudwalk.elevator.person.param.AcsPersonAddVisitorParam; +import cn.cloudwalk.elevator.person.param.AcsPersonDeleteParam; +import cn.cloudwalk.elevator.person.param.AcsPersonEditParam; +import cn.cloudwalk.elevator.person.param.AcsPersonQueryByAppParam; +import cn.cloudwalk.elevator.person.param.AcsPersonQueryParam; +import cn.cloudwalk.elevator.person.param.AcsPersonTimeDetailParam; +import cn.cloudwalk.elevator.person.param.PersonDetailQueryParam; +import cn.cloudwalk.elevator.person.result.AcsPersonResult; +import cn.cloudwalk.elevator.person.result.AcsPersonTimeDetailResult; +import cn.cloudwalk.elevator.person.service.PersonRuleService; +import cn.cloudwalk.elevator.util.CollectionUtils; +import cn.cloudwalk.elevator.util.StringUtils; +import cn.cloudwalk.elevator.zone.param.ZoneQueryParam; +import cn.cloudwalk.elevator.zone.result.ZoneResult; +import cn.cloudwalk.elevator.zone.service.ZoneService; +import com.alibaba.fastjson.JSONObject; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import javax.annotation.Resource; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.ObjectUtils; + +@Service +public class PersonRuleServiceImpl extends AbstractAcsPassService implements PersonRuleService { + @Resource + private ImageRuleRefDao imageRuleRefDao; + @Resource + private DeviceImageStoreDao deviceImageStoreDao; + @Autowired + private ImageStorePersonService imageStorePersonService; + @Autowired + private PersonService personService; + @Resource + private AcsElevatorDeviceDao acsElevatorDeviceDao; + @Resource + private ZoneService zoneService; + + @CloudwalkParamsValidate + @Transactional(propagation = Propagation.REQUIRED, rollbackFor = {Exception.class}) + public CloudwalkResult add(AcsPersonAddParam param, CloudwalkCallContext context) throws ServiceException { + this.logger.info("从现有人员添加通行人员开始,AcsPersonAddParam=[{}], CloudwalkCallContext=[{}]", + JSONObject.toJSONString(param), JSONObject.toJSONString(context)); + try { + AcsElevatorDeviceListByBuildingIdDto buildingIdDto = new AcsElevatorDeviceListByBuildingIdDto(); + buildingIdDto.setCurrentBuildingId(param.getParentId()); + buildingIdDto.setBusinessId(context.getCompany().getCompanyId()); + List deviceList = this.acsElevatorDeviceDao.listBuBuildingId(buildingIdDto); + if (CollectionUtils.isEmpty(deviceList)) { + return CloudwalkResult.fail("76260527", getMessage("76260527")); + } + ImageRuleRefResultDto defaultRule = this.imageRuleRefDao.getDefaultByZoneId(param.getZoneId()); + if (ObjectUtils.isEmpty(defaultRule)) { + ImageRuleRefAddDto dto = new ImageRuleRefAddDto(); + dto.setId(genUUID()); + dto.setBusinessId(context.getCompany().getCompanyId()); + dto.setName("默认规则"); + dto.setZoneId(param.getZoneId()); + dto.setZoneName(param.getZoneName()); + dto.setIsDefault(Integer.valueOf(1)); + dto.setCreateTime(Long.valueOf(System.currentTimeMillis())); + dto.setLastUpdateTime(Long.valueOf(System.currentTimeMillis())); + this.imageRuleRefDao.insert(dto); + defaultRule = this.imageRuleRefDao.getDefaultByZoneId(param.getZoneId()); + } + String imageStoreId = this.deviceImageStoreDao.getByBuildingId(param.getParentId()); + ImageStorePersonQueryParam queryParam = new ImageStorePersonQueryParam(); + queryParam.setImageStoreId(imageStoreId); + queryParam.setPersonIds(param.getPersonIds()); + CloudwalkResult> personPage = + this.imageStorePersonService.page(queryParam, context); + List personPageIds = new ArrayList<>(); + if (!CollectionUtils.isEmpty(((CloudwalkPageAble)personPage.getData()).getDatas())) { + for (ImageStorePersonResult personResult : ((CloudwalkPageAble)personPage.getData()).getDatas()) { + personPageIds.add(personResult.getPersonId()); + } + } + List bindPersonIds = new ArrayList<>(); + for (String personId : param.getPersonIds()) { + if (!personPageIds.contains(personId)) { + bindPersonIds.add(personId); + } + ImageRuleRefResultDto del = this.imageRuleRefDao.getDelByPersonIdAndZoneId(personId, param.getZoneId()); + if (ObjectUtils.isEmpty(del)) { + ImageRuleRefAddDto addDto = new ImageRuleRefAddDto(); + addDto.setId(genUUID()); + addDto.setBusinessId(context.getCompany().getCompanyId()); + addDto.setPersonId(personId); + addDto.setParentRule(defaultRule.getId()); + addDto.setName(defaultRule.getName()); + addDto.setZoneId(param.getZoneId()); + addDto.setZoneName(defaultRule.getZoneName()); + addDto.setCreateTime(Long.valueOf(System.currentTimeMillis())); + addDto.setLastUpdateTime(Long.valueOf(System.currentTimeMillis())); + addDto.setPersonDelete(Integer.valueOf(0)); + this.imageRuleRefDao.insert(addDto); + } + } + this.imageRuleRefDao.deleteByPersonIdsIsDel(param.getPersonIds(), param.getZoneId()); + if (!CollectionUtils.isEmpty(bindPersonIds)) { + ImageStorePersonBindParam imageStorePersonBindParam = new ImageStorePersonBindParam(); + imageStorePersonBindParam.setImageStoreId(imageStoreId); + imageStorePersonBindParam.setPersonIds(bindPersonIds); + imageStorePersonBindParam.setNullDateIsLongTerm(Boolean.valueOf(true)); + this.logger.info("远程调用绑定人员图库开始,imageStorePersonBindParam=[{}], CloudwalkCallContext=[{}]", + JSONObject.toJSONString(imageStorePersonBindParam), JSONObject.toJSONString(context)); + CloudwalkResult bindResult = + this.imageStorePersonService.batchBind(imageStorePersonBindParam, context); + if (!bindResult.isSuccess()) { + this.logger.error("远程调用绑定人员图库异常,原因:[{}],失败人员id:[{}]", bindResult.getMessage(), bindPersonIds); + return CloudwalkResult.fail(bindResult.getCode(), bindResult.getMessage()); + } + } + UpdateGroupPersonRefParam refParam = new UpdateGroupPersonRefParam(); + refParam.setBusinessId(context.getCompany().getCompanyId()); + refParam.setPersonIds(param.getPersonIds()); + refParam.setImageStoreId(imageStoreId); + this.imageStorePersonService.updateGroupPersonRef(refParam, context); + } catch (DataAccessException e) { + this.logger.error("添加通行人员失败,原因:[{}]", (Throwable)e); + throw new ServiceException("76260521", getMessage("76260521")); + } + return CloudwalkResult.success(Boolean.valueOf(true)); + } + + @CloudwalkParamsValidate + public CloudwalkResult addVisitor(AcsPersonAddVisitorParam param, CloudwalkCallContext context) + throws ServiceException { + this.logger.info("根据被访人添加访客派梯权限开始,AcsPersonAddVisitorParam=[{}], CloudwalkCallContext=[{}]", + JSONObject.toJSONString(param), JSONObject.toJSONString(context)); + try { + if (CollectionUtils.isEmpty(param.getFloorIds())) { + PersonDetailParam detailParam = new PersonDetailParam(); + detailParam.setId(param.getPersonId()); + detailParam.setBusinessId(context.getCompany().getCompanyId()); + CloudwalkResult detail = this.personService.detail(detailParam, context); + param.setFloorIds(((PersonResult)detail.getData()).getFloorList()); + } + ZoneQueryParam zoneQueryParam = new ZoneQueryParam(); + zoneQueryParam.setId(param.getFloorIds().get(0)); + zoneQueryParam.setRowsOfPage(10); + zoneQueryParam.setCurrentPage(1); + CloudwalkResult> zonePage = this.zoneService.page(zoneQueryParam, context); + List zoneResults = (List)((CloudwalkPageAble)zonePage.getData()).getDatas(); + String imageStoreId = + this.deviceImageStoreDao.getByBuildingId(((ZoneResult)zoneResults.get(0)).getParentId()); + List insertList = new ArrayList<>(); + for (String floorId : param.getFloorIds()) { + ImageRuleRefResultDto defaultRule = this.imageRuleRefDao.getDefaultByZoneId(floorId); + ImageRuleRefAddDto addDto = new ImageRuleRefAddDto(); + addDto.setId(genUUID()); + addDto.setBusinessId(context.getCompany().getCompanyId()); + addDto.setPersonId(param.getVisitorId()); + addDto.setParentRule(defaultRule.getId()); + addDto.setName(defaultRule.getName()); + addDto.setZoneId(defaultRule.getZoneId()); + addDto.setZoneName(defaultRule.getZoneName()); + addDto.setCreateTime(Long.valueOf(System.currentTimeMillis())); + addDto.setLastUpdateTime(Long.valueOf(System.currentTimeMillis())); + addDto.setPersonDelete(Integer.valueOf(0)); + insertList.add(addDto); + } + this.logger.info("访客添加派梯权限开始,数据为=[{}]", JSONObject.toJSONString(insertList)); + if (!CollectionUtils.isEmpty(insertList)) { + this.imageRuleRefDao.insertList(insertList); + } + ImageStorePersonBindParam imageStorePersonBindParam = new ImageStorePersonBindParam(); + imageStorePersonBindParam.setImageStoreId(imageStoreId); + imageStorePersonBindParam.setPersonIds(Collections.singletonList(param.getVisitorId())); + imageStorePersonBindParam.setNullDateIsLongTerm(Boolean.valueOf(true)); + imageStorePersonBindParam.setExpiryBeginDate(param.getBegVisitorTime()); + imageStorePersonBindParam.setExpiryEndDate(param.getEndVisitorTime()); + this.logger.info("远程调用绑定人员图库开始,imageStorePersonBindParam=[{}], CloudwalkCallContext=[{}]", + JSONObject.toJSONString(imageStorePersonBindParam), JSONObject.toJSONString(context)); + CloudwalkResult bindResult = + this.imageStorePersonService.batchBind(imageStorePersonBindParam, context); + if (!bindResult.isSuccess()) { + this.logger.error("远程调用绑定人员图库异常,原因:[{}],失败人员id:[{}]", bindResult.getMessage(), param.getVisitorId()); + return CloudwalkResult.fail(bindResult.getCode(), bindResult.getMessage()); + } + UpdateGroupPersonRefParam refParam = new UpdateGroupPersonRefParam(); + refParam.setBusinessId(context.getCompany().getCompanyId()); + refParam.setPersonIds(Collections.singletonList(param.getVisitorId())); + refParam.setImageStoreId(imageStoreId); + this.imageStorePersonService.updateGroupPersonRef(refParam, context); + } catch (Exception e) { + this.logger.error("根据被访人添加访客派梯权限失败,原因:[{}]", e); + throw new ServiceException("76260530", getMessage("76260530")); + } + return CloudwalkResult.success(Boolean.valueOf(true)); + } + + public CloudwalkResult edit(AcsPersonEditParam param, CloudwalkCallContext context) + throws ServiceException { + return null; + } + + public CloudwalkResult delete(AcsPersonDeleteParam param, CloudwalkCallContext context) + throws ServiceException { + this.logger.info("从现有人员删除通行人员开始,AcsPersonDeleteParam=[{}], CloudwalkCallContext=[{}]", + JSONObject.toJSONString(param), JSONObject.toJSONString(context)); + try { + String imageStoreId = this.deviceImageStoreDao.getByBuildingId(param.getParentId()); + for (String personId : param.getPersonIds()) { + ImageRuleRefResultDto rule = + this.imageRuleRefDao.getByPersonIdAndZoneId(Collections.singletonList(personId), param.getZoneId()); + if (!ObjectUtils.isEmpty(rule)) { + this.imageRuleRefDao.deleteByPersonId(personId, param.getZoneId()); + continue; + } + ImageRuleRefAddDto addDto = new ImageRuleRefAddDto(); + addDto.setId(genUUID()); + addDto.setBusinessId(context.getCompany().getCompanyId()); + addDto.setPersonId(personId); + addDto.setZoneId(param.getZoneId()); + addDto.setPersonDelete(Integer.valueOf(1)); + addDto.setCreateTime(Long.valueOf(System.currentTimeMillis())); + addDto.setLastUpdateTime(Long.valueOf(System.currentTimeMillis())); + this.imageRuleRefDao.insert(addDto); + } + UpdateGroupPersonRefParam refParam = new UpdateGroupPersonRefParam(); + refParam.setBusinessId(context.getCompany().getCompanyId()); + refParam.setPersonIds(param.getPersonIds()); + refParam.setImageStoreId(imageStoreId); + this.imageStorePersonService.updateGroupPersonRef(refParam, context); + } catch (DataAccessException e) { + this.logger.error("删除通行人员失败,原因:[{}]", (Throwable)e); + throw new ServiceException("76260523", getMessage("76260523")); + } + return CloudwalkResult.success(Boolean.valueOf(true)); + } + + public CloudwalkResult> page(AcsPersonQueryParam param, + CloudwalkPageInfo pageInfo, CloudwalkCallContext context) throws ServiceException { + this.logger.info("分页查询通行人员开始,AcsPersonQueryParam=[{}], CloudwalkPageInfo=[{}], CloudwalkCallContext=[{}]", + new Object[] {JSONObject.toJSONString(param), JSONObject.toJSONString(pageInfo), + JSONObject.toJSONString(context)}); + try { + List result = new ArrayList<>(); + List personIds = null; + String imageStoreId = this.deviceImageStoreDao.getByBuildingId(param.getParentId()); + if (ObjectUtils.isEmpty(imageStoreId)) { + return CloudwalkResult.success(new CloudwalkPageAble(result, pageInfo, 0L)); + } + param.setImageStoreId(imageStoreId); + List parentRuleList = this.imageRuleRefDao.listRuleByZoneIdExtDefault(param.getZoneId()); + List personIdList = this.imageRuleRefDao.countPersonIdByZoneId(param.getZoneId()); + if (CollectionUtils.isEmpty(parentRuleList) && CollectionUtils.isEmpty(personIdList)) { + return CloudwalkResult.success(new CloudwalkPageAble(result, pageInfo, 0L)); + } + param.setPersonIds(personIdList); + if (!CollectionUtils.isEmpty(parentRuleList)) { + List includeLabels = new ArrayList<>(); + List includeOrganizations = new ArrayList<>(); + List child = this.imageRuleRefDao.listByParentRule(parentRuleList); + if (!CollectionUtils.isEmpty(child)) { + for (ImageRuleRefResultDto resultDto : child) { + if (!ObjectUtils.isEmpty(resultDto.getIncludeLabels())) { + includeLabels.add(resultDto.getIncludeLabels()); + continue; + } + if (!ObjectUtils.isEmpty(resultDto.getIncludeOrganizations())) { + includeOrganizations.add(resultDto.getIncludeOrganizations()); + } + } + } else if (CollectionUtils.isEmpty(personIdList)) { + return CloudwalkResult.success(new CloudwalkPageAble(result, pageInfo, 0L)); + } + List elevatorIncludeLabels = new ArrayList<>(); + List elevatorOrganizations = new ArrayList<>(); + if (!CollectionUtils.isEmpty(param.getLabelIds())) { + for (String labelId : param.getLabelIds()) { + if (!includeLabels.contains(labelId)) { + elevatorIncludeLabels.add(labelId); + } + } + } + if (!CollectionUtils.isEmpty(param.getOrganizationIds())) { + for (String orgId : param.getOrganizationIds()) { + if (!includeOrganizations.contains(orgId)) { + elevatorOrganizations.add(orgId); + } + } + } + if (!CollectionUtils.isEmpty(elevatorIncludeLabels)) { + param.setElevatorLabelIds(elevatorIncludeLabels); + } + param.setLabelIds(includeLabels); + if (!CollectionUtils.isEmpty(elevatorOrganizations)) { + param.setElevatorOrganizationIds(elevatorOrganizations); + } + param.setOrganizationIds(includeOrganizations); + List delPersonIds = this.imageRuleRefDao.listPersonDelByZoneId(param.getZoneId()); + param.setDelPersonIds(delPersonIds); + } + if (!CollectionUtils.isEmpty(param.getElevatorLabelIds()) + || !CollectionUtils.isEmpty(param.getElevatorOrganizationIds())) { + param.setIsElevator(Integer.valueOf(0)); + } else if (!CollectionUtils.isEmpty(param.getLabelIds()) + && !CollectionUtils.isEmpty(param.getOrganizationIds())) { + param.setIsElevator(Integer.valueOf(3)); + param.setElevatorLabelIds(param.getLabelIds()); + param.setElevatorOrganizationIds(param.getOrganizationIds()); + } else if (!CollectionUtils.isEmpty(param.getOrganizationIds())) { + param.setIsElevator(Integer.valueOf(1)); + param.setElevatorOrganizationIds(param.getOrganizationIds()); + } else if (!CollectionUtils.isEmpty(param.getLabelIds())) { + param.setIsElevator(Integer.valueOf(2)); + param.setElevatorLabelIds(param.getLabelIds()); + } + if (!StringUtils.isEmpty(param.getPersonName())) { + personIds = getPersonIdsByName(param, context); + if (!CollectionUtils.isEmpty(param.getDelPersonIds()) && !CollectionUtils.isEmpty(personIds)) { + List newPersonIds = new ArrayList<>(); + for (int i = 0; i < personIds.size(); i++) { + if (!param.getDelPersonIds().contains(personIds.get(i))) { + newPersonIds.add(personIds.get(i)); + } + } + if (CollectionUtils.isEmpty(newPersonIds)) { + return CloudwalkResult.success(new CloudwalkPageAble(result, pageInfo, 0L)); + } + personIds.clear(); + personIds.addAll(newPersonIds); + } + if (CollectionUtils.isEmpty(personIds)) { + return CloudwalkResult.success(new CloudwalkPageAble(result, pageInfo, 0L)); + } + } + CloudwalkPageAble pageResult = + getImageStorePerson(param, pageInfo, context, imageStoreId, personIds); + if (!CollectionUtils.isEmpty(pageResult.getDatas())) { + covertPageResult(result, pageResult.getDatas(), context); + } + return CloudwalkResult.success(new CloudwalkPageAble(result, pageInfo, pageResult.getTotalRows())); + } catch (DataAccessException e) { + this.logger.error("分页查询通行人员失败", (Throwable)e); + throw new ServiceException("76260528", getMessage("76260528")); + } + } + + public CloudwalkResult timeDetail(AcsPersonTimeDetailParam param, + CloudwalkCallContext context) throws ServiceException { + return null; + } + + public CloudwalkResult> pageByApp(AcsPersonQueryByAppParam param, + CloudwalkPageInfo pageInfo, CloudwalkCallContext context) throws ServiceException { + return null; + } + + public CloudwalkResult> personDetail(PersonDetailQueryParam param, + CloudwalkCallContext context) throws ServiceException { + String imageStoreId = this.deviceImageStoreDao.getByBuildingId(param.getParentId()); + List resultDtos = + this.imageRuleRefDao.listByParentRule(Collections.singletonList(param.getRuleId())); + try { + List delPersonIds = this.imageRuleRefDao.listPersonDelByZoneId(param.getZoneId()); + if (CollectionUtils.isEmpty(resultDtos)) { + return CloudwalkResult.success(null); + } + List personIds = new ArrayList<>(); + List labelIds = new ArrayList<>(); + List orgIds = new ArrayList<>(); + for (ImageRuleRefResultDto dto : resultDtos) { + if (!ObjectUtils.isEmpty(dto.getPersonId())) { + personIds.add(dto.getPersonId()); + } + if (!ObjectUtils.isEmpty(dto.getIncludeLabels())) { + labelIds.add(dto.getIncludeLabels()); + } + if (!ObjectUtils.isEmpty(dto.getIncludeOrganizations())) { + orgIds.add(dto.getIncludeOrganizations()); + } + } + ImageStorePersonQueryParam queryParam = new ImageStorePersonQueryParam(); + queryParam.setImageStoreId(imageStoreId); + queryParam.setName(param.getPersonName()); + queryParam.setPersonIds(personIds); + queryParam.setLabelIds(labelIds); + queryParam.setOrganizationIds(orgIds); + queryParam.setDelPersonIds(delPersonIds); + queryParam.setIsElevator(Integer.valueOf(0)); + queryParam.setRowsOfPage(param.getRowsOfPage()); + queryParam.setCurrentPage(param.getCurrentPage()); + return this.imageStorePersonService.page(queryParam, context); + } catch (DataAccessException e) { + this.logger.error("分页查询通行人员失败", (Throwable)e); + throw new ServiceException("76260528", getMessage("76260528")); + } + } + + private List getPersonIdsByName(AcsPersonQueryParam param, CloudwalkCallContext context) + throws ServiceException { + List personIdsByName = new ArrayList<>(); + if (StringUtils.isNotBlank(param.getPersonName())) { + PersonQueryParam personQueryParam = new PersonQueryParam(); + personQueryParam.setName(param.getPersonName()); + personQueryParam.setIds(param.getPersonIds()); + personQueryParam.setLabelIds(param.getElevatorLabelIds()); + personQueryParam.setOrganizationIds(param.getElevatorOrganizationIds()); + personQueryParam.setIsElevator(param.getIsElevator()); + CloudwalkResult> personResult = this.personService.list(personQueryParam, context); + List personList = (List)personResult.getData(); + if (personResult.isSuccess() && CollectionUtils.isNotEmpty(personList)) { + List newPersonList = new ArrayList<>(); + for (PersonResult result : personList) { + if (param.getPersonIds().contains(result.getId())) { + newPersonList.add(result); + continue; + } + if (!CollectionUtils.isEmpty(result.getOrganizationIds())) { + for (String orgId : result.getOrganizationIds()) { + if (!CollectionUtils.isEmpty(param.getOrganizationIds()) + && param.getOrganizationIds().contains(orgId)) + newPersonList.add(result); + } + continue; + } + if (!CollectionUtils.isEmpty(result.getLabelIds())) { + for (String labelId : result.getLabelIds()) { + if (!CollectionUtils.isEmpty(param.getLabelIds()) + && param.getLabelIds().contains(labelId)) { + newPersonList.add(result); + } + } + } + } + if (CollectionUtils.isNotEmpty(newPersonList)) { + personIdsByName = (List)newPersonList.stream().map(CloudwalkBaseIdentify::getId) + .collect(Collectors.toList()); + } + } + } + return personIdsByName; + } + + private CloudwalkPageAble getImageStorePerson(AcsPersonQueryParam param, + CloudwalkPageInfo pageInfo, CloudwalkCallContext context, String imageStoreId, List personIds) + throws ServiceException { + CloudwalkPageAble results = new CloudwalkPageAble(); + ImageStorePersonQueryParam imageStorePersonQueryParam = new ImageStorePersonQueryParam(); + imageStorePersonQueryParam.setImageStoreId(imageStoreId); + if (!CollectionUtils.isEmpty(personIds)) { + imageStorePersonQueryParam.setPersonIds(personIds); + imageStorePersonQueryParam.setIsElevator(Integer.valueOf(4)); + } else { + imageStorePersonQueryParam.setPersonIds(param.getPersonIds()); + imageStorePersonQueryParam.setOrganizationIds(param.getElevatorOrganizationIds()); + imageStorePersonQueryParam.setLabelIds(param.getElevatorLabelIds()); + imageStorePersonQueryParam.setCurrentPage(pageInfo.getCurrentPage()); + imageStorePersonQueryParam.setRowsOfPage(pageInfo.getPageSize()); + imageStorePersonQueryParam.setIsElevator(param.getIsElevator()); + imageStorePersonQueryParam.setDelPersonIds(param.getDelPersonIds()); + } + CloudwalkResult> pageResult = + this.imageStorePersonService.page(imageStorePersonQueryParam, context); + if (!pageResult.isSuccess()) { + this.logger.error("远程调用查询图库人员失败,原因:[{}]", pageResult.getMessage()); + throw new ServiceException(pageResult.getCode(), pageResult.getMessage()); + } + if (!CollectionUtils.isEmpty(((CloudwalkPageAble)pageResult.getData()).getDatas())) { + results = (CloudwalkPageAble)pageResult.getData(); + } + return results; + } + + private void covertPageResult(List result, Collection datas, + CloudwalkCallContext context) throws ServiceException { + List personIds = + (List)datas.stream().map(ImageStorePersonResult::getPersonId).collect(Collectors.toList()); + Map personIcCardMap = getPersonIcCardByIds(personIds, context); + for (ImageStorePersonResult data : datas) { + AcsPassRuleResult rule = null; + AcsPersonResult acsPersonResult = new AcsPersonResult(); + BeanCopyUtils.copyProperties(data, acsPersonResult); + acsPersonResult.setPersonName(data.getName()); + acsPersonResult.setStartTime(data.getExpiryBeginDate()); + acsPersonResult.setEndTime(data.getExpiryEndDate()); + acsPersonResult.setPassType(AcsPassTypeEnum.LONG_TIME.getCode()); + if (data.getExpiryBeginDate() != null || data.getExpiryEndDate() != null) { + acsPersonResult.setPassType(AcsPassTypeEnum.AUTO_PASS.getCode()); + } + if (personIcCardMap != null && personIcCardMap.get(data.getPersonId()) != null) { + acsPersonResult.setIcCardNo(((PersonResult)personIcCardMap.get(data.getPersonId())).getIcCardNo()); + } + result.add(acsPersonResult); + } + } + + private Map getPersonIcCardByIds(List personIds, CloudwalkCallContext context) + throws ServiceException { + Map personIcCardMap = null; + PersonQueryParam param = new PersonQueryParam(); + param.setIds(personIds); + CloudwalkResult> personResult = this.personService.list(param, context); + List personList = (List)personResult.getData(); + if (personResult.isSuccess() && CollectionUtils.isNotEmpty(personList)) { + personIcCardMap = (Map)personList.stream() + .collect(Collectors.toMap(CloudwalkBaseIdentify::getId, personResult -> personResult)); + } + return personIcCardMap; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/AcsPersonAddNewParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/AcsPersonAddNewParam.java new file mode 100644 index 00000000..2edb3529 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/AcsPersonAddNewParam.java @@ -0,0 +1,47 @@ +package cn.cloudwalk.elevator.person.param; + +import java.io.Serializable; +import javax.validation.Valid; +import javax.validation.constraints.NotNull; + +public class AcsPersonAddNewParam implements Serializable { + private static final long serialVersionUID = -943980110684030345L; + private String zoneId; + private Long startTime; + private Long endTime; + @Valid + @NotNull(message = "76260408") + private AcsPersonPropertiesParam personProperties; + + public String getZoneId() { + return this.zoneId; + } + + public void setZoneId(String zoneId) { + this.zoneId = zoneId; + } + + public Long getStartTime() { + return this.startTime; + } + + public void setStartTime(Long startTime) { + this.startTime = startTime; + } + + public Long getEndTime() { + return this.endTime; + } + + public void setEndTime(Long endTime) { + this.endTime = endTime; + } + + public AcsPersonPropertiesParam getPersonProperties() { + return this.personProperties; + } + + public void setPersonProperties(AcsPersonPropertiesParam personProperties) { + this.personProperties = personProperties; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/AcsPersonAddParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/AcsPersonAddParam.java new file mode 100644 index 00000000..45c8c786 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/AcsPersonAddParam.java @@ -0,0 +1,64 @@ +package cn.cloudwalk.elevator.person.param; + +import java.io.Serializable; +import java.util.List; +import org.hibernate.validator.constraints.NotEmpty; + +public class AcsPersonAddParam implements Serializable { + private static final long serialVersionUID = 1742648191193141962L; + private String parentId; + private String zoneId; + private String zoneName; + @NotEmpty(message = "76260405") + private List personIds; + private Long startTime; + private Long endTime; + + public String getZoneName() { + return this.zoneName; + } + + public void setZoneName(String zoneName) { + this.zoneName = zoneName; + } + + public String getParentId() { + return this.parentId; + } + + public void setParentId(String parentId) { + this.parentId = parentId; + } + + public String getZoneId() { + return this.zoneId; + } + + public void setZoneId(String zoneId) { + this.zoneId = zoneId; + } + + public List getPersonIds() { + return this.personIds; + } + + public void setPersonIds(List personIds) { + this.personIds = personIds; + } + + public Long getStartTime() { + return this.startTime; + } + + public void setStartTime(Long startTime) { + this.startTime = startTime; + } + + public Long getEndTime() { + return this.endTime; + } + + public void setEndTime(Long endTime) { + this.endTime = endTime; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/AcsPersonAddVisitorParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/AcsPersonAddVisitorParam.java new file mode 100644 index 00000000..1333495f --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/AcsPersonAddVisitorParam.java @@ -0,0 +1,105 @@ +package cn.cloudwalk.elevator.person.param; + +import java.io.Serializable; +import java.util.List; + +public class AcsPersonAddVisitorParam implements Serializable { + private static final long serialVersionUID = 7916140658162290825L; + private String visitorId; + private String personId; + private Long begVisitorTime; + private Long endVisitorTime; + private List floorIds; + + public void setVisitorId(String visitorId) { + this.visitorId = visitorId; + } + + public void setPersonId(String personId) { + this.personId = personId; + } + + public void setBegVisitorTime(Long begVisitorTime) { + this.begVisitorTime = begVisitorTime; + } + + public void setEndVisitorTime(Long endVisitorTime) { + this.endVisitorTime = endVisitorTime; + } + + public void setFloorIds(List floorIds) { + this.floorIds = floorIds; + } + + public boolean equals(Object o) { + if (o == this) + return true; + if (!(o instanceof AcsPersonAddVisitorParam)) + return false; + AcsPersonAddVisitorParam other = (AcsPersonAddVisitorParam)o; + if (!other.canEqual(this)) + return false; + Object this$visitorId = getVisitorId(), other$visitorId = other.getVisitorId(); + if ((this$visitorId == null) ? (other$visitorId != null) : !this$visitorId.equals(other$visitorId)) + return false; + Object this$personId = getPersonId(), other$personId = other.getPersonId(); + if ((this$personId == null) ? (other$personId != null) : !this$personId.equals(other$personId)) + return false; + Object this$begVisitorTime = getBegVisitorTime(), other$begVisitorTime = other.getBegVisitorTime(); + if ((this$begVisitorTime == null) ? (other$begVisitorTime != null) + : !this$begVisitorTime.equals(other$begVisitorTime)) + return false; + Object this$endVisitorTime = getEndVisitorTime(), other$endVisitorTime = other.getEndVisitorTime(); + if ((this$endVisitorTime == null) ? (other$endVisitorTime != null) + : !this$endVisitorTime.equals(other$endVisitorTime)) + return false; + Object this$floorIds = (Object)getFloorIds(), + other$floorIds = (Object)other.getFloorIds(); + return !((this$floorIds == null) ? (other$floorIds != null) : !this$floorIds.equals(other$floorIds)); + } + + protected boolean canEqual(Object other) { + return other instanceof AcsPersonAddVisitorParam; + } + + public int hashCode() { + int PRIME = 59; + result = 1; + Object $visitorId = getVisitorId(); + result = result * 59 + (($visitorId == null) ? 43 : $visitorId.hashCode()); + Object $personId = getPersonId(); + result = result * 59 + (($personId == null) ? 43 : $personId.hashCode()); + Object $begVisitorTime = getBegVisitorTime(); + result = result * 59 + (($begVisitorTime == null) ? 43 : $begVisitorTime.hashCode()); + Object $endVisitorTime = getEndVisitorTime(); + result = result * 59 + (($endVisitorTime == null) ? 43 : $endVisitorTime.hashCode()); + Object $floorIds = (Object)getFloorIds(); + return result * 59 + (($floorIds == null) ? 43 : $floorIds.hashCode()); + } + + public String toString() { + return "AcsPersonAddVisitorParam(visitorId=" + getVisitorId() + ", personId=" + getPersonId() + + ", begVisitorTime=" + getBegVisitorTime() + ", endVisitorTime=" + getEndVisitorTime() + ", floorIds=" + + getFloorIds() + ")"; + } + + public String getVisitorId() { + return this.visitorId; + } + + public String getPersonId() { + return this.personId; + } + + public Long getBegVisitorTime() { + return this.begVisitorTime; + } + + public Long getEndVisitorTime() { + return this.endVisitorTime; + } + + public List getFloorIds() { + return this.floorIds; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/AcsPersonCheckTimeParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/AcsPersonCheckTimeParam.java new file mode 100644 index 00000000..9b1639f3 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/AcsPersonCheckTimeParam.java @@ -0,0 +1,35 @@ +package cn.cloudwalk.elevator.person.param; + +import java.io.Serializable; +import java.util.List; + +public class AcsPersonCheckTimeParam implements Serializable { + private static final long serialVersionUID = -4963269689428542769L; + private String personId; + private List imageStoreIds; + private Long time; + + public String getPersonId() { + return this.personId; + } + + public void setPersonId(String personId) { + this.personId = personId; + } + + public List getImageStoreIds() { + return this.imageStoreIds; + } + + public void setImageStoreIds(List imageStoreIds) { + this.imageStoreIds = imageStoreIds; + } + + public Long getTime() { + return this.time; + } + + public void setTime(Long time) { + this.time = time; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/AcsPersonDeleteParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/AcsPersonDeleteParam.java new file mode 100644 index 00000000..6fff4100 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/AcsPersonDeleteParam.java @@ -0,0 +1,57 @@ +package cn.cloudwalk.elevator.person.param; + +import java.io.Serializable; +import java.util.List; +import org.hibernate.validator.constraints.NotBlank; +import org.hibernate.validator.constraints.NotEmpty; + +public class AcsPersonDeleteParam implements Serializable { + private static final long serialVersionUID = 1742648191193141962L; + private String parentId; + private String zoneId; + @NotEmpty(message = "76260405") + private List personIds; + @NotBlank(message = "76260418") + private String imageStoreId; + private String personId; + + public String getPersonId() { + return this.personId; + } + + public void setPersonId(String personId) { + this.personId = personId; + } + + public String getParentId() { + return this.parentId; + } + + public void setParentId(String parentId) { + this.parentId = parentId; + } + + public String getZoneId() { + return this.zoneId; + } + + public void setZoneId(String zoneId) { + this.zoneId = zoneId; + } + + public List getPersonIds() { + return this.personIds; + } + + public void setPersonIds(List personIds) { + this.personIds = personIds; + } + + public String getImageStoreId() { + return this.imageStoreId; + } + + public void setImageStoreId(String imageStoreId) { + this.imageStoreId = imageStoreId; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/AcsPersonDetailParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/AcsPersonDetailParam.java new file mode 100644 index 00000000..787aed69 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/AcsPersonDetailParam.java @@ -0,0 +1,27 @@ +package cn.cloudwalk.elevator.person.param; + +import java.io.Serializable; +import org.hibernate.validator.constraints.NotBlank; + +public class AcsPersonDetailParam implements Serializable { + private static final long serialVersionUID = -4991936524378444365L; + private String zoneId; + @NotBlank(message = "76260405") + private String personId; + + public String getZoneId() { + return this.zoneId; + } + + public void setZoneId(String zoneId) { + this.zoneId = zoneId; + } + + public String getPersonId() { + return this.personId; + } + + public void setPersonId(String personId) { + this.personId = personId; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/AcsPersonEditParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/AcsPersonEditParam.java new file mode 100644 index 00000000..aeaec2ae --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/AcsPersonEditParam.java @@ -0,0 +1,55 @@ +package cn.cloudwalk.elevator.person.param; + +import java.io.Serializable; +import org.hibernate.validator.constraints.NotBlank; + +public class AcsPersonEditParam implements Serializable { + private static final long serialVersionUID = 1742648191193141962L; + private String zoneId; + @NotBlank(message = "76260405") + private String personId; + private Long startTime; + private Long endTime; + @NotBlank(message = "76260418") + private String imageStoreId; + + public String getZoneId() { + return this.zoneId; + } + + public void setZoneId(String zoneId) { + this.zoneId = zoneId; + } + + public String getPersonId() { + return this.personId; + } + + public void setPersonId(String personId) { + this.personId = personId; + } + + public Long getStartTime() { + return this.startTime; + } + + public void setStartTime(Long startTime) { + this.startTime = startTime; + } + + public Long getEndTime() { + return this.endTime; + } + + public void setEndTime(Long endTime) { + this.endTime = endTime; + } + + public String getImageStoreId() { + return this.imageStoreId; + } + + public void setImageStoreId(String imageStoreId) { + this.imageStoreId = imageStoreId; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/AcsPersonFaceParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/AcsPersonFaceParam.java new file mode 100644 index 00000000..9309d9b6 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/AcsPersonFaceParam.java @@ -0,0 +1,28 @@ +package cn.cloudwalk.elevator.person.param; + +import java.io.Serializable; +import org.hibernate.validator.constraints.NotBlank; + +public class AcsPersonFaceParam implements Serializable { + private static final long serialVersionUID = 1742648191193141962L; + @NotBlank(message = "76260402") + private String deviceId; + @NotBlank(message = "76260403") + private String faceImage; + + public String getDeviceId() { + return this.deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public String getFaceImage() { + return this.faceImage; + } + + public void setFaceImage(String faceImage) { + this.faceImage = faceImage; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/AcsPersonPropertiesParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/AcsPersonPropertiesParam.java new file mode 100644 index 00000000..84920831 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/AcsPersonPropertiesParam.java @@ -0,0 +1,487 @@ +package cn.cloudwalk.elevator.person.param; + +import java.io.Serializable; +import java.util.List; +import org.hibernate.validator.constraints.NotBlank; + +public class AcsPersonPropertiesParam implements Serializable { + private static final long serialVersionUID = -448990843685123843L; + private String name; + private String userName; + private String personCode; + private String phone; + private String email; + private List organizationIds; + private List labelIds; + private Long expiryBeginDate; + private Long expiryEndDate; + @NotBlank(message = "76260412") + private String comparePicture; + private String ext1; + private String ext2; + private String ext3; + private String ext4; + private String ext5; + private String ext6; + private String ext7; + private String ext8; + private String ext9; + private String ext10; + private String ext11; + private String ext12; + private String ext13; + private String ext14; + private String ext15; + private String ext16; + private String ext17; + private String ext18; + private String ext19; + private String ext20; + private String ext21; + private String ext22; + private String ext23; + private String ext24; + private String ext25; + private String ext26; + private String ext27; + private String ext28; + private String ext29; + private String ext30; + private String ext31; + private String ext32; + private String ext33; + private String ext34; + private String ext35; + private String ext36; + private String ext37; + private String ext38; + private String ext39; + private String ext40; + private Integer createSysAccount; + private String welcome; + private String showPicture; + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public String getUserName() { + return this.userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public String getPersonCode() { + return this.personCode; + } + + public void setPersonCode(String personCode) { + this.personCode = personCode; + } + + public String getPhone() { + return this.phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } + + public String getEmail() { + return this.email; + } + + public void setEmail(String email) { + this.email = email; + } + + public List getOrganizationIds() { + return this.organizationIds; + } + + public void setOrganizationIds(List organizationIds) { + this.organizationIds = organizationIds; + } + + public List getLabelIds() { + return this.labelIds; + } + + public void setLabelIds(List labelIds) { + this.labelIds = labelIds; + } + + public Long getExpiryBeginDate() { + return this.expiryBeginDate; + } + + public void setExpiryBeginDate(Long expiryBeginDate) { + this.expiryBeginDate = expiryBeginDate; + } + + public Long getExpiryEndDate() { + return this.expiryEndDate; + } + + public void setExpiryEndDate(Long expiryEndDate) { + this.expiryEndDate = expiryEndDate; + } + + public String getComparePicture() { + return this.comparePicture; + } + + public void setComparePicture(String comparePicture) { + this.comparePicture = comparePicture; + } + + public String getExt1() { + return this.ext1; + } + + public void setExt1(String ext1) { + this.ext1 = ext1; + } + + public String getExt2() { + return this.ext2; + } + + public void setExt2(String ext2) { + this.ext2 = ext2; + } + + public String getExt3() { + return this.ext3; + } + + public void setExt3(String ext3) { + this.ext3 = ext3; + } + + public String getExt4() { + return this.ext4; + } + + public void setExt4(String ext4) { + this.ext4 = ext4; + } + + public String getExt5() { + return this.ext5; + } + + public void setExt5(String ext5) { + this.ext5 = ext5; + } + + public String getExt6() { + return this.ext6; + } + + public void setExt6(String ext6) { + this.ext6 = ext6; + } + + public String getExt7() { + return this.ext7; + } + + public void setExt7(String ext7) { + this.ext7 = ext7; + } + + public String getExt8() { + return this.ext8; + } + + public void setExt8(String ext8) { + this.ext8 = ext8; + } + + public String getExt9() { + return this.ext9; + } + + public void setExt9(String ext9) { + this.ext9 = ext9; + } + + public String getExt10() { + return this.ext10; + } + + public void setExt10(String ext10) { + this.ext10 = ext10; + } + + public String getExt11() { + return this.ext11; + } + + public void setExt11(String ext11) { + this.ext11 = ext11; + } + + public String getExt12() { + return this.ext12; + } + + public void setExt12(String ext12) { + this.ext12 = ext12; + } + + public String getExt13() { + return this.ext13; + } + + public void setExt13(String ext13) { + this.ext13 = ext13; + } + + public String getExt14() { + return this.ext14; + } + + public void setExt14(String ext14) { + this.ext14 = ext14; + } + + public String getExt15() { + return this.ext15; + } + + public void setExt15(String ext15) { + this.ext15 = ext15; + } + + public String getExt16() { + return this.ext16; + } + + public void setExt16(String ext16) { + this.ext16 = ext16; + } + + public String getExt17() { + return this.ext17; + } + + public void setExt17(String ext17) { + this.ext17 = ext17; + } + + public String getExt18() { + return this.ext18; + } + + public void setExt18(String ext18) { + this.ext18 = ext18; + } + + public String getExt19() { + return this.ext19; + } + + public void setExt19(String ext19) { + this.ext19 = ext19; + } + + public String getExt20() { + return this.ext20; + } + + public void setExt20(String ext20) { + this.ext20 = ext20; + } + + public String getExt21() { + return this.ext21; + } + + public void setExt21(String ext21) { + this.ext21 = ext21; + } + + public String getExt22() { + return this.ext22; + } + + public void setExt22(String ext22) { + this.ext22 = ext22; + } + + public String getExt23() { + return this.ext23; + } + + public void setExt23(String ext23) { + this.ext23 = ext23; + } + + public String getExt24() { + return this.ext24; + } + + public void setExt24(String ext24) { + this.ext24 = ext24; + } + + public String getExt25() { + return this.ext25; + } + + public void setExt25(String ext25) { + this.ext25 = ext25; + } + + public String getExt26() { + return this.ext26; + } + + public void setExt26(String ext26) { + this.ext26 = ext26; + } + + public String getExt27() { + return this.ext27; + } + + public void setExt27(String ext27) { + this.ext27 = ext27; + } + + public String getExt28() { + return this.ext28; + } + + public void setExt28(String ext28) { + this.ext28 = ext28; + } + + public String getExt29() { + return this.ext29; + } + + public void setExt29(String ext29) { + this.ext29 = ext29; + } + + public String getExt30() { + return this.ext30; + } + + public void setExt30(String ext30) { + this.ext30 = ext30; + } + + public String getExt31() { + return this.ext31; + } + + public void setExt31(String ext31) { + this.ext31 = ext31; + } + + public String getExt32() { + return this.ext32; + } + + public void setExt32(String ext32) { + this.ext32 = ext32; + } + + public String getExt33() { + return this.ext33; + } + + public void setExt33(String ext33) { + this.ext33 = ext33; + } + + public String getExt34() { + return this.ext34; + } + + public void setExt34(String ext34) { + this.ext34 = ext34; + } + + public String getExt35() { + return this.ext35; + } + + public void setExt35(String ext35) { + this.ext35 = ext35; + } + + public String getExt36() { + return this.ext36; + } + + public void setExt36(String ext36) { + this.ext36 = ext36; + } + + public String getExt37() { + return this.ext37; + } + + public void setExt37(String ext37) { + this.ext37 = ext37; + } + + public String getExt38() { + return this.ext38; + } + + public void setExt38(String ext38) { + this.ext38 = ext38; + } + + public String getExt39() { + return this.ext39; + } + + public void setExt39(String ext39) { + this.ext39 = ext39; + } + + public String getExt40() { + return this.ext40; + } + + public void setExt40(String ext40) { + this.ext40 = ext40; + } + + public Integer getCreateSysAccount() { + return this.createSysAccount; + } + + public void setCreateSysAccount(Integer createSysAccount) { + this.createSysAccount = createSysAccount; + } + + public String getWelcome() { + return this.welcome; + } + + public void setWelcome(String welcome) { + this.welcome = welcome; + } + + public String getShowPicture() { + return this.showPicture; + } + + public void setShowPicture(String showPicture) { + this.showPicture = showPicture; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/AcsPersonQueryByAppParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/AcsPersonQueryByAppParam.java new file mode 100644 index 00000000..ee0d4f9c --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/AcsPersonQueryByAppParam.java @@ -0,0 +1,37 @@ +package cn.cloudwalk.elevator.person.param; + +import java.io.Serializable; +import org.hibernate.validator.constraints.NotBlank; + +public class AcsPersonQueryByAppParam implements Serializable { + private static final long serialVersionUID = -4823559329166668237L; + @NotBlank(message = "76260402") + private String deviceId; + @NotBlank(message = "76260415") + private String applicationId; + private String personName; + + public String getDeviceId() { + return this.deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public String getApplicationId() { + return this.applicationId; + } + + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + public String getPersonName() { + return this.personName; + } + + public void setPersonName(String personName) { + this.personName = personName; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/AcsPersonQueryParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/AcsPersonQueryParam.java new file mode 100644 index 00000000..c89f5f75 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/AcsPersonQueryParam.java @@ -0,0 +1,198 @@ +package cn.cloudwalk.elevator.person.param; + +import java.io.Serializable; +import java.util.List; + +public class AcsPersonQueryParam implements Serializable { + private static final long serialVersionUID = -3343979289939890513L; + private String parentId; + private String zoneId; + private String personName; + private String imageStoreId; + private List organizationIds; + + public void setParentId(String parentId) { + this.parentId = parentId; + } + + private List labelIds; + private List personIds; + private Integer isElevator; + private List delPersonIds; + private List elevatorLabelIds; + private List elevatorOrganizationIds; + + public void setZoneId(String zoneId) { + this.zoneId = zoneId; + } + + public void setPersonName(String personName) { + this.personName = personName; + } + + public void setImageStoreId(String imageStoreId) { + this.imageStoreId = imageStoreId; + } + + public void setOrganizationIds(List organizationIds) { + this.organizationIds = organizationIds; + } + + public void setLabelIds(List labelIds) { + this.labelIds = labelIds; + } + + public void setPersonIds(List personIds) { + this.personIds = personIds; + } + + public void setIsElevator(Integer isElevator) { + this.isElevator = isElevator; + } + + public void setDelPersonIds(List delPersonIds) { + this.delPersonIds = delPersonIds; + } + + public void setElevatorLabelIds(List elevatorLabelIds) { + this.elevatorLabelIds = elevatorLabelIds; + } + + public void setElevatorOrganizationIds(List elevatorOrganizationIds) { + this.elevatorOrganizationIds = elevatorOrganizationIds; + } + + public boolean equals(Object o) { + if (o == this) + return true; + if (!(o instanceof AcsPersonQueryParam)) + return false; + AcsPersonQueryParam other = (AcsPersonQueryParam)o; + if (!other.canEqual(this)) + return false; + Object this$parentId = getParentId(), other$parentId = other.getParentId(); + if ((this$parentId == null) ? (other$parentId != null) : !this$parentId.equals(other$parentId)) + return false; + Object this$zoneId = getZoneId(), other$zoneId = other.getZoneId(); + if ((this$zoneId == null) ? (other$zoneId != null) : !this$zoneId.equals(other$zoneId)) + return false; + Object this$personName = getPersonName(), other$personName = other.getPersonName(); + if ((this$personName == null) ? (other$personName != null) : !this$personName.equals(other$personName)) + return false; + Object this$imageStoreId = getImageStoreId(), other$imageStoreId = other.getImageStoreId(); + if ((this$imageStoreId == null) ? (other$imageStoreId != null) : !this$imageStoreId.equals(other$imageStoreId)) + return false; + Object this$organizationIds = (Object)getOrganizationIds(), + other$organizationIds = (Object)other.getOrganizationIds(); + if ((this$organizationIds == null) ? (other$organizationIds != null) + : !this$organizationIds.equals(other$organizationIds)) + return false; + Object this$labelIds = (Object)getLabelIds(), + other$labelIds = (Object)other.getLabelIds(); + if ((this$labelIds == null) ? (other$labelIds != null) : !this$labelIds.equals(other$labelIds)) + return false; + Object this$personIds = (Object)getPersonIds(), + other$personIds = (Object)other.getPersonIds(); + if ((this$personIds == null) ? (other$personIds != null) : !this$personIds.equals(other$personIds)) + return false; + Object this$isElevator = getIsElevator(), other$isElevator = other.getIsElevator(); + if ((this$isElevator == null) ? (other$isElevator != null) : !this$isElevator.equals(other$isElevator)) + return false; + Object this$delPersonIds = (Object)getDelPersonIds(), + other$delPersonIds = (Object)other.getDelPersonIds(); + if ((this$delPersonIds == null) ? (other$delPersonIds != null) : !this$delPersonIds.equals(other$delPersonIds)) + return false; + Object this$elevatorLabelIds = (Object)getElevatorLabelIds(), + other$elevatorLabelIds = (Object)other.getElevatorLabelIds(); + if ((this$elevatorLabelIds == null) ? (other$elevatorLabelIds != null) + : !this$elevatorLabelIds.equals(other$elevatorLabelIds)) + return false; + Object this$elevatorOrganizationIds = (Object)getElevatorOrganizationIds(), + other$elevatorOrganizationIds = (Object)other.getElevatorOrganizationIds(); + return !((this$elevatorOrganizationIds == null) ? (other$elevatorOrganizationIds != null) + : !this$elevatorOrganizationIds.equals(other$elevatorOrganizationIds)); + } + + protected boolean canEqual(Object other) { + return other instanceof AcsPersonQueryParam; + } + + public int hashCode() { + int PRIME = 59; + result = 1; + Object $parentId = getParentId(); + result = result * 59 + (($parentId == null) ? 43 : $parentId.hashCode()); + Object $zoneId = getZoneId(); + result = result * 59 + (($zoneId == null) ? 43 : $zoneId.hashCode()); + Object $personName = getPersonName(); + result = result * 59 + (($personName == null) ? 43 : $personName.hashCode()); + Object $imageStoreId = getImageStoreId(); + result = result * 59 + (($imageStoreId == null) ? 43 : $imageStoreId.hashCode()); + Object $organizationIds = (Object)getOrganizationIds(); + result = result * 59 + (($organizationIds == null) ? 43 : $organizationIds.hashCode()); + Object $labelIds = (Object)getLabelIds(); + result = result * 59 + (($labelIds == null) ? 43 : $labelIds.hashCode()); + Object $personIds = (Object)getPersonIds(); + result = result * 59 + (($personIds == null) ? 43 : $personIds.hashCode()); + Object $isElevator = getIsElevator(); + result = result * 59 + (($isElevator == null) ? 43 : $isElevator.hashCode()); + Object $delPersonIds = (Object)getDelPersonIds(); + result = result * 59 + (($delPersonIds == null) ? 43 : $delPersonIds.hashCode()); + Object $elevatorLabelIds = (Object)getElevatorLabelIds(); + result = result * 59 + (($elevatorLabelIds == null) ? 43 : $elevatorLabelIds.hashCode()); + Object $elevatorOrganizationIds = (Object)getElevatorOrganizationIds(); + return result * 59 + (($elevatorOrganizationIds == null) ? 43 : $elevatorOrganizationIds.hashCode()); + } + + public String toString() { + return "AcsPersonQueryParam(parentId=" + getParentId() + ", zoneId=" + getZoneId() + ", personName=" + + getPersonName() + ", imageStoreId=" + getImageStoreId() + ", organizationIds=" + getOrganizationIds() + + ", labelIds=" + getLabelIds() + ", personIds=" + getPersonIds() + ", isElevator=" + getIsElevator() + + ", delPersonIds=" + getDelPersonIds() + ", elevatorLabelIds=" + getElevatorLabelIds() + + ", elevatorOrganizationIds=" + getElevatorOrganizationIds() + ")"; + } + + public String getParentId() { + return this.parentId; + } + + public String getZoneId() { + return this.zoneId; + } + + public String getPersonName() { + return this.personName; + } + + public String getImageStoreId() { + return this.imageStoreId; + } + + public List getOrganizationIds() { + return this.organizationIds; + } + + public List getLabelIds() { + return this.labelIds; + } + + public List getPersonIds() { + return this.personIds; + } + + public Integer getIsElevator() { + return this.isElevator; + } + + public List getDelPersonIds() { + return this.delPersonIds; + } + + public List getElevatorLabelIds() { + return this.elevatorLabelIds; + } + + public List getElevatorOrganizationIds() { + return this.elevatorOrganizationIds; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/AcsPersonTimeDetailParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/AcsPersonTimeDetailParam.java new file mode 100644 index 00000000..ce32bc62 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/AcsPersonTimeDetailParam.java @@ -0,0 +1,27 @@ +package cn.cloudwalk.elevator.person.param; + +import java.io.Serializable; +import org.hibernate.validator.constraints.NotBlank; + +public class AcsPersonTimeDetailParam implements Serializable { + private static final long serialVersionUID = 9094521665731451301L; + private String imageStoreId; + @NotBlank(message = "76260405") + private String personId; + + public String getImageStoreId() { + return this.imageStoreId; + } + + public void setImageStoreId(String imageStoreId) { + this.imageStoreId = imageStoreId; + } + + public String getPersonId() { + return this.personId; + } + + public void setPersonId(String personId) { + this.personId = personId; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/PersonDetailQueryParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/PersonDetailQueryParam.java new file mode 100644 index 00000000..00f20373 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/param/PersonDetailQueryParam.java @@ -0,0 +1,87 @@ +package cn.cloudwalk.elevator.person.param; + +import cn.cloudwalk.cloud.page.CloudwalkBasePageForm; +import java.io.Serializable; + +public class PersonDetailQueryParam extends CloudwalkBasePageForm implements Serializable { + private static final long serialVersionUID = -8830219133147503297L; + private String parentId; + private String zoneId; + private String ruleId; + private String personName; + + public void setParentId(String parentId) { + this.parentId = parentId; + } + + public void setZoneId(String zoneId) { + this.zoneId = zoneId; + } + + public void setRuleId(String ruleId) { + this.ruleId = ruleId; + } + + public void setPersonName(String personName) { + this.personName = personName; + } + + public boolean equals(Object o) { + if (o == this) + return true; + if (!(o instanceof PersonDetailQueryParam)) + return false; + PersonDetailQueryParam other = (PersonDetailQueryParam)o; + if (!other.canEqual(this)) + return false; + Object this$parentId = getParentId(), other$parentId = other.getParentId(); + if ((this$parentId == null) ? (other$parentId != null) : !this$parentId.equals(other$parentId)) + return false; + Object this$zoneId = getZoneId(), other$zoneId = other.getZoneId(); + if ((this$zoneId == null) ? (other$zoneId != null) : !this$zoneId.equals(other$zoneId)) + return false; + Object this$ruleId = getRuleId(), other$ruleId = other.getRuleId(); + if ((this$ruleId == null) ? (other$ruleId != null) : !this$ruleId.equals(other$ruleId)) + return false; + Object this$personName = getPersonName(), other$personName = other.getPersonName(); + return !((this$personName == null) ? (other$personName != null) : !this$personName.equals(other$personName)); + } + + protected boolean canEqual(Object other) { + return other instanceof PersonDetailQueryParam; + } + + public int hashCode() { + int PRIME = 59; + result = 1; + Object $parentId = getParentId(); + result = result * 59 + (($parentId == null) ? 43 : $parentId.hashCode()); + Object $zoneId = getZoneId(); + result = result * 59 + (($zoneId == null) ? 43 : $zoneId.hashCode()); + Object $ruleId = getRuleId(); + result = result * 59 + (($ruleId == null) ? 43 : $ruleId.hashCode()); + Object $personName = getPersonName(); + return result * 59 + (($personName == null) ? 43 : $personName.hashCode()); + } + + public String toString() { + return "PersonDetailQueryParam(parentId=" + getParentId() + ", zoneId=" + getZoneId() + ", ruleId=" + + getRuleId() + ", personName=" + getPersonName() + ")"; + } + + public String getParentId() { + return this.parentId; + } + + public String getZoneId() { + return this.zoneId; + } + + public String getRuleId() { + return this.ruleId; + } + + public String getPersonName() { + return this.personName; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/result/AcsAppResult.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/result/AcsAppResult.java new file mode 100644 index 00000000..2d51d47d --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/result/AcsAppResult.java @@ -0,0 +1,35 @@ +package cn.cloudwalk.elevator.person.result; + +import java.io.Serializable; +import java.util.List; + +public class AcsAppResult implements Serializable { + private static final long serialVersionUID = 2531683869129123657L; + private String applicationId; + private String applicationName; + private List passIntervals; + + public String getApplicationId() { + return this.applicationId; + } + + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + public String getApplicationName() { + return this.applicationName; + } + + public void setApplicationName(String applicationName) { + this.applicationName = applicationName; + } + + public List getPassIntervals() { + return this.passIntervals; + } + + public void setPassIntervals(List passIntervals) { + this.passIntervals = passIntervals; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/result/AcsImageStoreStatisticsResult.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/result/AcsImageStoreStatisticsResult.java new file mode 100644 index 00000000..069ac655 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/result/AcsImageStoreStatisticsResult.java @@ -0,0 +1,34 @@ +package cn.cloudwalk.elevator.person.result; + +import java.io.Serializable; + +public class AcsImageStoreStatisticsResult implements Serializable { + private static final long serialVersionUID = 2509672603592424330L; + private String imageStoreId; + private String imageStoreName; + private Integer personNum; + + public String getImageStoreId() { + return this.imageStoreId; + } + + public void setImageStoreId(String imageStoreId) { + this.imageStoreId = imageStoreId; + } + + public String getImageStoreName() { + return this.imageStoreName; + } + + public void setImageStoreName(String imageStoreName) { + this.imageStoreName = imageStoreName; + } + + public Integer getPersonNum() { + return this.personNum; + } + + public void setPersonNum(Integer personNum) { + this.personNum = personNum; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/result/AcsImagestorePersonStatisticsResult.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/result/AcsImagestorePersonStatisticsResult.java new file mode 100644 index 00000000..06561281 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/result/AcsImagestorePersonStatisticsResult.java @@ -0,0 +1,17 @@ +package cn.cloudwalk.elevator.person.result; + +import java.io.Serializable; +import java.util.List; + +public class AcsImagestorePersonStatisticsResult implements Serializable { + private static final long serialVersionUID = 8443213995134853671L; + private List appImageStores; + + public List getAppImageStores() { + return this.appImageStores; + } + + public void setAppImageStores(List appImageStores) { + this.appImageStores = appImageStores; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/result/AcsPersonDetailResult.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/result/AcsPersonDetailResult.java new file mode 100644 index 00000000..afdaa292 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/result/AcsPersonDetailResult.java @@ -0,0 +1,44 @@ +package cn.cloudwalk.elevator.person.result; + +import java.io.Serializable; +import java.util.List; + +public class AcsPersonDetailResult implements Serializable { + private static final long serialVersionUID = 6635686175965530739L; + private String personId; + private String personName; + private String comparePicture; + private List apps; + + public String getPersonId() { + return this.personId; + } + + public void setPersonId(String personId) { + this.personId = personId; + } + + public String getPersonName() { + return this.personName; + } + + public void setPersonName(String personName) { + this.personName = personName; + } + + public String getComparePicture() { + return this.comparePicture; + } + + public void setComparePicture(String comparePicture) { + this.comparePicture = comparePicture; + } + + public List getApps() { + return this.apps; + } + + public void setApps(List apps) { + this.apps = apps; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/result/AcsPersonFaceResult.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/result/AcsPersonFaceResult.java new file mode 100644 index 00000000..9c64fd20 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/result/AcsPersonFaceResult.java @@ -0,0 +1,17 @@ +package cn.cloudwalk.elevator.person.result; + +import java.io.Serializable; +import java.util.List; + +public class AcsPersonFaceResult implements Serializable { + private static final long serialVersionUID = 4874996308674266909L; + private List personIds; + + public List getPersonIds() { + return this.personIds; + } + + public void setPersonIds(List personIds) { + this.personIds = personIds; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/result/AcsPersonResult.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/result/AcsPersonResult.java new file mode 100644 index 00000000..9c4a7325 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/result/AcsPersonResult.java @@ -0,0 +1,162 @@ +package cn.cloudwalk.elevator.person.result; + +import cn.cloudwalk.elevator.annontation.DavinciPic; +import java.io.Serializable; + +public class AcsPersonResult implements Serializable { + private static final long serialVersionUID = 2503821740888865432L; + private String imageStoreId; + private String personId; + private String imageId; + private String personName; + @DavinciPic + private String comparePicture; + private Long startTime; + private Long endTime; + private Integer gender; + private Integer age; + private Long groupTime; + private Integer status; + private String errorMessage; + private String passableTimeName; + private String icCardNo; + private Integer passType; + private String ruleName; + private String ruleId; + + public String getImageStoreId() { + return this.imageStoreId; + } + + public void setImageStoreId(String imageStoreId) { + this.imageStoreId = imageStoreId; + } + + public String getPersonId() { + return this.personId; + } + + public void setPersonId(String personId) { + this.personId = personId; + } + + public String getImageId() { + return this.imageId; + } + + public void setImageId(String imageId) { + this.imageId = imageId; + } + + public String getPersonName() { + return this.personName; + } + + public void setPersonName(String personName) { + this.personName = personName; + } + + public String getComparePicture() { + return this.comparePicture; + } + + public void setComparePicture(String comparePicture) { + this.comparePicture = comparePicture; + } + + public Long getStartTime() { + return this.startTime; + } + + public void setStartTime(Long startTime) { + this.startTime = startTime; + } + + public Long getEndTime() { + return this.endTime; + } + + public void setEndTime(Long endTime) { + this.endTime = endTime; + } + + public Integer getGender() { + return this.gender; + } + + public void setGender(Integer gender) { + this.gender = gender; + } + + public Integer getAge() { + return this.age; + } + + public void setAge(Integer age) { + this.age = age; + } + + public Long getGroupTime() { + return this.groupTime; + } + + public void setGroupTime(Long groupTime) { + this.groupTime = groupTime; + } + + public Integer getStatus() { + return this.status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public String getErrorMessage() { + return this.errorMessage; + } + + public void setErrorMessage(String errorMessage) { + this.errorMessage = errorMessage; + } + + public String getPassableTimeName() { + return this.passableTimeName; + } + + public void setPassableTimeName(String passableTimeName) { + this.passableTimeName = passableTimeName; + } + + public String getIcCardNo() { + return this.icCardNo; + } + + public void setIcCardNo(String icCardNo) { + this.icCardNo = icCardNo; + } + + public Integer getPassType() { + return this.passType; + } + + public void setPassType(Integer passType) { + this.passType = passType; + } + + public String getRuleId() { + return this.ruleId; + } + + public void setRuleId(String ruleId) { + this.ruleId = ruleId; + } + + public String getRuleName() { + return this.ruleName; + } + + public void setRuleName(String ruleName) { + this.ruleName = ruleName; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/result/AcsPersonTimeDetailResult.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/result/AcsPersonTimeDetailResult.java new file mode 100644 index 00000000..dd57c22c --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/result/AcsPersonTimeDetailResult.java @@ -0,0 +1,83 @@ +package cn.cloudwalk.elevator.person.result; + +import cn.cloudwalk.elevator.annontation.DavinciPic; +import cn.cloudwalk.elevator.passrule.param.AcsPassTimeCycleParam; +import java.io.Serializable; +import java.util.List; + +public class AcsPersonTimeDetailResult implements Serializable { + private static final long serialVersionUID = -7081148493292998146L; + private String personId; + private String personName; + @DavinciPic + private String comparePicture; + private String passableTimeName; + private List passableCycle; + private Long beginDate; + private Long endDate; + private Integer passType; + + public String getPersonId() { + return this.personId; + } + + public void setPersonId(String personId) { + this.personId = personId; + } + + public String getPersonName() { + return this.personName; + } + + public void setPersonName(String personName) { + this.personName = personName; + } + + public String getComparePicture() { + return this.comparePicture; + } + + public void setComparePicture(String comparePicture) { + this.comparePicture = comparePicture; + } + + public String getPassableTimeName() { + return this.passableTimeName; + } + + public void setPassableTimeName(String passableTimeName) { + this.passableTimeName = passableTimeName; + } + + public List getPassableCycle() { + return this.passableCycle; + } + + public void setPassableCycle(List passableCycle) { + this.passableCycle = passableCycle; + } + + public Long getBeginDate() { + return this.beginDate; + } + + public void setBeginDate(Long beginDate) { + this.beginDate = beginDate; + } + + public Long getEndDate() { + return this.endDate; + } + + public void setEndDate(Long endDate) { + this.endDate = endDate; + } + + public Integer getPassType() { + return this.passType; + } + + public void setPassType(Integer passType) { + this.passType = passType; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/result/AppImageStoreStatisticsResult.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/result/AppImageStoreStatisticsResult.java new file mode 100644 index 00000000..50dbb9ec --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/result/AppImageStoreStatisticsResult.java @@ -0,0 +1,53 @@ +package cn.cloudwalk.elevator.person.result; + +import java.io.Serializable; +import java.util.List; + +public class AppImageStoreStatisticsResult implements Serializable { + private static final long serialVersionUID = 4038169574154456396L; + private String applicationId; + private String applicationName; + private String serviceCode; + private Integer personNum; + private List imageStores; + + public String getApplicationId() { + return this.applicationId; + } + + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + public String getApplicationName() { + return this.applicationName; + } + + public void setApplicationName(String applicationName) { + this.applicationName = applicationName; + } + + public String getServiceCode() { + return this.serviceCode; + } + + public void setServiceCode(String serviceCode) { + this.serviceCode = serviceCode; + } + + public Integer getPersonNum() { + return this.personNum; + } + + public void setPersonNum(Integer personNum) { + this.personNum = personNum; + } + + public List getImageStores() { + return this.imageStores; + } + + public void setImageStores(List imageStores) { + this.imageStores = imageStores; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/service/AcsPersonService.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/service/AcsPersonService.java new file mode 100644 index 00000000..1c38de30 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/service/AcsPersonService.java @@ -0,0 +1,37 @@ +package cn.cloudwalk.elevator.person.service; + +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.page.CloudwalkPageInfo; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.elevator.person.param.AcsPersonAddParam; +import cn.cloudwalk.elevator.person.param.AcsPersonDeleteParam; +import cn.cloudwalk.elevator.person.param.AcsPersonEditParam; +import cn.cloudwalk.elevator.person.param.AcsPersonQueryByAppParam; +import cn.cloudwalk.elevator.person.param.AcsPersonQueryParam; +import cn.cloudwalk.elevator.person.param.AcsPersonTimeDetailParam; +import cn.cloudwalk.elevator.person.result.AcsPersonResult; +import cn.cloudwalk.elevator.person.result.AcsPersonTimeDetailResult; + +public interface AcsPersonService { + CloudwalkResult add(AcsPersonAddParam paramAcsPersonAddParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult edit(AcsPersonEditParam paramAcsPersonEditParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult delete(AcsPersonDeleteParam paramAcsPersonDeleteParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult> page(AcsPersonQueryParam paramAcsPersonQueryParam, + CloudwalkPageInfo paramCloudwalkPageInfo, CloudwalkCallContext paramCloudwalkCallContext) + throws ServiceException; + + CloudwalkResult timeDetail(AcsPersonTimeDetailParam paramAcsPersonTimeDetailParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult> pageByApp( + AcsPersonQueryByAppParam paramAcsPersonQueryByAppParam, CloudwalkPageInfo paramCloudwalkPageInfo, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/service/PersonRuleService.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/service/PersonRuleService.java new file mode 100644 index 00000000..a216e1b3 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/person/service/PersonRuleService.java @@ -0,0 +1,47 @@ +package cn.cloudwalk.elevator.person.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.ImageStorePersonResult; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.page.CloudwalkPageInfo; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.elevator.person.param.AcsPersonAddParam; +import cn.cloudwalk.elevator.person.param.AcsPersonAddVisitorParam; +import cn.cloudwalk.elevator.person.param.AcsPersonDeleteParam; +import cn.cloudwalk.elevator.person.param.AcsPersonEditParam; +import cn.cloudwalk.elevator.person.param.AcsPersonQueryByAppParam; +import cn.cloudwalk.elevator.person.param.AcsPersonQueryParam; +import cn.cloudwalk.elevator.person.param.AcsPersonTimeDetailParam; +import cn.cloudwalk.elevator.person.param.PersonDetailQueryParam; +import cn.cloudwalk.elevator.person.result.AcsPersonResult; +import cn.cloudwalk.elevator.person.result.AcsPersonTimeDetailResult; + +public interface PersonRuleService { + CloudwalkResult add(AcsPersonAddParam paramAcsPersonAddParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult addVisitor(AcsPersonAddVisitorParam paramAcsPersonAddVisitorParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult edit(AcsPersonEditParam paramAcsPersonEditParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult delete(AcsPersonDeleteParam paramAcsPersonDeleteParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult> page(AcsPersonQueryParam paramAcsPersonQueryParam, + CloudwalkPageInfo paramCloudwalkPageInfo, CloudwalkCallContext paramCloudwalkCallContext) + throws ServiceException; + + CloudwalkResult timeDetail(AcsPersonTimeDetailParam paramAcsPersonTimeDetailParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult> pageByApp( + AcsPersonQueryByAppParam paramAcsPersonQueryByAppParam, CloudwalkPageInfo paramCloudwalkPageInfo, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult> + personDetail(PersonDetailQueryParam paramPersonDetailQueryParam, CloudwalkCallContext paramCloudwalkCallContext) + throws ServiceException; +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/impl/AcsElevatorRecordServiceImpl.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/impl/AcsElevatorRecordServiceImpl.java new file mode 100644 index 00000000..0cfe4a1c --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/impl/AcsElevatorRecordServiceImpl.java @@ -0,0 +1,406 @@ +package cn.cloudwalk.elevator.record.impl; + +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceAreaQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceDistrictQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceAreaResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceDistrictResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.service.DeviceAreaService; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.service.DeviceDistrictService; +import cn.cloudwalk.client.cwoscomponent.intelligent.person.param.PersonDetailParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.person.param.PersonQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.person.result.PersonResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.person.service.PersonService; +import cn.cloudwalk.client.cwoscomponent.intelligent.sysetting.param.DeviceAreaTreeParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.sysetting.result.AreaTreeResult; +import cn.cloudwalk.cloud.annotation.CloudwalkParamsValidate; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.DataAccessException; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.page.CloudwalkPageInfo; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.cloud.serial.UUIDSerial; +import cn.cloudwalk.cloud.utils.BeanCopyUtils; +import cn.cloudwalk.cwos.client.event.event.BaseEvent; +import cn.cloudwalk.elevator.cacheable.AcsAreaTreeCacheableService; +import cn.cloudwalk.elevator.common.AbstractAcsDeviceService; +import cn.cloudwalk.elevator.config.ImageStoreConstants; +import cn.cloudwalk.elevator.em.AcsOpenDoorStatusEnum; +import cn.cloudwalk.elevator.em.OpenDoorTypeEnum; +import cn.cloudwalk.elevator.mqtt.service.MqttService; +import cn.cloudwalk.elevator.record.dao.AcsElevatorRecordDao; +import cn.cloudwalk.elevator.record.dao.AcsRecogRecordDao; +import cn.cloudwalk.elevator.record.dto.AcsElevatorAnalyseCycleBusinessResultDTO; +import cn.cloudwalk.elevator.record.dto.AcsElevatorQueryCountDTO; +import cn.cloudwalk.elevator.record.dto.AcsElevatorRecordAddDTO; +import cn.cloudwalk.elevator.record.dto.AcsElevatorRecordDetailQueryDTO; +import cn.cloudwalk.elevator.record.dto.AcsElevatorRecordDetailQueryResultDTO; +import cn.cloudwalk.elevator.record.dto.AcsElevatorRecordQueryResultDTO; +import cn.cloudwalk.elevator.record.dto.AcsOpenDoorRecordEditDTO; +import cn.cloudwalk.elevator.record.dto.AcsOpenDoorRecordQueryDTO; +import cn.cloudwalk.elevator.record.param.AcsElevatorRecordAddParam; +import cn.cloudwalk.elevator.record.param.AcsElevatorRecordAnalyseCountParam; +import cn.cloudwalk.elevator.record.param.AcsElevatorRecordAnalyseCycleParam; +import cn.cloudwalk.elevator.record.param.AcsElevatorRecordDetailParam; +import cn.cloudwalk.elevator.record.param.AcsOpenDoorRecordEditParam; +import cn.cloudwalk.elevator.record.result.AcsElevatorAnalyseCycleBusinessResult; +import cn.cloudwalk.elevator.record.result.AcsElevatorAnalyseCycleResult; +import cn.cloudwalk.elevator.record.result.AcsElevatorPageRequestInfoResult; +import cn.cloudwalk.elevator.record.result.AcsElevatorRecordResult; +import cn.cloudwalk.elevator.record.result.VisitorRecordPushEvent; +import cn.cloudwalk.elevator.record.service.AcsElevatorRecordService; +import cn.cloudwalk.elevator.record.service.PersonFileService; +import cn.cloudwalk.elevator.util.DateUtils; +import cn.cloudwalk.elevator.util.RestTemplateUtil; +import cn.cloudwalk.elevator.util.StartTimeAndEndTime; +import cn.cloudwalk.elevator.util.ToolUtil; +import cn.cloudwalk.elevator.visitor.param.VisitorRecordQueryParam; +import cn.cloudwalk.elevator.visitor.result.VisitorResult; +import cn.cloudwalk.event.CloudwalkEventManager; +import cn.cloudwalk.intelligent.lock.annotation.RequiredLock; +import com.alibaba.fastjson.JSONObject; +import com.fasterxml.jackson.core.type.TypeReference; +import java.net.URI; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Comparator; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import java.util.stream.Collectors; +import javax.annotation.Nullable; +import javax.annotation.Resource; +import javax.xml.bind.DatatypeConverter; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.data.redis.core.RedisTemplate; +import org.springframework.http.HttpHeaders; +import org.springframework.stereotype.Service; +import org.springframework.util.MultiValueMap; +import org.springframework.util.ObjectUtils; +import org.springframework.web.util.UriComponentsBuilder; + +@Service +public class AcsElevatorRecordServiceImpl extends AbstractAcsDeviceService implements AcsElevatorRecordService { + @Value("${ninca-crk-std.ip}") + private String nincaCrkStd; + @Autowired + private PersonFileService personFileService; + @Autowired + private PersonService personService; + @Resource + private AcsElevatorRecordDao acsElevatorRecordDao; + @Resource + private AcsRecogRecordDao acsRecogRecordDao; + @Resource + protected RedisTemplate redisTemplate; + @Resource + private DeviceDistrictService deviceDistrictService; + @Resource + private AcsAreaTreeCacheableService acsAreaTreeCacheableService; + @Resource + private MqttService mqttService; + @Resource + private DeviceAreaService deviceAreaService; + private static final Long ONE_YEAR_MILLISECONDS = Long.valueOf(31536000000L); + private static final String AREA_FLAG = "area"; + private static final String DISTRICT_FLAG = "district"; + @Autowired + private UUIDSerial uuidSerial; + @Resource + private CloudwalkEventManager cloudwalkEventManager; + protected static final int CACHE_EXPIRE_TIME = 8; + private static final String ELEVATOR_RECORD_SUFFIX = "elevator_record"; + + @CloudwalkParamsValidate(argsIndexs = {0, 1}) + public CloudwalkResult> openRecord(AcsElevatorRecordDetailParam param, + CloudwalkPageInfo pageInfo, CloudwalkCallContext cloudwalkContext) throws ServiceException { + if (param.getEndTime().longValue() - param.getStartTime().longValue() > ONE_YEAR_MILLISECONDS.longValue()) { + return CloudwalkResult.fail("76260304", getMessage("76260304")); + } + AcsElevatorRecordDetailQueryDTO queryDTO = + (AcsElevatorRecordDetailQueryDTO)BeanCopyUtils.copyProperties(param, AcsElevatorRecordDetailQueryDTO.class); + queryDTO.setBusinessId(cloudwalkContext.getCompany().getCompanyId()); + if (!ObjectUtils.isEmpty(queryDTO.getOrgId()) && "1".equals(queryDTO.getOrgId())) { + queryDTO.setOrgId(null); + queryDTO.setIsVisitor(Integer.valueOf(1)); + } + try { + CloudwalkPageAble pageResult = + this.acsElevatorRecordDao.detail(queryDTO, pageInfo); + if (CollectionUtils.isEmpty(pageResult.getDatas())) { + return CloudwalkResult.success(new CloudwalkPageAble(new ArrayList(), pageInfo, 0L)); + } + List list = + (List)pageResult.getDatas(); + List acsList = new ArrayList<>(list.size()); + DeviceDistrictQueryParam deviceDistrictQueryParam = new DeviceDistrictQueryParam(); + Map districtMap = new HashMap<>(); + deviceDistrictQueryParam.setIds(acsElevatorRecordListDupRemove(list, "district")); + CloudwalkResult> deviceDistrictResult = + this.deviceDistrictService.list(deviceDistrictQueryParam); + for (DeviceDistrictResult result : deviceDistrictResult.getData()) { + districtMap.put(result.getDistrictCode(), result.getMergeName()); + } + DeviceAreaTreeParam areaTreeParam = new DeviceAreaTreeParam(); + areaTreeParam.setBusinessId(cloudwalkContext.getCompany().getCompanyId()); + CloudwalkResult> areaTree = + this.acsAreaTreeCacheableService.tree(areaTreeParam, cloudwalkContext); + Map areaMap = new HashMap<>(); + getAreaMap((List)areaTree.getData(), areaMap); + DeviceAreaQueryParam deviceAreaParentQueryParam = new DeviceAreaQueryParam(); + Map areaParentMap = new HashMap<>(); + deviceAreaParentQueryParam.setParentIds(acsElevatorRecordListDupRemove(list, "area")); + CloudwalkResult> deviceAreaParentResult = + this.deviceAreaService.list(deviceAreaParentQueryParam); + for (DeviceAreaResult result : deviceAreaParentResult.getData()) { + areaParentMap.put(result.getParentId(), result.getName()); + } + List personIds = new ArrayList<>(); + for (AcsElevatorRecordDetailQueryResultDTO resultDTO : list) { + personIds.add(resultDTO.getPersonId()); + AcsElevatorRecordResult recordResult = + (AcsElevatorRecordResult)BeanCopyUtils.copyProperties(resultDTO, AcsElevatorRecordResult.class); + if (!StringUtils.isEmpty(resultDTO.getPanoramaImageOpen())) { + recordResult.setPanoramaImage(resultDTO.getPanoramaImageOpen()); + } else if (!StringUtils.isEmpty(resultDTO.getPanoramaImageRecog())) { + recordResult.setPanoramaImage(resultDTO.getPanoramaImageRecog()); + } + if (StringUtils.isNotBlank(resultDTO.getOpenDoorType())) { + recordResult.setOpenDoorType(resultDTO.getOpenDoorType().toUpperCase()); + recordResult.setOpenDoorTypeCode(OpenDoorTypeEnum.getEnumByCode(resultDTO.getOpenDoorType())); + } + recordResult.setDistrictName(districtMap.get(resultDTO.getDistrictId())); + if (areaParentMap.containsKey(resultDTO.getAreaId())) { + recordResult.setAreaName((String)areaMap.get(resultDTO.getAreaId()) + "-" + + (String)areaParentMap.get(resultDTO.getAreaId())); + } else { + recordResult.setAreaName(areaMap.get(resultDTO.getAreaId())); + } + acsList.add(recordResult); + } + if (!CollectionUtils.isEmpty(personIds)) { + PersonQueryParam personQueryParam = new PersonQueryParam(); + personQueryParam.setIds(personIds); + CloudwalkResult> personList = + this.personService.list(personQueryParam, cloudwalkContext); + Map maps = new HashMap<>(); + if (!CollectionUtils.isEmpty((Collection)personList.getData())) { + ((List)personList.getData()).forEach(person -> (PersonResult)maps.put(person.getId(), person)); + } + for (AcsElevatorRecordResult result : acsList) { + PersonResult person = maps.get(result.getPersonId()); + if (!ObjectUtils.isEmpty(person) && !ObjectUtils.isEmpty(person.getComparePicture())) { + result.setRegisterImage(person.getComparePicture()); + } + } + } + return CloudwalkResult.success(new CloudwalkPageAble(acsList, pageInfo, pageResult.getTotalRows())); + } catch (DataAccessException e) { + this.logger.error("开门记录详情查询失败,原因:", (Throwable)e); + throw new ServiceException(e); + } + } + + private List acsElevatorRecordListDupRemove(List list, String flag) { + List tempList = new ArrayList<>(); + if (flag.equals("district")) { + for (AcsElevatorRecordDetailQueryResultDTO resultDTO : list) { + tempList.add(resultDTO.getDistrictId()); + } + } else if (flag.equals("area")) { + for (AcsElevatorRecordDetailQueryResultDTO resultDTO : list) { + tempList.add(resultDTO.getAreaId()); + } + } + HashSet set = new HashSet<>(tempList); + tempList.clear(); + tempList.addAll(set); + return tempList; + } + + public CloudwalkResult add(AcsElevatorRecordAddParam param, CloudwalkCallContext context) + throws ServiceException { + try { + AcsElevatorRecordAddDTO addDTO = new AcsElevatorRecordAddDTO(); + BeanCopyUtils.copyProperties(param, addDTO); + if (param.getDeviceResult() != null) { + DeviceResult deviceResult = param.getDeviceResult(); + BeanCopyUtils.copyProperties(deviceResult, addDTO); + addDTO.setDeviceId(deviceResult.getId()); + } + addDTO.setId(genUUID()); + addDTO.setOperateName(param.getOperateName()); + addDTO.setCreateTime(Long.valueOf(System.currentTimeMillis())); + addDTO.setLastUpdateTime(Long.valueOf(System.currentTimeMillis())); + addDTO.setCreateUserId(context.getUser().getCaller()); + addDTO.setLastUpdateUserId(context.getUser().getCaller()); + Long time1 = Long.valueOf(System.currentTimeMillis()); + if (!StringUtils.isEmpty(param.getFaceImagePath())) { + byte[] bytes = DatatypeConverter.parseBase64Binary(param.getFaceImagePath()); + if (bytes.length > ImageStoreConstants.MAX_FILE.intValue()) { + return CloudwalkResult.fail("53060428", getMessage("53060428")); + } + String fileName = ToolUtil.generateUUID(); + addDTO.setFaceImagePath((String)this.personFileService.upload(fileName, bytes).getData()); + } + if (!StringUtils.isEmpty(param.getPanoramaImagePath())) { + byte[] bytes = DatatypeConverter.parseBase64Binary(param.getPanoramaImagePath()); + if (bytes.length > ImageStoreConstants.MAX_FILE.intValue()) { + return CloudwalkResult.fail("53060428", getMessage("53060428")); + } + String fileName = ToolUtil.generateUUID(); + addDTO.setPanoramaImagePath((String)this.personFileService.upload(fileName, bytes).getData()); + } + addDTO.setIsVisitor(Integer.valueOf(0)); + URI uri = + combineAuthClientURI("intelligent/three/visitor/record/query", (MultiValueMap)null); + VisitorRecordQueryParam form = new VisitorRecordQueryParam(); + form.setVisitorId(addDTO.getRecognitionFaceId()); + form.setBusinessId(context.getCompany().getCompanyId()); + HttpHeaders headers = new HttpHeaders(); + headers.set("businessId", context.getCompany().getCompanyId()); + CloudwalkResult> result = (CloudwalkResult>)RestTemplateUtil + .post(uri, form, headers, new TypeReference>>() {}); + if (!ObjectUtils.isEmpty(result) && !CollectionUtils.isEmpty((Collection)result.getData())) { + addDTO.setIsVisitor(Integer.valueOf(1)); + addDTO.setInterviewee(((VisitorResult)((List)result.getData()).get(0)).getPersonId()); + } + PersonDetailParam detailParam = new PersonDetailParam(); + detailParam.setId(addDTO.getRecognitionFaceId()); + detailParam.setBusinessId(context.getCompany().getCompanyId()); + CloudwalkResult detail = this.personService.detail(detailParam, context); + if (!ObjectUtils.isEmpty(detail.getData())) { + PersonResult person = (PersonResult)detail.getData(); + if (!ObjectUtils.isEmpty(person.getPersonCode())) { + addDTO.setPersonCode(person.getPersonCode()); + } + if (!CollectionUtils.isEmpty(person.getOrganizationIds()) + && !CollectionUtils.isEmpty(person.getOrganizationNames())) { + addDTO.setOrgId(person.getOrganizationIds().get(0)); + addDTO.setOrgName(person.getOrganizationNames().get(0)); + } + } + this.acsElevatorRecordDao.add(addDTO); + sendRecordEvent(addDTO); + return CloudwalkResult.success(Boolean.valueOf(true)); + } catch (DataAccessException e) { + this.logger.error("保存开门记录失败,原因:", (Throwable)e); + throw new ServiceException(e); + } + } + + @CloudwalkParamsValidate + public CloudwalkResult modify(AcsOpenDoorRecordEditParam param) throws ServiceException { + try { + this.logger.info("更新开门记录状态开始:AcsOpenDoorRecordEditParam=[{}]", JSONObject.toJSONString(param)); + int updateCount = 0; + AcsOpenDoorRecordQueryDTO queryDTO = new AcsOpenDoorRecordQueryDTO(); + BeanUtils.copyProperties(param, queryDTO); + List queryResult = this.acsElevatorRecordDao.query(queryDTO); + if (CollectionUtils.isNotEmpty(queryResult)) { + AcsElevatorRecordQueryResultDTO openDoorRecord = queryResult.get(0); + if (AcsOpenDoorStatusEnum.INIT.getCode().equals(openDoorRecord.getRecordResult())) { + AcsOpenDoorRecordEditDTO editDTO = new AcsOpenDoorRecordEditDTO(); + BeanUtils.copyProperties(param, editDTO); + editDTO.setId(openDoorRecord.getId()); + editDTO.setLastUpdateTime(Long.valueOf(DateUtils.getCurrentTime())); + updateCount = this.acsElevatorRecordDao.update(editDTO); + this.logger.info("更新开门记录状态结束,更新条数:[{}]", Integer.valueOf(updateCount)); + } + } + return CloudwalkResult.success(Integer.valueOf(updateCount)); + } catch (DataAccessException e) { + throw new ServiceException("76260007", getMessage("76260007")); + } + } + + @RequiredLock( + name = "T(cn.cloudwalk.elevator.config.AcsLockConstants).LOCK_RECORD_STATISTICS_BUSINESSID_PREFIX.concat(#key)", + lockWaitTime = 5000L) + public CloudwalkResult createCache(String key, long value) { + if (!this.redisTemplate.hasKey(key).booleanValue()) { + this.redisTemplate.opsForValue().set(key, Long.valueOf(value), 8L, TimeUnit.DAYS); + } + return CloudwalkResult.success(Boolean.valueOf(true)); + } + + public CloudwalkResult pageInfo(CloudwalkCallContext cloudwalkContext) + throws ServiceException { + try { + String businessId = cloudwalkContext.getCompany().getCompanyId(); + return CloudwalkResult.success(BeanCopyUtils.copyProperties( + this.acsElevatorRecordDao.pageRequestInfo(businessId), AcsElevatorPageRequestInfoResult.class)); + } catch (DataAccessException e) { + throw new ServiceException("76260007", getMessage("76260007")); + } + } + + @CloudwalkParamsValidate + public CloudwalkResult> analyseCycle(AcsElevatorRecordAnalyseCycleParam param, + CloudwalkCallContext context) throws ServiceException { + List cycleList = DateUtils.getCycle(param.getTimeType(), 7); + List resultList = new ArrayList<>(cycleList.size()); + try { + for (StartTimeAndEndTime startTimeAndEndTime : cycleList) { + AcsElevatorQueryCountDTO countDTO = new AcsElevatorQueryCountDTO(); + countDTO.setStartTime(startTimeAndEndTime.getStartTime()); + countDTO.setEndTime(startTimeAndEndTime.getEndTime()); + countDTO.setBusinessId(param.getBusinessId()); + countDTO.setSrcFloor("1"); + countDTO.setRecordResult(Integer.valueOf(1)); + AcsElevatorAnalyseCycleResult result = new AcsElevatorAnalyseCycleResult(); + result.setCurrentTime(startTimeAndEndTime.getCurrentTime()); + List analyseGroup = + this.acsElevatorRecordDao.analyseGroup(countDTO); + if (!CollectionUtils.isEmpty(analyseGroup)) { + List groupResult = + BeanCopyUtils.copy(analyseGroup, AcsElevatorAnalyseCycleBusinessResult.class); + result.setRanking((List)groupResult.stream() + .sorted(Comparator.comparing(AcsElevatorAnalyseCycleBusinessResult::getCount).reversed()) + .collect(Collectors.toList())); + } + resultList.add(result); + } + return CloudwalkResult.success(resultList); + } catch (Exception e) { + this.logger.error("开门记录统计分析查询失败,原因:", e); + throw new ServiceException(e); + } + } + + public CloudwalkResult analyseCount(AcsElevatorRecordAnalyseCountParam param, CloudwalkCallContext context) + throws ServiceException { + try { + AcsElevatorQueryCountDTO countDTO = new AcsElevatorQueryCountDTO(); + countDTO.setStartTime(param.getStartTime()); + countDTO.setEndTime(param.getEndTime()); + countDTO.setBusinessId(param.getBusinessId()); + countDTO.setSrcFloor("1"); + countDTO.setRecordResult(Integer.valueOf(1)); + return CloudwalkResult.success(this.acsElevatorRecordDao.analyseCount(countDTO)); + } catch (Exception e) { + this.logger.error("开门记录统计分析查询失败,原因:", e); + throw new ServiceException(e); + } + } + + private void sendRecordEvent(AcsElevatorRecordAddDTO addDTO) { + VisitorRecordPushEvent event = + (VisitorRecordPushEvent)BeanCopyUtils.copyProperties(addDTO, VisitorRecordPushEvent.class); + event.setServiceCode("elevator_record"); + event.setMessageId(this.uuidSerial.uuid()); + this.cloudwalkEventManager.publish((BaseEvent)event); + } + + private URI combineAuthClientURI(String api, @Nullable MultiValueMap params) { + return UriComponentsBuilder.fromUriString("http://" + this.nincaCrkStd).path(api).queryParams(params).build() + .toUri(); + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/impl/AcsRecogRecordServiceImpl.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/impl/AcsRecogRecordServiceImpl.java new file mode 100644 index 00000000..23f2e9b6 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/impl/AcsRecogRecordServiceImpl.java @@ -0,0 +1,114 @@ +package cn.cloudwalk.elevator.record.impl; + +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.person.param.PersonQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.person.result.PersonResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.person.service.PersonService; +import cn.cloudwalk.cloud.annotation.CloudwalkParamsValidate; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.DataAccessException; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.cloud.utils.BeanCopyUtils; +import cn.cloudwalk.elevator.common.AbstractCloudwalkService; +import cn.cloudwalk.elevator.device.setting.param.AcsDeviceTemperatureSettingParam; +import cn.cloudwalk.elevator.device.setting.result.AcsDeviceSettingResult; +import cn.cloudwalk.elevator.device.setting.result.AcsSettingAttr; +import cn.cloudwalk.elevator.device.setting.service.AcsDeviceSettingService; +import cn.cloudwalk.elevator.em.AcsDeviceSettingEnum; +import cn.cloudwalk.elevator.em.CompareTypeEnum; +import cn.cloudwalk.elevator.record.dao.AcsRecogRecordDao; +import cn.cloudwalk.elevator.record.dto.AcsRecogRecordAddDTO; +import cn.cloudwalk.elevator.record.param.AcsRecogRecordAddParam; +import cn.cloudwalk.elevator.record.service.AcsRecogRecordService; +import java.math.BigDecimal; +import java.util.Collection; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; +import javax.annotation.Resource; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +@Service +public class AcsRecogRecordServiceImpl extends AbstractCloudwalkService implements AcsRecogRecordService { + @Resource + private AcsRecogRecordDao acsRecogRecordDao; + @Resource + private PersonService personService; + @Resource + private AcsDeviceSettingService acsDeviceSettingService; + + @Transactional(rollbackFor = {Exception.class}) + @CloudwalkParamsValidate + public CloudwalkResult add(AcsRecogRecordAddParam param, CloudwalkCallContext context) + throws ServiceException { + try { + AcsRecogRecordAddDTO addDTO = new AcsRecogRecordAddDTO(); + BeanCopyUtils.copyProperties(param, addDTO); + if (param.getDeviceResult() != null) { + DeviceResult deviceResult = param.getDeviceResult(); + BeanCopyUtils.copyProperties(deviceResult, addDTO); + addDTO.setDeviceId(deviceResult.getId()); + } + if (param.getSubDeviceResult() != null) { + DeviceResult subDeviceResult = param.getSubDeviceResult(); + addDTO.setSubDeviceId(subDeviceResult.getId()); + addDTO.setSubDeviceCode(subDeviceResult.getDeviceCode()); + addDTO.setSubDeviceName(subDeviceResult.getDeviceName()); + addDTO.setSubDeviceTypeId(subDeviceResult.getDeviceTypeId()); + addDTO.setSubDeviceTypeName(subDeviceResult.getDeviceTypeName()); + } + PersonQueryParam personQueryParam = new PersonQueryParam(); + personQueryParam.setImageIds(Collections.singletonList(param.getFaceId())); + CloudwalkResult> personListResult = this.personService.list(personQueryParam, context); + if (personListResult.isSuccess() && CollectionUtils.isNotEmpty((Collection)personListResult.getData())) { + PersonResult personResult = ((List)personListResult.getData()).get(0); + addDTO.setPersonId(personResult.getId()); + addDTO.setPersonName(personResult.getName()); + addDTO.setRegisterImagePath(personResult.getComparePicture()); + if (!CollectionUtils.isEmpty(personResult.getLabelIds())) { + addDTO.setPersonLabelIds(StringUtils.join(personResult.getLabelIds(), ",")); + } + } + BigDecimal tempTempThreshold = getTempThreshold(addDTO.getDeviceId(), context); + addDTO.setTempThreshold(tempTempThreshold); + addDTO.setId(genUUID()); + addDTO.setCreateTime(Long.valueOf(System.currentTimeMillis())); + addDTO.setLastUpdateTime(Long.valueOf(System.currentTimeMillis())); + addDTO.setCreateUserId(context.getUser().getCaller()); + addDTO.setLastUpdateUserId(context.getUser().getCaller()); + addDTO + .setSource((param.getCompareType() == null) ? CompareTypeEnum.RECOG.getCode() : param.getCompareType()); + this.acsRecogRecordDao.add(addDTO); + return CloudwalkResult.success(Boolean.valueOf(true)); + } catch (DataAccessException e) { + this.logger.error("保存识别记录失败,原因:", (Throwable)e); + throw new ServiceException(e); + } + } + + private BigDecimal getTempThreshold(String deviceId, CloudwalkCallContext context) throws ServiceException { + AcsDeviceTemperatureSettingParam settingParam = new AcsDeviceTemperatureSettingParam(); + settingParam.setDeviceId(deviceId); + CloudwalkResult settingCloudwalkResult = + this.acsDeviceSettingService.getTemperatureSetting(settingParam, context); + if (settingCloudwalkResult.isSuccess() && settingCloudwalkResult.getData() != null) { + List temperatureSetting = + ((AcsDeviceSettingResult)settingCloudwalkResult.getData()).getAttrs(); + if (CollectionUtils.isNotEmpty(temperatureSetting)) { + List settingsList = (List)temperatureSetting.stream() + .filter(s -> AcsDeviceSettingEnum.TEMP_THRESHOLD.getCode().equals(s.getCode())) + .collect(Collectors.toList()); + String temp; + if (CollectionUtils.isNotEmpty(settingsList) + && (temp = ((AcsSettingAttr)settingsList.get(0)).getValue()) != null) { + return new BigDecimal(temp); + } + } + } + return null; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/impl/PersonFileServiceImpl.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/impl/PersonFileServiceImpl.java new file mode 100644 index 00000000..2fdbf304 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/impl/PersonFileServiceImpl.java @@ -0,0 +1,72 @@ +package cn.cloudwalk.elevator.record.impl; + +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.elevator.passrule.impl.AbstractAcsPassService; +import cn.cloudwalk.elevator.record.service.PersonFileService; +import cn.cloudwalk.intelligent.davinci.storage.manager.FileStorageManager; +import java.io.ByteArrayInputStream; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Primary; +import org.springframework.stereotype.Service; +import org.springframework.util.FileCopyUtils; +import org.springframework.web.multipart.MultipartFile; + +@Service +@Primary +public class PersonFileServiceImpl extends AbstractAcsPassService implements PersonFileService { + @Autowired + private FileStorageManager fileStorageManager; + @Value("${person.name.space}") + private String PERSON_NAME_SPACE; + + public CloudwalkResult upload(String fileName, byte[] content) { + MultipartFile multipartFile = buildMultipartFile(fileName, content); + try { + return CloudwalkResult.success(this.fileStorageManager.fileUpload(this.PERSON_NAME_SPACE, multipartFile)); + } catch (Exception e) { + this.logger.error("file upload error", e); + return CloudwalkResult.fail("80014001", getMessage("80014001")); + } + } + + public MultipartFile buildMultipartFile(final String fileName, final byte[] bytes) { + MultipartFile file = new MultipartFile() { + public String getName() { + return "file"; + } + + public String getOriginalFilename() { + return fileName; + } + + public String getContentType() { + return null; + } + + public boolean isEmpty() { + return (bytes.length == 0); + } + + public long getSize() { + return bytes.length; + } + + public byte[] getBytes() throws IOException { + return bytes; + } + + public InputStream getInputStream() throws IOException { + return new ByteArrayInputStream(bytes); + } + + public void transferTo(File dest) throws IOException, IllegalStateException { + FileCopyUtils.copy(bytes, dest); + } + }; + return file; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/impl/SendRecordTimeServiceImpl.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/impl/SendRecordTimeServiceImpl.java new file mode 100644 index 00000000..2cbfd6cf --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/impl/SendRecordTimeServiceImpl.java @@ -0,0 +1,13 @@ +package cn.cloudwalk.elevator.record.impl; + +import cn.cloudwalk.elevator.common.AbstractCloudwalkService; +import cn.cloudwalk.elevator.record.dao.SendRecordTimeDao; +import cn.cloudwalk.elevator.record.service.SendRecordTimeService; +import javax.annotation.Resource; +import org.springframework.stereotype.Service; + +@Service +public class SendRecordTimeServiceImpl extends AbstractCloudwalkService implements SendRecordTimeService { + @Resource + private SendRecordTimeDao sendRecordTimeDao; +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/param/AcsElevatorRecordAddParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/param/AcsElevatorRecordAddParam.java new file mode 100644 index 00000000..1c6d6406 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/param/AcsElevatorRecordAddParam.java @@ -0,0 +1,167 @@ +package cn.cloudwalk.elevator.record.param; + +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceResult; +import java.io.Serializable; +import javax.validation.constraints.NotNull; +import org.hibernate.validator.constraints.NotEmpty; + +public class AcsElevatorRecordAddParam implements Serializable { + @NotEmpty(message = "76260310") + private String businessId; + @NotEmpty(message = "76260314") + private String deviceCode; + private String deviceName; + @NotEmpty(message = "76260319") + private String openDoorType; + private String faceImagePath; + private String panoramaImagePath; + @NotNull(message = "76260320") + private Integer recordResult; + private String recognitionNo; + @NotNull(message = "76260301") + private Long recognitionTime; + private String logId; + private String recognitionFaceId; + private DeviceResult deviceResult; + private String srcFloor; + private String destFloor; + private String dispatchElevatorNo; + private Long dispatchElevatorTime; + private String operateName; + + public String getOperateName() { + return this.operateName; + } + + public void setOperateName(String operateName) { + this.operateName = operateName; + } + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getDeviceCode() { + return this.deviceCode; + } + + public void setDeviceCode(String deviceCode) { + this.deviceCode = deviceCode; + } + + public String getDeviceName() { + return this.deviceName; + } + + public void setDeviceName(String deviceName) { + this.deviceName = deviceName; + } + + public String getOpenDoorType() { + return this.openDoorType; + } + + public void setOpenDoorType(String openDoorType) { + this.openDoorType = openDoorType; + } + + public String getFaceImagePath() { + return this.faceImagePath; + } + + public void setFaceImagePath(String faceImagePath) { + this.faceImagePath = faceImagePath; + } + + public String getPanoramaImagePath() { + return this.panoramaImagePath; + } + + public void setPanoramaImagePath(String panoramaImagePath) { + this.panoramaImagePath = panoramaImagePath; + } + + public Integer getRecordResult() { + return this.recordResult; + } + + public void setRecordResult(Integer recordResult) { + this.recordResult = recordResult; + } + + public String getRecognitionNo() { + return this.recognitionNo; + } + + public void setRecognitionNo(String recognitionNo) { + this.recognitionNo = recognitionNo; + } + + public Long getRecognitionTime() { + return this.recognitionTime; + } + + public void setRecognitionTime(Long recognitionTime) { + this.recognitionTime = recognitionTime; + } + + public String getLogId() { + return this.logId; + } + + public void setLogId(String logId) { + this.logId = logId; + } + + public String getRecognitionFaceId() { + return this.recognitionFaceId; + } + + public void setRecognitionFaceId(String recognitionFaceId) { + this.recognitionFaceId = recognitionFaceId; + } + + public DeviceResult getDeviceResult() { + return this.deviceResult; + } + + public void setDeviceResult(DeviceResult deviceResult) { + this.deviceResult = deviceResult; + } + + public String getSrcFloor() { + return this.srcFloor; + } + + public void setSrcFloor(String srcFloor) { + this.srcFloor = srcFloor; + } + + public String getDestFloor() { + return this.destFloor; + } + + public void setDestFloor(String destFloor) { + this.destFloor = destFloor; + } + + public String getDispatchElevatorNo() { + return this.dispatchElevatorNo; + } + + public void setDispatchElevatorNo(String dispatchElevatorNo) { + this.dispatchElevatorNo = dispatchElevatorNo; + } + + public Long getDispatchElevatorTime() { + return this.dispatchElevatorTime; + } + + public void setDispatchElevatorTime(Long dispatchElevatorTime) { + this.dispatchElevatorTime = dispatchElevatorTime; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/param/AcsElevatorRecordAnalyseCountParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/param/AcsElevatorRecordAnalyseCountParam.java new file mode 100644 index 00000000..177538cb --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/param/AcsElevatorRecordAnalyseCountParam.java @@ -0,0 +1,36 @@ +package cn.cloudwalk.elevator.record.param; + +import java.io.Serializable; +import javax.validation.constraints.NotNull; + +public class AcsElevatorRecordAnalyseCountParam implements Serializable { + private String businessId; + @NotNull(message = "76260302") + private Long startTime; + @NotNull(message = "76260303") + private Long endTime; + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public Long getStartTime() { + return this.startTime; + } + + public void setStartTime(Long startTime) { + this.startTime = startTime; + } + + public Long getEndTime() { + return this.endTime; + } + + public void setEndTime(Long endTime) { + this.endTime = endTime; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/param/AcsElevatorRecordAnalyseCycleParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/param/AcsElevatorRecordAnalyseCycleParam.java new file mode 100644 index 00000000..70e45f49 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/param/AcsElevatorRecordAnalyseCycleParam.java @@ -0,0 +1,30 @@ +package cn.cloudwalk.elevator.record.param; + +import java.io.Serializable; +import javax.validation.constraints.Max; +import javax.validation.constraints.Min; +import javax.validation.constraints.NotNull; + +public class AcsElevatorRecordAnalyseCycleParam implements Serializable { + private String businessId; + @NotNull(message = "76260333") + @Min(value = 0L, message = "76260334") + @Max(value = 2L, message = "76260334") + private Integer timeType; + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public Integer getTimeType() { + return this.timeType; + } + + public void setTimeType(Integer timeType) { + this.timeType = timeType; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/param/AcsElevatorRecordDetailParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/param/AcsElevatorRecordDetailParam.java new file mode 100644 index 00000000..cdbc9843 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/param/AcsElevatorRecordDetailParam.java @@ -0,0 +1,136 @@ +package cn.cloudwalk.elevator.record.param; + +import java.io.Serializable; +import java.util.List; +import javax.validation.constraints.NotNull; + +public class AcsElevatorRecordDetailParam implements Serializable { + @NotNull(message = "76260302") + private Long startTime; + @NotNull(message = "76260303") + private Long endTime; + private String personName; + private String personId; + private List districtIds; + private List areaIds; + private List deviceIds; + private String openDoorTypeCode; + private Integer recordResult; + private String srcFloor; + private String destFloor; + private String dispatchElevatorNo; + private String personCode; + private String orgId; + + public String getPersonCode() { + return this.personCode; + } + + public void setPersonCode(String personCode) { + this.personCode = personCode; + } + + public String getOrgId() { + return this.orgId; + } + + public void setOrgId(String orgId) { + this.orgId = orgId; + } + + public Long getStartTime() { + return this.startTime; + } + + public void setStartTime(Long startTime) { + this.startTime = startTime; + } + + public Long getEndTime() { + return this.endTime; + } + + public void setEndTime(Long endTime) { + this.endTime = endTime; + } + + public String getPersonName() { + return this.personName; + } + + public void setPersonName(String personName) { + this.personName = personName; + } + + public List getDistrictIds() { + return this.districtIds; + } + + public void setDistrictIds(List districtIds) { + this.districtIds = districtIds; + } + + public List getAreaIds() { + return this.areaIds; + } + + public void setAreaIds(List areaIds) { + this.areaIds = areaIds; + } + + public List getDeviceIds() { + return this.deviceIds; + } + + public void setDeviceIds(List deviceIds) { + this.deviceIds = deviceIds; + } + + public String getOpenDoorTypeCode() { + return this.openDoorTypeCode; + } + + public void setOpenDoorTypeCode(String openDoorTypeCode) { + this.openDoorTypeCode = openDoorTypeCode; + } + + public Integer getRecordResult() { + return this.recordResult; + } + + public void setRecordResult(Integer recordResult) { + this.recordResult = recordResult; + } + + public String getSrcFloor() { + return this.srcFloor; + } + + public void setSrcFloor(String srcFloor) { + this.srcFloor = srcFloor; + } + + public String getDestFloor() { + return this.destFloor; + } + + public void setDestFloor(String destFloor) { + this.destFloor = destFloor; + } + + public String getDispatchElevatorNo() { + return this.dispatchElevatorNo; + } + + public void setDispatchElevatorNo(String dispatchElevatorNo) { + this.dispatchElevatorNo = dispatchElevatorNo; + } + + public String getPersonId() { + return this.personId; + } + + public void setPersonId(String personId) { + this.personId = personId; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/param/AcsOpenDoorRecordAddParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/param/AcsOpenDoorRecordAddParam.java new file mode 100644 index 00000000..7a901731 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/param/AcsOpenDoorRecordAddParam.java @@ -0,0 +1,122 @@ +package cn.cloudwalk.elevator.record.param; + +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceResult; +import java.io.Serializable; +import javax.validation.constraints.NotNull; +import org.hibernate.validator.constraints.NotEmpty; + +public class AcsOpenDoorRecordAddParam implements Serializable { + @NotEmpty(message = "76260310") + private String businessId; + @NotEmpty(message = "76260314") + private String deviceCode; + private String deviceName; + @NotEmpty(message = "76260319") + private String openDoorType; + private String faceImagePath; + private String panoramaImagePath; + @NotNull(message = "76260320") + private Integer recordResult; + private String recognitionNo; + @NotNull(message = "76260301") + private Long recognitionTime; + private String logId; + private String recognitionFaceId; + private DeviceResult deviceResult; + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getDeviceCode() { + return this.deviceCode; + } + + public void setDeviceCode(String deviceCode) { + this.deviceCode = deviceCode; + } + + public String getDeviceName() { + return this.deviceName; + } + + public void setDeviceName(String deviceName) { + this.deviceName = deviceName; + } + + public String getOpenDoorType() { + return this.openDoorType; + } + + public void setOpenDoorType(String openDoorType) { + this.openDoorType = openDoorType; + } + + public String getFaceImagePath() { + return this.faceImagePath; + } + + public void setFaceImagePath(String faceImagePath) { + this.faceImagePath = faceImagePath; + } + + public String getPanoramaImagePath() { + return this.panoramaImagePath; + } + + public void setPanoramaImagePath(String panoramaImagePath) { + this.panoramaImagePath = panoramaImagePath; + } + + public Integer getRecordResult() { + return this.recordResult; + } + + public void setRecordResult(Integer recordResult) { + this.recordResult = recordResult; + } + + public String getRecognitionNo() { + return this.recognitionNo; + } + + public void setRecognitionNo(String recognitionNo) { + this.recognitionNo = recognitionNo; + } + + public Long getRecognitionTime() { + return this.recognitionTime; + } + + public void setRecognitionTime(Long recognitionTime) { + this.recognitionTime = recognitionTime; + } + + public String getLogId() { + return this.logId; + } + + public void setLogId(String logId) { + this.logId = logId; + } + + public String getRecognitionFaceId() { + return this.recognitionFaceId; + } + + public void setRecognitionFaceId(String recognitionFaceId) { + this.recognitionFaceId = recognitionFaceId; + } + + public DeviceResult getDeviceResult() { + return this.deviceResult; + } + + public void setDeviceResult(DeviceResult deviceResult) { + this.deviceResult = deviceResult; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/param/AcsOpenDoorRecordEditParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/param/AcsOpenDoorRecordEditParam.java new file mode 100644 index 00000000..bbed656b --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/param/AcsOpenDoorRecordEditParam.java @@ -0,0 +1,104 @@ +package cn.cloudwalk.elevator.record.param; + +import java.io.Serializable; +import javax.validation.constraints.NotNull; +import org.hibernate.validator.constraints.NotBlank; +import org.hibernate.validator.constraints.NotEmpty; + +public class AcsOpenDoorRecordEditParam implements Serializable { + private static final long serialVersionUID = -4215667286101307433L; + @NotEmpty(message = "76260310") + private String businessId; + @NotBlank(message = "76260311") + private String logId; + private String deviceId; + private Integer recordResult; + @NotNull(message = "76260312") + private Long startDay; + @NotNull(message = "76260313") + private Long endDay; + private String openDoorType; + private String faceImagePath; + private String panoramaImagePath; + private String recognitionNo; + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getLogId() { + return this.logId; + } + + public void setLogId(String logId) { + this.logId = logId; + } + + public String getDeviceId() { + return this.deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public Integer getRecordResult() { + return this.recordResult; + } + + public void setRecordResult(Integer recordResult) { + this.recordResult = recordResult; + } + + public Long getStartDay() { + return this.startDay; + } + + public void setStartDay(Long startDay) { + this.startDay = startDay; + } + + public Long getEndDay() { + return this.endDay; + } + + public void setEndDay(Long endDay) { + this.endDay = endDay; + } + + public String getOpenDoorType() { + return this.openDoorType; + } + + public void setOpenDoorType(String openDoorType) { + this.openDoorType = openDoorType; + } + + public String getFaceImagePath() { + return this.faceImagePath; + } + + public void setFaceImagePath(String faceImagePath) { + this.faceImagePath = faceImagePath; + } + + public String getPanoramaImagePath() { + return this.panoramaImagePath; + } + + public void setPanoramaImagePath(String panoramaImagePath) { + this.panoramaImagePath = panoramaImagePath; + } + + public String getRecognitionNo() { + return this.recognitionNo; + } + + public void setRecognitionNo(String recognitionNo) { + this.recognitionNo = recognitionNo; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/param/AcsRecogRecordAddParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/param/AcsRecogRecordAddParam.java new file mode 100644 index 00000000..cffa2615 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/param/AcsRecogRecordAddParam.java @@ -0,0 +1,188 @@ +package cn.cloudwalk.elevator.record.param; + +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceResult; +import java.io.Serializable; +import java.math.BigDecimal; +import javax.validation.constraints.NotNull; +import org.hibernate.validator.constraints.NotEmpty; + +public class AcsRecogRecordAddParam implements Serializable { + @NotEmpty(message = "76260310") + private String businessId; + @NotEmpty(message = "76260314") + private String deviceCode; + private String deviceName; + @NotNull(message = "76260315") + private BigDecimal threshold; + private String registerImagePath; + private String faceImagePath; + private String panoramaImagePath; + @NotNull(message = "76260316") + private BigDecimal score; + private Integer recognitionResult; + private Long recognitionTime; + @NotEmpty(message = "76260301") + private String groupId; + @NotEmpty(message = "76260317") + private String faceId; + @NotNull(message = "76260318") + private BigDecimal qualityScore; + private String logId; + private BigDecimal tempScore; + private BigDecimal maskScore; + private DeviceResult deviceResult; + private DeviceResult subDeviceResult; + private Integer compareType; + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getDeviceCode() { + return this.deviceCode; + } + + public void setDeviceCode(String deviceCode) { + this.deviceCode = deviceCode; + } + + public String getDeviceName() { + return this.deviceName; + } + + public void setDeviceName(String deviceName) { + this.deviceName = deviceName; + } + + public BigDecimal getThreshold() { + return this.threshold; + } + + public void setThreshold(BigDecimal threshold) { + this.threshold = threshold; + } + + public String getRegisterImagePath() { + return this.registerImagePath; + } + + public void setRegisterImagePath(String registerImagePath) { + this.registerImagePath = registerImagePath; + } + + public String getFaceImagePath() { + return this.faceImagePath; + } + + public void setFaceImagePath(String faceImagePath) { + this.faceImagePath = faceImagePath; + } + + public String getPanoramaImagePath() { + return this.panoramaImagePath; + } + + public void setPanoramaImagePath(String panoramaImagePath) { + this.panoramaImagePath = panoramaImagePath; + } + + public BigDecimal getScore() { + return this.score; + } + + public void setScore(BigDecimal score) { + this.score = score; + } + + public Integer getRecognitionResult() { + return this.recognitionResult; + } + + public void setRecognitionResult(Integer recognitionResult) { + this.recognitionResult = recognitionResult; + } + + public Long getRecognitionTime() { + return this.recognitionTime; + } + + public void setRecognitionTime(Long recognitionTime) { + this.recognitionTime = recognitionTime; + } + + public String getGroupId() { + return this.groupId; + } + + public void setGroupId(String groupId) { + this.groupId = groupId; + } + + public String getFaceId() { + return this.faceId; + } + + public void setFaceId(String faceId) { + this.faceId = faceId; + } + + public BigDecimal getQualityScore() { + return this.qualityScore; + } + + public void setQualityScore(BigDecimal qualityScore) { + this.qualityScore = qualityScore; + } + + public String getLogId() { + return this.logId; + } + + public void setLogId(String logId) { + this.logId = logId; + } + + public BigDecimal getTempScore() { + return this.tempScore; + } + + public void setTempScore(BigDecimal tempScore) { + this.tempScore = tempScore; + } + + public BigDecimal getMaskScore() { + return this.maskScore; + } + + public void setMaskScore(BigDecimal maskScore) { + this.maskScore = maskScore; + } + + public DeviceResult getDeviceResult() { + return this.deviceResult; + } + + public void setDeviceResult(DeviceResult deviceResult) { + this.deviceResult = deviceResult; + } + + public DeviceResult getSubDeviceResult() { + return this.subDeviceResult; + } + + public void setSubDeviceResult(DeviceResult subDeviceResult) { + this.subDeviceResult = subDeviceResult; + } + + public Integer getCompareType() { + return this.compareType; + } + + public void setCompareType(Integer compareType) { + this.compareType = compareType; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/param/SendRecordSendInfoParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/param/SendRecordSendInfoParam.java new file mode 100644 index 00000000..fc64dfa2 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/param/SendRecordSendInfoParam.java @@ -0,0 +1,31 @@ +package cn.cloudwalk.elevator.record.param; + +public class SendRecordSendInfoParam { + private String employeeCode; + private String signTime; + private String deviceName; + + public String getEmployeeCode() { + return this.employeeCode; + } + + public void setEmployeeCode(String employeeCode) { + this.employeeCode = employeeCode; + } + + public String getSignTime() { + return this.signTime; + } + + public void setSignTime(String signTime) { + this.signTime = signTime; + } + + public String getDeviceName() { + return this.deviceName; + } + + public void setDeviceName(String deviceName) { + this.deviceName = deviceName; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/param/SendRecordSendParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/param/SendRecordSendParam.java new file mode 100644 index 00000000..b3cbd2ba --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/param/SendRecordSendParam.java @@ -0,0 +1,15 @@ +package cn.cloudwalk.elevator.record.param; + +import java.util.List; + +public class SendRecordSendParam { + private List records; + + public List getRecords() { + return this.records; + } + + public void setRecords(List records) { + this.records = records; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/param/SendRecordTokenParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/param/SendRecordTokenParam.java new file mode 100644 index 00000000..6b10a7a0 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/param/SendRecordTokenParam.java @@ -0,0 +1,31 @@ +package cn.cloudwalk.elevator.record.param; + +public class SendRecordTokenParam { + private String corpId; + private String appKey; + private String appSecret; + + public String getCorpId() { + return this.corpId; + } + + public void setCorpId(String corpId) { + this.corpId = corpId; + } + + public String getAppKey() { + return this.appKey; + } + + public void setAppKey(String appKey) { + this.appKey = appKey; + } + + public String getAppSecret() { + return this.appSecret; + } + + public void setAppSecret(String appSecret) { + this.appSecret = appSecret; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/result/AcsElevatorAnalyseCycleBusinessResult.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/result/AcsElevatorAnalyseCycleBusinessResult.java new file mode 100644 index 00000000..20045e85 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/result/AcsElevatorAnalyseCycleBusinessResult.java @@ -0,0 +1,31 @@ +package cn.cloudwalk.elevator.record.result; + +public class AcsElevatorAnalyseCycleBusinessResult { + private String businessId; + private String businessName; + private Integer count; + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getBusinessName() { + return this.businessName; + } + + public void setBusinessName(String businessName) { + this.businessName = businessName; + } + + public Integer getCount() { + return this.count; + } + + public void setCount(Integer count) { + this.count = count; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/result/AcsElevatorAnalyseCycleResult.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/result/AcsElevatorAnalyseCycleResult.java new file mode 100644 index 00000000..8dd96f22 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/result/AcsElevatorAnalyseCycleResult.java @@ -0,0 +1,24 @@ +package cn.cloudwalk.elevator.record.result; + +import java.util.List; + +public class AcsElevatorAnalyseCycleResult { + private String currentTime; + private List ranking; + + public String getCurrentTime() { + return this.currentTime; + } + + public void setCurrentTime(String currentTime) { + this.currentTime = currentTime; + } + + public List getRanking() { + return this.ranking; + } + + public void setRanking(List ranking) { + this.ranking = ranking; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/result/AcsElevatorPageRequestInfoResult.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/result/AcsElevatorPageRequestInfoResult.java new file mode 100644 index 00000000..686fb559 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/result/AcsElevatorPageRequestInfoResult.java @@ -0,0 +1,33 @@ +package cn.cloudwalk.elevator.record.result; + +import java.util.List; + +public class AcsElevatorPageRequestInfoResult { + private List srcFloorList; + private List destFloorList; + private List dispatchElevatorNoList; + + public List getSrcFloorList() { + return this.srcFloorList; + } + + public void setSrcFloorList(List srcFloorList) { + this.srcFloorList = srcFloorList; + } + + public List getDestFloorList() { + return this.destFloorList; + } + + public void setDestFloorList(List destFloorList) { + this.destFloorList = destFloorList; + } + + public List getDispatchElevatorNoList() { + return this.dispatchElevatorNoList; + } + + public void setDispatchElevatorNoList(List dispatchElevatorNoList) { + this.dispatchElevatorNoList = dispatchElevatorNoList; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/result/AcsElevatorRecordResult.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/result/AcsElevatorRecordResult.java new file mode 100644 index 00000000..811909da --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/result/AcsElevatorRecordResult.java @@ -0,0 +1,343 @@ +package cn.cloudwalk.elevator.record.result; + +import cn.cloudwalk.elevator.annontation.DavinciPic; +import java.math.BigDecimal; + +public class AcsElevatorRecordResult { + private String openDoorId; + @DavinciPic + private String panoramaImage; + @DavinciPic + private String faceImage; + @DavinciPic + private String registerImage; + private String personName; + private long recognitionTime; + private String districtName; + private String areaName; + private String deviceTypeName; + private String deviceName; + private String openDoorType; + private String operateName; + private String openDoorTypeCode; + private BigDecimal score; + private Integer recordResult; + private String recognitionNo; + private Integer isVisitor; + private String interviewee; + private String personId; + private String regRecordId; + private BigDecimal threshold; + private Integer recognitionResult; + private String groupId; + private String faceId; + private BigDecimal qualityScore; + private String logId; + private BigDecimal tempScore; + private BigDecimal maskScore; + private BigDecimal tempThreshold; + private String srcFloor; + private String destFloor; + private String dispatchElevatorNo; + private String personCode; + private String orgId; + private String orgName; + private String deviceId; + private String deviceCode; + + public String getDeviceId() { + return this.deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public String getDeviceCode() { + return this.deviceCode; + } + + public void setDeviceCode(String deviceCode) { + this.deviceCode = deviceCode; + } + + public String getPersonCode() { + return this.personCode; + } + + public void setPersonCode(String personCode) { + this.personCode = personCode; + } + + public String getOrgId() { + return this.orgId; + } + + public void setOrgId(String orgId) { + this.orgId = orgId; + } + + public String getOrgName() { + return this.orgName; + } + + public void setOrgName(String orgName) { + this.orgName = orgName; + } + + public String getOpenDoorId() { + return this.openDoorId; + } + + public void setOpenDoorId(String openDoorId) { + this.openDoorId = openDoorId; + } + + public String getPanoramaImage() { + return this.panoramaImage; + } + + public void setPanoramaImage(String panoramaImage) { + this.panoramaImage = panoramaImage; + } + + public String getFaceImage() { + return this.faceImage; + } + + public void setFaceImage(String faceImage) { + this.faceImage = faceImage; + } + + public String getRegisterImage() { + return this.registerImage; + } + + public void setRegisterImage(String registerImage) { + this.registerImage = registerImage; + } + + public String getPersonName() { + return this.personName; + } + + public void setPersonName(String personName) { + this.personName = personName; + } + + public long getRecognitionTime() { + return this.recognitionTime; + } + + public void setRecognitionTime(long recognitionTime) { + this.recognitionTime = recognitionTime; + } + + public String getDistrictName() { + return this.districtName; + } + + public void setDistrictName(String districtName) { + this.districtName = districtName; + } + + public String getAreaName() { + return this.areaName; + } + + public void setAreaName(String areaName) { + this.areaName = areaName; + } + + public String getDeviceTypeName() { + return this.deviceTypeName; + } + + public void setDeviceTypeName(String deviceTypeName) { + this.deviceTypeName = deviceTypeName; + } + + public String getDeviceName() { + return this.deviceName; + } + + public void setDeviceName(String deviceName) { + this.deviceName = deviceName; + } + + public String getOpenDoorType() { + return this.openDoorType; + } + + public void setOpenDoorType(String openDoorType) { + this.openDoorType = openDoorType; + } + + public String getOperateName() { + return this.operateName; + } + + public void setOperateName(String operateName) { + this.operateName = operateName; + } + + public String getOpenDoorTypeCode() { + return this.openDoorTypeCode; + } + + public void setOpenDoorTypeCode(String openDoorTypeCode) { + this.openDoorTypeCode = openDoorTypeCode; + } + + public BigDecimal getScore() { + return this.score; + } + + public void setScore(BigDecimal score) { + this.score = score; + } + + public Integer getRecordResult() { + return this.recordResult; + } + + public void setRecordResult(Integer recordResult) { + this.recordResult = recordResult; + } + + public String getRecognitionNo() { + return this.recognitionNo; + } + + public void setRecognitionNo(String recognitionNo) { + this.recognitionNo = recognitionNo; + } + + public String getRegRecordId() { + return this.regRecordId; + } + + public void setRegRecordId(String regRecordId) { + this.regRecordId = regRecordId; + } + + public BigDecimal getThreshold() { + return this.threshold; + } + + public void setThreshold(BigDecimal threshold) { + this.threshold = threshold; + } + + public Integer getRecognitionResult() { + return this.recognitionResult; + } + + public void setRecognitionResult(Integer recognitionResult) { + this.recognitionResult = recognitionResult; + } + + public String getGroupId() { + return this.groupId; + } + + public void setGroupId(String groupId) { + this.groupId = groupId; + } + + public String getFaceId() { + return this.faceId; + } + + public void setFaceId(String faceId) { + this.faceId = faceId; + } + + public BigDecimal getQualityScore() { + return this.qualityScore; + } + + public void setQualityScore(BigDecimal qualityScore) { + this.qualityScore = qualityScore; + } + + public String getLogId() { + return this.logId; + } + + public void setLogId(String logId) { + this.logId = logId; + } + + public BigDecimal getTempScore() { + return this.tempScore; + } + + public void setTempScore(BigDecimal tempScore) { + this.tempScore = tempScore; + } + + public BigDecimal getMaskScore() { + return this.maskScore; + } + + public void setMaskScore(BigDecimal maskScore) { + this.maskScore = maskScore; + } + + public BigDecimal getTempThreshold() { + return this.tempThreshold; + } + + public void setTempThreshold(BigDecimal tempThreshold) { + this.tempThreshold = tempThreshold; + } + + public String getSrcFloor() { + return this.srcFloor; + } + + public void setSrcFloor(String srcFloor) { + this.srcFloor = srcFloor; + } + + public String getDestFloor() { + return this.destFloor; + } + + public void setDestFloor(String destFloor) { + this.destFloor = destFloor; + } + + public String getDispatchElevatorNo() { + return this.dispatchElevatorNo; + } + + public void setDispatchElevatorNo(String dispatchElevatorNo) { + this.dispatchElevatorNo = dispatchElevatorNo; + } + + public Integer getIsVisitor() { + return this.isVisitor; + } + + public void setIsVisitor(Integer isVisitor) { + this.isVisitor = isVisitor; + } + + public String getInterviewee() { + return this.interviewee; + } + + public void setInterviewee(String interviewee) { + this.interviewee = interviewee; + } + + public String getPersonId() { + return this.personId; + } + + public void setPersonId(String personId) { + this.personId = personId; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/result/SendRecordTokenResult.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/result/SendRecordTokenResult.java new file mode 100644 index 00000000..5e754437 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/result/SendRecordTokenResult.java @@ -0,0 +1,22 @@ +package cn.cloudwalk.elevator.record.result; + +public class SendRecordTokenResult { + private String token; + private Long expiresIn; + + public String getToken() { + return this.token; + } + + public void setToken(String token) { + this.token = token; + } + + public Long getExpiresIn() { + return this.expiresIn; + } + + public void setExpiresIn(Long expiresIn) { + this.expiresIn = expiresIn; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/result/VisitorRecordPushEvent.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/result/VisitorRecordPushEvent.java new file mode 100644 index 00000000..e47731d3 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/result/VisitorRecordPushEvent.java @@ -0,0 +1,201 @@ +package cn.cloudwalk.elevator.record.result; + +import cn.cloudwalk.cwos.client.event.event.CustomEvent; + +public class VisitorRecordPushEvent extends CustomEvent { + private String businessId; + private String deviceId; + private String deviceCode; + private String deviceName; + private String deviceTypeId; + private String deviceTypeName; + private String districtId; + private String areaId; + private String openDoorType; + private String operateName; + private String faceImagePath; + + public String getTopic() { + return "VISITOR_RECORD_TOPIC"; + } + + private String panoramaImagePath; + private Integer recordResult; + private String recognitionNo; + private Long recognitionTime; + private String logId; + private String recognitionFaceId; + private String srcFloor; + private String destFloor; + private String dispatchElevatorNo; + private Long dispatchElevatorTime; + private static final long serialVersionUID = 1L; + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getDeviceId() { + return this.deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public String getDeviceCode() { + return this.deviceCode; + } + + public void setDeviceCode(String deviceCode) { + this.deviceCode = deviceCode; + } + + public String getDeviceName() { + return this.deviceName; + } + + public void setDeviceName(String deviceName) { + this.deviceName = deviceName; + } + + public String getDeviceTypeId() { + return this.deviceTypeId; + } + + public void setDeviceTypeId(String deviceTypeId) { + this.deviceTypeId = deviceTypeId; + } + + public String getDeviceTypeName() { + return this.deviceTypeName; + } + + public void setDeviceTypeName(String deviceTypeName) { + this.deviceTypeName = deviceTypeName; + } + + public String getDistrictId() { + return this.districtId; + } + + public void setDistrictId(String districtId) { + this.districtId = districtId; + } + + public String getAreaId() { + return this.areaId; + } + + public void setAreaId(String areaId) { + this.areaId = areaId; + } + + public String getOpenDoorType() { + return this.openDoorType; + } + + public void setOpenDoorType(String openDoorType) { + this.openDoorType = openDoorType; + } + + public String getOperateName() { + return this.operateName; + } + + public void setOperateName(String operateName) { + this.operateName = operateName; + } + + public String getFaceImagePath() { + return this.faceImagePath; + } + + public void setFaceImagePath(String faceImagePath) { + this.faceImagePath = faceImagePath; + } + + public String getPanoramaImagePath() { + return this.panoramaImagePath; + } + + public void setPanoramaImagePath(String panoramaImagePath) { + this.panoramaImagePath = panoramaImagePath; + } + + public Integer getRecordResult() { + return this.recordResult; + } + + public void setRecordResult(Integer recordResult) { + this.recordResult = recordResult; + } + + public String getRecognitionNo() { + return this.recognitionNo; + } + + public void setRecognitionNo(String recognitionNo) { + this.recognitionNo = recognitionNo; + } + + public Long getRecognitionTime() { + return this.recognitionTime; + } + + public void setRecognitionTime(Long recognitionTime) { + this.recognitionTime = recognitionTime; + } + + public String getLogId() { + return this.logId; + } + + public void setLogId(String logId) { + this.logId = logId; + } + + public String getRecognitionFaceId() { + return this.recognitionFaceId; + } + + public void setRecognitionFaceId(String recognitionFaceId) { + this.recognitionFaceId = recognitionFaceId; + } + + public String getSrcFloor() { + return this.srcFloor; + } + + public void setSrcFloor(String srcFloor) { + this.srcFloor = srcFloor; + } + + public String getDestFloor() { + return this.destFloor; + } + + public void setDestFloor(String destFloor) { + this.destFloor = destFloor; + } + + public String getDispatchElevatorNo() { + return this.dispatchElevatorNo; + } + + public void setDispatchElevatorNo(String dispatchElevatorNo) { + this.dispatchElevatorNo = dispatchElevatorNo; + } + + public Long getDispatchElevatorTime() { + return this.dispatchElevatorTime; + } + + public void setDispatchElevatorTime(Long dispatchElevatorTime) { + this.dispatchElevatorTime = dispatchElevatorTime; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/service/AcsElevatorRecordService.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/service/AcsElevatorRecordService.java new file mode 100644 index 00000000..90cceb46 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/service/AcsElevatorRecordService.java @@ -0,0 +1,39 @@ +package cn.cloudwalk.elevator.record.service; + +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.page.CloudwalkPageInfo; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.elevator.record.param.AcsElevatorRecordAddParam; +import cn.cloudwalk.elevator.record.param.AcsElevatorRecordAnalyseCountParam; +import cn.cloudwalk.elevator.record.param.AcsElevatorRecordAnalyseCycleParam; +import cn.cloudwalk.elevator.record.param.AcsElevatorRecordDetailParam; +import cn.cloudwalk.elevator.record.param.AcsOpenDoorRecordEditParam; +import cn.cloudwalk.elevator.record.result.AcsElevatorAnalyseCycleResult; +import cn.cloudwalk.elevator.record.result.AcsElevatorPageRequestInfoResult; +import cn.cloudwalk.elevator.record.result.AcsElevatorRecordResult; +import java.util.List; + +public interface AcsElevatorRecordService { + CloudwalkResult> openRecord( + AcsElevatorRecordDetailParam paramAcsElevatorRecordDetailParam, CloudwalkPageInfo paramCloudwalkPageInfo, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult add(AcsElevatorRecordAddParam paramAcsElevatorRecordAddParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult modify(AcsOpenDoorRecordEditParam paramAcsOpenDoorRecordEditParam) throws ServiceException; + + CloudwalkResult createCache(String paramString, long paramLong); + + CloudwalkResult pageInfo(CloudwalkCallContext paramCloudwalkCallContext) + throws ServiceException; + + CloudwalkResult> analyseCycle( + AcsElevatorRecordAnalyseCycleParam paramAcsElevatorRecordAnalyseCycleParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult analyseCount(AcsElevatorRecordAnalyseCountParam paramAcsElevatorRecordAnalyseCountParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/service/AcsRecogRecordService.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/service/AcsRecogRecordService.java new file mode 100644 index 00000000..1dd9b3ca --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/service/AcsRecogRecordService.java @@ -0,0 +1,11 @@ +package cn.cloudwalk.elevator.record.service; + +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.elevator.record.param.AcsRecogRecordAddParam; + +public interface AcsRecogRecordService { + CloudwalkResult add(AcsRecogRecordAddParam paramAcsRecogRecordAddParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/service/PersonFileService.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/service/PersonFileService.java new file mode 100644 index 00000000..dfcf4b5b --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/service/PersonFileService.java @@ -0,0 +1,10 @@ +package cn.cloudwalk.elevator.record.service; + +import cn.cloudwalk.cloud.result.CloudwalkResult; +import org.springframework.web.multipart.MultipartFile; + +public interface PersonFileService { + CloudwalkResult upload(String paramString, byte[] paramArrayOfbyte); + + MultipartFile buildMultipartFile(String paramString, byte[] paramArrayOfbyte); +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/service/SendRecordTimeService.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/service/SendRecordTimeService.java new file mode 100644 index 00000000..82f92b8c --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/record/service/SendRecordTimeService.java @@ -0,0 +1,3 @@ +package cn.cloudwalk.elevator.record.service; + +public interface SendRecordTimeService {} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/storage/AcsFileStorageService.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/storage/AcsFileStorageService.java new file mode 100644 index 00000000..5dde42a3 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/storage/AcsFileStorageService.java @@ -0,0 +1,19 @@ +package cn.cloudwalk.elevator.storage; + +import cn.cloudwalk.client.davinci.portal.file.param.part.FilePartAppendParam; +import cn.cloudwalk.client.davinci.portal.file.param.part.FilePartFinishParam; +import cn.cloudwalk.client.davinci.portal.file.param.part.FilePartInitParam; +import cn.cloudwalk.client.davinci.portal.file.result.FilePartResult; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; + +public interface AcsFileStorageService { + CloudwalkResult filePartInit(FilePartInitParam paramFilePartInitParam) throws ServiceException; + + CloudwalkResult filePartAppend(FilePartAppendParam paramFilePartAppendParam) + throws ServiceException; + + CloudwalkResult filePartFinish(FilePartFinishParam paramFilePartFinishParam) throws ServiceException; + + CloudwalkResult getFileBase64(String paramString) throws ServiceException; +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/storage/impl/AcsFileStorageServiceImpl.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/storage/impl/AcsFileStorageServiceImpl.java new file mode 100644 index 00000000..6d09cc66 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/storage/impl/AcsFileStorageServiceImpl.java @@ -0,0 +1,117 @@ +package cn.cloudwalk.elevator.storage.impl; + +import cn.cloudwalk.client.davinci.portal.file.param.part.FilePartAppendParam; +import cn.cloudwalk.client.davinci.portal.file.param.part.FilePartFinishParam; +import cn.cloudwalk.client.davinci.portal.file.param.part.FilePartInitParam; +import cn.cloudwalk.client.davinci.portal.file.result.FilePartResult; +import cn.cloudwalk.cloud.annotation.CloudwalkParamsValidate; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.cloud.utils.BeanCopyUtils; +import cn.cloudwalk.elevator.common.AbstractCloudwalkService; +import cn.cloudwalk.elevator.storage.AcsFileStorageService; +import cn.cloudwalk.intelligent.davinci.common.exception.DavinciServiceException; +import cn.cloudwalk.intelligent.davinci.storage.bean.part.dto.PartFinishDTO; +import cn.cloudwalk.intelligent.davinci.storage.bean.part.dto.PartInitDTO; +import cn.cloudwalk.intelligent.davinci.storage.bean.part.dto.PartInitResultDTO; +import cn.cloudwalk.intelligent.davinci.storage.manager.FilePartManager; +import cn.cloudwalk.intelligent.davinci.storage.manager.FileStorageManager; +import java.io.ByteArrayInputStream; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; +import org.springframework.util.FileCopyUtils; +import org.springframework.web.multipart.MultipartFile; + +@Component +public class AcsFileStorageServiceImpl extends AbstractCloudwalkService implements AcsFileStorageService { + @Autowired + private FilePartManager filePartManager; + @Autowired + private FileStorageManager fileStorageManager; + + @CloudwalkParamsValidate + public CloudwalkResult filePartInit(FilePartInitParam param) throws ServiceException { + PartInitDTO dto = (PartInitDTO)BeanCopyUtils.copyProperties(param, PartInitDTO.class); + try { + PartInitResultDTO partInitResultDTO = this.filePartManager.init(dto); + return CloudwalkResult.success(BeanCopyUtils.copyProperties(partInitResultDTO, FilePartResult.class)); + } catch (DavinciServiceException e) { + this.logger.error("分片上传文件初始化失败,原因:", (Throwable)e); + throw new ServiceException(e); + } + } + + @CloudwalkParamsValidate + public CloudwalkResult filePartAppend(FilePartAppendParam param) throws ServiceException { + try { + String filePrefix = "partFile"; + PartInitResultDTO partInitResultDTO = + this.filePartManager.append(param.getFilePath(), param.getPartNumber(), param.getUploadId(), + buildMultipartFile("partFile" + param.getPartNumber(), (byte[])param.getContent())); + return CloudwalkResult.success(BeanCopyUtils.copyProperties(partInitResultDTO, FilePartResult.class)); + } catch (DavinciServiceException e) { + this.logger.error("分片上传文件追加失败,原因:", (Throwable)e); + throw new ServiceException(e); + } + } + + @CloudwalkParamsValidate + public CloudwalkResult filePartFinish(FilePartFinishParam param) throws ServiceException { + PartFinishDTO dto = (PartFinishDTO)BeanCopyUtils.copyProperties(param, PartFinishDTO.class); + try { + return CloudwalkResult.success(this.filePartManager.finish(dto)); + } catch (DavinciServiceException e) { + this.logger.error("分片上传文件结束失败,原因:", (Throwable)e); + throw new ServiceException(e); + } + } + + public CloudwalkResult getFileBase64(String path) throws ServiceException { + try { + return CloudwalkResult.success(this.fileStorageManager.getFileBase64(path)); + } catch (DavinciServiceException e) { + this.logger.error("获取文件BASE64编码失败,原因:", (Throwable)e); + throw new ServiceException(e); + } + } + + private MultipartFile buildMultipartFile(final String fileName, final byte[] bytes) { + MultipartFile file = new MultipartFile() { + public String getName() { + return "file"; + } + + public String getOriginalFilename() { + return fileName; + } + + public String getContentType() { + return null; + } + + public boolean isEmpty() { + return (bytes.length == 0); + } + + public long getSize() { + return bytes.length; + } + + public byte[] getBytes() throws IOException { + return bytes; + } + + public InputStream getInputStream() throws IOException { + return new ByteArrayInputStream(bytes); + } + + public void transferTo(File dest) throws IOException, IllegalStateException { + FileCopyUtils.copy(bytes, dest); + } + }; + return file; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/task/ElevatorRecordSendTask.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/task/ElevatorRecordSendTask.java new file mode 100644 index 00000000..0c051f9d --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/task/ElevatorRecordSendTask.java @@ -0,0 +1,142 @@ +package cn.cloudwalk.elevator.task; + +import cn.cloudwalk.client.cwoscomponent.intelligent.record.param.AcsRecordThreeSendParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.record.result.AcsRecordThreeSendResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.record.service.AcsRecordThreeSendService; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.elevator.record.dao.AcsElevatorRecordDao; +import cn.cloudwalk.elevator.record.dao.SendRecordTimeDao; +import cn.cloudwalk.elevator.record.dto.SendRecordTimeAddDTO; +import cn.cloudwalk.elevator.record.dto.SendRecordTimeEditDTO; +import cn.cloudwalk.elevator.record.dto.SendRecordTimeResultDTO; +import cn.cloudwalk.elevator.record.param.SendRecordSendInfoParam; +import cn.cloudwalk.elevator.record.param.SendRecordSendParam; +import cn.cloudwalk.elevator.record.param.SendRecordTokenParam; +import cn.cloudwalk.elevator.record.result.SendRecordTokenResult; +import cn.cloudwalk.elevator.util.DateUtils; +import cn.cloudwalk.elevator.util.RestTemplateUtil; +import com.alibaba.fastjson.JSON; +import com.fasterxml.jackson.core.type.TypeReference; +import java.net.URI; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Date; +import java.util.List; +import javax.annotation.Nullable; +import javax.annotation.Resource; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.http.HttpHeaders; +import org.springframework.scheduling.annotation.Scheduled; +import org.springframework.stereotype.Component; +import org.springframework.util.CollectionUtils; +import org.springframework.util.LinkedMultiValueMap; +import org.springframework.util.MultiValueMap; +import org.springframework.util.ObjectUtils; +import org.springframework.web.util.UriComponentsBuilder; + +@Component +public class ElevatorRecordSendTask { + private Logger logger = LoggerFactory.getLogger(ElevatorRecordSendTask.class); + @Value("${sendRecord.ip}") + private String sendRecordIp; + @Value("${sendRecord.token.corpId}") + private String corpId; + @Value("${sendRecord.token.appKey}") + private String appKey; + @Value("${sendRecord.token.appSecret}") + private String appSecret; + @Value("${sendRecord.boolean}") + private Boolean sendBoolean; + private static final long EXPIRE_TIME = 82800000L; + @Resource + private AcsElevatorRecordDao acsElevatorRecordDao; + @Resource + private SendRecordTimeDao sendRecordTimeDao; + @Autowired + private AcsRecordThreeSendService acsRecordThreeSendService; + + @Scheduled(cron = "${group-person.syn.config.check-handle.cron:0/10 * * * * ?}") + public void execute() { + if (!this.sendBoolean.booleanValue()) { + return; + } + try { + SendRecordTimeResultDTO timeDto2 = this.sendRecordTimeDao.getByType(Integer.valueOf(2)); + Long recognitionTime2 = Long.valueOf(System.currentTimeMillis()); + if (!ObjectUtils.isEmpty(timeDto2)) { + if (recognitionTime2.longValue() - timeDto2.getTime().longValue() < 3600000L) { + return; + } + recognitionTime2 = timeDto2.getTime(); + } else { + SendRecordTimeAddDTO timeAddDTO = new SendRecordTimeAddDTO(); + timeAddDTO.setTime(recognitionTime2); + timeAddDTO.setType(Integer.valueOf(2)); + this.sendRecordTimeDao.add(timeAddDTO); + } + SendRecordTimeEditDTO editDto2 = new SendRecordTimeEditDTO(); + editDto2.setType(Integer.valueOf(2)); + editDto2.setTime(Long.valueOf(recognitionTime2.longValue() + 10000L)); + AcsRecordThreeSendParam threeSendParam = new AcsRecordThreeSendParam(); + threeSendParam.setStartTime(recognitionTime2); + CloudwalkResult> result = + this.acsRecordThreeSendService.listByTime(threeSendParam); + this.logger.info("查询时间戳为:{},获取的门禁记录数据为:{}", recognitionTime2, JSON.toJSONString(result.getData())); + if (!CollectionUtils.isEmpty((Collection)result.getData())) { + editDto2 + .setTime(Long.valueOf(((AcsRecordThreeSendResult)((List)result.getData()) + .get(((List)result.getData()).size() - 1)).getRecognitionTime())); + if (editDto2.getTime().equals(recognitionTime2)) { + editDto2.setTime(Long.valueOf(recognitionTime2.longValue() + 10L)); + } + List records2 = new ArrayList<>(); + for (AcsRecordThreeSendResult sendResult2 : result.getData()) { + if (!ObjectUtils.isEmpty(sendResult2.getPersonCode())) { + SendRecordSendInfoParam param = new SendRecordSendInfoParam(); + param.setEmployeeCode(sendResult2.getPersonCode()); + param.setSignTime( + DateUtils.parseDate(new Date(sendResult2.getRecognitionTime()), "yyyy-MM-dd HH:mm:ss")); + param.setDeviceName(sendResult2.getDeviceName()); + records2.add(param); + } + } + if (!CollectionUtils.isEmpty(records2)) { + SendRecordTokenParam sendRecordTokenParam = new SendRecordTokenParam(); + sendRecordTokenParam.setCorpId(this.corpId); + sendRecordTokenParam.setAppKey(this.appKey); + sendRecordTokenParam.setAppSecret(this.appSecret); + URI uri = combineAuthClientURI("forward_webfront/api/pti-oapi/token/get", null); + CloudwalkResult tokenResult = + (CloudwalkResult)RestTemplateUtil.post(uri, sendRecordTokenParam, null, + new TypeReference>() {}); + LinkedMultiValueMap linkedMultiValueMap = new LinkedMultiValueMap(); + linkedMultiValueMap.add("token", ((SendRecordTokenResult)tokenResult.getData()).getToken()); + URI uri2 = + combineAuthClientURI("/forward_webfront/api/pti-oapi/v2/api/starriver/device/sign-third-import", + (MultiValueMap)linkedMultiValueMap); + HttpHeaders headers = new HttpHeaders(); + headers.set("token", ((SendRecordTokenResult)tokenResult.getData()).getToken()); + SendRecordSendParam sendParam2 = new SendRecordSendParam(); + sendParam2.setRecords(records2); + this.logger.info("推送通行记录数据为:{}", JSON.toJSONString(records2)); + CloudwalkResult sendResult2 = (CloudwalkResult)RestTemplateUtil.post(uri2, sendParam2, headers, + new TypeReference() {}); + this.logger.info("调用第三方接口发送通行记录数据结束,返回结果为:{}", JSON.toJSONString(sendResult2)); + } + this.sendRecordTimeDao.update(editDto2); + } else if (result.isSuccess()) { + this.sendRecordTimeDao.update(editDto2); + } + } catch (Exception e) { + this.logger.error("派梯记录推送失败,失败原因是:{}", e); + } + } + + private URI combineAuthClientURI(String api, @Nullable MultiValueMap params) { + return UriComponentsBuilder.fromUriString("http://" + this.sendRecordIp).path(api).queryParams(params).build() + .toUri(); + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/visitor/client/VisitorFeignClient.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/visitor/client/VisitorFeignClient.java new file mode 100644 index 00000000..a897f05c --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/visitor/client/VisitorFeignClient.java @@ -0,0 +1,18 @@ +package cn.cloudwalk.elevator.visitor.client; + +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.elevator.visitor.fallback.VisitorFeignClientFallback; +import cn.cloudwalk.elevator.visitor.param.VisitorRecordQueryParam; +import cn.cloudwalk.elevator.visitor.result.VisitorQueryResult; +import org.springframework.cloud.netflix.feign.FeignClient; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; + +@FeignClient(name = "${feign.ninca-crk-std.name:ninca-crk-std}", path = "/intelligent/visitor/record", + fallback = VisitorFeignClientFallback.class) +public interface VisitorFeignClient { + @RequestMapping(value = {"/query"}, method = {RequestMethod.POST}) + CloudwalkResult query(VisitorRecordQueryParam paramVisitorRecordQueryParam) + throws ServiceException; +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/visitor/fallback/VisitorFeignClientFallback.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/visitor/fallback/VisitorFeignClientFallback.java new file mode 100644 index 00000000..e30ce44a --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/visitor/fallback/VisitorFeignClientFallback.java @@ -0,0 +1,15 @@ +package cn.cloudwalk.elevator.visitor.fallback; + +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.elevator.visitor.client.VisitorFeignClient; +import cn.cloudwalk.elevator.visitor.param.VisitorRecordQueryParam; +import cn.cloudwalk.elevator.visitor.result.VisitorQueryResult; +import org.springframework.stereotype.Component; + +@Component +public class VisitorFeignClientFallback implements VisitorFeignClient { + public CloudwalkResult query(VisitorRecordQueryParam param) throws ServiceException { + throw new RuntimeException("查询识别记录详情失败"); + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/visitor/param/VisitorGetsParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/visitor/param/VisitorGetsParam.java new file mode 100644 index 00000000..f991b0ea --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/visitor/param/VisitorGetsParam.java @@ -0,0 +1,26 @@ +package cn.cloudwalk.elevator.visitor.param; + +import java.io.Serializable; +import java.util.List; + +public class VisitorGetsParam implements Serializable { + private static final long serialVersionUID = 3454014008721633675L; + private List ids; + private Integer isDelete; + + public Integer getIsDelete() { + return this.isDelete; + } + + public void setIsDelete(Integer isDelete) { + this.isDelete = isDelete; + } + + public List getIds() { + return this.ids; + } + + public void setIds(List ids) { + this.ids = ids; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/visitor/param/VisitorRecordQueryForm.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/visitor/param/VisitorRecordQueryForm.java new file mode 100644 index 00000000..b1ffe1c7 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/visitor/param/VisitorRecordQueryForm.java @@ -0,0 +1,13 @@ +package cn.cloudwalk.elevator.visitor.param; + +public class VisitorRecordQueryForm { + private String visitorId; + + public String getVisitorId() { + return this.visitorId; + } + + public void setVisitorId(String visitorId) { + this.visitorId = visitorId; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/visitor/param/VisitorRecordQueryParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/visitor/param/VisitorRecordQueryParam.java new file mode 100644 index 00000000..a3fa5d05 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/visitor/param/VisitorRecordQueryParam.java @@ -0,0 +1,26 @@ +package cn.cloudwalk.elevator.visitor.param; + +import cn.cloudwalk.cloud.page.CloudwalkPageInfo; +import java.io.Serializable; + +public class VisitorRecordQueryParam extends CloudwalkPageInfo implements Serializable { + private static final long serialVersionUID = -5418825126025402170L; + private String visitorId; + private String businessId; + + public String getVisitorId() { + return this.visitorId; + } + + public void setVisitorId(String visitorId) { + this.visitorId = visitorId; + } + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/visitor/result/VisitorQueryResult.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/visitor/result/VisitorQueryResult.java new file mode 100644 index 00000000..abfcdf48 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/visitor/result/VisitorQueryResult.java @@ -0,0 +1,26 @@ +package cn.cloudwalk.elevator.visitor.result; + +import java.io.Serializable; +import java.util.List; + +public class VisitorQueryResult implements Serializable { + private static final long serialVersionUID = 5547248296251558353L; + private VisitorResult visitorInfo; + private List visitorRecordList; + + public VisitorResult getVisitorInfo() { + return this.visitorInfo; + } + + public void setVisitorInfo(VisitorResult visitorInfo) { + this.visitorInfo = visitorInfo; + } + + public List getVisitorRecordList() { + return this.visitorRecordList; + } + + public void setVisitorRecordList(List visitorRecordList) { + this.visitorRecordList = visitorRecordList; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/visitor/result/VisitorRecordResult.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/visitor/result/VisitorRecordResult.java new file mode 100644 index 00000000..f1362ee0 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/visitor/result/VisitorRecordResult.java @@ -0,0 +1,296 @@ +package cn.cloudwalk.elevator.visitor.result; + +import java.io.Serializable; +import java.math.BigDecimal; + +public class VisitorRecordResult implements Serializable { + private static final long serialVersionUID = -7671207718927334038L; + private String id; + private String visitorId; + private String visitorName; + private String businessId; + private String deviceId; + private String deviceCode; + private String deviceName; + private Long signTime; + private String signAddress; + private String deviceTypeId; + private String deviceTypeName; + private String facePath; + private String spotImgPath; + private String panoramaPath; + private BigDecimal score; + private Integer status; + private BigDecimal threshold; + private Integer tumoverType; + private String remark; + private String receiverId; + private String receiverName; + private String deviceAreaId; + private String deviceAreaName; + private String deviceDistrictId; + private String deviceDistrictName; + private String deviceDistrictPath; + private String deviceDistrictMergeName; + private String cause; + private String openDoorType; + private String srcFloor; + private String destFloor; + private String dispatchElevatorNo; + + public String getOpenDoorType() { + return this.openDoorType; + } + + public void setOpenDoorType(String openDoorType) { + this.openDoorType = openDoorType; + } + + public String getSrcFloor() { + return this.srcFloor; + } + + public void setSrcFloor(String srcFloor) { + this.srcFloor = srcFloor; + } + + public String getDestFloor() { + return this.destFloor; + } + + public void setDestFloor(String destFloor) { + this.destFloor = destFloor; + } + + public String getDispatchElevatorNo() { + return this.dispatchElevatorNo; + } + + public void setDispatchElevatorNo(String dispatchElevatorNo) { + this.dispatchElevatorNo = dispatchElevatorNo; + } + + public String getCause() { + return this.cause; + } + + public void setCause(String cause) { + this.cause = cause; + } + + public String getDeviceDistrictId() { + return this.deviceDistrictId; + } + + public void setDeviceDistrictId(String deviceDistrictId) { + this.deviceDistrictId = deviceDistrictId; + } + + public String getDeviceDistrictName() { + return this.deviceDistrictName; + } + + public void setDeviceDistrictName(String deviceDistrictName) { + this.deviceDistrictName = deviceDistrictName; + } + + public String getDeviceDistrictPath() { + return this.deviceDistrictPath; + } + + public void setDeviceDistrictPath(String deviceDistrictPath) { + this.deviceDistrictPath = deviceDistrictPath; + } + + public String getDeviceDistrictMergeName() { + return this.deviceDistrictMergeName; + } + + public void setDeviceDistrictMergeName(String deviceDistrictMergeName) { + this.deviceDistrictMergeName = deviceDistrictMergeName; + } + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public String getVisitorId() { + return this.visitorId; + } + + public void setVisitorId(String visitorId) { + this.visitorId = visitorId; + } + + public String getVisitorName() { + return this.visitorName; + } + + public void setVisitorName(String visitorName) { + this.visitorName = visitorName; + } + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getDeviceId() { + return this.deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public String getDeviceCode() { + return this.deviceCode; + } + + public void setDeviceCode(String deviceCode) { + this.deviceCode = deviceCode; + } + + public String getDeviceName() { + return this.deviceName; + } + + public void setDeviceName(String deviceName) { + this.deviceName = deviceName; + } + + public Long getSignTime() { + return this.signTime; + } + + public void setSignTime(Long signTime) { + this.signTime = signTime; + } + + public String getSignAddress() { + return this.signAddress; + } + + public void setSignAddress(String signAddress) { + this.signAddress = signAddress; + } + + public String getDeviceTypeId() { + return this.deviceTypeId; + } + + public void setDeviceTypeId(String deviceTypeId) { + this.deviceTypeId = deviceTypeId; + } + + public String getDeviceTypeName() { + return this.deviceTypeName; + } + + public void setDeviceTypeName(String deviceTypeName) { + this.deviceTypeName = deviceTypeName; + } + + public String getFacePath() { + return this.facePath; + } + + public void setFacePath(String facePath) { + this.facePath = facePath; + } + + public String getSpotImgPath() { + return this.spotImgPath; + } + + public void setSpotImgPath(String spotImgPath) { + this.spotImgPath = spotImgPath; + } + + public String getPanoramaPath() { + return this.panoramaPath; + } + + public void setPanoramaPath(String panoramaPath) { + this.panoramaPath = panoramaPath; + } + + public BigDecimal getScore() { + return this.score; + } + + public void setScore(BigDecimal score) { + this.score = score; + } + + public Integer getStatus() { + return this.status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public BigDecimal getThreshold() { + return this.threshold; + } + + public void setThreshold(BigDecimal threshold) { + this.threshold = threshold; + } + + public Integer getTumoverType() { + return this.tumoverType; + } + + public void setTumoverType(Integer tumoverType) { + this.tumoverType = tumoverType; + } + + public String getRemark() { + return this.remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public String getReceiverId() { + return this.receiverId; + } + + public void setReceiverId(String receiverId) { + this.receiverId = receiverId; + } + + public String getReceiverName() { + return this.receiverName; + } + + public void setReceiverName(String receiverName) { + this.receiverName = receiverName; + } + + public String getDeviceAreaId() { + return this.deviceAreaId; + } + + public void setDeviceAreaId(String deviceAreaId) { + this.deviceAreaId = deviceAreaId; + } + + public String getDeviceAreaName() { + return this.deviceAreaName; + } + + public void setDeviceAreaName(String deviceAreaName) { + this.deviceAreaName = deviceAreaName; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/visitor/result/VisitorResult.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/visitor/result/VisitorResult.java new file mode 100644 index 00000000..dc574017 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/visitor/result/VisitorResult.java @@ -0,0 +1,262 @@ +package cn.cloudwalk.elevator.visitor.result; + +import cn.cloudwalk.cloud.annotation.SensitiveField; +import cn.cloudwalk.cloud.enums.SensitiveType; +import java.io.Serializable; + +public class VisitorResult implements Serializable { + private static final long serialVersionUID = -6835803928819332341L; + private String id; + private String businessId; + private String name; + @SensitiveField(type = SensitiveType.ID_CARD) + private String cardNo; + private String greetWord; + private String personId; + private String personName; + private Long begVisitorTime; + private Long endVisitorTime; + private String regFaceUrl; + private String displayUrl; + private String remark; + private String workNo; + private String visitorCode; + private Long createTime; + private Long lastUpdateTime; + private String createUserId; + private String lastUpdateUserId; + private Integer isDelete; + private Integer sex; + private String companyName; + private String cause; + private String carryOn; + private String licensePlate; + private String telephone; + private String personTelephone; + private String detailedAddress; + private Integer regType; + + public Integer getRegType() { + return this.regType; + } + + public void setRegType(Integer regType) { + this.regType = regType; + } + + public String getDetailedAddress() { + return this.detailedAddress; + } + + public void setDetailedAddress(String detailedAddress) { + this.detailedAddress = detailedAddress; + } + + public String getTelephone() { + return this.telephone; + } + + public void setTelephone(String telephone) { + this.telephone = telephone; + } + + public String getPersonTelephone() { + return this.personTelephone; + } + + public void setPersonTelephone(String personTelephone) { + this.personTelephone = personTelephone; + } + + public Integer getSex() { + return this.sex; + } + + public void setSex(Integer sex) { + this.sex = sex; + } + + public String getCompanyName() { + return this.companyName; + } + + public void setCompanyName(String companyName) { + this.companyName = companyName; + } + + public String getCause() { + return this.cause; + } + + public void setCause(String cause) { + this.cause = cause; + } + + public String getCarryOn() { + return this.carryOn; + } + + public void setCarryOn(String carryOn) { + this.carryOn = carryOn; + } + + public String getLicensePlate() { + return this.licensePlate; + } + + public void setLicensePlate(String licensePlate) { + this.licensePlate = licensePlate; + } + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public String getCardNo() { + return this.cardNo; + } + + public void setCardNo(String cardNo) { + this.cardNo = cardNo; + } + + public String getGreetWord() { + return this.greetWord; + } + + public void setGreetWord(String greetWord) { + this.greetWord = greetWord; + } + + public String getPersonId() { + return this.personId; + } + + public void setPersonId(String personId) { + this.personId = personId; + } + + public String getPersonName() { + return this.personName; + } + + public void setPersonName(String personName) { + this.personName = personName; + } + + public Long getBegVisitorTime() { + return this.begVisitorTime; + } + + public void setBegVisitorTime(Long begVisitorTime) { + this.begVisitorTime = begVisitorTime; + } + + public Long getEndVisitorTime() { + return this.endVisitorTime; + } + + public void setEndVisitorTime(Long endVisitorTime) { + this.endVisitorTime = endVisitorTime; + } + + public String getRegFaceUrl() { + return this.regFaceUrl; + } + + public void setRegFaceUrl(String regFaceUrl) { + this.regFaceUrl = regFaceUrl; + } + + public String getDisplayUrl() { + return this.displayUrl; + } + + public void setDisplayUrl(String displayUrl) { + this.displayUrl = displayUrl; + } + + public String getRemark() { + return this.remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public String getWorkNo() { + return this.workNo; + } + + public void setWorkNo(String workNo) { + this.workNo = workNo; + } + + public String getVisitorCode() { + return this.visitorCode; + } + + public void setVisitorCode(String visitorCode) { + this.visitorCode = visitorCode; + } + + public Long getLastUpdateTime() { + return this.lastUpdateTime; + } + + public void setLastUpdateTime(Long lastUpdateTime) { + this.lastUpdateTime = lastUpdateTime; + } + + public Long getCreateTime() { + return this.createTime; + } + + public void setCreateTime(Long createTime) { + this.createTime = createTime; + } + + public String getCreateUserId() { + return this.createUserId; + } + + public void setCreateUserId(String createUserId) { + this.createUserId = createUserId; + } + + public String getLastUpdateUserId() { + return this.lastUpdateUserId; + } + + public void setLastUpdateUserId(String lastUpdateUserId) { + this.lastUpdateUserId = lastUpdateUserId; + } + + public Integer getIsDelete() { + return this.isDelete; + } + + public void setIsDelete(Integer isDelete) { + this.isDelete = isDelete; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/zone/client/ZoneFeignClient.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/zone/client/ZoneFeignClient.java new file mode 100644 index 00000000..470edf1f --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/zone/client/ZoneFeignClient.java @@ -0,0 +1,24 @@ +package cn.cloudwalk.elevator.zone.client; + +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.elevator.zone.fallback.ZoneFeignClientFallback; +import cn.cloudwalk.elevator.zone.param.ZoneNextTreeParam; +import cn.cloudwalk.elevator.zone.param.ZoneQueryParam; +import cn.cloudwalk.elevator.zone.result.ZoneResult; +import cn.cloudwalk.elevator.zone.result.ZoneTreeResult; +import java.util.List; +import org.springframework.cloud.netflix.feign.FeignClient; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; + +@FeignClient(name = "${feign.ninca-common.name:ninca-common}", path = "/sysetting/zone", + fallback = ZoneFeignClientFallback.class) +public interface ZoneFeignClient { + @RequestMapping(value = {"/tree"}, method = {RequestMethod.POST}) + CloudwalkResult> tree(ZoneNextTreeParam paramZoneNextTreeParam) throws ServiceException; + + @RequestMapping(value = {"/page"}, method = {RequestMethod.POST}) + CloudwalkResult> page(ZoneQueryParam paramZoneQueryParam) throws ServiceException; +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/zone/fallback/ZoneFeignClientFallback.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/zone/fallback/ZoneFeignClientFallback.java new file mode 100644 index 00000000..d999f599 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/zone/fallback/ZoneFeignClientFallback.java @@ -0,0 +1,23 @@ +package cn.cloudwalk.elevator.zone.fallback; + +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.elevator.zone.client.ZoneFeignClient; +import cn.cloudwalk.elevator.zone.param.ZoneNextTreeParam; +import cn.cloudwalk.elevator.zone.param.ZoneQueryParam; +import cn.cloudwalk.elevator.zone.result.ZoneResult; +import cn.cloudwalk.elevator.zone.result.ZoneTreeResult; +import java.util.List; +import org.springframework.stereotype.Component; + +@Component +public class ZoneFeignClientFallback implements ZoneFeignClient { + public CloudwalkResult> tree(ZoneNextTreeParam param) throws ServiceException { + throw new RuntimeException("查询区域树结构失败"); + } + + public CloudwalkResult> page(ZoneQueryParam param) throws ServiceException { + throw new RuntimeException("分页查询区域失败"); + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/zone/impl/ZoneServiceImpl.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/zone/impl/ZoneServiceImpl.java new file mode 100644 index 00000000..996a3549 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/zone/impl/ZoneServiceImpl.java @@ -0,0 +1,33 @@ +package cn.cloudwalk.elevator.zone.impl; + +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.elevator.zone.client.ZoneFeignClient; +import cn.cloudwalk.elevator.zone.param.ZoneNextTreeParam; +import cn.cloudwalk.elevator.zone.param.ZoneQueryParam; +import cn.cloudwalk.elevator.zone.result.ZoneResult; +import cn.cloudwalk.elevator.zone.result.ZoneTreeResult; +import cn.cloudwalk.elevator.zone.service.ZoneService; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.stereotype.Service; + +@Service +public class ZoneServiceImpl implements ZoneService { + @Qualifier("cn.cloudwalk.elevator.zone.client.ZoneFeignClient") + @Autowired + private ZoneFeignClient zoneFeignClient; + + public CloudwalkResult> tree(ZoneNextTreeParam param, CloudwalkCallContext context) + throws ServiceException { + return this.zoneFeignClient.tree(param); + } + + public CloudwalkResult> page(ZoneQueryParam param, CloudwalkCallContext context) + throws ServiceException { + return this.zoneFeignClient.page(param); + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/zone/param/ZoneNextTreeParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/zone/param/ZoneNextTreeParam.java new file mode 100644 index 00000000..846c2ced --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/zone/param/ZoneNextTreeParam.java @@ -0,0 +1,49 @@ +package cn.cloudwalk.elevator.zone.param; + +public class ZoneNextTreeParam { + private String parentId; + private Boolean byLoginUser = Boolean.valueOf(false); + private String businessId; + private Integer isValid; + private String type; + + public String getType() { + return this.type; + } + + public void setType(String type) { + this.type = type; + } + + public String getParentId() { + return this.parentId; + } + + public void setParentId(String parentId) { + this.parentId = parentId; + } + + public Boolean getByLoginUser() { + return this.byLoginUser; + } + + public void setByLoginUser(Boolean byLoginUser) { + this.byLoginUser = byLoginUser; + } + + public Integer getIsValid() { + return this.isValid; + } + + public void setIsValid(Integer isValid) { + this.isValid = isValid; + } + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/zone/param/ZoneQueryParam.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/zone/param/ZoneQueryParam.java new file mode 100644 index 00000000..b2eb854c --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/zone/param/ZoneQueryParam.java @@ -0,0 +1,133 @@ +package cn.cloudwalk.elevator.zone.param; + +import cn.cloudwalk.cloud.page.CloudwalkBasePageForm; +import java.util.List; + +public class ZoneQueryParam extends CloudwalkBasePageForm { + private String id; + private List ids; + private String name; + private Integer level; + private String typeId; + private String businessId; + private String parentId; + private Integer hasCascade; + private Integer retainParent; + private Boolean byLoginUser = Boolean.valueOf(false); + private Integer isValid; + private String type; + private String code; + private String unitId; + + public String getUnitId() { + return this.unitId; + } + + public void setUnitId(String unitId) { + this.unitId = unitId; + } + + public String getCode() { + return this.code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getType() { + return this.type; + } + + public void setType(String type) { + this.type = type; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public Integer getLevel() { + return this.level; + } + + public void setLevel(Integer level) { + this.level = level; + } + + public String getTypeId() { + return this.typeId; + } + + public void setTypeId(String typeId) { + this.typeId = typeId; + } + + public List getIds() { + return this.ids; + } + + public void setIds(List ids) { + this.ids = ids; + } + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getParentId() { + return this.parentId; + } + + public void setParentId(String parentId) { + this.parentId = parentId; + } + + public Integer getHasCascade() { + return this.hasCascade; + } + + public void setHasCascade(Integer hasCascade) { + this.hasCascade = hasCascade; + } + + public Integer getRetainParent() { + return this.retainParent; + } + + public void setRetainParent(Integer retainParent) { + this.retainParent = retainParent; + } + + public Boolean getByLoginUser() { + return this.byLoginUser; + } + + public void setByLoginUser(Boolean byLoginUser) { + this.byLoginUser = byLoginUser; + } + + public Integer getIsValid() { + return this.isValid; + } + + public void setIsValid(Integer isValid) { + this.isValid = isValid; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/zone/result/AgImageUploadResult.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/zone/result/AgImageUploadResult.java new file mode 100644 index 00000000..32df2bec --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/zone/result/AgImageUploadResult.java @@ -0,0 +1,25 @@ +package cn.cloudwalk.elevator.zone.result; + +import java.io.Serializable; + +public class AgImageUploadResult implements Serializable { + private static final long serialVersionUID = 2801838494878813855L; + private String id; + private String path; + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public String getPath() { + return this.path; + } + + public void setPath(String path) { + this.path = path; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/zone/result/ZoneResult.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/zone/result/ZoneResult.java new file mode 100644 index 00000000..cfda000f --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/zone/result/ZoneResult.java @@ -0,0 +1,310 @@ +package cn.cloudwalk.elevator.zone.result; + +public class ZoneResult { + private String id; + private String name; + private Integer orderBy; + private String parentId; + private Integer level; + private Short isDel; + private String createUserId; + private Long createTime; + private String lastUpdateUserId; + private Long lastUpdateTime; + private String businessId; + private String typeId; + private String type; + private Integer hasLowerLevel; + private Integer unitCount; + private Integer isValid; + private String ext1; + private String ext2; + private String ext3; + private String ext4; + private String ext5; + private String ext6; + private String ext7; + private String ext8; + private String ext9; + private String ext10; + private String ext11; + private String ext12; + private String ext13; + private String ext14; + private String ext15; + private String mapName; + private String mapImg; + private String mapId; + + public String getMapName() { + return this.mapName; + } + + public void setMapName(String mapName) { + this.mapName = mapName; + } + + public String getMapImg() { + return this.mapImg; + } + + public void setMapImg(String mapImg) { + this.mapImg = mapImg; + } + + public String getMapId() { + return this.mapId; + } + + public void setMapId(String mapId) { + this.mapId = mapId; + } + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = (id == null) ? null : id.trim(); + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = (name == null) ? null : name.trim(); + } + + public Integer getOrderBy() { + return this.orderBy; + } + + public void setOrderBy(Integer orderBy) { + this.orderBy = orderBy; + } + + public String getParentId() { + return this.parentId; + } + + public void setParentId(String parentId) { + this.parentId = (parentId == null) ? null : parentId.trim(); + } + + public Integer getLevel() { + return this.level; + } + + public void setLevel(Integer level) { + this.level = level; + } + + public Short getIsDel() { + return this.isDel; + } + + public void setIsDel(Short isDel) { + this.isDel = isDel; + } + + public String getCreateUserId() { + return this.createUserId; + } + + public void setCreateUserId(String createUserId) { + this.createUserId = (createUserId == null) ? null : createUserId.trim(); + } + + public Long getCreateTime() { + return this.createTime; + } + + public void setCreateTime(Long createTime) { + this.createTime = createTime; + } + + public String getLastUpdateUserId() { + return this.lastUpdateUserId; + } + + public void setLastUpdateUserId(String lastUpdateUserId) { + this.lastUpdateUserId = (lastUpdateUserId == null) ? null : lastUpdateUserId.trim(); + } + + public Long getLastUpdateTime() { + return this.lastUpdateTime; + } + + public void setLastUpdateTime(Long lastUpdateTime) { + this.lastUpdateTime = lastUpdateTime; + } + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getTypeId() { + return this.typeId; + } + + public void setTypeId(String typeId) { + this.typeId = typeId; + } + + public String getType() { + return this.type; + } + + public void setType(String type) { + this.type = type; + } + + public Integer getUnitCount() { + return this.unitCount; + } + + public void setUnitCount(Integer unitCount) { + this.unitCount = unitCount; + } + + public Integer getIsValid() { + return this.isValid; + } + + public void setIsValid(Integer isValid) { + this.isValid = isValid; + } + + public String getExt1() { + return this.ext1; + } + + public void setExt1(String ext1) { + this.ext1 = ext1; + } + + public String getExt2() { + return this.ext2; + } + + public void setExt2(String ext2) { + this.ext2 = ext2; + } + + public String getExt3() { + return this.ext3; + } + + public void setExt3(String ext3) { + this.ext3 = ext3; + } + + public String getExt4() { + return this.ext4; + } + + public void setExt4(String ext4) { + this.ext4 = ext4; + } + + public String getExt5() { + return this.ext5; + } + + public void setExt5(String ext5) { + this.ext5 = ext5; + } + + public String getExt6() { + return this.ext6; + } + + public void setExt6(String ext6) { + this.ext6 = ext6; + } + + public String getExt7() { + return this.ext7; + } + + public void setExt7(String ext7) { + this.ext7 = ext7; + } + + public String getExt8() { + return this.ext8; + } + + public void setExt8(String ext8) { + this.ext8 = ext8; + } + + public String getExt9() { + return this.ext9; + } + + public void setExt9(String ext9) { + this.ext9 = ext9; + } + + public String getExt10() { + return this.ext10; + } + + public void setExt10(String ext10) { + this.ext10 = ext10; + } + + public String getExt11() { + return this.ext11; + } + + public void setExt11(String ext11) { + this.ext11 = ext11; + } + + public String getExt12() { + return this.ext12; + } + + public void setExt12(String ext12) { + this.ext12 = ext12; + } + + public String getExt13() { + return this.ext13; + } + + public void setExt13(String ext13) { + this.ext13 = ext13; + } + + public String getExt14() { + return this.ext14; + } + + public void setExt14(String ext14) { + this.ext14 = ext14; + } + + public String getExt15() { + return this.ext15; + } + + public void setExt15(String ext15) { + this.ext15 = ext15; + } + + public Integer getHasLowerLevel() { + return this.hasLowerLevel; + } + + public void setHasLowerLevel(Integer hasLowerLevel) { + this.hasLowerLevel = hasLowerLevel; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/zone/result/ZoneTreeResult.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/zone/result/ZoneTreeResult.java new file mode 100644 index 00000000..10a0dbc6 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/zone/result/ZoneTreeResult.java @@ -0,0 +1,295 @@ +package cn.cloudwalk.elevator.zone.result; + +import cn.cloudwalk.cloud.entity.CloudwalkBaseTimes; +import java.util.List; + +public class ZoneTreeResult extends CloudwalkBaseTimes { + private String code; + private String elevatorCode; + private Integer level; + private String name; + private String parentId; + private String businessId; + private Short isDel; + private String typeId; + private Integer orderBy; + private String ext1; + private String ext2; + private String ext3; + private String ext4; + private String ext5; + private String ext6; + private String ext7; + private String ext8; + private String ext9; + private String ext10; + private String ext11; + private String ext12; + private String ext13; + private String ext14; + private String ext15; + private Integer unitCount; + private String type; + private Integer hasLowerLevel; + private List children; + private String mapName; + private String mapImg; + private String mapId; + private Integer isFirst; + + public String getElevatorCode() { + return this.elevatorCode; + } + + public void setElevatorCode(String elevatorCode) { + this.elevatorCode = elevatorCode; + } + + public String getMapName() { + return this.mapName; + } + + public void setMapName(String mapName) { + this.mapName = mapName; + } + + public String getMapImg() { + return this.mapImg; + } + + public void setMapImg(String mapImg) { + this.mapImg = mapImg; + } + + public String getMapId() { + return this.mapId; + } + + public void setMapId(String mapId) { + this.mapId = mapId; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public String getParentId() { + return this.parentId; + } + + public void setParentId(String parentId) { + this.parentId = parentId; + } + + public List getChildren() { + return this.children; + } + + public void setChildren(List children) { + this.children = children; + } + + public Integer getLevel() { + return this.level; + } + + public void setLevel(Integer level) { + this.level = level; + } + + public Integer getUnitCount() { + return this.unitCount; + } + + public void setUnitCount(Integer unitCount) { + this.unitCount = unitCount; + } + + public String getType() { + return this.type; + } + + public void setType(String type) { + this.type = type; + } + + public String getTypeId() { + return this.typeId; + } + + public void setTypeId(String typeId) { + this.typeId = typeId; + } + + public String getExt1() { + return this.ext1; + } + + public void setExt1(String ext1) { + this.ext1 = ext1; + } + + public String getExt2() { + return this.ext2; + } + + public void setExt2(String ext2) { + this.ext2 = ext2; + } + + public String getExt3() { + return this.ext3; + } + + public void setExt3(String ext3) { + this.ext3 = ext3; + } + + public String getExt4() { + return this.ext4; + } + + public void setExt4(String ext4) { + this.ext4 = ext4; + } + + public String getExt5() { + return this.ext5; + } + + public void setExt5(String ext5) { + this.ext5 = ext5; + } + + public String getExt6() { + return this.ext6; + } + + public void setExt6(String ext6) { + this.ext6 = ext6; + } + + public String getExt7() { + return this.ext7; + } + + public void setExt7(String ext7) { + this.ext7 = ext7; + } + + public String getExt8() { + return this.ext8; + } + + public void setExt8(String ext8) { + this.ext8 = ext8; + } + + public String getExt9() { + return this.ext9; + } + + public void setExt9(String ext9) { + this.ext9 = ext9; + } + + public String getExt10() { + return this.ext10; + } + + public void setExt10(String ext10) { + this.ext10 = ext10; + } + + public String getExt11() { + return this.ext11; + } + + public void setExt11(String ext11) { + this.ext11 = ext11; + } + + public String getExt12() { + return this.ext12; + } + + public void setExt12(String ext12) { + this.ext12 = ext12; + } + + public String getExt13() { + return this.ext13; + } + + public void setExt13(String ext13) { + this.ext13 = ext13; + } + + public String getExt14() { + return this.ext14; + } + + public void setExt14(String ext14) { + this.ext14 = ext14; + } + + public String getExt15() { + return this.ext15; + } + + public void setExt15(String ext15) { + this.ext15 = ext15; + } + + public Integer getHasLowerLevel() { + return this.hasLowerLevel; + } + + public void setHasLowerLevel(Integer hasLowerLevel) { + this.hasLowerLevel = hasLowerLevel; + } + + public String getCode() { + return this.code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public Short getIsDel() { + return this.isDel; + } + + public void setIsDel(Short isDel) { + this.isDel = isDel; + } + + public Integer getOrderBy() { + return this.orderBy; + } + + public void setOrderBy(Integer orderBy) { + this.orderBy = orderBy; + } + + public Integer getIsFirst() { + return this.isFirst; + } + + public void setIsFirst(Integer isFirst) { + this.isFirst = isFirst; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/zone/service/ZoneService.java b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/zone/service/ZoneService.java new file mode 100644 index 00000000..42a9b0d6 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/java/cn/cloudwalk/elevator/zone/service/ZoneService.java @@ -0,0 +1,19 @@ +package cn.cloudwalk.elevator.zone.service; + +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.elevator.zone.param.ZoneNextTreeParam; +import cn.cloudwalk.elevator.zone.param.ZoneQueryParam; +import cn.cloudwalk.elevator.zone.result.ZoneResult; +import cn.cloudwalk.elevator.zone.result.ZoneTreeResult; +import java.util.List; + +public interface ZoneService { + CloudwalkResult> tree(ZoneNextTreeParam paramZoneNextTreeParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult> page(ZoneQueryParam paramZoneQueryParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; +} diff --git a/maven-cw-elevator-application/cw-elevator-application-service/src/main/resources/META-INF/MANIFEST.MF b/maven-cw-elevator-application/cw-elevator-application-service/src/main/resources/META-INF/MANIFEST.MF new file mode 100644 index 00000000..5451c2da --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-service/src/main/resources/META-INF/MANIFEST.MF @@ -0,0 +1,12 @@ +Manifest-Version: 1.0 +Implementation-Title: cw-elevator-application-service +Implementation-Version: 1.0-SNAPSHOT +Archiver-Version: Plexus Archiver +Built-By: YCWB0304 +Implementation-Vendor-Id: cn.cloudwalk.elevator +Created-By: Apache Maven 3.6.1 +Build-Jdk: 1.8.0_144 +Implementation-URL: http://projects.spring.io/spring-boot/cw-elevator- + application/cw-elevator-application-service/ +Implementation-Vendor: Pivotal Software, Inc. + diff --git a/maven-cw-elevator-application/cw-elevator-application-web/pom.xml b/maven-cw-elevator-application/cw-elevator-application-web/pom.xml new file mode 100644 index 00000000..8a39ccc9 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-web/pom.xml @@ -0,0 +1,45 @@ + + + 4.0.0 + + + cn.cloudwalk.elevator + cw-elevator-application-decompiled-reactor + 1.0-SNAPSHOT + ../pom.xml + + + cw-elevator-application-web + jar + + + ${project.basedir}/../../docs/style/alibaba-eclipse-codestyle.xml + + + + + javax.servlet + servlet-api + provided + + + cn.cloudwalk.cloud + cloudwalk-common-web + + + cn.cloudwalk.elevator + cw-elevator-application-service + ${project.version} + + + + + + + net.revelc.code.formatter + formatter-maven-plugin + + + + diff --git a/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/common/AbstractCloudwalkController.java b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/common/AbstractCloudwalkController.java new file mode 100644 index 00000000..90e85e3f --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/common/AbstractCloudwalkController.java @@ -0,0 +1,77 @@ +package cn.cloudwalk.elevator.common; + +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.context.CloudwalkCallContextBuilder; +import cn.cloudwalk.cloud.context.CloudwalkSessionContextHolder; +import cn.cloudwalk.cloud.session.extend.DefaultExtendContext; +import cn.cloudwalk.cloud.session.extend.ExtendContext; +import cn.cloudwalk.elevator.context.CloudWalkExtendContextValue; +import java.net.URLEncoder; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.MessageSource; +import org.springframework.context.i18n.LocaleContextHolder; +import org.springframework.web.context.request.RequestContextHolder; +import org.springframework.web.context.request.ServletRequestAttributes; + +public abstract class AbstractCloudwalkController { + protected final Logger LOGGER = LoggerFactory.getLogger(getClass()); + @Autowired + private MessageSource messageSource; + @Autowired + private CloudwalkSessionContextHolder cloudwalkSessionContextHolder; + + public CloudwalkCallContext getCloudwalkContext() { + CloudwalkCallContext cloudwalkCallContext = + CloudwalkCallContextBuilder.buildContext(this.cloudwalkSessionContextHolder); + ServletRequestAttributes attributes = (ServletRequestAttributes)RequestContextHolder.getRequestAttributes(); + if (null != attributes) { + DefaultExtendContext extendContext = new DefaultExtendContext(); + CloudWalkExtendContextValue cloudWalkExtendContextValue = new CloudWalkExtendContextValue(); + HttpServletRequest request = attributes.getRequest(); + cloudWalkExtendContextValue.setLoginId(request.getHeader("loginid")); + cloudWalkExtendContextValue.setAuthorization(request.getHeader("authorization")); + extendContext.setValue(cloudWalkExtendContextValue); + cloudwalkCallContext.setExt((ExtendContext)extendContext); + } + return cloudwalkCallContext; + } + + public String getToken() { + ServletRequestAttributes attributes = (ServletRequestAttributes)RequestContextHolder.getRequestAttributes(); + if (null != attributes) { + return attributes.getRequest().getHeader("authorization"); + } + return null; + } + + protected HttpServletRequest getHttpServletRequest() { + return ((ServletRequestAttributes)RequestContextHolder.getRequestAttributes()).getRequest(); + } + + public String getMessage(String code, String defaultMsg) { + return this.messageSource.getMessage(code, null, defaultMsg, LocaleContextHolder.getLocale()); + } + + public String getMessage(String code) { + return getMessage(code, ""); + } + + protected void makeExcelresponse(HttpServletRequest request, HttpServletResponse response, String fileName) { + response.setContentType("application/vnd.ms-excel;charset=utf-8"); + response.setHeader("Content-Disposition", "attachment;filename=" + encodeFileName(fileName, request)); + } + + protected String encodeFileName(String fileNames, HttpServletRequest request) { + String codedFilename = null; + try { + codedFilename = URLEncoder.encode(fileNames, "UTF-8"); + } catch (Exception e) { + this.LOGGER.error("转换文件名字符类型失败,原因:", e); + } + return codedFilename; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/common/CloudwalkCallNewContext.java b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/common/CloudwalkCallNewContext.java new file mode 100644 index 00000000..b5bd4b63 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/common/CloudwalkCallNewContext.java @@ -0,0 +1,3 @@ +package cn.cloudwalk.elevator.common; + +public class CloudwalkCallNewContext {} diff --git a/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/AbstractEventHandler.java b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/AbstractEventHandler.java new file mode 100644 index 00000000..77ad0bdf --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/AbstractEventHandler.java @@ -0,0 +1,80 @@ +package cn.cloudwalk.elevator.handler; + +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.service.DeviceService; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.cloud.session.company.CompanyContext; +import cn.cloudwalk.cloud.session.user.UserContext; +import cn.cloudwalk.cloud.utils.CloudwalkDateUtils; +import cn.cloudwalk.elevator.config.FeignThreadLocalUtil; +import cn.cloudwalk.elevator.record.service.AcsElevatorRecordService; +import java.util.Collection; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.annotation.Resource; +import org.apache.commons.collections4.CollectionUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.MessageSource; +import org.springframework.context.i18n.LocaleContextHolder; +import org.springframework.data.redis.core.RedisTemplate; + +public abstract class AbstractEventHandler { + protected static final Logger LOGGER = LoggerFactory.getLogger(AbstractEventHandler.class); + @Resource + private DeviceService deviceService; + @Resource + private AcsElevatorRecordService acsElevatorRecordService; + @Resource + protected RedisTemplate redisTemplate; + @Autowired + private MessageSource messageSource; + + public CloudwalkCallContext getCloudwalkContext(String businessId) { + CloudwalkCallContext context = new CloudwalkCallContext(); + CompanyContext companyContext = new CompanyContext(); + companyContext.setCompanyId(businessId); + context.setCompany(companyContext); + UserContext userContext = new UserContext(); + userContext.setCaller("defaultUserId"); + userContext.setCallerName("defaultUserName"); + context.setUser(userContext); + context.setCallTime(CloudwalkDateUtils.getCurrentDate()); + Map feignThreadLoaclMap = new HashMap<>(3); + feignThreadLoaclMap.put("businessid", businessId); + feignThreadLoaclMap.put("platformuserid", "defaultUserId"); + feignThreadLoaclMap.put("username", "defaultUserName"); + FeignThreadLocalUtil.set(feignThreadLoaclMap); + return context; + } + + DeviceResult queryDeviceResult(String deviceCode, CloudwalkCallContext context) throws ServiceException { + DeviceQueryParam deviceQueryParam = new DeviceQueryParam(); + deviceQueryParam.setDeviceCode(deviceCode); + CloudwalkResult> deviceQueryResult = this.deviceService.list(deviceQueryParam, context); + if (deviceQueryResult.isSuccess() && CollectionUtils.isNotEmpty((Collection)deviceQueryResult.getData())) { + return ((List)deviceQueryResult.getData()).get(0); + } + return null; + } + + protected void statisticsAddCache(String key) { + if (!this.redisTemplate.hasKey(key).booleanValue()) { + this.acsElevatorRecordService.createCache(key, 0L); + } + this.redisTemplate.opsForValue().increment(key, 1L); + } + + public String getMessage(String code, String defaultMsg) { + return this.messageSource.getMessage(code, null, defaultMsg, LocaleContextHolder.getLocale()); + } + + public String getMessage(String code) { + return getMessage(code, ""); + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/OpenDoorRecordEventHandler.java b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/OpenDoorRecordEventHandler.java new file mode 100644 index 00000000..c9c29890 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/OpenDoorRecordEventHandler.java @@ -0,0 +1,97 @@ +package cn.cloudwalk.elevator.handler; + +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceResult; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.cloud.utils.BeanCopyUtils; +import cn.cloudwalk.cwos.client.event.event.BaseEvent; +import cn.cloudwalk.cwos.client.event.event.OpenDoorRecordEvent; +import cn.cloudwalk.elevator.config.FeignThreadLocalUtil; +import cn.cloudwalk.elevator.em.AcsDeviceIdentifyTypeEnum; +import cn.cloudwalk.elevator.record.dto.AcsElevatorRecordExtraDTO; +import cn.cloudwalk.elevator.record.param.AcsElevatorRecordAddParam; +import cn.cloudwalk.elevator.record.param.AcsOpenDoorRecordAddParam; +import cn.cloudwalk.elevator.record.service.AcsElevatorRecordService; +import cn.cloudwalk.elevator.util.AcsCacheKeyUtil; +import cn.cloudwalk.elevator.util.DateUtils; +import cn.cloudwalk.event.annotation.EventTopicSuffix; +import cn.cloudwalk.event.handler.EventHandler; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import java.util.Date; +import javax.annotation.Resource; +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.data.redis.core.RedisTemplate; +import org.springframework.stereotype.Component; + +@Component +@EventTopicSuffix({"all"}) +public class OpenDoorRecordEventHandler extends AbstractEventHandler implements EventHandler { + private static final Logger LOGGER = LoggerFactory.getLogger(OpenDoorRecordEventHandler.class); + @Resource + private AcsElevatorRecordService acsElevatorRecordService; + @Resource + private RedisTemplate redisTemplate; + + public void onEvent(OpenDoorRecordEvent openDoorRecordEvent) { + LOGGER.info("收到openDoorRecordEvent消息:{}", JSON.toJSONString(openDoorRecordEvent)); + try { + CloudwalkCallContext context = getCloudwalkContext(openDoorRecordEvent.getBusinessId()); + DeviceResult deviceResult = queryDeviceResult(openDoorRecordEvent.getDeviceId(), context); + AcsOpenDoorRecordAddParam param = getParam(openDoorRecordEvent); + param.setDeviceResult(deviceResult); + AcsElevatorRecordExtraDTO elevatorRecordExtraDTO = null; + if (StringUtils.isNotBlank(openDoorRecordEvent.getReserveInfo())) { + JSONObject reserveInfo = JSON.parseObject(openDoorRecordEvent.getReserveInfo()); + if (!reserveInfo.isEmpty() && reserveInfo.containsKey("srcFloor")) { + elevatorRecordExtraDTO = + (AcsElevatorRecordExtraDTO)reserveInfo.toJavaObject(AcsElevatorRecordExtraDTO.class); + } + } + if (deviceResult == null || !AcsDeviceIdentifyTypeEnum.BACKEND_REG.getCode() + .equals(Integer.valueOf(deviceResult.getIdentifyType()))) { + if (elevatorRecordExtraDTO != null) { + AcsElevatorRecordAddParam elevatorParam = getElevatorParam(param, elevatorRecordExtraDTO); + CloudwalkResult addResult = this.acsElevatorRecordService.add(elevatorParam, context); + if (param.getRecordResult().intValue() == 1 && addResult.isSuccess() + && "1".equals(elevatorRecordExtraDTO.getSrcFloor())) { + statisticsAddCache(AcsCacheKeyUtil.getOpenDoorCountKey( + DateUtils.parseDate(new Date(), "yyyy-MM-dd"), openDoorRecordEvent.getBusinessId())); + } + } + } + } catch (Exception e) { + LOGGER.error("消费开门记录失败,原因:", e); + } finally { + FeignThreadLocalUtil.remove(); + } + } + + private void cleanCache(CloudwalkCallContext context, DeviceResult deviceResult, String openDoorLogId, + String recognitionNo) { + String backendRegLogIdKey = AcsCacheKeyUtil.getBackendRegLogIdKey(deviceResult.getDeviceCode(), + context.getCompany().getCompanyId(), recognitionNo); + String backendRegExpireKey = + AcsCacheKeyUtil.getBackendRegExpireKey(context.getCompany().getCompanyId(), openDoorLogId); + this.redisTemplate.delete(backendRegLogIdKey); + this.redisTemplate.delete(backendRegExpireKey); + } + + private AcsOpenDoorRecordAddParam getParam(OpenDoorRecordEvent event) { + AcsOpenDoorRecordAddParam param = + (AcsOpenDoorRecordAddParam)BeanCopyUtils.copyProperties(event, AcsOpenDoorRecordAddParam.class); + param.setRecordResult(Integer.valueOf(Integer.parseInt(event.getRecordResult()))); + param.setDeviceCode(event.getDeviceId()); + param.setOpenDoorType(event.getOpenDoorType()); + return param; + } + + private AcsElevatorRecordAddParam getElevatorParam(AcsOpenDoorRecordAddParam addParam, + AcsElevatorRecordExtraDTO elevatorRecordExtraDTO) { + AcsElevatorRecordAddParam param = + (AcsElevatorRecordAddParam)BeanCopyUtils.copyProperties(addParam, AcsElevatorRecordAddParam.class); + return (AcsElevatorRecordAddParam)BeanCopyUtils.copyProperties(elevatorRecordExtraDTO, param); + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/PersonRecordEventHandler.java b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/PersonRecordEventHandler.java new file mode 100644 index 00000000..2f414b19 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/PersonRecordEventHandler.java @@ -0,0 +1,83 @@ +package cn.cloudwalk.elevator.handler; + +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceResult; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.utils.BeanCopyUtils; +import cn.cloudwalk.cwos.client.event.event.BaseEvent; +import cn.cloudwalk.cwos.client.event.event.PersonRecordUploadEvent; +import cn.cloudwalk.cwos.client.event.event.mode.Face; +import cn.cloudwalk.elevator.config.FeignThreadLocalUtil; +import cn.cloudwalk.elevator.em.CompareTypeEnum; +import cn.cloudwalk.elevator.record.param.AcsRecogRecordAddParam; +import cn.cloudwalk.elevator.record.service.AcsRecogRecordService; +import cn.cloudwalk.elevator.util.AcsCacheKeyUtil; +import cn.cloudwalk.elevator.util.DateUtils; +import cn.cloudwalk.event.annotation.EventTopicSuffix; +import cn.cloudwalk.event.handler.EventHandler; +import com.alibaba.fastjson.JSON; +import java.math.BigDecimal; +import java.util.Date; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import javax.annotation.Resource; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; + +@Component +@EventTopicSuffix({"all"}) +public class PersonRecordEventHandler extends AbstractEventHandler implements EventHandler { + private static final Logger LOGGER = LoggerFactory.getLogger(PersonRecordEventHandler.class); + @Resource + private AcsRecogRecordService acsRecogRecordService; + + public void onEvent(PersonRecordUploadEvent personRecordUploadEvent) { + LOGGER.info("收到personRecordUploadEvent消息:{}", JSON.toJSONString(personRecordUploadEvent)); + try { + CloudwalkCallContext context = getCloudwalkContext(personRecordUploadEvent.getBusinessId()); + DeviceResult deviceResult = queryDeviceResult(personRecordUploadEvent.getDeviceId(), context); + DeviceResult subDeviceResult = queryDeviceResult(personRecordUploadEvent.getSubDeviceId(), context); + Map> faceMap = (Map>)personRecordUploadEvent.getFaces().stream() + .collect(Collectors.groupingBy(Face::getFaceId)); + for (String faceId : faceMap.keySet()) { + try { + Face face = ((List)faceMap.get(faceId)).get(0); + AcsRecogRecordAddParam param = getParam(personRecordUploadEvent, face); + param.setDeviceResult(deviceResult); + param.setSubDeviceResult(subDeviceResult); + this.acsRecogRecordService.add(param, context); + statisticsAddCache(AcsCacheKeyUtil.getRecogCountKey(DateUtils.parseDate(new Date(), "yyyy-MM-dd"), + personRecordUploadEvent.getBusinessId())); + } catch (Exception e) { + LOGGER.error("保存人员识别记录失败,faceId:{},原因:", faceId, e); + } + } + } catch (Exception e) { + LOGGER.error("消费人员识别记录失败,原因:", e); + } finally { + FeignThreadLocalUtil.remove(); + } + } + + private AcsRecogRecordAddParam getParam(PersonRecordUploadEvent event, Face face) { + AcsRecogRecordAddParam param = + (AcsRecogRecordAddParam)BeanCopyUtils.copyProperties(event, AcsRecogRecordAddParam.class); + BeanCopyUtils.copyProperties(face, param); + if (event.getPanoramaData() != null) { + param.setPanoramaImagePath(event.getPanoramaData().getPanoramaImagePath()); + } + param.setDeviceCode(event.getDeviceId()); + param.setThreshold(BigDecimal.valueOf(event.getThreshold())); + param.setScore(BigDecimal.valueOf(face.getScore().floatValue())); + param.setQualityScore(BigDecimal.valueOf(face.getQualityScore().floatValue())); + if (face.getMaskScore() != null) { + param.setMaskScore(BigDecimal.valueOf(face.getMaskScore().floatValue())); + } + if (face.getTempScore() != null) { + param.setTempScore(BigDecimal.valueOf(face.getTempScore().floatValue())); + } + param.setCompareType(CompareTypeEnum.RECOG.getCode()); + return param; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/controller/AcsElevatorDeviceController.java b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/controller/AcsElevatorDeviceController.java new file mode 100644 index 00000000..c8e6af01 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/controller/AcsElevatorDeviceController.java @@ -0,0 +1,285 @@ +package cn.cloudwalk.elevator.handler.device.controller; + +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.service.DeviceService; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.page.CloudwalkPageInfo; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.cloud.utils.BeanCopyUtils; +import cn.cloudwalk.elevator.codeElevatorArea.dto.AcsElevatorCodeResultDTO; +import cn.cloudwalk.elevator.codeElevatorArea.param.AcsElevatorCodeParam; +import cn.cloudwalk.elevator.codeElevatorArea.service.AcsElevatorCodeService; +import cn.cloudwalk.elevator.common.AbstractCloudwalkController; +import cn.cloudwalk.elevator.device.dto.AcsElevatorDeviceResultDTO; +import cn.cloudwalk.elevator.device.param.AcsDeviceQueryParam; +import cn.cloudwalk.elevator.device.param.AcsElevatorDeviceAddParam; +import cn.cloudwalk.elevator.device.param.AcsElevatorDeviceEditParam; +import cn.cloudwalk.elevator.device.param.AcsElevatorDeviceQueryByIdParam; +import cn.cloudwalk.elevator.device.param.AcsElevatorDeviceQueryParam; +import cn.cloudwalk.elevator.device.service.AcsElevatorDeviceService; +import cn.cloudwalk.elevator.export.impl.ElevatorDeviceExportService; +import cn.cloudwalk.elevator.export.result.ElevatorDeviceRecordExcelResult; +import cn.cloudwalk.elevator.handler.device.form.AcsDeviceQueryForm; +import cn.cloudwalk.elevator.handler.device.form.AcsElevatorCodeForm; +import cn.cloudwalk.elevator.handler.device.form.AcsElevatorDeviceAddForm; +import cn.cloudwalk.elevator.handler.device.form.AcsElevatorDeviceDeleteForm; +import cn.cloudwalk.elevator.handler.device.form.AcsElevatorDeviceEditForm; +import cn.cloudwalk.elevator.handler.device.form.AcsElevatorDeviceQueryByIdForm; +import cn.cloudwalk.elevator.handler.device.form.AcsElevatorDeviceQueryForm; +import cn.cloudwalk.elevator.zone.param.ZoneNextTreeParam; +import cn.cloudwalk.elevator.zone.result.ZoneTreeResult; +import cn.cloudwalk.elevator.zone.service.ZoneService; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.annotation.Resource; +import org.springframework.util.ObjectUtils; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequestMapping({"/elevator/device/"}) +public class AcsElevatorDeviceController extends AbstractCloudwalkController { + @Resource + private AcsElevatorDeviceService elevatorDeviceService; + @Resource + private AcsElevatorCodeService elevatorCodeService; + @Resource + private ZoneService zoneService; + @Resource + private DeviceService deviceService; + @Resource + private ElevatorDeviceExportService elevatorDeviceExportService; + + @PostMapping({"/add"}) + public CloudwalkResult add(@RequestBody AcsElevatorDeviceAddForm form) throws ServiceException { + this.LOGGER.info("添加派梯设备,请求参数:{}", JSON.toJSONString(form)); + AcsElevatorDeviceAddParam param = + (AcsElevatorDeviceAddParam)BeanCopyUtils.copyProperties(form, AcsElevatorDeviceAddParam.class); + String deviceCode = form.getDeviceCode(); + AcsElevatorDeviceResultDTO queryResultDTO = this.elevatorDeviceService.getByDeciveCode(deviceCode); + if (queryResultDTO != null) { + return CloudwalkResult.success("该设备已添加过,请重新选择!"); + } + String businessId = getCloudwalkContext().getCompany().getCompanyId(); + param.setBusinessId(businessId); + try { + int result = this.elevatorDeviceService.add(param, getCloudwalkContext()).intValue(); + return CloudwalkResult.success(Integer.valueOf(result)); + } catch (ServiceException e) { + this.LOGGER.error("添加派梯设备失败,原因:", (Throwable)e); + return CloudwalkResult.fail("添加派梯设备失败", e.getMessage()); + } + } + + @PostMapping({"/edit"}) + public CloudwalkResult edit(@RequestBody AcsElevatorDeviceEditForm form) { + this.LOGGER.info("修改派梯设备,请求参数:{}", JSON.toJSONString(form)); + AcsElevatorDeviceEditParam param = + (AcsElevatorDeviceEditParam)BeanCopyUtils.copyProperties(form, AcsElevatorDeviceEditParam.class); + try { + int result = this.elevatorDeviceService.edit(param, getCloudwalkContext()).intValue(); + return CloudwalkResult.success(Integer.valueOf(result)); + } catch (ServiceException e) { + this.LOGGER.error("修改派梯设备失败,原因:", (Throwable)e); + return CloudwalkResult.fail("修改派梯设备失败", e.getMessage()); + } + } + + @PostMapping({"/getById"}) + public CloudwalkResult getById(@RequestBody AcsElevatorDeviceQueryByIdForm form) { + this.LOGGER.info("根据id获取派梯设备信息,请求参数:{}", JSON.toJSONString(form)); + AcsElevatorDeviceQueryByIdParam param = + (AcsElevatorDeviceQueryByIdParam)BeanCopyUtils.copyProperties(form, AcsElevatorDeviceQueryByIdParam.class); + try { + AcsElevatorDeviceResultDTO result = this.elevatorDeviceService.getById(param, getCloudwalkContext()); + return CloudwalkResult.success(result); + } catch (ServiceException e) { + this.LOGGER.error("根据id获取派梯设备信息失败,原因:", (Throwable)e); + return CloudwalkResult.fail("根据id获取派梯设备信息失败", e.getMessage()); + } + } + + @PostMapping({"/delete"}) + public CloudwalkResult delete(@RequestBody AcsElevatorDeviceDeleteForm form) { + try { + this.LOGGER.info("删除派梯设备信息,请求参数:{}", JSON.toJSONString(form)); + if (form == null) { + this.LOGGER.error("删除派梯设备信息失败,原因:无编号传输过来!"); + return CloudwalkResult.fail("无编号传输过来!", getMessage("无编号传输过来!")); + } + List idList = form.getIds(); + int result = this.elevatorDeviceService.delete(idList, getCloudwalkContext()).intValue(); + return CloudwalkResult.success(Integer.valueOf(result)); + } catch (ServiceException e) { + this.LOGGER.error("修改派梯设备失败,原因:", (Throwable)e); + return CloudwalkResult.fail("删除派梯设备信息失败", e.getMessage()); + } + } + + @PostMapping({"/editCode"}) + public CloudwalkResult editCode(@RequestBody AcsElevatorCodeForm form) { + try { + this.LOGGER.info("设置电梯编码,请求参数:{}", JSON.toJSONString(form)); + AcsElevatorCodeParam param = + (AcsElevatorCodeParam)BeanCopyUtils.copyProperties(form, AcsElevatorCodeParam.class); + if (param.getIsFirst().intValue() == 1) { + AcsElevatorCodeResultDTO firstResult = this.elevatorCodeService.getFirstByParentId(param.getParentId()); + if (!ObjectUtils.isEmpty(firstResult) && !firstResult.getZoneId().equals(param.getZoneId())) { + return CloudwalkResult.fail("76260525", getMessage("76260525")); + } + } + AcsElevatorCodeResultDTO result = this.elevatorCodeService.get(param); + if (!ObjectUtils.isEmpty(result)) { + this.elevatorCodeService.updateOld(param); + return CloudwalkResult.success(Integer.valueOf(1)); + } + this.elevatorCodeService.insertNew(param); + return CloudwalkResult.success(Integer.valueOf(1)); + } catch (ServiceException e) { + this.LOGGER.error("设置电梯编码失败,原因:", (Throwable)e); + return CloudwalkResult.fail("设置电梯编码失败", e.getMessage()); + } + } + + @PostMapping({"/get"}) + public CloudwalkResult> + get(@RequestBody AcsElevatorDeviceQueryForm form) { + this.LOGGER.info("分页查询派梯设备,请求参数:{}", JSON.toJSONString(form)); + AcsElevatorDeviceQueryParam param = + (AcsElevatorDeviceQueryParam)BeanCopyUtils.copyProperties(form, AcsElevatorDeviceQueryParam.class); + try { + return this.elevatorDeviceService.get(param, getCloudwalkContext()); + } catch (ServiceException e) { + this.LOGGER.error("查询派梯设备信息列表失败,原因:{}", (Throwable)e); + return CloudwalkResult.fail("查询派梯设备信息列表失败", e.getMessage()); + } + } + + @PostMapping({"/export"}) + public CloudwalkResult export(@RequestBody AcsElevatorDeviceQueryForm form) { + this.LOGGER.info("派梯设备导出,请求参数:{}", JSON.toJSONString(form)); + AcsElevatorDeviceQueryParam param = + (AcsElevatorDeviceQueryParam)BeanCopyUtils.copyProperties(form, AcsElevatorDeviceQueryParam.class); + try { + CloudwalkCallContext cloudwalkContext = getCloudwalkContext(); + if (cloudwalkContext.getCompany().getCompanyId() == null) { + cloudwalkContext.getCompany().setCompanyId("default"); + } + return this.elevatorDeviceExportService.startExportTask(param, ElevatorDeviceRecordExcelResult.class, null, + cloudwalkContext); + } catch (ServiceException e) { + this.LOGGER.error("派梯设备信息导出失败", (Throwable)e); + return CloudwalkResult.fail("查询派梯设备信息列表失败", e.getMessage()); + } + } + + @PostMapping({"/zone/treeCode"}) + public CloudwalkResult> queryZoneTreeCode(@RequestBody ZoneNextTreeParam zoneNextTreeParam) { + try { + this.LOGGER.info("获取区域的电梯编码,请求参数:{}", JSON.toJSONString(zoneNextTreeParam)); + CloudwalkResult> query = + this.zoneService.tree(zoneNextTreeParam, getCloudwalkContext()); + CloudwalkResult> result = new CloudwalkResult(); + List treeList = (List)query.getData(); + List treeResultList = new ArrayList<>(); + if (treeList != null && treeList.size() > 0) { + for (ZoneTreeResult zoneTreeResult : treeList) { + String zoneId = zoneTreeResult.getId(); + AcsElevatorCodeParam param = new AcsElevatorCodeParam(); + param.setZoneId(zoneId); + AcsElevatorCodeResultDTO code = this.elevatorCodeService.get(param); + if (!ObjectUtils.isEmpty(code)) { + zoneTreeResult.setElevatorCode(code.getCode()); + zoneTreeResult.setIsFirst(code.getIsFirst()); + } + if (zoneTreeResult.getChildren() != null) { + List chidList = treeRecursionDataList(zoneTreeResult.getChildren()); + zoneTreeResult.setChildren(chidList); + } + treeResultList.add(zoneTreeResult); + } + } + query.setData(treeResultList); + return query; + } catch (Exception e) { + this.LOGGER.error("获取区域的电梯编码失败,原因:", e); + return CloudwalkResult.fail("获取区域的电梯编码失败", e.getMessage()); + } + } + + public List treeRecursionDataList(List childList) throws ServiceException { + List childResultList = new ArrayList<>(); + for (ZoneTreeResult zoneTreeResult : childList) { + String id = zoneTreeResult.getId(); + AcsElevatorCodeParam param = new AcsElevatorCodeParam(); + param.setZoneId(id); + AcsElevatorCodeResultDTO code = this.elevatorCodeService.get(param); + if (!ObjectUtils.isEmpty(code)) { + zoneTreeResult.setElevatorCode(code.getCode()); + zoneTreeResult.setIsFirst(code.getIsFirst()); + } + if (zoneTreeResult.getChildren() != null && zoneTreeResult.getChildren().size() > 0) { + zoneTreeResult.setChildren(treeRecursionDataList(zoneTreeResult.getChildren())); + } + childResultList.add(zoneTreeResult); + } + return childResultList; + } + + @PostMapping({"/devicePage"}) + public CloudwalkResult> devicePage(@RequestBody AcsDeviceQueryForm form) { + try { + if (this.LOGGER.isDebugEnabled()) { + this.LOGGER.debug("devicePage form {}", JSONObject.toJSONString(form)); + } + AcsDeviceQueryParam param = new AcsDeviceQueryParam(); + CloudwalkPageInfo pageInfo = new CloudwalkPageInfo(form.getCurrentPage(), form.getRowsOfPage()); + BeanCopyUtils.copyProperties(form, param); + if (this.LOGGER.isDebugEnabled()) { + this.LOGGER.debug("devicePage param {}", JSONObject.toJSONString(param)); + } + return this.elevatorDeviceService.devicePage(param, pageInfo, getCloudwalkContext()); + } catch (ServiceException e) { + this.LOGGER.error("分页查询设备信息异常,原因:", (Throwable)e); + return CloudwalkResult.fail("76260529", getMessage("76260529")); + } + } + + public Map queryZone() throws ServiceException { + Map zoneMap = new HashMap<>(); + CloudwalkResult> query = + this.zoneService.tree(new ZoneNextTreeParam(), getCloudwalkContext()); + List treeList = (List)query.getData(); + if (treeList != null && treeList.size() > 0) { + for (ZoneTreeResult zoneTreeResult : treeList) { + String zoneId = zoneTreeResult.getId(); + String zoneName = zoneTreeResult.getName(); + zoneMap.put(zoneId, zoneName); + getZoneMap(zoneTreeResult.getChildren(), zoneMap); + } + } + return zoneMap; + } + + public Map getZoneMap(List childList, Map zoneMap) + throws ServiceException { + List childResultList = new ArrayList<>(); + for (ZoneTreeResult zoneTreeResult : childList) { + String zoneId = zoneTreeResult.getId(); + String zoneName = zoneTreeResult.getName(); + zoneMap.put(zoneId, zoneName); + if (zoneTreeResult.getChildren() != null && zoneTreeResult.getChildren().size() > 0) { + getZoneMap(zoneTreeResult.getChildren(), zoneMap); + } + } + return zoneMap; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/controller/AcsElevatorDeviceGetWayController.java b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/controller/AcsElevatorDeviceGetWayController.java new file mode 100644 index 00000000..e2fa7788 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/controller/AcsElevatorDeviceGetWayController.java @@ -0,0 +1,226 @@ +package cn.cloudwalk.elevator.handler.device.controller; + +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.service.DeviceService; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.cloud.utils.BeanCopyUtils; +import cn.cloudwalk.elevator.codeElevatorArea.dto.AcsElevatorCodeQueryDTO; +import cn.cloudwalk.elevator.codeElevatorArea.dto.AcsElevatorCodeResultDTO; +import cn.cloudwalk.elevator.codeElevatorArea.param.AcsElevatorCodeParam; +import cn.cloudwalk.elevator.codeElevatorArea.service.AcsElevatorCodeService; +import cn.cloudwalk.elevator.common.AbstractCloudwalkController; +import cn.cloudwalk.elevator.device.dto.AcsElevatorDeviceQueryFoDTO; +import cn.cloudwalk.elevator.device.dto.AcsElevatorDeviceResultDTO; +import cn.cloudwalk.elevator.device.param.AcsElevatorDeviceQueryParam; +import cn.cloudwalk.elevator.device.result.KeyValueResult; +import cn.cloudwalk.elevator.device.service.AcsElevatorDeviceService; +import cn.cloudwalk.elevator.handler.device.form.AcsElevatorCodeQueryForm; +import cn.cloudwalk.elevator.handler.device.form.AcsElevatorDeviceQueryForm; +import cn.cloudwalk.elevator.handler.device.form.AcsElevatorRecordAddForm; +import cn.cloudwalk.elevator.record.param.AcsElevatorRecordAddParam; +import cn.cloudwalk.elevator.record.service.AcsElevatorRecordService; +import cn.cloudwalk.elevator.util.StringUtils; +import cn.cloudwalk.elevator.zone.param.ZoneNextTreeParam; +import cn.cloudwalk.elevator.zone.result.ZoneTreeResult; +import cn.cloudwalk.elevator.zone.service.ZoneService; +import java.util.ArrayList; +import java.util.List; +import javax.annotation.Resource; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.util.ObjectUtils; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequestMapping({"/device/v2/"}) +public class AcsElevatorDeviceGetWayController extends AbstractCloudwalkController { + @Resource + private AcsElevatorDeviceService elevatorDeviceService; + @Resource + private AcsElevatorCodeService elevatorCodeService; + @Resource + private ZoneService zoneService; + @Resource + private DeviceService deviceService; + @Resource + private AcsElevatorRecordService elevatorRecordService; + @Value("${elevator.application.key}") + private String key; + @Value("${elevator.application.time}") + private Long time; + @Value("${elevator.application.keyA}") + private String keyA; + + @PostMapping({"/39201"}) + public CloudwalkResult> get(@RequestBody AcsElevatorDeviceQueryForm form) { + AcsElevatorDeviceQueryParam param = + (AcsElevatorDeviceQueryParam)BeanCopyUtils.copyProperties(form, AcsElevatorDeviceQueryParam.class); + try { + List list = this.elevatorDeviceService.getFo(param); + if (list != null && list.size() > 0) { + return CloudwalkResult.success(list); + } + return CloudwalkResult.success(new ArrayList()); + } catch (ServiceException e) { + this.LOGGER.error("查询派梯设备信息列表失败,原因:{}", (Throwable)e); + return CloudwalkResult.fail("查询派梯设备信息列表失败", e.getMessage()); + } + } + + @PostMapping({"39202"}) + public CloudwalkResult> + queryZoneTreeCode(@RequestBody AcsElevatorCodeQueryForm form) { + try { + AcsElevatorDeviceQueryParam param = + (AcsElevatorDeviceQueryParam)BeanCopyUtils.copyProperties(form, AcsElevatorDeviceQueryParam.class); + String buildingId = ""; + String businessId = ""; + if (StringUtils.isNotBlank(form.getDeviceCode())) { + buildingId = this.elevatorDeviceService.getBuildingId(param); + businessId = this.elevatorDeviceService.getBusinessId(param); + } + ZoneNextTreeParam zoneNextTreeParam = new ZoneNextTreeParam(); + if (StringUtils.isNotBlank(buildingId)) { + zoneNextTreeParam.setParentId(buildingId); + } + zoneNextTreeParam.setBusinessId(businessId); + CloudwalkResult> query = + this.zoneService.tree(zoneNextTreeParam, getCloudwalkContext()); + List treeList = (List)query.getData(); + List treeResultList = new ArrayList<>(); + if (treeList != null && treeList.size() > 0) { + for (ZoneTreeResult zoneTreeResult : treeList) { + if ("PARK".equals(zoneTreeResult.getType())) { + List buildingList = zoneTreeResult.getChildren(); + if (buildingList != null && buildingList.size() > 0) + for (ZoneTreeResult building : buildingList) { + if ("BUILDING".equals(building.getType())) { + List floorList = building.getChildren(); + if (floorList != null && floorList.size() > 0) + for (ZoneTreeResult floor : floorList) { + AcsElevatorCodeQueryDTO querydTO = new AcsElevatorCodeQueryDTO(); + querydTO.setZoneId(floor.getId()); + querydTO.setId(floor.getId()); + querydTO.setZoneName(floor.getName()); + querydTO.setZoneType(floor.getType()); + AcsElevatorCodeParam paramCode = new AcsElevatorCodeParam(); + paramCode.setZoneId(floor.getId()); + AcsElevatorCodeResultDTO code = this.elevatorCodeService.get(paramCode); + if (!ObjectUtils.isEmpty(code)) { + querydTO.setCode(code.getCode()); + querydTO.setIsFirst(code.getIsFirst()); + } + treeResultList.add(querydTO); + } + continue; + } + if ("FLOOR".equals(building.getType())) { + AcsElevatorCodeQueryDTO querydTO = new AcsElevatorCodeQueryDTO(); + querydTO.setZoneId(building.getId()); + querydTO.setZoneName(building.getName()); + querydTO.setZoneType("FLOOR"); + querydTO.setId(building.getId()); + AcsElevatorCodeParam paramCode = new AcsElevatorCodeParam(); + paramCode.setZoneId(zoneTreeResult.getId()); + AcsElevatorCodeResultDTO code = this.elevatorCodeService.get(paramCode); + if (!ObjectUtils.isEmpty(code)) { + querydTO.setCode(code.getCode()); + querydTO.setIsFirst(code.getIsFirst()); + } + treeResultList.add(querydTO); + } + } + continue; + } + if ("BUILDING".equals(zoneTreeResult.getType())) { + List floorList = zoneTreeResult.getChildren(); + if (floorList != null && floorList.size() > 0) + for (ZoneTreeResult floor : floorList) { + AcsElevatorCodeQueryDTO querydTO = new AcsElevatorCodeQueryDTO(); + querydTO.setZoneId(floor.getId()); + querydTO.setZoneName(floor.getName()); + querydTO.setZoneType(floor.getType()); + querydTO.setId(floor.getId()); + AcsElevatorCodeParam paramCode = new AcsElevatorCodeParam(); + paramCode.setZoneId(floor.getId()); + AcsElevatorCodeResultDTO code = this.elevatorCodeService.get(paramCode); + if (!ObjectUtils.isEmpty(code)) { + querydTO.setCode(code.getCode()); + querydTO.setIsFirst(code.getIsFirst()); + } + treeResultList.add(querydTO); + } + continue; + } + if ("FLOOR".equals(zoneTreeResult.getType())) { + AcsElevatorCodeQueryDTO querydTO = new AcsElevatorCodeQueryDTO(); + querydTO.setZoneId(zoneTreeResult.getId()); + querydTO.setZoneName(zoneTreeResult.getName()); + querydTO.setZoneType("FLOOR"); + querydTO.setId(zoneTreeResult.getId()); + AcsElevatorCodeParam paramCode = new AcsElevatorCodeParam(); + paramCode.setZoneId(zoneTreeResult.getId()); + AcsElevatorCodeResultDTO code = this.elevatorCodeService.get(paramCode); + if (!ObjectUtils.isEmpty(code)) { + querydTO.setCode(code.getCode()); + querydTO.setIsFirst(code.getIsFirst()); + } + treeResultList.add(querydTO); + } + } + } + CloudwalkResult> result = CloudwalkResult.success(treeResultList); + return result; + } catch (Exception e) { + this.LOGGER.error("获取区域的电梯编码失败,原因:", e); + return CloudwalkResult.fail("获取区域的电梯编码失败", e.getMessage()); + } + } + + @PostMapping({"39203"}) + public CloudwalkResult addElevatorRecord(@RequestBody AcsElevatorRecordAddForm form) { + AcsElevatorRecordAddParam param = + (AcsElevatorRecordAddParam)BeanCopyUtils.copyProperties(form, AcsElevatorRecordAddParam.class); + try { + String deviceCode = form.getDeviceCode(); + AcsElevatorDeviceQueryParam paramDevice = new AcsElevatorDeviceQueryParam(); + paramDevice.setDeviceCode(deviceCode); + Long time1 = Long.valueOf(System.currentTimeMillis()); + String businessId = this.elevatorDeviceService.getBusinessId(paramDevice); + if (StringUtils.isNotBlank(businessId)) { + param.setBusinessId(businessId); + } else { + param.setBusinessId("000"); + } + Long time2 = Long.valueOf(System.currentTimeMillis()); + AcsElevatorDeviceResultDTO deviceResultDTO = this.elevatorDeviceService.getByDeciveCode(deviceCode); + DeviceResult deviceResult = new DeviceResult(); + if (deviceResultDTO != null) { + deviceResult.setId(deviceResultDTO.getId()); + deviceResult.setDeviceCode(deviceCode); + deviceResult.setDeviceName(deviceResultDTO.getDeviceName()); + deviceResult.setDeviceTypeName(deviceResultDTO.getDeviceTypeName()); + deviceResult.setAreaId(deviceResultDTO.getAreaId()); + } + param.setDeviceResult(deviceResult); + Long time3 = Long.valueOf(System.currentTimeMillis()); + CloudwalkResult result = this.elevatorRecordService.add(param, getCloudwalkContext()); + return CloudwalkResult.success(result); + } catch (ServiceException e) { + this.LOGGER.error("添加刷脸派梯记录失败,原因:", (Throwable)e); + return CloudwalkResult.fail("00", e.getMessage()); + } + } + + @PostMapping({"39204"}) + public CloudwalkResult getKey(@RequestBody AcsElevatorRecordAddForm form) { + KeyValueResult result = new KeyValueResult(); + result.setKey(this.key); + result.setTime(this.time); + result.setKeyA(this.keyA); + return CloudwalkResult.success(result); + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/controller/AcsElevatorRestructureController.java b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/controller/AcsElevatorRestructureController.java new file mode 100644 index 00000000..a42258fd --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/controller/AcsElevatorRestructureController.java @@ -0,0 +1,122 @@ +package cn.cloudwalk.elevator.handler.device.controller; + +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.cloud.utils.BeanCopyUtils; +import cn.cloudwalk.elevator.common.AbstractCloudwalkController; +import cn.cloudwalk.elevator.device.dto.AcsDeviceTaskDTO; +import cn.cloudwalk.elevator.device.param.AcsDeviceRestructureTaskParam; +import cn.cloudwalk.elevator.device.param.AcsRestructureBindingParam; +import cn.cloudwalk.elevator.device.param.AcsRestructureQueryParam; +import cn.cloudwalk.elevator.device.service.AcsElevatorDeviceService; +import cn.cloudwalk.elevator.handler.device.form.AcsDeviceRestructureTaskForm; +import cn.cloudwalk.elevator.handler.device.form.AcsRestructureBindingForm; +import cn.cloudwalk.elevator.handler.device.form.AcsRestructureQueryForm; +import javax.annotation.Resource; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequestMapping({"/elevator/restructure"}) +public class AcsElevatorRestructureController extends AbstractCloudwalkController { + @Resource + private AcsElevatorDeviceService elevatorDeviceService; + + @PostMapping({"/unbind/floors"}) + public CloudwalkResult listUnbindFloors(@RequestBody AcsRestructureQueryForm form) { + try { + AcsRestructureQueryParam param = new AcsRestructureQueryParam(); + BeanCopyUtils.copyProperties(form, param); + return this.elevatorDeviceService.listUnbindFloors(param, getCloudwalkContext()); + } catch (ServiceException e) { + this.LOGGER.error("查询未绑定的楼层异常,原因:", (Throwable)e); + return CloudwalkResult.fail("查询未绑定的派梯楼层异常", e.getMessage()); + } + } + + @PostMapping({"/floors"}) + public CloudwalkResult listFloors(@RequestBody AcsRestructureQueryForm form) { + try { + AcsRestructureQueryParam param = new AcsRestructureQueryParam(); + BeanCopyUtils.copyProperties(form, param); + return this.elevatorDeviceService.listFloors(param, getCloudwalkContext()); + } catch (ServiceException e) { + this.LOGGER.error("查询未绑定的派梯楼层和设备情况异常,原因:", (Throwable)e); + return CloudwalkResult.fail("查询未绑定的派梯楼层异常", e.getMessage()); + } + } + + @PostMapping({"/condition"}) + public CloudwalkResult listCondition(@RequestBody AcsRestructureQueryForm form) { + try { + AcsRestructureQueryParam param = new AcsRestructureQueryParam(); + BeanCopyUtils.copyProperties(form, param); + return this.elevatorDeviceService.listCondition(param, getCloudwalkContext()); + } catch (ServiceException e) { + this.LOGGER.error("根据条件查询派梯楼层异常,原因:", (Throwable)e); + return CloudwalkResult.fail("根据条件查询派梯楼层异常", e.getMessage()); + } + } + + @PostMapping({"/condition/labels"}) + public CloudwalkResult listConditionByLabelIds(@RequestBody AcsRestructureQueryForm form) { + try { + AcsRestructureQueryParam param = new AcsRestructureQueryParam(); + BeanCopyUtils.copyProperties(form, param); + return this.elevatorDeviceService.listConditionByLabelIds(param, getCloudwalkContext()); + } catch (ServiceException e) { + this.LOGGER.error("根据标签id集合查询派梯楼层权限异常,原因:", (Throwable)e); + return CloudwalkResult.fail("根据标签id集合查询派梯楼层权限异常", e.getMessage()); + } + } + + @PostMapping({"/binding"}) + public CloudwalkResult bindingFloors(@RequestBody AcsRestructureBindingForm form) { + try { + AcsRestructureBindingParam param = new AcsRestructureBindingParam(); + BeanCopyUtils.copyProperties(form, param); + return this.elevatorDeviceService.bindingFloors(param, getCloudwalkContext()); + } catch (ServiceException e) { + this.LOGGER.error("机构id、标签id绑定派梯楼层异常,原因:", (Throwable)e); + return CloudwalkResult.fail("机构id、标签id绑定派梯楼层异常", e.getMessage()); + } + } + + @PostMapping({"/binding/person"}) + public CloudwalkResult bindingPerson(@RequestBody AcsRestructureBindingForm form) { + try { + AcsRestructureBindingParam param = new AcsRestructureBindingParam(); + BeanCopyUtils.copyProperties(form, param); + return this.elevatorDeviceService.bindingPerson(param, getCloudwalkContext()); + } catch (ServiceException e) { + this.LOGGER.error("人员批量绑定派梯楼层异常,原因:", (Throwable)e); + return CloudwalkResult.fail("人员批量绑定派梯楼层异常", e.getMessage()); + } + } + + @PostMapping({"/task/progress"}) + public CloudwalkResult getTask(@RequestBody AcsDeviceRestructureTaskForm form) { + try { + AcsDeviceRestructureTaskParam param = new AcsDeviceRestructureTaskParam(); + BeanCopyUtils.copyProperties(form, param); + return this.elevatorDeviceService.getTask(param, getCloudwalkContext()); + } catch (ServiceException e) { + this.LOGGER.error("获取任务进程异常,原因:", (Throwable)e); + return CloudwalkResult.fail("获取任务进程异常", e.getMessage()); + } + } + + @PostMapping({"/task/stop"}) + public CloudwalkResult setTaskStop(@RequestBody AcsDeviceRestructureTaskForm form) { + try { + AcsDeviceRestructureTaskParam param = new AcsDeviceRestructureTaskParam(); + BeanCopyUtils.copyProperties(form, param); + return this.elevatorDeviceService.setTaskStop(param, getCloudwalkContext()); + } catch (ServiceException e) { + this.LOGGER.error("终止绑定进程异常,原因:", (Throwable)e); + return CloudwalkResult.fail("终止绑定进程异常", e.getMessage()); + } + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/controller/FileController.java b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/controller/FileController.java new file mode 100644 index 00000000..db19289c --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/controller/FileController.java @@ -0,0 +1,44 @@ +package cn.cloudwalk.elevator.handler.device.controller; + +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.elevator.common.AbstractCloudwalkController; +import cn.cloudwalk.elevator.config.ImageStoreConstants; +import cn.cloudwalk.elevator.record.service.PersonFileService; +import cn.cloudwalk.elevator.util.ToolUtil; +import javax.xml.bind.DatatypeConverter; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequestMapping({"/file"}) +public class FileController extends AbstractCloudwalkController { + @Autowired + private PersonFileService personFileService; + + @RequestMapping(value = {"/imgupload"}, method = {RequestMethod.POST}, consumes = {"multipart/form-data"}) + public CloudwalkResult fileUpload(@RequestParam("img") String base64) { + if (StringUtils.isEmpty(base64)) { + return CloudwalkResult.fail("53060544", getMessage("53060544")); + } + try { + byte[] bytes = DatatypeConverter.parseBase64Binary(base64); + if (bytes.length > ImageStoreConstants.MAX_FILE.intValue()) { + return CloudwalkResult.fail("53060428", getMessage("53060428")); + } + String fileName = ToolUtil.generateUUID(); + this.LOGGER.info("上传文件:{},size={}", fileName, Integer.valueOf(bytes.length)); + CloudwalkResult storeResult = this.personFileService.upload(fileName, bytes); + if (storeResult != null && StringUtils.isNotBlank((CharSequence)storeResult.getData())) { + return CloudwalkResult.success(storeResult.getData()); + } + return storeResult; + } catch (Exception e) { + this.LOGGER.error("", e); + return CloudwalkResult.fail("80014013", getMessage("80014013")); + } + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/form/AcsDeviceQueryForm.java b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/form/AcsDeviceQueryForm.java new file mode 100644 index 00000000..8db934d2 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/form/AcsDeviceQueryForm.java @@ -0,0 +1,34 @@ +package cn.cloudwalk.elevator.handler.device.form; + +import cn.cloudwalk.cloud.page.CloudwalkBasePageForm; +import java.io.Serializable; + +public class AcsDeviceQueryForm extends CloudwalkBasePageForm implements Serializable { + private String deviceName; + private String deviceCategoryId; + private String areaId; + + public String getDeviceName() { + return this.deviceName; + } + + public void setDeviceName(String deviceName) { + this.deviceName = deviceName; + } + + public String getDeviceCategoryId() { + return this.deviceCategoryId; + } + + public void setDeviceCategoryId(String deviceCategoryId) { + this.deviceCategoryId = deviceCategoryId; + } + + public String getAreaId() { + return this.areaId; + } + + public void setAreaId(String areaId) { + this.areaId = areaId; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/form/AcsDeviceRestructureTaskForm.java b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/form/AcsDeviceRestructureTaskForm.java new file mode 100644 index 00000000..bdda263d --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/form/AcsDeviceRestructureTaskForm.java @@ -0,0 +1,43 @@ +package cn.cloudwalk.elevator.handler.device.form; + +import java.io.Serializable; + +public class AcsDeviceRestructureTaskForm implements Serializable { + private static final long serialVersionUID = -7349123760464380004L; + private String taskId; + + public String toString() { + return "AcsDeviceRestructureTaskForm(taskId=" + getTaskId() + ")"; + } + + public int hashCode() { + int PRIME = 59; + result = 1; + Object $taskId = getTaskId(); + return result * 59 + (($taskId == null) ? 43 : $taskId.hashCode()); + } + + protected boolean canEqual(Object other) { + return other instanceof AcsDeviceRestructureTaskForm; + } + + public boolean equals(Object o) { + if (o == this) + return true; + if (!(o instanceof AcsDeviceRestructureTaskForm)) + return false; + AcsDeviceRestructureTaskForm other = (AcsDeviceRestructureTaskForm)o; + if (!other.canEqual(this)) + return false; + Object this$taskId = getTaskId(), other$taskId = other.getTaskId(); + return !((this$taskId == null) ? (other$taskId != null) : !this$taskId.equals(other$taskId)); + } + + public void setTaskId(String taskId) { + this.taskId = taskId; + } + + public String getTaskId() { + return this.taskId; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/form/AcsElevatorCodeForm.java b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/form/AcsElevatorCodeForm.java new file mode 100644 index 00000000..92d1eb4d --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/form/AcsElevatorCodeForm.java @@ -0,0 +1,43 @@ +package cn.cloudwalk.elevator.handler.device.form; + +import cn.cloudwalk.cloud.entity.CloudwalkBaseTimes; +import java.io.Serializable; + +public class AcsElevatorCodeForm extends CloudwalkBaseTimes implements Serializable { + private String zoneId; + private String parentId; + private String code; + private Integer isFirst; + + public String getZoneId() { + return this.zoneId; + } + + public void setZoneId(String zoneId) { + this.zoneId = zoneId; + } + + public String getParentId() { + return this.parentId; + } + + public void setParentId(String parentId) { + this.parentId = parentId; + } + + public String getCode() { + return this.code; + } + + public void setCode(String code) { + this.code = code; + } + + public Integer getIsFirst() { + return this.isFirst; + } + + public void setIsFirst(Integer isFirst) { + this.isFirst = isFirst; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/form/AcsElevatorCodeQueryForm.java b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/form/AcsElevatorCodeQueryForm.java new file mode 100644 index 00000000..937cd0e2 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/form/AcsElevatorCodeQueryForm.java @@ -0,0 +1,20 @@ +package cn.cloudwalk.elevator.handler.device.form; + +import cn.cloudwalk.cloud.entity.CloudwalkBaseTimes; +import java.io.Serializable; + +public class AcsElevatorCodeQueryForm extends CloudwalkBaseTimes implements Serializable { + private String deviceCode; + + public String getDeviceCode() { + return this.deviceCode; + } + + public void setDeviceCode(String deviceCode) { + this.deviceCode = deviceCode; + } + + public String toString() { + return "AcsElevatorCodeQueryForm{deviceCode='" + this.deviceCode + '\'' + '}'; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/form/AcsElevatorDeviceAddForm.java b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/form/AcsElevatorDeviceAddForm.java new file mode 100644 index 00000000..70c1d7f3 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/form/AcsElevatorDeviceAddForm.java @@ -0,0 +1,148 @@ +package cn.cloudwalk.elevator.handler.device.form; + +import cn.cloudwalk.cloud.entity.CloudwalkBaseTimes; +import java.io.Serializable; +import javax.validation.constraints.NotNull; +import org.hibernate.validator.constraints.NotEmpty; + +public class AcsElevatorDeviceAddForm extends CloudwalkBaseTimes implements Serializable { + private String businessId; + @NotEmpty + private String deviceId; + @NotEmpty + private String deviceCode; + @NotNull + private String deviceName; + private String deviceTypeName; + private String elevatorFloorList; + @NotNull + private String currentFloorId; + private String currentFloor; + private String currentBuilding; + private String currentBuildingId; + private String areaName; + private Integer deleteFlag; + private String areaId; + private String elevatorFloorIdList; + + public String getElevatorFloorIdList() { + return this.elevatorFloorIdList; + } + + public void setElevatorFloorIdList(String elevatorFloorIdList) { + this.elevatorFloorIdList = elevatorFloorIdList; + } + + public String getAreaId() { + return this.areaId; + } + + public void setAreaId(String areaId) { + this.areaId = areaId; + } + + public String getCurrentBuildingId() { + return this.currentBuildingId; + } + + public void setCurrentBuildingId(String currentBuildingId) { + this.currentBuildingId = currentBuildingId; + } + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getDeviceId() { + return this.deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public String getDeviceCode() { + return this.deviceCode; + } + + public void setDeviceCode(String deviceCode) { + this.deviceCode = deviceCode; + } + + public String getDeviceName() { + return this.deviceName; + } + + public void setDeviceName(String deviceName) { + this.deviceName = deviceName; + } + + public String getDeviceTypeName() { + return this.deviceTypeName; + } + + public void setDeviceTypeName(String deviceTypeName) { + this.deviceTypeName = deviceTypeName; + } + + public String getElevatorFloorList() { + return this.elevatorFloorList; + } + + public void setElevatorFloorList(String elevatorFloorList) { + this.elevatorFloorList = elevatorFloorList; + } + + public String getCurrentFloorId() { + return this.currentFloorId; + } + + public void setCurrentFloorId(String currentFloorId) { + this.currentFloorId = currentFloorId; + } + + public String getCurrentFloor() { + return this.currentFloor; + } + + public void setCurrentFloor(String currentFloor) { + this.currentFloor = currentFloor; + } + + public String getCurrentBuilding() { + return this.currentBuilding; + } + + public void setCurrentBuilding(String currentBuilding) { + this.currentBuilding = currentBuilding; + } + + public String getAreaName() { + return this.areaName; + } + + public void setAreaName(String areaName) { + this.areaName = areaName; + } + + public Integer getDeleteFlag() { + return this.deleteFlag; + } + + public void setDeleteFlag(Integer deleteFlag) { + this.deleteFlag = deleteFlag; + } + + public String toString() { + return "AcsElevatorDeviceAddDTO{businessId='" + this.businessId + '\'' + ", deviceId='" + this.deviceId + '\'' + + ", deviceCode='" + this.deviceCode + '\'' + ", deviceName='" + this.deviceName + '\'' + + ", deviceTypeName='" + this.deviceTypeName + '\'' + ", elevatorFloorList='" + this.elevatorFloorList + + '\'' + ", currentFloorId='" + this.currentFloorId + '\'' + ", currentFloor='" + this.currentFloor + '\'' + + ", currentBuilding='" + this.currentBuilding + '\'' + ", areaName='" + this.areaName + '\'' + + ", deleteFlag=" + this.deleteFlag + '}'; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/form/AcsElevatorDeviceDeleteForm.java b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/form/AcsElevatorDeviceDeleteForm.java new file mode 100644 index 00000000..f9a4eb68 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/form/AcsElevatorDeviceDeleteForm.java @@ -0,0 +1,17 @@ +package cn.cloudwalk.elevator.handler.device.form; + +import cn.cloudwalk.cloud.entity.CloudwalkBaseTimes; +import java.io.Serializable; +import java.util.List; + +public class AcsElevatorDeviceDeleteForm extends CloudwalkBaseTimes implements Serializable { + private List ids; + + public List getIds() { + return this.ids; + } + + public void setIds(List ids) { + this.ids = ids; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/form/AcsElevatorDeviceEditForm.java b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/form/AcsElevatorDeviceEditForm.java new file mode 100644 index 00000000..0cf2a840 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/form/AcsElevatorDeviceEditForm.java @@ -0,0 +1,123 @@ +package cn.cloudwalk.elevator.handler.device.form; + +import cn.cloudwalk.cloud.entity.CloudwalkBaseTimes; +import java.io.Serializable; +import javax.validation.constraints.NotNull; + +public class AcsElevatorDeviceEditForm extends CloudwalkBaseTimes implements Serializable { + private String elevatorFloorList; + @NotNull + private String currentFloorId; + private String currentFloor; + private String currentBuilding; + private String currentBuildingId; + private String areaId; + private String elevatorFloorIdList; + private String businessId; + private String deviceId; + private String deviceCode; + private String deviceName; + private String deviceTypeName; + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getDeviceId() { + return this.deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public String getDeviceCode() { + return this.deviceCode; + } + + public void setDeviceCode(String deviceCode) { + this.deviceCode = deviceCode; + } + + public String getDeviceName() { + return this.deviceName; + } + + public void setDeviceName(String deviceName) { + this.deviceName = deviceName; + } + + public String getDeviceTypeName() { + return this.deviceTypeName; + } + + public void setDeviceTypeName(String deviceTypeName) { + this.deviceTypeName = deviceTypeName; + } + + public String getElevatorFloorIdList() { + return this.elevatorFloorIdList; + } + + public void setElevatorFloorIdList(String elevatorFloorIdList) { + this.elevatorFloorIdList = elevatorFloorIdList; + } + + public String getAreaId() { + return this.areaId; + } + + public void setAreaId(String areaId) { + this.areaId = areaId; + } + + public String getElevatorFloorList() { + return this.elevatorFloorList; + } + + public void setElevatorFloorList(String elevatorFloorList) { + this.elevatorFloorList = elevatorFloorList; + } + + public String getCurrentFloorId() { + return this.currentFloorId; + } + + public void setCurrentFloorId(String currentFloorId) { + this.currentFloorId = currentFloorId; + } + + public String getCurrentFloor() { + return this.currentFloor; + } + + public void setCurrentFloor(String currentFloor) { + this.currentFloor = currentFloor; + } + + public String getCurrentBuilding() { + return this.currentBuilding; + } + + public void setCurrentBuilding(String currentBuilding) { + this.currentBuilding = currentBuilding; + } + + public String getCurrentBuildingId() { + return this.currentBuildingId; + } + + public void setCurrentBuildingId(String currentBuildingId) { + this.currentBuildingId = currentBuildingId; + } + + public String toString() { + return "AcsElevatorDeviceAddDTO{, elevatorFloorList='" + this.elevatorFloorList + '\'' + ", currentFloorId='" + + this.currentFloorId + '\'' + ", currentFloor='" + this.currentFloor + '\'' + ", currentBuilding='" + + this.currentBuilding + '\'' + '}'; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/form/AcsElevatorDeviceQueryByIdForm.java b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/form/AcsElevatorDeviceQueryByIdForm.java new file mode 100644 index 00000000..c100addb --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/form/AcsElevatorDeviceQueryByIdForm.java @@ -0,0 +1,16 @@ +package cn.cloudwalk.elevator.handler.device.form; + +import cn.cloudwalk.cloud.page.CloudwalkBasePageForm; +import java.io.Serializable; + +public class AcsElevatorDeviceQueryByIdForm extends CloudwalkBasePageForm implements Serializable { + private String id; + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/form/AcsElevatorDeviceQueryForm.java b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/form/AcsElevatorDeviceQueryForm.java new file mode 100644 index 00000000..7585ed03 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/form/AcsElevatorDeviceQueryForm.java @@ -0,0 +1,91 @@ +package cn.cloudwalk.elevator.handler.device.form; + +import cn.cloudwalk.cloud.page.CloudwalkBasePageForm; +import java.io.Serializable; +import java.util.List; +import javax.validation.constraints.NotNull; + +public class AcsElevatorDeviceQueryForm extends CloudwalkBasePageForm implements Serializable { + @NotNull + private String deviceName; + private String deviceId; + private String deviceTypeName; + private String areaName; + private String deviceCode; + private String ip; + private List areaIds; + private Integer status; + private Integer onlineStatus; + + public Integer getStatus() { + return this.status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Integer getOnlineStatus() { + return this.onlineStatus; + } + + public void setOnlineStatus(Integer onlineStatus) { + this.onlineStatus = onlineStatus; + } + + public String getIp() { + return this.ip; + } + + public void setIp(String ip) { + this.ip = ip; + } + + public List getAreaIds() { + return this.areaIds; + } + + public void setAreaIds(List areaIds) { + this.areaIds = areaIds; + } + + public String getDeviceName() { + return this.deviceName; + } + + public void setDeviceName(String deviceName) { + this.deviceName = deviceName; + } + + public String getDeviceTypeName() { + return this.deviceTypeName; + } + + public void setDeviceTypeName(String deviceTypeName) { + this.deviceTypeName = deviceTypeName; + } + + public String getAreaName() { + return this.areaName; + } + + public void setAreaName(String areaName) { + this.areaName = areaName; + } + + public String getDeviceId() { + return this.deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public String getDeviceCode() { + return this.deviceCode; + } + + public void setDeviceCode(String deviceCode) { + this.deviceCode = deviceCode; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/form/AcsElevatorRecordAddForm.java b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/form/AcsElevatorRecordAddForm.java new file mode 100644 index 00000000..5e69693f --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/form/AcsElevatorRecordAddForm.java @@ -0,0 +1,176 @@ +package cn.cloudwalk.elevator.handler.device.form; + +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceResult; +import java.io.Serializable; +import javax.validation.constraints.NotNull; +import org.hibernate.validator.constraints.NotEmpty; + +public class AcsElevatorRecordAddForm implements Serializable { + @NotEmpty(message = "76260310") + private String businessId; + @NotEmpty(message = "76260314") + private String deviceCode; + private String deviceName; + @NotEmpty(message = "76260319") + private String openDoorType; + private String faceImagePath; + private String panoramaImagePath; + @NotNull(message = "76260320") + private Integer recordResult; + private String recognitionNo; + @NotNull(message = "76260301") + private Long recognitionTime; + private String logId; + private String recognitionFaceId; + private DeviceResult deviceResult; + private String srcFloor; + private String destFloor; + private String dispatchElevatorNo; + private Long dispatchElevatorTime; + private String operateName; + private String token; + + public String getOperateName() { + return this.operateName; + } + + public void setOperateName(String operateName) { + this.operateName = operateName; + } + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getDeviceCode() { + return this.deviceCode; + } + + public void setDeviceCode(String deviceCode) { + this.deviceCode = deviceCode; + } + + public String getDeviceName() { + return this.deviceName; + } + + public void setDeviceName(String deviceName) { + this.deviceName = deviceName; + } + + public String getOpenDoorType() { + return this.openDoorType; + } + + public void setOpenDoorType(String openDoorType) { + this.openDoorType = openDoorType; + } + + public String getFaceImagePath() { + return this.faceImagePath; + } + + public void setFaceImagePath(String faceImagePath) { + this.faceImagePath = faceImagePath; + } + + public String getPanoramaImagePath() { + return this.panoramaImagePath; + } + + public void setPanoramaImagePath(String panoramaImagePath) { + this.panoramaImagePath = panoramaImagePath; + } + + public Integer getRecordResult() { + return this.recordResult; + } + + public void setRecordResult(Integer recordResult) { + this.recordResult = recordResult; + } + + public String getRecognitionNo() { + return this.recognitionNo; + } + + public void setRecognitionNo(String recognitionNo) { + this.recognitionNo = recognitionNo; + } + + public Long getRecognitionTime() { + return this.recognitionTime; + } + + public void setRecognitionTime(Long recognitionTime) { + this.recognitionTime = recognitionTime; + } + + public String getLogId() { + return this.logId; + } + + public void setLogId(String logId) { + this.logId = logId; + } + + public String getRecognitionFaceId() { + return this.recognitionFaceId; + } + + public void setRecognitionFaceId(String recognitionFaceId) { + this.recognitionFaceId = recognitionFaceId; + } + + public DeviceResult getDeviceResult() { + return this.deviceResult; + } + + public void setDeviceResult(DeviceResult deviceResult) { + this.deviceResult = deviceResult; + } + + public String getSrcFloor() { + return this.srcFloor; + } + + public void setSrcFloor(String srcFloor) { + this.srcFloor = srcFloor; + } + + public String getDestFloor() { + return this.destFloor; + } + + public void setDestFloor(String destFloor) { + this.destFloor = destFloor; + } + + public String getDispatchElevatorNo() { + return this.dispatchElevatorNo; + } + + public void setDispatchElevatorNo(String dispatchElevatorNo) { + this.dispatchElevatorNo = dispatchElevatorNo; + } + + public Long getDispatchElevatorTime() { + return this.dispatchElevatorTime; + } + + public void setDispatchElevatorTime(Long dispatchElevatorTime) { + this.dispatchElevatorTime = dispatchElevatorTime; + } + + public String getToken() { + return this.token; + } + + public void setToken(String token) { + this.token = token; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/form/AcsRestructureBindingForm.java b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/form/AcsRestructureBindingForm.java new file mode 100644 index 00000000..d0ff1f30 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/form/AcsRestructureBindingForm.java @@ -0,0 +1,129 @@ +package cn.cloudwalk.elevator.handler.device.form; + +import java.io.Serializable; +import java.util.List; + +public class AcsRestructureBindingForm implements Serializable { + private String parentId; + private String orgId; + private String orgName; + private String labelId; + private String labelName; + private String personId; + private List zoneIds; + + public void setParentId(String parentId) { + this.parentId = parentId; + } + + public void setOrgId(String orgId) { + this.orgId = orgId; + } + + public void setOrgName(String orgName) { + this.orgName = orgName; + } + + public void setLabelId(String labelId) { + this.labelId = labelId; + } + + public void setLabelName(String labelName) { + this.labelName = labelName; + } + + public void setPersonId(String personId) { + this.personId = personId; + } + + public void setZoneIds(List zoneIds) { + this.zoneIds = zoneIds; + } + + public boolean equals(Object o) { + if (o == this) + return true; + if (!(o instanceof AcsRestructureBindingForm)) + return false; + AcsRestructureBindingForm other = (AcsRestructureBindingForm)o; + if (!other.canEqual(this)) + return false; + Object this$parentId = getParentId(), other$parentId = other.getParentId(); + if ((this$parentId == null) ? (other$parentId != null) : !this$parentId.equals(other$parentId)) + return false; + Object this$orgId = getOrgId(), other$orgId = other.getOrgId(); + if ((this$orgId == null) ? (other$orgId != null) : !this$orgId.equals(other$orgId)) + return false; + Object this$orgName = getOrgName(), other$orgName = other.getOrgName(); + if ((this$orgName == null) ? (other$orgName != null) : !this$orgName.equals(other$orgName)) + return false; + Object this$labelId = getLabelId(), other$labelId = other.getLabelId(); + if ((this$labelId == null) ? (other$labelId != null) : !this$labelId.equals(other$labelId)) + return false; + Object this$labelName = getLabelName(), other$labelName = other.getLabelName(); + if ((this$labelName == null) ? (other$labelName != null) : !this$labelName.equals(other$labelName)) + return false; + Object this$personId = getPersonId(), other$personId = other.getPersonId(); + if ((this$personId == null) ? (other$personId != null) : !this$personId.equals(other$personId)) + return false; + Object this$zoneIds = (Object)getZoneIds(), other$zoneIds = (Object)other.getZoneIds(); + return !((this$zoneIds == null) ? (other$zoneIds != null) : !this$zoneIds.equals(other$zoneIds)); + } + + protected boolean canEqual(Object other) { + return other instanceof AcsRestructureBindingForm; + } + + public int hashCode() { + int PRIME = 59; + result = 1; + Object $parentId = getParentId(); + result = result * 59 + (($parentId == null) ? 43 : $parentId.hashCode()); + Object $orgId = getOrgId(); + result = result * 59 + (($orgId == null) ? 43 : $orgId.hashCode()); + Object $orgName = getOrgName(); + result = result * 59 + (($orgName == null) ? 43 : $orgName.hashCode()); + Object $labelId = getLabelId(); + result = result * 59 + (($labelId == null) ? 43 : $labelId.hashCode()); + Object $labelName = getLabelName(); + result = result * 59 + (($labelName == null) ? 43 : $labelName.hashCode()); + Object $personId = getPersonId(); + result = result * 59 + (($personId == null) ? 43 : $personId.hashCode()); + Object $zoneIds = (Object)getZoneIds(); + return result * 59 + (($zoneIds == null) ? 43 : $zoneIds.hashCode()); + } + + public String toString() { + return "AcsRestructureBindingForm(parentId=" + getParentId() + ", orgId=" + getOrgId() + ", orgName=" + + getOrgName() + ", labelId=" + getLabelId() + ", labelName=" + getLabelName() + ", personId=" + + getPersonId() + ", zoneIds=" + getZoneIds() + ")"; + } + + public String getParentId() { + return this.parentId; + } + + public String getOrgId() { + return this.orgId; + } + + public String getOrgName() { + return this.orgName; + } + + public String getLabelId() { + return this.labelId; + } + + public String getLabelName() { + return this.labelName; + } + + public String getPersonId() { + return this.personId; + } + + public List getZoneIds() { + return this.zoneIds; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/form/AcsRestructureQueryForm.java b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/form/AcsRestructureQueryForm.java new file mode 100644 index 00000000..0ecf4d7c --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/device/form/AcsRestructureQueryForm.java @@ -0,0 +1,116 @@ +package cn.cloudwalk.elevator.handler.device.form; + +import java.io.Serializable; +import java.util.List; + +public class AcsRestructureQueryForm implements Serializable { + private String orgId; + private String labelId; + private List labelIds; + private String personId; + private String zoneId; + private String businessId; + + public void setOrgId(String orgId) { + this.orgId = orgId; + } + + public void setLabelId(String labelId) { + this.labelId = labelId; + } + + public void setLabelIds(List labelIds) { + this.labelIds = labelIds; + } + + public void setPersonId(String personId) { + this.personId = personId; + } + + public void setZoneId(String zoneId) { + this.zoneId = zoneId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public boolean equals(Object o) { + if (o == this) + return true; + if (!(o instanceof AcsRestructureQueryForm)) + return false; + AcsRestructureQueryForm other = (AcsRestructureQueryForm)o; + if (!other.canEqual(this)) + return false; + Object this$orgId = getOrgId(), other$orgId = other.getOrgId(); + if ((this$orgId == null) ? (other$orgId != null) : !this$orgId.equals(other$orgId)) + return false; + Object this$labelId = getLabelId(), other$labelId = other.getLabelId(); + if ((this$labelId == null) ? (other$labelId != null) : !this$labelId.equals(other$labelId)) + return false; + Object this$labelIds = (Object)getLabelIds(), + other$labelIds = (Object)other.getLabelIds(); + if ((this$labelIds == null) ? (other$labelIds != null) : !this$labelIds.equals(other$labelIds)) + return false; + Object this$personId = getPersonId(), other$personId = other.getPersonId(); + if ((this$personId == null) ? (other$personId != null) : !this$personId.equals(other$personId)) + return false; + Object this$zoneId = getZoneId(), other$zoneId = other.getZoneId(); + if ((this$zoneId == null) ? (other$zoneId != null) : !this$zoneId.equals(other$zoneId)) + return false; + Object this$businessId = getBusinessId(), other$businessId = other.getBusinessId(); + return !((this$businessId == null) ? (other$businessId != null) : !this$businessId.equals(other$businessId)); + } + + protected boolean canEqual(Object other) { + return other instanceof AcsRestructureQueryForm; + } + + public int hashCode() { + int PRIME = 59; + result = 1; + Object $orgId = getOrgId(); + result = result * 59 + (($orgId == null) ? 43 : $orgId.hashCode()); + Object $labelId = getLabelId(); + result = result * 59 + (($labelId == null) ? 43 : $labelId.hashCode()); + Object $labelIds = (Object)getLabelIds(); + result = result * 59 + (($labelIds == null) ? 43 : $labelIds.hashCode()); + Object $personId = getPersonId(); + result = result * 59 + (($personId == null) ? 43 : $personId.hashCode()); + Object $zoneId = getZoneId(); + result = result * 59 + (($zoneId == null) ? 43 : $zoneId.hashCode()); + Object $businessId = getBusinessId(); + return result * 59 + (($businessId == null) ? 43 : $businessId.hashCode()); + } + + public String toString() { + return "AcsRestructureQueryForm(orgId=" + getOrgId() + ", labelId=" + getLabelId() + ", labelIds=" + + getLabelIds() + ", personId=" + getPersonId() + ", zoneId=" + getZoneId() + ", businessId=" + + getBusinessId() + ")"; + } + + public String getOrgId() { + return this.orgId; + } + + public String getLabelId() { + return this.labelId; + } + + public List getLabelIds() { + return this.labelIds; + } + + public String getPersonId() { + return this.personId; + } + + public String getZoneId() { + return this.zoneId; + } + + public String getBusinessId() { + return this.businessId; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/package-info.java b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/package-info.java new file mode 100644 index 00000000..e46564d1 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/handler/package-info.java @@ -0,0 +1,6 @@ +/** + * 电梯应用 Web 层:控制器、表单对象及与前端交互的入口。 + *

+ * 通过依赖 {@code cw-elevator-application-service} 调用业务服务,保持 Web 层薄、校验与编排下沉。 + */ +package cn.cloudwalk.elevator.handler; diff --git a/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/passrule/controller/AcsPassRuleController.java b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/passrule/controller/AcsPassRuleController.java new file mode 100644 index 00000000..d93069fd --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/passrule/controller/AcsPassRuleController.java @@ -0,0 +1,148 @@ +package cn.cloudwalk.elevator.passrule.controller; + +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.page.CloudwalkPageInfo; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.cloud.utils.BeanCopyUtils; +import cn.cloudwalk.elevator.common.AbstractCloudwalkController; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRuleImageResultDto; +import cn.cloudwalk.elevator.passrule.dto.AcsPassRulePersonListResultDto; +import cn.cloudwalk.elevator.passrule.form.AcsPassRuleDeleteForm; +import cn.cloudwalk.elevator.passrule.form.AcsPassRuleEditForm; +import cn.cloudwalk.elevator.passrule.form.AcsPassRuleFloorForm; +import cn.cloudwalk.elevator.passrule.form.AcsPassRuleImageForm; +import cn.cloudwalk.elevator.passrule.form.AcsPassRuleNewForm; +import cn.cloudwalk.elevator.passrule.form.AcsPassRulePersonListForm; +import cn.cloudwalk.elevator.passrule.form.AcsPassRuleQueryForm; +import cn.cloudwalk.elevator.passrule.param.AcsPassRuleDeleteParam; +import cn.cloudwalk.elevator.passrule.param.AcsPassRuleEditParam; +import cn.cloudwalk.elevator.passrule.param.AcsPassRuleFloorParam; +import cn.cloudwalk.elevator.passrule.param.AcsPassRuleImageParam; +import cn.cloudwalk.elevator.passrule.param.AcsPassRuleNewParam; +import cn.cloudwalk.elevator.passrule.param.AcsPassRulePersonListParam; +import cn.cloudwalk.elevator.passrule.param.AcsPassRuleQueryParam; +import cn.cloudwalk.elevator.passrule.result.AcsPassRuleFloorResult; +import cn.cloudwalk.elevator.passrule.result.ImageRuleRefDetailResult; +import cn.cloudwalk.elevator.passrule.result.ImageRuleRefPageResult; +import cn.cloudwalk.elevator.passrule.service.AcsPassRuleService; +import cn.cloudwalk.elevator.passrule.service.ImageRuleRefService; +import java.util.ArrayList; +import java.util.List; +import javax.annotation.Resource; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequestMapping({"/elevator/passRule"}) +public class AcsPassRuleController extends AbstractCloudwalkController { + @Resource + private AcsPassRuleService acsPassRuleService; + @Resource + private ImageRuleRefService imageRuleRefService; + + @RequestMapping({"/floor"}) + public CloudwalkResult> + listFloor(@RequestBody AcsPassRuleFloorForm form) { + AcsPassRuleFloorParam param = + (AcsPassRuleFloorParam)BeanCopyUtils.copyProperties(form, AcsPassRuleFloorParam.class); + try { + return this.imageRuleRefService.listFloor(param, getCloudwalkContext()); + } catch (ServiceException e) { + this.LOGGER.error("查询所有楼层信息失败,原因:{}", (Throwable)e); + return CloudwalkResult.fail("76260520", e.getMessage()); + } + } + + @RequestMapping({"/add"}) + public CloudwalkResult add(@RequestBody AcsPassRuleNewForm form) { + AcsPassRuleNewParam param = (AcsPassRuleNewParam)BeanCopyUtils.copyProperties(form, AcsPassRuleNewParam.class); + try { + return this.imageRuleRefService.addOnlyRule(param, getCloudwalkContext()); + } catch (ServiceException e) { + this.LOGGER.error("新增通行规则失败,原因:{}", (Throwable)e); + return CloudwalkResult.fail("76260505", e.getMessage()); + } + } + + @RequestMapping({"/edit"}) + public CloudwalkResult edit(@RequestBody AcsPassRuleEditForm form) { + AcsPassRuleEditParam param = + (AcsPassRuleEditParam)BeanCopyUtils.copyProperties(form, AcsPassRuleEditParam.class); + try { + return this.imageRuleRefService.update(param, getCloudwalkContext()); + } catch (ServiceException e) { + this.LOGGER.error("修改通行规则失败,原因:{}", (Throwable)e); + return CloudwalkResult.fail("76260506", e.getMessage()); + } + } + + @RequestMapping({"/delete"}) + public CloudwalkResult delete(@RequestBody AcsPassRuleDeleteForm form) { + AcsPassRuleDeleteParam param = + (AcsPassRuleDeleteParam)BeanCopyUtils.copyProperties(form, AcsPassRuleDeleteParam.class); + try { + return this.imageRuleRefService.delete(param, getCloudwalkContext()); + } catch (ServiceException e) { + this.LOGGER.error("删除通行规则失败,原因:{}", (Throwable)e); + return CloudwalkResult.fail("76260507", e.getMessage()); + } + } + + @RequestMapping({"/detail"}) + public CloudwalkResult detail(@RequestBody AcsPassRuleQueryForm form) { + AcsPassRuleQueryParam param = + (AcsPassRuleQueryParam)BeanCopyUtils.copyProperties(form, AcsPassRuleQueryParam.class); + try { + return this.imageRuleRefService.detail(param, getCloudwalkContext()); + } catch (ServiceException e) { + this.LOGGER.error("查询通行规则详情失败,原因:{}", (Throwable)e); + return CloudwalkResult.fail("76260508", e.getMessage()); + } + } + + @RequestMapping({"/page"}) + public CloudwalkResult> page(@RequestBody AcsPassRuleQueryForm form) { + AcsPassRuleQueryParam param = + (AcsPassRuleQueryParam)BeanCopyUtils.copyProperties(form, AcsPassRuleQueryParam.class); + try { + CloudwalkPageInfo page = new CloudwalkPageInfo(form.getPageNo().intValue(), form.getPageSize().intValue()); + return this.imageRuleRefService.page(param, page, getCloudwalkContext()); + } catch (ServiceException e) { + this.LOGGER.error("分页查询通行规则失败,原因:{}", (Throwable)e); + return CloudwalkResult.fail("76260508", e.getMessage()); + } + } + + @RequestMapping({"/image"}) + public CloudwalkResult> listByImageId(@RequestBody AcsPassRuleImageForm form) { + AcsPassRuleImageParam param = + (AcsPassRuleImageParam)BeanCopyUtils.copyProperties(form, AcsPassRuleImageParam.class); + try { + return this.imageRuleRefService.listByPersonInfo(param, getCloudwalkContext()); + } catch (ServiceException e) { + this.LOGGER.error("根据人员id、标签集合、机构集合获取楼层权限失败,原因:{}", (Throwable)e); + return CloudwalkResult.fail("76260526", e.getMessage()); + } + } + + @RequestMapping({"/image/list"}) + public CloudwalkResult> + listByPersonList(@RequestBody AcsPassRulePersonListForm form) { + AcsPassRulePersonListParam param = new AcsPassRulePersonListParam(); + List imageParam = new ArrayList<>(); + for (AcsPassRuleImageForm imageForm : form.getPersonList()) { + AcsPassRuleImageParam copyProperties = + (AcsPassRuleImageParam)BeanCopyUtils.copyProperties(imageForm, AcsPassRuleImageParam.class); + imageParam.add(copyProperties); + } + param.setPersonList(imageParam); + try { + return this.imageRuleRefService.listByPersonList(param, getCloudwalkContext()); + } catch (ServiceException e) { + this.LOGGER.error("批量获取楼层权限失败,原因:{}", (Throwable)e); + return CloudwalkResult.fail("76260526", e.getMessage()); + } + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/passrule/form/AcsPassRuleDeleteForm.java b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/passrule/form/AcsPassRuleDeleteForm.java new file mode 100644 index 00000000..ee84e654 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/passrule/form/AcsPassRuleDeleteForm.java @@ -0,0 +1,35 @@ +package cn.cloudwalk.elevator.passrule.form; + +import java.io.Serializable; +import java.util.List; + +public class AcsPassRuleDeleteForm implements Serializable { + private static final long serialVersionUID = -52051042529262978L; + private List ids; + private String zoneId; + private String parentId; + + public String getParentId() { + return this.parentId; + } + + public void setParentId(String parentId) { + this.parentId = parentId; + } + + public List getIds() { + return this.ids; + } + + public void setIds(List ids) { + this.ids = ids; + } + + public String getZoneId() { + return this.zoneId; + } + + public void setZoneId(String zoneId) { + this.zoneId = zoneId; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/passrule/form/AcsPassRuleEditForm.java b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/passrule/form/AcsPassRuleEditForm.java new file mode 100644 index 00000000..13ce261b --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/passrule/form/AcsPassRuleEditForm.java @@ -0,0 +1,107 @@ +package cn.cloudwalk.elevator.passrule.form; + +import java.io.Serializable; +import java.util.List; + +public class AcsPassRuleEditForm implements Serializable { + private static final long serialVersionUID = -27068608402591250L; + private String id; + private String parentId; + private String zoneId; + private String zoneName; + private String ruleName; + private String oldName; + private List includeOrganizations; + private List includeLabels; + private List excludeLabels; + private Long startTime; + private Long endTime; + + public String getParentId() { + return this.parentId; + } + + public void setParentId(String parentId) { + this.parentId = parentId; + } + + public String getOldName() { + return this.oldName; + } + + public void setOldName(String oldName) { + this.oldName = oldName; + } + + public String getZoneId() { + return this.zoneId; + } + + public void setZoneId(String zoneId) { + this.zoneId = zoneId; + } + + public String getZoneName() { + return this.zoneName; + } + + public void setZoneName(String zoneName) { + this.zoneName = zoneName; + } + + public String getRuleName() { + return this.ruleName; + } + + public void setRuleName(String ruleName) { + this.ruleName = ruleName; + } + + public List getIncludeOrganizations() { + return this.includeOrganizations; + } + + public void setIncludeOrganizations(List includeOrganizations) { + this.includeOrganizations = includeOrganizations; + } + + public List getIncludeLabels() { + return this.includeLabels; + } + + public void setIncludeLabels(List includeLabels) { + this.includeLabels = includeLabels; + } + + public List getExcludeLabels() { + return this.excludeLabels; + } + + public void setExcludeLabels(List excludeLabels) { + this.excludeLabels = excludeLabels; + } + + public Long getStartTime() { + return this.startTime; + } + + public void setStartTime(Long startTime) { + this.startTime = startTime; + } + + public Long getEndTime() { + return this.endTime; + } + + public void setEndTime(Long endTime) { + this.endTime = endTime; + } + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/passrule/form/AcsPassRuleFloorForm.java b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/passrule/form/AcsPassRuleFloorForm.java new file mode 100644 index 00000000..821f38b5 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/passrule/form/AcsPassRuleFloorForm.java @@ -0,0 +1,17 @@ +package cn.cloudwalk.elevator.passrule.form; + +import cn.cloudwalk.cloud.page.CloudwalkBasePageForm; +import java.io.Serializable; + +public class AcsPassRuleFloorForm extends CloudwalkBasePageForm implements Serializable { + private static final long serialVersionUID = -46113273262522744L; + private String zoneId; + + public String getZoneId() { + return this.zoneId; + } + + public void setZoneId(String zoneId) { + this.zoneId = zoneId; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/passrule/form/AcsPassRuleImageForm.java b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/passrule/form/AcsPassRuleImageForm.java new file mode 100644 index 00000000..f53a3d70 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/passrule/form/AcsPassRuleImageForm.java @@ -0,0 +1,53 @@ +package cn.cloudwalk.elevator.passrule.form; + +import java.io.Serializable; +import java.util.List; + +public class AcsPassRuleImageForm implements Serializable { + private static final long serialVersionUID = -52687427633888290L; + private List imageStoreIds; + private String businessId; + private String personId; + private List includeOrganizations; + private List includeLabels; + + public List getImageStoreIds() { + return this.imageStoreIds; + } + + public void setImageStoreIds(List imageStoreIds) { + this.imageStoreIds = imageStoreIds; + } + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getPersonId() { + return this.personId; + } + + public void setPersonId(String personId) { + this.personId = personId; + } + + public List getIncludeOrganizations() { + return this.includeOrganizations; + } + + public void setIncludeOrganizations(List includeOrganizations) { + this.includeOrganizations = includeOrganizations; + } + + public List getIncludeLabels() { + return this.includeLabels; + } + + public void setIncludeLabels(List includeLabels) { + this.includeLabels = includeLabels; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/passrule/form/AcsPassRuleNewForm.java b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/passrule/form/AcsPassRuleNewForm.java new file mode 100644 index 00000000..387ef638 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/passrule/form/AcsPassRuleNewForm.java @@ -0,0 +1,89 @@ +package cn.cloudwalk.elevator.passrule.form; + +import java.io.Serializable; +import java.util.List; + +public class AcsPassRuleNewForm implements Serializable { + private static final long serialVersionUID = -46113273262522744L; + private String parentId; + private String zoneId; + private String zoneName; + private String ruleName; + private List includeOrganizations; + private List includeLabels; + private List excludeLabels; + private Long startTime; + private Long endTime; + + public String getParentId() { + return this.parentId; + } + + public void setParentId(String parentId) { + this.parentId = parentId; + } + + public String getZoneId() { + return this.zoneId; + } + + public void setZoneId(String zoneId) { + this.zoneId = zoneId; + } + + public String getZoneName() { + return this.zoneName; + } + + public void setZoneName(String zoneName) { + this.zoneName = zoneName; + } + + public String getRuleName() { + return this.ruleName; + } + + public void setRuleName(String ruleName) { + this.ruleName = ruleName; + } + + public List getIncludeOrganizations() { + return this.includeOrganizations; + } + + public void setIncludeOrganizations(List includeOrganizations) { + this.includeOrganizations = includeOrganizations; + } + + public List getIncludeLabels() { + return this.includeLabels; + } + + public void setIncludeLabels(List includeLabels) { + this.includeLabels = includeLabels; + } + + public List getExcludeLabels() { + return this.excludeLabels; + } + + public void setExcludeLabels(List excludeLabels) { + this.excludeLabels = excludeLabels; + } + + public Long getStartTime() { + return this.startTime; + } + + public void setStartTime(Long startTime) { + this.startTime = startTime; + } + + public Long getEndTime() { + return this.endTime; + } + + public void setEndTime(Long endTime) { + this.endTime = endTime; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/passrule/form/AcsPassRulePersonListForm.java b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/passrule/form/AcsPassRulePersonListForm.java new file mode 100644 index 00000000..64f839ac --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/passrule/form/AcsPassRulePersonListForm.java @@ -0,0 +1,18 @@ +package cn.cloudwalk.elevator.passrule.form; + +import cn.cloudwalk.cloud.page.CloudwalkBasePageForm; +import java.io.Serializable; +import java.util.List; + +public class AcsPassRulePersonListForm extends CloudwalkBasePageForm implements Serializable { + private static final long serialVersionUID = -52687427633888290L; + private List personList; + + public List getPersonList() { + return this.personList; + } + + public void setPersonList(List personList) { + this.personList = personList; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/passrule/form/AcsPassRuleQueryForm.java b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/passrule/form/AcsPassRuleQueryForm.java new file mode 100644 index 00000000..f1150bb4 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/passrule/form/AcsPassRuleQueryForm.java @@ -0,0 +1,70 @@ +package cn.cloudwalk.elevator.passrule.form; + +import java.io.Serializable; + +public class AcsPassRuleQueryForm implements Serializable { + private static final long serialVersionUID = -52687427633888290L; + private String id; + private String parentId; + private String zoneId; + private String zoneName; + private Integer isDefault; + private Integer pageSize = Integer.valueOf(10); + private Integer pageNo = Integer.valueOf(1); + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public Integer getPageSize() { + return this.pageSize; + } + + public void setPageSize(Integer pageSize) { + this.pageSize = pageSize; + } + + public Integer getPageNo() { + return this.pageNo; + } + + public void setPageNo(Integer pageNo) { + this.pageNo = pageNo; + } + + public String getParentId() { + return this.parentId; + } + + public void setParentId(String parentId) { + this.parentId = parentId; + } + + public String getZoneId() { + return this.zoneId; + } + + public void setZoneId(String zoneId) { + this.zoneId = zoneId; + } + + public String getZoneName() { + return this.zoneName; + } + + public void setZoneName(String zoneName) { + this.zoneName = zoneName; + } + + public Integer getIsDefault() { + return this.isDefault; + } + + public void setIsDefault(Integer isDefault) { + this.isDefault = isDefault; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/person/controller/AcsPersonController.java b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/person/controller/AcsPersonController.java new file mode 100644 index 00000000..2691f620 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/person/controller/AcsPersonController.java @@ -0,0 +1,140 @@ +package cn.cloudwalk.elevator.person.controller; + +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.ImageStorePersonResult; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.page.CloudwalkPageInfo; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.cloud.utils.BeanCopyUtils; +import cn.cloudwalk.elevator.common.AbstractCloudwalkController; +import cn.cloudwalk.elevator.person.form.AcsPersonAddForm; +import cn.cloudwalk.elevator.person.form.AcsPersonAddVisitorForm; +import cn.cloudwalk.elevator.person.form.AcsPersonDeleteForm; +import cn.cloudwalk.elevator.person.form.AcsPersonEditForm; +import cn.cloudwalk.elevator.person.form.AcsPersonQueryForm; +import cn.cloudwalk.elevator.person.form.AcsPersonTimeDetailForm; +import cn.cloudwalk.elevator.person.form.PersonDetailQueryForm; +import cn.cloudwalk.elevator.person.param.AcsPersonAddParam; +import cn.cloudwalk.elevator.person.param.AcsPersonAddVisitorParam; +import cn.cloudwalk.elevator.person.param.AcsPersonDeleteParam; +import cn.cloudwalk.elevator.person.param.AcsPersonEditParam; +import cn.cloudwalk.elevator.person.param.AcsPersonQueryByAppParam; +import cn.cloudwalk.elevator.person.param.AcsPersonQueryParam; +import cn.cloudwalk.elevator.person.param.AcsPersonTimeDetailParam; +import cn.cloudwalk.elevator.person.param.PersonDetailQueryParam; +import cn.cloudwalk.elevator.person.result.AcsPersonResult; +import cn.cloudwalk.elevator.person.result.AcsPersonTimeDetailResult; +import cn.cloudwalk.elevator.person.service.AcsPersonService; +import cn.cloudwalk.elevator.person.service.PersonRuleService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequestMapping({"/elevator/person"}) +public class AcsPersonController extends AbstractCloudwalkController { + @Autowired + private AcsPersonService acsPersonService; + @Autowired + private PersonRuleService personRuleService; + + @RequestMapping({"/add"}) + public CloudwalkResult add(@RequestBody AcsPersonAddForm form) { + AcsPersonAddParam param = (AcsPersonAddParam)BeanCopyUtils.copyProperties(form, AcsPersonAddParam.class); + try { + return this.personRuleService.add(param, getCloudwalkContext()); + } catch (ServiceException e) { + this.LOGGER.error("从现有人员添加通行人员失败,原因:", (Throwable)e); + return CloudwalkResult.fail("76260521", e.getMessage()); + } + } + + @RequestMapping({"/add/visitor"}) + public CloudwalkResult addVisitor(@RequestBody AcsPersonAddVisitorForm form) { + AcsPersonAddVisitorParam param = + (AcsPersonAddVisitorParam)BeanCopyUtils.copyProperties(form, AcsPersonAddVisitorParam.class); + try { + return this.personRuleService.addVisitor(param, getCloudwalkContext()); + } catch (ServiceException e) { + this.LOGGER.error("根据被访人添加访客派梯权限失败,原因:", (Throwable)e); + return CloudwalkResult.fail("76260521", e.getMessage()); + } + } + + @RequestMapping({"/edit"}) + public CloudwalkResult edit(@RequestBody AcsPersonEditForm form) { + AcsPersonEditParam param = (AcsPersonEditParam)BeanCopyUtils.copyProperties(form, AcsPersonEditParam.class); + try { + return this.acsPersonService.edit(param, getCloudwalkContext()); + } catch (ServiceException e) { + this.LOGGER.error("编辑通行人员信息失败,原因:", (Throwable)e); + return CloudwalkResult.fail("76260522", e.getMessage()); + } + } + + @RequestMapping({"/delete"}) + public CloudwalkResult delete(@RequestBody AcsPersonDeleteForm form) { + AcsPersonDeleteParam param = + (AcsPersonDeleteParam)BeanCopyUtils.copyProperties(form, AcsPersonDeleteParam.class); + try { + return this.personRuleService.delete(param, getCloudwalkContext()); + } catch (ServiceException e) { + this.LOGGER.error("删除通行人员失败,原因:", (Throwable)e); + return CloudwalkResult.fail("76260523", e.getMessage()); + } + } + + @RequestMapping({"/page"}) + public CloudwalkResult> page(@RequestBody AcsPersonQueryForm form) { + try { + CloudwalkPageInfo pageInfo = + new CloudwalkPageInfo(form.getPageNo().intValue(), form.getPageSize().intValue()); + AcsPersonQueryParam param = + (AcsPersonQueryParam)BeanCopyUtils.copyProperties(form, AcsPersonQueryParam.class); + return this.personRuleService.page(param, pageInfo, getCloudwalkContext()); + } catch (ServiceException e) { + this.LOGGER.error("分页查询通行人员失败,原因:", (Throwable)e); + return CloudwalkResult.fail("76260410", e.getMessage()); + } + } + + @RequestMapping({"/timeDetail"}) + public CloudwalkResult timeDetail(@RequestBody AcsPersonTimeDetailForm form) { + try { + AcsPersonTimeDetailParam param = + (AcsPersonTimeDetailParam)BeanCopyUtils.copyProperties(form, AcsPersonTimeDetailParam.class); + return this.acsPersonService.timeDetail(param, getCloudwalkContext()); + } catch (ServiceException e) { + this.LOGGER.error("查询通行人员时间详情失败,原因:", (Throwable)e); + return CloudwalkResult.fail("76260416", e.getMessage()); + } + } + + @RequestMapping({"/pageByApp"}) + public CloudwalkResult> pageByApp(@RequestBody AcsPersonQueryForm form) { + try { + CloudwalkPageInfo pageInfo = + new CloudwalkPageInfo(form.getPageNo().intValue(), form.getPageSize().intValue()); + AcsPersonQueryByAppParam param = + (AcsPersonQueryByAppParam)BeanCopyUtils.copyProperties(form, AcsPersonQueryByAppParam.class); + return this.acsPersonService.pageByApp(param, pageInfo, getCloudwalkContext()); + } catch (ServiceException e) { + this.LOGGER.error("分页查询应用通行人员失败,原因:", (Throwable)e); + return CloudwalkResult.fail("76260417", e.getMessage()); + } + } + + @RequestMapping({"/detail"}) + public CloudwalkResult> + personDetail(@RequestBody PersonDetailQueryForm form) { + try { + PersonDetailQueryParam param = + (PersonDetailQueryParam)BeanCopyUtils.copyProperties(form, PersonDetailQueryParam.class); + return this.personRuleService.personDetail(param, getCloudwalkContext()); + } catch (ServiceException e) { + this.LOGGER.error("分页查询规则里通行人员失败,原因:", (Throwable)e); + return CloudwalkResult.fail("76260410", e.getMessage()); + } + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/person/form/AcsPersonAddForm.java b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/person/form/AcsPersonAddForm.java new file mode 100644 index 00000000..e26912c1 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/person/form/AcsPersonAddForm.java @@ -0,0 +1,53 @@ +package cn.cloudwalk.elevator.person.form; + +import java.io.Serializable; +import java.util.List; + +public class AcsPersonAddForm implements Serializable { + private static final long serialVersionUID = 7916140658162290825L; + private String parentId; + private String zoneId; + private List personIds; + private Long startTime; + private Long endTime; + + public String getParentId() { + return this.parentId; + } + + public void setParentId(String parentId) { + this.parentId = parentId; + } + + public String getZoneId() { + return this.zoneId; + } + + public void setZoneId(String zoneId) { + this.zoneId = zoneId; + } + + public List getPersonIds() { + return this.personIds; + } + + public void setPersonIds(List personIds) { + this.personIds = personIds; + } + + public Long getStartTime() { + return this.startTime; + } + + public void setStartTime(Long startTime) { + this.startTime = startTime; + } + + public Long getEndTime() { + return this.endTime; + } + + public void setEndTime(Long endTime) { + this.endTime = endTime; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/person/form/AcsPersonAddNewForm.java b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/person/form/AcsPersonAddNewForm.java new file mode 100644 index 00000000..66029e38 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/person/form/AcsPersonAddNewForm.java @@ -0,0 +1,44 @@ +package cn.cloudwalk.elevator.person.form; + +import cn.cloudwalk.elevator.person.param.AcsPersonPropertiesParam; +import java.io.Serializable; + +public class AcsPersonAddNewForm implements Serializable { + private static final long serialVersionUID = -5310626681307061439L; + private String zoneId; + private Long startTime; + private Long endTime; + private AcsPersonPropertiesParam personProperties; + + public String getZoneId() { + return this.zoneId; + } + + public void setZoneId(String zoneId) { + this.zoneId = zoneId; + } + + public Long getStartTime() { + return this.startTime; + } + + public void setStartTime(Long startTime) { + this.startTime = startTime; + } + + public Long getEndTime() { + return this.endTime; + } + + public void setEndTime(Long endTime) { + this.endTime = endTime; + } + + public AcsPersonPropertiesParam getPersonProperties() { + return this.personProperties; + } + + public void setPersonProperties(AcsPersonPropertiesParam personProperties) { + this.personProperties = personProperties; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/person/form/AcsPersonAddVisitorForm.java b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/person/form/AcsPersonAddVisitorForm.java new file mode 100644 index 00000000..93ec74b0 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/person/form/AcsPersonAddVisitorForm.java @@ -0,0 +1,105 @@ +package cn.cloudwalk.elevator.person.form; + +import java.io.Serializable; +import java.util.List; + +public class AcsPersonAddVisitorForm implements Serializable { + private static final long serialVersionUID = 7916140658162290825L; + private String visitorId; + private String personId; + private Long begVisitorTime; + private Long endVisitorTime; + private List floorIds; + + public void setVisitorId(String visitorId) { + this.visitorId = visitorId; + } + + public void setPersonId(String personId) { + this.personId = personId; + } + + public void setBegVisitorTime(Long begVisitorTime) { + this.begVisitorTime = begVisitorTime; + } + + public void setEndVisitorTime(Long endVisitorTime) { + this.endVisitorTime = endVisitorTime; + } + + public void setFloorIds(List floorIds) { + this.floorIds = floorIds; + } + + public boolean equals(Object o) { + if (o == this) + return true; + if (!(o instanceof AcsPersonAddVisitorForm)) + return false; + AcsPersonAddVisitorForm other = (AcsPersonAddVisitorForm)o; + if (!other.canEqual(this)) + return false; + Object this$visitorId = getVisitorId(), other$visitorId = other.getVisitorId(); + if ((this$visitorId == null) ? (other$visitorId != null) : !this$visitorId.equals(other$visitorId)) + return false; + Object this$personId = getPersonId(), other$personId = other.getPersonId(); + if ((this$personId == null) ? (other$personId != null) : !this$personId.equals(other$personId)) + return false; + Object this$begVisitorTime = getBegVisitorTime(), other$begVisitorTime = other.getBegVisitorTime(); + if ((this$begVisitorTime == null) ? (other$begVisitorTime != null) + : !this$begVisitorTime.equals(other$begVisitorTime)) + return false; + Object this$endVisitorTime = getEndVisitorTime(), other$endVisitorTime = other.getEndVisitorTime(); + if ((this$endVisitorTime == null) ? (other$endVisitorTime != null) + : !this$endVisitorTime.equals(other$endVisitorTime)) + return false; + Object this$floorIds = (Object)getFloorIds(), + other$floorIds = (Object)other.getFloorIds(); + return !((this$floorIds == null) ? (other$floorIds != null) : !this$floorIds.equals(other$floorIds)); + } + + protected boolean canEqual(Object other) { + return other instanceof AcsPersonAddVisitorForm; + } + + public int hashCode() { + int PRIME = 59; + result = 1; + Object $visitorId = getVisitorId(); + result = result * 59 + (($visitorId == null) ? 43 : $visitorId.hashCode()); + Object $personId = getPersonId(); + result = result * 59 + (($personId == null) ? 43 : $personId.hashCode()); + Object $begVisitorTime = getBegVisitorTime(); + result = result * 59 + (($begVisitorTime == null) ? 43 : $begVisitorTime.hashCode()); + Object $endVisitorTime = getEndVisitorTime(); + result = result * 59 + (($endVisitorTime == null) ? 43 : $endVisitorTime.hashCode()); + Object $floorIds = (Object)getFloorIds(); + return result * 59 + (($floorIds == null) ? 43 : $floorIds.hashCode()); + } + + public String toString() { + return "AcsPersonAddVisitorForm(visitorId=" + getVisitorId() + ", personId=" + getPersonId() + + ", begVisitorTime=" + getBegVisitorTime() + ", endVisitorTime=" + getEndVisitorTime() + ", floorIds=" + + getFloorIds() + ")"; + } + + public String getVisitorId() { + return this.visitorId; + } + + public String getPersonId() { + return this.personId; + } + + public Long getBegVisitorTime() { + return this.begVisitorTime; + } + + public Long getEndVisitorTime() { + return this.endVisitorTime; + } + + public List getFloorIds() { + return this.floorIds; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/person/form/AcsPersonDeleteForm.java b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/person/form/AcsPersonDeleteForm.java new file mode 100644 index 00000000..9535dd5d --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/person/form/AcsPersonDeleteForm.java @@ -0,0 +1,53 @@ +package cn.cloudwalk.elevator.person.form; + +import java.io.Serializable; +import java.util.List; + +public class AcsPersonDeleteForm implements Serializable { + private static final long serialVersionUID = 7916140658162290825L; + private String parentId; + private String zoneId; + private List personIds; + private String imageStoreId; + private String personId; + + public String getPersonId() { + return this.personId; + } + + public void setPersonId(String personId) { + this.personId = personId; + } + + public String getParentId() { + return this.parentId; + } + + public void setParentId(String parentId) { + this.parentId = parentId; + } + + public String getZoneId() { + return this.zoneId; + } + + public void setZoneId(String zoneId) { + this.zoneId = zoneId; + } + + public List getPersonIds() { + return this.personIds; + } + + public void setPersonIds(List personIds) { + this.personIds = personIds; + } + + public String getImageStoreId() { + return this.imageStoreId; + } + + public void setImageStoreId(String imageStoreId) { + this.imageStoreId = imageStoreId; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/person/form/AcsPersonDetailForm.java b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/person/form/AcsPersonDetailForm.java new file mode 100644 index 00000000..c3de2e2e --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/person/form/AcsPersonDetailForm.java @@ -0,0 +1,25 @@ +package cn.cloudwalk.elevator.person.form; + +import java.io.Serializable; + +public class AcsPersonDetailForm implements Serializable { + private static final long serialVersionUID = 1211300452037642058L; + private String zoneId; + private String personId; + + public String getZoneId() { + return this.zoneId; + } + + public void setZoneId(String zoneId) { + this.zoneId = zoneId; + } + + public String getPersonId() { + return this.personId; + } + + public void setPersonId(String personId) { + this.personId = personId; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/person/form/AcsPersonEditForm.java b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/person/form/AcsPersonEditForm.java new file mode 100644 index 00000000..61695f3c --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/person/form/AcsPersonEditForm.java @@ -0,0 +1,52 @@ +package cn.cloudwalk.elevator.person.form; + +import java.io.Serializable; + +public class AcsPersonEditForm implements Serializable { + private static final long serialVersionUID = 7916140658162290825L; + private String zoneId; + private String personId; + private Long startTime; + private Long endTime; + private String imageStoreId; + + public String getZoneId() { + return this.zoneId; + } + + public void setZoneId(String zoneId) { + this.zoneId = zoneId; + } + + public Long getStartTime() { + return this.startTime; + } + + public void setStartTime(Long startTime) { + this.startTime = startTime; + } + + public Long getEndTime() { + return this.endTime; + } + + public void setEndTime(Long endTime) { + this.endTime = endTime; + } + + public String getPersonId() { + return this.personId; + } + + public void setPersonId(String personId) { + this.personId = personId; + } + + public String getImageStoreId() { + return this.imageStoreId; + } + + public void setImageStoreId(String imageStoreId) { + this.imageStoreId = imageStoreId; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/person/form/AcsPersonFaceForm.java b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/person/form/AcsPersonFaceForm.java new file mode 100644 index 00000000..1683ed0e --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/person/form/AcsPersonFaceForm.java @@ -0,0 +1,25 @@ +package cn.cloudwalk.elevator.person.form; + +import java.io.Serializable; + +public class AcsPersonFaceForm implements Serializable { + private static final long serialVersionUID = 7916140658162290825L; + private String deviceId; + private String faceImage; + + public String getDeviceId() { + return this.deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public String getFaceImage() { + return this.faceImage; + } + + public void setFaceImage(String faceImage) { + this.faceImage = faceImage; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/person/form/AcsPersonQueryForm.java b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/person/form/AcsPersonQueryForm.java new file mode 100644 index 00000000..9950b3ab --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/person/form/AcsPersonQueryForm.java @@ -0,0 +1,135 @@ +package cn.cloudwalk.elevator.person.form; + +import java.io.Serializable; +import java.util.List; + +public class AcsPersonQueryForm implements Serializable { + private static final long serialVersionUID = -8830219133147503297L; + private String parentId; + private String zoneId; + private String personName; + private List organizationIds; + private List labelIds; + + public void setParentId(String parentId) { + this.parentId = parentId; + } + + public void setZoneId(String zoneId) { + this.zoneId = zoneId; + } + + public void setPersonName(String personName) { + this.personName = personName; + } + + public void setOrganizationIds(List organizationIds) { + this.organizationIds = organizationIds; + } + + public void setLabelIds(List labelIds) { + this.labelIds = labelIds; + } + + public void setPageSize(Integer pageSize) { + this.pageSize = pageSize; + } + + public void setPageNo(Integer pageNo) { + this.pageNo = pageNo; + } + + public boolean equals(Object o) { + if (o == this) + return true; + if (!(o instanceof AcsPersonQueryForm)) + return false; + AcsPersonQueryForm other = (AcsPersonQueryForm)o; + if (!other.canEqual(this)) + return false; + Object this$parentId = getParentId(), other$parentId = other.getParentId(); + if ((this$parentId == null) ? (other$parentId != null) : !this$parentId.equals(other$parentId)) + return false; + Object this$zoneId = getZoneId(), other$zoneId = other.getZoneId(); + if ((this$zoneId == null) ? (other$zoneId != null) : !this$zoneId.equals(other$zoneId)) + return false; + Object this$personName = getPersonName(), other$personName = other.getPersonName(); + if ((this$personName == null) ? (other$personName != null) : !this$personName.equals(other$personName)) + return false; + Object this$organizationIds = (Object)getOrganizationIds(), + other$organizationIds = (Object)other.getOrganizationIds(); + if ((this$organizationIds == null) ? (other$organizationIds != null) + : !this$organizationIds.equals(other$organizationIds)) + return false; + Object this$labelIds = (Object)getLabelIds(), + other$labelIds = (Object)other.getLabelIds(); + if ((this$labelIds == null) ? (other$labelIds != null) : !this$labelIds.equals(other$labelIds)) + return false; + Object this$pageSize = getPageSize(), other$pageSize = other.getPageSize(); + if ((this$pageSize == null) ? (other$pageSize != null) : !this$pageSize.equals(other$pageSize)) + return false; + Object this$pageNo = getPageNo(), other$pageNo = other.getPageNo(); + return !((this$pageNo == null) ? (other$pageNo != null) : !this$pageNo.equals(other$pageNo)); + } + + protected boolean canEqual(Object other) { + return other instanceof AcsPersonQueryForm; + } + + public int hashCode() { + int PRIME = 59; + result = 1; + Object $parentId = getParentId(); + result = result * 59 + (($parentId == null) ? 43 : $parentId.hashCode()); + Object $zoneId = getZoneId(); + result = result * 59 + (($zoneId == null) ? 43 : $zoneId.hashCode()); + Object $personName = getPersonName(); + result = result * 59 + (($personName == null) ? 43 : $personName.hashCode()); + Object $organizationIds = (Object)getOrganizationIds(); + result = result * 59 + (($organizationIds == null) ? 43 : $organizationIds.hashCode()); + Object $labelIds = (Object)getLabelIds(); + result = result * 59 + (($labelIds == null) ? 43 : $labelIds.hashCode()); + Object $pageSize = getPageSize(); + result = result * 59 + (($pageSize == null) ? 43 : $pageSize.hashCode()); + Object $pageNo = getPageNo(); + return result * 59 + (($pageNo == null) ? 43 : $pageNo.hashCode()); + } + + public String toString() { + return "AcsPersonQueryForm(parentId=" + getParentId() + ", zoneId=" + getZoneId() + ", personName=" + + getPersonName() + ", organizationIds=" + getOrganizationIds() + ", labelIds=" + getLabelIds() + + ", pageSize=" + getPageSize() + ", pageNo=" + getPageNo() + ")"; + } + + public String getParentId() { + return this.parentId; + } + + public String getZoneId() { + return this.zoneId; + } + + public String getPersonName() { + return this.personName; + } + + public List getOrganizationIds() { + return this.organizationIds; + } + + public List getLabelIds() { + return this.labelIds; + } + + private Integer pageSize = Integer.valueOf(10); + + public Integer getPageSize() { + return this.pageSize; + } + + private Integer pageNo = Integer.valueOf(1); + + public Integer getPageNo() { + return this.pageNo; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/person/form/AcsPersonTimeDetailForm.java b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/person/form/AcsPersonTimeDetailForm.java new file mode 100644 index 00000000..491f170d --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/person/form/AcsPersonTimeDetailForm.java @@ -0,0 +1,25 @@ +package cn.cloudwalk.elevator.person.form; + +import java.io.Serializable; + +public class AcsPersonTimeDetailForm implements Serializable { + private static final long serialVersionUID = -1135110893682603631L; + private String imageStoreId; + private String personId; + + public String getImageStoreId() { + return this.imageStoreId; + } + + public void setImageStoreId(String imageStoreId) { + this.imageStoreId = imageStoreId; + } + + public String getPersonId() { + return this.personId; + } + + public void setPersonId(String personId) { + this.personId = personId; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/person/form/PersonDetailQueryForm.java b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/person/form/PersonDetailQueryForm.java new file mode 100644 index 00000000..eb8be386 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/person/form/PersonDetailQueryForm.java @@ -0,0 +1,87 @@ +package cn.cloudwalk.elevator.person.form; + +import cn.cloudwalk.cloud.page.CloudwalkBasePageForm; +import java.io.Serializable; + +public class PersonDetailQueryForm extends CloudwalkBasePageForm implements Serializable { + private static final long serialVersionUID = -8830219133147503297L; + private String parentId; + private String zoneId; + private String ruleId; + private String personName; + + public void setParentId(String parentId) { + this.parentId = parentId; + } + + public void setZoneId(String zoneId) { + this.zoneId = zoneId; + } + + public void setRuleId(String ruleId) { + this.ruleId = ruleId; + } + + public void setPersonName(String personName) { + this.personName = personName; + } + + public boolean equals(Object o) { + if (o == this) + return true; + if (!(o instanceof PersonDetailQueryForm)) + return false; + PersonDetailQueryForm other = (PersonDetailQueryForm)o; + if (!other.canEqual(this)) + return false; + Object this$parentId = getParentId(), other$parentId = other.getParentId(); + if ((this$parentId == null) ? (other$parentId != null) : !this$parentId.equals(other$parentId)) + return false; + Object this$zoneId = getZoneId(), other$zoneId = other.getZoneId(); + if ((this$zoneId == null) ? (other$zoneId != null) : !this$zoneId.equals(other$zoneId)) + return false; + Object this$ruleId = getRuleId(), other$ruleId = other.getRuleId(); + if ((this$ruleId == null) ? (other$ruleId != null) : !this$ruleId.equals(other$ruleId)) + return false; + Object this$personName = getPersonName(), other$personName = other.getPersonName(); + return !((this$personName == null) ? (other$personName != null) : !this$personName.equals(other$personName)); + } + + protected boolean canEqual(Object other) { + return other instanceof PersonDetailQueryForm; + } + + public int hashCode() { + int PRIME = 59; + result = 1; + Object $parentId = getParentId(); + result = result * 59 + (($parentId == null) ? 43 : $parentId.hashCode()); + Object $zoneId = getZoneId(); + result = result * 59 + (($zoneId == null) ? 43 : $zoneId.hashCode()); + Object $ruleId = getRuleId(); + result = result * 59 + (($ruleId == null) ? 43 : $ruleId.hashCode()); + Object $personName = getPersonName(); + return result * 59 + (($personName == null) ? 43 : $personName.hashCode()); + } + + public String toString() { + return "PersonDetailQueryForm(parentId=" + getParentId() + ", zoneId=" + getZoneId() + ", ruleId=" + getRuleId() + + ", personName=" + getPersonName() + ")"; + } + + public String getParentId() { + return this.parentId; + } + + public String getZoneId() { + return this.zoneId; + } + + public String getRuleId() { + return this.ruleId; + } + + public String getPersonName() { + return this.personName; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/record/controller/AcsElevatorRecordController.java b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/record/controller/AcsElevatorRecordController.java new file mode 100644 index 00000000..479fb998 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/record/controller/AcsElevatorRecordController.java @@ -0,0 +1,110 @@ +package cn.cloudwalk.elevator.record.controller; + +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.service.DeviceService; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.page.CloudwalkPageInfo; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.cloud.utils.BeanCopyUtils; +import cn.cloudwalk.elevator.common.AbstractCloudwalkController; +import cn.cloudwalk.elevator.record.form.AcsElevatorRecordAnalyseCountForm; +import cn.cloudwalk.elevator.record.form.AcsElevatorRecordAnalyseCycleForm; +import cn.cloudwalk.elevator.record.form.AcsElevatorRecordQueryForm; +import cn.cloudwalk.elevator.record.param.AcsElevatorRecordAnalyseCountParam; +import cn.cloudwalk.elevator.record.param.AcsElevatorRecordAnalyseCycleParam; +import cn.cloudwalk.elevator.record.param.AcsElevatorRecordDetailParam; +import cn.cloudwalk.elevator.record.result.AcsElevatorAnalyseCycleResult; +import cn.cloudwalk.elevator.record.result.AcsElevatorPageRequestInfoResult; +import cn.cloudwalk.elevator.record.result.AcsElevatorRecordResult; +import cn.cloudwalk.elevator.record.service.AcsElevatorRecordService; +import cn.cloudwalk.elevator.zone.param.ZoneNextTreeParam; +import cn.cloudwalk.elevator.zone.result.ZoneTreeResult; +import cn.cloudwalk.elevator.zone.service.ZoneService; +import java.util.List; +import javax.annotation.Resource; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequestMapping({"/intelligent/acs/elevator/record"}) +public class AcsElevatorRecordController extends AbstractCloudwalkController { + @Resource + private AcsElevatorRecordService elevatorRecordService; + @Resource + private DeviceService deviceService; + @Resource + private ZoneService zoneService; + + @PostMapping({"/page"}) + public CloudwalkResult> + detail(@RequestBody AcsElevatorRecordQueryForm form) { + AcsElevatorRecordDetailParam param = + (AcsElevatorRecordDetailParam)BeanCopyUtils.copyProperties(form, AcsElevatorRecordDetailParam.class); + CloudwalkPageInfo pageInfo = new CloudwalkPageInfo(form.getCurrentPage(), form.getRowsOfPage()); + try { + return this.elevatorRecordService.openRecord(param, pageInfo, getCloudwalkContext()); + } catch (ServiceException e) { + this.LOGGER.error("开门记录详情查询失败,原因:", (Throwable)e); + return CloudwalkResult.fail("76260305", getMessage("76260305")); + } + } + + @PostMapping({"/analyse/cycle"}) + public CloudwalkResult> + analyseCycle(@RequestBody AcsElevatorRecordAnalyseCycleForm form) { + AcsElevatorRecordAnalyseCycleParam param = (AcsElevatorRecordAnalyseCycleParam)BeanCopyUtils + .copyProperties(form, AcsElevatorRecordAnalyseCycleParam.class); + try { + return this.elevatorRecordService.analyseCycle(param, getCloudwalkContext()); + } catch (ServiceException e) { + this.LOGGER.error("开门记录统计分析查询失败,原因:", (Throwable)e); + return CloudwalkResult.fail("76260336", getMessage("76260336")); + } + } + + @PostMapping({"/analyse/count"}) + public CloudwalkResult analyseCount(@RequestBody AcsElevatorRecordAnalyseCountForm form) { + AcsElevatorRecordAnalyseCountParam param = (AcsElevatorRecordAnalyseCountParam)BeanCopyUtils + .copyProperties(form, AcsElevatorRecordAnalyseCountParam.class); + try { + return this.elevatorRecordService.analyseCount(param, getCloudwalkContext()); + } catch (ServiceException e) { + this.LOGGER.error("开门记录统计分析查询失败,原因:", (Throwable)e); + return CloudwalkResult.fail("76260336", getMessage("76260336")); + } + } + + @PostMapping({"/page/request"}) + public CloudwalkResult pageInfo() { + try { + return this.elevatorRecordService.pageInfo(getCloudwalkContext()); + } catch (ServiceException e) { + this.LOGGER.error("开门记录分页请求数据查询失败,原因:", (Throwable)e); + return CloudwalkResult.fail("76260335", getMessage("76260335")); + } + } + + @PostMapping({"/device/list"}) + public CloudwalkResult> queryDeviceResult(@RequestBody DeviceQueryParam deviceQueryParam) { + try { + return this.deviceService.list(deviceQueryParam, getCloudwalkContext()); + } catch (Exception e) { + this.LOGGER.error("获取设备列表失败,原因:", e); + return CloudwalkResult.fail("76260108", getMessage("76260108")); + } + } + + @PostMapping({"/zone/tree"}) + public CloudwalkResult> queryZoneTree(@RequestBody ZoneNextTreeParam zoneNextTreeParam) { + try { + return this.zoneService.tree(zoneNextTreeParam, getCloudwalkContext()); + } catch (Exception e) { + this.LOGGER.error("获取设备列表失败,原因:", e); + return CloudwalkResult.fail("76260108", getMessage("76260108")); + } + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/record/form/AcsElevatorRecordAnalyseCountForm.java b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/record/form/AcsElevatorRecordAnalyseCountForm.java new file mode 100644 index 00000000..a0a2be93 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/record/form/AcsElevatorRecordAnalyseCountForm.java @@ -0,0 +1,33 @@ +package cn.cloudwalk.elevator.record.form; + +import java.io.Serializable; + +public class AcsElevatorRecordAnalyseCountForm implements Serializable { + private String businessId; + private Long startTime; + private Long endTime; + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public Long getStartTime() { + return this.startTime; + } + + public void setStartTime(Long startTime) { + this.startTime = startTime; + } + + public Long getEndTime() { + return this.endTime; + } + + public void setEndTime(Long endTime) { + this.endTime = endTime; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/record/form/AcsElevatorRecordAnalyseCycleForm.java b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/record/form/AcsElevatorRecordAnalyseCycleForm.java new file mode 100644 index 00000000..1839f752 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/record/form/AcsElevatorRecordAnalyseCycleForm.java @@ -0,0 +1,24 @@ +package cn.cloudwalk.elevator.record.form; + +import java.io.Serializable; + +public class AcsElevatorRecordAnalyseCycleForm implements Serializable { + private String businessId; + private Integer timeType; + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public Integer getTimeType() { + return this.timeType; + } + + public void setTimeType(Integer timeType) { + this.timeType = timeType; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/record/form/AcsElevatorRecordQueryForm.java b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/record/form/AcsElevatorRecordQueryForm.java new file mode 100644 index 00000000..946fee1e --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-web/src/main/java/cn/cloudwalk/elevator/record/form/AcsElevatorRecordQueryForm.java @@ -0,0 +1,137 @@ +package cn.cloudwalk.elevator.record.form; + +import cn.cloudwalk.cloud.page.CloudwalkBasePageForm; +import java.io.Serializable; +import java.util.List; +import javax.validation.constraints.NotNull; + +public class AcsElevatorRecordQueryForm extends CloudwalkBasePageForm implements Serializable { + @NotNull(message = "76260302") + private Long startTime; + @NotNull(message = "76260303") + private Long endTime; + private String personName; + private String personId; + private List districtIds; + private List areaIds; + private List deviceIds; + private String openDoorTypeCode; + private Integer recordResult; + private String srcFloor; + private String destFloor; + private String dispatchElevatorNo; + private String personCode; + private String orgId; + + public String getPersonCode() { + return this.personCode; + } + + public void setPersonCode(String personCode) { + this.personCode = personCode; + } + + public String getOrgId() { + return this.orgId; + } + + public void setOrgId(String orgId) { + this.orgId = orgId; + } + + public Long getStartTime() { + return this.startTime; + } + + public void setStartTime(Long startTime) { + this.startTime = startTime; + } + + public Long getEndTime() { + return this.endTime; + } + + public void setEndTime(Long endTime) { + this.endTime = endTime; + } + + public String getPersonName() { + return this.personName; + } + + public void setPersonName(String personName) { + this.personName = personName; + } + + public List getDistrictIds() { + return this.districtIds; + } + + public void setDistrictIds(List districtIds) { + this.districtIds = districtIds; + } + + public List getAreaIds() { + return this.areaIds; + } + + public void setAreaIds(List areaIds) { + this.areaIds = areaIds; + } + + public List getDeviceIds() { + return this.deviceIds; + } + + public void setDeviceIds(List deviceIds) { + this.deviceIds = deviceIds; + } + + public String getOpenDoorTypeCode() { + return this.openDoorTypeCode; + } + + public void setOpenDoorTypeCode(String openDoorTypeCode) { + this.openDoorTypeCode = openDoorTypeCode; + } + + public Integer getRecordResult() { + return this.recordResult; + } + + public void setRecordResult(Integer recordResult) { + this.recordResult = recordResult; + } + + public String getSrcFloor() { + return this.srcFloor; + } + + public void setSrcFloor(String srcFloor) { + this.srcFloor = srcFloor; + } + + public String getDestFloor() { + return this.destFloor; + } + + public void setDestFloor(String destFloor) { + this.destFloor = destFloor; + } + + public String getDispatchElevatorNo() { + return this.dispatchElevatorNo; + } + + public void setDispatchElevatorNo(String dispatchElevatorNo) { + this.dispatchElevatorNo = dispatchElevatorNo; + } + + public String getPersonId() { + return this.personId; + } + + public void setPersonId(String personId) { + this.personId = personId; + } +} diff --git a/maven-cw-elevator-application/cw-elevator-application-web/src/main/resources/META-INF/MANIFEST.MF b/maven-cw-elevator-application/cw-elevator-application-web/src/main/resources/META-INF/MANIFEST.MF new file mode 100644 index 00000000..262223a0 --- /dev/null +++ b/maven-cw-elevator-application/cw-elevator-application-web/src/main/resources/META-INF/MANIFEST.MF @@ -0,0 +1,12 @@ +Manifest-Version: 1.0 +Implementation-Title: cw-elevator-application-web +Implementation-Version: 1.0-SNAPSHOT +Archiver-Version: Plexus Archiver +Built-By: YCWB0304 +Implementation-Vendor-Id: cn.cloudwalk.elevator +Created-By: Apache Maven 3.6.1 +Build-Jdk: 1.8.0_144 +Implementation-URL: http://projects.spring.io/spring-boot/cw-elevator- + application/cw-elevator-application-web/ +Implementation-Vendor: Pivotal Software, Inc. + diff --git a/maven-cw-elevator-application/pom.xml b/maven-cw-elevator-application/pom.xml new file mode 100644 index 00000000..0a37c5fd --- /dev/null +++ b/maven-cw-elevator-application/pom.xml @@ -0,0 +1,274 @@ + + + 4.0.0 + + + org.springframework.boot + spring-boot-starter-parent + 2.1.18.RELEASE + + + + cn.cloudwalk.elevator + cw-elevator-application-decompiled-reactor + 1.0-SNAPSHOT + pom + cw-elevator-application (decompiled reactor) + 聚合模块:common → data → service → web。源码已迁入各子模块 src/main/java;对照依赖版本见属性 cw.elevator.v1.lib.dir。 + + + cw-elevator-application-common + cw-elevator-application-data + cw-elevator-application-service + cw-elevator-application-web + + + + 1.8 + + /media/zebra/9e8fa357-7db6-4d70-88ed-d5de5a059a663/星河湾星中星/反编译/cw-elevator-application-V1.0.0.20211103/lib + 3.7.2-Brussels-SRX + 2.9.2-xinghewan + 1.2.83 + 28.2-jre + 4.1.2 + 1.10.12 + 0.4.14 + 2.11.0 + 2.11.5 + 3.5.1 + 5.3.2 + 1.4.6 + 4.1.1 + 3.5.6 + 2.0.6 + 2.0.1 + 2.5 + 1.0.0-SNAPSHOT + 1.1.1-SNAPSHOT + 1.1.7-SNAPSHOT + + http://192.168.3.12 + ${nexus.baseUrl}/repository/maven-public/ + 2.24.1 + ${project.basedir}/../docs/style/alibaba-eclipse-codestyle.xml + + + + + + cn.cloudwalk.cloud + cloudwalk-common-result + ${cloudwalk.internal.version} + + + cn.cloudwalk.cloud + cloudwalk-common-web + ${cloudwalk.internal.version} + + + cn.cloudwalk.cloud + cloudwalk-common-service + ${cloudwalk.internal.version} + + + cn.cloudwalk.cloud + cloudwalk-common-event + ${cloudwalk.internal.version} + + + cn.cloudwalk.cloud + cloudwalk-common-serial + ${cloudwalk.internal.version} + + + cn.cloudwalk.intelligent + intelligent-cwoscomponent-rest + ${intelligent.cwoscomponent.version} + + + cn.cloudwalk + cwos-java-sdk-resource + ${cwos.sdk.resource.version} + + + cn.cloudwalk.intelligent + cloudwalk-intelligent-component-lock + ${intelligent.lock.version} + + + cn.cloudwalk.intelligent + davinci-manager-storage + ${davinci.manager.storage.version} + + + com.google.guava + guava + ${guava.version} + + + org.apache.poi + poi + ${poi.version} + + + org.apache.poi + poi-ooxml + ${poi.version} + + + org.apache.ant + ant + ${ant.version} + + + net.coobird + thumbnailator + ${thumbnailator.version} + + + commons-io + commons-io + ${commons-io.version} + + + com.alibaba + fastjson + ${fastjson.version} + + + net.lingala.zip4j + zip4j + ${zip4j.version} + + + com.google.zxing + core + ${zxing.version} + + + com.github.pagehelper + pagehelper + ${pagehelper.version} + + + com.github.pagehelper + pagehelper-spring-boot-autoconfigure + ${pagehelper-spring-boot.version} + + + org.apache.shardingsphere + sharding-jdbc-spring-boot-starter + ${shardingsphere.version} + + + org.mybatis + mybatis + ${mybatis.version} + + + org.mybatis + mybatis-spring + ${mybatis-spring.version} + + + org.mybatis.spring.boot + mybatis-spring-boot-starter + ${mybatis-spring-boot.version} + + + javax.servlet + servlet-api + ${servlet-api.version} + + + javax.el + javax.el-api + 3.0.0 + + + org.glassfish + javax.el + 3.0.0 + + + + + + + nexus-public + Nexus maven-public + ${nexus.public.repo} + + true + + + true + + + + + + + nexus-public-plugins + Nexus maven-public + ${nexus.public.repo} + + true + + + true + + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + 1.8 + 1.8 + UTF-8 + + + + net.revelc.code.formatter + formatter-maven-plugin + ${formatter.maven.plugin.version} + + ${alibaba.eclipse.codestyle.path} + LF + UTF-8 + + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.4.1 + + + enforce-jdk8 + + enforce + + + + + [1.8,1.9) + 与原始运行包一致须使用 JDK 8 启动 Maven;见 docs/build/ORIGINAL_BUILD_JDK.txt + + + + + + + + + diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/pom.xml b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/pom.xml new file mode 100644 index 00000000..b99e4f97 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/pom.xml @@ -0,0 +1,43 @@ + + + 4.0.0 + + + cn.cloudwalk.intelligent + intelligent-cwoscomponent-decompiled-reactor + 2.9.2-xinghewan + ../pom.xml + + + intelligent-cwoscomponent-interface + jar + + + ${project.basedir}/../../docs/style/alibaba-eclipse-codestyle.xml + + + + + cn.cloudwalk.cloud + cloudwalk-common-result + + + com.alibaba + fastjson + + + cn.cloudwalk + cloudwalk-device-sdk-protocol-entity + + + + + + + net.revelc.code.formatter + formatter-maven-plugin + + + + diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/account/param/AccountLoginParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/account/param/AccountLoginParam.java new file mode 100644 index 00000000..78133313 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/account/param/AccountLoginParam.java @@ -0,0 +1,88 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.account.param; + +import java.io.Serializable; + +public class AccountLoginParam implements Serializable { + private static final long serialVersionUID = 8612343623995305721L; + private String loginName; + private String corpCode; + private Integer multiType; + private String password; + private Integer type; + private String captchaKey; + private String verifyCode; + private Long accessTokenExp; + private Long refreshTokenExp; + + public String getLoginName() { + return this.loginName; + } + + public void setLoginName(String loginName) { + this.loginName = loginName; + } + + public String getCorpCode() { + return this.corpCode; + } + + public void setCorpCode(String corpCode) { + this.corpCode = corpCode; + } + + public Integer getMultiType() { + return this.multiType; + } + + public void setMultiType(Integer multiType) { + this.multiType = multiType; + } + + public String getPassword() { + return this.password; + } + + public void setPassword(String password) { + this.password = password; + } + + public Integer getType() { + return this.type; + } + + public void setType(Integer type) { + this.type = type; + } + + public String getCaptchaKey() { + return this.captchaKey; + } + + public void setCaptchaKey(String captchaKey) { + this.captchaKey = captchaKey; + } + + public String getVerifyCode() { + return this.verifyCode; + } + + public void setVerifyCode(String verifyCode) { + this.verifyCode = verifyCode; + } + + public Long getAccessTokenExp() { + return this.accessTokenExp; + } + + public void setAccessTokenExp(Long accessTokenExp) { + this.accessTokenExp = accessTokenExp; + } + + public Long getRefreshTokenExp() { + return this.refreshTokenExp; + } + + public void setRefreshTokenExp(Long refreshTokenExp) { + this.refreshTokenExp = refreshTokenExp; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/account/result/AccountLoginResult.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/account/result/AccountLoginResult.java new file mode 100644 index 00000000..01d48183 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/account/result/AccountLoginResult.java @@ -0,0 +1,133 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.account.result; + +import java.io.Serializable; + +public class AccountLoginResult implements Serializable { + private static final long serialVersionUID = 8677543612395305721L; + private String id; + private String loginName; + private Integer status; + private String telephone; + private String email; + private String businessId; + private String accessToken; + private Long accessTokenExp; + private String refreshToken; + private Long refreshTokenExp; + private String ext1; + private String corpCode; + private Boolean firstLogin; + private Boolean emailEnable; + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public String getLoginName() { + return this.loginName; + } + + public void setLoginName(String loginName) { + this.loginName = loginName; + } + + public Integer getStatus() { + return this.status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public String getTelephone() { + return this.telephone; + } + + public void setTelephone(String telephone) { + this.telephone = telephone; + } + + public String getEmail() { + return this.email; + } + + public void setEmail(String email) { + this.email = email; + } + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getAccessToken() { + return this.accessToken; + } + + public void setAccessToken(String accessToken) { + this.accessToken = accessToken; + } + + public Long getAccessTokenExp() { + return this.accessTokenExp; + } + + public void setAccessTokenExp(Long accessTokenExp) { + this.accessTokenExp = accessTokenExp; + } + + public String getRefreshToken() { + return this.refreshToken; + } + + public void setRefreshToken(String refreshToken) { + this.refreshToken = refreshToken; + } + + public Long getRefreshTokenExp() { + return this.refreshTokenExp; + } + + public void setRefreshTokenExp(Long refreshTokenExp) { + this.refreshTokenExp = refreshTokenExp; + } + + public String getExt1() { + return this.ext1; + } + + public void setExt1(String ext1) { + this.ext1 = ext1; + } + + public String getCorpCode() { + return this.corpCode; + } + + public void setCorpCode(String corpCode) { + this.corpCode = corpCode; + } + + public Boolean getFirstLogin() { + return this.firstLogin; + } + + public void setFirstLogin(Boolean firstLogin) { + this.firstLogin = firstLogin; + } + + public Boolean getEmailEnable() { + return this.emailEnable; + } + + public void setEmailEnable(Boolean emailEnable) { + this.emailEnable = emailEnable; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/account/service/AccountLoginService.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/account/service/AccountLoginService.java new file mode 100644 index 00000000..eb2bc1ee --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/account/service/AccountLoginService.java @@ -0,0 +1,12 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.account.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.account.param.AccountLoginParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.account.result.AccountLoginResult; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; + +public interface AccountLoginService { + CloudwalkResult login(AccountLoginParam paramAccountLoginParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/ai/v2/face/param/FaceAddParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/ai/v2/face/param/FaceAddParam.java new file mode 100644 index 00000000..c0312719 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/ai/v2/face/param/FaceAddParam.java @@ -0,0 +1,61 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.ai.v2.face.param; + +import java.io.Serializable; + +public class FaceAddParam implements Serializable { + private static final long serialVersionUID = 8677543623995305721L; + public String groupId; + private String faceId; + private String url; + private String featureAttr; + private String feature; + private Long time; + + public String getGroupId() { + return this.groupId; + } + + public void setGroupId(String groupId) { + this.groupId = groupId; + } + + public String getFaceId() { + return this.faceId; + } + + public void setFaceId(String faceId) { + this.faceId = faceId; + } + + public String getUrl() { + return this.url; + } + + public void setUrl(String url) { + this.url = url; + } + + public String getFeatureAttr() { + return this.featureAttr; + } + + public void setFeatureAttr(String featureAttr) { + this.featureAttr = featureAttr; + } + + public String getFeature() { + return this.feature; + } + + public void setFeature(String feature) { + this.feature = feature; + } + + public Long getTime() { + return this.time; + } + + public void setTime(Long time) { + this.time = time; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/ai/v2/face/param/FaceRemoveParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/ai/v2/face/param/FaceRemoveParam.java new file mode 100644 index 00000000..a5f4db66 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/ai/v2/face/param/FaceRemoveParam.java @@ -0,0 +1,25 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.ai.v2.face.param; + +import java.io.Serializable; + +public class FaceRemoveParam implements Serializable { + private static final long serialVersionUID = -1406729003226535450L; + private String groupId; + private String faceId; + + public String getGroupId() { + return this.groupId; + } + + public void setGroupId(String groupId) { + this.groupId = groupId; + } + + public String getFaceId() { + return this.faceId; + } + + public void setFaceId(String faceId) { + this.faceId = faceId; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/ai/v2/face/service/FaceService.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/ai/v2/face/service/FaceService.java new file mode 100644 index 00000000..42fe0c1d --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/ai/v2/face/service/FaceService.java @@ -0,0 +1,15 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.ai.v2.face.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.ai.v2.face.param.FaceAddParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.ai.v2.face.param.FaceRemoveParam; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; + +public interface FaceService { + CloudwalkResult add(FaceAddParam paramFaceAddParam, CloudwalkCallContext paramCloudwalkCallContext) + throws ServiceException; + + CloudwalkResult remove(FaceRemoveParam paramFaceRemoveParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/ai/v2/feature/param/FeatureExtractParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/ai/v2/feature/param/FeatureExtractParam.java new file mode 100644 index 00000000..41db1c25 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/ai/v2/feature/param/FeatureExtractParam.java @@ -0,0 +1,25 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.ai.v2.feature.param; + +import java.io.Serializable; + +public class FeatureExtractParam implements Serializable { + private static final long serialVersionUID = -7065935417683951446L; + private String image; + private String algoVersion; + + public String getImage() { + return this.image; + } + + public void setImage(String image) { + this.image = image; + } + + public String getAlgoVersion() { + return this.algoVersion; + } + + public void setAlgoVersion(String algoVersion) { + this.algoVersion = algoVersion; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/ai/v2/feature/result/FeatureExtractResult.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/ai/v2/feature/result/FeatureExtractResult.java new file mode 100644 index 00000000..5ec29892 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/ai/v2/feature/result/FeatureExtractResult.java @@ -0,0 +1,25 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.ai.v2.feature.result; + +import java.io.Serializable; + +public class FeatureExtractResult implements Serializable { + private static final long serialVersionUID = -8495872908625584060L; + private String feature; + private String qualityScores; + + public String getFeature() { + return this.feature; + } + + public void setFeature(String feature) { + this.feature = feature; + } + + public String getQualityScores() { + return this.qualityScores; + } + + public void setQualityScores(String qualityScores) { + this.qualityScores = qualityScores; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/ai/v2/feature/service/FeatureService.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/ai/v2/feature/service/FeatureService.java new file mode 100644 index 00000000..df7f86ae --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/ai/v2/feature/service/FeatureService.java @@ -0,0 +1,12 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.ai.v2.feature.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.ai.v2.feature.param.FeatureExtractParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.ai.v2.feature.result.FeatureExtractResult; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; + +public interface FeatureService { + CloudwalkResult extract(FeatureExtractParam paramFeatureExtractParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/ai/v2/group/param/GroupAddParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/ai/v2/group/param/GroupAddParam.java new file mode 100644 index 00000000..bb37641e --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/ai/v2/group/param/GroupAddParam.java @@ -0,0 +1,43 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.ai.v2.group.param; + +import java.io.Serializable; + +public class GroupAddParam implements Serializable { + private static final long serialVersionUID = -2259828050232870638L; + private String groupId; + private String groupName; + private String algoVersion; + private String groupAttr; + + public String getGroupId() { + return this.groupId; + } + + public void setGroupId(String groupId) { + this.groupId = groupId; + } + + public String getGroupName() { + return this.groupName; + } + + public void setGroupName(String groupName) { + this.groupName = groupName; + } + + public String getAlgoVersion() { + return this.algoVersion; + } + + public void setAlgoVersion(String algoVersion) { + this.algoVersion = algoVersion; + } + + public String getGroupAttr() { + return this.groupAttr; + } + + public void setGroupAttr(String groupAttr) { + this.groupAttr = groupAttr; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/ai/v2/group/param/GroupGetParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/ai/v2/group/param/GroupGetParam.java new file mode 100644 index 00000000..7da33e92 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/ai/v2/group/param/GroupGetParam.java @@ -0,0 +1,16 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.ai.v2.group.param; + +import java.io.Serializable; + +public class GroupGetParam implements Serializable { + private static final long serialVersionUID = 3488820861848790176L; + private String groupId; + + public String getGroupId() { + return this.groupId; + } + + public void setGroupId(String groupId) { + this.groupId = groupId; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/ai/v2/group/result/GroupResult.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/ai/v2/group/result/GroupResult.java new file mode 100644 index 00000000..5d36f193 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/ai/v2/group/result/GroupResult.java @@ -0,0 +1,61 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.ai.v2.group.result; + +import java.io.Serializable; + +public class GroupResult implements Serializable { + private static final long serialVersionUID = -4413533545937319335L; + private String groupId; + private String groupName; + private String algoVersion; + private Integer subGroupCount; + private Integer faceCount; + private String groupAttr; + + public String getGroupId() { + return this.groupId; + } + + public void setGroupId(String groupId) { + this.groupId = groupId; + } + + public String getGroupName() { + return this.groupName; + } + + public void setGroupName(String groupName) { + this.groupName = groupName; + } + + public String getAlgoVersion() { + return this.algoVersion; + } + + public void setAlgoVersion(String algoVersion) { + this.algoVersion = algoVersion; + } + + public Integer getSubGroupCount() { + return this.subGroupCount; + } + + public void setSubGroupCount(Integer subGroupCount) { + this.subGroupCount = subGroupCount; + } + + public Integer getFaceCount() { + return this.faceCount; + } + + public void setFaceCount(Integer faceCount) { + this.faceCount = faceCount; + } + + public String getGroupAttr() { + return this.groupAttr; + } + + public void setGroupAttr(String groupAttr) { + this.groupAttr = groupAttr; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/ai/v2/group/service/GroupService.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/ai/v2/group/service/GroupService.java new file mode 100644 index 00000000..2c71a84b --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/ai/v2/group/service/GroupService.java @@ -0,0 +1,16 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.ai.v2.group.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.ai.v2.group.param.GroupAddParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.ai.v2.group.param.GroupGetParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.ai.v2.group.result.GroupResult; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; + +public interface GroupService { + CloudwalkResult add(GroupAddParam paramGroupAddParam, CloudwalkCallContext paramCloudwalkCallContext) + throws ServiceException; + + CloudwalkResult get(GroupGetParam paramGroupGetParam, CloudwalkCallContext paramCloudwalkCallContext) + throws ServiceException; +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/ai/v2/staticdb/param/SearchMultipleParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/ai/v2/staticdb/param/SearchMultipleParam.java new file mode 100644 index 00000000..77cbd93e --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/ai/v2/staticdb/param/SearchMultipleParam.java @@ -0,0 +1,70 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.ai.v2.staticdb.param; + +import java.io.Serializable; + +public class SearchMultipleParam implements Serializable { + private static final long serialVersionUID = 6608790759108766363L; + private String groupId; + private Integer topN; + private String feature; + private String thresholdScore; + private String featureAttr; + private Long bTime; + private Long eTime; + + public String getGroupId() { + return this.groupId; + } + + public void setGroupId(String groupId) { + this.groupId = groupId; + } + + public Integer getTopN() { + return this.topN; + } + + public void setTopN(Integer topN) { + this.topN = topN; + } + + public String getFeature() { + return this.feature; + } + + public void setFeature(String feature) { + this.feature = feature; + } + + public String getThresholdScore() { + return this.thresholdScore; + } + + public void setThresholdScore(String thresholdScore) { + this.thresholdScore = thresholdScore; + } + + public String getFeatureAttr() { + return this.featureAttr; + } + + public void setFeatureAttr(String featureAttr) { + this.featureAttr = featureAttr; + } + + public Long getbTime() { + return this.bTime; + } + + public void setbTime(Long bTime) { + this.bTime = bTime; + } + + public Long geteTime() { + return this.eTime; + } + + public void seteTime(Long eTime) { + this.eTime = eTime; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/ai/v2/staticdb/result/SearchResult.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/ai/v2/staticdb/result/SearchResult.java new file mode 100644 index 00000000..d3c41dd0 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/ai/v2/staticdb/result/SearchResult.java @@ -0,0 +1,34 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.ai.v2.staticdb.result; + +import java.io.Serializable; + +public class SearchResult implements Serializable { + private static final long serialVersionUID = 2192713789378395770L; + private String faceId; + private String score; + private String groupId; + + public String getFaceId() { + return this.faceId; + } + + public void setFaceId(String faceId) { + this.faceId = faceId; + } + + public String getScore() { + return this.score; + } + + public void setScore(String score) { + this.score = score; + } + + public String getGroupId() { + return this.groupId; + } + + public void setGroupId(String groupId) { + this.groupId = groupId; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/ai/v2/staticdb/service/SearchService.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/ai/v2/staticdb/service/SearchService.java new file mode 100644 index 00000000..912813db --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/ai/v2/staticdb/service/SearchService.java @@ -0,0 +1,11 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.ai.v2.staticdb.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.ai.v2.staticdb.param.SearchMultipleParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.ai.v2.staticdb.result.SearchResult; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import java.util.List; + +public interface SearchService { + CloudwalkResult> multiple(SearchMultipleParam paramSearchMultipleParam) throws ServiceException; +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/application/param/ApplicationImageStoreAddParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/application/param/ApplicationImageStoreAddParam.java new file mode 100644 index 00000000..5073e2ce --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/application/param/ApplicationImageStoreAddParam.java @@ -0,0 +1,25 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.application.param; + +import java.io.Serializable; + +public class ApplicationImageStoreAddParam implements Serializable { + private static final long serialVersionUID = 1178121240688860236L; + private String applicationId; + private String imageStoreId; + + public String getApplicationId() { + return this.applicationId; + } + + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + public String getImageStoreId() { + return this.imageStoreId; + } + + public void setImageStoreId(String imageStoreId) { + this.imageStoreId = imageStoreId; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/application/param/ApplicationImageStoreDelParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/application/param/ApplicationImageStoreDelParam.java new file mode 100644 index 00000000..cd98a74a --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/application/param/ApplicationImageStoreDelParam.java @@ -0,0 +1,25 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.application.param; + +import java.io.Serializable; + +public class ApplicationImageStoreDelParam implements Serializable { + private static final long serialVersionUID = -3106548282541034177L; + private String applicationId; + private String imageStoreId; + + public String getApplicationId() { + return this.applicationId; + } + + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + public String getImageStoreId() { + return this.imageStoreId; + } + + public void setImageStoreId(String imageStoreId) { + this.imageStoreId = imageStoreId; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/application/param/ApplicationImageStoreQueryParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/application/param/ApplicationImageStoreQueryParam.java new file mode 100644 index 00000000..3b3d53fb --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/application/param/ApplicationImageStoreQueryParam.java @@ -0,0 +1,25 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.application.param; + +import java.io.Serializable; + +public class ApplicationImageStoreQueryParam implements Serializable { + private static final long serialVersionUID = -988602886251134747L; + private String applicationId; + private String imageStoreId; + + public String getApplicationId() { + return this.applicationId; + } + + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + public String getImageStoreId() { + return this.imageStoreId; + } + + public void setImageStoreId(String imageStoreId) { + this.imageStoreId = imageStoreId; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/application/param/SceneAppsGetParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/application/param/SceneAppsGetParam.java new file mode 100644 index 00000000..76dbd731 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/application/param/SceneAppsGetParam.java @@ -0,0 +1,125 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.application.param; + +import java.io.Serializable; +import java.util.List; + +public class SceneAppsGetParam implements Serializable { + private static final long serialVersionUID = -5077434728641616044L; + private String serviceCode; + private String businessId; + private List businessIds; + private String name; + private String ext1; + private String ext2; + private String ext3; + private String createUserId; + private String lastUpdateUserId; + private Long createBeginTime; + private Long createEndTime; + private Long lastUpdateBeginTime; + private Long lastUpdateEndTime; + + public String getServiceCode() { + return this.serviceCode; + } + + public void setServiceCode(String serviceCode) { + this.serviceCode = serviceCode; + } + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public List getBusinessIds() { + return this.businessIds; + } + + public void setBusinessIds(List businessIds) { + this.businessIds = businessIds; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public String getExt1() { + return this.ext1; + } + + public void setExt1(String ext1) { + this.ext1 = ext1; + } + + public String getExt2() { + return this.ext2; + } + + public void setExt2(String ext2) { + this.ext2 = ext2; + } + + public String getExt3() { + return this.ext3; + } + + public void setExt3(String ext3) { + this.ext3 = ext3; + } + + public String getCreateUserId() { + return this.createUserId; + } + + public void setCreateUserId(String createUserId) { + this.createUserId = createUserId; + } + + public String getLastUpdateUserId() { + return this.lastUpdateUserId; + } + + public void setLastUpdateUserId(String lastUpdateUserId) { + this.lastUpdateUserId = lastUpdateUserId; + } + + public Long getCreateBeginTime() { + return this.createBeginTime; + } + + public void setCreateBeginTime(Long createBeginTime) { + this.createBeginTime = createBeginTime; + } + + public Long getCreateEndTime() { + return this.createEndTime; + } + + public void setCreateEndTime(Long createEndTime) { + this.createEndTime = createEndTime; + } + + public Long getLastUpdateBeginTime() { + return this.lastUpdateBeginTime; + } + + public void setLastUpdateBeginTime(Long lastUpdateBeginTime) { + this.lastUpdateBeginTime = lastUpdateBeginTime; + } + + public Long getLastUpdateEndTime() { + return this.lastUpdateEndTime; + } + + public void setLastUpdateEndTime(Long lastUpdateEndTime) { + this.lastUpdateEndTime = lastUpdateEndTime; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/application/result/ApplicationImageStoreResult.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/application/result/ApplicationImageStoreResult.java new file mode 100644 index 00000000..0df63610 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/application/result/ApplicationImageStoreResult.java @@ -0,0 +1,43 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.application.result; + +import java.io.Serializable; + +public class ApplicationImageStoreResult implements Serializable { + private static final long serialVersionUID = 396027093181293371L; + private String applicationId; + private String applicationName; + private String imageStoreId; + private String imageStoreName; + + public String getApplicationId() { + return this.applicationId; + } + + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + public String getApplicationName() { + return this.applicationName; + } + + public void setApplicationName(String applicationName) { + this.applicationName = applicationName; + } + + public String getImageStoreId() { + return this.imageStoreId; + } + + public void setImageStoreId(String imageStoreId) { + this.imageStoreId = imageStoreId; + } + + public String getImageStoreName() { + return this.imageStoreName; + } + + public void setImageStoreName(String imageStoreName) { + this.imageStoreName = imageStoreName; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/application/result/SceneAppsResult.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/application/result/SceneAppsResult.java new file mode 100644 index 00000000..2b7d2685 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/application/result/SceneAppsResult.java @@ -0,0 +1,79 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.application.result; + +import cn.cloudwalk.cloud.entity.CloudwalkBaseTimes; + +public class SceneAppsResult extends CloudwalkBaseTimes { + private static final long serialVersionUID = 1418571742013903200L; + private String serviceCode; + private String businessId; + private String name; + private Short status; + private String remark; + private String ext1; + private String ext2; + private String ext3; + + public String getServiceCode() { + return this.serviceCode; + } + + public void setServiceCode(String serviceCode) { + this.serviceCode = serviceCode; + } + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public Short getStatus() { + return this.status; + } + + public void setStatus(Short status) { + this.status = status; + } + + public String getRemark() { + return this.remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public String getExt1() { + return this.ext1; + } + + public void setExt1(String ext1) { + this.ext1 = ext1; + } + + public String getExt2() { + return this.ext2; + } + + public void setExt2(String ext2) { + this.ext2 = ext2; + } + + public String getExt3() { + return this.ext3; + } + + public void setExt3(String ext3) { + this.ext3 = ext3; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/application/service/ApplicationImageStoreService.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/application/service/ApplicationImageStoreService.java new file mode 100644 index 00000000..c597062e --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/application/service/ApplicationImageStoreService.java @@ -0,0 +1,22 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.application.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.application.param.ApplicationImageStoreAddParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.application.param.ApplicationImageStoreDelParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.application.param.ApplicationImageStoreQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.application.result.ApplicationImageStoreResult; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import java.util.List; + +public interface ApplicationImageStoreService { + CloudwalkResult add(ApplicationImageStoreAddParam paramApplicationImageStoreAddParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult delete(ApplicationImageStoreDelParam paramApplicationImageStoreDelParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult> list( + ApplicationImageStoreQueryParam paramApplicationImageStoreQueryParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/application/service/ApplicationService.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/application/service/ApplicationService.java new file mode 100644 index 00000000..c38eb031 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/application/service/ApplicationService.java @@ -0,0 +1,13 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.application.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.application.param.SceneAppsGetParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.application.result.SceneAppsResult; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import java.util.List; + +public interface ApplicationService { + CloudwalkResult> get(SceneAppsGetParam paramSceneAppsGetParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/biology/param/FeatureExtractParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/biology/param/FeatureExtractParam.java new file mode 100644 index 00000000..bb0a5b95 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/biology/param/FeatureExtractParam.java @@ -0,0 +1,25 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.biology.param; + +import java.io.Serializable; + +public class FeatureExtractParam implements Serializable { + private static final long serialVersionUID = -3699547584743511454L; + private String imageUrl; + private String imageBase64; + + public String getImageUrl() { + return this.imageUrl; + } + + public void setImageUrl(String imageUrl) { + this.imageUrl = imageUrl; + } + + public String getImageBase64() { + return this.imageBase64; + } + + public void setImageBase64(String imageBase64) { + this.imageBase64 = imageBase64; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/biology/param/FeatureQueryParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/biology/param/FeatureQueryParam.java new file mode 100644 index 00000000..23c1fdfa --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/biology/param/FeatureQueryParam.java @@ -0,0 +1,53 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.biology.param; + +import java.io.Serializable; +import java.util.List; + +public class FeatureQueryParam implements Serializable { + private static final long serialVersionUID = 8531290787219042818L; + private String imageStoreId; + private List imageStoreIds; + private String imageBase64; + private String feature; + private Integer topN; + + public String getImageStoreId() { + return this.imageStoreId; + } + + public void setImageStoreId(String imageStoreId) { + this.imageStoreId = imageStoreId; + } + + public List getImageStoreIds() { + return this.imageStoreIds; + } + + public void setImageStoreIds(List imageStoreIds) { + this.imageStoreIds = imageStoreIds; + } + + public String getImageBase64() { + return this.imageBase64; + } + + public void setImageBase64(String imageBase64) { + this.imageBase64 = imageBase64; + } + + public String getFeature() { + return this.feature; + } + + public void setFeature(String feature) { + this.feature = feature; + } + + public Integer getTopN() { + return this.topN; + } + + public void setTopN(Integer topN) { + this.topN = topN; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/biology/result/FeatureExtractResult.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/biology/result/FeatureExtractResult.java new file mode 100644 index 00000000..3b3bb1c1 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/biology/result/FeatureExtractResult.java @@ -0,0 +1,52 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.biology.result; + +import java.io.Serializable; + +public class FeatureExtractResult implements Serializable { + private static final long serialVersionUID = 8304579013896191253L; + private String feature; + private Double[] quality; + private Double score; + private String age; + private String gender; + + public String getFeature() { + return this.feature; + } + + public void setFeature(String feature) { + this.feature = feature; + } + + public Double[] getQuality() { + return this.quality; + } + + public void setQuality(Double[] quality) { + this.quality = quality; + } + + public Double getScore() { + return this.score; + } + + public void setScore(Double score) { + this.score = score; + } + + public String getAge() { + return this.age; + } + + public void setAge(String age) { + this.age = age; + } + + public String getGender() { + return this.gender; + } + + public void setGender(String gender) { + this.gender = gender; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/biology/result/FeatureQueryResult.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/biology/result/FeatureQueryResult.java new file mode 100644 index 00000000..d943df37 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/biology/result/FeatureQueryResult.java @@ -0,0 +1,88 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.biology.result; + +import java.io.Serializable; + +public class FeatureQueryResult implements Serializable { + private static final long serialVersionUID = -8418592047845202667L; + private String personId; + private String imageId; + private String imageStoreId; + private String name; + private Integer age; + private Integer gender; + private Double score; + private String personCode; + private String comparePicture; + + public String getPersonId() { + return this.personId; + } + + public void setPersonId(String personId) { + this.personId = personId; + } + + public String getImageId() { + return this.imageId; + } + + public void setImageId(String imageId) { + this.imageId = imageId; + } + + public String getImageStoreId() { + return this.imageStoreId; + } + + public void setImageStoreId(String imageStoreId) { + this.imageStoreId = imageStoreId; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public Integer getAge() { + return this.age; + } + + public void setAge(Integer age) { + this.age = age; + } + + public Integer getGender() { + return this.gender; + } + + public void setGender(Integer gender) { + this.gender = gender; + } + + public Double getScore() { + return this.score; + } + + public void setScore(Double score) { + this.score = score; + } + + public String getPersonCode() { + return this.personCode; + } + + public void setPersonCode(String personCode) { + this.personCode = personCode; + } + + public String getComparePicture() { + return this.comparePicture; + } + + public void setComparePicture(String comparePicture) { + this.comparePicture = comparePicture; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/biology/service/BiologyToolService.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/biology/service/BiologyToolService.java new file mode 100644 index 00000000..50eae080 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/biology/service/BiologyToolService.java @@ -0,0 +1,22 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.biology.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.biology.param.FeatureExtractParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.biology.param.FeatureQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.biology.result.FeatureExtractResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.biology.result.FeatureQueryResult; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import java.util.List; +import java.util.Map; + +public interface BiologyToolService { + CloudwalkResult extract(FeatureExtractParam paramFeatureExtractParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult> query(FeatureQueryParam paramFeatureQueryParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult>> querygroups(FeatureQueryParam paramFeatureQueryParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/DeviceApplicationParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/DeviceApplicationParam.java new file mode 100644 index 00000000..f812036e --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/DeviceApplicationParam.java @@ -0,0 +1,25 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.device.param; + +import java.io.Serializable; + +public class DeviceApplicationParam implements Serializable { + private static final long serialVersionUID = 3303002881265656778L; + private String deviceId; + private String applicationId; + + public String getDeviceId() { + return this.deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public String getApplicationId() { + return this.applicationId; + } + + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/DeviceApplicationQueryParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/DeviceApplicationQueryParam.java new file mode 100644 index 00000000..bcf5a6a3 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/DeviceApplicationQueryParam.java @@ -0,0 +1,25 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.device.param; + +import java.io.Serializable; + +public class DeviceApplicationQueryParam implements Serializable { + private static final long serialVersionUID = -6201617724117140336L; + private String applicationId; + private String deviceId; + + public String getApplicationId() { + return this.applicationId; + } + + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + public String getDeviceId() { + return this.deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/DeviceAreaDeleteParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/DeviceAreaDeleteParam.java new file mode 100644 index 00000000..90f8e668 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/DeviceAreaDeleteParam.java @@ -0,0 +1,25 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.device.param; + +import java.io.Serializable; + +public class DeviceAreaDeleteParam implements Serializable { + private static final long serialVersionUID = -6610039319513174151L; + private String businessId; + private String id; + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/DeviceAreaQueryDeviceParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/DeviceAreaQueryDeviceParam.java new file mode 100644 index 00000000..639cdccd --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/DeviceAreaQueryDeviceParam.java @@ -0,0 +1,25 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.device.param; + +import java.io.Serializable; + +public class DeviceAreaQueryDeviceParam implements Serializable { + private static final long serialVersionUID = -6610039319513174151L; + private String businessId; + private String areaId; + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getAreaId() { + return this.areaId; + } + + public void setAreaId(String areaId) { + this.areaId = areaId; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/DeviceAreaQueryParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/DeviceAreaQueryParam.java new file mode 100644 index 00000000..dc92f645 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/DeviceAreaQueryParam.java @@ -0,0 +1,62 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.device.param; + +import java.io.Serializable; +import java.util.List; + +public class DeviceAreaQueryParam implements Serializable { + private static final long serialVersionUID = -6610039319513174151L; + private String businessId; + private String id; + private List ids; + private String parentId; + private List parentIds; + private String districtId; + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public List getIds() { + return this.ids; + } + + public void setIds(List ids) { + this.ids = ids; + } + + public String getParentId() { + return this.parentId; + } + + public void setParentId(String parentId) { + this.parentId = parentId; + } + + public List getParentIds() { + return this.parentIds; + } + + public void setParentIds(List parentIds) { + this.parentIds = parentIds; + } + + public String getDistrictId() { + return this.districtId; + } + + public void setDistrictId(String districtId) { + this.districtId = districtId; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/DeviceDeleteParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/DeviceDeleteParam.java new file mode 100644 index 00000000..167d5177 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/DeviceDeleteParam.java @@ -0,0 +1,17 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.device.param; + +import java.io.Serializable; +import java.util.List; + +public class DeviceDeleteParam implements Serializable { + private static final long serialVersionUID = -7109438389876339694L; + private List ids; + + public List getIds() { + return this.ids; + } + + public void setIds(List ids) { + this.ids = ids; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/DeviceDistrictQueryParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/DeviceDistrictQueryParam.java new file mode 100644 index 00000000..dfb8d4a9 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/DeviceDistrictQueryParam.java @@ -0,0 +1,71 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.device.param; + +import java.io.Serializable; +import java.util.List; + +public class DeviceDistrictQueryParam implements Serializable { + private static final long serialVersionUID = -3567281133513652675L; + private String id; + private List ids; + private String parentId; + private String districtCode; + private String districtName; + private String path; + private Integer level; + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public List getIds() { + return this.ids; + } + + public void setIds(List ids) { + this.ids = ids; + } + + public String getParentId() { + return this.parentId; + } + + public void setParentId(String parentId) { + this.parentId = parentId; + } + + public String getDistrictCode() { + return this.districtCode; + } + + public void setDistrictCode(String districtCode) { + this.districtCode = districtCode; + } + + public String getDistrictName() { + return this.districtName; + } + + public void setDistrictName(String districtName) { + this.districtName = districtName; + } + + public String getPath() { + return this.path; + } + + public void setPath(String path) { + this.path = path; + } + + public Integer getLevel() { + return this.level; + } + + public void setLevel(Integer level) { + this.level = level; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/DeviceImageStoreParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/DeviceImageStoreParam.java new file mode 100644 index 00000000..12ba7cf6 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/DeviceImageStoreParam.java @@ -0,0 +1,25 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.device.param; + +import java.io.Serializable; + +public class DeviceImageStoreParam implements Serializable { + private static final long serialVersionUID = -3913386980647288670L; + private String deviceId; + private String imageStoreId; + + public String getDeviceId() { + return this.deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public String getImageStoreId() { + return this.imageStoreId; + } + + public void setImageStoreId(String imageStoreId) { + this.imageStoreId = imageStoreId; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/DeviceImageStoreQueryParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/DeviceImageStoreQueryParam.java new file mode 100644 index 00000000..2e54f9b0 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/DeviceImageStoreQueryParam.java @@ -0,0 +1,25 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.device.param; + +import cn.cloudwalk.cloud.page.CloudwalkBasePageForm; + +public class DeviceImageStoreQueryParam extends CloudwalkBasePageForm { + private static final long serialVersionUID = 6135725317271065182L; + private String deviceId; + private String imageStoreId; + + public String getDeviceId() { + return this.deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public String getImageStoreId() { + return this.imageStoreId; + } + + public void setImageStoreId(String imageStoreId) { + this.imageStoreId = imageStoreId; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/DeviceImageStoreSaveParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/DeviceImageStoreSaveParam.java new file mode 100644 index 00000000..ad82b7b5 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/DeviceImageStoreSaveParam.java @@ -0,0 +1,26 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.device.param; + +import java.io.Serializable; +import java.util.List; + +public class DeviceImageStoreSaveParam implements Serializable { + private static final long serialVersionUID = 1474058201067472896L; + private String deviceId; + private List imageStoreIds; + + public String getDeviceId() { + return this.deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public List getImageStoreIds() { + return this.imageStoreIds; + } + + public void setImageStoreIds(List imageStoreIds) { + this.imageStoreIds = imageStoreIds; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/DeviceQueryParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/DeviceQueryParam.java new file mode 100644 index 00000000..86c5f8be --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/DeviceQueryParam.java @@ -0,0 +1,216 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.device.param; + +import cn.cloudwalk.cloud.page.CloudwalkBasePageForm; +import java.io.Serializable; +import java.util.List; + +public class DeviceQueryParam extends CloudwalkBasePageForm implements Serializable { + private static final long serialVersionUID = -7109438389876339694L; + private String id; + private List ids; + private String businessId; + private String deviceName; + private String deviceTypeId; + private List deviceTypeIds; + private String deviceTypeCategoryId; + private String deviceTypeCode; + private List deviceTypeCodes; + private Long createTimeBegin; + private String deviceCode; + private List deviceCodes; + private String districtId; + private List districtIds; + private List districtPath; + private List areaIds; + private String applicationId; + private List applicationIds; + private String orgId; + private List orgIds; + private Integer onlineStatus; + private String deviceIp; + private Integer order; + + public String getDeviceIp() { + return this.deviceIp; + } + + public void setDeviceIp(String deviceIp) { + this.deviceIp = deviceIp; + } + + public Integer getOrder() { + return this.order; + } + + public void setOrder(Integer order) { + this.order = order; + } + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public List getIds() { + return this.ids; + } + + public void setIds(List ids) { + this.ids = ids; + } + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getDeviceName() { + return this.deviceName; + } + + public void setDeviceName(String deviceName) { + this.deviceName = deviceName; + } + + public String getDeviceTypeId() { + return this.deviceTypeId; + } + + public void setDeviceTypeId(String deviceTypeId) { + this.deviceTypeId = deviceTypeId; + } + + public List getDeviceTypeIds() { + return this.deviceTypeIds; + } + + public void setDeviceTypeIds(List deviceTypeIds) { + this.deviceTypeIds = deviceTypeIds; + } + + public String getDeviceTypeCategoryId() { + return this.deviceTypeCategoryId; + } + + public void setDeviceTypeCategoryId(String deviceTypeCategoryId) { + this.deviceTypeCategoryId = deviceTypeCategoryId; + } + + public String getDeviceTypeCode() { + return this.deviceTypeCode; + } + + public void setDeviceTypeCode(String deviceTypeCode) { + this.deviceTypeCode = deviceTypeCode; + } + + public List getDeviceTypeCodes() { + return this.deviceTypeCodes; + } + + public void setDeviceTypeCodes(List deviceTypeCodes) { + this.deviceTypeCodes = deviceTypeCodes; + } + + public Long getCreateTimeBegin() { + return this.createTimeBegin; + } + + public void setCreateTimeBegin(Long createTimeBegin) { + this.createTimeBegin = createTimeBegin; + } + + public String getDeviceCode() { + return this.deviceCode; + } + + public void setDeviceCode(String deviceCode) { + this.deviceCode = deviceCode; + } + + public List getDeviceCodes() { + return this.deviceCodes; + } + + public void setDeviceCodes(List deviceCodes) { + this.deviceCodes = deviceCodes; + } + + public String getDistrictId() { + return this.districtId; + } + + public void setDistrictId(String districtId) { + this.districtId = districtId; + } + + public List getDistrictIds() { + return this.districtIds; + } + + public void setDistrictIds(List districtIds) { + this.districtIds = districtIds; + } + + public List getDistrictPath() { + return this.districtPath; + } + + public void setDistrictPath(List districtPath) { + this.districtPath = districtPath; + } + + public List getAreaIds() { + return this.areaIds; + } + + public void setAreaIds(List areaIds) { + this.areaIds = areaIds; + } + + public String getApplicationId() { + return this.applicationId; + } + + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + public List getApplicationIds() { + return this.applicationIds; + } + + public void setApplicationIds(List applicationIds) { + this.applicationIds = applicationIds; + } + + public String getOrgId() { + return this.orgId; + } + + public void setOrgId(String orgId) { + this.orgId = orgId; + } + + public List getOrgIds() { + return this.orgIds; + } + + public void setOrgIds(List orgIds) { + this.orgIds = orgIds; + } + + public Integer getOnlineStatus() { + return this.onlineStatus; + } + + public void setOnlineStatus(Integer onlineStatus) { + this.onlineStatus = onlineStatus; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/DeviceSettingInitParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/DeviceSettingInitParam.java new file mode 100644 index 00000000..7337b81f --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/DeviceSettingInitParam.java @@ -0,0 +1,17 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.device.param; + +import java.io.Serializable; +import java.util.List; + +public class DeviceSettingInitParam implements Serializable { + private static final long serialVersionUID = -270681693865343706L; + private List deviceIds; + + public List getDeviceIds() { + return this.deviceIds; + } + + public void setDeviceIds(List deviceIds) { + this.deviceIds = deviceIds; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/DeviceSettingNotifyParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/DeviceSettingNotifyParam.java new file mode 100644 index 00000000..51a24b5a --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/DeviceSettingNotifyParam.java @@ -0,0 +1,98 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.device.param; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; + +public class DeviceSettingNotifyParam implements Serializable { + private static final long serialVersionUID = -8994450163205392814L; + @JsonProperty("device_id") + private String deviceId; + @JsonProperty("sub_device_ids") + private List subDeviceIds; + @JsonProperty("log_id") + private String logId; + @JsonProperty("reserve_info") + private String reserveInfo; + @JsonProperty("setting_attr") + private List setttingAttr; + + public static class SettingAttr { + private String name; + private String value; + private String remark; + private List child; + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public String getValue() { + return this.value; + } + + public void setValue(String value) { + this.value = value; + } + + public String getRemark() { + return this.remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public List getChild() { + return this.child; + } + + public void setChild(List child) { + this.child = child; + } + } + + public String getDeviceId() { + return this.deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public List getSubDeviceIds() { + return this.subDeviceIds; + } + + public void setSubDeviceIds(List subDeviceIds) { + this.subDeviceIds = subDeviceIds; + } + + public String getLogId() { + return this.logId; + } + + public void setLogId(String logId) { + this.logId = logId; + } + + public String getReserveInfo() { + return this.reserveInfo; + } + + public void setReserveInfo(String reserveInfo) { + this.reserveInfo = reserveInfo; + } + + public List getSetttingAttr() { + return this.setttingAttr; + } + + public void setSetttingAttr(List setttingAttr) { + this.setttingAttr = setttingAttr; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/DeviceSettingQueryParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/DeviceSettingQueryParam.java new file mode 100644 index 00000000..4576355a --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/DeviceSettingQueryParam.java @@ -0,0 +1,26 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.device.param; + +import java.io.Serializable; +import java.util.List; + +public class DeviceSettingQueryParam implements Serializable { + private static final long serialVersionUID = 4347961841621233071L; + private List deviceIds; + private Short hasDefault; + + public List getDeviceIds() { + return this.deviceIds; + } + + public void setDeviceIds(List deviceIds) { + this.deviceIds = deviceIds; + } + + public Short getHasDefault() { + return this.hasDefault; + } + + public void setHasDefault(Short hasDefault) { + this.hasDefault = hasDefault; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/DeviceTypeQueryParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/DeviceTypeQueryParam.java new file mode 100644 index 00000000..635af8aa --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/DeviceTypeQueryParam.java @@ -0,0 +1,16 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.device.param; + +import java.io.Serializable; + +public class DeviceTypeQueryParam implements Serializable { + private static final long serialVersionUID = 5232138033725213978L; + private String vendorId; + + public String getVendorId() { + return this.vendorId; + } + + public void setVendorId(String vendorId) { + this.vendorId = vendorId; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/EntranceGuardControlParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/EntranceGuardControlParam.java new file mode 100644 index 00000000..ad7adde9 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/param/EntranceGuardControlParam.java @@ -0,0 +1,59 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.device.param; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import java.util.List; + +public class EntranceGuardControlParam implements Serializable { + private static final long serialVersionUID = 4881929863751773329L; + @JsonProperty("device_id") + private String deviceId; + @JsonProperty("sub_device_ids") + private List subDeviceIds; + @JsonProperty("log_id") + private String logId; + @JsonProperty("reserve_info") + private String reserveInfo; + @JsonProperty("switch") + private Integer guardSwitch; + + public String getDeviceId() { + return this.deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public List getSubDeviceIds() { + return this.subDeviceIds; + } + + public void setSubDeviceIds(List subDeviceIds) { + this.subDeviceIds = subDeviceIds; + } + + public String getLogId() { + return this.logId; + } + + public void setLogId(String logId) { + this.logId = logId; + } + + public String getReserveInfo() { + return this.reserveInfo; + } + + public void setReserveInfo(String reserveInfo) { + this.reserveInfo = reserveInfo; + } + + public Integer getGuardSwitch() { + return this.guardSwitch; + } + + public void setGuardSwitch(Integer guardSwitch) { + this.guardSwitch = guardSwitch; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/result/DeviceApplicationResult.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/result/DeviceApplicationResult.java new file mode 100644 index 00000000..ae3c6aec --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/result/DeviceApplicationResult.java @@ -0,0 +1,52 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.device.result; + +import java.io.Serializable; + +public class DeviceApplicationResult implements Serializable { + private static final long serialVersionUID = -3017130099914740103L; + private String id; + private String applicationId; + private String applicationName; + private String deviceId; + private String serviceCode; + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public String getApplicationId() { + return this.applicationId; + } + + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + public String getDeviceId() { + return this.deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public String getApplicationName() { + return this.applicationName; + } + + public void setApplicationName(String applicationName) { + this.applicationName = applicationName; + } + + public String getServiceCode() { + return this.serviceCode; + } + + public void setServiceCode(String serviceCode) { + this.serviceCode = serviceCode; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/result/DeviceAreaResult.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/result/DeviceAreaResult.java new file mode 100644 index 00000000..78cde1b2 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/result/DeviceAreaResult.java @@ -0,0 +1,70 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.device.result; + +import java.io.Serializable; + +public class DeviceAreaResult implements Serializable { + private static final long serialVersionUID = -5853531485552872375L; + private String id; + private String businessId; + private String code; + private String name; + private Integer orderBy; + private String parentId; + private Integer level; + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getCode() { + return this.code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public Integer getOrderBy() { + return this.orderBy; + } + + public void setOrderBy(Integer orderBy) { + this.orderBy = orderBy; + } + + public String getParentId() { + return this.parentId; + } + + public void setParentId(String parentId) { + this.parentId = parentId; + } + + public Integer getLevel() { + return this.level; + } + + public void setLevel(Integer level) { + this.level = level; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/result/DeviceDistrictResult.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/result/DeviceDistrictResult.java new file mode 100644 index 00000000..80555575 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/result/DeviceDistrictResult.java @@ -0,0 +1,70 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.device.result; + +import java.io.Serializable; + +public class DeviceDistrictResult implements Serializable { + private static final long serialVersionUID = 8453176561081140451L; + private String id; + private String districtCode; + private String districtName; + private Integer level; + private String parentId; + private String mergeName; + private String path; + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public String getDistrictCode() { + return this.districtCode; + } + + public void setDistrictCode(String districtCode) { + this.districtCode = districtCode; + } + + public String getDistrictName() { + return this.districtName; + } + + public void setDistrictName(String districtName) { + this.districtName = districtName; + } + + public Integer getLevel() { + return this.level; + } + + public void setLevel(Integer level) { + this.level = level; + } + + public String getParentId() { + return this.parentId; + } + + public void setParentId(String parentId) { + this.parentId = parentId; + } + + public String getMergeName() { + return this.mergeName; + } + + public void setMergeName(String mergeName) { + this.mergeName = mergeName; + } + + public String getPath() { + return this.path; + } + + public void setPath(String path) { + this.path = path; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/result/DeviceImageStoreResult.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/result/DeviceImageStoreResult.java new file mode 100644 index 00000000..2c1b484a --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/result/DeviceImageStoreResult.java @@ -0,0 +1,43 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.device.result; + +import java.io.Serializable; + +public class DeviceImageStoreResult implements Serializable { + private static final long serialVersionUID = -3407950997640159734L; + private String deviceId; + private String deviceName; + private String imageStoreId; + private String imageStoreName; + + public String getDeviceId() { + return this.deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public String getDeviceName() { + return this.deviceName; + } + + public void setDeviceName(String deviceName) { + this.deviceName = deviceName; + } + + public String getImageStoreId() { + return this.imageStoreId; + } + + public void setImageStoreId(String imageStoreId) { + this.imageStoreId = imageStoreId; + } + + public String getImageStoreName() { + return this.imageStoreName; + } + + public void setImageStoreName(String imageStoreName) { + this.imageStoreName = imageStoreName; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/result/DeviceResult.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/result/DeviceResult.java new file mode 100644 index 00000000..6d0db807 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/result/DeviceResult.java @@ -0,0 +1,322 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.device.result; + +import java.io.Serializable; + +public class DeviceResult implements Serializable { + private static final long serialVersionUID = -5356689053916559467L; + private String id; + private Long createTime; + private String createUserId; + private Long lastUpdateTime; + private String lastUpdateUserId; + private String deviceCode; + private String deviceTypeId; + private String deviceTypeCode; + private String deviceTypeIdTree; + private String deviceTypeName; + private String deviceName; + private String status; + private String onlineStatus; + private Long lastHeartbeatTime; + private String longitude; + private String latitude; + private String cameraUserName; + private String cameraPassword; + private String cameraMainRtspUrl; + private String protocol; + private String cameraIp; + private String cameraVmsRtspUrl; + private String districtId; + private String districtName; + private String districtPath; + private String districtMergeName; + private String areaId; + private String areaName; + private String areaAddr; + private String deviceTypeCategoryId; + private int identifyType; + private int isAutoSync; + private String snapshotProtocol; + private String remark; + private String deviceNetworkIp; + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public Long getCreateTime() { + return this.createTime; + } + + public void setCreateTime(Long createTime) { + this.createTime = createTime; + } + + public String getCreateUserId() { + return this.createUserId; + } + + public void setCreateUserId(String createUserId) { + this.createUserId = createUserId; + } + + public Long getLastUpdateTime() { + return this.lastUpdateTime; + } + + public void setLastUpdateTime(Long lastUpdateTime) { + this.lastUpdateTime = lastUpdateTime; + } + + public String getLastUpdateUserId() { + return this.lastUpdateUserId; + } + + public void setLastUpdateUserId(String lastUpdateUserId) { + this.lastUpdateUserId = lastUpdateUserId; + } + + public String getDeviceCode() { + return this.deviceCode; + } + + public void setDeviceCode(String deviceCode) { + this.deviceCode = deviceCode; + } + + public String getDeviceTypeId() { + return this.deviceTypeId; + } + + public void setDeviceTypeId(String deviceTypeId) { + this.deviceTypeId = deviceTypeId; + } + + public String getDeviceTypeCode() { + return this.deviceTypeCode; + } + + public void setDeviceTypeCode(String deviceTypeCode) { + this.deviceTypeCode = deviceTypeCode; + } + + public String getDeviceTypeIdTree() { + return this.deviceTypeIdTree; + } + + public void setDeviceTypeIdTree(String deviceTypeIdTree) { + this.deviceTypeIdTree = deviceTypeIdTree; + } + + public String getDeviceTypeName() { + return this.deviceTypeName; + } + + public void setDeviceTypeName(String deviceTypeName) { + this.deviceTypeName = deviceTypeName; + } + + public String getDeviceName() { + return this.deviceName; + } + + public void setDeviceName(String deviceName) { + this.deviceName = deviceName; + } + + public String getStatus() { + return this.status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getOnlineStatus() { + return this.onlineStatus; + } + + public void setOnlineStatus(String onlineStatus) { + this.onlineStatus = onlineStatus; + } + + public Long getLastHeartbeatTime() { + return this.lastHeartbeatTime; + } + + public void setLastHeartbeatTime(Long lastHeartbeatTime) { + this.lastHeartbeatTime = lastHeartbeatTime; + } + + public String getLongitude() { + return this.longitude; + } + + public void setLongitude(String longitude) { + this.longitude = longitude; + } + + public String getLatitude() { + return this.latitude; + } + + public void setLatitude(String latitude) { + this.latitude = latitude; + } + + public String getCameraUserName() { + return this.cameraUserName; + } + + public void setCameraUserName(String cameraUserName) { + this.cameraUserName = cameraUserName; + } + + public String getCameraPassword() { + return this.cameraPassword; + } + + public void setCameraPassword(String cameraPassword) { + this.cameraPassword = cameraPassword; + } + + public String getCameraMainRtspUrl() { + return this.cameraMainRtspUrl; + } + + public void setCameraMainRtspUrl(String cameraMainRtspUrl) { + this.cameraMainRtspUrl = cameraMainRtspUrl; + } + + public String getCameraVmsRtspUrl() { + return this.cameraVmsRtspUrl; + } + + public void setCameraVmsRtspUrl(String cameraVmsRtspUrl) { + this.cameraVmsRtspUrl = cameraVmsRtspUrl; + } + + public String getProtocol() { + return this.protocol; + } + + public void setProtocol(String protocol) { + this.protocol = protocol; + } + + public String getDistrictId() { + return this.districtId; + } + + public void setDistrictId(String districtId) { + this.districtId = districtId; + } + + public String getDistrictName() { + return this.districtName; + } + + public void setDistrictName(String districtName) { + this.districtName = districtName; + } + + public String getDistrictPath() { + return this.districtPath; + } + + public void setDistrictPath(String districtPath) { + this.districtPath = districtPath; + } + + public String getDistrictMergeName() { + return this.districtMergeName; + } + + public void setDistrictMergeName(String districtMergeName) { + this.districtMergeName = districtMergeName; + } + + public String getAreaId() { + return this.areaId; + } + + public void setAreaId(String areaId) { + this.areaId = areaId; + } + + public String getAreaName() { + return this.areaName; + } + + public void setAreaName(String areaName) { + this.areaName = areaName; + } + + public String getAreaAddr() { + return this.areaAddr; + } + + public void setAreaAddr(String areaAddr) { + this.areaAddr = areaAddr; + } + + public int getIdentifyType() { + return this.identifyType; + } + + public void setIdentifyType(int identifyType) { + this.identifyType = identifyType; + } + + public int getIsAutoSync() { + return this.isAutoSync; + } + + public void setIsAutoSync(int isAutoSync) { + this.isAutoSync = isAutoSync; + } + + public String getSnapshotProtocol() { + return this.snapshotProtocol; + } + + public void setSnapshotProtocol(String snapshotProtocol) { + this.snapshotProtocol = snapshotProtocol; + } + + public String getRemark() { + return this.remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public String getDeviceNetworkIp() { + return this.deviceNetworkIp; + } + + public void setDeviceNetworkIp(String deviceNetworkIp) { + this.deviceNetworkIp = deviceNetworkIp; + } + + public String getCameraIp() { + return this.cameraIp; + } + + public void setCameraIp(String cameraIp) { + this.cameraIp = cameraIp; + } + + public String getDeviceTypeCategoryId() { + return this.deviceTypeCategoryId; + } + + public void setDeviceTypeCategoryId(String deviceTypeCategoryId) { + this.deviceTypeCategoryId = deviceTypeCategoryId; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/result/DeviceSettingInitResult.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/result/DeviceSettingInitResult.java new file mode 100644 index 00000000..53b1c144 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/result/DeviceSettingInitResult.java @@ -0,0 +1,102 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.device.result; + +import java.io.Serializable; +import java.util.List; + +public class DeviceSettingInitResult implements Serializable { + private static final long serialVersionUID = -3585783977521977806L; + private String deviceId; + private Boolean hasSucess; + private List settings; + + public String getDeviceId() { + return this.deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public Boolean getHasSucess() { + return this.hasSucess; + } + + public void setHasSucess(Boolean hasSucess) { + this.hasSucess = hasSucess; + } + + public List getSettings() { + return this.settings; + } + + public void setSettings(List settings) { + this.settings = settings; + } + + public static class DeviceSettings implements Serializable { + private static final long serialVersionUID = -509498808431351572L; + private String id; + private String settingAttrName; + private String settingAttrValue; + private String settingAttrRemark; + private String settingAttrCode; + private String settingParentId; + private List child; + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public String getSettingAttrName() { + return this.settingAttrName; + } + + public void setSettingAttrName(String settingAttrName) { + this.settingAttrName = settingAttrName; + } + + public String getSettingAttrValue() { + return this.settingAttrValue; + } + + public void setSettingAttrValue(String settingAttrValue) { + this.settingAttrValue = settingAttrValue; + } + + public String getSettingAttrRemark() { + return this.settingAttrRemark; + } + + public void setSettingAttrRemark(String settingAttrRemark) { + this.settingAttrRemark = settingAttrRemark; + } + + public String getSettingAttrCode() { + return this.settingAttrCode; + } + + public void setSettingAttrCode(String settingAttrCode) { + this.settingAttrCode = settingAttrCode; + } + + public String getSettingParentId() { + return this.settingParentId; + } + + public void setSettingParentId(String settingParentId) { + this.settingParentId = settingParentId; + } + + public List getChild() { + return this.child; + } + + public void setChild(List child) { + this.child = child; + } + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/result/DeviceSettingNotifyResult.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/result/DeviceSettingNotifyResult.java new file mode 100644 index 00000000..0b055c63 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/result/DeviceSettingNotifyResult.java @@ -0,0 +1,34 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.device.result; + +import java.io.Serializable; + +public class DeviceSettingNotifyResult implements Serializable { + private static final long serialVersionUID = -4849133823593531237L; + private String logId; + private String deviceId; + private String reserveInfo; + + public String getLogId() { + return this.logId; + } + + public void setLogId(String logId) { + this.logId = logId; + } + + public String getDeviceId() { + return this.deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public String getReserveInfo() { + return this.reserveInfo; + } + + public void setReserveInfo(String reserveInfo) { + this.reserveInfo = reserveInfo; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/result/DeviceSettingResult.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/result/DeviceSettingResult.java new file mode 100644 index 00000000..b2472cf1 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/result/DeviceSettingResult.java @@ -0,0 +1,102 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.device.result; + +import java.io.Serializable; +import java.util.List; + +public class DeviceSettingResult implements Serializable { + private static final long serialVersionUID = -3585783977521977806L; + private String deviceId; + private List settings; + + public String getDeviceId() { + return this.deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public List getSettings() { + return this.settings; + } + + public void setSettings(List settings) { + this.settings = settings; + } + + public static class DeviceSettings implements Serializable { + private static final long serialVersionUID = -509498808431351572L; + private String id; + private String settingAttrName; + private String settingAttrValue; + private String settingAttrRemark; + private String settingAttrCode; + private String settingAttrDisplay; + private String settingParentId; + private List child; + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public String getSettingAttrName() { + return this.settingAttrName; + } + + public void setSettingAttrName(String settingAttrName) { + this.settingAttrName = settingAttrName; + } + + public String getSettingAttrValue() { + return this.settingAttrValue; + } + + public void setSettingAttrValue(String settingAttrValue) { + this.settingAttrValue = settingAttrValue; + } + + public String getSettingAttrRemark() { + return this.settingAttrRemark; + } + + public void setSettingAttrRemark(String settingAttrRemark) { + this.settingAttrRemark = settingAttrRemark; + } + + public String getSettingAttrCode() { + return this.settingAttrCode; + } + + public void setSettingAttrCode(String settingAttrCode) { + this.settingAttrCode = settingAttrCode; + } + + public String getSettingAttrDisplay() { + return this.settingAttrDisplay; + } + + public void setSettingAttrDisplay(String settingAttrDisplay) { + this.settingAttrDisplay = settingAttrDisplay; + } + + public String getSettingParentId() { + return this.settingParentId; + } + + public void setSettingParentId(String settingParentId) { + this.settingParentId = settingParentId; + } + + public List getChild() { + return this.child; + } + + public void setChild(List child) { + this.child = child; + } + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/result/DeviceStatusResult.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/result/DeviceStatusResult.java new file mode 100644 index 00000000..8c532117 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/result/DeviceStatusResult.java @@ -0,0 +1,48 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.device.result; + +import java.io.Serializable; + +public class DeviceStatusResult implements Serializable { + private static final long serialVersionUID = -3535840233209237358L; + private String total; + private String onlineTotal; + private String offlineTotal; + private String alarmTotal; + + public String getTotal() { + return this.total; + } + + public void setTotal(String total) { + this.total = total; + } + + public String getOnlineTotal() { + return this.onlineTotal; + } + + public void setOnlineTotal(String onlineTotal) { + this.onlineTotal = onlineTotal; + } + + public String getOfflineTotal() { + return this.offlineTotal; + } + + public void setOfflineTotal(String offlineTotal) { + this.offlineTotal = offlineTotal; + } + + public String getAlarmTotal() { + return this.alarmTotal; + } + + public void setAlarmTotal(String alarmTotal) { + this.alarmTotal = alarmTotal; + } + + public String toString() { + return "AcsDeviceStatusResult{total='" + this.total + '\'' + ", onlineTotal='" + this.onlineTotal + '\'' + + ", offlineTotal='" + this.offlineTotal + '\'' + ", alarmTotal='" + this.alarmTotal + '\'' + '}'; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/result/DeviceTypeResult.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/result/DeviceTypeResult.java new file mode 100644 index 00000000..44035ae5 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/result/DeviceTypeResult.java @@ -0,0 +1,75 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.device.result; + +import java.io.Serializable; +import java.util.List; + +public class DeviceTypeResult implements Serializable { + private static final long serialVersionUID = -3632869555376118817L; + private String id; + private String name; + private List children; + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public List getChildren() { + return this.children; + } + + public void setChildren(List children) { + this.children = children; + } + + public static class DeviceTypeDetailResult implements Serializable { + private static final long serialVersionUID = 7986719991301620566L; + private String id; + private String deviceTypeCode; + private Boolean ifThirdParty; + private String name; + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public String getDeviceTypeCode() { + return this.deviceTypeCode; + } + + public void setDeviceTypeCode(String deviceTypeCode) { + this.deviceTypeCode = deviceTypeCode; + } + + public Boolean getIfThirdParty() { + return this.ifThirdParty; + } + + public void setIfThirdParty(Boolean ifThirdParty) { + this.ifThirdParty = ifThirdParty; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/result/EntranceGuardControlResult.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/result/EntranceGuardControlResult.java new file mode 100644 index 00000000..d979e04f --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/result/EntranceGuardControlResult.java @@ -0,0 +1,34 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.device.result; + +import java.io.Serializable; + +public class EntranceGuardControlResult implements Serializable { + private static final long serialVersionUID = 6304980376433790660L; + private String logId; + private String deviceId; + private String reserveInfo; + + public String getLogId() { + return this.logId; + } + + public void setLogId(String logId) { + this.logId = logId; + } + + public String getDeviceId() { + return this.deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public String getReserveInfo() { + return this.reserveInfo; + } + + public void setReserveInfo(String reserveInfo) { + this.reserveInfo = reserveInfo; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/service/DeviceApplicationService.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/service/DeviceApplicationService.java new file mode 100644 index 00000000..370c5893 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/service/DeviceApplicationService.java @@ -0,0 +1,20 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.device.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceApplicationParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceApplicationQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceApplicationResult; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import java.util.List; + +public interface DeviceApplicationService { + CloudwalkResult add(DeviceApplicationParam paramDeviceApplicationParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult delete(DeviceApplicationParam paramDeviceApplicationParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult> list(DeviceApplicationQueryParam paramDeviceApplicationQueryParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/service/DeviceAreaService.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/service/DeviceAreaService.java new file mode 100644 index 00000000..a006235d --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/service/DeviceAreaService.java @@ -0,0 +1,15 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.device.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceAreaDeleteParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceAreaQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceAreaResult; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import java.util.List; + +public interface DeviceAreaService { + CloudwalkResult> list(DeviceAreaQueryParam paramDeviceAreaQueryParam) + throws ServiceException; + + CloudwalkResult delete(DeviceAreaDeleteParam paramDeviceAreaDeleteParam) throws ServiceException; +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/service/DeviceDistrictService.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/service/DeviceDistrictService.java new file mode 100644 index 00000000..632f14eb --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/service/DeviceDistrictService.java @@ -0,0 +1,12 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.device.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceDistrictQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceDistrictResult; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import java.util.List; + +public interface DeviceDistrictService { + CloudwalkResult> list(DeviceDistrictQueryParam paramDeviceDistrictQueryParam) + throws ServiceException; +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/service/DeviceImageStoreService.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/service/DeviceImageStoreService.java new file mode 100644 index 00000000..06059b58 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/service/DeviceImageStoreService.java @@ -0,0 +1,29 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.device.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceImageStoreParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceImageStoreQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceImageStoreSaveParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceImageStoreResult; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import java.util.List; + +public interface DeviceImageStoreService { + CloudwalkResult add(DeviceImageStoreParam paramDeviceImageStoreParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult delete(DeviceImageStoreParam paramDeviceImageStoreParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult save(DeviceImageStoreSaveParam paramDeviceImageStoreSaveParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult> list(DeviceImageStoreQueryParam paramDeviceImageStoreQueryParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult> + page(DeviceImageStoreQueryParam paramDeviceImageStoreQueryParam, CloudwalkCallContext paramCloudwalkCallContext) + throws ServiceException; +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/service/DeviceKitService.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/service/DeviceKitService.java new file mode 100644 index 00000000..cb8fe7c6 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/service/DeviceKitService.java @@ -0,0 +1,12 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.device.service; + +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.device.sdk.protocol.entity.v2proto.http.param.UpdatePersonParam; +import cn.cloudwalk.device.sdk.protocol.entity.v2proto.http.result.UpdatePersonResult; + +public interface DeviceKitService { + CloudwalkResult updatePerson(UpdatePersonParam paramUpdatePersonParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/service/DeviceNotifyService.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/service/DeviceNotifyService.java new file mode 100644 index 00000000..384edc29 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/service/DeviceNotifyService.java @@ -0,0 +1,16 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.device.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceSettingNotifyParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.EntranceGuardControlParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceSettingNotifyResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.EntranceGuardControlResult; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; + +public interface DeviceNotifyService { + CloudwalkResult notifySetting(DeviceSettingNotifyParam paramDeviceSettingNotifyParam) + throws ServiceException; + + CloudwalkResult + entranceGuardControl(EntranceGuardControlParam paramEntranceGuardControlParam) throws ServiceException; +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/service/DeviceService.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/service/DeviceService.java new file mode 100644 index 00000000..1bc577c7 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/service/DeviceService.java @@ -0,0 +1,28 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.device.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceDeleteParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceStatusResult; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import java.util.List; + +public interface DeviceService { + CloudwalkResult> list(DeviceQueryParam paramDeviceQueryParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult> filterList(Integer paramInteger, DeviceQueryParam paramDeviceQueryParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult> page(DeviceQueryParam paramDeviceQueryParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult statusCount(CloudwalkCallContext paramCloudwalkCallContext) + throws ServiceException; + + CloudwalkResult delete(DeviceDeleteParam paramDeviceDeleteParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/service/DeviceSettingService.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/service/DeviceSettingService.java new file mode 100644 index 00000000..9ec13231 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/service/DeviceSettingService.java @@ -0,0 +1,17 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.device.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceSettingInitParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceSettingQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceSettingInitResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceSettingResult; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import java.util.List; + +public interface DeviceSettingService { + CloudwalkResult> query(DeviceSettingQueryParam paramDeviceSettingQueryParam) + throws ServiceException; + + CloudwalkResult> defaultSettings(DeviceSettingInitParam paramDeviceSettingInitParam) + throws ServiceException; +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/service/DeviceTypeService.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/service/DeviceTypeService.java new file mode 100644 index 00000000..6aa61891 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/device/service/DeviceTypeService.java @@ -0,0 +1,11 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.device.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceTypeQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceTypeResult; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import java.util.List; + +public interface DeviceTypeService { + CloudwalkResult> get(DeviceTypeQueryParam paramDeviceTypeQueryParam) throws ServiceException; +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/elevator/param/AcsPersonAddVisitorParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/elevator/param/AcsPersonAddVisitorParam.java new file mode 100644 index 00000000..cbb11f2f --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/elevator/param/AcsPersonAddVisitorParam.java @@ -0,0 +1,53 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.elevator.param; + +import java.io.Serializable; +import java.util.List; + +public class AcsPersonAddVisitorParam implements Serializable { + private static final long serialVersionUID = 7916140658162290825L; + private String visitorId; + private String personId; + private Long begVisitorTime; + private Long endVisitorTime; + private List floorIds; + + public List getFloorIds() { + return this.floorIds; + } + + public void setFloorIds(List floorIds) { + this.floorIds = floorIds; + } + + public String getVisitorId() { + return this.visitorId; + } + + public void setVisitorId(String visitorId) { + this.visitorId = visitorId; + } + + public String getPersonId() { + return this.personId; + } + + public void setPersonId(String personId) { + this.personId = personId; + } + + public Long getBegVisitorTime() { + return this.begVisitorTime; + } + + public void setBegVisitorTime(Long begVisitorTime) { + this.begVisitorTime = begVisitorTime; + } + + public Long getEndVisitorTime() { + return this.endVisitorTime; + } + + public void setEndVisitorTime(Long endVisitorTime) { + this.endVisitorTime = endVisitorTime; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/elevator/service/ElevatorPersonService.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/elevator/service/ElevatorPersonService.java new file mode 100644 index 00000000..a6e47e14 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/elevator/service/ElevatorPersonService.java @@ -0,0 +1,11 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.elevator.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.elevator.param.AcsPersonAddVisitorParam; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; + +public interface ElevatorPersonService { + CloudwalkResult addVisitor(AcsPersonAddVisitorParam paramAcsPersonAddVisitorParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/email/param/EmailSendParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/email/param/EmailSendParam.java new file mode 100644 index 00000000..20a076e5 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/email/param/EmailSendParam.java @@ -0,0 +1,43 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.email.param; + +import java.io.Serializable; + +public class EmailSendParam implements Serializable { + private static final long serialVersionUID = -2314735328497391125L; + private String serviceCode; + private String email; + private String title; + private String content; + + public String getServiceCode() { + return this.serviceCode; + } + + public void setServiceCode(String serviceCode) { + this.serviceCode = serviceCode; + } + + public String getEmail() { + return this.email; + } + + public void setEmail(String email) { + this.email = email; + } + + public String getTitle() { + return this.title; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getContent() { + return this.content; + } + + public void setContent(String content) { + this.content = content; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/email/service/EmailSendService.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/email/service/EmailSendService.java new file mode 100644 index 00000000..6e0c6ba0 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/email/service/EmailSendService.java @@ -0,0 +1,11 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.email.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.email.param.EmailSendParam; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; + +public interface EmailSendService { + CloudwalkResult send(EmailSendParam paramEmailSendParam, CloudwalkCallContext paramCloudwalkCallContext) + throws ServiceException; +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/file/param/FileFinishParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/file/param/FileFinishParam.java new file mode 100644 index 00000000..42c33509 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/file/param/FileFinishParam.java @@ -0,0 +1,58 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.file.param; + +public class FileFinishParam { + private String fileId; + private Long fileSize; + private String filePath; + private Integer fileStatus; + private String errorCode; + private String errorMessage; + + public String getFileId() { + return this.fileId; + } + + public void setFileId(String fileId) { + this.fileId = fileId; + } + + public Long getFileSize() { + return this.fileSize; + } + + public void setFileSize(Long fileSize) { + this.fileSize = fileSize; + } + + public String getFilePath() { + return this.filePath; + } + + public void setFilePath(String filePath) { + this.filePath = filePath; + } + + public Integer getFileStatus() { + return this.fileStatus; + } + + public void setFileStatus(Integer fileStatus) { + this.fileStatus = fileStatus; + } + + public String getErrorCode() { + return this.errorCode; + } + + public void setErrorCode(String errorCode) { + this.errorCode = errorCode; + } + + public String getErrorMessage() { + return this.errorMessage; + } + + public void setErrorMessage(String errorMessage) { + this.errorMessage = errorMessage; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/file/param/FileGetParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/file/param/FileGetParam.java new file mode 100644 index 00000000..98a10cb5 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/file/param/FileGetParam.java @@ -0,0 +1,13 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.file.param; + +public class FileGetParam { + private String fileId; + + public String getFileId() { + return this.fileId; + } + + public void setFileId(String fileId) { + this.fileId = fileId; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/file/param/FileInitParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/file/param/FileInitParam.java new file mode 100644 index 00000000..2e56dc8c --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/file/param/FileInitParam.java @@ -0,0 +1,22 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.file.param; + +public class FileInitParam { + private String fileName; + private String applicationId; + + public String getFileName() { + return this.fileName; + } + + public void setFileName(String fileName) { + this.fileName = fileName; + } + + public String getApplicationId() { + return this.applicationId; + } + + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/file/result/FileDetail.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/file/result/FileDetail.java new file mode 100644 index 00000000..ceb8eb30 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/file/result/FileDetail.java @@ -0,0 +1,175 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.file.result; + +public class FileDetail { + private String id; + private String orgId; + private String fileName; + private String filePath; + private Long fileSize; + private String serviceCode; + private String serviceName; + private String businessId; + private String applicationId; + private Integer status; + private Integer readStatus; + private Long createTime; + private String createUserId; + private Long lastUpdateTime; + private String lastUpdateUserId; + private String fileAddress; + private String createUserName; + private String errorCode; + private String errorMessage; + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public String getOrgId() { + return this.orgId; + } + + public void setOrgId(String orgId) { + this.orgId = orgId; + } + + public String getFileName() { + return this.fileName; + } + + public void setFileName(String fileName) { + this.fileName = fileName; + } + + public String getFilePath() { + return this.filePath; + } + + public void setFilePath(String filePath) { + this.filePath = filePath; + } + + public Long getFileSize() { + return this.fileSize; + } + + public void setFileSize(Long fileSize) { + this.fileSize = fileSize; + } + + public String getServiceCode() { + return this.serviceCode; + } + + public void setServiceCode(String serviceCode) { + this.serviceCode = serviceCode; + } + + public String getServiceName() { + return this.serviceName; + } + + public void setServiceName(String serviceName) { + this.serviceName = serviceName; + } + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getApplicationId() { + return this.applicationId; + } + + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + public Integer getStatus() { + return this.status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Integer getReadStatus() { + return this.readStatus; + } + + public void setReadStatus(Integer readStatus) { + this.readStatus = readStatus; + } + + public Long getCreateTime() { + return this.createTime; + } + + public void setCreateTime(Long createTime) { + this.createTime = createTime; + } + + public String getCreateUserId() { + return this.createUserId; + } + + public void setCreateUserId(String createUserId) { + this.createUserId = createUserId; + } + + public Long getLastUpdateTime() { + return this.lastUpdateTime; + } + + public void setLastUpdateTime(Long lastUpdateTime) { + this.lastUpdateTime = lastUpdateTime; + } + + public String getLastUpdateUserId() { + return this.lastUpdateUserId; + } + + public void setLastUpdateUserId(String lastUpdateUserId) { + this.lastUpdateUserId = lastUpdateUserId; + } + + public String getFileAddress() { + return this.fileAddress; + } + + public void setFileAddress(String fileAddress) { + this.fileAddress = fileAddress; + } + + public String getCreateUserName() { + return this.createUserName; + } + + public void setCreateUserName(String createUserName) { + this.createUserName = createUserName; + } + + public String getErrorCode() { + return this.errorCode; + } + + public void setErrorCode(String errorCode) { + this.errorCode = errorCode; + } + + public String getErrorMessage() { + return this.errorMessage; + } + + public void setErrorMessage(String errorMessage) { + this.errorMessage = errorMessage; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/file/service/FileService.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/file/service/FileService.java new file mode 100644 index 00000000..8c6ff56d --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/file/service/FileService.java @@ -0,0 +1,20 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.file.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.file.param.FileFinishParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.file.param.FileGetParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.file.param.FileInitParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.file.result.FileDetail; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; + +public interface FileService { + CloudwalkResult init(FileInitParam paramFileInitParam, CloudwalkCallContext paramCloudwalkCallContext) + throws ServiceException; + + CloudwalkResult finish(FileFinishParam paramFileFinishParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult get(FileGetParam paramFileGetParam, CloudwalkCallContext paramCloudwalkCallContext) + throws ServiceException; +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/param/DevicePersonResyncParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/param/DevicePersonResyncParam.java new file mode 100644 index 00000000..c14fa091 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/param/DevicePersonResyncParam.java @@ -0,0 +1,31 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param; + +public class DevicePersonResyncParam { + private String deviceId; + private String imageStoreId; + private String personId; + + public String getDeviceId() { + return this.deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public String getImageStoreId() { + return this.imageStoreId; + } + + public void setImageStoreId(String imageStoreId) { + this.imageStoreId = imageStoreId; + } + + public String getPersonId() { + return this.personId; + } + + public void setPersonId(String personId) { + this.personId = personId; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/param/DevicePersonResyncRequestParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/param/DevicePersonResyncRequestParam.java new file mode 100644 index 00000000..afb487bd --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/param/DevicePersonResyncRequestParam.java @@ -0,0 +1,15 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param; + +import java.util.List; + +public class DevicePersonResyncRequestParam { + private List data; + + public List getData() { + return this.data; + } + + public void setData(List data) { + this.data = data; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/param/ImageStoreAddParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/param/ImageStoreAddParam.java new file mode 100644 index 00000000..04c4ff3a --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/param/ImageStoreAddParam.java @@ -0,0 +1,125 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param; + +import java.io.Serializable; +import java.util.List; + +public class ImageStoreAddParam implements Serializable { + private static final long serialVersionUID = -4752584836625211996L; + private String businessId; + private String name; + private Short type; + private String sourceApplicationId; + private List includeOrganizations; + private List includeLabels; + private List includePersons; + private List excludeLabels; + private List excludePersons; + private Long expiryBeginDate; + private Long expiryEndDate; + private List validDateCron; + private Boolean nullDateIsLongTerm; + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public Short getType() { + return this.type; + } + + public void setType(Short type) { + this.type = type; + } + + public String getSourceApplicationId() { + return this.sourceApplicationId; + } + + public void setSourceApplicationId(String sourceApplicationId) { + this.sourceApplicationId = sourceApplicationId; + } + + public List getIncludeOrganizations() { + return this.includeOrganizations; + } + + public void setIncludeOrganizations(List includeOrganizations) { + this.includeOrganizations = includeOrganizations; + } + + public List getIncludeLabels() { + return this.includeLabels; + } + + public void setIncludeLabels(List includeLabels) { + this.includeLabels = includeLabels; + } + + public List getIncludePersons() { + return this.includePersons; + } + + public void setIncludePersons(List includePersons) { + this.includePersons = includePersons; + } + + public List getExcludeLabels() { + return this.excludeLabels; + } + + public void setExcludeLabels(List excludeLabels) { + this.excludeLabels = excludeLabels; + } + + public List getExcludePersons() { + return this.excludePersons; + } + + public void setExcludePersons(List excludePersons) { + this.excludePersons = excludePersons; + } + + public Long getExpiryBeginDate() { + return this.expiryBeginDate; + } + + public void setExpiryBeginDate(Long expiryBeginDate) { + this.expiryBeginDate = expiryBeginDate; + } + + public Long getExpiryEndDate() { + return this.expiryEndDate; + } + + public void setExpiryEndDate(Long expiryEndDate) { + this.expiryEndDate = expiryEndDate; + } + + public List getValidDateCron() { + return this.validDateCron; + } + + public void setValidDateCron(List validDateCron) { + this.validDateCron = validDateCron; + } + + public Boolean getNullDateIsLongTerm() { + return this.nullDateIsLongTerm; + } + + public void setNullDateIsLongTerm(Boolean nullDateIsLongTerm) { + this.nullDateIsLongTerm = nullDateIsLongTerm; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/param/ImageStoreDelParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/param/ImageStoreDelParam.java new file mode 100644 index 00000000..10ee6f1b --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/param/ImageStoreDelParam.java @@ -0,0 +1,25 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param; + +import java.io.Serializable; + +public class ImageStoreDelParam implements Serializable { + private static final long serialVersionUID = -7757948003771596121L; + private String id; + private String businessId; + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/param/ImageStoreEditParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/param/ImageStoreEditParam.java new file mode 100644 index 00000000..27084ecb --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/param/ImageStoreEditParam.java @@ -0,0 +1,116 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param; + +import java.io.Serializable; +import java.util.List; + +public class ImageStoreEditParam implements Serializable { + private static final long serialVersionUID = -318653703709582283L; + private String businessId; + private String imageStoreId; + private String name; + private List includeOrganizations; + private List includeLabels; + private List includePersons; + private List excludeLabels; + private List excludePersons; + private Long expiryBeginDate; + private Long expiryEndDate; + private List validDateCron; + private Boolean nullDateIsLongTerm; + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getImageStoreId() { + return this.imageStoreId; + } + + public void setImageStoreId(String imageStoreId) { + this.imageStoreId = imageStoreId; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public List getIncludeOrganizations() { + return this.includeOrganizations; + } + + public void setIncludeOrganizations(List includeOrganizations) { + this.includeOrganizations = includeOrganizations; + } + + public List getIncludeLabels() { + return this.includeLabels; + } + + public void setIncludeLabels(List includeLabels) { + this.includeLabels = includeLabels; + } + + public List getIncludePersons() { + return this.includePersons; + } + + public void setIncludePersons(List includePersons) { + this.includePersons = includePersons; + } + + public List getExcludeLabels() { + return this.excludeLabels; + } + + public void setExcludeLabels(List excludeLabels) { + this.excludeLabels = excludeLabels; + } + + public List getExcludePersons() { + return this.excludePersons; + } + + public void setExcludePersons(List excludePersons) { + this.excludePersons = excludePersons; + } + + public Long getExpiryBeginDate() { + return this.expiryBeginDate; + } + + public void setExpiryBeginDate(Long expiryBeginDate) { + this.expiryBeginDate = expiryBeginDate; + } + + public Long getExpiryEndDate() { + return this.expiryEndDate; + } + + public void setExpiryEndDate(Long expiryEndDate) { + this.expiryEndDate = expiryEndDate; + } + + public List getValidDateCron() { + return this.validDateCron; + } + + public void setValidDateCron(List validDateCron) { + this.validDateCron = validDateCron; + } + + public Boolean getNullDateIsLongTerm() { + return this.nullDateIsLongTerm; + } + + public void setNullDateIsLongTerm(Boolean nullDateIsLongTerm) { + this.nullDateIsLongTerm = nullDateIsLongTerm; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/param/ImageStorePersonBindParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/param/ImageStorePersonBindParam.java new file mode 100644 index 00000000..bc8af52a --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/param/ImageStorePersonBindParam.java @@ -0,0 +1,71 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param; + +import java.io.Serializable; +import java.util.List; + +public class ImageStorePersonBindParam implements Serializable { + private static final long serialVersionUID = 9091344259594326737L; + private String imageStoreId; + private String personId; + private List personIds; + private Long expiryBeginDate; + private Long expiryEndDate; + private List validDateCron; + private Boolean nullDateIsLongTerm; + + public List getPersonIds() { + return this.personIds; + } + + public void setPersonIds(List personIds) { + this.personIds = personIds; + } + + public String getImageStoreId() { + return this.imageStoreId; + } + + public void setImageStoreId(String imageStoreId) { + this.imageStoreId = imageStoreId; + } + + public String getPersonId() { + return this.personId; + } + + public void setPersonId(String personId) { + this.personId = personId; + } + + public Long getExpiryBeginDate() { + return this.expiryBeginDate; + } + + public void setExpiryBeginDate(Long expiryBeginDate) { + this.expiryBeginDate = expiryBeginDate; + } + + public Long getExpiryEndDate() { + return this.expiryEndDate; + } + + public void setExpiryEndDate(Long expiryEndDate) { + this.expiryEndDate = expiryEndDate; + } + + public List getValidDateCron() { + return this.validDateCron; + } + + public void setValidDateCron(List validDateCron) { + this.validDateCron = validDateCron; + } + + public Boolean getNullDateIsLongTerm() { + return this.nullDateIsLongTerm; + } + + public void setNullDateIsLongTerm(Boolean nullDateIsLongTerm) { + this.nullDateIsLongTerm = nullDateIsLongTerm; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/param/ImageStorePersonData.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/param/ImageStorePersonData.java new file mode 100644 index 00000000..7ac7dfe4 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/param/ImageStorePersonData.java @@ -0,0 +1,44 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param; + +import java.io.Serializable; +import java.util.List; + +public class ImageStorePersonData implements Serializable { + private static final long serialVersionUID = -2390114338999450327L; + private String objectId; + private Long expiryBeginDate; + private Long expiryEndDate; + private List validDateCron; + + public String getObjectId() { + return this.objectId; + } + + public void setObjectId(String objectId) { + this.objectId = objectId; + } + + public Long getExpiryBeginDate() { + return this.expiryBeginDate; + } + + public void setExpiryBeginDate(Long expiryBeginDate) { + this.expiryBeginDate = expiryBeginDate; + } + + public Long getExpiryEndDate() { + return this.expiryEndDate; + } + + public void setExpiryEndDate(Long expiryEndDate) { + this.expiryEndDate = expiryEndDate; + } + + public List getValidDateCron() { + return this.validDateCron; + } + + public void setValidDateCron(List validDateCron) { + this.validDateCron = validDateCron; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/param/ImageStorePersonDelParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/param/ImageStorePersonDelParam.java new file mode 100644 index 00000000..474c7787 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/param/ImageStorePersonDelParam.java @@ -0,0 +1,25 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param; + +import java.io.Serializable; + +public class ImageStorePersonDelParam implements Serializable { + private static final long serialVersionUID = 7863455323559730674L; + private String imageStoreId; + private String personId; + + public String getImageStoreId() { + return this.imageStoreId; + } + + public void setImageStoreId(String imageStoreId) { + this.imageStoreId = imageStoreId; + } + + public String getPersonId() { + return this.personId; + } + + public void setPersonId(String personId) { + this.personId = personId; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/param/ImageStorePersonQueryParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/param/ImageStorePersonQueryParam.java new file mode 100644 index 00000000..9e80ee5d --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/param/ImageStorePersonQueryParam.java @@ -0,0 +1,125 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param; + +import cn.cloudwalk.cloud.page.CloudwalkBasePageForm; +import java.util.List; + +public class ImageStorePersonQueryParam extends CloudwalkBasePageForm { + private static final long serialVersionUID = -1845645392767053837L; + private String imageStoreId; + private List imageStoreIds; + private String personId; + private String name; + private List personIds; + private List labelIds; + private List organizationIds; + private Integer ageStart; + private Integer ageEnd; + private Long groupTimeStart; + private Long groupTimeEnd; + private Integer isElevator; + private List delPersonIds; + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public List getDelPersonIds() { + return this.delPersonIds; + } + + public void setDelPersonIds(List delPersonIds) { + this.delPersonIds = delPersonIds; + } + + public Integer getIsElevator() { + return this.isElevator; + } + + public void setIsElevator(Integer isElevator) { + this.isElevator = isElevator; + } + + public String getImageStoreId() { + return this.imageStoreId; + } + + public void setImageStoreId(String imageStoreId) { + this.imageStoreId = imageStoreId; + } + + public String getPersonId() { + return this.personId; + } + + public void setPersonId(String personId) { + this.personId = personId; + } + + public List getLabelIds() { + return this.labelIds; + } + + public void setLabelIds(List labelIds) { + this.labelIds = labelIds; + } + + public List getOrganizationIds() { + return this.organizationIds; + } + + public void setOrganizationIds(List organizationIds) { + this.organizationIds = organizationIds; + } + + public Integer getAgeStart() { + return this.ageStart; + } + + public void setAgeStart(Integer ageStart) { + this.ageStart = ageStart; + } + + public Integer getAgeEnd() { + return this.ageEnd; + } + + public void setAgeEnd(Integer ageEnd) { + this.ageEnd = ageEnd; + } + + public Long getGroupTimeStart() { + return this.groupTimeStart; + } + + public void setGroupTimeStart(Long groupTimeStart) { + this.groupTimeStart = groupTimeStart; + } + + public Long getGroupTimeEnd() { + return this.groupTimeEnd; + } + + public void setGroupTimeEnd(Long groupTimeEnd) { + this.groupTimeEnd = groupTimeEnd; + } + + public List getImageStoreIds() { + return this.imageStoreIds; + } + + public void setImageStoreIds(List imageStoreIds) { + this.imageStoreIds = imageStoreIds; + } + + public List getPersonIds() { + return this.personIds; + } + + public void setPersonIds(List personIds) { + this.personIds = personIds; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/param/ImageStorePersonSaveParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/param/ImageStorePersonSaveParam.java new file mode 100644 index 00000000..e0ce7994 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/param/ImageStorePersonSaveParam.java @@ -0,0 +1,70 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param; + +import java.io.Serializable; + +public class ImageStorePersonSaveParam implements Serializable { + private static final long serialVersionUID = 5628244051985256505L; + private String imageStoreId; + private String personId; + private String name; + private Long expiryBeginDate; + private Long expiryEndDate; + private String comparePicture; + private String imageBase64; + + public String getImageStoreId() { + return this.imageStoreId; + } + + public void setImageStoreId(String imageStoreId) { + this.imageStoreId = imageStoreId; + } + + public String getPersonId() { + return this.personId; + } + + public void setPersonId(String personId) { + this.personId = personId; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public Long getExpiryBeginDate() { + return this.expiryBeginDate; + } + + public void setExpiryBeginDate(Long expiryBeginDate) { + this.expiryBeginDate = expiryBeginDate; + } + + public Long getExpiryEndDate() { + return this.expiryEndDate; + } + + public void setExpiryEndDate(Long expiryEndDate) { + this.expiryEndDate = expiryEndDate; + } + + public String getComparePicture() { + return this.comparePicture; + } + + public void setComparePicture(String comparePicture) { + this.comparePicture = comparePicture; + } + + public String getImageBase64() { + return this.imageBase64; + } + + public void setImageBase64(String imageBase64) { + this.imageBase64 = imageBase64; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/param/ImageStoreQueryParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/param/ImageStoreQueryParam.java new file mode 100644 index 00000000..f5d16237 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/param/ImageStoreQueryParam.java @@ -0,0 +1,125 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param; + +import cn.cloudwalk.cloud.page.CloudwalkBasePageForm; +import java.util.List; + +public class ImageStoreQueryParam extends CloudwalkBasePageForm { + private static final long serialVersionUID = 4877153715503098703L; + private List ids; + private List personIds; + private List imageIds; + private String name; + private Integer type; + private String businessId; + private String applicationId; + private List applicationIds; + private List businessIds; + private String orgId; + private List orgIds; + private String sourceApplicationId; + private List labelIds; + + public List getIds() { + return this.ids; + } + + public void setIds(List ids) { + this.ids = ids; + } + + public List getPersonIds() { + return this.personIds; + } + + public void setPersonIds(List personIds) { + this.personIds = personIds; + } + + public List getImageIds() { + return this.imageIds; + } + + public void setImageIds(List imageIds) { + this.imageIds = imageIds; + } + + public Integer getType() { + return this.type; + } + + public void setType(Integer type) { + this.type = type; + } + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getApplicationId() { + return this.applicationId; + } + + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + public String getOrgId() { + return this.orgId; + } + + public void setOrgId(String orgId) { + this.orgId = orgId; + } + + public List getOrgIds() { + return this.orgIds; + } + + public void setOrgIds(List orgIds) { + this.orgIds = orgIds; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public List getApplicationIds() { + return this.applicationIds; + } + + public void setApplicationIds(List applicationIds) { + this.applicationIds = applicationIds; + } + + public List getBusinessIds() { + return this.businessIds; + } + + public void setBusinessIds(List businessIds) { + this.businessIds = businessIds; + } + + public String getSourceApplicationId() { + return this.sourceApplicationId; + } + + public void setSourceApplicationId(String sourceApplicationId) { + this.sourceApplicationId = sourceApplicationId; + } + + public List getLabelIds() { + return this.labelIds; + } + + public void setLabelIds(List labelIds) { + this.labelIds = labelIds; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/param/QueryDevicePersonSyncLogParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/param/QueryDevicePersonSyncLogParam.java new file mode 100644 index 00000000..a303659c --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/param/QueryDevicePersonSyncLogParam.java @@ -0,0 +1,51 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param; + +import cn.cloudwalk.cloud.page.CloudwalkBasePageForm; + +public class QueryDevicePersonSyncLogParam extends CloudwalkBasePageForm { + private String deviceId; + private String imageStoreId; + private Integer status; + private String personName; + private Integer personStatus; + + public String getDeviceId() { + return this.deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public String getImageStoreId() { + return this.imageStoreId; + } + + public void setImageStoreId(String imageStoreId) { + this.imageStoreId = imageStoreId; + } + + public Integer getStatus() { + return this.status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public String getPersonName() { + return this.personName; + } + + public void setPersonName(String personName) { + this.personName = personName; + } + + public Integer getPersonStatus() { + return this.personStatus; + } + + public void setPersonStatus(Integer personStatus) { + this.personStatus = personStatus; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/param/QueryDevicePersonSyncParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/param/QueryDevicePersonSyncParam.java new file mode 100644 index 00000000..166347d4 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/param/QueryDevicePersonSyncParam.java @@ -0,0 +1,33 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param; + +import cn.cloudwalk.cloud.page.CloudwalkBasePageForm; + +public class QueryDevicePersonSyncParam extends CloudwalkBasePageForm { + private String businessId; + private String deviceCode; + private String deviceName; + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getDeviceCode() { + return this.deviceCode; + } + + public void setDeviceCode(String deviceCode) { + this.deviceCode = deviceCode; + } + + public String getDeviceName() { + return this.deviceName; + } + + public void setDeviceName(String deviceName) { + this.deviceName = deviceName; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/param/UpdateGroupPersonRefParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/param/UpdateGroupPersonRefParam.java new file mode 100644 index 00000000..bba64e88 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/param/UpdateGroupPersonRefParam.java @@ -0,0 +1,51 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param; + +import java.util.List; + +public class UpdateGroupPersonRefParam { + private String businessId; + private String imageStoreId; + private List personIds; + private List organizationIds; + private List labelIds; + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getImageStoreId() { + return this.imageStoreId; + } + + public void setImageStoreId(String imageStoreId) { + this.imageStoreId = imageStoreId; + } + + public List getPersonIds() { + return this.personIds; + } + + public void setPersonIds(List personIds) { + this.personIds = personIds; + } + + public List getOrganizationIds() { + return this.organizationIds; + } + + public void setOrganizationIds(List organizationIds) { + this.organizationIds = organizationIds; + } + + public List getLabelIds() { + return this.labelIds; + } + + public void setLabelIds(List labelIds) { + this.labelIds = labelIds; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/result/DeviceImageStoreReSyncResult.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/result/DeviceImageStoreReSyncResult.java new file mode 100644 index 00000000..55743205 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/result/DeviceImageStoreReSyncResult.java @@ -0,0 +1,35 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result; + +import java.io.Serializable; +import java.util.List; + +public class DeviceImageStoreReSyncResult implements Serializable { + private static final long serialVersionUID = 6504084839698933548L; + private String deviceId; + private List imageStoreIds; + private String code; + + public String getDeviceId() { + return this.deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public List getImageStoreIds() { + return this.imageStoreIds; + } + + public void setImageStoreIds(List imageStoreIds) { + this.imageStoreIds = imageStoreIds; + } + + public String getCode() { + return this.code; + } + + public void setCode(String code) { + this.code = code; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/result/DevicePersonResyncResult.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/result/DevicePersonResyncResult.java new file mode 100644 index 00000000..d6dcae88 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/result/DevicePersonResyncResult.java @@ -0,0 +1,40 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result; + +public class DevicePersonResyncResult { + private String deviceId; + private String imageStoreId; + private String personId; + private String code; + + public String getDeviceId() { + return this.deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public String getImageStoreId() { + return this.imageStoreId; + } + + public void setImageStoreId(String imageStoreId) { + this.imageStoreId = imageStoreId; + } + + public String getPersonId() { + return this.personId; + } + + public void setPersonId(String personId) { + this.personId = personId; + } + + public String getCode() { + return this.code; + } + + public void setCode(String code) { + this.code = code; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/result/DevicePersonSyncDetailResult.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/result/DevicePersonSyncDetailResult.java new file mode 100644 index 00000000..49b1b869 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/result/DevicePersonSyncDetailResult.java @@ -0,0 +1,42 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result; + +import java.io.Serializable; + +public class DevicePersonSyncDetailResult implements Serializable { + private String imageStoreId; + private String imageStoreName; + private int validCount; + private int failureCount; + + public String getImageStoreId() { + return this.imageStoreId; + } + + public void setImageStoreId(String imageStoreId) { + this.imageStoreId = imageStoreId; + } + + public String getImageStoreName() { + return this.imageStoreName; + } + + public void setImageStoreName(String imageStoreName) { + this.imageStoreName = imageStoreName; + } + + public int getValidCount() { + return this.validCount; + } + + public void setValidCount(int validCount) { + this.validCount = validCount; + } + + public int getFailureCount() { + return this.failureCount; + } + + public void setFailureCount(int failureCount) { + this.failureCount = failureCount; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/result/DevicePersonSyncLogResult.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/result/DevicePersonSyncLogResult.java new file mode 100644 index 00000000..4e443dd2 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/result/DevicePersonSyncLogResult.java @@ -0,0 +1,121 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result; + +public class DevicePersonSyncLogResult { + private String deviceId; + private String personId; + private String personName; + private String imageUrl; + private String imageStoreId; + private String imageStoreName; + private Integer status; + private String errorMessage; + private long lastUpdateTime; + private Integer personStatus; + private int validStatus; + private Long lastPullTime; + private Long lastReportTime; + + public String getDeviceId() { + return this.deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public String getPersonId() { + return this.personId; + } + + public void setPersonId(String personId) { + this.personId = personId; + } + + public String getPersonName() { + return this.personName; + } + + public void setPersonName(String personName) { + this.personName = personName; + } + + public String getImageUrl() { + return this.imageUrl; + } + + public void setImageUrl(String imageUrl) { + this.imageUrl = imageUrl; + } + + public String getImageStoreId() { + return this.imageStoreId; + } + + public void setImageStoreId(String imageStoreId) { + this.imageStoreId = imageStoreId; + } + + public String getImageStoreName() { + return this.imageStoreName; + } + + public void setImageStoreName(String imageStoreName) { + this.imageStoreName = imageStoreName; + } + + public Integer getStatus() { + return this.status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public String getErrorMessage() { + return this.errorMessage; + } + + public void setErrorMessage(String errorMessage) { + this.errorMessage = errorMessage; + } + + public long getLastUpdateTime() { + return this.lastUpdateTime; + } + + public void setLastUpdateTime(long lastUpdateTime) { + this.lastUpdateTime = lastUpdateTime; + } + + public Integer getPersonStatus() { + return this.personStatus; + } + + public void setPersonStatus(Integer personStatus) { + this.personStatus = personStatus; + } + + public int getValidStatus() { + return this.validStatus; + } + + public void setValidStatus(int validStatus) { + this.validStatus = validStatus; + } + + public Long getLastPullTime() { + return this.lastPullTime; + } + + public void setLastPullTime(Long lastPullTime) { + this.lastPullTime = lastPullTime; + } + + public Long getLastReportTime() { + return this.lastReportTime; + } + + public void setLastReportTime(Long lastReportTime) { + this.lastReportTime = lastReportTime; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/result/DevicePersonSyncResult.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/result/DevicePersonSyncResult.java new file mode 100644 index 00000000..57984fa3 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/result/DevicePersonSyncResult.java @@ -0,0 +1,51 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result; + +import java.io.Serializable; + +public class DevicePersonSyncResult implements Serializable { + private String deviceId; + private String deviceCode; + private String deviceName; + private int validCount; + private int failureCount; + + public String getDeviceId() { + return this.deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public String getDeviceCode() { + return this.deviceCode; + } + + public void setDeviceCode(String deviceCode) { + this.deviceCode = deviceCode; + } + + public String getDeviceName() { + return this.deviceName; + } + + public void setDeviceName(String deviceName) { + this.deviceName = deviceName; + } + + public int getValidCount() { + return this.validCount; + } + + public void setValidCount(int validCount) { + this.validCount = validCount; + } + + public int getFailureCount() { + return this.failureCount; + } + + public void setFailureCount(int failureCount) { + this.failureCount = failureCount; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/result/ImageStoreDetailResult.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/result/ImageStoreDetailResult.java new file mode 100644 index 00000000..0385e635 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/result/ImageStoreDetailResult.java @@ -0,0 +1,136 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result; + +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceImageStoreResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.label.result.LabelResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.organization.result.OrganizationResult; +import java.io.Serializable; +import java.util.List; + +public class ImageStoreDetailResult implements Serializable { + private String id; + private String name; + private Integer personNum; + private String businessName; + private List applicationNames; + private List includeOrganizations; + private List includeLabels; + private List includePersons; + private List excludeLabels; + private List excludePersons; + private Long expiryBeginDate; + private Long expiryEndDate; + private List validDateCron; + private List devices; + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public Integer getPersonNum() { + return this.personNum; + } + + public void setPersonNum(Integer personNum) { + this.personNum = personNum; + } + + public String getBusinessName() { + return this.businessName; + } + + public void setBusinessName(String businessName) { + this.businessName = businessName; + } + + public List getApplicationNames() { + return this.applicationNames; + } + + public void setApplicationNames(List applicationNames) { + this.applicationNames = applicationNames; + } + + public Long getExpiryBeginDate() { + return this.expiryBeginDate; + } + + public void setExpiryBeginDate(Long expiryBeginDate) { + this.expiryBeginDate = expiryBeginDate; + } + + public Long getExpiryEndDate() { + return this.expiryEndDate; + } + + public void setExpiryEndDate(Long expiryEndDate) { + this.expiryEndDate = expiryEndDate; + } + + public List getValidDateCron() { + return this.validDateCron; + } + + public void setValidDateCron(List validDateCron) { + this.validDateCron = validDateCron; + } + + public List getIncludeOrganizations() { + return this.includeOrganizations; + } + + public void setIncludeOrganizations(List includeOrganizations) { + this.includeOrganizations = includeOrganizations; + } + + public List getIncludeLabels() { + return this.includeLabels; + } + + public void setIncludeLabels(List includeLabels) { + this.includeLabels = includeLabels; + } + + public List getIncludePersons() { + return this.includePersons; + } + + public void setIncludePersons(List includePersons) { + this.includePersons = includePersons; + } + + public List getExcludeLabels() { + return this.excludeLabels; + } + + public void setExcludeLabels(List excludeLabels) { + this.excludeLabels = excludeLabels; + } + + public List getExcludePersons() { + return this.excludePersons; + } + + public void setExcludePersons(List excludePersons) { + this.excludePersons = excludePersons; + } + + public List getDevices() { + return this.devices; + } + + public void setDevices(List devices) { + this.devices = devices; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/result/ImageStoreListResult.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/result/ImageStoreListResult.java new file mode 100644 index 00000000..8734b313 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/result/ImageStoreListResult.java @@ -0,0 +1,194 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result; + +import cn.cloudwalk.client.cwoscomponent.intelligent.label.result.LabelResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.organization.result.OrganizationResult; +import java.io.Serializable; +import java.util.List; + +public class ImageStoreListResult implements Serializable { + private static final long serialVersionUID = -4747761188572538334L; + private String id; + private String name; + private Integer type; + private String businessId; + private String businessName; + private Integer personNum; + private String applicationId; + private List businessIds; + private List applicationIds; + private String orgId; + private List orgIds; + private String sourceApplicationId; + private String sourceApplicationName; + private Long expiryBeginDate; + private Long expiryEndDate; + private List validDateCron; + private List includeOrganizations; + private List includeLabels; + private List excludeLabels; + private List excludePersons; + + public List getExcludePersons() { + return this.excludePersons; + } + + public void setExcludePersons(List excludePersons) { + this.excludePersons = excludePersons; + } + + public static long getSerialVersionUID() { + return -4747761188572538334L; + } + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public Integer getType() { + return this.type; + } + + public void setType(Integer type) { + this.type = type; + } + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getBusinessName() { + return this.businessName; + } + + public void setBusinessName(String businessName) { + this.businessName = businessName; + } + + public Integer getPersonNum() { + return this.personNum; + } + + public void setPersonNum(Integer personNum) { + this.personNum = personNum; + } + + public String getApplicationId() { + return this.applicationId; + } + + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + public List getBusinessIds() { + return this.businessIds; + } + + public void setBusinessIds(List businessIds) { + this.businessIds = businessIds; + } + + public List getApplicationIds() { + return this.applicationIds; + } + + public void setApplicationIds(List applicationIds) { + this.applicationIds = applicationIds; + } + + public String getOrgId() { + return this.orgId; + } + + public void setOrgId(String orgId) { + this.orgId = orgId; + } + + public List getOrgIds() { + return this.orgIds; + } + + public void setOrgIds(List orgIds) { + this.orgIds = orgIds; + } + + public String getSourceApplicationId() { + return this.sourceApplicationId; + } + + public void setSourceApplicationId(String sourceApplicationId) { + this.sourceApplicationId = sourceApplicationId; + } + + public String getSourceApplicationName() { + return this.sourceApplicationName; + } + + public void setSourceApplicationName(String sourceApplicationName) { + this.sourceApplicationName = sourceApplicationName; + } + + public Long getExpiryBeginDate() { + return this.expiryBeginDate; + } + + public void setExpiryBeginDate(Long expiryBeginDate) { + this.expiryBeginDate = expiryBeginDate; + } + + public Long getExpiryEndDate() { + return this.expiryEndDate; + } + + public void setExpiryEndDate(Long expiryEndDate) { + this.expiryEndDate = expiryEndDate; + } + + public List getValidDateCron() { + return this.validDateCron; + } + + public void setValidDateCron(List validDateCron) { + this.validDateCron = validDateCron; + } + + public List getIncludeOrganizations() { + return this.includeOrganizations; + } + + public void setIncludeOrganizations(List includeOrganizations) { + this.includeOrganizations = includeOrganizations; + } + + public List getIncludeLabels() { + return this.includeLabels; + } + + public void setIncludeLabels(List includeLabels) { + this.includeLabels = includeLabels; + } + + public List getExcludeLabels() { + return this.excludeLabels; + } + + public void setExcludeLabels(List excludeLabels) { + this.excludeLabels = excludeLabels; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/result/ImageStorePersonResult.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/result/ImageStorePersonResult.java new file mode 100644 index 00000000..471a4018 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/result/ImageStorePersonResult.java @@ -0,0 +1,134 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result; + +import java.io.Serializable; +import java.util.List; + +public class ImageStorePersonResult implements Serializable { + private static final long serialVersionUID = -3303306203923272487L; + private String imageStoreId; + private String personId; + private String imageId; + private String name; + private String comparePicture; + private Integer gender; + private Integer age; + private Long expiryBeginDate; + private Long expiryEndDate; + private List validDateCron; + private Long groupTime; + private Integer status; + private String errorMessage; + private String icCardNo; + + public String getIcCardNo() { + return this.icCardNo; + } + + public void setIcCardNo(String icCardNo) { + this.icCardNo = icCardNo; + } + + public String getImageStoreId() { + return this.imageStoreId; + } + + public void setImageStoreId(String imageStoreId) { + this.imageStoreId = imageStoreId; + } + + public String getPersonId() { + return this.personId; + } + + public void setPersonId(String personId) { + this.personId = personId; + } + + public String getImageId() { + return this.imageId; + } + + public void setImageId(String imageId) { + this.imageId = imageId; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public String getComparePicture() { + return this.comparePicture; + } + + public void setComparePicture(String comparePicture) { + this.comparePicture = comparePicture; + } + + public Integer getGender() { + return this.gender; + } + + public void setGender(Integer gender) { + this.gender = gender; + } + + public Integer getAge() { + return this.age; + } + + public void setAge(Integer age) { + this.age = age; + } + + public Long getExpiryBeginDate() { + return this.expiryBeginDate; + } + + public void setExpiryBeginDate(Long expiryBeginDate) { + this.expiryBeginDate = expiryBeginDate; + } + + public Long getExpiryEndDate() { + return this.expiryEndDate; + } + + public void setExpiryEndDate(Long expiryEndDate) { + this.expiryEndDate = expiryEndDate; + } + + public Long getGroupTime() { + return this.groupTime; + } + + public void setGroupTime(Long groupTime) { + this.groupTime = groupTime; + } + + public Integer getStatus() { + return this.status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public String getErrorMessage() { + return this.errorMessage; + } + + public void setErrorMessage(String errorMessage) { + this.errorMessage = errorMessage; + } + + public List getValidDateCron() { + return this.validDateCron; + } + + public void setValidDateCron(List validDateCron) { + this.validDateCron = validDateCron; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/result/ImageStorePersonSaveResult.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/result/ImageStorePersonSaveResult.java new file mode 100644 index 00000000..15948a40 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/result/ImageStorePersonSaveResult.java @@ -0,0 +1,70 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result; + +import java.io.Serializable; + +public class ImageStorePersonSaveResult implements Serializable { + private static final long serialVersionUID = 678463903819122362L; + private String personId; + private String imageId; + private String imageStoreId; + private String name; + private Integer age; + private Integer gender; + private String comparePicture; + + public String getPersonId() { + return this.personId; + } + + public void setPersonId(String personId) { + this.personId = personId; + } + + public String getImageId() { + return this.imageId; + } + + public void setImageId(String imageId) { + this.imageId = imageId; + } + + public String getImageStoreId() { + return this.imageStoreId; + } + + public void setImageStoreId(String imageStoreId) { + this.imageStoreId = imageStoreId; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public Integer getAge() { + return this.age; + } + + public void setAge(Integer age) { + this.age = age; + } + + public Integer getGender() { + return this.gender; + } + + public void setGender(Integer gender) { + this.gender = gender; + } + + public String getComparePicture() { + return this.comparePicture; + } + + public void setComparePicture(String comparePicture) { + this.comparePicture = comparePicture; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/result/ImageStoreResult.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/result/ImageStoreResult.java new file mode 100644 index 00000000..a496306d --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/result/ImageStoreResult.java @@ -0,0 +1,152 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result; + +import java.io.Serializable; +import java.util.List; + +public class ImageStoreResult implements Serializable { + private static final long serialVersionUID = -2980434001043379374L; + private String id; + private String name; + private Integer type; + private String businessId; + private String businessName; + private Integer personNum; + private String applicationId; + private List businessIds; + private List applicationIds; + private String orgId; + private List orgIds; + private String sourceApplicationId; + private String sourceApplicationName; + private Long expiryBeginDate; + private Long expiryEndDate; + private List validDateCron; + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public Integer getType() { + return this.type; + } + + public void setType(Integer type) { + this.type = type; + } + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getApplicationId() { + return this.applicationId; + } + + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + public List getBusinessIds() { + return this.businessIds; + } + + public void setBusinessIds(List businessIds) { + this.businessIds = businessIds; + } + + public List getApplicationIds() { + return this.applicationIds; + } + + public void setApplicationIds(List applicationIds) { + this.applicationIds = applicationIds; + } + + public String getOrgId() { + return this.orgId; + } + + public void setOrgId(String orgId) { + this.orgId = orgId; + } + + public List getOrgIds() { + return this.orgIds; + } + + public void setOrgIds(List orgIds) { + this.orgIds = orgIds; + } + + public String getBusinessName() { + return this.businessName; + } + + public void setBusinessName(String businessName) { + this.businessName = businessName; + } + + public Integer getPersonNum() { + return this.personNum; + } + + public void setPersonNum(Integer personNum) { + this.personNum = personNum; + } + + public String getSourceApplicationId() { + return this.sourceApplicationId; + } + + public void setSourceApplicationId(String sourceApplicationId) { + this.sourceApplicationId = sourceApplicationId; + } + + public String getSourceApplicationName() { + return this.sourceApplicationName; + } + + public void setSourceApplicationName(String sourceApplicationName) { + this.sourceApplicationName = sourceApplicationName; + } + + public Long getExpiryBeginDate() { + return this.expiryBeginDate; + } + + public void setExpiryBeginDate(Long expiryBeginDate) { + this.expiryBeginDate = expiryBeginDate; + } + + public Long getExpiryEndDate() { + return this.expiryEndDate; + } + + public void setExpiryEndDate(Long expiryEndDate) { + this.expiryEndDate = expiryEndDate; + } + + public List getValidDateCron() { + return this.validDateCron; + } + + public void setValidDateCron(List validDateCron) { + this.validDateCron = validDateCron; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/result/ImgStoreBatchBindPersonResult.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/result/ImgStoreBatchBindPersonResult.java new file mode 100644 index 00000000..f2240e59 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/result/ImgStoreBatchBindPersonResult.java @@ -0,0 +1,26 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result; + +import java.io.Serializable; +import java.util.List; + +public class ImgStoreBatchBindPersonResult implements Serializable { + private static final long serialVersionUID = 1256507948531340325L; + private List successPersonIds; + private List failPersonIds; + + public List getSuccessPersonIds() { + return this.successPersonIds; + } + + public void setSuccessPersonIds(List successPersonIds) { + this.successPersonIds = successPersonIds; + } + + public List getFailPersonIds() { + return this.failPersonIds; + } + + public void setFailPersonIds(List failPersonIds) { + this.failPersonIds = failPersonIds; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/result/ImgStorePersonResult.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/result/ImgStorePersonResult.java new file mode 100644 index 00000000..aa1d0209 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/result/ImgStorePersonResult.java @@ -0,0 +1,152 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result; + +import java.io.Serializable; +import java.util.List; + +public class ImgStorePersonResult implements Serializable { + private static final long serialVersionUID = 678463903819122362L; + private String id; + private String businessId; + private String personCode; + private String name; + private String phone; + private Short status; + private Long expiryBeginDate; + private Long expiryEndDate; + private List validDateCron; + private String showPicture; + private String comparePicture; + private Short isDel; + private Long createTime; + private String createUserId; + private Long lastUpdateTime; + private String lastUpdateUserId; + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = (id == null) ? null : id.trim(); + } + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = (businessId == null) ? null : businessId.trim(); + } + + public String getPersonCode() { + return this.personCode; + } + + public void setPersonCode(String personCode) { + this.personCode = (personCode == null) ? null : personCode.trim(); + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = (name == null) ? null : name.trim(); + } + + public String getPhone() { + return this.phone; + } + + public void setPhone(String phone) { + this.phone = (phone == null) ? null : phone.trim(); + } + + public Short getStatus() { + return this.status; + } + + public void setStatus(Short status) { + this.status = status; + } + + public Long getExpiryBeginDate() { + return this.expiryBeginDate; + } + + public void setExpiryBeginDate(Long expiryBeginDate) { + this.expiryBeginDate = expiryBeginDate; + } + + public Long getExpiryEndDate() { + return this.expiryEndDate; + } + + public void setExpiryEndDate(Long expiryEndDate) { + this.expiryEndDate = expiryEndDate; + } + + public String getShowPicture() { + return this.showPicture; + } + + public void setShowPicture(String showPicture) { + this.showPicture = (showPicture == null) ? null : showPicture.trim(); + } + + public String getComparePicture() { + return this.comparePicture; + } + + public void setComparePicture(String comparePicture) { + this.comparePicture = (comparePicture == null) ? null : comparePicture.trim(); + } + + public Short getIsDel() { + return this.isDel; + } + + public void setIsDel(Short isDel) { + this.isDel = isDel; + } + + public Long getCreateTime() { + return this.createTime; + } + + public void setCreateTime(Long createTime) { + this.createTime = createTime; + } + + public String getCreateUserId() { + return this.createUserId; + } + + public void setCreateUserId(String createUserId) { + this.createUserId = (createUserId == null) ? null : createUserId.trim(); + } + + public Long getLastUpdateTime() { + return this.lastUpdateTime; + } + + public void setLastUpdateTime(Long lastUpdateTime) { + this.lastUpdateTime = lastUpdateTime; + } + + public String getLastUpdateUserId() { + return this.lastUpdateUserId; + } + + public void setLastUpdateUserId(String lastUpdateUserId) { + this.lastUpdateUserId = (lastUpdateUserId == null) ? null : lastUpdateUserId.trim(); + } + + public List getValidDateCron() { + return this.validDateCron; + } + + public void setValidDateCron(List validDateCron) { + this.validDateCron = validDateCron; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/service/DeviceImageStoreSyncService.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/service/DeviceImageStoreSyncService.java new file mode 100644 index 00000000..4c50f239 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/service/DeviceImageStoreSyncService.java @@ -0,0 +1,43 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.DevicePersonResyncParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.DevicePersonResyncRequestParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.QueryDevicePersonSyncLogParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.QueryDevicePersonSyncParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.DeviceImageStoreReSyncResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.DevicePersonResyncResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.DevicePersonSyncDetailResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.DevicePersonSyncLogResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.DevicePersonSyncResult; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import java.util.List; +import java.util.Map; + +public interface DeviceImageStoreSyncService { + CloudwalkResult> + page(QueryDevicePersonSyncParam paramQueryDevicePersonSyncParam, CloudwalkCallContext paramCloudwalkCallContext) + throws ServiceException; + + CloudwalkResult> detail( + QueryDevicePersonSyncLogParam paramQueryDevicePersonSyncLogParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult> logPage( + QueryDevicePersonSyncLogParam paramQueryDevicePersonSyncLogParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult> getDeviceImageStore( + QueryDevicePersonSyncLogParam paramQueryDevicePersonSyncLogParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult> deviceResync( + DevicePersonResyncParam paramDevicePersonResyncParam, CloudwalkCallContext paramCloudwalkCallContext) + throws ServiceException; + + CloudwalkResult> devicePersonResync( + DevicePersonResyncRequestParam paramDevicePersonResyncRequestParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/service/ImageStorePersonService.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/service/ImageStorePersonService.java new file mode 100644 index 00000000..fa4a680f --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/service/ImageStorePersonService.java @@ -0,0 +1,35 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStorePersonBindParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStorePersonDelParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStorePersonQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStorePersonSaveParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.UpdateGroupPersonRefParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.ImageStorePersonResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.ImageStorePersonSaveResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.ImgStoreBatchBindPersonResult; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.result.CloudwalkResult; + +public interface ImageStorePersonService { + CloudwalkResult save(ImageStorePersonSaveParam paramImageStorePersonSaveParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult delete(ImageStorePersonDelParam paramImageStorePersonDelParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult> + page(ImageStorePersonQueryParam paramImageStorePersonQueryParam, CloudwalkCallContext paramCloudwalkCallContext) + throws ServiceException; + + CloudwalkResult bind(ImageStorePersonBindParam paramImageStorePersonBindParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult batchBind(ImageStorePersonBindParam paramImageStorePersonBindParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult updateGroupPersonRef(UpdateGroupPersonRefParam paramUpdateGroupPersonRefParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/service/ImageStoreService.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/service/ImageStoreService.java new file mode 100644 index 00000000..ddee936b --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/imagestore/service/ImageStoreService.java @@ -0,0 +1,34 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStoreAddParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStoreDelParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStoreEditParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStoreQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.ImageStoreDetailResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.ImageStoreListResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.ImageStoreResult; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import java.util.List; + +public interface ImageStoreService { + CloudwalkResult add(ImageStoreAddParam paramImageStoreAddParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult edit(ImageStoreEditParam paramImageStoreEditParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult> list(ImageStoreQueryParam paramImageStoreQueryParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult> page(ImageStoreQueryParam paramImageStoreQueryParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult delete(ImageStoreDelParam paramImageStoreDelParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult detail(ImageStoreQueryParam paramImageStoreQueryParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/label/param/LabelAddParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/label/param/LabelAddParam.java new file mode 100644 index 00000000..ae612f6f --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/label/param/LabelAddParam.java @@ -0,0 +1,34 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.label.param; + +import java.io.Serializable; + +public class LabelAddParam implements Serializable { + private static final long serialVersionUID = -8845639886422681717L; + private String name; + private String code; + private Integer addType; + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public String getCode() { + return this.code; + } + + public void setCode(String code) { + this.code = code; + } + + public Integer getAddType() { + return this.addType; + } + + public void setAddType(Integer addType) { + this.addType = addType; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/label/param/LabelDetailParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/label/param/LabelDetailParam.java new file mode 100644 index 00000000..d0e33271 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/label/param/LabelDetailParam.java @@ -0,0 +1,34 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.label.param; + +import java.io.Serializable; + +public class LabelDetailParam implements Serializable { + private static final long serialVersionUID = -506599494704131466L; + private String id; + private String name; + private String code; + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public String getCode() { + return this.code; + } + + public void setCode(String code) { + this.code = code; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/label/param/LabelGroupDelParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/label/param/LabelGroupDelParam.java new file mode 100644 index 00000000..abdb7858 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/label/param/LabelGroupDelParam.java @@ -0,0 +1,22 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.label.param; + +import java.io.Serializable; +import javax.validation.constraints.Size; + +public class LabelGroupDelParam implements Serializable { + private static final long serialVersionUID = 7773670316855458438L; + @Size(min = 1, max = 32) + private String id; + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public String toString() { + return "EmplyoeeGroupDelForm{id='" + this.id + '\'' + '}'; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/label/param/LabelGroupEditParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/label/param/LabelGroupEditParam.java new file mode 100644 index 00000000..2a329b3c --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/label/param/LabelGroupEditParam.java @@ -0,0 +1,61 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.label.param; + +import java.io.Serializable; + +public class LabelGroupEditParam implements Serializable { + private static final long serialVersionUID = 7773670316855458438L; + private String id; + private String name; + private String code; + private String business_id; + private Short is_del; + private Short add_type; + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public String getCode() { + return this.code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getBusiness_id() { + return this.business_id; + } + + public void setBusiness_id(String business_id) { + this.business_id = business_id; + } + + public Short getIs_del() { + return this.is_del; + } + + public void setIs_del(Short is_del) { + this.is_del = is_del; + } + + public Short getAdd_type() { + return this.add_type; + } + + public void setAdd_type(Short add_type) { + this.add_type = add_type; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/label/param/LabelPersonAddParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/label/param/LabelPersonAddParam.java new file mode 100644 index 00000000..dc50f9f9 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/label/param/LabelPersonAddParam.java @@ -0,0 +1,31 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.label.param; + +import java.io.Serializable; +import java.util.Arrays; + +public class LabelPersonAddParam implements Serializable { + private static final long serialVersionUID = 7773670316855458438L; + private String labelId; + private String[] personIds; + + public String getLabelId() { + return this.labelId; + } + + public void setLabelId(String labelId) { + this.labelId = labelId; + } + + public String[] getPersonIds() { + return this.personIds; + } + + public void setPersonIds(String[] personIds) { + this.personIds = personIds; + } + + public String toString() { + return "LabelPersonAddParam{labelId='" + this.labelId + '\'' + ", personIds=" + + Arrays.toString((Object[])this.personIds) + '}'; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/label/param/LabelPersonDelParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/label/param/LabelPersonDelParam.java new file mode 100644 index 00000000..dd3d5848 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/label/param/LabelPersonDelParam.java @@ -0,0 +1,31 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.label.param; + +import java.io.Serializable; +import java.util.Arrays; + +public class LabelPersonDelParam implements Serializable { + private static final long serialVersionUID = 7773670316855458438L; + private String labelId; + private String[] personIds; + + public String getLabelId() { + return this.labelId; + } + + public void setLabelId(String labelId) { + this.labelId = labelId; + } + + public String[] getPersonIds() { + return this.personIds; + } + + public void setPersonIds(String[] personIds) { + this.personIds = personIds; + } + + public String toString() { + return "LabelPersonAddParam{labelId='" + this.labelId + '\'' + ", personIds=" + + Arrays.toString((Object[])this.personIds) + '}'; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/label/param/LabelQueryParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/label/param/LabelQueryParam.java new file mode 100644 index 00000000..71af8e07 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/label/param/LabelQueryParam.java @@ -0,0 +1,16 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.label.param; + +import java.io.Serializable; + +public class LabelQueryParam implements Serializable { + private static final long serialVersionUID = 11251293020320116L; + private String name; + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/label/result/LabelDetailResult.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/label/result/LabelDetailResult.java new file mode 100644 index 00000000..2292f26b --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/label/result/LabelDetailResult.java @@ -0,0 +1,34 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.label.result; + +import java.io.Serializable; + +public class LabelDetailResult implements Serializable { + private static final long serialVersionUID = 6205672072346434542L; + private String id; + private String name; + private String code; + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public String getCode() { + return this.code; + } + + public void setCode(String code) { + this.code = code; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/label/result/LabelResult.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/label/result/LabelResult.java new file mode 100644 index 00000000..5b164157 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/label/result/LabelResult.java @@ -0,0 +1,88 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.label.result; + +import java.io.Serializable; + +public class LabelResult implements Serializable { + private static final long serialVersionUID = 678463903819122362L; + private String id; + private String name; + private String code; + private Short isDel; + private String businessId; + private String createUserId; + private Long createTime; + private String lastUpdateUserId; + private Long lastUpdateTime; + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public String getCode() { + return this.code; + } + + public void setCode(String code) { + this.code = code; + } + + public Short getIsDel() { + return this.isDel; + } + + public void setIsDel(Short isDel) { + this.isDel = isDel; + } + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getCreateUserId() { + return this.createUserId; + } + + public void setCreateUserId(String createUserId) { + this.createUserId = createUserId; + } + + public Long getCreateTime() { + return this.createTime; + } + + public void setCreateTime(Long createTime) { + this.createTime = createTime; + } + + public String getLastUpdateUserId() { + return this.lastUpdateUserId; + } + + public void setLastUpdateUserId(String lastUpdateUserId) { + this.lastUpdateUserId = lastUpdateUserId; + } + + public Long getLastUpdateTime() { + return this.lastUpdateTime; + } + + public void setLastUpdateTime(Long lastUpdateTime) { + this.lastUpdateTime = lastUpdateTime; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/label/service/LabelService.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/label/service/LabelService.java new file mode 100644 index 00000000..7de1efa1 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/label/service/LabelService.java @@ -0,0 +1,37 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.label.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.label.param.LabelAddParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.label.param.LabelDetailParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.label.param.LabelGroupDelParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.label.param.LabelGroupEditParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.label.param.LabelPersonAddParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.label.param.LabelPersonDelParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.label.param.LabelQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.label.result.LabelDetailResult; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import java.util.List; + +public interface LabelService { + CloudwalkResult add(LabelAddParam paramLabelAddParam, CloudwalkCallContext paramCloudwalkCallContext) + throws ServiceException; + + CloudwalkResult detail(LabelDetailParam paramLabelDetailParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult> getAll(LabelQueryParam paramLabelQueryParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult personAdd(LabelPersonAddParam paramLabelPersonAddParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult personDel(LabelPersonDelParam paramLabelPersonDelParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult delete(LabelGroupDelParam paramLabelGroupDelParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult edit(LabelGroupEditParam paramLabelGroupEditParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/message/param/GetShortUrlParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/message/param/GetShortUrlParam.java new file mode 100644 index 00000000..1af5a62a --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/message/param/GetShortUrlParam.java @@ -0,0 +1,15 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.message.param; + +import java.io.Serializable; + +public class GetShortUrlParam implements Serializable { + private String url; + + public String getUrl() { + return this.url; + } + + public void setUrl(String url) { + this.url = url; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/message/param/SmsSendParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/message/param/SmsSendParam.java new file mode 100644 index 00000000..686ffda0 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/message/param/SmsSendParam.java @@ -0,0 +1,66 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.message.param; + +import java.io.Serializable; +import java.util.List; + +public class SmsSendParam implements Serializable { + private static final long serialVersionUID = -2273671672303994492L; + private String telephone; + private String templateId; + private String serviceCode; + private List parameter; + + public String getTelephone() { + return this.telephone; + } + + public void setTelephone(String telephone) { + this.telephone = telephone; + } + + public String getTemplateId() { + return this.templateId; + } + + public void setTemplateId(String templateId) { + this.templateId = templateId; + } + + public String getServiceCode() { + return this.serviceCode; + } + + public void setServiceCode(String serviceCode) { + this.serviceCode = serviceCode; + } + + public List getParameter() { + return this.parameter; + } + + public void setParameter(List parameter) { + this.parameter = parameter; + } + + public static class Parameter implements Serializable { + private static final long serialVersionUID = 3285987793079416067L; + private String key; + private String value; + + public String getKey() { + return this.key; + } + + public void setKey(String key) { + this.key = key; + } + + public String getValue() { + return this.value; + } + + public void setValue(String value) { + this.value = value; + } + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/message/result/ShotUrlResult.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/message/result/ShotUrlResult.java new file mode 100644 index 00000000..861a1eab --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/message/result/ShotUrlResult.java @@ -0,0 +1,15 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.message.result; + +import java.io.Serializable; + +public class ShotUrlResult implements Serializable { + private String shortUrl; + + public String getShortUrl() { + return this.shortUrl; + } + + public void setShortUrl(String shortUrl) { + this.shortUrl = shortUrl; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/message/service/SmsSendService.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/message/service/SmsSendService.java new file mode 100644 index 00000000..f8e79542 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/message/service/SmsSendService.java @@ -0,0 +1,16 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.message.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.message.param.GetShortUrlParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.message.param.SmsSendParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.message.result.ShotUrlResult; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; + +public interface SmsSendService { + CloudwalkResult send(SmsSendParam paramSmsSendParam, CloudwalkCallContext paramCloudwalkCallContext) + throws ServiceException; + + CloudwalkResult getShortUrl(GetShortUrlParam paramGetShortUrlParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/organization/param/OrganizationAddParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/organization/param/OrganizationAddParam.java new file mode 100644 index 00000000..acbd8d41 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/organization/param/OrganizationAddParam.java @@ -0,0 +1,322 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.organization.param; + +import java.io.Serializable; + +public class OrganizationAddParam implements Serializable { + private static final long serialVersionUID = 1919112534409075349L; + private String name; + private String typeId; + private String parentId; + private Integer level; + private String businessId; + private String ext1; + private String ext2; + private String ext3; + private String ext4; + private String ext5; + private String ext6; + private String ext7; + private String ext8; + private String ext9; + private String ext10; + private String ext11; + private String ext12; + private String ext13; + private String ext14; + private String ext15; + private String ext16; + private String ext17; + private String ext18; + private String ext19; + private String ext20; + private String ext21; + private String ext22; + private String ext23; + private String ext24; + private String ext25; + private String ext26; + private String ext27; + private String ext28; + private String ext29; + private String ext30; + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public String getTypeId() { + return this.typeId; + } + + public void setTypeId(String typeId) { + this.typeId = typeId; + } + + public String getParentId() { + return this.parentId; + } + + public void setParentId(String parentId) { + this.parentId = parentId; + } + + public Integer getLevel() { + return this.level; + } + + public void setLevel(Integer level) { + this.level = level; + } + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getExt1() { + return this.ext1; + } + + public void setExt1(String ext1) { + this.ext1 = ext1; + } + + public String getExt2() { + return this.ext2; + } + + public void setExt2(String ext2) { + this.ext2 = ext2; + } + + public String getExt3() { + return this.ext3; + } + + public void setExt3(String ext3) { + this.ext3 = ext3; + } + + public String getExt4() { + return this.ext4; + } + + public void setExt4(String ext4) { + this.ext4 = ext4; + } + + public String getExt5() { + return this.ext5; + } + + public void setExt5(String ext5) { + this.ext5 = ext5; + } + + public String getExt6() { + return this.ext6; + } + + public void setExt6(String ext6) { + this.ext6 = ext6; + } + + public String getExt7() { + return this.ext7; + } + + public void setExt7(String ext7) { + this.ext7 = ext7; + } + + public String getExt8() { + return this.ext8; + } + + public void setExt8(String ext8) { + this.ext8 = ext8; + } + + public String getExt9() { + return this.ext9; + } + + public void setExt9(String ext9) { + this.ext9 = ext9; + } + + public String getExt10() { + return this.ext10; + } + + public void setExt10(String ext10) { + this.ext10 = ext10; + } + + public String getExt11() { + return this.ext11; + } + + public void setExt11(String ext11) { + this.ext11 = ext11; + } + + public String getExt12() { + return this.ext12; + } + + public void setExt12(String ext12) { + this.ext12 = ext12; + } + + public String getExt13() { + return this.ext13; + } + + public void setExt13(String ext13) { + this.ext13 = ext13; + } + + public String getExt14() { + return this.ext14; + } + + public void setExt14(String ext14) { + this.ext14 = ext14; + } + + public String getExt15() { + return this.ext15; + } + + public void setExt15(String ext15) { + this.ext15 = ext15; + } + + public String getExt16() { + return this.ext16; + } + + public void setExt16(String ext16) { + this.ext16 = ext16; + } + + public String getExt17() { + return this.ext17; + } + + public void setExt17(String ext17) { + this.ext17 = ext17; + } + + public String getExt18() { + return this.ext18; + } + + public void setExt18(String ext18) { + this.ext18 = ext18; + } + + public String getExt19() { + return this.ext19; + } + + public void setExt19(String ext19) { + this.ext19 = ext19; + } + + public String getExt20() { + return this.ext20; + } + + public void setExt20(String ext20) { + this.ext20 = ext20; + } + + public String getExt21() { + return this.ext21; + } + + public void setExt21(String ext21) { + this.ext21 = ext21; + } + + public String getExt22() { + return this.ext22; + } + + public void setExt22(String ext22) { + this.ext22 = ext22; + } + + public String getExt23() { + return this.ext23; + } + + public void setExt23(String ext23) { + this.ext23 = ext23; + } + + public String getExt24() { + return this.ext24; + } + + public void setExt24(String ext24) { + this.ext24 = ext24; + } + + public String getExt25() { + return this.ext25; + } + + public void setExt25(String ext25) { + this.ext25 = ext25; + } + + public String getExt26() { + return this.ext26; + } + + public void setExt26(String ext26) { + this.ext26 = ext26; + } + + public String getExt27() { + return this.ext27; + } + + public void setExt27(String ext27) { + this.ext27 = ext27; + } + + public String getExt28() { + return this.ext28; + } + + public void setExt28(String ext28) { + this.ext28 = ext28; + } + + public String getExt29() { + return this.ext29; + } + + public void setExt29(String ext29) { + this.ext29 = ext29; + } + + public String getExt30() { + return this.ext30; + } + + public void setExt30(String ext30) { + this.ext30 = ext30; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/organization/param/OrganizationDeleteParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/organization/param/OrganizationDeleteParam.java new file mode 100644 index 00000000..0f4c9dd6 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/organization/param/OrganizationDeleteParam.java @@ -0,0 +1,17 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.organization.param; + +import java.io.Serializable; +import java.util.List; + +public class OrganizationDeleteParam implements Serializable { + private static final long serialVersionUID = -4391787067761730957L; + private List ids; + + public List getIds() { + return this.ids; + } + + public void setIds(List ids) { + this.ids = ids; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/organization/param/OrganizationDetailQueryParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/organization/param/OrganizationDetailQueryParam.java new file mode 100644 index 00000000..f056f810 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/organization/param/OrganizationDetailQueryParam.java @@ -0,0 +1,16 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.organization.param; + +import java.io.Serializable; + +public class OrganizationDetailQueryParam implements Serializable { + private static final long serialVersionUID = 4253312588929144978L; + private String id; + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/organization/param/OrganizationEditParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/organization/param/OrganizationEditParam.java new file mode 100644 index 00000000..352a6e9d --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/organization/param/OrganizationEditParam.java @@ -0,0 +1,98 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.organization.param; + +import java.io.Serializable; +import java.util.List; + +public class OrganizationEditParam implements Serializable { + private static final long serialVersionUID = -4062240712046999636L; + private String id; + private String areaId; + private List areaIds; + private String name; + private String typeId; + private String businessId; + private String parentId; + private Integer level; + private String ext1; + private String ext2; + + public String getAreaId() { + return this.areaId; + } + + public void setAreaId(String areaId) { + this.areaId = areaId; + } + + public List getAreaIds() { + return this.areaIds; + } + + public void setAreaIds(List areaIds) { + this.areaIds = areaIds; + } + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getParentId() { + return this.parentId; + } + + public void setParentId(String parentId) { + this.parentId = parentId; + } + + public Integer getLevel() { + return this.level; + } + + public void setLevel(Integer level) { + this.level = level; + } + + public String getTypeId() { + return this.typeId; + } + + public void setTypeId(String typeId) { + this.typeId = typeId; + } + + public String getExt1() { + return this.ext1; + } + + public void setExt1(String ext1) { + this.ext1 = ext1; + } + + public String getExt2() { + return this.ext2; + } + + public void setExt2(String ext2) { + this.ext2 = ext2; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/organization/param/OrganizationListParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/organization/param/OrganizationListParam.java new file mode 100644 index 00000000..dcebdd7f --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/organization/param/OrganizationListParam.java @@ -0,0 +1,80 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.organization.param; + +import java.io.Serializable; +import java.util.List; + +public class OrganizationListParam implements Serializable { + private static final long serialVersionUID = 974286577421267485L; + private List ids; + private String businessId; + private Boolean byLoginUser; + private String typeId; + private String name; + private String parentId; + private Short hasCascade; + private Short retainParent; + + public List getIds() { + return this.ids; + } + + public void setIds(List ids) { + this.ids = ids; + } + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public Boolean isByLoginUser() { + return this.byLoginUser; + } + + public void setByLoginUser(Boolean byLoginUser) { + this.byLoginUser = byLoginUser; + } + + public String getTypeId() { + return this.typeId; + } + + public void setTypeId(String typeId) { + this.typeId = typeId; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public String getParentId() { + return this.parentId; + } + + public void setParentId(String parentId) { + this.parentId = parentId; + } + + public Short getHasCascade() { + return this.hasCascade; + } + + public void setHasCascade(Short hasCascade) { + this.hasCascade = hasCascade; + } + + public Short getRetainParent() { + return this.retainParent; + } + + public void setRetainParent(Short retainParent) { + this.retainParent = retainParent; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/organization/param/OrganizationQueryParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/organization/param/OrganizationQueryParam.java new file mode 100644 index 00000000..fb3149f8 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/organization/param/OrganizationQueryParam.java @@ -0,0 +1,5 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.organization.param; + +import cn.cloudwalk.cloud.page.CloudwalkBasePageForm; + +public class OrganizationQueryParam extends CloudwalkBasePageForm {} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/organization/param/OrganizationTreeParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/organization/param/OrganizationTreeParam.java new file mode 100644 index 00000000..2e5d238e --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/organization/param/OrganizationTreeParam.java @@ -0,0 +1,34 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.organization.param; + +import java.io.Serializable; + +public class OrganizationTreeParam implements Serializable { + private static final long serialVersionUID = -488490517746934901L; + private String parentId; + private Boolean byLoginUser; + private String businessId; + + public String getParentId() { + return this.parentId; + } + + public void setParentId(String parentId) { + this.parentId = parentId; + } + + public Boolean getByLoginUser() { + return this.byLoginUser; + } + + public void setByLoginUser(Boolean byLoginUser) { + this.byLoginUser = byLoginUser; + } + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/organization/param/RentUpdateParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/organization/param/RentUpdateParam.java new file mode 100644 index 00000000..b61877cb --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/organization/param/RentUpdateParam.java @@ -0,0 +1,76 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.organization.param; + +public class RentUpdateParam { + private String businessId; + private String orgId; + private String orgName; + private Integer rentStatus; + private Long startTime; + private Long endTime; + private String lastUpdateUserId; + private Long lastUpdateTime; + + public String getLastUpdateUserId() { + return this.lastUpdateUserId; + } + + public void setLastUpdateUserId(String lastUpdateUserId) { + this.lastUpdateUserId = lastUpdateUserId; + } + + public Long getLastUpdateTime() { + return this.lastUpdateTime; + } + + public void setLastUpdateTime(Long lastUpdateTime) { + this.lastUpdateTime = lastUpdateTime; + } + + public String getOrgId() { + return this.orgId; + } + + public void setOrgId(String orgId) { + this.orgId = orgId; + } + + public String getOrgName() { + return this.orgName; + } + + public void setOrgName(String orgName) { + this.orgName = orgName; + } + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public Integer getRentStatus() { + return this.rentStatus; + } + + public void setRentStatus(Integer rentStatus) { + this.rentStatus = rentStatus; + } + + public Long getStartTime() { + return this.startTime; + } + + public void setStartTime(Long startTime) { + this.startTime = startTime; + } + + public Long getEndTime() { + return this.endTime; + } + + public void setEndTime(Long endTime) { + this.endTime = endTime; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/organization/result/OrganizationDetailResult.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/organization/result/OrganizationDetailResult.java new file mode 100644 index 00000000..23d50fff --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/organization/result/OrganizationDetailResult.java @@ -0,0 +1,340 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.organization.result; + +import java.io.Serializable; + +public class OrganizationDetailResult implements Serializable { + private static final long serialVersionUID = -8256129347114545594L; + private String id; + private String parentId; + private String parentName; + private String name; + private Integer level; + private Integer hasLowerLevel; + private String type; + private String ext1; + private String ext2; + private String ext3; + private String ext4; + private String ext5; + private String ext6; + private String ext7; + private String ext8; + private String ext9; + private String ext10; + private String ext11; + private String ext12; + private String ext13; + private String ext14; + private String ext15; + private String ext16; + private String ext17; + private String ext18; + private String ext19; + private String ext20; + private String ext21; + private String ext22; + private String ext23; + private String ext24; + private String ext25; + private String ext26; + private String ext27; + private String ext28; + private String ext29; + private String ext30; + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public String getParentId() { + return this.parentId; + } + + public void setParentId(String parentId) { + this.parentId = parentId; + } + + public String getParentName() { + return this.parentName; + } + + public void setParentName(String parentName) { + this.parentName = parentName; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public Integer getLevel() { + return this.level; + } + + public void setLevel(Integer level) { + this.level = level; + } + + public Integer getHasLowerLevel() { + return this.hasLowerLevel; + } + + public void setHasLowerLevel(Integer hasLowerLevel) { + this.hasLowerLevel = hasLowerLevel; + } + + public String getType() { + return this.type; + } + + public void setType(String type) { + this.type = type; + } + + public String getExt1() { + return this.ext1; + } + + public void setExt1(String ext1) { + this.ext1 = ext1; + } + + public String getExt2() { + return this.ext2; + } + + public void setExt2(String ext2) { + this.ext2 = ext2; + } + + public String getExt3() { + return this.ext3; + } + + public void setExt3(String ext3) { + this.ext3 = ext3; + } + + public String getExt4() { + return this.ext4; + } + + public void setExt4(String ext4) { + this.ext4 = ext4; + } + + public String getExt5() { + return this.ext5; + } + + public void setExt5(String ext5) { + this.ext5 = ext5; + } + + public String getExt6() { + return this.ext6; + } + + public void setExt6(String ext6) { + this.ext6 = ext6; + } + + public String getExt7() { + return this.ext7; + } + + public void setExt7(String ext7) { + this.ext7 = ext7; + } + + public String getExt8() { + return this.ext8; + } + + public void setExt8(String ext8) { + this.ext8 = ext8; + } + + public String getExt9() { + return this.ext9; + } + + public void setExt9(String ext9) { + this.ext9 = ext9; + } + + public String getExt10() { + return this.ext10; + } + + public void setExt10(String ext10) { + this.ext10 = ext10; + } + + public String getExt11() { + return this.ext11; + } + + public void setExt11(String ext11) { + this.ext11 = ext11; + } + + public String getExt12() { + return this.ext12; + } + + public void setExt12(String ext12) { + this.ext12 = ext12; + } + + public String getExt13() { + return this.ext13; + } + + public void setExt13(String ext13) { + this.ext13 = ext13; + } + + public String getExt14() { + return this.ext14; + } + + public void setExt14(String ext14) { + this.ext14 = ext14; + } + + public String getExt15() { + return this.ext15; + } + + public void setExt15(String ext15) { + this.ext15 = ext15; + } + + public String getExt16() { + return this.ext16; + } + + public void setExt16(String ext16) { + this.ext16 = ext16; + } + + public String getExt17() { + return this.ext17; + } + + public void setExt17(String ext17) { + this.ext17 = ext17; + } + + public String getExt18() { + return this.ext18; + } + + public void setExt18(String ext18) { + this.ext18 = ext18; + } + + public String getExt19() { + return this.ext19; + } + + public void setExt19(String ext19) { + this.ext19 = ext19; + } + + public String getExt20() { + return this.ext20; + } + + public void setExt20(String ext20) { + this.ext20 = ext20; + } + + public String getExt21() { + return this.ext21; + } + + public void setExt21(String ext21) { + this.ext21 = ext21; + } + + public String getExt22() { + return this.ext22; + } + + public void setExt22(String ext22) { + this.ext22 = ext22; + } + + public String getExt23() { + return this.ext23; + } + + public void setExt23(String ext23) { + this.ext23 = ext23; + } + + public String getExt24() { + return this.ext24; + } + + public void setExt24(String ext24) { + this.ext24 = ext24; + } + + public String getExt25() { + return this.ext25; + } + + public void setExt25(String ext25) { + this.ext25 = ext25; + } + + public String getExt26() { + return this.ext26; + } + + public void setExt26(String ext26) { + this.ext26 = ext26; + } + + public String getExt27() { + return this.ext27; + } + + public void setExt27(String ext27) { + this.ext27 = ext27; + } + + public String getExt28() { + return this.ext28; + } + + public void setExt28(String ext28) { + this.ext28 = ext28; + } + + public String getExt29() { + return this.ext29; + } + + public void setExt29(String ext29) { + this.ext29 = ext29; + } + + public String getExt30() { + return this.ext30; + } + + public void setExt30(String ext30) { + this.ext30 = ext30; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/organization/result/OrganizationResult.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/organization/result/OrganizationResult.java new file mode 100644 index 00000000..74d8b00a --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/organization/result/OrganizationResult.java @@ -0,0 +1,61 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.organization.result; + +import java.io.Serializable; + +public class OrganizationResult implements Serializable { + private static final long serialVersionUID = -8859668419022725837L; + private String id; + private String parentId; + private String name; + private String level; + private String type; + private String personNum; + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public String getParentId() { + return this.parentId; + } + + public void setParentId(String parentId) { + this.parentId = parentId; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public String getLevel() { + return this.level; + } + + public void setLevel(String level) { + this.level = level; + } + + public String getType() { + return this.type; + } + + public void setType(String type) { + this.type = type; + } + + public String getPersonNum() { + return this.personNum; + } + + public void setPersonNum(String personNum) { + this.personNum = personNum; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/organization/result/OrganizationTreeResult.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/organization/result/OrganizationTreeResult.java new file mode 100644 index 00000000..7c846522 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/organization/result/OrganizationTreeResult.java @@ -0,0 +1,80 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.organization.result; + +import java.io.Serializable; +import java.util.List; + +public class OrganizationTreeResult implements Serializable { + private static final long serialVersionUID = -3660433597425073920L; + private String id; + private String parentId; + private String name; + private String level; + private Short hasRequired; + private String typeId; + private String type; + private List children; + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public String getParentId() { + return this.parentId; + } + + public void setParentId(String parentId) { + this.parentId = parentId; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public String getLevel() { + return this.level; + } + + public void setLevel(String level) { + this.level = level; + } + + public Short getHasRequired() { + return this.hasRequired; + } + + public void setHasRequired(Short hasRequired) { + this.hasRequired = hasRequired; + } + + public String getTypeId() { + return this.typeId; + } + + public void setTypeId(String typeId) { + this.typeId = typeId; + } + + public String getType() { + return this.type; + } + + public void setType(String type) { + this.type = type; + } + + public List getChildren() { + return this.children; + } + + public void setChildren(List children) { + this.children = children; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/organization/service/OrganizationService.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/organization/service/OrganizationService.java new file mode 100644 index 00000000..52a34d34 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/organization/service/OrganizationService.java @@ -0,0 +1,44 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.organization.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.organization.param.OrganizationAddParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.organization.param.OrganizationDeleteParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.organization.param.OrganizationDetailQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.organization.param.OrganizationEditParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.organization.param.OrganizationListParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.organization.param.OrganizationQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.organization.param.OrganizationTreeParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.organization.param.RentUpdateParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.organization.result.OrganizationDetailResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.organization.result.OrganizationResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.organization.result.OrganizationTreeResult; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import java.util.List; + +public interface OrganizationService { + CloudwalkResult> page(OrganizationQueryParam paramOrganizationQueryParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult> tree(OrganizationTreeParam paramOrganizationTreeParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult> list(OrganizationListParam paramOrganizationListParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult add(OrganizationAddParam paramOrganizationAddParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult edit(OrganizationEditParam paramOrganizationEditParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult editRent(RentUpdateParam paramRentUpdateParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult delete(OrganizationDeleteParam paramOrganizationDeleteParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult detail(OrganizationDetailQueryParam paramOrganizationDetailQueryParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/package-info.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/package-info.java new file mode 100644 index 00000000..f70cf9e2 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/package-info.java @@ -0,0 +1,6 @@ +/** + * 智能 CWOS 组件对外契约(Feign/DTO/服务接口):供各业务线依赖的稳定 API 面。 + *

+ * 与 {@code intelligent-cwoscomponent-rest} 搭配使用:本模块仅包含接口与模型,不包含 Spring Cloud 客户端实现。 + */ +package cn.cloudwalk.client.cwoscomponent.intelligent; diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/person/param/PersonAddParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/person/param/PersonAddParam.java new file mode 100644 index 00000000..50bf0532 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/person/param/PersonAddParam.java @@ -0,0 +1,512 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.person.param; + +import java.io.Serializable; +import java.util.List; + +public class PersonAddParam implements Serializable { + private static final long serialVersionUID = 1156551413242314244L; + private String name; + private String userName; + private String personCode; + private String phone; + private String email; + private List organizationIds; + private List labelIds; + private Long expiryBeginDate; + private Long expiryEndDate; + private String comparePicture; + private String ext1; + private String ext2; + private String ext3; + private String ext4; + private String ext5; + private String ext6; + private String ext7; + private String ext8; + private String ext9; + private String ext10; + private String ext11; + private String ext12; + private String ext13; + private String ext14; + private String ext15; + private String ext16; + private String ext17; + private String ext18; + private String ext19; + private String ext20; + private String ext21; + private String ext22; + private String ext23; + private String ext24; + private String ext25; + private String ext26; + private String ext27; + private String ext28; + private String ext29; + private String ext30; + private String ext31; + private String ext32; + private String ext33; + private String ext34; + private String ext35; + private String ext36; + private String ext37; + private String ext38; + private String ext39; + private String ext40; + private String icCardNo; + private String icCardType; + private Integer createSysAccount; + private String welcome; + private String showPicture; + private String visitorId; + + public String getVisitorId() { + return this.visitorId; + } + + public void setVisitorId(String visitorId) { + this.visitorId = visitorId; + } + + public String getIcCardNo() { + return this.icCardNo; + } + + public void setIcCardNo(String icCardNo) { + this.icCardNo = icCardNo; + } + + public String getIcCardType() { + return this.icCardType; + } + + public void setIcCardType(String icCardType) { + this.icCardType = icCardType; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public String getUserName() { + return this.userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public String getPersonCode() { + return this.personCode; + } + + public void setPersonCode(String personCode) { + this.personCode = personCode; + } + + public String getPhone() { + return this.phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } + + public String getEmail() { + return this.email; + } + + public void setEmail(String email) { + this.email = email; + } + + public List getOrganizationIds() { + return this.organizationIds; + } + + public void setOrganizationIds(List organizationIds) { + this.organizationIds = organizationIds; + } + + public List getLabelIds() { + return this.labelIds; + } + + public void setLabelIds(List labelIds) { + this.labelIds = labelIds; + } + + public Long getExpiryBeginDate() { + return this.expiryBeginDate; + } + + public void setExpiryBeginDate(Long expiryBeginDate) { + this.expiryBeginDate = expiryBeginDate; + } + + public Long getExpiryEndDate() { + return this.expiryEndDate; + } + + public void setExpiryEndDate(Long expiryEndDate) { + this.expiryEndDate = expiryEndDate; + } + + public String getComparePicture() { + return this.comparePicture; + } + + public void setComparePicture(String comparePicture) { + this.comparePicture = comparePicture; + } + + public String getExt1() { + return this.ext1; + } + + public void setExt1(String ext1) { + this.ext1 = ext1; + } + + public String getExt2() { + return this.ext2; + } + + public void setExt2(String ext2) { + this.ext2 = ext2; + } + + public String getExt3() { + return this.ext3; + } + + public void setExt3(String ext3) { + this.ext3 = ext3; + } + + public String getExt4() { + return this.ext4; + } + + public void setExt4(String ext4) { + this.ext4 = ext4; + } + + public String getExt5() { + return this.ext5; + } + + public void setExt5(String ext5) { + this.ext5 = ext5; + } + + public String getExt6() { + return this.ext6; + } + + public void setExt6(String ext6) { + this.ext6 = ext6; + } + + public String getExt7() { + return this.ext7; + } + + public void setExt7(String ext7) { + this.ext7 = ext7; + } + + public String getExt8() { + return this.ext8; + } + + public void setExt8(String ext8) { + this.ext8 = ext8; + } + + public String getExt9() { + return this.ext9; + } + + public void setExt9(String ext9) { + this.ext9 = ext9; + } + + public String getExt10() { + return this.ext10; + } + + public void setExt10(String ext10) { + this.ext10 = ext10; + } + + public String getExt11() { + return this.ext11; + } + + public void setExt11(String ext11) { + this.ext11 = ext11; + } + + public String getExt12() { + return this.ext12; + } + + public void setExt12(String ext12) { + this.ext12 = ext12; + } + + public String getExt13() { + return this.ext13; + } + + public void setExt13(String ext13) { + this.ext13 = ext13; + } + + public String getExt14() { + return this.ext14; + } + + public void setExt14(String ext14) { + this.ext14 = ext14; + } + + public String getExt15() { + return this.ext15; + } + + public void setExt15(String ext15) { + this.ext15 = ext15; + } + + public String getExt16() { + return this.ext16; + } + + public void setExt16(String ext16) { + this.ext16 = ext16; + } + + public String getExt17() { + return this.ext17; + } + + public void setExt17(String ext17) { + this.ext17 = ext17; + } + + public String getExt18() { + return this.ext18; + } + + public void setExt18(String ext18) { + this.ext18 = ext18; + } + + public String getExt19() { + return this.ext19; + } + + public void setExt19(String ext19) { + this.ext19 = ext19; + } + + public String getExt20() { + return this.ext20; + } + + public void setExt20(String ext20) { + this.ext20 = ext20; + } + + public String getExt21() { + return this.ext21; + } + + public void setExt21(String ext21) { + this.ext21 = ext21; + } + + public String getExt22() { + return this.ext22; + } + + public void setExt22(String ext22) { + this.ext22 = ext22; + } + + public String getExt23() { + return this.ext23; + } + + public void setExt23(String ext23) { + this.ext23 = ext23; + } + + public String getExt24() { + return this.ext24; + } + + public void setExt24(String ext24) { + this.ext24 = ext24; + } + + public String getExt25() { + return this.ext25; + } + + public void setExt25(String ext25) { + this.ext25 = ext25; + } + + public String getExt26() { + return this.ext26; + } + + public void setExt26(String ext26) { + this.ext26 = ext26; + } + + public String getExt27() { + return this.ext27; + } + + public void setExt27(String ext27) { + this.ext27 = ext27; + } + + public String getExt28() { + return this.ext28; + } + + public void setExt28(String ext28) { + this.ext28 = ext28; + } + + public String getExt29() { + return this.ext29; + } + + public void setExt29(String ext29) { + this.ext29 = ext29; + } + + public String getExt30() { + return this.ext30; + } + + public void setExt30(String ext30) { + this.ext30 = ext30; + } + + public String getExt31() { + return this.ext31; + } + + public void setExt31(String ext31) { + this.ext31 = ext31; + } + + public String getExt32() { + return this.ext32; + } + + public void setExt32(String ext32) { + this.ext32 = ext32; + } + + public String getExt33() { + return this.ext33; + } + + public void setExt33(String ext33) { + this.ext33 = ext33; + } + + public String getExt34() { + return this.ext34; + } + + public void setExt34(String ext34) { + this.ext34 = ext34; + } + + public String getExt35() { + return this.ext35; + } + + public void setExt35(String ext35) { + this.ext35 = ext35; + } + + public String getExt36() { + return this.ext36; + } + + public void setExt36(String ext36) { + this.ext36 = ext36; + } + + public String getExt37() { + return this.ext37; + } + + public void setExt37(String ext37) { + this.ext37 = ext37; + } + + public String getExt38() { + return this.ext38; + } + + public void setExt38(String ext38) { + this.ext38 = ext38; + } + + public String getExt39() { + return this.ext39; + } + + public void setExt39(String ext39) { + this.ext39 = ext39; + } + + public String getExt40() { + return this.ext40; + } + + public void setExt40(String ext40) { + this.ext40 = ext40; + } + + public Integer getCreateSysAccount() { + return this.createSysAccount; + } + + public void setCreateSysAccount(Integer createSysAccount) { + this.createSysAccount = createSysAccount; + } + + public String getWelcome() { + return this.welcome; + } + + public void setWelcome(String welcome) { + this.welcome = welcome; + } + + public String getShowPicture() { + return this.showPicture; + } + + public void setShowPicture(String showPicture) { + this.showPicture = showPicture; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/person/param/PersonDelParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/person/param/PersonDelParam.java new file mode 100644 index 00000000..8782c344 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/person/param/PersonDelParam.java @@ -0,0 +1,17 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.person.param; + +import java.io.Serializable; +import java.util.List; + +public class PersonDelParam implements Serializable { + private static final long serialVersionUID = -8756935212656602042L; + private List ids; + + public List getIds() { + return this.ids; + } + + public void setIds(List ids) { + this.ids = ids; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/person/param/PersonDetailParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/person/param/PersonDetailParam.java new file mode 100644 index 00000000..58ef44ae --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/person/param/PersonDetailParam.java @@ -0,0 +1,25 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.person.param; + +import java.io.Serializable; + +public class PersonDetailParam implements Serializable { + private static final long serialVersionUID = 7666677873099106082L; + private String id; + private String businessId; + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/person/param/PersonEditParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/person/param/PersonEditParam.java new file mode 100644 index 00000000..6b579af7 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/person/param/PersonEditParam.java @@ -0,0 +1,521 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.person.param; + +import java.io.Serializable; +import java.util.List; + +public class PersonEditParam implements Serializable { + private static final long serialVersionUID = 1156551413242314244L; + private String id; + private String name; + private String userName; + private String personCode; + private String phone; + private String email; + private List organizationIds; + private List labelIds; + private Long expiryBeginDate; + private Long expiryEndDate; + private String comparePicture; + private String ext1; + private String ext2; + private String ext3; + private String ext4; + private String ext5; + private String ext6; + private String ext7; + private String ext8; + private String ext9; + private String ext10; + private String ext11; + private String ext12; + private String ext13; + private String ext14; + private String ext15; + private String ext16; + private String ext17; + private String ext18; + private String ext19; + private String ext20; + private String ext21; + private String ext22; + private String ext23; + private String ext24; + private String ext25; + private String ext26; + private String ext27; + private String ext28; + private String ext29; + private String ext30; + private String ext31; + private String ext32; + private String ext33; + private String ext34; + private String ext35; + private String ext36; + private String ext37; + private String ext38; + private String ext39; + private String ext40; + private String icCardNo; + private String icCardType; + private String welcome; + private String showPicture; + private String defaultFloor; + private String chooseFloor; + + public String getIcCardNo() { + return this.icCardNo; + } + + public void setIcCardNo(String icCardNo) { + this.icCardNo = icCardNo; + } + + public String getIcCardType() { + return this.icCardType; + } + + public void setIcCardType(String icCardType) { + this.icCardType = icCardType; + } + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public String getUserName() { + return this.userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public String getPersonCode() { + return this.personCode; + } + + public void setPersonCode(String personCode) { + this.personCode = personCode; + } + + public String getPhone() { + return this.phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } + + public String getEmail() { + return this.email; + } + + public void setEmail(String email) { + this.email = email; + } + + public List getOrganizationIds() { + return this.organizationIds; + } + + public void setOrganizationIds(List organizationIds) { + this.organizationIds = organizationIds; + } + + public List getLabelIds() { + return this.labelIds; + } + + public void setLabelIds(List labelIds) { + this.labelIds = labelIds; + } + + public Long getExpiryBeginDate() { + return this.expiryBeginDate; + } + + public void setExpiryBeginDate(Long expiryBeginDate) { + this.expiryBeginDate = expiryBeginDate; + } + + public Long getExpiryEndDate() { + return this.expiryEndDate; + } + + public void setExpiryEndDate(Long expiryEndDate) { + this.expiryEndDate = expiryEndDate; + } + + public String getComparePicture() { + return this.comparePicture; + } + + public void setComparePicture(String comparePicture) { + this.comparePicture = comparePicture; + } + + public String getExt1() { + return this.ext1; + } + + public void setExt1(String ext1) { + this.ext1 = ext1; + } + + public String getExt2() { + return this.ext2; + } + + public void setExt2(String ext2) { + this.ext2 = ext2; + } + + public String getExt3() { + return this.ext3; + } + + public void setExt3(String ext3) { + this.ext3 = ext3; + } + + public String getExt4() { + return this.ext4; + } + + public void setExt4(String ext4) { + this.ext4 = ext4; + } + + public String getExt5() { + return this.ext5; + } + + public void setExt5(String ext5) { + this.ext5 = ext5; + } + + public String getExt6() { + return this.ext6; + } + + public void setExt6(String ext6) { + this.ext6 = ext6; + } + + public String getExt7() { + return this.ext7; + } + + public void setExt7(String ext7) { + this.ext7 = ext7; + } + + public String getExt8() { + return this.ext8; + } + + public void setExt8(String ext8) { + this.ext8 = ext8; + } + + public String getExt9() { + return this.ext9; + } + + public void setExt9(String ext9) { + this.ext9 = ext9; + } + + public String getExt10() { + return this.ext10; + } + + public void setExt10(String ext10) { + this.ext10 = ext10; + } + + public String getExt11() { + return this.ext11; + } + + public void setExt11(String ext11) { + this.ext11 = ext11; + } + + public String getExt12() { + return this.ext12; + } + + public void setExt12(String ext12) { + this.ext12 = ext12; + } + + public String getExt13() { + return this.ext13; + } + + public void setExt13(String ext13) { + this.ext13 = ext13; + } + + public String getExt14() { + return this.ext14; + } + + public void setExt14(String ext14) { + this.ext14 = ext14; + } + + public String getExt15() { + return this.ext15; + } + + public void setExt15(String ext15) { + this.ext15 = ext15; + } + + public String getExt16() { + return this.ext16; + } + + public void setExt16(String ext16) { + this.ext16 = ext16; + } + + public String getExt17() { + return this.ext17; + } + + public void setExt17(String ext17) { + this.ext17 = ext17; + } + + public String getExt18() { + return this.ext18; + } + + public void setExt18(String ext18) { + this.ext18 = ext18; + } + + public String getExt19() { + return this.ext19; + } + + public void setExt19(String ext19) { + this.ext19 = ext19; + } + + public String getExt20() { + return this.ext20; + } + + public void setExt20(String ext20) { + this.ext20 = ext20; + } + + public String getExt21() { + return this.ext21; + } + + public void setExt21(String ext21) { + this.ext21 = ext21; + } + + public String getExt22() { + return this.ext22; + } + + public void setExt22(String ext22) { + this.ext22 = ext22; + } + + public String getExt23() { + return this.ext23; + } + + public void setExt23(String ext23) { + this.ext23 = ext23; + } + + public String getExt24() { + return this.ext24; + } + + public void setExt24(String ext24) { + this.ext24 = ext24; + } + + public String getExt25() { + return this.ext25; + } + + public void setExt25(String ext25) { + this.ext25 = ext25; + } + + public String getExt26() { + return this.ext26; + } + + public void setExt26(String ext26) { + this.ext26 = ext26; + } + + public String getExt27() { + return this.ext27; + } + + public void setExt27(String ext27) { + this.ext27 = ext27; + } + + public String getExt28() { + return this.ext28; + } + + public void setExt28(String ext28) { + this.ext28 = ext28; + } + + public String getExt29() { + return this.ext29; + } + + public void setExt29(String ext29) { + this.ext29 = ext29; + } + + public String getExt30() { + return this.ext30; + } + + public void setExt30(String ext30) { + this.ext30 = ext30; + } + + public String getExt31() { + return this.ext31; + } + + public void setExt31(String ext31) { + this.ext31 = ext31; + } + + public String getExt32() { + return this.ext32; + } + + public void setExt32(String ext32) { + this.ext32 = ext32; + } + + public String getExt33() { + return this.ext33; + } + + public void setExt33(String ext33) { + this.ext33 = ext33; + } + + public String getExt34() { + return this.ext34; + } + + public void setExt34(String ext34) { + this.ext34 = ext34; + } + + public String getExt35() { + return this.ext35; + } + + public void setExt35(String ext35) { + this.ext35 = ext35; + } + + public String getExt36() { + return this.ext36; + } + + public void setExt36(String ext36) { + this.ext36 = ext36; + } + + public String getExt37() { + return this.ext37; + } + + public void setExt37(String ext37) { + this.ext37 = ext37; + } + + public String getExt38() { + return this.ext38; + } + + public void setExt38(String ext38) { + this.ext38 = ext38; + } + + public String getExt39() { + return this.ext39; + } + + public void setExt39(String ext39) { + this.ext39 = ext39; + } + + public String getExt40() { + return this.ext40; + } + + public void setExt40(String ext40) { + this.ext40 = ext40; + } + + public String getWelcome() { + return this.welcome; + } + + public void setWelcome(String welcome) { + this.welcome = welcome; + } + + public String getShowPicture() { + return this.showPicture; + } + + public void setShowPicture(String showPicture) { + this.showPicture = showPicture; + } + + public String getDefaultFloor() { + return this.defaultFloor; + } + + public void setDefaultFloor(String defaultFloor) { + this.defaultFloor = defaultFloor; + } + + public String getChooseFloor() { + return this.chooseFloor; + } + + public void setChooseFloor(String chooseFloor) { + this.chooseFloor = chooseFloor; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/person/param/PersonImportParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/person/param/PersonImportParam.java new file mode 100644 index 00000000..40b521be --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/person/param/PersonImportParam.java @@ -0,0 +1,16 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.person.param; + +import java.io.Serializable; + +public class PersonImportParam implements Serializable { + private static final long serialVersionUID = 1770866362068399099L; + private String filePath; + + public String getFilePath() { + return this.filePath; + } + + public void setFilePath(String filePath) { + this.filePath = filePath; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/person/param/PersonQueryParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/person/param/PersonQueryParam.java new file mode 100644 index 00000000..d60ea095 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/person/param/PersonQueryParam.java @@ -0,0 +1,116 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.person.param; + +import cn.cloudwalk.cloud.page.CloudwalkBasePageForm; +import java.util.List; + +public class PersonQueryParam extends CloudwalkBasePageForm { + private static final long serialVersionUID = 825821529757530079L; + private List ids; + private String personCode; + private String name; + private String phone; + private Integer createSysAccount; + private List organizationIds; + private List labelIds; + private List imageIds; + private String icCardNo; + private Integer isElevator; + private Integer isVisitor; + private String businessId; + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public Integer getIsVisitor() { + return this.isVisitor; + } + + public void setIsVisitor(Integer isVisitor) { + this.isVisitor = isVisitor; + } + + public Integer getIsElevator() { + return this.isElevator; + } + + public void setIsElevator(Integer isElevator) { + this.isElevator = isElevator; + } + + public List getIds() { + return this.ids; + } + + public void setIds(List ids) { + this.ids = ids; + } + + public String getPersonCode() { + return this.personCode; + } + + public void setPersonCode(String personCode) { + this.personCode = personCode; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public String getPhone() { + return this.phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } + + public Integer getCreateSysAccount() { + return this.createSysAccount; + } + + public void setCreateSysAccount(Integer createSysAccount) { + this.createSysAccount = createSysAccount; + } + + public List getOrganizationIds() { + return this.organizationIds; + } + + public void setOrganizationIds(List organizationIds) { + this.organizationIds = organizationIds; + } + + public List getLabelIds() { + return this.labelIds; + } + + public void setLabelIds(List labelIds) { + this.labelIds = labelIds; + } + + public List getImageIds() { + return this.imageIds; + } + + public void setImageIds(List imageIds) { + this.imageIds = imageIds; + } + + public String getIcCardNo() { + return this.icCardNo; + } + + public void setIcCardNo(String icCardNo) { + this.icCardNo = icCardNo; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/person/result/AcsPassRuleImageResultDto.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/person/result/AcsPassRuleImageResultDto.java new file mode 100644 index 00000000..46d31556 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/person/result/AcsPassRuleImageResultDto.java @@ -0,0 +1,31 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.person.result; + +public class AcsPassRuleImageResultDto { + private String zoneId; + private String zoneName; + private String imageStoreId; + + public String getZoneId() { + return this.zoneId; + } + + public void setZoneId(String zoneId) { + this.zoneId = zoneId; + } + + public String getZoneName() { + return this.zoneName; + } + + public void setZoneName(String zoneName) { + this.zoneName = zoneName; + } + + public String getImageStoreId() { + return this.imageStoreId; + } + + public void setImageStoreId(String imageStoreId) { + this.imageStoreId = imageStoreId; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/person/result/PersonResult.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/person/result/PersonResult.java new file mode 100644 index 00000000..ed006a44 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/person/result/PersonResult.java @@ -0,0 +1,251 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.person.result; + +import cn.cloudwalk.cloud.entity.CloudwalkBaseTimes; +import java.util.List; + +public class PersonResult extends CloudwalkBaseTimes { + private static final long serialVersionUID = -8100437427836068519L; + private String businessId; + private String personCode; + private String name; + private String userName; + private String phone; + private String email; + private Integer status; + private Long expiryBeginDate; + private Long expiryEndDate; + private String comparePicture; + private String ext1; + private String ext2; + private String extn; + private Integer isDel; + private List organizationIds; + private List organizationNames; + private List labelIds; + private List labelNames; + private String icCardNo; + private String icCardType; + private String imageId; + private String defaultFloor; + private String chooseFloor; + private List floorList; + private List floorInfoList; + private Integer isAcrossDay; + private String defaultChooseFloor; + + public List getFloorInfoList() { + return this.floorInfoList; + } + + public void setFloorInfoList(List floorInfoList) { + this.floorInfoList = floorInfoList; + } + + public Integer getIsAcrossDay() { + return this.isAcrossDay; + } + + public void setIsAcrossDay(Integer isAcrossDay) { + this.isAcrossDay = isAcrossDay; + } + + public String getDefaultChooseFloor() { + return this.defaultChooseFloor; + } + + public void setDefaultChooseFloor(String defaultChooseFloor) { + this.defaultChooseFloor = defaultChooseFloor; + } + + public List getFloorList() { + return this.floorList; + } + + public void setFloorList(List floorList) { + this.floorList = floorList; + } + + public String getIcCardNo() { + return this.icCardNo; + } + + public void setIcCardNo(String icCardNo) { + this.icCardNo = icCardNo; + } + + public String getIcCardType() { + return this.icCardType; + } + + public void setIcCardType(String icCardType) { + this.icCardType = icCardType; + } + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getPersonCode() { + return this.personCode; + } + + public void setPersonCode(String personCode) { + this.personCode = personCode; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public String getUserName() { + return this.userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public String getPhone() { + return this.phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } + + public String getEmail() { + return this.email; + } + + public void setEmail(String email) { + this.email = email; + } + + public Integer getStatus() { + return this.status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Long getExpiryBeginDate() { + return this.expiryBeginDate; + } + + public void setExpiryBeginDate(Long expiryBeginDate) { + this.expiryBeginDate = expiryBeginDate; + } + + public Long getExpiryEndDate() { + return this.expiryEndDate; + } + + public void setExpiryEndDate(Long expiryEndDate) { + this.expiryEndDate = expiryEndDate; + } + + public String getComparePicture() { + return this.comparePicture; + } + + public void setComparePicture(String comparePicture) { + this.comparePicture = comparePicture; + } + + public String getExt1() { + return this.ext1; + } + + public void setExt1(String ext1) { + this.ext1 = ext1; + } + + public String getExt2() { + return this.ext2; + } + + public void setExt2(String ext2) { + this.ext2 = ext2; + } + + public String getExtn() { + return this.extn; + } + + public void setExtn(String extn) { + this.extn = extn; + } + + public Integer getIsDel() { + return this.isDel; + } + + public void setIsDel(Integer isDel) { + this.isDel = isDel; + } + + public List getOrganizationIds() { + return this.organizationIds; + } + + public void setOrganizationIds(List organizationIds) { + this.organizationIds = organizationIds; + } + + public List getOrganizationNames() { + return this.organizationNames; + } + + public void setOrganizationNames(List organizationNames) { + this.organizationNames = organizationNames; + } + + public List getLabelIds() { + return this.labelIds; + } + + public void setLabelIds(List labelIds) { + this.labelIds = labelIds; + } + + public List getLabelNames() { + return this.labelNames; + } + + public void setLabelNames(List labelNames) { + this.labelNames = labelNames; + } + + public String getImageId() { + return this.imageId; + } + + public void setImageId(String imageId) { + this.imageId = imageId; + } + + public String getDefaultFloor() { + return this.defaultFloor; + } + + public void setDefaultFloor(String defaultFloor) { + this.defaultFloor = defaultFloor; + } + + public String getChooseFloor() { + return this.chooseFloor; + } + + public void setChooseFloor(String chooseFloor) { + this.chooseFloor = chooseFloor; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/person/service/PersonService.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/person/service/PersonService.java new file mode 100644 index 00000000..02c111a3 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/person/service/PersonService.java @@ -0,0 +1,37 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.person.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.person.param.PersonAddParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.person.param.PersonDelParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.person.param.PersonDetailParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.person.param.PersonEditParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.person.param.PersonImportParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.person.param.PersonQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.person.result.PersonResult; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import java.util.List; + +public interface PersonService { + CloudwalkResult add(PersonAddParam paramPersonAddParam, CloudwalkCallContext paramCloudwalkCallContext) + throws ServiceException; + + CloudwalkResult edit(PersonEditParam paramPersonEditParam, CloudwalkCallContext paramCloudwalkCallContext) + throws ServiceException; + + CloudwalkResult delete(PersonDelParam paramPersonDelParam, CloudwalkCallContext paramCloudwalkCallContext) + throws ServiceException; + + CloudwalkResult detail(PersonDetailParam paramPersonDetailParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult> list(PersonQueryParam paramPersonQueryParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult> page(PersonQueryParam paramPersonQueryParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult batchimport(PersonImportParam paramPersonImportParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/record/param/AcsRecordThreeSendParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/record/param/AcsRecordThreeSendParam.java new file mode 100644 index 00000000..d30e5b05 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/record/param/AcsRecordThreeSendParam.java @@ -0,0 +1,26 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.record.param; + +import cn.cloudwalk.cloud.page.CloudwalkBasePageForm; +import java.io.Serializable; + +public class AcsRecordThreeSendParam extends CloudwalkBasePageForm implements Serializable { + private static final long serialVersionUID = -3475211265359169812L; + private Long startTime; + private Long endTime; + + public Long getStartTime() { + return this.startTime; + } + + public void setStartTime(Long startTime) { + this.startTime = startTime; + } + + public Long getEndTime() { + return this.endTime; + } + + public void setEndTime(Long endTime) { + this.endTime = endTime; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/record/result/AcsRecordThreeSendResult.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/record/result/AcsRecordThreeSendResult.java new file mode 100644 index 00000000..fa7dda7b --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/record/result/AcsRecordThreeSendResult.java @@ -0,0 +1,269 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.record.result; + +import java.io.Serializable; +import java.math.BigDecimal; + +public class AcsRecordThreeSendResult implements Serializable { + private static final long serialVersionUID = -7885557765557102286L; + private String openDoorId; + private String panoramaImage; + private String faceImage; + private String registerImage; + private String personName; + private String personId; + private long recognitionTime; + private String districtName; + private String areaName; + private String deviceTypeName; + private String deviceName; + private String openDoorType; + private String operateName; + private String openDoorTypeCode; + private BigDecimal score; + private Integer recordResult; + private String recognitionNo; + private String regRecordId; + private BigDecimal threshold; + private Integer recognitionResult; + private String groupId; + private String faceId; + private BigDecimal qualityScore; + private String logId; + private BigDecimal tempScore; + private BigDecimal maskScore; + private BigDecimal tempThreshold; + private String businessId; + private String personCode; + + public String getPersonCode() { + return this.personCode; + } + + public void setPersonCode(String personCode) { + this.personCode = personCode; + } + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getOpenDoorId() { + return this.openDoorId; + } + + public void setOpenDoorId(String openDoorId) { + this.openDoorId = openDoorId; + } + + public String getPanoramaImage() { + return this.panoramaImage; + } + + public void setPanoramaImage(String panoramaImage) { + this.panoramaImage = panoramaImage; + } + + public String getFaceImage() { + return this.faceImage; + } + + public void setFaceImage(String faceImage) { + this.faceImage = faceImage; + } + + public String getRegisterImage() { + return this.registerImage; + } + + public void setRegisterImage(String registerImage) { + this.registerImage = registerImage; + } + + public String getPersonName() { + return this.personName; + } + + public void setPersonName(String personName) { + this.personName = personName; + } + + public long getRecognitionTime() { + return this.recognitionTime; + } + + public void setRecognitionTime(long recognitionTime) { + this.recognitionTime = recognitionTime; + } + + public String getDistrictName() { + return this.districtName; + } + + public void setDistrictName(String districtName) { + this.districtName = districtName; + } + + public String getAreaName() { + return this.areaName; + } + + public void setAreaName(String areaName) { + this.areaName = areaName; + } + + public String getDeviceTypeName() { + return this.deviceTypeName; + } + + public void setDeviceTypeName(String deviceTypeName) { + this.deviceTypeName = deviceTypeName; + } + + public String getDeviceName() { + return this.deviceName; + } + + public void setDeviceName(String deviceName) { + this.deviceName = deviceName; + } + + public String getOpenDoorType() { + return this.openDoorType; + } + + public void setOpenDoorType(String openDoorType) { + this.openDoorType = openDoorType; + } + + public String getOperateName() { + return this.operateName; + } + + public void setOperateName(String operateName) { + this.operateName = operateName; + } + + public String getOpenDoorTypeCode() { + return this.openDoorTypeCode; + } + + public void setOpenDoorTypeCode(String openDoorTypeCode) { + this.openDoorTypeCode = openDoorTypeCode; + } + + public BigDecimal getScore() { + return this.score; + } + + public void setScore(BigDecimal score) { + this.score = score; + } + + public Integer getRecordResult() { + return this.recordResult; + } + + public void setRecordResult(Integer recordResult) { + this.recordResult = recordResult; + } + + public String getRecognitionNo() { + return this.recognitionNo; + } + + public void setRecognitionNo(String recognitionNo) { + this.recognitionNo = recognitionNo; + } + + public String getRegRecordId() { + return this.regRecordId; + } + + public void setRegRecordId(String regRecordId) { + this.regRecordId = regRecordId; + } + + public BigDecimal getThreshold() { + return this.threshold; + } + + public void setThreshold(BigDecimal threshold) { + this.threshold = threshold; + } + + public Integer getRecognitionResult() { + return this.recognitionResult; + } + + public void setRecognitionResult(Integer recognitionResult) { + this.recognitionResult = recognitionResult; + } + + public String getGroupId() { + return this.groupId; + } + + public void setGroupId(String groupId) { + this.groupId = groupId; + } + + public String getFaceId() { + return this.faceId; + } + + public void setFaceId(String faceId) { + this.faceId = faceId; + } + + public BigDecimal getQualityScore() { + return this.qualityScore; + } + + public void setQualityScore(BigDecimal qualityScore) { + this.qualityScore = qualityScore; + } + + public String getLogId() { + return this.logId; + } + + public void setLogId(String logId) { + this.logId = logId; + } + + public BigDecimal getTempScore() { + return this.tempScore; + } + + public void setTempScore(BigDecimal tempScore) { + this.tempScore = tempScore; + } + + public BigDecimal getMaskScore() { + return this.maskScore; + } + + public void setMaskScore(BigDecimal maskScore) { + this.maskScore = maskScore; + } + + public BigDecimal getTempThreshold() { + return this.tempThreshold; + } + + public void setTempThreshold(BigDecimal tempThreshold) { + this.tempThreshold = tempThreshold; + } + + public String getPersonId() { + return this.personId; + } + + public void setPersonId(String personId) { + this.personId = personId; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/record/service/AcsRecordThreeSendService.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/record/service/AcsRecordThreeSendService.java new file mode 100644 index 00000000..ee6d12ad --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/record/service/AcsRecordThreeSendService.java @@ -0,0 +1,12 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.record.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.record.param.AcsRecordThreeSendParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.record.result.AcsRecordThreeSendResult; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import java.util.List; + +public interface AcsRecordThreeSendService { + CloudwalkResult> listByTime(AcsRecordThreeSendParam paramAcsRecordThreeSendParam) + throws ServiceException; +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/resource/param/RoleAddParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/resource/param/RoleAddParam.java new file mode 100644 index 00000000..16f7d658 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/resource/param/RoleAddParam.java @@ -0,0 +1,89 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.resource.param; + +import java.io.Serializable; +import java.util.List; + +public class RoleAddParam implements Serializable { + private static final long serialVersionUID = -5425558392021497502L; + private String id; + private String name; + private String serviceCode; + private String enName; + private String remark; + private String ext1; + private String ext2; + private String ext3; + private List resourceIds; + + public String getServiceCode() { + return this.serviceCode; + } + + public void setServiceCode(String serviceCode) { + this.serviceCode = serviceCode; + } + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public String getEnName() { + return this.enName; + } + + public void setEnName(String enName) { + this.enName = enName; + } + + public String getRemark() { + return this.remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public String getExt1() { + return this.ext1; + } + + public void setExt1(String ext1) { + this.ext1 = ext1; + } + + public String getExt2() { + return this.ext2; + } + + public void setExt2(String ext2) { + this.ext2 = ext2; + } + + public String getExt3() { + return this.ext3; + } + + public void setExt3(String ext3) { + this.ext3 = ext3; + } + + public List getResourceIds() { + return this.resourceIds; + } + + public void setResourceIds(List resourceIds) { + this.resourceIds = resourceIds; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/resource/param/RoleDeltParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/resource/param/RoleDeltParam.java new file mode 100644 index 00000000..8226efb3 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/resource/param/RoleDeltParam.java @@ -0,0 +1,16 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.resource.param; + +import java.io.Serializable; +import java.util.List; + +public class RoleDeltParam implements Serializable { + private List ids; + + public List getIds() { + return this.ids; + } + + public void setIds(List ids) { + this.ids = ids; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/resource/param/RoleEditParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/resource/param/RoleEditParam.java new file mode 100644 index 00000000..ebeb8ed0 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/resource/param/RoleEditParam.java @@ -0,0 +1,98 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.resource.param; + +import java.io.Serializable; +import java.util.List; + +public class RoleEditParam implements Serializable { + private static final long serialVersionUID = -5425558392021497502L; + private String id; + private String name; + private String enName; + private String serviceCode; + private String remark; + private String ext1; + private String ext2; + private String ext3; + private String roleId; + private List resourceIds; + + public String getServiceCode() { + return this.serviceCode; + } + + public void setServiceCode(String serviceCode) { + this.serviceCode = serviceCode; + } + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public String getEnName() { + return this.enName; + } + + public void setEnName(String enName) { + this.enName = enName; + } + + public String getRemark() { + return this.remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public String getExt1() { + return this.ext1; + } + + public void setExt1(String ext1) { + this.ext1 = ext1; + } + + public String getExt2() { + return this.ext2; + } + + public void setExt2(String ext2) { + this.ext2 = ext2; + } + + public String getExt3() { + return this.ext3; + } + + public void setExt3(String ext3) { + this.ext3 = ext3; + } + + public String getRoleId() { + return this.roleId; + } + + public void setRoleId(String roleId) { + this.roleId = roleId; + } + + public List getResourceIds() { + return this.resourceIds; + } + + public void setResourceIds(List resourceIds) { + this.resourceIds = resourceIds; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/resource/param/RoleGetsParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/resource/param/RoleGetsParam.java new file mode 100644 index 00000000..e7f72f2b --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/resource/param/RoleGetsParam.java @@ -0,0 +1,17 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.resource.param; + +import java.io.Serializable; +import java.util.List; + +public class RoleGetsParam implements Serializable { + private static final long serialVersionUID = -5425558392021497502L; + private List ids; + + public List getIds() { + return this.ids; + } + + public void setIds(List ids) { + this.ids = ids; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/resource/param/RoleResourceAddParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/resource/param/RoleResourceAddParam.java new file mode 100644 index 00000000..ca1bbc80 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/resource/param/RoleResourceAddParam.java @@ -0,0 +1,26 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.resource.param; + +import java.io.Serializable; +import java.util.List; + +public class RoleResourceAddParam implements Serializable { + private static final long serialVersionUID = -95343153556346732L; + private String roleId; + private List resourceIds; + + public String getRoleId() { + return this.roleId; + } + + public void setRoleId(String roleId) { + this.roleId = roleId; + } + + public List getResourceIds() { + return this.resourceIds; + } + + public void setResourceIds(List resourceIds) { + this.resourceIds = resourceIds; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/resource/param/RoleResourceDelParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/resource/param/RoleResourceDelParam.java new file mode 100644 index 00000000..31f65792 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/resource/param/RoleResourceDelParam.java @@ -0,0 +1,26 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.resource.param; + +import java.io.Serializable; +import java.util.List; + +public class RoleResourceDelParam implements Serializable { + private static final long serialVersionUID = -5425558392021497502L; + private String roleId; + private List resourceIds; + + public String getRoleId() { + return this.roleId; + } + + public void setRoleId(String roleId) { + this.roleId = roleId; + } + + public List getResourceIds() { + return this.resourceIds; + } + + public void setResourceIds(List resourceIds) { + this.resourceIds = resourceIds; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/resource/param/RoleResourceQueryParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/resource/param/RoleResourceQueryParam.java new file mode 100644 index 00000000..a20a7175 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/resource/param/RoleResourceQueryParam.java @@ -0,0 +1,16 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.resource.param; + +import java.io.Serializable; + +public class RoleResourceQueryParam implements Serializable { + private static final long serialVersionUID = -5425558392021497502L; + private String roleId; + + public String getRoleId() { + return this.roleId; + } + + public void setRoleId(String roleId) { + this.roleId = roleId; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/resource/param/ValidateLoginTokenParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/resource/param/ValidateLoginTokenParam.java new file mode 100644 index 00000000..2b08eaba --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/resource/param/ValidateLoginTokenParam.java @@ -0,0 +1,33 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.resource.param; + +import java.io.Serializable; + +public class ValidateLoginTokenParam implements Serializable { + private String accessToken; + private String url; + private Short needAuth; + + public String getAccessToken() { + return this.accessToken; + } + + public void setAccessToken(String accessToken) { + this.accessToken = accessToken; + } + + public String getUrl() { + return this.url; + } + + public void setUrl(String url) { + this.url = url; + } + + public Short getNeedAuth() { + return this.needAuth; + } + + public void setNeedAuth(Short needAuth) { + this.needAuth = needAuth; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/resource/result/RoleDetailResult.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/resource/result/RoleDetailResult.java new file mode 100644 index 00000000..d48c403e --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/resource/result/RoleDetailResult.java @@ -0,0 +1,142 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.resource.result; + +import java.io.Serializable; + +public class RoleDetailResult implements Serializable { + private static final long serialVersionUID = 2163207464373338858L; + private String id; + private String serviceCode; + private String businessId; + private String code; + private String name; + private Short status; + private Short builtIn; + private String remark; + private Long createTime; + private Long lastUpdateTime; + private String createUserId; + private String lastUpdateUserId; + private String ext1; + private String ext2; + private String ext3; + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public String getServiceCode() { + return this.serviceCode; + } + + public void setServiceCode(String serviceCode) { + this.serviceCode = serviceCode; + } + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getCode() { + return this.code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public Short getStatus() { + return this.status; + } + + public void setStatus(Short status) { + this.status = status; + } + + public Short getBuiltIn() { + return this.builtIn; + } + + public void setBuiltIn(Short builtIn) { + this.builtIn = builtIn; + } + + public String getRemark() { + return this.remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public Long getCreateTime() { + return this.createTime; + } + + public void setCreateTime(Long createTime) { + this.createTime = createTime; + } + + public Long getLastUpdateTime() { + return this.lastUpdateTime; + } + + public void setLastUpdateTime(Long lastUpdateTime) { + this.lastUpdateTime = lastUpdateTime; + } + + public String getCreateUserId() { + return this.createUserId; + } + + public void setCreateUserId(String createUserId) { + this.createUserId = createUserId; + } + + public String getLastUpdateUserId() { + return this.lastUpdateUserId; + } + + public void setLastUpdateUserId(String lastUpdateUserId) { + this.lastUpdateUserId = lastUpdateUserId; + } + + public String getExt1() { + return this.ext1; + } + + public void setExt1(String ext1) { + this.ext1 = ext1; + } + + public String getExt2() { + return this.ext2; + } + + public void setExt2(String ext2) { + this.ext2 = ext2; + } + + public String getExt3() { + return this.ext3; + } + + public void setExt3(String ext3) { + this.ext3 = ext3; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/resource/result/RoleResourceResult.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/resource/result/RoleResourceResult.java new file mode 100644 index 00000000..31a84199 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/resource/result/RoleResourceResult.java @@ -0,0 +1,70 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.resource.result; + +import java.io.Serializable; + +public class RoleResourceResult implements Serializable { + private static final long serialVersionUID = -95343153556346732L; + private String id; + private String roleId; + private String resourceId; + private String createTime; + private String lastUpdateTime; + private String createUserId; + private String lastUpdateUserId; + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public String getRoleId() { + return this.roleId; + } + + public void setRoleId(String roleId) { + this.roleId = roleId; + } + + public String getResourceId() { + return this.resourceId; + } + + public void setResourceId(String resourceIds) { + this.resourceId = resourceIds; + } + + public String getCreateTime() { + return this.createTime; + } + + public void setCreateTime(String createTime) { + this.createTime = createTime; + } + + public String getLastUpdateTime() { + return this.lastUpdateTime; + } + + public void setLastUpdateTime(String lastUpdateTime) { + this.lastUpdateTime = lastUpdateTime; + } + + public String getCreateUserId() { + return this.createUserId; + } + + public void setCreateUserId(String createUserId) { + this.createUserId = createUserId; + } + + public String getLastUpdateUserId() { + return this.lastUpdateUserId; + } + + public void setLastUpdateUserId(String lastUpdateUserId) { + this.lastUpdateUserId = lastUpdateUserId; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/resource/result/ValidateLoginTokenResult.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/resource/result/ValidateLoginTokenResult.java new file mode 100644 index 00000000..37b8d472 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/resource/result/ValidateLoginTokenResult.java @@ -0,0 +1,79 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.resource.result; + +import java.io.Serializable; + +public class ValidateLoginTokenResult implements Serializable { + private static final long serialVersionUID = 8896222770011017569L; + private String accountId; + private String businessId; + private String contactPerson; + private String corpCode; + private String loginId; + private String token; + private String userId; + private String userName; + + public String getAccountId() { + return this.accountId; + } + + public void setAccountId(String accountId) { + this.accountId = accountId; + } + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getContactPerson() { + return this.contactPerson; + } + + public void setContactPerson(String contactPerson) { + this.contactPerson = contactPerson; + } + + public String getCorpCode() { + return this.corpCode; + } + + public void setCorpCode(String corpCode) { + this.corpCode = corpCode; + } + + public String getLoginId() { + return this.loginId; + } + + public void setLoginId(String loginId) { + this.loginId = loginId; + } + + public String getToken() { + return this.token; + } + + public void setToken(String token) { + this.token = token; + } + + public String getUserId() { + return this.userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + public String getUserName() { + return this.userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/resource/service/LoginService.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/resource/service/LoginService.java new file mode 100644 index 00000000..c5911a9e --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/resource/service/LoginService.java @@ -0,0 +1,11 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.resource.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.resource.param.ValidateLoginTokenParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.resource.result.ValidateLoginTokenResult; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.result.CloudwalkResult; + +public interface LoginService { + CloudwalkResult validateLoginToken(ValidateLoginTokenParam paramValidateLoginTokenParam, + CloudwalkCallContext paramCloudwalkCallContext); +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/resource/service/RoleService.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/resource/service/RoleService.java new file mode 100644 index 00000000..2fc963ff --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/resource/service/RoleService.java @@ -0,0 +1,38 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.resource.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.resource.param.RoleAddParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.resource.param.RoleDeltParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.resource.param.RoleEditParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.resource.param.RoleGetsParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.resource.param.RoleResourceAddParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.resource.param.RoleResourceDelParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.resource.param.RoleResourceQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.resource.result.RoleDetailResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.resource.result.RoleResourceResult; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import java.util.List; + +public interface RoleService { + CloudwalkResult> gets(RoleGetsParam paramRoleGetsParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult add(RoleAddParam paramRoleAddParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult> edit(RoleEditParam paramRoleEditParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult delete(RoleDeltParam paramRoleDeltParam, CloudwalkCallContext paramCloudwalkCallContext) + throws ServiceException; + + CloudwalkResult> resourceQuery(RoleResourceQueryParam paramRoleResourceQueryParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult resourceAdd(RoleResourceAddParam paramRoleResourceAddParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult resourceDel(RoleResourceDelParam paramRoleResourceDelParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/sysetting/param/DeviceAreaTreeParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/sysetting/param/DeviceAreaTreeParam.java new file mode 100644 index 00000000..d8f5b56e --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/sysetting/param/DeviceAreaTreeParam.java @@ -0,0 +1,16 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.sysetting.param; + +import java.io.Serializable; + +public class DeviceAreaTreeParam implements Serializable { + private static final long serialVersionUID = -1854252461320350240L; + private String businessId; + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/sysetting/result/AreaTreeResult.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/sysetting/result/AreaTreeResult.java new file mode 100644 index 00000000..d3c1c84f --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/sysetting/result/AreaTreeResult.java @@ -0,0 +1,80 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.sysetting.result; + +import java.io.Serializable; +import java.util.List; + +public class AreaTreeResult implements Serializable { + private static final long serialVersionUID = -2920143083029759669L; + private String businessId; + private String id; + private String code; + private String orderBy; + private String name; + private String level; + private String parentId; + private List children; + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public String getCode() { + return this.code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getOrderBy() { + return this.orderBy; + } + + public void setOrderBy(String orderBy) { + this.orderBy = orderBy; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public String getLevel() { + return this.level; + } + + public void setLevel(String level) { + this.level = level; + } + + public String getParentId() { + return this.parentId; + } + + public void setParentId(String parentId) { + this.parentId = parentId; + } + + public List getChildren() { + return this.children; + } + + public void setChildren(List children) { + this.children = children; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/sysetting/service/SysettingAreaService.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/sysetting/service/SysettingAreaService.java new file mode 100644 index 00000000..c6a7bb8b --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/sysetting/service/SysettingAreaService.java @@ -0,0 +1,12 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.sysetting.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.sysetting.param.DeviceAreaTreeParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.sysetting.result.AreaTreeResult; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import java.util.List; + +public interface SysettingAreaService { + CloudwalkResult> tree(DeviceAreaTreeParam paramDeviceAreaTreeParam, + CloudwalkCallContext paramCloudwalkCallContext); +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/user/param/UserChangePwdParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/user/param/UserChangePwdParam.java new file mode 100644 index 00000000..4cdef363 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/user/param/UserChangePwdParam.java @@ -0,0 +1,24 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.user.param; + +import java.io.Serializable; + +public class UserChangePwdParam implements Serializable { + private String newPassword; + private String oldPassword; + + public String getNewPassword() { + return this.newPassword; + } + + public void setNewPassword(String newPassword) { + this.newPassword = newPassword; + } + + public String getOldPassword() { + return this.oldPassword; + } + + public void setOldPassword(String oldPassword) { + this.oldPassword = oldPassword; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/user/param/UserDetailParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/user/param/UserDetailParam.java new file mode 100644 index 00000000..18ff2976 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/user/param/UserDetailParam.java @@ -0,0 +1,25 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.user.param; + +import java.io.Serializable; + +public class UserDetailParam implements Serializable { + private static final long serialVersionUID = -6425526115195682828L; + private String id; + private String businessId; + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/user/param/UserQueryParam.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/user/param/UserQueryParam.java new file mode 100644 index 00000000..19ada5ee --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/user/param/UserQueryParam.java @@ -0,0 +1,89 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.user.param; + +import cn.cloudwalk.cloud.page.CloudwalkBasePageForm; +import java.io.Serializable; + +public class UserQueryParam extends CloudwalkBasePageForm implements Serializable { + private static final long serialVersionUID = -14665305087704673L; + private String businessId; + private String loginName; + private String systemId; + private String name; + private String telephone; + private String email; + private String status; + private String orgId; + private String roleId; + + public String getOrgId() { + return this.orgId; + } + + public void setOrgId(String orgId) { + this.orgId = orgId; + } + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getLoginName() { + return this.loginName; + } + + public void setLoginName(String loginName) { + this.loginName = loginName; + } + + public String getSystemId() { + return this.systemId; + } + + public void setSystemId(String systemId) { + this.systemId = systemId; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public String getTelephone() { + return this.telephone; + } + + public void setTelephone(String telephone) { + this.telephone = telephone; + } + + public String getEmail() { + return this.email; + } + + public void setEmail(String email) { + this.email = email; + } + + public String getStatus() { + return this.status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getRoleId() { + return this.roleId; + } + + public void setRoleId(String roleId) { + this.roleId = roleId; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/user/result/UserAcountDetailResult.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/user/result/UserAcountDetailResult.java new file mode 100644 index 00000000..a68d42a3 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/user/result/UserAcountDetailResult.java @@ -0,0 +1,116 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.user.result; + +import java.io.Serializable; +import java.util.List; + +public class UserAcountDetailResult implements Serializable { + private static final long serialVersionUID = 1975147471536624138L; + private String userId; + private String loginName; + private String name; + private String orgId; + private String orgName; + private String email; + private String telephone; + private String workCode; + private Integer status; + private String position; + private List roles; + private String remark; + + public String getUserId() { + return this.userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + public String getLoginName() { + return this.loginName; + } + + public void setLoginName(String loginName) { + this.loginName = loginName; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public String getOrgId() { + return this.orgId; + } + + public void setOrgId(String orgId) { + this.orgId = orgId; + } + + public String getOrgName() { + return this.orgName; + } + + public void setOrgName(String orgName) { + this.orgName = orgName; + } + + public String getEmail() { + return this.email; + } + + public void setEmail(String email) { + this.email = email; + } + + public String getTelephone() { + return this.telephone; + } + + public void setTelephone(String telephone) { + this.telephone = telephone; + } + + public String getWorkCode() { + return this.workCode; + } + + public void setWorkCode(String workCode) { + this.workCode = workCode; + } + + public Integer getStatus() { + return this.status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public String getPosition() { + return this.position; + } + + public void setPosition(String position) { + this.position = position; + } + + public List getRoles() { + return this.roles; + } + + public void setRoles(List roles) { + this.roles = roles; + } + + public String getRemark() { + return this.remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/user/result/UserDetailResult.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/user/result/UserDetailResult.java new file mode 100644 index 00000000..7b1c2f82 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/user/result/UserDetailResult.java @@ -0,0 +1,295 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.user.result; + +import java.io.Serializable; + +public class UserDetailResult implements Serializable { + private static final long serialVersionUID = -8851558367302965165L; + private String id; + private String serviceCode; + private String businessId; + private String orgId; + private String orgPath; + private String loginName; + private String name; + private String workCode; + private String position; + private String title; + private String email; + private String telephone; + private String picturePath; + private String remark; + private Short status; + private Short visible; + private String loginId; + private Short userLevel; + private Long createTime; + private Long lastUpdateTime; + private String createUserId; + private String lastUpdateUserId; + private String ext1; + private String ext2; + private String ext3; + private String corpName; + private String corpCode; + private String[] roleIds; + private String[] roleNames; + private Short mobileMode; + private Short mailMode; + private Short selfNotifyMode; + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public String getServiceCode() { + return this.serviceCode; + } + + public void setServiceCode(String serviceCode) { + this.serviceCode = serviceCode; + } + + public String getBusinessId() { + return this.businessId; + } + + public void setBusinessId(String businessId) { + this.businessId = businessId; + } + + public String getOrgId() { + return this.orgId; + } + + public void setOrgId(String orgId) { + this.orgId = orgId; + } + + public String getOrgPath() { + return this.orgPath; + } + + public void setOrgPath(String orgPath) { + this.orgPath = orgPath; + } + + public String getLoginName() { + return this.loginName; + } + + public void setLoginName(String loginName) { + this.loginName = loginName; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public String getWorkCode() { + return this.workCode; + } + + public void setWorkCode(String workCode) { + this.workCode = workCode; + } + + public String getPosition() { + return this.position; + } + + public void setPosition(String position) { + this.position = position; + } + + public String getTitle() { + return this.title; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getEmail() { + return this.email; + } + + public void setEmail(String email) { + this.email = email; + } + + public String getTelephone() { + return this.telephone; + } + + public void setTelephone(String telephone) { + this.telephone = telephone; + } + + public String getPicturePath() { + return this.picturePath; + } + + public void setPicturePath(String picturePath) { + this.picturePath = picturePath; + } + + public String getRemark() { + return this.remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public Short getStatus() { + return this.status; + } + + public void setStatus(Short status) { + this.status = status; + } + + public Short getVisible() { + return this.visible; + } + + public void setVisible(Short visible) { + this.visible = visible; + } + + public String getLoginId() { + return this.loginId; + } + + public void setLoginId(String loginId) { + this.loginId = loginId; + } + + public Short getUserLevel() { + return this.userLevel; + } + + public void setUserLevel(Short userLevel) { + this.userLevel = userLevel; + } + + public Long getCreateTime() { + return this.createTime; + } + + public void setCreateTime(Long createTime) { + this.createTime = createTime; + } + + public Long getLastUpdateTime() { + return this.lastUpdateTime; + } + + public void setLastUpdateTime(Long lastUpdateTime) { + this.lastUpdateTime = lastUpdateTime; + } + + public String getCreateUserId() { + return this.createUserId; + } + + public void setCreateUserId(String createUserId) { + this.createUserId = createUserId; + } + + public String getLastUpdateUserId() { + return this.lastUpdateUserId; + } + + public void setLastUpdateUserId(String lastUpdateUserId) { + this.lastUpdateUserId = lastUpdateUserId; + } + + public String getExt1() { + return this.ext1; + } + + public void setExt1(String ext1) { + this.ext1 = ext1; + } + + public String getExt2() { + return this.ext2; + } + + public void setExt2(String ext2) { + this.ext2 = ext2; + } + + public String getExt3() { + return this.ext3; + } + + public void setExt3(String ext3) { + this.ext3 = ext3; + } + + public String getCorpName() { + return this.corpName; + } + + public void setCorpName(String corpName) { + this.corpName = corpName; + } + + public String getCorpCode() { + return this.corpCode; + } + + public void setCorpCode(String corpCode) { + this.corpCode = corpCode; + } + + public String[] getRoleIds() { + return this.roleIds; + } + + public void setRoleIds(String[] roleIds) { + this.roleIds = roleIds; + } + + public String[] getRoleNames() { + return this.roleNames; + } + + public void setRoleNames(String[] roleNames) { + this.roleNames = roleNames; + } + + public Short getMobileMode() { + return this.mobileMode; + } + + public void setMobileMode(Short mobileMode) { + this.mobileMode = mobileMode; + } + + public Short getMailMode() { + return this.mailMode; + } + + public void setMailMode(Short mailMode) { + this.mailMode = mailMode; + } + + public Short getSelfNotifyMode() { + return this.selfNotifyMode; + } + + public void setSelfNotifyMode(Short selfNotifyMode) { + this.selfNotifyMode = selfNotifyMode; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/user/service/UserService.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/user/service/UserService.java new file mode 100644 index 00000000..06ac0c27 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/java/cn/cloudwalk/client/cwoscomponent/intelligent/user/service/UserService.java @@ -0,0 +1,25 @@ +package cn.cloudwalk.client.cwoscomponent.intelligent.user.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.user.param.UserChangePwdParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.user.param.UserDetailParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.user.param.UserQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.user.result.UserAcountDetailResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.user.result.UserDetailResult; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.result.CloudwalkResult; + +public interface UserService { + CloudwalkResult detail(UserDetailParam paramUserDetailParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult detail(String paramString, CloudwalkCallContext paramCloudwalkCallContext) + throws ServiceException; + + CloudwalkResult> page(UserQueryParam paramUserQueryParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; + + CloudwalkResult changePwd(UserChangePwdParam paramUserChangePwdParam, + CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException; +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/resources/META-INF/MANIFEST.MF b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/resources/META-INF/MANIFEST.MF new file mode 100644 index 00000000..71460173 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-interface/src/main/resources/META-INF/MANIFEST.MF @@ -0,0 +1,6 @@ +Manifest-Version: 1.0 +Archiver-Version: Plexus Archiver +Built-By: YCWB0304 +Created-By: Apache Maven 3.6.1 +Build-Jdk: 1.8.0_144 + diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-parent/pom.xml b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-parent/pom.xml new file mode 100644 index 00000000..d0b160b0 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-parent/pom.xml @@ -0,0 +1,19 @@ + + + 4.0.0 + + + org.springframework.boot + spring-boot-starter-parent + 2.1.18.RELEASE + + + + cn.cloudwalk.intelligent + intelligent-cwoscomponent + 2.9.2-xinghewan + pom + intelligent-cwoscomponent (stub parent) + 与私服已发布 intelligent-cwoscomponent-rest 等 JAR 中声明的 parent 对齐;反编译聚合见 intelligent-cwoscomponent-decompiled-reactor。 + diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/pom.xml b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/pom.xml new file mode 100644 index 00000000..236be9a8 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/pom.xml @@ -0,0 +1,67 @@ + + + 4.0.0 + + + cn.cloudwalk.intelligent + intelligent-cwoscomponent-decompiled-reactor + 2.9.2-xinghewan + ../pom.xml + + + intelligent-cwoscomponent-rest + jar + + + ${project.basedir}/../../docs/style/alibaba-eclipse-codestyle.xml + + + + + cn.cloudwalk.cloud + cloudwalk-common-service + + + cn.cloudwalk.intelligent + intelligent-cwoscomponent-interface + ${project.version} + + + cn.cloudwalk + cloudwalk-device-sdk-protocol-entity + + + org.springframework.cloud + spring-cloud-starter-openfeign + + + org.springframework.cloud + spring-cloud-starter-consul-discovery + + + junit + junit + test + + + org.springframework.boot + spring-boot-test + test + + + org.springframework + spring-test + test + + + + + + + net.revelc.code.formatter + formatter-maven-plugin + + + + diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/account/feign/AccountLoginFeignClient.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/account/feign/AccountLoginFeignClient.java new file mode 100644 index 00000000..713a2ab1 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/account/feign/AccountLoginFeignClient.java @@ -0,0 +1,17 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.account.feign; + +import cn.cloudwalk.client.cwoscomponent.intelligent.account.param.AccountLoginParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.account.result.AccountLoginResult; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.account.feign.fallback.AccountLoginFeignClientFallback; +import org.springframework.cloud.netflix.feign.FeignClient; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; + +@FeignClient(name = "${feign.cwos-portal.name:cwos-portal}", path = "/portal/account", + fallback = AccountLoginFeignClientFallback.class) +public interface AccountLoginFeignClient { + @RequestMapping(value = {"/login"}, method = {RequestMethod.POST}) + CloudwalkResult login(@RequestBody AccountLoginParam paramAccountLoginParam); +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/account/feign/fallback/AccountLoginFeignClientFallback.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/account/feign/fallback/AccountLoginFeignClientFallback.java new file mode 100644 index 00000000..5e3e61aa --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/account/feign/fallback/AccountLoginFeignClientFallback.java @@ -0,0 +1,12 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.account.feign.fallback; + +import cn.cloudwalk.client.cwoscomponent.intelligent.account.param.AccountLoginParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.account.result.AccountLoginResult; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.account.feign.AccountLoginFeignClient; + +public class AccountLoginFeignClientFallback implements AccountLoginFeignClient { + public CloudwalkResult login(AccountLoginParam param) { + throw new RuntimeException("账户登录失败"); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/account/service/RestAccountLoginServiceImpl.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/account/service/RestAccountLoginServiceImpl.java new file mode 100644 index 00000000..35555f79 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/account/service/RestAccountLoginServiceImpl.java @@ -0,0 +1,25 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.account.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.account.param.AccountLoginParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.account.result.AccountLoginResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.account.service.AccountLoginService; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.account.feign.AccountLoginFeignClient; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass; +import org.springframework.stereotype.Service; + +@Service +@ConditionalOnMissingClass({ + "cn.cloudwalk.service.cwoscomponent.intelligent.account.service.RestAccountLoginServiceImpl"}) +public class RestAccountLoginServiceImpl implements AccountLoginService { + @Autowired + private AccountLoginFeignClient accountLoginFeignClient; + + public CloudwalkResult login(AccountLoginParam param, CloudwalkCallContext context) + throws ServiceException { + return this.accountLoginFeignClient.login(param); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/ai/v2/face/feign/FaceFeignClient.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/ai/v2/face/feign/FaceFeignClient.java new file mode 100644 index 00000000..137bbdf9 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/ai/v2/face/feign/FaceFeignClient.java @@ -0,0 +1,20 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.ai.v2.face.feign; + +import cn.cloudwalk.client.cwoscomponent.intelligent.ai.v2.face.param.FaceAddParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.ai.v2.face.param.FaceRemoveParam; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.ai.v2.face.feign.fallback.FaceFeignClientFallback; +import org.springframework.cloud.netflix.feign.FeignClient; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; + +@FeignClient(name = "${feign.cwos-portal.name:cwos-portal}", path = "/v2/face", + fallback = FaceFeignClientFallback.class) +public interface FaceFeignClient { + @RequestMapping(value = {"/add"}, method = {RequestMethod.POST}) + CloudwalkResult add(@RequestBody FaceAddParam paramFaceAddParam); + + @RequestMapping(value = {"/remove"}, method = {RequestMethod.POST}) + CloudwalkResult remove(@RequestBody FaceRemoveParam paramFaceRemoveParam); +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/ai/v2/face/feign/fallback/FaceFeignClientFallback.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/ai/v2/face/feign/fallback/FaceFeignClientFallback.java new file mode 100644 index 00000000..81a02f25 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/ai/v2/face/feign/fallback/FaceFeignClientFallback.java @@ -0,0 +1,18 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.ai.v2.face.feign.fallback; + +import cn.cloudwalk.client.cwoscomponent.intelligent.ai.v2.face.param.FaceAddParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.ai.v2.face.param.FaceRemoveParam; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.ai.v2.face.feign.FaceFeignClient; +import org.springframework.stereotype.Component; + +@Component +public class FaceFeignClientFallback implements FaceFeignClient { + public CloudwalkResult add(FaceAddParam param) { + throw new RuntimeException("新增人脸特征失败"); + } + + public CloudwalkResult remove(FaceRemoveParam param) { + throw new RuntimeException("删除人脸特征失败"); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/ai/v2/face/service/RestFaceServiceImpl.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/ai/v2/face/service/RestFaceServiceImpl.java new file mode 100644 index 00000000..91076a8d --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/ai/v2/face/service/RestFaceServiceImpl.java @@ -0,0 +1,28 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.ai.v2.face.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.ai.v2.face.param.FaceAddParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.ai.v2.face.param.FaceRemoveParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.ai.v2.face.service.FaceService; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.ai.v2.face.feign.FaceFeignClient; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass; +import org.springframework.stereotype.Service; + +@Service +@ConditionalOnMissingClass({"cn.cloudwalk.service.cwoscomponent.intelligent.ai.v2.face.service.FaceServiceImpl"}) +public class RestFaceServiceImpl implements FaceService { + @Autowired + private FaceFeignClient faceFeignClient; + + public CloudwalkResult add(FaceAddParam param, CloudwalkCallContext context) throws ServiceException { + return this.faceFeignClient.add(param); + } + + public CloudwalkResult remove(FaceRemoveParam param, CloudwalkCallContext context) + throws ServiceException { + return this.faceFeignClient.remove(param); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/ai/v2/feature/feign/FeatureFeignClient.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/ai/v2/feature/feign/FeatureFeignClient.java new file mode 100644 index 00000000..61f29598 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/ai/v2/feature/feign/FeatureFeignClient.java @@ -0,0 +1,17 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.ai.v2.feature.feign; + +import cn.cloudwalk.client.cwoscomponent.intelligent.ai.v2.feature.param.FeatureExtractParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.ai.v2.feature.result.FeatureExtractResult; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.ai.v2.feature.feign.fallback.FeatureFeignClientFallback; +import org.springframework.cloud.netflix.feign.FeignClient; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; + +@FeignClient(name = "${feign.cwos-portal.name:cwos-portal}", path = "/v2/feature", + fallback = FeatureFeignClientFallback.class) +public interface FeatureFeignClient { + @RequestMapping(value = {"/extract"}, method = {RequestMethod.POST}) + CloudwalkResult extract(@RequestBody FeatureExtractParam paramFeatureExtractParam); +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/ai/v2/feature/feign/fallback/FeatureFeignClientFallback.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/ai/v2/feature/feign/fallback/FeatureFeignClientFallback.java new file mode 100644 index 00000000..08530b12 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/ai/v2/feature/feign/fallback/FeatureFeignClientFallback.java @@ -0,0 +1,14 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.ai.v2.feature.feign.fallback; + +import cn.cloudwalk.client.cwoscomponent.intelligent.ai.v2.feature.param.FeatureExtractParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.ai.v2.feature.result.FeatureExtractResult; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.ai.v2.feature.feign.FeatureFeignClient; +import org.springframework.stereotype.Component; + +@Component +public class FeatureFeignClientFallback implements FeatureFeignClient { + public CloudwalkResult extract(FeatureExtractParam param) { + throw new RuntimeException("提取特征失败"); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/ai/v2/feature/service/RestFeatureServiceImpl.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/ai/v2/feature/service/RestFeatureServiceImpl.java new file mode 100644 index 00000000..2bddebcc --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/ai/v2/feature/service/RestFeatureServiceImpl.java @@ -0,0 +1,24 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.ai.v2.feature.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.ai.v2.feature.param.FeatureExtractParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.ai.v2.feature.result.FeatureExtractResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.ai.v2.feature.service.FeatureService; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.ai.v2.feature.feign.FeatureFeignClient; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass; +import org.springframework.stereotype.Service; + +@Service +@ConditionalOnMissingClass({"cn.cloudwalk.service.cwoscomponent.intelligent.ai.v2.feature.service.FeatureServiceImpl"}) +public class RestFeatureServiceImpl implements FeatureService { + @Autowired + private FeatureFeignClient featureFeignClient; + + public CloudwalkResult extract(FeatureExtractParam param, CloudwalkCallContext context) + throws ServiceException { + return this.featureFeignClient.extract(param); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/ai/v2/group/feign/GroupFeignClient.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/ai/v2/group/feign/GroupFeignClient.java new file mode 100644 index 00000000..d64bff68 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/ai/v2/group/feign/GroupFeignClient.java @@ -0,0 +1,21 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.ai.v2.group.feign; + +import cn.cloudwalk.client.cwoscomponent.intelligent.ai.v2.group.param.GroupAddParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.ai.v2.group.param.GroupGetParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.ai.v2.group.result.GroupResult; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.ai.v2.group.feign.fallback.GroupFeignClientFallback; +import org.springframework.cloud.netflix.feign.FeignClient; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; + +@FeignClient(name = "${feign.cwos-portal.name:cwos-portal}", path = "/v2/group", + fallback = GroupFeignClientFallback.class) +public interface GroupFeignClient { + @RequestMapping(value = {"/add"}, method = {RequestMethod.POST}) + CloudwalkResult add(@RequestBody GroupAddParam paramGroupAddParam); + + @RequestMapping(value = {"/get"}, method = {RequestMethod.POST}) + CloudwalkResult get(GroupGetParam paramGroupGetParam); +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/ai/v2/group/feign/fallback/GroupFeignClientFallback.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/ai/v2/group/feign/fallback/GroupFeignClientFallback.java new file mode 100644 index 00000000..7dc9bd08 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/ai/v2/group/feign/fallback/GroupFeignClientFallback.java @@ -0,0 +1,19 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.ai.v2.group.feign.fallback; + +import cn.cloudwalk.client.cwoscomponent.intelligent.ai.v2.group.param.GroupAddParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.ai.v2.group.param.GroupGetParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.ai.v2.group.result.GroupResult; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.ai.v2.group.feign.GroupFeignClient; +import org.springframework.stereotype.Component; + +@Component +public class GroupFeignClientFallback implements GroupFeignClient { + public CloudwalkResult add(GroupAddParam param) { + throw new RuntimeException("新增图库失败"); + } + + public CloudwalkResult get(GroupGetParam param) { + throw new RuntimeException("图库查询失败"); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/ai/v2/group/service/RestGroupServiceImpl.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/ai/v2/group/service/RestGroupServiceImpl.java new file mode 100644 index 00000000..c30ec023 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/ai/v2/group/service/RestGroupServiceImpl.java @@ -0,0 +1,28 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.ai.v2.group.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.ai.v2.group.param.GroupAddParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.ai.v2.group.param.GroupGetParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.ai.v2.group.result.GroupResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.ai.v2.group.service.GroupService; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.ai.v2.group.feign.GroupFeignClient; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass; +import org.springframework.stereotype.Service; + +@Service +@ConditionalOnMissingClass({"cn.cloudwalk.service.cwoscomponent.intelligent.ai.v2.group.service.GroupServiceImpl"}) +public class RestGroupServiceImpl implements GroupService { + @Autowired + private GroupFeignClient groupFeignClient; + + public CloudwalkResult add(GroupAddParam param, CloudwalkCallContext context) throws ServiceException { + return this.groupFeignClient.add(param); + } + + public CloudwalkResult get(GroupGetParam param, CloudwalkCallContext context) throws ServiceException { + return this.groupFeignClient.get(param); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/ai/v2/staticdb/feign/SearchFeignClient.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/ai/v2/staticdb/feign/SearchFeignClient.java new file mode 100644 index 00000000..8285b8db --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/ai/v2/staticdb/feign/SearchFeignClient.java @@ -0,0 +1,18 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.ai.v2.staticdb.feign; + +import cn.cloudwalk.client.cwoscomponent.intelligent.ai.v2.staticdb.param.SearchMultipleParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.ai.v2.staticdb.result.SearchResult; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.ai.v2.staticdb.feign.fallback.SearchFeignClientFallback; +import java.util.List; +import org.springframework.cloud.netflix.feign.FeignClient; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; + +@FeignClient(name = "${feign.cwos-portal.name:cwos-portal}", path = "/v2/staticdb/search", + fallback = SearchFeignClientFallback.class) +public interface SearchFeignClient { + @RequestMapping(value = {"/multiple"}, method = {RequestMethod.POST}) + CloudwalkResult> multiple(@RequestBody SearchMultipleParam paramSearchMultipleParam); +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/ai/v2/staticdb/feign/fallback/SearchFeignClientFallback.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/ai/v2/staticdb/feign/fallback/SearchFeignClientFallback.java new file mode 100644 index 00000000..27c2594a --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/ai/v2/staticdb/feign/fallback/SearchFeignClientFallback.java @@ -0,0 +1,15 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.ai.v2.staticdb.feign.fallback; + +import cn.cloudwalk.client.cwoscomponent.intelligent.ai.v2.staticdb.param.SearchMultipleParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.ai.v2.staticdb.result.SearchResult; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.ai.v2.staticdb.feign.SearchFeignClient; +import java.util.List; +import org.springframework.stereotype.Component; + +@Component +public class SearchFeignClientFallback implements SearchFeignClient { + public CloudwalkResult> multiple(SearchMultipleParam param) { + throw new RuntimeException("1:N比对失败"); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/ai/v2/staticdb/service/RestSearchServiceImpl.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/ai/v2/staticdb/service/RestSearchServiceImpl.java new file mode 100644 index 00000000..173e1479 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/ai/v2/staticdb/service/RestSearchServiceImpl.java @@ -0,0 +1,23 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.ai.v2.staticdb.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.ai.v2.staticdb.param.SearchMultipleParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.ai.v2.staticdb.result.SearchResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.ai.v2.staticdb.service.SearchService; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.ai.v2.staticdb.feign.SearchFeignClient; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass; +import org.springframework.stereotype.Service; + +@Service +@ConditionalOnMissingClass({"cn.cloudwalk.service.cwoscomponent.intelligent.ai.v2.staticdb.service.SearchServiceImpl"}) +public class RestSearchServiceImpl implements SearchService { + @Autowired + private SearchFeignClient searchFeignClient; + + public CloudwalkResult> multiple(SearchMultipleParam param) throws ServiceException { + return this.searchFeignClient.multiple(param); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/application/feign/ApplicationFeignClient.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/application/feign/ApplicationFeignClient.java new file mode 100644 index 00000000..ac3f8d3e --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/application/feign/ApplicationFeignClient.java @@ -0,0 +1,18 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.application.feign; + +import cn.cloudwalk.client.cwoscomponent.intelligent.application.param.SceneAppsGetParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.application.result.SceneAppsResult; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.application.feign.fallback.ApplicationFeignClientFallback; +import java.util.List; +import org.springframework.cloud.netflix.feign.FeignClient; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; + +@FeignClient(name = "${feign.cwos-portal.name:cwos-portal}", path = "/portal/application", + fallback = ApplicationFeignClientFallback.class) +public interface ApplicationFeignClient { + @RequestMapping(value = {"/getSceneApps"}, method = {RequestMethod.POST}) + CloudwalkResult> getSceneApps(@RequestBody SceneAppsGetParam paramSceneAppsGetParam); +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/application/feign/ApplicationImageStoreFeignClient.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/application/feign/ApplicationImageStoreFeignClient.java new file mode 100644 index 00000000..91128533 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/application/feign/ApplicationImageStoreFeignClient.java @@ -0,0 +1,27 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.application.feign; + +import cn.cloudwalk.client.cwoscomponent.intelligent.application.param.ApplicationImageStoreAddParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.application.param.ApplicationImageStoreDelParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.application.param.ApplicationImageStoreQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.application.result.ApplicationImageStoreResult; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.application.feign.fallback.ApplicationImageStoreFeignClientFallback; +import java.util.List; +import org.springframework.cloud.netflix.feign.FeignClient; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; + +@FeignClient(name = "${feign.component-organization.name:ninca-common-component-organization}", + path = "/component/application/imagestore", fallback = ApplicationImageStoreFeignClientFallback.class) +public interface ApplicationImageStoreFeignClient { + @RequestMapping(value = {"/list"}, method = {RequestMethod.POST}) + CloudwalkResult> + list(@RequestBody ApplicationImageStoreQueryParam paramApplicationImageStoreQueryParam); + + @RequestMapping(value = {"/add"}, method = {RequestMethod.POST}) + CloudwalkResult add(ApplicationImageStoreAddParam paramApplicationImageStoreAddParam); + + @RequestMapping(value = {"/delete"}, method = {RequestMethod.POST}) + CloudwalkResult delete(ApplicationImageStoreDelParam paramApplicationImageStoreDelParam); +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/application/feign/fallback/ApplicationFeignClientFallback.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/application/feign/fallback/ApplicationFeignClientFallback.java new file mode 100644 index 00000000..12e4afcb --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/application/feign/fallback/ApplicationFeignClientFallback.java @@ -0,0 +1,15 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.application.feign.fallback; + +import cn.cloudwalk.client.cwoscomponent.intelligent.application.param.SceneAppsGetParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.application.result.SceneAppsResult; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.application.feign.ApplicationFeignClient; +import java.util.List; +import org.springframework.stereotype.Component; + +@Component +public class ApplicationFeignClientFallback implements ApplicationFeignClient { + public CloudwalkResult> getSceneApps(SceneAppsGetParam param) { + throw new RuntimeException("查询租户下所有的场景应用失败"); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/application/feign/fallback/ApplicationImageStoreFeignClientFallback.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/application/feign/fallback/ApplicationImageStoreFeignClientFallback.java new file mode 100644 index 00000000..8eed9eaf --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/application/feign/fallback/ApplicationImageStoreFeignClientFallback.java @@ -0,0 +1,25 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.application.feign.fallback; + +import cn.cloudwalk.client.cwoscomponent.intelligent.application.param.ApplicationImageStoreAddParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.application.param.ApplicationImageStoreDelParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.application.param.ApplicationImageStoreQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.application.result.ApplicationImageStoreResult; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.application.feign.ApplicationImageStoreFeignClient; +import java.util.List; +import org.springframework.stereotype.Component; + +@Component +public class ApplicationImageStoreFeignClientFallback implements ApplicationImageStoreFeignClient { + public CloudwalkResult> list(ApplicationImageStoreQueryParam param) { + throw new RuntimeException("查询应用图库关联失败"); + } + + public CloudwalkResult add(ApplicationImageStoreAddParam param) { + throw new RuntimeException("添加应用图库关联失败"); + } + + public CloudwalkResult delete(ApplicationImageStoreDelParam param) { + throw new RuntimeException("删除应用图库关联失败"); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/application/service/RestApplicationImageStoreServiceImpl.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/application/service/RestApplicationImageStoreServiceImpl.java new file mode 100644 index 00000000..59d638ff --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/application/service/RestApplicationImageStoreServiceImpl.java @@ -0,0 +1,38 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.application.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.application.param.ApplicationImageStoreAddParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.application.param.ApplicationImageStoreDelParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.application.param.ApplicationImageStoreQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.application.result.ApplicationImageStoreResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.application.service.ApplicationImageStoreService; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.application.feign.ApplicationImageStoreFeignClient; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass; +import org.springframework.stereotype.Service; + +@Service +@ConditionalOnMissingClass({ + "cn.cloudwalk.service.cwoscomponent.intelligent.application.service.ApplicationImageStoreServiceImpl"}) +public class RestApplicationImageStoreServiceImpl implements ApplicationImageStoreService { + @Autowired + private ApplicationImageStoreFeignClient applicationImageStoreFeignClient; + + public CloudwalkResult add(ApplicationImageStoreAddParam param, CloudwalkCallContext context) + throws ServiceException { + return this.applicationImageStoreFeignClient.add(param); + } + + public CloudwalkResult delete(ApplicationImageStoreDelParam param, CloudwalkCallContext context) + throws ServiceException { + return this.applicationImageStoreFeignClient.delete(param); + } + + public CloudwalkResult> list(ApplicationImageStoreQueryParam param, + CloudwalkCallContext context) throws ServiceException { + return this.applicationImageStoreFeignClient.list(param); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/application/service/RestApplicationServiceImpl.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/application/service/RestApplicationServiceImpl.java new file mode 100644 index 00000000..ea4998ec --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/application/service/RestApplicationServiceImpl.java @@ -0,0 +1,26 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.application.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.application.param.SceneAppsGetParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.application.result.SceneAppsResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.application.service.ApplicationService; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.application.feign.ApplicationFeignClient; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass; +import org.springframework.stereotype.Service; + +@Service +@ConditionalOnMissingClass({ + "cn.cloudwalk.service.cwoscomponent.intelligent.application.service.ApplicationServiceImpl"}) +public class RestApplicationServiceImpl implements ApplicationService { + @Autowired + private ApplicationFeignClient applicationFeignClient; + + public CloudwalkResult> get(SceneAppsGetParam param, CloudwalkCallContext context) + throws ServiceException { + return this.applicationFeignClient.getSceneApps(param); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/biology/feign/BiologyToolFeignClient.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/biology/feign/BiologyToolFeignClient.java new file mode 100644 index 00000000..1f2e6e04 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/biology/feign/BiologyToolFeignClient.java @@ -0,0 +1,27 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.biology.feign; + +import cn.cloudwalk.client.cwoscomponent.intelligent.biology.param.FeatureExtractParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.biology.param.FeatureQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.biology.result.FeatureExtractResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.biology.result.FeatureQueryResult; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.biology.feign.fallback.BiologyToolFeignClientFallback; +import java.util.List; +import java.util.Map; +import org.springframework.cloud.netflix.feign.FeignClient; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; + +@FeignClient(name = "${feign.component-organization.name:ninca-common-component-organization}", + path = "/component/biology/tool", fallback = BiologyToolFeignClientFallback.class) +public interface BiologyToolFeignClient { + @RequestMapping(value = {"/feature/extract"}, method = {RequestMethod.POST}) + CloudwalkResult extract(@RequestBody FeatureExtractParam paramFeatureExtractParam); + + @RequestMapping(value = {"/feature/query"}, method = {RequestMethod.POST}) + CloudwalkResult> query(@RequestBody FeatureQueryParam paramFeatureQueryParam); + + @RequestMapping(value = {"/feature/querygroups"}, method = {RequestMethod.POST}) + CloudwalkResult>> querygroups(FeatureQueryParam paramFeatureQueryParam); +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/biology/feign/fallback/BiologyToolFeignClientFallback.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/biology/feign/fallback/BiologyToolFeignClientFallback.java new file mode 100644 index 00000000..61ba3588 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/biology/feign/fallback/BiologyToolFeignClientFallback.java @@ -0,0 +1,26 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.biology.feign.fallback; + +import cn.cloudwalk.client.cwoscomponent.intelligent.biology.param.FeatureExtractParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.biology.param.FeatureQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.biology.result.FeatureExtractResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.biology.result.FeatureQueryResult; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.biology.feign.BiologyToolFeignClient; +import java.util.List; +import java.util.Map; +import org.springframework.stereotype.Component; + +@Component +public class BiologyToolFeignClientFallback implements BiologyToolFeignClient { + public CloudwalkResult extract(FeatureExtractParam param) { + throw new RuntimeException("特征提取失败"); + } + + public CloudwalkResult> query(FeatureQueryParam param) { + throw new RuntimeException("图库识别,返回所有图库topN失败"); + } + + public CloudwalkResult>> querygroups(FeatureQueryParam param) { + throw new RuntimeException("图库识别,返回每个图库topN失败"); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/biology/service/RestBiologyToolServiceImpl.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/biology/service/RestBiologyToolServiceImpl.java new file mode 100644 index 00000000..29da31a3 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/biology/service/RestBiologyToolServiceImpl.java @@ -0,0 +1,38 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.biology.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.biology.param.FeatureExtractParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.biology.param.FeatureQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.biology.result.FeatureExtractResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.biology.result.FeatureQueryResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.biology.service.BiologyToolService; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.biology.feign.BiologyToolFeignClient; +import java.util.List; +import java.util.Map; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass; +import org.springframework.stereotype.Service; + +@Service +@ConditionalOnMissingClass({"cn.cloudwalk.service.cwoscomponent.intelligent.biology.service.BiologyToolServiceImpl"}) +public class RestBiologyToolServiceImpl implements BiologyToolService { + @Autowired + private BiologyToolFeignClient biologyToolFeignClient; + + public CloudwalkResult extract(FeatureExtractParam param, CloudwalkCallContext context) + throws ServiceException { + return this.biologyToolFeignClient.extract(param); + } + + public CloudwalkResult> query(FeatureQueryParam param, CloudwalkCallContext context) + throws ServiceException { + return this.biologyToolFeignClient.query(param); + } + + public CloudwalkResult>> querygroups(FeatureQueryParam param, + CloudwalkCallContext context) throws ServiceException { + return this.biologyToolFeignClient.querygroups(param); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/config/DeviceCategoryProperties.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/config/DeviceCategoryProperties.java new file mode 100644 index 00000000..98663d73 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/config/DeviceCategoryProperties.java @@ -0,0 +1,28 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.device.config; + +import java.util.List; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.stereotype.Component; + +@ConfigurationProperties(prefix = "cloudwalk.intelligent-cwoscomponent.device.category") +@Component +public class DeviceCategoryProperties { + private List deviceCategoryArray; + private List deviceControllerArray; + + public List getDeviceCategoryArray() { + return this.deviceCategoryArray; + } + + public void setDeviceCategoryArray(List deviceCategoryArray) { + this.deviceCategoryArray = deviceCategoryArray; + } + + public List getDeviceControllerArray() { + return this.deviceControllerArray; + } + + public void setDeviceControllerArray(List deviceControllerArray) { + this.deviceControllerArray = deviceControllerArray; + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/DeviceApplicationFeignClient.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/DeviceApplicationFeignClient.java new file mode 100644 index 00000000..da6c2756 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/DeviceApplicationFeignClient.java @@ -0,0 +1,26 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.device.feign; + +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceApplicationParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceApplicationQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceApplicationResult; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.device.feign.fallback.DeviceApplicationFeignClientFallback; +import java.util.List; +import org.springframework.cloud.netflix.feign.FeignClient; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; + +@FeignClient(name = "${feign.cwos-portal.name:cwos-portal}", path = "/component/device", + fallback = DeviceApplicationFeignClientFallback.class) +public interface DeviceApplicationFeignClient { + @RequestMapping(value = {"/app/add"}, method = {RequestMethod.POST}) + CloudwalkResult add(@RequestBody DeviceApplicationParam paramDeviceApplicationParam); + + @RequestMapping(value = {"/app/delete"}, method = {RequestMethod.POST}) + CloudwalkResult delete(@RequestBody DeviceApplicationParam paramDeviceApplicationParam); + + @RequestMapping(value = {"/app/list"}, method = {RequestMethod.POST}) + CloudwalkResult> + list(@RequestBody DeviceApplicationQueryParam paramDeviceApplicationQueryParam); +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/DeviceAreaFeignClient.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/DeviceAreaFeignClient.java new file mode 100644 index 00000000..a582db3b --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/DeviceAreaFeignClient.java @@ -0,0 +1,22 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.device.feign; + +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceAreaDeleteParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceAreaQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceAreaResult; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.device.feign.fallback.DeviceAreaFeignClientFallback; +import java.util.List; +import org.springframework.cloud.netflix.feign.FeignClient; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; + +@FeignClient(name = "${feign.cwos-portal.name:cwos-portal}", path = "/component/device/area", + fallback = DeviceAreaFeignClientFallback.class) +public interface DeviceAreaFeignClient { + @RequestMapping(value = {"/list"}, method = {RequestMethod.POST}) + CloudwalkResult> list(@RequestBody DeviceAreaQueryParam paramDeviceAreaQueryParam); + + @RequestMapping(value = {"/delete"}, method = {RequestMethod.POST}) + CloudwalkResult delete(@RequestBody DeviceAreaDeleteParam paramDeviceAreaDeleteParam); +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/DeviceDistrictFeignClient.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/DeviceDistrictFeignClient.java new file mode 100644 index 00000000..27f0f2aa --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/DeviceDistrictFeignClient.java @@ -0,0 +1,19 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.device.feign; + +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceDistrictQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceDistrictResult; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.device.feign.fallback.DeviceDistrictFeignClientFallback; +import java.util.List; +import org.springframework.cloud.netflix.feign.FeignClient; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; + +@FeignClient(name = "${feign.cwos-portal.name:cwos-portal}", path = "/component/device/district", + fallback = DeviceDistrictFeignClientFallback.class) +public interface DeviceDistrictFeignClient { + @RequestMapping(value = {"/list"}, method = {RequestMethod.POST}) + CloudwalkResult> + list(@RequestBody DeviceDistrictQueryParam paramDeviceDistrictQueryParam); +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/DeviceFeignClient.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/DeviceFeignClient.java new file mode 100644 index 00000000..a67d31b1 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/DeviceFeignClient.java @@ -0,0 +1,31 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.device.feign; + +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceDeleteParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceStatusResult; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.device.feign.fallback.DeviceFeignClientFallback; +import java.util.List; +import org.springframework.cloud.netflix.feign.FeignClient; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; + +@FeignClient(name = "${feign.cwos-portal.name:cwos-portal}", path = "/component/device", + fallback = DeviceFeignClientFallback.class) +public interface DeviceFeignClient { + @RequestMapping(value = {"/list"}, method = {RequestMethod.POST}) + CloudwalkResult> list(@RequestBody DeviceQueryParam paramDeviceQueryParam); + + @RequestMapping(value = {"/page"}, method = {RequestMethod.POST}) + CloudwalkResult> page(@RequestBody DeviceQueryParam paramDeviceQueryParam); + + @RequestMapping(value = {"/status/count"}, method = {RequestMethod.GET}) + CloudwalkResult statusCount(@RequestParam("businessId") String paramString); + + @RequestMapping(value = {"/delete"}, method = {RequestMethod.POST}) + CloudwalkResult delete(@RequestBody DeviceDeleteParam paramDeviceDeleteParam); +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/DeviceImageStoreFeignClient.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/DeviceImageStoreFeignClient.java new file mode 100644 index 00000000..7dd7b323 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/DeviceImageStoreFeignClient.java @@ -0,0 +1,35 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.device.feign; + +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceImageStoreParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceImageStoreQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceImageStoreSaveParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceImageStoreResult; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.device.feign.fallback.DeviceImageStoreFeignClientFallback; +import java.util.List; +import org.springframework.cloud.netflix.feign.FeignClient; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; + +@FeignClient(name = "${feign.cwos-portal.name:cwos-portal}", path = "/component/device/imagestore", + fallback = DeviceImageStoreFeignClientFallback.class) +public interface DeviceImageStoreFeignClient { + @RequestMapping(value = {"/add"}, method = {RequestMethod.POST}) + CloudwalkResult add(@RequestBody DeviceImageStoreParam paramDeviceImageStoreParam); + + @RequestMapping(value = {"/delete"}, method = {RequestMethod.POST}) + CloudwalkResult delete(@RequestBody DeviceImageStoreParam paramDeviceImageStoreParam); + + @RequestMapping(value = {"/save"}, method = {RequestMethod.POST}) + CloudwalkResult save(@RequestBody DeviceImageStoreSaveParam paramDeviceImageStoreSaveParam); + + @RequestMapping(value = {"/list"}, method = {RequestMethod.POST}) + CloudwalkResult> + list(@RequestBody DeviceImageStoreQueryParam paramDeviceImageStoreQueryParam); + + @RequestMapping(value = {"/page"}, method = {RequestMethod.POST}) + CloudwalkResult> + page(@RequestBody DeviceImageStoreQueryParam paramDeviceImageStoreQueryParam); +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/DeviceKitFeignClient.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/DeviceKitFeignClient.java new file mode 100644 index 00000000..ac59cf8b --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/DeviceKitFeignClient.java @@ -0,0 +1,17 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.device.feign; + +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.device.sdk.protocol.entity.v2proto.http.param.UpdatePersonParam; +import cn.cloudwalk.device.sdk.protocol.entity.v2proto.http.result.UpdatePersonResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.device.feign.fallback.DeviceKitFeignClientFallback; +import org.springframework.cloud.netflix.feign.FeignClient; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; + +@FeignClient(name = "${feign.component-organization.name:ninca-common-component-organization}", path = "/device/V2", + fallback = DeviceKitFeignClientFallback.class) +public interface DeviceKitFeignClient { + @RequestMapping(value = {"/20113"}, method = {RequestMethod.POST}) + CloudwalkResult updatePerson(@RequestBody UpdatePersonParam paramUpdatePersonParam); +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/DeviceNotifyFeignClient.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/DeviceNotifyFeignClient.java new file mode 100644 index 00000000..bdcf4bc9 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/DeviceNotifyFeignClient.java @@ -0,0 +1,24 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.device.feign; + +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceSettingNotifyParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.EntranceGuardControlParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceSettingNotifyResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.EntranceGuardControlResult; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.device.feign.fallback.DeviceNotifyFeignClientFallback; +import org.springframework.cloud.netflix.feign.FeignClient; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; + +@FeignClient(name = "${feign.cwos-portal.name:cwos-portal}", path = "/server/push", + fallback = DeviceNotifyFeignClientFallback.class) +public interface DeviceNotifyFeignClient { + @RequestMapping(value = {"/55000"}, method = {RequestMethod.POST}) + CloudwalkResult + notifySetting(@RequestBody DeviceSettingNotifyParam paramDeviceSettingNotifyParam); + + @RequestMapping(value = {"/55002"}, method = {RequestMethod.POST}) + CloudwalkResult + entranceGuardControl(@RequestBody EntranceGuardControlParam paramEntranceGuardControlParam); +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/DeviceSettingFeignClient.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/DeviceSettingFeignClient.java new file mode 100644 index 00000000..8d9db935 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/DeviceSettingFeignClient.java @@ -0,0 +1,24 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.device.feign; + +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceSettingInitParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceSettingQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceSettingInitResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceSettingResult; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.device.feign.fallback.DeviceSettingFeignClientFallback; +import java.util.List; +import org.springframework.cloud.netflix.feign.FeignClient; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; + +@FeignClient(name = "${feign.cwos-portal.name:cwos-portal}", path = "/core/device/setting", + fallback = DeviceSettingFeignClientFallback.class) +public interface DeviceSettingFeignClient { + @RequestMapping(value = {"/query"}, method = {RequestMethod.POST}) + CloudwalkResult> query(@RequestBody DeviceSettingQueryParam paramDeviceSettingQueryParam); + + @RequestMapping(value = {"/init"}, method = {RequestMethod.POST}) + CloudwalkResult> + init(@RequestBody DeviceSettingInitParam paramDeviceSettingInitParam); +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/DeviceTypeFeignClient.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/DeviceTypeFeignClient.java new file mode 100644 index 00000000..8014e5e9 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/DeviceTypeFeignClient.java @@ -0,0 +1,18 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.device.feign; + +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceTypeQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceTypeResult; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.device.feign.fallback.DeviceTypeFeignClientFallback; +import java.util.List; +import org.springframework.cloud.netflix.feign.FeignClient; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; + +@FeignClient(name = "${feign.cwos-portal.name:cwos-portal}", path = "/component/device/type", + fallback = DeviceTypeFeignClientFallback.class) +public interface DeviceTypeFeignClient { + @RequestMapping(value = {"/allTreeByVendor"}, method = {RequestMethod.POST}) + CloudwalkResult> get(@RequestBody DeviceTypeQueryParam paramDeviceTypeQueryParam); +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/fallback/DeviceApplicationFeignClientFallback.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/fallback/DeviceApplicationFeignClientFallback.java new file mode 100644 index 00000000..35b118a1 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/fallback/DeviceApplicationFeignClientFallback.java @@ -0,0 +1,24 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.device.feign.fallback; + +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceApplicationParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceApplicationQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceApplicationResult; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.device.feign.DeviceApplicationFeignClient; +import java.util.List; +import org.springframework.stereotype.Component; + +@Component +public class DeviceApplicationFeignClientFallback implements DeviceApplicationFeignClient { + public CloudwalkResult add(DeviceApplicationParam param) { + throw new RuntimeException("添加设备应用关联关系失败"); + } + + public CloudwalkResult delete(DeviceApplicationParam param) { + throw new RuntimeException("删除设备应用关联关系失败"); + } + + public CloudwalkResult> list(DeviceApplicationQueryParam param) { + throw new RuntimeException("设备应用关联信息列表查询失败"); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/fallback/DeviceAreaFeignClientFallback.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/fallback/DeviceAreaFeignClientFallback.java new file mode 100644 index 00000000..410af6a0 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/fallback/DeviceAreaFeignClientFallback.java @@ -0,0 +1,20 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.device.feign.fallback; + +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceAreaDeleteParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceAreaQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceAreaResult; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.device.feign.DeviceAreaFeignClient; +import java.util.List; +import org.springframework.stereotype.Component; + +@Component +public class DeviceAreaFeignClientFallback implements DeviceAreaFeignClient { + public CloudwalkResult> list(DeviceAreaQueryParam param) { + throw new RuntimeException("查询区域信息列表失败"); + } + + public CloudwalkResult delete(DeviceAreaDeleteParam param) { + throw new RuntimeException("删除区域失败"); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/fallback/DeviceDistrictFeignClientFallback.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/fallback/DeviceDistrictFeignClientFallback.java new file mode 100644 index 00000000..181f1132 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/fallback/DeviceDistrictFeignClientFallback.java @@ -0,0 +1,15 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.device.feign.fallback; + +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceDistrictQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceDistrictResult; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.device.feign.DeviceDistrictFeignClient; +import java.util.List; +import org.springframework.stereotype.Component; + +@Component +public class DeviceDistrictFeignClientFallback implements DeviceDistrictFeignClient { + public CloudwalkResult> list(DeviceDistrictQueryParam param) { + throw new RuntimeException("查询省市区列表信息失败"); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/fallback/DeviceFeignClientFallback.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/fallback/DeviceFeignClientFallback.java new file mode 100644 index 00000000..194dfb1c --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/fallback/DeviceFeignClientFallback.java @@ -0,0 +1,30 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.device.feign.fallback; + +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceDeleteParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceStatusResult; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.device.feign.DeviceFeignClient; +import java.util.List; +import org.springframework.stereotype.Component; + +@Component +public class DeviceFeignClientFallback implements DeviceFeignClient { + public CloudwalkResult> list(DeviceQueryParam param) { + throw new RuntimeException("查询设备信息列表失败"); + } + + public CloudwalkResult> page(DeviceQueryParam param) { + throw new RuntimeException("分页查询设备信息列表失败"); + } + + public CloudwalkResult statusCount(String businessId) { + throw new RuntimeException("设备状态统计失败"); + } + + public CloudwalkResult delete(DeviceDeleteParam param) { + throw new RuntimeException("删除设备信息失败"); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/fallback/DeviceImageStoreFeignClientFallback.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/fallback/DeviceImageStoreFeignClientFallback.java new file mode 100644 index 00000000..859aa6b8 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/fallback/DeviceImageStoreFeignClientFallback.java @@ -0,0 +1,34 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.device.feign.fallback; + +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceImageStoreParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceImageStoreQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceImageStoreSaveParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceImageStoreResult; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.device.feign.DeviceImageStoreFeignClient; +import java.util.List; +import org.springframework.stereotype.Component; + +@Component +public class DeviceImageStoreFeignClientFallback implements DeviceImageStoreFeignClient { + public CloudwalkResult add(DeviceImageStoreParam param) { + throw new RuntimeException("添加设备图库关联失败"); + } + + public CloudwalkResult delete(DeviceImageStoreParam param) { + throw new RuntimeException("删除设备图库关联失败"); + } + + public CloudwalkResult save(DeviceImageStoreSaveParam param) { + throw new RuntimeException("保存设备图库关联失败"); + } + + public CloudwalkResult> list(DeviceImageStoreQueryParam param) { + throw new RuntimeException("查询设备图库关联失败"); + } + + public CloudwalkResult> page(DeviceImageStoreQueryParam param) { + throw new RuntimeException("分页查询设备图库关联失败"); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/fallback/DeviceKitFeignClientFallback.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/fallback/DeviceKitFeignClientFallback.java new file mode 100644 index 00000000..8a7fbd95 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/fallback/DeviceKitFeignClientFallback.java @@ -0,0 +1,14 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.device.feign.fallback; + +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.device.sdk.protocol.entity.v2proto.http.param.UpdatePersonParam; +import cn.cloudwalk.device.sdk.protocol.entity.v2proto.http.result.UpdatePersonResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.device.feign.DeviceKitFeignClient; +import org.springframework.stereotype.Component; + +@Component +public class DeviceKitFeignClientFallback implements DeviceKitFeignClient { + public CloudwalkResult updatePerson(UpdatePersonParam param) { + throw new RuntimeException("请求更新人员信息失败"); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/fallback/DeviceNotifyFeignClientFallback.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/fallback/DeviceNotifyFeignClientFallback.java new file mode 100644 index 00000000..dc6419e2 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/fallback/DeviceNotifyFeignClientFallback.java @@ -0,0 +1,20 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.device.feign.fallback; + +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceSettingNotifyParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.EntranceGuardControlParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceSettingNotifyResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.EntranceGuardControlResult; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.device.feign.DeviceNotifyFeignClient; +import org.springframework.stereotype.Component; + +@Component +public class DeviceNotifyFeignClientFallback implements DeviceNotifyFeignClient { + public CloudwalkResult notifySetting(DeviceSettingNotifyParam param) { + throw new RuntimeException("下发终端设置参数失败"); + } + + public CloudwalkResult entranceGuardControl(EntranceGuardControlParam param) { + throw new RuntimeException("下发开关门控制失败"); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/fallback/DeviceSettingFeignClientFallback.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/fallback/DeviceSettingFeignClientFallback.java new file mode 100644 index 00000000..e9116beb --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/fallback/DeviceSettingFeignClientFallback.java @@ -0,0 +1,21 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.device.feign.fallback; + +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceSettingInitParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceSettingQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceSettingInitResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceSettingResult; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.device.feign.DeviceSettingFeignClient; +import java.util.List; +import org.springframework.stereotype.Component; + +@Component +public class DeviceSettingFeignClientFallback implements DeviceSettingFeignClient { + public CloudwalkResult> query(DeviceSettingQueryParam param) { + throw new RuntimeException("查询设备配置列表失败"); + } + + public CloudwalkResult> init(DeviceSettingInitParam param) { + throw new RuntimeException("查询设备第一次上传数据内容失败"); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/fallback/DeviceTypeFeignClientFallback.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/fallback/DeviceTypeFeignClientFallback.java new file mode 100644 index 00000000..40d25795 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/feign/fallback/DeviceTypeFeignClientFallback.java @@ -0,0 +1,15 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.device.feign.fallback; + +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceTypeQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceTypeResult; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.device.feign.DeviceTypeFeignClient; +import java.util.List; +import org.springframework.stereotype.Component; + +@Component +public class DeviceTypeFeignClientFallback implements DeviceTypeFeignClient { + public CloudwalkResult> get(DeviceTypeQueryParam param) { + throw new RuntimeException("查询设备类型信息返回树型数据结构失败"); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/service/RestDeviceApplicationServiceImpl.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/service/RestDeviceApplicationServiceImpl.java new file mode 100644 index 00000000..9139ba17 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/service/RestDeviceApplicationServiceImpl.java @@ -0,0 +1,37 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.device.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceApplicationParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceApplicationQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceApplicationResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.service.DeviceApplicationService; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.device.feign.DeviceApplicationFeignClient; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass; +import org.springframework.stereotype.Service; + +@Service +@ConditionalOnMissingClass({ + "cn.cloudwalk.service.cwoscomponent.intelligent.device.service.DeviceApplicationServiceImpl"}) +public class RestDeviceApplicationServiceImpl implements DeviceApplicationService { + @Autowired + private DeviceApplicationFeignClient deviceApplicationFeignClient; + + public CloudwalkResult add(DeviceApplicationParam param, CloudwalkCallContext context) + throws ServiceException { + return this.deviceApplicationFeignClient.add(param); + } + + public CloudwalkResult delete(DeviceApplicationParam param, CloudwalkCallContext context) + throws ServiceException { + return this.deviceApplicationFeignClient.delete(param); + } + + public CloudwalkResult> list(DeviceApplicationQueryParam param, + CloudwalkCallContext context) throws ServiceException { + return this.deviceApplicationFeignClient.list(param); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/service/RestDeviceAreaServiceImpl.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/service/RestDeviceAreaServiceImpl.java new file mode 100644 index 00000000..3e0e90e3 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/service/RestDeviceAreaServiceImpl.java @@ -0,0 +1,28 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.device.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceAreaDeleteParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceAreaQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceAreaResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.service.DeviceAreaService; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.device.feign.DeviceAreaFeignClient; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass; +import org.springframework.stereotype.Service; + +@Service +@ConditionalOnMissingClass({"cn.cloudwalk.service.cwoscomponent.intelligent.device.service.DeviceAreaServiceImpl"}) +public class RestDeviceAreaServiceImpl implements DeviceAreaService { + @Autowired + private DeviceAreaFeignClient deviceAreaFeignClient; + + public CloudwalkResult> list(DeviceAreaQueryParam param) throws ServiceException { + return this.deviceAreaFeignClient.list(param); + } + + public CloudwalkResult delete(DeviceAreaDeleteParam param) throws ServiceException { + return this.deviceAreaFeignClient.delete(param); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/service/RestDeviceDistrictServiceImpl.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/service/RestDeviceDistrictServiceImpl.java new file mode 100644 index 00000000..6022be4f --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/service/RestDeviceDistrictServiceImpl.java @@ -0,0 +1,23 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.device.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceDistrictQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceDistrictResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.service.DeviceDistrictService; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.device.feign.DeviceDistrictFeignClient; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass; +import org.springframework.stereotype.Service; + +@Service +@ConditionalOnMissingClass({"cn.cloudwalk.service.cwoscomponent.intelligent.device.service.DeviceDistrictServiceImpl"}) +public class RestDeviceDistrictServiceImpl implements DeviceDistrictService { + @Autowired + private DeviceDistrictFeignClient deviceDistrictFeignClient; + + public CloudwalkResult> list(DeviceDistrictQueryParam param) throws ServiceException { + return this.deviceDistrictFeignClient.list(param); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/service/RestDeviceImageStoreServiceImpl.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/service/RestDeviceImageStoreServiceImpl.java new file mode 100644 index 00000000..32d84cac --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/service/RestDeviceImageStoreServiceImpl.java @@ -0,0 +1,49 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.device.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceImageStoreParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceImageStoreQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceImageStoreSaveParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceImageStoreResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.service.DeviceImageStoreService; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.device.feign.DeviceImageStoreFeignClient; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass; +import org.springframework.stereotype.Service; + +@Service +@ConditionalOnMissingClass({ + "cn.cloudwalk.service.cwoscomponent.intelligent.device.service.DeviceApplicationServiceImpl"}) +public class RestDeviceImageStoreServiceImpl implements DeviceImageStoreService { + @Autowired + private DeviceImageStoreFeignClient deviceImageStoreFeignClient; + + public CloudwalkResult add(DeviceImageStoreParam param, CloudwalkCallContext context) + throws ServiceException { + return this.deviceImageStoreFeignClient.add(param); + } + + public CloudwalkResult delete(DeviceImageStoreParam param, CloudwalkCallContext context) + throws ServiceException { + return this.deviceImageStoreFeignClient.delete(param); + } + + public CloudwalkResult save(DeviceImageStoreSaveParam param, CloudwalkCallContext context) + throws ServiceException { + return this.deviceImageStoreFeignClient.save(param); + } + + public CloudwalkResult> list(DeviceImageStoreQueryParam param, + CloudwalkCallContext context) throws ServiceException { + return this.deviceImageStoreFeignClient.list(param); + } + + public CloudwalkResult> page(DeviceImageStoreQueryParam param, + CloudwalkCallContext context) throws ServiceException { + return this.deviceImageStoreFeignClient.page(param); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/service/RestDeviceKitServiceImpl.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/service/RestDeviceKitServiceImpl.java new file mode 100644 index 00000000..8b98a905 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/service/RestDeviceKitServiceImpl.java @@ -0,0 +1,24 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.device.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.device.service.DeviceKitService; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.device.sdk.protocol.entity.v2proto.http.param.UpdatePersonParam; +import cn.cloudwalk.device.sdk.protocol.entity.v2proto.http.result.UpdatePersonResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.device.feign.DeviceKitFeignClient; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass; +import org.springframework.stereotype.Service; + +@Service +@ConditionalOnMissingClass({"cn.cloudwalk.service.cwoscomponent.intelligent.device.service.DeviceKitServiceImpl"}) +public class RestDeviceKitServiceImpl implements DeviceKitService { + @Autowired + private DeviceKitFeignClient deviceKitFeignClient; + + public CloudwalkResult updatePerson(UpdatePersonParam param, CloudwalkCallContext context) + throws ServiceException { + return this.deviceKitFeignClient.updatePerson(param); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/service/RestDeviceNotifyServiceImpl.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/service/RestDeviceNotifyServiceImpl.java new file mode 100644 index 00000000..70bc8f48 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/service/RestDeviceNotifyServiceImpl.java @@ -0,0 +1,30 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.device.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceSettingNotifyParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.EntranceGuardControlParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceSettingNotifyResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.EntranceGuardControlResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.service.DeviceNotifyService; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.device.feign.DeviceNotifyFeignClient; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass; +import org.springframework.stereotype.Service; + +@Service +@ConditionalOnMissingClass({"cn.cloudwalk.service.cwoscomponent.intelligent.device.service.DeviceNotifyServiceImpl"}) +public class RestDeviceNotifyServiceImpl implements DeviceNotifyService { + @Autowired + private DeviceNotifyFeignClient deviceNotifyFeignClient; + + public CloudwalkResult notifySetting(DeviceSettingNotifyParam param) + throws ServiceException { + return this.deviceNotifyFeignClient.notifySetting(param); + } + + public CloudwalkResult entranceGuardControl(EntranceGuardControlParam param) + throws ServiceException { + return this.deviceNotifyFeignClient.entranceGuardControl(param); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/service/RestDeviceServiceImpl.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/service/RestDeviceServiceImpl.java new file mode 100644 index 00000000..587792e9 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/service/RestDeviceServiceImpl.java @@ -0,0 +1,87 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.device.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceDeleteParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceStatusResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceTypeResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.service.DeviceService; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.device.config.DeviceCategoryProperties; +import cn.cloudwalk.rest.cwoscomponent.intelligent.device.feign.DeviceFeignClient; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass; +import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; + +@Service +@ConditionalOnMissingClass({"cn.cloudwalk.service.cwoscomponent.intelligent.device.service.DeviceServiceImpl"}) +public class RestDeviceServiceImpl implements DeviceService { + @Autowired + private DeviceFeignClient deviceFeignClient; + @Autowired + private RestDeviceTypeServiceImpl deviceTypeService; + @Autowired + protected DeviceCategoryProperties deviceCategoryProperties; + + public CloudwalkResult> list(DeviceQueryParam param, CloudwalkCallContext context) + throws ServiceException { + return this.deviceFeignClient.list(param); + } + + public CloudwalkResult> filterList(Integer deviceType, DeviceQueryParam param, + CloudwalkCallContext context) throws ServiceException { + if (StringUtils.isEmpty(param.getDeviceTypeCode()) && CollectionUtils.isEmpty(param.getDeviceTypeCodes())) { + if (deviceType.intValue() == 1) { + List deviceCategoryIds = this.deviceCategoryProperties.getDeviceCategoryArray(); + if (!CollectionUtils.isEmpty(deviceCategoryIds)) { + param.setDeviceTypeCodes(getDeviceTypeCodes(deviceCategoryIds)); + } + } else if (deviceType.intValue() == 2) { + List deviceCategoryIds = this.deviceCategoryProperties.getDeviceControllerArray(); + if (!CollectionUtils.isEmpty(deviceCategoryIds)) { + param.setDeviceTypeCodes(deviceCategoryIds); + } + } + } + return this.deviceFeignClient.list(param); + } + + public List getDeviceTypeCodes(List deviceCategoryIds) throws ServiceException { + CloudwalkResult> deviceTypeResultList = this.deviceTypeService.getCacheAble(); + Map deviceTypeResultMap = + (Map)((List)deviceTypeResultList.getData()).stream() + .collect(Collectors.toMap(DeviceTypeResult::getId, d -> d)); + List deviceTypeCodes = new ArrayList<>(); + for (String deviceCategoryId : deviceCategoryIds) { + DeviceTypeResult deviceTypeResult = deviceTypeResultMap.get(deviceCategoryId); + List children = deviceTypeResult.getChildren(); + deviceTypeCodes.addAll((Collection)children.stream() + .map(DeviceTypeResult.DeviceTypeDetailResult::getDeviceTypeCode).collect(Collectors.toList())); + } + return deviceTypeCodes; + } + + public CloudwalkResult> page(DeviceQueryParam param, CloudwalkCallContext context) + throws ServiceException { + return this.deviceFeignClient.page(param); + } + + public CloudwalkResult statusCount(CloudwalkCallContext context) throws ServiceException { + return this.deviceFeignClient.statusCount(context.getCompany().getCompanyId()); + } + + public CloudwalkResult delete(DeviceDeleteParam param, CloudwalkCallContext context) + throws ServiceException { + return this.deviceFeignClient.delete(param); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/service/RestDeviceSettingServiceImpl.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/service/RestDeviceSettingServiceImpl.java new file mode 100644 index 00000000..cb8c4659 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/service/RestDeviceSettingServiceImpl.java @@ -0,0 +1,30 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.device.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceSettingInitParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceSettingQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceSettingInitResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceSettingResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.service.DeviceSettingService; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.device.feign.DeviceSettingFeignClient; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass; +import org.springframework.stereotype.Service; + +@Service +@ConditionalOnMissingClass({"cn.cloudwalk.service.cwoscomponent.intelligent.device.service.DeviceSettingServiceImpl"}) +public class RestDeviceSettingServiceImpl implements DeviceSettingService { + @Autowired + private DeviceSettingFeignClient deviceSettingFeignClient; + + public CloudwalkResult> query(DeviceSettingQueryParam param) throws ServiceException { + return this.deviceSettingFeignClient.query(param); + } + + public CloudwalkResult> defaultSettings(DeviceSettingInitParam param) + throws ServiceException { + return this.deviceSettingFeignClient.init(param); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/service/RestDeviceTypeServiceImpl.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/service/RestDeviceTypeServiceImpl.java new file mode 100644 index 00000000..0fdd382a --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/device/service/RestDeviceTypeServiceImpl.java @@ -0,0 +1,27 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.device.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.device.param.DeviceTypeQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.result.DeviceTypeResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.device.service.DeviceTypeService; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.device.feign.DeviceTypeFeignClient; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass; +import org.springframework.stereotype.Service; + +@Service +@ConditionalOnMissingClass({"cn.cloudwalk.service.cwoscomponent.intelligent.device.service.DeviceTypeServiceImpl"}) +public class RestDeviceTypeServiceImpl implements DeviceTypeService { + @Autowired + private DeviceTypeFeignClient deviceTypeFeignClient; + + public CloudwalkResult> get(DeviceTypeQueryParam param) throws ServiceException { + return this.deviceTypeFeignClient.get(param); + } + + public CloudwalkResult> getCacheAble() throws ServiceException { + return get(new DeviceTypeQueryParam()); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/elevator/feign/ElevatorPersonFeignClient.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/elevator/feign/ElevatorPersonFeignClient.java new file mode 100644 index 00000000..47260f15 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/elevator/feign/ElevatorPersonFeignClient.java @@ -0,0 +1,16 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.elevator.feign; + +import cn.cloudwalk.client.cwoscomponent.intelligent.elevator.param.AcsPersonAddVisitorParam; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.elevator.feign.fallback.ElevatorPersonFeignClientFallback; +import org.springframework.cloud.netflix.feign.FeignClient; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; + +@FeignClient(name = "${feign.elevator.name:elevator-app}", path = "/elevator/person", + fallback = ElevatorPersonFeignClientFallback.class) +public interface ElevatorPersonFeignClient { + @RequestMapping(value = {"/add/visitor"}, method = {RequestMethod.POST}) + CloudwalkResult addVisitor(@RequestBody AcsPersonAddVisitorParam paramAcsPersonAddVisitorParam); +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/elevator/feign/fallback/ElevatorPersonFeignClientFallback.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/elevator/feign/fallback/ElevatorPersonFeignClientFallback.java new file mode 100644 index 00000000..309b11d2 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/elevator/feign/fallback/ElevatorPersonFeignClientFallback.java @@ -0,0 +1,13 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.elevator.feign.fallback; + +import cn.cloudwalk.client.cwoscomponent.intelligent.elevator.param.AcsPersonAddVisitorParam; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.elevator.feign.ElevatorPersonFeignClient; +import org.springframework.stereotype.Component; + +@Component +public class ElevatorPersonFeignClientFallback implements ElevatorPersonFeignClient { + public CloudwalkResult addVisitor(AcsPersonAddVisitorParam param) { + throw new RuntimeException("根据被访人添加访客派梯权限失败"); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/elevator/service/RestElevatorPersonServiceImpl.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/elevator/service/RestElevatorPersonServiceImpl.java new file mode 100644 index 00000000..d1e9bdea --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/elevator/service/RestElevatorPersonServiceImpl.java @@ -0,0 +1,24 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.elevator.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.elevator.param.AcsPersonAddVisitorParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.elevator.service.ElevatorPersonService; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.elevator.feign.ElevatorPersonFeignClient; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass; +import org.springframework.stereotype.Service; + +@Service +@ConditionalOnMissingClass({ + "cn.cloudwalk.service.cwoscomponent.intelligent.elevator.service.ElevatorPersonServiceImpl"}) +public class RestElevatorPersonServiceImpl implements ElevatorPersonService { + @Autowired + private ElevatorPersonFeignClient elevatorPersonFeignClient; + + public CloudwalkResult addVisitor(AcsPersonAddVisitorParam param, CloudwalkCallContext context) + throws ServiceException { + return this.elevatorPersonFeignClient.addVisitor(param); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/email/feign/EmailSendFeign.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/email/feign/EmailSendFeign.java new file mode 100644 index 00000000..ed942469 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/email/feign/EmailSendFeign.java @@ -0,0 +1,16 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.email.feign; + +import cn.cloudwalk.client.cwoscomponent.intelligent.email.param.EmailSendParam; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.email.feign.fallback.EmailSendFeignFallback; +import org.springframework.cloud.netflix.feign.FeignClient; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; + +@FeignClient(name = "${feign.cwos-portal.name:cwos-portal}", path = "/portal/email", + fallback = EmailSendFeignFallback.class) +public interface EmailSendFeign { + @RequestMapping(value = {"/send"}, method = {RequestMethod.POST}) + CloudwalkResult send(@RequestBody EmailSendParam paramEmailSendParam); +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/email/feign/fallback/EmailSendFeignFallback.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/email/feign/fallback/EmailSendFeignFallback.java new file mode 100644 index 00000000..c55622c4 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/email/feign/fallback/EmailSendFeignFallback.java @@ -0,0 +1,13 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.email.feign.fallback; + +import cn.cloudwalk.client.cwoscomponent.intelligent.email.param.EmailSendParam; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.email.feign.EmailSendFeign; +import org.springframework.stereotype.Component; + +@Component +public class EmailSendFeignFallback implements EmailSendFeign { + public CloudwalkResult send(EmailSendParam param) { + throw new RuntimeException("邮件发送失败"); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/email/service/RestEmailSendServiceImpl.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/email/service/RestEmailSendServiceImpl.java new file mode 100644 index 00000000..97299c36 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/email/service/RestEmailSendServiceImpl.java @@ -0,0 +1,22 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.email.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.email.param.EmailSendParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.email.service.EmailSendService; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.email.feign.EmailSendFeign; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass; +import org.springframework.stereotype.Service; + +@Service +@ConditionalOnMissingClass({"cn.cloudwalk.service.cwoscomponent.intelligent.email.service.EmailSendServiceImpl"}) +public class RestEmailSendServiceImpl implements EmailSendService { + @Autowired + private EmailSendFeign emailSendFeign; + + public CloudwalkResult send(EmailSendParam param, CloudwalkCallContext context) throws ServiceException { + return this.emailSendFeign.send(param); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/file/feign/FileFeign.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/file/feign/FileFeign.java new file mode 100644 index 00000000..b28cb046 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/file/feign/FileFeign.java @@ -0,0 +1,24 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.file.feign; + +import cn.cloudwalk.client.cwoscomponent.intelligent.file.param.FileFinishParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.file.param.FileGetParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.file.param.FileInitParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.file.result.FileDetail; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.file.feign.fallback.FileFeignFallback; +import org.springframework.cloud.netflix.feign.FeignClient; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; + +@FeignClient(name = "${feign.ninca-common.name:ninca-common}", path = "/message-center/file", + fallback = FileFeignFallback.class) +public interface FileFeign { + @RequestMapping(value = {"/init"}, method = {RequestMethod.POST}) + CloudwalkResult init(FileInitParam paramFileInitParam); + + @RequestMapping(value = {"/finish"}, method = {RequestMethod.POST}) + CloudwalkResult finish(FileFinishParam paramFileFinishParam); + + @RequestMapping(value = {"/get"}, method = {RequestMethod.POST}) + CloudwalkResult get(FileGetParam paramFileGetParam); +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/file/feign/fallback/FileFeignFallback.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/file/feign/fallback/FileFeignFallback.java new file mode 100644 index 00000000..1057a8ab --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/file/feign/fallback/FileFeignFallback.java @@ -0,0 +1,24 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.file.feign.fallback; + +import cn.cloudwalk.client.cwoscomponent.intelligent.file.param.FileFinishParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.file.param.FileGetParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.file.param.FileInitParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.file.result.FileDetail; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.file.feign.FileFeign; +import org.springframework.stereotype.Component; + +@Component +public class FileFeignFallback implements FileFeign { + public CloudwalkResult init(FileInitParam param) { + throw new RuntimeException("文件初始化失败"); + } + + public CloudwalkResult finish(FileFinishParam param) { + throw new RuntimeException("文件完成失败"); + } + + public CloudwalkResult get(FileGetParam param) { + throw new RuntimeException("查看文件详细信息失败"); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/file/service/RestFileServiceImpl.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/file/service/RestFileServiceImpl.java new file mode 100644 index 00000000..94b077ee --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/file/service/RestFileServiceImpl.java @@ -0,0 +1,32 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.file.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.file.param.FileFinishParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.file.param.FileGetParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.file.param.FileInitParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.file.result.FileDetail; +import cn.cloudwalk.client.cwoscomponent.intelligent.file.service.FileService; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.file.feign.FileFeign; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class RestFileServiceImpl implements FileService { + @Autowired + private FileFeign fileFeign; + + public CloudwalkResult init(FileInitParam param, CloudwalkCallContext context) throws ServiceException { + return this.fileFeign.init(param); + } + + public CloudwalkResult finish(FileFinishParam param, CloudwalkCallContext context) + throws ServiceException { + return this.fileFeign.finish(param); + } + + public CloudwalkResult get(FileGetParam param, CloudwalkCallContext context) throws ServiceException { + return this.fileFeign.get(param); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/imagestore/feign/DeviceImageStoreSyncFeignClient.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/imagestore/feign/DeviceImageStoreSyncFeignClient.java new file mode 100644 index 00000000..91a426b8 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/imagestore/feign/DeviceImageStoreSyncFeignClient.java @@ -0,0 +1,49 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.imagestore.feign; + +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.DevicePersonResyncParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.DevicePersonResyncRequestParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.QueryDevicePersonSyncLogParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.QueryDevicePersonSyncParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.DeviceImageStoreReSyncResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.DevicePersonResyncResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.DevicePersonSyncDetailResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.DevicePersonSyncLogResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.DevicePersonSyncResult; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.imagestore.feign.fallback.DeviceImageStoreSyncFeignClientFallback; +import java.util.List; +import java.util.Map; +import org.springframework.cloud.netflix.feign.FeignClient; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; + +@FeignClient(name = "${feign.component-organization.name:ninca-common-component-organization}", + path = "/component/device/imagestore", fallback = DeviceImageStoreSyncFeignClientFallback.class) +public interface DeviceImageStoreSyncFeignClient { + @RequestMapping(value = {"/sync/page"}, method = {RequestMethod.POST}) + CloudwalkResult> + page(@RequestBody QueryDevicePersonSyncParam paramQueryDevicePersonSyncParam); + + @RequestMapping(value = {"/sync/detail"}, method = {RequestMethod.POST}) + CloudwalkResult> + detail(@RequestBody QueryDevicePersonSyncLogParam paramQueryDevicePersonSyncLogParam); + + @RequestMapping(value = {"/sync/log/page"}, method = {RequestMethod.POST}) + CloudwalkResult> + logPage(@RequestBody QueryDevicePersonSyncLogParam paramQueryDevicePersonSyncLogParam); + + @RequestMapping(value = {"/deviceImageStoreMap"}, method = {RequestMethod.POST}) + CloudwalkResult> + getDeviceImageStore(@RequestBody QueryDevicePersonSyncLogParam paramQueryDevicePersonSyncLogParam); + + @RequestMapping(value = {"/resync"}, method = {RequestMethod.POST}) + CloudwalkResult> + deviceResync(@RequestBody DevicePersonResyncParam paramDevicePersonResyncParam); + + @PostMapping({"/person/resync"}) + CloudwalkResult> + devicePersonResync(@RequestBody DevicePersonResyncRequestParam paramDevicePersonResyncRequestParam); +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/imagestore/feign/ImageStoreFeignClient.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/imagestore/feign/ImageStoreFeignClient.java new file mode 100644 index 00000000..92ca0b3d --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/imagestore/feign/ImageStoreFeignClient.java @@ -0,0 +1,40 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.imagestore.feign; + +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStoreAddParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStoreDelParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStoreEditParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStoreQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.ImageStoreDetailResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.ImageStoreListResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.ImageStoreResult; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.imagestore.feign.fallback.ImageStoreFeignClientFallback; +import java.util.List; +import org.springframework.cloud.netflix.feign.FeignClient; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; + +@FeignClient(name = "${feign.component-organization.name:ninca-common-component-organization}", + path = "/component/imagestore", fallback = ImageStoreFeignClientFallback.class) +public interface ImageStoreFeignClient { + @RequestMapping(value = {"/add"}, method = {RequestMethod.POST}) + CloudwalkResult add(@RequestBody ImageStoreAddParam paramImageStoreAddParam); + + @RequestMapping(value = {"/edit"}, method = {RequestMethod.POST}) + CloudwalkResult edit(@RequestBody ImageStoreEditParam paramImageStoreEditParam); + + @RequestMapping(value = {"/list"}, method = {RequestMethod.POST}) + CloudwalkResult> list(@RequestBody ImageStoreQueryParam paramImageStoreQueryParam); + + @RequestMapping(value = {"/page"}, method = {RequestMethod.POST}) + CloudwalkResult> + page(@RequestBody ImageStoreQueryParam paramImageStoreQueryParam); + + @RequestMapping(value = {"/delete"}, method = {RequestMethod.POST}) + CloudwalkResult delete(@RequestBody ImageStoreDelParam paramImageStoreDelParam); + + @RequestMapping(value = {"/detail"}, method = {RequestMethod.POST}) + CloudwalkResult detail(@RequestBody ImageStoreQueryParam paramImageStoreQueryParam); +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/imagestore/feign/ImageStorePersonFeignClient.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/imagestore/feign/ImageStorePersonFeignClient.java new file mode 100644 index 00000000..bc69332d --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/imagestore/feign/ImageStorePersonFeignClient.java @@ -0,0 +1,43 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.imagestore.feign; + +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStorePersonBindParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStorePersonDelParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStorePersonQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStorePersonSaveParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.UpdateGroupPersonRefParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.ImageStorePersonResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.ImageStorePersonSaveResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.ImgStoreBatchBindPersonResult; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.imagestore.feign.fallback.ImageStorePersonFeignClientFallback; +import org.springframework.cloud.netflix.feign.FeignClient; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; + +@FeignClient(name = "${feign.component-organization.name:ninca-common-component-organization}", + path = "/component/imagestore/person", fallback = ImageStorePersonFeignClientFallback.class) +public interface ImageStorePersonFeignClient { + @RequestMapping(value = {"/save"}, method = {RequestMethod.POST}) + CloudwalkResult + save(@RequestBody ImageStorePersonSaveParam paramImageStorePersonSaveParam); + + @RequestMapping(value = {"/delete"}, method = {RequestMethod.POST}) + CloudwalkResult delete(@RequestBody ImageStorePersonDelParam paramImageStorePersonDelParam); + + @RequestMapping(value = {"/page"}, method = {RequestMethod.POST}) + CloudwalkResult> + page(@RequestBody ImageStorePersonQueryParam paramImageStorePersonQueryParam); + + @RequestMapping(value = {"/bind"}, method = {RequestMethod.POST}) + CloudwalkResult bind(@RequestBody ImageStorePersonBindParam paramImageStorePersonBindParam); + + @RequestMapping(value = {"/batchBind"}, method = {RequestMethod.POST}) + CloudwalkResult + batchBind(@RequestBody ImageStorePersonBindParam paramImageStorePersonBindParam); + + @RequestMapping(value = {"/updateGroupPersonRef"}, method = {RequestMethod.POST}) + CloudwalkResult + updateGroupPersonRef(@RequestBody UpdateGroupPersonRefParam paramUpdateGroupPersonRefParam); +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/imagestore/feign/fallback/DeviceImageStoreSyncFeignClientFallback.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/imagestore/feign/fallback/DeviceImageStoreSyncFeignClientFallback.java new file mode 100644 index 00000000..8f612221 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/imagestore/feign/fallback/DeviceImageStoreSyncFeignClientFallback.java @@ -0,0 +1,45 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.imagestore.feign.fallback; + +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.DevicePersonResyncParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.DevicePersonResyncRequestParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.QueryDevicePersonSyncLogParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.QueryDevicePersonSyncParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.DeviceImageStoreReSyncResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.DevicePersonResyncResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.DevicePersonSyncDetailResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.DevicePersonSyncLogResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.DevicePersonSyncResult; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.imagestore.feign.DeviceImageStoreSyncFeignClient; +import java.util.List; +import java.util.Map; +import org.springframework.stereotype.Component; + +@Component +public class DeviceImageStoreSyncFeignClientFallback implements DeviceImageStoreSyncFeignClient { + public CloudwalkResult> page(QueryDevicePersonSyncParam param) { + throw new RuntimeException("查询设备图库同步数据失败"); + } + + public CloudwalkResult> detail(QueryDevicePersonSyncLogParam param) { + throw new RuntimeException("查询图库同步数据失败"); + } + + public CloudwalkResult> logPage(QueryDevicePersonSyncLogParam param) { + throw new RuntimeException("查询设备图库同步日志数据失败"); + } + + public CloudwalkResult> getDeviceImageStore(QueryDevicePersonSyncLogParam param) { + throw new RuntimeException("查询设备关联图库列表败"); + } + + public CloudwalkResult> deviceResync(DevicePersonResyncParam param) { + throw new RuntimeException("重新同步失败"); + } + + public CloudwalkResult> + devicePersonResync(DevicePersonResyncRequestParam requestParam) { + throw new RuntimeException("已选人员重新同步失败"); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/imagestore/feign/fallback/ImageStoreFeignClientFallback.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/imagestore/feign/fallback/ImageStoreFeignClientFallback.java new file mode 100644 index 00000000..ef8fd33d --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/imagestore/feign/fallback/ImageStoreFeignClientFallback.java @@ -0,0 +1,41 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.imagestore.feign.fallback; + +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStoreAddParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStoreDelParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStoreEditParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStoreQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.ImageStoreDetailResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.ImageStoreListResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.ImageStoreResult; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.imagestore.feign.ImageStoreFeignClient; +import java.util.List; +import org.springframework.stereotype.Component; + +@Component +public class ImageStoreFeignClientFallback implements ImageStoreFeignClient { + public CloudwalkResult add(ImageStoreAddParam param) { + throw new RuntimeException("新增图库失败"); + } + + public CloudwalkResult edit(ImageStoreEditParam param) { + throw new RuntimeException("编辑图库失败"); + } + + public CloudwalkResult> list(ImageStoreQueryParam param) { + throw new RuntimeException("查询图库失败"); + } + + public CloudwalkResult> page(ImageStoreQueryParam param) { + throw new RuntimeException("分页查询图库失败"); + } + + public CloudwalkResult delete(ImageStoreDelParam param) { + throw new RuntimeException("删除图库失败"); + } + + public CloudwalkResult detail(ImageStoreQueryParam param) { + throw new RuntimeException("查询图库详情失败"); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/imagestore/feign/fallback/ImageStorePersonFeignClientFallback.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/imagestore/feign/fallback/ImageStorePersonFeignClientFallback.java new file mode 100644 index 00000000..e608cd09 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/imagestore/feign/fallback/ImageStorePersonFeignClientFallback.java @@ -0,0 +1,41 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.imagestore.feign.fallback; + +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStorePersonBindParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStorePersonDelParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStorePersonQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStorePersonSaveParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.UpdateGroupPersonRefParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.ImageStorePersonResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.ImageStorePersonSaveResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.ImgStoreBatchBindPersonResult; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.imagestore.feign.ImageStorePersonFeignClient; +import org.springframework.stereotype.Component; + +@Component +public class ImageStorePersonFeignClientFallback implements ImageStorePersonFeignClient { + public CloudwalkResult save(ImageStorePersonSaveParam param) { + throw new RuntimeException("图库人员新增或更新失败"); + } + + public CloudwalkResult delete(ImageStorePersonDelParam param) { + throw new RuntimeException("图库人员删除失败"); + } + + public CloudwalkResult> page(ImageStorePersonQueryParam param) { + throw new RuntimeException("分页查询图库人员信息失败"); + } + + public CloudwalkResult bind(ImageStorePersonBindParam param) { + throw new RuntimeException("图库人员关系绑定失败"); + } + + public CloudwalkResult batchBind(ImageStorePersonBindParam param) { + throw new RuntimeException("图库人员关系批量绑定失败"); + } + + public CloudwalkResult updateGroupPersonRef(UpdateGroupPersonRefParam param) { + throw new RuntimeException("根据条件批量更新图库人员失败"); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/imagestore/service/RestDeviceImageStoreSyncServiceImpl.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/imagestore/service/RestDeviceImageStoreSyncServiceImpl.java new file mode 100644 index 00000000..aa9e6021 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/imagestore/service/RestDeviceImageStoreSyncServiceImpl.java @@ -0,0 +1,60 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.imagestore.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.DevicePersonResyncParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.DevicePersonResyncRequestParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.QueryDevicePersonSyncLogParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.QueryDevicePersonSyncParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.DeviceImageStoreReSyncResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.DevicePersonResyncResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.DevicePersonSyncDetailResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.DevicePersonSyncLogResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.DevicePersonSyncResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.service.DeviceImageStoreSyncService; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.imagestore.feign.DeviceImageStoreSyncFeignClient; +import java.util.List; +import java.util.Map; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass; +import org.springframework.stereotype.Service; + +@Service +@ConditionalOnMissingClass({ + "cn.cloudwalk.service.cwoscomponent.intelligent.device.service.DeviceImageStoreSyncServiceImpl"}) +public class RestDeviceImageStoreSyncServiceImpl implements DeviceImageStoreSyncService { + @Autowired + private DeviceImageStoreSyncFeignClient deviceImageStoreSyncFeignClient; + + public CloudwalkResult> page(QueryDevicePersonSyncParam param, + CloudwalkCallContext context) throws ServiceException { + return this.deviceImageStoreSyncFeignClient.page(param); + } + + public CloudwalkResult> detail(QueryDevicePersonSyncLogParam param, + CloudwalkCallContext context) throws ServiceException { + return this.deviceImageStoreSyncFeignClient.detail(param); + } + + public CloudwalkResult> logPage(QueryDevicePersonSyncLogParam param, + CloudwalkCallContext context) throws ServiceException { + return this.deviceImageStoreSyncFeignClient.logPage(param); + } + + public CloudwalkResult> getDeviceImageStore(QueryDevicePersonSyncLogParam param, + CloudwalkCallContext context) throws ServiceException { + return this.deviceImageStoreSyncFeignClient.getDeviceImageStore(param); + } + + public CloudwalkResult> deviceResync(DevicePersonResyncParam param, + CloudwalkCallContext context) throws ServiceException { + return this.deviceImageStoreSyncFeignClient.deviceResync(param); + } + + public CloudwalkResult> devicePersonResync( + DevicePersonResyncRequestParam requestParam, CloudwalkCallContext context) throws ServiceException { + return this.deviceImageStoreSyncFeignClient.devicePersonResync(requestParam); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/imagestore/service/RestImageStorePersonServiceImpl.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/imagestore/service/RestImageStorePersonServiceImpl.java new file mode 100644 index 00000000..2cf4f930 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/imagestore/service/RestImageStorePersonServiceImpl.java @@ -0,0 +1,57 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.imagestore.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStorePersonBindParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStorePersonDelParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStorePersonQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStorePersonSaveParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.UpdateGroupPersonRefParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.ImageStorePersonResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.ImageStorePersonSaveResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.ImgStoreBatchBindPersonResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.service.ImageStorePersonService; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.imagestore.feign.ImageStorePersonFeignClient; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass; +import org.springframework.stereotype.Service; + +@Service +@ConditionalOnMissingClass({ + "cn.cloudwalk.service.cwoscomponent.intelligent.imagestore.service.ImageStorePersonServiceImpl"}) +public class RestImageStorePersonServiceImpl implements ImageStorePersonService { + @Autowired + private ImageStorePersonFeignClient imageStorePersonFeignClient; + + public CloudwalkResult save(ImageStorePersonSaveParam param, + CloudwalkCallContext context) throws ServiceException { + return this.imageStorePersonFeignClient.save(param); + } + + public CloudwalkResult delete(ImageStorePersonDelParam param, CloudwalkCallContext context) + throws ServiceException { + return this.imageStorePersonFeignClient.delete(param); + } + + public CloudwalkResult> page(ImageStorePersonQueryParam param, + CloudwalkCallContext context) throws ServiceException { + return this.imageStorePersonFeignClient.page(param); + } + + public CloudwalkResult bind(ImageStorePersonBindParam param, CloudwalkCallContext context) + throws ServiceException { + return this.imageStorePersonFeignClient.bind(param); + } + + public CloudwalkResult batchBind(ImageStorePersonBindParam param, + CloudwalkCallContext context) throws ServiceException { + return this.imageStorePersonFeignClient.batchBind(param); + } + + public CloudwalkResult updateGroupPersonRef(UpdateGroupPersonRefParam param, CloudwalkCallContext context) + throws ServiceException { + return this.imageStorePersonFeignClient.updateGroupPersonRef(param); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/imagestore/service/RestImageStoreServiceImpl.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/imagestore/service/RestImageStoreServiceImpl.java new file mode 100644 index 00000000..06ac3343 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/imagestore/service/RestImageStoreServiceImpl.java @@ -0,0 +1,55 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.imagestore.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStoreAddParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStoreDelParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStoreEditParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.param.ImageStoreQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.ImageStoreDetailResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.ImageStoreListResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.result.ImageStoreResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.imagestore.service.ImageStoreService; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.imagestore.feign.ImageStoreFeignClient; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass; +import org.springframework.stereotype.Service; + +@Service +@ConditionalOnMissingClass({"cn.cloudwalk.service.cwoscomponent.intelligent.imagestore.service.ImageStoreServiceImpl"}) +public class RestImageStoreServiceImpl implements ImageStoreService { + @Autowired + private ImageStoreFeignClient imageStoreFeignClient; + + public CloudwalkResult add(ImageStoreAddParam param, CloudwalkCallContext context) throws ServiceException { + return this.imageStoreFeignClient.add(param); + } + + public CloudwalkResult edit(ImageStoreEditParam param, CloudwalkCallContext context) + throws ServiceException { + return this.imageStoreFeignClient.edit(param); + } + + public CloudwalkResult> list(ImageStoreQueryParam param, CloudwalkCallContext context) + throws ServiceException { + return this.imageStoreFeignClient.list(param); + } + + public CloudwalkResult> page(ImageStoreQueryParam param, + CloudwalkCallContext context) throws ServiceException { + return this.imageStoreFeignClient.page(param); + } + + public CloudwalkResult delete(ImageStoreDelParam param, CloudwalkCallContext context) + throws ServiceException { + return this.imageStoreFeignClient.delete(param); + } + + public CloudwalkResult detail(ImageStoreQueryParam param, CloudwalkCallContext context) + throws ServiceException { + return this.imageStoreFeignClient.detail(param); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/label/feign/LabelFeignClient.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/label/feign/LabelFeignClient.java new file mode 100644 index 00000000..84278146 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/label/feign/LabelFeignClient.java @@ -0,0 +1,42 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.label.feign; + +import cn.cloudwalk.client.cwoscomponent.intelligent.label.param.LabelAddParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.label.param.LabelDetailParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.label.param.LabelGroupDelParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.label.param.LabelGroupEditParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.label.param.LabelPersonAddParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.label.param.LabelPersonDelParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.label.param.LabelQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.label.result.LabelDetailResult; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.label.feign.fallback.LabelFeignClientFallback; +import java.util.List; +import org.springframework.cloud.netflix.feign.FeignClient; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; + +@FeignClient(name = "${feign.component-organization.name:ninca-common-component-organization}", path = "/biology/label", + fallback = LabelFeignClientFallback.class) +public interface LabelFeignClient { + @RequestMapping(value = {"/add"}, method = {RequestMethod.POST}) + CloudwalkResult add(@RequestBody LabelAddParam paramLabelAddParam); + + @RequestMapping(value = {"/detail"}, method = {RequestMethod.POST}) + CloudwalkResult detail(@RequestBody LabelDetailParam paramLabelDetailParam); + + @RequestMapping(value = {"/getAllLabels"}, method = {RequestMethod.POST}) + CloudwalkResult> getAll(@RequestBody LabelQueryParam paramLabelQueryParam); + + @RequestMapping(value = {"/personsAdd"}, method = {RequestMethod.POST}) + CloudwalkResult personsAdd(@RequestBody LabelPersonAddParam paramLabelPersonAddParam); + + @RequestMapping(value = {"/personsDel"}, method = {RequestMethod.POST}) + CloudwalkResult personsDel(@RequestBody LabelPersonDelParam paramLabelPersonDelParam); + + @RequestMapping(value = {"/delete"}, method = {RequestMethod.POST}) + CloudwalkResult delete(@RequestBody LabelGroupDelParam paramLabelGroupDelParam); + + @RequestMapping(value = {"/edit"}, method = {RequestMethod.POST}) + CloudwalkResult edit(@RequestBody LabelGroupEditParam paramLabelGroupEditParam); +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/label/feign/fallback/LabelFeignClientFallback.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/label/feign/fallback/LabelFeignClientFallback.java new file mode 100644 index 00000000..035c43b4 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/label/feign/fallback/LabelFeignClientFallback.java @@ -0,0 +1,45 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.label.feign.fallback; + +import cn.cloudwalk.client.cwoscomponent.intelligent.label.param.LabelAddParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.label.param.LabelDetailParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.label.param.LabelGroupDelParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.label.param.LabelGroupEditParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.label.param.LabelPersonAddParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.label.param.LabelPersonDelParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.label.param.LabelQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.label.result.LabelDetailResult; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.label.feign.LabelFeignClient; +import java.util.List; +import org.springframework.stereotype.Component; + +@Component +public class LabelFeignClientFallback implements LabelFeignClient { + public CloudwalkResult add(LabelAddParam param) { + throw new RuntimeException("新增标签失败"); + } + + public CloudwalkResult detail(LabelDetailParam param) { + throw new RuntimeException("获取标签详情失败"); + } + + public CloudwalkResult> getAll(LabelQueryParam param) { + throw new RuntimeException("获取所有标签失败"); + } + + public CloudwalkResult personsAdd(LabelPersonAddParam param) { + throw new RuntimeException("标签人员新增失败"); + } + + public CloudwalkResult personsDel(LabelPersonDelParam param) { + throw new RuntimeException("标签人员删除失败"); + } + + public CloudwalkResult delete(LabelGroupDelParam param) { + throw new RuntimeException("标签人员删除失败"); + } + + public CloudwalkResult edit(LabelGroupEditParam param) { + throw new RuntimeException("标签人员编辑失败"); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/label/service/RestLabelServiceImpl.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/label/service/RestLabelServiceImpl.java new file mode 100644 index 00000000..563ce6eb --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/label/service/RestLabelServiceImpl.java @@ -0,0 +1,60 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.label.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.label.param.LabelAddParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.label.param.LabelDetailParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.label.param.LabelGroupDelParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.label.param.LabelGroupEditParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.label.param.LabelPersonAddParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.label.param.LabelPersonDelParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.label.param.LabelQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.label.result.LabelDetailResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.label.service.LabelService; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.label.feign.LabelFeignClient; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass; +import org.springframework.stereotype.Service; + +@Service +@ConditionalOnMissingClass({"cn.cloudwalk.service.cwoscomponent.intelligent.label.service.LabelServiceImpl"}) +public class RestLabelServiceImpl implements LabelService { + @Autowired + private LabelFeignClient labelFeignClient; + + public CloudwalkResult add(LabelAddParam param, CloudwalkCallContext context) throws ServiceException { + return this.labelFeignClient.add(param); + } + + public CloudwalkResult detail(LabelDetailParam param, CloudwalkCallContext context) + throws ServiceException { + return this.labelFeignClient.detail(param); + } + + public CloudwalkResult> getAll(LabelQueryParam param, CloudwalkCallContext context) + throws ServiceException { + return this.labelFeignClient.getAll(param); + } + + public CloudwalkResult personAdd(LabelPersonAddParam param, CloudwalkCallContext context) + throws ServiceException { + return this.labelFeignClient.personsAdd(param); + } + + public CloudwalkResult personDel(LabelPersonDelParam param, CloudwalkCallContext context) + throws ServiceException { + return this.labelFeignClient.personsDel(param); + } + + public CloudwalkResult delete(LabelGroupDelParam param, CloudwalkCallContext context) + throws ServiceException { + return this.labelFeignClient.delete(param); + } + + public CloudwalkResult edit(LabelGroupEditParam param, CloudwalkCallContext context) + throws ServiceException { + return this.labelFeignClient.edit(param); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/message/feign/SmsSendFeign.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/message/feign/SmsSendFeign.java new file mode 100644 index 00000000..9b2b34de --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/message/feign/SmsSendFeign.java @@ -0,0 +1,21 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.message.feign; + +import cn.cloudwalk.client.cwoscomponent.intelligent.message.param.GetShortUrlParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.message.param.SmsSendParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.message.result.ShotUrlResult; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.message.feign.fallback.SmsSendFeignFallback; +import org.springframework.cloud.netflix.feign.FeignClient; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; + +@FeignClient(name = "${feign.cwos-portal.name:cwos-portal}", path = "/portal/message", + fallback = SmsSendFeignFallback.class) +public interface SmsSendFeign { + @RequestMapping(value = {"/send"}, method = {RequestMethod.POST}) + CloudwalkResult send(@RequestBody SmsSendParam paramSmsSendParam); + + @RequestMapping(value = {"/getShortUrl"}, method = {RequestMethod.POST}) + CloudwalkResult getShortUrl(@RequestBody GetShortUrlParam paramGetShortUrlParam); +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/message/feign/fallback/SmsSendFeignFallback.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/message/feign/fallback/SmsSendFeignFallback.java new file mode 100644 index 00000000..565680da --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/message/feign/fallback/SmsSendFeignFallback.java @@ -0,0 +1,19 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.message.feign.fallback; + +import cn.cloudwalk.client.cwoscomponent.intelligent.message.param.GetShortUrlParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.message.param.SmsSendParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.message.result.ShotUrlResult; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.message.feign.SmsSendFeign; +import org.springframework.stereotype.Component; + +@Component +public class SmsSendFeignFallback implements SmsSendFeign { + public CloudwalkResult send(SmsSendParam param) { + throw new RuntimeException("发送短信失败"); + } + + public CloudwalkResult getShortUrl(GetShortUrlParam param) { + throw new RuntimeException("获取短连接失败"); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/message/service/RestSmsSendServiceImpl.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/message/service/RestSmsSendServiceImpl.java new file mode 100644 index 00000000..93097df3 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/message/service/RestSmsSendServiceImpl.java @@ -0,0 +1,29 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.message.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.message.param.GetShortUrlParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.message.param.SmsSendParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.message.result.ShotUrlResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.message.service.SmsSendService; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.message.feign.SmsSendFeign; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass; +import org.springframework.stereotype.Service; + +@Service +@ConditionalOnMissingClass({"cn.cloudwalk.service.cwoscomponent.intelligent.message.service.SmsSendServiceImpl"}) +public class RestSmsSendServiceImpl implements SmsSendService { + @Autowired + private SmsSendFeign smsSendFeign; + + public CloudwalkResult send(SmsSendParam param, CloudwalkCallContext context) throws ServiceException { + return this.smsSendFeign.send(param); + } + + public CloudwalkResult getShortUrl(GetShortUrlParam param, CloudwalkCallContext context) + throws ServiceException { + return this.smsSendFeign.getShortUrl(param); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/organization/feign/OrganizationFeignClient.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/organization/feign/OrganizationFeignClient.java new file mode 100644 index 00000000..482fb036 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/organization/feign/OrganizationFeignClient.java @@ -0,0 +1,51 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.organization.feign; + +import cn.cloudwalk.client.cwoscomponent.intelligent.organization.param.OrganizationAddParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.organization.param.OrganizationDeleteParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.organization.param.OrganizationDetailQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.organization.param.OrganizationEditParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.organization.param.OrganizationListParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.organization.param.OrganizationQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.organization.param.OrganizationTreeParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.organization.param.RentUpdateParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.organization.result.OrganizationDetailResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.organization.result.OrganizationResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.organization.result.OrganizationTreeResult; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.organization.feign.fallback.OrganizationFeignClientFallback; +import java.util.List; +import org.springframework.cloud.netflix.feign.FeignClient; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; + +@FeignClient(name = "${feign.component-organization.name:ninca-common-component-organization}", + path = "/component/organization", fallback = OrganizationFeignClientFallback.class) +public interface OrganizationFeignClient { + @RequestMapping(value = {"/page"}, method = {RequestMethod.POST}) + CloudwalkResult> + page(@RequestBody OrganizationQueryParam paramOrganizationQueryParam); + + @RequestMapping(value = {"/tree"}, method = {RequestMethod.POST}) + CloudwalkResult> tree(@RequestBody OrganizationTreeParam paramOrganizationTreeParam); + + @RequestMapping(value = {"/list"}, method = {RequestMethod.POST}) + CloudwalkResult> list(@RequestBody OrganizationListParam paramOrganizationListParam); + + @RequestMapping(value = {"/add"}, method = {RequestMethod.POST}) + CloudwalkResult add(@RequestBody OrganizationAddParam paramOrganizationAddParam); + + @RequestMapping(value = {"/edit"}, method = {RequestMethod.POST}) + CloudwalkResult edit(@RequestBody OrganizationEditParam paramOrganizationEditParam); + + @RequestMapping(value = {"/edit/rent"}, method = {RequestMethod.POST}) + CloudwalkResult editRent(@RequestBody RentUpdateParam paramRentUpdateParam); + + @RequestMapping(value = {"/batch/delete"}, method = {RequestMethod.POST}) + CloudwalkResult delete(@RequestBody OrganizationDeleteParam paramOrganizationDeleteParam); + + @RequestMapping(value = {"/detail"}, method = {RequestMethod.POST}) + CloudwalkResult + detail(@RequestBody OrganizationDetailQueryParam paramOrganizationDetailQueryParam); +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/organization/feign/fallback/OrganizationFeignClientFallback.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/organization/feign/fallback/OrganizationFeignClientFallback.java new file mode 100644 index 00000000..f97308c8 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/organization/feign/fallback/OrganizationFeignClientFallback.java @@ -0,0 +1,53 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.organization.feign.fallback; + +import cn.cloudwalk.client.cwoscomponent.intelligent.organization.param.OrganizationAddParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.organization.param.OrganizationDeleteParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.organization.param.OrganizationDetailQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.organization.param.OrganizationEditParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.organization.param.OrganizationListParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.organization.param.OrganizationQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.organization.param.OrganizationTreeParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.organization.param.RentUpdateParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.organization.result.OrganizationDetailResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.organization.result.OrganizationResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.organization.result.OrganizationTreeResult; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.organization.feign.OrganizationFeignClient; +import java.util.List; +import org.springframework.stereotype.Component; + +@Component +public class OrganizationFeignClientFallback implements OrganizationFeignClient { + public CloudwalkResult> page(OrganizationQueryParam param) { + throw new RuntimeException("机构分页列表查询失败"); + } + + public CloudwalkResult> tree(OrganizationTreeParam param) { + throw new RuntimeException("机构树结构查询失败"); + } + + public CloudwalkResult> list(OrganizationListParam param) { + throw new RuntimeException("机构全量列表查询失败"); + } + + public CloudwalkResult add(OrganizationAddParam param) { + throw new RuntimeException("新增机构失败"); + } + + public CloudwalkResult edit(OrganizationEditParam param) { + throw new RuntimeException("编辑机构失败"); + } + + public CloudwalkResult editRent(RentUpdateParam param) { + throw new RuntimeException("编辑机构租赁失败"); + } + + public CloudwalkResult delete(OrganizationDeleteParam param) { + throw new RuntimeException("删除机构失败"); + } + + public CloudwalkResult detail(OrganizationDetailQueryParam param) { + throw new RuntimeException("查询机构失败"); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/organization/service/RestOrganizationServiceImpl.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/organization/service/RestOrganizationServiceImpl.java new file mode 100644 index 00000000..d53f4b76 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/organization/service/RestOrganizationServiceImpl.java @@ -0,0 +1,71 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.organization.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.organization.param.OrganizationAddParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.organization.param.OrganizationDeleteParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.organization.param.OrganizationDetailQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.organization.param.OrganizationEditParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.organization.param.OrganizationListParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.organization.param.OrganizationQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.organization.param.OrganizationTreeParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.organization.param.RentUpdateParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.organization.result.OrganizationDetailResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.organization.result.OrganizationResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.organization.result.OrganizationTreeResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.organization.service.OrganizationService; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.organization.feign.OrganizationFeignClient; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass; +import org.springframework.stereotype.Service; + +@Service +@ConditionalOnMissingClass({ + "cn.cloudwalk.service.cwoscomponent.intelligent.organization.service.OrganizationServiceImpl"}) +public class RestOrganizationServiceImpl implements OrganizationService { + @Autowired + private OrganizationFeignClient organizationFeignClient; + + public CloudwalkResult> page(OrganizationQueryParam param, + CloudwalkCallContext context) throws ServiceException { + return this.organizationFeignClient.page(param); + } + + public CloudwalkResult> tree(OrganizationTreeParam param, CloudwalkCallContext context) + throws ServiceException { + return this.organizationFeignClient.tree(param); + } + + public CloudwalkResult> list(OrganizationListParam param, CloudwalkCallContext context) + throws ServiceException { + return this.organizationFeignClient.list(param); + } + + public CloudwalkResult add(OrganizationAddParam param, CloudwalkCallContext context) + throws ServiceException { + return this.organizationFeignClient.add(param); + } + + public CloudwalkResult edit(OrganizationEditParam param, CloudwalkCallContext context) + throws ServiceException { + return this.organizationFeignClient.edit(param); + } + + public CloudwalkResult editRent(RentUpdateParam param, CloudwalkCallContext context) + throws ServiceException { + return this.organizationFeignClient.editRent(param); + } + + public CloudwalkResult delete(OrganizationDeleteParam param, CloudwalkCallContext context) + throws ServiceException { + return this.organizationFeignClient.delete(param); + } + + public CloudwalkResult detail(OrganizationDetailQueryParam param, + CloudwalkCallContext context) throws ServiceException { + return this.organizationFeignClient.detail(param); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/package-info.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/package-info.java new file mode 100644 index 00000000..b4101fd7 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/package-info.java @@ -0,0 +1,6 @@ +/** + * 智能 CWOS 组件远程调用实现:OpenFeign、熔断/降级、与 Consul 发现等 Spring Cloud 集成。 + *

+ * 依赖 {@code intelligent-cwoscomponent-interface} 中的契约类型,在运行时向 CWOS 后端发起调用。 + */ +package cn.cloudwalk.rest.cwoscomponent.intelligent; diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/person/feign/PersonFeignClient.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/person/feign/PersonFeignClient.java new file mode 100644 index 00000000..dc68d8f1 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/person/feign/PersonFeignClient.java @@ -0,0 +1,42 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.person.feign; + +import cn.cloudwalk.client.cwoscomponent.intelligent.person.param.PersonAddParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.person.param.PersonDelParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.person.param.PersonDetailParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.person.param.PersonEditParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.person.param.PersonImportParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.person.param.PersonQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.person.result.PersonResult; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.person.feign.fallback.PersonFeignClientFallback; +import java.util.List; +import org.springframework.cloud.netflix.feign.FeignClient; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; + +@FeignClient(name = "${feign.component-organization.name:ninca-common-component-organization}", + path = "/component/person", fallback = PersonFeignClientFallback.class) +public interface PersonFeignClient { + @RequestMapping(value = {"/add"}, method = {RequestMethod.POST}) + CloudwalkResult add(@RequestBody PersonAddParam paramPersonAddParam); + + @RequestMapping(value = {"/edit"}, method = {RequestMethod.POST}) + CloudwalkResult edit(@RequestBody PersonEditParam paramPersonEditParam); + + @RequestMapping(value = {"/delete"}, method = {RequestMethod.POST}) + CloudwalkResult delete(@RequestBody PersonDelParam paramPersonDelParam); + + @RequestMapping(value = {"/detail"}, method = {RequestMethod.POST}) + CloudwalkResult detail(@RequestBody PersonDetailParam paramPersonDetailParam); + + @RequestMapping(value = {"/list"}, method = {RequestMethod.POST}) + CloudwalkResult> list(@RequestBody PersonQueryParam paramPersonQueryParam); + + @RequestMapping(value = {"/page"}, method = {RequestMethod.POST}) + CloudwalkResult> page(@RequestBody PersonQueryParam paramPersonQueryParam); + + @RequestMapping(value = {"/upload/batchimport"}, method = {RequestMethod.POST}) + CloudwalkResult batchimport(@RequestBody PersonImportParam paramPersonImportParam); +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/person/feign/fallback/PersonFeignClientFallback.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/person/feign/fallback/PersonFeignClientFallback.java new file mode 100644 index 00000000..59cb4e97 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/person/feign/fallback/PersonFeignClientFallback.java @@ -0,0 +1,45 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.person.feign.fallback; + +import cn.cloudwalk.client.cwoscomponent.intelligent.person.param.PersonAddParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.person.param.PersonDelParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.person.param.PersonDetailParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.person.param.PersonEditParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.person.param.PersonImportParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.person.param.PersonQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.person.result.PersonResult; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.person.feign.PersonFeignClient; +import java.util.List; +import org.springframework.stereotype.Component; + +@Component +public class PersonFeignClientFallback implements PersonFeignClient { + public CloudwalkResult add(PersonAddParam param) { + throw new RuntimeException("新增人员信息失败"); + } + + public CloudwalkResult edit(PersonEditParam param) { + throw new RuntimeException("编辑人员信息失败"); + } + + public CloudwalkResult delete(PersonDelParam param) { + throw new RuntimeException("删除人员信息失败"); + } + + public CloudwalkResult detail(PersonDetailParam param) { + throw new RuntimeException("查询人员详情失败"); + } + + public CloudwalkResult> list(PersonQueryParam param) { + throw new RuntimeException("查询人员列表失败"); + } + + public CloudwalkResult> page(PersonQueryParam param) { + throw new RuntimeException("分页查询人员信息失败"); + } + + public CloudwalkResult batchimport(PersonImportParam param) { + throw new RuntimeException("人员批量导入失败"); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/person/service/RestPersonServiceImpl.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/person/service/RestPersonServiceImpl.java new file mode 100644 index 00000000..6cc0065c --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/person/service/RestPersonServiceImpl.java @@ -0,0 +1,58 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.person.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.person.param.PersonAddParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.person.param.PersonDelParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.person.param.PersonDetailParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.person.param.PersonEditParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.person.param.PersonImportParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.person.param.PersonQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.person.result.PersonResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.person.service.PersonService; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.person.feign.PersonFeignClient; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass; +import org.springframework.stereotype.Service; + +@Service +@ConditionalOnMissingClass({"cn.cloudwalk.service.cwoscomponent.intelligent.person.service.PersonServiceImpl"}) +public class RestPersonServiceImpl implements PersonService { + @Autowired + private PersonFeignClient personFeignClient; + + public CloudwalkResult add(PersonAddParam param, CloudwalkCallContext context) throws ServiceException { + return this.personFeignClient.add(param); + } + + public CloudwalkResult edit(PersonEditParam param, CloudwalkCallContext context) throws ServiceException { + return this.personFeignClient.edit(param); + } + + public CloudwalkResult delete(PersonDelParam param, CloudwalkCallContext context) throws ServiceException { + return this.personFeignClient.delete(param); + } + + public CloudwalkResult detail(PersonDetailParam param, CloudwalkCallContext context) + throws ServiceException { + return this.personFeignClient.detail(param); + } + + public CloudwalkResult> list(PersonQueryParam param, CloudwalkCallContext context) + throws ServiceException { + return this.personFeignClient.list(param); + } + + public CloudwalkResult> page(PersonQueryParam param, CloudwalkCallContext context) + throws ServiceException { + return this.personFeignClient.page(param); + } + + public CloudwalkResult batchimport(PersonImportParam param, CloudwalkCallContext context) + throws ServiceException { + return this.personFeignClient.batchimport(param); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/record/feign/AcsRecordThreeSendFeignClient.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/record/feign/AcsRecordThreeSendFeignClient.java new file mode 100644 index 00000000..bc82af4a --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/record/feign/AcsRecordThreeSendFeignClient.java @@ -0,0 +1,19 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.record.feign; + +import cn.cloudwalk.client.cwoscomponent.intelligent.record.param.AcsRecordThreeSendParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.record.result.AcsRecordThreeSendResult; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.record.feign.fallback.AcsRecordThreeSendFeignClientFallback; +import java.util.List; +import org.springframework.cloud.netflix.feign.FeignClient; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; + +@FeignClient(name = "${feign.ninca-crk-std.name:ninca-crk-std}", path = "/intelligent/acs/record", + fallback = AcsRecordThreeSendFeignClientFallback.class) +public interface AcsRecordThreeSendFeignClient { + @RequestMapping(value = {"/three/send"}, method = {RequestMethod.POST}) + CloudwalkResult> + listByTime(@RequestBody AcsRecordThreeSendParam paramAcsRecordThreeSendParam); +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/record/feign/fallback/AcsRecordThreeSendFeignClientFallback.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/record/feign/fallback/AcsRecordThreeSendFeignClientFallback.java new file mode 100644 index 00000000..82dba62e --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/record/feign/fallback/AcsRecordThreeSendFeignClientFallback.java @@ -0,0 +1,15 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.record.feign.fallback; + +import cn.cloudwalk.client.cwoscomponent.intelligent.record.param.AcsRecordThreeSendParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.record.result.AcsRecordThreeSendResult; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.record.feign.AcsRecordThreeSendFeignClient; +import java.util.List; +import org.springframework.stereotype.Component; + +@Component +public class AcsRecordThreeSendFeignClientFallback implements AcsRecordThreeSendFeignClient { + public CloudwalkResult> listByTime(AcsRecordThreeSendParam param) { + throw new RuntimeException("根据时间查询成功的开门记录(最多1000条)失败"); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/record/service/AcsRecordThreeSendServiceImpl.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/record/service/AcsRecordThreeSendServiceImpl.java new file mode 100644 index 00000000..aaba8559 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/record/service/AcsRecordThreeSendServiceImpl.java @@ -0,0 +1,24 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.record.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.record.param.AcsRecordThreeSendParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.record.result.AcsRecordThreeSendResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.record.service.AcsRecordThreeSendService; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.record.feign.AcsRecordThreeSendFeignClient; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass; +import org.springframework.stereotype.Service; + +@Service +@ConditionalOnMissingClass({"cn.cloudwalk.service.cwoscomponent.intelligent.record.service.AcsRecordServiceImpl"}) +public class AcsRecordThreeSendServiceImpl implements AcsRecordThreeSendService { + @Autowired + private AcsRecordThreeSendFeignClient acsRecordThreeSendFeignClient; + + public CloudwalkResult> listByTime(AcsRecordThreeSendParam param) + throws ServiceException { + return this.acsRecordThreeSendFeignClient.listByTime(param); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/resource/feign/LoginFeignClient.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/resource/feign/LoginFeignClient.java new file mode 100644 index 00000000..8a3ef4f0 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/resource/feign/LoginFeignClient.java @@ -0,0 +1,18 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.resource.feign; + +import cn.cloudwalk.client.cwoscomponent.intelligent.resource.param.ValidateLoginTokenParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.resource.result.ValidateLoginTokenResult; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.resource.feign.fallback.LoginFeignClientFallback; +import org.springframework.cloud.netflix.feign.FeignClient; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; + +@FeignClient(name = "${feign.cwos-portal.name:cwos-portal}", path = "/res/user", + fallback = LoginFeignClientFallback.class) +public interface LoginFeignClient { + @RequestMapping(value = {"/validateLoginToken"}, method = {RequestMethod.POST}) + CloudwalkResult + validateLoginToken(@RequestBody ValidateLoginTokenParam paramValidateLoginTokenParam); +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/resource/feign/RoleFeignClient.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/resource/feign/RoleFeignClient.java new file mode 100644 index 00000000..a9f3742b --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/resource/feign/RoleFeignClient.java @@ -0,0 +1,44 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.resource.feign; + +import cn.cloudwalk.client.cwoscomponent.intelligent.resource.param.RoleAddParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.resource.param.RoleDeltParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.resource.param.RoleEditParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.resource.param.RoleGetsParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.resource.param.RoleResourceAddParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.resource.param.RoleResourceDelParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.resource.param.RoleResourceQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.resource.result.RoleDetailResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.resource.result.RoleResourceResult; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.resource.feign.fallback.RoleFeignClientFallback; +import java.util.List; +import org.springframework.cloud.netflix.feign.FeignClient; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; + +@FeignClient(name = "${feign.cwos-portal.name:cwos-portal}", path = "/res/role", + fallback = RoleFeignClientFallback.class) +public interface RoleFeignClient { + @RequestMapping(value = {"/gets"}, method = {RequestMethod.POST}) + CloudwalkResult> gets(@RequestBody RoleGetsParam paramRoleGetsParam); + + @RequestMapping(value = {"/add"}, method = {RequestMethod.POST}) + CloudwalkResult add(@RequestBody RoleAddParam paramRoleAddParam); + + @RequestMapping(value = {"/edit"}, method = {RequestMethod.POST}) + CloudwalkResult> edit(@RequestBody RoleEditParam paramRoleEditParam); + + @RequestMapping(value = {"/delete"}, method = {RequestMethod.POST}) + CloudwalkResult delete(@RequestBody RoleDeltParam paramRoleDeltParam); + + @RequestMapping(value = {"/resource/query"}, method = {RequestMethod.POST}) + CloudwalkResult> + resourceQuery(@RequestBody RoleResourceQueryParam paramRoleResourceQueryParam); + + @RequestMapping(value = {"/resource/delete"}, method = {RequestMethod.POST}) + CloudwalkResult resourceDel(@RequestBody RoleResourceDelParam paramRoleResourceDelParam); + + @RequestMapping(value = {"/resource/add"}, method = {RequestMethod.POST}) + CloudwalkResult resourceAdd(@RequestBody RoleResourceAddParam paramRoleResourceAddParam); +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/resource/feign/fallback/LoginFeignClientFallback.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/resource/feign/fallback/LoginFeignClientFallback.java new file mode 100644 index 00000000..a1233b69 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/resource/feign/fallback/LoginFeignClientFallback.java @@ -0,0 +1,14 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.resource.feign.fallback; + +import cn.cloudwalk.client.cwoscomponent.intelligent.resource.param.ValidateLoginTokenParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.resource.result.ValidateLoginTokenResult; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.resource.feign.LoginFeignClient; +import org.springframework.stereotype.Component; + +@Component +public class LoginFeignClientFallback implements LoginFeignClient { + public CloudwalkResult validateLoginToken(ValidateLoginTokenParam param) { + throw new RuntimeException("校验登录token失败"); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/resource/feign/fallback/RoleFeignClientFallback.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/resource/feign/fallback/RoleFeignClientFallback.java new file mode 100644 index 00000000..51f50d29 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/resource/feign/fallback/RoleFeignClientFallback.java @@ -0,0 +1,46 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.resource.feign.fallback; + +import cn.cloudwalk.client.cwoscomponent.intelligent.resource.param.RoleAddParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.resource.param.RoleDeltParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.resource.param.RoleEditParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.resource.param.RoleGetsParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.resource.param.RoleResourceAddParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.resource.param.RoleResourceDelParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.resource.param.RoleResourceQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.resource.result.RoleDetailResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.resource.result.RoleResourceResult; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.resource.feign.RoleFeignClient; +import java.util.List; +import org.springframework.stereotype.Component; + +@Component +public class RoleFeignClientFallback implements RoleFeignClient { + public CloudwalkResult> gets(RoleGetsParam param) { + throw new RuntimeException("查询角色详情失败"); + } + + public CloudwalkResult add(RoleAddParam param) { + throw new RuntimeException("角色新增失败"); + } + + public CloudwalkResult> edit(RoleEditParam param) { + throw new RuntimeException("角色编辑失败"); + } + + public CloudwalkResult delete(RoleDeltParam param) { + throw new RuntimeException("角色删除失败"); + } + + public CloudwalkResult> resourceQuery(RoleResourceQueryParam param) { + throw new RuntimeException("角色查询失败"); + } + + public CloudwalkResult resourceDel(RoleResourceDelParam param) { + throw new RuntimeException("角色删除资源失败"); + } + + public CloudwalkResult resourceAdd(RoleResourceAddParam param) { + throw new RuntimeException("角色失败"); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/resource/service/RestLoginServiceImpl.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/resource/service/RestLoginServiceImpl.java new file mode 100644 index 00000000..451859a7 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/resource/service/RestLoginServiceImpl.java @@ -0,0 +1,23 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.resource.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.resource.param.ValidateLoginTokenParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.resource.result.ValidateLoginTokenResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.resource.service.LoginService; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.resource.feign.LoginFeignClient; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass; +import org.springframework.stereotype.Service; + +@Service +@ConditionalOnMissingClass({"cn.cloudwalk.service.cwoscomponent.intelligent.resource.service.LoginServiceImpl"}) +public class RestLoginServiceImpl implements LoginService { + @Autowired + private LoginFeignClient loginFeignClient; + + public CloudwalkResult validateLoginToken(ValidateLoginTokenParam param, + CloudwalkCallContext context) { + return this.loginFeignClient.validateLoginToken(param); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/resource/service/RestRoleServiceImpl.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/resource/service/RestRoleServiceImpl.java new file mode 100644 index 00000000..b376e0d9 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/resource/service/RestRoleServiceImpl.java @@ -0,0 +1,61 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.resource.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.resource.param.RoleAddParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.resource.param.RoleDeltParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.resource.param.RoleEditParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.resource.param.RoleGetsParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.resource.param.RoleResourceAddParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.resource.param.RoleResourceDelParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.resource.param.RoleResourceQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.resource.result.RoleDetailResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.resource.result.RoleResourceResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.resource.service.RoleService; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.resource.feign.RoleFeignClient; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass; +import org.springframework.stereotype.Service; + +@Service +@ConditionalOnMissingClass({"cn.cloudwalk.service.cwoscomponent.intelligent.resource.service.RoleServiceImpl"}) +public class RestRoleServiceImpl implements RoleService { + @Autowired + private RoleFeignClient roleFeignClient; + + public CloudwalkResult> gets(RoleGetsParam param, CloudwalkCallContext context) + throws ServiceException { + return this.roleFeignClient.gets(param); + } + + public CloudwalkResult add(RoleAddParam param, CloudwalkCallContext context) + throws ServiceException { + return this.roleFeignClient.add(param); + } + + public CloudwalkResult> edit(RoleEditParam param, CloudwalkCallContext context) + throws ServiceException { + return this.roleFeignClient.edit(param); + } + + public CloudwalkResult delete(RoleDeltParam param, CloudwalkCallContext context) throws ServiceException { + return this.roleFeignClient.delete(param); + } + + public CloudwalkResult> resourceQuery(RoleResourceQueryParam param, + CloudwalkCallContext context) throws ServiceException { + return this.roleFeignClient.resourceQuery(param); + } + + public CloudwalkResult resourceDel(RoleResourceDelParam param, CloudwalkCallContext context) + throws ServiceException { + return this.roleFeignClient.resourceDel(param); + } + + public CloudwalkResult resourceAdd(RoleResourceAddParam param, CloudwalkCallContext context) + throws ServiceException { + return this.roleFeignClient.resourceAdd(param); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/sysetting/feign/SysettingAreaFeignClient.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/sysetting/feign/SysettingAreaFeignClient.java new file mode 100644 index 00000000..88f56f34 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/sysetting/feign/SysettingAreaFeignClient.java @@ -0,0 +1,18 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.sysetting.feign; + +import cn.cloudwalk.client.cwoscomponent.intelligent.sysetting.param.DeviceAreaTreeParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.sysetting.result.AreaTreeResult; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.sysetting.feign.fallback.SysettingAreaFeignClientFallback; +import java.util.List; +import org.springframework.cloud.netflix.feign.FeignClient; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; + +@FeignClient(name = "${feign.ninca-common.name:ninca-common}", path = "/sysetting/deviceArea", + fallback = SysettingAreaFeignClientFallback.class) +public interface SysettingAreaFeignClient { + @RequestMapping(value = {"/tree"}, method = {RequestMethod.POST}) + CloudwalkResult> tree(@RequestBody DeviceAreaTreeParam paramDeviceAreaTreeParam); +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/sysetting/feign/fallback/SysettingAreaFeignClientFallback.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/sysetting/feign/fallback/SysettingAreaFeignClientFallback.java new file mode 100644 index 00000000..3a14c560 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/sysetting/feign/fallback/SysettingAreaFeignClientFallback.java @@ -0,0 +1,15 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.sysetting.feign.fallback; + +import cn.cloudwalk.client.cwoscomponent.intelligent.sysetting.param.DeviceAreaTreeParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.sysetting.result.AreaTreeResult; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.sysetting.feign.SysettingAreaFeignClient; +import java.util.List; +import org.springframework.stereotype.Component; + +@Component +public class SysettingAreaFeignClientFallback implements SysettingAreaFeignClient { + public CloudwalkResult> tree(DeviceAreaTreeParam param) { + throw new RuntimeException("查询设备区域树结构失败"); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/sysetting/service/RestSysettingAreaServiceImpl.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/sysetting/service/RestSysettingAreaServiceImpl.java new file mode 100644 index 00000000..d98648ec --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/sysetting/service/RestSysettingAreaServiceImpl.java @@ -0,0 +1,23 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.sysetting.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.sysetting.param.DeviceAreaTreeParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.sysetting.result.AreaTreeResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.sysetting.service.SysettingAreaService; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.sysetting.feign.SysettingAreaFeignClient; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass; +import org.springframework.stereotype.Service; + +@Service +@ConditionalOnMissingClass({"cn.cloudwalk.service.cwoscomponent.intelligent.resource.service.SysettingAreaServiceImpl"}) +public class RestSysettingAreaServiceImpl implements SysettingAreaService { + @Autowired + private SysettingAreaFeignClient sysettingAreaFeignClient; + + public CloudwalkResult> tree(DeviceAreaTreeParam param, CloudwalkCallContext context) { + return this.sysettingAreaFeignClient.tree(param); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/user/feign/UserFeignClient.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/user/feign/UserFeignClient.java new file mode 100644 index 00000000..7c1665c0 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/user/feign/UserFeignClient.java @@ -0,0 +1,31 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.user.feign; + +import cn.cloudwalk.client.cwoscomponent.intelligent.user.param.UserChangePwdParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.user.param.UserDetailParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.user.param.UserQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.user.result.UserAcountDetailResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.user.result.UserDetailResult; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.user.feign.fallback.UserFeignClientFallback; +import org.springframework.cloud.netflix.feign.FeignClient; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; + +@FeignClient(name = "${feign.cwos-portal.name:cwos-portal}", path = "/portal/user", + fallback = UserFeignClientFallback.class) +public interface UserFeignClient { + @RequestMapping(value = {"/detail"}, method = {RequestMethod.POST}) + CloudwalkResult detail(@RequestBody UserDetailParam paramUserDetailParam); + + @RequestMapping(value = {"/manage/detail"}, method = {RequestMethod.GET}) + CloudwalkResult detail(@RequestParam("userId") String paramString); + + @RequestMapping(value = {"/page"}, method = {RequestMethod.POST}) + CloudwalkResult> page(@RequestBody UserQueryParam paramUserQueryParam); + + @RequestMapping(value = {"/manage/changePwd"}, method = {RequestMethod.POST}) + CloudwalkResult changePwd(@RequestBody UserChangePwdParam paramUserChangePwdParam); +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/user/feign/fallback/UserFeignClientFallback.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/user/feign/fallback/UserFeignClientFallback.java new file mode 100644 index 00000000..5976440a --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/user/feign/fallback/UserFeignClientFallback.java @@ -0,0 +1,30 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.user.feign.fallback; + +import cn.cloudwalk.client.cwoscomponent.intelligent.user.param.UserChangePwdParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.user.param.UserDetailParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.user.param.UserQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.user.result.UserAcountDetailResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.user.result.UserDetailResult; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.user.feign.UserFeignClient; +import org.springframework.stereotype.Component; + +@Component +public class UserFeignClientFallback implements UserFeignClient { + public CloudwalkResult detail(UserDetailParam param) { + throw new RuntimeException("查询企业用户详情失败"); + } + + public CloudwalkResult detail(String userId) { + throw new RuntimeException("查询企业用户账户详情失败"); + } + + public CloudwalkResult> page(UserQueryParam param) { + throw new RuntimeException("分页查询企业用户账户失败"); + } + + public CloudwalkResult changePwd(UserChangePwdParam param) { + throw new RuntimeException("用户修改密码失败"); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/user/service/RestUserServiceImpl.java b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/user/service/RestUserServiceImpl.java new file mode 100644 index 00000000..c76fb419 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/java/cn/cloudwalk/rest/cwoscomponent/intelligent/user/service/RestUserServiceImpl.java @@ -0,0 +1,43 @@ +package cn.cloudwalk.rest.cwoscomponent.intelligent.user.service; + +import cn.cloudwalk.client.cwoscomponent.intelligent.user.param.UserChangePwdParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.user.param.UserDetailParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.user.param.UserQueryParam; +import cn.cloudwalk.client.cwoscomponent.intelligent.user.result.UserAcountDetailResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.user.result.UserDetailResult; +import cn.cloudwalk.client.cwoscomponent.intelligent.user.service.UserService; +import cn.cloudwalk.cloud.context.CloudwalkCallContext; +import cn.cloudwalk.cloud.exception.ServiceException; +import cn.cloudwalk.cloud.page.CloudwalkPageAble; +import cn.cloudwalk.cloud.result.CloudwalkResult; +import cn.cloudwalk.rest.cwoscomponent.intelligent.user.feign.UserFeignClient; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass; +import org.springframework.stereotype.Service; + +@Service +@ConditionalOnMissingClass({"cn.cloudwalk.service.cwoscomponent.intelligent.user.service.UserServiceImpl"}) +public class RestUserServiceImpl implements UserService { + @Autowired + private UserFeignClient userFeignClient; + + public CloudwalkResult detail(UserDetailParam param, CloudwalkCallContext context) + throws ServiceException { + return this.userFeignClient.detail(param); + } + + public CloudwalkResult detail(String userId, CloudwalkCallContext context) + throws ServiceException { + return this.userFeignClient.detail(userId); + } + + public CloudwalkResult> page(UserQueryParam param, CloudwalkCallContext context) + throws ServiceException { + return this.userFeignClient.page(param); + } + + public CloudwalkResult changePwd(UserChangePwdParam param, CloudwalkCallContext context) + throws ServiceException { + return this.userFeignClient.changePwd(param); + } +} diff --git a/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/resources/META-INF/MANIFEST.MF b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/resources/META-INF/MANIFEST.MF new file mode 100644 index 00000000..71460173 --- /dev/null +++ b/maven-intelligent-cwoscomponent/intelligent-cwoscomponent-rest/src/main/resources/META-INF/MANIFEST.MF @@ -0,0 +1,6 @@ +Manifest-Version: 1.0 +Archiver-Version: Plexus Archiver +Built-By: YCWB0304 +Created-By: Apache Maven 3.6.1 +Build-Jdk: 1.8.0_144 + diff --git a/maven-intelligent-cwoscomponent/pom.xml b/maven-intelligent-cwoscomponent/pom.xml new file mode 100644 index 00000000..f0968f5d --- /dev/null +++ b/maven-intelligent-cwoscomponent/pom.xml @@ -0,0 +1,153 @@ + + + 4.0.0 + + + org.springframework.boot + spring-boot-starter-parent + 2.1.18.RELEASE + + + + cn.cloudwalk.intelligent + intelligent-cwoscomponent-decompiled-reactor + 2.9.2-xinghewan + pom + intelligent-cwoscomponent (decompiled reactor) + 聚合反编译模块:interface → rest。原父 intelligent-cwoscomponent 缺失。 + + + intelligent-cwoscomponent-parent + intelligent-cwoscomponent-interface + intelligent-cwoscomponent-rest + + + + 1.8 + Greenwich.SR6 + 3.7.2-Brussels-SRX + 1.2.83 + + 2.2.0 + + http://192.168.3.12 + ${nexus.baseUrl}/repository/maven-public/ + 2.24.1 + ${project.basedir}/../docs/style/alibaba-eclipse-codestyle.xml + + + + + + org.springframework.cloud + spring-cloud-dependencies + ${spring-cloud.version} + pom + import + + + cn.cloudwalk.cloud + cloudwalk-common-result + ${cloudwalk.internal.version} + + + cn.cloudwalk.cloud + cloudwalk-common-service + ${cloudwalk.internal.version} + + + com.alibaba + fastjson + ${fastjson.version} + + + cn.cloudwalk + cloudwalk-device-sdk-protocol-entity + ${cloudwalk.device.sdk.version} + + + junit + junit + 4.12 + + + + + + + nexus-public + Nexus maven-public + ${nexus.public.repo} + + true + + + true + + + + + + + nexus-public-plugins + Nexus maven-public + ${nexus.public.repo} + + true + + + true + + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + 1.8 + 1.8 + UTF-8 + + + + net.revelc.code.formatter + formatter-maven-plugin + ${formatter.maven.plugin.version} + + ${alibaba.eclipse.codestyle.path} + LF + UTF-8 + + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.4.1 + + + enforce-jdk8 + + enforce + + + + + [1.8,1.9) + 与原始运行包一致须使用 JDK 8 启动 Maven;见 docs/build/ORIGINAL_BUILD_JDK.txt + + + + + + + + + diff --git a/maven-ninca-crk/ninca-crk-gpu-std/pom.xml b/maven-ninca-crk/ninca-crk-gpu-std/pom.xml new file mode 100644 index 00000000..21abfce1 --- /dev/null +++ b/maven-ninca-crk/ninca-crk-gpu-std/pom.xml @@ -0,0 +1,162 @@ + + + 4.0.0 + + + cn.cloudwalk.ninca + ninca-crk-decompiled-reactor + 1.0.0 + ../pom.xml + + + ninca-crk-gpu-std + 轻舟1.4版本【标准GPU服务器-出入口版】(源码与配置已迁入本模块 src) + + + ${project.basedir}/../../docs/style/alibaba-eclipse-codestyle.xml + + + + + cn.cloudwalk.ninca + ninca-crk-smart-attendance-web + ${ninca-crk-smart-attendance.version} + + + ninca-crk-access-control-interface + cn.cloudwalk.ninca + + + + + cn.cloudwalk.ninca + ninca-crk-visitor-management-web + ${ninca-crk-visitor-management.version} + + + ninca-crk-access-control-interface + cn.cloudwalk.ninca + + + cn.cloudwalk.intelligent + intelligent-cwoscomponent-rest + + + + + cn.cloudwalk.ninca + ninca-crk-access-control-web + ${ninca-crk-access-control.version} + + + cn.cloudwalk.cloud + cloudwalk-common-web + + + cn.cloudwalk.intelligent + intelligent-cwoscomponent-rest + + + + + cn.cloudwalk.ninca + ninca-crk-conference-attendance-web + ${ninca-crk-conference-attendance.version} + + + ninca-crk-access-control-interface + cn.cloudwalk.ninca + + + cn.cloudwalk.intelligent + intelligent-cwoscomponent-rest + + + + + cn.cloudwalk.intelligent + intelligent-cwoscomponent-rest + + + org.springframework.boot + spring-boot-starter-web + + + org.mybatis.spring.boot + mybatis-spring-boot-starter + + + cn.cloudwalk.cloud + cloudwalk-common-event + + + org.springframework.cloud + spring-cloud-starter-sleuth + + + org.springframework.boot + spring-boot-starter-actuator + + + io.micrometer + micrometer-registry-prometheus + + + io.micrometer + micrometer-spring-legacy + + + + + ninca-crk-std-backend-V2.9.1_20210630 + + + net.revelc.code.formatter + formatter-maven-plugin + + + org.springframework.boot + spring-boot-maven-plugin + 1.5.22.RELEASE + + + + repackage + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + ${java.version} + ${java.version} + + + + org.apache.maven.plugins + maven-deploy-plugin + 2.8.2 + + true + + + + + + + + nexus-releases + Nexus maven-releases + ${nexus.releases.repo} + + + nexus-snapshots + Nexus maven-snapshots + ${nexus.snapshots.repo} + + + diff --git a/maven-ninca-crk/ninca-crk-gpu-std/src/main/java/cn/cloudwalk/Application.java b/maven-ninca-crk/ninca-crk-gpu-std/src/main/java/cn/cloudwalk/Application.java new file mode 100644 index 00000000..43ef685b --- /dev/null +++ b/maven-ninca-crk/ninca-crk-gpu-std/src/main/java/cn/cloudwalk/Application.java @@ -0,0 +1,39 @@ +package cn.cloudwalk; + +import cn.cloudwalk.event.EnableCloudwalkEvent; +import com.github.pagehelper.autoconfigure.PageHelperAutoConfiguration; +import io.micrometer.core.instrument.MeterRegistry; +import io.micrometer.spring.autoconfigure.MeterRegistryCustomizer; +import org.mybatis.spring.annotation.MapperScan; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.boot.Banner; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.cloud.netflix.feign.EnableFeignClients; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.EnableAspectJAutoProxy; +import org.springframework.scheduling.annotation.EnableAsync; + +/** + * 轻舟标准 GPU 出入口聚合后端启动类。 + */ +@SpringBootApplication(exclude = {PageHelperAutoConfiguration.class}) +@EnableFeignClients +@MapperScan({"cn.cloudwalk.data.**.mapper", "cn.cloudwalk.task.data.mapper"}) +@EnableAsync +@EnableCloudwalkEvent +@EnableAspectJAutoProxy(exposeProxy = true) +public class Application { + public static void main(String[] args) { + System.out.println("[标准GPU服务器-出入口版]- 开始启动..."); + SpringApplication app = new SpringApplication(new Object[] {Application.class}); + app.setBannerMode(Banner.Mode.OFF); + app.run(args); + System.out.println("[标准GPU服务器-出入口版]- 启动完成..."); + } + + @Bean + MeterRegistryCustomizer configurer(@Value("${spring.application.name}") String applicationName) { + return meterRegistry -> meterRegistry.config().commonTags(new String[] {"application", applicationName}); + } +} diff --git a/maven-ninca-crk/ninca-crk-gpu-std/src/main/java/cn/cloudwalk/package-info.java b/maven-ninca-crk/ninca-crk-gpu-std/src/main/java/cn/cloudwalk/package-info.java new file mode 100644 index 00000000..91c19fc5 --- /dev/null +++ b/maven-ninca-crk/ninca-crk-gpu-std/src/main/java/cn/cloudwalk/package-info.java @@ -0,0 +1,6 @@ +/** + * 轻舟标准 GPU 出入口后端聚合启动入口({@link cn.cloudwalk.Application})所在包。 + *

+ * 业务子系统以依赖 JAR 形式引入,本包仅保留引导与少量装配代码;配置见 {@code classpath} 下 {@code application*.properties}。 + */ +package cn.cloudwalk; diff --git a/maven-ninca-crk/ninca-crk-gpu-std/src/main/resources/META-INF/MANIFEST.MF b/maven-ninca-crk/ninca-crk-gpu-std/src/main/resources/META-INF/MANIFEST.MF new file mode 100644 index 00000000..c07f5921 --- /dev/null +++ b/maven-ninca-crk/ninca-crk-gpu-std/src/main/resources/META-INF/MANIFEST.MF @@ -0,0 +1,9 @@ +Manifest-Version: 1.0 +Archiver-Version: Plexus Archiver +Built-By: YCKJ1467 +Start-Class: cn.cloudwalk.Application +Spring-Boot-Version: 1.3.3.RELEASE +Created-By: Apache Maven 3.8.4 +Build-Jdk: 1.8.0_161 +Main-Class: org.springframework.boot.loader.JarLauncher + diff --git a/maven-ninca-crk/ninca-crk-gpu-std/src/main/resources/application-access-control.properties b/maven-ninca-crk/ninca-crk-gpu-std/src/main/resources/application-access-control.properties new file mode 100644 index 00000000..1adbdc70 --- /dev/null +++ b/maven-ninca-crk/ninca-crk-gpu-std/src/main/resources/application-access-control.properties @@ -0,0 +1,68 @@ +# \u56FE\u7247\u524D\u7F00 +cloudwalk.access-control.common.cwos-pic-url=http://10.128.123.250/cwos-portal/portal/fileManager/imgByPath?path= + +# \u6570\u636E\u5E93sharding\u914D\u7F6E +spring.shardingsphere.sharding.tables.IT_ACS_RECOG_RECORD.actual-data-nodes=ds0.IT_ACS_RECOG_RECORD_$->{2020..2030} +spring.shardingsphere.sharding.tables.IT_ACS_RECOG_RECORD.table-strategy.standard.sharding-column=RECOGNITION_TIME +spring.shardingsphere.sharding.tables.IT_ACS_RECOG_RECORD.table-strategy.standard.precise-algorithm-class-name=cn.cloudwalk.data.ninca.accesscontrol.YearlyShardingAlgorithm +spring.shardingsphere.sharding.tables.IT_ACS_RECOG_RECORD.table-strategy.standard.range-algorithm-class-name=cn.cloudwalk.data.ninca.accesscontrol.YearlyShardingAlgorithm +spring.shardingsphere.sharding.tables.IT_ACS_OPEN_DOOR_RECORD.actual-data-nodes=ds0.IT_ACS_OPEN_DOOR_RECORD_$->{2020..2030} +spring.shardingsphere.sharding.tables.IT_ACS_OPEN_DOOR_RECORD.table-strategy.standard.sharding-column=RECOGNITION_TIME +spring.shardingsphere.sharding.tables.IT_ACS_OPEN_DOOR_RECORD.table-strategy.standard.precise-algorithm-class-name=cn.cloudwalk.data.ninca.accesscontrol.YearlyShardingAlgorithm +spring.shardingsphere.sharding.tables.IT_ACS_OPEN_DOOR_RECORD.table-strategy.standard.range-algorithm-class-name=cn.cloudwalk.data.ninca.accesscontrol.YearlyShardingAlgorithm +spring.shardingsphere.sharding.binding-tables=IT_ACS_OPEN_DOOR_RECORD,IT_ACS_RECOG_RECORD + +spring.shardingsphere.sharding.tables.VIEW_ACS_RECOG_OPEN_DOOR_RECORD.actual-data-nodes=ds0.VIEW_ACS_RECOG_OPEN_DOOR_RECORD_$->{2020..2030} +spring.shardingsphere.sharding.tables.VIEW_ACS_RECOG_OPEN_DOOR_RECORD.table-strategy.standard.sharding-column=RECOGNITION_TIME +spring.shardingsphere.sharding.tables.VIEW_ACS_RECOG_OPEN_DOOR_RECORD.table-strategy.standard.precise-algorithm-class-name=cn.cloudwalk.data.ninca.accesscontrol.YearlyShardingAlgorithm +spring.shardingsphere.sharding.tables.VIEW_ACS_RECOG_OPEN_DOOR_RECORD.table-strategy.standard.range-algorithm-class-name=cn.cloudwalk.data.ninca.accesscontrol.YearlyShardingAlgorithm + +# \u4EBA\u8138\u6293\u62CD\u8BC6\u522B\u9608\u503C +cloudwalk.access-control.common.device-atrr-map.ACS_FACE_REG_THRESHOLD=90.0 + +# \u4EBA\u8138\u6BD4\u5BF9\u67E5\u8BE2\u8FC7\u6EE4\u9608\u503C +cloudwalk.access-control.common.face-compare-THRESHOLD=80 + +# \u5B9A\u65F6\u4EFB\u52A1\u914D\u7F6E +cloudwalk.access-control.schedual.jobs.AcsRecordStatisticsByDayJob.name=AcsRecordStatisticsByDayJob +cloudwalk.access-control.schedual.jobs.AcsRecordStatisticsByDayJob.group=ACCESS-CONTROL_GROUP +cloudwalk.access-control.schedual.jobs.AcsRecordStatisticsByDayJob.executable-class=cn.cloudwalk.service.ninca.accesscontrol.common.job.executable.AcsRecordStatisticsByDayJob +cloudwalk.access-control.schedual.jobs.AcsRecordStatisticsByDayJob.description=AcsRecordStatisticsByDay job is starting......... +## \u6BCF\u5929\u51CC\u66680\u70B910\u5206\u6267\u884C +cloudwalk.access-control.schedual.jobs.AcsRecordStatisticsByDayJob.cron-expression=0 10 0 * * ? +cloudwalk.access-control.schedual.jobs.AcsRecordStatisticsByDayJob.priority=1 + +# \u5F00\u95E8\u8BB0\u5F55\u63A8\u9001\u5F00\u5173\uFF1Atrue-\u5F00\uFF1Bfalse-\u5173\u3002\u9ED8\u8BA4\u4E3A\u5173 +cloudwalk.access-control.common.publish-opendoor-switch=false +# \u5F00\u95E8\u8BB0\u5F55\u63A8\u9001serviceCode +cloudwalk.access-control.common.publish-opendoor-service-code=access-control + +# \u540E\u7AEF\u8BC6\u522B\u4E0B\u53D1\u5F00\u95E8\u6307\u4EE4\u76F8\u5173\u914D\u7F6E +# \u6293\u62CD\u65F6\u95F4\u5728\u591A\u4E45\u4E4B\u524D\u4E0D\u4E0B\u53D1\u5F00\u95E8\u6307\u4EE4\u3002\u9ED8\u8BA45\u5206\u949F\u3002\u5355\u4F4D\uFF1A\u6BEB\u79D2\u3002 +cloudwalk.access-control.common.face-capture-time-expired-milliseconds=300000 +# \u591A\u5C11\u6BEB\u79D2\u4EE5\u5185\u7684\u591A\u6761\u6293\u62CD\u8BB0\u5F55\u53EA\u4E0B\u53D1\u4E00\u6B21\u5F00\u95E8\u6307\u4EE4\u3002\u9ED8\u8BA43\u79D2\u3002\u5355\u4F4D\uFF1A\u6BEB\u79D2 +cloudwalk.access-control.common.face-capture-interval-milliseconds=3000 +# \u5F00\u95E8\u8BB0\u5F55\u8FC7\u671F\u65F6\u95F4\u3002\u591A\u5C11\u6BEB\u79D2\u4E4B\u540E\uFF0C\u672A\u4E0A\u62A5\u5F00\u95E8\u8BB0\u5F55\uFF0C\u5F00\u95E8\u8BB0\u5F55\u72B6\u6001\u66F4\u65B0\u4E3A\u5931\u8D25\u3002\u9ED8\u8BA410\u5206\u949F\u3002\u5355\u4F4D\uFF1A\u6BEB\u79D2 +cloudwalk.access-control.common.face-capture-open-door-fail-milliseconds=600000 + +# \u95E8\u7981\u63A7\u5236\u5668\u7C7B\u578B\u96C6\u5408 +cloudwalk.access-control.common.device-controller-array[0]=mqtt +# \u8BBE\u5907\u79CD\u7C7Bid\u96C6\u5408 +cloudwalk.access-control.common.device-category-array[0]=4 +cloudwalk.access-control.common.device-category-array[1]=5 +cloudwalk.access-control.common.device-category-array[2]=7 + +cloudwalk.access-control.common.device-category-array[3]=2 +cloudwalk.access-control.common.device-category-array[4]=8 +cloudwalk.access-control.common.device-category-array[5]=11 + +# \u7D27\u6025\u8BBE\u5907\u79CD\u7C7Bid\u96C6\u5408 +cloudwalk.access-control.common.device-query-type-array[0]=7 + +# \u95E8\u7981\u63A7\u5236\u5668\u7C7B\u578B\u96C6\u5408 +cloudwalk.access-control.common.device-acs-controller-array[0]=10 + +# \u626B\u7801\u5F00\u95E8url +cloudwalk.access-control.common.qrcode-open-door-url= +# \u4E0B\u8F7D\u8DEF\u5F84 +cloudwalk.access-control.common.downDir=download diff --git a/maven-ninca-crk/ninca-crk-gpu-std/src/main/resources/application-conference-attendance.properties b/maven-ninca-crk/ninca-crk-gpu-std/src/main/resources/application-conference-attendance.properties new file mode 100644 index 00000000..91589dbd --- /dev/null +++ b/maven-ninca-crk/ninca-crk-gpu-std/src/main/resources/application-conference-attendance.properties @@ -0,0 +1,6 @@ +# \u56FE\u7247\u524D\u7F00--\u5F85\u5B9A +cloudwalk.conference-attn.cwos-pic-url=http://10.128.123.250/cwos-portal/portal/fileManager/imgByPath?path= +cloudwalk.conference-attn.capture-device-threshold=90.0 + +cloudwalk.conference-attn.record-push=false +cloudwalk.conference-attn.record-push-service-code= \ No newline at end of file diff --git a/maven-ninca-crk/ninca-crk-gpu-std/src/main/resources/application-smart-attendance.properties b/maven-ninca-crk/ninca-crk-gpu-std/src/main/resources/application-smart-attendance.properties new file mode 100644 index 00000000..560afd29 --- /dev/null +++ b/maven-ninca-crk/ninca-crk-gpu-std/src/main/resources/application-smart-attendance.properties @@ -0,0 +1,37 @@ +# \u56FE\u7247\u524D\u7F00--\u5F85\u5B9A +cloudwalk.smart-attendance.cwos-pic-url=http://10.128.123.250/cwos-portal/portal/fileManager/imgByPath?path= +cloudwalk.smart-attendance.capture-device-threshold=90.0 + +#\u5206\u8868\u914D\u7F6E +spring.shardingsphere.sharding.tables.IT_ATTEND_RESULT.actual-data-nodes=ds0.IT_ATTEND_RESULT$->{0..99} +spring.shardingsphere.sharding.tables.IT_ATTEND_RESULT.table-strategy.standard.sharding-column=BUSINESS_ID +spring.shardingsphere.sharding.tables.IT_ATTEND_RESULT.table-strategy.standard.precise-algorithm-class-name=cn.cloudwalk.data.ninca.attendance.BusinessIdShardingAlgorithm +spring.shardingsphere.sharding.tables.IT_ATTEND_RECORD.actual-data-nodes=ds0.IT_ATTEND_RECORD$->{0..99} +spring.shardingsphere.sharding.tables.IT_ATTEND_RECORD.table-strategy.standard.sharding-column=BUSINESS_ID +spring.shardingsphere.sharding.tables.IT_ATTEND_RECORD.table-strategy.standard.precise-algorithm-class-name=cn.cloudwalk.data.ninca.attendance.BusinessIdShardingAlgorithm + +#\u5B9A\u65F6\u4EFB\u52A1\u914D\u7F6E +cloudwalk.smart-attendance.schedual.jobs.AttendResultJob.name=AttendResult-job +cloudwalk.smart-attendance.schedual.jobs.AttendResultJob.group=ATTEND_GROUP +cloudwalk.smart-attendance.schedual.jobs.AttendResultJob.executable-class=cn.cloudwalk.service.ninca.attendance.common.job.executable.AttendResultJob +cloudwalk.smart-attendance.schedual.jobs.AttendResultJob.description=attend result job is starting......... +cloudwalk.smart-attendance.schedual.jobs.AttendResultJob.cron-expression=0 1 0 * * ? +cloudwalk.smart-attendance.schedual.jobs.AttendResultJob.priority=1 + +cloudwalk.smart-attendance.schedual.jobs.AttendMonthReportJob.name=AttendMonthReport-job +cloudwalk.smart-attendance.schedual.jobs.AttendMonthReportJob.group=ATTEND_GROUP +cloudwalk.smart-attendance.schedual.jobs.AttendMonthReportJob.executable-class=cn.cloudwalk.service.ninca.attendance.common.job.executable.AttendMonthReportJob +cloudwalk.smart-attendance.schedual.jobs.AttendMonthReportJob.description=attend month report job is starting......... +cloudwalk.smart-attendance.schedual.jobs.AttendMonthReportJob.cron-expression=0 0 1 * * ? +cloudwalk.smart-attendance.schedual.jobs.AttendMonthReportJob.priority=1 + +cloudwalk.smart-attendance.schedual.jobs.AttendDayReport.name=AttendDayReport-job +cloudwalk.smart-attendance.schedual.jobs.AttendDayReport.group=ATTEND_GROUP +cloudwalk.smart-attendance.schedual.jobs.AttendDayReport.executable-class=cn.cloudwalk.service.ninca.attendance.common.job.executable.AttendDayReportJob +cloudwalk.smart-attendance.schedual.jobs.AttendDayReport.description=attend day report job is starting......... +cloudwalk.smart-attendance.schedual.jobs.AttendDayReport.cron-expression=0 0/5 * * * ? +cloudwalk.smart-attendance.schedual.jobs.AttendDayReport.priority=1 + +#\u63A8\u9001\u914D\u7F6E +cloudwalk.smart-attendance.record-push=false +cloudwalk.smart-attendance.record-push-service-code= \ No newline at end of file diff --git a/maven-ninca-crk/ninca-crk-gpu-std/src/main/resources/application-visitor-management.properties b/maven-ninca-crk/ninca-crk-gpu-std/src/main/resources/application-visitor-management.properties new file mode 100644 index 00000000..1e77eb72 --- /dev/null +++ b/maven-ninca-crk/ninca-crk-gpu-std/src/main/resources/application-visitor-management.properties @@ -0,0 +1,26 @@ + +# \u5B9A\u65F6\u4EFB\u52A1\u914D\u7F6E +cloudwalk.visitor-management.schedual.jobs.CleanGroupExpiredVisitorsJob.name=CleanGroupExpiredVisitorsJob +cloudwalk.visitor-management.schedual.jobs.CleanGroupExpiredVisitorsJob.group=VISITOR-MANAGEMENT +cloudwalk.visitor-management.schedual.jobs.CleanGroupExpiredVisitorsJob.executable-class=cn.cloudwalk.service.ninca.visitor.common.job.executable.CleanGroupExpiredVisitorsJob +cloudwalk.visitor-management.schedual.jobs.CleanGroupExpiredVisitorsJob.description=clean the visitor image datas in visitor group every minutes. +cloudwalk.visitor-management.schedual.jobs.CleanGroupExpiredVisitorsJob.cron-expression=0 0/1 * * * ? +cloudwalk.visitor-management.schedual.jobs.CleanGroupExpiredVisitorsJob.priority=1 + +# \u56FE\u7247\u538B\u7F29\u914D\u7F6E +cloudwalk.visitor-management.thumbnail.face.width=358 +cloudwalk.visitor-management.thumbnail.face.height=441 +cloudwalk.visitor-management.thumbnail.face.types[0]=jpg +cloudwalk.visitor-management.thumbnail.face.types[1]=jpeg +cloudwalk.visitor-management.thumbnail.face.types[2]=png +cloudwalk.visitor-management.thumbnail.face.types[3]=bmp + +# \u56FE\u7247\u524D\u7F00 +cloudwalk.visitor-management.common.cwos-file-path=http://10.128.123.250/cwos-portal/portal/fileManager/imgByPath?path= +# \u8BBF\u5BA2\u6293\u62CD\u8BC6\u522B\u9608\u503C +cloudwalk.visitor-management.common.face-capture-recog-threshold=90.0 + +# \u8BBF\u5BA2\u5230\u8BBF\u8BB0\u5F55\u63A8\u9001\u5F00\u5173 true:\u5F00 false:\u5173 \u9ED8\u8BA4\u5173 +cloudwalk.visitor-management.common.record-push=false +# \u8BBF\u5BA2\u5230\u8BBF\u8BB0\u5F55\u63A8\u9001serviceCode +cloudwalk.visitor-management.common.record-push-serviceCode=ISV_123456 \ No newline at end of file diff --git a/maven-ninca-crk/ninca-crk-gpu-std/src/main/resources/application.properties b/maven-ninca-crk/ninca-crk-gpu-std/src/main/resources/application.properties new file mode 100644 index 00000000..1c01742f --- /dev/null +++ b/maven-ninca-crk/ninca-crk-gpu-std/src/main/resources/application.properties @@ -0,0 +1,136 @@ +spring.profiles.active=smart-attendance,visitor-management,access-control,conference-attendance + +# spring\u914D\u7F6E +spring.mvc.throw-exception-if-no-handler-found=true +spring.mvc.locale=zh_CN +spring.messages.basename=smart-attendance,visitor-management,access-control,conference-attendance +spring.messages.always-use-message-format=true +spring.messages.encoding=utf-8 + +# http\u914D\u7F6E +spring.http.multipart.max-file-size=200MB +spring.http.multipart.max-request-size=200MB +spring.http.encoding.force=true +spring.http.encoding.charset=UTF-8 +spring.http.encoding.enabled=true + +# \u65E5\u5FD7\u914D\u7F6E +logging.level.root=info +logging.level.cn.cloudwalk=info +logging.path=logs +logging.file=${spring.application.name} +logging.config=classpath:logs/logback.xml + +# mybatis\u914D\u7F6E +mybatis.mapper-locations=classpath*:cn/cloudwalk/data/**/mysql/*.xml,classpath*:cn/cloudwalk/task/data/**/mysql/*.xml +mybatis.config-location=classpath:mapper/mybatis-config.xml + +# \u5E8F\u5217\u53F7\u914D\u7F6E +cloudwalk.serial.enable=true +cloudwalk.serial.serial-length=8 +cloudwalk.serial.serial-type=redis +cloudwalk.serial.serial-redis-key=NINCA-CRK-STD-SERIAL-KEY + +# \u7F13\u5B58\u914D\u7F6E +cloudwalk.spring.cache.expires=ApplicationIdsCache#21600,VisitorManagementApplicationIdsCache#21600,VistiorManagementDeviceDefaultCache#7200,VisitorManagementDeviceImageStoreCache#7200,VisitorManagementLableCache#7200,CACHE_NAME_APPLICATIONIDS#21600,ACS_DeviceTypesCache#7200,ACS_DeviceTypeFeaturesCache#7200,DeviceThresholdCache#30,ACS_DeviceAttrsCache#7200,CONFERENCE_ApplicationCache#3600,ACS_RecordStatisticsCache#90000,ACS_AreaTreeCache#60 + +# \u5206\u5E03\u5F0F\u9501\u914D\u7F6E +intelligent.lock.enable=true +intelligent.lock.config.default-wait-time=15000 +lockWatchdogTimeout=21000 + +# \u5185\u90E8\u63A5\u53E3\u8C03\u7528\u5BA2\u6237\u7AEF\u53CA\u8D85\u65F6\u914D\u7F6E +feign.hystrix.enable=true +feign.httpclient.enabled=false +feign.okhttp.enabled=true +ribbon.httpclient.enabled=false +ribbon.okhttp.enabled=true +ribbon.ReadTimeout=10000 +ribbon.ConnectTimeout=10000 +hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds=10000 + +# \u5065\u5EB7\u68C0\u67E5\u914D\u7F6E +management.health.redis.enabled=false +management.health.db.enabled=false + +# \u6570\u636E\u5E93\u8131\u654F\u914D\u7F6E +cloudwalk.datafield.enable=true +cloudwalk.datafield.securityKey=d4b2aabc97394a12a27fc3cca6cd9ba1 +cloudwalk.datafield.encrypt=AES + +# redis\u914D\u7F6E +spring.redis.host=10.128.123.108 +spring.redis.port=6379 +#spring.redis.password=1qaz!QAZ +spring.redis.database=5 +spring.redis.timeout=0 +spring.redis.pool.max-active=10 +spring.redis.pool.max-idle=1 +spring.redis.pool.max-wait=10 +spring.redis.pool.min-idle=0 + +# \u6570\u636E\u5E93sharding\u914D\u7F6E +spring.shardingsphere.datasource.names=ds0 +spring.shardingsphere.datasource.ds0.type=com.zaxxer.hikari.HikariDataSource +spring.shardingsphere.datasource.ds0.driver-class-name=com.mysql.jdbc.Driver +spring.shardingsphere.datasource.ds0.jdbc-url=jdbc:mysql://10.128.123.108:3306/ninca_crk_std?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&useSSL=false&allowMultiQueries=true +spring.shardingsphere.datasource.ds0.username=root +spring.shardingsphere.datasource.ds0.password=Cloudwalk@123 +spring.shardingsphere.datasource.ds0.connection-timeout=60000 +spring.shardingsphere.datasource.ds0.maximum-pool-size=20 +spring.shardingsphere.datasource.ds0.minimum-idle=5 +spring.shardingsphere.datasource.ds0.max-lifetime=1765000 +spring.shardingsphere.datasource.ds0.auto-commit=true +spring.shardingsphere.datasource.ds0.pool-name=ds0-pool +spring.shardingsphere.props.sql.show=false +spring.shardingsphere.sharding.default-data-source-name=ds0 + +# \u5B9A\u65F6\u4EFB\u52A1\u914D\u7F6E +quartz.driver=com.mysql.jdbc.Driver +quartz.url=jdbc:mysql://10.128.123.108:3306/ninca_crk_std?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&useSSL=false&allowMultiQueries=true +quartz.user=root +quartz.password=Cloudwalk@123 +quartz.max-connections=20 +quartz.scheduler-name=ninca-crk-task +quartz.strategy=local +quartz.clustered=true +quartz.tx-isolation-level-serializable=true +quartz.pool-type=druid + +# \u5FAE\u670D\u52A1\u670D\u52A1\u540D\u914D\u7F6E +feign.device.name=davinci-device-authentication +feign.resource.name=cwos-portal +feign.cwos-portal.name=cwos-portal +feign.portal.name=cwos-portal +feign.component-organization.name=ninca-common-component-organization +feign.davinci-portal.name=cwos-portal +feign.ninca-common.name=ninca-common +# \u6D88\u8D39\u4E8B\u4EF6\u914D\u7F6E +cloudwalk.event.bootstrap-servers=10.128.123.250:9092 +cloudwalk.event.group-id=crk_std +cloudwalk.event.handler-executor-config.core-pool-size=10 +cloudwalk.event.handler-executor-config.maximum-pool-size=30 + + +# \u76D1\u63A7\u4F7F\u7528\u5355\u72EC\u7684\u7AEF\u53E3\u4E0E\u670D\u52A1\u7AEF\u53E3\u9694\u79BB\uFF0C\u63D0\u9AD8\u5B89\u5168\u6027 +# Nginx\u9650\u5236\u6B64\u7AEF\u53E3\u7684\u5916\u7F51\u8BBF\u95EE\u6743\u9650 +management.port=16114 +# springboot2\u7684\u5065\u5EB7\u68C0\u67E5\u63A5\u53E3\u662F/actuator/health +# springboot1\u7684\u5065\u5EB7\u68C0\u67E5\u63A5\u53E3\u662F/health +# \u6B64\u914D\u7F6E\u53EF\u4EE5\u628A\u4E0A\u8FF0\u4E24\u4E2A\u7248\u672C\u7684\u5065\u5EB7\u68C0\u67E5\u63A5\u53E3\u7EDF\u4E00\u8BBE\u7F6E\u4E3A/actuator/health +# Nginx\u7981\u6B62\u5916\u7F51\u8BBF\u95EE\u4EE5/actuator\u5F00\u5934\u7684url +management.context-path=/actuator +# springboot1\u5F00\u542F\u7BA1\u7406\u63A5\u53E3\u7684\u8BBF\u95EE\u6743\u9650 +management.security.enabled=false +# \u5173\u95ED\u6240\u6709management\u63A5\u53E3 +endpoints.enabled=false +# \u5F00\u542F/actuator/info +endpoints.info.enabled=true +# \u5F00\u542F/actuator/health +endpoints.health.enabled=true +# \u5F00\u542F/actuator/prometheus +endpoints.prometheus.enabled=true +# \u6CE8\u518Cconsul\u65F6\u8BBE\u7F6E\u7EDF\u4E00\u7684\u5065\u5EB7\u68C0\u67E5\u5730\u5740 +spring.cloud.consul.discovery.health-check-path=${management.context-path}/health +# \u591A\u5B9E\u4F8B\u6CE8\u518Cmanagement\u670D\u52A1\u907F\u514D\u8986\u76D6\uFF0C\u8FD9\u662Fspringboot1.x\u5B58\u5728\u7684bug +spring.cloud.consul.discovery.management-suffix=${spring.cloud.client.ipAddress}-${server.port}-management diff --git a/maven-ninca-crk/ninca-crk-gpu-std/src/main/resources/bootstrap.properties b/maven-ninca-crk/ninca-crk-gpu-std/src/main/resources/bootstrap.properties new file mode 100644 index 00000000..8ba8ac25 --- /dev/null +++ b/maven-ninca-crk/ninca-crk-gpu-std/src/main/resources/bootstrap.properties @@ -0,0 +1,14 @@ +#\u670D\u52A1\u540D\u79F0\u548C\u7AEF\u53E3\u53F7 +spring.application.name=ninca-crk-std +server.port=16106 + +# consul\u914D\u7F6E +spring.cloud.consul.host=http://cwos-integration.cloudwalk.work +spring.cloud.consul.port=8500 +spring.cloud.consul.enabled=true +spring.cloud.consul.discovery.register=true +spring.cloud.consul.discovery.enabled=true +spring.cloud.consul.discovery.prefer-ip-address=true +spring.cloud.consul.discovery.instance-id=${spring.application.name}-${spring.cloud.client.ipAddress}:${server.port} +spring.cloud.consul.discovery.ip-address=${spring.cloud.client.ipAddress} +spring.cloud.consul.discovery.deregister=false \ No newline at end of file diff --git a/maven-ninca-crk/ninca-crk-gpu-std/src/main/resources/mapper/mybatis-config.xml b/maven-ninca-crk/ninca-crk-gpu-std/src/main/resources/mapper/mybatis-config.xml new file mode 100644 index 00000000..9c2886b8 --- /dev/null +++ b/maven-ninca-crk/ninca-crk-gpu-std/src/main/resources/mapper/mybatis-config.xml @@ -0,0 +1,10 @@ + + + + + + + + \ No newline at end of file diff --git a/maven-ninca-crk/pom.xml b/maven-ninca-crk/pom.xml new file mode 100644 index 00000000..971a7104 --- /dev/null +++ b/maven-ninca-crk/pom.xml @@ -0,0 +1,156 @@ + + + 4.0.0 + + + org.springframework.boot + spring-boot-starter-parent + 1.5.22.RELEASE + + + + cn.cloudwalk.ninca + ninca-crk-decompiled-reactor + 1.0.0 + pom + ninca-crk (decompiled reactor) + 独立聚合 ninca-crk-gpu-std。使用 Spring Boot 1.5.x 与 Edgware 以贴近原 spring-boot-maven-plugin 1.3 栈;其余 ninca 子构件需私服解析。 + + + ninca-crk-gpu-std + + + + 1.8 + Edgware.SR6 + 3.7.2-Brussels-SRX + 2.9.2-xinghewan + 2.9.1_210630-SNAPSHOT + 2.9.1_210630-SNAPSHOT + 2.9.1_210630-SNAPSHOT + 2.9.1_210630-SNAPSHOT + 1.3.5 + + http://192.168.3.12 + ${nexus.baseUrl}/repository/maven-public/ + ${nexus.baseUrl}/repository/maven-releases/ + ${nexus.baseUrl}/repository/maven-snapshots/ + 2.24.1 + ${project.basedir}/../docs/style/alibaba-eclipse-codestyle.xml + + + + + + org.mybatis.spring.boot + mybatis-spring-boot-starter + ${mybatis-spring-boot.version} + + + org.springframework.cloud + spring-cloud-dependencies + ${spring-cloud.version} + pom + import + + + cn.cloudwalk.intelligent + intelligent-cwoscomponent-rest + ${intelligent.cwoscomponent.rest.version} + + + cn.cloudwalk.cloud + cloudwalk-common-event + ${cloudwalk.internal.version} + + + io.micrometer + micrometer-registry-prometheus + 1.1.5 + + + io.micrometer + micrometer-spring-legacy + 1.1.5 + + + + + + + nexus-public + Nexus maven-public + ${nexus.public.repo} + + true + + + true + + + + + + + nexus-public-plugins + Nexus maven-public + ${nexus.public.repo} + + true + + + true + + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + 1.8 + 1.8 + UTF-8 + + + + net.revelc.code.formatter + formatter-maven-plugin + ${formatter.maven.plugin.version} + + ${alibaba.eclipse.codestyle.path} + LF + UTF-8 + + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.4.1 + + + enforce-jdk8 + + enforce + + + + + [1.8,1.9) + 与原始运行包一致须使用 JDK 8 启动 Maven;见 docs/build/ORIGINAL_BUILD_JDK.txt + + + + + + + + + diff --git a/maven-ninca-qk-alarm/ninca-qk-alarm-app-starter/pom.xml b/maven-ninca-qk-alarm/ninca-qk-alarm-app-starter/pom.xml new file mode 100644 index 00000000..f48ee741 --- /dev/null +++ b/maven-ninca-qk-alarm/ninca-qk-alarm-app-starter/pom.xml @@ -0,0 +1,103 @@ + + + 4.0.0 + + + cn.cloudwalk.ninca + ninca-qk-alarm-decompiled-reactor + 0.0.2-SNAPSHOT + ../pom.xml + + + ninca-qk-alarm-app-starter + jar + 区域控制应用服务-独立运行服务模块(可执行 JAR 反编译:业务源码在 BOOT-INF/classes,已迁入本模块 src) + + + ${project.basedir}/../../docs/style/alibaba-eclipse-codestyle.xml + + + + + org.springframework.boot + spring-boot-starter-actuator + + + org.apache.curator + curator-recipes + + + org.apache.curator + curator-client + + + org.apache.curator + curator-framework + + + org.apache.zookeeper + zookeeper + + + cn.cloudwalk.ninca + ninca-qk-alarm-app-web + + + cn.cloudwalk.ninca + ninca-qk-alarm-app-interface + + + cn.cloudwalk.cloud + cloudwalk-common-web + + + com.zaxxer + HikariCP + compile + + + mysql + mysql-connector-java + + + org.mybatis.spring.boot + mybatis-spring-boot-starter + + + org.springframework.boot + spring-boot-starter-test + test + + + com.h2database + h2 + test + + + + + + + net.revelc.code.formatter + formatter-maven-plugin + + + org.springframework.boot + spring-boot-maven-plugin + + + org.apache.maven.plugins + maven-compiler-plugin + + + org.jacoco + jacoco-maven-plugin + + + org.mybatis.generator + mybatis-generator-maven-plugin + + + + diff --git a/maven-ninca-qk-alarm/ninca-qk-alarm-app-starter/src/main/java/cn/cloudwalk/AlarmApplication.java b/maven-ninca-qk-alarm/ninca-qk-alarm-app-starter/src/main/java/cn/cloudwalk/AlarmApplication.java new file mode 100644 index 00000000..946661ef --- /dev/null +++ b/maven-ninca-qk-alarm/ninca-qk-alarm-app-starter/src/main/java/cn/cloudwalk/AlarmApplication.java @@ -0,0 +1,23 @@ +package cn.cloudwalk; + +import org.mybatis.spring.annotation.MapperScan; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.cloud.client.discovery.EnableDiscoveryClient; +import org.springframework.cloud.netflix.feign.EnableFeignClients; +import org.springframework.scheduling.annotation.EnableScheduling; + +/** + * 区域告警应用入口:启用 Feign、服务发现、调度与 MyBatis 扫描。 + */ +@MapperScan({"cn.cloudwalk.data.alarm.**.mapper"}) +@EnableFeignClients(basePackages = {"cn.cloudwalk"}) +@EnableDiscoveryClient +@SpringBootApplication +@EnableScheduling +public class AlarmApplication { + public static void main(String[] args) { + SpringApplication application = new SpringApplication(new Object[] {cn.cloudwalk.AlarmApplication.class}); + application.run(args); + } +} diff --git a/maven-ninca-qk-alarm/ninca-qk-alarm-app-starter/src/main/java/cn/cloudwalk/package-info.java b/maven-ninca-qk-alarm/ninca-qk-alarm-app-starter/src/main/java/cn/cloudwalk/package-info.java new file mode 100644 index 00000000..0571c2ea --- /dev/null +++ b/maven-ninca-qk-alarm/ninca-qk-alarm-app-starter/src/main/java/cn/cloudwalk/package-info.java @@ -0,0 +1,6 @@ +/** + * 区域告警(Qk Alarm)独立运行应用的 Spring Boot 启动入口包。 + *

+ * 可执行 JAR 反编译后,业务代码主要位于依赖模块;本包保留 {@link cn.cloudwalk.AlarmApplication} 与运行期配置资源。 + */ +package cn.cloudwalk; diff --git a/maven-ninca-qk-alarm/ninca-qk-alarm-app-starter/src/main/resources/META-INF/MANIFEST.MF b/maven-ninca-qk-alarm/ninca-qk-alarm-app-starter/src/main/resources/META-INF/MANIFEST.MF new file mode 100644 index 00000000..f15f10b4 --- /dev/null +++ b/maven-ninca-qk-alarm/ninca-qk-alarm-app-starter/src/main/resources/META-INF/MANIFEST.MF @@ -0,0 +1,12 @@ +Manifest-Version: 1.0 +Spring-Boot-Classpath-Index: BOOT-INF/classpath.idx +Archiver-Version: Plexus Archiver +Built-By: YCKJ1467 +Start-Class: cn.cloudwalk.AlarmApplication +Spring-Boot-Classes: BOOT-INF/classes/ +Spring-Boot-Lib: BOOT-INF/lib/ +Spring-Boot-Version: 2.3.1.RELEASE +Created-By: Apache Maven 3.8.4 +Build-Jdk: 1.8.0_161 +Main-Class: org.springframework.boot.loader.JarLauncher + diff --git a/maven-ninca-qk-alarm/ninca-qk-alarm-app-starter/src/main/resources/application.properties b/maven-ninca-qk-alarm/ninca-qk-alarm-app-starter/src/main/resources/application.properties new file mode 100644 index 00000000..b433b491 --- /dev/null +++ b/maven-ninca-qk-alarm/ninca-qk-alarm-app-starter/src/main/resources/application.properties @@ -0,0 +1,238 @@ +security.basic.enabled=false +cloudwalk.security.extendedUrl=/health,/**/*.html +spring.main.allow-bean-definition-overriding=true +# pagehelper properties +pagehelper.helper-dialect=mysql +pagehelper.reasonable=true +# \uFFFD\uFFFD\uFFFD\uFFFDinfo\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u05BE\uFFFD\u013C\uFFFD\uFFFD\uFFFD\u0421\uFFFD\uFFFD\uFFFD\uFFFD +logging.file.info.max-index=10 +logging.file.error.max-index=20 +# \uFFFD\uFFFD\u05BE\uFFFD\u013C\uFFFD\uFFFD\uFFFD\uFFFD\u00B7\uFFFD\uFFFD +logging.path=./logs +# \uFFFD\uFFFD\u04E1\uFFFD\uFFFD\uFFFD\uFFFD\u05BE\uFFFD\u023C\uFFFD +logging.level.root=info +logging.level.cn.cloudwalk=info +logging.level.cn.cloudwalk.web.alarm.statisc=error +# \uFFFD\u0336\uFFFD\u05B5\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u07B8\uFFFD +logging.config=classpath:log/logback.xml +# mysql config +mybatis.mapper-locations=classpath:cn/cloudwalk/data/**/mysql/*.xml +# database config +spring.datasource.username=root +spring.datasource.password=1qaz!QAZ +spring.datasource.driverClassName=com.mysql.jdbc.Driver +spring.datasource.url=jdbc:mysql://10.128.161.95/alarm_deploy?useSSL=false&characterEncoding=utf-8&serverTimezone=Asia/Shanghai +spring.datasource.druid.validation-query=SELECT 1 +spring.datasource.druid.test-while-idle=true +spring.datasource.druid.time-between-eviction-runs-millis=28000 +# kafka config +kafka.producer.bootstrap-servers=10.128.161.95:9092 +kafka.consumer.bootstrap-servers=10.128.161.95:9092 + +#spring redis config +spring.redis.host=10.128.161.95 +spring.redis.port=6379 +spring.redis.password=1qaz!QAZ +spring.redis.database=6 +spring.redis.timeout=1000 +spring.redis.pool.max-active=10 +spring.redis.pool.max-wait=-1 +spring.redis.pool.max-idle=10 +spring.redis.pool.min-idle=0 +spring.http.multipart.max-file-size=10MB +#ribbon timeout +ribbon.ReadTimeout=5000 +endpoints.jmx.enabled=false + +# ------------------------------------\uFFFD\uFFFD\u0635\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD------------------------------------------ +# \uFFFD\uFFFD\uFFFD\u02B9\uFFFD\u00F5\uFFFD\uFFFD\uFFFD\uFFFD\u0136\u02FF\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u02FF\u06B8\uFFFD\uFFFD\uB8EC\uFFFD\uFFFD\u07F0\uFFFD\u022B\uFFFD\uFFFD +# Nginx\uFFFD\uFFFD\uFFFD\u01B4\u02F6\u02FF\u06B5\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u0228\uFFFD\uFFFD +management.port=17211 +# springboot2\uFFFD\u013D\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u04FF\uFFFD\uFFFD\uFFFD/actuator/health +# springboot1\uFFFD\u013D\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u04FF\uFFFD\uFFFD\uFFFD/health +# \uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u00FF\uFFFD\uFFFD\u0530\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u6C7E\uFFFD\u013D\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u04FF\uFFFD\u0373\u04BB\uFFFD\uFFFD\uFFFD\uFFFD\u03AA/actuator/health + +# springboot1\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u04FF\u06B5\u0137\uFFFD\uFFFD\uFFFD\u0228\uFFFD\uFFFD +management.security.enabled=false +# \uFFFD\u0631\uFFFD\uFFFD\uFFFD\uFFFD\uFFFDmanagement\uFFFD\u04FF\uFFFD +endpoints.enabled=false +# \uFFFD\uFFFD\uFFFD\uFFFD/actuator/info +endpoints.info.enabled=true +# \uFFFD\uFFFD\uFFFD\uFFFD/actuator/health +endpoints.health.enabled=true +# \uFFFD\uFFFD\uFFFD\uFFFD/actuator/prometheus +endpoints.prometheus.enabled=true +# \u05E2\uFFFD\uFFFDconsul\u02B1\uFFFD\uFFFD\uFFFD\uFFFD\u0373\u04BB\uFFFD\u013D\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u05B7 +spring.cloud.consul.discovery.health-check-path=${management.context-path}/health +# \uFFFD\uFFFD\u02B5\uFFFD\uFFFD\u05E2\uFFFD\uFFFDmanagement\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u2E32\uFFFD\u01E3\uFFFD\uFFFD\uFFFD\uFFFD\uFFFDspringboot1.x\uFFFD\uFFFD\uFFFD\u06B5\uFFFDbug +spring.cloud.consul.discovery.management-suffix=${spring.cloud.client.ipAddress}-${server.port}-management +# Elasticsearch +# 9200\uFFFD\u02FF\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFDHTTP REST API\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFDElasticSearch\uFFFD\uFFFD\uFFFD\uFFFD9300\uFFFD\u02FF\uFFFD\uFFFD\u01F4\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u012C\uFFFD\u03F6\u02FF\uFFFD +elasticsearch.ip=10.128.161.95 +elasticsearch.port=9202 +elasticsearch.pool=5 +#\u05E2\uFFFD\uFFFDcluster.name\uFFFD\uFFFD\u04AA\uFFFD\uFFFDconfig/elasticsearch.yml\uFFFD\u0435\uFFFDcluster.name\u04BB\uFFFD\uFFFD +elasticsearch.cluster.name=my-application +# alarm level default config +cloudwalk.alarm-app.level.defalut.list[0].name=\u4E00\u7EA7\u62A5\u8B66 +cloudwalk.alarm-app.level.defalut.list[0].color=#F56C6C +cloudwalk.alarm-app.level.defalut.list[0].useDefaultSound=true +cloudwalk.alarm-app.level.defalut.list[0].uploadMessageCenter=0 +cloudwalk.alarm-app.level.defalut.list[1].name=\u4E8C\u7EA7\u62A5\u8B66 +cloudwalk.alarm-app.level.defalut.list[1].color=#FF8D62 +cloudwalk.alarm-app.level.defalut.list[1].useDefaultSound=true +cloudwalk.alarm-app.level.defalut.list[1].uploadMessageCenter=0 +cloudwalk.alarm-app.level.defalut.list[2].name=\u4E09\u7EA7\u62A5\u8B66 +cloudwalk.alarm-app.level.defalut.list[2].color=#FDB314 +cloudwalk.alarm-app.level.defalut.list[2].useDefaultSound=true +cloudwalk.alarm-app.level.defalut.list[2].uploadMessageCenter=0 +cloudwalk.alarm-app.level.defalut.list[3].name=\u56DB\u7EA7\u62A5\u8B66 +cloudwalk.alarm-app.level.defalut.list[3].color=#0075DA +cloudwalk.alarm-app.level.defalut.list[3].useDefaultSound=true +cloudwalk.alarm-app.level.defalut.list[3].uploadMessageCenter=0 +cloudwalk.alarm-app.level.defalut.list[4].name=\u4E94\u7EA7\u62A5\u8B66 +cloudwalk.alarm-app.level.defalut.list[4].color=#7A869A +cloudwalk.alarm-app.level.defalut.list[4].useDefaultSound=true +cloudwalk.alarm-app.level.defalut.list[4].uploadMessageCenter=0 +#is open gather and invade control type, true is open, false is close +cloudwalk.alarm-app.control.black=true +cloudwalk.alarm-app.control.stranger=false +cloudwalk.alarm-app.control.frequentStranger=false +cloudwalk.alarm-app.control.faceProperties=false +cloudwalk.alarm-app.control.bodyProperties=false +cloudwalk.alarm-app.control.plate=false +cloudwalk.alarm-app.control.gather=false +cloudwalk.alarm-app.control.invade=false +cloudwalk.alarm-app.control.groupCompare=false +cloudwalk.alarm-app.control.nonVehicle=false +cloudwalk.alarm-app.control.helmet=false +cloudwalk.alarm-app.control.batteryVehicle=false +cloudwalk.alarm-app.control.userDefined=false +# togather contrl type time-interval config +alarm.timeInterval=6 +# feign name +cloudwalk.alarm-app.feign.name.cwos-portal=cwos-portal +cloudwalk.alarm-app.feign.name.component-organization=ninca-common-component-organization +cloudwalk.alarm-app.feign.name.mqtt=cloudwalk-device-thirdparty +cloudwalk.alarm-app.feign.name.face-engine=cwos-portal +cloudwalk.alarm-app.tis.service-name=trtis_attribute_feature +cloudwalk.alarm-app.feign.name.ninca-common=ninca-common +cloudwalk.alarm-app.feign.name.common-vehicle=ninca-common-vehicle-app +cloudwalk.alarm-app.feign.name.cloudwalk-device-thirdparty=cloudwalk-device-thirdparty + +# alarm's service code on kafka and alarm's group id +cloudwalk.alarm-app.kafka.service-code=alarm-app +cloudwalk.alarm-app.kafka.consumer.group-id=alarm_systemwdd +cloudwalk.alarm-app.kafka.producer.sendrecord=true +# other system ips +cloudwalk.alarm-app.cwos.prefix=http://10.128.161.95:80/cwos-portal/portal/fileManager/imgByPath?path= +cloudwalk.alarm-app.cwos.relativePrefix=/cwos-portal/portal/fileManager/imgByPath?path= +cloudwalk.alarm-app.download.prefix=http://10.128.161.95 +# Therad pool config +cloudwalk.alarm-app.thread-config.core-pool-size=50 +cloudwalk.alarm-app.thread-config.max-pool-size=100 +cloudwalk.alarm-app.thread-config.queue-capacity=50 +cloudwalk.alarm-app.thread-config.keep-alive-seconds=60000 +cloudwalk.alarm-app.thread-config.thread-name-prefix=alarm- +# MySQL record retain days +cloudwalk.alarm-app.record-data.timer=0 0 1 ? * * +cloudwalk.alarm-app.record-data.dataKeepDays=90 +cloudwalk.alarm-app.record-data.nums=10000000 +cloudwalk.alarm-app.record-data.byPeriodRedisLockSeconds=2500 +cloudwalk.alarm-app.record-data.byNumRedisLockSeconds=240 +# download file +cloudwalk.alarm-app.download.downDir=download +cloudwalk.alarm-app.download.excelMaxRows=1000 +cloudwalk.alarm-app.download.exportAllCount=5000 +cloudwalk.alarm-app.download.shardingSize=10485760 +# cron of statistic data +cloudwalk.alarm-app.statistic.timer=0 0 2 * * ? +# cron of statistic data +cloudwalk.alarm-app.frequent-stranger.timer=0 0 2 * * ? +# cron of statistic data +cloudwalk.alarm-app.task-data-upd.timer=0 0/1 * * * ? +# cron of vehicle manage data +cloudwalk.alarm-app.vehicle.manage.timer=0 0/2 * * * ? +cloudwalk.alarm-app.syn.data.vehicleSize=100 +# cron of person0 manage data +cloudwalk.alarm-app.person.organization.timer=0 0/2 * * * ? +cloudwalk.alarm-app.syn.data.personSize=100 + + +# swagger\uFFFD\u01F7\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD +swagger.enable=true +# \uFFFD\uFFFD\u046F\uFFFD\u6FAF\u04B3\uFFFD\uFFFD\uFFFDURI +cloudwalk.alarm.display.url=http://localhost/sub-alarm-front#/alarmInformation/record +# elasticsearch\uFFFD\uFFFD\uFFFD\uFFFD +cloudwalk.alarm-app.elasticsearch.indexName=alarm_record +# \uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD +cloudwalk.alarm-app.feign.name.cluster=engine-clustering-face +cloudwalk.alarm-app.cluster.appId=system +cloudwalk.alarm-app.cluster.appSecret=12345 +# cron of getting surviving clients +cloudwalk.alarm-app.mqtt.surviveClientsTimer=1 * * * * ? +# allow client survive min times, seconds +cloudwalk.alarm-app.mqtt.surviveClientsStayTimes=120 +# vedio play time +cloudwalk.alarm.record-video.playtime=30 +cloudwalk.alarm.record-video.playEndTime=5 + +# \uFFFD\uEDEB\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u8C78\uFFFD\uFFFD\uFFFD\uFFFD +cloudwalk.alarm-app.deviceTypeCode.yfBoxTypeCode=0110,0112,0041 +# \uFFFD\uFFFD\uFFFD\u06FE\uFFFD\uFFFD\u8C78\uFFFD\uFFFD\uFFFD\uFFFDPALTE +cloudwalk.alarm-app.deviceTypeCode.bigEyeTypeCode=0029,1300c +# \uFFFD\uFFFD\u022B\u00F1\uFFFD\uFFFD\uFFFD\uFFFD +cloudwalk.alarm-app.deviceTypeCode.helmentTypeCode=0109,0112 +#mqtt\uFFFD\u8C78 +cloudwalk.alarm-app.deviceTypeCode.mqttTypeCode=mqtt,mqtt_iot +#mqtt\uFFFD\u8C78\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD +cloudwalk.alarm-app.mqtt.occur.topic=/NiRenIot/4E:21:05:13:10:72/user/get +cloudwalk.alarm-app.mqtt.occur.data=AT+STACH +cloudwalk.alarm-app.mqtt.occur.intervalTime=5 +# \uFFFD\uFFFD\u05A7\uFFFD\uFFFDROI\uFFFD\uFFFD\uFFFD\u00F5\uFFFD\uFFFD\u8C78\uFFFD\uFFFD\uFFFD\uFFFD +cloudwalk.alarm-app.deviceTypeCode.noRoiFlagTypeCode=0110,0112,0041 + + + +# face score config +cloudwalk.alarm-app.quality.filter.qualityScore=0.6 +cloudwalk.alarm-app.quality.filter.nonVehicleScore=0.6 +# \uFFFD\u01F7\uFFFD\uFFFD\uFFFD\u0225\uFFFD\u0639\uFFFD\uFFFD\uFFFD(0\uFFFD\uFFFD 1\uFFFD\uFFFD) +cloudwalk.alarm-app.quality.filter.removeDuplicateFlag=0 +# \uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u5862\uFFFD\uFFFD\uFFFD\uFFFD\u0225\uFFFD\uFFFD\uFFFD\uFFFD\u0427\uFFFD\uFFFD \uFFFD\uFFFD\u03BB:\uFFFD\uFFFD\uFFFD\uFFFD +cloudwalk.alarm-app.quality.filter.duplicateValidTime=1 +# \uFFFD\u01F7\uFFFD\u6D22\uFFFD\uFFFD\uFFFD\u00F5\uFFFD\u037C\u01AC +cloudwalk.snap.quality.filter.saveBetterFlag=1 + +# kafka\uFFFD\uFFFD\u02B1\uFFFD\uFFFD\uFFFD\u0471\uFFFD\uFFFD\uFFFD +# \uFFFD\u01F7\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u02B1\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD0\uFFFD\uFFFD1\uFFFD\u01E3\uFFFD +cloudwalk.snap.alarm.kafka.delayTimeFlag=1 +# \uFFFD\uFFFD\u02B1\u02B1\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD \uFFFD\uFFFD\u03BB \uFFFD\uFFFD\uFFFD\uFFFD +cloudwalk.snap.alarm.kafka.delayTime=30000 + +# \uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD +cloudwalk.snap-app.feign.name.cloudwalk-pineapple-manager=cloudwalk-pineapple-manager + +cloudwalk.threelevelcontroller.floor.oneFloor=1F +cloudwalk.threelevelcontroller.floor.clearTime=100 + +spring.kafka.bootstrap-servers=10.128.161.95:9092 +spring.kafka.consumer.group-id=123456 +spring.kafka.consumer.auto-commit-interval=30000 +spring.kafka.consumer.key-deserializer=org.apache.kafka.common.serialization.StringDeserializer +spring.kafka.consumer.value-deserializer=org.apache.kafka.common.serialization.StringDeserializer + +# \u67E5\u8BE2\u5E03\u63A7\u8BBE\u5907\u662F\u5426\u53EA\u8981rtsp\u8BBE\u5907 +isRtsp=true +# \u8BF7\u6C42\u94F6\u6CB3\u63A5\u53E3\u5730\u5740 +yinHe.api.address=10.128.161.95:20228 + + + +# ??Kafka???? +spring.kafka.second-bootstrap-servers=10.128.163.229:9092 +galaxy.seaweedfs=http://10.128.161.95:19333 +galaxy.businessId=2524639890ba4f2cba9ba1a4eeaa4015 + +# \u8f7b\u821f\u0073\u0065\u0061\u0077\u0065\u0065\u0064\u0066\u0073\u5730\u5740 +qingzhou.seaweedfs=http://10.0.22.104:19333 diff --git a/maven-ninca-qk-alarm/ninca-qk-alarm-app-starter/src/main/resources/bootstrap.properties b/maven-ninca-qk-alarm/ninca-qk-alarm-app-starter/src/main/resources/bootstrap.properties new file mode 100644 index 00000000..1c809289 --- /dev/null +++ b/maven-ninca-qk-alarm/ninca-qk-alarm-app-starter/src/main/resources/bootstrap.properties @@ -0,0 +1,21 @@ +# service name and port +spring.application.name=ninca-qk-alarm-app +server.port=17011 +# service center +#spring.cloud.consul.host=10.128.123.250 +spring.cloud.consul.host=10.128.161.95 +spring.cloud.consul.port=8500 +spring.cloud.consul.discovery.serviceName=${spring.application.name} +spring.cloud.consul.discovery.register=true +spring.cloud.consul.discovery.prefer-ip-address=true +spring.cloud.consul.discovery.port=${server.port} +spring.cloud.consul.discovery.instance-id=${spring.application.name}:${spring.cloud.client.ipAddress}:${server.port} +spring.cloud.consul.discovery.deregister=false +ribbon.eureka.enabled=true + +# Nginx\uFFFD\uFFFD\u05B9\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD/actuator\uFFFD\uFFFD\u0377\uFFFD\uFFFDurl +management.context-path=/actuator + + + + diff --git a/maven-ninca-qk-alarm/ninca-qk-alarm-app-starter/src/main/resources/log/logback.xml b/maven-ninca-qk-alarm/ninca-qk-alarm-app-starter/src/main/resources/log/logback.xml new file mode 100644 index 00000000..3807f9be --- /dev/null +++ b/maven-ninca-qk-alarm/ninca-qk-alarm-app-starter/src/main/resources/log/logback.xml @@ -0,0 +1,92 @@ + + + + + + + + + + + ${application-name} + + + + + + + + + + + + + + + + ${log_pattern} + utf8 + + + + + + ${file_path}/${application-name}.info.log + + ${log_pattern} + + + + ${file_name_prefix}.info.%i.log + + 1 + + ${info_file_index_max} + + + + + + 30MB + + + + + + + ${file_path}/${application-name}.error.log + + ${log_pattern} + + + + ${file_name_prefix}.error.%i.log + + 1 + + ${error_file_index_max} + + + + + + 30MB + + + ERROR + ACCEPT + DENY + + + + + + + + + + + \ No newline at end of file diff --git a/maven-ninca-qk-alarm/ninca-qk-alarm-app-starter/src/main/resources/sh/check-restart.sh b/maven-ninca-qk-alarm/ninca-qk-alarm-app-starter/src/main/resources/sh/check-restart.sh new file mode 100644 index 00000000..340e891a --- /dev/null +++ b/maven-ninca-qk-alarm/ninca-qk-alarm-app-starter/src/main/resources/sh/check-restart.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +systemctl restart ninca-qk-alarm-app.service diff --git a/maven-ninca-qk-alarm/pom.xml b/maven-ninca-qk-alarm/pom.xml new file mode 100644 index 00000000..c5a2bd50 --- /dev/null +++ b/maven-ninca-qk-alarm/pom.xml @@ -0,0 +1,168 @@ + + + 4.0.0 + + + org.springframework.boot + spring-boot-starter-parent + 2.1.18.RELEASE + + + + cn.cloudwalk.ninca + ninca-qk-alarm-decompiled-reactor + 0.0.2-SNAPSHOT + pom + ninca-qk-alarm-app (decompiled reactor) + 独立聚合 ninca-qk-alarm-app-starter。原父 ninca-qk-alarm-app 缺失,本工程补齐 dependencyManagement 与插件版本。 + + + ninca-qk-alarm-app-starter + + + + 1.8 + 3.7.2-Brussels-SRX + 4.2.0 + 3.4.14 + 2.0.1 + + http://192.168.3.12 + ${nexus.baseUrl}/repository/maven-public/ + 2.24.1 + ${project.basedir}/../docs/style/alibaba-eclipse-codestyle.xml + + + + + + org.apache.curator + curator-recipes + ${curator.version} + + + org.apache.curator + curator-client + ${curator.version} + + + org.apache.curator + curator-framework + ${curator.version} + + + org.apache.zookeeper + zookeeper + ${zookeeper.version} + + + org.mybatis.spring.boot + mybatis-spring-boot-starter + ${mybatis-spring-boot.version} + + + cn.cloudwalk.ninca + ninca-qk-alarm-app-web + ${project.version} + + + cn.cloudwalk.ninca + ninca-qk-alarm-app-interface + ${project.version} + + + cn.cloudwalk.cloud + cloudwalk-common-web + ${cloudwalk.internal.version} + + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + 1.8 + 1.8 + UTF-8 + + + + org.jacoco + jacoco-maven-plugin + 0.8.5 + + + org.mybatis.generator + mybatis-generator-maven-plugin + 1.3.7 + + + net.revelc.code.formatter + formatter-maven-plugin + ${formatter.maven.plugin.version} + + ${alibaba.eclipse.codestyle.path} + LF + UTF-8 + + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.4.1 + + + enforce-jdk8 + + enforce + + + + + [1.8,1.9) + 与原始运行包一致须使用 JDK 8 启动 Maven;见 docs/build/ORIGINAL_BUILD_JDK.txt + + + + + + + + + + + + nexus-public + Nexus maven-public + ${nexus.public.repo} + + true + + + true + + + + + + + nexus-public-plugins + Nexus maven-public + ${nexus.public.repo} + + true + + + true + + + +