From 23844ee4dd4111dd8faf6a8427a2bdc3154cbe7e Mon Sep 17 00:00:00 2001 From: zc Date: Fri, 27 Feb 2026 10:59:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../consume/mapper/DownRecordMapper.java | 23 - .../wms/admin/consume/mapper/GroupMapper.java | 14 - .../admin/consume/mapper/GroupUserMapper.java | 16 - .../consume/mapper/RechargeRecordMapper.java | 40 - .../admin/consume/mapper/RecordMapper.java | 40 - .../admin/consume/mapper/ReportMapper.java | 69 -- .../admin/consume/mapper/TenantMapper.java | 16 - .../consume/mapper/TimeIntervalMapper.java | 16 - .../mapstruct/RechargeRecordConvert.java | 58 - .../consume/mapstruct/RecordConvert.java | 8 - .../consume/model/entity/DownRecordDO.java | 54 - .../admin/consume/model/entity/GroupDO.java | 47 - .../consume/model/entity/GroupUserDO.java | 25 - .../model/entity/RechargeRecordDO.java | 114 -- .../admin/consume/model/entity/RecordDO.java | 155 --- .../admin/consume/model/entity/TenantDO.java | 93 -- .../consume/model/entity/TimeIntervalDO.java | 74 -- .../consume/model/query/DownRecordQuery.java | 66 - .../admin/consume/model/query/GroupQuery.java | 33 - .../model/query/RechargeRecordQuery.java | 58 - .../consume/model/query/RecordQuery.java | 84 -- .../consume/model/query/ReportQuery.java | 28 - .../consume/model/query/TenantQuery.java | 40 - .../model/query/TimeIntervalQuery.java | 41 - .../consume/model/req/DownRecordReq.java | 74 -- .../wms/admin/consume/model/req/GroupReq.java | 62 - .../model/req/PeopleDepositImportReq.java | 46 - .../model/req/PeopleDepositImportRowReq.java | 62 - .../consume/model/req/RechargeRecordReq.java | 100 -- .../admin/consume/model/req/RecordReq.java | 23 - .../admin/consume/model/req/TenantReq.java | 112 -- .../consume/model/req/TimeIntervalReq.java | 58 - .../consume/model/resp/DownRecordResp.java | 78 -- .../admin/consume/model/resp/GroupResp.java | 64 - .../resp/PeopleDepositImportParseResp.java | 53 - .../model/resp/RechargeRecordResp.java | 171 --- .../admin/consume/model/resp/RecordResp.java | 247 ---- .../admin/consume/model/resp/TenantResp.java | 120 -- .../consume/model/resp/TimeIntervalResp.java | 97 -- .../consume/model/resp/report/BaseReport.java | 73 -- .../model/resp/report/BranchReport.java | 20 - .../consume/model/resp/report/MealReport.java | 35 - .../model/resp/report/MerchantReport.java | 28 - .../model/resp/report/PeopleReport.java | 32 - .../consume/service/DownRecordService.java | 17 - .../admin/consume/service/GroupService.java | 14 - .../consume/service/GroupUserService.java | 8 - .../service/RechargeRecordService.java | 16 - .../admin/consume/service/RecordService.java | 14 - .../admin/consume/service/ReportService.java | 77 -- .../admin/consume/service/TenantService.java | 16 - .../consume/service/TimeIntervalService.java | 16 - .../service/impl/DownRecordServiceImpl.java | 57 - .../service/impl/GroupServiceImpl.java | 96 -- .../service/impl/GroupUserServiceImpl.java | 20 - .../impl/RechargeRecordServiceImpl.java | 72 -- .../service/impl/RecordServiceImpl.java | 74 -- .../service/impl/ReportServiceImpl.java | 129 -- .../service/impl/TenantServiceImpl.java | 25 - .../service/impl/TimeIntervalServiceImpl.java | 25 - .../equipment/mapper/EquipmentMapper.java | 16 - .../admin/equipment/mapper/ProductMapper.java | 12 - .../equipment/mapstruct/EquipmentConvert.java | 24 - .../equipment/mapstruct/ProductConvert.java | 20 - .../equipment/model/entity/EquipmentDO.java | 91 -- .../equipment/model/entity/ProductDO.java | 78 -- .../equipment/model/query/EquipmentQuery.java | 53 - .../equipment/model/query/ProductQuery.java | 47 - .../equipment/model/req/EquipmentReq.java | 142 --- .../admin/equipment/model/req/ProductReq.java | 105 -- .../model/resp/EquipmentDetailResp.java | 125 -- .../equipment/model/resp/EquipmentResp.java | 141 --- .../model/resp/ProductDetailResp.java | 105 -- .../equipment/model/resp/ProductResp.java | 102 -- .../equipment/service/EquipmentService.java | 27 - .../equipment/service/ProductService.java | 23 - .../service/impl/EquipmentServiceImpl.java | 119 -- .../service/impl/ProductServiceImpl.java | 47 - .../peopleBranch/mapper/BranchMapper.java | 21 - .../peopleBranch/mapper/BranchRuleMapper.java | 20 - .../peopleBranch/mapper/PeopleMapper.java | 60 - .../peopleBranch/mapstruct/BranchConvert.java | 18 - .../peopleBranch/mapstruct/PeopleConvert.java | 33 - .../peopleBranch/mapstruct/SexConverter.java | 55 - .../peopleBranch/model/entity/BranchDO.java | 81 -- .../model/entity/BranchRuleDO.java | 28 - .../peopleBranch/model/entity/PeopleDO.java | 148 --- .../peopleBranch/model/query/BranchQuery.java | 39 - .../peopleBranch/model/query/PeopleQuery.java | 111 -- .../peopleBranch/model/req/BranchReq.java | 69 -- .../model/req/PeopleImportReq.java | 51 - .../model/req/PeopleImportRowReq.java | 65 - .../peopleBranch/model/req/PeopleReq.java | 183 --- .../peopleBranch/model/resp/BranchResp.java | 114 -- .../model/resp/BranchRuleResp.java | 22 - .../model/resp/ConsumePeopleResp.java | 233 ---- .../model/resp/PeopleImportParseResp.java | 51 - .../model/resp/PeopleImportResp.java | 31 - .../peopleBranch/model/resp/PeopleResp.java | 237 ---- .../peopleBranch/service/BranchService.java | 35 - .../peopleBranch/service/PeopleService.java | 157 --- .../service/impl/BranchServiceImpl.java | 165 --- .../service/impl/PeopleServiceImpl.java | 1068 ----------------- .../mapper/PeopleDownMapper.java | 43 - .../mapstruct/PeopleDownConvert.java | 8 - .../model/entity/PeopleDownDO.java | 50 - .../model/query/PeopleDownQuery.java | 52 - .../model/req/PeopleDownReq.java | 84 -- .../model/resp/PeopleDownResp.java | 83 -- .../service/PeopleDownService.java | 26 - .../service/impl/PeopleDownServiceImpl.java | 131 -- .../rule/mapper/EmpowerRecordMapper.java | 28 - .../admin/rule/mapper/PeopleRecordMapper.java | 22 - .../top/wms/admin/rule/mapper/RuleMapper.java | 23 - .../wms/admin/rule/mapstruct/RuleConvert.java | 24 - .../rule/model/entity/EmpowerRecordDO.java | 63 - .../rule/model/entity/PeopleRecordDO.java | 165 --- .../wms/admin/rule/model/entity/RuleDO.java | 75 -- .../rule/model/query/EmpowerRecordQuery.java | 33 - .../rule/model/query/PeopleRecordQuery.java | 53 - .../wms/admin/rule/model/query/RuleQuery.java | 32 - .../rule/model/req/EmpowerRecordReq.java | 79 -- .../admin/rule/model/req/PeopleRecordReq.java | 198 --- .../top/wms/admin/rule/model/req/RuleReq.java | 141 --- .../model/resp/EmpowerRecordDetailResp.java | 114 -- .../rule/model/resp/EmpowerRecordResp.java | 107 -- .../model/resp/PeopleRecordDetailResp.java | 225 ---- .../rule/model/resp/PeopleRecordResp.java | 269 ----- .../wms/admin/rule/model/resp/RuleResp.java | 134 --- .../admin/rule/model/resp/YFPeopleResp.java | 54 - .../rule/service/EmpowerRecordService.java | 14 - .../rule/service/PeopleRecordService.java | 14 - .../wms/admin/rule/service/RuleService.java | 34 - .../impl/EmpowerRecordServiceImpl.java | 117 -- .../service/impl/PeopleRecordServiceImpl.java | 49 - .../rule/service/impl/RuleServiceImpl.java | 412 ------- .../wms/admin/space/mapper/PointMapper.java | 20 - .../wms/admin/space/mapper/SpaceMapper.java | 17 - .../admin/space/mapstruct/PointConvert.java | 18 - .../admin/space/mapstruct/SpaceConvert.java | 12 - .../wms/admin/space/model/entity/PointDO.java | 43 - .../wms/admin/space/model/entity/SpaceDO.java | 48 - .../admin/space/model/query/PointQuery.java | 35 - .../admin/space/model/query/SpaceQuery.java | 40 - .../wms/admin/space/model/req/PointReq.java | 54 - .../wms/admin/space/model/req/SpaceReq.java | 74 -- .../wms/admin/space/model/resp/PointResp.java | 66 - .../wms/admin/space/model/resp/SpaceResp.java | 68 -- .../wms/admin/space/service/PointService.java | 20 - .../wms/admin/space/service/SpaceService.java | 21 - .../space/service/impl/PointServiceImpl.java | 89 -- .../space/service/impl/SpaceServiceImpl.java | 49 - .../top/wms/admin/yfApi/domain/BackInfo.java | 81 -- .../wms/admin/yfApi/domain/BackResult.java | 35 - .../wms/admin/yfApi/domain/DingtalkCode.java | 22 - .../wms/admin/yfApi/domain/DingtalkMsgVo.java | 27 - .../wms/admin/yfApi/domain/EventResult.java | 22 - .../top/wms/admin/yfApi/domain/EwmInfo.java | 37 - .../top/wms/admin/yfApi/domain/HeartInfo.java | 52 - .../wms/admin/yfApi/domain/ICCardWhite.java | 40 - .../wms/admin/yfApi/domain/ICCheckCode.java | 62 - .../wms/admin/yfApi/domain/ICQueryCmd.java | 48 - .../yfApi/domain/ICQueryCmdPostData.java | 60 - .../top/wms/admin/yfApi/domain/Person.java | 96 -- .../top/wms/admin/yfApi/domain/QrCodeVo.java | 37 - .../top/wms/admin/yfApi/domain/RuleBody.java | 70 -- .../admin/yfApi/service/ISysYFService.java | 34 - .../admin/yfApi/service/IYFListenService.java | 24 - .../admin/yfApi/service/IYFPushService.java | 107 -- .../yfApi/service/impl/SysYFServiceImpl.java | 250 ---- .../service/impl/YFListenServiceImpl.java | 90 -- .../yfApi/service/impl/YFPushServiceImpl.java | 465 ------- .../main/resources/mapper/BranchMapper.xml | 18 - .../resources/mapper/BranchRuleMapper.xml | 15 - .../resources/mapper/DownRecordMapper.xml | 17 - .../resources/mapper/EmpowerRecordMapper.xml | 37 - .../src/main/resources/mapper/GroupMapper.xml | 4 - .../resources/mapper/PeopleDownMapper.xml | 67 -- .../mapper/PeopleEquipmentMapper.xml | 4 - .../main/resources/mapper/PeopleMapper.xml | 54 - .../resources/mapper/PeopleRecordMapper.xml | 16 - .../src/main/resources/mapper/PointMapper.xml | 26 - .../main/resources/mapper/ProductMapper.xml | 4 - .../resources/mapper/RechargeRecordMapper.xml | 48 - .../main/resources/mapper/RecordMapper.xml | 31 - .../main/resources/mapper/ReportMapper.xml | 205 ---- .../src/main/resources/mapper/RuleMapper.xml | 66 - .../src/main/resources/mapper/SpaceMapper.xml | 18 - .../main/resources/mapper/TenantMapper.xml | 4 - .../resources/mapper/TimeIntervalMapper.xml | 4 - .../controller/common/CommonController.java | 27 - .../consume/DownRecordController.java | 40 - .../controller/consume/GroupController.java | 26 - .../consume/RechargeRecordController.java | 26 - .../controller/consume/RecordController.java | 29 - .../controller/consume/ReportController.java | 73 -- .../controller/consume/TenantController.java | 30 - .../consume/TimeIntervalController.java | 30 - .../equipment/EquipmentController.java | 35 - .../equipment/PeopleEquipmentController.java | 26 - .../equipment/ProductController.java | 37 - .../peopleBranch/BranchController.java | 82 -- .../peopleBranch/PeopleController.java | 194 --- .../PeopleDownController.java | 38 - .../rule/EmpowerRecordController.java | 28 - .../rule/PeopleRecordController.java | 28 - .../admin/controller/rule/RuleController.java | 53 - .../controller/space/PointController.java | 24 - .../controller/space/SpaceController.java | 28 - .../controller/yfApi/YFListenController.java | 59 - 210 files changed, 14655 deletions(-) delete mode 100644 wms-module-system/src/main/java/top/wms/admin/consume/mapper/DownRecordMapper.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/consume/mapper/GroupMapper.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/consume/mapper/GroupUserMapper.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/consume/mapper/RechargeRecordMapper.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/consume/mapper/RecordMapper.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/consume/mapper/ReportMapper.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/consume/mapper/TenantMapper.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/consume/mapper/TimeIntervalMapper.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/consume/mapstruct/RechargeRecordConvert.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/consume/mapstruct/RecordConvert.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/consume/model/entity/DownRecordDO.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/consume/model/entity/GroupDO.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/consume/model/entity/GroupUserDO.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/consume/model/entity/RechargeRecordDO.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/consume/model/entity/RecordDO.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/consume/model/entity/TenantDO.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/consume/model/entity/TimeIntervalDO.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/consume/model/query/DownRecordQuery.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/consume/model/query/GroupQuery.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/consume/model/query/RechargeRecordQuery.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/consume/model/query/RecordQuery.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/consume/model/query/ReportQuery.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/consume/model/query/TenantQuery.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/consume/model/query/TimeIntervalQuery.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/consume/model/req/DownRecordReq.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/consume/model/req/GroupReq.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/consume/model/req/PeopleDepositImportReq.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/consume/model/req/PeopleDepositImportRowReq.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/consume/model/req/RechargeRecordReq.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/consume/model/req/RecordReq.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/consume/model/req/TenantReq.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/consume/model/req/TimeIntervalReq.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/consume/model/resp/DownRecordResp.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/consume/model/resp/GroupResp.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/consume/model/resp/PeopleDepositImportParseResp.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/consume/model/resp/RechargeRecordResp.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/consume/model/resp/RecordResp.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/consume/model/resp/TenantResp.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/consume/model/resp/TimeIntervalResp.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/consume/model/resp/report/BaseReport.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/consume/model/resp/report/BranchReport.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/consume/model/resp/report/MealReport.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/consume/model/resp/report/MerchantReport.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/consume/model/resp/report/PeopleReport.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/consume/service/DownRecordService.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/consume/service/GroupService.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/consume/service/GroupUserService.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/consume/service/RechargeRecordService.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/consume/service/RecordService.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/consume/service/ReportService.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/consume/service/TenantService.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/consume/service/TimeIntervalService.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/consume/service/impl/DownRecordServiceImpl.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/consume/service/impl/GroupServiceImpl.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/consume/service/impl/GroupUserServiceImpl.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/consume/service/impl/RechargeRecordServiceImpl.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/consume/service/impl/RecordServiceImpl.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/consume/service/impl/ReportServiceImpl.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/consume/service/impl/TenantServiceImpl.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/consume/service/impl/TimeIntervalServiceImpl.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/equipment/mapper/EquipmentMapper.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/equipment/mapper/ProductMapper.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/equipment/mapstruct/EquipmentConvert.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/equipment/mapstruct/ProductConvert.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/equipment/model/entity/EquipmentDO.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/equipment/model/entity/ProductDO.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/equipment/model/query/EquipmentQuery.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/equipment/model/query/ProductQuery.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/equipment/model/req/EquipmentReq.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/equipment/model/req/ProductReq.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/equipment/model/resp/EquipmentDetailResp.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/equipment/model/resp/EquipmentResp.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/equipment/model/resp/ProductDetailResp.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/equipment/model/resp/ProductResp.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/equipment/service/EquipmentService.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/equipment/service/ProductService.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/equipment/service/impl/EquipmentServiceImpl.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/equipment/service/impl/ProductServiceImpl.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/peopleBranch/mapper/BranchMapper.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/peopleBranch/mapper/BranchRuleMapper.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/peopleBranch/mapper/PeopleMapper.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/peopleBranch/mapstruct/BranchConvert.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/peopleBranch/mapstruct/PeopleConvert.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/peopleBranch/mapstruct/SexConverter.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/peopleBranch/model/entity/BranchDO.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/peopleBranch/model/entity/BranchRuleDO.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/peopleBranch/model/entity/PeopleDO.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/peopleBranch/model/query/BranchQuery.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/peopleBranch/model/query/PeopleQuery.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/peopleBranch/model/req/BranchReq.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/peopleBranch/model/req/PeopleImportReq.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/peopleBranch/model/req/PeopleImportRowReq.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/peopleBranch/model/req/PeopleReq.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/peopleBranch/model/resp/BranchResp.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/peopleBranch/model/resp/BranchRuleResp.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/peopleBranch/model/resp/ConsumePeopleResp.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/peopleBranch/model/resp/PeopleImportParseResp.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/peopleBranch/model/resp/PeopleImportResp.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/peopleBranch/model/resp/PeopleResp.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/peopleBranch/service/BranchService.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/peopleBranch/service/PeopleService.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/peopleBranch/service/impl/BranchServiceImpl.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/peopleBranch/service/impl/PeopleServiceImpl.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/peopleDownRecord/mapper/PeopleDownMapper.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/peopleDownRecord/mapstruct/PeopleDownConvert.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/peopleDownRecord/model/entity/PeopleDownDO.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/peopleDownRecord/model/query/PeopleDownQuery.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/peopleDownRecord/model/req/PeopleDownReq.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/peopleDownRecord/model/resp/PeopleDownResp.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/peopleDownRecord/service/PeopleDownService.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/peopleDownRecord/service/impl/PeopleDownServiceImpl.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/rule/mapper/EmpowerRecordMapper.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/rule/mapper/PeopleRecordMapper.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/rule/mapper/RuleMapper.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/rule/mapstruct/RuleConvert.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/rule/model/entity/EmpowerRecordDO.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/rule/model/entity/PeopleRecordDO.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/rule/model/entity/RuleDO.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/rule/model/query/EmpowerRecordQuery.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/rule/model/query/PeopleRecordQuery.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/rule/model/query/RuleQuery.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/rule/model/req/EmpowerRecordReq.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/rule/model/req/PeopleRecordReq.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/rule/model/req/RuleReq.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/rule/model/resp/EmpowerRecordDetailResp.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/rule/model/resp/EmpowerRecordResp.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/rule/model/resp/PeopleRecordDetailResp.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/rule/model/resp/PeopleRecordResp.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/rule/model/resp/RuleResp.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/rule/model/resp/YFPeopleResp.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/rule/service/EmpowerRecordService.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/rule/service/PeopleRecordService.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/rule/service/RuleService.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/rule/service/impl/EmpowerRecordServiceImpl.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/rule/service/impl/PeopleRecordServiceImpl.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/rule/service/impl/RuleServiceImpl.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/space/mapper/PointMapper.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/space/mapper/SpaceMapper.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/space/mapstruct/PointConvert.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/space/mapstruct/SpaceConvert.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/space/model/entity/PointDO.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/space/model/entity/SpaceDO.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/space/model/query/PointQuery.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/space/model/query/SpaceQuery.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/space/model/req/PointReq.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/space/model/req/SpaceReq.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/space/model/resp/PointResp.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/space/model/resp/SpaceResp.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/space/service/PointService.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/space/service/SpaceService.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/space/service/impl/PointServiceImpl.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/space/service/impl/SpaceServiceImpl.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/yfApi/domain/BackInfo.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/yfApi/domain/BackResult.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/yfApi/domain/DingtalkCode.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/yfApi/domain/DingtalkMsgVo.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/yfApi/domain/EventResult.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/yfApi/domain/EwmInfo.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/yfApi/domain/HeartInfo.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/yfApi/domain/ICCardWhite.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/yfApi/domain/ICCheckCode.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/yfApi/domain/ICQueryCmd.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/yfApi/domain/ICQueryCmdPostData.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/yfApi/domain/Person.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/yfApi/domain/QrCodeVo.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/yfApi/domain/RuleBody.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/yfApi/service/ISysYFService.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/yfApi/service/IYFListenService.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/yfApi/service/IYFPushService.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/yfApi/service/impl/SysYFServiceImpl.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/yfApi/service/impl/YFListenServiceImpl.java delete mode 100644 wms-module-system/src/main/java/top/wms/admin/yfApi/service/impl/YFPushServiceImpl.java delete mode 100644 wms-module-system/src/main/resources/mapper/BranchMapper.xml delete mode 100644 wms-module-system/src/main/resources/mapper/BranchRuleMapper.xml delete mode 100644 wms-module-system/src/main/resources/mapper/DownRecordMapper.xml delete mode 100644 wms-module-system/src/main/resources/mapper/EmpowerRecordMapper.xml delete mode 100644 wms-module-system/src/main/resources/mapper/GroupMapper.xml delete mode 100644 wms-module-system/src/main/resources/mapper/PeopleDownMapper.xml delete mode 100644 wms-module-system/src/main/resources/mapper/PeopleEquipmentMapper.xml delete mode 100644 wms-module-system/src/main/resources/mapper/PeopleMapper.xml delete mode 100644 wms-module-system/src/main/resources/mapper/PeopleRecordMapper.xml delete mode 100644 wms-module-system/src/main/resources/mapper/PointMapper.xml delete mode 100644 wms-module-system/src/main/resources/mapper/ProductMapper.xml delete mode 100644 wms-module-system/src/main/resources/mapper/RechargeRecordMapper.xml delete mode 100644 wms-module-system/src/main/resources/mapper/RecordMapper.xml delete mode 100644 wms-module-system/src/main/resources/mapper/ReportMapper.xml delete mode 100644 wms-module-system/src/main/resources/mapper/RuleMapper.xml delete mode 100644 wms-module-system/src/main/resources/mapper/SpaceMapper.xml delete mode 100644 wms-module-system/src/main/resources/mapper/TenantMapper.xml delete mode 100644 wms-module-system/src/main/resources/mapper/TimeIntervalMapper.xml delete mode 100644 wms-webapi/src/main/java/top/wms/admin/controller/consume/DownRecordController.java delete mode 100644 wms-webapi/src/main/java/top/wms/admin/controller/consume/GroupController.java delete mode 100644 wms-webapi/src/main/java/top/wms/admin/controller/consume/RechargeRecordController.java delete mode 100644 wms-webapi/src/main/java/top/wms/admin/controller/consume/RecordController.java delete mode 100644 wms-webapi/src/main/java/top/wms/admin/controller/consume/ReportController.java delete mode 100644 wms-webapi/src/main/java/top/wms/admin/controller/consume/TenantController.java delete mode 100644 wms-webapi/src/main/java/top/wms/admin/controller/consume/TimeIntervalController.java delete mode 100644 wms-webapi/src/main/java/top/wms/admin/controller/equipment/EquipmentController.java delete mode 100644 wms-webapi/src/main/java/top/wms/admin/controller/equipment/PeopleEquipmentController.java delete mode 100644 wms-webapi/src/main/java/top/wms/admin/controller/equipment/ProductController.java delete mode 100644 wms-webapi/src/main/java/top/wms/admin/controller/peopleBranch/BranchController.java delete mode 100644 wms-webapi/src/main/java/top/wms/admin/controller/peopleBranch/PeopleController.java delete mode 100644 wms-webapi/src/main/java/top/wms/admin/controller/peopleDownRecord/PeopleDownController.java delete mode 100644 wms-webapi/src/main/java/top/wms/admin/controller/rule/EmpowerRecordController.java delete mode 100644 wms-webapi/src/main/java/top/wms/admin/controller/rule/PeopleRecordController.java delete mode 100644 wms-webapi/src/main/java/top/wms/admin/controller/rule/RuleController.java delete mode 100644 wms-webapi/src/main/java/top/wms/admin/controller/space/PointController.java delete mode 100644 wms-webapi/src/main/java/top/wms/admin/controller/space/SpaceController.java delete mode 100644 wms-webapi/src/main/java/top/wms/admin/controller/yfApi/YFListenController.java diff --git a/wms-module-system/src/main/java/top/wms/admin/consume/mapper/DownRecordMapper.java b/wms-module-system/src/main/java/top/wms/admin/consume/mapper/DownRecordMapper.java deleted file mode 100644 index 251bf11..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/consume/mapper/DownRecordMapper.java +++ /dev/null @@ -1,23 +0,0 @@ -package top.wms.admin.consume.mapper; - -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.core.toolkit.Constants; -import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Repository; -import top.continew.starter.data.mp.base.BaseMapper; -import top.wms.admin.consume.model.entity.DownRecordDO; -import top.wms.admin.consume.model.resp.DownRecordResp; - -/** - * 消费下发记录 Mapper - * - * @author zc - * @since 2026/02/25 11:01 - */ -@Repository -public interface DownRecordMapper extends BaseMapper { - - IPage selectRecordsPage(@Param("page") IPage page, - @Param(Constants.WRAPPER) QueryWrapper queryWrapper); -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/consume/mapper/GroupMapper.java b/wms-module-system/src/main/java/top/wms/admin/consume/mapper/GroupMapper.java deleted file mode 100644 index d8e9dba..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/consume/mapper/GroupMapper.java +++ /dev/null @@ -1,14 +0,0 @@ -package top.wms.admin.consume.mapper; - -import top.continew.starter.data.mp.base.BaseMapper; -import top.wms.admin.consume.model.entity.GroupDO; -import org.springframework.stereotype.Repository; - -/** - * 消费组 Mapper - * - * @author zc - * @since 2026/01/27 13:48 - */ -@Repository -public interface GroupMapper extends BaseMapper {} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/consume/mapper/GroupUserMapper.java b/wms-module-system/src/main/java/top/wms/admin/consume/mapper/GroupUserMapper.java deleted file mode 100644 index 662db9d..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/consume/mapper/GroupUserMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package top.wms.admin.consume.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import org.springframework.stereotype.Repository; -import top.wms.admin.consume.model.entity.GroupUserDO; - -/** - * 消费组用户映射器 - * - * @author zc - * @since 2026/01/27 13:48 - */ -@Repository -public interface GroupUserMapper extends BaseMapper { - -} diff --git a/wms-module-system/src/main/java/top/wms/admin/consume/mapper/RechargeRecordMapper.java b/wms-module-system/src/main/java/top/wms/admin/consume/mapper/RechargeRecordMapper.java deleted file mode 100644 index 19d9db9..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/consume/mapper/RechargeRecordMapper.java +++ /dev/null @@ -1,40 +0,0 @@ -package top.wms.admin.consume.mapper; - -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.core.toolkit.Constants; -import org.apache.ibatis.annotations.Param; -import top.continew.starter.data.mp.base.BaseMapper; -import top.wms.admin.consume.model.entity.RechargeRecordDO; -import org.springframework.stereotype.Repository; -import top.wms.admin.consume.model.resp.RechargeRecordResp; - -import java.util.List; - -/** - * 充值记录 Mapper - * - * @author zc - * @since 2026/01/29 16:11 - */ -@Repository -public interface RechargeRecordMapper extends BaseMapper { - - /** - * 查询充值记录分页 - * - * @param page 分页查询条件 - * @param queryWrapper 查询条件 - * @return 分页信息 - */ - IPage selectRechargePage(@Param("page") IPage page, - @Param(Constants.WRAPPER) QueryWrapper queryWrapper); - - /** - * 导出充值记录 - * - * @param queryWrapper 查询条件 - * @return 充值记录列表 - */ - List selectExport(@Param(Constants.WRAPPER) QueryWrapper queryWrapper); -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/consume/mapper/RecordMapper.java b/wms-module-system/src/main/java/top/wms/admin/consume/mapper/RecordMapper.java deleted file mode 100644 index 8041969..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/consume/mapper/RecordMapper.java +++ /dev/null @@ -1,40 +0,0 @@ -package top.wms.admin.consume.mapper; - -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.core.toolkit.Constants; -import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Repository; -import top.continew.starter.data.mp.base.BaseMapper; -import top.wms.admin.consume.model.entity.RecordDO; -import top.wms.admin.consume.model.resp.RecordResp; - -import java.util.List; - -/** - * 消费记录 Mapper - * - * @author zc - * @since 2026/01/21 17:53 - */ -@Repository -public interface RecordMapper extends BaseMapper { - - /** - * 分页查询列表 - * - * @param page 分页查询条件 - * @param queryWrapper 查询条件 - * @return 分页信息 - */ - IPage selectRecordsPage(@Param("page") IPage page, - @Param(Constants.WRAPPER) QueryWrapper queryWrapper); - - /** - * 导出列表 - * - * @param queryWrapper 查询条件 - * @return 列表信息 - */ - List selectRecordsExport(@Param(Constants.WRAPPER) QueryWrapper queryWrapper); -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/consume/mapper/ReportMapper.java b/wms-module-system/src/main/java/top/wms/admin/consume/mapper/ReportMapper.java deleted file mode 100644 index e87ece9..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/consume/mapper/ReportMapper.java +++ /dev/null @@ -1,69 +0,0 @@ -package top.wms.admin.consume.mapper; - -import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Repository; -import top.wms.admin.consume.model.query.ReportQuery; -import top.wms.admin.consume.model.resp.report.*; - -import java.util.List; - -@Repository -public interface ReportMapper { - /** - * 查询商户报表 - * - * @param query 查询参数 - * @return 商户报表列表 - */ - List queryMerchantReport(ReportQuery query); - - /** - * 查询报表总价 - * - * @param query 查询参数 - * @return 报表列表总价 - */ - BaseReport totalReport(ReportQuery query); - - /** - * 查询餐段报表 - * - * @param query 查询参数 - * @return 餐段报表列表 - */ - List queryMealReport(ReportQuery query); - - /** - * 查询店铺报表 - * - * @param query 查询参数 - * @return 分店报表列表 - */ - List queryBranchReport(ReportQuery query); - - /** - * 查询人员报表 - * - * @param query 查询参数 - * @return 人员报表列表 - */ - List queryPeopleReport(@Param("query") ReportQuery query, - @Param("size") Integer size, - @Param("offset") Integer offset); - - /** - * 查询人员报表总数 - * - * @param query 查询参数 - * @return 人员报表总数 - */ - long selectCount(ReportQuery query); - - /** - * 查询人员报表导出数据 - * - * @param query 查询参数 - * @return 人员报表导出数据列表 - */ - List queryPeopleExport(ReportQuery query); -} diff --git a/wms-module-system/src/main/java/top/wms/admin/consume/mapper/TenantMapper.java b/wms-module-system/src/main/java/top/wms/admin/consume/mapper/TenantMapper.java deleted file mode 100644 index 951212b..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/consume/mapper/TenantMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package top.wms.admin.consume.mapper; - -import top.continew.starter.data.mp.base.BaseMapper; -import top.wms.admin.consume.model.entity.TenantDO; -import org.springframework.stereotype.Repository; - -/** - * 商户信息 Mapper - * - * @author zc - * @since 2026/01/30 14:55 - */ -@Repository -public interface TenantMapper extends BaseMapper { - -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/consume/mapper/TimeIntervalMapper.java b/wms-module-system/src/main/java/top/wms/admin/consume/mapper/TimeIntervalMapper.java deleted file mode 100644 index cb1dca3..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/consume/mapper/TimeIntervalMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package top.wms.admin.consume.mapper; - -import top.continew.starter.data.mp.base.BaseMapper; -import top.wms.admin.consume.model.entity.TimeIntervalDO; -import org.springframework.stereotype.Repository; - -/** - * 消费时段 Mapper - * - * @author zc - * @since 2026/01/30 14:56 - */ -@Repository -public interface TimeIntervalMapper extends BaseMapper { - -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/consume/mapstruct/RechargeRecordConvert.java b/wms-module-system/src/main/java/top/wms/admin/consume/mapstruct/RechargeRecordConvert.java deleted file mode 100644 index ac0ada9..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/consume/mapstruct/RechargeRecordConvert.java +++ /dev/null @@ -1,58 +0,0 @@ -package top.wms.admin.consume.mapstruct; - -import org.mapstruct.Mapper; -import org.mapstruct.Mapping; -import top.wms.admin.common.enums.ConsumeRechargeModeEnum; -import top.wms.admin.common.enums.ConsumeRechargeTypeEnum; -import top.wms.admin.common.enums.ConsumeRechargeWayEnum; -import top.wms.admin.consume.model.entity.RechargeRecordDO; -import top.wms.admin.consume.model.resp.RechargeRecordResp; - -import java.util.List; - -@Mapper(componentModel = "spring") -public interface RechargeRecordConvert { - - @Mapping(target = "rechargeWay", expression = "java(convertRechargeWay(recordDO.getRechargeWay()))") - @Mapping(target = "rechargeMode", expression = "java(convertRechargeMode(recordDO.getRechargeMode()))") - @Mapping(target = "rechargeType", expression = "java(convertRechargeType(recordDO.getRechargeType()))") - RechargeRecordResp toRecordResp(RechargeRecordDO recordDO); - - List ListToRecordResp(List recordDOS); - - default ConsumeRechargeWayEnum convertRechargeWay(Integer rechargeWay) { - if (rechargeWay == null) { - return null; - } - for (ConsumeRechargeWayEnum way : ConsumeRechargeWayEnum.values()) { - if (way.getValue().equals(rechargeWay)) { - return way; - } - } - return null; - } - - default ConsumeRechargeModeEnum convertRechargeMode(Integer rechargeMode) { - if (rechargeMode == null) { - return null; - } - for (ConsumeRechargeModeEnum way : ConsumeRechargeModeEnum.values()) { - if (way.getValue().equals(rechargeMode)) { - return way; - } - } - return null; - } - - default ConsumeRechargeTypeEnum convertRechargeType(Integer rechargeType) { - if (rechargeType == null) { - return null; - } - for (ConsumeRechargeTypeEnum way : ConsumeRechargeTypeEnum.values()) { - if (way.getValue().equals(rechargeType)) { - return way; - } - } - return null; - } -} diff --git a/wms-module-system/src/main/java/top/wms/admin/consume/mapstruct/RecordConvert.java b/wms-module-system/src/main/java/top/wms/admin/consume/mapstruct/RecordConvert.java deleted file mode 100644 index dbfdf4e..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/consume/mapstruct/RecordConvert.java +++ /dev/null @@ -1,8 +0,0 @@ -package top.wms.admin.consume.mapstruct; - -import org.mapstruct.Mapper; - -@Mapper(componentModel = "spring") -public interface RecordConvert { - -} diff --git a/wms-module-system/src/main/java/top/wms/admin/consume/model/entity/DownRecordDO.java b/wms-module-system/src/main/java/top/wms/admin/consume/model/entity/DownRecordDO.java deleted file mode 100644 index f1c1bd0..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/consume/model/entity/DownRecordDO.java +++ /dev/null @@ -1,54 +0,0 @@ -package top.wms.admin.consume.model.entity; - -import lombok.Data; - -import com.baomidou.mybatisplus.annotation.TableName; - -import top.wms.admin.common.model.entity.BaseDO; - -import java.io.Serial; -import java.time.*; - -/** - * 消费下发记录实体 - * - * @author zc - * @since 2026/02/25 11:01 - */ -@Data -@TableName("consume_down_record") -public class DownRecordDO extends BaseDO { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 设备ID - */ - private Long equipmentId; - - /** - * 人员ID - */ - private Long peopleId; - - /** - * 下发时间 - */ - private LocalDateTime downTime; - - /** - * 下发结果:0-成功,1-失败 - */ - private Integer downResult; - - /** - * 下发结果报文 - */ - private String msg; - - /** - * 0:新增 1:修改 2:下发 3:删除 - */ - private Integer operType; -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/consume/model/entity/GroupDO.java b/wms-module-system/src/main/java/top/wms/admin/consume/model/entity/GroupDO.java deleted file mode 100644 index 3d10377..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/consume/model/entity/GroupDO.java +++ /dev/null @@ -1,47 +0,0 @@ -package top.wms.admin.consume.model.entity; - -import com.baomidou.mybatisplus.annotation.TableName; -import lombok.Data; -import top.wms.admin.common.model.entity.BaseDO; - -import java.io.Serial; -import java.math.BigDecimal; - -/** - * 消费组实体 - * - * @author zc - * @since 2026/01/27 13:48 - */ -@Data -@TableName("consume_group") -public class GroupDO extends BaseDO { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 消费组名称 - */ - private String groupName; - - /** - * 补贴金额 - */ - private BigDecimal money; - - /** - * 部门ID - */ - private String branchId; - - /** - * 补贴日期(每月几号) - */ - private String subsidyDate; - - /** - * 是否补贴:0否,1是 - */ - private Integer timedConsumption; -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/consume/model/entity/GroupUserDO.java b/wms-module-system/src/main/java/top/wms/admin/consume/model/entity/GroupUserDO.java deleted file mode 100644 index 9cd2b6a..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/consume/model/entity/GroupUserDO.java +++ /dev/null @@ -1,25 +0,0 @@ -package top.wms.admin.consume.model.entity; - -import com.baomidou.mybatisplus.annotation.TableName; -import lombok.Data; - -/** - * 消费组用户关联表 - * - * @author zc - * @since 2026/01/27 13:48 - */ -@Data -@TableName("consume_group_user") -public class GroupUserDO { - - /** - * 消费组ID - */ - private Long groupId; - - /** - * 用户ID - */ - private Long userId; -} diff --git a/wms-module-system/src/main/java/top/wms/admin/consume/model/entity/RechargeRecordDO.java b/wms-module-system/src/main/java/top/wms/admin/consume/model/entity/RechargeRecordDO.java deleted file mode 100644 index 9480d6d..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/consume/model/entity/RechargeRecordDO.java +++ /dev/null @@ -1,114 +0,0 @@ -package top.wms.admin.consume.model.entity; - -import lombok.Data; - -import com.baomidou.mybatisplus.annotation.TableName; - -import top.wms.admin.common.model.entity.BaseDO; - -import java.io.Serial; -import java.time.*; -import java.math.BigDecimal; - -/** - * 充值记录实体 - * - * @author zc - * @since 2026/01/29 16:11 - */ -@Data -@TableName("consume_recharge_record") -public class RechargeRecordDO extends BaseDO { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 帐号people_id - */ - private Long accountId; - - /** - * 后面A表示工号,如果是B表示卡号 - */ - private String adminRecharge; - - /** - * 内部图片路径 - */ - private String base64; - - /** - * 消费金额,分 - */ - private BigDecimal consumeMoney; - - /** - * 折扣金额,分 - */ - private BigDecimal discountMoney; - - /** - * 工号 - */ - private String empId; - - /** - * 交易发起时间 - */ - private LocalDateTime startTime; - - /** - * 交易结束时间 - */ - private LocalDateTime endTime; - - /** - * 订单类型 - */ - private Integer orderType; - - /** - * 单号,支付宝和微信使用,平台单号 - */ - private String outTradeId; - - /** - * 支付类型:0人脸 1云卡 2刷卡 3支付宝 4微信 5取餐码 - */ - private Integer payMode; - - /** - * 交易状态 0在线消费 1离线消费 2超时 3消费异常,4异常消费 - */ - private Integer resultCode; - - /** - * 记录版本1考勤,2门禁,22人脸机消费,25人脸机充值 - */ - private Integer ver; - - /** - * 充值方式 0现金 1支付宝 2微信 3网银 - */ - private Integer rechargeMode; - - /** - * 充值来源 0平台 1手机 - */ - private Integer rechargeWay; - - /** - * 充值类型 0补贴 1充值 2退款 - */ - private Integer rechargeType; - /** - * 清除补贴金额,分 - */ - private BigDecimal clearBtje; - - /** - * 清除充值金额,分 - */ - private BigDecimal clearCzje; -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/consume/model/entity/RecordDO.java b/wms-module-system/src/main/java/top/wms/admin/consume/model/entity/RecordDO.java deleted file mode 100644 index c6942dc..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/consume/model/entity/RecordDO.java +++ /dev/null @@ -1,155 +0,0 @@ -package top.wms.admin.consume.model.entity; - -import lombok.Data; - -import com.baomidou.mybatisplus.annotation.TableName; - -import top.wms.admin.common.model.entity.BaseDO; - -import java.io.Serial; -import java.math.BigDecimal; -import java.time.*; - -/** - * 消费记录实体 - * - * @author zc - * @since 2026/01/21 17:53 - */ -@Data -@TableName("consume_record") -public class RecordDO extends BaseDO { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 记录版本1考勤,2门禁,22人脸机消费,25人脸机充值 - */ - private Integer ver; - - /** - * 工号 - */ - private String empId; - - /** - * 帐号 - */ - private Long accountId; - - /** - * 内部图片路径 - */ - private String base64; - - /** - * 消费方式:0单价 1定额 2时段模式 3计次 5点餐机模式 9身份模式 - */ - private Integer consumeType; - - /** - * 消费金额,分 - */ - private BigDecimal consumeMoney; - - /** - * 补贴消费金额,分 - */ - private BigDecimal subsidyMoney; - - /** - * 充值消费金额,分 - */ - private BigDecimal rechargeMoney; - - /** - * 折扣金额,分 - */ - private BigDecimal discountMoney; - - /** - * 单号,支付宝和微信使用,平台单号 - */ - private String outTradeId; - - /** - * 交易发起时间 - */ - private String startTime; - - /** - * 交易结束时间 - */ - private String endTime; - - /** - * 交易状态 0在线消费 1离线消费 2超时 3消费异常,4异常消费 - */ - private Integer resultCode; - - /** - * 支付类型:0人脸 1云卡 2刷卡 3支付宝 4微信 5取餐码 - */ - private Integer payMode; - - /** - * 订单类型 - */ - private Integer orderType; - - /** - * 钱包扣款模式:0先消费补贴再个人,1仅现金,2仅补贴 - */ - private Integer walletConsumeMode; - - /** - * 多个相似的人脸出现时返回工号,最多3个,分号隔开 - */ - private String likeId; - - /** - * 卡号 - */ - private String cardSn; - - /** - * 交易发起时间 - */ - private LocalDateTime startDate; - - /** - * 交易结束时间 - */ - private LocalDateTime endDate; - - /** - * 交易结果 - */ - private String consumeResult; - - /** - * 备注 - */ - private String remark; - - /** - * 设备ID - */ - private Long devId; - - /** - * 餐段ID - */ - private String timeId; - - /** - * 支付宝买家ID - */ - private String buyerId; - - /** - * 微信买家ID - */ - private String openid; -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/consume/model/entity/TenantDO.java b/wms-module-system/src/main/java/top/wms/admin/consume/model/entity/TenantDO.java deleted file mode 100644 index 64adabe..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/consume/model/entity/TenantDO.java +++ /dev/null @@ -1,93 +0,0 @@ -package top.wms.admin.consume.model.entity; - -import lombok.Data; - -import com.baomidou.mybatisplus.annotation.TableName; - -import top.wms.admin.common.model.entity.BaseDO; - -import java.io.Serial; - -/** - * 商户信息实体 - * - * @author zc - * @since 2026/01/30 14:55 - */ -@Data -@TableName("consume_tenant") -public class TenantDO extends BaseDO { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 商户名称 - */ - private String name; - - /** - * 商户类型 0支付宝 1微信 2支付宝+微信 3银行 - */ - private Integer type; - - /** - * 客户的appid - */ - private String zfbAppId; - - /** - * 服务商PID - */ - private String zfbSysServiceProviderId; - - /** - * 私有密钥 - */ - private String zfbRsaPrivateKey; - - /** - * 是否停用 - */ - private Long zfbStop; - - /** - * 是否测试模式 - */ - private Integer zfbMode; - - /** - * 公众号appid - */ - private String wxAppid; - - /** - * 服务商商户号 - */ - private String wxMchId; - - /** - * 特约商户号 - */ - private String wxSubMchId; - - /** - * 支付key - */ - private String wxKey; - - /** - * 是否停用 - */ - private Integer wxStop; - - /** - * 是否测试模式 - */ - private Integer wxMode; - - /** - * 平台参数ID - */ - private String paramId; -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/consume/model/entity/TimeIntervalDO.java b/wms-module-system/src/main/java/top/wms/admin/consume/model/entity/TimeIntervalDO.java deleted file mode 100644 index 086aa7c..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/consume/model/entity/TimeIntervalDO.java +++ /dev/null @@ -1,74 +0,0 @@ -package top.wms.admin.consume.model.entity; - -import lombok.Data; - -import com.baomidou.mybatisplus.annotation.TableName; - -import top.wms.admin.common.model.entity.BaseDO; - -import java.io.Serial; -import java.math.BigDecimal; - -/** - * 消费时段实体 - * - * @author zc - * @since 2026/01/30 14:56 - */ -@Data -@TableName("consume_time_interval") -public class TimeIntervalDO extends BaseDO { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 开始时间 - */ - private String startTime; - - /** - * 结束时间 - */ - private String endTime; - - /** - * 刷卡方式 00刷卡 01刷卡+密码 - */ - private String useMode; - - /** - * 消费餐段 0早餐 1中餐 2午餐 3夜餐 - */ - private Integer tmrtype; - - /** - * 预留 - */ - private String mark; - - /** - * 卡级别 - */ - private Integer level; - - /** - * 最大刷卡次数 - */ - private Integer maxcount; - - /** - * 定额方式下要扣的金额 - */ - private BigDecimal fixmoney; - - /** - * 消费方式 0单价 1定额 2时段模式 3计次 5点餐机模式 9身份模式 - */ - private Integer consumeType; - - /** - * 平台参数ID - */ - private String paramId; -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/consume/model/query/DownRecordQuery.java b/wms-module-system/src/main/java/top/wms/admin/consume/model/query/DownRecordQuery.java deleted file mode 100644 index 5f499ad..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/consume/model/query/DownRecordQuery.java +++ /dev/null @@ -1,66 +0,0 @@ -package top.wms.admin.consume.model.query; - -import cn.hutool.core.date.DatePattern; -import lombok.Data; - -import io.swagger.v3.oas.annotations.media.Schema; - -import org.springframework.format.annotation.DateTimeFormat; - -import java.io.Serial; -import java.io.Serializable; -import java.time.*; -import java.util.Date; - -/** - * 消费下发记录查询条件 - * - * @author zc - * @since 2026/02/25 11:01 - */ -@Data -@Schema(description = "消费下发记录查询条件") -public class DownRecordQuery implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 设备ID - */ - @Schema(description = "设备ID") - private Long equipmentId; - - /** - * 人员名称 - */ - @Schema(description = "人员名称") - private String peopleName; - - /** - * 下发时间开始 - */ - @Schema(description = "下发时间开始") - @DateTimeFormat(pattern = DatePattern.NORM_DATETIME_PATTERN) - private Date startTime; - - /** - * 下发时间结束 - */ - @Schema(description = "下发时间结束") - @DateTimeFormat(pattern = DatePattern.NORM_DATETIME_PATTERN) - private Date endTime; - - /** - * 下发结果:0-成功,1-失败 - */ - @Schema(description = "下发结果:0-成功,1-失败") - private Integer downResult; - - /** - * 0:新增 1:修改 2:下发 3:删除 - */ - @Schema(description = "0:新增 1:修改 2:下发 3:删除") - private Integer operType; - -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/consume/model/query/GroupQuery.java b/wms-module-system/src/main/java/top/wms/admin/consume/model/query/GroupQuery.java deleted file mode 100644 index b99dcc7..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/consume/model/query/GroupQuery.java +++ /dev/null @@ -1,33 +0,0 @@ -package top.wms.admin.consume.model.query; - -import lombok.Data; - -import io.swagger.v3.oas.annotations.media.Schema; - -import top.continew.starter.data.core.annotation.Query; -import top.continew.starter.data.core.enums.QueryType; - -import java.io.Serial; -import java.io.Serializable; -import java.time.*; - -/** - * 消费组查询条件 - * - * @author zc - * @since 2026/01/27 13:48 - */ -@Data -@Schema(description = "消费组查询条件") -public class GroupQuery implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 消费组名称 - */ - @Query(type = QueryType.LIKE) - private String groupName; - -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/consume/model/query/RechargeRecordQuery.java b/wms-module-system/src/main/java/top/wms/admin/consume/model/query/RechargeRecordQuery.java deleted file mode 100644 index d606801..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/consume/model/query/RechargeRecordQuery.java +++ /dev/null @@ -1,58 +0,0 @@ -package top.wms.admin.consume.model.query; - -import cn.hutool.core.date.DatePattern; -import lombok.Data; - -import io.swagger.v3.oas.annotations.media.Schema; - -import org.springframework.format.annotation.DateTimeFormat; - -import java.io.Serial; -import java.io.Serializable; -import java.util.Date; - -/** - * 充值记录查询条件 - * - * @author zc - * @since 2026/01/29 16:11 - */ -@Data -@Schema(description = "充值记录查询条件") -public class RechargeRecordQuery implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 帐号名称 - */ - @Schema(description = "帐号名称") - private String accountName; - - /** - * 工号 - */ - @Schema(description = "工号") - private String empId; - - /** - * 充值类型:0补贴 1充值 - */ - @Schema(description = "充值类型:0补贴 1充值 2退款") - private Integer rechargeType; - /** - * 开始时间 - */ - @Schema(description = "开始时间") - @DateTimeFormat(pattern = DatePattern.NORM_DATETIME_PATTERN) - private Date startTime; - - /** - * 结束时间 - */ - @Schema(description = "结束时间") - @DateTimeFormat(pattern = DatePattern.NORM_DATETIME_PATTERN) - private Date endTime; - -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/consume/model/query/RecordQuery.java b/wms-module-system/src/main/java/top/wms/admin/consume/model/query/RecordQuery.java deleted file mode 100644 index 873aded..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/consume/model/query/RecordQuery.java +++ /dev/null @@ -1,84 +0,0 @@ -package top.wms.admin.consume.model.query; - -import cn.hutool.core.date.DatePattern; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; -import org.springframework.format.annotation.DateTimeFormat; -import top.continew.starter.data.core.annotation.Query; -import top.continew.starter.data.core.enums.QueryType; - -import java.io.Serial; -import java.io.Serializable; -import java.util.Date; - -/** - * 消费记录查询条件 - * - * @author zc - * @since 2026/01/21 17:53 - */ -@Data -@Schema(description = "消费记录查询条件") -public class RecordQuery implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 工号 - */ - @Schema(description = "工号") - @Query(type = QueryType.EQ) - private String empId; - - /** - * 单号,支付宝和微信使用,平台单号 - */ - @Schema(description = "单号,支付宝和微信使用,平台单号") - @Query(type = QueryType.EQ) - private String outTradeId; - - /** - * 人员名称 - */ - @Schema(description = "人员名称") - private String accountName; - - /** - * 交易发起时间 - */ - @Schema(description = "交易发起时间") - @DateTimeFormat(pattern = DatePattern.NORM_DATETIME_PATTERN) - @Query(type = QueryType.GT) - private Date startDate; - - /** - * 交易结束时间 - */ - @Schema(description = "交易结束时间") - @DateTimeFormat(pattern = DatePattern.NORM_DATETIME_PATTERN) - @Query(type = QueryType.LT) - private Date endDate; - - /** - * 交易状态 0在线消费 1离线消费 2超时 3消费异常,4异常消费 - */ - @Schema(description = "交易状态 0在线消费 1离线消费 2超时 3消费异常,4异常消费") - @Query(type = QueryType.EQ) - private Integer resultCode; - - /** - * 支付类型:0人脸 1云卡 2刷卡 3支付宝 4微信 5取餐码 - */ - @Schema(description = "支付类型:0人脸 1云卡 2刷卡 3支付宝 4微信 5取餐码") - @Query(type = QueryType.EQ) - private Integer payMode; - - /** - * 设备ID - */ - @Schema(description = "设备ID") - @Query(type = QueryType.EQ) - private Long devId; - -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/consume/model/query/ReportQuery.java b/wms-module-system/src/main/java/top/wms/admin/consume/model/query/ReportQuery.java deleted file mode 100644 index c29f14e..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/consume/model/query/ReportQuery.java +++ /dev/null @@ -1,28 +0,0 @@ -package top.wms.admin.consume.model.query; - -import cn.hutool.core.date.DatePattern; -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.Size; -import lombok.Data; -import org.springframework.format.annotation.DateTimeFormat; - -import java.util.Date; -import java.util.List; - -@Data -@Schema(description = "报表查询条件") -public class ReportQuery { - - @Schema(description = "创建时间", example = "2023-08-08 00:00:00,2023-08-08 23:59:59") - @DateTimeFormat(pattern = DatePattern.NORM_DATETIME_PATTERN) - @Size(max = 2, message = "创建时间必须是一个范围") - private List createTime; - - private String branchId; - - private String peopleName; - - private String gh; - - private Integer tmrtype; -} diff --git a/wms-module-system/src/main/java/top/wms/admin/consume/model/query/TenantQuery.java b/wms-module-system/src/main/java/top/wms/admin/consume/model/query/TenantQuery.java deleted file mode 100644 index c74a84d..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/consume/model/query/TenantQuery.java +++ /dev/null @@ -1,40 +0,0 @@ -package top.wms.admin.consume.model.query; - -import lombok.Data; - -import io.swagger.v3.oas.annotations.media.Schema; - -import top.continew.starter.data.core.annotation.Query; -import top.continew.starter.data.core.enums.QueryType; - -import java.io.Serial; -import java.io.Serializable; -import java.time.*; - -/** - * 商户信息查询条件 - * - * @author zc - * @since 2026/01/30 14:55 - */ -@Data -@Schema(description = "商户信息查询条件") -public class TenantQuery implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 商户类型 0支付宝 1微信 2支付宝+微信 3银行 - */ - @Schema(description = "商户类型 0支付宝 1微信 2支付宝+微信 3银行") - @Query(type = QueryType.EQ) - private Integer type; - - /** - * 商户名称 - */ - @Schema(description = "商户名称") - @Query(type = QueryType.LIKE) - private String name; -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/consume/model/query/TimeIntervalQuery.java b/wms-module-system/src/main/java/top/wms/admin/consume/model/query/TimeIntervalQuery.java deleted file mode 100644 index ae42566..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/consume/model/query/TimeIntervalQuery.java +++ /dev/null @@ -1,41 +0,0 @@ -package top.wms.admin.consume.model.query; - -import lombok.Data; - -import io.swagger.v3.oas.annotations.media.Schema; - -import top.continew.starter.data.core.annotation.Query; -import top.continew.starter.data.core.enums.QueryType; - -import java.io.Serial; -import java.io.Serializable; -import java.time.*; - -/** - * 消费时段查询条件 - * - * @author zc - * @since 2026/01/30 14:56 - */ -@Data -@Schema(description = "消费时段查询条件") -public class TimeIntervalQuery implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 刷卡方式 00刷卡 01刷卡+密码 - */ - @Schema(description = "刷卡方式 00刷卡 01刷卡+密码") - @Query(type = QueryType.EQ) - private String useMode; - - /** - * 消费方式 0单价 1定额 2时段模式 3计次 5点餐机模式 9身份模式 - */ - @Schema(description = "消费方式 0单价 1定额 2时段模式 3计次 5点餐机模式 9身份模式") - @Query(type = QueryType.EQ) - private Integer consumeType; - -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/consume/model/req/DownRecordReq.java b/wms-module-system/src/main/java/top/wms/admin/consume/model/req/DownRecordReq.java deleted file mode 100644 index 000ef62..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/consume/model/req/DownRecordReq.java +++ /dev/null @@ -1,74 +0,0 @@ -package top.wms.admin.consume.model.req; - -import jakarta.validation.constraints.*; - -import lombok.Data; - -import io.swagger.v3.oas.annotations.media.Schema; - -import java.io.Serial; -import java.io.Serializable; -import java.time.*; - -/** - * 创建或修改消费下发记录参数 - * - * @author zc - * @since 2026/02/25 11:01 - */ -@Data -@Schema(description = "创建或修改消费下发记录参数") -public class DownRecordReq implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 设备ID - */ - @Schema(description = "设备ID") - @NotNull(message = "设备ID不能为空") - private Long equipmentId; - - /** - * 人员ID - */ - @Schema(description = "人员ID") - @NotNull(message = "人员ID不能为空") - private Long peopleId; - - /** - * 下发时间 - */ - @Schema(description = "下发时间") - @NotNull(message = "下发时间不能为空") - private LocalDateTime downTime; - - /** - * 下发结果:0-成功,1-失败 - */ - @Schema(description = "下发结果:0-成功,1-失败") - @NotNull(message = "下发结果:0-成功,1-失败不能为空") - private Integer downResult; - - /** - * 0:新增 1:修改 2:下发 3:删除 - */ - @Schema(description = "0:新增 1:修改 2:下发 3:删除") - @NotNull(message = "0:新增 1:修改 2:下发 3:删除不能为空") - private Integer operType; - - /** - * 创建人 - */ - @Schema(description = "创建人") - @NotNull(message = "创建人不能为空") - private Long createUser; - - /** - * 创建时间 - */ - @Schema(description = "创建时间") - @NotNull(message = "创建时间不能为空") - private LocalDateTime createTime; -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/consume/model/req/GroupReq.java b/wms-module-system/src/main/java/top/wms/admin/consume/model/req/GroupReq.java deleted file mode 100644 index 5dd7587..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/consume/model/req/GroupReq.java +++ /dev/null @@ -1,62 +0,0 @@ -package top.wms.admin.consume.model.req; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; -import org.hibernate.validator.constraints.Length; - -import java.io.Serial; -import java.io.Serializable; -import java.math.BigDecimal; -import java.util.List; - -/** - * 创建或修改消费组参数 - * - * @author zc - * @since 2026/01/27 13:48 - */ -@Data -@Schema(description = "创建或修改消费组参数") -public class GroupReq implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 消费组名称 - */ - @Schema(description = "消费组名称") - @Length(max = 64, message = "消费组名称长度不能超过64个字符") - private String groupName; - - /** - * 补贴金额 - */ - @Schema(description = "补贴金额") - private BigDecimal money; - - /** - * 补贴日期(每月几号) - */ - @Schema(description = "补贴日期(每月几号)") - private String subsidyDate; - - /** - * 是否补贴:0否,1是 - */ - @Schema(description = "是否补贴:0否,1是") - private Integer timedConsumption; - - /** - * 人员ids - */ - @Schema(description = "人员ids") - private List peopleIds; - - /** - * 部门id - */ - @Schema(description = "部门id") - private String branchId; - -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/consume/model/req/PeopleDepositImportReq.java b/wms-module-system/src/main/java/top/wms/admin/consume/model/req/PeopleDepositImportReq.java deleted file mode 100644 index 6b2089a..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/consume/model/req/PeopleDepositImportReq.java +++ /dev/null @@ -1,46 +0,0 @@ -package top.wms.admin.consume.model.req; - -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.NotNull; -import lombok.Data; -import top.wms.admin.system.enums.ImportPolicyEnum; - -import java.io.Serial; -import java.io.Serializable; - -/** - * 人员充值导入参数 - * - * @author zc - * @since 2024-6-17 16:42 - */ -@Data -@Schema(description = "人员充值导入参数") -public class PeopleDepositImportReq implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 导入会话KEY - */ - @Schema(description = "导入会话KEY", example = "1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed") - @NotBlank(message = "导入已过期,请重新上传") - private String importKey; - - /** - * 用户重复策略 - */ - @Schema(description = "人员不存在策略", example = "1") - @NotNull(message = "人员不存在策略不能为空") - private ImportPolicyEnum peopleNotExist; - - /** - * 消费未启用策略 - */ - @Schema(description = "消费未启用策略", example = "1") - @NotNull(message = "消费未启用策略不能为空") - private ImportPolicyEnum consumeNotEnable; - -} diff --git a/wms-module-system/src/main/java/top/wms/admin/consume/model/req/PeopleDepositImportRowReq.java b/wms-module-system/src/main/java/top/wms/admin/consume/model/req/PeopleDepositImportRowReq.java deleted file mode 100644 index d523cb5..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/consume/model/req/PeopleDepositImportRowReq.java +++ /dev/null @@ -1,62 +0,0 @@ -package top.wms.admin.consume.model.req; - -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.Pattern; -import lombok.Data; -import top.wms.admin.common.constant.RegexConstants; - -import java.io.Serial; -import java.io.Serializable; - -/** - * 人员充值导入行数据 - * - * @author Kils - * @since 2024-6-17 16:42 - */ -@Data -@Schema(description = "人员充值导入行数据") -public class PeopleDepositImportRowReq implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 用户名 - */ - private String peopleName; - - /** - * 工号 - */ - @NotBlank(message = "工号不能为空") - private String gh; - - /** - * 充值金额 - */ - @NotBlank(message = "充值金额不能为空") - @Pattern(regexp = RegexConstants.MONEY, message = "充值金额必须为数字") - private String czje; - - /** - * 补贴金额 - */ - @NotBlank(message = "补贴金额不能为空") - @Pattern(regexp = RegexConstants.MONEY, message = "补贴金额必须为数字") - private String btje; - - /** - * 是否启用消费 - */ - @NotBlank(message = "是否启用消费不能为空") - private String isConsume; - - /** - * 是否冻结 - */ - @NotBlank(message = "是否冻结不能为空") - private String freeze; - -} diff --git a/wms-module-system/src/main/java/top/wms/admin/consume/model/req/RechargeRecordReq.java b/wms-module-system/src/main/java/top/wms/admin/consume/model/req/RechargeRecordReq.java deleted file mode 100644 index 3e07540..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/consume/model/req/RechargeRecordReq.java +++ /dev/null @@ -1,100 +0,0 @@ -package top.wms.admin.consume.model.req; - -import lombok.Data; - -import io.swagger.v3.oas.annotations.media.Schema; - -import org.hibernate.validator.constraints.Length; - -import java.io.Serial; -import java.io.Serializable; -import java.math.BigDecimal; - -/** - * 创建或修改充值记录参数 - * - * @author zc - * @since 2026/01/29 16:11 - */ -@Data -@Schema(description = "创建或修改充值记录参数") -public class RechargeRecordReq implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 帐号people_id - */ - @Schema(description = "帐号people_id") - private Long accountId; - - /** - * 后面A表示工号,如果是B表示卡号 - */ - @Schema(description = "后面A表示工号,如果是B表示卡号") - @Length(max = 50, message = "后面A表示工号,如果是B表示卡号长度不能超过 {max} 个字符") - private String adminRecharge; - - /** - * 消费金额,分 - */ - @Schema(description = "消费金额,分") - private BigDecimal consumeMoney; - - /** - * 折扣金额,分 - */ - @Schema(description = "折扣金额,分") - private BigDecimal discountMoney; - - /** - * 工号 - */ - @Schema(description = "工号") - @Length(max = 50, message = "工号长度不能超过 {max} 个字符") - private String empId; - - /** - * 订单类型 - */ - @Schema(description = "订单类型") - private Integer orderType; - - /** - * 单号,支付宝和微信使用,平台单号 - */ - @Schema(description = "单号,支付宝和微信使用,平台单号") - @Length(max = 50, message = "单号,支付宝和微信使用,平台单号长度不能超过 {max} 个字符") - private String outTradeId; - - /** - * 支付类型:0人脸 1云卡 2刷卡 3支付宝 4微信 5取餐码 - */ - @Schema(description = "支付类型:0人脸 1云卡 2刷卡 3支付宝 4微信 5取餐码") - private Integer payMode; - - /** - * 交易状态 0在线消费 1离线消费 2超时 3消费异常,4异常消费 - */ - @Schema(description = "交易状态 0在线消费 1离线消费 2超时 3消费异常,4异常消费") - private Integer resultCode; - - /** - * 充值方式 - */ - @Schema(description = "充值方式") - private Integer rechargeMode; - - /** - * 充值来源 - */ - @Schema(description = "充值来源") - private Integer rechargeWay; - - /** - * 充值类型 - */ - @Schema(description = "充值类型") - private Integer rechargeType; -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/consume/model/req/RecordReq.java b/wms-module-system/src/main/java/top/wms/admin/consume/model/req/RecordReq.java deleted file mode 100644 index 11e9998..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/consume/model/req/RecordReq.java +++ /dev/null @@ -1,23 +0,0 @@ -package top.wms.admin.consume.model.req; - -import lombok.Data; - -import io.swagger.v3.oas.annotations.media.Schema; - -import java.io.Serial; -import java.io.Serializable; -import java.time.*; - -/** - * 创建或修改消费记录参数 - * - * @author zc - * @since 2026/01/21 17:53 - */ -@Data -@Schema(description = "创建或修改消费记录参数") -public class RecordReq implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/consume/model/req/TenantReq.java b/wms-module-system/src/main/java/top/wms/admin/consume/model/req/TenantReq.java deleted file mode 100644 index e5c7176..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/consume/model/req/TenantReq.java +++ /dev/null @@ -1,112 +0,0 @@ -package top.wms.admin.consume.model.req; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; -import org.hibernate.validator.constraints.Length; - -import java.io.Serial; -import java.io.Serializable; - -/** - * 创建或修改商户信息参数 - * - * @author zc - * @since 2026/01/30 14:55 - */ -@Data -@Schema(description = "创建或修改商户信息参数") -public class TenantReq implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - /** - * 商户名称 - */ - @Schema(description = "商户名称") - @Length(max = 50, message = "商户名称长度不能超过50个字符") - private String name; - - /** - * 商户类型 0支付宝 1微信 2支付宝+微信 3银行 - */ - @Schema(description = "商户类型 0支付宝 1微信 2支付宝+微信 3银行") - private Integer type; - - /** - * 客户的appid - */ - @Schema(description = "客户的appid") - @Length(max = 50, message = "客户的appid长度不能超过50个字符") - private String zfbAppId; - - /** - * 服务商PID - */ - @Schema(description = "服务商PID") - @Length(max = 50, message = "服务商PID长度不能超过50个字符") - private String zfbSysServiceProviderId; - - /** - * 私有密钥 - */ - @Schema(description = "私有密钥") - private String zfbRsaPrivateKey; - - /** - * 是否停用 - */ - @Schema(description = "是否停用") - private Long zfbStop; - - /** - * 是否测试模式 - */ - @Schema(description = "是否测试模式") - private Integer zfbMode; - - /** - * 公众号appid - */ - @Schema(description = "公众号appid") - @Length(max = 50, message = "公众号appid长度不能超过50个字符") - private String wxAppid; - - /** - * 服务商商户号 - */ - @Schema(description = "服务商商户号") - @Length(max = 50, message = "服务商商户号长度不能超过50个字符") - private String wxMchId; - - /** - * 特约商户号 - */ - @Schema(description = "特约商户号") - @Length(max = 50, message = "特约商户号长度不能超过50个字符") - private String wxSubMchId; - - /** - * 支付key - */ - @Schema(description = "支付key") - @Length(max = 50, message = "支付key长度不能超过50个字符") - private String wxKey; - - /** - * 是否停用 - */ - @Schema(description = "是否停用") - private Integer wxStop; - - /** - * 是否测试模式 - */ - @Schema(description = "是否测试模式") - private Integer wxMode; - - /** - * 平台参数ID - */ - @Schema(description = "平台参数ID") - private String paramId; -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/consume/model/req/TimeIntervalReq.java b/wms-module-system/src/main/java/top/wms/admin/consume/model/req/TimeIntervalReq.java deleted file mode 100644 index 1647bad..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/consume/model/req/TimeIntervalReq.java +++ /dev/null @@ -1,58 +0,0 @@ -package top.wms.admin.consume.model.req; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; - -import java.io.Serial; -import java.io.Serializable; -import java.math.BigDecimal; - -/** - * 创建或修改消费时段参数 - * - * @author zc - * @since 2026/01/30 14:56 - */ -@Data -@Schema(description = "创建或修改消费时段参数") -public class TimeIntervalReq implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 开始时间 - */ - private String startTime; - - /** - * 结束时间 - */ - private String endTime; - - /** - * 刷卡方式 00刷卡 01刷卡+密码 - */ - private String useMode; - - /** - * 最大刷卡次数 - */ - private Integer maxcount; - - /** - * 定额方式下要扣的金额 - */ - private BigDecimal fixmoney; - - /** - * 消费方式 0单价 1定额 2时段模式 3计次 5点餐机模式 9身份模式 - */ - private Integer consumeType; - - /** - * 消费餐段 0早餐 1中餐 2午餐 3夜餐 - */ - private Integer tmrtype; - -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/consume/model/resp/DownRecordResp.java b/wms-module-system/src/main/java/top/wms/admin/consume/model/resp/DownRecordResp.java deleted file mode 100644 index 86f66ae..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/consume/model/resp/DownRecordResp.java +++ /dev/null @@ -1,78 +0,0 @@ -package top.wms.admin.consume.model.resp; - -import lombok.Data; - -import io.swagger.v3.oas.annotations.media.Schema; - -import top.wms.admin.common.model.resp.BaseDetailResp; - -import java.io.Serial; -import java.time.*; - -/** - * 消费下发记录信息 - * - * @author zc - * @since 2026/02/25 11:01 - */ -@Data -@Schema(description = "消费下发记录信息") -public class DownRecordResp extends BaseDetailResp { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 设备ID - */ - @Schema(description = "设备ID") - private Long equipmentId; - - /** - * 设备名称 - */ - @Schema(description = "设备名称") - private String equipmentName; - - /** - * 人员ID - */ - @Schema(description = "人员ID") - private Long peopleId; - - /** - * 人员名称 - */ - @Schema(description = "人员名称") - private String peopleName; - - /** - * 工号 - */ - @Schema(description = "工号") - private String gh; - - /** - * 下发时间 - */ - @Schema(description = "下发时间") - private LocalDateTime downTime; - - /** - * 下发结果:0-成功,1-失败 - */ - @Schema(description = "下发结果:0-成功,1-失败") - private Integer downResult; - - /** - * 下发结果报文 - */ - @Schema(description = "下发结果报文") - private String msg; - - /** - * 0:新增 1:修改 2:下发 3:删除 - */ - @Schema(description = "0:新增 1:修改 2:下发 3:删除") - private Integer operType; -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/consume/model/resp/GroupResp.java b/wms-module-system/src/main/java/top/wms/admin/consume/model/resp/GroupResp.java deleted file mode 100644 index 2cc756d..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/consume/model/resp/GroupResp.java +++ /dev/null @@ -1,64 +0,0 @@ -package top.wms.admin.consume.model.resp; - -import lombok.Data; - -import io.swagger.v3.oas.annotations.media.Schema; - -import top.continew.starter.extension.crud.model.resp.LabelValueResp; -import top.wms.admin.common.model.resp.BaseDetailResp; - -import java.io.Serial; -import java.math.BigDecimal; -import java.time.*; -import java.util.List; - -/** - * 消费组信息 - * - * @author zc - * @since 2026/01/27 13:48 - */ -@Data -@Schema(description = "消费组信息") -public class GroupResp extends BaseDetailResp { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 消费组名称 - */ - @Schema(description = "消费组名称") - private String groupName; - - /** - * 补贴金额 - */ - @Schema(description = "补贴金额") - private BigDecimal money; - - /** - * 补贴日期 - */ - @Schema(description = "补贴日期(每月几号)") - private String subsidyDate; - - /** - * 是否补贴 - */ - @Schema(description = "是否补贴") - private Integer timedConsumption; - - /** - * 人员ids - */ - @Schema(description = "人员ids") - private List peopleIds; - - /** - * 人员下拉数据 - */ - @Schema(description = "人员下拉数据") - private List peopleSelect; - -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/consume/model/resp/PeopleDepositImportParseResp.java b/wms-module-system/src/main/java/top/wms/admin/consume/model/resp/PeopleDepositImportParseResp.java deleted file mode 100644 index e918976..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/consume/model/resp/PeopleDepositImportParseResp.java +++ /dev/null @@ -1,53 +0,0 @@ -package top.wms.admin.consume.model.resp; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; - -import java.io.Serial; -import java.io.Serializable; - -/** - * 人员充值导入解析结果 - * - */ -@Data -@AllArgsConstructor -@NoArgsConstructor -@Schema(description = "人员充值导入解析结果") -public class PeopleDepositImportParseResp implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 导入会话 Key - */ - @Schema(description = "导入会话Key", example = "1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed") - private String importKey; - - /** - * 总计行数 - */ - @Schema(description = "总计行数", example = "100") - private Integer totalRows; - - /** - * 有效行数 - */ - @Schema(description = "有效行数", example = "100") - private Integer validRows; - - /** - * 重复行数 - */ - @Schema(description = "重复行数", example = "100") - private Integer duplicateUserRows; - - /** - * 消费未启用行数 - */ - @Schema(description = "消费未启用行数", example = "100") - private Integer unEnabledRows; -} diff --git a/wms-module-system/src/main/java/top/wms/admin/consume/model/resp/RechargeRecordResp.java b/wms-module-system/src/main/java/top/wms/admin/consume/model/resp/RechargeRecordResp.java deleted file mode 100644 index 5802102..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/consume/model/resp/RechargeRecordResp.java +++ /dev/null @@ -1,171 +0,0 @@ -package top.wms.admin.consume.model.resp; - -import com.alibaba.excel.annotation.ExcelIgnore; -import com.alibaba.excel.annotation.ExcelProperty; -import com.alibaba.excel.annotation.write.style.ColumnWidth; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; -import top.continew.starter.file.excel.converter.ExcelBaseEnumConverter; -import top.wms.admin.common.enums.ConsumeRechargeModeEnum; -import top.wms.admin.common.enums.ConsumeRechargeTypeEnum; -import top.wms.admin.common.enums.ConsumeRechargeWayEnum; -import top.wms.admin.common.model.resp.BaseDetailResp; - -import java.io.Serial; -import java.math.BigDecimal; -import java.time.LocalDateTime; - -/** - * 充值记录信息 - * - * @author zc - * @since 2026/01/29 16:11 - */ -@Data -@Schema(description = "充值记录信息") -public class RechargeRecordResp extends BaseDetailResp { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 帐号people_id - */ - @Schema(description = "帐号people_id") - @ExcelIgnore - private Long accountId; - - /** - * 人员名称 - */ - @Schema(description = "人员名称") - @ExcelProperty(value = "人员名称", order = 2) - private String accountName; - - /** - * 后面A表示工号,如果是B表示卡号 - */ - @Schema(description = "后面A表示工号,如果是B表示卡号") - @ExcelIgnore - private String adminRecharge; - - /** - * 内部图片路径 - */ - @Schema(description = "内部图片路径") - @ExcelIgnore - private String base64; - - /** - * 消费金额,分 - */ - @Schema(description = "充值金额,分") - @ExcelProperty(value = "操作金额(分)", order = 3) - private BigDecimal consumeMoney; - - /** - * 折扣金额,分 - */ - @Schema(description = "折扣金额,分") - @ExcelIgnore - private BigDecimal discountMoney; - - /** - * 工号 - */ - @Schema(description = "工号") - @ExcelProperty(value = "工号", order = 1) - private String empId; - - /** - * 交易发起时间 - */ - @Schema(description = "交易发起时间") - @ExcelIgnore - private LocalDateTime startTime; - - /** - * 交易结束时间 - */ - @Schema(description = "交易结束时间") - @ExcelIgnore - private LocalDateTime endTime; - - /** - * 订单类型 - */ - @Schema(description = "订单类型") - @ExcelIgnore - private Integer orderType; - - /** - * 单号,支付宝和微信使用,平台单号 - */ - @Schema(description = "单号,支付宝和微信使用,平台单号") - @ExcelIgnore - private String outTradeId; - - /** - * 支付类型:0人脸 1云卡 2刷卡 3支付宝 4微信 5取餐码 - */ - @Schema(description = "支付类型:0人脸 1云卡 2刷卡 3支付宝 4微信 5取餐码") - @ExcelIgnore - private Integer payMode; - - /** - * 交易状态 0在线消费 1离线消费 2超时 3消费异常,4异常消费 - */ - @Schema(description = "交易状态 0在线消费 1离线消费 2超时 3消费异常,4异常消费") - @ExcelIgnore - private Integer resultCode; - - /** - * 记录版本1考勤,2门禁,22人脸机消费,25人脸机充值 - */ - @Schema(description = "记录版本1考勤,2门禁,22人脸机消费,25人脸机充值") - @ExcelIgnore - private Integer ver; - - /** - * 充值方式 - */ - @Schema(description = "充值方式 0现金 1支付宝 2微信 3网银") - @ExcelProperty(value = "充值方式", converter = ExcelBaseEnumConverter.class, order = 5) - private ConsumeRechargeModeEnum rechargeMode; - - /** - * 充值来源 - */ - @Schema(description = "充值来源 0平台 1手机") - @ExcelProperty(value = "充值来源", converter = ExcelBaseEnumConverter.class, order = 6) - private ConsumeRechargeWayEnum rechargeWay; - - /** - * 充值类型 - */ - @Schema(description = "充值类型 0补贴 1充值") - @ExcelProperty(value = "充值类型", converter = ExcelBaseEnumConverter.class, order = 4) - private ConsumeRechargeTypeEnum rechargeType; - - /** - * 创建时间 - */ - @Schema(description = "创建时间", example = "2023-08-08 08:08:08", type = "string") - @ExcelProperty(value = "创建时间", order = 7) - @ColumnWidth(30) - private LocalDateTime createTime; - - /** - * 清除补贴金额,分 - */ - @Schema(description = "清除补贴金额,分") - @ExcelIgnore - private BigDecimal clearBtje; - - /** - * 清除充值金额,分 - */ - @Schema(description = "清除充值金额,分") - @ExcelIgnore - private BigDecimal clearCzje; -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/consume/model/resp/RecordResp.java b/wms-module-system/src/main/java/top/wms/admin/consume/model/resp/RecordResp.java deleted file mode 100644 index d5dc158..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/consume/model/resp/RecordResp.java +++ /dev/null @@ -1,247 +0,0 @@ -package top.wms.admin.consume.model.resp; - -import com.alibaba.excel.annotation.ExcelIgnore; -import com.alibaba.excel.annotation.ExcelProperty; -import com.alibaba.excel.annotation.write.style.ColumnWidth; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; -import top.continew.starter.file.excel.converter.ExcelBaseEnumConverter; -import top.wms.admin.common.enums.*; -import top.wms.admin.common.model.resp.BaseDetailResp; - -import java.io.Serial; -import java.math.BigDecimal; -import java.time.LocalDateTime; - -/** - * 消费记录信息 - * - * @author zc - * @since 2026/01/21 17:53 - */ -@Data -@Schema(description = "消费记录信息") -public class RecordResp extends BaseDetailResp { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 记录版本1考勤,2门禁,22人脸机消费,25人脸机充值 - */ - @Schema(description = "记录版本1考勤,2门禁,22人脸机消费,25人脸机充值") - @ExcelIgnore - private Integer ver; - - /** - * 工号 - */ - @Schema(description = "工号") - @ExcelProperty(value = "工号", order = 1) - private String empId; - - /** - * 帐号 - */ - @Schema(description = "帐号") - @ExcelIgnore - private Long accountId; - - /** - * 人员名称 - */ - @Schema(description = "人员名称") - @ExcelProperty(value = "人员", order = 2) - private String accountName; - - /** - * 内部图片路径 - */ - @Schema(description = "内部图片路径") - @ExcelIgnore - private String base64; - - /** - * 消费方式:0单价 1定额 2时段模式 3计次 5点餐机模式 9身份模式 - */ - @Schema(description = "消费方式:0单价 1定额 2时段模式 3计次 5点餐机模式 9身份模式") - @ExcelProperty(value = "消费方式", converter = ExcelBaseEnumConverter.class, order = 4) - private ConsumeTypeConverter consumeType; - - /** - * 消费金额,分 - */ - @Schema(description = "消费总金额,分") - @ExcelProperty(value = "消费总金额", order = 5) - private BigDecimal consumeMoney = BigDecimal.ZERO; - - /** - * 补贴消费金额,分 - */ - @Schema(description = "补贴消费金额,分") - @ExcelProperty(value = "补贴消费金额", order = 6) - private BigDecimal subsidyMoney = BigDecimal.ZERO; - - /** - * 充值消费金额,分 - */ - @Schema(description = "充值消费金额,分") - @ExcelProperty(value = "充值消费金额", order = 7) - private BigDecimal rechargeMoney = BigDecimal.ZERO; - - /** - * 折扣金额,分 - */ - @Schema(description = "折扣金额,分") - @ExcelIgnore - private BigDecimal discountMoney = BigDecimal.ZERO; - - /** - * 单号,支付宝和微信使用,平台单号 - */ - @Schema(description = "单号,支付宝和微信使用,平台单号") - @ExcelProperty(value = "单号", order = 10) - private String outTradeId; - - /** - * 交易发起时间 - */ - @Schema(description = "交易发起时间") - @ExcelIgnore - private String startTime; - - /** - * 交易结束时间 - */ - @Schema(description = "交易结束时间") - @ExcelIgnore - private String endTime; - - /** - * 交易状态 0在线消费 1离线消费 2超时 3消费异常,4异常消费 - */ - @Schema(description = "交易状态 0在线消费 1离线消费 2超时 3消费异常,4异常消费") - @ExcelProperty(value = "交易状态", converter = ExcelBaseEnumConverter.class, order = 11) - private ConsumeResultEnum resultCode; - - /** - * 支付类型:0人脸 1云卡 2刷卡 3支付宝 4微信 5取餐码 - */ - @Schema(description = "支付类型:0人脸 1云卡 2刷卡 3支付宝 4微信 5取餐码") - @ExcelProperty(value = "支付类型", converter = ExcelBaseEnumConverter.class, order = 12) - private ConsumePayModeEnum payMode; - - /** - * 订单类型 - */ - @Schema(description = "订单类型") - @ExcelProperty(value = "订单类型", converter = ExcelBaseEnumConverter.class, order = 13) - private ConsumeOrderTypeEnum orderType; - - /** - * 钱包扣款模式:0先消费补贴再个人,1仅现金,2仅补贴 - */ - @Schema(description = "钱包扣款模式:0先消费补贴再个人,1仅现金,2仅补贴") - @ExcelIgnore - private ConsumeWalletModeEnum walletConsumeMode; - - /** - * 多个相似的人脸出现时返回工号,最多3个,分号隔开 - */ - @Schema(description = "多个相似的人脸出现时返回工号,最多3个,分号隔开") - @ExcelIgnore - private String likeId; - - /** - * 卡号 - */ - @Schema(description = "卡号") - @ExcelIgnore - private String cardSn; - - /** - * 交易发起时间 - */ - @Schema(description = "交易发起时间") - @ExcelIgnore - private LocalDateTime startDate; - - /** - * 交易结束时间 - */ - @Schema(description = "交易结束时间") - @ExcelIgnore - private LocalDateTime endDate; - - /** - * 交易结果 - */ - @Schema(description = "交易结果") - @ExcelIgnore - private String consumeResult; - - /** - * 备注 - */ - @Schema(description = "备注") - @ExcelIgnore - private String remark; - - /** - * 设备ID - */ - @Schema(description = "设备ID") - @ExcelIgnore - private Long devId; - - /** - * 设备名称 - */ - @Schema(description = "设备名称") - @ExcelProperty(value = "设备名称", order = 3) - private String equipmentName; - - /** - * 餐段ID - */ - @Schema(description = "餐段ID") - @ExcelIgnore - private String timeId; - - /** - * 支付宝买家ID - */ - @Schema(description = "支付宝买家ID") - @ExcelIgnore - private String buyerId; - - /** - * 微信买家ID - */ - @Schema(description = "微信买家ID") - @ExcelIgnore - private String openid; - - /** - * 充值金额 - */ - @Schema(description = "充值金额") - @ExcelProperty(value = "充值金额", order = 9) - private BigDecimal czje = BigDecimal.ZERO; - - /** - * 补贴金额 - */ - @Schema(description = "补贴金额") - @ExcelProperty(value = "补贴金额", order = 8) - private BigDecimal btje = BigDecimal.ZERO; - - /** - * 创建时间 - */ - @Schema(description = "创建时间", example = "2023-08-08 08:08:08", type = "string") - @ExcelProperty(value = "创建时间", order = 14) - @ColumnWidth(30) - private LocalDateTime createTime; - -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/consume/model/resp/TenantResp.java b/wms-module-system/src/main/java/top/wms/admin/consume/model/resp/TenantResp.java deleted file mode 100644 index 3ecc594..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/consume/model/resp/TenantResp.java +++ /dev/null @@ -1,120 +0,0 @@ -package top.wms.admin.consume.model.resp; - -import lombok.Data; - -import io.swagger.v3.oas.annotations.media.Schema; - -import top.wms.admin.common.model.resp.BaseDetailResp; - -import java.io.Serial; -import java.time.*; - -/** - * 商户信息信息 - * - * @author zc - * @since 2026/01/30 14:55 - */ -@Data -@Schema(description = "商户信息信息") -public class TenantResp extends BaseDetailResp { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 商户名称 - */ - @Schema(description = "商户名称") - private String name; - - /** - * 商户类型 - */ - @Schema(description = "商户类型") - private String type; - - /** - * 客户的appid - */ - @Schema(description = "客户的appid") - private String zfbAppId; - - /** - * 服务商PID - */ - @Schema(description = "服务商PID") - private String zfbSysServiceProviderId; - - /** - * 私有密钥 - */ - @Schema(description = "私有密钥") - private String zfbRsaPrivateKey; - - /** - * 是否停用 - */ - @Schema(description = "是否停用") - private String zfbStop; - - /** - * 是否测试模式 - */ - @Schema(description = "是否测试模式") - private String zfbMode; - - /** - * 公众号appid - */ - @Schema(description = "公众号appid") - private String wxAppid; - - /** - * 服务商商户号 - */ - @Schema(description = "服务商商户号") - private String wxMchId; - - /** - * 特约商户号 - */ - @Schema(description = "特约商户号") - private String wxSubMchId; - - /** - * 支付key - */ - @Schema(description = "支付key") - private String wxKey; - - /** - * 是否停用 - */ - @Schema(description = "是否停用") - private String wxStop; - - /** - * 是否测试模式 - */ - @Schema(description = "是否测试模式") - private String wxMode; - - /** - * 平台参数ID - */ - @Schema(description = "平台参数ID") - private String paramId; - - /** - * 更新者 - */ - @Schema(description = "更新者") - private Long updateUser; - - /** - * 更新时间 - */ - @Schema(description = "更新时间") - private LocalDateTime updateTime; -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/consume/model/resp/TimeIntervalResp.java b/wms-module-system/src/main/java/top/wms/admin/consume/model/resp/TimeIntervalResp.java deleted file mode 100644 index 9826af4..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/consume/model/resp/TimeIntervalResp.java +++ /dev/null @@ -1,97 +0,0 @@ -package top.wms.admin.consume.model.resp; - -import lombok.Data; - -import io.swagger.v3.oas.annotations.media.Schema; - -import top.wms.admin.common.model.resp.BaseDetailResp; - -import java.io.Serial; -import java.time.*; -import java.math.BigDecimal; - -/** - * 消费时段信息 - * - * @author zc - * @since 2026/01/30 14:56 - */ -@Data -@Schema(description = "消费时段信息") -public class TimeIntervalResp extends BaseDetailResp { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 开始时间 - */ - @Schema(description = "开始时间") - private String startTime; - - /** - * 结束时间 - */ - @Schema(description = "结束时间") - private String endTime; - - /** - * 刷卡方式 00刷卡 01刷卡+密码 - */ - @Schema(description = "刷卡方式 00刷卡 01刷卡+密码") - private String useMode; - - /** - * 消费餐段 0早餐 1中餐 2午餐 3夜餐 - */ - @Schema(description = "消费餐段 0早餐 1中餐 2午餐 3夜餐") - private String tmrtype; - - /** - * 预留 - */ - @Schema(description = "预留") - private String mark; - - /** - * 卡级别 - */ - @Schema(description = "卡级别") - private Integer level; - - /** - * 最大刷卡次数 - */ - @Schema(description = "最大刷卡次数") - private Integer maxcount; - - /** - * 定额方式下要扣的金额 - */ - @Schema(description = "定额方式下要扣的金额") - private BigDecimal fixmoney; - - /** - * 消费方式 0单价 1定额 2时段模式 3计次 5点餐机模式 9身份模式 - */ - @Schema(description = "消费方式 0单价 1定额 2时段模式 3计次 5点餐机模式 9身份模式") - private String consumeType; - - /** - * 平台参数ID - */ - @Schema(description = "平台参数ID") - private String paramId; - - /** - * 更新者 - */ - @Schema(description = "更新者") - private Long updateUser; - - /** - * 更新时间 - */ - @Schema(description = "更新时间") - private LocalDateTime updateTime; -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/consume/model/resp/report/BaseReport.java b/wms-module-system/src/main/java/top/wms/admin/consume/model/resp/report/BaseReport.java deleted file mode 100644 index 6905328..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/consume/model/resp/report/BaseReport.java +++ /dev/null @@ -1,73 +0,0 @@ -package top.wms.admin.consume.model.resp.report; - -import com.alibaba.excel.annotation.ExcelProperty; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; - -import java.math.BigDecimal; - -@Data -@Schema(description = "基础报表") -public class BaseReport { - - /** - * 合计次数 - */ - @ExcelProperty(value = "合计次数", order = Integer.MAX_VALUE - 10) - private Integer totalCount = 0; - - /** - * 合计金额 - */ - @ExcelProperty(value = "合计金额", order = Integer.MAX_VALUE - 9) - private BigDecimal totalAmount = BigDecimal.ZERO; - - /** - * 单价次数 - */ - @ExcelProperty(value = "单价次数", order = Integer.MAX_VALUE - 8) - private Integer unitPriceCount = 0; - - /** - * 单价金额 - */ - @ExcelProperty(value = "单价金额", order = Integer.MAX_VALUE - 7) - private BigDecimal unitPriceAmount = BigDecimal.ZERO; - - /** - * 定值次数 - */ - @ExcelProperty(value = "定值次数", order = Integer.MAX_VALUE - 6) - private Integer fixedValueCount = 0; - - /** - * 定值金额 - */ - @ExcelProperty(value = "定值金额", order = Integer.MAX_VALUE - 5) - private BigDecimal fixedValueAmount = BigDecimal.ZERO; - - /** - * 计次次数 - */ - @ExcelProperty(value = "计次次数", order = Integer.MAX_VALUE - 4) - private Integer countingCount = 0; - - /** - * 计次金额 - */ - @ExcelProperty(value = "计次金额", order = Integer.MAX_VALUE - 3) - private BigDecimal countingAmount = BigDecimal.ZERO; - - /** - * 二维码次数 - */ - @ExcelProperty(value = "二维码次数", order = Integer.MAX_VALUE - 2) - private Integer qrcodeCount = 0; - - /** - * 二维码金额 - */ - @ExcelProperty(value = "二维码金额", order = Integer.MAX_VALUE - 1) - private BigDecimal qrcodeAmount = BigDecimal.ZERO; - -} diff --git a/wms-module-system/src/main/java/top/wms/admin/consume/model/resp/report/BranchReport.java b/wms-module-system/src/main/java/top/wms/admin/consume/model/resp/report/BranchReport.java deleted file mode 100644 index 946aa2f..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/consume/model/resp/report/BranchReport.java +++ /dev/null @@ -1,20 +0,0 @@ -package top.wms.admin.consume.model.resp.report; - -import com.alibaba.excel.annotation.ExcelProperty; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; - -/** - * 部门报表 - */ -@Data -@Schema(description = "部门报表") -public class BranchReport extends BaseReport { - - /** - * 部门名称 - */ - @ExcelProperty(value = "部门名称", order = Integer.MAX_VALUE - 11) - private String branchName; - -} diff --git a/wms-module-system/src/main/java/top/wms/admin/consume/model/resp/report/MealReport.java b/wms-module-system/src/main/java/top/wms/admin/consume/model/resp/report/MealReport.java deleted file mode 100644 index e775001..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/consume/model/resp/report/MealReport.java +++ /dev/null @@ -1,35 +0,0 @@ -package top.wms.admin.consume.model.resp.report; - -import com.alibaba.excel.annotation.ExcelProperty; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; -import top.continew.starter.file.excel.converter.ExcelBaseEnumConverter; -import top.wms.admin.common.enums.ConsumeTmrtypeEnum; - -/** - * 餐段报表 - */ -@Data -@Schema(description = "餐段报表") -public class MealReport extends BaseReport { - - /** - * 商户名称 - */ - @ExcelProperty(value = "商户名称", order = Integer.MAX_VALUE - 13) - private String merchant; - - /** - * 设备名称 - */ - - @ExcelProperty(value = "设备名称", order = Integer.MAX_VALUE - 12) - private String equipmentName; - - /** - * 消费餐段 0早餐 1中餐 2午餐 3夜餐 - */ - @ExcelProperty(value = "消费餐段", converter = ExcelBaseEnumConverter.class, order = Integer.MAX_VALUE - 11) - private ConsumeTmrtypeEnum tmrtype; - -} diff --git a/wms-module-system/src/main/java/top/wms/admin/consume/model/resp/report/MerchantReport.java b/wms-module-system/src/main/java/top/wms/admin/consume/model/resp/report/MerchantReport.java deleted file mode 100644 index 4cff2db..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/consume/model/resp/report/MerchantReport.java +++ /dev/null @@ -1,28 +0,0 @@ -package top.wms.admin.consume.model.resp.report; - -import com.alibaba.excel.annotation.ExcelProperty; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; - -/** - * 商户报表 - */ -@Data -@Schema(description = "商户报表") -public class MerchantReport extends BaseReport { - - /** - * 商户名称 - */ - @Schema(description = "商户名称") - @ExcelProperty(value = "商户名称", order = Integer.MAX_VALUE - 12) - private String merchant; - - /** - * 设备名称 - */ - @Schema(description = "设备名称") - @ExcelProperty(value = "设备名称", order = Integer.MAX_VALUE - 11) - private String equipmentName; - -} diff --git a/wms-module-system/src/main/java/top/wms/admin/consume/model/resp/report/PeopleReport.java b/wms-module-system/src/main/java/top/wms/admin/consume/model/resp/report/PeopleReport.java deleted file mode 100644 index 55c6dce..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/consume/model/resp/report/PeopleReport.java +++ /dev/null @@ -1,32 +0,0 @@ -package top.wms.admin.consume.model.resp.report; - -import com.alibaba.excel.annotation.ExcelProperty; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; - -/** - * 人员报表 - */ -@Data -@Schema(description = "人员报表") -public class PeopleReport extends BaseReport { - - /** - * 人员名称 - */ - @ExcelProperty(value = "人员名称", order = Integer.MAX_VALUE - 13) - private String peopleName; - - /** - * 人员工号 - */ - @ExcelProperty(value = "人员工号", order = Integer.MAX_VALUE - 12) - private String gh; - - /** - * 部门名称 - */ - @ExcelProperty(value = "部门名称", order = Integer.MAX_VALUE - 11) - private String branchName; - -} diff --git a/wms-module-system/src/main/java/top/wms/admin/consume/service/DownRecordService.java b/wms-module-system/src/main/java/top/wms/admin/consume/service/DownRecordService.java deleted file mode 100644 index 7881f3b..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/consume/service/DownRecordService.java +++ /dev/null @@ -1,17 +0,0 @@ -package top.wms.admin.consume.service; - -import top.continew.starter.extension.crud.service.BaseService; -import top.wms.admin.consume.model.query.DownRecordQuery; -import top.wms.admin.consume.model.req.DownRecordReq; -import top.wms.admin.consume.model.resp.DownRecordResp; - -/** - * 消费下发记录业务接口 - * - * @author zc - * @since 2026/02/25 11:01 - */ -public interface DownRecordService extends BaseService { - - void down(Long equipmentId, Long peopleId); -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/consume/service/GroupService.java b/wms-module-system/src/main/java/top/wms/admin/consume/service/GroupService.java deleted file mode 100644 index 1cb176e..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/consume/service/GroupService.java +++ /dev/null @@ -1,14 +0,0 @@ -package top.wms.admin.consume.service; - -import top.continew.starter.extension.crud.service.BaseService; -import top.wms.admin.consume.model.query.GroupQuery; -import top.wms.admin.consume.model.req.GroupReq; -import top.wms.admin.consume.model.resp.GroupResp; - -/** - * 消费组业务接口 - * - * @author zc - * @since 2026/01/27 13:48 - */ -public interface GroupService extends BaseService {} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/consume/service/GroupUserService.java b/wms-module-system/src/main/java/top/wms/admin/consume/service/GroupUserService.java deleted file mode 100644 index 3dbb9fe..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/consume/service/GroupUserService.java +++ /dev/null @@ -1,8 +0,0 @@ -package top.wms.admin.consume.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import top.wms.admin.consume.model.entity.GroupUserDO; - -public interface GroupUserService extends IService { - -} diff --git a/wms-module-system/src/main/java/top/wms/admin/consume/service/RechargeRecordService.java b/wms-module-system/src/main/java/top/wms/admin/consume/service/RechargeRecordService.java deleted file mode 100644 index 21e9a69..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/consume/service/RechargeRecordService.java +++ /dev/null @@ -1,16 +0,0 @@ -package top.wms.admin.consume.service; - -import top.continew.starter.extension.crud.service.BaseService; -import top.wms.admin.consume.model.query.RechargeRecordQuery; -import top.wms.admin.consume.model.req.RechargeRecordReq; -import top.wms.admin.consume.model.resp.RechargeRecordResp; - -/** - * 充值记录业务接口 - * - * @author zc - * @since 2026/01/29 16:11 - */ -public interface RechargeRecordService extends BaseService { - -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/consume/service/RecordService.java b/wms-module-system/src/main/java/top/wms/admin/consume/service/RecordService.java deleted file mode 100644 index 840d460..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/consume/service/RecordService.java +++ /dev/null @@ -1,14 +0,0 @@ -package top.wms.admin.consume.service; - -import top.continew.starter.extension.crud.service.BaseService; -import top.wms.admin.consume.model.query.RecordQuery; -import top.wms.admin.consume.model.req.RecordReq; -import top.wms.admin.consume.model.resp.RecordResp; - -/** - * 消费记录业务接口 - * - * @author zc - * @since 2026/01/21 17:53 - */ -public interface RecordService extends BaseService {} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/consume/service/ReportService.java b/wms-module-system/src/main/java/top/wms/admin/consume/service/ReportService.java deleted file mode 100644 index fd71ea8..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/consume/service/ReportService.java +++ /dev/null @@ -1,77 +0,0 @@ -package top.wms.admin.consume.service; - -import jakarta.servlet.http.HttpServletResponse; -import org.apache.ibatis.annotations.Param; -import top.continew.starter.extension.crud.model.query.PageQuery; -import top.continew.starter.extension.crud.model.resp.PageResp; -import top.wms.admin.consume.model.query.ReportQuery; -import top.wms.admin.consume.model.resp.report.BranchReport; -import top.wms.admin.consume.model.resp.report.MealReport; -import top.wms.admin.consume.model.resp.report.MerchantReport; -import top.wms.admin.consume.model.resp.report.PeopleReport; - -import java.util.List; - -public interface ReportService { - - /** - * 查询商户报表 - * - * @param query 查询参数 - * @return 商户报表列表 - */ - List queryMerchantReport(ReportQuery query); - - /** - * 查询餐段报表 - * - * @param query 查询参数 - * @return 餐段报表列表 - */ - List queryMealReport(ReportQuery query); - - /** - * 查询部门报表 - * - * @param query 查询参数 - * @return 部门报表列表 - */ - List queryBranchReport(ReportQuery query); - - /** - * 查询人员报表 - * - * @param query 查询参数 - * @param pageQuery 分页查询参数 - * @return 人员报表分页列表 - */ - PageResp page(@Param("query") ReportQuery query, @Param("pageQuery") PageQuery pageQuery); - - /** - * 导出商户报表 - * - * @param query 查询参数 - */ - void exportMerchant(ReportQuery query, HttpServletResponse response); - - /** - * 导出餐段报表 - * - * @param query 查询参数 - */ - void exportMeal(ReportQuery query, HttpServletResponse response); - - /** - * 导出部门报表 - * - * @param query 查询参数 - */ - void exportBranch(ReportQuery query, HttpServletResponse response); - - /** - * 导出人员报表 - * - * @param query 查询参数 - */ - void exportPeople(ReportQuery query, HttpServletResponse response); -} diff --git a/wms-module-system/src/main/java/top/wms/admin/consume/service/TenantService.java b/wms-module-system/src/main/java/top/wms/admin/consume/service/TenantService.java deleted file mode 100644 index b446526..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/consume/service/TenantService.java +++ /dev/null @@ -1,16 +0,0 @@ -package top.wms.admin.consume.service; - -import top.continew.starter.extension.crud.service.BaseService; -import top.wms.admin.consume.model.query.TenantQuery; -import top.wms.admin.consume.model.req.TenantReq; -import top.wms.admin.consume.model.resp.TenantResp; - -/** - * 商户信息业务接口 - * - * @author zc - * @since 2026/01/30 14:55 - */ -public interface TenantService extends BaseService { - -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/consume/service/TimeIntervalService.java b/wms-module-system/src/main/java/top/wms/admin/consume/service/TimeIntervalService.java deleted file mode 100644 index 703030f..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/consume/service/TimeIntervalService.java +++ /dev/null @@ -1,16 +0,0 @@ -package top.wms.admin.consume.service; - -import top.continew.starter.extension.crud.service.BaseService; -import top.wms.admin.consume.model.query.TimeIntervalQuery; -import top.wms.admin.consume.model.req.TimeIntervalReq; -import top.wms.admin.consume.model.resp.TimeIntervalResp; - -/** - * 消费时段业务接口 - * - * @author zc - * @since 2026/01/30 14:56 - */ -public interface TimeIntervalService extends BaseService { - -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/consume/service/impl/DownRecordServiceImpl.java b/wms-module-system/src/main/java/top/wms/admin/consume/service/impl/DownRecordServiceImpl.java deleted file mode 100644 index da9c813..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/consume/service/impl/DownRecordServiceImpl.java +++ /dev/null @@ -1,57 +0,0 @@ -package top.wms.admin.consume.service.impl; - -import cn.hutool.core.util.StrUtil; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import lombok.RequiredArgsConstructor; - -import org.springframework.stereotype.Service; - -import top.continew.starter.extension.crud.model.query.PageQuery; -import top.continew.starter.extension.crud.model.resp.PageResp; -import top.continew.starter.extension.crud.service.BaseServiceImpl; -import top.wms.admin.consume.mapper.DownRecordMapper; -import top.wms.admin.consume.model.entity.DownRecordDO; -import top.wms.admin.consume.model.query.DownRecordQuery; -import top.wms.admin.consume.model.req.DownRecordReq; -import top.wms.admin.consume.model.resp.DownRecordResp; -import top.wms.admin.consume.service.DownRecordService; -import top.wms.admin.system.mapper.PeopleEquipmentMapper; -import top.wms.admin.system.model.entity.PeopleEquipmentDO; - -/** - * 消费下发记录业务实现 - * - * @author zc - * @since 2026/02/25 11:01 - */ -@Service -@RequiredArgsConstructor -public class DownRecordServiceImpl extends BaseServiceImpl implements DownRecordService { - - private final PeopleEquipmentMapper peopleEquipmentMapper; - - @Override - public PageResp page(DownRecordQuery query, PageQuery pageQuery) { - QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.like(StrUtil.isNotBlank(query.getPeopleName()), "p.name", query.getPeopleName()); - queryWrapper.eq(null != query.getDownResult(), "r.down_result", query.getDownResult()); - queryWrapper.eq(null != query.getOperType(), "r.oper_type", query.getOperType()); - queryWrapper.eq(null != query.getEquipmentId(), "r.equipment_id", query.getEquipmentId()); - queryWrapper.ge(null != query.getStartTime(), "r.down_time", query.getStartTime()); - queryWrapper.le(null != query.getEndTime(), "r.down_time", query.getEndTime()); - this.sort(queryWrapper, pageQuery); - - IPage page = baseMapper.selectRecordsPage(new Page<>(pageQuery.getPage(), pageQuery - .getSize()), queryWrapper); - - return PageResp.build(page); - } - - @Override - public void down(Long equipmentId, Long peopleId) { - peopleEquipmentMapper.delete(new QueryWrapper().eq("equipment_id", equipmentId) - .eq("people_id", peopleId)); - } -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/consume/service/impl/GroupServiceImpl.java b/wms-module-system/src/main/java/top/wms/admin/consume/service/impl/GroupServiceImpl.java deleted file mode 100644 index dc4a898..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/consume/service/impl/GroupServiceImpl.java +++ /dev/null @@ -1,96 +0,0 @@ -package top.wms.admin.consume.service.impl; - -import cn.hutool.core.bean.BeanUtil; -import cn.hutool.core.collection.CollUtil; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import lombok.RequiredArgsConstructor; -import org.springframework.stereotype.Service; -import top.continew.starter.extension.crud.service.BaseServiceImpl; -import top.wms.admin.consume.mapper.GroupMapper; -import top.wms.admin.consume.model.entity.GroupDO; -import top.wms.admin.consume.model.entity.GroupUserDO; -import top.wms.admin.consume.model.query.GroupQuery; -import top.wms.admin.consume.model.req.GroupReq; -import top.wms.admin.consume.model.resp.GroupResp; -import top.wms.admin.consume.service.GroupService; -import top.wms.admin.consume.service.GroupUserService; -import top.wms.admin.peopleBranch.mapper.PeopleMapper; -import top.wms.admin.peopleBranch.mapstruct.PeopleConvert; -import top.wms.admin.peopleBranch.model.entity.PeopleDO; - -import java.util.List; -import java.util.stream.Collectors; - -/** - * 消费组业务实现 - * - * @author zc - * @since 2026/01/27 13:48 - */ -@Service -@RequiredArgsConstructor -public class GroupServiceImpl extends BaseServiceImpl implements GroupService { - - private final GroupUserService groupUserService; - - private final PeopleMapper peopleMapper; - - private final PeopleConvert peopleConvert; - - @Override - public GroupResp get(Long id) { - GroupDO entity = baseMapper.selectById(id); - GroupResp detail = BeanUtil.toBean(entity, GroupResp.class); - - List groupUserDOS = groupUserService.list(new LambdaQueryWrapper() - .eq(GroupUserDO::getGroupId, id)); - if (CollUtil.isNotEmpty(groupUserDOS)) { - detail.setPeopleIds(groupUserDOS.stream().map(GroupUserDO::getUserId).toList()); - - //返回人员下拉数据 - List peopleDOS = peopleMapper.selectByIds(detail.getPeopleIds()); - if (CollUtil.isNotEmpty(peopleDOS)) { - detail.setPeopleSelect(peopleConvert.labelValueList(peopleDOS)); - } - } - - this.fill(detail); - return detail; - } - - @Override - public void afterAdd(GroupReq req, GroupDO groupDO) { - if (CollUtil.isNotEmpty(req.getPeopleIds())) { - List groupUserDOS = req.getPeopleIds().stream().map(userId -> { - GroupUserDO groupUserDO = new GroupUserDO(); - groupUserDO.setGroupId(groupDO.getId()); - groupUserDO.setUserId(userId); - return groupUserDO; - }).collect(Collectors.toList()); - - groupUserService.saveBatch(groupUserDOS); - } - } - - @Override - public void afterUpdate(GroupReq req, GroupDO groupDO) { - if (CollUtil.isNotEmpty(req.getPeopleIds())) { - List groupUserDOS = req.getPeopleIds().stream().map(userId -> { - GroupUserDO groupUserDO = new GroupUserDO(); - groupUserDO.setGroupId(groupDO.getId()); - groupUserDO.setUserId(userId); - return groupUserDO; - }).collect(Collectors.toList()); - groupUserService.remove(new LambdaQueryWrapper().eq(GroupUserDO::getGroupId, groupDO.getId())); - groupUserService.saveBatch(groupUserDOS); - } - } - - @Override - public void afterDelete(List ids) { - if (CollUtil.isNotEmpty(ids)) { - groupUserService.remove(new LambdaQueryWrapper().in(GroupUserDO::getGroupId, ids)); - } - } - -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/consume/service/impl/GroupUserServiceImpl.java b/wms-module-system/src/main/java/top/wms/admin/consume/service/impl/GroupUserServiceImpl.java deleted file mode 100644 index b552756..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/consume/service/impl/GroupUserServiceImpl.java +++ /dev/null @@ -1,20 +0,0 @@ -package top.wms.admin.consume.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import lombok.RequiredArgsConstructor; -import org.springframework.stereotype.Service; -import top.wms.admin.consume.mapper.GroupUserMapper; -import top.wms.admin.consume.model.entity.GroupUserDO; -import top.wms.admin.consume.service.GroupUserService; - -/** - * 消费组用户业务实现 - * - * @author zc - * @since 2026/01/27 13:48 - */ -@Service -@RequiredArgsConstructor -public class GroupUserServiceImpl extends ServiceImpl implements GroupUserService { - -} diff --git a/wms-module-system/src/main/java/top/wms/admin/consume/service/impl/RechargeRecordServiceImpl.java b/wms-module-system/src/main/java/top/wms/admin/consume/service/impl/RechargeRecordServiceImpl.java deleted file mode 100644 index be85902..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/consume/service/impl/RechargeRecordServiceImpl.java +++ /dev/null @@ -1,72 +0,0 @@ -package top.wms.admin.consume.service.impl; - -import cn.crane4j.annotation.AutoOperate; -import cn.hutool.core.date.DateUtil; -import cn.hutool.core.util.StrUtil; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import jakarta.servlet.http.HttpServletResponse; -import lombok.RequiredArgsConstructor; -import org.springframework.stereotype.Service; -import top.continew.starter.extension.crud.model.query.PageQuery; -import top.continew.starter.extension.crud.model.query.SortQuery; -import top.continew.starter.extension.crud.model.resp.PageResp; -import top.continew.starter.extension.crud.service.BaseServiceImpl; -import top.continew.starter.file.excel.util.ExcelUtils; -import top.wms.admin.consume.mapper.RechargeRecordMapper; -import top.wms.admin.consume.model.entity.RechargeRecordDO; -import top.wms.admin.consume.model.query.RechargeRecordQuery; -import top.wms.admin.consume.model.req.RechargeRecordReq; -import top.wms.admin.consume.model.resp.RechargeRecordResp; -import top.wms.admin.consume.service.RechargeRecordService; - -import java.util.List; - -/** - * 充值记录业务实现 - * - * @author zc - * @since 2026/01/29 16:11 - */ -@Service -@RequiredArgsConstructor -public class RechargeRecordServiceImpl extends BaseServiceImpl implements RechargeRecordService { - - @Override - @AutoOperate(type = RechargeRecordResp.class, on = "list") - public PageResp page(RechargeRecordQuery query, PageQuery pageQuery) { - QueryWrapper queryWrapper = buildQueryWrapper(query); - this.sort(queryWrapper, pageQuery); - - IPage page = baseMapper.selectRechargePage(new Page<>(pageQuery.getPage(), pageQuery - .getSize()), queryWrapper); - - return PageResp.build(page); - } - - @Override - public void export(RechargeRecordQuery query, SortQuery sortQuery, HttpServletResponse response) { - QueryWrapper queryWrapper = buildQueryWrapper(query); - this.sort(queryWrapper, sortQuery); - List rechargeRecordResps = baseMapper.selectExport(queryWrapper); - - ExcelUtils.export(rechargeRecordResps, "充值记录_" + DateUtil.today(), RechargeRecordResp.class, response); - } - - public QueryWrapper buildQueryWrapper(RechargeRecordQuery query) { - QueryWrapper queryWrapper = new QueryWrapper<>(); - //根据人员名称查询 - queryWrapper.like(StrUtil.isNotBlank(query.getAccountName()), "p.name", query.getAccountName()); - //根据工号查询 - queryWrapper.like(StrUtil.isNotBlank(query.getEmpId()), "r.emp_id", query.getEmpId()); - //根据充值类型查询 - queryWrapper.eq(query.getRechargeType() != null, "r.recharge_type", query.getRechargeType()); - //根据开始时间查询 - queryWrapper.ge(query.getStartTime() != null, "r.create_time", query.getStartTime()); - //根据结束时间查询 - queryWrapper.le(query.getEndTime() != null, "r.create_time", query.getEndTime()); - return queryWrapper; - } - -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/consume/service/impl/RecordServiceImpl.java b/wms-module-system/src/main/java/top/wms/admin/consume/service/impl/RecordServiceImpl.java deleted file mode 100644 index 51af2fb..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/consume/service/impl/RecordServiceImpl.java +++ /dev/null @@ -1,74 +0,0 @@ -package top.wms.admin.consume.service.impl; - -import cn.hutool.core.date.DateUtil; -import cn.hutool.core.util.StrUtil; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import jakarta.servlet.http.HttpServletResponse; -import lombok.RequiredArgsConstructor; - -import org.springframework.stereotype.Service; - -import top.continew.starter.extension.crud.model.query.PageQuery; -import top.continew.starter.extension.crud.model.query.SortQuery; -import top.continew.starter.extension.crud.model.resp.PageResp; -import top.continew.starter.extension.crud.service.BaseServiceImpl; -import top.continew.starter.file.excel.util.ExcelUtils; -import top.wms.admin.consume.mapper.RecordMapper; -import top.wms.admin.consume.model.entity.RecordDO; -import top.wms.admin.consume.model.query.RecordQuery; -import top.wms.admin.consume.model.req.RecordReq; -import top.wms.admin.consume.model.resp.RecordResp; -import top.wms.admin.consume.service.RecordService; - -import java.util.List; - -/** - * 消费记录业务实现 - * - * @author zc - * @since 2026/01/21 17:53 - */ -@Service -@RequiredArgsConstructor -public class RecordServiceImpl extends BaseServiceImpl implements RecordService { - - @Override - public PageResp page(RecordQuery query, PageQuery pageQuery) { - QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.eq(StrUtil.isNotBlank(query.getEmpId()), "r.emp_id", query.getEmpId()); - queryWrapper.eq(StrUtil.isNotBlank(query.getOutTradeId()), "r.out_trade_id", query.getOutTradeId()); - queryWrapper.eq(null != query.getPayMode(), "r.pay_mode", query.getPayMode()); - queryWrapper.eq(null != query.getResultCode(), "r.result_code", query.getResultCode()); - queryWrapper.ge(null != query.getStartDate(), "r.start_date", query.getStartDate()); - queryWrapper.le(null != query.getEndDate(), "r.end_date", query.getEndDate()); - queryWrapper.le(null != query.getDevId(), "r.dev_id", query.getDevId()); - queryWrapper.like(StrUtil.isNotBlank(query.getAccountName()), "p.name", query.getAccountName()); - this.sort(queryWrapper, pageQuery); - - IPage page = baseMapper.selectRecordsPage(new Page<>(pageQuery.getPage(), pageQuery - .getSize()), queryWrapper); - - return PageResp.build(page); - } - - @Override - public void export(RecordQuery query, SortQuery sortQuery, HttpServletResponse response) { - QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.eq(StrUtil.isNotBlank(query.getEmpId()), "r.emp_id", query.getEmpId()); - queryWrapper.eq(StrUtil.isNotBlank(query.getOutTradeId()), "r.out_trade_id", query.getOutTradeId()); - queryWrapper.eq(null != query.getPayMode(), "r.pay_mode", query.getPayMode()); - queryWrapper.eq(null != query.getResultCode(), "r.result_code", query.getResultCode()); - queryWrapper.ge(null != query.getStartDate(), "r.start_date", query.getStartDate()); - queryWrapper.le(null != query.getEndDate(), "r.end_date", query.getEndDate()); - queryWrapper.le(null != query.getDevId(), "r.dev_id", query.getDevId()); - queryWrapper.like(StrUtil.isNotBlank(query.getAccountName()), "p.name", query.getAccountName()); - this.sort(queryWrapper, sortQuery); - - List list = baseMapper.selectRecordsExport(queryWrapper); - - ExcelUtils.export(list, "消费记录_" + DateUtil.today(), this.getDetailClass(), response); - } - -} diff --git a/wms-module-system/src/main/java/top/wms/admin/consume/service/impl/ReportServiceImpl.java b/wms-module-system/src/main/java/top/wms/admin/consume/service/impl/ReportServiceImpl.java deleted file mode 100644 index c750d58..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/consume/service/impl/ReportServiceImpl.java +++ /dev/null @@ -1,129 +0,0 @@ -package top.wms.admin.consume.service.impl; - -import cn.hutool.core.bean.BeanUtil; -import cn.hutool.core.date.DateUtil; -import jakarta.servlet.http.HttpServletResponse; -import lombok.RequiredArgsConstructor; -import org.springframework.stereotype.Service; -import top.continew.starter.extension.crud.model.query.PageQuery; -import top.continew.starter.extension.crud.model.resp.PageResp; -import top.continew.starter.file.excel.util.ExcelUtils; -import top.wms.admin.consume.mapper.ReportMapper; -import top.wms.admin.consume.model.query.ReportQuery; -import top.wms.admin.consume.model.resp.report.*; -import top.wms.admin.consume.service.ReportService; - -import java.util.List; - -@Service -@RequiredArgsConstructor -public class ReportServiceImpl implements ReportService { - - private final ReportMapper reportMapper; - - /** - * 查询商户报表 - * - * @param query 查询参数 - * @return 商户报表列表 - */ - @Override - public List queryMerchantReport(ReportQuery query) { - List list = reportMapper.queryMerchantReport(query); - BaseReport totalReport = reportMapper.totalReport(query); - MerchantReport merchantReport = new MerchantReport(); - merchantReport.setMerchant("总价"); - BeanUtil.copyProperties(totalReport, merchantReport); - list.add(merchantReport); - return list; - } - - /** - * 查询餐段报表 - * - * @param query 查询参数 - * @return 餐段报表列表 - */ - @Override - public List queryMealReport(ReportQuery query) { - List list = reportMapper.queryMealReport(query); - BaseReport totalReport = reportMapper.totalReport(query); - MealReport mealReport = new MealReport(); - mealReport.setMerchant("总价"); - BeanUtil.copyProperties(totalReport, mealReport); - list.add(mealReport); - return list; - } - - /** - * 查询部门报表 - * - * @param query 查询参数 - * @return 部门报表列表 - */ - @Override - public List queryBranchReport(ReportQuery query) { - List list = reportMapper.queryBranchReport(query); - BaseReport totalReport = reportMapper.totalReport(query); - BranchReport branchReport = new BranchReport(); - branchReport.setBranchName("总价"); - BeanUtil.copyProperties(totalReport, branchReport); - list.add(branchReport); - return list; - } - - /** - * 查询人员报表 - * - * @param query 查询参数 - * @param pageQuery 分页查询参数 - * @return 人员报表分页列表 - */ - @Override - public PageResp page(ReportQuery query, PageQuery pageQuery) { - int offset = (pageQuery.getPage() - 1) * pageQuery.getSize(); - List list = reportMapper.queryPeopleReport(query, pageQuery.getSize(), offset); - long total = reportMapper.selectCount(query); - return new PageResp<>(list, total); - } - - @Override - public void exportMerchant(ReportQuery query, HttpServletResponse response) { - List list = reportMapper.queryMerchantReport(query); - BaseReport totalReport = reportMapper.totalReport(query); - MerchantReport merchantReport = new MerchantReport(); - merchantReport.setMerchant("总价"); - BeanUtil.copyProperties(totalReport, merchantReport); - list.add(merchantReport); - ExcelUtils.export(list, "商户营业报表_" + DateUtil.today(), MerchantReport.class, response); - } - - @Override - public void exportMeal(ReportQuery query, HttpServletResponse response) { - List list = reportMapper.queryMealReport(query); - BaseReport totalReport = reportMapper.totalReport(query); - MealReport mealReport = new MealReport(); - mealReport.setMerchant("总价"); - BeanUtil.copyProperties(totalReport, mealReport); - list.add(mealReport); - ExcelUtils.export(list, "餐段消费报表_" + DateUtil.today(), MealReport.class, response); - } - - @Override - public void exportBranch(ReportQuery query, HttpServletResponse response) { - List list = reportMapper.queryBranchReport(query); - BaseReport totalReport = reportMapper.totalReport(query); - BranchReport branchReport = new BranchReport(); - branchReport.setBranchName("总价"); - BeanUtil.copyProperties(totalReport, branchReport); - list.add(branchReport); - ExcelUtils.export(list, "部门消费报表_" + DateUtil.today(), BranchReport.class, response); - } - - @Override - public void exportPeople(ReportQuery query, HttpServletResponse response) { - List list = reportMapper.queryPeopleExport(query); - ExcelUtils.export(list, "个人消费报表_" + DateUtil.today(), PeopleReport.class, response); - } - -} diff --git a/wms-module-system/src/main/java/top/wms/admin/consume/service/impl/TenantServiceImpl.java b/wms-module-system/src/main/java/top/wms/admin/consume/service/impl/TenantServiceImpl.java deleted file mode 100644 index 9aed596..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/consume/service/impl/TenantServiceImpl.java +++ /dev/null @@ -1,25 +0,0 @@ -package top.wms.admin.consume.service.impl; - -import lombok.RequiredArgsConstructor; - -import org.springframework.stereotype.Service; - -import top.continew.starter.extension.crud.service.BaseServiceImpl; -import top.wms.admin.consume.mapper.TenantMapper; -import top.wms.admin.consume.model.entity.TenantDO; -import top.wms.admin.consume.model.query.TenantQuery; -import top.wms.admin.consume.model.req.TenantReq; -import top.wms.admin.consume.model.resp.TenantResp; -import top.wms.admin.consume.service.TenantService; - -/** - * 商户信息业务实现 - * - * @author zc - * @since 2026/01/30 14:55 - */ -@Service -@RequiredArgsConstructor -public class TenantServiceImpl extends BaseServiceImpl implements TenantService { - -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/consume/service/impl/TimeIntervalServiceImpl.java b/wms-module-system/src/main/java/top/wms/admin/consume/service/impl/TimeIntervalServiceImpl.java deleted file mode 100644 index ba12b17..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/consume/service/impl/TimeIntervalServiceImpl.java +++ /dev/null @@ -1,25 +0,0 @@ -package top.wms.admin.consume.service.impl; - -import lombok.RequiredArgsConstructor; - -import org.springframework.stereotype.Service; - -import top.continew.starter.extension.crud.service.BaseServiceImpl; -import top.wms.admin.consume.mapper.TimeIntervalMapper; -import top.wms.admin.consume.model.entity.TimeIntervalDO; -import top.wms.admin.consume.model.query.TimeIntervalQuery; -import top.wms.admin.consume.model.req.TimeIntervalReq; -import top.wms.admin.consume.model.resp.TimeIntervalResp; -import top.wms.admin.consume.service.TimeIntervalService; - -/** - * 消费时段业务实现 - * - * @author zc - * @since 2026/01/30 14:56 - */ -@Service -@RequiredArgsConstructor -public class TimeIntervalServiceImpl extends BaseServiceImpl implements TimeIntervalService { - -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/equipment/mapper/EquipmentMapper.java b/wms-module-system/src/main/java/top/wms/admin/equipment/mapper/EquipmentMapper.java deleted file mode 100644 index c7201de..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/equipment/mapper/EquipmentMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package top.wms.admin.equipment.mapper; - -import org.springframework.stereotype.Repository; -import top.continew.starter.data.mp.base.BaseMapper; -import top.wms.admin.equipment.model.entity.EquipmentDO; - -/** - * 设备信息 Mapper - * - * @author zc - * @since 2025/03/26 17:14 - */ -@Repository -public interface EquipmentMapper extends BaseMapper { - -} diff --git a/wms-module-system/src/main/java/top/wms/admin/equipment/mapper/ProductMapper.java b/wms-module-system/src/main/java/top/wms/admin/equipment/mapper/ProductMapper.java deleted file mode 100644 index feabaf7..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/equipment/mapper/ProductMapper.java +++ /dev/null @@ -1,12 +0,0 @@ -package top.wms.admin.equipment.mapper; - -import top.continew.starter.data.mp.base.BaseMapper; -import top.wms.admin.equipment.model.entity.ProductDO; - -/** - * 产品信息 Mapper - * - * @author zc - * @since 2025/05/26 15:18 - */ -public interface ProductMapper extends BaseMapper {} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/equipment/mapstruct/EquipmentConvert.java b/wms-module-system/src/main/java/top/wms/admin/equipment/mapstruct/EquipmentConvert.java deleted file mode 100644 index 67990dd..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/equipment/mapstruct/EquipmentConvert.java +++ /dev/null @@ -1,24 +0,0 @@ -package top.wms.admin.equipment.mapstruct; - -import org.mapstruct.Mapper; -import org.mapstruct.Mapping; -import top.continew.starter.extension.crud.model.resp.LabelValueResp; -import top.wms.admin.equipment.model.entity.EquipmentDO; -import top.wms.admin.equipment.model.req.EquipmentReq; -import top.wms.admin.equipment.model.resp.EquipmentResp; - -import java.util.List; - -@Mapper(componentModel = "spring") -public interface EquipmentConvert { - - EquipmentResp DOToResp(EquipmentDO equipmentDO); - - EquipmentReq RespToReq(EquipmentResp equipmentDO); - - @Mapping(source = "id", target = "value") - @Mapping(source = "name", target = "label") - LabelValueResp labelValue(EquipmentDO equipmentDOS); - - List labelValueList(List equipmentDOS); -} diff --git a/wms-module-system/src/main/java/top/wms/admin/equipment/mapstruct/ProductConvert.java b/wms-module-system/src/main/java/top/wms/admin/equipment/mapstruct/ProductConvert.java deleted file mode 100644 index c392a17..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/equipment/mapstruct/ProductConvert.java +++ /dev/null @@ -1,20 +0,0 @@ -package top.wms.admin.equipment.mapstruct; - -import org.mapstruct.Mapper; -import org.mapstruct.Mapping; -import top.continew.starter.extension.crud.model.resp.LabelValueResp; -import top.wms.admin.equipment.model.entity.ProductDO; - -import java.util.List; - -@Mapper(componentModel = "spring") -public interface ProductConvert { - - @Mapping(source = "id", target = "value") - @Mapping(source = "name", target = "label") - @Mapping(source = "avatar", target = "extra") - LabelValueResp labelValue(ProductDO productDO); - - List labelValueList(List productDOS); - -} diff --git a/wms-module-system/src/main/java/top/wms/admin/equipment/model/entity/EquipmentDO.java b/wms-module-system/src/main/java/top/wms/admin/equipment/model/entity/EquipmentDO.java deleted file mode 100644 index a86f1bf..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/equipment/model/entity/EquipmentDO.java +++ /dev/null @@ -1,91 +0,0 @@ -package top.wms.admin.equipment.model.entity; - -import com.baomidou.mybatisplus.annotation.TableName; -import lombok.Data; -import top.wms.admin.common.model.entity.BaseDO; - -import java.io.Serial; - -/** - * 设备信息实体 - * - * @author zc - * @since 2025/03/26 17:10 - */ -@Data -@TableName("sys_equipment") -public class EquipmentDO extends BaseDO { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 所属产品Id - */ - private Long productId; - - /** - * 设备名称 - */ - private String name; - - /** - * 设备序列号 - */ - private String sequence; - - /** - * 设备Ip - */ - private String ip; - - /** - * 设备密码 - */ - private String password; - - /** - * 设备区域 - */ - private Long spaceId; - - /** - * 设备位置 - */ - private Long pointId; - - /** - * 备注 - */ - private String remark; - - /** - * 对接状态(0未对接 1对接成功) - */ - private Integer state; - - /** - * 设备状态(0在线 1离线) - */ - private String flag; - - /** - * 设备回调地址 - */ - private String backUrl; - - /** - * 是否采集设备 - */ - private String isCj; - - /** - * 门禁位置 1.进;2.出 - */ - private String entryExitType; - - /** - * 文件类型 1.图片;2.视频 - */ - private String fileType; -} diff --git a/wms-module-system/src/main/java/top/wms/admin/equipment/model/entity/ProductDO.java b/wms-module-system/src/main/java/top/wms/admin/equipment/model/entity/ProductDO.java deleted file mode 100644 index da5f763..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/equipment/model/entity/ProductDO.java +++ /dev/null @@ -1,78 +0,0 @@ -package top.wms.admin.equipment.model.entity; - -import lombok.Data; - -import com.baomidou.mybatisplus.annotation.TableName; - -import top.wms.admin.common.model.entity.BaseDO; - -import java.io.Serial; - -/** - * 产品信息实体 - * - * @author zc - * @since 2025/05/26 15:18 - */ -@Data -@TableName("sys_product") -public class ProductDO extends BaseDO { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 产品图片地址 - */ - private String avatar; - - /** - * 产品名称 - */ - private String name; - - /** - * 产品型号 - */ - private String version; - - /** - * 产品品类(大类) - */ - private String bigtype; - - /** - * 产品品类(小类) - */ - private String subtype; - - /** - * 节点类型 - */ - private String genre; - - /** - * 产品描述 - */ - private String describes; - - /** - * 联网方式 - */ - private String network; - - /** - * 数据格式 - */ - private String dataFormat; - - /** - * 数据校验级别 - */ - private String scale; - - /** - * 认证方式 - */ - private String attestation; -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/equipment/model/query/EquipmentQuery.java b/wms-module-system/src/main/java/top/wms/admin/equipment/model/query/EquipmentQuery.java deleted file mode 100644 index 71c4f71..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/equipment/model/query/EquipmentQuery.java +++ /dev/null @@ -1,53 +0,0 @@ -package top.wms.admin.equipment.model.query; - -import lombok.Data; - -import io.swagger.v3.oas.annotations.media.Schema; - -import top.continew.starter.data.core.annotation.Query; -import top.continew.starter.data.core.enums.QueryType; - -import java.io.Serial; -import java.io.Serializable; - -/** - * 设备信息查询条件 - * - * @author zc - * @since 2025/03/26 17:14 - */ -@Data -@Schema(description = "设备信息查询条件") -public class EquipmentQuery implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 设备名称 - */ - @Schema(description = "设备名称") - @Query(type = QueryType.LIKE) - private String name; - - /** - * 设备序列号 - */ - @Schema(description = "设备序列号") - @Query(type = QueryType.EQ) - private String sequence; - - /** - * 所属产品 - */ - @Schema(description = "所属产品") - @Query(type = QueryType.EQ) - private Long productId; - - /** - * 设备状态(0在线 1离线) - */ - @Schema(description = "设备状态(0在线 1离线)") - @Query(type = QueryType.EQ) - private String flag; -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/equipment/model/query/ProductQuery.java b/wms-module-system/src/main/java/top/wms/admin/equipment/model/query/ProductQuery.java deleted file mode 100644 index 55a598b..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/equipment/model/query/ProductQuery.java +++ /dev/null @@ -1,47 +0,0 @@ -package top.wms.admin.equipment.model.query; - -import lombok.Data; - -import io.swagger.v3.oas.annotations.media.Schema; - -import top.continew.starter.data.core.annotation.Query; -import top.continew.starter.data.core.enums.QueryType; - -import java.io.Serial; -import java.io.Serializable; -import java.time.*; - -/** - * 产品信息查询条件 - * - * @author zc - * @since 2025/05/26 15:18 - */ -@Data -@Schema(description = "产品信息查询条件") -public class ProductQuery implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 产品名称 - */ - @Schema(description = "产品名称") - @Query(type = QueryType.LIKE) - private String name; - - /** - * 产品名称 - */ - @Schema(description = "产品型号") - @Query(type = QueryType.LIKE) - private String version; - - /** - * 产品名称 - */ - @Schema(description = "节点类型") - @Query(type = QueryType.EQ) - private String genre; -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/equipment/model/req/EquipmentReq.java b/wms-module-system/src/main/java/top/wms/admin/equipment/model/req/EquipmentReq.java deleted file mode 100644 index cad9f0b..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/equipment/model/req/EquipmentReq.java +++ /dev/null @@ -1,142 +0,0 @@ -package top.wms.admin.equipment.model.req; - -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotBlank; -import lombok.Data; -import org.hibernate.validator.constraints.Length; - -import java.io.Serial; -import java.io.Serializable; -import java.time.LocalDateTime; - -/** - * 创建或修改设备信息参数 - * - * @author zc - * @since 2025/03/26 16:40 - */ -@Data -@Schema(description = "创建或修改设备信息参数") -public class EquipmentReq implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 设备Id - */ - @Schema(description = "设备Id") - private Long id; - - /** - * 所属产品Id - */ - @Schema(description = "所属产品Id") - private Long productId; - - /** - * 设备名称 - */ - @Schema(description = "设备名称") - @NotBlank(message = "设备名称不能为空") - @Length(max = 50, message = "设备名称长度不能超过 {max} 个字符") - private String name; - - /** - * 设备序列号 - */ - @Schema(description = "设备序列号") - @Length(max = 50, message = "设备序列号长度不能超过 {max} 个字符") - private String sequence; - - /** - * 设备Ip - */ - @Schema(description = "设备Ip") - @Length(max = 50, message = "设备Ip长度不能超过 {max} 个字符") - private String ip; - - /** - * 设备密码 - */ - @Schema(description = "设备密码") - @Length(max = 50, message = "设备密码长度不能超过 {max} 个字符") - private String password; - - /** - * 设备区域 - */ - @Schema(description = "设备区域") - private Long spaceId; - - /** - * 设备位置 - */ - @Schema(description = "设备位置") - private Long pointId; - - /** - * 备注 - */ - @Schema(description = "备注") - @Length(max = 200, message = "备注长度不能超过 {max} 个字符") - private String remark; - - /** - * - */ - @Schema(description = "") - private Long createUser; - - /** - * 创建时间 - */ - @Schema(description = "创建时间") - private LocalDateTime createTime; - - /** - * - */ - @Schema(description = "") - private Long updateUser; - - /** - * 更新时间 - */ - @Schema(description = "更新时间") - private LocalDateTime updateTime; - - /** - * 对接状态(0未对接 1对接成功) - */ - @Schema(description = "对接状态(0未对接 1对接成功)") - private Integer state; - - /** - * 设备状态(0在线 1离线) - */ - @Schema(description = "设备状态(0在线 1离线)") - @Length(max = 50, message = "设备状态(0在线 1离线)长度不能超过 {max} 个字符") - private String flag; - - /*** 设备回调地址 ***/ - private String backUrl; - - /** - * 是否采集设备 - */ - @Schema(description = "是否采集设备") - private String isCj; - - /** - * 门卡号码 - */ - private String doorNo; - - /** - * 门禁位置 1.进;2.出 - */ - @Schema(description = "门禁位置 1.进;2.出") - private String entryExitType; - -} diff --git a/wms-module-system/src/main/java/top/wms/admin/equipment/model/req/ProductReq.java b/wms-module-system/src/main/java/top/wms/admin/equipment/model/req/ProductReq.java deleted file mode 100644 index ffcb3c5..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/equipment/model/req/ProductReq.java +++ /dev/null @@ -1,105 +0,0 @@ -package top.wms.admin.equipment.model.req; - -import jakarta.validation.constraints.*; - -import lombok.Data; - -import io.swagger.v3.oas.annotations.media.Schema; - -import org.hibernate.validator.constraints.Length; - -import java.io.Serial; -import java.io.Serializable; -import java.time.*; - -/** - * 创建或修改产品信息参数 - * - * @author zc - * @since 2025/05/26 15:18 - */ -@Data -@Schema(description = "创建或修改产品信息参数") -public class ProductReq implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 产品图片地址 - */ - @Schema(description = "产品图片地址") - @Length(max = 500, message = "产品图片地址长度不能超过 {max} 个字符") - private String avatar; - - /** - * 产品名称 - */ - @Schema(description = "产品名称") - @NotBlank(message = "产品名称不能为空") - @Length(max = 50, message = "产品名称长度不能超过 {max} 个字符") - private String name; - - /** - * 产品型号 - */ - @Schema(description = "产品型号") - @Length(max = 500, message = "产品型号长度不能超过 {max} 个字符") - private String version; - - /** - * 产品品类(大类) - */ - @Schema(description = "产品品类(大类)") - @Length(max = 1, message = "产品品类(大类)长度不能超过 {max} 个字符") - private String bigtype; - - /** - * 产品品类(小类) - */ - @Schema(description = "产品品类(小类)") - @Length(max = 1, message = "产品品类(小类)长度不能超过 {max} 个字符") - private String subtype; - - /** - * 节点类型 - */ - @Schema(description = "节点类型") - @Length(max = 1, message = "节点类型长度不能超过 {max} 个字符") - private String genre; - - /** - * 产品描述 - */ - @Schema(description = "产品描述") - @Length(max = 200, message = "产品描述长度不能超过 {max} 个字符") - private String describes; - - /** - * 联网方式 - */ - @Schema(description = "联网方式") - @Length(max = 1, message = "联网方式长度不能超过 {max} 个字符") - private String network; - - /** - * 数据格式 - */ - @Schema(description = "数据格式") - @Length(max = 50, message = "数据格式长度不能超过 {max} 个字符") - private String dataFormat; - - /** - * 数据校验级别 - */ - @Schema(description = "数据校验级别") - @Length(max = 50, message = "数据校验级别长度不能超过 {max} 个字符") - private String scale; - - /** - * 认证方式 - */ - @Schema(description = "认证方式") - @Length(max = 1, message = "认证方式长度不能超过 {max} 个字符") - private String attestation; -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/equipment/model/resp/EquipmentDetailResp.java b/wms-module-system/src/main/java/top/wms/admin/equipment/model/resp/EquipmentDetailResp.java deleted file mode 100644 index f15b406..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/equipment/model/resp/EquipmentDetailResp.java +++ /dev/null @@ -1,125 +0,0 @@ -package top.wms.admin.equipment.model.resp; - -import lombok.Data; - -import io.swagger.v3.oas.annotations.media.Schema; - -import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; -import com.alibaba.excel.annotation.ExcelProperty; - -import top.wms.admin.common.model.resp.BaseDetailResp; - -import java.io.Serial; - -/** - * 设备信息详情信息 - * - * @author zc - * @since 2025/03/26 17:11 - */ -@Data -@ExcelIgnoreUnannotated -@Schema(description = "设备信息详情信息") -public class EquipmentDetailResp extends BaseDetailResp { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 所属产品Id - */ - @Schema(description = "所属产品Id") - @ExcelProperty(value = "所属产品Id") - private Long productId; - - /** - * 设备名称 - */ - @Schema(description = "设备名称") - @ExcelProperty(value = "设备名称") - private String name; - - /** - * 设备序列号 - */ - @Schema(description = "设备序列号") - @ExcelProperty(value = "设备序列号") - private String sequence; - - /** - * 设备Ip - */ - @Schema(description = "设备Ip") - @ExcelProperty(value = "设备Ip") - private String ip; - - /** - * 设备密码 - */ - @Schema(description = "设备密码") - @ExcelProperty(value = "设备密码") - private String password; - - /** - * 设备区域 - */ - @Schema(description = "设备区域") - @ExcelProperty(value = "设备区域") - private Long spaceId; - - /** - * 设备位置 - */ - @Schema(description = "设备位置") - @ExcelProperty(value = "设备位置") - private Long pointId; - - /** - * 备注 - */ - @Schema(description = "备注") - @ExcelProperty(value = "备注") - private String remark; - - /** - * 对接状态(0未对接 1对接成功) - */ - @Schema(description = "对接状态(0未对接 1对接成功)") - @ExcelProperty(value = "对接状态(0未对接 1对接成功)") - private Integer state; - - /** - * 设备状态(0在线 1离线) - */ - @Schema(description = "设备状态(0在线 1离线)") - @ExcelProperty(value = "设备状态(0在线 1离线)") - private String flag; - - /** - * 设备回调地址 - */ - @Schema(description = "设备回调地址") - @ExcelProperty(value = "设备回调地址") - private String backUrl; - - /** - * 是否采集设备 - */ - @Schema(description = "是否采集设备") - @ExcelProperty(value = "是否采集设备") - private String isCj; - - /** - * 门禁位置 1.进;2.出 - */ - @Schema(description = "门禁位置 1.进;2.出") - @ExcelProperty(value = "门禁位置 1.进;2.出") - private String entryExitType; - - /** - * 文件类型 1.图片;2.视频 - */ - @Schema(description = "文件类型 1.图片;2.视频") - @ExcelProperty(value = "文件类型 1.图片;2.视频") - private String fileType; -} diff --git a/wms-module-system/src/main/java/top/wms/admin/equipment/model/resp/EquipmentResp.java b/wms-module-system/src/main/java/top/wms/admin/equipment/model/resp/EquipmentResp.java deleted file mode 100644 index 9d3cde0..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/equipment/model/resp/EquipmentResp.java +++ /dev/null @@ -1,141 +0,0 @@ -package top.wms.admin.equipment.model.resp; - -import cn.crane4j.annotation.Assemble; -import cn.crane4j.annotation.Mapping; -import lombok.Data; - -import io.swagger.v3.oas.annotations.media.Schema; - -import top.wms.admin.common.constant.ContainerConstants; -import top.wms.admin.common.model.resp.BaseResp; - -import java.io.Serial; -import java.time.*; - -/** - * 设备信息信息 - * - * @author zc - * @since 2025/03/26 17:11 - */ -@Data -@Schema(description = "设备信息信息") -public class EquipmentResp extends BaseResp { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 所属产品Id - */ - @Schema(description = "所属产品Id") - @Assemble(props = @Mapping(src = "name", ref = "productName"), container = ContainerConstants.PRODUCT_NAME_AVATAR) - @Assemble(props = @Mapping(src = "avatar", ref = "avatar"), container = ContainerConstants.PRODUCT_NAME_AVATAR) - private Long productId; - - /** - * 产品名称 - */ - @Schema(description = "产品名称") - private String productName; - - /** - * 产品图片 - */ - @Schema(description = "产品图片") - private String avatar; - - /** - * 设备名称 - */ - @Schema(description = "设备名称") - private String name; - - /** - * 设备序列号 - */ - @Schema(description = "设备序列号") - private String sequence; - - /** - * 设备Ip - */ - @Schema(description = "设备Ip") - private String ip; - - /** - * 设备密码 - */ - @Schema(description = "设备密码") - private String password; - - /** - * 设备区域 - */ - @Schema(description = "设备区域") - private Long spaceId; - - /** - * 设备位置 - */ - @Schema(description = "设备位置") - private Long pointId; - - /** - * 备注 - */ - @Schema(description = "备注") - private String remark; - - /** - * - */ - @Schema(description = "") - private Long updateUser; - - /** - * 更新时间 - */ - @Schema(description = "更新时间") - private LocalDateTime updateTime; - - /** - * 对接状态(0未对接 1对接成功) - */ - @Schema(description = "对接状态(0未对接 1对接成功)") - private Integer state; - - /** - * 设备状态(0在线 1离线) - */ - @Schema(description = "设备状态(0在线 1离线)") - private String flag; - - /** - * 设备回调地址 - */ - @Schema(description = "设备回调地址") - private String backUrl; - - /** - * 是否采集设备 - */ - @Schema(description = "是否采集设备") - private String isCj; - - /** - * 门禁位置 1.进;2.出 - */ - @Schema(description = "门禁位置 1.进;2.出") - private String entryExitType; - - /** - * 文件类型 1.图片;2.视频 - */ - @Schema(description = "文件类型 1.图片;2.视频") - private String fileType; - - /** 门卡号码 */ - @Schema(name = "卡号") - private String doorNo; -} diff --git a/wms-module-system/src/main/java/top/wms/admin/equipment/model/resp/ProductDetailResp.java b/wms-module-system/src/main/java/top/wms/admin/equipment/model/resp/ProductDetailResp.java deleted file mode 100644 index 30f1463..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/equipment/model/resp/ProductDetailResp.java +++ /dev/null @@ -1,105 +0,0 @@ -package top.wms.admin.equipment.model.resp; - -import lombok.Data; - -import io.swagger.v3.oas.annotations.media.Schema; - -import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; -import com.alibaba.excel.annotation.ExcelProperty; - -import top.wms.admin.common.model.resp.BaseDetailResp; - -import java.io.Serial; -import java.time.*; - -/** - * 产品信息详情信息 - * - * @author zc - * @since 2025/05/26 15:18 - */ -@Data -@ExcelIgnoreUnannotated -@Schema(description = "产品信息详情信息") -public class ProductDetailResp extends BaseDetailResp { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 产品图片地址 - */ - @Schema(description = "产品图片地址") - @ExcelProperty(value = "产品图片地址") - private String avatar; - - /** - * 产品名称 - */ - @Schema(description = "产品名称") - @ExcelProperty(value = "产品名称") - private String name; - - /** - * 产品型号 - */ - @Schema(description = "产品型号") - @ExcelProperty(value = "产品型号") - private String version; - - /** - * 产品品类(大类) - */ - @Schema(description = "产品品类(大类)") - @ExcelProperty(value = "产品品类(大类)") - private String bigtype; - - /** - * 产品品类(小类) - */ - @Schema(description = "产品品类(小类)") - @ExcelProperty(value = "产品品类(小类)") - private String subtype; - - /** - * 节点类型 - */ - @Schema(description = "节点类型") - @ExcelProperty(value = "节点类型") - private String genre; - - /** - * 产品描述 - */ - @Schema(description = "产品描述") - @ExcelProperty(value = "产品描述") - private String describes; - - /** - * 联网方式 - */ - @Schema(description = "联网方式") - @ExcelProperty(value = "联网方式") - private String network; - - /** - * 数据格式 - */ - @Schema(description = "数据格式") - @ExcelProperty(value = "数据格式") - private String dataFormat; - - /** - * 数据校验级别 - */ - @Schema(description = "数据校验级别") - @ExcelProperty(value = "数据校验级别") - private String scale; - - /** - * 认证方式 - */ - @Schema(description = "认证方式") - @ExcelProperty(value = "认证方式") - private String attestation; -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/equipment/model/resp/ProductResp.java b/wms-module-system/src/main/java/top/wms/admin/equipment/model/resp/ProductResp.java deleted file mode 100644 index 4d9e36f..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/equipment/model/resp/ProductResp.java +++ /dev/null @@ -1,102 +0,0 @@ -package top.wms.admin.equipment.model.resp; - -import lombok.Data; - -import io.swagger.v3.oas.annotations.media.Schema; - -import top.wms.admin.common.model.resp.BaseDetailResp; - -import java.io.Serial; -import java.time.*; - -/** - * 产品信息信息 - * - * @author zc - * @since 2025/05/26 15:18 - */ -@Data -@Schema(description = "产品信息信息") -public class ProductResp extends BaseDetailResp { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 产品图片地址 - */ - @Schema(description = "产品图片地址") - private String avatar; - - /** - * 产品名称 - */ - @Schema(description = "产品名称") - private String name; - - /** - * 产品型号 - */ - @Schema(description = "产品型号") - private String version; - - /** - * 产品品类(大类) - */ - @Schema(description = "产品品类(大类)") - private String bigtype; - - /** - * 产品品类(小类) - */ - @Schema(description = "产品品类(小类)") - private String subtype; - - /** - * 节点类型 - */ - @Schema(description = "节点类型") - private String genre; - - /** - * 产品描述 - */ - @Schema(description = "产品描述") - private String describes; - - /** - * 联网方式 - */ - @Schema(description = "联网方式") - private String network; - - /** - * 数据格式 - */ - @Schema(description = "数据格式") - private String dataFormat; - - /** - * 数据校验级别 - */ - @Schema(description = "数据校验级别") - private String scale; - - /** - * 认证方式 - */ - @Schema(description = "认证方式") - private String attestation; - - /** - * 更新者 - */ - @Schema(description = "更新者") - private Long updateUser; - - /** - * 更新时间 - */ - @Schema(description = "更新时间") - private LocalDateTime updateTime; -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/equipment/service/EquipmentService.java b/wms-module-system/src/main/java/top/wms/admin/equipment/service/EquipmentService.java deleted file mode 100644 index 3725047..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/equipment/service/EquipmentService.java +++ /dev/null @@ -1,27 +0,0 @@ -package top.wms.admin.equipment.service; - -import top.continew.starter.extension.crud.model.resp.LabelValueResp; -import top.continew.starter.extension.crud.service.BaseService; -import top.wms.admin.equipment.model.query.EquipmentQuery; -import top.wms.admin.equipment.model.req.EquipmentReq; -import top.wms.admin.equipment.model.resp.EquipmentDetailResp; -import top.wms.admin.equipment.model.resp.EquipmentResp; - -import java.util.List; - -/** - * 设备信息业务接口 - * - * @author zc - * @since 2025/03/26 17:14 - */ -public interface EquipmentService extends BaseService { - - EquipmentResp selectSysEquipment(EquipmentReq equipment); - - List getEquipmentNameList(EquipmentReq equipmentReq); - - EquipmentResp selectEquipmentById(Long id); - - String getEquipmentName(Long id); -} diff --git a/wms-module-system/src/main/java/top/wms/admin/equipment/service/ProductService.java b/wms-module-system/src/main/java/top/wms/admin/equipment/service/ProductService.java deleted file mode 100644 index 2591d7a..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/equipment/service/ProductService.java +++ /dev/null @@ -1,23 +0,0 @@ -package top.wms.admin.equipment.service; - -import top.continew.starter.extension.crud.model.resp.LabelValueResp; -import top.continew.starter.extension.crud.service.BaseService; -import top.wms.admin.equipment.model.entity.ProductDO; -import top.wms.admin.equipment.model.query.ProductQuery; -import top.wms.admin.equipment.model.req.ProductReq; -import top.wms.admin.equipment.model.resp.ProductResp; - -import java.util.List; - -/** - * 产品信息业务接口 - * - * @author zc - * @since 2025/05/26 15:18 - */ -public interface ProductService extends BaseService { - - List getProductNameAvatarList(); - - List getProductNameList(); -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/equipment/service/impl/EquipmentServiceImpl.java b/wms-module-system/src/main/java/top/wms/admin/equipment/service/impl/EquipmentServiceImpl.java deleted file mode 100644 index 57a5970..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/equipment/service/impl/EquipmentServiceImpl.java +++ /dev/null @@ -1,119 +0,0 @@ -package top.wms.admin.equipment.service.impl; - -import cn.crane4j.annotation.AutoOperate; -import cn.crane4j.annotation.ContainerMethod; -import cn.crane4j.annotation.MappingType; -import cn.hutool.core.util.ObjectUtil; -import cn.hutool.core.util.StrUtil; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import lombok.RequiredArgsConstructor; - -import org.apache.commons.lang3.StringUtils; -import org.springframework.stereotype.Service; - -import top.continew.starter.data.mp.util.QueryWrapperHelper; -import top.continew.starter.extension.crud.model.query.PageQuery; -import top.continew.starter.extension.crud.model.resp.LabelValueResp; -import top.continew.starter.extension.crud.model.resp.PageResp; -import top.continew.starter.extension.crud.service.BaseServiceImpl; -import top.wms.admin.common.constant.ContainerConstants; -import top.wms.admin.equipment.mapper.EquipmentMapper; -import top.wms.admin.equipment.mapstruct.EquipmentConvert; -import top.wms.admin.equipment.model.entity.EquipmentDO; -import top.wms.admin.equipment.model.query.EquipmentQuery; -import top.wms.admin.equipment.model.req.EquipmentReq; -import top.wms.admin.equipment.model.resp.EquipmentDetailResp; -import top.wms.admin.equipment.model.resp.EquipmentResp; -import top.wms.admin.equipment.service.EquipmentService; -import top.wms.admin.yfApi.service.IYFPushService; - -import java.util.List; - -/** - * 设备信息业务实现 - * - * @author zc - * @since 2025/03/26 17:14 - */ -@Service -@RequiredArgsConstructor -public class EquipmentServiceImpl extends BaseServiceImpl implements EquipmentService { - - private final EquipmentConvert equipmentConvert; - - private final IYFPushService iyfPushService; - - @Override - @AutoOperate(type = EquipmentResp.class, on = "list") - public PageResp page(EquipmentQuery query, PageQuery pageQuery) { - QueryWrapper queryWrapper = QueryWrapperHelper.build(query, pageQuery.getSort()); - IPage page = baseMapper.selectPage(new Page<>(pageQuery.getPage(), pageQuery - .getSize()), queryWrapper); - return PageResp.build(page.convert(equipmentConvert::DOToResp)); - } - - @Override - public EquipmentResp selectSysEquipment(EquipmentReq equipment) { - LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); - queryWrapper.eq(ObjectUtil.isNotEmpty(equipment.getName()), EquipmentDO::getName, equipment.getName()); - queryWrapper.eq(null != equipment.getPointId(), EquipmentDO::getPointId, equipment.getPointId()); - queryWrapper.eq(StrUtil.isNotBlank(equipment.getFlag()), EquipmentDO::getFlag, equipment.getFlag()); - queryWrapper.eq(StrUtil.isNotBlank(equipment.getIsCj()), EquipmentDO::getIsCj, equipment.getIsCj()); - queryWrapper.eq(null != equipment.getProductId(), EquipmentDO::getProductId, equipment.getProductId()); - return equipmentConvert.DOToResp(baseMapper.selectOne(queryWrapper)); - } - - @Override - public List getEquipmentNameList(EquipmentReq equipmentReq) { - LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); - queryWrapper.eq(null != equipmentReq.getPointId(), EquipmentDO::getPointId, equipmentReq.getPointId()); - queryWrapper.eq(StrUtil.isNotBlank(equipmentReq.getFlag()), EquipmentDO::getFlag, equipmentReq.getFlag()); - queryWrapper.eq(StrUtil.isNotBlank(equipmentReq.getIsCj()), EquipmentDO::getIsCj, equipmentReq.getIsCj()); - queryWrapper.eq(null != equipmentReq.getProductId(), EquipmentDO::getProductId, equipmentReq.getProductId()); - queryWrapper.orderByDesc(EquipmentDO::getId); - List equipmentDOS = baseMapper.selectList(queryWrapper); - return equipmentConvert.labelValueList(equipmentDOS); - } - - @Override - public EquipmentResp selectEquipmentById(Long id) { - LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); - queryWrapper.eq(null != id, EquipmentDO::getId, id); - return equipmentConvert.DOToResp(baseMapper.selectOne(queryWrapper)); - } - - @Override - public void afterAdd(EquipmentReq equipmentReq, EquipmentDO equipmentDO) { - if (StringUtils.isNotEmpty(equipmentReq.getBackUrl())) { - iyfPushService.setIdentifyCallBack(equipmentReq.getBackUrl(), equipmentDO.getIp(), equipmentDO - .getPassword()); - iyfPushService.setDeviceHeartBeat(equipmentReq.getBackUrl(), equipmentDO.getIp(), equipmentDO - .getPassword()); - } - } - - @Override - public void afterUpdate(EquipmentReq equipmentReq, EquipmentDO equipmentDO) { - if (StringUtils.isNotEmpty(equipmentReq.getBackUrl())) { - iyfPushService.setIdentifyCallBack(equipmentReq.getBackUrl(), equipmentDO.getIp(), equipmentDO - .getPassword()); - iyfPushService.setDeviceHeartBeat(equipmentReq.getBackUrl(), equipmentDO.getIp(), equipmentDO - .getPassword()); - } - } - - @Override - @ContainerMethod(namespace = ContainerConstants.EQUIPMENT_NAME, type = MappingType.ORDER_OF_KEYS) - public String getEquipmentName(Long id) { - if (null == id) { - return ""; - } - - EquipmentDO equipmentDO = baseMapper.lambdaQuery().eq(EquipmentDO::getId, id).one(); - return equipmentDO != null ? equipmentDO.getName() : ""; - } - -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/equipment/service/impl/ProductServiceImpl.java b/wms-module-system/src/main/java/top/wms/admin/equipment/service/impl/ProductServiceImpl.java deleted file mode 100644 index d6f93a1..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/equipment/service/impl/ProductServiceImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -package top.wms.admin.equipment.service.impl; - -import cn.crane4j.annotation.ContainerMethod; -import cn.crane4j.annotation.MappingType; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import lombok.RequiredArgsConstructor; - -import org.springframework.stereotype.Service; - -import top.continew.starter.extension.crud.model.resp.LabelValueResp; -import top.continew.starter.extension.crud.service.BaseServiceImpl; -import top.wms.admin.common.constant.ContainerConstants; -import top.wms.admin.equipment.mapper.ProductMapper; -import top.wms.admin.equipment.mapstruct.ProductConvert; -import top.wms.admin.equipment.model.entity.ProductDO; -import top.wms.admin.equipment.model.query.ProductQuery; -import top.wms.admin.equipment.model.req.ProductReq; -import top.wms.admin.equipment.model.resp.ProductResp; -import top.wms.admin.equipment.service.ProductService; - -import java.util.List; - -/** - * 产品信息业务实现 - * - * @author zc - * @since 2025/05/26 15:18 - */ -@Service -@RequiredArgsConstructor -public class ProductServiceImpl extends BaseServiceImpl implements ProductService { - - private final ProductConvert productConvert; - - @Override - @ContainerMethod(namespace = ContainerConstants.PRODUCT_NAME_AVATAR, resultType = ProductDO.class, resultKey = "id", type = MappingType.ONE_TO_ONE) - public List getProductNameAvatarList() { - return baseMapper.selectList(new QueryWrapper().select("id", "avatar", "name")); - } - - @Override - public List getProductNameList() { - List productDOS = baseMapper.selectList(new QueryWrapper<>()); - return productConvert.labelValueList(productDOS); - } - -} diff --git a/wms-module-system/src/main/java/top/wms/admin/peopleBranch/mapper/BranchMapper.java b/wms-module-system/src/main/java/top/wms/admin/peopleBranch/mapper/BranchMapper.java deleted file mode 100644 index 404c1c4..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/peopleBranch/mapper/BranchMapper.java +++ /dev/null @@ -1,21 +0,0 @@ -package top.wms.admin.peopleBranch.mapper; - -// import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import org.springframework.stereotype.Repository; -import top.continew.starter.data.mp.base.BaseMapper; -import top.wms.admin.peopleBranch.model.entity.BranchDO; -import top.wms.admin.peopleBranch.model.resp.BranchResp; - -import java.util.List; - -/** - * 部门管理 Mapper - * - * @author zc - * @since 2025/03/19 17:46 - */ -@Repository -public interface BranchMapper extends BaseMapper { - - List queryJuniorBranch(String branchId); -} diff --git a/wms-module-system/src/main/java/top/wms/admin/peopleBranch/mapper/BranchRuleMapper.java b/wms-module-system/src/main/java/top/wms/admin/peopleBranch/mapper/BranchRuleMapper.java deleted file mode 100644 index 9c43802..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/peopleBranch/mapper/BranchRuleMapper.java +++ /dev/null @@ -1,20 +0,0 @@ -package top.wms.admin.peopleBranch.mapper; - -import org.springframework.stereotype.Repository; -import top.continew.starter.data.mp.base.BaseMapper; -import top.wms.admin.peopleBranch.model.entity.BranchRuleDO; -import top.wms.admin.peopleBranch.model.resp.BranchRuleResp; - -import java.util.List; - -/** - * 通行规则 Mapper - * - * @author zc - * @since 2025/03/26 22:59 - */ -@Repository -public interface BranchRuleMapper extends BaseMapper { - - List selectRuleNames(); -} diff --git a/wms-module-system/src/main/java/top/wms/admin/peopleBranch/mapper/PeopleMapper.java b/wms-module-system/src/main/java/top/wms/admin/peopleBranch/mapper/PeopleMapper.java deleted file mode 100644 index 176cb66..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/peopleBranch/mapper/PeopleMapper.java +++ /dev/null @@ -1,60 +0,0 @@ -package top.wms.admin.peopleBranch.mapper; - -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.core.toolkit.Constants; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Repository; -import top.continew.starter.data.mp.base.BaseMapper; -import top.wms.admin.peopleBranch.model.entity.PeopleDO; -import top.wms.admin.peopleBranch.model.resp.ConsumePeopleResp; -import top.wms.admin.peopleBranch.model.resp.PeopleResp; - -import java.util.List; - -/** - * 人员管理业 Mapper - * - * @author zc - * @since 2025/03/19 17:46 - */ -@Repository -public interface PeopleMapper extends BaseMapper { - - /** - * 导出消费人员充值列表 - * - * @param queryWrapper - * @return - */ - List selectExportConsume(@Param(Constants.WRAPPER) QueryWrapper queryWrapper); - - /** - * 导出人员列表 - * - * @param queryWrapper - * @return - */ - List selectExportPeople(@Param(Constants.WRAPPER) QueryWrapper queryWrapper); - - /** - * 分页查询人员充值列表 - * - * @param objectPage - * @param queryWrapper - * @return - */ - IPage selectPageConsume(@Param("page") Page objectPage, - @Param(Constants.WRAPPER) QueryWrapper queryWrapper); - - /** - * 分页查询人员充值列表 - * - * @param objectPage - * @param queryWrapper - * @return - */ - IPage selectPeoplePage(@Param("page") Page objectPage, - @Param(Constants.WRAPPER) QueryWrapper queryWrapper); -} diff --git a/wms-module-system/src/main/java/top/wms/admin/peopleBranch/mapstruct/BranchConvert.java b/wms-module-system/src/main/java/top/wms/admin/peopleBranch/mapstruct/BranchConvert.java deleted file mode 100644 index f4b842f..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/peopleBranch/mapstruct/BranchConvert.java +++ /dev/null @@ -1,18 +0,0 @@ -package top.wms.admin.peopleBranch.mapstruct; - -import org.mapstruct.Mapper; -import top.wms.admin.peopleBranch.model.entity.BranchDO; -import top.wms.admin.peopleBranch.model.req.BranchReq; -import top.wms.admin.peopleBranch.model.resp.BranchResp; - -import java.util.List; - -@Mapper(componentModel = "spring") -public interface BranchConvert { - - BranchResp branchDOToResp(BranchDO branchDO); - - BranchDO branchReqToDO(BranchReq branchReq); - - List ListDOToResp(List branchDOS); -} diff --git a/wms-module-system/src/main/java/top/wms/admin/peopleBranch/mapstruct/PeopleConvert.java b/wms-module-system/src/main/java/top/wms/admin/peopleBranch/mapstruct/PeopleConvert.java deleted file mode 100644 index aa7b6f4..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/peopleBranch/mapstruct/PeopleConvert.java +++ /dev/null @@ -1,33 +0,0 @@ -package top.wms.admin.peopleBranch.mapstruct; - -import org.mapstruct.Mapper; -import org.mapstruct.Mapping; -import top.continew.starter.extension.crud.model.resp.LabelValueResp; -import top.wms.admin.peopleBranch.model.entity.PeopleDO; - -import java.util.List; - -@Mapper(componentModel = "spring") -public interface PeopleConvert { - - List labelValueList(List peopleDOS); - - @Mapping(source = "id", target = "value") - @Mapping(source = "name", target = "label") - LabelValueResp labelValueResp(PeopleDO peopleDO); - - /*@Mapping(target = "isConsume", expression = "java(convertEnableEnum(peopleDO.getIsConsume()))") - ConsumePeopleResp toConsumePeopleResp(PeopleDO peopleDO); - - default EnableEnum convertEnableEnum(Integer isConsume) { - if (isConsume == null) { - return null; - } - for (EnableEnum value : EnableEnum.values()) { - if (value.getValue().equals(isConsume)) { - return value; - } - } - return null; - }*/ -} diff --git a/wms-module-system/src/main/java/top/wms/admin/peopleBranch/mapstruct/SexConverter.java b/wms-module-system/src/main/java/top/wms/admin/peopleBranch/mapstruct/SexConverter.java deleted file mode 100644 index 86515b0..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/peopleBranch/mapstruct/SexConverter.java +++ /dev/null @@ -1,55 +0,0 @@ -package top.wms.admin.peopleBranch.mapstruct; - -import com.alibaba.excel.converters.Converter; -import com.alibaba.excel.enums.CellDataTypeEnum; -import com.alibaba.excel.metadata.GlobalConfiguration; -import com.alibaba.excel.metadata.data.ReadCellData; -import com.alibaba.excel.metadata.data.WriteCellData; -import com.alibaba.excel.metadata.property.ExcelContentProperty; - -import java.util.HashMap; -import java.util.Map; - -public class SexConverter implements Converter { - - private static final Map SEX_MAP = new HashMap<>(); - static { - SEX_MAP.put(1, "男"); - SEX_MAP.put(2, "女"); - SEX_MAP.put(4, "保密"); - } - - @Override - public Class supportJavaTypeKey() { - return Integer.class; // 支持的 Java 类型 - } - - @Override - public CellDataTypeEnum supportExcelTypeKey() { - return CellDataTypeEnum.STRING; // 写入 Excel 时用字符串 - } - - @Override - public WriteCellData convertToExcelData(Integer value, - ExcelContentProperty contentProperty, - GlobalConfiguration globalConfiguration) { - if (value == null) { - return new WriteCellData<>("未知"); - } - String label = SEX_MAP.getOrDefault(value, "未知"); - return new WriteCellData<>(label); - } - - @Override - public Integer convertToJavaData(ReadCellData cellData, - ExcelContentProperty contentProperty, - GlobalConfiguration globalConfiguration) { - String stringValue = cellData.getStringValue(); - for (Map.Entry entry : SEX_MAP.entrySet()) { - if (entry.getValue().equals(stringValue)) { - return entry.getKey(); - } - } - return null; - } -} diff --git a/wms-module-system/src/main/java/top/wms/admin/peopleBranch/model/entity/BranchDO.java b/wms-module-system/src/main/java/top/wms/admin/peopleBranch/model/entity/BranchDO.java deleted file mode 100644 index 4b78b97..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/peopleBranch/model/entity/BranchDO.java +++ /dev/null @@ -1,81 +0,0 @@ -package top.wms.admin.peopleBranch.model.entity; - -import com.baomidou.mybatisplus.annotation.TableName; -import lombok.Data; -import top.wms.admin.common.model.entity.BaseStrIdDO; - -import java.io.Serial; - -/** - * 部门管理实体 - * - * @author zc - * @since 2025/03/19 17:40 - */ -@Data -@TableName("sys_branch") -public class BranchDO extends BaseStrIdDO { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 部门名称 - */ - private String name; - - /** - * 部门负责人 - */ - private String leader; - - /** - * 联系电话 - */ - private String phone; - - /** - * 父级Id - */ - private String parentId; - - /** - * 祖级列表 - */ - private String ancestors; - - /** - * 所属空间 - */ - private Long spaceId; - - /** - * 备注 - */ - private String remark; - - /** - * 关联部门 - */ - private Long deptId; - - /** - * - */ - private String level; - - /** - * 部门code - */ - private String deptCode; - - /** - * 梯控规则id - */ - private String ladderRuleId; - - /** - * 访客是否审核 0 否;1 是 - */ - private String isExamine; -} diff --git a/wms-module-system/src/main/java/top/wms/admin/peopleBranch/model/entity/BranchRuleDO.java b/wms-module-system/src/main/java/top/wms/admin/peopleBranch/model/entity/BranchRuleDO.java deleted file mode 100644 index 36c9491..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/peopleBranch/model/entity/BranchRuleDO.java +++ /dev/null @@ -1,28 +0,0 @@ -package top.wms.admin.peopleBranch.model.entity; - -import com.baomidou.mybatisplus.annotation.TableName; -import lombok.Builder; -import lombok.Data; - -/** - * 通行规则实体 - * - * @author zc - * @since 2025/03/26 22:58 - */ -@Data -@Builder -@TableName("sys_branch_rule") -public class BranchRuleDO { - - /** - * 部门id - */ - private String branchId; - - /** - * 规则id - */ - private Long ruleId; - -} diff --git a/wms-module-system/src/main/java/top/wms/admin/peopleBranch/model/entity/PeopleDO.java b/wms-module-system/src/main/java/top/wms/admin/peopleBranch/model/entity/PeopleDO.java deleted file mode 100644 index 1e6eb4f..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/peopleBranch/model/entity/PeopleDO.java +++ /dev/null @@ -1,148 +0,0 @@ -package top.wms.admin.peopleBranch.model.entity; - -import com.baomidou.mybatisplus.annotation.TableName; -import lombok.Data; -import top.wms.admin.common.model.entity.BaseDO; - -import java.io.Serial; -import java.math.BigDecimal; -import java.util.Date; - -/** - * 人员管理实体 - * - * @author zc - * @since 2025/03/21 18:10 - */ -@Data -@TableName("sys_people") -public class PeopleDO extends BaseDO { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 人员名称 - */ - private String name; - - /** - * 联系电话 - */ - private String phone; - - /** - * 用户性别(1男 2女 4保密) - */ - private Integer sex; - - /** - * 头像地址 - */ - private String avatar; - - /** - * 所在部门 - */ - private String branchId; - - /** - * 职位标签 - */ - private String position; - - /** - * 身份证号码 - */ - private String idcard; - - /** - * 门卡号码 - */ - private String doorNo; - - /** - * 人员编号对接 - */ - private String guid; - - /** - * 人像对接 - */ - private String faceGuid; - - /** - * 关联用户 - */ - private Long userId; - - /** - * 备注 - */ - private String remark; - - /** - * 工号 - */ - private String gh; - - /** - * 指纹特征值 - */ - private String fingerprint; - - /** - * 入职时间 - */ - private Date joinTime; - - /** - * 下发次数 - */ - private Long down; - - /** - * - */ - private String delFlag; - - /** - * 微信公众号id - */ - private String openid; - - /** - * 消费标志(0未同步 1已同步 2删除同步) - */ - private Integer xfFlag; - - /** - * 充值金额 - */ - private BigDecimal czje; - - /** - * 补贴金额 - */ - private BigDecimal btje; - - /** - * 是否消费 0:否,1:是 - */ - private Integer isConsume; - - /** - * 消费金额 - */ - private BigDecimal xfje; - - /** - * 消费次数 - */ - private Integer xfcs; - - /** - * 是否冻结 0:否,1:是 - */ - private Integer freeze; -} diff --git a/wms-module-system/src/main/java/top/wms/admin/peopleBranch/model/query/BranchQuery.java b/wms-module-system/src/main/java/top/wms/admin/peopleBranch/model/query/BranchQuery.java deleted file mode 100644 index 64028ae..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/peopleBranch/model/query/BranchQuery.java +++ /dev/null @@ -1,39 +0,0 @@ -package top.wms.admin.peopleBranch.model.query; - -import lombok.Data; - -import io.swagger.v3.oas.annotations.media.Schema; - -import top.continew.starter.data.core.annotation.Query; -import top.continew.starter.data.core.enums.QueryType; - -import java.io.Serial; -import java.io.Serializable; - -/** - * 部门管理查询条件 - * - * @author zc - * @since 2025/03/19 17:40 - */ -@Data -@Schema(description = "部门管理查询条件") -public class BranchQuery implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 部门名称 - */ - @Schema(description = "部门名称") - @Query(type = QueryType.EQ) - private String name; - - /** - * 部门负责人 - */ - @Schema(description = "部门负责人") - @Query(type = QueryType.EQ) - private String leader; -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/peopleBranch/model/query/PeopleQuery.java b/wms-module-system/src/main/java/top/wms/admin/peopleBranch/model/query/PeopleQuery.java deleted file mode 100644 index e151a45..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/peopleBranch/model/query/PeopleQuery.java +++ /dev/null @@ -1,111 +0,0 @@ -package top.wms.admin.peopleBranch.model.query; - -import lombok.Builder; -import lombok.Data; - -import io.swagger.v3.oas.annotations.media.Schema; -import top.continew.starter.data.core.annotation.Query; -import top.continew.starter.data.core.enums.QueryType; - -import java.io.Serial; -import java.io.Serializable; -import java.util.List; - -/** - * 人员管理查询条件 - * - * @author zc - * @since 2025/03/21 18:10 - */ -@Data -@Schema(description = "人员管理查询条件") -@Builder -public class PeopleQuery implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 主键id - */ - private String id; - - /** - * 主键ids - */ - @Query(columns = {"id"}, type = QueryType.IN) - private List ids; - - /** - * 人员名称 - */ - @Schema(description = "人员名称") - private String name; - - /** - * 部门 - */ - @Schema(description = "部门") - private String branchId; - - /** - * 联系电话 - */ - @Schema(description = "联系电话") - private String phone; - - /** - * 身份证号码 - */ - @Schema(description = "身份证号码") - private String idcard; - - /** - * 是否注册 - */ - @Schema(description = "是否注册") - private String guidFlag; - - /** - * 是否下发 - */ - @Schema(description = "是否下发") - private String downFlag; - - /** - * 人脸注册 - */ - @Schema(description = "人脸注册") - private String faceFlag; - - /** - * 卡号注册 - */ - @Schema(description = "卡号注册") - private String cardFlag; - - /** - * 卡号 - */ - @Schema(description = "卡号") - private String doorNo; - - /** - * 工号 - */ - @Schema(description = "工号") - private String gh; - - /** - * 是否消费 0:否,1:是 - */ - @Schema(description = "是否消费 0:否,1:是") - private Integer isConsume; - - /** - * 是否冻结 0:否,1:是 - */ - @Schema(description = "是否冻结 0:否,1:是") - private Integer freeze; - -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/peopleBranch/model/req/BranchReq.java b/wms-module-system/src/main/java/top/wms/admin/peopleBranch/model/req/BranchReq.java deleted file mode 100644 index 8fbcc1a..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/peopleBranch/model/req/BranchReq.java +++ /dev/null @@ -1,69 +0,0 @@ -package top.wms.admin.peopleBranch.model.req; - -import jakarta.validation.constraints.*; - -import lombok.Data; - -import io.swagger.v3.oas.annotations.media.Schema; - -import org.hibernate.validator.constraints.Length; - -import java.io.Serial; -import java.io.Serializable; -import java.util.List; - -/** - * 创建或修改部门管理参数 - * - * @author zc - * @since 2025/03/19 17:40 - */ -@Data -@Schema(description = "创建或修改部门管理参数") -public class BranchReq implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 部门名称 - */ - @Schema(description = "部门名称") - @NotBlank(message = "部门名称不能为空") - @Length(max = 50, message = "部门名称长度不能超过 {max} 个字符") - private String name; - - /** - * 部门负责人 - */ - @Schema(description = "部门负责人") - @Length(max = 50, message = "部门负责人长度不能超过 {max} 个字符") - private String leader; - - /** - * 联系电话 - */ - @Schema(description = "联系电话") - @Length(max = 50, message = "联系电话长度不能超过 {max} 个字符") - private String phone; - - /** - * 父级Id - */ - @Schema(description = "父级Id") - @NotBlank(message = "父级Id不能为空") - @Length(max = 36, message = "父级Id长度不能超过 {max} 个字符") - private String parentId; - - /** - * 关联部门 - */ - @Schema(description = "关联部门") - private Long deptId; - - /** - * 规则id - */ - @Schema(description = "规则ids") - private List ruleIdList; -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/peopleBranch/model/req/PeopleImportReq.java b/wms-module-system/src/main/java/top/wms/admin/peopleBranch/model/req/PeopleImportReq.java deleted file mode 100644 index 7a9c6b9..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/peopleBranch/model/req/PeopleImportReq.java +++ /dev/null @@ -1,51 +0,0 @@ -package top.wms.admin.peopleBranch.model.req; - -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.NotNull; -import lombok.Data; -import top.wms.admin.common.enums.DisEnableStatusEnum; -import top.wms.admin.system.enums.ImportPolicyEnum; - -import java.io.Serial; - -@Data -@Schema(description = "人员导入参数") -public class PeopleImportReq { - @Serial - private static final long serialVersionUID = 1L; - - /** - * 导入会话KEY - */ - @Schema(description = "导入会话KEY", example = "1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed") - @NotBlank(message = "导入已过期,请重新上传") - private String importKey; - - /** - * 用户重复策略 - */ - @Schema(description = "重复用户策略", example = "1") - @NotNull(message = "重复用户策略不能为空") - private ImportPolicyEnum duplicateUser; - - /** - * 重复邮箱策略 - */ - // @Schema(description = "重复邮箱策略", example = "1") - // @NotNull(message = "重复邮箱策略不能为空") - // private ImportPolicyEnum duplicateEmail; - - /** - * 重复手机策略 - */ - // @Schema(description = "重复手机策略", example = "1") - // @NotNull(message = "重复手机策略不能为空") - // private ImportPolicyEnum duplicatePhone; - - /** - * 默认状态 - */ - @Schema(description = "默认状态", example = "1") - private DisEnableStatusEnum defaultStatus; -} diff --git a/wms-module-system/src/main/java/top/wms/admin/peopleBranch/model/req/PeopleImportRowReq.java b/wms-module-system/src/main/java/top/wms/admin/peopleBranch/model/req/PeopleImportRowReq.java deleted file mode 100644 index 3104930..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/peopleBranch/model/req/PeopleImportRowReq.java +++ /dev/null @@ -1,65 +0,0 @@ -package top.wms.admin.peopleBranch.model.req; - -import cn.hutool.core.lang.RegexPool; -import com.alibaba.excel.annotation.ExcelProperty; -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.Pattern; -import lombok.Data; -import top.wms.admin.common.constant.RegexConstants; -import top.wms.admin.peopleBranch.mapstruct.SexConverter; - -import java.io.Serial; -import java.io.Serializable; -import java.util.Date; - -@Data -@Schema(description = "人员导入行数据") -public class PeopleImportRowReq implements Serializable { - @Serial - private static final long serialVersionUID = 1L; - - /** - * 用户名 - */ - @NotBlank(message = "用户名不能为空") - @Pattern(regexp = RegexConstants.USERNAME, message = "用户名长度为 4-64 个字符,支持大小写字母、数字、下划线,以字母开头") - @ExcelProperty(value = "姓名", order = 2) - private String name; - - /** - * 部门名称 - */ - @NotBlank(message = "所属部门不能为空") - @ExcelProperty(value = "部门名称", order = 6) - private String branchName; - - /** - * 性别 - */ - @ExcelProperty(value = "性别", converter = SexConverter.class, order = 4) - private Integer sex; - - /** - * 手机号码 - */ - @Pattern(regexp = "^$|" + RegexPool.MOBILE, message = "手机号码格式错误") - @ExcelProperty(value = "联系电话", order = 3) - private String phone; - - @ExcelProperty(value = "工号", order = 1) - private String gh; - - @ExcelProperty(value = "职位标签", order = 7) - private String position; - - @ExcelProperty(value = "身份证号码", order = 8) - private String idcard; - - @ExcelProperty(value = "卡号", order = 9) - private String doorNo; - - @ExcelProperty(value = "入职时间", order = 10) - private Date joinTime; - -} diff --git a/wms-module-system/src/main/java/top/wms/admin/peopleBranch/model/req/PeopleReq.java b/wms-module-system/src/main/java/top/wms/admin/peopleBranch/model/req/PeopleReq.java deleted file mode 100644 index 304a1e3..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/peopleBranch/model/req/PeopleReq.java +++ /dev/null @@ -1,183 +0,0 @@ -package top.wms.admin.peopleBranch.model.req; - -import com.fasterxml.jackson.annotation.JsonFormat; -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.NotNull; -import lombok.Data; -import org.hibernate.validator.constraints.Length; - -import java.io.Serial; -import java.io.Serializable; -import java.math.BigDecimal; -import java.util.Date; -import java.util.List; - -/** - * 创建或修改人员管理参数 - * - * @author zc - * @since 2025/03/21 18:10 - */ -@Data -@Schema(description = "创建或修改人员管理参数") -public class PeopleReq implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 主键id - */ - @Schema(description = "主键id") - private Long id; - - /** - * 人员名称 - */ - @Schema(description = "人员名称") - @NotBlank(message = "人员名称不能为空") - @Length(max = 25, message = "人员名称长度不能超过 {max} 个字符") - private String name; - - /** - * 联系电话 - */ - @Schema(description = "联系电话") - @Length(max = 50, message = "联系电话长度不能超过 {max} 个字符") - private String phone; - - /** - * 用户性别(0男 1女 2保密) - */ - @Schema(description = "用户性别(1男 2女 4保密)") - private Integer sex; - - /** - * 头像地址 - */ - @Schema(description = "头像地址") - @Length(max = 500, message = "头像地址长度不能超过 {max} 个字符") - private String avatar; - - /** - * 所在部门 - */ - @Schema(description = "所在部门") - @NotNull(message = "所属部门不能为空") - @Length(max = 36, message = "所在部门长度不能超过 {max} 个字符") - private String branchId; - - /** - * 职位标签 - */ - @Schema(description = "职位标签") - @Length(max = 50, message = "职位标签长度不能超过 {max} 个字符") - private String position; - - /** - * 身份证号码 - */ - @Schema(description = "身份证号码") - @Length(max = 50, message = "身份证号码长度不能超过 {max} 个字符") - private String idcard; - - /** - * 门卡号码 - */ - @Schema(description = "门卡号码") - @Length(max = 50, message = "门卡号码长度不能超过 {max} 个字符") - private String doorNo; - - /** - * 人员编号对接 - */ - @Schema(description = "人员编号对接") - @Length(max = 200, message = "人员编号对接长度不能超过 {max} 个字符") - private String guid; - - /** - * 人像对接 - */ - @Schema(description = "人像对接") - @Length(max = 200, message = "人像对接长度不能超过 {max} 个字符") - private String faceGuid; - - /** - * 关联用户 - */ - @Schema(description = "关联用户") - private Long userId; - - /** - * 备注 - */ - @Schema(description = "备注") - @Length(max = 200, message = "备注长度不能超过 {max} 个字符") - private String remark; - - /** - * 工号 - */ - @Schema(description = "工号") - @NotNull(message = "工号不能为空") - @Length(max = 8, message = "工号长度不能超过 {max} 个字符") - private String gh; - - /** - * 指纹特征值 - */ - @Schema(description = "指纹特征值") - @Length(max = 255, message = "指纹特征值长度不能超过 {max} 个字符") - private String fingerprint; - - /** - * 入职时间 - */ - @Schema(description = "入职时间") - @JsonFormat(pattern = "yyyy-MM-dd") - private Date joinTime; - - /** - * 入职时间 - */ - @Schema(description = "入职时间") - private Long down; - - /** - * 是否需要下发设备(用于修改人员信息时,校验是否修改人员姓名,照片等需要下发的设备的参数) - */ - @Schema(description = "是否需要下发设备") - private Boolean needDown = false; - - /** - * 人员id列表 - */ - @Schema(description = "人员id列表") - private List ids; - - /** - * 消费充值的金额or补贴的金额 - */ - @Schema(description = "金额") - private BigDecimal money; - - /** - * 是否消费 0:否,1:是 - */ - @Schema(description = "是否消费 0:否,1:是") - private Integer isConsume; - - /** - * 一键清零所有人 0:否,1:是 - */ - @Schema(description = "一键清零所有人 0:否,1:是") - private Integer resetMoneyAll; - - /** - * 一键清零金额种类 0:全部,1:充值,2:补贴 - */ - @Schema(description = "一键清零金额种类 0:全部,1:充值,2:补贴") - private Integer resetMoneyType; - -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/peopleBranch/model/resp/BranchResp.java b/wms-module-system/src/main/java/top/wms/admin/peopleBranch/model/resp/BranchResp.java deleted file mode 100644 index 54af019..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/peopleBranch/model/resp/BranchResp.java +++ /dev/null @@ -1,114 +0,0 @@ -package top.wms.admin.peopleBranch.model.resp; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; -import top.wms.admin.common.model.resp.BaseStrIdResp; - -import java.io.Serial; -import java.time.LocalDateTime; -import java.util.List; - -/** - * 部门管理信息 - * - * @author zc - * @since 2025/03/19 17:46 - */ -@Data -@Schema(description = "部门管理信息") -public class BranchResp extends BaseStrIdResp { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 部门名称 - */ - @Schema(description = "部门名称") - private String name; - - /** - * 部门负责人 - */ - @Schema(description = "部门负责人") - private String leader; - - /** - * 联系电话 - */ - @Schema(description = "联系电话") - private String phone; - - /** - * 父级Id - */ - @Schema(description = "父级Id") - private String parentId; - - /** - * 祖级列表 - */ - @Schema(description = "祖级列表") - private String ancestors; - - /** - * 所属空间 - */ - @Schema(description = "所属空间") - private Long spaceId; - - /** - * 备注 - */ - @Schema(description = "备注") - private String remark; - - /** - * 更新时间 - */ - @Schema(description = "更新时间") - private LocalDateTime updateTime; - - /** - * 关联部门 - */ - @Schema(description = "关联部门") - private Long deptId; - - /** - * - */ - @Schema(description = "") - private String level; - - /** - * 部门code - */ - @Schema(description = "部门code") - private String deptCode; - - /** - * 规则ids - */ - @Schema(description = "规则ids") - private List ruleIdList; - - /** - * 规则名称 - */ - @Schema(description = "规则名称") - private String ruleNames; - - /** - * 梯控规则id - */ - @Schema(description = "梯控规则id") - private String ladderRuleId; - - /** - * 访客是否审核 0 否;1 是 - */ - @Schema(description = "访客是否审核 0 否;1 是") - private String isExamine; - -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/peopleBranch/model/resp/BranchRuleResp.java b/wms-module-system/src/main/java/top/wms/admin/peopleBranch/model/resp/BranchRuleResp.java deleted file mode 100644 index 3d352d7..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/peopleBranch/model/resp/BranchRuleResp.java +++ /dev/null @@ -1,22 +0,0 @@ -package top.wms.admin.peopleBranch.model.resp; - -import lombok.Data; - -@Data -public class BranchRuleResp { - - /** - * 部门id - */ - private String branchId; - - /** - * 规则id - */ - private Long ruleId; - - /** - * 规则名称 - */ - private String ruleName; -} diff --git a/wms-module-system/src/main/java/top/wms/admin/peopleBranch/model/resp/ConsumePeopleResp.java b/wms-module-system/src/main/java/top/wms/admin/peopleBranch/model/resp/ConsumePeopleResp.java deleted file mode 100644 index 935bb92..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/peopleBranch/model/resp/ConsumePeopleResp.java +++ /dev/null @@ -1,233 +0,0 @@ -package top.wms.admin.peopleBranch.model.resp; - -import cn.crane4j.annotation.Assemble; -import cn.crane4j.core.executor.handler.ManyToManyAssembleOperationHandler; -import com.alibaba.excel.annotation.ExcelIgnore; -import com.alibaba.excel.annotation.ExcelProperty; -import com.alibaba.excel.annotation.write.style.ColumnWidth; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; -import top.continew.starter.file.excel.converter.ExcelBaseEnumConverter; -import top.wms.admin.common.constant.ContainerConstants; -import top.wms.admin.common.enums.EnableEnum; -import top.wms.admin.common.enums.YesNoEnum; -import top.wms.admin.common.model.resp.BaseDetailResp; -import top.wms.admin.peopleBranch.mapstruct.SexConverter; - -import java.io.Serial; -import java.math.BigDecimal; -import java.time.LocalDateTime; -import java.util.Date; - -/** - * 消费人员管理信息 - * - * @author zc - * @since 2025/03/21 18:10 - */ -@Data -@Schema(description = "人员管理信息") -public class ConsumePeopleResp extends BaseDetailResp { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 人员名称 - */ - @Schema(description = "人员名称") - @ExcelProperty(value = "姓名", order = 1) - @ColumnWidth(10) - private String name; - - /** - * 联系电话 - */ - @Schema(description = "联系电话") - @ExcelIgnore - private String phone; - - /** - * 用户性别(1男 2女 4保密) - */ - @Schema(description = "用户性别(1男 2女 4保密)") - @ExcelProperty(value = "性别", converter = SexConverter.class, order = 3) - private Integer sex; - - /** - * 头像地址 - */ - @Schema(description = "头像地址") - @ExcelIgnore - private String avatar; - - /** - * 所在部门 - */ - @Schema(description = "所在部门") - @Assemble(prop = ":branchName", container = ContainerConstants.BRANCH_NAME, handlerType = ManyToManyAssembleOperationHandler.class) - @ExcelIgnore - private String branchId; - - /** - * 所在部门名称 - */ - @Schema(description = "所在部门名称") - @ExcelProperty(value = "部门名称", order = 4) - private String branchName; - - /** - * 职位标签 - */ - @Schema(description = "职位标签") - @ExcelIgnore - private String position; - - /** - * 身份证号码 - */ - @Schema(description = "身份证号码") - @ExcelIgnore - private String idcard; - - /** - * 门卡号码 - */ - @Schema(description = "门卡号码") - @ExcelIgnore - private String doorNo; - - /** - * 人员编号对接 - */ - @Schema(description = "人员编号对接") - @ExcelIgnore - private String guid; - - /** - * 人像对接 - */ - @Schema(description = "人像对接") - @ExcelIgnore - private String faceGuid; - - /** - * 关联用户 - */ - @Schema(description = "关联用户") - @ExcelIgnore - private Long userId; - - /** - * 关联用户 - */ - @Schema(description = "关联用户") - @ExcelIgnore - private String userName; - - /** - * 备注 - */ - @Schema(description = "备注") - @ExcelIgnore - private String remark; - - /** - * 更新时间 - */ - @Schema(description = "更新时间") - @ExcelIgnore - private LocalDateTime updateTime; - - /** - * 工号 - */ - @Schema(description = "工号") - @ExcelProperty(value = "工号", order = 2) - @ColumnWidth(30) - private String gh; - - /** - * 指纹特征值 - */ - @Schema(description = "指纹特征值") - @ExcelIgnore - private String fingerprint; - - /** - * 入职时间 - */ - @Schema(description = "入职时间") - @ExcelIgnore - private Date joinTime; - - /** - * 下发次数 - */ - @Schema(description = "下发次数") - @ExcelIgnore - private Long down; - - /** - * - */ - @Schema(description = "") - @ExcelIgnore - private String delFlag; - - /** - * 微信公众号id - */ - @Schema(description = "微信公众号id") - @ExcelIgnore - private String openid; - - /** - * 消费标志(0未同步 1已同步 2删除同步) - */ - @Schema(description = "消费标志(0未同步 1已同步 2删除同步)") - @ExcelIgnore - private Integer xfFlag; - - /** - * 充值金额 - */ - @Schema(description = "充值金额") - @ExcelProperty(value = "充值金额", order = 5) - private BigDecimal czje = BigDecimal.ZERO; - - /** - * 补贴金额 - */ - @Schema(description = "补贴金额") - @ExcelProperty(value = "补贴金额", order = 6) - private BigDecimal btje = BigDecimal.ZERO; - - /** - * 是否消费 0:否,1:是 - */ - @Schema(description = "是否启用消费 0:否,1:是") - @ExcelProperty(value = "是否启用消费", converter = ExcelBaseEnumConverter.class, order = 7) - private EnableEnum isConsume; - - /** - * 消费金额 - */ - @Schema(description = "消费金额") - @ExcelIgnore - private BigDecimal xfje = BigDecimal.ZERO; - - /** - * 消费次数 - */ - @Schema(description = "消费次数") - @ExcelIgnore - private Integer xfcs; - - /** - * 是否冻结 0:否,1:是 - */ - @Schema(description = "是否冻结 0:否,1:是") - @ExcelProperty(value = "是否冻结", converter = ExcelBaseEnumConverter.class, order = 8) - private YesNoEnum freeze; -} diff --git a/wms-module-system/src/main/java/top/wms/admin/peopleBranch/model/resp/PeopleImportParseResp.java b/wms-module-system/src/main/java/top/wms/admin/peopleBranch/model/resp/PeopleImportParseResp.java deleted file mode 100644 index e0658b0..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/peopleBranch/model/resp/PeopleImportParseResp.java +++ /dev/null @@ -1,51 +0,0 @@ -package top.wms.admin.peopleBranch.model.resp; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; - -import java.io.Serializable; - -@Data -@AllArgsConstructor -@NoArgsConstructor -@Schema(description = "人员导入解析结果") -public class PeopleImportParseResp implements Serializable { - /** - * 导入会话 Key - */ - @Schema(description = "导入会话Key", example = "1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed") - private String importKey; - - /** - * 总计行数 - */ - @Schema(description = "总计行数", example = "100") - private Integer totalRows; - - /** - * 有效行数 - */ - @Schema(description = "有效行数", example = "100") - private Integer validRows; - - /** - * 重复人员行数 - */ - @Schema(description = "重复行数", example = "100") - private Integer duplicatePeopleRows; - - // - // /** - // * 重复工号行数 - // */ - // @Schema(description = "重复邮箱行数", example = "100") - // private Integer duplicateEmailRows; - // - // /** - // * 重复卡号行数 - // */ - // @Schema(description = "重复手机行数", example = "100") - // private Integer duplicatePhoneRows; -} diff --git a/wms-module-system/src/main/java/top/wms/admin/peopleBranch/model/resp/PeopleImportResp.java b/wms-module-system/src/main/java/top/wms/admin/peopleBranch/model/resp/PeopleImportResp.java deleted file mode 100644 index 518250e..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/peopleBranch/model/resp/PeopleImportResp.java +++ /dev/null @@ -1,31 +0,0 @@ -package top.wms.admin.peopleBranch.model.resp; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; - -@Data -@AllArgsConstructor -@NoArgsConstructor -@Schema(description = "人员导入结果") -public class PeopleImportResp { - private static final long serialVersionUID = 1L; - /** - * 总计行数 - */ - @Schema(description = "总计行数", example = "100") - private Integer totalRows; - - /** - * 新增行数 - */ - @Schema(description = "新增行数", example = "100") - private Integer insertRows; - - /** - * 修改行数 - */ - @Schema(description = "修改行数", example = "100") - private Integer updateRows; -} diff --git a/wms-module-system/src/main/java/top/wms/admin/peopleBranch/model/resp/PeopleResp.java b/wms-module-system/src/main/java/top/wms/admin/peopleBranch/model/resp/PeopleResp.java deleted file mode 100644 index c8218ad..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/peopleBranch/model/resp/PeopleResp.java +++ /dev/null @@ -1,237 +0,0 @@ -package top.wms.admin.peopleBranch.model.resp; - -import cn.crane4j.annotation.Assemble; -import cn.crane4j.core.executor.handler.ManyToManyAssembleOperationHandler; -import com.alibaba.excel.annotation.ExcelIgnore; -import com.alibaba.excel.annotation.ExcelProperty; -import com.alibaba.excel.annotation.write.style.ColumnWidth; -import lombok.Data; - -import io.swagger.v3.oas.annotations.media.Schema; - -import top.wms.admin.common.constant.ContainerConstants; -import top.wms.admin.common.model.resp.BaseDetailResp; -import top.wms.admin.peopleBranch.mapstruct.SexConverter; - -import java.io.Serial; -import java.math.BigDecimal; -import java.time.*; -import java.util.Date; - -/** - * 人员管理信息 - * - * @author zc - * @since 2025/03/21 18:10 - */ -@Data -@Schema(description = "人员管理信息") -public class PeopleResp extends BaseDetailResp { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 人员名称 - */ - @Schema(description = "人员名称") - @ExcelProperty(value = "姓名", order = 2) - @ColumnWidth(10) - private String name; - - /** - * 联系电话 - */ - @Schema(description = "联系电话") - @ExcelProperty(value = "联系电话", order = 3) - @ColumnWidth(15) - private String phone; - - /** - * 用户性别(1男 2女 4保密) - */ - @Schema(description = "用户性别(1男 2女 4保密)") - @ExcelProperty(value = "性别", converter = SexConverter.class, order = 4) - private Integer sex; - - /** - * 头像地址 - */ - @Schema(description = "头像地址") - @ExcelIgnore - private String avatar; - - /** - * 所在部门 - */ - @Schema(description = "所在部门") - @ExcelIgnore - @Assemble(prop = ":branchName", container = ContainerConstants.BRANCH_NAME, handlerType = ManyToManyAssembleOperationHandler.class) - private String branchId; - - /** - * 所在部门名称 - */ - @Schema(description = "所在部门名称") - @ExcelProperty(value = "部门名称", order = 5) - private String branchName; - - /** - * 职位标签 - */ - @Schema(description = "职位标签") - @ExcelProperty(value = "职位标签", order = 6) - private String position; - - /** - * 身份证号码 - */ - @Schema(description = "身份证号码") - @ExcelProperty(value = "身份证号码", order = 7) - @ColumnWidth(25) - private String idcard; - - /** - * 门卡号码 - */ - @Schema(description = "门卡号码") - @ExcelProperty(value = "卡号", order = 8) - @ColumnWidth(15) - private String doorNo; - - /** - * 人员编号对接 - */ - @Schema(description = "人员编号对接") - @ExcelIgnore - private String guid; - - /** - * 人像对接 - */ - @Schema(description = "人像对接") - @ExcelIgnore - private String faceGuid; - - /** - * 关联用户 - */ - @Schema(description = "关联用户") - @Assemble(prop = ":userName", container = ContainerConstants.USER_NAME, handlerType = ManyToManyAssembleOperationHandler.class) - @ExcelIgnore - private Long userId; - - /** - * 关联用户 - */ - @Schema(description = "关联用户") - @ExcelIgnore - private String userName; - - /** - * 备注 - */ - @Schema(description = "备注") - @ExcelIgnore - private String remark; - - /** - * 更新时间 - */ - @Schema(description = "更新时间") - @ExcelIgnore - private LocalDateTime updateTime; - - /** - * 工号 - */ - @Schema(description = "工号") - @ExcelProperty(value = "工号", order = 1) - @ColumnWidth(30) - private String gh; - - /** - * 指纹特征值 - */ - @Schema(description = "指纹特征值") - @ExcelIgnore - private String fingerprint; - - /** - * 入职时间 - */ - @Schema(description = "入职时间") - @ExcelProperty(value = "入职时间", order = 9) - @ColumnWidth(35) - private Date joinTime; - - /** - * 下发次数 - */ - @Schema(description = "下发次数") - @ExcelIgnore - private Long down; - - /** - * - */ - @Schema(description = "") - @ExcelIgnore - private String delFlag; - - /** - * 微信公众号id - */ - @Schema(description = "微信公众号id") - @ExcelIgnore - private String openid; - - /** - * 消费标志(0未同步 1已同步 2删除同步) - */ - @Schema(description = "消费标志(0未同步 1已同步 2删除同步)") - @ExcelIgnore - private Integer xfFlag; - - /** - * 充值金额 - */ - @Schema(description = "充值金额") - @ExcelIgnore - private BigDecimal czje; - - /** - * 补贴金额 - */ - @Schema(description = "补贴金额") - @ExcelIgnore - private BigDecimal btje; - - /** - * 是否消费 0:否,1:是 - */ - @Schema(description = "是否消费 0:否,1:是") - @ExcelIgnore - private Integer isConsume; - - /** - * 消费金额 - */ - @Schema(description = "消费金额") - @ExcelIgnore - private BigDecimal xfje; - - /** - * 消费次数 - */ - @Schema(description = "消费次数") - @ExcelIgnore - private Integer xfcs; - - /** - * 是否冻结 0:否,1:是 - */ - @Schema(description = "是否冻结 0:否,1:是") - @ExcelIgnore - private Integer freeze; -} diff --git a/wms-module-system/src/main/java/top/wms/admin/peopleBranch/service/BranchService.java b/wms-module-system/src/main/java/top/wms/admin/peopleBranch/service/BranchService.java deleted file mode 100644 index 7f7132b..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/peopleBranch/service/BranchService.java +++ /dev/null @@ -1,35 +0,0 @@ -package top.wms.admin.peopleBranch.service; - -import cn.hutool.core.lang.tree.Tree; -import top.continew.starter.data.mp.service.IService; -import top.wms.admin.peopleBranch.model.entity.BranchDO; -import top.wms.admin.peopleBranch.model.query.BranchQuery; -import top.wms.admin.peopleBranch.model.req.BranchReq; -import top.wms.admin.peopleBranch.model.resp.BranchResp; - -import java.util.List; - -/** - * 部门管理业务接口 - * - * @author zc - * @since 2025/03/19 17:46 - */ -public interface BranchService extends IService { - - List> selectBranchTree(BranchQuery branchQuery); - - BranchResp selectBranchById(String id); - - String insertBranch(BranchReq branchReq); - - void updateBranch(BranchReq branchReq, String id); - - void deleteBranchById(String id); - - List> tree(BranchQuery query); - - List listByNames(List list); - - String branchNameById(Long id); -} diff --git a/wms-module-system/src/main/java/top/wms/admin/peopleBranch/service/PeopleService.java b/wms-module-system/src/main/java/top/wms/admin/peopleBranch/service/PeopleService.java deleted file mode 100644 index ba6cd11..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/peopleBranch/service/PeopleService.java +++ /dev/null @@ -1,157 +0,0 @@ -package top.wms.admin.peopleBranch.service; - -import jakarta.servlet.http.HttpServletResponse; -import org.springframework.web.multipart.MultipartFile; -import top.continew.starter.extension.crud.model.query.PageQuery; -import top.continew.starter.extension.crud.model.resp.LabelValueResp; -import top.continew.starter.extension.crud.model.resp.PageResp; -import top.continew.starter.extension.crud.service.BaseService; -import top.wms.admin.consume.model.req.PeopleDepositImportReq; -import top.wms.admin.consume.model.resp.PeopleDepositImportParseResp; -import top.wms.admin.peopleBranch.model.query.PeopleQuery; -import top.wms.admin.peopleBranch.model.req.PeopleImportReq; -import top.wms.admin.peopleBranch.model.req.PeopleReq; -import top.wms.admin.peopleBranch.model.resp.ConsumePeopleResp; -import top.wms.admin.peopleBranch.model.resp.PeopleImportParseResp; -import top.wms.admin.peopleBranch.model.resp.PeopleImportResp; -import top.wms.admin.peopleBranch.model.resp.PeopleResp; -import top.wms.admin.system.model.resp.user.UserImportResp; - -import java.io.IOException; -import java.util.List; - -/** - * 人员管理业务接口 - * - * @author zc - * @since 2025/03/21 18:22 - */ -public interface PeopleService extends BaseService { - - /** - * 下发人员 - * - * @param ids 人员ID列表 - * @return 失败人员名称列表 - */ - String down(Long[] ids); - - /** - * 删除人员 - * - * @param ids 人员ID列表 - * @return 失败人员名称列表 - */ - String del(List ids); - - /** - * 解析导入数据 - * - * @param file 导入文件 - * @return 解析结果 - */ - PeopleImportParseResp parseImport(MultipartFile file); - - PeopleImportResp importPeople(PeopleImportReq req); - - /** - * 分页查询人员消费列表 - * - * @param query 查询条件 - * @param pageQuery 分页查询条件 - * @return 分页列表信息 - */ - PageResp pageConsume(PeopleQuery query, PageQuery pageQuery); - - /** - * 补贴人员 - * - * @param req 补贴参数 - * @return 补贴结果 - */ - void subsidy(PeopleReq req); - - /** - * 充值人员 - * - * @param req 充值参数 - * @return 充值结果 - */ - void deposit(PeopleReq req); - - /** - * 退款人员 - * - * @param req 退款参数 - * @return 退款结果 - */ - void refund(PeopleReq req); - - /** - * crane4j 容器方法,根据人员ID查询人员名称 - * - * @param id - * @return - */ - String getPeopleName(Long id); - - /** - * 下拉框数据,人员名称 - * - * @param peopleQuery - * @return - */ - List getPeopleNameList(PeopleQuery peopleQuery); - - /** - * 消费-人员充值导出 - * - * @param query - * @return - */ - void exportConsume(PeopleQuery query, HttpServletResponse response); - - /** - * 消费冻结 - * - * @param ids - */ - void freeze(List ids); - - /** - * 消费解冻 - * - * @param ids - */ - void unFreeze(List ids); - - /** - * 消费一键清零 - * - * @param req - */ - void resetMoney(PeopleReq req); - - /** - * 下载导入模板 - * - * @param response - */ - void downloadConsumeImportTemplate(HttpServletResponse response) throws IOException; - - /** - * 解析导入数据 - * - * @param file 导入文件 - * @return 解析结果 - */ - PeopleDepositImportParseResp parseConsumeImport(MultipartFile file); - - /** - * 导入人员充值 - * - * @param req 导入参数 - * @return 导入结果 - */ - UserImportResp importConsumePeople(PeopleDepositImportReq req); -} diff --git a/wms-module-system/src/main/java/top/wms/admin/peopleBranch/service/impl/BranchServiceImpl.java b/wms-module-system/src/main/java/top/wms/admin/peopleBranch/service/impl/BranchServiceImpl.java deleted file mode 100644 index 6fc1b23..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/peopleBranch/service/impl/BranchServiceImpl.java +++ /dev/null @@ -1,165 +0,0 @@ -package top.wms.admin.peopleBranch.service.impl; - -import cn.crane4j.annotation.ContainerMethod; -import cn.crane4j.annotation.MappingType; -import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.lang.tree.Tree; -import cn.hutool.core.lang.tree.TreeNodeConfig; -import cn.hutool.core.lang.tree.TreeUtil; -import cn.hutool.core.util.StrUtil; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Service; -import top.wms.admin.common.constant.ContainerConstants; -import top.wms.admin.peopleBranch.mapper.BranchMapper; -import top.wms.admin.peopleBranch.mapper.BranchRuleMapper; -import top.wms.admin.peopleBranch.mapstruct.BranchConvert; -import top.wms.admin.peopleBranch.model.entity.BranchDO; -import top.wms.admin.peopleBranch.model.entity.BranchRuleDO; -import top.wms.admin.peopleBranch.model.query.BranchQuery; -import top.wms.admin.peopleBranch.model.req.BranchReq; -import top.wms.admin.peopleBranch.model.resp.BranchResp; -import top.wms.admin.peopleBranch.model.resp.BranchRuleResp; -import top.wms.admin.peopleBranch.service.BranchService; -import top.wms.admin.rule.mapper.RuleMapper; - -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; - -/** - * 部门管理业务实现 - * - * @author zc - * @since 2025/03/19 17:46 - */ -@Service -@Slf4j -@RequiredArgsConstructor -public class BranchServiceImpl extends ServiceImpl implements BranchService { - - private final BranchConvert branchConvert; - - private final BranchRuleMapper branchRuleMapper; - - private final RuleMapper ruleMapper; - - @Override - public List> selectBranchTree(BranchQuery branchQuery) { - LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); - queryWrapper.eq(StrUtil.isNotBlank(branchQuery.getName()), BranchDO::getName, branchQuery.getName()); - queryWrapper.eq(StrUtil.isNotBlank(branchQuery.getName()), BranchDO::getLeader, branchQuery.getLeader()); - - //查询部门列表 - List branchDOS = baseMapper.selectList(queryWrapper); - List branchResps = branchConvert.ListDOToResp(branchDOS); - - //查询部门规则列表 - List branchRuleDOS = branchRuleMapper.selectRuleNames(); - - Map collect = branchRuleDOS.stream() - .collect(Collectors.toMap(BranchRuleResp::getBranchId, BranchRuleResp::getRuleName, (k1, - k2) -> k1 + " | " + k2)); - - branchResps.forEach(branchResp -> { - if (collect.containsKey(branchResp.getId())) { - branchResp.setRuleNames(collect.get(branchResp.getId())); - } - }); - - TreeNodeConfig config = new TreeNodeConfig(); - return TreeUtil.build(branchResps, "0", config, (treeNode, tree) -> { - tree.setId(treeNode.getId()); - tree.setParentId(treeNode.getParentId()); - tree.setName(treeNode.getName()); - tree.putExtra("leader", treeNode.getLeader()); - tree.putExtra("phone", treeNode.getPhone()); - tree.putExtra("ruleNames", treeNode.getRuleNames()); - tree.putExtra("deptId", treeNode.getDeptId()); - }); - } - - @Override - public BranchResp selectBranchById(String id) { - BranchResp branchResp = branchConvert.branchDOToResp(baseMapper.selectById(id)); - List ruleDOS = branchRuleMapper.selectList(new LambdaQueryWrapper() - .eq(BranchRuleDO::getBranchId, id)); - branchResp.setRuleIdList(ruleDOS.stream().map(BranchRuleDO::getRuleId).collect(Collectors.toList())); - return branchResp; - } - - @Override - public String insertBranch(BranchReq branchReq) { - BranchDO branchDO = branchConvert.branchReqToDO(branchReq); - baseMapper.insert(branchDO); - if (CollUtil.isNotEmpty(branchReq.getRuleIdList())) { - List branchRuleDOS = branchReq.getRuleIdList() - .stream() - .map(ruleId -> BranchRuleDO.builder().ruleId(ruleId).branchId(branchDO.getId()).build()) - .collect(Collectors.toList()); - branchRuleMapper.insertBatch(branchRuleDOS); - } - return branchDO.getId(); - } - - @Override - public void updateBranch(BranchReq branchReq, String id) { - BranchDO branchDO = branchConvert.branchReqToDO(branchReq); - branchDO.setId(id); - if (CollUtil.isNotEmpty(branchReq.getRuleIdList())) { - branchRuleMapper.delete(new LambdaQueryWrapper().eq(BranchRuleDO::getBranchId, id)); - List branchRuleDOS = branchReq.getRuleIdList() - .stream() - .map(ruleId -> BranchRuleDO.builder().ruleId(ruleId).branchId(branchDO.getId()).build()) - .collect(Collectors.toList()); - branchRuleMapper.insertBatch(branchRuleDOS); - } - baseMapper.updateById(branchDO); - } - - @Override - public void deleteBranchById(String id) { - branchRuleMapper.delete(new LambdaQueryWrapper().eq(BranchRuleDO::getBranchId, id)); - baseMapper.deleteById(id); - } - - @Override - public List> tree(BranchQuery query) { - LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); - queryWrapper.eq(StrUtil.isNotBlank(query.getName()), BranchDO::getName, query.getName()); - queryWrapper.eq(StrUtil.isNotBlank(query.getLeader()), BranchDO::getLeader, query.getLeader()); - - List branchDOS = baseMapper.selectList(queryWrapper); - - TreeNodeConfig config = new TreeNodeConfig(); - return TreeUtil.build(branchDOS, "0", config, (treeNode, tree) -> { - tree.setId(treeNode.getId()); - tree.putExtra("key", treeNode.getId()); - tree.putExtra("title", treeNode.getName()); - tree.setParentId(treeNode.getParentId()); - }); - } - - @Override - public List listByNames(List list) { - if (CollUtil.isEmpty(list)) { - return Collections.emptyList(); - } - return this.list(Wrappers.lambdaQuery().in(BranchDO::getName, list)); - } - - @Override - @ContainerMethod(namespace = ContainerConstants.BRANCH_NAME, type = MappingType.ORDER_OF_KEYS) - public String branchNameById(Long id) { - if (null == id) { - return ""; - } - - BranchDO branchDO = baseMapper.selectById(id); - return branchDO != null ? branchDO.getName() : ""; - } -} diff --git a/wms-module-system/src/main/java/top/wms/admin/peopleBranch/service/impl/PeopleServiceImpl.java b/wms-module-system/src/main/java/top/wms/admin/peopleBranch/service/impl/PeopleServiceImpl.java deleted file mode 100644 index 5aa6ab3..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/peopleBranch/service/impl/PeopleServiceImpl.java +++ /dev/null @@ -1,1068 +0,0 @@ -package top.wms.admin.peopleBranch.service.impl; - -import cn.crane4j.annotation.ContainerMethod; -import cn.crane4j.annotation.MappingType; -import cn.hutool.core.bean.BeanUtil; -import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.collection.CollectionUtil; -import cn.hutool.core.date.DateUtil; -import cn.hutool.core.io.resource.ResourceUtil; -import cn.hutool.core.lang.UUID; -import cn.hutool.core.util.*; -import cn.hutool.extra.validation.ValidationUtil; -import cn.hutool.http.ContentType; -import cn.hutool.json.JSONUtil; -import com.alibaba.excel.EasyExcel; -import com.alibaba.fastjson2.JSON; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; -import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.baomidou.mybatisplus.core.toolkit.support.SFunction; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import jakarta.servlet.http.HttpServletResponse; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import net.dreamlu.mica.core.result.R; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; -import org.springframework.web.multipart.MultipartFile; -import top.continew.starter.cache.redisson.util.RedisUtils; -import top.continew.starter.core.exception.BusinessException; -import top.continew.starter.core.util.SpringUtils; -import top.continew.starter.core.validation.CheckUtils; -import top.continew.starter.extension.crud.model.query.PageQuery; -import top.continew.starter.extension.crud.model.query.SortQuery; -import top.continew.starter.extension.crud.model.resp.LabelValueResp; -import top.continew.starter.extension.crud.model.resp.PageResp; -import top.continew.starter.extension.crud.service.BaseServiceImpl; -import top.continew.starter.file.excel.util.ExcelUtils; -import top.continew.starter.web.util.FileUploadUtils; -import top.wms.admin.common.constant.CacheConstants; -import top.wms.admin.common.constant.ContainerConstants; -import top.wms.admin.common.enums.*; -import top.wms.admin.common.util.SecureUtils; -import top.wms.admin.consume.mapper.RechargeRecordMapper; -import top.wms.admin.consume.model.entity.RechargeRecordDO; -import top.wms.admin.consume.model.req.PeopleDepositImportReq; -import top.wms.admin.consume.model.req.PeopleDepositImportRowReq; -import top.wms.admin.consume.model.resp.PeopleDepositImportParseResp; -import top.wms.admin.peopleBranch.mapper.BranchMapper; -import top.wms.admin.peopleBranch.mapper.BranchRuleMapper; -import top.wms.admin.peopleBranch.mapper.PeopleMapper; -import top.wms.admin.peopleBranch.mapstruct.PeopleConvert; -import top.wms.admin.peopleBranch.model.entity.BranchDO; -import top.wms.admin.peopleBranch.model.entity.BranchRuleDO; -import top.wms.admin.peopleBranch.model.entity.PeopleDO; -import top.wms.admin.peopleBranch.model.query.PeopleQuery; -import top.wms.admin.peopleBranch.model.req.PeopleImportReq; -import top.wms.admin.peopleBranch.model.req.PeopleImportRowReq; -import top.wms.admin.peopleBranch.model.req.PeopleReq; -import top.wms.admin.peopleBranch.model.resp.*; -import top.wms.admin.peopleBranch.service.BranchService; -import top.wms.admin.peopleBranch.service.PeopleService; -import top.wms.admin.peopleDownRecord.mapper.PeopleDownMapper; -import top.wms.admin.peopleDownRecord.model.entity.PeopleDownDO; -import top.wms.admin.peopleDownRecord.model.req.PeopleDownReq; -import top.wms.admin.peopleDownRecord.service.PeopleDownService; -import top.wms.admin.system.mapper.RuleRelationMapper; -import top.wms.admin.system.model.entity.*; -import top.wms.admin.system.model.resp.user.UserImportResp; -import top.wms.admin.system.service.ConfigService; -import top.wms.admin.yfApi.service.ISysYFService; - -import java.io.IOException; -import java.math.BigDecimal; -import java.time.Duration; -import java.util.*; -import java.util.function.Function; -import java.util.stream.Collectors; - -import static top.wms.admin.system.enums.ImportPolicyEnum.*; - -/** - * 人员管理业务实现 - * - * @author zc - * @since 2025/03/21 18:22 - */ -@Service -@RequiredArgsConstructor -@Slf4j -public class PeopleServiceImpl extends BaseServiceImpl implements PeopleService { - - private final BranchMapper branchMapper; - - private final PeopleConvert peopleConvert; - - private final ISysYFService sysYFService; - - private final PeopleDownMapper peopleDownMapper; - - private final PeopleDownService peopledownService; - - private final BranchService branchService; - - private final BranchRuleMapper branchRuleMapper; - - private final RuleRelationMapper ruleRelationMapper; - - private final ConfigService configService; - - private final RechargeRecordMapper rechargeRecordMapper; - - @Override - public PageResp page(PeopleQuery query, PageQuery pageQuery) { - - QueryWrapper queryWrapper = new QueryWrapper<>(); - //初始部门不查询下级部门 - if (StrUtil.isNotBlank(query.getBranchId()) && !StrUtil.equals(query.getBranchId(), "1")) { - List branchResps = branchMapper.queryJuniorBranch(query.getBranchId()); - List branchList = branchResps.stream().map(BranchResp::getId).collect(Collectors.toList()); - branchList.add(query.getBranchId()); - queryWrapper.in("p.branch_id", branchList); - } - - //查询条件 - queryWrapper.like(StrUtil.isNotBlank(query.getName()), "p.name", query.getName()); - queryWrapper.like(StrUtil.isNotBlank(query.getPhone()), "p.phone", query.getPhone()); - queryWrapper.likeRight(StrUtil.isNotBlank(query.getIdcard()), "p.idcard", query.getIdcard()); - if (StrUtil.isNotBlank(query.getFaceFlag())) { - if (StrUtil.equals(query.getFaceFlag(), "0")) { - queryWrapper.isNull("p.face_guid"); - } else { - queryWrapper.isNotNull("p.face_guid"); - } - } - if (StrUtil.isNotBlank(query.getGuidFlag())) { - if (StrUtil.equals(query.getGuidFlag(), "0")) { - queryWrapper.isNull("p.guid"); - } else { - queryWrapper.isNotNull("p.guid"); - } - } - if (StrUtil.isNotBlank(query.getDownFlag())) { - if (StrUtil.equals(query.getDownFlag(), "0")) { - queryWrapper.eq("p.down", 0); - } else { - queryWrapper.gt("p.down", 0); - } - } - if (StrUtil.isNotBlank(query.getCardFlag())) { - if (StrUtil.equals(query.getCardFlag(), "0")) { - queryWrapper.isNull("p.door_no"); - } else { - queryWrapper.isNotNull("p.door_no"); - } - } - queryWrapper.orderByDesc("p.id", "p.create_time"); - - IPage page = baseMapper.selectPeoplePage(new Page<>(pageQuery.getPage(), pageQuery - .getSize()), queryWrapper); - - return PageResp.build(page); - } - - @Override - public void export(PeopleQuery query, SortQuery sortQuery, HttpServletResponse response) { - - QueryWrapper queryWrapper = new QueryWrapper<>(); - //初始部门不查询下级部门 - if (StrUtil.isNotBlank(query.getBranchId()) && !StrUtil.equals(query.getBranchId(), "1")) { - List branchResps = branchMapper.queryJuniorBranch(query.getBranchId()); - List branchList = branchResps.stream().map(BranchResp::getId).collect(Collectors.toList()); - branchList.add(query.getBranchId()); - queryWrapper.in("p.branch_id", branchList); - } - - //查询条件 - queryWrapper.like(StrUtil.isNotBlank(query.getName()), "p.name", query.getName()); - queryWrapper.like(StrUtil.isNotBlank(query.getPhone()), "p.phone", query.getPhone()); - queryWrapper.likeRight(StrUtil.isNotBlank(query.getIdcard()), "p.idcard", query.getIdcard()); - if (StrUtil.isNotBlank(query.getFaceFlag())) { - if (StrUtil.equals(query.getFaceFlag(), "0")) { - queryWrapper.isNull("p.face_guid"); - } else { - queryWrapper.isNotNull("p.face_guid"); - } - } - if (StrUtil.isNotBlank(query.getGuidFlag())) { - if (StrUtil.equals(query.getGuidFlag(), "0")) { - queryWrapper.isNull("p.guid"); - } else { - queryWrapper.isNotNull("p.guid"); - } - } - if (StrUtil.isNotBlank(query.getDownFlag())) { - if (StrUtil.equals(query.getDownFlag(), "0")) { - queryWrapper.eq("p.down", 0); - } else { - queryWrapper.gt("p.down", 0); - } - } - if (StrUtil.isNotBlank(query.getCardFlag())) { - if (StrUtil.equals(query.getCardFlag(), "0")) { - queryWrapper.isNull("p.door_no"); - } else { - queryWrapper.isNotNull("p.door_no"); - } - } - queryWrapper.orderByDesc("p.id", "p.create_time"); - List peopleRespList = baseMapper.selectExportPeople(queryWrapper); - ExcelUtils.export(peopleRespList, "人员清单_" + DateUtil.today(), this.getDetailClass(), response); - } - - //下发 - @Override - public String down(Long[] ids) { - List failIds = new ArrayList<>(); - String failNames = ""; - //是否开启人脸机 - if (checkYFEnable()) { - failIds = sysYFService.authDevice(Arrays.asList(ids), OperTypeEnum.DOWN.getValue()); - } - if (CollUtil.isNotEmpty(failIds)) { - failNames = baseMapper.selectList(new LambdaQueryWrapper().in(PeopleDO::getId, failIds)) - .stream() - .map(PeopleDO::getName) - .collect(Collectors.joining(",")); - } - - return failNames; - } - - @Override - public void beforeAdd(PeopleReq req) { - //给新添加人员新增guid,用于设备注册 - req.setGuid(IdUtil.simpleUUID()); - //如果照片不为空 则生成faceguid - if (ObjectUtil.isNotEmpty(req.getAvatar())) { - req.setFaceGuid(IdUtil.simpleUUID()); - } - //入参重复数据校验 - CheckUtils.throwIf(isGhExists(req.getGh()), "新增失败,工号[{}] 已存在", req.getGh()); - if (StrUtil.isNotBlank(req.getDoorNo())) { - CheckUtils.throwIf(isDoorNoExists(req.getDoorNo()), "新增失败,门禁卡号[{}] 已存在", req.getDoorNo()); - } - } - - //新增人员下发进设备 - @Override - public void afterAdd(PeopleReq req, PeopleDO peopleDO) { - //是否开启人脸机 - if (checkYFEnable()) { - sysYFService.authDevice(Collections.singletonList(peopleDO.getId()), OperTypeEnum.ADD.getValue()); - } - } - - /** - * 工号是否存在 - * - * @param gh 工号 - * @return 是否存在 - */ - private boolean isGhExists(String gh) { - return baseMapper.lambdaQuery().eq(PeopleDO::getGh, gh).exists(); - } - - /** - * 门禁卡号是否存在 - * - * @param doorNo 门禁卡号 - * @return 是否存在 - */ - private boolean isDoorNoExists(String doorNo) { - return baseMapper.lambdaQuery().eq(PeopleDO::getDoorNo, doorNo).exists(); - } - - @Override - public void beforeUpdate(PeopleReq req, Long id) { - if (ObjectUtil.isNotEmpty(req.getAvatar()) && ObjectUtil.isEmpty(req.getFaceGuid())) { - req.setFaceGuid(IdUtil.simpleUUID()); - } - PeopleDO peopleDO = baseMapper.lambdaQuery().eq(PeopleDO::getId, req.getId()).select().one(); - //入参重复数据校验 - if (StrUtil.isNotBlank(req.getGh()) && !StrUtil.equals(peopleDO.getGh(), req.getGh())) { - CheckUtils.throwIf(isGhExists(req.getGh()), "修改失败,工号[{}] 已存在", req.getGh()); - } - if (StrUtil.isNotBlank(req.getDoorNo()) && !StrUtil.equals(peopleDO.getDoorNo(), req.getDoorNo())) { - CheckUtils.throwIf(isDoorNoExists(req.getDoorNo()), "修改失败,门禁卡号[{}] 已存在", req.getDoorNo()); - } - //如果修改了人员姓名,电话,照片,身份证号 则需要下发设备 - if ((StrUtil.isNotBlank(req.getName()) && !StrUtil.equals(peopleDO.getName(), req.getName()) || StrUtil - .isNotBlank(req.getPhone()) && !StrUtil.equals(peopleDO.getPhone(), req.getPhone())) || StrUtil - .isNotBlank(req.getAvatar()) && !StrUtil.equals(peopleDO.getAvatar(), req.getAvatar()) || StrUtil - .isNotBlank(req.getIdcard()) && !StrUtil.equals(peopleDO.getIdcard(), req.getIdcard())) { - req.setNeedDown(true); - } - } - - @Override - public void afterUpdate(PeopleReq sysPeople, PeopleDO peopleDO) { - //是否开启人脸机 - if (checkYFEnable() && sysPeople.getNeedDown()) { - sysYFService.authDevice(Collections.singletonList(peopleDO.getId()), OperTypeEnum.UPDATE.getValue()); - } - } - - @Override - public String del(List ids) { - List failIds; - String failNames = ""; - //是否开启人脸机 - if (checkYFEnable()) { - failIds = sysYFService.delDevice(ids, OperTypeEnum.DEL.getValue()); - if (CollUtil.isNotEmpty(failIds)) { - log.info("人员删除-人员[{}]删除失败", JSON.toJSONString(failIds)); - ids = ids.stream().filter(id -> !failIds.contains(id)).toList(); - } - } else { - failIds = new ArrayList<>(); - } - //删除人员信息 - if (CollUtil.isNotEmpty(ids)) { - baseMapper.deleteByIds(ids); - //从下发记录里删去相关记录 - peopleDownMapper.delete(new LambdaQueryWrapper().in(PeopleDownDO::getPeopleId, ids)); - } - - if (CollUtil.isNotEmpty(failIds)) { - failNames = baseMapper.selectList(new LambdaQueryWrapper().in(PeopleDO::getId, failIds)) - .stream() - .map(PeopleDO::getName) - .collect(Collectors.joining(",")); - } - - return failNames; - } - - private Boolean checkYFEnable() { - String configValue = configService.getConfigValue("yf.enable"); - if (StrUtil.isNotBlank(configValue)) { - return Boolean.valueOf(configValue); - } - return false; - } - - @Override - public PeopleImportParseResp parseImport(MultipartFile file) { - PeopleImportParseResp peopleImportResp = new PeopleImportParseResp(); - List importRowList; - // 读取表格数据 - try { - importRowList = EasyExcel.read(file.getInputStream()) - .head(PeopleImportRowReq.class) - .sheet() - .headRowNumber(1) - .doReadSync(); - } catch (Exception e) { - log.error("用户导入数据文件解析异常:{}", e.getMessage(), e); - throw new BusinessException("数据文件解析异常"); - } - // 总计行数 - peopleImportResp.setTotalRows(importRowList.size()); - CheckUtils.throwIfEqual(importRowList.size(), 0, "导入人员为空!"); - // 有效行数:过滤无效数据,过滤重复(姓名+手机号重复)数据 - List validRowList = this.filterImportData(importRowList); - CheckUtils.throwIfEqual(validRowList.size(), 0, "文件数据异常"); - peopleImportResp.setValidRows(validRowList.size()); - - // 检测表格内数据是否合法 - Set seenGhs = new HashSet<>(); - boolean hasDuplicateGh = importRowList.stream() - .map(PeopleImportRowReq::getGh) - .anyMatch(gh -> gh != null && !seenGhs.add(gh)); - CheckUtils.throwIf(hasDuplicateGh, "存在重复工号,请检查数据"); - Set seenDNs = new HashSet<>(); - boolean hasDuplicateDN = importRowList.stream() - .map(PeopleImportRowReq::getDoorNo) - .anyMatch(DN -> DN != null && !seenDNs.add(DN)); - CheckUtils.throwIf(hasDuplicateDN, "存在重复卡号,请检查数据"); - //手机号查重暂不需要 - // Set seenPhones = new HashSet<>(); - // boolean hasDuplicatePhone = validRowList.stream() - // .map(UserImportRowReq::getPhone) - // .anyMatch(phone -> phone != null && !seenPhones.add(phone)); - // CheckUtils.throwIf(hasDuplicatePhone, "存在重复手机,请检测数据"); - - // 查询重复用户,同名忽略 - // peopleImportResp - // .setDuplicatePeopleRows(countExistByField(validRowList, PeopleImportRowReq::getName, PeopleDO::getName, false)); - // 查询重复工号 - // peopleImportResp - // .setDuplicateEmailRows(countExistByField(validRowList, PeopleImportRowReq::getGh, PeopleDO::getGh, true)); - // 查询重复卡号 - // peopleImportResp - // .setDuplicatePhoneRows(countExistByField(validRowList, PeopleImportRowReq::getDoorNo, PeopleDO::getDoorNo, true)); - - // 查询重复身份证号码->重复人员 - peopleImportResp - .setDuplicatePeopleRows(countExistByField(validRowList, PeopleImportRowReq::getIdcard, PeopleDO::getIdcard, false)); - - // 设置导入会话并缓存数据,有效期10分钟 - String importKey = UUID.fastUUID().toString(true); - RedisUtils.set(CacheConstants.DATA_IMPORT_KEY + importKey, JSONUtil.toJsonStr(importRowList), Duration - .ofMinutes(10)); - peopleImportResp.setImportKey(importKey); - return peopleImportResp; - } - - @Override - @Transactional(rollbackFor = Exception.class) - public PeopleImportResp importPeople(PeopleImportReq req) { - // 校验导入会话是否过期 - List importUserList; - try { - String data = RedisUtils.get(CacheConstants.DATA_IMPORT_KEY + req.getImportKey()); - importUserList = JSONUtil.toList(data, PeopleImportRowReq.class); - CheckUtils.throwIf(CollUtil.isEmpty(importUserList), "导入已过期,请重新上传"); - } catch (Exception e) { - log.error("导入异常:", e); - throw new BusinessException("导入已过期,请重新上传"); - } - //通过身份证获取重复人员 id,name,idcard - List existUserList = listByUsernames(importUserList.stream() - .map(PeopleImportRowReq::getIdcard) - .filter(Objects::nonNull) - .toList()); - List existPeopleIdCards = existUserList.stream().map(PeopleDO::getIdcard).toList(); - - CheckUtils.throwIf(isExitImportUser(req, importUserList, existPeopleIdCards), "数据不符合导入策略,已退出导入"); - - // 基础数据准备 - //设置重复人员身份证与id的映射,方便处理 - Map peopleIdMap = existUserList.stream() - .collect(Collectors.toMap(PeopleDO::getIdcard, PeopleDO::getId)); - List branchList = branchService.listByNames(importUserList.stream() - .map(PeopleImportRowReq::getBranchName) - .distinct() - .toList()); - Map branchMap = branchList.stream() - .collect(Collectors.toMap(BranchDO::getName, BranchDO::getId)); - - // 批量操作数据库集合 - List insertList = new ArrayList<>(); - List updateList = new ArrayList<>(); - for (PeopleImportRowReq row : importUserList) { - if (isSkipUserImport(req, row, existPeopleIdCards)) { - // 按规则跳过该行 - continue; - } - PeopleDO peopleDO = BeanUtil.toBeanIgnoreError(row, PeopleDO.class); - peopleDO.setBranchId(branchMap.get(row.getBranchName())); - // 修改 or 新增 - if (UPDATE.validate(req.getDuplicateUser(), row.getIdcard(), existPeopleIdCards)) { - peopleDO.setId(peopleIdMap.get(row.getIdcard())); - updateList.add(peopleDO); - } else { - insertList.add(peopleDO); - } - } - doImportUser(insertList, updateList); - handleDown(insertList, updateList); - RedisUtils.delete(CacheConstants.DATA_IMPORT_KEY + req.getImportKey()); - return new PeopleImportResp(insertList.size() + updateList.size(), insertList.size(), updateList.size()); - } - - @Override - public PageResp pageConsume(PeopleQuery query, PageQuery pageQuery) { - QueryWrapper queryWrapper = new QueryWrapper<>(); - //初始部门不查询下级部门 - if (StrUtil.isNotBlank(query.getBranchId()) && !StrUtil.equals(query.getBranchId(), "1")) { - List branchResps = branchMapper.queryJuniorBranch(query.getBranchId()); - List branchList = branchResps.stream().map(BranchResp::getId).collect(Collectors.toList()); - branchList.add(query.getBranchId()); - queryWrapper.in("p.branch_id", branchList); - } - - //查询条件 - queryWrapper.like(StrUtil.isNotBlank(query.getName()), "p.name", query.getName()); - queryWrapper.like(StrUtil.isNotBlank(query.getPhone()), "p.phone", query.getPhone()); - queryWrapper.likeRight(StrUtil.isNotBlank(query.getIdcard()), "p.idcard", query.getIdcard()); - queryWrapper.eq(StrUtil.isNotBlank(query.getGh()), "p.gh", query.getGh()); - queryWrapper.eq(Objects.nonNull(query.getIsConsume()), "p.is_consume", query.getIsConsume()); - queryWrapper.eq(Objects.nonNull(query.getFreeze()), "p.freeze", query.getFreeze()); - queryWrapper.orderByDesc("p.create_time", "p.id"); - - IPage page = baseMapper.selectPageConsume(new Page<>(pageQuery.getPage(), pageQuery - .getSize()), queryWrapper); - - return PageResp.build(page); - } - - /** - * 消费-人员充值导出 - * - * @param query - * @return - */ - @Override - public void exportConsume(PeopleQuery query, HttpServletResponse response) { - QueryWrapper queryWrapper = new QueryWrapper<>(); - //初始部门不查询下级部门 - if (StrUtil.isNotBlank(query.getBranchId()) && !StrUtil.equals(query.getBranchId(), "1")) { - List branchResps = branchMapper.queryJuniorBranch(query.getBranchId()); - List branchList = branchResps.stream().map(BranchResp::getId).collect(Collectors.toList()); - branchList.add(query.getBranchId()); - queryWrapper.in("p.branch_id", branchList); - } - - //查询条件 - queryWrapper.like(StrUtil.isNotBlank(query.getName()), "p.name", query.getName()); - queryWrapper.like(StrUtil.isNotBlank(query.getPhone()), "p.phone", query.getPhone()); - queryWrapper.likeRight(StrUtil.isNotBlank(query.getIdcard()), "p.idcard", query.getIdcard()); - queryWrapper.eq(StrUtil.isNotBlank(query.getGh()), "p.gh", query.getGh()); - queryWrapper.eq(Objects.nonNull(query.getIsConsume()), "p.is_consume", query.getIsConsume()); - queryWrapper.eq(Objects.nonNull(query.getFreeze()), "p.freeze", query.getFreeze()); - queryWrapper.orderByDesc("p.create_time", "p.id"); - List peopleRespList = baseMapper.selectExportConsume(queryWrapper); - - ExcelUtils.export(peopleRespList, "人员充值清单_" + DateUtil.today(), ConsumePeopleResp.class, response); - } - - /** - * 消费冻结 - * - * @param ids - */ - @Override - public void freeze(List ids) { - LambdaUpdateWrapper wrapper = new LambdaUpdateWrapper().in(PeopleDO::getId, ids); - PeopleDO peopleDO = new PeopleDO(); - peopleDO.setFreeze(YesNoEnum.YES.getValue()); - baseMapper.update(peopleDO, wrapper); - } - - /** - * 消费解冻 - * - * @param ids - */ - @Override - public void unFreeze(List ids) { - LambdaUpdateWrapper wrapper = new LambdaUpdateWrapper().in(PeopleDO::getId, ids); - PeopleDO peopleDO = new PeopleDO(); - peopleDO.setFreeze(YesNoEnum.NO.getValue()); - baseMapper.update(peopleDO, wrapper); - } - - /** - * 消费一键清零 - * - * @param req - */ - @Override - public void resetMoney(PeopleReq req) { - if (null == req.getResetMoneyType() || null == req.getResetMoneyAll()) { - throw new IllegalArgumentException("请选择重置类型和重置范围"); - } - - PeopleDO peopleDO = new PeopleDO(); - if (ObjectUtil.equals(0, req.getResetMoneyType())) { - peopleDO.setCzje(BigDecimal.ZERO); - peopleDO.setBtje(BigDecimal.ZERO); - } else if (ObjectUtil.equals(1, req.getResetMoneyType())) { - peopleDO.setCzje(BigDecimal.ZERO); - } else if (ObjectUtil.equals(2, req.getResetMoneyType())) { - peopleDO.setBtje(BigDecimal.ZERO); - } - - List rechargeRecordDOList = new ArrayList<>(); - UpdateWrapper wrapper = new UpdateWrapper<>(); - // 0:不重置所有人员,1:重置所有人员 - if (ObjectUtil.equals(0, req.getResetMoneyAll()) && CollectionUtil.isNotEmpty(req.getIds())) { - wrapper.in("id", req.getIds()); - - // 保存清零记录 - List peopleDOList = baseMapper.selectByIds(req.getIds()); - peopleDOList.forEach(people -> { - //充值记录 - RechargeRecordDO rechargeRecordDO = new RechargeRecordDO(); - rechargeRecordDO.setAccountId(people.getId()); - rechargeRecordDO.setEmpId(people.getGh()); - if (ObjectUtil.equals(0, req.getResetMoneyType())) { - //清零(全部) - rechargeRecordDO.setRechargeType(ConsumeRechargeTypeEnum.CLEAR.getValue()); - rechargeRecordDO.setClearBtje(people.getBtje()); - rechargeRecordDO.setClearCzje(people.getCzje()); - } else if (ObjectUtil.equals(1, req.getResetMoneyType())) { - //清零(充值) - rechargeRecordDO.setRechargeType(ConsumeRechargeTypeEnum.CLEAR_CZ.getValue()); - rechargeRecordDO.setClearCzje(people.getCzje()); - } else if (ObjectUtil.equals(2, req.getResetMoneyType())) { - //清零(补贴) - rechargeRecordDO.setRechargeType(ConsumeRechargeTypeEnum.CLEAR_BT.getValue()); - rechargeRecordDO.setClearBtje(people.getBtje()); - } - rechargeRecordDO.setRechargeWay(ConsumeRechargeWayEnum.WEB.getValue()); - rechargeRecordDOList.add(rechargeRecordDO); - }); - } else { - //全表更新 - wrapper.eq("1", "1"); - - //全部清零,记录一条数据 - RechargeRecordDO rechargeRecordDO = new RechargeRecordDO(); - rechargeRecordDO.setAccountId(0L); - rechargeRecordDO.setEmpId("0"); - rechargeRecordDO.setRechargeWay(ConsumeRechargeWayEnum.WEB.getValue()); - rechargeRecordDO.setRechargeType(ConsumeRechargeTypeEnum.CLEAR.getValue()); - rechargeRecordDOList.add(rechargeRecordDO); - } - baseMapper.update(peopleDO, wrapper); - - //充值记录 - rechargeRecordMapper.insertBatch(rechargeRecordDOList); - } - - /** - * 补贴人员 - * - * @param req 补贴参数 - * @return 补贴结果 - */ - @Override - @Transactional(rollbackFor = Exception.class) - public void subsidy(PeopleReq req) { - // 校验参数 - CheckUtils.throwIf(CollectionUtil.isEmpty(req.getIds()), "请选择人员"); - CheckUtils.throwIf(req.getMoney() == null || req.getMoney().compareTo(BigDecimal.ZERO) <= 0, "请输入正确的大于0的金额"); - - List peopleDOList = baseMapper.selectByIds(req.getIds()); - List rechargeRecordDOList = new ArrayList<>(); - peopleDOList.forEach(peopleDO -> { - peopleDO.setBtje(peopleDO.getBtje().add(req.getMoney())); - - //充值记录 - RechargeRecordDO rechargeRecordDO = new RechargeRecordDO(); - rechargeRecordDO.setAccountId(peopleDO.getId()); - rechargeRecordDO.setEmpId(peopleDO.getGh()); - rechargeRecordDO.setConsumeMoney(req.getMoney()); - rechargeRecordDO.setRechargeWay(ConsumeRechargeWayEnum.WEB.getValue()); - rechargeRecordDO.setRechargeType(ConsumeRechargeTypeEnum.SUBSIDY.getValue()); - rechargeRecordDOList.add(rechargeRecordDO); - }); - - this.baseMapper.updateBatchById(peopleDOList); - - //充值记录 - rechargeRecordMapper.insertBatch(rechargeRecordDOList); - } - - /** - * 充值人员 - * - * @param req 充值参数 - * @return 充值结果 - */ - @Override - @Transactional(rollbackFor = Exception.class) - public void deposit(PeopleReq req) { - // 校验参数 - CheckUtils.throwIf(CollectionUtil.isEmpty(req.getIds()), "请选择人员"); - CheckUtils.throwIf(req.getMoney() == null || req.getMoney().compareTo(BigDecimal.ZERO) <= 0, "请输入正确的大于0的金额"); - - List peopleDOList = baseMapper.selectByIds(req.getIds()); - List rechargeRecordDOList = new ArrayList<>(); - peopleDOList.forEach(peopleDO -> { - peopleDO.setCzje(peopleDO.getCzje().add(req.getMoney())); - - //充值记录 - RechargeRecordDO rechargeRecordDO = new RechargeRecordDO(); - rechargeRecordDO.setAccountId(peopleDO.getId()); - rechargeRecordDO.setEmpId(peopleDO.getGh()); - rechargeRecordDO.setConsumeMoney(req.getMoney()); - rechargeRecordDO.setRechargeWay(ConsumeRechargeWayEnum.WEB.getValue()); - rechargeRecordDO.setRechargeType(ConsumeRechargeTypeEnum.RECHARGE.getValue()); - rechargeRecordDOList.add(rechargeRecordDO); - }); - - this.baseMapper.updateBatchById(peopleDOList); - - //充值记录 - rechargeRecordMapper.insertBatch(rechargeRecordDOList); - } - - /** - * 退款人员 - * - * @param req 退款参数 - * @return 退款结果 - */ - @Override - @Transactional(rollbackFor = Exception.class) - public void refund(PeopleReq req) { - // 校验参数 - CheckUtils.throwIf(null == req.getId(), "请选择人员"); - CheckUtils.throwIf(req.getMoney() == null || req.getMoney().compareTo(BigDecimal.ZERO) <= 0, "请输入正确的大于0的金额"); - - PeopleDO peopleDO = baseMapper.selectById(req.getId()); - CheckUtils.throwIf(peopleDO.getCzje().compareTo(req.getMoney()) < 0, "人员余额不足"); - peopleDO.setCzje(peopleDO.getCzje().subtract(req.getMoney())); - baseMapper.updateById(peopleDO); - - //充值记录 - RechargeRecordDO rechargeRecordDO = new RechargeRecordDO(); - rechargeRecordDO.setAccountId(peopleDO.getId()); - rechargeRecordDO.setEmpId(peopleDO.getGh()); - rechargeRecordDO.setConsumeMoney(req.getMoney()); - rechargeRecordDO.setRechargeWay(ConsumeRechargeWayEnum.WEB.getValue()); - rechargeRecordDO.setRechargeType(ConsumeRechargeTypeEnum.REFUND.getValue()); - rechargeRecordMapper.insert(rechargeRecordDO); - } - - /** - * 过滤无效的导入用户数据(批量导入不严格校验数据) - * - * @param importRowList 导入数据 - */ - private List filterImportData(List importRowList) { - // 校验过滤 - // List list = importRowList.stream() - // .filter(row -> ValidationUtil.validate(row).isEmpty()) - // .toList(); - // 用户名+手机号去重 - return importRowList.stream() - .collect(Collectors.toMap(row -> row.getName() + "_" + row.getPhone(), user -> user, (existing, - replacement) -> existing)) - .values() - .stream() - .toList(); - } - - /** - * 按指定数据集获取数据库已存在的数量 - * - * @param peopleRowList 导入的数据源 - * @param rowField 导入数据的字段 - * @param dbField 对比数据库的字段 - * @return 存在的数量 - */ - private int countExistByField(List peopleRowList, - Function rowField, - SFunction dbField, - boolean fieldEncrypt) { - List fieldValues = peopleRowList.stream().map(rowField).filter(Objects::nonNull).toList(); - if (fieldValues.isEmpty()) { - return 0; - } - return (int)this.count(Wrappers.lambdaQuery() - .in(dbField, fieldEncrypt ? SecureUtils.encryptFieldByAes(fieldValues) : fieldValues)); - } - - /** - * 导入用户 - * - * @param insertList 新增用户 - * @param updateList 修改用户 - */ - private void doImportUser(List insertList, List updateList) { - if (CollUtil.isNotEmpty(insertList)) { - for (PeopleDO peopleDO : insertList) { - peopleDO.setGuid(IdUtil.simpleUUID()); - } - baseMapper.insert(insertList); - } - if (CollUtil.isNotEmpty(updateList)) { - SpringUtils.getProxy(this).updateBatchById(updateList); - } - } - - /** - * 根据人员身份证获取用户列表 - * - * @param peopleIdCards 人员身份证列表 - * @return 用户列表 - */ - private List listByUsernames(List peopleIdCards) { - return this.list(Wrappers.lambdaQuery() - .in(PeopleDO::getIdcard, peopleIdCards) - .select(PeopleDO::getId, PeopleDO::getIdcard, PeopleDO::getId)); - } - - /** - * 判断是否退出导入 - * - * @param req 导入参数 - * @param list 导入数据 - * @param existPeopleIdCards 导入数据中已存在的人员身份证 - * @return 是否退出 - */ - private boolean isExitImportUser(PeopleImportReq req, - List list, - List existPeopleIdCards) { - return list.stream() - .anyMatch(row -> EXIT.validate(req.getDuplicateUser(), row.getIdcard(), existPeopleIdCards)); - } - - /** - * 判断是否跳过导入 - * - * @param req 导入参数 - * @param row 导入数据 - * @param existPeopleIdCards 导入数据中已存在的用户名 - * @return 是否跳过 - */ - private boolean isSkipUserImport(PeopleImportReq req, PeopleImportRowReq row, List existPeopleIdCards) { - return SKIP.validate(req.getDuplicateUser(), row.getIdcard(), existPeopleIdCards); - } - - /** - * - * @param insertList 导入的新增名单 - * @param updateList 导入的修改名单 - */ - private void handleDown(List insertList, List updateList) { - //新增人员添加下发记录 - for (PeopleDO peopleDO : insertList) { - //从表中拿更详细的数据 - PeopleDO people = baseMapper.lambdaQuery() - .eq(PeopleDO::getName, peopleDO.getName()) - .eq(PeopleDO::getIdcard, peopleDO.getIdcard()) - .one(); - //获取部门绑定规则 - List branchRules = branchRuleMapper.lambdaQuery() - .eq(BranchRuleDO::getBranchId, people.getBranchId()) - .list(); - CheckUtils.throwIfEmpty(branchRules, people.getName() + "所在部门暂未绑定规则"); - for (BranchRuleDO branchRule : branchRules) { - Long ruleId = branchRule.getRuleId(); - //获取规则绑定设备 - List ruleRelationS = ruleRelationMapper.lambdaQuery() - .eq(RuleRelationDO::getRuleId, ruleId) - .list(); - PeopleDownReq peopleDownReq = new PeopleDownReq(); - peopleDownReq.setPeopleId(people.getId()); - peopleDownReq.setRuleId(ruleId); - peopleDownReq.setDownResult(1); - peopleDownReq.setOperType(0); - peopleDownReq.setMsg("人员导入"); - for (RuleRelationDO ruleRelation : ruleRelationS) { - peopleDownReq.setDownTime(new Date()); - peopleDownReq.setEquipmentId(ruleRelation.getEquipmentId()); - peopledownService.upsertRecord(peopleDownReq); - } - } - - } - //修改人员增加下发记录 - for (PeopleDO peopleDO : updateList) { - //从表中拿更详细的数据 - PeopleDO people = baseMapper.lambdaQuery() - .eq(PeopleDO::getName, peopleDO.getName()) - .eq(PeopleDO::getIdcard, peopleDO.getIdcard()) - .one(); - //获取部门绑定规则 - List branchRules = branchRuleMapper.lambdaQuery() - .eq(BranchRuleDO::getBranchId, people.getBranchId()) - .list(); - CheckUtils.throwIfEmpty(branchRules, people.getName() + "所在部门暂未绑定规则"); - for (BranchRuleDO branchRule : branchRules) { - Long ruleId = branchRule.getRuleId(); - //获取规则绑定设备 - List ruleRelationS = ruleRelationMapper.lambdaQuery() - .eq(RuleRelationDO::getRuleId, ruleId) - .list(); - PeopleDownReq peopleDownReq = new PeopleDownReq(); - peopleDownReq.setPeopleId(people.getId()); - peopleDownReq.setRuleId(ruleId); - peopleDownReq.setDownResult(1); - peopleDownReq.setOperType(1); - peopleDownReq.setMsg("人员导入"); - for (RuleRelationDO ruleRelation : ruleRelationS) { - peopleDownReq.setDownTime(new Date()); - peopleDownReq.setEquipmentId(ruleRelation.getEquipmentId()); - peopledownService.upsertRecord(peopleDownReq); - } - } - - } - } - - @Override - @ContainerMethod(namespace = ContainerConstants.PEOPLE_NAME, type = MappingType.ORDER_OF_KEYS) - public String getPeopleName(Long id) { - if (null == id) { - return ""; - } - - PeopleDO peopleDO = baseMapper.lambdaQuery().eq(PeopleDO::getId, id).one(); - return peopleDO != null ? peopleDO.getName() : ""; - } - - @Override - public List getPeopleNameList(PeopleQuery peopleQuery) { - LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); - queryWrapper.eq(StrUtil.isNotBlank(peopleQuery.getBranchId()), PeopleDO::getBranchId, peopleQuery - .getBranchId()); - queryWrapper.select(PeopleDO::getId, PeopleDO::getName); - List peopleDOS = baseMapper.selectList(queryWrapper); - return peopleConvert.labelValueList(peopleDOS); - } - - @Override - public void downloadConsumeImportTemplate(HttpServletResponse response) throws IOException { - try { - FileUploadUtils.download(response, ResourceUtil - .getStream("templates/import/consumePeopleDeposit.xlsx"), "人员充值导入模板.xlsx"); - } catch (Exception e) { - log.error("下载人员充值导入模板失败:{}", e.getMessage(), e); - response.setCharacterEncoding(CharsetUtil.UTF_8); - response.setContentType(ContentType.JSON.toString()); - response.getWriter().write(JSONUtil.toJsonStr(R.fail("下载人员充值导入模板失败"))); - } - } - - @Override - public PeopleDepositImportParseResp parseConsumeImport(MultipartFile file) { - PeopleDepositImportParseResp userImportResp = new PeopleDepositImportParseResp(); - List importRowList; - // 读取表格数据 - try { - importRowList = EasyExcel.read(file.getInputStream()) - .head(PeopleDepositImportRowReq.class) - .sheet() - .headRowNumber(1) - .doReadSync(); - } catch (Exception e) { - log.error("用户导入数据文件解析异常:{}", e.getMessage(), e); - throw new BusinessException("数据文件解析异常"); - } - // 总计行数 - userImportResp.setTotalRows(importRowList.size()); - CheckUtils.throwIfEmpty(importRowList, "数据文件格式错误"); - // 有效行数:过滤无效数据 - List validRowList = this.filterConsumeImportData(importRowList); - CheckUtils.throwIfEmpty(validRowList, "数据文件格式错误"); - - // 检测表格内数据是否合法 - Set seenGhs = new HashSet<>(); - boolean hasDuplicateGh = validRowList.stream() - .map(PeopleDepositImportRowReq::getGh) - .anyMatch(gh -> gh != null && !seenGhs.add(gh)); - CheckUtils.throwIf(hasDuplicateGh, "存在重复工号,请检测数据"); - - // 查询重复用户 - int duplicateGhRows = 0; - List fieldValues = validRowList.stream() - .map(PeopleDepositImportRowReq::getGh) - .filter(Objects::nonNull) - .toList(); - if (CollUtil.isNotEmpty(fieldValues)) { - int peopleCount = (int)this.count(Wrappers.lambdaQuery().in(PeopleDO::getGh, fieldValues)); - duplicateGhRows = fieldValues.size() - peopleCount; - } - userImportResp.setValidRows(validRowList.size() - duplicateGhRows); - userImportResp.setDuplicateUserRows(duplicateGhRows); - - // 查询未启用消费人员数量 - int unEnabledRows = 0; - List fieldValues2 = validRowList.stream() - .filter(row -> "禁用".equals(row.getIsConsume())) - .toList(); - if (CollUtil.isNotEmpty(fieldValues2)) { - unEnabledRows = fieldValues2.size(); - } - userImportResp.setUnEnabledRows(unEnabledRows); - - // 设置导入会话并缓存数据,有效期10分钟 - String importKey = UUID.fastUUID().toString(true); - RedisUtils.set(CacheConstants.DATA_IMPORT_KEY + importKey, JSONUtil.toJsonStr(validRowList), Duration - .ofMinutes(10)); - userImportResp.setImportKey(importKey); - return userImportResp; - } - - /** - * 过滤无效的导入用户数据 - * - * @param importRowList 导入数据 - */ - private List filterConsumeImportData(List importRowList) { - // 校验过滤 - return importRowList.stream().filter(row -> ValidationUtil.validate(row).isEmpty()).toList(); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public UserImportResp importConsumePeople(PeopleDepositImportReq req) { - // 校验导入会话是否过期 - List importUserList; - try { - String data = RedisUtils.get(CacheConstants.DATA_IMPORT_KEY + req.getImportKey()); - importUserList = JSONUtil.toList(data, PeopleDepositImportRowReq.class); - CheckUtils.throwIf(CollUtil.isEmpty(importUserList), "导入已过期,请重新上传"); - } catch (Exception e) { - log.error("导入异常:", e); - throw new BusinessException("导入已过期,请重新上传"); - } - - //不存在得人员 - List fieldValues = importUserList.stream() - .map(PeopleDepositImportRowReq::getGh) - .filter(Objects::nonNull) - .toList(); - List peopleNotExistGhs = new ArrayList<>(); - List peopleList = new ArrayList<>(); - if (CollUtil.isNotEmpty(fieldValues)) { - peopleList = baseMapper.selectList(new QueryWrapper().in("gh", fieldValues)); - List finalPeopleList = peopleList; - List collect = finalPeopleList.stream().map(PeopleDO::getGh).toList(); - peopleNotExistGhs = fieldValues.stream().filter(gh -> !collect.contains(gh)).toList(); - } - - //禁用消费得人员 - List consumeNotEnable = importUserList.stream() - .map(PeopleDepositImportRowReq::getIsConsume) - .filter("禁用"::equals) - .toList(); - - CheckUtils.throwIf(errorImport(req, importUserList, peopleNotExistGhs, consumeNotEnable), "数据异常,已停止导入!"); - - Map peopleIdMap = peopleList.stream() - .collect(Collectors.toMap(PeopleDO::getGh, PeopleDO::getId, (people1, people2) -> people1)); - List updateList = new ArrayList<>(); - for (PeopleDepositImportRowReq row : importUserList) { - if (isSkipImport(req, row, peopleNotExistGhs, consumeNotEnable)) { - // 按规则跳过该行 - continue; - } - - PeopleDO peopleDO = new PeopleDO(); - //是否启用消费 - if (UPDATE.equals(req.getConsumeNotEnable())) { - peopleDO.setIsConsume(EnableEnum.ENABLE.getValue()); - } - peopleDO.setCzje(new BigDecimal(row.getCzje())); - peopleDO.setBtje(new BigDecimal(row.getBtje())); - peopleDO.setFreeze(YesNoEnum.getByDescription(row.getFreeze()).getValue()); - peopleDO.setId(peopleIdMap.get(row.getGh())); - updateList.add(peopleDO); - } - - SpringUtils.getProxy(this).updateBatchById(updateList); - - RedisUtils.delete(CacheConstants.DATA_IMPORT_KEY + req.getImportKey()); - return new UserImportResp(importUserList.size(), 0, updateList.size()); - } - - private boolean errorImport(PeopleDepositImportReq req, - List list, - List peopleNotExistGhs, - List consumeNotEnable) { - return list.stream() - .anyMatch(row -> EXIT.validate(req.getPeopleNotExist(), row.getGh(), peopleNotExistGhs) || EXIT.validate(req - .getConsumeNotEnable(), row.getIsConsume(), consumeNotEnable)); - } - - private boolean isSkipImport(PeopleDepositImportReq req, - PeopleDepositImportRowReq row, - List peopleNotExistGhs, - List consumeNotEnable) { - return SKIP.validate(req.getPeopleNotExist(), row.getGh(), peopleNotExistGhs) || SKIP.validate(req - .getConsumeNotEnable(), row.getIsConsume(), consumeNotEnable); - } - -} diff --git a/wms-module-system/src/main/java/top/wms/admin/peopleDownRecord/mapper/PeopleDownMapper.java b/wms-module-system/src/main/java/top/wms/admin/peopleDownRecord/mapper/PeopleDownMapper.java deleted file mode 100644 index c1aaf93..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/peopleDownRecord/mapper/PeopleDownMapper.java +++ /dev/null @@ -1,43 +0,0 @@ -package top.wms.admin.peopleDownRecord.mapper; - -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.core.toolkit.Constants; -import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Repository; -import top.continew.starter.data.mp.base.BaseMapper; -import top.wms.admin.peopleDownRecord.model.entity.PeopleDownDO; -import top.wms.admin.peopleDownRecord.model.req.PeopleDownReq; -import top.wms.admin.peopleDownRecord.model.resp.PeopleDownResp; - -import java.util.List; - -@Repository -public interface PeopleDownMapper extends BaseMapper { - - /** - * 新增或更新人员下发记录 - * - * @param record - * @return - */ - int upsert(PeopleDownReq record); - - /** - * 导出人员下发记录 - * - * @param queryWrapper - * @return - */ - List selectListExport(@Param(Constants.WRAPPER) QueryWrapper queryWrapper); - - /** - * 分页查询人员下发记录 - * - * @param page - * @param queryWrapper - * @return - */ - IPage selectDownPage(@Param("page") IPage page, - @Param(Constants.WRAPPER) QueryWrapper queryWrapper); -} diff --git a/wms-module-system/src/main/java/top/wms/admin/peopleDownRecord/mapstruct/PeopleDownConvert.java b/wms-module-system/src/main/java/top/wms/admin/peopleDownRecord/mapstruct/PeopleDownConvert.java deleted file mode 100644 index df3c17a..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/peopleDownRecord/mapstruct/PeopleDownConvert.java +++ /dev/null @@ -1,8 +0,0 @@ -package top.wms.admin.peopleDownRecord.mapstruct; - -import org.mapstruct.Mapper; - -@Mapper(componentModel = "spring") -public interface PeopleDownConvert { - -} diff --git a/wms-module-system/src/main/java/top/wms/admin/peopleDownRecord/model/entity/PeopleDownDO.java b/wms-module-system/src/main/java/top/wms/admin/peopleDownRecord/model/entity/PeopleDownDO.java deleted file mode 100644 index 7d8657f..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/peopleDownRecord/model/entity/PeopleDownDO.java +++ /dev/null @@ -1,50 +0,0 @@ -package top.wms.admin.peopleDownRecord.model.entity; - -import com.baomidou.mybatisplus.annotation.TableName; -import lombok.Data; -import top.continew.starter.extension.crud.model.entity.BaseIdDO; -import java.io.Serial; -import java.time.LocalDateTime; - -@Data -@TableName("equipment_down_record") -public class PeopleDownDO extends BaseIdDO { - @Serial - private static final long serialVersionUID = 1L; - - /** - * 设备ID - */ - private Long equipmentId; - - /** - * 人员ID - */ - private Long peopleId; - - /** - * 规则id - */ - private Long ruleId; - - /** - * 下发时间 - */ - private LocalDateTime downTime; - - /** - * 下发结果:0-成功,1-失败 - */ - private Integer downResult; - - /** 下发回执 */ - private String msg; - - //操作类型 - private Integer operType; - - private Long createUser; - - private LocalDateTime createTime; - -} diff --git a/wms-module-system/src/main/java/top/wms/admin/peopleDownRecord/model/query/PeopleDownQuery.java b/wms-module-system/src/main/java/top/wms/admin/peopleDownRecord/model/query/PeopleDownQuery.java deleted file mode 100644 index f630481..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/peopleDownRecord/model/query/PeopleDownQuery.java +++ /dev/null @@ -1,52 +0,0 @@ -package top.wms.admin.peopleDownRecord.model.query; - -import com.fasterxml.jackson.annotation.JsonFormat; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Builder; -import lombok.Data; -import org.springframework.format.annotation.DateTimeFormat; - -import java.io.Serializable; -import java.util.Date; - -@Data -@Schema(description = "下发管理查询条件") -@Builder -public class PeopleDownQuery implements Serializable { - private static final long serialVersionUID = 1L; - - private String id; - - private Long equipmentId; - - private Long peopleId; - - private Long ruleId; - - private Integer downResult; - - private String createUser; - - /** - * 时间段查询起始时间 - */ - @Schema(description = "下发时间开始(格式:yyyy-MM-dd 或 yyyy-MM-dd HH:mm:ss)") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date downTimeStart; - - /** - * 时间段查询结束时间 - */ - @Schema(description = "下发时间结束(格式:yyyy-MM-dd 或 yyyy-MM-dd HH:mm:ss)") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date downTimeEnd; - - @Schema(description = "员工姓名") - private String peopleName; - - @Schema(description = "设备名称") - private String equipmentName; - -} diff --git a/wms-module-system/src/main/java/top/wms/admin/peopleDownRecord/model/req/PeopleDownReq.java b/wms-module-system/src/main/java/top/wms/admin/peopleDownRecord/model/req/PeopleDownReq.java deleted file mode 100644 index f030835..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/peopleDownRecord/model/req/PeopleDownReq.java +++ /dev/null @@ -1,84 +0,0 @@ -package top.wms.admin.peopleDownRecord.model.req; - -import com.fasterxml.jackson.annotation.JsonFormat; -import io.swagger.v3.oas.annotations.media.Schema; - -import jakarta.validation.constraints.NotEmpty; -import jakarta.validation.constraints.NotNull; -import lombok.Data; - -import java.io.Serializable; -import java.util.Date; - -@Data -@Schema(description = "创建或修改下发管理参数") -public class PeopleDownReq implements Serializable { - - private static final long serialVersionUID = 1L; - - /** - * 主键id - */ - @Schema(description = "主键id") - private Long id; - - /** - * 设备id - */ - @Schema(description = "设备id") - @NotNull(message = "设备id不能为空") - private Long equipmentId; - - @Schema(description = "设备名称") - @NotEmpty(message = "设备名称不能为空") - private String equipmentName; - - @Schema(description = "人员名称") - @NotEmpty(message = "人员名称不能为空") - private String name; - - @Schema(description = "工号") - @NotEmpty(message = "工号不能为空") - private String gh; - - /** - * 人员id - */ - @Schema(description = "人员id") - @NotEmpty(message = "人员id不能为空") - private Long peopleId; - - /** - * 规则id - */ - @Schema(description = "规则id") - @NotNull(message = "规则id不能为空") - private Long ruleId; - - /** - * 下发时间 - */ - @Schema(description = "下发时间") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date downTime; - - /** - * 下发结果 - */ - @Schema(description = "下发结果('0': 成功 '1':失败)") - @NotEmpty(message = "下发结果不能为空") - private Integer downResult; - - @Schema(description = "下发人") - private Long createUser; - - @Schema(description = "创建时间") - private Date createTime; - - @Schema(description = "备注") - private String msg; - - @Schema(description = "操作类型 0:新增人员 1:修改人员 2:下发人员 3:删除") - private Integer operType = 0; - -} diff --git a/wms-module-system/src/main/java/top/wms/admin/peopleDownRecord/model/resp/PeopleDownResp.java b/wms-module-system/src/main/java/top/wms/admin/peopleDownRecord/model/resp/PeopleDownResp.java deleted file mode 100644 index a4be2d3..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/peopleDownRecord/model/resp/PeopleDownResp.java +++ /dev/null @@ -1,83 +0,0 @@ -package top.wms.admin.peopleDownRecord.model.resp; - -import com.alibaba.excel.annotation.ExcelIgnore; -import com.alibaba.excel.annotation.ExcelProperty; -import com.alibaba.excel.annotation.write.style.ColumnWidth; -import com.fasterxml.jackson.annotation.JsonFormat; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; -import org.hibernate.validator.constraints.Length; -import org.springframework.format.annotation.DateTimeFormat; -import top.continew.starter.file.excel.converter.ExcelBaseEnumConverter; -import top.wms.admin.common.enums.SuccessFailureStatusEnum; -import top.wms.admin.common.model.resp.BaseDetailResp; - -import java.time.LocalDateTime; - -@Data -@Schema(description = "下发管理信息") -public class PeopleDownResp extends BaseDetailResp { - - /** - * 设备id - */ - @Schema(description = "设备id") - @Length(max = 25, message = "设备id长度不能超过 {max} 个字符") - @ExcelIgnore - private Long equipmentId; - - /** - * 人员id - */ - @Schema(description = "人员id") - @Length(max = 25, message = "人员id长度不能超过 {max} 个字符") - @ExcelIgnore - private Long peopleId; - - @Schema(description = "规则id") - @ExcelIgnore - private Long ruleId; - - /** - * 下发时间 - */ - @Schema(description = "下发时间") - @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") - @ExcelProperty(value = "下发时间", order = 6) - @ColumnWidth(30) - private LocalDateTime downTime; - - /** - * 下发结果 - */ - @Schema(description = "下发结果('0': 成功 '1':失败)") - @ExcelProperty(value = "下发结果", order = 5, converter = ExcelBaseEnumConverter.class) - private SuccessFailureStatusEnum downResult; - - @Schema(description = "备注") - @ExcelIgnore - private String msg; - - @Schema(description = "操作类型 0:新增 1:修改 2:下发") - @ExcelIgnore - private Integer operType; - - @Schema(description = "工号") - @ExcelProperty(value = "工号", order = 2) - @ColumnWidth(20) - private String gh; - - @Schema(description = "员工姓名") - @ExcelProperty(value = "员工姓名", order = 1) - private String peopleName; - - @Schema(description = "设备名称") - @ExcelProperty(value = "设备名称", order = 3) - private String equipmentName; - - @Schema(description = "规则") - @ExcelProperty(value = "规则名称", order = 4) - private String ruleName; - -} diff --git a/wms-module-system/src/main/java/top/wms/admin/peopleDownRecord/service/PeopleDownService.java b/wms-module-system/src/main/java/top/wms/admin/peopleDownRecord/service/PeopleDownService.java deleted file mode 100644 index d44f7ff..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/peopleDownRecord/service/PeopleDownService.java +++ /dev/null @@ -1,26 +0,0 @@ -package top.wms.admin.peopleDownRecord.service; - -import top.continew.starter.extension.crud.model.query.PageQuery; -import top.continew.starter.extension.crud.model.resp.PageResp; -import top.continew.starter.extension.crud.service.BaseService; -import top.wms.admin.peopleDownRecord.model.query.PeopleDownQuery; -import top.wms.admin.peopleDownRecord.model.req.PeopleDownReq; -import top.wms.admin.peopleDownRecord.model.resp.PeopleDownResp; - -import java.util.List; - -public interface PeopleDownService extends BaseService { - /** - * 分页查询列表 - * - * @param query 查询条件 - * @param pageQuery 分页查询条件 - * @return 分页列表信息 - */ - PageResp page(PeopleDownQuery query, PageQuery pageQuery); - - public int upsertRecord(PeopleDownReq record); - - public void batchUpsertRecord(List records); - -} diff --git a/wms-module-system/src/main/java/top/wms/admin/peopleDownRecord/service/impl/PeopleDownServiceImpl.java b/wms-module-system/src/main/java/top/wms/admin/peopleDownRecord/service/impl/PeopleDownServiceImpl.java deleted file mode 100644 index 64ebcd5..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/peopleDownRecord/service/impl/PeopleDownServiceImpl.java +++ /dev/null @@ -1,131 +0,0 @@ -package top.wms.admin.peopleDownRecord.service.impl; - -import cn.crane4j.annotation.AutoOperate; -import cn.hutool.core.date.DateUtil; -import cn.hutool.core.util.ObjectUtil; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import jakarta.servlet.http.HttpServletResponse; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Service; -import top.continew.starter.core.validation.CheckUtils; -import top.continew.starter.extension.crud.model.query.PageQuery; -import top.continew.starter.extension.crud.model.query.SortQuery; -import top.continew.starter.extension.crud.model.resp.PageResp; -import top.continew.starter.extension.crud.service.BaseServiceImpl; -import top.continew.starter.file.excel.util.ExcelUtils; -import top.wms.admin.common.context.UserContextHolder; -import top.wms.admin.equipment.model.req.EquipmentReq; -import top.wms.admin.equipment.model.resp.EquipmentResp; -import top.wms.admin.equipment.service.EquipmentService; -import top.wms.admin.peopleBranch.mapper.PeopleMapper; -import top.wms.admin.peopleBranch.model.entity.PeopleDO; -import top.wms.admin.peopleDownRecord.mapper.PeopleDownMapper; -import top.wms.admin.peopleDownRecord.mapstruct.PeopleDownConvert; -import top.wms.admin.peopleDownRecord.model.entity.PeopleDownDO; -import top.wms.admin.peopleDownRecord.model.query.PeopleDownQuery; -import top.wms.admin.peopleDownRecord.model.req.PeopleDownReq; -import top.wms.admin.peopleDownRecord.model.resp.PeopleDownResp; -import top.wms.admin.peopleDownRecord.service.PeopleDownService; - -import java.util.Date; -import java.util.List; - -@Service -@RequiredArgsConstructor -@Slf4j -public class PeopleDownServiceImpl extends BaseServiceImpl implements PeopleDownService { - - private final PeopleDownConvert peopleDownConvert; - - private final PeopleMapper peopleMapper; - - private final EquipmentService equipmentService; - - @Override - @AutoOperate(type = PeopleDownResp.class, on = "list") - public PageResp page(PeopleDownQuery query, PageQuery pageQuery) { - - QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.like(ObjectUtil.isNotEmpty(query.getPeopleName()), "sp.name", query.getPeopleName()); - //查询条件 - queryWrapper.eq(ObjectUtil.isNotEmpty(query.getEquipmentId()), "pd.equipment_id", query.getEquipmentId()); - queryWrapper.eq(ObjectUtil.isNotEmpty(query.getDownResult()), "pd.down_result", query.getDownResult()); - //时间段查询 - if (ObjectUtil.isNotEmpty(query.getDownTimeStart()) && ObjectUtil.isNotEmpty(query.getDownTimeEnd())) { - queryWrapper.between("pd.down_time", query.getDownTimeStart(), query.getDownTimeEnd()); - } - this.sort(queryWrapper, pageQuery); - //执行查询 - IPage page = baseMapper.selectDownPage(new Page<>(pageQuery.getPage(), pageQuery - .getSize()), queryWrapper); - - // 5. 返回给前端 - return PageResp.build(page); - - } - - @Override - public int upsertRecord(PeopleDownReq record) { - - if (ObjectUtil.isEmpty(record.getCreateUser())) { - Long userId = UserContextHolder.getUserId(); - record.setCreateUser(userId); - } - if (ObjectUtil.isEmpty(record.getCreateTime())) { - Date now = new Date(); - record.setCreateTime(now); - } - if (ObjectUtil.isNotEmpty(record.getName()) && ObjectUtil.isNotEmpty(record.getGh())) { - PeopleDO peopleDO = peopleMapper.lambdaQuery() - .eq(PeopleDO::getName, record.getName()) - .eq(PeopleDO::getGh, record.getGh()) - .one(); - CheckUtils.throwIfEmpty(peopleDO, "该人员不存在"); - record.setPeopleId(peopleDO.getId()); - } - if (ObjectUtil.isNotEmpty(record.getEquipmentName())) { - EquipmentReq equipmentReq = new EquipmentReq(); - equipmentReq.setName(record.getEquipmentName()); - EquipmentResp equipmentResp = equipmentService.selectSysEquipment(equipmentReq); - CheckUtils.throwIfNull(equipmentResp, "该设备不存在"); - record.setEquipmentId(equipmentResp.getId()); - } - - return this.baseMapper.upsert(record); - } - - @Override - public void batchUpsertRecord(List records) { - for (PeopleDownReq record : records) { - upsertRecord(record); - } - } - - @Override - public void delete(List peopleIds) { - baseMapper.delete(new QueryWrapper().lambda().in(PeopleDownDO::getPeopleId, peopleIds)); - } - - @Override - public void export(PeopleDownQuery query, SortQuery sortQuery, HttpServletResponse response) { - QueryWrapper queryWrapper = new QueryWrapper<>(); - - queryWrapper.like(ObjectUtil.isNotEmpty(query.getPeopleName()), "sp.name", query.getPeopleName()); - //查询条件 - queryWrapper.eq(ObjectUtil.isNotEmpty(query.getEquipmentId()), "pd.equipment_id", query.getEquipmentId()); - queryWrapper.eq(ObjectUtil.isNotEmpty(query.getDownResult()), "pd.down_result", query.getDownResult()); - //时间段查询 - if (ObjectUtil.isNotEmpty(query.getDownTimeStart()) && ObjectUtil.isNotEmpty(query.getDownTimeEnd())) { - queryWrapper.between("pd.down_time", query.getDownTimeStart(), query.getDownTimeEnd()); - } - this.sort(queryWrapper, sortQuery); - //执行查询 - List list = baseMapper.selectListExport(queryWrapper); - - ExcelUtils.export(list, "人员下发记录_" + DateUtil.today(), PeopleDownResp.class, response); - } - -} diff --git a/wms-module-system/src/main/java/top/wms/admin/rule/mapper/EmpowerRecordMapper.java b/wms-module-system/src/main/java/top/wms/admin/rule/mapper/EmpowerRecordMapper.java deleted file mode 100644 index 3162479..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/rule/mapper/EmpowerRecordMapper.java +++ /dev/null @@ -1,28 +0,0 @@ -package top.wms.admin.rule.mapper; - -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.core.toolkit.Constants; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Repository; -import top.continew.starter.data.mp.base.BaseMapper; -import top.wms.admin.rule.model.entity.EmpowerRecordDO; -import top.wms.admin.rule.model.resp.EmpowerRecordDetailResp; -import top.wms.admin.rule.model.resp.EmpowerRecordResp; - -import java.util.List; - -/** - * 授权记录 Mapper - * - * @author zc - * @since 2025/04/08 23:08 - */ -@Repository -public interface EmpowerRecordMapper extends BaseMapper { - IPage selectEmpowerRecordPage(@Param("page") Page page, - @Param(Constants.WRAPPER) QueryWrapper queryWrapper); - - List selectForEmpowerDel(@Param("list") List ids); -} diff --git a/wms-module-system/src/main/java/top/wms/admin/rule/mapper/PeopleRecordMapper.java b/wms-module-system/src/main/java/top/wms/admin/rule/mapper/PeopleRecordMapper.java deleted file mode 100644 index 2fc41fc..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/rule/mapper/PeopleRecordMapper.java +++ /dev/null @@ -1,22 +0,0 @@ -package top.wms.admin.rule.mapper; - -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.core.toolkit.Constants; -import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Repository; -import top.continew.starter.data.mp.base.BaseMapper; -import top.wms.admin.rule.model.entity.PeopleRecordDO; -import top.wms.admin.rule.model.resp.PeopleRecordResp; - -/** - * 人员识别记录 Mapper - * - * @author zc - * @since 2025/04/08 23:06 - */ -@Repository -public interface PeopleRecordMapper extends BaseMapper { - IPage selectPeopleRecordPage(@Param("page") IPage page, - @Param(Constants.WRAPPER) QueryWrapper queryWrapper); -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/rule/mapper/RuleMapper.java b/wms-module-system/src/main/java/top/wms/admin/rule/mapper/RuleMapper.java deleted file mode 100644 index 50779cc..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/rule/mapper/RuleMapper.java +++ /dev/null @@ -1,23 +0,0 @@ -package top.wms.admin.rule.mapper; - -import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Repository; -import top.continew.starter.data.mp.base.BaseMapper; -import top.wms.admin.rule.model.entity.RuleDO; -import top.wms.admin.rule.model.resp.YFPeopleResp; - -import java.util.List; - -/** - * 通行规则 Mapper - * - * @author zc - * @since 2025/03/26 22:59 - */ -@Repository -public interface RuleMapper extends BaseMapper { - - List querySysRuleList(@Param("ruleIds") List ruleIds); - - List getEquipmentRulesByPeoples(@Param("peopleIds") List peopleIds); -} diff --git a/wms-module-system/src/main/java/top/wms/admin/rule/mapstruct/RuleConvert.java b/wms-module-system/src/main/java/top/wms/admin/rule/mapstruct/RuleConvert.java deleted file mode 100644 index 87b1880..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/rule/mapstruct/RuleConvert.java +++ /dev/null @@ -1,24 +0,0 @@ -package top.wms.admin.rule.mapstruct; - -import org.mapstruct.Mapper; -import org.mapstruct.Mapping; -import top.continew.starter.extension.crud.model.resp.LabelValueResp; -import top.wms.admin.rule.model.entity.RuleDO; -import top.wms.admin.rule.model.req.RuleReq; -import top.wms.admin.rule.model.resp.RuleResp; - -import java.util.List; - -@Mapper(componentModel = "spring") -public interface RuleConvert { - - RuleReq DOToReq(RuleDO ruleDO); - - RuleReq RespToReq(RuleResp resp); - - @Mapping(source = "id", target = "value") - @Mapping(source = "name", target = "label") - LabelValueResp labelValue(RuleDO ruleDO); - - List labelValueList(List ruleDOS); -} diff --git a/wms-module-system/src/main/java/top/wms/admin/rule/model/entity/EmpowerRecordDO.java b/wms-module-system/src/main/java/top/wms/admin/rule/model/entity/EmpowerRecordDO.java deleted file mode 100644 index 372a037..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/rule/model/entity/EmpowerRecordDO.java +++ /dev/null @@ -1,63 +0,0 @@ -package top.wms.admin.rule.model.entity; - -import lombok.Data; - -import com.baomidou.mybatisplus.annotation.TableName; - -import top.wms.admin.common.model.entity.BaseDO; - -import java.io.Serial; - -/** - * 授权记录实体 - * - * @author zc - * @since 2025/04/08 23:08 - */ -@Data -@TableName("sys_empower_record") -public class EmpowerRecordDO extends BaseDO { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 姓名 - */ - private String name; - - /** - * 人员id - */ - private String peopleId; - - /** - * 信息下发(0成功 1失败) - */ - private String infoDown; - - /** - * 授权方式(0本地 1云盘) - */ - private String empower; - - /** - * 设备Id - */ - private Long equipmentId; - - /** - * 操作(0启用 1禁用) - */ - private String status; - - /** - * 备注 - */ - private String remark; - - /** - * 规则Id - */ - private Long ruleId; -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/rule/model/entity/PeopleRecordDO.java b/wms-module-system/src/main/java/top/wms/admin/rule/model/entity/PeopleRecordDO.java deleted file mode 100644 index e642ae2..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/rule/model/entity/PeopleRecordDO.java +++ /dev/null @@ -1,165 +0,0 @@ -package top.wms.admin.rule.model.entity; - -import lombok.Data; - -import com.baomidou.mybatisplus.annotation.TableName; - -import top.wms.admin.common.model.entity.BaseDO; - -import java.io.Serial; -import java.time.*; -import java.util.Date; - -/** - * 人员识别记录实体 - * - * @author zc - * @since 2025/04/08 23:06 - */ -@Data -@TableName("sys_people_record") -public class PeopleRecordDO extends BaseDO { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 人员id - */ - private Long peopleId; - - /** - * 设备id - */ - private Long equipmentId; - - /** - * 设备内网ip - */ - private String deviceIp; - - /** - * 人员guid 或者STRANGERBABY - */ - private String admitGuid; - - /** - * 识别模式,1:人像识别, 2:刷卡识别 ,3:人卡合一 4,人证比对 7:密码识别 8 二维码识别 - */ - private String recMode; - - /** - * 现场照url - */ - private String filePath; - - /** - * 识别记录时间戳 - */ - private Long showTime; - - /** - * 识别记录时间 - */ - private Date showDate; - - /** - * 活体结果 1:活体判断成功 2:活体判断失败 3:未进行活体判断 - */ - private String aliveType; - - /** - * 识别分数 - */ - private String recScore; - - /** - * 设备序列号 - */ - private String deviceNo; - - /** - * 软件版本号 - */ - private String deviceVersion; - - /** - * 设备来源 - */ - private String source; - - /** - * 人员比对结果,1:比对成功 2:比对失败 - */ - private String type; - - /** - * 识别卡号 - */ - private String cardNo; - - /** - * 设备名称 - */ - private String deviceName; - - /** - * 比对模式,1:本地识别 2:云端识别 - */ - private String recType; - - /** - * 结果 - */ - private String result; - - /** - * 有效日期判断 1:有效期内 2:有效期外 3:未进行有效期判断 - */ - private String permissionTimeType; - - /** - * 有效时间段判断 1:时间段内 2:时间段外 3:未进行时间段判断 - */ - private String passTimeType; - - /** - * 识别模式判断 1. 模式正确 2.模式不正确 - */ - private String recModeType; - - /** - * 保留字段 - */ - private String storageId; - - /** - * 当前时间戳 - */ - private Long timestamp; - - /** - * 识别主体姓名 - */ - private String admitName; - - /** - * 备注 - */ - private String remark; - - /** - * 人员记录或访客记录标示 - */ - private String flag; - - /** - * 考勤组id - */ - private Long groupId; - - /** - * 下级系统标志 - */ - private String sign; -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/rule/model/entity/RuleDO.java b/wms-module-system/src/main/java/top/wms/admin/rule/model/entity/RuleDO.java deleted file mode 100644 index d3e66ab..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/rule/model/entity/RuleDO.java +++ /dev/null @@ -1,75 +0,0 @@ -package top.wms.admin.rule.model.entity; - -import lombok.Data; - -import com.baomidou.mybatisplus.annotation.TableName; - -import top.wms.admin.common.model.entity.BaseDO; - -import java.io.Serial; -import java.time.*; - -/** - * 通行规则实体 - * - * @author zc - * @since 2025/03/26 22:58 - */ -@Data -@TableName("sys_rule") -public class RuleDO extends BaseDO { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 规则名称 - */ - private String name; - - /** - * 有效期开始 - */ - private LocalDateTime startTime; - - /** - * 有效期结束 - */ - private LocalDateTime endTime; - - /** - * 准入时间起 - */ - private String admittanceStart; - - /** - * 准入时间止 - */ - private String admittanceEnd; - - /** - * 设备空间 - */ - private Long spaceId; - - /** - * 设备位置 - */ - private String pointId; - - /** - * 备注 - */ - private String remark; - - /** - * 1:本地库 2:云端库 默认本地 - */ - private String type; - - /** - * facePermission 刷脸权限 idCardPermission 刷卡权限 faceAndCardPermission 人卡合一权限 idCardFacePermission 人证比对权限 - * passwordPermission 密码权限 - */ - private String permission; -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/rule/model/query/EmpowerRecordQuery.java b/wms-module-system/src/main/java/top/wms/admin/rule/model/query/EmpowerRecordQuery.java deleted file mode 100644 index 7011943..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/rule/model/query/EmpowerRecordQuery.java +++ /dev/null @@ -1,33 +0,0 @@ -package top.wms.admin.rule.model.query; - -import lombok.Data; - -import io.swagger.v3.oas.annotations.media.Schema; - -import java.io.Serial; -import java.io.Serializable; -import java.time.*; - -/** - * 授权记录查询条件 - * - * @author zc - * @since 2025/04/08 23:08 - */ -@Data -@Schema(description = "授权记录查询条件") -public class EmpowerRecordQuery implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 姓名 - */ - private String name; - - /** - * 设备id - */ - private String equipmentId; -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/rule/model/query/PeopleRecordQuery.java b/wms-module-system/src/main/java/top/wms/admin/rule/model/query/PeopleRecordQuery.java deleted file mode 100644 index 08d7566..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/rule/model/query/PeopleRecordQuery.java +++ /dev/null @@ -1,53 +0,0 @@ -package top.wms.admin.rule.model.query; - -import cn.hutool.core.date.DatePattern; -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.Size; -import lombok.Data; -import org.springframework.format.annotation.DateTimeFormat; - -import java.io.Serial; -import java.io.Serializable; -import java.util.Date; -import java.util.List; - -/** - * 人员识别记录查询条件 - * - * @author zc - * @since 2025/04/08 23:06 - */ -@Data -@Schema(description = "人员识别记录查询条件") -public class PeopleRecordQuery implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 人员姓名 - */ - private String name; - - /** - * 设备名称 - */ - private String deviceName; - - /** - * 设备id - */ - private String equipmentId; - - /** - * 识别记录时间 - */ - @DateTimeFormat(pattern = DatePattern.NORM_DATETIME_PATTERN) - @Size(max = 2, message = "创建时间必须是一个范围") - private List showDateList; - - /** - * 部门名称 - */ - private String branchName; -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/rule/model/query/RuleQuery.java b/wms-module-system/src/main/java/top/wms/admin/rule/model/query/RuleQuery.java deleted file mode 100644 index 502c9ab..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/rule/model/query/RuleQuery.java +++ /dev/null @@ -1,32 +0,0 @@ -package top.wms.admin.rule.model.query; - -import lombok.Data; - -import io.swagger.v3.oas.annotations.media.Schema; - -import top.continew.starter.data.core.annotation.Query; -import top.continew.starter.data.core.enums.QueryType; - -import java.io.Serial; -import java.io.Serializable; - -/** - * 通行规则查询条件 - * - * @author zc - * @since 2025/03/26 22:59 - */ -@Data -@Schema(description = "通行规则查询条件") -public class RuleQuery implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 规则名称 - */ - @Schema(description = "规则名称") - @Query(type = QueryType.EQ) - private String name; -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/rule/model/req/EmpowerRecordReq.java b/wms-module-system/src/main/java/top/wms/admin/rule/model/req/EmpowerRecordReq.java deleted file mode 100644 index 6618030..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/rule/model/req/EmpowerRecordReq.java +++ /dev/null @@ -1,79 +0,0 @@ -package top.wms.admin.rule.model.req; - -import lombok.Data; - -import io.swagger.v3.oas.annotations.media.Schema; - -import org.hibernate.validator.constraints.Length; - -import java.io.Serial; -import java.io.Serializable; -import java.time.*; - -/** - * 创建或修改授权记录参数 - * - * @author zc - * @since 2025/04/08 23:08 - */ -@Data -@Schema(description = "创建或修改授权记录参数") -public class EmpowerRecordReq implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 姓名 - */ - @Schema(description = "姓名") - @Length(max = 50, message = "姓名长度不能超过 {max} 个字符") - private String name; - - /** - * 人员id - */ - @Schema(description = "人员id") - @Length(max = 50, message = "人员id长度不能超过 {max} 个字符") - private String peopleId; - - /** - * 信息下发(0成功 1失败) - */ - @Schema(description = "信息下发(0成功 1失败)") - @Length(max = 1, message = "信息下发(0成功 1失败)长度不能超过 {max} 个字符") - private String infoDown; - - /** - * 授权方式(0本地 1云盘) - */ - @Schema(description = "授权方式(0本地 1云盘)") - @Length(max = 1, message = "授权方式(0本地 1云盘)长度不能超过 {max} 个字符") - private String empower; - - /** - * 设备Id - */ - @Schema(description = "设备Id") - private Long equipmentId; - - /** - * 操作(0启用 1禁用) - */ - @Schema(description = "操作(0启用 1禁用)") - @Length(max = 1, message = "操作(0启用 1禁用)长度不能超过 {max} 个字符") - private String status; - - /** - * 备注 - */ - @Schema(description = "备注") - @Length(max = 200, message = "备注长度不能超过 {max} 个字符") - private String remark; - - /** - * 规则Id - */ - @Schema(description = "规则Id") - private Long ruleId; -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/rule/model/req/PeopleRecordReq.java b/wms-module-system/src/main/java/top/wms/admin/rule/model/req/PeopleRecordReq.java deleted file mode 100644 index e35d965..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/rule/model/req/PeopleRecordReq.java +++ /dev/null @@ -1,198 +0,0 @@ -package top.wms.admin.rule.model.req; - -import lombok.Data; - -import io.swagger.v3.oas.annotations.media.Schema; - -import org.hibernate.validator.constraints.Length; - -import java.io.Serial; -import java.io.Serializable; -import java.time.*; -import java.util.Date; - -/** - * 创建或修改人员识别记录参数 - * - * @author zc - * @since 2025/04/08 23:06 - */ -@Data -@Schema(description = "创建或修改人员识别记录参数") -public class PeopleRecordReq implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 人员id - */ - @Schema(description = "人员id") - @Length(max = 50, message = "人员id长度不能超过 {max} 个字符") - private Long peopleId; - - /** - * 设备id - */ - @Schema(description = "设备id") - @Length(max = 50, message = "设备id长度不能超过 {max} 个字符") - private Long equipmentId; - - /** - * 设备内网ip - */ - @Schema(description = "设备内网ip") - @Length(max = 50, message = "设备内网ip长度不能超过 {max} 个字符") - private String deviceIp; - - /** - * 人员guid 或者STRANGERBABY - */ - @Schema(description = "人员guid 或者STRANGERBABY") - @Length(max = 50, message = "人员guid 或者STRANGERBABY长度不能超过 {max} 个字符") - private String admitGuid; - - /** - * 识别模式,1:人像识别, 2:刷卡识别 ,3:人卡合一 4,人证比对 7:密码识别 8 二维码识别 - */ - @Schema(description = "识别模式,1:人像识别, 2:刷卡识别 ,3:人卡合一 4,人证比对 7:密码识别 8 二维码识别") - @Length(max = 50, message = "识别模式,1:人像识别, 2:刷卡识别 ,3:人卡合一 4,人证比对 7:密码识别 8 二维码识别长度不能超过 {max} 个字符") - private String recMode; - - /** - * 现场照url - */ - @Schema(description = "现场照url") - @Length(max = 255, message = "现场照url长度不能超过 {max} 个字符") - private String filePath; - - /** - * 识别记录时间戳 - */ - @Schema(description = "识别记录时间戳") - private Long showTime; - - /** - * 识别记录时间 - */ - @Schema(description = "识别记录时间") - private Date showDate; - - /** - * 活体结果 1:活体判断成功 2:活体判断失败 3:未进行活体判断 - */ - @Schema(description = "活体结果 1:活体判断成功 2:活体判断失败 3:未进行活体判断") - @Length(max = 50, message = "活体结果 1:活体判断成功 2:活体判断失败 3:未进行活体判断长度不能超过 {max} 个字符") - private String aliveType; - - /** - * 识别分数 - */ - @Schema(description = "识别分数") - @Length(max = 50, message = "识别分数长度不能超过 {max} 个字符") - private String recScore; - - /** - * 设备序列号 - */ - @Schema(description = "设备序列号") - @Length(max = 50, message = "设备序列号长度不能超过 {max} 个字符") - private String deviceNo; - - /** - * 软件版本号 - */ - @Schema(description = "软件版本号") - @Length(max = 50, message = "软件版本号长度不能超过 {max} 个字符") - private String deviceVersion; - - /** - * 设备来源 - */ - @Schema(description = "设备来源") - @Length(max = 50, message = "设备来源长度不能超过 {max} 个字符") - private String source; - - /** - * 人员比对结果,1:比对成功 2:比对失败 - */ - @Schema(description = "人员比对结果,1:比对成功 2:比对失败") - @Length(max = 50, message = "人员比对结果,1:比对成功 2:比对失败长度不能超过 {max} 个字符") - private String type; - - /** - * 识别卡号 - */ - @Schema(description = "识别卡号") - @Length(max = 50, message = "识别卡号长度不能超过 {max} 个字符") - private String cardNo; - - /** - * 设备名称 - */ - @Schema(description = "设备名称") - @Length(max = 50, message = "设备名称长度不能超过 {max} 个字符") - private String deviceName; - - /** - * 比对模式,1:本地识别 2:云端识别 - */ - @Schema(description = "比对模式,1:本地识别 2:云端识别") - @Length(max = 50, message = "比对模式,1:本地识别 2:云端识别长度不能超过 {max} 个字符") - private String recType; - - /** - * 结果 - */ - @Schema(description = "结果") - @Length(max = 50, message = "结果长度不能超过 {max} 个字符") - private String result; - - /** - * 有效日期判断 1:有效期内 2:有效期外 3:未进行有效期判断 - */ - @Schema(description = "有效日期判断 1:有效期内 2:有效期外 3:未进行有效期判断") - @Length(max = 50, message = "有效日期判断 1:有效期内 2:有效期外 3:未进行有效期判断长度不能超过 {max} 个字符") - private String permissionTimeType; - - /** - * 有效时间段判断 1:时间段内 2:时间段外 3:未进行时间段判断 - */ - @Schema(description = "有效时间段判断 1:时间段内 2:时间段外 3:未进行时间段判断") - @Length(max = 50, message = "有效时间段判断 1:时间段内 2:时间段外 3:未进行时间段判断长度不能超过 {max} 个字符") - private String passTimeType; - - /** - * 识别模式判断 1. 模式正确 2.模式不正确 - */ - @Schema(description = "识别模式判断 1. 模式正确 2.模式不正确") - @Length(max = 50, message = "识别模式判断 1. 模式正确 2.模式不正确长度不能超过 {max} 个字符") - private String recModeType; - - /** - * 保留字段 - */ - @Schema(description = "保留字段") - @Length(max = 50, message = "保留字段长度不能超过 {max} 个字符") - private String storageId; - - /** - * 当前时间戳 - */ - @Schema(description = "当前时间戳") - private Long timestamp; - - /** - * 识别主体姓名 - */ - @Schema(description = "识别主体姓名") - @Length(max = 50, message = "识别主体姓名长度不能超过 {max} 个字符") - private String admitName; - - /** - * 备注 - */ - @Schema(description = "备注") - @Length(max = 200, message = "备注长度不能超过 {max} 个字符") - private String remark; -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/rule/model/req/RuleReq.java b/wms-module-system/src/main/java/top/wms/admin/rule/model/req/RuleReq.java deleted file mode 100644 index 7d6921a..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/rule/model/req/RuleReq.java +++ /dev/null @@ -1,141 +0,0 @@ -package top.wms.admin.rule.model.req; - -import jakarta.validation.constraints.*; - -import lombok.Data; - -import io.swagger.v3.oas.annotations.media.Schema; - -import org.hibernate.validator.constraints.Length; - -import java.io.Serial; -import java.io.Serializable; -import java.time.*; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * 创建或修改通行规则参数 - * - * @author zc - * @since 2025/03/26 16:57 - */ -@Data -@Schema(description = "创建或修改通行规则参数") -public class RuleReq implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 规则Id - */ - @Schema(description = "规则Id") - private Long id; - - /** - * 规则名称 - */ - @Schema(description = "规则名称") - @NotBlank(message = "规则名称不能为空") - @Length(max = 50, message = "规则名称长度不能超过 {max} 个字符") - private String name; - - /** - * 有效期开始 - */ - @Schema(description = "有效期开始") - private LocalDateTime startTime; - - /** - * 有效期结束 - */ - @Schema(description = "有效期结束") - private LocalDateTime endTime; - - /** - * 准入时间起 - */ - @Schema(description = "准入时间起") - @Length(max = 50, message = "准入时间起长度不能超过 {max} 个字符") - private String admittanceStart; - - /** - * 准入时间止 - */ - @Schema(description = "准入时间止") - @Length(max = 50, message = "准入时间止长度不能超过 {max} 个字符") - private String admittanceEnd; - - /** - * 设备空间 - */ - @Schema(description = "设备空间") - private Long spaceId; - - /** - * 设备位置 - */ - @Schema(description = "设备位置") - @Length(max = 255, message = "设备位置长度不能超过 {max} 个字符") - private String pointId; - - /** - * 备注 - */ - @Schema(description = "备注") - @Length(max = 200, message = "备注长度不能超过 {max} 个字符") - private String remark; - - /** - * - */ - @Schema(description = "") - private Long createUser; - - /** - * 创建时间 - */ - @Schema(description = "创建时间") - private LocalDateTime createTime; - - /** - * - */ - @Schema(description = "") - private Long updateUser; - - /** - * 更新时间 - */ - @Schema(description = "更新时间") - private LocalDateTime updateTime; - - /** - * 1:本地库 2:云端库 默认本地 - */ - @Schema(description = "1:本地库 2:云端库 默认本地") - @Length(max = 200, message = "1:本地库 2:云端库 默认本地长度不能超过 {max} 个字符") - private String type; - - /** - * facePermission 刷脸权限 idCardPermission 刷卡权限 faceAndCardPermission 人卡合一权限 idCardFacePermission 人证比对权限 - * passwordPermission 密码权限 - */ - @Schema(description = "facePermission 刷脸权限 idCardPermission 刷卡权限 faceAndCardPermission 人卡合一权限 idCardFacePermission 人证比对权限passwordPermission 密码权限") - private List permissionList; - - private String permission; - - @Schema(description = "规则绑定设备id集合") - private List equipmentIds; - - private Map equipmentRuleIdMap = new HashMap<>(); - - //修改失败的设备 - private String failures; - - private Boolean isChange = false; - -} diff --git a/wms-module-system/src/main/java/top/wms/admin/rule/model/resp/EmpowerRecordDetailResp.java b/wms-module-system/src/main/java/top/wms/admin/rule/model/resp/EmpowerRecordDetailResp.java deleted file mode 100644 index d09f614..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/rule/model/resp/EmpowerRecordDetailResp.java +++ /dev/null @@ -1,114 +0,0 @@ -package top.wms.admin.rule.model.resp; - -import lombok.Data; - -import io.swagger.v3.oas.annotations.media.Schema; - -import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; -import com.alibaba.excel.annotation.ExcelProperty; - -import top.wms.admin.common.model.resp.BaseDetailResp; - -import java.io.Serial; -import java.time.*; - -/** - * 授权记录详情信息 - * - * @author zc - * @since 2025/04/08 23:08 - */ -@Data -@ExcelIgnoreUnannotated -@Schema(description = "授权记录详情信息") -public class EmpowerRecordDetailResp extends BaseDetailResp { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 姓名 - */ - @Schema(description = "姓名") - @ExcelProperty(value = "姓名") - private String name; - - /** - * 人员id - */ - @Schema(description = "人员id") - @ExcelProperty(value = "人员id") - private String peopleId; - - /** - * 信息下发(0成功 1失败) - */ - @Schema(description = "信息下发(0成功 1失败)") - @ExcelProperty(value = "信息下发(0成功 1失败)") - private String infoDown; - - /** - * 授权方式(0本地 1云盘) - */ - @Schema(description = "授权方式(0本地 1云盘)") - @ExcelProperty(value = "授权方式(0本地 1云盘)") - private String empower; - - /** - * 设备Id - */ - @Schema(description = "设备Id") - @ExcelProperty(value = "设备Id") - private Long equipmentId; - - /** - * 操作(0启用 1禁用) - */ - @Schema(description = "操作(0启用 1禁用)") - @ExcelProperty(value = "操作(0启用 1禁用)") - private String status; - - /** - * 备注 - */ - @Schema(description = "备注") - @ExcelProperty(value = "备注") - private String remark; - - /** - * 规则Id - */ - @Schema(description = "规则Id") - @ExcelProperty(value = "规则Id") - private Long ruleId; - - /** - * 所属产品id - */ - @Schema(description = "所属产品id") - private Long productId; - - /** - * 设备ip - */ - @Schema(description = "设备ip") - private String ip; - - /** - * 设备密码 - */ - @Schema(description = "设备密码") - private String password; - - /** - * 门卡号 - */ - @Schema(description = "门卡号") - private String doorNo; - - /** - * 人脸机人员编号 - */ - @Schema(description = "人脸机人员编号") - private String guid; -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/rule/model/resp/EmpowerRecordResp.java b/wms-module-system/src/main/java/top/wms/admin/rule/model/resp/EmpowerRecordResp.java deleted file mode 100644 index 96f8188..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/rule/model/resp/EmpowerRecordResp.java +++ /dev/null @@ -1,107 +0,0 @@ -package top.wms.admin.rule.model.resp; - -import lombok.Data; - -import io.swagger.v3.oas.annotations.media.Schema; - -import top.wms.admin.common.model.resp.BaseDetailResp; - -import java.io.Serial; -import java.time.*; - -/** - * 授权记录信息 - * - * @author zc - * @since 2025/04/08 23:08 - */ -@Data -@Schema(description = "授权记录信息") -public class EmpowerRecordResp extends BaseDetailResp { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 姓名 - */ - @Schema(description = "姓名") - private String name; - - /** - * 姓名 - */ - @Schema(description = "姓名") - private String peopleName; - - /** - * 人员id - */ - @Schema(description = "人员id") - private String peopleId; - - /** - * 信息下发(0成功 1失败) - */ - @Schema(description = "信息下发(0成功 1失败)") - private String infoDown; - - /** - * 授权方式(0本地 1云盘) - */ - @Schema(description = "授权方式(0本地 1云盘)") - private String empower; - - /** - * 设备Id - */ - @Schema(description = "设备Id") - private Long equipmentId; - - /** - * 操作(0启用 1禁用) - */ - @Schema(description = "操作(0启用 1禁用)") - private String status; - - /** - * 备注 - */ - @Schema(description = "备注") - private String remark; - - /** - * - */ - @Schema(description = "") - private Long updateUser; - - /** - * 更新时间 - */ - @Schema(description = "更新时间") - private LocalDateTime updateTime; - - /** - * 规则Id - */ - @Schema(description = "规则Id") - private Long ruleId; - - /** - * 头像 - */ - @Schema(description = "头像") - private String peopleAvatar; - - /** - * 设备名称 - */ - @Schema(description = "设备名称") - private String equipmentName; - - /** - * 门禁设备位置 1进 2出 - */ - private String entryExitType; -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/rule/model/resp/PeopleRecordDetailResp.java b/wms-module-system/src/main/java/top/wms/admin/rule/model/resp/PeopleRecordDetailResp.java deleted file mode 100644 index 3837ea0..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/rule/model/resp/PeopleRecordDetailResp.java +++ /dev/null @@ -1,225 +0,0 @@ -package top.wms.admin.rule.model.resp; - -import lombok.Data; - -import io.swagger.v3.oas.annotations.media.Schema; - -import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; -import com.alibaba.excel.annotation.ExcelProperty; - -import top.wms.admin.common.model.resp.BaseDetailResp; - -import java.io.Serial; -import java.time.*; -import java.util.Date; - -/** - * 人员识别记录详情信息 - * - * @author zc - * @since 2025/04/08 23:06 - */ -@Data -@ExcelIgnoreUnannotated -@Schema(description = "人员识别记录详情信息") -public class PeopleRecordDetailResp extends BaseDetailResp { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 人员id - */ - @Schema(description = "人员id") - @ExcelProperty(value = "人员id") - private Long peopleId; - - /** - * 设备id - */ - @Schema(description = "设备id") - @ExcelProperty(value = "设备id") - private Long equipmentId; - - /** - * 设备内网ip - */ - @Schema(description = "设备内网ip") - @ExcelProperty(value = "设备内网ip") - private String deviceIp; - - /** - * 人员guid 或者STRANGERBABY - */ - @Schema(description = "人员guid 或者STRANGERBABY") - @ExcelProperty(value = "人员guid 或者STRANGERBABY") - private String admitGuid; - - /** - * 识别模式,1:人像识别, 2:刷卡识别 ,3:人卡合一 4,人证比对 7:密码识别 8 二维码识别 - */ - @Schema(description = "识别模式,1:人像识别, 2:刷卡识别 ,3:人卡合一 4,人证比对 7:密码识别 8 二维码识别") - @ExcelProperty(value = "识别模式,1:人像识别, 2:刷卡识别 ,3:人卡合一 4,人证比对 7:密码识别 8 二维码识别") - private String recMode; - - /** - * 现场照url - */ - @Schema(description = "现场照url") - @ExcelProperty(value = "现场照url") - private String filePath; - - /** - * 识别记录时间戳 - */ - @Schema(description = "识别记录时间戳") - @ExcelProperty(value = "识别记录时间戳") - private Long showTime; - - /** - * 识别记录时间 - */ - @Schema(description = "识别记录时间") - @ExcelProperty(value = "识别记录时间") - private Date showDate; - - /** - * 活体结果 1:活体判断成功 2:活体判断失败 3:未进行活体判断 - */ - @Schema(description = "活体结果 1:活体判断成功 2:活体判断失败 3:未进行活体判断") - @ExcelProperty(value = "活体结果 1:活体判断成功 2:活体判断失败 3:未进行活体判断") - private String aliveType; - - /** - * 识别分数 - */ - @Schema(description = "识别分数") - @ExcelProperty(value = "识别分数") - private String recScore; - - /** - * 设备序列号 - */ - @Schema(description = "设备序列号") - @ExcelProperty(value = "设备序列号") - private String deviceNo; - - /** - * 软件版本号 - */ - @Schema(description = "软件版本号") - @ExcelProperty(value = "软件版本号") - private String deviceVersion; - - /** - * 设备来源 - */ - @Schema(description = "设备来源") - @ExcelProperty(value = "设备来源") - private String source; - - /** - * 人员比对结果,1:比对成功 2:比对失败 - */ - @Schema(description = "人员比对结果,1:比对成功 2:比对失败") - @ExcelProperty(value = "人员比对结果,1:比对成功 2:比对失败") - private String type; - - /** - * 识别卡号 - */ - @Schema(description = "识别卡号") - @ExcelProperty(value = "识别卡号") - private String cardNo; - - /** - * 设备名称 - */ - @Schema(description = "设备名称") - @ExcelProperty(value = "设备名称") - private String deviceName; - - /** - * 比对模式,1:本地识别 2:云端识别 - */ - @Schema(description = "比对模式,1:本地识别 2:云端识别") - @ExcelProperty(value = "比对模式,1:本地识别 2:云端识别") - private String recType; - - /** - * 结果 - */ - @Schema(description = "结果") - @ExcelProperty(value = "结果") - private String result; - - /** - * 有效日期判断 1:有效期内 2:有效期外 3:未进行有效期判断 - */ - @Schema(description = "有效日期判断 1:有效期内 2:有效期外 3:未进行有效期判断") - @ExcelProperty(value = "有效日期判断 1:有效期内 2:有效期外 3:未进行有效期判断") - private String permissionTimeType; - - /** - * 有效时间段判断 1:时间段内 2:时间段外 3:未进行时间段判断 - */ - @Schema(description = "有效时间段判断 1:时间段内 2:时间段外 3:未进行时间段判断") - @ExcelProperty(value = "有效时间段判断 1:时间段内 2:时间段外 3:未进行时间段判断") - private String passTimeType; - - /** - * 识别模式判断 1. 模式正确 2.模式不正确 - */ - @Schema(description = "识别模式判断 1. 模式正确 2.模式不正确") - @ExcelProperty(value = "识别模式判断 1. 模式正确 2.模式不正确") - private String recModeType; - - /** - * 保留字段 - */ - @Schema(description = "保留字段") - @ExcelProperty(value = "保留字段") - private String storageId; - - /** - * 当前时间戳 - */ - @Schema(description = "当前时间戳") - @ExcelProperty(value = "当前时间戳") - private Long timestamp; - - /** - * 识别主体姓名 - */ - @Schema(description = "识别主体姓名") - @ExcelProperty(value = "识别主体姓名") - private String admitName; - - /** - * 备注 - */ - @Schema(description = "备注") - @ExcelProperty(value = "备注") - private String remark; - - /** - * 人员记录或访客记录标示 - */ - @Schema(description = "人员记录或访客记录标示") - @ExcelProperty(value = "人员记录或访客记录标示") - private String flag; - - /** - * 考勤组id - */ - @Schema(description = "考勤组id") - @ExcelProperty(value = "考勤组id") - private Long groupId; - - /** - * 下级系统标志 - */ - @Schema(description = "下级系统标志") - @ExcelProperty(value = "下级系统标志") - private String sign; -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/rule/model/resp/PeopleRecordResp.java b/wms-module-system/src/main/java/top/wms/admin/rule/model/resp/PeopleRecordResp.java deleted file mode 100644 index 2a8da13..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/rule/model/resp/PeopleRecordResp.java +++ /dev/null @@ -1,269 +0,0 @@ -package top.wms.admin.rule.model.resp; - -import com.alibaba.excel.annotation.ExcelIgnore; -import com.alibaba.excel.annotation.ExcelProperty; -import lombok.Data; - -import io.swagger.v3.oas.annotations.media.Schema; - -import top.wms.admin.common.model.resp.BaseDetailResp; - -import java.io.Serial; -import java.time.*; -import java.util.Date; - -/** - * 人员识别记录信息 - * - * @author zc - * @since 2025/04/08 23:06 - */ -@Data -@Schema(description = "人员识别记录信息") -public class PeopleRecordResp extends BaseDetailResp { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 人员id - */ - @Schema(description = "人员id") - @ExcelIgnore - private Long peopleId; - - /** - * 设备id - */ - @Schema(description = "设备id") - @ExcelIgnore - private Long equipmentId; - - /** - * 设备内网ip - */ - @Schema(description = "设备内网ip") - @ExcelIgnore - private String deviceIp; - - /** - * 人员guid 或者STRANGERBABY - */ - @Schema(description = "人员guid 或者STRANGERBABY") - @ExcelIgnore - private String admitGuid; - - /** - * 识别模式 - * '0':人像验证, - * '1':人卡合一, - * '2':人证比对, - * '3':刷卡验证, - * '4':按钮开门, - * '5':远程开门, - * '6':密码开门, - * '7':密码识别, - * '8':二维码识别, - * '9':指纹比对, - * '10':二维码&人像验证, - * '12':身份证验证 - */ - @Schema(description = "识别模式") - private String recMode; - - /** - * 现场照url - */ - @Schema(description = "现场照url") - @ExcelIgnore - private String filePath; - - /** - * 识别记录时间戳 - */ - @Schema(description = "识别记录时间戳") - @ExcelIgnore - private Long showTime; - - /** - * 识别记录时间 - */ - @Schema(description = "识别记录时间") - @ExcelProperty(value = "识别时间", order = 1) - private Date showDate; - - /** - * 活体结果 1:活体判断成功 2:活体判断失败 3:未进行活体判断 - */ - @Schema(description = "活体结果 1:活体判断成功 2:活体判断失败 3:未进行活体判断") - @ExcelIgnore - private String aliveType; - - /** - * 识别分数 - */ - @Schema(description = "识别分数") - @ExcelIgnore - private String recScore; - - /** - * 设备序列号 - */ - @Schema(description = "设备序列号") - @ExcelProperty(value = "设备序列号", order = 1) - private String deviceNo; - - /** - * 软件版本号 - */ - @Schema(description = "软件版本号") - @ExcelIgnore - private String deviceVersion; - - /** - * 设备来源 - */ - @Schema(description = "设备来源") - @ExcelIgnore - private String source; - - /** - * 人员比对结果,1:比对成功 2:比对失败 - */ - @Schema(description = "人员比对结果,1:比对成功 2:比对失败") - @ExcelIgnore - private String type; - - /** - * 识别卡号 - */ - @Schema(description = "识别卡号") - @ExcelProperty(value = "识别卡号", order = 1) - private String cardNo; - - /** - * 设备名称 - */ - @Schema(description = "设备名称") - @ExcelProperty(value = "设备名称", order = 1) - private String deviceName; - - /** - * 比对模式,1:本地识别 2:云端识别 - */ - @Schema(description = "比对模式,1:本地识别 2:云端识别") - @ExcelIgnore - private String recType; - - /** - * 结果 - */ - @Schema(description = "结果") - @ExcelProperty(value = "识别结果", order = 1) - private String result; - - /** - * 有效日期判断 1:有效期内 2:有效期外 3:未进行有效期判断 - */ - @Schema(description = "有效日期判断 1:有效期内 2:有效期外 3:未进行有效期判断") - @ExcelIgnore - private String permissionTimeType; - - /** - * 有效时间段判断 1:时间段内 2:时间段外 3:未进行时间段判断 - */ - @Schema(description = "有效时间段判断 1:时间段内 2:时间段外 3:未进行时间段判断") - @ExcelIgnore - private String passTimeType; - - /** - * 识别模式判断 1. 模式正确 2.模式不正确 - */ - @Schema(description = "识别模式判断 1. 模式正确 2.模式不正确") - @ExcelIgnore - private String recModeType; - - /** - * 保留字段 - */ - @Schema(description = "保留字段") - @ExcelIgnore - private String storageId; - - /** - * 当前时间戳 - */ - @Schema(description = "当前时间戳") - @ExcelIgnore - private Long timestamp; - - /** - * 识别主体姓名 - */ - @Schema(description = "识别主体姓名") - @ExcelIgnore - private String admitName; - - /** - * 备注 - */ - @Schema(description = "备注") - @ExcelIgnore - private String remark; - - /** - * - */ - @Schema(description = "") - @ExcelIgnore - private Long updateUser; - - /** - * 更新时间 - */ - @Schema(description = "更新时间") - @ExcelIgnore - private LocalDateTime updateTime; - - /** - * 人员记录或访客记录标示 - */ - @Schema(description = "人员记录或访客记录标示") - @ExcelIgnore - private String flag; - - /** - * 考勤组id - */ - @Schema(description = "考勤组id") - @ExcelIgnore - private Long groupId; - - /** - * 下级系统标志 - */ - @Schema(description = "下级系统标志") - @ExcelIgnore - private String sign; - - /** - * 工号 - */ - @Schema(description = "工号") - @ExcelProperty(value = "工号", order = 1) - private String gh; - - /** - * 部门名称 - */ - @Schema(description = "部门名称") - @ExcelProperty(value = "部门名称", order = 3) - private String branchName; - - /** - * 人员姓名 - */ - @Schema(description = "人员姓名") - @ExcelProperty(value = "人员姓名", order = 4) - private String peopleName; -} diff --git a/wms-module-system/src/main/java/top/wms/admin/rule/model/resp/RuleResp.java b/wms-module-system/src/main/java/top/wms/admin/rule/model/resp/RuleResp.java deleted file mode 100644 index 7c786d3..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/rule/model/resp/RuleResp.java +++ /dev/null @@ -1,134 +0,0 @@ -package top.wms.admin.rule.model.resp; - -import cn.crane4j.annotation.Assemble; -import com.alibaba.excel.annotation.ExcelIgnore; -import com.alibaba.excel.annotation.ExcelProperty; -import com.alibaba.excel.annotation.write.style.ColumnWidth; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; -import top.wms.admin.common.constant.ContainerConstants; -import top.wms.admin.common.model.resp.BaseDetailResp; - -import java.io.Serial; -import java.time.LocalDateTime; -import java.util.List; - -/** - * 通行规则信息 - * - * @author zc - * @since 2025/03/26 22:59 - */ -@Data -@Schema(description = "通行规则信息") -public class RuleResp extends BaseDetailResp { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 规则名称 - */ - @Schema(description = "规则名称") - @ExcelProperty(value = "规则名称", order = 1) - private String name; - - /** - * 有效期开始 - */ - @Schema(description = "有效期开始") - @ExcelProperty(value = "有效期开始", order = 2) - @ColumnWidth(30) - private LocalDateTime startTime; - - /** - * 有效期结束 - */ - @Schema(description = "有效期结束") - @ExcelProperty(value = "有效期结束", order = 3) - @ColumnWidth(30) - private LocalDateTime endTime; - - /** - * 准入时间起 - */ - @Schema(description = "准入时间起") - @ExcelProperty(value = "准入时间起", order = 4) - @ColumnWidth(30) - private String admittanceStart; - - /** - * 准入时间止 - */ - @Schema(description = "准入时间止") - @ExcelProperty(value = "准入时间止", order = 5) - @ColumnWidth(30) - private String admittanceEnd; - - /** - * 设备空间 - */ - @Schema(description = "设备空间") - @Assemble(prop = ":spaceName", container = ContainerConstants.SPACE_NAME) - @ExcelIgnore - private Long spaceId; - - /** - * 设备空间名称 - */ - @Schema(description = "设备空间名称") - @ExcelIgnore - private String spaceName; - - /** - * 设备位置 - */ - @Schema(description = "设备位置") - @ExcelIgnore - private String pointId; - - /** - * 备注 - */ - @Schema(description = "备注") - @ExcelIgnore - private String remark; - - /** - * - */ - @Schema(description = "") - @ExcelIgnore - private Long updateUser; - - /** - * 更新时间 - */ - @Schema(description = "更新时间") - @ExcelProperty(value = "更新时间", order = 6) - @ColumnWidth(30) - private LocalDateTime updateTime; - - /** - * 1:本地库 2:云端库 默认本地 - */ - @Schema(description = "1:本地库 2:云端库 默认本地") - @ExcelIgnore - private String type; - - /** - * facePermission 刷脸权限 idCardPermission 刷卡权限 faceAndCardPermission 人卡合一权限 idCardFacePermission 人证比对权限 - * passwordPermission 密码权限 - */ - @Schema(description = "权限") - @ExcelProperty(value = "权限", order = 7) - private String permission; - - @ExcelIgnore - @Schema(description = "facePermission 刷脸权限 idCardPermission 刷卡权限 faceAndCardPermission 人卡合一权限 idCardFacePermission 人证比对权限passwordPermission 密码权限") - private List permissionList; - - @ExcelIgnore - @Schema(description = "规则绑定设备id集合") - private List equipmentIds; -} diff --git a/wms-module-system/src/main/java/top/wms/admin/rule/model/resp/YFPeopleResp.java b/wms-module-system/src/main/java/top/wms/admin/rule/model/resp/YFPeopleResp.java deleted file mode 100644 index ae374b1..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/rule/model/resp/YFPeopleResp.java +++ /dev/null @@ -1,54 +0,0 @@ -package top.wms.admin.rule.model.resp; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; - -/** - * 设备规则信息 - * - * @author zc - * @since 2025/03/26 22:59 - */ -@Data -public class YFPeopleResp { - - @Schema(description = "规则id") - private Long ruleId; - - @Schema(description = "规则在设备上的规则id") - private String equipmentRuleId; - - @Schema(description = "设备id") - private Long equipmentId; - - @Schema(description = "设备ip") - private String ip; - - @Schema(description = "设备密码") - private String password; - - @Schema(description = "在线状态") - private String flag; - - @Schema(description = "人员id") - private Long peopleId; - - @Schema(description = "人员姓名") - private String peopleName; - - @Schema(description = "身份证号") - private String idcard; - - @Schema(description = "手机号") - private String phone; - - @Schema(description = "设备人员id") - private String guid; - - @Schema(description = "设备人员照片id") - private String faceGuid; - - @Schema(description = "设备人员照片id") - private String avatar; - -} diff --git a/wms-module-system/src/main/java/top/wms/admin/rule/service/EmpowerRecordService.java b/wms-module-system/src/main/java/top/wms/admin/rule/service/EmpowerRecordService.java deleted file mode 100644 index b9ef515..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/rule/service/EmpowerRecordService.java +++ /dev/null @@ -1,14 +0,0 @@ -package top.wms.admin.rule.service; - -import top.continew.starter.extension.crud.service.BaseService; -import top.wms.admin.rule.model.query.EmpowerRecordQuery; -import top.wms.admin.rule.model.req.EmpowerRecordReq; -import top.wms.admin.rule.model.resp.EmpowerRecordResp; - -/** - * 授权记录业务接口 - * - * @author zc - * @since 2025/04/08 23:08 - */ -public interface EmpowerRecordService extends BaseService {} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/rule/service/PeopleRecordService.java b/wms-module-system/src/main/java/top/wms/admin/rule/service/PeopleRecordService.java deleted file mode 100644 index 4891f89..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/rule/service/PeopleRecordService.java +++ /dev/null @@ -1,14 +0,0 @@ -package top.wms.admin.rule.service; - -import top.continew.starter.extension.crud.service.BaseService; -import top.wms.admin.rule.model.query.PeopleRecordQuery; -import top.wms.admin.rule.model.req.PeopleRecordReq; -import top.wms.admin.rule.model.resp.PeopleRecordResp; - -/** - * 人员识别记录业务接口 - * - * @author zc - * @since 2025/04/08 23:06 - */ -public interface PeopleRecordService extends BaseService {} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/rule/service/RuleService.java b/wms-module-system/src/main/java/top/wms/admin/rule/service/RuleService.java deleted file mode 100644 index 3eb7759..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/rule/service/RuleService.java +++ /dev/null @@ -1,34 +0,0 @@ -package top.wms.admin.rule.service; - -import top.continew.starter.extension.crud.model.resp.LabelValueResp; -import top.continew.starter.extension.crud.service.BaseService; -import top.wms.admin.rule.model.query.RuleQuery; -import top.wms.admin.rule.model.req.RuleReq; -import top.wms.admin.rule.model.resp.YFPeopleResp; -import top.wms.admin.rule.model.resp.RuleResp; - -import java.util.List; - -/** - * 通行规则业务接口 - * - * @author zc - * @since 2025/03/26 22:59 - */ -public interface RuleService extends BaseService { - - List getEquipmentRulesByPeoples(List peopleIds); - - List getRuleNameList(RuleReq ruleReq); - - String addRule1(RuleReq ruleReq); - - String updateRule1(RuleReq ruleReq, Long ruleId); - - /** - * crane4j存储 - * - * @return - */ - String getRuleName(Long id); -} diff --git a/wms-module-system/src/main/java/top/wms/admin/rule/service/impl/EmpowerRecordServiceImpl.java b/wms-module-system/src/main/java/top/wms/admin/rule/service/impl/EmpowerRecordServiceImpl.java deleted file mode 100644 index 2003897..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/rule/service/impl/EmpowerRecordServiceImpl.java +++ /dev/null @@ -1,117 +0,0 @@ -package top.wms.admin.rule.service.impl; - -import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.util.StrUtil; -import cn.hutool.http.HttpUtil; -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONObject; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Service; -import top.continew.starter.core.exception.BusinessException; -import top.continew.starter.extension.crud.model.query.PageQuery; -import top.continew.starter.extension.crud.model.resp.PageResp; -import top.continew.starter.extension.crud.service.BaseServiceImpl; -import top.wms.admin.common.enums.CommonExceptionEnum; -import top.wms.admin.rule.mapper.EmpowerRecordMapper; -import top.wms.admin.rule.model.entity.EmpowerRecordDO; -import top.wms.admin.rule.model.query.EmpowerRecordQuery; -import top.wms.admin.rule.model.req.EmpowerRecordReq; -import top.wms.admin.rule.model.resp.EmpowerRecordDetailResp; -import top.wms.admin.rule.model.resp.EmpowerRecordResp; -import top.wms.admin.rule.service.EmpowerRecordService; -import top.wms.admin.common.constant.Constants; -import top.wms.admin.yfApi.service.IYFPushService; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * 授权记录业务实现 - * - * @author zc - * @since 2025/04/08 23:08 - */ -@Service -@Slf4j -@RequiredArgsConstructor -public class EmpowerRecordServiceImpl extends BaseServiceImpl implements EmpowerRecordService { - - private final IYFPushService iyfPushService; - - /** - * 卡权限删除接口 - */ - public static final String delete = "/cardinfo/delete"; - - @Override - public PageResp page(EmpowerRecordQuery query, PageQuery pageQuery) { - QueryWrapper queryWrapper = this.buildQueryWrapper(query); - super.sort(queryWrapper, pageQuery); - IPage page = baseMapper.selectEmpowerRecordPage(new Page<>(pageQuery.getPage(), pageQuery - .getSize()), queryWrapper); - return PageResp.build(page, super.getListClass()); - } - - @Override - protected QueryWrapper buildQueryWrapper(EmpowerRecordQuery query) { - return new QueryWrapper().like(StrUtil.isNotBlank(query.getName()), "p.name", query.getName()) - .eq(StrUtil.isNotBlank(query.getEquipmentId()), "ser.equipment_id", query.getEquipmentId()); - } - - @Override - public void beforeDelete(List ids) { - - //查询授权记录 设备列表需要删除的人员信息(已去重,group by需要设置数据库模式) - List resp = baseMapper.selectForEmpowerDel(ids); - if (CollUtil.isNotEmpty(resp)) { - return; - } - - //删除设备的人员信息 - resp.forEach(record -> { - try { - iyfPushService.personDelete(record.getGuid(), record.getIp(), record.getPassword()); - } catch (Exception e) { - log.error("EmpowerRecordServiceImpl-personDelete失败:{},{},失败原因", record.getGuid(), record.getIp(), e); - } - //设备所属产品id为5的需要删除梯控 - if (record.getProductId() == 5L) { - try { - deleteLadder(record); - } catch (Exception e) { - log.error("EmpowerRecordServiceImpl-deleteLadder失败:{},{}", record.getGuid(), record.getIp()); - } - } - }); - } - - /** - * 删除梯控 - * - * @param equipmentResp - */ - private void deleteLadder(EmpowerRecordDetailResp equipmentResp) { - log.info("梯控删除:" + equipmentResp); - log.info("梯控删除地址:" + "http://" + equipmentResp.getIp() + ":8090" + delete); - Map map = new HashMap<>(); - map.put("idcardnum", equipmentResp.getDoorNo()); - map.put("pass", equipmentResp.getPassword()); - String body = HttpUtil.createPost("http://" + equipmentResp.getIp() + ":8090" + delete) - .timeout(5000) - .body(JSON.toJSONString(map)) - .execute() - .body(); - log.info("梯控删除卡号接口返回:" + body); - JSONObject object = JSONObject.parseObject(body); - if (!Constants.CODE.equals(object.get("msg"))) { - log.error("梯控删除卡号接口异常码:{}", object.getString("msg")); - throw new BusinessException("梯控删除卡号接口" + CommonExceptionEnum.REQUEST_ERROR.getMessage()); - } - } - -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/rule/service/impl/PeopleRecordServiceImpl.java b/wms-module-system/src/main/java/top/wms/admin/rule/service/impl/PeopleRecordServiceImpl.java deleted file mode 100644 index d087b64..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/rule/service/impl/PeopleRecordServiceImpl.java +++ /dev/null @@ -1,49 +0,0 @@ -package top.wms.admin.rule.service.impl; - -import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.util.StrUtil; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import lombok.RequiredArgsConstructor; -import org.springframework.stereotype.Service; -import top.continew.starter.extension.crud.model.query.PageQuery; -import top.continew.starter.extension.crud.model.resp.PageResp; -import top.continew.starter.extension.crud.service.BaseServiceImpl; -import top.wms.admin.rule.mapper.PeopleRecordMapper; -import top.wms.admin.rule.model.entity.PeopleRecordDO; -import top.wms.admin.rule.model.query.PeopleRecordQuery; -import top.wms.admin.rule.model.req.PeopleRecordReq; -import top.wms.admin.rule.model.resp.PeopleRecordResp; -import top.wms.admin.rule.service.PeopleRecordService; - -/** - * 人员识别记录业务实现 - * - * @author zc - * @since 2025/04/08 23:06 - */ -@Service -@RequiredArgsConstructor -public class PeopleRecordServiceImpl extends BaseServiceImpl implements PeopleRecordService { - - @Override - public PageResp page(PeopleRecordQuery query, PageQuery pageQuery) { - QueryWrapper queryWrapper = this.buildQueryWrapper(query); - super.sort(queryWrapper, pageQuery); - IPage page = baseMapper.selectPeopleRecordPage(new Page<>(pageQuery.getPage(), pageQuery - .getSize()), queryWrapper); - return PageResp.build(page, super.getListClass()); - } - - @Override - protected QueryWrapper buildQueryWrapper(PeopleRecordQuery query) { - - return new QueryWrapper().eq(StrUtil.isNotBlank(query - .getEquipmentId()), "spr.equipment_id", query.getEquipmentId()) - .like(StrUtil.isNotBlank(query.getName()), "p.name", query.getName()) - .between(CollUtil.isNotEmpty(query.getShowDateList()), "spr.show_date", CollUtil.getFirst(query - .getShowDateList()), CollUtil.getLast(query.getShowDateList())); - } - -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/rule/service/impl/RuleServiceImpl.java b/wms-module-system/src/main/java/top/wms/admin/rule/service/impl/RuleServiceImpl.java deleted file mode 100644 index df2787a..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/rule/service/impl/RuleServiceImpl.java +++ /dev/null @@ -1,412 +0,0 @@ -package top.wms.admin.rule.service.impl; - -import cn.crane4j.annotation.ContainerMethod; -import cn.crane4j.annotation.MappingType; -import cn.hutool.core.bean.BeanUtil; -import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.util.IdUtil; -import cn.hutool.core.util.ObjectUtil; -import cn.hutool.core.util.StrUtil; -import com.alibaba.fastjson.JSONObject; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Service; -import org.springframework.util.StringUtils; -import top.continew.starter.core.validation.CheckUtils; -import top.continew.starter.extension.crud.model.resp.LabelValueResp; -import top.continew.starter.extension.crud.service.BaseServiceImpl; -import top.wms.admin.common.constant.ContainerConstants; -import top.wms.admin.equipment.model.resp.EquipmentResp; -import top.wms.admin.equipment.service.EquipmentService; -import top.wms.admin.peopleBranch.mapper.BranchRuleMapper; -import top.wms.admin.peopleBranch.model.entity.BranchRuleDO; -import top.wms.admin.rule.mapper.RuleMapper; -import top.wms.admin.rule.mapstruct.RuleConvert; -import top.wms.admin.rule.model.entity.RuleDO; -import top.wms.admin.rule.model.query.RuleQuery; -import top.wms.admin.rule.model.req.RuleReq; -import top.wms.admin.rule.model.resp.RuleResp; -import top.wms.admin.rule.model.resp.YFPeopleResp; -import top.wms.admin.rule.service.RuleService; -import top.wms.admin.system.mapper.RuleRelationMapper; -import top.wms.admin.system.model.entity.RuleRelationDO; -import top.wms.admin.yfApi.domain.RuleBody; -import top.wms.admin.yfApi.service.IYFPushService; - -import java.time.ZoneOffset; -import java.util.*; -import java.util.stream.Collectors; - -/** - * 通行规则业务实现 - * - * @author zc - * @since 2025/03/26 22:59 - */ -@Service -@RequiredArgsConstructor -@Slf4j -public class RuleServiceImpl extends BaseServiceImpl implements RuleService { - - private final RuleMapper ruleMapper; - - public final EquipmentService equipmentService; - - public final IYFPushService yfPushService; - - public final RuleRelationMapper ruleRelationMapper; - - public final BranchRuleMapper branchRuleMapper; - - public final RuleConvert ruleConvert; - - @Override - public String addRule1(RuleReq ruleReq) { - if (CollUtil.isNotEmpty(ruleReq.getPermissionList())) { - ruleReq.setPermission(String.join(",", ruleReq.getPermissionList())); - } - //下发失败的设备名单 - String failure = ""; - - //先将规则下发到设备当中 - //创建规则体 - RuleBody ruleBody = this.buildRuleBody(ruleReq); - //规则创建结果 - String response = ""; - //获取人脸机设备 - List equipmentRespList = this.getRuleEquipment(ruleReq.getEquipmentIds()); - //向所有在线设备添加规则 - for (EquipmentResp equipmentResp : equipmentRespList) { - //获取密码 - ruleBody.setPass(equipmentResp.getPassword()); - response = yfPushService.ruleCreate(ruleBody, equipmentResp.getIp()); - JSONObject jsonObject = JSONObject.parseObject(response); - if (jsonObject == null || !jsonObject.containsKey("code") || !StrUtil.equals("LAN_SUS-0", jsonObject - .getString("code"))) { - log.info(equipmentResp.getName() + "状态异常"); - failure += equipmentResp.getName() + ","; - } else { - JSONObject data = jsonObject.getJSONObject("data"); - String equipmentRuleId = data.getString("ruleId"); - ruleReq.getEquipmentRuleIdMap().put(equipmentResp.getId(), equipmentRuleId); - } - } - //没有下发到任何一台设备,新增失败 - CheckUtils.throwIfEmpty(ruleReq.getEquipmentRuleIdMap(), "所选设备全部异常,请检查后重新添加"); - //如果下发到设备当中,则添加到表中 - RuleDO ruleDO = new RuleDO(); - if (StringUtils.hasText(ruleReq.getName())) { - ruleDO.setName(ruleReq.getName()); - } - if (ObjectUtil.isNotEmpty(ruleReq.getStartTime())) { - ruleDO.setStartTime(ruleReq.getStartTime()); - } - if (ObjectUtil.isNotEmpty(ruleReq.getEndTime())) { - ruleDO.setEndTime(ruleReq.getEndTime()); - } - if (ObjectUtil.isNotEmpty(ruleReq.getAdmittanceStart())) { - ruleDO.setAdmittanceStart(ruleReq.getAdmittanceStart()); - } - if (ObjectUtil.isNotEmpty(ruleReq.getAdmittanceEnd())) { - ruleDO.setAdmittanceEnd(ruleReq.getAdmittanceEnd()); - } - if (ObjectUtil.isNotEmpty(ruleReq.getType())) { - ruleDO.setType(ruleReq.getType()); - } - List permissionList = ruleReq.getPermissionList(); - if (permissionList != null && !permissionList.isEmpty()) { - ruleDO.setPermission(String.join(",", permissionList)); - } - baseMapper.insert(ruleDO); - for (Long equipmentId : ruleReq.getEquipmentIds()) { - if (ObjectUtil.isNotEmpty(ruleReq.getEquipmentRuleIdMap().get(equipmentId))) { - createRelation(ruleDO.getId(), equipmentId, ruleReq.getEquipmentRuleIdMap().get(equipmentId)); - } - } - if (ObjectUtil.equal(failure, "")) { - return "规则下发完成"; - } else { - return "规则下发完成,部分设备下发失败,名单如下:" + failure; - } - } - - @Override - public RuleResp get(Long id) { - RuleDO ruleDO = baseMapper.selectById(id); - List ruleRelationDOList = ruleRelationMapper.selectList(new QueryWrapper() - .eq("rule_id", id)); - List equipmentIds = ruleRelationDOList.stream().map(RuleRelationDO::getEquipmentId).toList(); - RuleResp ruleResp = BeanUtil.toBean(ruleDO, RuleResp.class); - ruleResp.setPermissionList(List.of(ruleDO.getPermission().split(","))); - ruleResp.setEquipmentIds(equipmentIds); - return ruleResp; - } - - @Override - public void beforeDelete(List ids) { - if (ids.size() == 1) { - List list = baseMapper.querySysRuleList(ids); - CheckUtils.throwIfEmpty(list, "该规则不存在"); - RuleDO ruleDO = list.get(0); - this.deleteRelation(ruleDO.getId()); - } else { - List ruleDOList = baseMapper.querySysRuleList(ids); - CheckUtils.throwIfEmpty(ruleDOList, "规则不存在"); - for (RuleDO ruleDO : ruleDOList) { - this.deleteRelation(ruleDO.getId()); - } - } - } - - @Override - public String updateRule1(RuleReq ruleReq, Long ruleId) { - if (CollUtil.isNotEmpty(ruleReq.getPermissionList())) { - ruleReq.setPermission(String.join(",", ruleReq.getPermissionList())); - } - - //修改失败的设备名单 - String failure = ""; - List failureAddIds = new ArrayList<>(); - List failureUpdateIds = new ArrayList<>(); - - //创建规则体 - RuleBody ruleBody = this.buildRuleBody(ruleReq); - //规则创建结果 - String response = ""; - - //获取表中所有该规则已绑定的设备 - List ruleRelationList = ruleRelationMapper.lambdaQuery() - .eq(RuleRelationDO::getRuleId, ruleId) - .list(); - - List boundEquipmentIds = ruleRelationList.stream() - .map(RuleRelationDO::getEquipmentId) - .filter(Objects::nonNull) - .collect(Collectors.toList()); - - //处理修改-删除逻辑 - //处理请求中需要删除的设备 - List deleteIds = boundEquipmentIds.stream() - .filter(num -> !ruleReq.getEquipmentIds().contains(num)) - .collect(Collectors.toList()); - - //处理修改-添加逻辑 - //处理请求中需要添加的设备 - List addIds = ruleReq.getEquipmentIds() - .stream() - .filter(num -> !boundEquipmentIds.contains(num)) - .collect(Collectors.toList()); - if (ObjectUtil.isNotEmpty(addIds)) { - failure = updateAddRelation(ruleReq, addIds, failure, failureAddIds); - } - //处理修改-修改逻辑 - //处理请求中需要修改的设备 - List updateIds = boundEquipmentIds.stream() - .filter(Objects::nonNull) // 过滤null值,避免异常 - .filter(num -> !deleteIds.contains(num) && !addIds.contains(num)) // 一次判断两个条件 - .collect(Collectors.toList()); - if (CollUtil.isNotEmpty(updateIds) && ruleReq.getIsChange()) { - //获取需要修改的设备 - List equipmentRespList = this.getRuleEquipment(updateIds); - //对设备修改规则 - for (EquipmentResp equipmentResp : equipmentRespList) { - //获取密码 - ruleBody.setPass(equipmentResp.getPassword()); - //获取设备上对应规则id - RuleRelationDO ruleRelationDO = ruleRelationMapper.selectOne(new LambdaQueryWrapper() - .eq(RuleRelationDO::getRuleId, ruleId) - .eq(RuleRelationDO::getEquipmentId, equipmentResp.getId())); - ruleBody.setRuleId(String.valueOf(ruleRelationDO.getEquipmentRuleId())); - response = yfPushService.ruleUpdate(ruleBody, equipmentResp.getIp()); - JSONObject jsonObject = JSONObject.parseObject(response); - if (jsonObject == null || !jsonObject.containsKey("code") || !StrUtil.equals("LAN_SUS-0", jsonObject - .getString("code"))) { - log.info(equipmentResp.getName() + "规则修改失败!"); - failure += equipmentResp.getName() + ","; - failureUpdateIds.add(equipmentResp.getId()); - } - } - if (ObjectUtil.isNotEmpty(failureUpdateIds)) { - updateDeleteRelation(ruleId, failureUpdateIds); - } - } - CheckUtils.throwIfEqual(failureUpdateIds.size() + failureAddIds.size(), updateIds.size() + addIds - .size(), "规则涉及修改和新增的设备全部异常!!!"); - //删除设备放在最后再执行 防止提前删除 导致规则无绑定的设备的情况 - if (ObjectUtil.isNotEmpty(deleteIds)) { - updateDeleteRelation(ruleId, deleteIds); - } - if (ruleReq.getIsChange()) { - updateUpdate(ruleReq, ruleId); - } - if (ObjectUtil.equal(failure, "")) { - return "规则修改完成,规则正常下发"; - } else { - return "规则修改完成,存在设备下发异常,请检查后重试。异常设备名单如下:" + failure; - } - } - - @Override - public List getEquipmentRulesByPeoples(List peopleIds) { - if (CollUtil.isEmpty(peopleIds)) { - return new ArrayList<>(); - } - return ruleMapper.getEquipmentRulesByPeoples(peopleIds); - } - - @Override - public List getRuleNameList(RuleReq ruleReq) { - LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); - queryWrapper.like(StrUtil.isNotBlank(ruleReq.getName()), RuleDO::getName, ruleReq.getName()); - List ruleDOS = ruleMapper.selectList(queryWrapper); - return ruleConvert.labelValueList(ruleDOS); - } - - //从设备上删除+从关联表删去 - public void deleteRelation(Long ruleId) { - LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); - queryWrapper.eq(RuleRelationDO::getRuleId, ruleId); - List ruleRelationDOList = ruleRelationMapper.selectList(queryWrapper); - for (RuleRelationDO ruleRelationDO : ruleRelationDOList) { - EquipmentResp equipmentResp = equipmentService.selectEquipmentById(ruleRelationDO.getEquipmentId()); - String response = yfPushService.ruleDelete(ruleRelationDO.getEquipmentRuleId(), equipmentResp - .getIp(), equipmentResp.getPassword(), 2); - JSONObject jsonObject = JSONObject.parseObject(response); - if (jsonObject == null || !jsonObject.containsKey("code") || !StrUtil.equals("LAN_SUS-0", jsonObject - .getString("code"))) { - log.info(equipmentResp.getName() + "状态异常,规则删除失败"); - } - ruleRelationMapper.deleteByRuleId(ruleRelationDO); - } - branchRuleMapper.delete(new QueryWrapper().eq("rule_id", ruleId)); - } - - public void updateDeleteRelation(Long ruleId, List deleteIds) { - List ruleRelationList = ruleRelationMapper.lambdaQuery() - .eq(RuleRelationDO::getRuleId, ruleId) - .in(RuleRelationDO::getEquipmentId, deleteIds) - .list(); - for (RuleRelationDO ruleRelationDO : ruleRelationList) { - EquipmentResp equipmentResp = equipmentService.selectEquipmentById(ruleRelationDO.getEquipmentId()); - String response = yfPushService.ruleDelete(ruleRelationDO.getEquipmentRuleId(), equipmentResp - .getIp(), equipmentResp.getPassword(), 2); - JSONObject jsonObject = JSONObject.parseObject(response); - if (jsonObject == null || !jsonObject.containsKey("code") || !StrUtil.equals("LAN_SUS-0", jsonObject - .getString("code"))) { - log.info(equipmentResp.getName() + "删除失败"); - } - ruleRelationMapper.deleteByRuleId(ruleRelationDO); - } - } - - public String updateAddRelation(RuleReq ruleReq, List addIds, String failure, List deleteIds) { - //创建规则体 - RuleBody ruleBody = this.buildRuleBody(ruleReq); - //规则创建结果 - String response = ""; - //获取人脸机设备 - List equipmentRespList = this.getRuleEquipment(addIds); - //向所有在线设备添加规则 - for (EquipmentResp equipmentResp : equipmentRespList) { - //获取密码 - ruleBody.setPass(equipmentResp.getPassword()); - response = yfPushService.ruleCreate(ruleBody, equipmentResp.getIp()); - JSONObject jsonObject = JSONObject.parseObject(response); - if (jsonObject == null || !jsonObject.containsKey("code") || !StrUtil.equals("LAN_SUS-0", jsonObject - .getString("code"))) { - log.info(ruleReq.getName() + "下发设备:" + equipmentResp.getName() + "失败"); - failure += equipmentResp.getName() + ","; - deleteIds.add(equipmentResp.getId()); - } else { - JSONObject data = jsonObject.getJSONObject("data"); - String equipmentRuleId = data.getString("ruleId"); - createRelation(ruleReq.getId(), equipmentResp.getId(), equipmentRuleId); - } - } - return failure; - } - - public void updateUpdate(RuleReq ruleReq, Long ruleId) { - RuleDO ruleDO = new RuleDO(); - ruleDO.setId(ruleId); - if (StringUtils.hasText(ruleReq.getName())) { - ruleDO.setName(ruleReq.getName()); - } - if (ObjectUtil.isNotEmpty(ruleReq.getStartTime())) { - ruleDO.setStartTime(ruleReq.getStartTime()); - } - if (ObjectUtil.isNotEmpty(ruleReq.getEndTime())) { - ruleDO.setEndTime(ruleReq.getEndTime()); - } - if (ObjectUtil.isNotEmpty(ruleReq.getAdmittanceStart())) { - ruleDO.setAdmittanceStart(ruleReq.getAdmittanceStart()); - } - if (ObjectUtil.isNotEmpty(ruleReq.getAdmittanceEnd())) { - ruleDO.setAdmittanceEnd(ruleReq.getAdmittanceEnd()); - } - if (ObjectUtil.isNotEmpty(ruleReq.getType())) { - ruleDO.setType(ruleReq.getType()); - } - List permissionList = ruleReq.getPermissionList(); - if (permissionList != null && !permissionList.isEmpty()) { - ruleDO.setPermission(String.join(",", permissionList)); - } - baseMapper.updateById(ruleDO); - } - - //保存规则设备关联表 - public void createRelation(Long ruleId, Long equipmentId, String equipmentRuleId) { - RuleRelationDO ruleRelationDO = new RuleRelationDO(); - ruleRelationDO.setRuleId(ruleId); - ruleRelationDO.setEquipmentId(equipmentId); - ruleRelationDO.setEquipmentRuleId(equipmentRuleId); - ruleRelationMapper.insert(ruleRelationDO); - } - - public RuleBody buildRuleBody(RuleReq ruleReq) { - //创建 RuleBody 实例并设置基础参数 - RuleBody ruleBody = new RuleBody(); - ruleBody.setRuleId(IdUtil.simpleUUID()); - ruleBody.setRuleName(ruleReq.getName()); - - //转换规则生命周期为东八区时间戳(毫秒) - Long startTimeStamp = ruleReq.getStartTime().toInstant(ZoneOffset.ofHours(8)).toEpochMilli(); - Long endTimeStamp = ruleReq.getEndTime().toInstant(ZoneOffset.ofHours(8)).toEpochMilli(); - // 构建 content 嵌套结构 - // 构建时段分段(准入开始/结束) - List segments = Arrays.asList(ruleReq.getAdmittanceStart(), ruleReq.getAdmittanceEnd()); - // 构建单日规则项 - Map dayItem = RuleBody.createDayItem(endTimeStamp, startTimeStamp, segments); - List> dayList = Arrays.asList(dayItem); - // 构建完整 content - Map content = RuleBody.createContent(endTimeStamp, startTimeStamp, dayList); - - // 设置 content 并返回 - ruleBody.setContent(content); - return ruleBody; - } - - public List getRuleEquipment(List equipmentIds) { - List equipmentRespList = new ArrayList<>(); - for (Long equipmentId : equipmentIds) { - EquipmentResp equipmentResp = equipmentService.selectEquipmentById(equipmentId); - CheckUtils.throwIfNotEqual(equipmentResp.getFlag(), "0", equipmentResp.getName() + "不在线"); - equipmentRespList.add(equipmentResp); - } - return equipmentRespList; - } - - @Override - @ContainerMethod(namespace = ContainerConstants.RULE_NAME, type = MappingType.ORDER_OF_KEYS) - public String getRuleName(Long id) { - if (null == id) { - return ""; - } - - RuleDO ruleDO = baseMapper.lambdaQuery().eq(RuleDO::getId, id).one(); - return ruleDO != null ? ruleDO.getName() : ""; - } - -} diff --git a/wms-module-system/src/main/java/top/wms/admin/space/mapper/PointMapper.java b/wms-module-system/src/main/java/top/wms/admin/space/mapper/PointMapper.java deleted file mode 100644 index af7f0c9..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/space/mapper/PointMapper.java +++ /dev/null @@ -1,20 +0,0 @@ -package top.wms.admin.space.mapper; - -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.core.toolkit.Constants; -import org.apache.ibatis.annotations.Param; -import top.continew.starter.data.mp.base.BaseMapper; -import top.wms.admin.space.model.entity.PointDO; -import top.wms.admin.space.model.resp.PointResp; - -/** - * 点位管理 Mapper - * - * @author zc - * @since 2025/04/03 15:01 - */ -public interface PointMapper extends BaseMapper { - IPage selectPointPage(@Param("page") IPage page, - @Param(Constants.WRAPPER) QueryWrapper queryWrapper); -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/space/mapper/SpaceMapper.java b/wms-module-system/src/main/java/top/wms/admin/space/mapper/SpaceMapper.java deleted file mode 100644 index 4babcc2..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/space/mapper/SpaceMapper.java +++ /dev/null @@ -1,17 +0,0 @@ -package top.wms.admin.space.mapper; - -import top.continew.starter.data.mp.base.BaseMapper; -import top.wms.admin.space.model.entity.SpaceDO; -import top.wms.admin.space.model.resp.SpaceResp; - -import java.util.List; - -/** - * 空间管理 Mapper - * - * @author zc - * @since 2025/04/03 10:47 - */ -public interface SpaceMapper extends BaseMapper { - List queryJuniorSpace(Long id); -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/space/mapstruct/PointConvert.java b/wms-module-system/src/main/java/top/wms/admin/space/mapstruct/PointConvert.java deleted file mode 100644 index dc0eddb..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/space/mapstruct/PointConvert.java +++ /dev/null @@ -1,18 +0,0 @@ -package top.wms.admin.space.mapstruct; - -import org.mapstruct.Mapper; -import org.mapstruct.Mapping; -import top.wms.admin.space.model.entity.PointDO; -import top.wms.admin.space.model.resp.SpaceResp; - -import java.util.List; - -@Mapper(componentModel = "spring") -public interface PointConvert { - - @Mapping(source = "spaceId", target = "parentId") - @Mapping(target = "type", expression = "java(\"2\")") - SpaceResp PointToSpace(PointDO pointDO); - - List PointToSpaceList(List pointDO); -} diff --git a/wms-module-system/src/main/java/top/wms/admin/space/mapstruct/SpaceConvert.java b/wms-module-system/src/main/java/top/wms/admin/space/mapstruct/SpaceConvert.java deleted file mode 100644 index f5541c7..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/space/mapstruct/SpaceConvert.java +++ /dev/null @@ -1,12 +0,0 @@ -package top.wms.admin.space.mapstruct; - -import org.mapstruct.Mapper; -import top.wms.admin.space.model.entity.SpaceDO; -import top.wms.admin.space.model.resp.SpaceResp; - -@Mapper(componentModel = "spring") -public interface SpaceConvert { - - SpaceResp DOToResp(SpaceDO spaceDO); - -} diff --git a/wms-module-system/src/main/java/top/wms/admin/space/model/entity/PointDO.java b/wms-module-system/src/main/java/top/wms/admin/space/model/entity/PointDO.java deleted file mode 100644 index 58d1fa9..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/space/model/entity/PointDO.java +++ /dev/null @@ -1,43 +0,0 @@ -package top.wms.admin.space.model.entity; - -import lombok.Data; - -import com.baomidou.mybatisplus.annotation.TableName; - -import top.wms.admin.common.model.entity.BaseDO; - -import java.io.Serial; - -/** - * 点位管理实体 - * - * @author zc - * @since 2025/04/03 15:01 - */ -@Data -@TableName("sys_point") -public class PointDO extends BaseDO { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 点位名称 - */ - private String name; - - /** - * 所属空间 - */ - private Long spaceId; - - /** - * 备注 - */ - private String remark; - - /** - * 所属空间 - */ - private Long sort; -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/space/model/entity/SpaceDO.java b/wms-module-system/src/main/java/top/wms/admin/space/model/entity/SpaceDO.java deleted file mode 100644 index c3ff45b..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/space/model/entity/SpaceDO.java +++ /dev/null @@ -1,48 +0,0 @@ -package top.wms.admin.space.model.entity; - -import lombok.Data; - -import com.baomidou.mybatisplus.annotation.TableName; - -import top.wms.admin.common.model.entity.BaseDO; - -import java.io.Serial; - -/** - * 空间管理实体 - * - * @author zc - * @since 2025/04/03 10:47 - */ -@Data -@TableName("sys_space") -public class SpaceDO extends BaseDO { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 空间名称 - */ - private String name; - - /** - * 父部门id - */ - private Long parentId; - - /** - * 祖级列表 - */ - private String ancestors; - - /** - * 空间类型(0父级 1子级) - */ - private String type; - - /** - * 备注 - */ - private String remark; -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/space/model/query/PointQuery.java b/wms-module-system/src/main/java/top/wms/admin/space/model/query/PointQuery.java deleted file mode 100644 index fe57e67..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/space/model/query/PointQuery.java +++ /dev/null @@ -1,35 +0,0 @@ -package top.wms.admin.space.model.query; - -import lombok.Data; - -import io.swagger.v3.oas.annotations.media.Schema; - -import java.io.Serial; -import java.io.Serializable; -import java.time.*; - -/** - * 点位管理查询条件 - * - * @author zc - * @since 2025/04/03 15:01 - */ -@Data -@Schema(description = "点位管理查询条件") -public class PointQuery implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 点位名称 - */ - @Schema(description = "点位名称") - private String name; - - /** - * 点位名称 - */ - @Schema(description = "空间id") - private Long spaceId; -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/space/model/query/SpaceQuery.java b/wms-module-system/src/main/java/top/wms/admin/space/model/query/SpaceQuery.java deleted file mode 100644 index 6a73df0..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/space/model/query/SpaceQuery.java +++ /dev/null @@ -1,40 +0,0 @@ -package top.wms.admin.space.model.query; - -import lombok.Data; - -import io.swagger.v3.oas.annotations.media.Schema; - -import top.continew.starter.data.core.annotation.Query; -import top.continew.starter.data.core.enums.QueryType; - -import java.io.Serial; -import java.io.Serializable; -import java.time.*; - -/** - * 空间管理查询条件 - * - * @author zc - * @since 2025/04/03 10:47 - */ -@Data -@Schema(description = "空间管理查询条件") -public class SpaceQuery implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 空间名称 - */ - @Schema(description = "空间名称") - @Query(type = QueryType.EQ) - private String name; - - /** - * 空间类型(0父级 1子级) - */ - @Schema(description = "空间类型(0父级 1子级)") - @Query(type = QueryType.EQ) - private String type; -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/space/model/req/PointReq.java b/wms-module-system/src/main/java/top/wms/admin/space/model/req/PointReq.java deleted file mode 100644 index 5cb05af..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/space/model/req/PointReq.java +++ /dev/null @@ -1,54 +0,0 @@ -package top.wms.admin.space.model.req; - -import jakarta.validation.constraints.*; - -import lombok.Data; - -import io.swagger.v3.oas.annotations.media.Schema; - -import org.hibernate.validator.constraints.Length; - -import java.io.Serial; -import java.io.Serializable; -import java.time.*; - -/** - * 创建或修改点位管理参数 - * - * @author zc - * @since 2025/04/03 15:01 - */ -@Data -@Schema(description = "创建或修改点位管理参数") -public class PointReq implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 点位名称 - */ - @Schema(description = "点位名称") - @NotBlank(message = "点位名称不能为空") - @Length(max = 50, message = "点位名称长度不能超过 {max} 个字符") - private String name; - - /** - * 所属空间 - */ - @Schema(description = "所属空间") - private Long spaceId; - - /** - * 备注 - */ - @Schema(description = "备注") - @Length(max = 200, message = "备注长度不能超过 {max} 个字符") - private String remark; - - /** - * 所属空间 - */ - @Schema(description = "所属空间") - private Long sort; -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/space/model/req/SpaceReq.java b/wms-module-system/src/main/java/top/wms/admin/space/model/req/SpaceReq.java deleted file mode 100644 index 8cbb3d9..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/space/model/req/SpaceReq.java +++ /dev/null @@ -1,74 +0,0 @@ -package top.wms.admin.space.model.req; - -import jakarta.validation.constraints.*; - -import lombok.Data; - -import io.swagger.v3.oas.annotations.media.Schema; - -import org.hibernate.validator.constraints.Length; - -import java.io.Serial; -import java.io.Serializable; -import java.time.*; - -/** - * 创建或修改空间管理参数 - * - * @author zc - * @since 2025/04/03 10:47 - */ -@Data -@Schema(description = "创建或修改空间管理参数") -public class SpaceReq implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 空间名称 - */ - @Schema(description = "空间名称") - @NotBlank(message = "空间名称不能为空") - @Length(max = 50, message = "空间名称长度不能超过 {max} 个字符") - private String name; - - /** - * 父部门id - */ - @Schema(description = "父部门id") - private Long parentId; - - /** - * 祖级列表 - */ - @Schema(description = "祖级列表") - @Length(max = 50, message = "祖级列表长度不能超过 {max} 个字符") - private String ancestors; - - /** - * 空间类型(0父级 1子级) - */ - @Schema(description = "空间类型(0父级 1子级)") - @Length(max = 1, message = "空间类型(0父级 1子级)长度不能超过 {max} 个字符") - private String type; - - /** - * 备注 - */ - @Schema(description = "备注") - @Length(max = 200, message = "备注长度不能超过 {max} 个字符") - private String remark; - - /** - * 创建时间 - */ - @Schema(description = "创建时间") - private LocalDateTime createTime; - - /** - * 更新时间 - */ - @Schema(description = "更新时间") - private LocalDateTime updateTime; -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/space/model/resp/PointResp.java b/wms-module-system/src/main/java/top/wms/admin/space/model/resp/PointResp.java deleted file mode 100644 index 9f22360..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/space/model/resp/PointResp.java +++ /dev/null @@ -1,66 +0,0 @@ -package top.wms.admin.space.model.resp; - -import lombok.Data; - -import io.swagger.v3.oas.annotations.media.Schema; - -import top.wms.admin.common.model.resp.BaseDetailResp; - -import java.io.Serial; -import java.time.*; - -/** - * 点位管理信息 - * - * @author zc - * @since 2025/04/03 15:01 - */ -@Data -@Schema(description = "点位管理信息") -public class PointResp extends BaseDetailResp { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 点位名称 - */ - @Schema(description = "点位名称") - private String name; - - /** - * 所属空间 - */ - @Schema(description = "所属空间") - private Long spaceId; - - /** - * 所属空间名称 - */ - @Schema(description = "所属空间名称") - private String spaceName; - - /** - * 备注 - */ - @Schema(description = "备注") - private String remark; - - /** - * - */ - @Schema(description = "") - private Long updateUser; - - /** - * 更新时间 - */ - @Schema(description = "更新时间") - private LocalDateTime updateTime; - - /** - * 所属空间 - */ - @Schema(description = "所属空间") - private Long sort; -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/space/model/resp/SpaceResp.java b/wms-module-system/src/main/java/top/wms/admin/space/model/resp/SpaceResp.java deleted file mode 100644 index b63b4ae..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/space/model/resp/SpaceResp.java +++ /dev/null @@ -1,68 +0,0 @@ -package top.wms.admin.space.model.resp; - -import lombok.Data; - -import io.swagger.v3.oas.annotations.media.Schema; - -import top.continew.starter.extension.crud.annotation.TreeField; -import top.wms.admin.common.model.resp.BaseDetailResp; - -import java.io.Serial; -import java.time.*; - -/** - * 空间管理信息 - * - * @author zc - * @since 2025/04/03 10:47 - */ -@Data -@TreeField(value = "id", nameKey = "name") -@Schema(description = "空间管理信息") -public class SpaceResp extends BaseDetailResp { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 空间名称 - */ - @Schema(description = "空间名称") - private String name; - - /** - * 父部门id - */ - @Schema(description = "父部门id") - private Long parentId; - - /** - * 祖级列表 - */ - @Schema(description = "祖级列表") - private String ancestors; - - /** - * 空间类型(0父级 1子级) - */ - @Schema(description = "空间类型(0父级 1子级)") - private String type; - - /** - * 备注 - */ - @Schema(description = "备注") - private String remark; - - /** - * 更新时间 - */ - @Schema(description = "更新时间") - private LocalDateTime updateTime; - - /** - * 排序 - */ - @Schema(description = "排序") - private Integer sort; -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/space/service/PointService.java b/wms-module-system/src/main/java/top/wms/admin/space/service/PointService.java deleted file mode 100644 index 0208bb4..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/space/service/PointService.java +++ /dev/null @@ -1,20 +0,0 @@ -package top.wms.admin.space.service; - -import cn.hutool.core.lang.tree.Tree; -import top.continew.starter.extension.crud.service.BaseService; -import top.wms.admin.space.model.query.PointQuery; -import top.wms.admin.space.model.req.PointReq; -import top.wms.admin.space.model.resp.PointResp; - -import java.util.List; - -/** - * 点位管理业务接口 - * - * @author zc - * @since 2025/04/03 15:01 - */ -public interface PointService extends BaseService { - - List> tree(PointQuery query); -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/space/service/SpaceService.java b/wms-module-system/src/main/java/top/wms/admin/space/service/SpaceService.java deleted file mode 100644 index af52a59..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/space/service/SpaceService.java +++ /dev/null @@ -1,21 +0,0 @@ -package top.wms.admin.space.service; - -import top.continew.starter.extension.crud.service.BaseService; -import top.wms.admin.space.model.query.SpaceQuery; -import top.wms.admin.space.model.req.SpaceReq; -import top.wms.admin.space.model.resp.SpaceResp; - -import java.util.List; - -/** - * 空间管理业务接口 - * - * @author zc - * @since 2025/04/03 10:47 - */ -public interface SpaceService extends BaseService { - - List queryJuniorSpace(Long id); - - String getSpaceNameById(Long id); -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/space/service/impl/PointServiceImpl.java b/wms-module-system/src/main/java/top/wms/admin/space/service/impl/PointServiceImpl.java deleted file mode 100644 index 7e961b9..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/space/service/impl/PointServiceImpl.java +++ /dev/null @@ -1,89 +0,0 @@ -package top.wms.admin.space.service.impl; - -import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.lang.tree.Tree; -import cn.hutool.core.lang.tree.TreeNodeConfig; -import cn.hutool.core.lang.tree.TreeUtil; -import cn.hutool.core.util.StrUtil; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import lombok.RequiredArgsConstructor; -import org.springframework.stereotype.Service; -import top.continew.starter.extension.crud.model.query.PageQuery; -import top.continew.starter.extension.crud.model.query.SortQuery; -import top.continew.starter.extension.crud.model.resp.PageResp; -import top.continew.starter.extension.crud.service.BaseServiceImpl; -import top.wms.admin.space.mapper.PointMapper; -import top.wms.admin.space.mapstruct.PointConvert; -import top.wms.admin.space.model.entity.PointDO; -import top.wms.admin.space.model.query.PointQuery; -import top.wms.admin.space.model.query.SpaceQuery; -import top.wms.admin.space.model.req.PointReq; -import top.wms.admin.space.model.resp.PointResp; -import top.wms.admin.space.model.resp.SpaceResp; -import top.wms.admin.space.service.PointService; -import top.wms.admin.space.service.SpaceService; - -import java.util.ArrayList; -import java.util.List; - -/** - * 点位管理业务实现 - * - * @author zc - * @since 2025/04/03 15:01 - */ -@Service -@RequiredArgsConstructor -public class PointServiceImpl extends BaseServiceImpl implements PointService { - - private final SpaceService spaceService; - - private final PointConvert pointConvert; - - @Override - public PageResp page(PointQuery query, PageQuery pageQuery) { - QueryWrapper queryWrapper = this.buildQueryWrapper(query); - super.sort(queryWrapper, pageQuery); - IPage page = baseMapper.selectPointPage(new Page<>(pageQuery.getPage(), pageQuery - .getSize()), queryWrapper); - PageResp pageResp = PageResp.build(page, super.getListClass()); - return pageResp; - } - - @Override - protected QueryWrapper buildQueryWrapper(PointQuery query) { - - List spaceIds = new ArrayList<>(); - Long spaceId = query.getSpaceId(); - if (null != spaceId) { - List spaceResps = spaceService.queryJuniorSpace(spaceId); - spaceIds = spaceResps.stream().map(SpaceResp::getId).toList(); - } - - return new QueryWrapper().like(StrUtil.isNotBlank(query.getName()), "t1.name", query.getName()) - .in(CollUtil.isNotEmpty(spaceIds), "space_id", spaceIds); - } - - @Override - public List> tree(PointQuery query) { - //查询空间列表 - List list = spaceService.list(new SpaceQuery(), new SortQuery()); - - //查询点位信息 - LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); - queryWrapper.eq(StrUtil.isNotBlank(query.getName()), PointDO::getName, query.getName()); - List spaceResps = pointConvert.PointToSpaceList(baseMapper.selectList(queryWrapper)); - list.addAll(spaceResps); - - TreeNodeConfig config = new TreeNodeConfig(); - return TreeUtil.build(list, 0L, config, (treeNode, tree) -> { - tree.setId(treeNode.getId()); - tree.putExtra("key", treeNode.getId()); - tree.putExtra("title", treeNode.getName()); - tree.setParentId(treeNode.getParentId()); - }); - } -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/space/service/impl/SpaceServiceImpl.java b/wms-module-system/src/main/java/top/wms/admin/space/service/impl/SpaceServiceImpl.java deleted file mode 100644 index 0742ada..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/space/service/impl/SpaceServiceImpl.java +++ /dev/null @@ -1,49 +0,0 @@ -package top.wms.admin.space.service.impl; - -import cn.crane4j.annotation.ContainerMethod; -import cn.crane4j.annotation.MappingType; -import lombok.RequiredArgsConstructor; -import org.springframework.stereotype.Service; -import top.continew.starter.extension.crud.service.BaseServiceImpl; -import top.wms.admin.common.constant.ContainerConstants; -import top.wms.admin.space.mapper.SpaceMapper; -import top.wms.admin.space.mapstruct.SpaceConvert; -import top.wms.admin.space.model.entity.SpaceDO; -import top.wms.admin.space.model.query.SpaceQuery; -import top.wms.admin.space.model.req.SpaceReq; -import top.wms.admin.space.model.resp.SpaceResp; -import top.wms.admin.space.service.SpaceService; - -import java.util.List; - -/** - * 空间管理业务实现 - * - * @author zc - * @since 2025/04/03 10:47 - */ -@Service -@RequiredArgsConstructor -public class SpaceServiceImpl extends BaseServiceImpl implements SpaceService { - - private final SpaceConvert spaceConvert; - - @Override - public List queryJuniorSpace(Long id) { - SpaceResp spaceResp = spaceConvert.DOToResp(baseMapper.selectById(id)); - List spaceResps = baseMapper.queryJuniorSpace(id); - spaceResps.add(spaceResp); - return spaceResps; - } - - @Override - @ContainerMethod(namespace = ContainerConstants.SPACE_NAME, type = MappingType.ORDER_OF_KEYS) - public String getSpaceNameById(Long id) { - if (null == id) { - return ""; - } - - SpaceDO spaceDO = baseMapper.lambdaQuery().eq(SpaceDO::getId, id).one(); - return spaceDO.getName(); - } -} \ No newline at end of file diff --git a/wms-module-system/src/main/java/top/wms/admin/yfApi/domain/BackInfo.java b/wms-module-system/src/main/java/top/wms/admin/yfApi/domain/BackInfo.java deleted file mode 100644 index a19b181..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/yfApi/domain/BackInfo.java +++ /dev/null @@ -1,81 +0,0 @@ -package top.wms.admin.yfApi.domain; - -import lombok.Data; - -/** - * Uface回调参数 持久化对象 - * - * @author nichun - */ -@Data -public class BackInfo { - - /** 设备序列号 **/ - protected String deviceKey; - - /** 识别记录毫秒级时间戳 */ - protected String time; - - /** 设备当前 IP 地址 " */ - protected String ip; - - /** 现场照保存路径 " */ - protected String path; - - /** 人员 ID .陌生人为 STRANGERBAB " */ - protected String personId; - - /** personId 对应的卡号 " */ - protected String idcardNum; - - /** 识别模式 " */ - protected String model; - - /** 活体判断结果 " */ - protected String aliveType; - - /** 人员比对结果 " */ - protected String identifyType; - - /** 有效时间段判断 " */ - protected String passTimeType; - - /** 有效日期判断 " */ - protected String permissionTimeType; - - /** 识别模式判断 " */ - protected String recModeType; - - /** 身份证信息 " */ - protected String data; - - /** 识别方式_人员类型 " */ - protected String type; - - /** 现场照 base64 码 " */ - protected String base64; - - /** 识别方式" */ - protected String recType; - - /** 人员测量温度值" */ - protected String temperature; - - /** 设置的体温异常标准" */ - protected String standard; - - /** 体温状态" */ - protected String temperatureState; - - /** 温度单位" */ - protected String tempUnit; - - private Integer index; - - private String attendanceStatus; - - @Override - public String toString() { - return "BackInfo{" + "deviceKey='" + deviceKey + '\'' + ", time='" + time + '\'' + ", ip='" + ip + '\'' + ", path='" + path + '\'' + ", personId='" + personId + '\'' + ", idcardNum='" + idcardNum + '\'' + ", model='" + model + '\'' + ", aliveType='" + aliveType + '\'' + ", identifyType='" + identifyType + '\'' + ", passTimeType='" + passTimeType + '\'' + ", permissionTimeType='" + permissionTimeType + '\'' + ", recModeType='" + recModeType + '\'' + ", data='" + data + '\'' + ", type='" + type + '\'' + ", base64='" + base64 + '\'' + ", recType='" + recType + '\'' + ", temperature='" + temperature + '\'' + ", standard='" + standard + '\'' + ", temperatureState='" + temperatureState + '\'' + ", tempUnit='" + tempUnit + '\'' + '}'; - } -} diff --git a/wms-module-system/src/main/java/top/wms/admin/yfApi/domain/BackResult.java b/wms-module-system/src/main/java/top/wms/admin/yfApi/domain/BackResult.java deleted file mode 100644 index 43a3202..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/yfApi/domain/BackResult.java +++ /dev/null @@ -1,35 +0,0 @@ -package top.wms.admin.yfApi.domain; - -import lombok.Data; - -import java.util.HashMap; - -/** - * Uface回调参数 持久化对象 - * - * @author nichun - */ -@Data -public class BackResult extends HashMap { - - /** 返回内容 */ - public static final String RESULT_TAG = "result"; - - /** 数据对象 */ - public static final String SUCCESS_TAG = "success"; - - public BackResult() { - } - - /** - * 初始化一个新创建的 AjaxResult 对象 - * - * @param code 状态码 - * @param msg 返回内容 - */ - public BackResult(int code, Boolean msg) { - super.put(RESULT_TAG, code); - super.put(SUCCESS_TAG, msg); - } - -} diff --git a/wms-module-system/src/main/java/top/wms/admin/yfApi/domain/DingtalkCode.java b/wms-module-system/src/main/java/top/wms/admin/yfApi/domain/DingtalkCode.java deleted file mode 100644 index 723cd57..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/yfApi/domain/DingtalkCode.java +++ /dev/null @@ -1,22 +0,0 @@ -package top.wms.admin.yfApi.domain; - -import lombok.Data; - -@Data -public class DingtalkCode { - - /** - * sys_people的工号 - */ - private String userId; - - /** - * 二维码过期 - */ - private String message; - - /** - * 错误类型 - */ - private String code; -} diff --git a/wms-module-system/src/main/java/top/wms/admin/yfApi/domain/DingtalkMsgVo.java b/wms-module-system/src/main/java/top/wms/admin/yfApi/domain/DingtalkMsgVo.java deleted file mode 100644 index 5ddba78..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/yfApi/domain/DingtalkMsgVo.java +++ /dev/null @@ -1,27 +0,0 @@ -package top.wms.admin.yfApi.domain; - -import lombok.Data; -import lombok.Getter; -import lombok.Setter; - -/** - * 钉钉消息 - */ -@Data -public class DingtalkMsgVo { - /** - * 消息类型 - */ - private String msgtype; - - private Text text; - - @Getter - @Setter - public static class Text { - /** - * 类容 - */ - private String content; - } -} diff --git a/wms-module-system/src/main/java/top/wms/admin/yfApi/domain/EventResult.java b/wms-module-system/src/main/java/top/wms/admin/yfApi/domain/EventResult.java deleted file mode 100644 index fccfdf7..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/yfApi/domain/EventResult.java +++ /dev/null @@ -1,22 +0,0 @@ -package top.wms.admin.yfApi.domain; - -import lombok.Data; - -/** - * Uface回调参数 持久化对象 - * - * @author nichun - */ -@Data -public class EventResult { - - /** 事件Guid,唯一不重复标志 */ - protected String eventGuid; - - /** 事件编码,具体见文档描述 */ - protected String eventCode; - - /** 具体时间内容(JSON格式),具体见文档描述 */ - protected String eventMsg; - -} diff --git a/wms-module-system/src/main/java/top/wms/admin/yfApi/domain/EwmInfo.java b/wms-module-system/src/main/java/top/wms/admin/yfApi/domain/EwmInfo.java deleted file mode 100644 index fc3520b..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/yfApi/domain/EwmInfo.java +++ /dev/null @@ -1,37 +0,0 @@ -package top.wms.admin.yfApi.domain; - -import lombok.Data; - -/** - * Uface回调参数 持久化对象 - * - * @author nichun - */ -@Data -public class EwmInfo { - - /** 设备序列号 **/ - protected String deviceKey; - - /** 识别记录毫秒级时间戳 */ - protected String time; - - /** 设备当前 IP 地址 " */ - protected String ip; - - /** 现场照保存路径 " */ - protected String QRdata; - - /** - * 码值 - */ - private String payCode; - - /** - * 请求id,随机生成 - */ - private String requestId; - - private String qrCode; - -} diff --git a/wms-module-system/src/main/java/top/wms/admin/yfApi/domain/HeartInfo.java b/wms-module-system/src/main/java/top/wms/admin/yfApi/domain/HeartInfo.java deleted file mode 100644 index 77de26b..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/yfApi/domain/HeartInfo.java +++ /dev/null @@ -1,52 +0,0 @@ -package top.wms.admin.yfApi.domain; - -import lombok.Data; - -/** - * Uface回调参数 持久化对象 - * - * @author nichun - */ -@Data -public class HeartInfo { - - /** 设备序列号 **/ - protected String deviceKey; - - /** 识别记录毫秒级时间戳 */ - protected String time; - - /** 设备当前 IP 地址 " */ - protected String ip; - - /** 设备上的人员数量 " */ - protected String personCount; - - /** 设备上的照片数量 " */ - protected String faceCount; - - /** 设备上的指纹数量 " */ - protected String fingerCount; - - /** 设备版本号 " */ - protected String version; - - /** 磁盘剩余空间,单位:M " */ - protected String freeDiskSpace; - - /** CPU 使用率,单位:% " */ - protected String cpuUsageRate; - - /** CPU 温度,单位:℃ " */ - protected String cpuTemperature; - - /** 设备名称 " */ - protected String deviceName; - - /** 设备算法版本 " */ - protected String SDKVersion; - - /** 公司名称 " */ - protected String companyName; - -} diff --git a/wms-module-system/src/main/java/top/wms/admin/yfApi/domain/ICCardWhite.java b/wms-module-system/src/main/java/top/wms/admin/yfApi/domain/ICCardWhite.java deleted file mode 100644 index d9d48b6..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/yfApi/domain/ICCardWhite.java +++ /dev/null @@ -1,40 +0,0 @@ -package top.wms.admin.yfApi.domain; - -import lombok.Data; - -@Data -public class ICCardWhite { - - /** - * 卡号 - */ - private String CodeVal; - - /** - * 类型 - */ - private String CodeType = "C"; - - /** - * 有效起始时间 - */ - private String ValidityStart; - - /** - * 有效结束时间 - */ - private String ValidityEnd; - - /** - * 是否删除 - * 1 为删除 - * 0 为新增或修改 - */ - private String DeleteFlag = "0"; - - /** - * 授权表主键id - */ - private String manageId; - -} diff --git a/wms-module-system/src/main/java/top/wms/admin/yfApi/domain/ICCheckCode.java b/wms-module-system/src/main/java/top/wms/admin/yfApi/domain/ICCheckCode.java deleted file mode 100644 index 8c5fd62..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/yfApi/domain/ICCheckCode.java +++ /dev/null @@ -1,62 +0,0 @@ -package top.wms.admin.yfApi.domain; - -import lombok.Data; - -@Data -public class ICCheckCode { - - /** - * 二维码值,IC 卡卡号 - */ - private String CodeVal; - - /** - * 数据类型 - */ - private String CodeType; - - /** - * 日期时间 - */ - private String BrushTime; - - /** - * 区域 ID - */ - private String ViewId; - - /** - * 设备 ID - */ - private String UID; - - /** - * 授权 KEY - */ - private String UKey; - - /** - * 设备序列号 - */ - private String SN; - - /** - * 是否在线数据 1 为在线验证实时数据,0 为离线脱机数据 - */ - private String IsOnline; - - /** - * 脱机数据合法卡性 - */ - private String Property; - - /** - * 时间戳 - */ - private String Timestamp; - - /** - * 签名 - */ - private String Sign; -} diff --git a/wms-module-system/src/main/java/top/wms/admin/yfApi/domain/ICQueryCmd.java b/wms-module-system/src/main/java/top/wms/admin/yfApi/domain/ICQueryCmd.java deleted file mode 100644 index 0e44c1f..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/yfApi/domain/ICQueryCmd.java +++ /dev/null @@ -1,48 +0,0 @@ -package top.wms.admin.yfApi.domain; - -import lombok.Data; - -@Data -public class ICQueryCmd { - - /** - * 区域 ID - */ - private String ViewId; - - /** - * 设备 ID - */ - private String UID; - - /** - * 授权 KEY - */ - private String UKey; - - /** - * 设备序列号 - */ - private String SN; - - /** - * 设备防拆状态 - */ - private String TamperAlarm; - - /** - * 门状态 0 门关闭状态 - * 1 门打开状态 - */ - private String DoorMagnetic; - - /** - * 时间戳 - */ - private String Timestamp; - - /** - * 签名 - */ - private String Sign; -} diff --git a/wms-module-system/src/main/java/top/wms/admin/yfApi/domain/ICQueryCmdPostData.java b/wms-module-system/src/main/java/top/wms/admin/yfApi/domain/ICQueryCmdPostData.java deleted file mode 100644 index adabb24..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/yfApi/domain/ICQueryCmdPostData.java +++ /dev/null @@ -1,60 +0,0 @@ -package top.wms.admin.yfApi.domain; - -import com.alibaba.fastjson2.JSONObject; -import lombok.Data; - -@Data -public class ICQueryCmdPostData { - - /** - * 区域 ID - */ - private String ViewId; - - /** - * 设备 ID - */ - private String UID; - - /** - * 授权 Key - */ - private String UKey; - - /** - * 设备序列号 - */ - private String SN; - - /** - * 命令 ID - */ - private String CmdID; - - /** - * 命令代码ICCmdCodeEnum - */ - private Integer CmdCode; - - /** - * 命令状态 - * 1 执行成功 - * 2 执行失败 - */ - private Integer CmdStatus; - - /** - * 命令上传参数 - */ - private JSONObject CmdParams; - - /** - * 时间戳 - */ - private String Timestamp; - - /** - * 签名 - */ - private String Sign; -} diff --git a/wms-module-system/src/main/java/top/wms/admin/yfApi/domain/Person.java b/wms-module-system/src/main/java/top/wms/admin/yfApi/domain/Person.java deleted file mode 100644 index 6e6fac2..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/yfApi/domain/Person.java +++ /dev/null @@ -1,96 +0,0 @@ -package top.wms.admin.yfApi.domain; - -import com.alibaba.fastjson2.JSONObject; -import lombok.Data; - -import java.io.Serial; -import java.io.Serializable; -import java.util.List; - -/** - * 人员管理对象 person - * - * @author nichun - * @date 2023-03-08 - */ -@Data -public class Person implements Serializable { - @Serial - private static final long serialVersionUID = 1L; - - /** - * 人员Id - */ - private String id; - - /** - * 人员名称 - */ - private String name; - - /** - * 人员卡号 - */ - private String idcardNum; - - /** - * 身份证号 - */ - private String iDNumber; - - /** - * 人像模式权限 1:关 2:开 (默认) - */ - private int facePermission = 2; - - /** - * 刷卡模式权限 1:关 2:开 (默认) - */ - private int idCardPermission = 2; - - /** - * 人卡合一模式权限 1:关(默认) 2:开 - */ - private int faceAndCardPermission = 1; - - /** - * 单一验证方式 指纹验证 1:关(默认) 2:开 - */ - private int fingerPermission = 1; - - /** - * 人证比对模式权限 1:关(默认) 2:开 - */ - private int iDPermission = 1; - - /** - * 人员备注 - */ - private String tag; - - /** - * 手机号 - */ - private String phone; - - /** - * 用户密码 - */ - private String password; - - /** - * 用户密码权限 1:关 (默认) 2:开 - */ - private int passwordPermssion = 1; - - /** - * 人员类型 0:长期人员(默认),1:临时员工 2:黑名单用户, - */ - private int role = 0; - - /** - * 绑定的规则 - */ - private List rule; - -} diff --git a/wms-module-system/src/main/java/top/wms/admin/yfApi/domain/QrCodeVo.java b/wms-module-system/src/main/java/top/wms/admin/yfApi/domain/QrCodeVo.java deleted file mode 100644 index cc7eb6b..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/yfApi/domain/QrCodeVo.java +++ /dev/null @@ -1,37 +0,0 @@ -package top.wms.admin.yfApi.domain; - -import lombok.Data; - -@Data -public class QrCodeVo { - - /** - * 设备序列号 - **/ - protected String deviceKey; - - /** - * 识别记录毫秒级时间戳 - */ - protected String time; - - /** - * 设备当前 IP 地址 " - */ - protected String ip; - - /** - * 现场照保存路径 " - */ - protected String qrData; - - /** - * 码值 - */ - private String payCode; - - /** - * 请求id,随机生成 - */ - private String requestId; -} diff --git a/wms-module-system/src/main/java/top/wms/admin/yfApi/domain/RuleBody.java b/wms-module-system/src/main/java/top/wms/admin/yfApi/domain/RuleBody.java deleted file mode 100644 index 25c4eee..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/yfApi/domain/RuleBody.java +++ /dev/null @@ -1,70 +0,0 @@ -package top.wms.admin.yfApi.domain; - -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; - -public class RuleBody { - private String pass; - private String ruleId; - private String ruleName; - private int type = 1; - private Map content; - - public String getPass() { - return pass; - } - - public void setPass(String pass) { - this.pass = pass; - } - - public String getRuleId() { - return ruleId; - } - - public void setRuleId(String ruleId) { - this.ruleId = ruleId; - } - - public int getType() { - return type; - } - - public void setType(int type) { - this.type = type; - } - - public String getRuleName() { - return ruleName; - } - - public void setRuleName(String ruleName) { - this.ruleName = ruleName; - } - - public Map getContent() { - return content; - } - - public void setContent(Map content) { - this.content = content; - } - - // 辅助方法:快速构建 content 结构 - public static Map createContent(Long endAt, Long startAt, List> dayList) { - LinkedHashMap content = new LinkedHashMap<>(); - content.put("endAt", endAt); - content.put("startAt", startAt); - content.put("day", dayList); - return content; - } - - public static Map createDayItem(Long endAt, Long startAt, List segments) { - LinkedHashMap dayItem = new LinkedHashMap<>(); - dayItem.put("endAt", endAt); - dayItem.put("segment", segments); - dayItem.put("startAt", startAt); - return dayItem; - } -} diff --git a/wms-module-system/src/main/java/top/wms/admin/yfApi/service/ISysYFService.java b/wms-module-system/src/main/java/top/wms/admin/yfApi/service/ISysYFService.java deleted file mode 100644 index faca2c3..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/yfApi/service/ISysYFService.java +++ /dev/null @@ -1,34 +0,0 @@ -package top.wms.admin.yfApi.service; - -import java.util.List; - -/** - * 平台与宇泛交互层 - */ -public interface ISysYFService { - - /** - * 根据规则下发人员信息 - * - * @param peopleIds 人员id列表 - * @param operType 操作类型 - */ - List authDevice(List peopleIds, Integer operType); - - /** - * 下发单个人员信息 - * - * @param equipmentId 设备id - * @param peopleId 人员id - * @param operType 操作类型 - */ - Boolean authDevice(Long peopleId, Long equipmentId, Long ruleId, Integer operType); - - /** - * 批量删除人员信息 - * - * @param peopleIds 人员id列表 - * @param operType 操作类型 - */ - List delDevice(List peopleIds, Integer operType); -} diff --git a/wms-module-system/src/main/java/top/wms/admin/yfApi/service/IYFListenService.java b/wms-module-system/src/main/java/top/wms/admin/yfApi/service/IYFListenService.java deleted file mode 100644 index 92972a6..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/yfApi/service/IYFListenService.java +++ /dev/null @@ -1,24 +0,0 @@ -package top.wms.admin.yfApi.service; - -import top.wms.admin.yfApi.domain.BackInfo; -import top.wms.admin.yfApi.domain.HeartInfo; - -/** - * 接收宇泛推送接口 - */ -public interface IYFListenService { - - /** - * 设备心跳回调 - * - * @param info - */ - void heart(HeartInfo info); - - /** - * 人脸识别回调 - * - * @param info - */ - void processPeopleRecord(BackInfo info); -} diff --git a/wms-module-system/src/main/java/top/wms/admin/yfApi/service/IYFPushService.java b/wms-module-system/src/main/java/top/wms/admin/yfApi/service/IYFPushService.java deleted file mode 100644 index 714edcc..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/yfApi/service/IYFPushService.java +++ /dev/null @@ -1,107 +0,0 @@ -package top.wms.admin.yfApi.service; - -import com.alibaba.fastjson.JSONObject; -import top.wms.admin.yfApi.domain.Person; -import top.wms.admin.yfApi.domain.RuleBody; - -/** - * 宇泛下发设备接口 - * - * @author nichun - */ -public interface IYFPushService { - - //人员接口-人员注册 - String personCreate(Person person, String ip, String pass); - - //人员接口-人员删除(若删除多个人员,id 用英文逗号拼接,传入-1 则删除所有人员) - String personDelete(String id, String ip, String pass); - - //人员接口-人员更新 - String personUpdate(Person person, String ip, String pass); - - //人员接口-人员查询(若删除多个人员,id 用英文逗号拼接,传入-1 则删除所有人员) - String personFind(String id, String ip, String pass); - - //人员接口-人员卡号注册 - String icCardRegist(String id, String ip, String pass); - - //人员接口-时间段权限设置 - String createPasstime(JSONObject object, String ip, String pass); - - //人员接口-时间段权限设置(安卓设备不支持) - String passtime(JSONObject object, String ip, String pass); - - //人员接口-时间段权限批量删除(传入-1 可清除所有人员的passtime) - String deletePasstime(String id, String ip, String pass); - - //人员接口-人员有效期设置(2017-07-15 12:05:00) 仅支持单个人员 - String permissionsCreate(String id, String time, String ip, String pass); - - //人员有效期批量设置(安卓设备不支持) - //2017-07-15 12:05:00 - //传入-1 则选择为所有人员进行设置权限时间 - String permissionTime(String id, String startTime, String endTime, String ip, String pass); - - //人员接口-人员有效期批量删除(传入-1,可清除所有人员的权限时间) - String permissionsDelete(String id, String ip, String pass); - - //照片管理-照片注册册(base64)(不推荐使用)图片像素大于112*112、分辨率小于1080p、文件大小小于2M - String imageCreate64(String id, String imgBase64, String ip, String pass); - - //照片管理-照片注册册(url)(不推荐使用)图片像素大于112*112、分辨率小于1080p、文件大小小于2M - String imageCreateUrl(String id, String faceId, String imgUrl, String ip, String pass); - - String imageCreateUrl(String id, String imgUrl, String ip, String pass); - - //照片管理-照片删除 - String imageDeletel(String faceId, String ip, String pass); - - //照片管理-照片更新(base64) - String imageUpdate64(String id, String faceId, String imgBase64, String ip, String pass); - - //照片管理-拍照注册 - String takeImg(String id, String ip, String pass); - - //照片管理-清空人员注册照片 - String deletePerson(String id, String ip, String pass); - - //设备管理-识别回调 - String setIdentifyCallBack(String callbackUrl, String ip, String pass); - - //远程控制输出--默认远程开门 - String openDoorControl(String ip, String pass, Integer type, String content); - - //远程控制输出--设备重启 - String restartDevice(String ip, String pass); - - //远程控制输出--设备重置 - String resetDevice(String ip, String pass); - - //设备管理-二维码回调 - String setQRCodeCallback(String callbackUrl, String ip, String pass); - - //设备管理-心跳回调 - String setDeviceHeartBeat(String callbackUrl, String ip, String pass); - - //设备管理-指纹采集 - String fingerRegist(String id, String ip, String pass); - - //设备管理-指纹特征值查询 - String featureInfo(String id, String ip, String pass); - - //设备管理-照片查询 - String faceFind(String id, String ip, String pass); - - //设备管理-指纹特征值注册 - String featureReg(String id, String fingerprint, String ip, String pass); - - //设备管理-规则创建 - String ruleCreate(RuleBody rule, String ip); - - //设备管理-规则删除 - String ruleDelete(String ruleId, String ip, String pass, int isDeleteAll); - - //设备管理-规则修改 - String ruleUpdate(RuleBody rule, String ip); -} diff --git a/wms-module-system/src/main/java/top/wms/admin/yfApi/service/impl/SysYFServiceImpl.java b/wms-module-system/src/main/java/top/wms/admin/yfApi/service/impl/SysYFServiceImpl.java deleted file mode 100644 index f60a75a..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/yfApi/service/impl/SysYFServiceImpl.java +++ /dev/null @@ -1,250 +0,0 @@ -package top.wms.admin.yfApi.service.impl; - -import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.util.StrUtil; -import com.alibaba.fastjson2.JSON; -import com.alibaba.fastjson2.JSONObject; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Service; -import top.continew.starter.core.validation.CheckUtils; -import top.wms.admin.common.enums.OperTypeEnum; -import top.wms.admin.equipment.mapper.EquipmentMapper; -import top.wms.admin.equipment.model.entity.EquipmentDO; -import top.wms.admin.peopleBranch.mapper.PeopleMapper; -import top.wms.admin.peopleBranch.model.entity.PeopleDO; -import top.wms.admin.peopleDownRecord.model.req.PeopleDownReq; -import top.wms.admin.peopleDownRecord.service.PeopleDownService; -import top.wms.admin.rule.model.resp.YFPeopleResp; -import top.wms.admin.rule.service.RuleService; -import top.wms.admin.system.mapper.RuleRelationMapper; -import top.wms.admin.system.model.entity.RuleRelationDO; -import top.wms.admin.yfApi.domain.Person; -import top.wms.admin.yfApi.service.ISysYFService; -import top.wms.admin.yfApi.service.IYFPushService; - -import java.util.*; - -@Service -@RequiredArgsConstructor -@Slf4j -public class SysYFServiceImpl implements ISysYFService { - - private final IYFPushService iyfPushService; - - private final PeopleDownService peopleDownService; - - private final PeopleMapper peopleMapper; - - private final EquipmentMapper equipmentMapper; - - private final RuleRelationMapper ruleRelationMapper; - - private final RuleService ruleService; - - @Override - public List authDevice(List peopleIds, Integer operType) { - List downReqs = new ArrayList<>(); - List failIds = new ArrayList<>(); - - //查询部门绑定的规则ids - log.info("authDevice入参-peopleIds:{}", JSON.toJSONString(peopleIds)); - List yfPeopleResps = ruleService.getEquipmentRulesByPeoples(peopleIds); - if (CollUtil.isEmpty(yfPeopleResps)) { - log.info("人员所在部门未绑定规则,不下发设备"); - return failIds; - } - - for (YFPeopleResp resp : yfPeopleResps) { - //下发记录 - PeopleDownReq peopleDownReq = new PeopleDownReq(); - peopleDownReq.setEquipmentId(resp.getEquipmentId()); - peopleDownReq.setPeopleId(resp.getPeopleId()); - peopleDownReq.setDownTime(new Date()); - peopleDownReq.setOperType(operType); - peopleDownReq.setRuleId(resp.getRuleId()); - - //设备在线处理逻辑 - if (StrUtil.equals("0", resp.getFlag())) { - //新增人员信息 - Person person = new Person(); - person.setName(resp.getPeopleName()); - person.setIDNumber(resp.getIdcard()); - person.setPhone(resp.getPhone()); - person.setId(resp.getGuid()); - JSONObject ruleId = new JSONObject(); - ruleId.put("ruleId", resp.getEquipmentRuleId()); - JSONObject timezoneRule = new JSONObject(); - timezoneRule.put("timezoneRule", ruleId); - ArrayList list = new ArrayList<>(); - list.add(timezoneRule); - person.setRule(list); - - //如果不是新增,先删除人员信息 - if (!Objects.equals(operType, OperTypeEnum.ADD.getValue())) { - String data = iyfPushService.personDelete(resp.getGuid(), resp.getIp(), resp.getPassword()); - if (!verifyResult(data, peopleDownReq)) { - failIds.add(resp.getPeopleId()); - downReqs.add(peopleDownReq); - continue; - } - } - - //下发人员信息 - String data = iyfPushService.personCreate(person, resp.getIp(), resp.getPassword()); - if (!verifyResult(data, peopleDownReq)) { - failIds.add(resp.getPeopleId()); - downReqs.add(peopleDownReq); - continue; - } - - //下发人员照片 - if (StrUtil.isNotBlank(resp.getFaceGuid())) { - String datas = iyfPushService.imageCreateUrl(resp.getGuid(), resp.getAvatar(), resp.getIp(), resp - .getPassword()); - if (!verifyResult(datas, peopleDownReq)) { - failIds.add(resp.getPeopleId()); - } - } - - //下发成功后,修改人员下发状态 - peopleMapper.lambdaUpdate().eq(PeopleDO::getId, resp.getPeopleId()).set(PeopleDO::getDown, 1).update(); - - } else { - failIds.add(resp.getPeopleId()); - peopleDownReq.setDownResult(1); - peopleDownReq.setMsg("该设备下发时处于离线状态"); - } - downReqs.add(peopleDownReq); - } - peopleDownService.batchUpsertRecord(downReqs); - log.info("authDevice-失败人员:{}", JSON.toJSONString(failIds)); - return failIds; - } - - @Override - public Boolean authDevice(Long ruleId, Long equipmentId, Long peopleId, Integer operType) { - //下发记录 - PeopleDownReq peopleDownReq = new PeopleDownReq(); - peopleDownReq.setEquipmentId(equipmentId); - peopleDownReq.setPeopleId(peopleId); - peopleDownReq.setDownTime(new Date()); - peopleDownReq.setOperType(operType); - peopleDownReq.setRuleId(ruleId); - - RuleRelationDO ruleRelationDO = ruleRelationMapper.selectOne(new LambdaQueryWrapper() - .eq(RuleRelationDO::getEquipmentId, equipmentId) - .eq(RuleRelationDO::getRuleId, ruleId)); - PeopleDO peopleDO = peopleMapper.selectById(peopleId); - EquipmentDO equipmentDO = equipmentMapper.selectById(equipmentId); - - CheckUtils.throwIfEmpty(ruleRelationDO, "{设备id:" + equipmentId + "}:设备未绑定规则"); - CheckUtils.throwIfEmpty(peopleDO, "{人员id:" + peopleId + "}:人员不存在"); - CheckUtils.throwIfNotEqual(equipmentDO.getFlag(), "0", "{设备id:" + equipmentId + "}:当前设备离线中"); - - String data = iyfPushService.personDelete(peopleDO.getGuid(), equipmentDO.getIp(), equipmentDO.getPassword()); - if (!verifyResult(data, peopleDownReq)) { - peopleDownService.upsertRecord(peopleDownReq); - return false; - } - - //新增人员信息 - Person person = new Person(); - person.setName(peopleDO.getName()); - person.setIDNumber(peopleDO.getIdcard()); - person.setPhone(peopleDO.getPhone()); - person.setId(peopleDO.getGuid()); - JSONObject ruleJs = new JSONObject(); - ruleJs.put("ruleId", ruleRelationDO.getEquipmentRuleId()); - JSONObject timezoneRule = new JSONObject(); - timezoneRule.put("timezoneRule", ruleJs); - ArrayList list = new ArrayList<>(); - list.add(timezoneRule); - person.setRule(list); - - //下发人员信息 - String data1 = iyfPushService.personCreate(person, equipmentDO.getIp(), equipmentDO.getPassword()); - if (!verifyResult(data1, peopleDownReq)) { - peopleDownService.upsertRecord(peopleDownReq); - return false; - } - - //下发人员照片 - if (StrUtil.isNotBlank(peopleDO.getFaceGuid())) { - String datas = iyfPushService.imageCreateUrl(peopleDO.getGuid(), peopleDO.getAvatar(), equipmentDO - .getIp(), equipmentDO.getPassword()); - if (!verifyResult(datas, peopleDownReq)) { - peopleDownService.upsertRecord(peopleDownReq); - return false; - } - } - peopleDownService.upsertRecord(peopleDownReq); - return true; - - } - - @Override - public List delDevice(List peopleIds, Integer operType) { - List downReqs = new ArrayList<>(); - - List failIds = new ArrayList<>(); - //查询部门绑定的规则ids - log.info("delDevice入参-peopleIds:{}", JSON.toJSONString(peopleIds)); - List yfPeopleResps = ruleService.getEquipmentRulesByPeoples(peopleIds); - if (CollUtil.isEmpty(yfPeopleResps)) { - log.info("人员删除-人员所在部门未绑定规则,不下发设备"); - return failIds; - } - - for (YFPeopleResp resp : yfPeopleResps) { - //下发记录 - PeopleDownReq peopleDownReq = new PeopleDownReq(); - peopleDownReq.setEquipmentId(resp.getEquipmentId()); - peopleDownReq.setPeopleId(resp.getPeopleId()); - peopleDownReq.setDownTime(new Date()); - peopleDownReq.setOperType(operType); - - //设备在线处理逻辑 - if (StrUtil.equals("0", resp.getFlag())) { - String data = iyfPushService.personDelete(resp.getGuid(), resp.getIp(), resp.getPassword()); - peopleDownReq.setMsg(data); - JSONObject jsons = JSONObject.parseObject(data); - if (jsons != null && jsons.containsKey("code") && StrUtil.equals("LAN_SUS-0", jsons - .getString("code"))) { - peopleDownReq.setDownResult(0); - } else { - failIds.add(resp.getPeopleId()); - peopleDownReq.setDownResult(1); - } - } else { - peopleDownReq.setDownResult(1); - peopleDownReq.setMsg("该设备下发时处于离线状态"); - } - downReqs.add(peopleDownReq); - } - - if (CollUtil.isNotEmpty(downReqs)) { - peopleDownService.batchUpsertRecord(downReqs); - } - - List collect = peopleIds.stream().filter(id -> !failIds.contains(id)).toList(); - if (CollUtil.isNotEmpty(collect)) { - peopleDownService.batchUpsertRecord(downReqs); - } - return failIds; - } - - private Boolean verifyResult(String data, PeopleDownReq peopleDownReq) { - peopleDownReq.setMsg(data); - JSONObject jsons = JSONObject.parseObject(data); - if (jsons != null && jsons.containsKey("code") && StrUtil.equals("LAN_SUS-0", jsons.getString("code"))) { - peopleDownReq.setDownResult(0); - return true; - } else { - peopleDownReq.setDownResult(1); - return false; - } - } - -} diff --git a/wms-module-system/src/main/java/top/wms/admin/yfApi/service/impl/YFListenServiceImpl.java b/wms-module-system/src/main/java/top/wms/admin/yfApi/service/impl/YFListenServiceImpl.java deleted file mode 100644 index e915d10..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/yfApi/service/impl/YFListenServiceImpl.java +++ /dev/null @@ -1,90 +0,0 @@ -package top.wms.admin.yfApi.service.impl; - -import cn.hutool.core.util.ObjectUtil; -import cn.hutool.core.util.StrUtil; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Service; -import top.continew.starter.cache.redisson.util.RedisUtils; -import top.wms.admin.equipment.mapper.EquipmentMapper; -import top.wms.admin.equipment.model.entity.EquipmentDO; -import top.wms.admin.peopleBranch.mapper.PeopleMapper; -import top.wms.admin.peopleBranch.model.entity.PeopleDO; -import top.wms.admin.rule.mapper.PeopleRecordMapper; -import top.wms.admin.rule.model.entity.PeopleRecordDO; -import top.wms.admin.yfApi.domain.BackInfo; -import top.wms.admin.yfApi.domain.HeartInfo; -import top.wms.admin.yfApi.service.IYFListenService; - -import java.time.Duration; -import java.util.Date; -import java.util.List; - -@Service -@RequiredArgsConstructor -@Slf4j -public class YFListenServiceImpl implements IYFListenService { - - private final EquipmentMapper equipmentMapper; - - private final PeopleMapper peopleMapper; - - private final PeopleRecordMapper peopleRecordMapper; - - @Override - public void heart(HeartInfo info) { - //获取设备缓存的设备时间 - RedisUtils.set(info.getDeviceKey(), info.getTime(), Duration.ofSeconds(2 * 60)); - List list = equipmentMapper.selectList(new QueryWrapper().eq("product_id", 3L)); - for (EquipmentDO e : list) { - EquipmentDO equipmentDO = new EquipmentDO(); - equipmentDO.setId(e.getId()); - String time = RedisUtils.get(e.getSequence()); - if (StrUtil.isNotEmpty(time)) { - equipmentDO.setFlag("0"); - } else { - equipmentDO.setFlag("1"); - } - if (!StrUtil.equals(equipmentDO.getFlag(), e.getFlag())) { - equipmentMapper.updateById(equipmentDO); - } - } - } - - @Override - public void processPeopleRecord(BackInfo info) { - EquipmentDO equipmentDO = equipmentMapper.selectOne(new QueryWrapper().eq("sequence", info - .getDeviceKey())); - if (equipmentDO == null) { - log.error("未知设备识别记录:{}", info.getDeviceKey()); - return; - } - - PeopleDO peopleDO = peopleMapper.selectOne(new QueryWrapper().eq("admit_guid", info.getPersonId())); - if (ObjectUtil.isEmpty(peopleDO)) { - log.error("未知人员识别记录:{}", info.getPersonId()); - return; - } - - //新增通行记录 - PeopleRecordDO peopleRecordDO = new PeopleRecordDO(); - peopleRecordDO.setEquipmentId(equipmentDO.getId()); - peopleRecordDO.setAdmitGuid(info.getPersonId()); - peopleRecordDO.setAliveType(info.getAliveType()); - peopleRecordDO.setDeviceNo(info.getDeviceKey()); - peopleRecordDO.setType(info.getIdentifyType()); - peopleRecordDO.setCardNo(info.getIdcardNum()); - peopleRecordDO.setRecType(info.getRecType()); - peopleRecordDO.setPermissionTimeType(info.getPermissionTimeType()); - peopleRecordDO.setPassTimeType(info.getPassTimeType()); - peopleRecordDO.setRecModeType(info.getRecModeType()); - peopleRecordDO.setTimestamp(Long.parseLong(info.getTime())); - peopleRecordDO.setShowTime(Long.parseLong(info.getTime())); - peopleRecordDO.setShowDate(new Date(Long.parseLong(info.getTime()))); - peopleRecordDO.setRecMode(info.getModel()); - peopleRecordDO.setDeviceIp(info.getIp()); - peopleRecordDO.setPeopleId(peopleDO.getId()); - peopleRecordMapper.insert(peopleRecordDO); - } -} diff --git a/wms-module-system/src/main/java/top/wms/admin/yfApi/service/impl/YFPushServiceImpl.java b/wms-module-system/src/main/java/top/wms/admin/yfApi/service/impl/YFPushServiceImpl.java deleted file mode 100644 index f5f0837..0000000 --- a/wms-module-system/src/main/java/top/wms/admin/yfApi/service/impl/YFPushServiceImpl.java +++ /dev/null @@ -1,465 +0,0 @@ -package top.wms.admin.yfApi.service.impl; - -import cn.hutool.http.HttpUtil; -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONArray; -import com.alibaba.fastjson.JSONObject; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Service; -import top.wms.admin.yfApi.domain.Person; -import top.wms.admin.yfApi.domain.RuleBody; -import top.wms.admin.yfApi.service.IYFPushService; - -import java.util.*; - -/** - * 宇泛接口 - * - * @author zc - */ -@Service -@Slf4j -public class YFPushServiceImpl implements IYFPushService { - - @Override - public String personCreate(Person person, String ip, String pass) { - String url = "http://" + ip + ":8090/person/create"; - Map paramMap = new HashMap(); - person.setPhone(""); - JSONObject personObject = JSONObject.parseObject(JSON.toJSONString(person)); - paramMap.put("pass", pass); - paramMap.put("person", personObject); - return HttpUtil.createPost(url) - .header("Content-Type", "application/x-www-form-urlencoded") - .body(JSON.toJSONString(paramMap)) - .execute() - .body(); - } - - @Override - public String personDelete(String id, String ip, String pass) { - String url = "http://" + ip + ":8090/person/delete"; - Map paramMap = new HashMap(); - paramMap.put("pass", pass); - paramMap.put("id", id); - return HttpUtil.createPost(url) - .header("Content-Type", "application/x-www-form-urlencoded") - .body(JSON.toJSONString(paramMap)) - .execute() - .body(); - } - - @Override - public String personUpdate(Person person, String ip, String pass) { - String url = "http://" + ip + ":8090/person/update"; - Map paramMap = new HashMap(); - JSONObject personObject = JSONObject.parseObject(JSON.toJSONString(person)); - paramMap.put("pass", pass); - paramMap.put("person", personObject); - return HttpUtil.createPost(url) - .header("Content-Type", "application/x-www-form-urlencoded") - .body(JSON.toJSONString(paramMap)) - .execute() - .body(); - } - - @Override - public String personFind(String id, String ip, String pass) { - String url = "http://" + ip + ":8090/person/find?pass=" + pass + "&id=" + id; - return HttpUtil.createGet(url).execute().body(); - } - - @Override - public String icCardRegist(String id, String ip, String pass) { - String url = "http://" + ip + ":8090/face/icCardRegist"; - Map paramMap = new HashMap(); - paramMap.put("pass", pass); - paramMap.put("personId", id); - return HttpUtil.createPost(url) - .header("Content-Type", "application/x-www-form-urlencoded") - .body(JSON.toJSONString(paramMap)) - .execute() - .body(); - } - - @Override - public String createPasstime(JSONObject object, String ip, String pass) { - /* {"personId":"9eecc839cd7941c5a4d3165202dd3c32","passtime":"09:00:00,10: - 00:00,17:00:00,17:30:00,18:30:00,20:25:00"}*/ - String url = "http://" + ip + ":8090/person/createPasstime"; - Map paramMap = new HashMap(); - paramMap.put("pass", pass); - paramMap.put("passtime", object); - return HttpUtil.createPost(url) - .header("Content-Type", "application/x-www-form-urlencoded") - .body(JSON.toJSONString(paramMap)) - .execute() - .body(); - } - - @Override - public String passtime(JSONObject object, String ip, String pass) { - /* {"personId":"9eecc839cd7941c5a4d3165202dd3c32","passtime":"09:00:00,10: - 00:00,17:00:00,17:30:00,18:30:00,20:25:00"}*/ - String url = "http://" + ip + ":8090/person/passtime"; - Map paramMap = new HashMap(); - paramMap.put("pass", pass); - paramMap.put("passtime", object.get("passtime")); - paramMap.put("personId", object.get("personId")); - return HttpUtil.createPost(url) - .header("Content-Type", "application/x-www-form-urlencoded") - .body(JSON.toJSONString(paramMap)) - .execute() - .body(); - } - - @Override - public String deletePasstime(String id, String ip, String pass) { - String url = "http://" + ip + ":8090/person/deletePasstime"; - Map paramMap = new HashMap(); - paramMap.put("pass", pass); - paramMap.put("personId", id); - return HttpUtil.createPost(url) - .header("Content-Type", "application/x-www-form-urlencoded") - .body(JSON.toJSONString(paramMap)) - .execute() - .body(); - } - - @Override - public String permissionsCreate(String id, String time, String ip, String pass) { - String url = "http://" + ip + ":8090/person/permissionsCreate"; - Map paramMap = new HashMap(); - paramMap.put("pass", pass); - paramMap.put("time", time); - paramMap.put("personId", id); - return HttpUtil.createPost(url) - .header("Content-Type", "application/x-www-form-urlencoded") - .body(JSON.toJSONString(paramMap)) - .execute() - .body(); - } - - @Override - public String permissionTime(String id, String startTime, String endTime, String ip, String pass) { - String url = "http://" + ip + ":8090/person/permissionTime"; - Map paramMap = new HashMap(); - paramMap.put("pass", pass); - paramMap.put("personId", id); - paramMap.put("startTime", startTime); - paramMap.put("endTime", endTime); - return HttpUtil.createPost(url) - .header("Content-Type", "application/x-www-form-urlencoded") - .body(JSON.toJSONString(paramMap)) - .execute() - .body(); - } - - @Override - public String permissionsDelete(String id, String ip, String pass) { - String url = "http://" + ip + ":8090/person/permissionsCreate"; - Map paramMap = new HashMap(); - paramMap.put("pass", pass); - paramMap.put("personId", id); - return HttpUtil.createPost(url) - .header("Content-Type", "application/x-www-form-urlencoded") - .body(JSON.toJSONString(paramMap)) - .execute() - .body(); - } - - @Override - public String imageCreate64(String id, String imgBase64, String ip, String pass) { - String url = "http://" + ip + ":8090/face/create"; - Map paramMap = new HashMap(); - paramMap.put("pass", pass); - paramMap.put("personId", id); - paramMap.put("faceId", id);//可不传,设为空 - paramMap.put("imgBase64", imgBase64); - return HttpUtil.createPost(url) - .header("Content-Type", "application/x-www-form-urlencoded") - .body(JSON.toJSONString(paramMap)) - .execute() - .body(); - } - - @Override - public String imageCreateUrl(String id, String imgUrl, String ip, String pass) { - String url = "http://" + ip + ":8090/face/createByUrl"; - Map paramMap = new HashMap(); - paramMap.put("pass", pass); - paramMap.put("personId", id); - paramMap.put("faceId", "");//可不传,设为空 - //照地址替换 - if (imgUrl.contains("http://tdmj.kmlygroup.com")) { - imgUrl = imgUrl.replace("http://tdmj.kmlygroup.com", "http://192.168.1.35"); - } - if (imgUrl.contains("https://mj.kmlygroup.com/")) { - imgUrl = imgUrl.replace("https://mj.kmlygroup.com/", "http://192.168.255.51:9000/"); - } - paramMap.put("imgUrl", imgUrl); - return HttpUtil.createPost(url) - .header("Content-Type", "application/x-www-form-urlencoded") - .body(JSON.toJSONString(paramMap)) - .execute() - .body(); - } - - @Override - public String imageCreateUrl(String id, String faceId, String imgUrl, String ip, String pass) { - String url = "http://" + ip + ":8090/face/createByUrl"; - Map paramMap = new HashMap(); - paramMap.put("pass", pass); - paramMap.put("personId", id); - paramMap.put("faceId", faceId);//可不传,设为空 - //照地址替换 - if (imgUrl.contains("http://tdmj.kmlygroup.com")) { - imgUrl = imgUrl.replace("http://tdmj.kmlygroup.com", "http://192.168.251.16"); - } - if (imgUrl.contains("https://mj.kmlygroup.com/")) { - imgUrl = imgUrl.replace("https://mj.kmlygroup.com/", "http://192.168.255.51:9000/"); - } - paramMap.put("imgUrl", imgUrl); - return HttpUtil.createPost(url) - .header("Content-Type", "application/x-www-form-urlencoded") - .body(JSON.toJSONString(paramMap)) - .execute() - .body(); - } - - @Override - public String imageDeletel(String faceId, String ip, String pass) { - String url = "http://" + ip + ":8090/face/delete"; - Map paramMap = new HashMap(); - paramMap.put("pass", pass); - paramMap.put("faceId", faceId);//可不传,设为空 - return HttpUtil.createPost(url) - .header("Content-Type", "application/x-www-form-urlencoded") - .body(JSON.toJSONString(paramMap)) - .execute() - .body(); - } - - @Override - public String imageUpdate64(String id, String faceId, String imgBase64, String ip, String pass) { - String url = "http://" + ip + ":8090/face/update"; - Map paramMap = new HashMap(); - paramMap.put("pass", pass); - paramMap.put("personId", id); - paramMap.put("faceId", faceId); - paramMap.put("imgBase64", imgBase64); - return HttpUtil.createPost(url) - .header("Content-Type", "application/x-www-form-urlencoded") - .body(JSON.toJSONString(paramMap)) - .execute() - .body(); - } - - @Override - public String takeImg(String id, String ip, String pass) { - String url = "http://" + ip + ":8090/face/takeImg"; - Map paramMap = new HashMap(); - paramMap.put("pass", pass); - paramMap.put("personId", id); - return HttpUtil.createPost(url) - .header("Content-Type", "application/x-www-form-urlencoded") - .body(JSON.toJSONString(paramMap)) - .execute() - .body(); - } - - @Override - public String deletePerson(String id, String ip, String pass) { - String url = "http://" + ip + ":8090/face/deletePerson"; - Map paramMap = new HashMap(); - paramMap.put("pass", pass); - paramMap.put("personId", id); - return HttpUtil.createPost(url) - .header("Content-Type", "application/x-www-form-urlencoded") - .body(JSON.toJSONString(paramMap)) - .execute() - .body(); - } - - @Override - public String setIdentifyCallBack(String callbackUrl, String ip, String pass) { - String url = "http://" + ip + ":8090/setIdentifyCallBack"; - Map paramMap = new HashMap(); - paramMap.put("pass", pass); - paramMap.put("callbackUrl", callbackUrl); - return HttpUtil.createPost(url) - .header("Content-Type", "application/x-www-form-urlencoded") - .body(JSON.toJSONString(paramMap)) - .execute() - .body(); - } - - @Override - public String openDoorControl(String ip, String pass, Integer type, String content) { - String url = "http://" + ip + ":8090/device/openDoorControl"; - Map paramMap = new HashMap(); - paramMap.put("pass", pass); - paramMap.put("type", type); - paramMap.put("content", content); - return HttpUtil.createPost(url) - .header("Content-Type", "application/x-www-form-urlencoded") - .body(JSON.toJSONString(paramMap)) - .execute() - .body(); - } - - @Override - public String restartDevice(String ip, String pass) { - String url = "http://" + ip + ":8090/restartDevice"; - Map paramMap = new HashMap(); - paramMap.put("pass", pass); - return HttpUtil.createPost(url) - .header("Content-Type", "application/x-www-form-urlencoded") - .body(JSON.toJSONString(paramMap)) - .execute() - .body(); - } - - @Override - public String resetDevice(String ip, String pass) { - String url = "http://" + ip + ":8090/device/reset"; - Map paramMap = new HashMap(); - paramMap.put("pass", pass); - return HttpUtil.createPost(url) - .header("Content-Type", "application/x-www-form-urlencoded") - .body(JSON.toJSONString(paramMap)) - .execute() - .body(); - } - - @Override - public String setQRCodeCallback(String callbackUrl, String ip, String pass) { - String url = "http://" + ip + ":8090/setQRCodeCallback"; - Map paramMap = new HashMap(); - paramMap.put("pass", pass); - paramMap.put("url", callbackUrl + "Ewm"); - return HttpUtil.createPost(url) - .header("Content-Type", "application/x-www-form-urlencoded") - .body(JSON.toJSONString(paramMap)) - .execute() - .body(); - } - - @Override - public String setDeviceHeartBeat(String callbackUrl, String ip, String pass) { - String url = "http://" + ip + ":8090/setDeviceHeartBeat"; - Map paramMap = new HashMap(); - paramMap.put("pass", pass); - paramMap.put("url", callbackUrl + "Heart"); - return HttpUtil.createPost(url) - .header("Content-Type", "application/x-www-form-urlencoded") - .body(JSON.toJSONString(paramMap)) - .execute() - .body(); - } - - @Override - public String fingerRegist(String id, String ip, String pass) { - String url = "http://" + ip + ":8090/face/fingerRegist"; - Map paramMap = new HashMap<>(); - paramMap.put("pass", pass); - paramMap.put("personId", id); - return HttpUtil.createPost(url) - .header("Content-Type", "application/x-www-form-urlencoded") - .body(JSON.toJSONString(paramMap)) - .execute() - .body(); - } - - @Override - public String featureInfo(String id, String ip, String pass) { - String url = "http://" + ip + ":8090/person/featureInfo?pass=" + pass + "&personId=" + id + "&type=" + 2; - return HttpUtil.createGet(url).execute().body(); - } - - @Override - public String faceFind(String id, String ip, String pass) { - String url = "http://" + ip + ":8090/face/find"; - Map paramMap = new HashMap(); - paramMap.put("pass", pass); - paramMap.put("personId", id); - return HttpUtil.createPost(url) - .header("Content-Type", "application/x-www-form-urlencoded") - .body(JSON.toJSONString(paramMap)) - .execute() - .body(); - } - - @Override - public String featureReg(String id, String fingerprint, String ip, String pass) { - String url = "http://" + ip + ":8090/face/featureReg"; - Map paramMap = new HashMap(); - paramMap.put("pass", pass); - paramMap.put("personId", id); - paramMap.put("faceId", ""); - paramMap.put("feature", fingerprint); - paramMap.put("type", 2); - return HttpUtil.createPost(url) - .header("Content-Type", "application/x-www-form-urlencoded") - .body(JSON.toJSONString(paramMap)) - .execute() - .body(); - } - - @Override - public String ruleCreate(RuleBody rule, String ip) { - String url = "http://" + ip + ":8090/rule/create"; - Map paramMap = new HashMap(); - JSONObject personObject = JSONObject.parseObject(JSON.toJSONString(rule.getContent())); - paramMap.put("type", rule.getType()); - paramMap.put("pass", rule.getPass()); - paramMap.put("ruleId", rule.getRuleId()); - paramMap.put("name", rule.getRuleName()); - paramMap.put("content", personObject); - String response = HttpUtil.createPost(url) - .header("Content-Type", "application/x-www-form-urlencoded") - .body(JSON.toJSONString(paramMap)) - .execute() - .body(); - log.info("规则创建结果:{}", response); - return response; - } - - @Override - public String ruleDelete(String ruleId, String ip, String pass, int isDeleteAll) { - String url = "http://" + ip + ":8090/rule/delete"; - Map paramMap = new HashMap(); - JSONArray jsonArray = new JSONArray(); - jsonArray.add(ruleId); - paramMap.put("pass", pass); - paramMap.put("isDeleteAll", isDeleteAll); - paramMap.put("ruleId", jsonArray); - String response = HttpUtil.createPost(url) - .header("Content-Type", "application/x-www-form-urlencoded") - .body(JSON.toJSONString(paramMap)) - .execute() - .body(); - log.info("规则删除结果{}", response); - return response; - } - - @Override - public String ruleUpdate(RuleBody rule, String ip) { - String url = "http://" + ip + ":8090/rule/update"; - Map paramMap = new HashMap(); - JSONObject personObject = JSONObject.parseObject(JSON.toJSONString(rule.getContent())); - paramMap.put("type", rule.getType()); - paramMap.put("pass", rule.getPass()); - paramMap.put("ruleId", rule.getRuleId()); - paramMap.put("name", rule.getRuleName()); - paramMap.put("content", personObject); - String response = HttpUtil.createPost(url) - .header("Content-Type", "application/x-www-form-urlencoded") - .body(JSON.toJSONString(paramMap)) - .execute() - .body(); - log.info("规则修改结果" + response); - return response; - } - -} diff --git a/wms-module-system/src/main/resources/mapper/BranchMapper.xml b/wms-module-system/src/main/resources/mapper/BranchMapper.xml deleted file mode 100644 index 9cab3a9..0000000 --- a/wms-module-system/src/main/resources/mapper/BranchMapper.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/wms-module-system/src/main/resources/mapper/BranchRuleMapper.xml b/wms-module-system/src/main/resources/mapper/BranchRuleMapper.xml deleted file mode 100644 index 9fd760a..0000000 --- a/wms-module-system/src/main/resources/mapper/BranchRuleMapper.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/wms-module-system/src/main/resources/mapper/DownRecordMapper.xml b/wms-module-system/src/main/resources/mapper/DownRecordMapper.xml deleted file mode 100644 index 41e3932..0000000 --- a/wms-module-system/src/main/resources/mapper/DownRecordMapper.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/wms-module-system/src/main/resources/mapper/EmpowerRecordMapper.xml b/wms-module-system/src/main/resources/mapper/EmpowerRecordMapper.xml deleted file mode 100644 index c17f5d9..0000000 --- a/wms-module-system/src/main/resources/mapper/EmpowerRecordMapper.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/wms-module-system/src/main/resources/mapper/GroupMapper.xml b/wms-module-system/src/main/resources/mapper/GroupMapper.xml deleted file mode 100644 index f25b07e..0000000 --- a/wms-module-system/src/main/resources/mapper/GroupMapper.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/wms-module-system/src/main/resources/mapper/PeopleDownMapper.xml b/wms-module-system/src/main/resources/mapper/PeopleDownMapper.xml deleted file mode 100644 index ef8ffd7..0000000 --- a/wms-module-system/src/main/resources/mapper/PeopleDownMapper.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - INSERT INTO equipment_down_record ( - people_id, - equipment_id, - rule_id, - down_time, - down_result, - create_user, - create_time, - msg, - oper_type - ) VALUES ( - #{peopleId}, - #{equipmentId}, - #{ruleId}, - #{downTime}, - #{downResult}, - #{createUser}, - #{createTime}, - #{msg}, - #{operType} - ) - ON DUPLICATE KEY UPDATE - down_time = values(down_time), - down_result = values(down_result), - create_user = values(create_user), - create_time = NOW(), - msg = values(msg), - oper_type = values(oper_type) - - - - - - - diff --git a/wms-module-system/src/main/resources/mapper/PeopleEquipmentMapper.xml b/wms-module-system/src/main/resources/mapper/PeopleEquipmentMapper.xml deleted file mode 100644 index 5722e05..0000000 --- a/wms-module-system/src/main/resources/mapper/PeopleEquipmentMapper.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/wms-module-system/src/main/resources/mapper/PeopleMapper.xml b/wms-module-system/src/main/resources/mapper/PeopleMapper.xml deleted file mode 100644 index 55966d8..0000000 --- a/wms-module-system/src/main/resources/mapper/PeopleMapper.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - diff --git a/wms-module-system/src/main/resources/mapper/PeopleRecordMapper.xml b/wms-module-system/src/main/resources/mapper/PeopleRecordMapper.xml deleted file mode 100644 index 864e9dc..0000000 --- a/wms-module-system/src/main/resources/mapper/PeopleRecordMapper.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/wms-module-system/src/main/resources/mapper/PointMapper.xml b/wms-module-system/src/main/resources/mapper/PointMapper.xml deleted file mode 100644 index 35aac55..0000000 --- a/wms-module-system/src/main/resources/mapper/PointMapper.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - SELECT - t1.id, - t1.name, - t1.space_id, - t1.remark, - t1.create_user, - t1.create_time, - t1.update_user, - t1.update_time, - t1.sort, - t2.name as spaceName - FROM sys_point t1 - LEFT JOIN sys_space AS t2 ON t2.id = t1.space_id - - - - - \ No newline at end of file diff --git a/wms-module-system/src/main/resources/mapper/ProductMapper.xml b/wms-module-system/src/main/resources/mapper/ProductMapper.xml deleted file mode 100644 index 50cafc6..0000000 --- a/wms-module-system/src/main/resources/mapper/ProductMapper.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/wms-module-system/src/main/resources/mapper/RechargeRecordMapper.xml b/wms-module-system/src/main/resources/mapper/RechargeRecordMapper.xml deleted file mode 100644 index 75fdd07..0000000 --- a/wms-module-system/src/main/resources/mapper/RechargeRecordMapper.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/wms-module-system/src/main/resources/mapper/RecordMapper.xml b/wms-module-system/src/main/resources/mapper/RecordMapper.xml deleted file mode 100644 index eeb371e..0000000 --- a/wms-module-system/src/main/resources/mapper/RecordMapper.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/wms-module-system/src/main/resources/mapper/ReportMapper.xml b/wms-module-system/src/main/resources/mapper/ReportMapper.xml deleted file mode 100644 index 1b203e9..0000000 --- a/wms-module-system/src/main/resources/mapper/ReportMapper.xml +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/wms-module-system/src/main/resources/mapper/RuleMapper.xml b/wms-module-system/src/main/resources/mapper/RuleMapper.xml deleted file mode 100644 index 92ead05..0000000 --- a/wms-module-system/src/main/resources/mapper/RuleMapper.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - select sr.id, sr.name, sr.start_time, sr.end_time, sr.admittance_start, sr.admittance_end, sr.space_id, sr.point_id, - sr.remark, sr.create_user, sr.create_time, sr.update_user, sr.update_time, sr.type, sr.permission - from sys_rule sr - - - - - - - - diff --git a/wms-module-system/src/main/resources/mapper/SpaceMapper.xml b/wms-module-system/src/main/resources/mapper/SpaceMapper.xml deleted file mode 100644 index ecf31b7..0000000 --- a/wms-module-system/src/main/resources/mapper/SpaceMapper.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/wms-module-system/src/main/resources/mapper/TenantMapper.xml b/wms-module-system/src/main/resources/mapper/TenantMapper.xml deleted file mode 100644 index 2109b35..0000000 --- a/wms-module-system/src/main/resources/mapper/TenantMapper.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/wms-module-system/src/main/resources/mapper/TimeIntervalMapper.xml b/wms-module-system/src/main/resources/mapper/TimeIntervalMapper.xml deleted file mode 100644 index f83e04e..0000000 --- a/wms-module-system/src/main/resources/mapper/TimeIntervalMapper.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/wms-webapi/src/main/java/top/wms/admin/controller/common/CommonController.java b/wms-webapi/src/main/java/top/wms/admin/controller/common/CommonController.java index 492a521..a3847f9 100644 --- a/wms-webapi/src/main/java/top/wms/admin/controller/common/CommonController.java +++ b/wms-webapi/src/main/java/top/wms/admin/controller/common/CommonController.java @@ -18,12 +18,6 @@ import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; import top.wms.admin.common.constant.CacheConstants; import top.wms.admin.common.util.PictureUtils; -import top.wms.admin.peopleBranch.model.query.BranchQuery; -import top.wms.admin.peopleBranch.service.BranchService; -import top.wms.admin.space.model.query.PointQuery; -import top.wms.admin.space.model.query.SpaceQuery; -import top.wms.admin.space.service.PointService; -import top.wms.admin.space.service.SpaceService; import top.wms.admin.system.enums.OptionCategoryEnum; import top.wms.admin.system.model.query.*; import top.wms.admin.system.model.resp.file.FileUploadResp; @@ -57,11 +51,8 @@ public class CommonController { private final MenuService menuService; private final UserService userService; private final RoleService roleService; - private final BranchService branchService; private final DictItemService dictItemService; private final OptionService optionService; - private final SpaceService spaceService; - private final PointService pointService; @Operation(summary = "上传文件", description = "上传文件") @PostMapping("/file") @@ -129,24 +120,6 @@ public class CommonController { return deptService.tree(query, sortQuery, true); } - @Operation(summary = "查询部门树", description = "查询树结构的部门列表") - @GetMapping("/tree/branch") - public List> listBranchTree(BranchQuery query) { - return branchService.tree(query); - } - - @Operation(summary = "查询空间树", description = "查询树结构的空间列表") - @GetMapping("/tree/space") - public List> listSpaceTree(SpaceQuery query, SortQuery sortQuery) { - return spaceService.tree(query, sortQuery, true); - } - - @Operation(summary = "查询空间点位树", description = "查询树结构的菜单列表") - @GetMapping("/tree/point") - public List> listPointTree(PointQuery query) { - return pointService.tree(query); - } - @Operation(summary = "查询菜单树", description = "查询树结构的菜单列表") @GetMapping("/tree/menu") public List> listMenuTree(MenuQuery query, SortQuery sortQuery) { diff --git a/wms-webapi/src/main/java/top/wms/admin/controller/consume/DownRecordController.java b/wms-webapi/src/main/java/top/wms/admin/controller/consume/DownRecordController.java deleted file mode 100644 index c727c24..0000000 --- a/wms-webapi/src/main/java/top/wms/admin/controller/consume/DownRecordController.java +++ /dev/null @@ -1,40 +0,0 @@ -package top.wms.admin.controller.consume; - -import cn.dev33.satoken.annotation.SaCheckPermission; -import io.swagger.v3.oas.annotations.Operation; -import top.continew.starter.extension.crud.enums.Api; - -import io.swagger.v3.oas.annotations.tags.Tag; - -import org.springframework.web.bind.annotation.*; - -import lombok.RequiredArgsConstructor; -import top.continew.starter.extension.crud.annotation.CrudRequestMapping; -import top.continew.starter.web.model.R; -import top.wms.admin.common.controller.BaseController; -import top.wms.admin.consume.model.query.DownRecordQuery; -import top.wms.admin.consume.model.req.DownRecordReq; -import top.wms.admin.consume.model.resp.DownRecordResp; -import top.wms.admin.consume.service.DownRecordService; - -/** - * 消费下发记录管理 API - * - * @author zc - * @since 2026/02/25 11:01 - */ -@Tag(name = "消费下发记录管理 API") -@RestController -@RequiredArgsConstructor -@CrudRequestMapping(value = "/consume/downRecord", api = {Api.PAGE, Api.EXPORT}) -public class DownRecordController extends BaseController { - - @Operation(summary = "下发", description = "下发") - @SaCheckPermission("consume:downRecord:down") - @PatchMapping("/down/{equipmentId}/{peopleId}") - public R down(@PathVariable Long equipmentId, @PathVariable Long peopleId) { - baseService.down(equipmentId, peopleId); - return R.ok(); - } - -} \ No newline at end of file diff --git a/wms-webapi/src/main/java/top/wms/admin/controller/consume/GroupController.java b/wms-webapi/src/main/java/top/wms/admin/controller/consume/GroupController.java deleted file mode 100644 index 1c17531..0000000 --- a/wms-webapi/src/main/java/top/wms/admin/controller/consume/GroupController.java +++ /dev/null @@ -1,26 +0,0 @@ -package top.wms.admin.controller.consume; - -import io.swagger.v3.oas.annotations.tags.Tag; -import lombok.RequiredArgsConstructor; -import org.springframework.web.bind.annotation.RestController; -import top.continew.starter.extension.crud.annotation.CrudRequestMapping; -import top.continew.starter.extension.crud.enums.Api; -import top.wms.admin.common.controller.BaseController; -import top.wms.admin.consume.model.query.GroupQuery; -import top.wms.admin.consume.model.req.GroupReq; -import top.wms.admin.consume.model.resp.GroupResp; -import top.wms.admin.consume.service.GroupService; - -/** - * 消费组管理 API - * - * @author zc - * @since 2026/01/27 13:48 - */ -@Tag(name = "消费批量充值 API") -@RestController -@RequiredArgsConstructor -@CrudRequestMapping(value = "/consume/group", api = {Api.PAGE, Api.DETAIL, Api.ADD, Api.UPDATE, Api.DELETE, Api.EXPORT}) -public class GroupController extends BaseController { - -} \ No newline at end of file diff --git a/wms-webapi/src/main/java/top/wms/admin/controller/consume/RechargeRecordController.java b/wms-webapi/src/main/java/top/wms/admin/controller/consume/RechargeRecordController.java deleted file mode 100644 index 313ac4c..0000000 --- a/wms-webapi/src/main/java/top/wms/admin/controller/consume/RechargeRecordController.java +++ /dev/null @@ -1,26 +0,0 @@ -package top.wms.admin.controller.consume; - -import top.continew.starter.extension.crud.enums.Api; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.springframework.web.bind.annotation.*; -import lombok.RequiredArgsConstructor; -import top.continew.starter.extension.crud.annotation.CrudRequestMapping; -import top.wms.admin.common.controller.BaseController; -import top.wms.admin.consume.model.query.RechargeRecordQuery; -import top.wms.admin.consume.model.req.RechargeRecordReq; -import top.wms.admin.consume.model.resp.RechargeRecordResp; -import top.wms.admin.consume.service.RechargeRecordService; - -/** - * 充值记录管理 API - * - * @author zc - * @since 2026/01/29 16:11 - */ -@Tag(name = "充值记录管理 API") -@RestController -@RequiredArgsConstructor -@CrudRequestMapping(value = "/admin/rechargeRecord", api = {Api.PAGE, Api.DELETE, Api.EXPORT}) -public class RechargeRecordController extends BaseController { - -} \ No newline at end of file diff --git a/wms-webapi/src/main/java/top/wms/admin/controller/consume/RecordController.java b/wms-webapi/src/main/java/top/wms/admin/controller/consume/RecordController.java deleted file mode 100644 index 2a26d1e..0000000 --- a/wms-webapi/src/main/java/top/wms/admin/controller/consume/RecordController.java +++ /dev/null @@ -1,29 +0,0 @@ -package top.wms.admin.controller.consume; - -import top.continew.starter.extension.crud.enums.Api; - -import io.swagger.v3.oas.annotations.tags.Tag; - -import org.springframework.web.bind.annotation.*; - -import lombok.RequiredArgsConstructor; -import top.continew.starter.extension.crud.annotation.CrudRequestMapping; -import top.wms.admin.common.controller.BaseController; -import top.wms.admin.consume.model.query.RecordQuery; -import top.wms.admin.consume.model.req.RecordReq; -import top.wms.admin.consume.model.resp.RecordResp; -import top.wms.admin.consume.service.RecordService; - -/** - * 消费记录管理 API - * - * @author zc - * @since 2026/01/21 17:53 - */ -@Tag(name = "消费记录管理 API") -@RestController -@RequiredArgsConstructor -@CrudRequestMapping(value = "/consume/record", api = {Api.PAGE, Api.DETAIL, Api.DELETE, Api.EXPORT}) -public class RecordController extends BaseController { - -} \ No newline at end of file diff --git a/wms-webapi/src/main/java/top/wms/admin/controller/consume/ReportController.java b/wms-webapi/src/main/java/top/wms/admin/controller/consume/ReportController.java deleted file mode 100644 index efbb6a7..0000000 --- a/wms-webapi/src/main/java/top/wms/admin/controller/consume/ReportController.java +++ /dev/null @@ -1,73 +0,0 @@ -package top.wms.admin.controller.consume; - -import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.servlet.http.HttpServletResponse; -import lombok.RequiredArgsConstructor; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; -import top.continew.starter.extension.crud.model.query.PageQuery; -import top.continew.starter.extension.crud.model.resp.PageResp; -import top.continew.starter.web.model.R; -import top.wms.admin.consume.model.query.ReportQuery; -import top.wms.admin.consume.model.resp.report.BranchReport; -import top.wms.admin.consume.model.resp.report.MealReport; -import top.wms.admin.consume.model.resp.report.MerchantReport; -import top.wms.admin.consume.model.resp.report.PeopleReport; -import top.wms.admin.consume.service.ReportService; - -import java.util.List; - -@Tag(name = "报表管理 API") -@RestController -@RequiredArgsConstructor -@RequestMapping("/consume/report") -public class ReportController { - - private final ReportService reportService; - - @GetMapping("/merchant") - public R> queryMerchantReport(ReportQuery query) { - List list = reportService.queryMerchantReport(query); - return R.ok(list); - } - - @GetMapping("/meal") - public R> queryMealReport(ReportQuery query) { - List list = reportService.queryMealReport(query); - return R.ok(list); - } - - @GetMapping("/branch") - public R> queryBranchReport(ReportQuery query) { - List list = reportService.queryBranchReport(query); - return R.ok(list); - } - - @GetMapping("/people") - public PageResp queryPeopleReport(ReportQuery query, @Validated PageQuery pageQuery) { - return reportService.page(query, pageQuery); - } - - @GetMapping("/exportMerchant") - public void exportMerchant(ReportQuery query, HttpServletResponse response) { - reportService.exportMerchant(query, response); - } - - @GetMapping("/exportMeal") - public void exportMeal(ReportQuery query, HttpServletResponse response) { - reportService.exportMeal(query, response); - } - - @GetMapping("/exportBranch") - public void exportBranch(ReportQuery query, HttpServletResponse response) { - reportService.exportBranch(query, response); - } - - @GetMapping("/exportPeople") - public void exportPeople(ReportQuery query, HttpServletResponse response) { - reportService.exportPeople(query, response); - } - -} diff --git a/wms-webapi/src/main/java/top/wms/admin/controller/consume/TenantController.java b/wms-webapi/src/main/java/top/wms/admin/controller/consume/TenantController.java deleted file mode 100644 index b9e0685..0000000 --- a/wms-webapi/src/main/java/top/wms/admin/controller/consume/TenantController.java +++ /dev/null @@ -1,30 +0,0 @@ -package top.wms.admin.controller.consume; - -import top.continew.starter.extension.crud.enums.Api; - -import io.swagger.v3.oas.annotations.tags.Tag; - -import org.springframework.web.bind.annotation.*; - -import lombok.RequiredArgsConstructor; -import top.continew.starter.extension.crud.annotation.CrudRequestMapping; -import top.wms.admin.common.controller.BaseController; -import top.wms.admin.consume.model.query.TenantQuery; -import top.wms.admin.consume.model.req.TenantReq; -import top.wms.admin.consume.model.resp.TenantResp; -import top.wms.admin.consume.service.TenantService; - -/** - * 商户信息管理 API - * - * @author zc - * @since 2026/01/30 14:55 - */ -@Tag(name = "商户信息管理 API") -@RestController -@RequiredArgsConstructor -@CrudRequestMapping(value = "/consume/tenant", api = {Api.PAGE, Api.DETAIL, Api.ADD, Api.UPDATE, Api.DELETE, - Api.EXPORT}) -public class TenantController extends BaseController { - -} \ No newline at end of file diff --git a/wms-webapi/src/main/java/top/wms/admin/controller/consume/TimeIntervalController.java b/wms-webapi/src/main/java/top/wms/admin/controller/consume/TimeIntervalController.java deleted file mode 100644 index ca9cf87..0000000 --- a/wms-webapi/src/main/java/top/wms/admin/controller/consume/TimeIntervalController.java +++ /dev/null @@ -1,30 +0,0 @@ -package top.wms.admin.controller.consume; - -import top.continew.starter.extension.crud.enums.Api; - -import io.swagger.v3.oas.annotations.tags.Tag; - -import org.springframework.web.bind.annotation.*; - -import lombok.RequiredArgsConstructor; -import top.continew.starter.extension.crud.annotation.CrudRequestMapping; -import top.wms.admin.common.controller.BaseController; -import top.wms.admin.consume.model.query.TimeIntervalQuery; -import top.wms.admin.consume.model.req.TimeIntervalReq; -import top.wms.admin.consume.model.resp.TimeIntervalResp; -import top.wms.admin.consume.service.TimeIntervalService; - -/** - * 消费时段管理 API - * - * @author zc - * @since 2026/01/30 14:56 - */ -@Tag(name = "消费时段管理 API") -@RestController -@RequiredArgsConstructor -@CrudRequestMapping(value = "/consume/timeInterval", api = {Api.PAGE, Api.DETAIL, Api.ADD, Api.UPDATE, Api.DELETE, - Api.EXPORT}) -public class TimeIntervalController extends BaseController { - -} \ No newline at end of file diff --git a/wms-webapi/src/main/java/top/wms/admin/controller/equipment/EquipmentController.java b/wms-webapi/src/main/java/top/wms/admin/controller/equipment/EquipmentController.java deleted file mode 100644 index 207a16c..0000000 --- a/wms-webapi/src/main/java/top/wms/admin/controller/equipment/EquipmentController.java +++ /dev/null @@ -1,35 +0,0 @@ -package top.wms.admin.controller.equipment; - -import lombok.RequiredArgsConstructor; -import top.continew.starter.extension.crud.enums.Api; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.springframework.web.bind.annotation.*; -import top.continew.starter.extension.crud.annotation.CrudRequestMapping; -import top.continew.starter.extension.crud.model.resp.LabelValueResp; -import top.wms.admin.common.controller.BaseController; -import top.wms.admin.equipment.model.query.EquipmentQuery; -import top.wms.admin.equipment.model.req.EquipmentReq; -import top.wms.admin.equipment.model.resp.EquipmentDetailResp; -import top.wms.admin.equipment.model.resp.EquipmentResp; -import top.wms.admin.equipment.service.EquipmentService; - -import java.util.List; - -/** - * 设备信息管理 API - * - * @author zc - * @since 2025/04/09 15:20 - */ -@Tag(name = "设备信息管理 API") -@RestController -@RequiredArgsConstructor -@CrudRequestMapping(value = "/system/equipment", api = {Api.PAGE, Api.DETAIL, Api.ADD, Api.UPDATE, Api.DELETE, - Api.EXPORT}) -public class EquipmentController extends BaseController { - - @GetMapping(value = "/getEquipmentNameList") - public List getEquipmentNameList(EquipmentReq equipmentReq) { - return baseService.getEquipmentNameList(equipmentReq); - } -} \ No newline at end of file diff --git a/wms-webapi/src/main/java/top/wms/admin/controller/equipment/PeopleEquipmentController.java b/wms-webapi/src/main/java/top/wms/admin/controller/equipment/PeopleEquipmentController.java deleted file mode 100644 index e38a006..0000000 --- a/wms-webapi/src/main/java/top/wms/admin/controller/equipment/PeopleEquipmentController.java +++ /dev/null @@ -1,26 +0,0 @@ -package top.wms.admin.controller.equipment; - -import top.continew.starter.extension.crud.enums.Api; - -import io.swagger.v3.oas.annotations.tags.Tag; - -import org.springframework.web.bind.annotation.*; - -import top.continew.starter.extension.crud.annotation.CrudRequestMapping; -import top.wms.admin.common.controller.BaseController; -import top.wms.admin.system.model.query.PeopleEquipmentQuery; -import top.wms.admin.system.model.req.PeopleEquipmentReq; -import top.wms.admin.system.model.resp.PeopleEquipmentResp; -import top.wms.admin.system.service.PeopleEquipmentService; - -/** - * 人员设备下发信息管理 API - * - * @author zc - * @since 2025/03/27 14:59 - */ -@Tag(name = "人员设备下发信息管理 API") -@RestController -@CrudRequestMapping(value = "/system/peopleEquipment", api = {Api.PAGE, Api.DETAIL, Api.ADD, Api.UPDATE, Api.DELETE, - Api.EXPORT}) -public class PeopleEquipmentController extends BaseController {} \ No newline at end of file diff --git a/wms-webapi/src/main/java/top/wms/admin/controller/equipment/ProductController.java b/wms-webapi/src/main/java/top/wms/admin/controller/equipment/ProductController.java deleted file mode 100644 index de8ea7a..0000000 --- a/wms-webapi/src/main/java/top/wms/admin/controller/equipment/ProductController.java +++ /dev/null @@ -1,37 +0,0 @@ -package top.wms.admin.controller.equipment; - -import io.swagger.v3.oas.annotations.tags.Tag; -import lombok.RequiredArgsConstructor; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; -import top.continew.starter.extension.crud.annotation.CrudRequestMapping; -import top.continew.starter.extension.crud.enums.Api; -import top.continew.starter.extension.crud.model.resp.LabelValueResp; -import top.wms.admin.common.controller.BaseController; -import top.wms.admin.equipment.model.query.ProductQuery; -import top.wms.admin.equipment.model.req.ProductReq; -import top.wms.admin.equipment.model.resp.ProductResp; -import top.wms.admin.equipment.service.ProductService; - -import java.util.List; - -/** - * 产品信息管理 API - * - * @author zc - * @since 2025/05/26 15:18 - */ -@Tag(name = "产品信息管理 API") -@RestController -@RequiredArgsConstructor -@CrudRequestMapping(value = "/equipment/product", api = {Api.PAGE, Api.DETAIL, Api.ADD, Api.UPDATE, Api.DELETE, - Api.EXPORT}) -public class ProductController extends BaseController { - - private final ProductService productService; - - @GetMapping(value = "/getProductNameList") - public List getProductNameList() { - return productService.getProductNameList(); - } -} \ No newline at end of file diff --git a/wms-webapi/src/main/java/top/wms/admin/controller/peopleBranch/BranchController.java b/wms-webapi/src/main/java/top/wms/admin/controller/peopleBranch/BranchController.java deleted file mode 100644 index f205726..0000000 --- a/wms-webapi/src/main/java/top/wms/admin/controller/peopleBranch/BranchController.java +++ /dev/null @@ -1,82 +0,0 @@ -package top.wms.admin.controller.peopleBranch; - -import cn.dev33.satoken.annotation.SaCheckPermission; -import cn.hutool.core.lang.tree.Tree; -import io.swagger.v3.oas.annotations.tags.Tag; -import lombok.RequiredArgsConstructor; -import org.springframework.web.bind.annotation.*; -import top.continew.starter.log.annotation.Log; -import top.wms.admin.peopleBranch.model.query.BranchQuery; -import top.wms.admin.peopleBranch.model.req.BranchReq; -import top.wms.admin.peopleBranch.model.resp.BranchResp; -import top.wms.admin.peopleBranch.service.BranchService; - -import java.util.List; - -/** - * 部门管理管理 API - * - * @author zc - * @since 2025/03/19 17:46 - */ -@Tag(name = "部门管理管理 API") -@RestController -@RequiredArgsConstructor -@RequestMapping("/sysPeople/branch") -public class BranchController { - - private final BranchService branchService; - - /** - * 查询部门树形结构 - * - * @param branchQuery - * @return - */ - @Log(ignore = true) - @SaCheckPermission("sysPeople:branch:tree") - @GetMapping("/tree") - public List> selectBranchTree(BranchQuery branchQuery) { - return branchService.selectBranchTree(branchQuery); - } - - /** - * 获取部门管理详细信息 - */ - @SaCheckPermission("sysPeople:branch:query") - @GetMapping(value = "/{id}") - public BranchResp getInfo(@PathVariable("id") String id) { - return branchService.selectBranchById(id); - } - - /** - * 新增部门管理 - */ - @SaCheckPermission("sysPeople:branch:add") - @Log(module = "新增部门") - @PostMapping - public String add(@RequestBody BranchReq branchReq) { - return branchService.insertBranch(branchReq); - } - - /** - * 修改部门管理 - */ - @SaCheckPermission("sysPeople:branch:edit") - @Log(module = "修改部门") - @PutMapping("/{id}") - public void edit(@PathVariable("id") String id, @RequestBody BranchReq branchReq) { - branchService.updateBranch(branchReq, id); - } - - /** - * 删除部门管理 - */ - @SaCheckPermission("sysPeople:branch:remove") - @Log(module = "删除部门") - @DeleteMapping("/{id}") - public void remove(@PathVariable("id") String id) { - branchService.deleteBranchById(id); - } - -} \ No newline at end of file diff --git a/wms-webapi/src/main/java/top/wms/admin/controller/peopleBranch/PeopleController.java b/wms-webapi/src/main/java/top/wms/admin/controller/peopleBranch/PeopleController.java deleted file mode 100644 index 2d985fa..0000000 --- a/wms-webapi/src/main/java/top/wms/admin/controller/peopleBranch/PeopleController.java +++ /dev/null @@ -1,194 +0,0 @@ -package top.wms.admin.controller.peopleBranch; - -import cn.dev33.satoken.annotation.SaCheckPermission; -import cn.hutool.core.util.StrUtil; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.servlet.http.HttpServletResponse; -import jakarta.validation.constraints.NotNull; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.http.MediaType; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.multipart.MultipartFile; -import top.continew.starter.core.validation.ValidationUtils; -import top.continew.starter.extension.crud.annotation.CrudRequestMapping; -import top.continew.starter.extension.crud.enums.Api; -import top.continew.starter.extension.crud.model.query.PageQuery; -import top.continew.starter.extension.crud.model.resp.LabelValueResp; -import top.continew.starter.extension.crud.model.resp.PageResp; -import top.continew.starter.log.annotation.Log; -import top.continew.starter.web.model.R; -import top.wms.admin.common.controller.BaseController; -import top.wms.admin.consume.model.req.PeopleDepositImportReq; -import top.wms.admin.consume.model.resp.PeopleDepositImportParseResp; -import top.wms.admin.peopleBranch.model.query.PeopleQuery; -import top.wms.admin.peopleBranch.model.req.PeopleImportReq; -import top.wms.admin.peopleBranch.model.req.PeopleReq; -import top.wms.admin.peopleBranch.model.resp.ConsumePeopleResp; -import top.wms.admin.peopleBranch.model.resp.PeopleImportParseResp; -import top.wms.admin.peopleBranch.model.resp.PeopleImportResp; -import top.wms.admin.peopleBranch.model.resp.PeopleResp; -import top.wms.admin.peopleBranch.service.PeopleService; -import top.wms.admin.system.model.resp.user.UserImportResp; -import top.wms.admin.system.service.ImportExcelService; - -import java.io.IOException; -import java.util.Arrays; -import java.util.List; - -/** - * 人员管理管理 API - * - * @author zc - * @since 2025/03/21 18:10 - */ -@Tag(name = "人员管理管理 API") -@RequiredArgsConstructor -@RestController -@Slf4j -@CrudRequestMapping(value = "/sysPeople/people", api = {Api.PAGE, Api.DETAIL, Api.ADD, Api.UPDATE, Api.EXPORT}) -public class PeopleController extends BaseController { - - private final ImportExcelService importExcelService; - - @GetMapping(value = "/getPeopleNameList") - public List getPeopleNameList(PeopleQuery peopleQuery) { - return baseService.getPeopleNameList(peopleQuery); - } - - @GetMapping("/down/{ids}") - public R down(@PathVariable Long[] ids) { - String failNames = baseService.down(ids); - if (StrUtil.isNotBlank(failNames)) { - return R.fail("500", "存在失败记录,人员名称:" + failNames); - } - return R.ok(); - } - - @DeleteMapping("/{ids}") - public R del(@PathVariable Long[] ids) { - String failNames = baseService.del(Arrays.asList(ids)); - if (StrUtil.isNotBlank(failNames)) { - return R.fail("500", "设备删除失败,人员名称:" + failNames); - } - return R.ok(); - } - - @Log(ignore = true) - @Operation(summary = "下载导入模板", description = "下载导入模板") - @SaCheckPermission("sysPeople:people:import") - @GetMapping(value = "/import/template", produces = MediaType.APPLICATION_OCTET_STREAM_VALUE) - public void downloadImportTemplate(HttpServletResponse response) throws IOException { - importExcelService.downloadImportTemplate(response, "people.xlsx", "人员导入模板.xlsx"); - } - - //导入相关 - @Log(ignore = true) - @Operation(summary = "解析导入数据", description = "解析导入数据") - @SaCheckPermission("sysPeople:people:import") - @PostMapping("/import/parse") - public PeopleImportParseResp parseImport(@NotNull(message = "文件不能为空") MultipartFile file) { - ValidationUtils.throwIf(file::isEmpty, "文件不能为空"); - return baseService.parseImport(file); - } - - @Log(ignore = true) - @Operation(summary = "导入数据", description = "导入数据") - @SaCheckPermission("sysPeople:people:import") - @PostMapping(value = "/import") - public PeopleImportResp importUser(@Validated @RequestBody PeopleImportReq req) { - return baseService.importPeople(req); - } - - //消费相关 - @Log(ignore = true) - @Operation(summary = "分页查询人员消费列表", description = "分页查询列表") - @GetMapping("/pageConsume") - @SaCheckPermission("consume:PeopleDeposit:refund") - public PageResp pageConsume(PeopleQuery query, @Validated PageQuery pageQuery) { - return baseService.pageConsume(query, pageQuery); - } - - @Log(ignore = true) - @Operation(summary = "导出人员充值列表", description = "导出人员充值列表") - @GetMapping("/exportConsume") - @SaCheckPermission("consume:PeopleDeposit:export") - public void exportConsume(PeopleQuery query, HttpServletResponse response) { - baseService.exportConsume(query, response); - } - - @Operation(summary = "补贴", description = "补贴") - @PostMapping("/subsidy") - @SaCheckPermission("consume:PeopleDeposit:subsidy") - public R subsidy(@RequestBody PeopleReq req) { - baseService.subsidy(req); - return R.ok(); - } - - @Operation(summary = "充值", description = "充值") - @PostMapping("/deposit") - @SaCheckPermission("consume:PeopleDeposit:deposit") - public R deposit(@RequestBody PeopleReq req) { - baseService.deposit(req); - return R.ok(); - } - - @Operation(summary = "退款", description = "退款") - @PostMapping("/refund") - @SaCheckPermission("consume:PeopleDeposit:refund") - public R refund(@RequestBody PeopleReq req) { - baseService.refund(req); - return R.ok(); - } - - @Operation(summary = "消费冻结", description = "消费冻结") - @PostMapping("/freeze") - @SaCheckPermission("consume:PeopleDeposit:freeze") - public R freeze(@RequestBody List ids) { - baseService.freeze(ids); - return R.ok(); - } - - @Operation(summary = "消费解冻", description = "消费解冻") - @PostMapping("/unFreeze") - @SaCheckPermission("consume:PeopleDeposit:unfreeze") - public R unFreeze(@RequestBody List ids) { - baseService.unFreeze(ids); - return R.ok(); - } - - @Operation(summary = "消费一键清零", description = "消费一键清零") - @PostMapping("/resetMoney") - @SaCheckPermission("consume:PeopleDeposit:import") - public R resetMoney(@RequestBody PeopleReq req) { - baseService.resetMoney(req); - return R.ok(); - } - - @Log(ignore = true) - @Operation(summary = "下载人员充值导入模板", description = "下载人员充值导入模板") - @SaCheckPermission("consume:PeopleDeposit:import") - @GetMapping(value = "/consume/import/template", produces = MediaType.APPLICATION_OCTET_STREAM_VALUE) - public void downloadConsumeImportTemplate(HttpServletResponse response) throws IOException { - baseService.downloadConsumeImportTemplate(response); - } - - @Log(ignore = true) - @Operation(summary = "解析人员充值导入数据", description = "解析人员充值导入数据") - @SaCheckPermission("consume:PeopleDeposit:import") - @PostMapping("/consume/import/parse") - public PeopleDepositImportParseResp parseConsumeImport(@NotNull(message = "文件不能为空") MultipartFile file) { - ValidationUtils.throwIf(file::isEmpty, "文件不能为空"); - return baseService.parseConsumeImport(file); - } - - @Operation(summary = "导入数据", description = "导入数据") - @SaCheckPermission("consume:PeopleDeposit:import") - @PostMapping(value = "/consume/import") - public UserImportResp importUser(@Validated @RequestBody PeopleDepositImportReq req) { - return baseService.importConsumePeople(req); - } - -} diff --git a/wms-webapi/src/main/java/top/wms/admin/controller/peopleDownRecord/PeopleDownController.java b/wms-webapi/src/main/java/top/wms/admin/controller/peopleDownRecord/PeopleDownController.java deleted file mode 100644 index ba61f84..0000000 --- a/wms-webapi/src/main/java/top/wms/admin/controller/peopleDownRecord/PeopleDownController.java +++ /dev/null @@ -1,38 +0,0 @@ -package top.wms.admin.controller.peopleDownRecord; - -import io.swagger.v3.oas.annotations.tags.Tag; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RestController; -import top.continew.starter.extension.crud.annotation.CrudRequestMapping; -import top.continew.starter.extension.crud.enums.Api; -import top.continew.starter.web.model.R; -import top.wms.admin.common.controller.BaseController; -import top.wms.admin.common.enums.OperTypeEnum; -import top.wms.admin.peopleDownRecord.model.query.PeopleDownQuery; -import top.wms.admin.peopleDownRecord.model.req.PeopleDownReq; -import top.wms.admin.peopleDownRecord.model.resp.PeopleDownResp; -import top.wms.admin.peopleDownRecord.service.PeopleDownService; -import top.wms.admin.yfApi.service.ISysYFService; - -@Tag(name = "下发管理 API") -@RequiredArgsConstructor -@RestController -@Slf4j -@CrudRequestMapping(value = "/sysDownRecord/record", api = {Api.PAGE, Api.DETAIL, Api.UPDATE, Api.DELETE, Api.EXPORT}) -public class PeopleDownController extends BaseController { - - private final ISysYFService sysYFService; - - @GetMapping("/down/{equipmentId}/{ruleId}/{peopleId}") - public R down(@PathVariable Long equipmentId, @PathVariable Long ruleId, @PathVariable Long peopleId) { - Boolean success = sysYFService.authDevice(peopleId, equipmentId, ruleId, OperTypeEnum.DOWN.getValue()); - if (!success) { - return R.fail("500", "下发设备失败"); - } - return R.ok(); - } - -} diff --git a/wms-webapi/src/main/java/top/wms/admin/controller/rule/EmpowerRecordController.java b/wms-webapi/src/main/java/top/wms/admin/controller/rule/EmpowerRecordController.java deleted file mode 100644 index 8f103e9..0000000 --- a/wms-webapi/src/main/java/top/wms/admin/controller/rule/EmpowerRecordController.java +++ /dev/null @@ -1,28 +0,0 @@ -package top.wms.admin.controller.rule; - -import top.continew.starter.extension.crud.enums.Api; - -import io.swagger.v3.oas.annotations.tags.Tag; - -import org.springframework.web.bind.annotation.*; - -import top.continew.starter.extension.crud.annotation.CrudRequestMapping; -import top.wms.admin.common.controller.BaseController; -import top.wms.admin.rule.model.query.EmpowerRecordQuery; -import top.wms.admin.rule.model.req.EmpowerRecordReq; -import top.wms.admin.rule.model.resp.EmpowerRecordResp; -import top.wms.admin.rule.service.EmpowerRecordService; - -/** - * 授权记录管理 API - * - * @author zc - * @since 2025/04/08 23:08 - */ -@Tag(name = "授权记录管理 API") -@RestController -@CrudRequestMapping(value = "/rule/empowerRecord", api = {Api.PAGE, Api.DETAIL, Api.ADD, Api.UPDATE, Api.DELETE, - Api.EXPORT}) -public class EmpowerRecordController extends BaseController { - -} \ No newline at end of file diff --git a/wms-webapi/src/main/java/top/wms/admin/controller/rule/PeopleRecordController.java b/wms-webapi/src/main/java/top/wms/admin/controller/rule/PeopleRecordController.java deleted file mode 100644 index c1f8ac9..0000000 --- a/wms-webapi/src/main/java/top/wms/admin/controller/rule/PeopleRecordController.java +++ /dev/null @@ -1,28 +0,0 @@ -package top.wms.admin.controller.rule; - -import top.continew.starter.extension.crud.enums.Api; - -import io.swagger.v3.oas.annotations.tags.Tag; - -import org.springframework.web.bind.annotation.*; - -import top.continew.starter.extension.crud.annotation.CrudRequestMapping; -import top.wms.admin.common.controller.BaseController; -import top.wms.admin.rule.model.query.PeopleRecordQuery; -import top.wms.admin.rule.model.req.PeopleRecordReq; -import top.wms.admin.rule.model.resp.PeopleRecordResp; -import top.wms.admin.rule.service.PeopleRecordService; - -/** - * 人员识别记录管理 API - * - * @author zc - * @since 2025/04/08 23:06 - */ -@Tag(name = "人员识别记录管理 API") -@RestController -@CrudRequestMapping(value = "/rule/peopleRecord", api = {Api.PAGE, Api.DETAIL, Api.ADD, Api.UPDATE, Api.DELETE, - Api.EXPORT}) -public class PeopleRecordController extends BaseController { - -} \ No newline at end of file diff --git a/wms-webapi/src/main/java/top/wms/admin/controller/rule/RuleController.java b/wms-webapi/src/main/java/top/wms/admin/controller/rule/RuleController.java deleted file mode 100644 index 37c26bc..0000000 --- a/wms-webapi/src/main/java/top/wms/admin/controller/rule/RuleController.java +++ /dev/null @@ -1,53 +0,0 @@ -package top.wms.admin.controller.rule; - -import lombok.RequiredArgsConstructor; - -import top.continew.starter.extension.crud.enums.Api; - -import io.swagger.v3.oas.annotations.tags.Tag; - -import org.springframework.web.bind.annotation.*; - -import top.continew.starter.extension.crud.annotation.CrudRequestMapping; -import top.continew.starter.extension.crud.model.resp.LabelValueResp; -import top.continew.starter.web.model.R; -import top.wms.admin.common.controller.BaseController; -import top.wms.admin.rule.model.query.RuleQuery; -import top.wms.admin.rule.model.req.RuleReq; -import top.wms.admin.rule.model.resp.RuleResp; -import top.wms.admin.rule.service.RuleService; - -import java.util.List; - -/** - * 通行规则管理 API - * - * @author zc - * @since 2025/04/07 14:20 - */ -@Tag(name = "通行规则管理 API") -@RestController -@RequiredArgsConstructor -@CrudRequestMapping(value = "/rule/rule", api = {Api.PAGE, Api.DETAIL, Api.ADD, Api.UPDATE, Api.DELETE, Api.EXPORT}) -public class RuleController extends BaseController { - - private final RuleService ruleService; - - @GetMapping(value = "/getRuleNameList") - public List getRuleNameList(RuleReq RuleReq) { - return ruleService.getRuleNameList(RuleReq); - } - - @PostMapping("/add1") - public R addRule1(@RequestBody RuleReq ruleReq) { - String result = baseService.addRule1(ruleReq); - return R.ok(result); - } - - @PutMapping("/update1/{id}") - public R updateRule1(@PathVariable("id") Long id, @RequestBody RuleReq ruleReq) { - String result = baseService.updateRule1(ruleReq, id); - return R.ok(result); - } - -} diff --git a/wms-webapi/src/main/java/top/wms/admin/controller/space/PointController.java b/wms-webapi/src/main/java/top/wms/admin/controller/space/PointController.java deleted file mode 100644 index 52bda0e..0000000 --- a/wms-webapi/src/main/java/top/wms/admin/controller/space/PointController.java +++ /dev/null @@ -1,24 +0,0 @@ -package top.wms.admin.controller.space; - -import io.swagger.v3.oas.annotations.tags.Tag; -import org.springframework.web.bind.annotation.RestController; -import top.continew.starter.extension.crud.annotation.CrudRequestMapping; -import top.continew.starter.extension.crud.enums.Api; -import top.wms.admin.common.controller.BaseController; -import top.wms.admin.space.model.query.PointQuery; -import top.wms.admin.space.model.req.PointReq; -import top.wms.admin.space.model.resp.PointResp; -import top.wms.admin.space.service.PointService; - -/** - * 点位管理管理 API - * - * @author zc - * @since 2025/04/03 15:01 - */ -@Tag(name = "点位管理管理 API") -@RestController -@CrudRequestMapping(value = "/space/point", api = {Api.PAGE, Api.DETAIL, Api.ADD, Api.UPDATE, Api.DELETE, Api.EXPORT}) -public class PointController extends BaseController { - -} \ No newline at end of file diff --git a/wms-webapi/src/main/java/top/wms/admin/controller/space/SpaceController.java b/wms-webapi/src/main/java/top/wms/admin/controller/space/SpaceController.java deleted file mode 100644 index aeb29f3..0000000 --- a/wms-webapi/src/main/java/top/wms/admin/controller/space/SpaceController.java +++ /dev/null @@ -1,28 +0,0 @@ -package top.wms.admin.controller.space; - -import top.continew.starter.extension.crud.enums.Api; - -import io.swagger.v3.oas.annotations.tags.Tag; - -import org.springframework.web.bind.annotation.*; - -import top.continew.starter.extension.crud.annotation.CrudRequestMapping; -import top.wms.admin.common.controller.BaseController; -import top.wms.admin.space.model.query.SpaceQuery; -import top.wms.admin.space.model.req.SpaceReq; -import top.wms.admin.space.model.resp.SpaceResp; -import top.wms.admin.space.model.resp.SpaceResp; -import top.wms.admin.space.service.SpaceService; - -/** - * 空间管理管理 API - * - * @author zc - * @since 2025/04/03 10:47 - */ -@Tag(name = "空间管理管理 API") -@RestController -@CrudRequestMapping(value = "/space/space", api = {Api.TREE, Api.DETAIL, Api.ADD, Api.UPDATE, Api.DELETE, Api.EXPORT}) -public class SpaceController extends BaseController { - -} \ No newline at end of file diff --git a/wms-webapi/src/main/java/top/wms/admin/controller/yfApi/YFListenController.java b/wms-webapi/src/main/java/top/wms/admin/controller/yfApi/YFListenController.java deleted file mode 100644 index 42e5d70..0000000 --- a/wms-webapi/src/main/java/top/wms/admin/controller/yfApi/YFListenController.java +++ /dev/null @@ -1,59 +0,0 @@ -package top.wms.admin.controller.yfApi; - -import cn.hutool.core.thread.ThreadUtil; -import cn.hutool.core.util.StrUtil; -import com.alibaba.fastjson2.JSON; -import com.feiniaojin.gracefulresponse.api.ExcludeFromGracefulResponse; -import io.swagger.v3.oas.annotations.tags.Tag; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -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; -import top.continew.starter.log.annotation.Log; -import top.wms.admin.yfApi.domain.BackInfo; -import top.wms.admin.yfApi.domain.BackResult; -import top.wms.admin.yfApi.domain.HeartInfo; -import top.wms.admin.yfApi.service.IYFListenService; - -/** - * 宇泛人脸设备回调 - * - * @author zc - * @since 2025/03/21 18:10 - */ -@Tag(name = "宇泛人脸设备回调 API") -@RestController -@Slf4j -@RequiredArgsConstructor -@RequestMapping("/sdk") -public class YFListenController { - - private final IYFListenService iyfListenService; - - @Log(ignore = true) - @PostMapping("/backUrlHeart") - public void heart(HeartInfo info) { - iyfListenService.heart(info); - } - - /** - * 宇泛人脸设备回调地址 - * - * @return 回调信息 - */ - @Log(ignore = true) - @ExcludeFromGracefulResponse - @PostMapping("/backUrl") - public BackResult backUrl(@RequestBody BackInfo info) { - log.info("宇泛人脸设备识别回调:{}", JSON.toJSONString(info)); - if (!StrUtil.equals(info.getPersonId(), "STRANGERBABY")) { - //异步处理接收到的人员信息 - ThreadUtil.execAsync(() -> { - iyfListenService.processPeopleRecord(info); - }); - } - return new BackResult(1, true); - } -} \ No newline at end of file