linwe
2024-09-03 764d883b5ea3bdc06abbec548b6df0511e567978
Merge remote-tracking branch 'origin/binlog' into binlog

# Conflicts:
# pom.xml
# src/main/java/org/springblade/common/param/CommonParamSet.java
# src/main/java/org/springblade/flow/business/service/impl/FlowBusinessServiceImpl.java
# src/main/java/org/springblade/modules/answerRecord/service/impl/AnswerRecordServiceImpl.java
# src/main/java/org/springblade/modules/article/controller/ArticleCommentController.java
# src/main/java/org/springblade/modules/article/controller/ArticleController.java
# src/main/java/org/springblade/modules/article/entity/Article.java
# src/main/java/org/springblade/modules/article/mapper/ArticleCollectMapper.xml
# src/main/java/org/springblade/modules/article/mapper/ArticleMapper.java
# src/main/java/org/springblade/modules/article/mapper/ArticleMapper.xml
# src/main/java/org/springblade/modules/article/service/ArticleService.java
# src/main/java/org/springblade/modules/article/service/IArticleCommentService.java
# src/main/java/org/springblade/modules/article/service/impl/ArticleCommentServiceImpl.java
# src/main/java/org/springblade/modules/article/service/impl/ArticleServiceImpl.java
# src/main/java/org/springblade/modules/article/vo/ArticleVO.java
# src/main/java/org/springblade/modules/category/controller/CategoryController.java
# src/main/java/org/springblade/modules/category/mapper/CategoryMapper.xml
# src/main/java/org/springblade/modules/category/service/ICategoryService.java
# src/main/java/org/springblade/modules/category/service/impl/CategoryServiceImpl.java
# src/main/java/org/springblade/modules/checkInRecords/controller/CheckInRecordsController.java
# src/main/java/org/springblade/modules/checkInRecords/entity/CheckInRecordsEntity.java
# src/main/java/org/springblade/modules/checkInRecords/mapper/CheckInRecordsMapper.java
# src/main/java/org/springblade/modules/checkInRecords/mapper/CheckInRecordsMapper.xml
# src/main/java/org/springblade/modules/checkInRecords/service/ICheckInRecordsService.java
# src/main/java/org/springblade/modules/checkInRecords/service/impl/CheckInRecordsServiceImpl.java
# src/main/java/org/springblade/modules/checkInRecords/vo/CheckInRecordsVO.java
# src/main/java/org/springblade/modules/circle/controller/CircleCommentController.java
# src/main/java/org/springblade/modules/circle/controller/CircleController.java
# src/main/java/org/springblade/modules/circle/entity/CircleEntity.java
# src/main/java/org/springblade/modules/circle/mapper/CircleMapper.xml
# src/main/java/org/springblade/modules/circle/service/ICircleCommentService.java
# src/main/java/org/springblade/modules/circle/service/ICircleService.java
# src/main/java/org/springblade/modules/circle/service/impl/CircleCommentServiceImpl.java
# src/main/java/org/springblade/modules/circle/service/impl/CircleServiceImpl.java
# src/main/java/org/springblade/modules/circle/vo/CircleVO.java
# src/main/java/org/springblade/modules/community/service/impl/CommunityServiceImpl.java
# src/main/java/org/springblade/modules/community/vo/CommunityVO.java
# src/main/java/org/springblade/modules/develop/controller/CodeController.java
# src/main/java/org/springblade/modules/develop/controller/ModelController.java
# src/main/java/org/springblade/modules/discuss/controller/PublicDiscussController.java
# src/main/java/org/springblade/modules/discuss/controller/TopicsController.java
# src/main/java/org/springblade/modules/discuss/controller/UserPublicEnrollController.java
# src/main/java/org/springblade/modules/discuss/controller/UserTopicsController.java
# src/main/java/org/springblade/modules/discuss/dto/TopicsDTO.java
# src/main/java/org/springblade/modules/discuss/entity/PublicDiscussEntity.java
# src/main/java/org/springblade/modules/discuss/entity/TopicsEntity.java
# src/main/java/org/springblade/modules/discuss/entity/UserPublicEnrollEntity.java
# src/main/java/org/springblade/modules/discuss/entity/UserTopicsEntity.java
# src/main/java/org/springblade/modules/discuss/mapper/PublicDiscussMapper.xml
# src/main/java/org/springblade/modules/discuss/mapper/TopicsMapper.java
# src/main/java/org/springblade/modules/discuss/mapper/TopicsMapper.xml
# src/main/java/org/springblade/modules/discuss/mapper/UserPublicEnrollMapper.xml
# src/main/java/org/springblade/modules/discuss/mapper/UserTopicsMapper.java
# src/main/java/org/springblade/modules/discuss/mapper/UserTopicsMapper.xml
# src/main/java/org/springblade/modules/discuss/service/IPublicDiscussService.java
# src/main/java/org/springblade/modules/discuss/service/ITopicsService.java
# src/main/java/org/springblade/modules/discuss/service/IUserPublicEnrollService.java
# src/main/java/org/springblade/modules/discuss/service/IUserTopicsService.java
# src/main/java/org/springblade/modules/discuss/service/impl/PublicDiscussServiceImpl.java
# src/main/java/org/springblade/modules/discuss/service/impl/TopicsServiceImpl.java
# src/main/java/org/springblade/modules/discuss/service/impl/UserPublicEnrollServiceImpl.java
# src/main/java/org/springblade/modules/discuss/service/impl/UserTopicsServiceImpl.java
# src/main/java/org/springblade/modules/discuss/vo/PublicDiscussVO.java
# src/main/java/org/springblade/modules/discuss/vo/TopicsVO.java
# src/main/java/org/springblade/modules/discuss/vo/UserTopicsVO.java
# src/main/java/org/springblade/modules/district/mapper/DistrictMapper.java
# src/main/java/org/springblade/modules/district/mapper/DistrictMapper.xml
# src/main/java/org/springblade/modules/district/service/impl/DistrictServiceImpl.java
# src/main/java/org/springblade/modules/district/vo/DistrictVO.java
# src/main/java/org/springblade/modules/doorplateAddress/controller/DoorplateAddressController.java
# src/main/java/org/springblade/modules/doorplateAddress/entity/DoorplateAddressEntity.java
# src/main/java/org/springblade/modules/doorplateAddress/mapper/DoorplateAddressMapper.java
# src/main/java/org/springblade/modules/doorplateAddress/mapper/DoorplateAddressMapper.xml
# src/main/java/org/springblade/modules/doorplateAddress/service/IDoorplateAddressService.java
# src/main/java/org/springblade/modules/doorplateAddress/service/impl/DoorplateAddressServiceImpl.java
# src/main/java/org/springblade/modules/doorplateAddress/vo/DoorplateAddressVO.java
# src/main/java/org/springblade/modules/doorplateAddress/vo/FuncNode.java
# src/main/java/org/springblade/modules/email/config/MailSenderConfig.java
# src/main/java/org/springblade/modules/email/controller/EmailController.java
# src/main/java/org/springblade/modules/email/entity/EmailEntity.java
# src/main/java/org/springblade/modules/email/service/IEmailAccountService.java
# src/main/java/org/springblade/modules/email/service/impl/EmailAccountServiceImpl.java
# src/main/java/org/springblade/modules/email/vo/EmailVO.java
# src/main/java/org/springblade/modules/email/wrapper/EmailWrapper.java
# src/main/java/org/springblade/modules/grid/controller/GridPatrolRecordController.java
# src/main/java/org/springblade/modules/grid/controller/GridWorkLogController.java
# src/main/java/org/springblade/modules/grid/entity/GridPatrolRecordEntity.java
# src/main/java/org/springblade/modules/grid/entity/GridRangeEntity.java
# src/main/java/org/springblade/modules/grid/mapper/GridMapper.java
# src/main/java/org/springblade/modules/grid/mapper/GridMapper.xml
# src/main/java/org/springblade/modules/grid/mapper/GridPatrolRecordMapper.java
# src/main/java/org/springblade/modules/grid/mapper/GridPatrolRecordMapper.xml
# src/main/java/org/springblade/modules/grid/mapper/GridRangeMapper.java
# src/main/java/org/springblade/modules/grid/mapper/GridRangeMapper.xml
# src/main/java/org/springblade/modules/grid/mapper/GridWorkLogMapper.java
# src/main/java/org/springblade/modules/grid/mapper/GridWorkLogMapper.xml
# src/main/java/org/springblade/modules/grid/mapper/GridmanMapper.java
# src/main/java/org/springblade/modules/grid/mapper/GridmanMapper.xml
# src/main/java/org/springblade/modules/grid/service/IGridPatrolRecordService.java
# src/main/java/org/springblade/modules/grid/service/IGridRangeService.java
# src/main/java/org/springblade/modules/grid/service/IGridService.java
# src/main/java/org/springblade/modules/grid/service/IGridWorkLogService.java
# src/main/java/org/springblade/modules/grid/service/impl/GridPatrolRecordServiceImpl.java
# src/main/java/org/springblade/modules/grid/service/impl/GridRangeServiceImpl.java
# src/main/java/org/springblade/modules/grid/service/impl/GridServiceImpl.java
# src/main/java/org/springblade/modules/grid/service/impl/GridWorkLogServiceImpl.java
# src/main/java/org/springblade/modules/grid/service/impl/GridmanServiceImpl.java
# src/main/java/org/springblade/modules/grid/vo/GridPatrolRecordVO.java
# src/main/java/org/springblade/modules/grid/vo/GridVO.java
# src/main/java/org/springblade/modules/grid/vo/GridWorkLogVO.java
# src/main/java/org/springblade/modules/grid/vo/GridmanVO.java
# src/main/java/org/springblade/modules/house/controller/HouseController.java
# src/main/java/org/springblade/modules/house/controller/HouseRentalController.java
# src/main/java/org/springblade/modules/house/controller/HouseTenantController.java
# src/main/java/org/springblade/modules/house/controller/HouseholdController.java
# src/main/java/org/springblade/modules/house/controller/UserHouseLabelController.java
# src/main/java/org/springblade/modules/house/entity/HouseEntity.java
# src/main/java/org/springblade/modules/house/entity/HouseTenantEntity.java
# src/main/java/org/springblade/modules/house/entity/HouseholdEntity.java
# src/main/java/org/springblade/modules/house/entity/UserHouseLabelEntity.java
# src/main/java/org/springblade/modules/house/excel/HouseAndHoldExcel.java
# src/main/java/org/springblade/modules/house/excel/HouseHoldImporter.java
# src/main/java/org/springblade/modules/house/excel/ImportHouseholdExcel.java
# src/main/java/org/springblade/modules/house/mapper/HouseMapper.java
# src/main/java/org/springblade/modules/house/mapper/HouseMapper.xml
# src/main/java/org/springblade/modules/house/mapper/HouseRentalMapper.java
# src/main/java/org/springblade/modules/house/mapper/HouseRentalMapper.xml
# src/main/java/org/springblade/modules/house/mapper/HouseTenantMapper.java
# src/main/java/org/springblade/modules/house/mapper/HouseTenantMapper.xml
# src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.java
# src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml
# src/main/java/org/springblade/modules/house/mapper/UserHouseLabelMapper.java
# src/main/java/org/springblade/modules/house/mapper/UserHouseLabelMapper.xml
# src/main/java/org/springblade/modules/house/service/IHouseService.java
# src/main/java/org/springblade/modules/house/service/IHouseTenantService.java
# src/main/java/org/springblade/modules/house/service/IHouseholdService.java
# src/main/java/org/springblade/modules/house/service/IUserHouseLabelService.java
# src/main/java/org/springblade/modules/house/service/impl/HouseRentalServiceImpl.java
# src/main/java/org/springblade/modules/house/service/impl/HouseServiceImpl.java
# src/main/java/org/springblade/modules/house/service/impl/HouseTenantServiceImpl.java
# src/main/java/org/springblade/modules/house/service/impl/HouseholdServiceImpl.java
# src/main/java/org/springblade/modules/house/service/impl/UserHouseLabelServiceImpl.java
# src/main/java/org/springblade/modules/house/vo/HouseRentalTenantVO.java
# src/main/java/org/springblade/modules/house/vo/HouseTenantVO.java
# src/main/java/org/springblade/modules/house/vo/HouseVO.java
# src/main/java/org/springblade/modules/house/vo/HouseholdLabelVO.java
# src/main/java/org/springblade/modules/house/vo/HouseholdVO.java
# src/main/java/org/springblade/modules/house/vo/UserHouseLabelVO.java
# src/main/java/org/springblade/modules/label/controller/LabelController.java
# src/main/java/org/springblade/modules/label/entity/LabelEntity.java
# src/main/java/org/springblade/modules/label/mapper/LabelMapper.java
# src/main/java/org/springblade/modules/label/mapper/LabelMapper.xml
# src/main/java/org/springblade/modules/label/service/ILabelService.java
# src/main/java/org/springblade/modules/label/service/impl/LabelServiceImpl.java
# src/main/java/org/springblade/modules/messageRecord/controller/MessageRecordController.java
# src/main/java/org/springblade/modules/messageRecord/entity/MessageUser.java
# src/main/java/org/springblade/modules/messageRecord/mapper/MessageRecordMapper.xml
# src/main/java/org/springblade/modules/messageRecord/mapper/MessageUserMapper.xml
# src/main/java/org/springblade/modules/messageRecord/service/IMessageRecordService.java
# src/main/java/org/springblade/modules/messageRecord/service/impl/MessageRecordServiceImpl.java
# src/main/java/org/springblade/modules/messageRecord/vo/MessageRecordVO.java
# src/main/java/org/springblade/modules/messageRecord/vo/MessageUserVO.java
# src/main/java/org/springblade/modules/ownersCommittee/service/impl/OwnersCommitteeServiceImpl.java
# src/main/java/org/springblade/modules/partyOrganization/service/impl/PartyOrganizationServiceImpl.java
# src/main/java/org/springblade/modules/partyOrganization/vo/PartyOrganizationVO.java
# src/main/java/org/springblade/modules/patrol/controller/PatrolGroupController.java
# src/main/java/org/springblade/modules/patrol/entity/PatrolGroup.java
# src/main/java/org/springblade/modules/patrol/entity/PatrolGroupItem.java
# src/main/java/org/springblade/modules/patrol/mapper/PatrolGroupMapper.java
# src/main/java/org/springblade/modules/patrol/mapper/PatrolGroupMapper.xml
# src/main/java/org/springblade/modules/patrol/service/IPatrolGroupService.java
# src/main/java/org/springblade/modules/patrol/service/impl/PatrolGroupServiceImpl.java
# src/main/java/org/springblade/modules/patrol/vo/PatrolGroupVO.java
# src/main/java/org/springblade/modules/pay/controller/WxPayController.java
# src/main/java/org/springblade/modules/pay/service/IWxPayService.java
# src/main/java/org/springblade/modules/pay/service/impl/WxPayServiceImpl.java
# src/main/java/org/springblade/modules/place/controller/PlaceCheckController.java
# src/main/java/org/springblade/modules/place/controller/PlaceController.java
# src/main/java/org/springblade/modules/place/controller/PlaceExtController.java
# src/main/java/org/springblade/modules/place/controller/PlacePractitionerController.java
# src/main/java/org/springblade/modules/place/controller/PlaceRelController.java
# src/main/java/org/springblade/modules/place/entity/PlaceDoorEntity.java
# src/main/java/org/springblade/modules/place/entity/PlaceEntity.java
# src/main/java/org/springblade/modules/place/entity/PlaceExtEntity.java
# src/main/java/org/springblade/modules/place/entity/PlacePractitionerEntity.java
# src/main/java/org/springblade/modules/place/excel/NinePlaceExcel.java
# src/main/java/org/springblade/modules/place/excel/PlaceImporter.java
# src/main/java/org/springblade/modules/place/mapper/PlaceCheckMapper.xml
# src/main/java/org/springblade/modules/place/mapper/PlaceExtMapper.java
# src/main/java/org/springblade/modules/place/mapper/PlaceExtMapper.xml
# src/main/java/org/springblade/modules/place/mapper/PlaceMapper.java
# src/main/java/org/springblade/modules/place/mapper/PlaceMapper.xml
# src/main/java/org/springblade/modules/place/mapper/PlacePractitionerMapper.java
# src/main/java/org/springblade/modules/place/mapper/PlacePractitionerMapper.xml
# src/main/java/org/springblade/modules/place/mapper/PlaceRelMapper.java
# src/main/java/org/springblade/modules/place/mapper/PlaceRelMapper.xml
# src/main/java/org/springblade/modules/place/service/IPlacePractitionerService.java
# src/main/java/org/springblade/modules/place/service/IPlaceRelService.java
# src/main/java/org/springblade/modules/place/service/IPlaceService.java
# src/main/java/org/springblade/modules/place/service/impl/PlaceCheckServiceImpl.java
# src/main/java/org/springblade/modules/place/service/impl/PlaceExtServiceImpl.java
# src/main/java/org/springblade/modules/place/service/impl/PlacePractitionerServiceImpl.java
# src/main/java/org/springblade/modules/place/service/impl/PlaceRelServiceImpl.java
# src/main/java/org/springblade/modules/place/service/impl/PlaceServiceImpl.java
# src/main/java/org/springblade/modules/place/vo/PlaceExtVO.java
# src/main/java/org/springblade/modules/place/vo/PlacePractitionerVO.java
# src/main/java/org/springblade/modules/place/vo/PlaceVO.java
# src/main/java/org/springblade/modules/police/controller/PoliceAffairsGridController.java
# src/main/java/org/springblade/modules/police/controller/PoliceStationController.java
# src/main/java/org/springblade/modules/police/mapper/PoliceAffairsGridMapper.java
# src/main/java/org/springblade/modules/police/mapper/PoliceAffairsGridMapper.xml
# src/main/java/org/springblade/modules/police/mapper/PoliceStationMapper.java
# src/main/java/org/springblade/modules/police/mapper/PoliceStationMapper.xml
# src/main/java/org/springblade/modules/police/service/IPoliceAffairsGridService.java
# src/main/java/org/springblade/modules/police/service/IPoliceStationService.java
# src/main/java/org/springblade/modules/police/service/impl/PoliceAffairsGridServiceImpl.java
# src/main/java/org/springblade/modules/police/service/impl/PoliceStationServiceImpl.java
# src/main/java/org/springblade/modules/police/vo/PoliceAffairsGridVO.java
# src/main/java/org/springblade/modules/property/controller/PropertyChargeController.java
# src/main/java/org/springblade/modules/property/controller/PropertyCompanyCommentController.java
# src/main/java/org/springblade/modules/property/entity/PropertyCapitalApplyEntity.java
# src/main/java/org/springblade/modules/property/entity/PropertyChargeRecord.java
# src/main/java/org/springblade/modules/property/entity/PropertyCompanyDistrictEntity.java
# src/main/java/org/springblade/modules/property/mapper/PropertyCapitalApplyMapper.xml
# src/main/java/org/springblade/modules/property/mapper/PropertyChargeMapper.xml
# src/main/java/org/springblade/modules/property/mapper/PropertyChargeRecordMapper.java
# src/main/java/org/springblade/modules/property/mapper/PropertyChargeRecordMapper.xml
# src/main/java/org/springblade/modules/property/mapper/PropertyCompanyCommentMapper.xml
# src/main/java/org/springblade/modules/property/mapper/PropertyCompanyDistrictMapper.xml
# src/main/java/org/springblade/modules/property/mapper/PropertyCompanyMapper.xml
# src/main/java/org/springblade/modules/property/mapper/PropertyCompanyScoreMapper.java
# src/main/java/org/springblade/modules/property/mapper/PropertyCompanyScoreMapper.xml
# src/main/java/org/springblade/modules/property/service/IPropertyChargeRecordService.java
# src/main/java/org/springblade/modules/property/service/IPropertyCompanyDistrictService.java
# src/main/java/org/springblade/modules/property/service/IPropertyCompanyScoreService.java
# src/main/java/org/springblade/modules/property/service/impl/PropertyCapitalApplyServiceImpl.java
# src/main/java/org/springblade/modules/property/service/impl/PropertyChargeRecordServiceImpl.java
# src/main/java/org/springblade/modules/property/service/impl/PropertyCompanyCommentServiceImpl.java
# src/main/java/org/springblade/modules/property/service/impl/PropertyCompanyDistrictServiceImpl.java
# src/main/java/org/springblade/modules/property/service/impl/PropertyCompanyScoreServiceImpl.java
# src/main/java/org/springblade/modules/property/service/impl/PropertyCompanyServiceImpl.java
# src/main/java/org/springblade/modules/property/vo/PropertyCapitalApplyVO.java
# src/main/java/org/springblade/modules/property/vo/PropertyCompanyDistrictVO.java
# src/main/java/org/springblade/modules/property/vo/PropertyCompanyVO.java
# src/main/java/org/springblade/modules/resource/controller/SmsController.java
# src/main/java/org/springblade/modules/resource/endpoint/OssEndpoint.java
# src/main/java/org/springblade/modules/resource/mapper/AttachDataMapper.java
# src/main/java/org/springblade/modules/resource/mapper/AttachDataMapper.xml
# src/main/java/org/springblade/modules/resource/service/IAttachDataService.java
# src/main/java/org/springblade/modules/resource/service/ISmsService.java
# src/main/java/org/springblade/modules/resource/service/impl/AttachDataServiceImpl.java
# src/main/java/org/springblade/modules/resource/service/impl/SmsServiceImpl.java
# src/main/java/org/springblade/modules/rotation/entity/RotationEntity.java
# src/main/java/org/springblade/modules/rotation/mapper/RotationMapper.java
# src/main/java/org/springblade/modules/rotation/mapper/RotationMapper.xml
# src/main/java/org/springblade/modules/rotation/service/impl/RotationServiceImpl.java
# src/main/java/org/springblade/modules/rotation/vo/RotationVO.java
# src/main/java/org/springblade/modules/system/service/impl/DeptServiceImpl.java
# src/main/java/org/springblade/modules/system/service/impl/MenuServiceImpl.java
# src/main/java/org/springblade/modules/system/service/impl/UserServiceImpl.java
# src/main/java/org/springblade/modules/task/controller/ECallEventController.java
# src/main/java/org/springblade/modules/task/controller/TaskBailReportingEventController.java
# src/main/java/org/springblade/modules/task/controller/TaskLabelReportingEventController.java
# src/main/java/org/springblade/modules/task/controller/TaskPlaceRecordController.java
# src/main/java/org/springblade/modules/task/controller/TaskPlaceRectificationController.java
# src/main/java/org/springblade/modules/task/controller/TaskPlaceSelfCheckController.java
# src/main/java/org/springblade/modules/task/controller/TaskReportForRepairsController.java
# src/main/java/org/springblade/modules/task/dto/TaskPlaceRecordDTO.java
# src/main/java/org/springblade/modules/task/dto/TaskPlaceRectificationDTO.java
# src/main/java/org/springblade/modules/task/dto/TaskPlaceSelfCheckDTO.java
# src/main/java/org/springblade/modules/task/entity/TaskEntity.java
# src/main/java/org/springblade/modules/task/entity/TaskLabelReportingEventEntity.java
# src/main/java/org/springblade/modules/task/entity/TaskPlaceRecordEntity.java
# src/main/java/org/springblade/modules/task/entity/TaskPlaceRectificationEntity.java
# src/main/java/org/springblade/modules/task/entity/TaskPlaceSelfCheckEntity.java
# src/main/java/org/springblade/modules/task/entity/TaskReportForRepairsEntity.java
# src/main/java/org/springblade/modules/task/excel/PlaceRectificationsExcel.java
# src/main/java/org/springblade/modules/task/excel/PlaceRectificationsImporter.java
# src/main/java/org/springblade/modules/task/excel/TaskPlaceRectificationExcel.java
# src/main/java/org/springblade/modules/task/excel/TaskPlaceSelfCheckExcel.java
# src/main/java/org/springblade/modules/task/mapper/EcCallEventMapper.java
# src/main/java/org/springblade/modules/task/mapper/EcCallEventMapper.xml
# src/main/java/org/springblade/modules/task/mapper/TaskLabelReportingEventMapper.java
# src/main/java/org/springblade/modules/task/mapper/TaskLabelReportingEventMapper.xml
# src/main/java/org/springblade/modules/task/mapper/TaskMapper.java
# src/main/java/org/springblade/modules/task/mapper/TaskMapper.xml
# src/main/java/org/springblade/modules/task/mapper/TaskPlaceRecordMapper.java
# src/main/java/org/springblade/modules/task/mapper/TaskPlaceRecordMapper.xml
# src/main/java/org/springblade/modules/task/mapper/TaskPlaceRectificationMapper.java
# src/main/java/org/springblade/modules/task/mapper/TaskPlaceRectificationMapper.xml
# src/main/java/org/springblade/modules/task/mapper/TaskPlaceSelfCheckMapper.java
# src/main/java/org/springblade/modules/task/mapper/TaskPlaceSelfCheckMapper.xml
# src/main/java/org/springblade/modules/task/mapper/TaskReportForRepairsMapper.java
# src/main/java/org/springblade/modules/task/mapper/TaskReportForRepairsMapper.xml
# src/main/java/org/springblade/modules/task/service/IECallEventService.java
# src/main/java/org/springblade/modules/task/service/ITaskBailReportingEventService.java
# src/main/java/org/springblade/modules/task/service/ITaskCampusReportingEventService.java
# src/main/java/org/springblade/modules/task/service/ITaskHotelReportingService.java
# src/main/java/org/springblade/modules/task/service/ITaskLabelReportingEventService.java
# src/main/java/org/springblade/modules/task/service/ITaskPlaceRecordService.java
# src/main/java/org/springblade/modules/task/service/ITaskPlaceRectificationService.java
# src/main/java/org/springblade/modules/task/service/ITaskPlaceSelfCheckService.java
# src/main/java/org/springblade/modules/task/service/ITaskReportForRepairsService.java
# src/main/java/org/springblade/modules/task/service/ITaskService.java
# src/main/java/org/springblade/modules/task/service/impl/ECallEventServiceImpl.java
# src/main/java/org/springblade/modules/task/service/impl/TaskBailReportingEventServiceImpl.java
# src/main/java/org/springblade/modules/task/service/impl/TaskCampusReportingEventServiceImpl.java
# src/main/java/org/springblade/modules/task/service/impl/TaskHotelReportingServiceImpl.java
# src/main/java/org/springblade/modules/task/service/impl/TaskLabelReportingEventServiceImpl.java
# src/main/java/org/springblade/modules/task/service/impl/TaskPlaceRecordServiceImpl.java
# src/main/java/org/springblade/modules/task/service/impl/TaskPlaceRectificationServiceImpl.java
# src/main/java/org/springblade/modules/task/service/impl/TaskPlaceSelfCheckServiceImpl.java
# src/main/java/org/springblade/modules/task/service/impl/TaskReportForRepairsServiceImpl.java
# src/main/java/org/springblade/modules/task/service/impl/TaskServiceImpl.java
# src/main/java/org/springblade/modules/task/vo/ECallEventVO.java
# src/main/java/org/springblade/modules/task/vo/TaskLabelReportingEventVO.java
# src/main/java/org/springblade/modules/task/vo/TaskPlaceRecordVO.java
# src/main/java/org/springblade/modules/task/vo/TaskPlaceRectificationVO.java
# src/main/java/org/springblade/modules/task/vo/TaskPlaceRectificationsVO.java
# src/main/java/org/springblade/modules/task/vo/TaskPlaceSelfCheckVO.java
# src/main/java/org/springblade/modules/task/vo/TaskReportForRepairsVO.java
# src/main/java/org/springblade/modules/task/vo/TaskVO.java
# src/main/java/org/springblade/modules/task/wrapper/TaskPlaceRecordWrapper.java
# src/main/java/org/springblade/modules/task/wrapper/TaskPlaceRectificationWrapper.java
# src/main/java/org/springblade/modules/task/wrapper/TaskPlaceSelfCheckWrapper.java
# src/main/java/org/springblade/xxljob/controller/JobInfoController.java
# src/main/java/org/springblade/xxljob/entity/JobInfoEntity.java
# src/main/java/org/springblade/xxljob/jobhandler/LabelHandleJob.java
# src/main/java/org/springblade/xxljob/mapper/JobInfoMapper.java
# src/main/java/org/springblade/xxljob/mapper/JobInfoMapper.xml
# src/main/java/org/springblade/xxljob/service/IJobInfoService.java
# src/main/java/org/springblade/xxljob/service/impl/JobInfoServiceImpl.java
# src/main/resources/application-dev.yml
# src/main/resources/application-prod.yml
# src/main/resources/application-test.yml
# src/main/resources/log/logback-prod.xml
66 files modified
339 files added
33370 ■■■■■ changed files
src/main/java/com/xxl/job/core/enums/taskHandlerEnum.java 35 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/common/cache/CacheNames.java 5 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/common/cache/SysCache.java 168 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/common/config/BladeScopeDataConfig.java 20 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/common/config/MyBatisPlusConfig.java 15 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/common/config/SmsConfig.java 25 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/common/config/ThreadPoolConfig.java 33 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/common/config/WebConfig.java 22 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/common/config/WxMiniConfig.java 21 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/common/config/WxPayConfig.java 188 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/common/constant/CommonConstant.java 11 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/common/constant/DictConstant.java 8 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/common/constant/EsTableConstant.java 69 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/common/enums/OrderStatus.java 49 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/common/enums/PayType.java 24 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/common/enums/wxpay/WxApiType.java 65 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/common/enums/wxpay/WxNotifyType.java 41 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/common/enums/wxpay/WxRefundStatus.java 34 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/common/enums/wxpay/WxTradeState.java 34 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/common/exception/CustomException.java 18 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/common/handle/BladeScopeModelHandlerMaster.java 78 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/common/interceptor/CorsInterceptor.java 32 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/common/interceptor/DataSyncInterceptor.java 245 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/common/launch/LauncherServiceImpl.java 2 ●●● patch | view | raw | blame | history
src/main/java/org/springblade/common/node/TreeIntegerNode.java 6 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/common/node/TreeStringNode.java 9 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/common/param/GridSet.java 98 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/common/param/ToObject.java 18 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/common/utils/AuthUtils.java 55 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/common/utils/HttpClientUtils.java 597 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/common/utils/HttpUtils.java 39 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/common/utils/ImageUtils.java 39 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/common/utils/NodeTreeUtil.java 21 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/common/utils/ParseMail.java 253 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/common/utils/RoleUtil.java 31 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/common/utils/SQLParseUtils.java 41 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/common/utils/SmsUtils.java 127 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/common/utils/SpinLockUtil.java 55 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/common/utils/ThreadPoolUtil.java 40 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/common/utils/UtilRandom.java 7 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/common/utils/WechatPay2ValidatorForRequest.java 114 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/common/utils/WeiXinSecurityUtil.java 321 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/common/utils/WordToPdfUtils.java 34 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/common/utils/sms/AlipayApiException.java 49 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/common/utils/sms/AlipayConstants.java 97 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/common/utils/sms/AlipaySignature.java 607 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/common/utils/sms/PerfectSend.java 91 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/common/utils/sms/ReplyContent.java 63 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/common/utils/sms/StatusReport.java 91 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/common/utils/sms/StreamUtil.java 135 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/common/utils/sms/StringUtils.java 171 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/es/config/ElasticsearchConfig.java 24 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/es/config/ElasticsearchInitializer.java 24 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/es/controller/EsController.java 84 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/es/service/ElasticsearchDocumentService.java 787 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/es/service/ElasticsearchIndexInitializer.java 33 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/es/service/ElasticsearchIndexService.java 37 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/es/service/ElasticsearchSearchService.java 29 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/es/test/ElasticSearchExample.java 96 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/es/vo/EsParam.java 37 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/flow/core/entity/BladeFlow.java 23 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/flow/engine/controller/FlowFollowController.java 2 ●●● patch | view | raw | blame | history
src/main/java/org/springblade/flow/engine/controller/FlowManagerController.java 2 ●●● patch | view | raw | blame | history
src/main/java/org/springblade/flow/engine/controller/FlowModelController.java 2 ●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/article/controller/ArticleBrowseController.java 106 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/article/controller/ArticleIntegralController.java 107 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/article/entity/ArticleBrowseEntity.java 66 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/article/entity/ArticleIntegralEntity.java 77 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/article/mapper/ArticleBrowseMapper.java 43 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/article/mapper/ArticleBrowseMapper.xml 27 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/article/mapper/ArticleIntegralMapper.java 45 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/article/mapper/ArticleIntegralMapper.xml 41 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/article/service/IArticleBrowseService.java 26 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/article/service/IArticleIntegralService.java 26 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/article/service/impl/ArticleBrowseServiceImpl.java 26 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/article/service/impl/ArticleIntegralServiceImpl.java 29 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/article/vo/ArticleBrowseVO.java 35 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/article/vo/ArticleIntegralVO.java 61 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/auth/endpoint/BladeTokenEndPoint.java 17 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/auth/granter/CaptchaTokenGranter.java 5 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/auth/granter/PasswordTokenGranter.java 17 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/auth/utils/TokenUtil.java 2 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/backblast/controller/BackblastPubPersonController.java 145 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/backblast/controller/BackblastPubRecordController.java 177 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/backblast/controller/BackblastWarnHanRecController.java 158 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/backblast/dto/BackblastPubRecordDTO.java 34 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/backblast/dto/BackblastWarnHanRecDTO.java 34 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/backblast/entity/BackblastPubPersonEntity.java 86 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/backblast/entity/BackblastPubRecordEntity.java 131 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/backblast/entity/BackblastWarnHanRecEntity.java 106 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/backblast/excel/BackblastPubRecordExcel.java 93 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/backblast/mapper/BackblastPubPersonMapper.java 39 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/backblast/mapper/BackblastPubPersonMapper.xml 57 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/backblast/mapper/BackblastPubRecordMapper.java 62 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/backblast/mapper/BackblastPubRecordMapper.xml 315 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/backblast/mapper/BackblastWarnHanRecMapper.java 54 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/backblast/mapper/BackblastWarnHanRecMapper.xml 169 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/backblast/service/IBackblastPubPersonService.java 47 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/backblast/service/IBackblastPubRecordService.java 66 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/backblast/service/IBackblastWarnHanRecService.java 56 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/backblast/service/impl/BackblastPubPersonServiceImpl.java 57 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/backblast/service/impl/BackblastPubRecordServiceImpl.java 239 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/backblast/service/impl/BackblastWarnHanRecServiceImpl.java 80 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/backblast/vo/BackblastPubPersonVO.java 79 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/backblast/vo/BackblastPubRecordVO.java 102 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/backblast/vo/BackblastWarnHanRecVO.java 82 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/backblast/wrapper/BackblastPubPersonWrapper.java 34 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/backblast/wrapper/BackblastPubRecordWrapper.java 50 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/backblast/wrapper/BackblastWarnHanRecWrapper.java 50 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/category/excel/CategoryExcel.java 45 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/category/excel/CategoryImporter.java 39 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/counties/controller/CountiesController.java 129 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/counties/dto/CountiesDTO.java 53 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/counties/entity/CountiesEntity.java 59 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/counties/mapper/CountiesMapper.java 43 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/counties/mapper/CountiesMapper.xml 15 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/counties/service/ICountiesService.java 43 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/counties/service/impl/CountiesServiceImpl.java 43 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/counties/vo/CountiesVO.java 35 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/counties/wrapper/CountiesWrapper.java 50 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/discuss/excel/UserTopicsExcel.java 62 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/discuss/excel/holdExcel.java 73 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/discuss/excel/topicsExcel.java 54 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/disputeRecord/controller/DisputeRecordController.java 212 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/disputeRecord/dto/DisputeRecordDTO.java 34 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/disputeRecord/entity/DisputeRecordEntity.java 164 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/disputeRecord/excel/DisputeRecordExcel.java 150 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/disputeRecord/excel/DisputeRecordImporter.java 23 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/disputeRecord/excel/ExportDisputeRecordExcel.java 158 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/disputeRecord/mapper/DisputeRecordMapper.java 66 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/disputeRecord/mapper/DisputeRecordMapper.xml 378 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/disputeRecord/service/IDisputeRecordService.java 61 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/disputeRecord/service/impl/DisputeRecordServiceImpl.java 255 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/disputeRecord/vo/DisputeRecordVO.java 79 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/disputeRecord/wrapper/DisputeRecordWrapper.java 50 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/doorplateAddress/excel/ImportDoorplateExcel.java 272 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/eCallEventTwo/controller/ECallEventTwoController.java 212 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/eCallEventTwo/dto/ECallEventTwoDTO.java 34 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/eCallEventTwo/dto/EcDispatchDTO.java 32 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/eCallEventTwo/dto/EcHandleDTO.java 48 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/eCallEventTwo/dto/EcOrderCheckDTO.java 47 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/eCallEventTwo/dto/EcOrderDTO.java 64 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/eCallEventTwo/dto/EcOrderDoneDTO.java 47 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/eCallEventTwo/dto/EcOrderParamDTO.java 42 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/eCallEventTwo/dto/EcOrderRespDTO.java 47 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/eCallEventTwo/dto/EcOrderReviewDTO.java 47 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/eCallEventTwo/dto/EcOrderSuperviseDTO.java 47 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/eCallEventTwo/entity/ECallEventTwoEntity.java 300 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/eCallEventTwo/entity/EcDispatch.java 261 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/eCallEventTwo/entity/EcHandle.java 123 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/eCallEventTwo/entity/EcOrder.java 392 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/eCallEventTwo/entity/EcOrderCheck.java 60 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/eCallEventTwo/entity/EcOrderDone.java 50 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/eCallEventTwo/entity/EcOrderResp.java 36 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/eCallEventTwo/entity/EcOrderReview.java 150 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/eCallEventTwo/entity/EcOrderSupervise.java 155 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/eCallEventTwo/mapper/EcCallEventTwoMapper.java 69 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/eCallEventTwo/mapper/EcCallEventTwoMapper.xml 284 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/eCallEventTwo/mapper/EcOrderMapper.java 98 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/eCallEventTwo/mapper/EcOrderMapper.xml 599 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/eCallEventTwo/service/EcOrderService.java 90 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/eCallEventTwo/service/IECallEventTwoService.java 62 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/eCallEventTwo/service/impl/EcCallEventTwoServiceImpl.java 144 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/eCallEventTwo/service/impl/EcOrderServiceImpl.java 326 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/eCallEventTwo/vo/ECallEventTwoVO.java 49 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/eCallEventTwo/wrapper/ECallEventTwoWrapper.java 50 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/email/controller/EmailTemplateController.java 126 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/email/dto/EmailTemplateDTO.java 34 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/email/entity/EmailTemplateEntity.java 79 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/email/mapper/EmailTemplateMapper.java 60 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/email/mapper/EmailTemplateMapper.xml 66 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/email/service/IEmailTemplateService.java 60 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/email/service/impl/EmailTemplateServiceImpl.java 71 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/email/vo/EmailTemplateVO.java 35 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/email/wrapper/EmailTemplateWrapper.java 50 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/grid/excel/GridPatrolRecordExcel.java 71 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/excel/ExportHouseTenantExcel.java 93 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/excel/ExportHouseholdExcel.java 237 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/excel/HouseTenantExcel.java 86 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/excel/ImportTenantHouseholdExcel.java 90 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/vo/AddHouseholdVO.java 11 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/issueClazz/controller/IssueClazzController.java 140 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/issueClazz/dto/IssueClazzDTO.java 48 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/issueClazz/entity/IssueClazzEntity.java 53 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/issueClazz/mapper/IssueClazzMapper.java 44 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/issueClazz/mapper/IssueClazzMapper.xml 34 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/issueClazz/service/IIssueClazzService.java 46 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/issueClazz/service/impl/IssueClazzServiceImpl.java 51 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/issueClazz/vo/IssueClazzVO.java 93 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/issueClazz/wrapper/IssueClazzWrapper.java 50 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/nursingCheckIn/controller/NursingCheckInController.java 126 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/nursingCheckIn/dto/NursingCheckInDTO.java 34 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/nursingCheckIn/entity/NursingCheckInEntity.java 110 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/nursingCheckIn/mapper/NursingCheckInMapper.java 43 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/nursingCheckIn/mapper/NursingCheckInMapper.xml 78 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/nursingCheckIn/service/INursingCheckInService.java 43 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/nursingCheckIn/service/impl/NursingCheckInServiceImpl.java 43 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/nursingCheckIn/vo/NursingCheckInVO.java 42 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/nursingCheckIn/wrapper/NursingCheckInWrapper.java 50 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/pay/controller/OrderInfoController.java 135 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/pay/controller/PaymentInfoController.java 125 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/pay/controller/RefundInfoController.java 125 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/pay/dto/OrderInfoDTO.java 34 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/pay/dto/PaymentInfoDTO.java 34 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/pay/dto/RefundInfoDTO.java 34 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/pay/entity/OrderInfoEntity.java 100 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/pay/entity/PaymentInfoEntity.java 95 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/pay/entity/RefundInfoEntity.java 102 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/pay/entity/WeChatMiniAuthorizeVo.java 39 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/pay/mapper/OrderInfoMapper.java 44 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/pay/mapper/OrderInfoMapper.xml 15 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/pay/mapper/PaymentInfoMapper.java 59 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/pay/mapper/PaymentInfoMapper.xml 64 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/pay/mapper/RefundInfoMapper.java 60 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/pay/mapper/RefundInfoMapper.xml 71 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/pay/service/IOrderInfoService.java 59 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/pay/service/IPaymentInfoService.java 45 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/pay/service/IRefundInfoService.java 46 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/pay/service/impl/OrderInfoServiceImpl.java 207 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/pay/service/impl/PaymentInfoServiceImpl.java 88 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/pay/service/impl/RefundInfoServiceImpl.java 118 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/pay/vo/OrderInfoVO.java 34 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/pay/vo/PaymentInfoVO.java 34 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/pay/vo/RefundInfoVO.java 34 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/pay/wrapper/OrderInfoWrapper.java 51 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/pay/wrapper/PaymentInfoWrapper.java 51 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/pay/wrapper/RefundInfoWrapper.java 51 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/place/excel/ExportPlaceExcel.java 130 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/place/excel/ImportPlaceExcel.java 124 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/place/excel/ImportPractitionerExcel.java 95 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/place/excel/PractitionerExcel.java 106 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/police/controller/PolicTrajectoryPointController.java 125 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/police/controller/PoliceAlarmRecordsController.java 137 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/police/dto/PolicTrajectoryPointDTO.java 34 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/police/dto/PoliceAlarmRecordsDTO.java 18 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/police/entity/PolicTrajectoryPointEntity.java 95 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/police/entity/PoliceAlarmRecordsEntity.java 155 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/police/mapper/PolicTrajectoryPointMapper.java 59 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/police/mapper/PolicTrajectoryPointMapper.xml 76 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/police/mapper/PoliceAlarmRecordsMapper.java 51 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/police/mapper/PoliceAlarmRecordsMapper.xml 198 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/police/service/IPolicTrajectoryPointService.java 42 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/police/service/IPoliceAlarmRecordsService.java 45 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/police/service/impl/PolicTrajectoryPointServiceImpl.java 42 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/police/service/impl/PoliceAlarmRecordsServiceImpl.java 81 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/police/vo/PolicTrajectoryPointVO.java 36 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/police/vo/PoliceAlarmRecordsVO.java 68 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/police/wrapper/PolicTrajectoryPointWrapper.java 50 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/police/wrapper/PoliceAlarmRecordsWrapper.java 50 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/property/dto/PropertyChargeRecordDTO.java 18 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/property/vo/ExpenseDetails.java 32 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/report/controller/ReportController.java 126 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/report/controller/ReportDbController.java 125 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/report/dto/ReportDTO.java 34 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/report/dto/ReportDbDTO.java 34 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/report/entity/ReportDbEntity.java 149 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/report/entity/ReportEntity.java 157 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/report/mapper/ReportDbMapper.java 43 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/report/mapper/ReportDbMapper.xml 15 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/report/mapper/ReportMapper.java 43 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/report/mapper/ReportMapper.xml 15 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/report/service/IReportDbService.java 42 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/report/service/IReportService.java 43 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/report/service/impl/ReportDbServiceImpl.java 42 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/report/service/impl/ReportServiceImpl.java 43 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/report/vo/ReportDbVO.java 34 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/report/vo/ReportVO.java 35 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/report/wrapper/ReportDbWrapper.java 50 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/report/wrapper/ReportWrapper.java 50 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/resource/utils/ImageUtil.java 171 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/sms/controller/SmsRecordController.java 125 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/sms/controller/SmsSendController.java 118 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/sms/controller/SmsTemplateController.java 139 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/sms/dto/SmsRecordDTO.java 34 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/sms/dto/SmsTemplateDTO.java 34 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/sms/entity/SmsRecordEntity.java 92 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/sms/entity/SmsTemplateEntity.java 115 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/sms/mapper/SmsRecordMapper.java 60 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/sms/mapper/SmsRecordMapper.xml 79 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/sms/mapper/SmsTemplateMapper.java 60 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/sms/mapper/SmsTemplateMapper.xml 68 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/sms/service/ISmsRecordService.java 42 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/sms/service/ISmsSendService.java 47 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/sms/service/ISmsTemplateService.java 59 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/sms/service/impl/SmsRecordServiceImpl.java 50 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/sms/service/impl/SmsSendServiceImpl.java 522 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/sms/service/impl/SmsTemplateServiceImpl.java 69 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/sms/vo/SmsRecordVO.java 34 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/sms/vo/SmsTemplateVO.java 34 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/sms/wrapper/SmsRecordWrapper.java 51 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/sms/wrapper/SmsTemplateWrapper.java 50 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/smsTask/controller/SmsTaskController.java 126 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/smsTask/dto/SmsTaskDTO.java 34 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/smsTask/entity/SmsTaskEntity.java 99 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/smsTask/mapper/SmsTaskMapper.java 63 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/smsTask/mapper/SmsTaskMapper.xml 99 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/smsTask/service/ISmsTaskService.java 71 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/smsTask/service/impl/SmsTaskServiceImpl.java 76 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/smsTask/vo/SmsTaskVO.java 35 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/smsTask/wrapper/SmsTaskWrapper.java 50 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/controller/DeptController.java 22 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/controller/DictBizController.java 4 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/controller/LogApiController.java 19 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/controller/LogErrorController.java 4 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/controller/LogUsualController.java 4 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/controller/MenuController.java 15 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/controller/RegionController.java 9 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/controller/TenantController.java 4 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/controller/UserController.java 71 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/entity/Dept.java 4 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/entity/LogApiExt.java 19 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/entity/TreeNodeTwo.java 12 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/entity/User.java 17 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/excel/PoliceUserExcel.java 14 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/mapper/DeptMapper.java 13 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/mapper/DeptMapper.xml 90 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/mapper/DictBizMapper.xml 4 ●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/mapper/LogApiMapper.java 20 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/mapper/LogApiMapper.xml 42 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/mapper/LogErrorMapper.java 4 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/mapper/LogErrorMapper.xml 5 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/mapper/LogUsualMapper.java 5 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/mapper/LogUsualMapper.xml 5 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/mapper/RegionMapper.java 29 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/mapper/RegionMapper.xml 110 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/mapper/RoleMapper.java 8 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/mapper/RoleMapper.xml 27 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/mapper/UserMapper.java 19 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/mapper/UserMapper.xml 106 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/node/DeptUserTreeNode.java 2 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/service/IDeptService.java 9 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/service/ILogApiService.java 17 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/service/ILogErrorService.java 4 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/service/ILogService.java 6 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/service/ILogUsualService.java 4 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/service/IMenuService.java 2 ●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/service/IRegionService.java 29 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/service/IRoleService.java 8 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/service/IUserService.java 30 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/service/impl/LogApiServiceImpl.java 22 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/service/impl/LogErrorServiceImpl.java 7 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/service/impl/LogServiceImpl.java 103 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/service/impl/LogUsualServiceImpl.java 7 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/service/impl/RegionServiceImpl.java 114 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/service/impl/RoleServiceImpl.java 25 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/vo/RegionParamVO.java 2 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/vo/UserVO.java 7 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/controller/TaskNoFraudReportingController.java 189 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/controller/TaskResidencePermitApplyController.java 159 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/controller/TaskSchoolEvenController.java 144 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/dto/TaskNoFraudReportingDTO.java 34 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/dto/TaskResidencePermitApplyDTO.java 34 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/dto/TaskSchoolEvenDTO.java 130 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/entity/TaskNoFraudReportingEntity.java 194 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/entity/TaskResidencePermitApplyEntity.java 162 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/entity/TaskSchoolEvenEntity.java 137 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/excel/TaskNoExplosionExcel.java 71 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/mapper/TaskNoFraudReportingMapper.java 84 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/mapper/TaskNoFraudReportingMapper.xml 492 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/mapper/TaskResidencePermitApplyMapper.java 53 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/mapper/TaskResidencePermitApplyMapper.xml 201 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/mapper/TaskSchoolEvenMapper.java 67 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/mapper/TaskSchoolEvenMapper.xml 232 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/service/ITaskNoFraudReportingService.java 53 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/service/ITaskResidencePermitApplyService.java 72 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/service/ITaskSchoolEvenService.java 63 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/service/TaskHandle.java 7 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/service/impl/SelfExaminationTaskHandler.java 84 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/service/impl/TaskNoFraudReportingServiceImpl.java 222 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/service/impl/TaskResidencePermitApplyServiceImpl.java 157 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/service/impl/TaskSchoolEvenServiceImpl.java 80 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/service/impl/VisitingTaskHandler.java 57 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/vo/TaskNoFraudReportingVO.java 108 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/vo/TaskResidencePermitApplyVO.java 70 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/vo/TaskSchoolEvenVO.java 61 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/wrapper/TaskNoFraudReportingWrapper.java 50 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/wrapper/TaskResidencePermitApplyWrapper.java 50 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/wrapper/TaskSchoolEvenWrapper.java 51 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/test4j/Test4jController.java 64 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/test4j/util/Test4jUtil.java 85 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/threeColorTask/controller/CustomTaskController.java 125 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/threeColorTask/dto/CustomTaskDTO.java 34 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/threeColorTask/entity/CustomTaskEntity.java 127 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/threeColorTask/mapper/CustomTaskMapper.java 61 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/threeColorTask/mapper/CustomTaskMapper.xml 105 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/threeColorTask/service/ICustomTaskService.java 74 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/threeColorTask/service/impl/CustomTaskServiceImpl.java 137 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/threeColorTask/vo/CustomTaskVO.java 34 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/threeColorTask/wrapper/CustomTaskWrapper.java 50 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/wechat/controller/WechatController.java 33 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/wechat/service/WechatService.java 12 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/wechat/service/impl/WechatServiceImpl.java 60 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/xxljob/cron/CronExpression.java 1402 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/xxljob/jobhandler/DataHandleJob.java 59 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/xxljob/jobhandler/SynchronizationEhjb.java 53 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/xxljob/util/CookieUtil.java 98 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/xxljob/util/JacksonUtil.java 93 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/xxljob/util/LocalCacheUtil.java 134 ●●●●● patch | view | raw | blame | history
src/main/java/org/yaml/snakeyaml/representer/Representer.java 198 ●●●●● patch | view | raw | blame | history
src/main/java/sql/report.menu.sql 10 ●●●●● patch | view | raw | blame | history
src/main/java/sql/reportdb.menu.sql 10 ●●●●● patch | view | raw | blame | history
src/main/resources/application.yml 49 ●●●●● patch | view | raw | blame | history
src/main/resources/log/logback-test.xml 20 ●●●● patch | view | raw | blame | history
src/test/java/org/springblade/test/BladeTest.java 59 ●●●●● patch | view | raw | blame | history
src/test/resources/application.yml 10 ●●●● patch | view | raw | blame | history
src/main/java/com/xxl/job/core/enums/taskHandlerEnum.java
New file
@@ -0,0 +1,35 @@
package com.xxl.job.core.enums;
/**
 *
 */
public enum taskHandlerEnum {
    VISITING_TASK("0", "VisitingTaskHandler"),
    SELFEXAMINATION_TASK("1", "SelfExaminationTaskHandler");
    final String code;
    final String name;
    public String getCode() {
        return code;
    }
    public String getName() {
        return name;
    }
    taskHandlerEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }
    public static String getNameByCode(String code) {
        taskHandlerEnum[] payHandlerEnums = values();
        for (taskHandlerEnum payHandlerEnum : payHandlerEnums) {
            if (payHandlerEnum.getCode().equals(code)) {
                return payHandlerEnum.getName();
            }
        }
        return null;
    }
}
src/main/java/org/springblade/common/cache/CacheNames.java
@@ -58,4 +58,9 @@
     */
    String USER_FAIL_KEY = "blade:user::blade:fail:";
    /**
     *
     */
    String ARTICLE_KEY = "blade:article:";
}
src/main/java/org/springblade/common/cache/SysCache.java
@@ -1,19 +1,3 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.common.cache;
import org.apache.logging.log4j.util.Strings;
@@ -29,6 +13,7 @@
import java.util.List;
import java.util.stream.Collectors;
import static org.springblade.common.cache.CacheNames.ARTICLE_KEY;
import static org.springblade.core.cache.constant.CacheConstant.SYS_CACHE;
/**
@@ -334,7 +319,7 @@
     *
     * @return regionCode
     */
    public static List<String> getRegionChildCodesByDeptId(String deptId) {
    public static List<String> getRegionChildCodesByDeptId(String deptId,String communityCode) {
        //多个部门按逗号分割
        List<String> deptIdList = Arrays.asList(deptId.split(","));
@@ -345,7 +330,7 @@
            // 查询对应的区域编号code
            Dept dept = deptService.getById(id);
            if (null!=dept && !Strings.isBlank(dept.getRegionCode()) && !AuthUtil.isAdministrator()){
                list = getRegionChildCodes(dept.getRegionCode());
                list = getRegionChildCodes(dept.getRegionCode(),communityCode);
                //行政区划不为空添加进集合
                if (list.size()>0){
                    allRegionList.addAll(list);
@@ -359,18 +344,107 @@
    }
    /**
     * 获取民警(公安)下级所有区域code
     *
     * @return regionCode
     */
    public static List<String> getPoliceRegionChildCodesByDeptId(String deptId,String communityCode) {
        List<String> regionCodeList = new ArrayList<>();
        if (!Strings.isBlank(deptId)) {
            //多个部门按逗号分割
            List<String> deptIdList = Arrays.asList(deptId.split(","));
            //所有行政区划code
            List<String> allRegionList = new ArrayList<>();
            deptIdList.forEach(id -> {
                List<String> list = new ArrayList<>();
                // 查询对应的区域编号code
                Dept dept = deptService.getById(id);
                // 只取公安的
                if (dept.getDeptNature() == 1) {
                    if (null != dept && !Strings.isBlank(dept.getRegionCode()) && !AuthUtil.isAdministrator()) {
                        list = getPoliceRegionChildCodes(dept.getRegionCode(),communityCode);
                        //行政区划不为空添加进集合
                        if (list.size() > 0) {
                            allRegionList.addAll(list);
                        }
                    }
                }
            });
            // 去重
            regionCodeList = allRegionList.stream().distinct().collect(Collectors.toList());
        }
        return regionCodeList;
    }
    /**
     * 查询综治网格/公安相关的网格,社区编号集合
     * @param deptId
     * @param communityCode
     * @param roleName
     * @return
     */
    public static List<String> getGridRegionChildCodesByDeptId(String deptId, String communityCode,String roleName) {
        List<String> regionCodeList = new ArrayList<>();
        if (!Strings.isBlank(deptId)) {
            //多个部门按逗号分割
            List<String> deptIdList = Arrays.asList(deptId.split(","));
            List<String> finalRegionCodeList = regionCodeList;
            String key = AuthUtil.getUserId().toString();
            if (!Strings.isBlank(roleName)){
                key = key + ":" + roleName;
            }
            String finalKey = key;
            deptIdList.forEach(id -> {
                List<String> list = new ArrayList<>();
                // 查询对应的区域编号code
                Dept dept = deptService.getById(id);
                if (null != dept) {
                    if ((roleName.equals("mj") && dept.getDeptNature() == 1) ||
                        ((roleName.equals("wgy") || roleName.equals("wzcj")) && dept.getDeptNature() == 2)) {
                        if (!AuthUtil.isAdministrator()) {
                            if (dept.getRegionCode() == null) {
                                return;
                            }
                            list = CacheUtil.get(SYS_CACHE, REGION_CHILDCODES_CODE, finalKey, List.class);
                            if (list == null || list.size() == 0) {
                                list = new ArrayList<>();
                                List<Region> deptChild = getGridRegionChild(dept.getRegionCode(), communityCode, roleName);
                                if (deptChild != null) {
                                    List<String> collect = deptChild.stream().map(Region::getCode).collect(Collectors.toList());
                                    list.addAll(collect);
                                }
                            }
                            //行政区划不为空添加进集合
                            if (list.size() > 0) {
                                finalRegionCodeList.addAll(list);
                            }
                        }
                    }
                }
            });
            // 去重
            regionCodeList = finalRegionCodeList.stream().distinct().collect(Collectors.toList());
            CacheUtil.put(SYS_CACHE, REGION_CHILDCODES_CODE, key, regionCodeList);
        }
        return regionCodeList;
    }
    /**
     * 获取下级所有区域code
     *
     * @return regionCode
     */
    public static List<String> getRegionChildCodes(String regionCode) {
    public static List<String> getRegionChildCodes(String regionCode,String communityCode) {
        if (regionCode == null) {
            return null;
        }
        List<String> regionCodeList = CacheUtil.get(SYS_CACHE, REGION_CHILDCODES_CODE, regionCode, List.class);
        if (regionCodeList == null || regionCodeList.size()==0) {
            regionCodeList = new ArrayList<>();
            List<Region> deptChild = getRegionChild(regionCode);
            List<Region> deptChild = getRegionChild(regionCode,communityCode);
            if (deptChild != null) {
                List<String> collect = deptChild.stream().map(Region::getCode).collect(Collectors.toList());
                regionCodeList.addAll(collect);
@@ -382,11 +456,61 @@
    }
    /**
     * 获取公安下级所有区域code
     *
     * @return regionCode
     */
    public static List<String> getPoliceRegionChildCodes(String regionCode,String communityCode) {
        if (regionCode == null) {
            return null;
        }
        List<String> regionCodeList = CacheUtil.get(SYS_CACHE, REGION_CHILDCODES_CODE, regionCode, List.class);
        if (regionCodeList == null || regionCodeList.size()==0) {
            regionCodeList = new ArrayList<>();
            List<Region> deptChild = getPoliceRegionChild(regionCode,communityCode);
            if (deptChild != null) {
                List<String> collect = deptChild.stream().map(Region::getCode).collect(Collectors.toList());
                regionCodeList.addAll(collect);
            }
            regionCodeList.add(regionCode);
            CacheUtil.put(SYS_CACHE, REGION_CHILDCODES_CODE, regionCode, regionCodeList);
        }
        return regionCodeList;
    }
    /**
     * 获取综治下级区域
     * @param regionCode
     * @return
     */
    private static List<Region> getGridRegionChild(String regionCode, String communityCode,String roleName) {
        return CacheUtil.get(SYS_CACHE, REGION_CHILD_CODE, regionCode, () -> regionService.getGridRegionChild(regionCode,communityCode,roleName));
    }
    /**
     * 获取民警下级区域
     * @param regionCode
     * @return
     */
    private static List<Region> getPoliceRegionChild(String regionCode,String communityCode) {
        return CacheUtil.get(SYS_CACHE, REGION_CHILD_CODE, regionCode, () -> regionService.getPoliceRegionChild(regionCode,communityCode));
    }
    /**
     * 获取下级区域
     * @param regionCode
     * @return
     */
    private static List<Region> getRegionChild(String regionCode) {
        return CacheUtil.get(SYS_CACHE, REGION_CHILD_CODE, regionCode, () -> regionService.getRegionChild(regionCode));
    private static List<Region> getRegionChild(String regionCode,String communityCode) {
        return CacheUtil.get(SYS_CACHE, REGION_CHILD_CODE, regionCode, () -> regionService.getRegionChild(regionCode,communityCode));
    }
    /**
     * 查询当前文章范围对应的社区编号字符串集合
     * @param articleRange
     * @return
     */
    public static String getAllCommunityNameListString(String articleRange,String id) {
        return CacheUtil.get(ARTICLE_KEY, "id", id ,() -> regionService.getAllCommunityNameListString(articleRange));
    }
}
src/main/java/org/springblade/common/config/BladeScopeDataConfig.java
New file
@@ -0,0 +1,20 @@
package org.springblade.common.config;
import org.springblade.common.handle.BladeScopeModelHandlerMaster;
import org.springblade.core.datascope.handler.ScopeModelHandler;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.jdbc.core.JdbcTemplate;
@Configuration(proxyBeanMethods = false)
public class BladeScopeDataConfig {
    @Autowired
    private JdbcTemplate jdbcTemplate;
    @Bean
    public ScopeModelHandler scopeModelHandler(){
        return new BladeScopeModelHandlerMaster(jdbcTemplate);
    }
}
src/main/java/org/springblade/common/config/MyBatisPlusConfig.java
New file
@@ -0,0 +1,15 @@
package org.springblade.common.config;
import com.baomidou.mybatisplus.autoconfigure.ConfigurationCustomizer;
import org.springblade.common.interceptor.DataSyncInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class MyBatisPlusConfig {
    @Bean
    public DataSyncInterceptor dataSyncInterceptor() {
        return new DataSyncInterceptor();
    }
}
src/main/java/org/springblade/common/config/SmsConfig.java
New file
@@ -0,0 +1,25 @@
package org.springblade.common.config;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
@Configuration
//@ConfigurationProperties(prefix = "sms") //读取sms节点
@Data
public class SmsConfig {
    @Value("${sms.url}")
    private String smsUrl;
    // 平台提供的appId 仅供测试使用
    @Value("${sms.appId}")
    private String smsAppId;
    // 平台提供的私钥 仅供测试使用
    @Value("${sms.privateKey}")
    private String smsPrivateKey;
    @Value("${sms.sopCreateBy}")
    private String sopCreateBy;
}
src/main/java/org/springblade/common/config/ThreadPoolConfig.java
New file
@@ -0,0 +1,33 @@
package org.springblade.common.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import java.util.concurrent.ThreadPoolExecutor;
@Configuration
public class ThreadPoolConfig {
    @Bean(name = "customThreadPool")
    public ThreadPoolTaskExecutor customThreadPool() {
        ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
        // 核心线程数
        executor.setCorePoolSize(Runtime.getRuntime().availableProcessors());
        // executor.setCorePoolSize(10);
        // 最大线程数
        executor.setMaxPoolSize(40);
        // 队列大小
        executor.setQueueCapacity(600);
        // 线程空闲时间(秒)
        executor.setKeepAliveSeconds(60);
        // 线程名称前缀
        executor.setThreadNamePrefix("CustomThreadPool-");
        // 设置拒绝策略
        executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
        // 初始化线程池
        executor.initialize();
        return executor;
    }
}
src/main/java/org/springblade/common/config/WebConfig.java
New file
@@ -0,0 +1,22 @@
package org.springblade.common.config;
import org.springblade.common.interceptor.CorsInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Configuration
public class WebConfig implements WebMvcConfigurer {
    @Autowired
    private CorsInterceptor corsInterceptor;
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        //跨域拦截器需放在最上面
        registry.addInterceptor(corsInterceptor);
    }
}
src/main/java/org/springblade/common/config/WxMiniConfig.java
New file
@@ -0,0 +1,21 @@
package org.springblade.common.config;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
@Configuration
@ConfigurationProperties(prefix = "wxmini") //读取wxmini节点
@Data //使用set方法将wxpay节点中的值填充到当前类的属性中
@Slf4j
public class WxMiniConfig {
    // appid
    private String appid;
    // 小程序appSecret key
    private String secret;
    private String jscode2sessionUrl;
}
src/main/java/org/springblade/common/config/WxPayConfig.java
New file
@@ -0,0 +1,188 @@
package org.springblade.common.config;
import com.wechat.pay.contrib.apache.httpclient.WechatPayHttpClientBuilder;
import com.wechat.pay.contrib.apache.httpclient.auth.PrivateKeySigner;
import com.wechat.pay.contrib.apache.httpclient.auth.ScheduledUpdateCertificatesVerifier;
import com.wechat.pay.contrib.apache.httpclient.auth.WechatPay2Credentials;
import com.wechat.pay.contrib.apache.httpclient.auth.WechatPay2Validator;
import com.wechat.pay.contrib.apache.httpclient.util.PemUtil;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.apache.http.impl.client.CloseableHttpClient;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import java.io.FileInputStream;
import java.nio.charset.StandardCharsets;
import java.security.PrivateKey;
@Configuration
@ConfigurationProperties(prefix = "wxpay") //读取wxpay节点
@Data //使用set方法将wxpay节点中的值填充到当前类的属性中
@Slf4j
public class WxPayConfig {
    // 商户号
    private String mchId;
    // 商户API证书序列号
    private String mchSerialNo;
    // 商户私钥文件
    private String privateKeyPath;
    private String privateCertPath;
    // APIv3密钥
    private String apiV3Key;
    // APPID
    private String appid;
    // 微信服务器地址
    private String domain;
    // 接收结果通知地址
    private String notifyDomain;
    // APIv2密钥
    private String partnerKey;
    /**
     * 获取商户的私钥文件
     *
     * @param filename
     * @return
     */
    private PrivateKey getPrivateKey(String filename) {
        try {
            // FileInputStream fileInputStream = new FileInputStream(filename);
            // log.info("文件内容:" + fileInputStream);
            return PemUtil.loadPrivateKey(getFileInputStream(filename));
        } catch (Exception e) {
            log.info("私钥文件不存在", e);
            throw new RuntimeException("私钥文件不存在", e);
        }
    }
    /**
     * 获取商户的文件
     *
     * @param filename
     * @return
     */
    public static FileInputStream getFileInputStream(String filename) {
        try {
            FileInputStream fileInputStream = new FileInputStream(filename);
            return fileInputStream;
        } catch (Exception e) {
            log.info("读取文件不存在", e);
            throw new RuntimeException("读取文件不存在", e);
        }
    }
    /**
     * 获取商户的文件
     *
     * @return
     */
    // @Bean
    // public KeyStore keyStore() {
    //     try {
    //         InputStream certStream = WxPayConfig.class.getClassLoader().getResourceAsStream(privateCertPath);
    //         KeyStore ks = KeyStore.getInstance("PKCS12");
    //         ks.load(certStream, mchId.toCharArray());
    //         return ks;
    //     } catch (Exception e) {
    //         log.info("读取文件不存在", e);
    //         throw new RuntimeException("读取文件不存在", e);
    //     }
    // }
    /**
     * 获取签名验证器
     *
     * @return
     */
//    @Bean
    public ScheduledUpdateCertificatesVerifier getVerifier() {
        log.info("获取签名验证器");
        //获取商户私钥
        PrivateKey privateKey = getPrivateKey(privateKeyPath);
        //私钥签名对象
        PrivateKeySigner privateKeySigner = new PrivateKeySigner(mchSerialNo, privateKey);
        //身份认证对象
        WechatPay2Credentials wechatPay2Credentials = new WechatPay2Credentials(mchId, privateKeySigner);
        // 使用定时更新的签名验证器,不需要传入证书
        ScheduledUpdateCertificatesVerifier verifier = new ScheduledUpdateCertificatesVerifier(
            wechatPay2Credentials,
            apiV3Key.getBytes(StandardCharsets.UTF_8));
        return verifier;
    }
    /**
     * 获取http请求对象
     *
     * @param verifier
     * @return
     */
//    @Bean(name = "wxPayClient")
    public CloseableHttpClient getWxPayClient(ScheduledUpdateCertificatesVerifier verifier) {
        log.info("获取httpClient");
        //获取商户私钥
        PrivateKey privateKey = getPrivateKey(privateKeyPath);
        WechatPayHttpClientBuilder builder = WechatPayHttpClientBuilder.create()
            .withMerchant(mchId, mchSerialNo, privateKey)
            .withValidator(new WechatPay2Validator(verifier));
        // ... 接下来,你仍然可以通过builder设置各种参数,来配置你的HttpClient
        // 通过WechatPayHttpClientBuilder构造的HttpClient,会自动的处理签名和验签,并进行证书自动更新
        CloseableHttpClient httpClient = builder.build();
        return httpClient;
    }
    /**
     * 获取HttpClient,无需进行应答签名验证,跳过验签的流程
     */
//    @Bean(name = "wxPayNoSignClient")
    public CloseableHttpClient getWxPayNoSignClient() {
        //获取商户私钥
        PrivateKey privateKey = getPrivateKey(privateKeyPath);
        //用于构造HttpClient
        WechatPayHttpClientBuilder builder = WechatPayHttpClientBuilder.create()
            //设置商户信息
            .withMerchant(mchId, mchSerialNo, privateKey)
            //无需进行签名验证、通过withValidator((response) -> true)实现
            .withValidator((response) -> true);
        // 通过WechatPayHttpClientBuilder构造的HttpClient,会自动的处理签名和验签,并进行证书自动更新
        CloseableHttpClient httpClient = builder.build();
        log.info("== getWxPayNoSignClient END ==");
        return httpClient;
    }
}
src/main/java/org/springblade/common/constant/CommonConstant.java
@@ -28,7 +28,7 @@
    /**
     * app name
     */
    String APPLICATION_NAME = AppConstant.APPLICATION_NAME_PREFIX + "api";
    String APPLICATION_NAME = "jczz-" + "api";
    /**
     * sword 系统名
@@ -86,13 +86,22 @@
    Integer NUMBER_TWO = 2;
    Integer NUMBER_FIVE = 5;
    Integer NUMBER_THREE = 3;
    Integer NUMBER_FOUR = 4;
    Integer NUMBER_EIGHT = 8;
    Integer NUMBER_SEVEN = 7;
    Integer NUMBER_SIX = 6;
    String RESIDENT = "居民";
    int REPORT_TYPE_SECONDHAND_TRADE = 5; // 二手车
    int REPORT_TYPE_FIRE_INSPECTION = 2; // 自查
    int REPORT_TYPE_NO_FRAUD = 6; // 无诈
}
src/main/java/org/springblade/common/constant/DictConstant.java
@@ -45,7 +45,7 @@
    String USED_CAR= "二手车交易";
    String BAIL_PENDING_TRIAL= "取保候审";
    String BAIL_PENDING_TRIAL= "取保监居";
    String SMALL_DOORPLATE= "小门牌";
@@ -57,4 +57,10 @@
    String FIRE_SELF_CHECK_NOTICE = "消防自查";
    String FIRE_SCHOOL_CHECK_NOTICE = "校园安全检查";
    String NO_FRAUD_REPORTING = "无诈宣传";
    String RESIDENCE_PERMIT_APPLICATION = "居住证申请";
}
src/main/java/org/springblade/common/constant/EsTableConstant.java
New file
@@ -0,0 +1,69 @@
package org.springblade.common.constant;
import java.util.ArrayList;
import java.util.List;
/**
 * es 表对应的属性常量
 * @author zhongrj
 * @since 2024-04-08
 */
public class EsTableConstant {
    /**
     * 1. 通知
     */
    public static List<String> articleList = new ArrayList<String>()
    {{
        add("tableId");
        add("tableName");
        add("title");
        add("type");
        add("content");
        add("articleType");
        add("articleRange");
    }};
    /**
     * 2. 场所
     */
    public static List<String> placeList = new ArrayList<String>()
    {{
        add("tableId");
        add("tableName");
        add("placeName");
        add("principal");
        add("principalPhone");
        add("principalIdCard");
        add("location");
    }};
    /**
     * 3. 房屋
     */
    public static List<String> houseList = new ArrayList<String>()
    {{
        add("tableId");
        add("tableName");
        add("houseName");
    }};
    /**
     * 4. 住户
     */
    public static List<String> householdList = new ArrayList<String>()
    {{
        add("tableId");
        add("tableName");
        add("name");
        add("idCard");
        add("phoneNumber");
        add("address");
    }};
}
src/main/java/org/springblade/common/enums/OrderStatus.java
New file
@@ -0,0 +1,49 @@
package org.springblade.common.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
@AllArgsConstructor
@Getter
public enum OrderStatus {
    /**
     * 未支付
     */
    NOTPAY("未支付"),
    /**
     * 支付成功
     */
    SUCCESS("支付成功"),
    /**
     * 已关闭
     */
    CLOSED("超时已关闭"),
    /**
     * 已取消
     */
    CANCEL("用户已取消"),
    /**
     * 退款中
     */
    REFUND_PROCESSING("退款中"),
    /**
     * 已退款
     */
    REFUND_SUCCESS("已退款"),
    /**
     * 退款异常
     */
    REFUND_ABNORMAL("退款异常");
    /**
     * 类型
     */
    private final String type;
}
src/main/java/org/springblade/common/enums/PayType.java
New file
@@ -0,0 +1,24 @@
package org.springblade.common.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
@AllArgsConstructor
@Getter
public enum PayType {
    /**
     * 微信
     */
    WXPAY("微信"),
    /**
     * 支付宝
     */
    ALIPAY("支付宝");
    /**
     * 类型
     */
    private final String type;
}
src/main/java/org/springblade/common/enums/wxpay/WxApiType.java
New file
@@ -0,0 +1,65 @@
package org.springblade.common.enums.wxpay;
import lombok.AllArgsConstructor;
import lombok.Getter;
@AllArgsConstructor
@Getter
public enum WxApiType {
    /**
     * Native下单
     */
    NATIVE_PAY("/v3/pay/transactions/native"),
    /**
     * Native下单
     */
    NATIVE_PAY_V2("/pay/unifiedorder"),
    /**
     * JSAPI下单
     */
    JSAPI_PAY("/v3/pay/transactions/jsapi"),
    /**
     * sendredpack 发送红包
     */
    SENDREDPACK_PAY("/mmpaymkttransfers/sendredpack"),
    /**
     * 查询订单
     */
    ORDER_QUERY_BY_NO("/v3/pay/transactions/out-trade-no/%s"),
    /**
     * 关闭订单
     */
    CLOSE_ORDER_BY_NO("/v3/pay/transactions/out-trade-no/%s/close"),
    /**
     * 申请退款
     */
    DOMESTIC_REFUNDS("/v3/refund/domestic/refunds"),
    /**
     * 查询单笔退款
     */
    DOMESTIC_REFUNDS_QUERY("/v3/refund/domestic/refunds/%s"),
    /**
     * 申请交易账单
     */
    TRADE_BILLS("/v3/bill/tradebill"),
    /**
     * 申请资金账单
     */
    FUND_FLOW_BILLS("/v3/bill/fundflowbill");
    /**
     * 类型
     */
    private final String type;
}
src/main/java/org/springblade/common/enums/wxpay/WxNotifyType.java
New file
@@ -0,0 +1,41 @@
package org.springblade.common.enums.wxpay;
import lombok.AllArgsConstructor;
import lombok.Getter;
@AllArgsConstructor
@Getter
public enum WxNotifyType {
    /**
     * 支付通知
     */
    NATIVE_NOTIFY("/wxPay/native/notify"),
    /**
     * 支付通知
     */
    NATIVE_NOTIFY_V2("/wxPayV2/native/notify"),
    /**
     * 退款结果通知
     */
    REFUND_NOTIFY("/wxPay/refunds/notify"),
    /**
     * 添加分账接收方API
     */
    RECEIVERS_ADD("/v3/profitsharing/receivers/add"),
    /**
     * 创建分账订单API
     *
     */
    PROFITSHARING_ORDERS("/v3/profitsharing/orders");
    /**
     * 类型
     */
    private final String type;
}
src/main/java/org/springblade/common/enums/wxpay/WxRefundStatus.java
New file
@@ -0,0 +1,34 @@
package org.springblade.common.enums.wxpay;
import lombok.AllArgsConstructor;
import lombok.Getter;
@AllArgsConstructor
@Getter
public enum WxRefundStatus {
    /**
     * 退款成功
     */
    SUCCESS("SUCCESS"),
    /**
     * 退款关闭
     */
    CLOSED("CLOSED"),
    /**
     * 退款处理中
     */
    PROCESSING("PROCESSING"),
    /**
     * 退款异常
     */
    ABNORMAL("ABNORMAL");
    /**
     * 类型
     */
    private final String type;
}
src/main/java/org/springblade/common/enums/wxpay/WxTradeState.java
New file
@@ -0,0 +1,34 @@
package org.springblade.common.enums.wxpay;
import lombok.AllArgsConstructor;
import lombok.Getter;
@AllArgsConstructor
@Getter
public enum WxTradeState {
    /**
     * 支付成功
     */
    SUCCESS("SUCCESS"),
    /**
     * 未支付
     */
    NOTPAY("NOTPAY"),
    /**
     * 已关闭
     */
    CLOSED("CLOSED"),
    /**
     * 转入退款
     */
    REFUND("REFUND");
    /**
     * 类型
     */
    private final String type;
}
src/main/java/org/springblade/common/exception/CustomException.java
New file
@@ -0,0 +1,18 @@
package org.springblade.common.exception;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RestControllerAdvice;
@Slf4j
@RestControllerAdvice
public class CustomException extends RuntimeException {
    private static final long serialVersionUID = 1L;
    public CustomException() {}
    public CustomException(String message) {
        super(message);
    }
}
src/main/java/org/springblade/common/handle/BladeScopeModelHandlerMaster.java
New file
@@ -0,0 +1,78 @@
package org.springblade.common.handle;
import com.baomidou.dynamic.datasource.annotation.DS;
import lombok.RequiredArgsConstructor;
import org.springblade.core.cache.utils.CacheUtil;
import org.springblade.core.datascope.constant.DataScopeConstant;
import org.springblade.core.datascope.handler.ScopeModelHandler;
import org.springblade.core.datascope.model.DataScopeModel;
import org.springblade.core.tool.utils.CollectionUtil;
import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.StringUtil;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
@DS("master")
@RequiredArgsConstructor
public class BladeScopeModelHandlerMaster implements ScopeModelHandler {
    private static final String SCOPE_CACHE_CODE = "dataScope:code:";
    private static final String SCOPE_CACHE_CLASS = "dataScope:class:";
    private static final String DEPT_CACHE_ANCESTORS = "dept:ancestors:";
    private static final DataScopeModel SEARCHED_DATA_SCOPE_MODEL;
    private final JdbcTemplate jdbcTemplate;
    public DataScopeModel getDataScopeByMapper(String mapperId, String roleId) {
        List<Object> args = new ArrayList(Collections.singletonList(mapperId));
        List<Long> roleIds = Func.toLongList(roleId);
        args.addAll(roleIds);
        DataScopeModel dataScope = (DataScopeModel) CacheUtil.get("blade:sys", "dataScope:class:", mapperId + ":" + roleId, DataScopeModel.class, Boolean.FALSE);
        if (dataScope == null || !dataScope.getSearched()) {
            List<DataScopeModel> list = this.jdbcTemplate.query(DataScopeConstant.dataByMapper(roleIds.size()), args.toArray(), new BeanPropertyRowMapper(DataScopeModel.class));
            if (CollectionUtil.isNotEmpty(list)) {
                dataScope = (DataScopeModel)list.iterator().next();
                dataScope.setSearched(Boolean.TRUE);
            } else {
                dataScope = SEARCHED_DATA_SCOPE_MODEL;
            }
            CacheUtil.put("blade:sys", "dataScope:class:", mapperId + ":" + roleId, dataScope, Boolean.FALSE);
        }
        return StringUtil.isNotBlank(dataScope.getResourceCode()) ? dataScope : null;
    }
    public DataScopeModel getDataScopeByCode(String code) {
        DataScopeModel dataScope = (DataScopeModel)CacheUtil.get("blade:sys", "dataScope:code:", code, DataScopeModel.class, Boolean.FALSE);
        if (dataScope == null || !dataScope.getSearched()) {
            List<DataScopeModel> list = this.jdbcTemplate.query("select resource_code, scope_column, scope_field, scope_type, scope_value from blade_scope_data where resource_code = ?", new Object[]{code}, new BeanPropertyRowMapper(DataScopeModel.class));
            if (CollectionUtil.isNotEmpty(list)) {
                dataScope = (DataScopeModel)list.iterator().next();
                dataScope.setSearched(Boolean.TRUE);
            } else {
                dataScope = SEARCHED_DATA_SCOPE_MODEL;
            }
            CacheUtil.put("blade:sys", "dataScope:code:", code, dataScope, Boolean.FALSE);
        }
        return StringUtil.isNotBlank(dataScope.getResourceCode()) ? dataScope : null;
    }
    public List<Long> getDeptAncestors(Long deptId) {
        List ancestors = (List)CacheUtil.get("blade:sys", "dept:ancestors:", deptId, List.class);
        if (CollectionUtil.isEmpty(ancestors)) {
            ancestors = this.jdbcTemplate.queryForList("select id from blade_dept where ancestors like concat(concat('%', ?),'%') and is_deleted = 0", new Object[]{deptId}, Long.class);
            CacheUtil.put("blade:sys", "dept:ancestors:", deptId, ancestors);
        }
        return ancestors;
    }
    static {
        SEARCHED_DATA_SCOPE_MODEL = new DataScopeModel(Boolean.TRUE);
    }
}
src/main/java/org/springblade/common/interceptor/CorsInterceptor.java
New file
@@ -0,0 +1,32 @@
package org.springblade.common.interceptor;
import org.springframework.http.HttpMethod;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.HandlerInterceptor;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@Component
public class CorsInterceptor implements HandlerInterceptor {
    @Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) {
        response.setHeader("Access-Control-Allow-Origin", "*");
        response.setHeader("Access-Control-Allow-Credentials", "true");
        response.setHeader("Access-Control-Allow-Methods", "GET, HEAD, POST, PUT, PATCH, DELETE, OPTIONS");
        response.setHeader("Access-Control-Max-Age", "86400");
        response.setHeader("Access-Control-Allow-Headers", "*");
        // 如果是OPTIONS则结束请求
        if (HttpMethod.OPTIONS.toString().equals(request.getMethod())) {
            response.setStatus(HttpStatus.NO_CONTENT.value());
            return false;
        }
        return true;
    }
}
src/main/java/org/springblade/common/interceptor/DataSyncInterceptor.java
New file
@@ -0,0 +1,245 @@
package org.springblade.common.interceptor;
import org.apache.ibatis.binding.MapperMethod;
import org.apache.ibatis.executor.Executor;
import org.apache.ibatis.mapping.BoundSql;
import org.apache.ibatis.mapping.MappedStatement;
import org.apache.ibatis.plugin.*;
import org.apache.logging.log4j.util.Strings;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springblade.common.constant.EsTableConstant;
import org.springblade.common.utils.SQLParseUtils;
import org.springblade.es.service.ElasticsearchDocumentService;
import org.springblade.es.vo.EsParam;
import org.springblade.modules.article.entity.Article;
import org.springblade.modules.house.entity.HouseEntity;
import org.springblade.modules.house.entity.HouseholdEntity;
import org.springblade.modules.place.entity.PlaceEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;
import java.util.List;
import java.util.Properties;
@Component
@Intercepts({
    @Signature(type = Executor.class, method = "update", args = {MappedStatement.class, Object.class})
})
public class DataSyncInterceptor implements Interceptor {
    private static final Logger logger = LoggerFactory.getLogger(DataSyncInterceptor.class);
    @Lazy
    @Autowired
    private ElasticsearchDocumentService elasticsearchDocumentService;
    @Value("${elasticsearch.indexName}")
    private String indexName;
    /**
     * 拦截器在sql执行成功后同步到es,
     * 如果同步失败抛出异常,保证数据一致性
     *
     * @param invocation
     * @return
     * @throws Throwable
     */
    @Override
    public Object intercept(Invocation invocation) throws Throwable {
        // 获取StatementHandler,进行自定义处理
//        StatementHandler statementHandler = PluginUtils.realTarget(invocation.getTarget());
        Object res = invocation.proceed();
        System.out.println("res = " + res);
        Object[] args = invocation.getArgs();
        MappedStatement ms = (MappedStatement) args[0];
        if (args.length >= 2) {
            //参数
            Object parameter = invocation.getArgs()[1];
            BoundSql boundSql = ms.getBoundSql(parameter);
            //sql
            String sql = boundSql.getSql();
            sql = sql.replaceAll("\n", "");
            //获取表名
            String tableName = SQLParseUtils.getTableName(sql);
            String sqlType = SQLParseUtils.parseSQLType(sql);
            if (!Strings.isBlank(tableName)) {
                if (tableName.equals("jczz_article") ||
                    tableName.equals("jczz_house") ||
                    tableName.equals("jczz_household") ||
                    tableName.equals("jczz_place"))
                    syncDataAfterUpdate(tableName, sqlType, invocation.getArgs()[1]);
            }
        }
        return res;
    }
    /**
     * 数据同步
     *
     * @param tableName
     * @param sqlType
     * @param parameter
     */
    private void syncDataAfterUpdate(String tableName, String sqlType, Object parameter) {
        EsParam esParam = new EsParam();
        esParam.setIndexName(indexName);
        esParam.setTableName(tableName);
        // 判断操作类型
        if (sqlType.equals("INSERT")) {
            //insert 可用直接拦截到实体类
            if (tableName.equals("jczz_article")) {
                Article entity = (Article) parameter;
                elasticsearchDocumentService.addArticle(esParam, entity);
            }
            if (tableName.equals("jczz_place")) {
                PlaceEntity entity = (PlaceEntity) parameter;
                elasticsearchDocumentService.addPlace(esParam, entity);
            }
            if (tableName.equals("jczz_house")) {
                HouseEntity entity = (HouseEntity) parameter;
                elasticsearchDocumentService.addHouse(esParam, entity);
            }
            if (tableName.equals("jczz_household")) {
                HouseholdEntity entity = (HouseholdEntity) parameter;
                elasticsearchDocumentService.addHousehold(esParam, entity);
            }
        }
        if (sqlType.equals("UPDATE")) {
            //update 方法需要特殊处理
            if (tableName.equals("jczz_article")) {
                try {
                    Article entity = (Article) ((MapperMethod.ParamMap) parameter).get("param1");
                    if (entity != null && entity.getId() != null) {
                        esParam.setTableId(entity.getId().toString());
                        elasticsearchDocumentService.update(esParam, entity, EsTableConstant.articleList);
                    }
                } catch (Exception e) {
                    logger.error("jczz_article 更新失败!", e);
                }
            }
            if (tableName.equals("jczz_place")) {
                PlaceEntity entity = new PlaceEntity();
                PlaceEntity placeEntity = new PlaceEntity();
                if (parameter instanceof MapperMethod.ParamMap) {
                    placeEntity = (PlaceEntity) ((MapperMethod.ParamMap) parameter).get("param1");
                    if (placeEntity != null && null != placeEntity.getId()) {
                        setPlaceInfo(entity, placeEntity);
                        esParam.setTableId(entity.getId().toString());
                        elasticsearchDocumentService.update(esParam, entity, EsTableConstant.placeList);
                    }
                } else {
                    placeEntity = (PlaceEntity) parameter;
                    // 删除
                    esParam.setTableId(placeEntity.getId().toString());
                    elasticsearchDocumentService.removeByQuery(esParam);
                }
            }
            if (tableName.equals("jczz_house")) {
                HouseEntity houseEntity = new HouseEntity();
                HouseEntity entity = new HouseEntity();
                if (parameter instanceof MapperMethod.ParamMap) {
                    entity = (HouseEntity) ((MapperMethod.ParamMap) parameter).get("param1");
                    if (entity != null && entity.getId() != null) {
                        setHouseInfo(houseEntity, entity);
                        esParam.setTableId(entity.getId().toString());
                        elasticsearchDocumentService.update(esParam, entity, EsTableConstant.houseList);
                    }
                } else {
                    entity = (HouseEntity) parameter;
                    // 删除
                    esParam.setTableId(entity.getId().toString());
                    elasticsearchDocumentService.removeByQuery(esParam);
                }
            }
            if (tableName.equals("jczz_household")) {
                HouseholdEntity householdEntity = new HouseholdEntity();
                HouseholdEntity entity = new HouseholdEntity();
                if (parameter instanceof MapperMethod.ParamMap) {
                    try {
                        entity = (HouseholdEntity) ((MapperMethod.ParamMap) parameter).get("param1");
                        if (entity != null && entity.getId() != null) {
                            setHouseholdInfo(householdEntity, entity);
                            esParam.setTableId(entity.getId().toString());
                            elasticsearchDocumentService.update(esParam, entity, EsTableConstant.householdList);
                        }
                    } catch (Exception e) {
                        entity = (HouseholdEntity) ((MapperMethod.ParamMap) parameter).get("et");
                        if (entity != null && entity.getId() != null) {
                            setHouseholdInfo(householdEntity, entity);
                            esParam.setTableId(entity.getId().toString());
                            elasticsearchDocumentService.update(esParam, entity, EsTableConstant.householdList);
                        }
                    }
                } else {
                    entity = (HouseholdEntity) parameter;
                    // 删除
                    esParam.setTableId(entity.getId().toString());
                    elasticsearchDocumentService.removeByQuery(esParam);
                }
            }
        }
        // 删除处理
        if (sqlType.equals("DELETE")) {
            if (parameter instanceof MapperMethod.ParamMap) {
                List<Long> list = (List<Long>) ((MapperMethod.ParamMap) parameter).get("param1");
                esParam.setTableId(list.get(0).toString());
                elasticsearchDocumentService.removeByQuery(esParam);
            }
        }
    }
    /**
     * 场所值复制
     *
     * @param entity
     * @param placeEntity
     */
    private void setPlaceInfo(PlaceEntity entity, PlaceEntity placeEntity) {
        entity.setId(placeEntity.getId());
        entity.setPlaceName(placeEntity.getPlaceName());
        entity.setPrincipal(placeEntity.getPrincipal());
        entity.setPrincipalPhone(placeEntity.getPrincipalPhone());
        entity.setPrincipalIdCard(placeEntity.getPrincipalIdCard());
        entity.setLocation(placeEntity.getLocation());
    }
    /**
     * 房屋值复制
     *
     * @param entity
     * @param houseEntity
     */
    private void setHouseInfo(HouseEntity entity, HouseEntity houseEntity) {
        entity.setId(houseEntity.getId());
        entity.setHouseName(houseEntity.getHouseName());
    }
    /**
     * 住户值复制
     *
     * @param entity
     * @param householdEntity
     */
    private void setHouseholdInfo(HouseholdEntity entity, HouseholdEntity householdEntity) {
        entity.setId(householdEntity.getId());
        entity.setName(householdEntity.getName());
        entity.setPhoneNumber(householdEntity.getPhoneNumber());
        entity.setIdCard(householdEntity.getIdCard());
        entity.setCurrentAddress(householdEntity.getCurrentAddress());
    }
    @Override
    public Object plugin(Object target) {
        return Plugin.wrap(target, this);
    }
    @Override
    public void setProperties(Properties properties) {
    }
}
src/main/java/org/springblade/common/launch/LauncherServiceImpl.java
@@ -36,7 +36,7 @@
    public void launcher(SpringApplicationBuilder builder, String appName, String profile, boolean isLocalDev) {
        Properties props = System.getProperties();
        PropsUtil.setProperty(props, "spring.cloud.sentinel.transport.dashboard", LauncherConstant.sentinelAddr(profile));
        PropsUtil.setProperty(props, "spring.datasource.dynamic.enabled", "false");
        PropsUtil.setProperty(props, "spring.datasource.dynamic.enabled", "true");
        // 开启elk日志
        //PropsUtil.setProperty(props, "blade.log.elk.destination", LauncherConstant.elkAddr(profile));
    }
src/main/java/org/springblade/common/node/TreeIntegerNode.java
@@ -26,6 +26,12 @@
    private Integer id;
    /**
     * 主键ID
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Integer ids;
    /**
     * 名称
     */
    private String name;
src/main/java/org/springblade/common/node/TreeStringNode.java
@@ -38,6 +38,11 @@
    private String aoiCode;
    /**
     * 社区编码
     */
    private String neiCode;
    /**
     * 门牌类型
     */
    private String doorplateType;
@@ -94,4 +99,8 @@
     */
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private Boolean hasChildren;
    /**
     * 无诈类型
     */
    private Integer noExplosionCategory;
}
src/main/java/org/springblade/common/param/GridSet.java
New file
@@ -0,0 +1,98 @@
package org.springblade.common.param;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.util.Strings;
import org.springblade.common.cache.SysCache;
import org.springblade.common.utils.AuthUtils;
import org.springblade.common.utils.SpringUtils;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.utils.SpringUtil;
import org.springblade.modules.grid.entity.GridEntity;
import org.springblade.modules.grid.service.IGridService;
import org.springblade.modules.police.entity.PoliceAffairsGridEntity;
import org.springblade.modules.police.service.IPoliceAffairsGridService;
import org.springblade.modules.system.service.IRegionService;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.List;
public class GridSet<T> {
    /**
     * 获取警格网格的信息
     * @param clazz 类对象
     * @param t 对象数据
     * @param lngKey 经度属性key
     * @param latKey 纬度属性key
     * @param gridCodeKey 网格属性key
     * @param jwGirdCodeKey 警格属性key
     * @param <U>
     * @return
     */
    public <U> GridSet     invoke(Class<U> clazz, T t,String lngKey,String latKey,String gridCodeKey,String jwGirdCodeKey) {
        //获取传入对象信息
        U u = clazz.cast(t);
        try {
            Field lngField = null;
            Field latField = null;
            try {
                lngField = u.getClass().getDeclaredField(lngKey);
                latField = u.getClass().getDeclaredField(latKey);
            } catch (NoSuchFieldException e) {
                lngField = u.getClass().getSuperclass().getDeclaredField(lngKey);
                latField = u.getClass().getSuperclass().getDeclaredField(latKey);
            }
            // 获取点信息
            lngField.setAccessible(true);
            latField.setAccessible(true);
            String lng = lngField.get(t).toString();
            String lat = latField.get(t).toString();
            if (!Strings.isBlank(lng)) {
                // 拼接点
                String point = "'POINT(" + lng +" " + lat + ")'";
                // 判断是否分析网格
                if (!Strings.isBlank(gridCodeKey)) {
                    // 根据位置设置网格,警格编号
                    IGridService gridService = SpringUtils.getBean(IGridService.class);
                    Field gridCodeField = null;
                    try {
                        gridCodeField = u.getClass().getDeclaredField(gridCodeKey);
                    } catch (NoSuchFieldException e) {
                        gridCodeField = u.getClass().getSuperclass().getDeclaredField(gridCodeKey);
                    }
                    //点坐标解析网格
                    List<GridEntity> gridEntityList = gridService.spatialAnalysis(point);
                    if (gridEntityList.size() > 0) {
                        GridEntity gridEntity = gridEntityList.get(0);
                        gridCodeField.setAccessible(true);
                        gridCodeField.set(t, gridEntity.getGridCode());
                    }
                }
                // 判断是否分析警格
                if (!Strings.isBlank(jwGirdCodeKey)) {
                    IPoliceAffairsGridService policeAffairsGridService = SpringUtils.getBean(IPoliceAffairsGridService.class);
                    Field jwGridCodeField = null;
                    try {
                        jwGridCodeField = u.getClass().getDeclaredField(jwGirdCodeKey);
                    } catch (NoSuchFieldException e) {
                        jwGridCodeField = u.getClass().getSuperclass().getDeclaredField(jwGirdCodeKey);
                    }
                    //点坐标解析警格
                    List<PoliceAffairsGridEntity> policeAffairsGridEntityList = policeAffairsGridService.spatialAnalysis(point);
                    if (policeAffairsGridEntityList.size() > 0) {
                        PoliceAffairsGridEntity policeAffairsGridEntity = policeAffairsGridEntityList.get(0);
                        jwGridCodeField.setAccessible(true);
                        jwGridCodeField.set(t, policeAffairsGridEntity.getJwGridCode());
                    }
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        return this;
    }
}
src/main/java/org/springblade/common/param/ToObject.java
New file
@@ -0,0 +1,18 @@
package org.springblade.common.param;
import java.util.HashMap;
import java.util.Map;
public class ToObject {
    public static Map<String,Object> toMap(String... val){
        Map<String, Object> map = new HashMap<>();
        for (String value : val) {
            String[] split = value.split(":");
            map.put(split[0],split[1]);
        }
        return map;
    }
}
src/main/java/org/springblade/common/utils/AuthUtils.java
New file
@@ -0,0 +1,55 @@
package org.springblade.common.utils;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.utils.StringUtil;
public class AuthUtils extends AuthUtil {
    /**
     * 是否为公安管理员
     * @return
     */
    public static boolean isGaAdmin() {
        return StringUtil.containsAny(getUserRole(), new CharSequence[]{"gagly"});
    }
    /**
     * 是否为民警
     * @return
     */
    public static boolean isMj(String roleName) {
        return StringUtil.containsAny(roleName, new CharSequence[]{"mj"});
    }
    /**
     * 是否居民
     * @return
     */
    public static boolean isInhabitant(String roleName) {
        return StringUtil.containsAny(roleName, new CharSequence[]{"inhabitant"});
    }
    /**
     * 是否管理员角色
     * @return
     */
    public static boolean isAdmin(String roleName) {
        return StringUtil.containsAny(roleName, new CharSequence[]{"admin"});
    }
    /**
     * 街道、社区
     * @return
     */
    public static boolean isJd(String roleName) {
        return StringUtil.containsAny(roleName, new CharSequence[]{"jdgly","sqgly"});
    }
    /**
     * 是否超级或者管理员角色
     * @return
     */
    public static boolean isAdministratorOrAdmin(String roleName) {
        return isAdministrator() || isAdmin(roleName);
    }
}
src/main/java/org/springblade/common/utils/HttpClientUtils.java
New file
@@ -0,0 +1,597 @@
package org.springblade.common.utils;
import com.alibaba.fastjson.JSON;
import org.apache.http.HttpEntity;
import org.apache.http.NameValuePair;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.client.utils.URIBuilder;
import org.apache.http.config.Registry;
import org.apache.http.config.RegistryBuilder;
import org.apache.http.conn.socket.ConnectionSocketFactory;
import org.apache.http.conn.socket.PlainConnectionSocketFactory;
import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
import org.apache.http.conn.ssl.TrustStrategy;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.*;
import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.ssl.SSLContextBuilder;
import org.apache.http.util.EntityUtils;
import sun.misc.BASE64Encoder;
import javax.net.ssl.SSLContext;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.URL;
import java.security.KeyManagementException;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import java.util.*;
public class HttpClientUtils {
    /**
     * 执行有参GET请求
     *
     * @param url
     * @param params
     * @return
     */
    public static String doGet(String url, Map<String, String> params) {
//获取httpclient客户端
        CloseableHttpClient httpclient = HttpClients.createDefault();
        String resultString = "";
        CloseableHttpResponse response = null;
        try {
            URIBuilder builder = new URIBuilder(url);
            if (null != params) {
                for (String key : params.keySet()) {
                    builder.setParameter(key, params.get(key));
                }
            }
            HttpGet get = new HttpGet(builder.build());
            response = httpclient.execute(get);
            System.out.println(response.getStatusLine());
            if (200 == response.getStatusLine().getStatusCode()) {
                HttpEntity entity = response.getEntity();
                resultString = EntityUtils.toString(entity, "utf-8");
            }
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            if (null != response) {
                try {
                    response.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            if (null != httpclient) {
                try {
                    httpclient.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
        return resultString;
    }
    /**
     * 执行有参GET请求,带请求头
     *
     * @param url       请求url
     * @param params    参数
     * @param key       请求头Key
     * @param secretKey 秘钥
     * @return
     */
    public static String doGetHeader(String url, String key, String secretKey, Map<String, String> params) {
//获取httpclient客户端
        CloseableHttpClient httpclient = HttpClients.createDefault();
        String resultString = "";
        CloseableHttpResponse response = null;
        try {
            URIBuilder builder = new URIBuilder(url);
            if (null != params) {
                for (String keys : params.keySet()) {
                    builder.addParameter(keys, params.get(keys));
//builder.setParameter(keys, params.get(keys));
                }
            }
            HttpGet httpGet = new HttpGet(builder.build());
//设置请求头
            httpGet.addHeader(key, secretKey);
// 传输的类型
            httpGet.addHeader("Content-Type", "application/x-www-form-urlencoded");
//执行Http请求调用
            response = httpclient.execute(httpGet);
//判断是否请求成功返回
            if (200 == response.getStatusLine().getStatusCode()) {
                HttpEntity entity = response.getEntity();
                resultString = EntityUtils.toString(entity, "utf-8");
            }
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            if (null != response) {
                try {
                    response.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            if (null != httpclient) {
                try {
                    httpclient.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
        return resultString;
    }
    /**
     * 执行有参GET请求,带请求头,接收图片流
     *
     * @param url       请求url
     * @param params    参数
     * @param key       请求头Key
     * @param secretKey 秘钥
     * @return
     */
    public static String doGetHeaderPictureBase64(String url, String key, String secretKey, Map<String, String> params) {
//获取httpclient客户端
        CloseableHttpClient httpclient = HttpClients.createDefault();
        String resultString = "";
        CloseableHttpResponse response = null;
        try {
            URIBuilder builder = new URIBuilder(url);
            if (null != params) {
                for (String keys : params.keySet()) {
                    builder.addParameter(keys, params.get(keys));
                }
            }
            HttpGet httpGet = new HttpGet(builder.build());
//设置请求头
            httpGet.addHeader(key, secretKey);
// 传输的类型
            httpGet.addHeader("Content-Type", "application/x-www-form-urlencoded");
//执行Http请求调用
            response = httpclient.execute(httpGet);
// 将返回的图片或者文件转化成字节数组的形式
            byte[] data = EntityUtils.toByteArray(response.getEntity());
            BASE64Encoder encoder = new BASE64Encoder();
//String imageBase64 = "data:image/png;base64," + encoder.encodeBuffer(data).trim();
            return encoder.encodeBuffer(data).trim().replaceAll("\n", "").replaceAll("\r", "").replaceAll(" ", "");//删除 \r\n
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            if (null != response) {
                try {
                    response.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            if (null != httpclient) {
                try {
                    httpclient.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
        return resultString;
    }
    /**
     * 执行无参GET请求
     *
     * @param url
     * @return
     */
    public static String doGet(String url) {
        return doGet(url, null);
    }
    /**
     * 执行有参POST请求
     *
     * @param url
     * @param params
     * @return
     */
    public static String doPost(String url, Map<String, String> params) {
/**
 * 在4.0及以上httpclient版本中,post需要指定重定向的策略,如果不指定则按默认的重定向策略。
 *
 * 获取httpclient客户端
 */
        CloseableHttpClient httpclient = HttpClientBuilder.create().setRedirectStrategy(new LaxRedirectStrategy()).build();
        String resultString = "";
        CloseableHttpResponse response = null;
        try {
            HttpPost post = new HttpPost(url);
            List<NameValuePair> paramaters = new ArrayList<>();
            if (null != params) {
                for (String key : params.keySet()) {
                    paramaters.add(new BasicNameValuePair(key, params.get(key)));
                }
// 构造一个form表单式的实体
                UrlEncodedFormEntity formEntity = new UrlEncodedFormEntity(paramaters);
// 将请求实体设置到httpPost对象中
                post.setEntity(formEntity);
            }
/**
 * HTTP/1.1 403 Forbidden
 *   原因:
 *      有些网站,设置了反爬虫机制
 *   解决的办法:
 *      设置请求头,伪装浏览器
 */
            post.addHeader("user-agent", "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36");
            response = httpclient.execute(post);
            System.out.println(response.getStatusLine());
            if (200 == response.getStatusLine().getStatusCode()) {
                HttpEntity entity = response.getEntity();
                resultString = EntityUtils.toString(entity, "utf-8");
            }
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            if (null != response) {
                try {
                    response.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            if (null != httpclient) {
                try {
                    httpclient.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
        return resultString;
    }
    public static String doPost(String url) {
        return doPost(url, null);
    }
    public static void main(String[] args) {
        Map<String, String> params = new HashMap<>();
        params.put("scope", "project");
        params.put("q", "数据库");
//
//    System.out.println(doGet("http://www.baidu.com/s",params));
        /**
         * 有一部分网站,禁止爬虫技术访问网站。
         *
         * 解决方案:
         *    伪装浏览器
         *    post.addHeader("user-agent", "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36");
         */
        System.out.println(doPost("http://www.oschina.net/search", params));
    }
    /**
     * post 请求 header 带 秘钥
     *
     * @param url
     * @param appKey
     * @param appKeyValue
     * @param map
     * @return
     */
    public static String httpPost(String url, String appKey, String appKeyValue, Map<String, String> map) {
// 返回body
        String body = null;
// 获取连接客户端工具
        CloseableHttpClient httpClient = HttpClients.createDefault();
        CloseableHttpResponse httpResponse = null;
// 2、创建一个HttpPost请求
        HttpPost post = new HttpPost(url);
// 5、设置header信息
        /**header中通用属性*/
//        post.setHeader("Accept", "*/*");
//        post.setHeader("Accept-Encoding", "gzip, deflate");
//        post.setHeader("Cache-Control", "no-cache");
//        post.setHeader("Connection", "keep-alive");
        post.setHeader("Content-Type", "application/json;charset=UTF-8");
/**业务参数*/
        post.setHeader(appKey, appKeyValue);
// 设置参数
        if (map != null) {
            try {
                StringEntity entity1 = new StringEntity(JSON.toJSONString(map), "UTF-8");
                entity1.setContentEncoding("UTF-8");
                entity1.setContentType("json/form-data");
                post.setEntity(entity1);
// 7、执行post请求操作,并拿到结果
                httpResponse = httpClient.execute(post);
// 获取结果实体
                HttpEntity entity = httpResponse.getEntity();
                if (entity != null) {
// 按指定编码转换结果实体为String类型
                    body = EntityUtils.toString(entity, "UTF-8");
                }
                try {
                    httpResponse.close();
                    httpClient.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
        return body;
    }
    public static SSLContext createIgnoreVerifySSL() throws KeyManagementException, NoSuchAlgorithmException, KeyStoreException {
        SSLContext sc = new SSLContextBuilder().loadTrustMaterial(null, new TrustStrategy() {
            public boolean isTrusted(X509Certificate[] arg0, String arg1) throws CertificateException {
                return true;
            }
        }).build();
        return sc;
    }
    //适用于post请求并传送form-data数据(同样适用于post的Raw类型的application-json格式)
    public static String postParams(String url, String appKey, Map<String, String> map) {
        SSLContext sslcontext = null;
        try {
            sslcontext = createIgnoreVerifySSL();
        } catch (KeyManagementException e) {
            e.printStackTrace();
        } catch (NoSuchAlgorithmException e) {
            e.printStackTrace();
        } catch (KeyStoreException e) {
            e.printStackTrace();
        }
// 设置协议http和https对应的处理socket链接工厂的对象
        Registry<ConnectionSocketFactory> socketFactoryRegistry = RegistryBuilder.<ConnectionSocketFactory>create()
            .register("http", PlainConnectionSocketFactory.INSTANCE)
            .register("https", new SSLConnectionSocketFactory(sslcontext))
            .build();
        PoolingHttpClientConnectionManager connManager = new PoolingHttpClientConnectionManager(socketFactoryRegistry);
//创建自定义的httpclient对象
        CloseableHttpClient client = HttpClients.custom().setConnectionManager(connManager).build();
        HttpPost post = new HttpPost(url);
        post.setHeader("appKey", appKey);
        CloseableHttpResponse res = null;
        try {
            List<NameValuePair> nvps = new ArrayList<NameValuePair>();
            Set<String> keySet = map.keySet();
            for (String key : keySet) {
                nvps.add(new BasicNameValuePair(key, map.get(key)));
            }
            post.setEntity(new UrlEncodedFormEntity(nvps, "utf-8"));
            res = client.execute(post);
            HttpEntity entity = res.getEntity();
            return EntityUtils.toString(entity, "utf-8");
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            try {
                res.close();
                client.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return "";
    }
    //适用于post请求并传送form-data数据(同样适用于post的Raw类型的application-json格式)
    public static String postParams(String url, Map<String, Object> map) {
        SSLContext sslcontext = null;
        try {
            sslcontext = createIgnoreVerifySSL();
        } catch (KeyManagementException e) {
            e.printStackTrace();
        } catch (NoSuchAlgorithmException e) {
            e.printStackTrace();
        } catch (KeyStoreException e) {
            e.printStackTrace();
        }
// 设置协议http和https对应的处理socket链接工厂的对象
        Registry<ConnectionSocketFactory> socketFactoryRegistry = RegistryBuilder.<ConnectionSocketFactory>create()
            .register("http", PlainConnectionSocketFactory.INSTANCE)
            .register("https", new SSLConnectionSocketFactory(sslcontext))
            .build();
        PoolingHttpClientConnectionManager connManager = new PoolingHttpClientConnectionManager(socketFactoryRegistry);
//创建自定义的httpclient对象
        CloseableHttpClient client = HttpClients.custom().setConnectionManager(connManager).build();
        HttpPost post = new HttpPost(url);
//        post.setHeader(appKey, appKeyValue);
        CloseableHttpResponse res = null;
        try {
            List<NameValuePair> nvps = new ArrayList<NameValuePair>();
            Set<String> keySet = map.keySet();
            for (String key : keySet) {
                nvps.add(new BasicNameValuePair(key, map.get(key).toString()));
            }
            post.setEntity(new UrlEncodedFormEntity(nvps, "utf-8"));
            res = client.execute(post);
            HttpEntity entity = res.getEntity();
            return EntityUtils.toString(entity, "utf-8");
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            try {
                res.close();
                client.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return "";
    }
    /**
     * 向指定 URL 发送POST方法的请求
     *
     * @param url    发送请求的 URL
     * @param params 请求的参数集合
     * @return 远程资源的响应结果
     */
    @SuppressWarnings("unused")
    public static String sendPost(String url, Map<String, String> params) {
        OutputStreamWriter out = null;
        BufferedReader in = null;
        StringBuilder result = new StringBuilder();
        try {
            URL realUrl = new URL(url);
            HttpURLConnection conn = (HttpURLConnection) realUrl.openConnection();
// 发送POST请求必须设置如下两行
            conn.setDoOutput(true);
            conn.setDoInput(true);
// POST方法
            conn.setRequestMethod("POST");
// 设置通用的请求属性
            conn.setRequestProperty("accept", "*/*");
            conn.setRequestProperty("connection", "Keep-Alive");
            conn.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)");
            conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
            conn.connect();
// 获取URLConnection对象对应的输出流
            out = new OutputStreamWriter(conn.getOutputStream(), "UTF-8");
// 发送请求参数
            if (params != null) {
                StringBuilder param = new StringBuilder();
                for (Map.Entry<String, String> entry : params.entrySet()) {
                    if (param.length() > 0) {
                        param.append("&");
                    }
                    param.append(entry.getKey());
                    param.append("=");
                    param.append(entry.getValue());
// System.out.println(entry.getKey()+":"+entry.getValue());
                }
// System.out.println("param:"+param.toString());
                out.write(param.toString());
            }
// flush输出流的缓冲
            out.flush();
// 定义BufferedReader输入流来读取URL的响应
            in = new BufferedReader(new InputStreamReader(conn.getInputStream(), "UTF-8"));
            String line;
            while ((line = in.readLine()) != null) {
                result.append(line);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
// 使用finally块来关闭输出流、输入流
        finally {
            try {
                if (out != null) {
                    out.close();
                }
                if (in != null) {
                    in.close();
                }
            } catch (IOException ex) {
                ex.printStackTrace();
            }
        }
        return result.toString();
    }
    /**
     * json  body
     *
     * @param url
     * @param json
     * @return
     * @throws IOException
     */
    public static String httpPostWithjson(String url, String json) throws IOException {
        String result = "";
        HttpPost httpPost = new HttpPost(url);
        CloseableHttpClient httpClient = HttpClients.createDefault();
        try {
            BasicResponseHandler handler = new BasicResponseHandler();
            //解决中文乱码问题
            StringEntity entity = new StringEntity(json, "utf-8");
            entity.setContentEncoding("UTF-8");
            entity.setContentType("application/json");
            httpPost.setEntity(entity);
            result = httpClient.execute(httpPost, handler);
            return result;
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            try {
                httpClient.close();
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
        return result;
    }
}
src/main/java/org/springblade/common/utils/HttpUtils.java
New file
@@ -0,0 +1,39 @@
package org.springblade.common.utils;
import javax.servlet.http.HttpServletRequest;
import java.io.BufferedReader;
import java.io.IOException;
public class HttpUtils {
    /**
     * 将通知参数转化为字符串
     * @param request
     * @return
     */
    public static String readData(HttpServletRequest request) {
        BufferedReader br = null;
        try {
            StringBuilder result = new StringBuilder();
            br = request.getReader();
            for (String line; (line = br.readLine()) != null; ) {
                if (result.length() > 0) {
                    result.append("\n");
                }
                result.append(line);
            }
            return result.toString();
        } catch (IOException e) {
            throw new RuntimeException(e);
        } finally {
            if (br != null) {
                try {
                    br.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
    }
}
src/main/java/org/springblade/common/utils/ImageUtils.java
@@ -8,6 +8,7 @@
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
@@ -16,6 +17,44 @@
public class ImageUtils {
    /**
     * 几种常见的图片格式
     */
    public static String IMAGE_TYPE_GIF = "gif";// 图形交换格式
    public static String IMAGE_TYPE_JPG = "jpg";// 联合照片专家组
    public static String IMAGE_TYPE_JPEG = "jpeg";// 联合照片专家组
    public static String IMAGE_TYPE_BMP = "bmp";// 英文Bitmap(位图)的简写,它是Windows操作系统中的标准图像文件格式
    public static String IMAGE_TYPE_PNG = "png";// 可移植网络图形
    public static String IMAGE_TYPE_PSD = "psd";// Photoshop的专用格式Photoshop
    /**
     * 程序入口:用于测试
     * @param args
     */
    public static void main(String[] args) {
        // -图像类型转换:
        ImageUtils.convert("D:/IMG_20180811_222034.png", "jpg", "D:/test.jpg");//测试OK
    }
    /**
     * 图像类型转换:GIF->JPG、GIF->PNG、PNG->JPG、PNG->GIF(X)、BMP->PNG
     * @param srcImageFile 源图像地址
     * @param formatName 包含格式非正式名称的 String:如JPG、JPEG、GIF等
     * @param destImageFile 目标图像地址
     */
    public static void convert(String srcImageFile, String formatName, String destImageFile) {
        try {
            File f = new File(srcImageFile);
            f.canRead();
            f.canWrite();
            BufferedImage src = ImageIO.read(f);
            ImageIO.write(src, formatName, new File(destImageFile));
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
    public static String getBase64ByImgUrl(String url){
src/main/java/org/springblade/common/utils/NodeTreeUtil.java
@@ -6,10 +6,8 @@
import org.springblade.core.tool.node.TreeNode;
import org.springblade.modules.system.node.DeptUserTreeNode;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.stream.Collectors;
/**
 * node tree 工具类
@@ -110,6 +108,10 @@
    /**
     * map 转 tree 组织机构(父子id不会重复的情况,数据查询来自同一个表)
     *
     * 把部门用户树遍历一遍,每个值,查询他的parentId在不在用户部门树中。如果存在,就把这个加在下级
     * 最后最上级的parentId肯定不在用户部门树中,把最上级的加到新树里。返回新树
     *
     * @param treeMap
     * @return
     */
@@ -117,18 +119,25 @@
        List<DeptUserTreeNode> tree = new ArrayList<>();
        if (treeMap.size() > 1) {
            treeMap.forEach((id, treeNode) -> {
                //是否有下级
                if (!treeNode.getHasChildren()){
                    // 判断是否有绑定多个部门
                    // 多个部门拆分
                    List<String> asList = Arrays.asList(treeNode.getParentId().split(","));
                    //有多部门
                    if (asList.size()>1){
                        for (String parentId : asList) {
                            //用户部门树中存在该部门
                            if (treeMap.containsKey(parentId)) {
                                //把该对象放在该部门下
                                treeMap.get(parentId).getChildren().add(treeNode);
                            } else {
                                //不存在该部门,在新的树中加入
                                tree.add(treeNode);
                            }
                        }
                    }else {
                        if (treeMap.containsKey(treeNode.getParentId())) {
                            DeptUserTreeNode deptUserTreeNode =treeMap.get(treeNode.getParentId());
                            deptUserTreeNode.getChildren().add(treeNode);
@@ -137,6 +146,7 @@
                        }
                    }
                }else {
                    //有下级
                    if (treeMap.containsKey(treeNode.getParentId())) {
                        treeMap.get(treeNode.getParentId()).getChildren().add(treeNode);
                    } else {
@@ -145,6 +155,7 @@
                }
            });
        }
        return tree;
    }
}
src/main/java/org/springblade/common/utils/ParseMail.java
New file
@@ -0,0 +1,253 @@
package org.springblade.common.utils;
import javax.mail.*;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;
import javax.mail.internet.MimeMultipart;
import javax.mail.internet.MimeUtility;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.text.SimpleDateFormat;
import java.util.Date;
public class ParseMail {
    /**
     * 删除邮件
     *
     * @param messages 要解析的邮件列表
     */
    public static void deleteMessage(Message... messages) throws MessagingException, IOException {
        if (messages == null || messages.length < 1)
            throw new MessagingException("未找到要解析的邮件!");
        // 解析所有邮件
        for (int i = 0, count = messages.length; i < count; i++) {
            /**
             *   邮件删除
             */
            Message message = messages[i];
            String subject = message.getSubject();
            // set the DELETE flag to true
            message.setFlag(Flags.Flag.DELETED, true);
            System.out.println("Marked DELETE for message: " + subject);
        }
    }
    /**
     * 获得邮件主题
     *
     * @param msg 邮件内容
     * @return 解码后的邮件主题
     */
    public static String getSubject(MimeMessage msg) throws UnsupportedEncodingException, MessagingException {
        return MimeUtility.decodeText(msg.getSubject());
    }
    /**
     * 获得邮件发件人
     *
     * @param msg 邮件内容
     * @return 姓名 <Email地址>
     * @throws MessagingException
     * @throws UnsupportedEncodingException
     */
    public static String getFrom(MimeMessage msg) throws MessagingException, UnsupportedEncodingException {
        String from = "";
        Address[] froms = msg.getFrom();
        if (froms.length < 1)
            throw new MessagingException("没有发件人!");
        InternetAddress address = (InternetAddress) froms[0];
        String person = address.getPersonal();
        if (person != null) {
            person = MimeUtility.decodeText(person) + " ";
        } else {
            person = "";
        }
        from = person + "<" + address.getAddress() + ">";
        return from;
    }
    /**
     * 根据收件人类型,获取邮件收件人、抄送和密送地址。如果收件人类型为空,则获得所有的收件人
     * <p>Message.RecipientType.TO  收件人</p>
     * <p>Message.RecipientType.CC  抄送</p>
     * <p>Message.RecipientType.BCC 密送</p>
     *
     * @param msg  邮件内容
     * @param type 收件人类型
     * @return 收件人1 <邮件地址1>, 收件人2 <邮件地址2>, ...
     * @throws MessagingException
     */
    public static String getReceiveAddress(MimeMessage msg, Message.RecipientType type) throws MessagingException {
        StringBuffer receiveAddress = new StringBuffer();
        Address[] addresss = null;
        if (type == null) {
            addresss = msg.getAllRecipients();
        } else {
            addresss = msg.getRecipients(type);
        }
        if (addresss == null || addresss.length < 1)
            return null;
        for (Address address : addresss) {
            InternetAddress internetAddress = (InternetAddress) address;
            receiveAddress.append(internetAddress.toUnicodeString()).append(",");
        }
        receiveAddress.deleteCharAt(receiveAddress.length() - 1); //删除最后一个逗号
        return receiveAddress.toString();
    }
    /**
     * 获得邮件发送时间
     *
     * @param msg 邮件内容
     * @return yyyy年mm月dd日 星期X HH:mm
     * @throws MessagingException
     */
    public static String getSentDate(MimeMessage msg, String pattern) throws MessagingException {
        Date receivedDate = msg.getSentDate();
        if (receivedDate == null)
            return "";
        if (pattern == null || "".equals(pattern))
            pattern = "yyyy/MM/dd HH:mm ";
        return new SimpleDateFormat(pattern).format(receivedDate);
    }
    /**
     * 判断邮件中是否包含附件
     *
     * @return 邮件中存在附件返回true,不存在返回false
     * @throws MessagingException
     * @throws IOException
     */
    public static boolean isContainAttachment(Part part) throws MessagingException, IOException {
        boolean flag = false;
        if (part.isMimeType("multipart/*")) {
            MimeMultipart multipart = (MimeMultipart) part.getContent();
            int partCount = multipart.getCount();
            for (int i = 0; i < partCount; i++) {
                BodyPart bodyPart = multipart.getBodyPart(i);
                String disp = bodyPart.getDisposition();
                if (disp != null && (disp.equalsIgnoreCase(Part.ATTACHMENT) || disp.equalsIgnoreCase(Part.INLINE))) {
                    flag = true;
                } else if (bodyPart.isMimeType("multipart/*")) {
                    flag = isContainAttachment(bodyPart);
                } else {
                    String contentType = bodyPart.getContentType();
                    if (contentType.indexOf("application") != -1) {
                        flag = true;
                    }
                    if (contentType.indexOf("name") != -1) {
                        flag = true;
                    }
                }
                if (flag) break;
            }
        } else if (part.isMimeType("message/rfc822")) {
            flag = isContainAttachment((Part) part.getContent());
        }
        return flag;
    }
    /**
     * 判断邮件是否已读
     *
     * @param msg 邮件内容
     * @return 如果邮件已读返回true, 否则返回false
     * @throws MessagingException
     */
    public static boolean isSeen(MimeMessage msg) throws MessagingException {
        return msg.getFlags().contains(Flags.Flag.SEEN);
    }
    /**
     * 判断邮件是否需要阅读回执
     *
     * @param msg 邮件内容
     * @return 需要回执返回true, 否则返回false
     * @throws MessagingException
     */
    public static boolean isReplySign(MimeMessage msg) throws MessagingException {
        boolean replySign = false;
        String[] headers = msg.getHeader("Disposition-Notification-To");
        if (headers != null)
            replySign = true;
        return replySign;
    }
    /**
     * 获得邮件的优先级
     *
     * @param msg 邮件内容
     * @return 1(High):紧急  3:普通(Normal)  5:低(Low)
     * @throws MessagingException
     */
    public static String getPriority(MimeMessage msg) throws MessagingException {
        String priority = "普通";
        String[] headers = msg.getHeader("X-Priority");
        if (headers != null) {
            String headerPriority = headers[0];
            if (headerPriority.indexOf("1") != -1 || headerPriority.indexOf("High") != -1)
                priority = "紧急";
            else if (headerPriority.indexOf("5") != -1 || headerPriority.indexOf("Low") != -1)
                priority = "低";
            else
                priority = "普通";
        }
        return priority;
    }
    public static String getTextMultipart(Part part) throws Exception{
        if(part.isMimeType("text/html")){
            String content = (String) part.getContent();
            return content;
        }else if(part.isMimeType("text/plain")){
            String content = (String) part.getContent();
            return content;
        }
        return "";
    }
    /**
     * 获得邮件文本内容
     *
     * @param part    邮件体
     * @param content 存储邮件文本内容的字符串
     * @throws MessagingException
     * @throws IOException
     */
    public static void getMailTextContent(Part part, StringBuffer content) throws MessagingException, IOException {
        // 如果是文本类型的附件,通过getContent方法可以取到文本内容,但这不是我们需要的结果,所以在这里要做判断
        boolean isContainTextAttach = part.getContentType().indexOf("name") > 0;
        if (part.isMimeType("text/*") && !isContainTextAttach) {
            content.append(part.getContent().toString());
        } else if (part.isMimeType("message/rfc822")) {
            getMailTextContent((Part) part.getContent(), content);
        } else if (part.isMimeType("multipart/*")) {
            Object mpart = part.getContent();
            if (mpart instanceof Multipart) {
                Multipart multipart = (Multipart) part.getContent();
                int partCount = multipart.getCount();
                for (int i = 0; i < partCount; i++) {
                    BodyPart bodyPart = multipart.getBodyPart(i);
                    getMailTextContent(bodyPart, content);
                }
            }
        }
    }
}
src/main/java/org/springblade/common/utils/RoleUtil.java
New file
@@ -0,0 +1,31 @@
package org.springblade.common.utils;
import java.util.UUID;
public class RoleUtil {
    /**
     * 判断是否物业人员
     *
     * @return
     */
    public static boolean isProperty(String userRole) {
        if (userRole.contains("wygly") || userRole.contains("wyxmjl") || userRole.contains("wyfwry")) {
            return true;
        }
        return false;
    }
    /**
     * 判断是否网格人员
     *
     * @return
     */
    public static boolean isWgy(String userRole) {
        if (userRole.contains("wgy")) {
            return true;
        }
        return false;
    }
}
src/main/java/org/springblade/common/utils/SQLParseUtils.java
New file
@@ -0,0 +1,41 @@
package org.springblade.common.utils;
import java.util.regex.Pattern;
import java.util.regex.Matcher;
public class SQLParseUtils {
    public static String parseSQLType(String sql){
        if (sql==null){
            return null;
        }
        String type = sql.split(" ")[0];
        if (type.equalsIgnoreCase("INSERT")){
            return "INSERT";
        } else if (type.equalsIgnoreCase("UPDATE")) {
            return "UPDATE";
        } else if (type.equalsIgnoreCase("DELETE")) {
            return "DELETE";
        }else {
            return null;
        }
    }
    public static String getTableName(String sql) {
        String tableName = null;
        // 正则表达式匹配 INSERT、UPDATE 和 DELETE 语句
        String regex = "(?i)(?:INSERT\\s+INTO|UPDATE|DELETE\\s+FROM)\\s+(\\w+)";
        Pattern pattern = Pattern.compile(regex);
        Matcher matcher = pattern.matcher(sql.trim());
        if (matcher.find()) {
            tableName = matcher.group(1);
        }
        return tableName;
    }
    public static void main(String[] args) {
        String tableName = getTableName("INSERT INTO orders (customer_id, product_id, quantity) VALUES (789, 123, 5)");
        System.out.println(tableName);
    }
}
src/main/java/org/springblade/common/utils/SmsUtils.java
New file
@@ -0,0 +1,127 @@
package org.springblade.common.utils;
import liquibase.repackaged.org.apache.commons.lang3.text.StrSubstitutor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.HashMap;
import java.util.Map;
public class SmsUtils {
    private static Logger logger = LoggerFactory.getLogger(SmsUtils.class);
    public static String buildRequestXMLString(String id, String pwd, String serviceid, String phone, String content) {
        StringBuffer sb = new StringBuffer();
        sb.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>")
            .append("<svc_init ver=\"2.0.0\">")
            .append("<sms ver=\"2.0.0\">")
            .append("<client>")
            .append("<id>").append(id).append("</id>")
            .append("<pwd>").append(pwd).append("</pwd>")
            .append("<serviceid>").append(serviceid).append("</serviceid>")
            .append("</client>")
            .append("<sms_info>")
            .append("<phone>").append(phone).append("</phone>")
            .append("<content>").append(content).append("</content>")
            .append("</sms_info>")
            .append("</sms>")
            .append(" </svc_init>");
        logger.info("buildRequestXMLString:" + sb.toString());
        return sb.toString();
    }
    public static String postXMLSendSMSRequest(String servletUrl, String content) {
        String result = null;
        BufferedReader br = null;
        OutputStreamWriter out = null;
        HttpURLConnection con = null;
        try {
            URL url = new URL(servletUrl);
            con = (HttpURLConnection) url.openConnection();
            con.setDoOutput(true);
            con.setRequestMethod("POST");
            out = new OutputStreamWriter(con.getOutputStream(), "UTF-8");
            out.write(content);
            out.flush();
            br = new BufferedReader(new InputStreamReader(con.getInputStream(), "UTF-8"));
            String line = null;
            StringBuilder sb = new StringBuilder();
            while ((line = br.readLine()) != null) {
                sb.append(line);
            }
            result = sb.toString();
            System.out.println(result);
            logger.info("postXMLSendSMSRequest:" + result);
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            if (br != null) {
                try {
                    br.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            if (out != null) {
                try {
                    out.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            if (con != null) {
                con.disconnect();
                con = null;
            }
        }
        return result;
    }
    public static void send(String phone, Map<String, String> content) {
        StrSubstitutor strSubstitutor = new StrSubstitutor(content);
        String url3 = "【上饶基层自治】您正在验证投票操作,验证码:${code}。如非本人操作,则密码可能已泄露,建议立即修改密码或联系客服。";
        String context3 = strSubstitutor.replace(url3);
        String MAS_ID = "182";
        String PASSWORD = "bYcLgYwXOZspDzEnaGsNHAGUykKEiexknHY9H98xVTQ8Zbeya8bexQ==";
        String reqXML = buildRequestXMLString(MAS_ID, PASSWORD, "", phone, context3);
        postXMLSendSMSRequest("http://218.204.110.232:8080/emc/HttpSendSMSService", reqXML);
    }
    /**
     * @param args
     */
    public static void main(String[] args) {
        //下面的MAS_ID、PASSWORD仅供测试使用,正式使用由移动公司分配
        String MAS_ID = "182";
        String PASSWORD = "bYcLgYwXOZspDzEnaGsNHAGUykKEiexknHY9H98xVTQ8Zbeya8bexQ==";
        String reqXML = buildRequestXMLString(MAS_ID, PASSWORD, "", "18720768376", "测试短信");
        postXMLSendSMSRequest("http://218.204.110.232:8080/emc/HttpSendSMSService", reqXML);
    }
}
src/main/java/org/springblade/common/utils/SpinLockUtil.java
New file
@@ -0,0 +1,55 @@
package org.springblade.common.utils;
import org.springblade.core.redis.cache.BladeRedis;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.LockSupport;
@Component
public class SpinLockUtil {
    @Autowired
    private BladeRedis bladeRedis;
    private static final String LOCK_PREFIX = "thread-safe-lock:";
    private static final Long DEFAULT_LOCK_TIMEOUT = 6L; // 默认锁超时时间,单位:秒
    /**
     * 尝试获取锁,如果获取失败则自旋等待。
     *
     * @param lockKey 锁的键
     * @return 是否成功获取锁
     */
    public boolean tryLock(String lockKey) {
        String threadId = Thread.currentThread().getName() + Thread.currentThread().getId(); // 使用线程名和ID作为标识
        long startTime = System.currentTimeMillis();
        while (System.currentTimeMillis() - startTime < DEFAULT_LOCK_TIMEOUT * 1000) {
            if (bladeRedis.getRedisTemplate().opsForValue().setIfAbsent(LOCK_PREFIX + lockKey, threadId,
                DEFAULT_LOCK_TIMEOUT, TimeUnit.SECONDS)) {
                return true;
            }
            // 短暂休眠,避免高并发下的CPU过度消耗
            LockSupport.parkNanos(100_000_000L); // 使用LockSupport进行更细粒度的暂停,单位为纳秒
        }
        return false;
    }
    /**
     * 释放锁,只有加锁的线程才能解锁
     *
     * @param lockKey 锁的键
     * @return 是否成功释放锁
     */
    public boolean unlock(String lockKey) {
        String threadId = Thread.currentThread().getName() + Thread.currentThread().getId();
        String currentValue = (String) bladeRedis.getRedisTemplate().opsForValue().get(LOCK_PREFIX + lockKey);
        if (threadId.equals(currentValue)) {
            bladeRedis.getRedisTemplate().delete(LOCK_PREFIX + lockKey);
            return true;
        }
        return false; // 如果不是当前线程持有的锁,则返回false,不进行解锁操作
    }
}
src/main/java/org/springblade/common/utils/ThreadPoolUtil.java
New file
@@ -0,0 +1,40 @@
package org.springblade.common.utils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import org.springframework.stereotype.Component;
import java.util.concurrent.Callable;
import java.util.concurrent.Future;
@Component
public class ThreadPoolUtil {
    // 指定Ben名称注入
    @Qualifier("customThreadPool")
    @Autowired
    private ThreadPoolTaskExecutor executor;
    // @Autowired
    // public ThreadPoolUtil(ThreadPoolTaskExecutor executor) {
    //     this.executor = executor;
    // }
    /**
     * 提交一个Runnable任务到线程池执行
     * @param task 要执行的任务
     */
    public void execute(Runnable task) {
        executor.execute(task);
    }
    /**
     * 提交一个Callable任务到线程池执行,并返回Future对象用于获取结果
     * @param task 要执行的任务
     * @return Future对象
     */
    public <T> Future<T> submit(Callable<T> task) {
        return executor.submit(task);
    }
}
src/main/java/org/springblade/common/utils/UtilRandom.java
New file
@@ -0,0 +1,7 @@
package org.springblade.common.utils;
public class UtilRandom {
    public static Integer randomCount(Integer start, Integer end) {
        return (int) (Math.random() * (end - start + 1) + start);
    }
}
src/main/java/org/springblade/common/utils/WechatPay2ValidatorForRequest.java
New file
@@ -0,0 +1,114 @@
package org.springblade.common.utils;
import com.wechat.pay.contrib.apache.httpclient.auth.Verifier;
import org.apache.http.HttpEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.util.EntityUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.time.DateTimeException;
import java.time.Duration;
import java.time.Instant;
import static com.wechat.pay.contrib.apache.httpclient.constant.WechatPayHttpHeaders.*;
/**
 * @author xy-peng
 */
public class WechatPay2ValidatorForRequest {
    protected static final Logger log = LoggerFactory.getLogger(WechatPay2ValidatorForRequest.class);
    /**
     * 应答超时时间,单位为分钟
     */
    protected static final long RESPONSE_EXPIRED_MINUTES = 5;
    protected final Verifier verifier;
    protected final String requestId;
    protected final String body;
    public WechatPay2ValidatorForRequest(Verifier verifier, String requestId, String body) {
        this.verifier = verifier;
        this.requestId = requestId;
        this.body = body;
    }
    protected static IllegalArgumentException parameterError(String message, Object... args) {
        message = String.format(message, args);
        return new IllegalArgumentException("parameter error: " + message);
    }
    protected static IllegalArgumentException verifyFail(String message, Object... args) {
        message = String.format(message, args);
        return new IllegalArgumentException("signature verify fail: " + message);
    }
    public final boolean validate(HttpServletRequest request) throws IOException {
        try {
            //处理请求参数
            validateParameters(request);
            //构造验签名串
            String message = buildMessage(request);
            String serial = request.getHeader(WECHAT_PAY_SERIAL);
            String signature = request.getHeader(WECHAT_PAY_SIGNATURE);
            //验签
            if (!verifier.verify(serial, message.getBytes(StandardCharsets.UTF_8), signature)) {
                throw verifyFail("serial=[%s] message=[%s] sign=[%s], request-id=[%s]",
                        serial, message, signature, requestId);
            }
        } catch (IllegalArgumentException e) {
            log.warn(e.getMessage());
            return false;
        }
        return true;
    }
    protected final void validateParameters(HttpServletRequest request) {
        // NOTE: ensure HEADER_WECHAT_PAY_TIMESTAMP at last
        String[] headers = {WECHAT_PAY_SERIAL, WECHAT_PAY_SIGNATURE, WECHAT_PAY_NONCE, WECHAT_PAY_TIMESTAMP};
        String header = null;
        for (String headerName : headers) {
            header = request.getHeader(headerName);
            if (header == null) {
                throw parameterError("empty [%s], request-id=[%s]", headerName, requestId);
            }
        }
        //判断请求是否过期
        String timestampStr = header;
        try {
            Instant responseTime = Instant.ofEpochSecond(Long.parseLong(timestampStr));
            // 拒绝过期请求
            if (Duration.between(responseTime, Instant.now()).abs().toMinutes() >= RESPONSE_EXPIRED_MINUTES) {
                throw parameterError("timestamp=[%s] expires, request-id=[%s]", timestampStr, requestId);
            }
        } catch (DateTimeException | NumberFormatException e) {
            throw parameterError("invalid timestamp=[%s], request-id=[%s]", timestampStr, requestId);
        }
    }
    protected final String buildMessage(HttpServletRequest request) throws IOException {
        String timestamp = request.getHeader(WECHAT_PAY_TIMESTAMP);
        String nonce = request.getHeader(WECHAT_PAY_NONCE);
        return timestamp + "\n"
                + nonce + "\n"
                + body + "\n";
    }
    protected final String getResponseBody(CloseableHttpResponse response) throws IOException {
        HttpEntity entity = response.getEntity();
        return (entity != null && entity.isRepeatable()) ? EntityUtils.toString(entity) : "";
    }
}
src/main/java/org/springblade/common/utils/WeiXinSecurityUtil.java
New file
@@ -0,0 +1,321 @@
package org.springblade.common.utils;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.ByteArrayEntity;
import org.apache.http.entity.ContentType;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;
import org.springframework.web.multipart.MultipartFile;
import java.io.*;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.HashMap;
import java.util.Map;
import org.apache.commons.io.FileUtils;
import java.awt.image.BufferedImage;
import javax.imageio.ImageIO;
import net.coobird.thumbnailator.Thumbnails;
/**
 * 微信安全检验工具类
 */
public class WeiXinSecurityUtil {
    private static Integer IMG_WIDTH = 750;
    private static Integer IMG_HEIGHT = 1334;
    /**
     * 图片检测接口
     */
    private static String IMG_SEC_URL = "https://api.weixin.qq.com/wxa/img_sec_check?access_token=";
    //获取wxAccessToken
    private static String WX_GET_ACCESS_TOKEN = "https://api.weixin.qq.com/cgi-bin/token";
    private static String WX_APP_ID = "wx41aa8a5d2e565a05";
    private static String WX_SECRET = "e0e9218ac368cd4ca620ff4c7030f468";
    /**
     * 恶意图片过滤-校验图片是否含有违法违规内容
     * MultipartFile multipartFile, String accessToken
     * @param multipartFile
     * @return
     */
    public static String checkImg(MultipartFile multipartFile){
        String result = "";
        //压缩图片
        InputStream inputStream = compressImage(multipartFile);
        // 校验api url
        String url = IMG_SEC_URL + getWxAccessToken();
        // 获得Http客户端(可以理解为:你得先有一个浏览器;注意:实际上HttpClient与浏览器是不一样的
        HttpClient httpclient = HttpClients.createDefault();
        //创建一个post请求
        HttpPost request = new HttpPost(url);
        //设置响应头   ( application/octet-stream:二进制流,不知道下载文件类型)
        request.addHeader("Content-Type", "application/octet-stream");
        try {
            //创建一个byte数组,和输入的文件的大小一样
            byte[] byt = new byte[inputStream.available()];
            //从输入流中读取全部,并将其存储在缓冲区数组byt 中。
            inputStream.read(byt);
            //定制提交内容
            request.setEntity(new ByteArrayEntity(byt, ContentType.create("image/jpg")));
            //由客户端执行(发送)请求,执行校验
            HttpResponse response = httpclient.execute(request);
            // 从响应模型中获取响应实体
            HttpEntity entity = response.getEntity();
            result = EntityUtils.toString(entity, "UTF-8");// 转成string
            //打印校验结果
            System.out.println("result:" + result);
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            if(inputStream != null){
                try {
                    inputStream.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
        // 响应返回结果
        return result;
    }
    /**
     * 图片过滤检测
     * @param file 图片文件
     * @return
     */
    public String checkPic(MultipartFile file) {
        String access_token = "";
        String result = "";
        //自己写一个定时任务或其他方式 获取AccessToken
        try {
            access_token = getWxAccessToken();
            String url = "https://api.weixin.qq.com/wxa/img_sec_check?access_token=" + access_token;
            result = uploadFile(url, file);
            System.out.println("图片检测结果 = " + result);
        } catch (Exception e) {
            System.out.println("----------------调用腾讯内容过滤系统出错------------------" + e.getMessage());
        }
        // 返回
        return result;
    }
    /**
     * 上传二进制文件
     * @param graphurl 接口地址
     * @param file 图片文件
     * @return
     */
    public static String uploadFile(String graphurl,MultipartFile file) {
        String line = null;//接口返回的结果
        try {
            // 换行符
            final String newLine = "\r\n";
            final String boundaryPrefix = "--";
            // 定义数据分隔线
            String BOUNDARY = "========7d4a6d158c9";
            // 服务器的域名
            URL url = new URL(graphurl);
            HttpURLConnection conn = (HttpURLConnection) url.openConnection();
            // 设置为POST情
            conn.setRequestMethod("POST");
            // 发送POST请求必须设置如下两行
            conn.setDoOutput(true);
            conn.setDoInput(true);
            conn.setUseCaches(false);
            // 设置请求头参数
            conn.setRequestProperty("connection", "Keep-Alive");
            conn.setRequestProperty("Charsert", "UTF-8");
            conn.setRequestProperty("Content-Type","multipart/form-data; boundary=" + BOUNDARY);
            conn.setRequestProperty("User-Agent","Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1");
            OutputStream out = new DataOutputStream(conn.getOutputStream());
            // 上传文件
            StringBuilder sb = new StringBuilder();
            sb.append(boundaryPrefix);
            sb.append(BOUNDARY);
            sb.append(newLine);
            // 文件参数,photo参数名可以随意修改
            sb.append("Content-Disposition: form-data;name=\"image\";filename=\""
                + "https://api.weixin.qq.com" + "\"" + newLine);
            sb.append("Content-Type:application/octet-stream");
            // 参数头设置完以后需要两个换行,然后才是参数内容
            sb.append(newLine);
            sb.append(newLine);
            // 将参数头的数据写入到输出流中
            out.write(sb.toString().getBytes());
            // 读取文件数据
            out.write(file.getBytes());
            // 最后添加换行
            out.write(newLine.getBytes());
            // 定义最后数据分隔线,即--加上BOUNDARY再加上--。
            byte[] end_data = (newLine + boundaryPrefix + BOUNDARY
                + boundaryPrefix + newLine).getBytes();
            // 写上结尾标识
            out.write(end_data);
            out.flush();
            out.close();
            // 定义BufferedReader输入流来读取URL的响应
            BufferedReader reader = new BufferedReader(new InputStreamReader(
                conn.getInputStream()));
            while ((line = reader.readLine()) != null) {
                return line;
            }
        } catch (Exception e) {
            System.out.println("发送POST请求出现异常!" + e);
        }
        return line;
    }
    /**
     * 上传二进制文件
     * @param apiurl 接口地址
     * @param file 图片文件
     * @return
     */
    public static String uploadFile(String apiurl, byte[] file) {
        //接口返回的结果
        String line = null;
        try {
            // 换行符
            final String newLine = "\r\n";
            final String boundaryPrefix = "--";
            // 定义数据分隔线
            String BOUNDARY = "========7d4a6d158c9";
            // 服务器的域名
            URL url = new URL(apiurl);
            HttpURLConnection conn = (HttpURLConnection) url.openConnection();
            // 设置为POST情
            conn.setRequestMethod("POST");
            // 发送POST请求必须设置如下两行
            conn.setDoOutput(true);
            conn.setDoInput(true);
            conn.setUseCaches(false);
            // 设置请求头参数
            conn.setRequestProperty("connection", "Keep-Alive");
            conn.setRequestProperty("Charsert", "UTF-8");
            conn.setRequestProperty("Content-Type","multipart/form-data; boundary=" + BOUNDARY);
            conn.setRequestProperty("User-Agent","Mozilla/5.0 (iPhone; CPU iPhone OS 14_0_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/7.0.15(0x17000f31) NetType/WIFI Language/zh_CN");
            OutputStream out = new DataOutputStream(conn.getOutputStream());
            // 上传文件
            StringBuilder sb = new StringBuilder();
            sb.append(boundaryPrefix);
            sb.append(BOUNDARY);
            sb.append(newLine);
            // 文件参数,photo参数名可以随意修改
            sb.append("Content-Disposition: form-data;name=\"image\";filename=\""
                + "https://api.weixin.qq.com" + "\"" + newLine);
            sb.append("Content-Type:application/octet-stream");
            // 参数头设置完以后需要两个换行,然后才是参数内容
            sb.append(newLine);
            sb.append(newLine);
            // 将参数头的数据写入到输出流中
            out.write(sb.toString().getBytes());
            // 读取文件数据
            out.write(file);
            // 最后添加换行
            out.write(newLine.getBytes());
            // 定义最后数据分隔线,即--加上BOUNDARY再加上--。
            byte[] end_data = (newLine + boundaryPrefix + BOUNDARY
                + boundaryPrefix + newLine).getBytes();
            // 写上结尾标识
            out.write(end_data);
            out.flush();
            out.close();
            // 定义BufferedReader输入流来读取URL的响应
            BufferedReader reader = new BufferedReader(new InputStreamReader(
                conn.getInputStream()));
            while ((line = reader.readLine()) != null) {
                return line;
            }
        } catch (Exception e) {
            System.out.println("发送POST请求出现异常!" + e);
        }
        return line;
    }
    /**
     * 获取 WxAccessToken
     * @return
     */
    public static String getWxAccessToken() {
        //参数
        Map<String, String> params = new HashMap<>();
        params.put("grant_type", "client_credential");
        params.put("appid", WX_APP_ID);
        params.put("secret", WX_SECRET);
        String result = HttpClientUtils.doGet(WX_GET_ACCESS_TOKEN, params);
        JSONObject jsonObject = JSON.parseObject(result);
        String accessToken = jsonObject.getString("access_token");
        return accessToken;
    }
    /**
     * 压缩图片
     * @param multipartFile
     */
    public static InputStream compressImage(MultipartFile multipartFile){
        //*************对不是jpg格式的图片转换成jpg格式***************
        //获取文件名后缀,判断其格式
        int begin = multipartFile.getOriginalFilename().lastIndexOf(".");
        int last = multipartFile.getOriginalFilename().length();
        //获得文件后缀名
        String houzuiFileName = multipartFile.getOriginalFilename().substring(begin, last);
        //创建临时文件
        File tempFile = new File(multipartFile.getOriginalFilename());
        //写入临时File文件 tempFile,将multipartFile转换成File
        try {
            //import org.apache.commons.io.FileUtils;
            FileUtils.copyInputStreamToFile(multipartFile.getInputStream(), tempFile);
        } catch (IOException e) {
            e.printStackTrace();
        }
        //如果文件不是jpg格式,转换其格式
        if (!"jpg".equalsIgnoreCase(houzuiFileName)){
            //ImageUtils是一个工具类,下面给出
            //将png格式转换成jpg,输出到tempFile
            //测试OK
            ImageUtils.convert(multipartFile.getOriginalFilename(), "jpg", tempFile.getAbsolutePath());
            //*************对不是jpg格式的图片转换成jpg格式***************
        }
        try {
            //压缩图片
            BufferedImage bufferedImage = Thumbnails.of(tempFile)
                .size(740, 1330)//指定压缩之后的图片尺寸
                .outputQuality(0.8f)//图片压缩质量
                .asBufferedImage();
            ByteArrayOutputStream os = new ByteArrayOutputStream();
            ImageIO.write(bufferedImage, "jpg", os);
            InputStream inputStream = new ByteArrayInputStream(os.toByteArray());
//            System.out.println(inputStream);
            return inputStream;
        } catch (IOException e) {
            e.printStackTrace();
        }finally {
//             会在本地产生临时文件,用完后需要删除
            if (tempFile.exists()) {
                tempFile.delete();
            }
        }
        return null;
    }
}
src/main/java/org/springblade/common/utils/WordToPdfUtils.java
New file
@@ -0,0 +1,34 @@
package org.springblade.common.utils;
public class WordToPdfUtils {
    // https://srgdjczzxtpt.com:2080/gminio/jczz/upload/20240710/ade086b8d725a08631b62d812a63f6da.docx
    public static String wordToPdf(String fileName, String pdfPath) throws Exception {
        // 判断入参是否有空
        if (fileName == null || pdfPath == null) {
            throw new Exception("入参不能为空");
        }
        // 判断文件后缀名是否doc,ppt,xls
        if (fileName.endsWith(".doc") || fileName.endsWith(".docx")) {
            // 获取文件流
            // URL url = new URL(pdfPath);
            // HttpURLConnection connection = (HttpURLConnection) url.openConnection();
            // connection.setRequestProperty("User-Agent", "Mozilla/5.0");
            // // 获取文件名
            // String orFileName = fileName.substring(0, fileName.lastIndexOf("."));
            // InputStream inputStream = connection.getInputStream();
            // long timeMillis = System.currentTimeMillis();
            // // String filePathPdf = "/data/app/jczz/pdf/" + orFileName + "_" + timeMillis + ".pdf";
            // String filePathPdf = "D:\\公司\\" + orFileName + "_" + timeMillis + ".pdf";
            // com.aspose.words.Document doc = new com.aspose.words.Document(inputStream);
            // doc.save(filePathPdf, com.aspose.words.SaveFormat.PDF);
            return "";
        } else {
            throw new Exception("文件格式不正确");
        }
    }
    public static void main(String[] args) throws Exception {
        wordToPdf(" 测试.docx", "https://srgdjczzxtpt.com:2080/gminio/jczz/upload/20240710/ade086b8d725a08631b62d812a63f6da.docx");
    }
}
src/main/java/org/springblade/common/utils/sms/AlipayApiException.java
New file
@@ -0,0 +1,49 @@
/**
 * Alipay.com Inc.
 * Copyright (c) 2004-2012 All Rights Reserved.
 */
package org.springblade.common.utils.sms;
/**
 *
 * @author runzhi
 */
public class AlipayApiException extends Exception {
    private static final long serialVersionUID = -238091758285157331L;
    private String            errCode;
    private String            errMsg;
    public AlipayApiException() {
        super();
    }
    public AlipayApiException(String message, Throwable cause) {
        super(message, cause);
    }
    public AlipayApiException(String message) {
        super(message);
    }
    public AlipayApiException(Throwable cause) {
        super(cause);
    }
    public AlipayApiException(String errCode, String errMsg) {
        super(errCode + ":" + errMsg);
        this.errCode = errCode;
        this.errMsg = errMsg;
    }
    public String getErrCode() {
        return this.errCode;
    }
    public String getErrMsg() {
        return this.errMsg;
    }
}
src/main/java/org/springblade/common/utils/sms/AlipayConstants.java
New file
@@ -0,0 +1,97 @@
/**
 * Alipay.com Inc.
 * Copyright (c) 2004-2012 All Rights Reserved.
 */
package org.springblade.common.utils.sms;
/**
 *
 * @author runzhi
 */
public class AlipayConstants {
    public static final String SIGN_TYPE                      = "sign_type";
    public static final String SIGN_TYPE_RSA                  = "RSA";
    /**
     * sha256WithRsa 算法请求类型
     */
    public static final String SIGN_TYPE_RSA2                 = "RSA2";
    public static final String SIGN_ALGORITHMS                = "SHA1WithRSA";
    public static final String SIGN_SHA256RSA_ALGORITHMS      = "SHA256WithRSA";
    public static final String ENCRYPT_TYPE_AES               = "AES";
    public static final String APP_ID                         = "app_id";
    public static final String FORMAT                         = "format";
    public static final String METHOD                         = "method";
    public static final String TIMESTAMP                      = "timestamp";
    public static final String VERSION                        = "version";
    public static final String SIGN                           = "sign";
    public static final String ALIPAY_SDK                     = "alipay_sdk";
    public static final String ACCESS_TOKEN                   = "auth_token";
    public static final String APP_AUTH_TOKEN                 = "app_auth_token";
    public static final String TERMINAL_TYPE                  = "terminal_type";
    public static final String TERMINAL_INFO                  = "terminal_info";
    public static final String CHARSET                        = "charset";
    public static final String NOTIFY_URL                     = "notify_url";
    public static final String RETURN_URL                     = "return_url";
    public static final String ENCRYPT_TYPE                   = "encrypt_type";
    //-----===-------///
    public static final String BIZ_CONTENT_KEY                = "biz_content";
    /** 默认时间格式 **/
    public static final String DATE_TIME_FORMAT               = "yyyy-MM-dd HH:mm:ss";
    /**  Date默认时区 **/
    public static final String DATE_TIMEZONE                  = "GMT+8";
    /** UTF-8字符集 **/
    public static final String CHARSET_UTF8                   = "UTF-8";
    /** GBK字符集 **/
    public static final String CHARSET_GBK                    = "GBK";
    /** JSON 应格式 */
    public static final String FORMAT_JSON                    = "json";
    /** XML 应格式 */
    public static final String FORMAT_XML                     = "xml";
    /** SDK版本号 */
    public static final String SDK_VERSION                    = "alipay-sdk-java-3.6.0.ALL";
    public static final String PROD_CODE                      = "prod_code";
    /** 老版本失败节点 */
    public static final String ERROR_RESPONSE                 = "error_response";
    /** 新版本节点后缀 */
    public static final String RESPONSE_SUFFIX                = "_response";
    /** 加密后XML返回报文的节点名字 */
    public static final String RESPONSE_XML_ENCRYPT_NODE_NAME = "response_encrypted";
    /** 批量请求id **/
    public static final String BATCH_REQUEST_ID               = "batch_request_id";
}
src/main/java/org/springblade/common/utils/sms/AlipaySignature.java
New file
@@ -0,0 +1,607 @@
/**
 * Alipay.com Inc.
 * Copyright (c) 2004-2012 All Rights Reserved.
 */
package org.springblade.common.utils.sms;
import org.apache.commons.codec.binary.Base64;
import javax.crypto.Cipher;
import java.io.*;
import java.security.KeyFactory;
import java.security.PrivateKey;
import java.security.PublicKey;
import java.security.spec.InvalidKeySpecException;
import java.security.spec.PKCS8EncodedKeySpec;
import java.security.spec.X509EncodedKeySpec;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
/**
 *
 * @author runzhi
 */
public class AlipaySignature {
    /** RSA最大加密明文大小  */
    private static final int MAX_ENCRYPT_BLOCK = 117;
    /** RSA最大解密密文大小   */
    private static final int MAX_DECRYPT_BLOCK = 128;
    /**
     *
     * @param sortedParams
     * @return
     */
    public static String getSignContent(Map<String, String> sortedParams) {
        StringBuffer content = new StringBuffer();
        List<String> keys = new ArrayList<String>(sortedParams.keySet());
        Collections.sort(keys);
        int index = 0;
        for (int i = 0; i < keys.size(); i++) {
            String key = keys.get(i);
            String value = sortedParams.get(key);
            if (StringUtils.areNotEmpty(key, value)) {
                content.append((index == 0 ? "" : "&") + key + "=" + value);
                index++;
            }
        }
        return content.toString();
    }
    /**
     *  rsa内容签名
     *
     * @param content
     * @param privateKey
     * @param charset
     * @return
     * @throws AlipayApiException
     */
    public static String rsaSign(String content, String privateKey, String charset,
                                 String signType) throws AlipayApiException {
        if (AlipayConstants.SIGN_TYPE_RSA.equals(signType)) {
            return rsaSign(content, privateKey, charset);
        } else if (AlipayConstants.SIGN_TYPE_RSA2.equals(signType)) {
            return rsa256Sign(content, privateKey, charset);
        } else {
            throw new AlipayApiException("Sign Type is Not Support : signType=" + signType);
        }
    }
    /**
     * sha256WithRsa 加签
     *
     * @param content
     * @param privateKey
     * @param charset
     * @return
     * @throws AlipayApiException
     */
    public static String rsa256Sign(String content, String privateKey,
                                    String charset) throws AlipayApiException {
        try {
            PrivateKey priKey = getPrivateKeyFromPKCS8(AlipayConstants.SIGN_TYPE_RSA,
                new ByteArrayInputStream(privateKey.getBytes()));
            java.security.Signature signature = java.security.Signature
                .getInstance(AlipayConstants.SIGN_SHA256RSA_ALGORITHMS);
            signature.initSign(priKey);
            if (StringUtils.isEmpty(charset)) {
                signature.update(content.getBytes());
            } else {
                signature.update(content.getBytes(charset));
            }
            byte[] signed = signature.sign();
            return new String(Base64.encodeBase64(signed));
        } catch (Exception e) {
            throw new AlipayApiException("RSAcontent = " + content + "; charset = " + charset, e);
        }
    }
    /**
     * sha1WithRsa 加签
     *
     * @param content
     * @param privateKey
     * @param charset
     * @return
     * @throws AlipayApiException
     */
    public static String rsaSign(String content, String privateKey,
                                 String charset) throws AlipayApiException {
        try {
            PrivateKey priKey = getPrivateKeyFromPKCS8(AlipayConstants.SIGN_TYPE_RSA,
                new ByteArrayInputStream(privateKey.getBytes()));
            java.security.Signature signature = java.security.Signature
                .getInstance(AlipayConstants.SIGN_ALGORITHMS);
            signature.initSign(priKey);
            if (StringUtils.isEmpty(charset)) {
                signature.update(content.getBytes());
            } else {
                signature.update(content.getBytes(charset));
            }
            byte[] signed = signature.sign();
            return new String(Base64.encodeBase64(signed));
        } catch (InvalidKeySpecException ie) {
            throw new AlipayApiException("RSA私钥格式不正确,请检查是否正确配置了PKCS8格式的私钥", ie);
        } catch (Exception e) {
            throw new AlipayApiException("RSAcontent = " + content + "; charset = " + charset, e);
        }
    }
    public static String rsaSign(Map<String, String> params, String privateKey,
                                 String charset) throws AlipayApiException {
        String signContent = getSignContent(params);
        return rsaSign(signContent, privateKey, charset);
    }
    public static PrivateKey getPrivateKeyFromPKCS8(String algorithm,
                                                    InputStream ins) throws Exception {
        if (ins == null || StringUtils.isEmpty(algorithm)) {
            return null;
        }
        KeyFactory keyFactory = KeyFactory.getInstance(algorithm);
        byte[] encodedKey = StreamUtil.readText(ins).getBytes();
        encodedKey = Base64.decodeBase64(encodedKey);
        return keyFactory.generatePrivate(new PKCS8EncodedKeySpec(encodedKey));
    }
    public static String getSignCheckContentV1(Map<String, String> params) {
        if (params == null) {
            return null;
        }
        params.remove("sign");
        params.remove("sign_type");
        StringBuffer content = new StringBuffer();
        List<String> keys = new ArrayList<String>(params.keySet());
        Collections.sort(keys);
        for (int i = 0; i < keys.size(); i++) {
            String key = keys.get(i);
            String value = params.get(key);
            content.append((i == 0 ? "" : "&") + key + "=" + value);
        }
        return content.toString();
    }
    public static String getSignCheckContentV2(Map<String, String> params) {
        if (params == null) {
            return null;
        }
        params.remove("sign");
        StringBuffer content = new StringBuffer();
        List<String> keys = new ArrayList<String>(params.keySet());
        Collections.sort(keys);
        for (int i = 0; i < keys.size(); i++) {
            String key = keys.get(i);
            String value = params.get(key);
            content.append((i == 0 ? "" : "&") + key + "=" + value);
        }
        return content.toString();
    }
    public static boolean rsaCheckV1(Map<String, String> params, String publicKey,
                                     String charset) throws AlipayApiException {
        String sign = params.get("sign");
        String content = getSignCheckContentV1(params);
        return rsaCheckContent(content, sign, publicKey, charset);
    }
    public static boolean rsaCheckV1(Map<String, String> params, String publicKey,
            String charset,String signType) throws AlipayApiException {
        String sign = params.get("sign");
        String content = getSignCheckContentV1(params);
        return rsaCheck(content, sign, publicKey, charset,signType);
    }
    public static boolean rsaCheckV2(Map<String, String> params, String publicKey,
                                     String charset) throws AlipayApiException {
        String sign = params.get("sign");
        String content = getSignCheckContentV2(params);
        return rsaCheckContent(content, sign, publicKey, charset);
    }
    public static boolean rsaCheckV2(Map<String, String> params, String publicKey,
            String charset,String signType) throws AlipayApiException {
        String sign = params.get("sign");
        String content = getSignCheckContentV2(params);
        return rsaCheck(content, sign, publicKey, charset,signType);
    }
    public static boolean rsaCheck(String content, String sign, String publicKey, String charset,
                                   String signType) throws AlipayApiException {
        if (AlipayConstants.SIGN_TYPE_RSA.equals(signType)) {
            return rsaCheckContent(content, sign, publicKey, charset);
        } else if (AlipayConstants.SIGN_TYPE_RSA2.equals(signType)) {
            return rsa256CheckContent(content, sign, publicKey, charset);
        } else {
            throw new AlipayApiException("Sign Type is Not Support : signType=" + signType);
        }
    }
    public static boolean rsa256CheckContent(String content, String sign, String publicKey,
                                             String charset) throws AlipayApiException {
        try {
            PublicKey pubKey = getPublicKeyFromX509("RSA",
                new ByteArrayInputStream(publicKey.getBytes()));
            java.security.Signature signature = java.security.Signature
                .getInstance(AlipayConstants.SIGN_SHA256RSA_ALGORITHMS);
            signature.initVerify(pubKey);
            if (StringUtils.isEmpty(charset)) {
                signature.update(content.getBytes());
            } else {
                signature.update(content.getBytes(charset));
            }
            return signature.verify(Base64.decodeBase64(sign.getBytes()));
        } catch (Exception e) {
            throw new AlipayApiException(
                "RSAcontent = " + content + ",sign=" + sign + ",charset = " + charset, e);
        }
    }
    public static boolean rsaCheckContent(String content, String sign, String publicKey,
                                          String charset) throws AlipayApiException {
        try {
            PublicKey pubKey = getPublicKeyFromX509("RSA",
                new ByteArrayInputStream(publicKey.getBytes()));
            java.security.Signature signature = java.security.Signature
                .getInstance(AlipayConstants.SIGN_ALGORITHMS);
            signature.initVerify(pubKey);
            if (StringUtils.isEmpty(charset)) {
                signature.update(content.getBytes());
            } else {
                signature.update(content.getBytes(charset));
            }
            return signature.verify(Base64.decodeBase64(sign.getBytes()));
        } catch (Exception e) {
            throw new AlipayApiException(
                "RSAcontent = " + content + ",sign=" + sign + ",charset = " + charset, e);
        }
    }
    public static PublicKey getPublicKeyFromX509(String algorithm,
                                                 InputStream ins) throws Exception {
        KeyFactory keyFactory = KeyFactory.getInstance(algorithm);
        StringWriter writer = new StringWriter();
        StreamUtil.io(new InputStreamReader(ins), writer);
        byte[] encodedKey = writer.toString().getBytes();
        encodedKey = Base64.decodeBase64(encodedKey);
        return keyFactory.generatePublic(new X509EncodedKeySpec(encodedKey));
    }
    /**
     * 验签并解密
     * <p>
     * <b>目前适用于公众号</b><br>
     * params参数示例:
     * <br>{
     *    <br>biz_content=M0qGiGz+8kIpxe8aF4geWJdBn0aBTuJRQItLHo9R7o5JGhpic/MIUjvXo2BLB++BbkSq2OsJCEQFDZ0zK5AJYwvBgeRX30gvEj6eXqXRt16/IkB9HzAccEqKmRHrZJ7PjQWE0KfvDAHsJqFIeMvEYk1Zei2QkwSQPlso7K0oheo/iT+HYE8aTATnkqD/ByD9iNDtGg38pCa2xnnns63abKsKoV8h0DfHWgPH62urGY7Pye3r9FCOXA2Ykm8X4/Bl1bWFN/PFCEJHWe/HXj8KJKjWMO6ttsoV0xRGfeyUO8agu6t587Dl5ux5zD/s8Lbg5QXygaOwo3Fz1G8EqmGhi4+soEIQb8DBYanQOS3X+m46tVqBGMw8Oe+hsyIMpsjwF4HaPKMr37zpW3fe7xOMuimbZ0wq53YP/jhQv6XWodjT3mL0H5ACqcsSn727B5ztquzCPiwrqyjUHjJQQefFTzOse8snaWNQTUsQS7aLsHq0FveGpSBYORyA90qPdiTjXIkVP7mAiYiAIWW9pCEC7F3XtViKTZ8FRMM9ySicfuAlf3jtap6v2KPMtQv70X+hlmzO/IXB6W0Ep8DovkF5rB4r/BJYJLw/6AS0LZM9w5JfnAZhfGM2rKzpfNsgpOgEZS1WleG4I2hoQC0nxg9IcP0Hs+nWIPkEUcYNaiXqeBc=,
     *    <br>sign=rlqgA8O+RzHBVYLyHmrbODVSANWPXf3pSrr82OCO/bm3upZiXSYrX5fZr6UBmG6BZRAydEyTIguEW6VRuAKjnaO/sOiR9BsSrOdXbD5Rhos/Xt7/mGUWbTOt/F+3W0/XLuDNmuYg1yIC/6hzkg44kgtdSTsQbOC9gWM7ayB4J4c=,
     *    sign_type=RSA,
     *    <br>charset=UTF-8
     * <br>}
     * </p>
     * @param params
     * @param alipayPublicKey 支付宝公钥
     * @param cusPrivateKey   商户私钥
     * @param isCheckSign     是否验签
     * @param isDecrypt       是否解密
     * @return 解密后明文,验签失败则异常抛出
     * @throws AlipayApiException
     */
    public static String checkSignAndDecrypt(Map<String, String> params, String alipayPublicKey,
                                             String cusPrivateKey, boolean isCheckSign,
                                             boolean isDecrypt) throws AlipayApiException {
        String charset = params.get("charset");
        String bizContent = params.get("biz_content");
        if (isCheckSign) {
            if (!rsaCheckV2(params, alipayPublicKey, charset)) {
                throw new AlipayApiException("rsaCheck failure:rsaParams=" + params);
            }
        }
        if (isDecrypt) {
            return rsaDecrypt(bizContent, cusPrivateKey, charset);
        }
        return bizContent;
    }
    /**
     * 验签并解密
     * <p>
     * <b>目前适用于公众号</b><br>
     * params参数示例:
     * <br>{
     *    <br>biz_content=M0qGiGz+8kIpxe8aF4geWJdBn0aBTuJRQItLHo9R7o5JGhpic/MIUjvXo2BLB++BbkSq2OsJCEQFDZ0zK5AJYwvBgeRX30gvEj6eXqXRt16/IkB9HzAccEqKmRHrZJ7PjQWE0KfvDAHsJqFIeMvEYk1Zei2QkwSQPlso7K0oheo/iT+HYE8aTATnkqD/ByD9iNDtGg38pCa2xnnns63abKsKoV8h0DfHWgPH62urGY7Pye3r9FCOXA2Ykm8X4/Bl1bWFN/PFCEJHWe/HXj8KJKjWMO6ttsoV0xRGfeyUO8agu6t587Dl5ux5zD/s8Lbg5QXygaOwo3Fz1G8EqmGhi4+soEIQb8DBYanQOS3X+m46tVqBGMw8Oe+hsyIMpsjwF4HaPKMr37zpW3fe7xOMuimbZ0wq53YP/jhQv6XWodjT3mL0H5ACqcsSn727B5ztquzCPiwrqyjUHjJQQefFTzOse8snaWNQTUsQS7aLsHq0FveGpSBYORyA90qPdiTjXIkVP7mAiYiAIWW9pCEC7F3XtViKTZ8FRMM9ySicfuAlf3jtap6v2KPMtQv70X+hlmzO/IXB6W0Ep8DovkF5rB4r/BJYJLw/6AS0LZM9w5JfnAZhfGM2rKzpfNsgpOgEZS1WleG4I2hoQC0nxg9IcP0Hs+nWIPkEUcYNaiXqeBc=,
     *    <br>sign=rlqgA8O+RzHBVYLyHmrbODVSANWPXf3pSrr82OCO/bm3upZiXSYrX5fZr6UBmG6BZRAydEyTIguEW6VRuAKjnaO/sOiR9BsSrOdXbD5Rhos/Xt7/mGUWbTOt/F+3W0/XLuDNmuYg1yIC/6hzkg44kgtdSTsQbOC9gWM7ayB4J4c=,
     *    sign_type=RSA,
     *    <br>charset=UTF-8
     * <br>}
     * </p>
     * @param params
     * @param alipayPublicKey 支付宝公钥
     * @param cusPrivateKey   商户私钥
     * @param isCheckSign     是否验签
     * @param isDecrypt       是否解密
     * @return 解密后明文,验签失败则异常抛出
     * @throws AlipayApiException
     */
    public static String checkSignAndDecrypt(Map<String, String> params, String alipayPublicKey,
                                             String cusPrivateKey, boolean isCheckSign,
                                             boolean isDecrypt, String signType) throws AlipayApiException {
        String charset = params.get("charset");
        String bizContent = params.get("biz_content");
        if (isCheckSign) {
            if (!rsaCheckV2(params, alipayPublicKey, charset,signType)) {
                throw new AlipayApiException("rsaCheck failure:rsaParams=" + params);
            }
        }
        if (isDecrypt) {
            return rsaDecrypt(bizContent, cusPrivateKey, charset);
        }
        return bizContent;
    }
    /**
     * 加密并签名<br>
     * <b>目前适用于公众号</b>
     * @param bizContent      待加密、签名内容
     * @param alipayPublicKey 支付宝公钥
     * @param cusPrivateKey   商户私钥
     * @param charset         字符集,如UTF-8, GBK, GB2312
     * @param isEncrypt       是否加密,true-加密  false-不加密
     * @param isSign          是否签名,true-签名  false-不签名
     * @return 加密、签名后xml内容字符串
     * <p>
     * 返回示例:
     * <alipay>
     *  <response>密文</response>
     *  <encryption_type>RSA</encryption_type>
     *  <sign>sign</sign>
     *  <sign_type>RSA</sign_type>
     * </alipay>
     * </p>
     * @throws AlipayApiException
     */
    public static String encryptAndSign(String bizContent, String alipayPublicKey,
                                        String cusPrivateKey, String charset, boolean isEncrypt,
                                        boolean isSign) throws AlipayApiException {
        StringBuilder sb = new StringBuilder();
        if (StringUtils.isEmpty(charset)) {
            charset = AlipayConstants.CHARSET_GBK;
        }
        sb.append("<?xml version=\"1.0\" encoding=\"" + charset + "\"?>");
        if (isEncrypt) {// 加密
            sb.append("<alipay>");
            String encrypted = rsaEncrypt(bizContent, alipayPublicKey, charset);
            sb.append("<response>" + encrypted + "</response>");
            sb.append("<encryption_type>RSA</encryption_type>");
            if (isSign) {
                String sign = rsaSign(encrypted, cusPrivateKey, charset);
                sb.append("<sign>" + sign + "</sign>");
                sb.append("<sign_type>RSA</sign_type>");
            }
            sb.append("</alipay>");
        } else if (isSign) {// 不加密,但需要签名
            sb.append("<alipay>");
            sb.append("<response>" + bizContent + "</response>");
            String sign = rsaSign(bizContent, cusPrivateKey, charset);
            sb.append("<sign>" + sign + "</sign>");
            sb.append("<sign_type>RSA</sign_type>");
            sb.append("</alipay>");
        } else {// 不加密,不加签
            sb.append(bizContent);
        }
        return sb.toString();
    }
    /**
     * 加密并签名<br>
     * <b>目前适用于公众号</b>
     * @param bizContent      待加密、签名内容
     * @param alipayPublicKey 支付宝公钥
     * @param cusPrivateKey   商户私钥
     * @param charset         字符集,如UTF-8, GBK, GB2312
     * @param isEncrypt       是否加密,true-加密  false-不加密
     * @param isSign          是否签名,true-签名  false-不签名
     * @return 加密、签名后xml内容字符串
     * <p>
     * 返回示例:
     * <alipay>
     *  <response>密文</response>
     *  <encryption_type>RSA</encryption_type>
     *  <sign>sign</sign>
     *  <sign_type>RSA</sign_type>
     * </alipay>
     * </p>
     * @throws AlipayApiException
     */
    public static String encryptAndSign(String bizContent, String alipayPublicKey,
                                        String cusPrivateKey, String charset, boolean isEncrypt,
                                        boolean isSign,String signType) throws AlipayApiException {
        StringBuilder sb = new StringBuilder();
        if (StringUtils.isEmpty(charset)) {
            charset = AlipayConstants.CHARSET_GBK;
        }
        sb.append("<?xml version=\"1.0\" encoding=\"" + charset + "\"?>");
        if (isEncrypt) {// 加密
            sb.append("<alipay>");
            String encrypted = rsaEncrypt(bizContent, alipayPublicKey, charset);
            sb.append("<response>" + encrypted + "</response>");
            sb.append("<encryption_type>RSA</encryption_type>");
            if (isSign) {
                String sign = rsaSign(encrypted, cusPrivateKey, charset, signType);
                sb.append("<sign>" + sign + "</sign>");
                sb.append("<sign_type>");
                sb.append(signType);
                sb.append("</sign_type>");
            }
            sb.append("</alipay>");
        } else if (isSign) {// 不加密,但需要签名
            sb.append("<alipay>");
            sb.append("<response>" + bizContent + "</response>");
            String sign = rsaSign(bizContent, cusPrivateKey, charset, signType);
            sb.append("<sign>" + sign + "</sign>");
            sb.append("<sign_type>");
            sb.append(signType);
            sb.append("</sign_type>");
            sb.append("</alipay>");
        } else {// 不加密,不加签
            sb.append(bizContent);
        }
        return sb.toString();
    }
    /**
     * 公钥加密
     *
     * @param content   待加密内容
     * @param publicKey 公钥
     * @param charset   字符集,如UTF-8, GBK, GB2312
     * @return 密文内容
     * @throws AlipayApiException
     */
    public static String rsaEncrypt(String content, String publicKey,
                                    String charset) throws AlipayApiException {
        try {
            PublicKey pubKey = getPublicKeyFromX509(AlipayConstants.SIGN_TYPE_RSA,
                new ByteArrayInputStream(publicKey.getBytes()));
            Cipher cipher = Cipher.getInstance(AlipayConstants.SIGN_TYPE_RSA);
            cipher.init(Cipher.ENCRYPT_MODE, pubKey);
            byte[] data = StringUtils.isEmpty(charset) ? content.getBytes()
                : content.getBytes(charset);
            int inputLen = data.length;
            ByteArrayOutputStream out = new ByteArrayOutputStream();
            int offSet = 0;
            byte[] cache;
            int i = 0;
            // 对数据分段加密
            while (inputLen - offSet > 0) {
                if (inputLen - offSet > MAX_ENCRYPT_BLOCK) {
                    cache = cipher.doFinal(data, offSet, MAX_ENCRYPT_BLOCK);
                } else {
                    cache = cipher.doFinal(data, offSet, inputLen - offSet);
                }
                out.write(cache, 0, cache.length);
                i++;
                offSet = i * MAX_ENCRYPT_BLOCK;
            }
            byte[] encryptedData = Base64.encodeBase64(out.toByteArray());
            out.close();
            return StringUtils.isEmpty(charset) ? new String(encryptedData)
                : new String(encryptedData, charset);
        } catch (Exception e) {
            throw new AlipayApiException("EncryptContent = " + content + ",charset = " + charset,
                e);
        }
    }
    /**
     * 私钥解密
     *
     * @param content    待解密内容
     * @param privateKey 私钥
     * @param charset    字符集,如UTF-8, GBK, GB2312
     * @return 明文内容
     * @throws AlipayApiException
     */
    public static String rsaDecrypt(String content, String privateKey,
                                    String charset) throws AlipayApiException {
        try {
            PrivateKey priKey = getPrivateKeyFromPKCS8(AlipayConstants.SIGN_TYPE_RSA,
                new ByteArrayInputStream(privateKey.getBytes()));
            Cipher cipher = Cipher.getInstance(AlipayConstants.SIGN_TYPE_RSA);
            cipher.init(Cipher.DECRYPT_MODE, priKey);
            byte[] encryptedData = StringUtils.isEmpty(charset)
                ? Base64.decodeBase64(content.getBytes())
                : Base64.decodeBase64(content.getBytes(charset));
            int inputLen = encryptedData.length;
            ByteArrayOutputStream out = new ByteArrayOutputStream();
            int offSet = 0;
            byte[] cache;
            int i = 0;
            // 对数据分段解密
            while (inputLen - offSet > 0) {
                if (inputLen - offSet > MAX_DECRYPT_BLOCK) {
                    cache = cipher.doFinal(encryptedData, offSet, MAX_DECRYPT_BLOCK);
                } else {
                    cache = cipher.doFinal(encryptedData, offSet, inputLen - offSet);
                }
                out.write(cache, 0, cache.length);
                i++;
                offSet = i * MAX_DECRYPT_BLOCK;
            }
            byte[] decryptedData = out.toByteArray();
            out.close();
            return StringUtils.isEmpty(charset) ? new String(decryptedData)
                : new String(decryptedData, charset);
        } catch (Exception e) {
            throw new AlipayApiException("EncodeContent = " + content + ",charset = " + charset, e);
        }
    }
}
src/main/java/org/springblade/common/utils/sms/PerfectSend.java
New file
@@ -0,0 +1,91 @@
package org.springblade.common.utils.sms;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
 * 完美发送任务对象 perfect_send
 *
 * @author chen
 * @date 2021-06-23
 */
public class PerfectSend
{
    private static final long serialVersionUID = 1L;
    /** 通知时间间隔 */
    private String timeInterval;
    /** 通知次数 */
    private int sendNum;
    /** 通知内容 */
    private String sendContent;
    /** 发送用户 */
    private String phones;
    /** 优先级 */
    private Integer priority;
    /** 创建者 */
    private String createBy;
    public String getTimeInterval() {
        return timeInterval;
    }
    public void setTimeInterval(String timeInterval) {
        this.timeInterval = timeInterval;
    }
    public int getSendNum() {
        return sendNum;
    }
    public void setSendNum(int sendNum) {
        this.sendNum = sendNum;
    }
    public String getSendContent() {
        return sendContent;
    }
    public void setSendContent(String sendContent) {
        this.sendContent = sendContent;
    }
    public String getPhones() {
        return phones;
    }
    public void setPhones(String phones) {
        this.phones = phones;
    }
    public Integer getPriority() {
        return priority;
    }
    public void setPriority(Integer priority) {
        this.priority = priority;
    }
    public String getCreateBy() {
        return createBy;
    }
    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }
    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("timeInterval", getTimeInterval())
            .append("sendNum", getSendNum())
            .append("sendContent", getSendContent())
            .append("createBy", getCreateBy())
            .toString();
    }
}
src/main/java/org/springblade/common/utils/sms/ReplyContent.java
New file
@@ -0,0 +1,63 @@
package org.springblade.common.utils.sms;
import java.util.Date;
/**
 * 回复内容对象 reply_content
 *
 * @author chen
 * @date 2021-06-24
 */
public class ReplyContent {
    /**
     * 发送号码
     */
    private String sendPhones;
    /**
     * 上行记录时间-起始
     */
    private String createTimeStart;
    /**
     * 上行记录时间-结束
     */
    private String createTimeEnd;
    /**
     * 创建者
     */
    private String sopCreateBy;
    public String getSendPhones() {
        return sendPhones;
    }
    public void setSendPhones(String sendPhones) {
        this.sendPhones = sendPhones;
    }
    public String getCreateTimeStart() {
        return createTimeStart;
    }
    public void setCreateTimeStart(String createTimeStart) {
        this.createTimeStart = createTimeStart;
    }
    public String getCreateTimeEnd() {
        return createTimeEnd;
    }
    public void setCreateTimeEnd(String createTimeEnd) {
        this.createTimeEnd = createTimeEnd;
    }
    public String getSopCreateBy() {
        return sopCreateBy;
    }
    public void setSopCreateBy(String sopCreateBy) {
        this.sopCreateBy = sopCreateBy;
    }
}
src/main/java/org/springblade/common/utils/sms/StatusReport.java
New file
@@ -0,0 +1,91 @@
package org.springblade.common.utils.sms;
import java.util.Date;
/**
 * 状态报告对象 status_report
 *
 * @author chen
 * @date 2021-06-24
 */
public class StatusReport
{
    /**
     * 接收号码
     */
    private String phones;
    /**
     * 发送类型(0相同内容,1不同内容,2完美发送)
     */
    private int type;
    /**
     * 发送时间-起始
     */
    private String sendTimeStart;
    /**
     * 发送时间-结束
     */
    private String sendTimeEnd;
    /**
     * 发送类型
     */
    private int parentType;
    /**
     * 创建者
     */
    private String sopCreateBy;
    public String getPhones() {
        return phones;
    }
    public void setPhones(String phones) {
        this.phones = phones;
    }
    public int getType() {
        return type;
    }
    public void setType(int type) {
        this.type = type;
    }
    public String getSendTimeStart() {
        return sendTimeStart;
    }
    public void setSendTimeStart(String sendTimeStart) {
        this.sendTimeStart = sendTimeStart;
    }
    public String getSendTimeEnd() {
        return sendTimeEnd;
    }
    public void setSendTimeEnd(String sendTimeEnd) {
        this.sendTimeEnd = sendTimeEnd;
    }
    public int getParentType() {
        return parentType;
    }
    public void setParentType(int parentType) {
        this.parentType = parentType;
    }
    public String getSopCreateBy() {
        return sopCreateBy;
    }
    public void setSopCreateBy(String sopCreateBy) {
        this.sopCreateBy = sopCreateBy;
    }
}
src/main/java/org/springblade/common/utils/sms/StreamUtil.java
New file
@@ -0,0 +1,135 @@
/**
 * Alipay.com Inc.
 * Copyright (c) 2004-2012 All Rights Reserved.
 */
package org.springblade.common.utils.sms;
import java.io.*;
/**
 *
 * @author runzhi
 */
public class StreamUtil {
    private StreamUtil(){}
    private static final int DEFAULT_BUFFER_SIZE = 8192;
    public static void io(InputStream in, OutputStream out) throws IOException {
        io(in, out, -1);
    }
    public static void io(InputStream in, OutputStream out, int bufferSize) throws IOException {
        if (bufferSize == -1) {
            bufferSize = DEFAULT_BUFFER_SIZE;
        }
        byte[] buffer = new byte[bufferSize];
        int amount;
        while ((amount = in.read(buffer)) >= 0) {
            out.write(buffer, 0, amount);
        }
    }
    public static void io(Reader in, Writer out) throws IOException {
        io(in, out, -1);
    }
    public static void io(Reader in, Writer out, int bufferSize) throws IOException {
        if (bufferSize == -1) {
            bufferSize = DEFAULT_BUFFER_SIZE >> 1;
        }
        char[] buffer = new char[bufferSize];
        int amount;
        while ((amount = in.read(buffer)) >= 0) {
            out.write(buffer, 0, amount);
        }
    }
    public static OutputStream synchronizedOutputStream(OutputStream out) {
        return new SynchronizedOutputStream(out);
    }
    public static OutputStream synchronizedOutputStream(OutputStream out, Object lock) {
        return new SynchronizedOutputStream(out, lock);
    }
    public static String readText(InputStream in) throws IOException {
        return readText(in, null, -1);
    }
    public static String readText(InputStream in, String encoding) throws IOException {
        return readText(in, encoding, -1);
    }
    public static String readText(InputStream in, String encoding, int bufferSize)
                                                                                  throws IOException {
        Reader reader = (encoding == null) ? new InputStreamReader(in) : new InputStreamReader(in,
            encoding);
        return readText(reader, bufferSize);
    }
    public static String readText(Reader reader) throws IOException {
        return readText(reader, -1);
    }
    public static String readText(Reader reader, int bufferSize) throws IOException {
        StringWriter writer = new StringWriter();
        io(reader, writer, bufferSize);
        return writer.toString();
    }
    private static class SynchronizedOutputStream extends OutputStream {
        private OutputStream out;
        private Object       lock;
        SynchronizedOutputStream(OutputStream out) {
            this(out, out);
        }
        SynchronizedOutputStream(OutputStream out, Object lock) {
            this.out = out;
            this.lock = lock;
        }
        @Override
        public void write(int datum) throws IOException {
            synchronized (lock) {
                out.write(datum);
            }
        }
        @Override
        public void write(byte[] data) throws IOException {
            synchronized (lock) {
                out.write(data);
            }
        }
        @Override
        public void write(byte[] data, int offset, int length) throws IOException {
            synchronized (lock) {
                out.write(data, offset, length);
            }
        }
        @Override
        public void flush() throws IOException {
            synchronized (lock) {
                out.flush();
            }
        }
        @Override
        public void close() throws IOException {
            synchronized (lock) {
                out.close();
            }
        }
    }
}
src/main/java/org/springblade/common/utils/sms/StringUtils.java
New file
@@ -0,0 +1,171 @@
package org.springblade.common.utils.sms;
/**
 * 字符串工具类。
 *
 * @author carver.gu
 * @since 1.0, Sep 12, 2009
 */
public abstract class StringUtils {
    private StringUtils() {}
    /**
     * 检查指定的字符串是否为空。
     * <ul>
     * <li>SysUtils.isEmpty(null) = true</li>
     * <li>SysUtils.isEmpty("") = true</li>
     * <li>SysUtils.isEmpty("   ") = true</li>
     * <li>SysUtils.isEmpty("abc") = false</li>
     * </ul>
     *
     * @param value 待检查的字符串
     * @return true/false
     */
    public static boolean isEmpty(String value) {
        int strLen;
        if (value == null || (strLen = value.length()) == 0) {
            return true;
        }
        for (int i = 0; i < strLen; i++) {
            if ((Character.isWhitespace(value.charAt(i)) == false)) {
                return false;
            }
        }
        return true;
    }
    /**
     * 检查对象是否为数字型字符串,包含负数开头的。
     */
    public static boolean isNumeric(Object obj) {
        if (obj == null) {
            return false;
        }
        char[] chars = obj.toString().toCharArray();
        int length = chars.length;
        if(length < 1) {
            return false;
        }
        int i = 0;
        if(length > 1 && chars[0] == '-') {
            i = 1;
        }
        for (; i < length; i++) {
            if (!Character.isDigit(chars[i])) {
                return false;
            }
        }
        return true;
    }
    /**
     * 检查指定的字符串列表是否不为空。
     */
    public static boolean areNotEmpty(String... values) {
        boolean result = true;
        if (values == null || values.length == 0) {
            result = false;
        } else {
            for (String value : values) {
                result &= !isEmpty(value);
            }
        }
        return result;
    }
    /**
     * 把通用字符编码的字符串转化为汉字编码。
     */
    public static String unicodeToChinese(String unicode) {
        StringBuilder out = new StringBuilder();
        if (!isEmpty(unicode)) {
            for (int i = 0; i < unicode.length(); i++) {
                out.append(unicode.charAt(i));
            }
        }
        return out.toString();
    }
    /**
     * 过滤不可见字符
     */
    public static String stripNonValidXMLCharacters(String input) {
        if (input == null || ("".equals(input))) {
            return "";
        }
        StringBuilder out = new StringBuilder();
        char current;
        for (int i = 0; i < input.length(); i++) {
            current = input.charAt(i);
            if ((current == 0x9) || (current == 0xA) || (current == 0xD)
                    || ((current >= 0x20) && (current <= 0xD7FF))
                    || ((current >= 0xE000) && (current <= 0xFFFD))
                    || ((current >= 0x10000) && (current <= 0x10FFFF))) {
                out.append(current);
            }
        }
        return out.toString();
    }
    public static String leftPad(String str, int size, char padChar) {
        if (str == null) {
            return null;
        } else {
            int pads = size - str.length();
            if (pads <= 0) {
                return str;
            } else {
                return pads > 8192 ? leftPad(str, size, String.valueOf(padChar)) : padding(pads, padChar).concat(str);
            }
        }
    }
    public static String leftPad(String str, int size, String padStr) {
        if (str == null) {
            return null;
        } else {
            if (isEmpty(padStr)) {
                padStr = " ";
            }
            int padLen = padStr.length();
            int strLen = str.length();
            int pads = size - strLen;
            if (pads <= 0) {
                return str;
            } else if (padLen == 1 && pads <= 8192) {
                return leftPad(str, size, padStr.charAt(0));
            } else if (pads == padLen) {
                return padStr.concat(str);
            } else if (pads < padLen) {
                return padStr.substring(0, pads).concat(str);
            } else {
                char[] padding = new char[pads];
                char[] padChars = padStr.toCharArray();
                for(int i = 0; i < pads; ++i) {
                    padding[i] = padChars[i % padLen];
                }
                return (new String(padding)).concat(str);
            }
        }
    }
    private static String padding(int repeat, char padChar) throws IndexOutOfBoundsException {
        if (repeat < 0) {
            throw new IndexOutOfBoundsException("Cannot pad a negative amount: " + repeat);
        } else {
            char[] buf = new char[repeat];
            for(int i = 0; i < buf.length; ++i) {
                buf[i] = padChar;
            }
            return new String(buf);
        }
    }
}
src/main/java/org/springblade/es/config/ElasticsearchConfig.java
New file
@@ -0,0 +1,24 @@
package org.springblade.es.config;
import org.springframework.beans.factory.annotation.Value;
import org.apache.http.HttpHost;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestClientBuilder;
import org.elasticsearch.client.RestHighLevelClient;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
@ConditionalOnProperty(value = "elasticsearch.enabled")
public class ElasticsearchConfig {
    @Value("${elasticsearch.host}")
    private String elasticsearchHost;
    @Bean
    public RestHighLevelClient elasticsearchClient() {
        RestClientBuilder builder = RestClient.builder(new HttpHost(elasticsearchHost, 9200, "http"));
        return new RestHighLevelClient(builder);
    }
}
src/main/java/org/springblade/es/config/ElasticsearchInitializer.java
New file
@@ -0,0 +1,24 @@
package org.springblade.es.config;
import org.springblade.es.service.ElasticsearchIndexInitializer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;
// 暂时关闭
//@Component
public class ElasticsearchInitializer implements CommandLineRunner {
    private final ElasticsearchIndexInitializer indexInitializer;
    @Autowired
    public ElasticsearchInitializer(ElasticsearchIndexInitializer indexInitializer) {
        this.indexInitializer = indexInitializer;
    }
    @Override
    public void run(String... args) {
        String indexName = "your_index_name";
        String mappingJson = "{\"properties\":{\"your_field\":{\"type\":\"text\"}}}";
        indexInitializer.initializeIndex(indexName, mappingJson);
    }
}
src/main/java/org/springblade/es/controller/EsController.java
New file
@@ -0,0 +1,84 @@
package org.springblade.es.controller;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.Api;
import lombok.AllArgsConstructor;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.secure.annotation.PreAuth;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.constant.RoleConstant;
import org.springblade.core.tool.utils.Func;
import org.springblade.es.service.ElasticsearchDocumentService;
import org.springblade.es.vo.EsParam;
import org.springframework.web.bind.annotation.*;
/**
 * es 全文检索
 */
@RestController
@RequestMapping("/es/es")
@AllArgsConstructor
@Api(value = "es 全文检索", tags = "es 全文检索")
public class EsController {
    private final ElasticsearchDocumentService elasticsearchDocumentService;
    /**
     * 查询
     */
    @GetMapping("/page")
    @ApiOperationSupport(order = 1)
    public R page(EsParam esParam, Query query) {
        return R.data(elasticsearchDocumentService.selectDocumentPage(Condition.getPage(query), esParam));
    }
    /**
     * 初始化
     */
    @GetMapping("/init")
    @PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR)
    @ApiOperationSupport(order = 2)
    public R init(EsParam esParam) {
        return R.status(elasticsearchDocumentService.init(esParam));
    }
//    /**
//     * 新增数据
//     */
//    @GetMapping("/add")
//    @ApiOperationSupport(order = 3)
//    public R add(EsParam esParam) {
//        return R.status(elasticsearchDocumentService.add(esParam,null));
//    }
//
//    /**
//     * 修改数据
//     */
//    @GetMapping("/update")
//    @ApiOperationSupport(order = 4)
//    public R update(EsParam esParam) {
//        elasticsearchDocumentService.update(esParam,null,null);
//        return R.status(true);
//    }
    /**
     * 根据索引删除
     */
    @PostMapping("/removeBatchByIndexNames")
    @ApiOperationSupport(order = 5)
    @PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR)
    public R removeBatchByIndexNames(@RequestParam String indexNames) {
        return R.status(elasticsearchDocumentService.removeBatchByIndexNames(Func.toStrList(indexNames)));
    }
    /**
     * 根据条件删除
     */
    @PostMapping("/removeByQuery")
    @PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR)
    @ApiOperationSupport(order = 6)
    public R removeByQuery(EsParam esParam) {
        return R.status(elasticsearchDocumentService.removeByQuery(esParam));
    }
}
src/main/java/org/springblade/es/service/ElasticsearchDocumentService.java
New file
@@ -0,0 +1,787 @@
package org.springblade.es.service;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.logging.log4j.util.Strings;
import org.elasticsearch.action.admin.indices.delete.DeleteIndexRequest;
import org.elasticsearch.action.admin.indices.refresh.RefreshRequest;
import org.elasticsearch.action.bulk.BulkRequest;
import org.elasticsearch.action.bulk.BulkResponse;
import org.elasticsearch.action.index.IndexRequest;
import org.elasticsearch.action.index.IndexResponse;
import org.elasticsearch.action.search.SearchRequest;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.action.support.master.AcknowledgedResponse;
import org.elasticsearch.client.RequestOptions;
import org.elasticsearch.client.RestHighLevelClient;
import org.elasticsearch.client.indices.GetIndexRequest;
import org.elasticsearch.index.query.BoolQueryBuilder;
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.index.reindex.BulkByScrollResponse;
import org.elasticsearch.index.reindex.DeleteByQueryRequest;
import org.elasticsearch.index.reindex.UpdateByQueryRequest;
import org.elasticsearch.script.Script;
import org.elasticsearch.script.ScriptType;
import org.elasticsearch.search.SearchHit;
import org.elasticsearch.search.SearchHits;
import org.elasticsearch.search.builder.SearchSourceBuilder;
import org.springblade.common.cache.SysCache;
import org.springblade.common.constant.EsTableConstant;
import org.springblade.common.param.CommonParamSet;
import org.springblade.common.utils.SpringUtils;
import org.springblade.es.vo.EsParam;
import org.springblade.modules.article.entity.Article;
import org.springblade.modules.article.service.ArticleService;
import org.springblade.modules.doorplateAddress.entity.DoorplateAddressEntity;
import org.springblade.modules.doorplateAddress.service.IDoorplateAddressService;
import org.springblade.modules.grid.service.IGridRangeService;
import org.springblade.modules.house.entity.HouseEntity;
import org.springblade.modules.house.entity.HouseholdEntity;
import org.springblade.modules.house.service.IHouseService;
import org.springblade.modules.house.service.IHouseholdService;
import org.springblade.modules.house.vo.HouseVO;
import org.springblade.modules.house.vo.HouseholdVO;
import org.springblade.modules.place.entity.PlaceEntity;
import org.springblade.modules.place.service.IPlaceService;
import org.springblade.modules.place.vo.PlaceVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Service
public class ElasticsearchDocumentService<T> {
    @Autowired
    private RestHighLevelClient client;
    @Autowired
    private ArticleService articleService;
    @Autowired
    private IPlaceService placeService;
    @Autowired
    private IHouseService houseService;
    @Autowired
    private IHouseholdService householdService;
    @Autowired
    private IGridRangeService gridRangeService;
    @Autowired
    private IDoorplateAddressService doorplateAddressService;
    @Value("${elasticsearch.sync}")
    private boolean elasticsearchSync;
    @Value("${elasticsearch.indexName}")
    private String indexName;
    /**
     * 检查索引是否已存在
     *
     * @param indexName
     * @return
     */
    public boolean isIndexExists(String indexName) {
        // 检查索引是否已存在
        GetIndexRequest request = new GetIndexRequest(indexName);
        try {
            return client.indices().exists(request, RequestOptions.DEFAULT);
        } catch (IOException e) {
            e.printStackTrace();
        }
        return false;
    }
    /**
     * 初始化数据
     *
     * @param esParam
     * @return
     */
    public boolean init(EsParam esParam) {
        if (!Strings.isBlank(esParam.getTableName())) {
            if (esParam.getTableName().equals("jczz_place")) {
                // 场所
                initPlace(esParam);
            }
            if (esParam.getTableName().equals("jczz_article")) {
                // 通知文章
                initArticle(esParam);
            }
            if (esParam.getTableName().equals("jczz_house")) {
                // 房屋
                initHouse(esParam);
            }
            if (esParam.getTableName().equals("jczz_household")) {
                // 住户
                initHousehold(esParam);
            }
        }
        // 返回
        return true;
    }
    /**
     * 初始化数据
     *
     * @param esParam
     * @return
     */
    public boolean initPlace(EsParam esParam) {
        // 查询
        int total = placeService.getAllListTotal();
        int size = 1000;
        int num = total / size;
        for (int i = 1; i <= num + 1; i++) {
            List<PlaceVO> placeVOList = placeService.getAllList((i - 1) * size, size);
            // 遍历
            if (placeVOList.size() > 0) {
                // 创建批量请求对象
                BulkRequest bulkRequest = new BulkRequest();
                for (PlaceVO place : placeVOList) {
                    // 入es库
                    // 初始化Elasticsearch客户端
                    IndexRequest indexRequest = new IndexRequest(esParam.getIndexName());
                    // 不设置id
                    // indexRequest.id("1");
                    indexRequest.source(
                        "tableId", place.getId().toString(),
                        "tableName", "jczz_place",
                        "title", place.getPlaceName(),
                        "name", place.getPrincipal(),
                        "phone", place.getPrincipalPhone(),
                        "idCard", place.getPrincipalIdCard(),
                        "content", place.getLocation(),
                        "communityCode", place.getCommunityCode()
                    );
                    // 加入集合
                    bulkRequest.add(indexRequest);
                }
                BulkResponse bulkResponse = null;
                try {
                    // 执行批量插入
                    bulkResponse = client.bulk(bulkRequest, RequestOptions.DEFAULT);
                    // 刷新索引,确保文档可搜索
                    client.indices().refresh(new RefreshRequest(esParam.getIndexName()), RequestOptions.DEFAULT);
                } catch (IOException e) {
//                    e.printStackTrace();
                }
//                System.out.println("批量插入结果: " + !bulkResponse.hasFailures());
            }
        }
        // 返回
        return true;
    }
    /**
     * 初始化公告数据
     *
     * @param esParam
     * @return
     */
    public boolean initArticle(EsParam esParam) {
        // 查询
        int total = articleService.getAllListTotal();
        int size = 10;
        int num = total / size;
        for (int i = 1; i <= num + 1; i++) {
            // 查询
            List<Article> articleList = articleService.getAllList((i - 1) * size, size);
            // 遍历
            if (articleList.size() > 0) {
                BulkRequest bulkRequest = new BulkRequest();
                for (Article article : articleList) {
                    // 初始化Elasticsearch客户端
                    IndexRequest indexRequest = new IndexRequest(esParam.getIndexName());
                    String communityNameListString
                        = SysCache.getAllCommunityNameListString(article.getArticleRange(),article.getId().toString());
                    Map<String, Object> map = new HashMap<>(1);
                    map.put("communityCode",communityNameListString);
                    String toString = new JSONObject(map).toString();
                    // 不设置id
                    // indexRequest.id("1");
                    indexRequest.source("tableId", article.getId().toString(),
                        "tableName", "jczz_article",
                        "title", article.getTitle(),
                        "communityCode", toString,
                        "type", null != article.getType() ? article.getType().toString() : "",
                        "content", article.getContent(),
                        "articleType", article.getArticleType());
                    // 加入集合
                    bulkRequest.add(indexRequest);
                }
                BulkResponse bulkResponse = null;
                try {
                    // 执行批量插入
                    bulkResponse = client.bulk(bulkRequest, RequestOptions.DEFAULT);
                    // 刷新索引,确保文档可搜索
                    client.indices().refresh(new RefreshRequest(esParam.getIndexName()), RequestOptions.DEFAULT);
                } catch (IOException e) {
//                    e.printStackTrace();
                }
//                System.out.println("批量插入结果: " + !bulkResponse.hasFailures());
            }
        }
        // 返回
        return true;
    }
    /**
     * 初始化住户数据
     *
     * @param esParam
     * @return
     */
    public boolean initHousehold(EsParam esParam) {
        // 查询
        int total = householdService.getAllListTotal();
        int size = 1000;
        int num = total / size;
        for (int i = 1; i <= num + 1; i++) {
            // 查询
            List<HouseholdVO> householdVOList = householdService.getAllList((i - 1) * size, size);
            // 遍历
            if (householdVOList.size() > 0) {
                BulkRequest bulkRequest = new BulkRequest();
                for (HouseholdVO household : householdVOList) {
                    // 初始化Elasticsearch客户端
                    IndexRequest indexRequest = new IndexRequest(esParam.getIndexName());
                    // 不设置id
                    // indexRequest.id("1");
                    indexRequest.source(
                        "tableId", household.getId().toString(),
                        "tableName", "jczz_household",
                        "title", household.getName(),
                        "relationship", household.getRelationship(),
                        "name", household.getName(),
                        "phone", household.getPhoneNumber(),
                        "idCard", household.getIdCard(),
                        "content", household.getAddress(),
                        "communityCode", household.getCommunityCode()
                    );
                    // 加入集合
                    bulkRequest.add(indexRequest);
                }
                BulkResponse bulkResponse = null;
                try {
                    // 执行批量插入
                    bulkResponse = client.bulk(bulkRequest, RequestOptions.DEFAULT);
                    // 刷新索引,确保文档可搜索
                    client.indices().refresh(new RefreshRequest(esParam.getIndexName()), RequestOptions.DEFAULT);
                } catch (IOException e) {
//                    e.printStackTrace();
                }
//                System.out.println("批量插入结果: " + !bulkResponse.hasFailures());
            }
        }
        // 返回
        return true;
    }
    /**
     * 初始化房屋数据
     *
     * @param esParam
     * @return
     */
    public boolean initHouse(EsParam esParam) {
        // 查询
        int total = houseService.getAllListTotal();
        int size = 1000;
        int num = total / size;
        for (int i = 1; i <= num + 1; i++) {
            // 查询
            List<HouseVO> houseVOList = houseService.getAllList((i - 1) * size, size);
            // 遍历
            if (houseVOList.size() > 0) {
                BulkRequest bulkRequest = new BulkRequest();
                for (HouseVO house : houseVOList) {
                    // 初始化Elasticsearch客户端
                    IndexRequest indexRequest = new IndexRequest(esParam.getIndexName());
                    // 不设置id
                    // indexRequest.id("1");
                    indexRequest.source(
                        "tableId", house.getId().toString(),
                        "tableName", "jczz_house",
                        "title", house.getHouseName(),
                        "name", null,
                        "phone", null,
                        "idCard", null,
                        "content", null,
                        "communityCode", house.getCommunityCode()
                    );
                    // 加入集合
                    bulkRequest.add(indexRequest);
                }
                BulkResponse bulkResponse = null;
                try {
                    // 执行批量插入
                    bulkResponse = client.bulk(bulkRequest, RequestOptions.DEFAULT);
                    // 刷新索引,确保文档可搜索
                    client.indices().refresh(new RefreshRequest(esParam.getIndexName()), RequestOptions.DEFAULT);
                } catch (IOException e) {
//                    e.printStackTrace();
                }
//                System.out.println("批量插入结果: " + !bulkResponse.hasFailures());
            }
        }
        // 返回
        return true;
    }
    /**
     * 新增公告同步
     *
     * @param esParam
     * @param article
     */
    @Async
    public void addArticle(EsParam esParam, Article article) {
        if (elasticsearchSync) {
            // 查询当前文章范围对应的社区名称字符串集合
            String communityNameListString = SysCache.getAllCommunityNameListString(article.getArticleRange(),article.getId().toString());
            Map<String, Object> map = new HashMap<>(1);
            map.put("communityCode",communityNameListString);
            String toString = new JSONObject(map).toString();
            try {
                indexDocument(esParam.getIndexName(),
                    "tableId", article.getId().toString(),
                    "tableName", "jczz_article",
                    "title", article.getTitle(),
                    "communityCode", toString,
                    "type", null != article.getType() ? article.getType().toString() : "",
                    "content", article.getContent(),
                    "articleType", article.getArticleType()
                );
            } catch (IOException e) {
//                e.printStackTrace();
            }
        }
    }
    /**
     * 新增场所同步
     *
     * @param esParam
     * @param place
     */
    @Async
    public void addPlace(EsParam esParam, PlaceEntity place) {
        if (elasticsearchSync) {
            try {
                indexDocument(esParam.getIndexName(),
                    "tableId", place.getId().toString(),
                    "tableName", "jczz_place",
                    "title", place.getPlaceName(),
                    "name", place.getPrincipal(),
                    "phone", place.getPrincipalPhone(),
                    "idCard", place.getPrincipalIdCard(),
                    "content", place.getLocation(),
                    "communityCode", placeService.getCommunityCode(place.getId())
                );
            } catch (IOException e) {
//                e.printStackTrace();
            }
        }
    }
    /**
     * 新增房屋同步
     *
     * @param esParam
     * @param house
     */
    @Async
    public void addHouse(EsParam esParam, HouseEntity house) {
        if (elasticsearchSync) {
            try {
                indexDocument(esParam.getIndexName(),
                    "tableId", house.getId().toString(),
                    "tableName", "jczz_house",
                    "title", house.getHouseName(),
                    "name", null,
                    "phone", null,
                    "idCard", null,
                    "content", null,
                    "communityCode", houseService.getCommunityCode(house.getId())
                );
            } catch (IOException e) {
//                e.printStackTrace();
            }
        }
    }
    /**
     * 新增住户同步
     *
     * @param esParam
     * @param household
     */
    @Async
    public void addHousehold(EsParam esParam, HouseholdEntity household) {
        if (elasticsearchSync) {
            // 如果关系为空,则默认为19
            if (household.getRelationship() == null) {
                household.setRelationship(19);
            }
            try {
                indexDocument(esParam.getIndexName(),
                    "tableId", household.getId().toString(),
                    "tableName", "jczz_household",
                    "title", household.getName(),
                    "name", household.getName(),
                    "phone", household.getPhoneNumber(),
                    "idCard", household.getIdCard(),
                    "relationship", household.getRelationship().toString(),
                    "content", getAddress(household),
                    "communityCode", householdService.getCommunityCode(household.getId())
                );
            } catch (IOException e) {
//                e.printStackTrace();
            }
        }
    }
    /**
     * 获取房屋地址
     * @param household
     * @return
     */
    public String getAddress(HouseholdEntity household) {
        if (!Strings.isBlank(household.getHouseCode())){
            // 查询对应的房屋地址
            QueryWrapper<DoorplateAddressEntity> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("address_code",household.getHouseCode());
            List<DoorplateAddressEntity> list = doorplateAddressService.list(queryWrapper);
            if (list.size()>0){
                return list.get(0).getAddressName();
            }
            // 房屋查不到的情况
            if (!Strings.isBlank(household.getCurrentAddress())){
                return household.getCurrentAddress();
            }
        }else {
            return household.getCurrentAddress();
        }
        return null;
    }
    /**
     * 插入数据到es
     *
     * @param index
     * @param values
     * @throws IOException
     */
    public void indexDocument(String index, String... values) throws IOException {
        // 初始化Elasticsearch客户端
        IndexRequest indexRequest = new IndexRequest(index);
        // 不设置id
//        indexRequest.id("1");
        indexRequest.source(values);
        IndexResponse indexResponse = client.index(indexRequest, RequestOptions.DEFAULT);
        // 刷新索引,确保文档可搜索
        client.indices().refresh(new RefreshRequest(index), RequestOptions.DEFAULT);
        System.out.println("Indexed document with id: " + indexResponse.getId());
    }
    /**
     * 查询数据
     *
     * @param page
     * @param esParam
     * @return
     */
    public Object selectDocumentPage(IPage<Object> page, EsParam esParam) {
        if (Strings.isBlank(esParam.getIndexName())){
            esParam.setIndexName(indexName);
        }
        // 判断索引是否存在
        if (isIndexExists(esParam.getIndexName())) {
            // 全文搜索
            SearchRequest searchRequest = new SearchRequest(esParam.getIndexName());
            SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder();
            //        searchSourceBuilder.query(QueryBuilders.multiMatchQuery(esParam.getSearchKey(),
            //            "content",
            //            "name",
            //            "title",
            //            "location",
            //            "phone",
            //            "idCard",
            //            "communityCode")
            //            .type(MultiMatchQueryBuilder.Type.BEST_FIELDS)
            //        );
            BoolQueryBuilder boolQueryBuilder = QueryBuilders.boolQuery();
//            boolQueryBuilder.should(QueryBuilders.matchQuery("content", esParam.getSearchKey()));
//            boolQueryBuilder.should(QueryBuilders.matchQuery("name", esParam.getSearchKey()));
            boolQueryBuilder.should(QueryBuilders.matchPhraseQuery("title", esParam.getSearchKey()));
//            boolQueryBuilder.should(QueryBuilders.matchQuery("location", esParam.getSearchKey()));
//            boolQueryBuilder.should(QueryBuilders.matchQuery("phone", esParam.getSearchKey()));
//            boolQueryBuilder.should(QueryBuilders.matchQuery("idCard", esParam.getSearchKey()));
            if (!Strings.isBlank(esParam.getTableName())) {
                boolQueryBuilder.must(QueryBuilders.matchQuery("tableName", esParam.getTableName()));
            }
            String roleName = SpringUtils.getRequestParam("roleName");
            String communityCode = SpringUtils.getRequestParam("communityCode");
            if (!Strings.isBlank(communityCode)) {
                if (!Strings.isBlank(roleName) && roleName.equals("inhabitant") && !Strings.isBlank(esParam.getHouseCode())){
                    // 居民根据房屋对应的小区过滤
                    boolQueryBuilder.must(QueryBuilders.matchPhraseQuery("communityCode",gridRangeService.getDistrictIdByHouseCode(esParam.getHouseCode())));
                }else {
                    // 设置查询社区名称,编号有多个,数字类型目前无法匹配到
                    boolQueryBuilder.must(QueryBuilders.matchPhraseQuery("communityCode", communityCode));
                }
            }
            if (!Strings.isBlank(roleName)){
                if (roleName.equals("wgy") || roleName.equals("mj")){
                    // 不查公告
                    boolQueryBuilder.mustNot(QueryBuilders.matchQuery("tableName", "jczz_article"));
                }
                if (roleName.equals("inhabitant")){
                    // 只查公告
                    boolQueryBuilder.must(QueryBuilders.matchQuery("tableName", "jczz_article"));
                }
                if (roleName.equals("wzcj")){
                    // 只查场所
                    boolQueryBuilder.must(QueryBuilders.matchQuery("tableName", "jczz_place"));
                }
            }
            boolQueryBuilder.minimumShouldMatch(1);
            searchSourceBuilder.query(boolQueryBuilder);
            int current = (int) page.getCurrent();
            int size = (int) page.getSize();
            //设置分页
            searchSourceBuilder.size(size);
            searchSourceBuilder.from((current - 1) * size);
            //将搜索资源对象设置到搜索客户端中
            searchRequest.source(searchSourceBuilder);
            //查询
            SearchResponse searchResponse = null;
            try {
                searchResponse = client.search(searchRequest, RequestOptions.DEFAULT);
            } catch (IOException e) {
                e.printStackTrace();
            }
            //解析搜索返回值
            SearchHits searchHits = searchResponse.getHits();
            //查询的总数
            long count = searchHits.getTotalHits().value;
            List<Object> list = new ArrayList<>();
            for (SearchHit hit : searchHits) {
//                System.out.println("hit.getId() = " + hit.getId());
                Map<String, Object> result = hit.getSourceAsMap();
                if (null != result){
                    if (result.get("tableName").toString().equals("jczz_article")){
                        result.put("typeName","通知公告");
                    }
                    if (result.get("tableName").toString().equals("jczz_place")){
                        result.put("typeName","经营场所");
                    }
                    if (result.get("tableName").toString().equals("jczz_house")){
                        result.put("typeName","房屋");
                    }
                    if (result.get("tableName").toString().equals("jczz_household")){
                        result.put("typeName","住户");
                    }
                }
                // 文档源数据
//            String source = hit.getSourceAsString();
                list.add(result);
            }
            page.setRecords(list);
            page.setTotal(count);
        }
        return page;
    }
    /**
     * 根据索引删除
     */
    public boolean removeBatchByIndexNames(List<String> indexNames) {
        for (String indexName : indexNames) {
            // 索引存在才删除
            if (isIndexExists(indexName)) {
                DeleteIndexRequest deleteIndexRequest = new DeleteIndexRequest(indexName);
                try {
                    // 执行删除索引操作
                    AcknowledgedResponse deleteResponse = client.indices().delete(deleteIndexRequest, RequestOptions.DEFAULT);
                    // 输出操作结果
                    boolean acknowledged = deleteResponse.isAcknowledged();
//                    System.out.println("索引删除成功: " + acknowledged);
                } catch (IOException e) {
//                    e.printStackTrace();
                }
            }
        }
        return true;
    }
    /**
     * 新增数据--有问题,待调整
     */
    @Async
    public boolean add(EsParam esParam, T item) {
        String str = "tableName," + esParam.getTableName() + ",";
        CommonParamSet commonParamSet =
            new CommonParamSet().setFieldValue(item.getClass(), item, EsTableConstant.articleList, str);
        try {
            indexDocument(esParam.getIndexName(), str);
        } catch (IOException e) {
//            e.printStackTrace();
        }
        return true;
    }
    /**
     * 修改数据
     */
    @Async
    public void update(EsParam esParam, T item,List<String> columnList) {
        // 判断索引是否存在
        if (elasticsearchSync && isIndexExists(esParam.getIndexName())) {
            // 创建更新请求
            UpdateByQueryRequest updateRequest = new UpdateByQueryRequest(esParam.getIndexName());
            // 设置查询条件,例如:更新所有字段text包含"old text"的文档
            updateRequest.setQuery(
                QueryBuilders.boolQuery()
                    .must(QueryBuilders.matchQuery("tableId", esParam.getTableId()))
                    .must(QueryBuilders.matchQuery("tableName", esParam.getTableName()))
            );
            Map<String, Object> data = new HashMap<String, Object>();
            data.put("tableName", esParam.getTableName());
            if (esParam.getTableName().equals("jczz_article")) {
                setArticleMap((Article) item, data);
            }
            if (esParam.getTableName().equals("jczz_place")) {
                setPlaceMap((PlaceEntity) item, data);
            }
            if (esParam.getTableName().equals("jczz_house")) {
                setHouseMap((HouseEntity) item, data);
            }
            if (esParam.getTableName().equals("jczz_household")) {
                setHouseholdMap((HouseholdEntity) item, data);
            }
            Map<String, Object> param = new HashMap<String, Object>();
            param.put("data", data);
            // script will read data param value and assign to document source
            String source = "ctx._source=params.data";
            Script script = new Script(ScriptType.INLINE, "painless", source, param);
            updateRequest.setScript(script);
            // 执行更新操作
            try {
                client.updateByQuery(updateRequest, RequestOptions.DEFAULT);
                // 刷新索引,确保文档可搜索
                client.indices().refresh(new RefreshRequest(esParam.getIndexName()), RequestOptions.DEFAULT);
            } catch (IOException e) {
//                e.printStackTrace();
            }
        }
    }
    /**
     * 设置公告map
     * @param item
     * @param data
     */
    private void setArticleMap(Article item, Map<String, Object> data) {
        // 查询当前文章范围对应的社区名称字符串集合
        String communityNameListString = SysCache.getAllCommunityNameListString(item.getArticleRange(),item.getId().toString());
        Map<String, Object> map = new HashMap<>(1);
        map.put("communityCode",communityNameListString);
        String toString = new JSONObject(map).toString();
        data.put("tableId",item.getId());
        data.put("title",item.getTitle());
        data.put("type",item.getType());
        data.put("content",item.getContent());
        data.put("articleType",item.getArticleType());
        data.put("communityCode",toString);
    }
    /**
     * 设置场所map
     * @param item
     * @param data
     */
    private void setPlaceMap(PlaceEntity item, Map<String, Object> data) {
        data.put("communityCode",placeService.getCommunityCode(item.getId()));
        data.put("tableId",item.getId());
        data.put("title",item.getPlaceName());
        data.put("name",item.getPrincipal());
        data.put("phone",item.getPrincipalPhone());
        data.put("idCard",item.getPrincipalIdCard());
        data.put("content",item.getLocation());
    }
    /**
     * 设置房屋map
     * @param item
     * @param data
     */
    private void setHouseMap(HouseEntity item, Map<String, Object> data) {
        data.put("communityCode",houseService.getCommunityCode(item.getId()));
        data.put("tableId",item.getId());
        data.put("title",item.getHouseName());
    }
    /**
     * 设置住户map
     * @param item
     * @param data
     */
    private void setHouseholdMap(HouseholdEntity item, Map<String, Object> data) {
        data.put("communityCode",householdService.getCommunityCode(item.getId()));
        data.put("tableId",item.getId());
        data.put("title",item.getName());
        data.put("relationship",item.getRelationship());
        data.put("name",item.getName());
        data.put("phone",item.getPhoneNumber());
        data.put("idCard",item.getIdCard());
        data.put("content",getAddress(item));
    }
    /**
     * 删除数据--根据条件
     */
    public boolean removeByQuery(EsParam esParam) {
        if (elasticsearchSync && isIndexExists(esParam.getIndexName())) {
            DeleteByQueryRequest deleteByQueryRequest = new DeleteByQueryRequest(esParam.getIndexName());
            // 根据多个条件 生成 boolQueryBuilder
            BoolQueryBuilder boolQueryBuilder = QueryBuilders.boolQuery();
            if (!Strings.isBlank(esParam.getTableId())){
                boolQueryBuilder
                    .must(QueryBuilders.matchQuery("tableId", esParam.getTableId()));
            }
            if (!Strings.isBlank(esParam.getTableName())) {
                boolQueryBuilder
                    .must(QueryBuilders.matchQuery("tableName", esParam.getTableName()));
            }
            deleteByQueryRequest.setQuery(boolQueryBuilder);
            try {
                BulkByScrollResponse bulkResponse =
                    client.deleteByQuery(deleteByQueryRequest, RequestOptions.DEFAULT);
            } catch (IOException e) {
//                e.printStackTrace();
            }
        }
        return true;
    }
}
src/main/java/org/springblade/es/service/ElasticsearchIndexInitializer.java
New file
@@ -0,0 +1,33 @@
package org.springblade.es.service;
import org.elasticsearch.client.RequestOptions;
import org.elasticsearch.client.RestHighLevelClient;
import org.elasticsearch.client.indices.CreateIndexRequest;
import org.elasticsearch.client.indices.GetIndexRequest;
import org.elasticsearch.xcontent.XContentType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class ElasticsearchIndexInitializer {
    @Autowired
    private RestHighLevelClient client;
    public void initializeIndex(String indexName, String mappingJson) {
        try {
            // 检查索引是否已存在
            GetIndexRequest request = new GetIndexRequest(indexName);
            boolean indexExists = client.indices().exists(request, RequestOptions.DEFAULT);
            // 如果索引不存在,则创建索引并设置映射
            if (!indexExists) {
                CreateIndexRequest createIndexRequest = new CreateIndexRequest(indexName);
                createIndexRequest.mapping(mappingJson, XContentType.JSON);
                client.indices().create(createIndexRequest, RequestOptions.DEFAULT);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
src/main/java/org/springblade/es/service/ElasticsearchIndexService.java
New file
@@ -0,0 +1,37 @@
package org.springblade.es.service;
import org.elasticsearch.action.admin.indices.create.CreateIndexRequest;
import org.elasticsearch.action.admin.indices.create.CreateIndexResponse;
import org.elasticsearch.client.RequestOptions;
import org.elasticsearch.client.RestHighLevelClient;
import org.elasticsearch.xcontent.XContentBuilder;
import org.elasticsearch.xcontent.json.JsonXContent;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.io.IOException;
@Service
public class ElasticsearchIndexService {
    @Autowired
    private RestHighLevelClient client;
    public void createIndex() throws IOException {
        CreateIndexRequest request = new CreateIndexRequest("your_index");
        XContentBuilder builder = JsonXContent.contentBuilder()
            .startObject()
            .startObject("properties")
            .startObject("field1").field("type", "text").endObject()
            .startObject("field2").field("type", "text").endObject()
            // ... 定义其他字段
            .endObject()
            .endObject();
        request.mapping("_doc", builder);
        CreateIndexResponse createIndexResponse = client.indices().create(request, RequestOptions.DEFAULT);
        boolean acknowledged = createIndexResponse.isAcknowledged();
        System.out.println(acknowledged);
    }
}
src/main/java/org/springblade/es/service/ElasticsearchSearchService.java
New file
@@ -0,0 +1,29 @@
package org.springblade.es.service;
import org.elasticsearch.action.search.SearchRequest;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.client.RequestOptions;
import org.elasticsearch.client.RestHighLevelClient;
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.search.builder.SearchSourceBuilder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.io.IOException;
@Service
public class ElasticsearchSearchService {
    @Autowired
    private RestHighLevelClient client;
    public SearchResponse search(String index, String query) throws IOException {
        SearchRequest searchRequest = new SearchRequest(index);
        SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder();
        searchSourceBuilder.query(QueryBuilders.matchQuery("field1", query)); // 搜索field1字段
        searchSourceBuilder.query(QueryBuilders.matchQuery("field2", query)); // 搜索field2字段
        searchRequest.source(searchSourceBuilder);
        return client.search(searchRequest, RequestOptions.DEFAULT);
    }
}
src/main/java/org/springblade/es/test/ElasticSearchExample.java
New file
@@ -0,0 +1,96 @@
package org.springblade.es.test;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.HttpHost;
import org.elasticsearch.action.admin.indices.refresh.RefreshRequest;
import org.elasticsearch.client.RestHighLevelClient;
import org.elasticsearch.client.RequestOptions;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestClientBuilder;
import org.elasticsearch.action.index.IndexRequest;
import org.elasticsearch.action.index.IndexResponse;
import org.elasticsearch.action.search.SearchRequest;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.search.builder.SearchSourceBuilder;
import org.elasticsearch.search.SearchHit;
import org.elasticsearch.search.SearchHits;
import java.io.IOException;
import java.util.Map;
public class ElasticSearchExample {
    public static void main(String[] args) throws IOException {
        // 初始化Elasticsearch客户端
        RestClientBuilder builder = RestClient.builder(new HttpHost("localhost", 9200, "http"));
        RestHighLevelClient client = new RestHighLevelClient(builder);
        // 索引用户数据
        IndexRequest userIndexRequest = new IndexRequest("users_articles");
        userIndexRequest.source("name", "John Doe", "type", "user");
        IndexResponse userIndexResponse = client.index(userIndexRequest, RequestOptions.DEFAULT);
        // 索引文章数据
        IndexRequest articleIndexRequest = new IndexRequest("users_articles");
        articleIndexRequest.source("title", "Elasticsearch Introduction", "type", "article");
        IndexResponse articleIndexResponse = client.index(articleIndexRequest, RequestOptions.DEFAULT);
        // 刷新索引,确保文档可搜索
        client.indices().refresh(new RefreshRequest("users_articles"), RequestOptions.DEFAULT);
        // 全文搜索
        SearchRequest searchRequest = new SearchRequest("users_articles");
        SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder();
        searchSourceBuilder.query(QueryBuilders.multiMatchQuery("Elasticsearch", "name", "title"));
        //设置分页
        searchSourceBuilder.size(10);
        searchSourceBuilder.from(0);
        //将搜索资源对象设置到搜索客户端中
        searchRequest.source(searchSourceBuilder);
        //查询
        SearchResponse searchResponse = client.search(searchRequest, RequestOptions.DEFAULT);
        //解析搜索返回值
        SearchHits searchHits = searchResponse.getHits();
        //查询的总数
        long count = searchHits.getTotalHits().value;
        for (SearchHit hit : searchHits) {
            Map<String, Object> result = hit.getSourceAsMap();
            // 根据类型处理结果
            String type = (String) result.get("type");
            if ("user".equals(type)) {
                // 处理用户名
                String name = (String) result.get("name");
                System.out.println("User: " + name);
            } else if ("article".equals(type)) {
                // 处理文章标题
                String title = (String) result.get("title");
                System.out.println("Article: " + title);
            }
        }
        // 关闭客户端
        client.close();
    }
    /**
     * 设置高亮
     * @param keywords
     * @param info
     * @return
     */
    public static String setHighLight(String keywords, String info) {
        if (StringUtils.isBlank(keywords)|| StringUtils.isBlank(info)) {
            return info;
        }
        String[] keywordArray = keywords.split(" ");
        String newInfo = info;
        for (String keyword : keywordArray) {
            newInfo = newInfo.replace(keyword, "<em style=\"color:red\">" + keyword + "</em>");
        }
        return newInfo;
    }
}
src/main/java/org/springblade/es/vo/EsParam.java
New file
@@ -0,0 +1,37 @@
package org.springblade.es.vo;
import lombok.Data;
@Data
public class EsParam {
    /**
     * 索引名称
     */
    private String indexName;
    /**
     * 表名称
     */
    private String tableName;
    /**
     * searchKey
     */
    private String searchKey;
    /**
     * 表id
     */
    private String tableId;
    /**
     * 社区编号
     */
    private String communityCode;
    /**
     * 地址编码
     */
    private String houseCode;
}
src/main/java/org/springblade/flow/core/entity/BladeFlow.java
@@ -16,6 +16,7 @@
 */
package org.springblade.flow.core.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springblade.flow.core.constant.ProcessConstant;
@@ -36,8 +37,25 @@
    // 小区id
    private String districtId;
    // 小区名称
    private String districtName;
    // 时间名称
    private String name;
    /**
     * 开始时间
     */
    @ApiModelProperty(value = "开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date startTimes;
    /**
     * 结束时间
     */
    @ApiModelProperty(value = "结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date endTimes;
    /**
     * 联系人姓名
@@ -69,6 +87,7 @@
    /**
     * 任务执行人名称
     */
    @ApiModelProperty(value = "任务执行人名称")
    private String assigneeName;
    /**
     * 流程分类
@@ -81,6 +100,7 @@
    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
    /**
     * 结束时间
@@ -145,10 +165,12 @@
    /**
     * 历史活动流程
     */
    @ApiModelProperty(value = "历史活动流程")
    private String historyActivityName;
    /**
     * 历史活动耗时
     */
    @ApiModelProperty(value = "历史活动耗时")
    private String historyActivityDurationTime;
    /**
     * 业务绑定Table
@@ -165,6 +187,7 @@
    /**
     * 任务意见
     */
    @ApiModelProperty(value = "任务意见")
    private String comment;
    /**
     * 是否通过
src/main/java/org/springblade/flow/engine/controller/FlowFollowController.java
@@ -42,7 +42,7 @@
@RestController
@RequestMapping(AppConstant.APPLICATION_FLOW_NAME + "/follow")
@AllArgsConstructor
@PreAuth("hasAnyRole('administrator', 'admin','jdgly','sqgly')")
//@PreAuth("hasAnyRole('administrator', 'admin','jdgly','sqgly')")
@ApiIgnore
public class FlowFollowController {
src/main/java/org/springblade/flow/engine/controller/FlowManagerController.java
@@ -51,7 +51,7 @@
@RequestMapping(AppConstant.APPLICATION_FLOW_NAME + "/manager")
@AllArgsConstructor
@Api(value = "流程管理接口", tags = "流程管理接口")
@PreAuth("hasAnyRole('administrator', 'admin','jdgly','sqgly')")
//@PreAuth("hasAnyRole('administrator', 'admin','jdgly','sqgly')")
@ApiIgnore
public class FlowManagerController {
src/main/java/org/springblade/flow/engine/controller/FlowModelController.java
@@ -47,7 +47,7 @@
@RestController
@RequestMapping(AppConstant.APPLICATION_FLOW_NAME + "/model")
@AllArgsConstructor
@PreAuth("hasAnyRole('administrator', 'admin','jdgly','sqgly')")
//@PreAuth("hasAnyRole('administrator', 'admin','jdgly','sqgly')")
@ApiIgnore
public class FlowModelController {
src/main/java/org/springblade/modules/article/controller/ArticleBrowseController.java
New file
@@ -0,0 +1,106 @@
package org.springblade.modules.article.controller;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import lombok.AllArgsConstructor;
import javax.validation.Valid;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.modules.article.entity.ArticleBrowseEntity;
import org.springblade.modules.article.vo.ArticleBrowseVO;
import org.springblade.modules.article.service.IArticleBrowseService;
/**
 * 文章浏览记录表 控制器
 *
 * @author BladeX
 * @since 2024-03-23
 */
@RestController
@AllArgsConstructor
@RequestMapping("blade-articleBrowse/articleBrowse")
@Api(value = "文章浏览记录表", tags = "文章浏览记录表接口")
public class ArticleBrowseController{
    private final IArticleBrowseService articleBrowseService;
    /**
     * 文章浏览记录表 详情
     */
    @GetMapping("/detail")
    @ApiOperationSupport(order = 1)
    @ApiOperation(value = "详情", notes = "传入articleBrowse")
    public R detail(ArticleBrowseEntity articleBrowse) {
        ArticleBrowseEntity detail = articleBrowseService.getOne(Condition.getQueryWrapper(articleBrowse));
        return R.data(detail);
    }
    /**
     * 文章浏览记录表 分页
     */
    @GetMapping("/list")
    @ApiOperationSupport(order = 2)
    @ApiOperation(value = "分页", notes = "传入articleBrowse")
    public R list(ArticleBrowseEntity articleBrowse, Query query) {
        IPage<ArticleBrowseEntity> pages = articleBrowseService.page(Condition.getPage(query), Condition.getQueryWrapper(articleBrowse));
        return R.data(pages);
    }
    /**
     * 文章浏览记录表 自定义分页
     */
    @GetMapping("/page")
    @ApiOperationSupport(order = 3)
    @ApiOperation(value = "分页", notes = "传入articleBrowse")
    public R<IPage<ArticleBrowseVO>> page(ArticleBrowseVO articleBrowse, Query query) {
        IPage<ArticleBrowseVO> pages = articleBrowseService.selectArticleBrowsePage(Condition.getPage(query), articleBrowse);
        return R.data(pages);
    }
    /**
     * 文章浏览记录表 新增
     */
    @PostMapping("/save")
    @ApiOperationSupport(order = 4)
    @ApiOperation(value = "新增", notes = "传入articleBrowse")
    public R save(@Valid @RequestBody ArticleBrowseEntity articleBrowse) {
        return R.status(articleBrowseService.save(articleBrowse));
    }
    /**
     * 文章浏览记录表 修改
     */
    @PostMapping("/update")
    @ApiOperationSupport(order = 5)
    @ApiOperation(value = "修改", notes = "传入articleBrowse")
    public R update(@Valid @RequestBody ArticleBrowseEntity articleBrowse) {
        return R.status(articleBrowseService.updateById(articleBrowse));
    }
    /**
     * 文章浏览记录表 新增或修改
     */
    @PostMapping("/submit")
    @ApiOperationSupport(order = 6)
    @ApiOperation(value = "新增或修改", notes = "传入articleBrowse")
    public R submit(@Valid @RequestBody ArticleBrowseEntity articleBrowse) {
        return R.status(articleBrowseService.saveOrUpdate(articleBrowse));
    }
    /**
     * 文章浏览记录表 删除
     */
    @PostMapping("/remove")
    @ApiOperationSupport(order = 7)
    @ApiOperation(value = "逻辑删除", notes = "传入ids")
    public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
        return R.status(articleBrowseService.removeByIds(Func.toLongList(ids)));
    }
}
src/main/java/org/springblade/modules/article/controller/ArticleIntegralController.java
New file
@@ -0,0 +1,107 @@
package org.springblade.modules.article.controller;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import lombok.AllArgsConstructor;
import javax.validation.Valid;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.modules.article.entity.ArticleIntegralEntity;
import org.springblade.modules.article.vo.ArticleIntegralVO;
import org.springblade.modules.article.service.IArticleIntegralService;
/**
 * 文章浏览积分表 控制器
 *
 * @author BladeX
 * @since 2024-03-23
 */
@RestController
@AllArgsConstructor
@RequestMapping("blade-articleIntegral/articleIntegral")
@Api(value = "文章浏览积分表", tags = "文章浏览积分表接口")
public class ArticleIntegralController{
    private final IArticleIntegralService articleIntegralService;
    /**
     * 文章浏览积分表 详情
     */
    @GetMapping("/detail")
    @ApiOperationSupport(order = 1)
    @ApiOperation(value = "详情", notes = "传入articleIntegral")
    public R detail(ArticleIntegralEntity articleIntegral) {
        ArticleIntegralEntity detail = articleIntegralService.getOne(Condition.getQueryWrapper(articleIntegral));
        return R.data(detail);
    }
    /**
     * 文章浏览积分表 分页
     */
    @GetMapping("/list")
    @ApiOperationSupport(order = 2)
    @ApiOperation(value = "分页", notes = "传入articleIntegral")
    public R list(ArticleIntegralEntity articleIntegral, Query query) {
        IPage<ArticleIntegralEntity> pages = articleIntegralService.page(Condition.getPage(query), Condition.getQueryWrapper(articleIntegral));
        return R.data(pages);
    }
    /**
     * 文章浏览积分表 自定义分页
     */
    @GetMapping("/page")
    @ApiOperationSupport(order = 3)
    @ApiOperation(value = "分页", notes = "传入articleIntegral")
    public R<IPage<ArticleIntegralVO>> page(ArticleIntegralVO articleIntegral, Query query) {
        IPage<ArticleIntegralVO> pages = articleIntegralService.selectArticleIntegralPage(Condition.getPage(query), articleIntegral);
        return R.data(pages);
    }
    /**
     * 文章浏览积分表 新增
     */
    @PostMapping("/save")
    @ApiOperationSupport(order = 4)
    @ApiOperation(value = "新增", notes = "传入articleIntegral")
    public R save(@Valid @RequestBody ArticleIntegralEntity articleIntegral) {
        return R.status(articleIntegralService.save(articleIntegral));
    }
    /**
     * 文章浏览积分表 修改
     */
    @PostMapping("/update")
    @ApiOperationSupport(order = 5)
    @ApiOperation(value = "修改", notes = "传入articleIntegral")
    public R update(@Valid @RequestBody ArticleIntegralEntity articleIntegral) {
        return R.status(articleIntegralService.updateById(articleIntegral));
    }
    /**
     * 文章浏览积分表 新增或修改
     */
    @PostMapping("/submit")
    @ApiOperationSupport(order = 6)
    @ApiOperation(value = "新增或修改", notes = "传入articleIntegral")
    public R submit(@Valid @RequestBody ArticleIntegralEntity articleIntegral) {
        return R.status(articleIntegralService.saveOrUpdate(articleIntegral));
    }
    /**
     * 文章浏览积分表 删除
     */
    @PostMapping("/remove")
    @ApiOperationSupport(order = 7)
    @ApiOperation(value = "逻辑删除", notes = "传入ids")
    public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
        return R.status(articleIntegralService.removeByIds(Func.toLongList(ids)));
    }
}
src/main/java/org/springblade/modules/article/entity/ArticleBrowseEntity.java
New file
@@ -0,0 +1,66 @@
package org.springblade.modules.article.entity;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
/**
 * 文章浏览记录表 实体类
 *
 * @author BladeX
 * @since 2024-03-23
 */
@Data
@TableName("jczz_article_browse")
@ApiModel(value = "ArticleBrowse对象", description = "文章浏览记录表")
public class ArticleBrowseEntity implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * 主键
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty("主键id")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;
    /**
     * 文章id
     */
    @ApiModelProperty(value = "文章id")
    private Long articleId;
    /**
     * 创建人(浏览人用户id)
     */
    @ApiModelProperty(value = "创建人(浏览人用户id)")
    @TableField(fill = FieldFill.INSERT)
    private Long createUser;
    /**
     * 创建时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    /**
     * 是否删除 0:否  1:是
     */
    @ApiModelProperty(value = "是否删除 0:否  1:是", example = "")
    @TableField("is_deleted")
    @TableLogic
    private Integer isDeleted;
}
src/main/java/org/springblade/modules/article/entity/ArticleIntegralEntity.java
New file
@@ -0,0 +1,77 @@
package org.springblade.modules.article.entity;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
/**
 * 文章浏览积分表 实体类
 *
 * @author BladeX
 * @since 2024-03-23
 */
@Data
@TableName("jczz_article_integral")
@ApiModel(value = "ArticleIntegral对象", description = "文章浏览积分表")
public class ArticleIntegralEntity implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * 主键
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty("主键id")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;
    /**
     * 文章id
     */
    @ApiModelProperty(value = "文章id")
    private Long articleId;
    /**
     * 得分
     */
    @ApiModelProperty(value = "得分")
    private Integer score;
    /**
     * 地址编号
     */
    @ApiModelProperty(value = "地址编号")
    private String houseCode;
    /**
     * 创建人(浏览人用户id)
     */
    @ApiModelProperty(value = "创建人(浏览人用户id)")
    @TableField(fill = FieldFill.INSERT)
    private Long createUser;
    /**
     * 创建时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    /**
     * 是否删除 0:否  1:是
     */
    @ApiModelProperty(value = "是否删除 0:否  1:是", example = "")
    @TableField("is_deleted")
    @TableLogic
    private Integer isDeleted;
}
src/main/java/org/springblade/modules/article/mapper/ArticleBrowseMapper.java
New file
@@ -0,0 +1,43 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.article.mapper;
import org.springblade.modules.article.entity.ArticleBrowseEntity;
import org.springblade.modules.article.vo.ArticleBrowseVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List;
/**
 * 文章浏览记录表 Mapper 接口
 *
 * @author BladeX
 * @since 2024-03-23
 */
public interface ArticleBrowseMapper extends BaseMapper<ArticleBrowseEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param articleBrowse
     * @return
     */
    List<ArticleBrowseVO> selectArticleBrowsePage(IPage page, ArticleBrowseVO articleBrowse);
}
src/main/java/org/springblade/modules/article/mapper/ArticleBrowseMapper.xml
New file
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.springblade.modules.article.mapper.ArticleBrowseMapper">
    <!-- 通用查询映射结果 -->
    <resultMap id="articleBrowseResultMap" type="org.springblade.modules.article.vo.ArticleBrowseVO">
        <result column="id" property="id"/>
        <result column="article_id" property="articleId"/>
        <result column="create_time" property="createTime"/>
        <result column="create_user" property="createUser"/>
        <result column="is_deleted" property="isDeleted"/>
    </resultMap>
    <select id="selectArticleBrowsePage" resultMap="articleBrowseResultMap">
        select * from jczz_article_browse
        <where>
            <if test="articleBrowse.id != null "> and id = #{articleBrowse.id}</if>
            <if test="articleBrowse.articleId != null "> and article_id = #{articleBrowse.articleId}</if>
            <if test="articleBrowse.createTime != null "> and create_time = #{articleBrowse.createTime}</if>
            <if test="articleBrowse.createUser != null "> and create_user = #{articleBrowse.createUser}</if>
            <if test="articleBrowse.isDeleted != null "> and is_deleted = #{articleBrowse.isDeleted}</if>
        </where>
    </select>
</mapper>
src/main/java/org/springblade/modules/article/mapper/ArticleIntegralMapper.java
New file
@@ -0,0 +1,45 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.article.mapper;
import org.apache.ibatis.annotations.Param;
import org.springblade.modules.article.entity.ArticleIntegralEntity;
import org.springblade.modules.article.vo.ArticleIntegralVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List;
/**
 * 文章浏览积分表 Mapper 接口
 *
 * @author BladeX
 * @since 2024-03-23
 */
public interface ArticleIntegralMapper extends BaseMapper<ArticleIntegralEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param articleIntegral
     * @return
     */
    List<ArticleIntegralVO> selectArticleIntegralPage(IPage page,
                                                      @Param("articleIntegral") ArticleIntegralVO articleIntegral);
}
src/main/java/org/springblade/modules/article/mapper/ArticleIntegralMapper.xml
New file
@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.springblade.modules.article.mapper.ArticleIntegralMapper">
    <!-- 通用查询映射结果 -->
    <resultMap id="articleIntegralResultMap" type="org.springblade.modules.article.vo.ArticleIntegralVO">
        <result column="id" property="id"/>
        <result column="article_id" property="articleId"/>
        <result column="score" property="score"/>
        <result column="create_time" property="createTime"/>
        <result column="create_user" property="createUser"/>
        <result column="is_deleted" property="isDeleted"/>
    </resultMap>
    <!--自定义分页查询-->
    <select id="selectArticleIntegralPage" resultMap="articleIntegralResultMap">
        select
        jai.*,
        jh.house_name as address,
        jh.district_name as aoiName,
        bu.real_name,
        bu.phone,
        bu.avatar
        from jczz_article_integral jai
        left join jczz_house jh on jai.house_code = jh.house_code and jh.is_deleted = 0
        left join blade_user bu on bu.id = jai.create_user and bu.is_deleted = 0
        where jai.is_deleted = 0
        <if test="articleIntegral.realName!=null and articleIntegral.realName!=''">
            and bu.real_name like concat('%',#{articleIntegral.realName},'%')
        </if>
        <if test="articleIntegral.phone!=null and articleIntegral.phone!=''">
            and bu.phone like concat('%',#{articleIntegral.phone},'%')
        </if>
        <if test="articleIntegral.articleId!=null">
            and jai.article_id = #{articleIntegral.articleId}
        </if>
        order by jai.create_time desc
    </select>
</mapper>
src/main/java/org/springblade/modules/article/service/IArticleBrowseService.java
New file
@@ -0,0 +1,26 @@
package org.springblade.modules.article.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springblade.modules.article.entity.ArticleBrowseEntity;
import org.springblade.modules.article.vo.ArticleBrowseVO;
import com.baomidou.mybatisplus.core.metadata.IPage;
/**
 * 文章浏览记录表 服务类
 *
 * @author BladeX
 * @since 2024-03-23
 */
public interface IArticleBrowseService extends IService<ArticleBrowseEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param articleBrowse
     * @return
     */
    IPage<ArticleBrowseVO> selectArticleBrowsePage(IPage<ArticleBrowseVO> page, ArticleBrowseVO articleBrowse);
}
src/main/java/org/springblade/modules/article/service/IArticleIntegralService.java
New file
@@ -0,0 +1,26 @@
package org.springblade.modules.article.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springblade.modules.article.entity.ArticleIntegralEntity;
import org.springblade.modules.article.vo.ArticleIntegralVO;
import com.baomidou.mybatisplus.core.metadata.IPage;
/**
 * 文章浏览积分表 服务类
 *
 * @author BladeX
 * @since 2024-03-23
 */
public interface IArticleIntegralService extends IService<ArticleIntegralEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param articleIntegral
     * @return
     */
    IPage<ArticleIntegralVO> selectArticleIntegralPage(IPage<ArticleIntegralVO> page, ArticleIntegralVO articleIntegral);
}
src/main/java/org/springblade/modules/article/service/impl/ArticleBrowseServiceImpl.java
New file
@@ -0,0 +1,26 @@
package org.springblade.modules.article.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springblade.modules.article.entity.ArticleBrowseEntity;
import org.springblade.modules.article.vo.ArticleBrowseVO;
import org.springblade.modules.article.mapper.ArticleBrowseMapper;
import org.springblade.modules.article.service.IArticleBrowseService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;
/**
 * 文章浏览记录表 服务实现类
 *
 * @author BladeX
 * @since 2024-03-23
 */
@Service
public class ArticleBrowseServiceImpl extends ServiceImpl<ArticleBrowseMapper, ArticleBrowseEntity> implements IArticleBrowseService {
    @Override
    public IPage<ArticleBrowseVO> selectArticleBrowsePage(IPage<ArticleBrowseVO> page, ArticleBrowseVO articleBrowse) {
        return page.setRecords(baseMapper.selectArticleBrowsePage(page, articleBrowse));
    }
}
src/main/java/org/springblade/modules/article/service/impl/ArticleIntegralServiceImpl.java
New file
@@ -0,0 +1,29 @@
package org.springblade.modules.article.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springblade.modules.article.entity.ArticleIntegralEntity;
import org.springblade.modules.article.vo.ArticleIntegralVO;
import org.springblade.modules.article.mapper.ArticleIntegralMapper;
import org.springblade.modules.article.service.IArticleIntegralService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List;
/**
 * 文章浏览积分表 服务实现类
 *
 * @author BladeX
 * @since 2024-03-23
 */
@Service
public class ArticleIntegralServiceImpl extends ServiceImpl<ArticleIntegralMapper, ArticleIntegralEntity> implements IArticleIntegralService {
    @Override
    public IPage<ArticleIntegralVO> selectArticleIntegralPage(IPage<ArticleIntegralVO> page, ArticleIntegralVO articleIntegral) {
        List<ArticleIntegralVO> articleIntegralVOS = baseMapper.selectArticleIntegralPage(page, articleIntegral);
        return page.setRecords(articleIntegralVOS);
    }
}
src/main/java/org/springblade/modules/article/vo/ArticleBrowseVO.java
New file
@@ -0,0 +1,35 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.article.vo;
import org.springblade.modules.article.entity.ArticleBrowseEntity;
import org.springblade.core.tool.node.INode;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
 * 文章浏览记录表 视图实体类
 *
 * @author BladeX
 * @since 2024-03-23
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class ArticleBrowseVO extends ArticleBrowseEntity {
    private static final long serialVersionUID = 1L;
}
src/main/java/org/springblade/modules/article/vo/ArticleIntegralVO.java
New file
@@ -0,0 +1,61 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.article.vo;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import org.springblade.modules.article.entity.ArticleIntegralEntity;
import org.springblade.core.tool.node.INode;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
 * 文章浏览积分表 视图实体类
 *
 * @author BladeX
 * @since 2024-03-23
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class ArticleIntegralVO extends ArticleIntegralEntity {
    private static final long serialVersionUID = 1L;
    /**
     * 姓名
     */
    @ApiModelProperty(value = "姓名")
    private String realName;
    /**
     * 电话
     */
    @ApiModelProperty(value = "电话")
    private String phone;
    /**
     * 地址
     */
    @ApiModelProperty(value = "地址")
    private String address;
    /**
     * 小区名称
     */
    @ApiModelProperty(value = "小区名称")
    private String aoiName;
}
src/main/java/org/springblade/modules/auth/endpoint/BladeTokenEndPoint.java
@@ -66,6 +66,16 @@
    private final BladeRedis bladeRedis;
    private final JwtProperties jwtProperties;
    /**
     *
     * @param tenantId
     * @param username
     * @param password
     * @param deptId
     * @param roleId
     * @param type 登录类型  2:pc  3: app
     * @return
     */
    @ApiLog("登录用户验证")
    @PostMapping("/oauth/token")
    @ApiOperation(value = "获取认证令牌", notes = "传入租户ID:tenantId,账号:account,密码:password")
@@ -73,7 +83,8 @@
                    @ApiParam(value = "账号", required = true) @RequestParam(required = false) String username,
                    @ApiParam(value = "密码", required = true) @RequestParam(required = false) String password,
                    @ApiIgnore @RequestHeader(name = TokenUtil.DEPT_HEADER_KEY, required = false) String deptId,
                    @ApiIgnore @RequestHeader(name = TokenUtil.ROLE_HEADER_KEY, required = false) String roleId) {
                    @ApiIgnore @RequestHeader(name = TokenUtil.ROLE_HEADER_KEY, required = false) String roleId,
                    @ApiParam(value = "登录类型", required = false) @RequestParam(required = false,defaultValue = "3") Integer loginType) {
        Kv authInfo = Kv.create();
@@ -89,7 +100,9 @@
            .set("grantType", grantType)
            .set("refreshToken", refreshToken)
            .set("userType", userType)
            .set("deptId", deptId).set("roleId", roleId);
            .set("deptId", deptId)
            .set("loginType",loginType)
            .set("roleId", roleId);
        ITokenGranter granter = TokenGranterBuilder.getGranter(grantType);
        UserInfo userInfo = granter.grant(tokenParameter);
src/main/java/org/springblade/modules/auth/granter/CaptchaTokenGranter.java
@@ -17,6 +17,8 @@
package org.springblade.modules.auth.granter;
import lombok.AllArgsConstructor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springblade.common.cache.CacheNames;
import org.springblade.common.cache.ParamCache;
import org.springblade.core.log.exception.ServiceException;
@@ -48,6 +50,8 @@
@Component
@AllArgsConstructor
public class CaptchaTokenGranter implements ITokenGranter {
    protected static final Logger logger = LoggerFactory.getLogger(CaptchaTokenGranter.class);
    public static final String GRANT_TYPE = "captcha";
    public static final Integer FAIL_COUNT = 5;
@@ -83,6 +87,7 @@
        int cnt = Func.toInt(bladeRedis.get(CacheNames.tenantKey(tenantId, CacheNames.USER_FAIL_KEY, username)), 0);
        int failCount = Func.toInt(ParamCache.getValue(FAIL_COUNT_VALUE), FAIL_COUNT);
        if (cnt >= failCount) {
            logger.error("用户名或密码错误,用户账号:{},用户名:{},错误次数:{}",tenantId, username, cnt);
            throw new ServiceException(TokenUtil.USER_HAS_TOO_MANY_FAILS);
        }
src/main/java/org/springblade/modules/auth/granter/PasswordTokenGranter.java
@@ -17,6 +17,8 @@
package org.springblade.modules.auth.granter;
import lombok.AllArgsConstructor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springblade.common.cache.CacheNames;
import org.springblade.common.cache.ParamCache;
import org.springblade.core.log.exception.ServiceException;
@@ -48,6 +50,8 @@
@AllArgsConstructor
public class PasswordTokenGranter implements ITokenGranter {
    protected static final Logger logger = LoggerFactory.getLogger(CaptchaTokenGranter.class);
    public static final String GRANT_TYPE = "password";
    public static final Integer FAIL_COUNT = 5;
    public static final String FAIL_COUNT_VALUE = "account.failCount";
@@ -68,11 +72,14 @@
        String tenantId = tokenParameter.getArgs().getStr("tenantId");
        String username = tokenParameter.getArgs().getStr("username");
        String password = tokenParameter.getArgs().getStr("password");
        // 获取登录类型 2:pc 3:app
        String type = tokenParameter.getArgs().getStr("loginType");
        // 判断登录是否锁定
        int cnt = Func.toInt(bladeRedis.get(CacheNames.tenantKey(tenantId, CacheNames.USER_FAIL_KEY, username)), 0);
        int failCount = Func.toInt(ParamCache.getValue(FAIL_COUNT_VALUE), FAIL_COUNT);
        if (cnt >= failCount) {
            logger.error("用户名或密码错误,用户账号:{},用户名:{},错误次数:{}",tenantId, username, cnt);
            throw new ServiceException(TokenUtil.USER_HAS_TOO_MANY_FAILS);
        }
@@ -83,16 +90,8 @@
            if (TokenUtil.judgeTenant(tenant)) {
                throw new ServiceException(TokenUtil.USER_HAS_NO_TENANT_PERMISSION);
            }
            // 获取用户类型
            String userType = tokenParameter.getArgs().getStr("userType");
            // 根据不同用户类型调用对应的接口返回数据,用户可自行拓展
            if (userType.equals(UserEnum.WEB.getName())) {
                userInfo = userService.userInfo(tenantId, username, DigestUtil.hex(password), UserEnum.WEB);
            } else if (userType.equals(UserEnum.APP.getName())) {
                userInfo = userService.userInfo(tenantId, username, DigestUtil.hex(password), UserEnum.APP);
            } else {
                userInfo = userService.userInfo(tenantId, username, DigestUtil.hex(password), UserEnum.OTHER);
            }
            userInfo = userService.userInfo(tenantId, username, DigestUtil.hex(password), Integer.parseInt(type));
        }
        if (userInfo == null || userInfo.getUser() == null) {
            // 增加错误锁定次数
src/main/java/org/springblade/modules/auth/utils/TokenUtil.java
@@ -100,6 +100,7 @@
        param.put(TokenConstant.DETAIL, userInfo.getDetail());
        param.put(TokenConstant.REAL_NAME, user.getRealName());
        param.put("phone", user.getPhone());
        param.put("status", user.getStatus());
        //拼装accessToken
        try {
@@ -122,6 +123,7 @@
                .set(TokenConstant.EXPIRES_IN, accessToken.getExpire())
                .set(TokenConstant.DETAIL, userInfo.getDetail())
                .set("phone", user.getPhone())
                .set("status", user.getStatus())
                .set(TokenConstant.REAL_NAME, user.getRealName())
                .set(TokenConstant.LICENSE, TokenConstant.LICENSE_NAME);
        } catch (Exception ex) {
src/main/java/org/springblade/modules/backblast/controller/BackblastPubPersonController.java
New file
@@ -0,0 +1,145 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.backblast.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import org.springblade.core.log.annotation.ApiLog;
import org.springblade.core.log.logger.BladeLogger;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.jackson.JsonUtil;
import org.springblade.core.tool.utils.Func;
import org.springblade.modules.backblast.entity.BackblastPubPersonEntity;
import org.springblade.modules.backblast.service.IBackblastPubPersonService;
import org.springblade.modules.backblast.vo.BackblastPubPersonVO;
import org.springblade.modules.backblast.wrapper.BackblastPubPersonWrapper;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
/**
 * 反诈宣传对象表 控制器
 *
 * @author BladeX
 * @since 2024-03-15
 */
@RestController
@AllArgsConstructor
@RequestMapping("blade-backblastPubPerson/backblastPubPerson")
@Api(value = "反诈宣传对象表", tags = "反诈宣传对象表接口")
public class BackblastPubPersonController {
    private final IBackblastPubPersonService backblastPubPersonService;
    private final BladeLogger bladeLogger;
    /**
     * 反诈宣传对象表 详情
     */
    @GetMapping("/detail")
    @ApiOperationSupport(order = 1)
    @ApiOperation(value = "详情", notes = "传入backblastPubPerson")
    public R detail(BackblastPubPersonEntity backblastPubPerson) {
        BackblastPubPersonEntity detail = backblastPubPersonService.getOne(Condition.getQueryWrapper(backblastPubPerson));
        return R.data(detail);
    }
    /**
     * 反诈宣传对象表 分页
     */
    @GetMapping("/list")
    @ApiOperationSupport(order = 2)
    @ApiOperation(value = "分页", notes = "传入backblastPubPerson")
    public R<IPage<BackblastPubPersonVO>> list(BackblastPubPersonEntity backblastPubPerson, Query query) {
        IPage<BackblastPubPersonEntity> pages = backblastPubPersonService.page(Condition.getPage(query), Condition.getQueryWrapper(backblastPubPerson));
        return R.data(BackblastPubPersonWrapper.build().pageVO(pages));
    }
    /**
     * 反诈宣传对象表 自定义分页
     */
    @GetMapping("/page")
    @ApiOperationSupport(order = 3)
    @ApiLog("反诈宣传对象表 自定义分页")
    @ApiOperation(value = "分页", notes = "传入backblastPubPerson")
    public R<IPage<BackblastPubPersonVO>> page(BackblastPubPersonVO backblastPubPerson, Query query) {
        bladeLogger.info("反诈宣传对象表 自定义分页", JsonUtil.toJson(backblastPubPerson));
        IPage<BackblastPubPersonVO> pages = backblastPubPersonService.selectBackblastPubPersonPage(Condition.getPage(query), backblastPubPerson);
        return R.data(pages);
    }
    /**
     * 反诈宣传对象表 新增
     */
    @PostMapping("/save")
    @ApiOperationSupport(order = 4)
    @ApiOperation(value = "新增", notes = "传入backblastPubPerson")
    public R save(@Valid @RequestBody BackblastPubPersonEntity backblastPubPerson) {
        return R.status(backblastPubPersonService.save(backblastPubPerson));
    }
    /**
     * 反诈宣传对象表 修改
     */
    @PostMapping("/update")
    @ApiOperationSupport(order = 5)
    @ApiOperation(value = "修改", notes = "传入backblastPubPerson")
    public R update(@Valid @RequestBody BackblastPubPersonEntity backblastPubPerson) {
        return R.status(backblastPubPersonService.updateById(backblastPubPerson));
    }
    /**
     * 反诈宣传对象表 新增或修改
     */
    @PostMapping("/submit")
    @ApiOperationSupport(order = 6)
    @ApiOperation(value = "新增或修改", notes = "传入backblastPubPerson")
    public R submit(@Valid @RequestBody BackblastPubPersonEntity backblastPubPerson) {
        return R.status(backblastPubPersonService.saveOrUpdate(backblastPubPerson));
    }
    /**
     * 反诈宣传对象表 删除
     */
    @PostMapping("/remove")
    @ApiOperationSupport(order = 7)
    @ApiLog("反诈宣传对象表 删除")
    @ApiOperation(value = "逻辑删除", notes = "传入ids")
    public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
        bladeLogger.info("反诈宣传对象表 删除", JsonUtil.toJson(ids));
        return R.status(backblastPubPersonService.removeByIds(Func.toLongList(ids)));
    }
    /**
     * 反诈宣传对象表 自定义详情
     * @param backblastPubPerson
     * @return
     */
    @GetMapping("/getDetail")
    @ApiOperationSupport(order = 9)
    @ApiLog("反诈宣传对象表 自定义详情")
    @ApiOperation(value = "详情", notes = "传入backblastPubPerson")
    public R getDetail(BackblastPubPersonVO backblastPubPerson) {
        bladeLogger.info("反诈宣传对象表 自定义详情", JsonUtil.toJson(backblastPubPerson));
        BackblastPubPersonVO detail = backblastPubPersonService.getDetail(backblastPubPerson);
        return R.data(detail);
    }
}
src/main/java/org/springblade/modules/backblast/controller/BackblastPubRecordController.java
New file
@@ -0,0 +1,177 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.backblast.controller;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import lombok.AllArgsConstructor;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import org.springblade.core.excel.util.ExcelUtil;
import org.springblade.core.log.annotation.ApiLog;
import org.springblade.core.log.logger.BladeLogger;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.jackson.JsonUtil;
import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.tool.utils.Func;
import org.springblade.modules.backblast.excel.BackblastPubRecordExcel;
import org.springblade.modules.house.excel.HouseRentalExcel;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.modules.backblast.entity.BackblastPubRecordEntity;
import org.springblade.modules.backblast.vo.BackblastPubRecordVO;
import org.springblade.modules.backblast.wrapper.BackblastPubRecordWrapper;
import org.springblade.modules.backblast.service.IBackblastPubRecordService;
import org.springblade.core.boot.ctrl.BladeController;
import java.util.List;
/**
 * 反炸宣传记录表 控制器
 *
 * @author BladeX
 * @since 2024-03-15
 */
@RestController
@AllArgsConstructor
@RequestMapping("blade-backblastPubRecord/backblastPubRecord")
@Api(value = "反炸宣传记录表", tags = "反炸宣传记录表接口")
public class BackblastPubRecordController{
    private final IBackblastPubRecordService backblastPubRecordService;
    private final BladeLogger bladeLogger;
    /**
     * 反炸宣传记录表 详情
     */
    @GetMapping("/detail")
    @ApiOperationSupport(order = 1)
    @ApiOperation(value = "详情", notes = "传入backblastPubRecord")
    public R detail(BackblastPubRecordEntity backblastPubRecord) {
        BackblastPubRecordEntity detail = backblastPubRecordService.getOne(Condition.getQueryWrapper(backblastPubRecord));
        return R.data(detail);
    }
    /**
     * 反炸宣传记录表 分页
     */
    @GetMapping("/list")
    @ApiOperationSupport(order = 2)
    @ApiOperation(value = "分页", notes = "传入backblastPubRecord")
    public R<IPage<BackblastPubRecordVO>> list(BackblastPubRecordEntity backblastPubRecord, Query query) {
        IPage<BackblastPubRecordEntity> pages = backblastPubRecordService.page(Condition.getPage(query), Condition.getQueryWrapper(backblastPubRecord));
        return R.data(BackblastPubRecordWrapper.build().pageVO(pages));
    }
    /**
     * 反炸宣传记录表 自定义分页
     */
    @GetMapping("/page")
    @ApiOperationSupport(order = 3)
    @ApiLog("反炸宣传记录表 自定义分页")
    @ApiOperation(value = "分页", notes = "传入backblastPubRecord")
    public R<IPage<BackblastPubRecordVO>> page(BackblastPubRecordVO backblastPubRecord, Query query) {
        bladeLogger.info("反炸宣传记录表 自定义分页", JsonUtil.toJson(backblastPubRecord));
        IPage<BackblastPubRecordVO> pages = backblastPubRecordService.selectBackblastPubRecordPage(Condition.getPage(query), backblastPubRecord);
        return R.data(pages);
    }
    /**
     * 反炸宣传记录表 新增
     */
    @PostMapping("/save")
    @ApiOperationSupport(order = 4)
    @ApiOperation(value = "新增", notes = "传入backblastPubRecord")
    public R save(@Valid @RequestBody BackblastPubRecordEntity backblastPubRecord) {
        return R.status(backblastPubRecordService.save(backblastPubRecord));
    }
    /**
     * 反炸宣传记录表 修改
     */
    @PostMapping("/update")
    @ApiOperationSupport(order = 5)
    @ApiOperation(value = "修改", notes = "传入backblastPubRecord")
    public R update(@Valid @RequestBody BackblastPubRecordEntity backblastPubRecord) {
        return R.status(backblastPubRecordService.updateById(backblastPubRecord));
    }
    /**
     * 反炸宣传记录表 自定义新增/修改
     */
    @PostMapping("/addOrUpdate")
    @ApiOperationSupport(order = 8)
    @ApiLog("反炸宣传记录表 自定义新增/修改")
    @ApiOperation(value = "自定义新增/修改", notes = "传入backblastPubRecord")
    public R addOrUpdate(@Valid @RequestBody BackblastPubRecordVO backblastPubRecord) {
        bladeLogger.info("反炸宣传记录表 自定义新增/修改", JsonUtil.toJson(backblastPubRecord));
        return R.status(backblastPubRecordService.addOrUpdateBackblastPubRecordEntity(backblastPubRecord));
    }
    /**
     * 反炸宣传记录表 新增或修改
     */
    @PostMapping("/submit")
    @ApiOperationSupport(order = 6)
    @ApiOperation(value = "新增或修改", notes = "传入backblastPubRecord")
    public R submit(@Valid @RequestBody BackblastPubRecordEntity backblastPubRecord) {
        return R.status(backblastPubRecordService.saveOrUpdate(backblastPubRecord));
    }
    /**
     * 反炸宣传记录表 删除
     */
    @PostMapping("/remove")
    @ApiOperationSupport(order = 7)
    @ApiLog("反炸宣传记录表 删除")
    @ApiOperation(value = "逻辑删除", notes = "传入ids")
    public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
        bladeLogger.info("反炸宣传记录表 删除", JsonUtil.toJson(ids));
        return R.status(backblastPubRecordService.removeBackblastPubByIds(Func.toLongList(ids)));
    }
    /**
     * 反炸宣传记录表 自定义详情
     * @param backblastPubRecord
     * @return
     */
    @GetMapping("/getDetail")
    @ApiOperationSupport(order = 9)
    @ApiLog("反炸宣传记录表 自定义详情")
    @ApiOperation(value = "详情", notes = "传入backblastPubRecord")
    public R getDetail(BackblastPubRecordVO backblastPubRecord) {
        bladeLogger.info("反炸宣传记录表 自定义详情", JsonUtil.toJson(backblastPubRecord));
        BackblastPubRecordVO detail = backblastPubRecordService.getDetail(backblastPubRecord);
        return R.data(detail);
    }
    @GetMapping("/export")
    @ApiOperationSupport(order = 10)
    @ApiOperation(value = "导出", notes = "")
    public void export(BackblastPubRecordVO backblastPubRecord, HttpServletResponse response) {
        List<BackblastPubRecordExcel> list = backblastPubRecordService.export(backblastPubRecord);
        ExcelUtil.export(response, "入户宣传" + DateUtil.time(), "入户宣传数据表", list, BackblastPubRecordExcel.class);
    }
}
src/main/java/org/springblade/modules/backblast/controller/BackblastWarnHanRecController.java
New file
@@ -0,0 +1,158 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.backblast.controller;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import lombok.AllArgsConstructor;
import javax.validation.Valid;
import org.springblade.core.log.annotation.ApiLog;
import org.springblade.core.log.logger.BladeLogger;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.jackson.JsonUtil;
import org.springblade.core.tool.utils.Func;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.modules.backblast.entity.BackblastWarnHanRecEntity;
import org.springblade.modules.backblast.vo.BackblastWarnHanRecVO;
import org.springblade.modules.backblast.wrapper.BackblastWarnHanRecWrapper;
import org.springblade.modules.backblast.service.IBackblastWarnHanRecService;
import org.springblade.core.boot.ctrl.BladeController;
/**
 * 反炸预警处置记录表 控制器
 *
 * @author BladeX
 * @since 2024-03-15
 */
@RestController
@AllArgsConstructor
@RequestMapping("blade-backblastWarnHanRec/backblastWarnHanRec")
@Api(value = "反炸预警处置记录表", tags = "反炸预警处置记录表接口")
public class BackblastWarnHanRecController{
    private final IBackblastWarnHanRecService backblastWarnHanRecService;
    private final BladeLogger bladeLogger;
    /**
     * 反炸预警处置记录表 详情
     */
    @GetMapping("/detail")
    @ApiOperationSupport(order = 1)
    @ApiOperation(value = "详情", notes = "传入backblastWarnHanRec")
    public R detail(BackblastWarnHanRecEntity backblastWarnHanRec) {
        BackblastWarnHanRecEntity detail = backblastWarnHanRecService.getOne(Condition.getQueryWrapper(backblastWarnHanRec));
        return R.data(detail);
    }
    /**
     * 反炸预警处置记录表 分页
     */
    @GetMapping("/list")
    @ApiOperationSupport(order = 2)
    @ApiOperation(value = "分页", notes = "传入backblastWarnHanRec")
    public R<IPage<BackblastWarnHanRecVO>> list(BackblastWarnHanRecEntity backblastWarnHanRec, Query query) {
        IPage<BackblastWarnHanRecEntity> pages = backblastWarnHanRecService.page(Condition.getPage(query), Condition.getQueryWrapper(backblastWarnHanRec));
        return R.data(BackblastWarnHanRecWrapper.build().pageVO(pages));
    }
    /**
     * 反炸预警处置记录表 自定义分页
     */
    @GetMapping("/page")
    @ApiOperationSupport(order = 3)
    @ApiLog("反炸预警处置记录表 自定义分页")
    @ApiOperation(value = "分页", notes = "传入backblastWarnHanRec")
    public R<IPage<BackblastWarnHanRecVO>> page(BackblastWarnHanRecVO backblastWarnHanRec, Query query) {
        bladeLogger.info("反炸预警处置记录表 自定义分页", JsonUtil.toJson(backblastWarnHanRec));
        IPage<BackblastWarnHanRecVO> pages = backblastWarnHanRecService.selectBackblastWarnHanRecPage(Condition.getPage(query), backblastWarnHanRec);
        return R.data(pages);
    }
    /**
     * 反炸预警处置记录表 新增
     */
    @PostMapping("/save")
    @ApiOperationSupport(order = 4)
    @ApiOperation(value = "新增", notes = "传入backblastWarnHanRec")
    public R save(@Valid @RequestBody BackblastWarnHanRecEntity backblastWarnHanRec) {
        return R.status(backblastWarnHanRecService.save(backblastWarnHanRec));
    }
    /**
     * 反炸预警处置记录表 修改
     */
    @PostMapping("/update")
    @ApiOperationSupport(order = 5)
    @ApiOperation(value = "修改", notes = "传入backblastWarnHanRec")
    public R update(@Valid @RequestBody BackblastWarnHanRecEntity backblastWarnHanRec) {
        return R.status(backblastWarnHanRecService.updateById(backblastWarnHanRec));
    }
    /**
     * 反炸预警处置记录表 新增或修改
     */
    @PostMapping("/submit")
    @ApiOperationSupport(order = 6)
    @ApiOperation(value = "新增或修改", notes = "传入backblastWarnHanRec")
    public R submit(@Valid @RequestBody BackblastWarnHanRecEntity backblastWarnHanRec) {
        return R.status(backblastWarnHanRecService.saveOrUpdate(backblastWarnHanRec));
    }
    /**
     * 反炸预警处置记录表 删除
     */
    @PostMapping("/remove")
    @ApiOperationSupport(order = 7)
    @ApiLog("反炸预警处置记录表 删除")
    @ApiOperation(value = "逻辑删除", notes = "传入ids")
    public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
        bladeLogger.info("反炸预警处置记录表 删除", JsonUtil.toJson(ids));
        return R.status(backblastWarnHanRecService.removeByIds(Func.toLongList(ids)));
    }
    /**
     * 反炸预警处置记录表 自定义新增或修改
     */
    @PostMapping("/saveOrUpdate")
    @ApiOperationSupport(order = 8)
    @ApiLog("反炸预警处置记录表 自定义新增或修改")
    @ApiOperation(value = "自定义新增或修改", notes = "传入backblastWarnHanRec")
    public R saveOrUpdate(@Valid @RequestBody BackblastWarnHanRecEntity backblastWarnHanRec) {
        bladeLogger.info("反炸预警处置记录表 自定义新增或修改", JsonUtil.toJson(backblastWarnHanRec));
        return R.status(backblastWarnHanRecService.saveOrUpdateBackblastWarnHanRecEntity(backblastWarnHanRec));
    }
    /**
     * 反炸预警处置记录表 自定义详情
     */
    @GetMapping("/getDetail")
    @ApiOperationSupport(order = 9)
    @ApiLog("反炸预警处置记录表 自定义详情")
    @ApiOperation(value = "详情", notes = "传入backblastWarnHanRec")
    public R getDetail(BackblastWarnHanRecVO backblastWarnHanRec) {
        bladeLogger.info("反炸预警处置记录表 自定义详情", JsonUtil.toJson(backblastWarnHanRec));
        BackblastWarnHanRecVO detail = backblastWarnHanRecService.getDetail(backblastWarnHanRec);
        return R.data(detail);
    }
}
src/main/java/org/springblade/modules/backblast/dto/BackblastPubRecordDTO.java
New file
@@ -0,0 +1,34 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.backblast.dto;
import org.springblade.modules.backblast.entity.BackblastPubRecordEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
 * 反炸宣传记录表 数据传输对象实体类
 *
 * @author BladeX
 * @since 2024-03-15
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class BackblastPubRecordDTO extends BackblastPubRecordEntity {
    private static final long serialVersionUID = 1L;
}
src/main/java/org/springblade/modules/backblast/dto/BackblastWarnHanRecDTO.java
New file
@@ -0,0 +1,34 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.backblast.dto;
import org.springblade.modules.backblast.entity.BackblastWarnHanRecEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
 * 反炸预警处置记录表 数据传输对象实体类
 *
 * @author BladeX
 * @since 2024-03-15
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class BackblastWarnHanRecDTO extends BackblastWarnHanRecEntity {
    private static final long serialVersionUID = 1L;
}
src/main/java/org/springblade/modules/backblast/entity/BackblastPubPersonEntity.java
New file
@@ -0,0 +1,86 @@
package org.springblade.modules.backblast.entity;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
 * 反诈宣传宣防对象表 实体类
 *
 * @author BladeX
 * @since 2024-03-15
 */
@Data
@TableName("jczz_backblast_pub_person")
@ApiModel(value = "BackblastPubPerson对象", description = "反诈宣传宣防对象表")
public class BackblastPubPersonEntity implements Serializable {
    private static final long serialVersionUID = 1L;
    /** 主键id */
    @ApiModelProperty(value = "主键ID", example = "")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;
    /**
     * 反诈宣传ID
     */
    @ApiModelProperty(value = "反诈宣传ID")
    private Long backblastPubRecordId;
    /**
     * 姓名
     */
    @ApiModelProperty(value = "姓名")
    private String name;
    /**
     * 电话
     */
    @ApiModelProperty(value = "电话")
    private String telephone;
    /**
     * 身份证
     */
    @ApiModelProperty(value = "身份证")
    private String idCard;
    /**
     * 居住地址
     */
    @ApiModelProperty(value = "居住地址")
    private String address;
    /**
     * 职业
     */
    @ApiModelProperty(value = "职业")
    private String occupation;
    /** 创建人 */
    @ApiModelProperty(value = "创建人", example = "")
    @TableField("create_user")
    private Long createUser;
    /** 创建时间 */
    @ApiModelProperty(value = "创建时间", example = "")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private Date createTime;
    /** 更新人 */
    @ApiModelProperty(value = "更新人", example = "")
    @TableField("update_user")
    private Long updateUser;
    /** 更新时间 */
    @ApiModelProperty(value = "更新时间", example = "")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(value = "update_time",fill = FieldFill.UPDATE)
    private Date updateTime;
    /** 是否删除 0:否  1:是 */
    @ApiModelProperty(value = "是否删除 0:否  1:是", example = "")
    @TableField("is_deleted")
    @TableLogic
    private Integer isDeleted;
}
src/main/java/org/springblade/modules/backblast/entity/BackblastPubRecordEntity.java
New file
@@ -0,0 +1,131 @@
package org.springblade.modules.backblast.entity;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
/**
 * 反炸宣传记录表 实体类
 *
 * @author BladeX
 * @since 2024-03-15
 */
@Data
@TableName("jczz_backblast_pub_record")
@ApiModel(value = "BackblastPubRecord对象", description = "反炸宣传记录表")
public class BackblastPubRecordEntity implements Serializable {
    private static final long serialVersionUID = 1L;
    /** 主键id */
    @ApiModelProperty(value = "主键ID", example = "")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;
    /**
     * 房屋编码
     */
    @ApiModelProperty(value = "房屋编码")
    private String houseCode;
    /**
     * 记录民警姓名
     */
    @ApiModelProperty(value = "宣传记录民警姓名")
    private String policeman;
    /**
     * 记录民警电话
     */
    @ApiModelProperty(value = "宣传记录民警电话")
    private String policemanPhone;
    /**
     * 宣传内容
     */
    @ApiModelProperty(value = "宣传内容")
    private String pubContent;
    /**
     * 宣传现场照片
     */
    @ApiModelProperty(value = "宣传现场照片")
    private String pubUrls;
    /**
     * 网格编号
     */
    @ApiModelProperty(value = "网格编号")
    private String gridCode;
    /**
     * 警务网格编号
     */
    @ApiModelProperty(value = "警务网格编号")
    private String jwGridCode;
    /**
     * 经度
     */
    @ApiModelProperty(value = "经度")
    private String lng;
    /**
     * 纬度
     */
    @ApiModelProperty(value = "纬度")
    private String lat;
    /**
     * 地址
     */
    @ApiModelProperty(value = "地址")
    private String address;
    /** 创建人 */
    @ApiModelProperty(value = "创建人", example = "")
    @TableField(value = "create_user",fill = FieldFill.INSERT)
    private Long createUser;
    /** 创建时间 */
    @ApiModelProperty(value = "创建时间", example = "")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private Date createTime;
    /** 更新人 */
    @ApiModelProperty(value = "更新人", example = "")
    @TableField(value = "update_user",fill = FieldFill.UPDATE)
    private Long updateUser;
    /** 更新时间 */
    @ApiModelProperty(value = "更新时间", example = "")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(value = "update_time",fill = FieldFill.UPDATE)
    private Date updateTime;
    /** 是否删除 0:否  1:是 */
    @ApiModelProperty(value = "是否删除 0:否  1:是", example = "")
    @TableField("is_deleted")
    @TableLogic
    private Integer isDeleted;
    /** 是否下载国家反诈app  1:是  2:否 */
    @ApiModelProperty(value = "是否下载国家反诈app  1:是  2:否", example = "")
    private Integer isFzApp;
    /** 是否打开预警功能 1:是  2:否 */
    @ApiModelProperty(value = "是否打开预警功能 1:是  2:否", example = "")
    private Integer isOpenAlarm;
    /** 是否接受过其他反诈宣防内容 */
    @ApiModelProperty(value = "是否接受过其他反诈宣防内容", example = "")
    private Integer isOther;
    /** 其他防诈内容 */
    @ApiModelProperty(value = "其他防诈内容", example = "")
    private String otherId;
    @ApiModelProperty(value = "是否接受过其他反诈宣防内容", example = "")
    @TableField("backblast_pub_flag")
    private String backblastPubFlag;
    @ApiModelProperty(value = "备注", example = "")
    @TableField("remark")
    private String remark;
}
src/main/java/org/springblade/modules/backblast/entity/BackblastWarnHanRecEntity.java
New file
@@ -0,0 +1,106 @@
package org.springblade.modules.backblast.entity;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
/**
 * 反炸预警处置记录表 实体类
 *
 * @author BladeX
 * @since 2024-03-15
 */
@Data
@TableName("jczz_backblast_warn_han_rec")
@ApiModel(value = "BackblastWarnHanRec对象", description = "反炸预警处置记录表")
public class BackblastWarnHanRecEntity implements Serializable {
    private static final long serialVersionUID = 1L;
    /** 主键id */
    @ApiModelProperty(value = "主键ID", example = "")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;
    /**
     * 房屋编码
     */
    @ApiModelProperty(value = "房屋编码")
    private String houseCode;
    /**
     * 记录民警姓名
     */
    @ApiModelProperty(value = "记录民警姓名")
    private String policeman;
    /**
     * 记录民警电话
     */
    @ApiModelProperty(value = "记录民警电话")
    private String policemanPhone;
    /**
     * 记录内容
     */
    @ApiModelProperty(value = "记录内容")
    private String recContent;
    /**
     * 现场照片
     */
    @ApiModelProperty(value = "现场照片")
    private String sceUrls;
    /**
     * 网格编号
     */
    @ApiModelProperty(value = "网格编号")
    private String gridCode;
    /**
     * 警务网格编号
     */
    @ApiModelProperty(value = "警务网格编号")
    private String jwGridCode;
    /**
     * 经度
     */
    @ApiModelProperty(value = "经度")
    private String lng;
    /**
     * 纬度
     */
    @ApiModelProperty(value = "纬度")
    private String lat;
    /**
     * 地址
     */
    @ApiModelProperty(value = "地址")
    private String address;
    /** 创建人 */
    @ApiModelProperty(value = "创建人", example = "")
    @TableField(value = "create_user",fill = FieldFill.INSERT)
    private Long createUser;
    /** 创建时间 */
    @ApiModelProperty(value = "创建时间", example = "")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private Date createTime;
    /** 更新人 */
    @ApiModelProperty(value = "更新人", example = "")
    @TableField(value = "update_user",fill = FieldFill.UPDATE)
    private Long updateUser;
    /** 更新时间 */
    @ApiModelProperty(value = "更新时间", example = "")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(value = "update_time",fill = FieldFill.UPDATE)
    private Date updateTime;
    /** 是否删除 0:否  1:是 */
    @ApiModelProperty(value = "是否删除 0:否  1:是", example = "")
    @TableField("is_deleted")
    // @TableLogic
    private Integer isDeleted;
}
src/main/java/org/springblade/modules/backblast/excel/BackblastPubRecordExcel.java
New file
@@ -0,0 +1,93 @@
package org.springblade.modules.backblast.excel;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springblade.common.excel.ExcelDictConverter;
import org.springblade.common.excel.ExcelDictItem;
import org.springblade.common.excel.ExcelDictItemLabel;
import java.util.Date;
@Data
@ColumnWidth(25)
@HeadRowHeight(20)
@ContentRowHeight(18)
public class BackblastPubRecordExcel {
    @ExcelProperty(value = "街道名称")
    private String townName;
    @ExcelProperty(value = "社区名称")
    private String communityName;
    @ExcelProperty(value = "派出所名称")
    private String pcsName;
    @ExcelProperty(value = "机构名称")
    private String deptName;
    @ExcelProperty(value = "小区名称")
    private String aoiName;
    @ExcelProperty(value = "房屋名称")
    private String houseName;
    @ExcelProperty(value = "宣传记录民警姓名")
    private String policeman;
    @ExcelProperty(value = "宣传记录民警电话")
    private String policemanPhone;
    @ExcelProperty(value = "宣传内容")
    private String pubContent;
    // @ExcelProperty(value = "宣传现场照片")
    // private String pubUrls;
    // @ExcelProperty(value = "网格编号")
    // private String gridCode;
    // @ExcelProperty(value = "警务网格编号")
    // private String jwGridCode;
    @ExcelProperty(value = "经度")
    private String lng;
    @ExcelProperty(value = "纬度")
    private String lat;
    @ExcelProperty(value = "地址")
    private String address;
    @ExcelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;
    // @ExcelProperty(value = "是否下载国家反诈app  1:是  2:否")
    @ExcelProperty(value = "是否下载国家反诈app", converter = ExcelDictConverter.class)
    @ExcelDictItemLabel(type = "isFlag")
    @ExcelDictItem(type = "isFlag")
    private String isFzApp;
    // @ExcelProperty(value = "是否打开预警功能 1:是  2:否")
    @ExcelProperty(value = "是否打开预警功能", converter = ExcelDictConverter.class)
    @ExcelDictItem(type = "isFlag")
    @ExcelDictItemLabel(type = "isFlag")
    private String isOpenAlarm;
    @ExcelProperty(value = "是否接受过其他反诈宣防内容")
    private Integer isOther;
    @ExcelProperty(value = "其他防诈内容")
    private String otherId;
}
src/main/java/org/springblade/modules/backblast/mapper/BackblastPubPersonMapper.java
New file
@@ -0,0 +1,39 @@
package org.springblade.modules.backblast.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import org.springblade.modules.backblast.entity.BackblastPubPersonEntity;
import org.springblade.modules.backblast.vo.BackblastPubPersonVO;
import java.util.List;
/**
 * 反炸宣传对象表 Mapper 接口
 *
 * @author BladeX
 * @since 2024-04-03
 */
public interface BackblastPubPersonMapper extends BaseMapper<BackblastPubPersonEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param backblastPubPerson
     * @return
     */
    List<BackblastPubPersonVO> selectBackblastPubPersonPage(IPage page,
                                                            @Param("backblastPubPerson") BackblastPubPersonVO backblastPubPerson,
                                                            @Param("isAdministrator") Integer isAdministrator,
                                                            @Param("regionChildCodesList") List<String> regionChildCodesList,
                                                            @Param("gridCodeList") List<String> gridCodeList);
    /**
     * 反炸宣传对象表 自定义详情
     * @param backblastPubPerson
     * @return
     */
    BackblastPubPersonVO getDetail(@Param("backblastPubPerson") BackblastPubPersonVO backblastPubPerson);
}
src/main/java/org/springblade/modules/backblast/mapper/BackblastPubPersonMapper.xml
New file
@@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.springblade.modules.backblast.mapper.BackblastPubPersonMapper">
    <!-- 通用查询映射结果 -->
    <resultMap id="backblastPubPersonResultMap" type="org.springblade.modules.backblast.vo.BackblastPubPersonVO">
    </resultMap>
    <!--自定义分页列表查询-->
    <select id="selectBackblastPubPersonPage" resultMap="backblastPubPersonResultMap">
        select
        jbpp.*
        from jczz_backblast_pub_person jbpp
        where jbpp.is_deleted = 0
        <if test="backblastPubPerson.address != null and backblastPubPerson.address != ''">
            and jbpp.address like concat('%',#{backblastPubPerson.address},'%')
        </if>
        <if test="backblastPubPerson.name != null and backblastPubPerson.name != ''">
            and jbpp.name like concat('%',#{backblastPubPerson.name},'%')
        </if>
        <if test="backblastPubPerson.telephone != null and backblastPubPerson.telephone != ''">
            and jbpp.telephone like concat('%',#{backblastPubPerson.telephone},'%')
        </if>
        <if test="backblastPubPerson.idCard != null and backblastPubPerson.idCard != ''">
            and jbpp.id_card like concat('%',#{backblastPubPerson.idCard},'%')
        </if>
        <if test="backblastPubPerson.startTime != null and backblastPubPerson.startTime != ''">
            and date_format(jbpp.create_time,'%Y-%m-%d') &gt;= #{backblastPubPerson.startTime}
        </if>
        <if test="backblastPubPerson.endTime != null and backblastPubPerson.endTime != ''">
            and date_format(jbpp.create_time,'%Y-%m-%d') &lt;= #{backblastPubPerson.endTime}
        </if>
        <if test="backblastPubPerson.searchKey!=null and backblastPubPerson.searchKey!=''">
            and CONCAT(
            ifnull(jbpp.id_card,''),
            ifnull(jbpp.address,''),
            ifnull(jbpp.name,''),
            ifnull(jbpp.telephone,'')
            ) like CONCAT ('%', #{backblastPubPerson.searchKey},'%')
        </if>
        order by jbpp.id desc,jbpp.create_time desc
    </select>
    <!--反炸宣传对象表 自定义详情-->
    <select id="getDetail" resultType="org.springblade.modules.backblast.vo.BackblastPubPersonVO">
        select
        jbpp.*
        from jczz_backblast_pub_person jbpp
        where jbpp.is_deleted = 0
        <if test="backblastPubPerson.id != null">
            and jbpp.id = #{backblastPubPerson.id}
        </if>
        order by jbpp.id desc,jbpp.create_time desc
    </select>
</mapper>
src/main/java/org/springblade/modules/backblast/mapper/BackblastPubRecordMapper.java
New file
@@ -0,0 +1,62 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.backblast.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import org.springblade.modules.backblast.entity.BackblastPubRecordEntity;
import org.springblade.modules.backblast.excel.BackblastPubRecordExcel;
import org.springblade.modules.backblast.vo.BackblastPubRecordVO;
import java.util.List;
/**
 * 反炸宣传记录表 Mapper 接口
 *
 * @author BladeX
 * @since 2024-03-15
 */
public interface BackblastPubRecordMapper extends BaseMapper<BackblastPubRecordEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param backblastPubRecord
     * @return
     */
    List<BackblastPubRecordVO> selectBackblastPubRecordPage(IPage page,
                                                            @Param("backblastPubRecord") BackblastPubRecordVO backblastPubRecord,
                                                            @Param("isAdministrator") Integer isAdministrator,
                                                            @Param("regionChildCodesList") List<String> regionChildCodesList,
                                                            @Param("gridCodeList") List<String> gridCodeList);
    /**
     * 反炸宣传记录表 自定义详情
     *
     * @param backblastPubRecord
     * @return
     */
    BackblastPubRecordVO getDetail(@Param("backblastPubRecord") BackblastPubRecordVO backblastPubRecord);
    List<BackblastPubRecordExcel> selectBackblastPubRecordExport(@Param("backblastPubRecord") BackblastPubRecordVO backblastPubRecord,
                                                                 @Param("isAdministrator") Integer isAdministrator,
                                                                 @Param("regionChildCodesList") List<String> regionChildCodesList,
                                                                 @Param("gridCodeList") List<String> gridCodeList);
}
src/main/java/org/springblade/modules/backblast/mapper/BackblastPubRecordMapper.xml
New file
@@ -0,0 +1,315 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.springblade.modules.backblast.mapper.BackblastPubRecordMapper">
    <!-- 通用查询映射结果 -->
    <resultMap id="backblastPubRecordResultMap" type="org.springblade.modules.backblast.vo.BackblastPubRecordVO">
    </resultMap>
    <!--自定义分页列表查询-->
    <select id="selectBackblastPubRecordPage" resultMap="backblastPubRecordResultMap">
        select
        jbpr.*,
        jg.grid_name,
        br.town_name AS townName,
        br.NAME AS communityName,
        jpag.pcs_name pcsName,
        jda.aoi_name,
        CONCAT( IF(jda.building_name,jda.building_name,''), '-', IF(jda.unit_name,jda.unit_name,''), '-', IF(jda.house_name,jda.house_name,'') ) houseName,
        bd.dept_name
        from jczz_backblast_pub_record jbpr
        LEFT JOIN jczz_grid jg on jg.grid_code = jbpr.grid_code and jg.is_deleted = 0
        LEFT JOIN jczz_police_affairs_grid jpag on jbpr.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0
        LEFT JOIN blade_region br on br.code = jpag.community_code
        LEFT JOIN blade_user bu ON bu.id = jbpr.create_user
        LEFT JOIN blade_dept bd on bd.id = bu.dept_id
        LEFT JOIN jczz_doorplate_address jda ON jda.address_code = jbpr.house_code
        where jbpr.is_deleted = 0
        <if test="backblastPubRecord.townName != null and backblastPubRecord.townName != ''">
            and br.town_name like concat('%',#{backblastPubRecord.townName},'%')
        </if>
        <if test="backblastPubRecord.communityName != null and backblastPubRecord.communityName != ''">
            and br.name like concat('%',#{backblastPubRecord.communityName},'%')
        </if>
        <if test="backblastPubRecord.pcsName != null and backblastPubRecord.pcsName != ''">
            and jpag.pcs_name like concat('%',#{backblastPubRecord.pcsName},'%')
        </if>
        <if test="backblastPubRecord.houseCode != null and backblastPubRecord.houseCode != ''">
            and jbpr.house_code = #{backblastPubRecord.houseCode}
        </if>
        <if test="backblastPubRecord.address != null and backblastPubRecord.address != ''">
            and jbpr.address like concat('%',#{backblastPubRecord.address},'%')
        </if>
          <if test="backblastPubRecord.deptName != null and backblastPubRecord.deptName != ''">
            and  bd.dept_name like concat('%',#{backblastPubRecord.deptName},'%')
        </if>
        <if test="backblastPubRecord.pubContent != null and backblastPubRecord.pubContent != ''">
            and jbpr.pub_content like concat('%',#{backblastPubRecord.pubContent},'%')
        </if>
        <if test="backblastPubRecord.policeman != null and backblastPubRecord.policeman != ''">
            and jbpr.policeman like concat('%',#{backblastPubRecord.policeman},'%')
        </if>
        <if test="backblastPubRecord.createUser != null">
            and jbpr.create_user = #{backblastPubRecord.createUser}
        </if>
        <if test="backblastPubRecord.policemanPhone != null and backblastPubRecord.policemanPhone != ''">
            and jbpr.policeman_phone like concat('%',#{backblastPubRecord.policemanPhone},'%')
        </if>
        <if test="backblastPubRecord.startTime != null and backblastPubRecord.startTime != ''">
            and date_format(jbpr.create_time,'%Y-%m-%d') &gt;= #{backblastPubRecord.startTime}
        </if>
        <if test="backblastPubRecord.endTime != null and backblastPubRecord.endTime != ''">
            and date_format(jbpr.create_time,'%Y-%m-%d') &lt;= #{backblastPubRecord.endTime}
        </if>
        <if test="backblastPubRecord.searchKey!=null and backblastPubRecord.searchKey!=''">
            and CONCAT(
            ifnull(jbpr.policeman_phone,''),
            ifnull(jbpr.address,''),
            ifnull(jbpr.pub_content,''),
            ifnull(jbpr.policeman,'')
            ) like CONCAT ('%', #{backblastPubRecord.searchKey},'%')
        </if>
        <if test="isAdministrator==2">
            <choose>
                <when test="backblastPubRecord.roleName != null and backblastPubRecord.roleName != ''">
                    <if test="backblastPubRecord.roleName=='wgy'">
                        <choose>
                            <when test="gridCodeList !=null and gridCodeList.size()>0">
                                and jg.grid_code in
                                <foreach collection="gridCodeList" item="code" open="(" close=")" separator=",">
                                    #{code}
                                </foreach>
                            </when>
                            <otherwise>
                                and jg.grid_code in ('')
                            </otherwise>
                        </choose>
                    </if>
                    <if test="backblastPubRecord.roleName=='mj'">
                        <choose>
                            <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
                                and jpag.community_code in
                                <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
                                    #{code}
                                </foreach>
                            </when>
                            <otherwise>
                                and jpag.community_code in ('')
                            </otherwise>
                        </choose>
                    </if>
                </when>
                <otherwise>
                    <choose>
                        <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
                            and
                            (
                            jg.grid_code in
                            <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
                                #{code}
                            </foreach>
                            or
                            jpag.community_code in
                            <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
                                #{code}
                            </foreach>
                            )
                        </when>
                        <otherwise>
                            and
                            (
                            jg.grid_code in ('') or jpag.community_code in ('')
                            )
                        </otherwise>
                    </choose>
                </otherwise>
            </choose>
        </if>
        order by jbpr.id desc,jbpr.create_time desc
    </select>
    <!--详情map-->
    <resultMap id="detailMap" type="org.springblade.modules.backblast.vo.BackblastPubRecordVO" autoMapping="true">
        <id property="id" column="id"/>
        <collection property="backblastPubPersonEntityList" javaType="java.util.List"
                    ofType="org.springblade.modules.backblast.entity.BackblastPubPersonEntity"
                    autoMapping="true">
            <id property="id" column="cid"/>
            <result property="address" column="caddress"/>
        </collection>
    </resultMap>
    <!--反炸宣传记录表 自定义详情-->
    <select id="getDetail" resultMap="detailMap">
        select
        jbpr.*,
        br.town_name as townName,
        br.name as communityName,
        jpag.pcs_name pcsName,
        jbpp.id as cid,
        jbpp.name,
        jbpp.telephone,
        jbpp.id_card,
        jbpp.address as caddress,
        jbpp.occupation
        from jczz_backblast_pub_record jbpr
        LEFT JOIN jczz_grid jg on jg.grid_code = jbpr.grid_code and jg.is_deleted = 0
        LEFT JOIN jczz_police_affairs_grid jpag on jbpr.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0
        LEFT JOIN blade_region br on br.code = jpag.community_code
        LEFT JOIN jczz_backblast_pub_person jbpp on jbpp.backblast_pub_record_id = jbpr.id and jbpp.is_deleted = 0
        where jbpr.is_deleted = 0
        <if test="backblastPubRecord.id != null">
            and jbpr.id = #{backblastPubRecord.id}
        </if>
        <if test="backblastPubRecord.townName != null and backblastPubRecord.townName != ''">
            and br.town_name like concat('%',#{backblastPubRecord.townName},'%')
        </if>
        <if test="backblastPubRecord.communityName != null and backblastPubRecord.communityName != ''">
            and br.name like concat('%',#{backblastPubRecord.communityName},'%')
        </if>
        <if test="backblastPubRecord.pcsName != null and backblastPubRecord.pcsName != ''">
            and jpag.pcs_name like concat('%',#{backblastPubRecord.pcsName},'%')
        </if>
        <if test="backblastPubRecord.houseCode != null and backblastPubRecord.houseCode != ''">
            and jbpr.house_code = #{backblastPubRecord.houseCode}
        </if>
        <if test="backblastPubRecord.address != null and backblastPubRecord.address != ''">
            and jbpr.address like concat('%',#{backblastPubRecord.address},'%')
        </if>
        <if test="backblastPubRecord.pubContent != null and backblastPubRecord.pubContent != ''">
            and jbpr.pub_content like concat('%',#{backblastPubRecord.pubContent},'%')
        </if>
        <if test="backblastPubRecord.policeman != null and backblastPubRecord.policeman != ''">
            and jbpr.policeman like concat('%',#{backblastPubRecord.policeman},'%')
        </if>
        <if test="backblastPubRecord.policemanPhone != null and backblastPubRecord.policemanPhone != ''">
            and jbpr.policeman_phone like concat('%',#{backblastPubRecord.policemanPhone},'%')
        </if>
        order by jbpr.id desc,jbpr.create_time desc
    </select>
    <select id="selectBackblastPubRecordExport"
            resultType="org.springblade.modules.backblast.excel.BackblastPubRecordExcel">
        select
        jbpr.*,
        br.town_name AS townName,
        br.NAME AS communityName,
        jpag.pcs_name pcsName,
        jda.aoi_name,
        CONCAT( IF(jda.building_name,jda.building_name,''), '-', IF(jda.unit_name,jda.unit_name,''), '-', IF(jda.house_name,jda.house_name,'') ) houseName,
        bd.dept_name
        from jczz_backblast_pub_record jbpr
        LEFT JOIN jczz_grid jg on jg.grid_code = jbpr.grid_code and jg.is_deleted = 0
        LEFT JOIN jczz_police_affairs_grid jpag on jbpr.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0
        LEFT JOIN blade_region br on br.code = jpag.community_code
        LEFT JOIN blade_user bu ON bu.id = jbpr.create_user
        LEFT JOIN blade_dept bd on bd.id = bu.dept_id
        LEFT JOIN jczz_doorplate_address jda ON jda.address_code = jbpr.house_code
        where jbpr.is_deleted = 0
        <if test="backblastPubRecord.townName != null and backblastPubRecord.townName != ''">
            and br.town_name like concat('%',#{backblastPubRecord.townName},'%')
        </if>
        <if test="backblastPubRecord.communityName != null and backblastPubRecord.communityName != ''">
            and br.name like concat('%',#{backblastPubRecord.communityName},'%')
        </if>
        <if test="backblastPubRecord.pcsName != null and backblastPubRecord.pcsName != ''">
            and jpag.pcs_name like concat('%',#{backblastPubRecord.pcsName},'%')
        </if>
        <if test="backblastPubRecord.houseCode != null and backblastPubRecord.houseCode != ''">
            and jbpr.house_code = #{backblastPubRecord.houseCode}
        </if>
        <if test="backblastPubRecord.address != null and backblastPubRecord.address != ''">
            and jbpr.address like concat('%',#{backblastPubRecord.address},'%')
        </if>
        <if test="backblastPubRecord.deptName != null and backblastPubRecord.deptName != ''">
            and  bd.dept_name like concat('%',#{backblastPubRecord.deptName},'%')
        </if>
        <if test="backblastPubRecord.pubContent != null and backblastPubRecord.pubContent != ''">
            and jbpr.pub_content like concat('%',#{backblastPubRecord.pubContent},'%')
        </if>
        <if test="backblastPubRecord.policeman != null and backblastPubRecord.policeman != ''">
            and jbpr.policeman like concat('%',#{backblastPubRecord.policeman},'%')
        </if>
        <if test="backblastPubRecord.createUser != null">
            and jbpr.create_user = #{backblastPubRecord.createUser}
        </if>
        <if test="backblastPubRecord.policemanPhone != null and backblastPubRecord.policemanPhone != ''">
            and jbpr.policeman_phone like concat('%',#{backblastPubRecord.policemanPhone},'%')
        </if>
        <if test="backblastPubRecord.startTime != null and backblastPubRecord.startTime != ''">
            and date_format(jbpr.create_time,'%Y-%m-%d') &gt;= #{backblastPubRecord.startTime}
        </if>
        <if test="backblastPubRecord.endTime != null and backblastPubRecord.endTime != ''">
            and date_format(jbpr.create_time,'%Y-%m-%d') &lt;= #{backblastPubRecord.endTime}
        </if>
        <if test="backblastPubRecord.searchKey!=null and backblastPubRecord.searchKey!=''">
            and CONCAT(
            ifnull(jbpr.policeman_phone,''),
            ifnull(jbpr.address,''),
            ifnull(jbpr.pub_content,''),
            ifnull(jbpr.policeman,'')
            ) like CONCAT ('%', #{backblastPubRecord.searchKey},'%')
        </if>
        <if test="isAdministrator==2">
            <choose>
                <when test="backblastPubRecord.roleName != null and backblastPubRecord.roleName != ''">
                    <if test="backblastPubRecord.roleName=='wgy'">
                        <choose>
                            <when test="gridCodeList !=null and gridCodeList.size()>0">
                                and jg.grid_code in
                                <foreach collection="gridCodeList" item="code" open="(" close=")" separator=",">
                                    #{code}
                                </foreach>
                            </when>
                            <otherwise>
                                and jg.grid_code in ('')
                            </otherwise>
                        </choose>
                    </if>
                    <if test="backblastPubRecord.roleName=='mj'">
                        <choose>
                            <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
                                and jpag.community_code in
                                <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
                                    #{code}
                                </foreach>
                            </when>
                            <otherwise>
                                and jpag.community_code in ('')
                            </otherwise>
                        </choose>
                    </if>
                </when>
                <otherwise>
                    <choose>
                        <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
                            and
                            (
                            jg.grid_code in
                            <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
                                #{code}
                            </foreach>
                            or
                            jpag.community_code in
                            <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
                                #{code}
                            </foreach>
                            )
                        </when>
                        <otherwise>
                            and
                            (
                            jg.grid_code in ('') or jpag.community_code in ('')
                            )
                        </otherwise>
                    </choose>
                </otherwise>
            </choose>
        </if>
        order by jbpr.id desc,jbpr.create_time desc
    </select>
</mapper>
src/main/java/org/springblade/modules/backblast/mapper/BackblastWarnHanRecMapper.java
New file
@@ -0,0 +1,54 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.backblast.mapper;
import org.apache.ibatis.annotations.Param;
import org.springblade.modules.backblast.entity.BackblastWarnHanRecEntity;
import org.springblade.modules.backblast.vo.BackblastWarnHanRecVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List;
/**
 * 反炸预警处置记录表 Mapper 接口
 *
 * @author BladeX
 * @since 2024-03-15
 */
public interface BackblastWarnHanRecMapper extends BaseMapper<BackblastWarnHanRecEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param backblastWarnHanRec
     * @return
     */
    List<BackblastWarnHanRecVO> selectBackblastWarnHanRecPage(IPage page,
                                                              @Param("backblastWarnHanRec") BackblastWarnHanRecVO backblastWarnHanRec,
                                                              @Param("isAdministrator") Integer isAdministrator,
                                                              @Param("regionChildCodesList") List<String> regionChildCodesList,
                                                              @Param("gridCodeList") List<String> gridCodeList);
    /**
     * 反炸预警处置记录表 自定义详情
     * @param backblastWarnHanRec
     * @return
     */
    BackblastWarnHanRecVO getDetail(@Param("backblastWarnHanRec") BackblastWarnHanRecVO backblastWarnHanRec);
}
src/main/java/org/springblade/modules/backblast/mapper/BackblastWarnHanRecMapper.xml
New file
@@ -0,0 +1,169 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.springblade.modules.backblast.mapper.BackblastWarnHanRecMapper">
    <!-- 通用查询映射结果 -->
    <resultMap id="backblastWarnHanRecResultMap" type="org.springblade.modules.backblast.vo.BackblastWarnHanRecVO">
    </resultMap>
    <!--自定义分页列表查询-->
    <select id="selectBackblastWarnHanRecPage" resultMap="backblastWarnHanRecResultMap">
        select
        jbwhr.*,
        br.town_name as townName,
        br.name as communityName,
        jpag.pcs_name pcsName,
        bd.dept_name
        from jczz_backblast_warn_han_rec jbwhr
        LEFT JOIN jczz_grid jg on jg.grid_code = jbwhr.grid_code and jg.is_deleted = 0
        LEFT JOIN jczz_police_affairs_grid jpag on jbwhr.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0
        LEFT JOIN blade_region br on br.code = jpag.community_code
        LEFT JOIN blade_user bu ON bu.id = jbwhr.create_user
        LEFT JOIN blade_dept bd on bd.id = bu.dept_id
        where jbwhr.is_deleted = 0
        <if test="backblastWarnHanRec.townName != null and backblastWarnHanRec.townName != ''">
            and br.town_name like concat('%',#{backblastWarnHanRec.townName},'%')
        </if>
        <if test="backblastWarnHanRec.communityName != null and backblastWarnHanRec.communityName != ''">
            and jbr.name like concat('%',#{backblastWarnHanRec.communityName},'%')
        </if>
        <if test="backblastWarnHanRec.pcsName != null and backblastWarnHanRec.pcsName != ''">
            and jpag.pcs_name like concat('%',#{backblastWarnHanRec.pcsName},'%')
        </if>
        <if test="backblastWarnHanRec.houseCode != null and backblastWarnHanRec.houseCode != ''">
            and jbwhr.house_code = #{backblastWarnHanRec.houseCode}
        </if>
        <if test="backblastWarnHanRec.address != null and backblastWarnHanRec.address != ''">
            and jbwhr.address like concat('%',#{backblastWarnHanRec.address},'%')
        </if>
        <if test="backblastWarnHanRec.recContent != null and backblastWarnHanRec.recContent != ''">
            and jbwhr.rec_content like concat('%',#{backblastWarnHanRec.recContent},'%')
        </if>
        <if test="backblastWarnHanRec.policeman != null and backblastWarnHanRec.policeman != ''">
            and jbwhr.policeman like concat('%',#{backblastWarnHanRec.policeman},'%')
        </if>
        <if test="backblastWarnHanRec.policemanPhone != null and backblastWarnHanRec.policemanPhone != ''">
            and jbwhr.policeman_phone like concat('%',#{backblastWarnHanRec.policemanPhone},'%')
        </if>
        <if test="backblastWarnHanRec.startTime != null and backblastWarnHanRec.startTime != ''">
            and date_format(jbwhr.create_time,'%Y-%m-%d') &gt;= #{backblastWarnHanRec.startTime}
        </if>
        <if test="backblastWarnHanRec.endTime != null and backblastWarnHanRec.endTime != ''">
            and date_format(jbwhr.create_time,'%Y-%m-%d') &lt;= #{backblastWarnHanRec.endTime}
        </if>
        <if test="backblastWarnHanRec.createUser != null">
            and jbwhr.create_user = #{backblastWarnHanRec.createUser}
        </if>
        <if test="backblastWarnHanRec.deptName != null and backblastWarnHanRec.deptName != ''">
            and  bd.dept_name like concat('%',#{backblastWarnHanRec.deptName},'%')
        </if>
        <if test="backblastWarnHanRec.searchKey!=null and backblastWarnHanRec.searchKey!=''">
            and CONCAT(
            ifnull(jbwhr.policeman_phone,''),
            ifnull(jbwhr.address,''),
            ifnull(jbwhr.rec_content,''),
            ifnull(jbwhr.policeman,'')
            ) like CONCAT ('%', #{backblastWarnHanRec.searchKey},'%')
        </if>
        <if test="isAdministrator==2">
            <choose>
                <when test="backblastWarnHanRec.roleName != null and backblastWarnHanRec.roleName != ''">
                    <if test="backblastWarnHanRec.roleName=='wgy'">
                        <choose>
                            <when test="gridCodeList !=null and gridCodeList.size()>0">
                                and jg.grid_code in
                                <foreach collection="gridCodeList" item="code" open="(" close=")" separator=",">
                                    #{code}
                                </foreach>
                            </when>
                            <otherwise>
                                and jg.grid_code in ('')
                            </otherwise>
                        </choose>
                    </if>
                    <if test="backblastWarnHanRec.roleName=='mj'">
                        <choose>
                            <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
                                and jpag.community_code in
                                <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
                                    #{code}
                                </foreach>
                            </when>
                            <otherwise>
                                and jpag.community_code in ('')
                            </otherwise>
                        </choose>
                    </if>
                </when>
                <otherwise>
                    <choose>
                        <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
                            and
                            (
                            jg.grid_code in
                            <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
                                #{code}
                            </foreach>
                            or
                            jpag.community_code in
                            <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
                                #{code}
                            </foreach>
                            )
                        </when>
                        <otherwise>
                            and
                            (
                            jg.grid_code in ('') or jpag.community_code in ('')
                            )
                        </otherwise>
                    </choose>
                </otherwise>
            </choose>
        </if>
        order by jbwhr.id desc,jbwhr.create_time desc
    </select>
    <!--自定义分页列表查询-->
    <select id="getDetail" resultType="org.springblade.modules.backblast.vo.BackblastWarnHanRecVO">
        select
        jbwhr.*,
        br.town_name as townName,
        br.name as communityName,
        jpag.pcs_name pcsName
        from jczz_backblast_warn_han_rec jbwhr
        LEFT JOIN jczz_grid jg on jg.grid_code = jbwhr.grid_code and jg.is_deleted = 0
        LEFT JOIN jczz_police_affairs_grid jpag on jbwhr.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0
        LEFT JOIN blade_region br on br.code = jpag.community_code
        where jbwhr.is_deleted = 0
        <if test="backblastWarnHanRec.townName != null and backblastWarnHanRec.townName != ''">
            and br.town_name like concat('%',#{backblastWarnHanRec.townName},'%')
        </if>
        <if test="backblastWarnHanRec.communityName != null and backblastWarnHanRec.communityName != ''">
            and jbr.name like concat('%',#{backblastWarnHanRec.communityName},'%')
        </if>
        <if test="backblastWarnHanRec.pcsName != null and backblastWarnHanRec.pcsName != ''">
            and jpag.pcs_name like concat('%',#{backblastWarnHanRec.pcsName},'%')
        </if>
        <if test="backblastWarnHanRec.houseCode != null and backblastWarnHanRec.houseCode != ''">
            and jbwhr.house_code = #{backblastWarnHanRec.houseCode}
        </if>
        <if test="backblastWarnHanRec.id != null">
            and jbwhr.id = #{backblastWarnHanRec.id}
        </if>
        <if test="backblastWarnHanRec.address != null and backblastWarnHanRec.address != ''">
            and jbwhr.address like concat('%',#{backblastWarnHanRec.address},'%')
        </if>
        <if test="backblastWarnHanRec.recContent != null and backblastWarnHanRec.recContent != ''">
            and jbwhr.rec_content like concat('%',#{backblastWarnHanRec.recContent},'%')
        </if>
        <if test="backblastWarnHanRec.policeman != null and backblastWarnHanRec.policeman != ''">
            and jbwhr.policeman like concat('%',#{backblastWarnHanRec.policeman},'%')
        </if>
        <if test="backblastWarnHanRec.policemanPhone != null and backblastWarnHanRec.policemanPhone != ''">
            and jbwhr.policeman_phone like concat('%',#{backblastWarnHanRec.policemanPhone},'%')
        </if>
    </select>
</mapper>
src/main/java/org/springblade/modules/backblast/service/IBackblastPubPersonService.java
New file
@@ -0,0 +1,47 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.backblast.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springblade.modules.backblast.entity.BackblastPubPersonEntity;
import org.springblade.modules.backblast.vo.BackblastPubPersonVO;
/**
 * 反炸宣传对象表 服务类
 *
 * @author BladeX
 * @since 2024-03-15
 */
public interface IBackblastPubPersonService extends IService<BackblastPubPersonEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param BackblastPubPerson
     * @return
     */
    IPage<BackblastPubPersonVO> selectBackblastPubPersonPage(IPage<BackblastPubPersonVO> page, BackblastPubPersonVO BackblastPubPerson);
    /**
     * 反炸宣传对象表 自定义详情
     * @param BackblastPubPerson
     * @return
     */
    BackblastPubPersonVO getDetail(BackblastPubPersonVO BackblastPubPerson);
}
src/main/java/org/springblade/modules/backblast/service/IBackblastPubRecordService.java
New file
@@ -0,0 +1,66 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.backblast.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springblade.modules.backblast.entity.BackblastPubRecordEntity;
import org.springblade.modules.backblast.excel.BackblastPubRecordExcel;
import org.springblade.modules.backblast.vo.BackblastPubRecordVO;
import org.springblade.core.mp.base.BaseService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List;
/**
 * 反炸宣传记录表 服务类
 *
 * @author BladeX
 * @since 2024-03-15
 */
public interface IBackblastPubRecordService extends IService<BackblastPubRecordEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param backblastPubRecord
     * @return
     */
    IPage<BackblastPubRecordVO> selectBackblastPubRecordPage(IPage<BackblastPubRecordVO> page, BackblastPubRecordVO backblastPubRecord);
    /**
     * 反炸宣传记录表 自定义新增/修改
     * @param backblastPubRecord
     * @return
     */
    boolean addOrUpdateBackblastPubRecordEntity(BackblastPubRecordVO backblastPubRecord);
    /**
     * 反炸宣传记录表 自定义详情
     * @param backblastPubRecord
     * @return
     */
    BackblastPubRecordVO getDetail(BackblastPubRecordVO backblastPubRecord);
    /**
     * 反炸宣传记录表 删除
     */
    boolean removeBackblastPubByIds(List<Long> toLongList);
    List<BackblastPubRecordExcel> export(BackblastPubRecordVO backblastPubRecord);
}
src/main/java/org/springblade/modules/backblast/service/IBackblastWarnHanRecService.java
New file
@@ -0,0 +1,56 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.backblast.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springblade.modules.backblast.entity.BackblastWarnHanRecEntity;
import org.springblade.modules.backblast.vo.BackblastWarnHanRecVO;
import org.springblade.core.mp.base.BaseService;
import com.baomidou.mybatisplus.core.metadata.IPage;
/**
 * 反炸预警处置记录表 服务类
 *
 * @author BladeX
 * @since 2024-03-15
 */
public interface IBackblastWarnHanRecService extends IService<BackblastWarnHanRecEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param backblastWarnHanRec
     * @return
     */
    IPage<BackblastWarnHanRecVO> selectBackblastWarnHanRecPage(IPage<BackblastWarnHanRecVO> page, BackblastWarnHanRecVO backblastWarnHanRec);
    /**
     * 反炸预警处置记录表 自定义新增或修改
     * @param backblastWarnHanRec
     * @return
     */
    boolean saveOrUpdateBackblastWarnHanRecEntity(BackblastWarnHanRecEntity backblastWarnHanRec);
    /**
     * 反炸预警处置记录表 自定义详情
     * @param backblastWarnHanRec
     * @return
     */
    BackblastWarnHanRecVO getDetail(BackblastWarnHanRecVO backblastWarnHanRec);
}
src/main/java/org/springblade/modules/backblast/service/impl/BackblastPubPersonServiceImpl.java
New file
@@ -0,0 +1,57 @@
package org.springblade.modules.backblast.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springblade.common.param.CommonParamSet;
import org.springblade.common.param.GridSet;
import org.springblade.common.utils.SpringUtils;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.modules.backblast.entity.BackblastPubPersonEntity;
import org.springblade.modules.backblast.mapper.BackblastPubPersonMapper;
import org.springblade.modules.backblast.service.IBackblastPubPersonService;
import org.springblade.modules.backblast.vo.BackblastPubPersonVO;
import org.springblade.modules.grid.entity.GridEntity;
import org.springblade.modules.grid.service.IGridService;
import org.springblade.modules.police.entity.PoliceAffairsGridEntity;
import org.springblade.modules.police.service.IPoliceAffairsGridService;
import org.springblade.modules.system.entity.User;
import org.springblade.modules.system.service.IUserService;
import org.springframework.stereotype.Service;
import java.util.List;
/**
 * 反炸宣传对象表 服务实现类
 *
 * @author BladeX
 * @since 2024-03-15
 */
@Service
public class BackblastPubPersonServiceImpl extends ServiceImpl<BackblastPubPersonMapper, BackblastPubPersonEntity> implements IBackblastPubPersonService {
    /**
     * 自定义分页列表查询
     * @param page
     * @param backblastPubPerson
     * @return
     */
    @Override
    public IPage<BackblastPubPersonVO> selectBackblastPubPersonPage(IPage<BackblastPubPersonVO> page, BackblastPubPersonVO backblastPubPerson) {
        CommonParamSet commonParamSet = new CommonParamSet<>().invoke(BackblastPubPersonVO.class, backblastPubPerson);
        return page.setRecords(baseMapper.selectBackblastPubPersonPage(page,
            backblastPubPerson,
            commonParamSet.getIsAdministrator(),
            commonParamSet.getRegionChildCodesList(),
            commonParamSet.getGridCodeList()));
    }
    /**
     * 反炸宣传对象表 自定义详情
     * @param backblastPubPerson
     * @return
     */
    @Override
    public BackblastPubPersonVO getDetail(BackblastPubPersonVO backblastPubPerson) {
        return baseMapper.getDetail(backblastPubPerson);
    }
}
src/main/java/org/springblade/modules/backblast/service/impl/BackblastPubRecordServiceImpl.java
New file
@@ -0,0 +1,239 @@
package org.springblade.modules.backblast.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.util.Strings;
import org.springblade.common.param.CommonParamSet;
import org.springblade.common.utils.SpringUtils;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.utils.SpringUtil;
import org.springblade.modules.backblast.entity.BackblastPubPersonEntity;
import org.springblade.modules.backblast.entity.BackblastPubRecordEntity;
import org.springblade.modules.backblast.excel.BackblastPubRecordExcel;
import org.springblade.modules.backblast.mapper.BackblastPubRecordMapper;
import org.springblade.modules.backblast.service.IBackblastPubPersonService;
import org.springblade.modules.backblast.service.IBackblastPubRecordService;
import org.springblade.modules.backblast.vo.BackblastPubRecordVO;
import org.springblade.modules.grid.entity.GridEntity;
import org.springblade.modules.grid.service.IGridService;
import org.springblade.modules.police.entity.PoliceAffairsGridEntity;
import org.springblade.modules.police.service.IPoliceAffairsGridService;
import org.springblade.modules.system.entity.User;
import org.springblade.modules.system.service.IUserService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
/**
 * 反炸宣传记录表 服务实现类
 *
 * @author BladeX
 * @since 2024-03-15
 */
@Service
public class BackblastPubRecordServiceImpl extends ServiceImpl<BackblastPubRecordMapper, BackblastPubRecordEntity> implements IBackblastPubRecordService {
    /**
     * 自定义分页列表查询
     * @param page
     * @param backblastPubRecord
     * @return
     */
    @Override
    public IPage<BackblastPubRecordVO> selectBackblastPubRecordPage(IPage<BackblastPubRecordVO> page, BackblastPubRecordVO backblastPubRecord) {
        CommonParamSet commonParamSet = new CommonParamSet<>().invoke(BackblastPubRecordVO.class, backblastPubRecord);
        if (!Strings.isBlank(backblastPubRecord.getRoleName())){
            backblastPubRecord.setCreateUser(AuthUtil.getUserId());
        }
        return page.setRecords(baseMapper.selectBackblastPubRecordPage(page,
            backblastPubRecord,
            commonParamSet.getIsAdministrator(),
            commonParamSet.getRegionChildCodesList(),
            commonParamSet.getGridCodeList()));
    }
    /**
     * 反炸宣传记录表 自定义新增/修改
     * @param backblastPubRecord
     * @return
     */
    @Override
    @Transactional(rollbackFor = Exception.class)
    public boolean addOrUpdateBackblastPubRecordEntity(BackblastPubRecordVO backblastPubRecord) {
        backblastPubRecord.setCreateUser(AuthUtil.getUserId());
        boolean flag = false;
        // 点落面计算警格,网格,警格
        setGridInfo(backblastPubRecord);
        // "otherId":"\"\\\"\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"[1]\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\"\\\"\""
        backblastPubRecord.setOtherId(cleanEscapes(backblastPubRecord.getOtherId()));
        // 设置民警姓名电话(非民警暂时也记录)
        User user = SpringUtils.getBean(IUserService.class).getById(AuthUtil.getUserId());
        if (null!=user){
            backblastPubRecord.setPoliceman(user.getRealName());
            backblastPubRecord.setPolicemanPhone(user.getPhone());
        }
        if (null!=backblastPubRecord.getId()){
            // 更新
            flag = updateById(backblastPubRecord);
        }else {
            // 新增
            flag = save(backblastPubRecord);
        }
        // 宣防对象操作
        updateBackblastPubPerson(backblastPubRecord);
        // 返回
        return flag;
    }
    /**
     * 清理字符串中的多余转义字符
     * @param originalStr 原始字符串
     * @return 清理后的字符串
     */
    private static String cleanEscapes(String originalStr) {
        if (StringUtils.isBlank(originalStr)) {
            return "";
        }
        // 替换多个反斜杠为单个反斜杠
        String replacedBackslashes = originalStr.replaceAll("\\\\+", "\\\\");
        // 替换转义的双引号为空
        String cleanedStr = replacedBackslashes.replaceAll("\\\\\"", "").replaceAll("\"", "");
        return cleanedStr;
    }
    /**
     * 宣防对象操作
     * @param backblastPubRecord
     * @return
     */
    public void updateBackblastPubPerson(BackblastPubRecordVO backblastPubRecord) {
        IBackblastPubPersonService backblastPubPersonService = SpringUtil.getBean(IBackblastPubPersonService.class);
        if (backblastPubRecord.getBackblastPubPersonEntityList().size()>0){
            // 查询对应已存在的反诈宣传对象
            QueryWrapper<BackblastPubPersonEntity> wrapper = new QueryWrapper<>();
            wrapper.eq("backblast_pub_record_id", backblastPubRecord.getId()).eq("is_deleted",0);
            List<BackblastPubPersonEntity> oldList = backblastPubPersonService.list(wrapper);
            // 取出反诈宣传对象信息
            List<BackblastPubPersonEntity> backblastPubPersonEntityList = backblastPubRecord.getBackblastPubPersonEntityList();
            for (BackblastPubPersonEntity pubPersonEntity : backblastPubPersonEntityList) {
                pubPersonEntity.setBackblastPubRecordId(backblastPubRecord.getId());
            }
            // 申明新增,修改,删除集合
            List<BackblastPubPersonEntity> newList = new ArrayList<>();
            List<BackblastPubPersonEntity> addList = new ArrayList<>();
            List<BackblastPubPersonEntity> updateList = new ArrayList<>();
            List<BackblastPubPersonEntity> removeList = new ArrayList<>();
            // 遍历设置数据
            for (BackblastPubPersonEntity pubPersonEntity : backblastPubPersonEntityList) {
                if (null == pubPersonEntity.getId()) {
                    // 新增
                    addList.add(pubPersonEntity);
                } else {
                    newList.add(pubPersonEntity);
                }
            }
            // 遍历去差集,判断是新增还是删除还是更新
            // 取旧数据和新提交数据差集--删除
            removeList = oldList.stream().filter(vo -> !newList.stream().map(e ->
                e.getId()).collect(Collectors.toList()).contains(vo.getId())).collect(Collectors.toList());
            // 取旧数据和新提交数据交集--更新
            updateList = newList.stream().filter(vo -> oldList.stream().map(e ->
                e.getId()).collect(Collectors.toList()).contains(vo.getId())).collect(Collectors.toList());
            // 批量新增
            if (addList.size() > 0) {
                backblastPubPersonService.saveBatch(addList);
            }
            // 批量修改
            if (updateList.size() > 0) {
                backblastPubPersonService.updateBatchById(updateList);
            }
            // 批量删除
            if (removeList.size() > 0) {
                backblastPubPersonService.removeBatchByIds(removeList);
            }
        }else {
            // 删除所有
            QueryWrapper<BackblastPubPersonEntity> wrapper = new QueryWrapper<>();
            wrapper.eq("backblast_pub_record_id", backblastPubRecord.getId());
            boolean remove = backblastPubPersonService.remove(wrapper);
        }
    }
    /**
     * 设置警格网格信息
     * @param backblastPubRecord
     */
    public void setGridInfo(BackblastPubRecordVO backblastPubRecord) {
        // 根据位置设置网格,警格编号
        IGridService gridService = SpringUtils.getBean(IGridService.class);
        IPoliceAffairsGridService policeAffairsGridService = SpringUtils.getBean(IPoliceAffairsGridService.class);
        String point = "'POINT(" + backblastPubRecord.getLng() + " " + backblastPubRecord.getLat() + ")'";
        if(StringUtils.isBlank(backblastPubRecord.getGridCode())){
            //点坐标解析网格
            List<GridEntity> gridEntityList = gridService.spatialAnalysis(point);
            if (gridEntityList.size()>0){
                GridEntity gridEntity = gridEntityList.get(0);
                backblastPubRecord.setGridCode(gridEntity.getGridCode());
            }
        }
        //点坐标解析警格
        List<PoliceAffairsGridEntity> policeAffairsGridEntityList = policeAffairsGridService.spatialAnalysis(point);
        if (policeAffairsGridEntityList.size()>0){
            PoliceAffairsGridEntity policeAffairsGridEntity = policeAffairsGridEntityList.get(0);
            backblastPubRecord.setJwGridCode(policeAffairsGridEntity.getJwGridCode());
        }
    }
    /**
     * 反炸宣传记录表 自定义详情
     * @param backblastPubRecord
     * @return
     */
    @Override
    public BackblastPubRecordVO getDetail(BackblastPubRecordVO backblastPubRecord) {
        return baseMapper.getDetail(backblastPubRecord);
    }
    /**
     * 反炸宣传记录表 删除
     */
    @Override
    public boolean removeBackblastPubByIds(List<Long> toLongList) {
        // 先删除对应的宣传记录
        boolean flag = removeByIds(toLongList);
        // 再删除对应的宣传对象信息
        if (flag){
            IBackblastPubPersonService backblastPubPersonService = SpringUtil.getBean(IBackblastPubPersonService.class);
                // 删除所有
                QueryWrapper<BackblastPubPersonEntity> wrapper = new QueryWrapper<>();
                wrapper.in("backblast_pub_record_id", toLongList);
                backblastPubPersonService.remove(wrapper);
            // for (Long id : toLongList) {
            //     // 删除所有
            //     QueryWrapper<BackblastPubPersonEntity> wrapper = new QueryWrapper<>();
            //     wrapper.eq("backblast_pub_record_id", id);
            //     backblastPubPersonService.remove(wrapper);
            // }
        }
        return flag;
    }
    @Override
    public List<BackblastPubRecordExcel> export(BackblastPubRecordVO backblastPubRecord) {
        CommonParamSet commonParamSet = new CommonParamSet<>().invoke(BackblastPubRecordVO.class, backblastPubRecord);
        if (!Strings.isBlank(backblastPubRecord.getRoleName())){
            backblastPubRecord.setCreateUser(AuthUtil.getUserId());
        }
        return baseMapper.selectBackblastPubRecordExport(backblastPubRecord,
            commonParamSet.getIsAdministrator(),
            commonParamSet.getRegionChildCodesList(),
            commonParamSet.getGridCodeList());
    }
}
src/main/java/org/springblade/modules/backblast/service/impl/BackblastWarnHanRecServiceImpl.java
New file
@@ -0,0 +1,80 @@
package org.springblade.modules.backblast.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.logging.log4j.util.Strings;
import org.springblade.common.param.CommonParamSet;
import org.springblade.common.param.GridSet;
import org.springblade.common.utils.SpringUtils;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.modules.backblast.entity.BackblastPubRecordEntity;
import org.springblade.modules.backblast.entity.BackblastWarnHanRecEntity;
import org.springblade.modules.backblast.vo.BackblastWarnHanRecVO;
import org.springblade.modules.backblast.mapper.BackblastWarnHanRecMapper;
import org.springblade.modules.backblast.service.IBackblastWarnHanRecService;
import org.springblade.modules.system.entity.User;
import org.springblade.modules.system.service.IUserService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;
/**
 * 反炸预警处置记录表 服务实现类
 *
 * @author BladeX
 * @since 2024-03-15
 */
@Service
public class BackblastWarnHanRecServiceImpl extends ServiceImpl<BackblastWarnHanRecMapper, BackblastWarnHanRecEntity> implements IBackblastWarnHanRecService {
    /**
     * 自定义分页查询
     * @param page
     * @param backblastWarnHanRec
     * @return
     */
    @Override
    public IPage<BackblastWarnHanRecVO> selectBackblastWarnHanRecPage(IPage<BackblastWarnHanRecVO> page, BackblastWarnHanRecVO backblastWarnHanRec) {
        CommonParamSet commonParamSet = new CommonParamSet<>().invoke(BackblastWarnHanRecVO.class, backblastWarnHanRec);
        if (!Strings.isBlank(backblastWarnHanRec.getRoleName())){
            backblastWarnHanRec.setCreateUser(AuthUtil.getUserId());
        }
        return page.setRecords(baseMapper.selectBackblastWarnHanRecPage(page,
            backblastWarnHanRec,
            commonParamSet.getIsAdministrator(),
            commonParamSet.getRegionChildCodesList(),
            commonParamSet.getGridCodeList()));
    }
    /**
     * 自定义新增/修改
     * @param backblastWarnHanRec
     * @return
     */
    @Override
    public boolean saveOrUpdateBackblastWarnHanRecEntity(BackblastWarnHanRecEntity backblastWarnHanRec) {
        // 点落面计算警格,网格,警格
        GridSet invoke = new GridSet().invoke(BackblastWarnHanRecEntity.class, backblastWarnHanRec,
            "lng", "lat", "gridCode", "jwGridCode");
        // 设置民警姓名电话(非民警暂时也记录)
        User user = SpringUtils.getBean(IUserService.class).getById(AuthUtil.getUserId());
        if (null!=user){
            backblastWarnHanRec.setPoliceman(user.getRealName());
            backblastWarnHanRec.setPolicemanPhone(user.getPhone());
        }
        if (null!=backblastWarnHanRec.getId()){
            // 更新
            return updateById(backblastWarnHanRec);
        }
        // 新增
        return save(backblastWarnHanRec);
    }
    /**
     * 反炸预警处置记录表 自定义详情
     * @param backblastWarnHanRec
     * @return
     */
    @Override
    public BackblastWarnHanRecVO getDetail(BackblastWarnHanRecVO backblastWarnHanRec) {
        return baseMapper.getDetail(backblastWarnHanRec);
    }
}
src/main/java/org/springblade/modules/backblast/vo/BackblastPubPersonVO.java
New file
@@ -0,0 +1,79 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.backblast.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.modules.backblast.entity.BackblastPubPersonEntity;
import org.springblade.modules.backblast.entity.BackblastPubRecordEntity;
/**
 * 反诈宣传宣防对象表 视图实体类
 *
 * @author BladeX
 * @since 2024-03-15
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class BackblastPubPersonVO extends BackblastPubPersonEntity {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = "社区编号", example = "")
    private String communityCode;
    @ApiModelProperty(value = "角色别名", example = "")
    private String roleName;
    /**
     * 搜索关键字
     */
    @ApiModelProperty(value = "搜索关键字", example = "")
    private String searchKey;
    /**
     * 开始时间
     */
    @ApiModelProperty(value = "开始时间", example = "")
    private String startTime;
    /**
     * 结束时间
     */
    @ApiModelProperty(value = "结束时间", example = "")
    private String endTime;
    /**
     * 乡镇名称
     */
    @ApiModelProperty(value = "乡镇名称", example = "")
    private String townName;
    /**
     * 社区名称
     */
    @ApiModelProperty(value = "社区名称", example = "")
    private String communityName;
    /**
     * 派出所名称
     */
    @ApiModelProperty(value = "派出所名称", example = "")
    private String pcsName;
}
src/main/java/org/springblade/modules/backblast/vo/BackblastPubRecordVO.java
New file
@@ -0,0 +1,102 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.backblast.vo;
import io.swagger.annotations.ApiModelProperty;
import org.springblade.modules.backblast.entity.BackblastPubPersonEntity;
import org.springblade.modules.backblast.entity.BackblastPubRecordEntity;
import org.springblade.core.tool.node.INode;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.modules.place.entity.PlacePractitionerEntity;
import java.util.ArrayList;
import java.util.List;
/**
 * 反炸宣传记录表 视图实体类
 *
 * @author BladeX
 * @since 2024-03-15
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class BackblastPubRecordVO extends BackblastPubRecordEntity {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = "社区编号", example = "")
    private String communityCode;
    @ApiModelProperty(value = "角色别名", example = "")
    private String roleName;
    /**
     * 搜索关键字
     */
    @ApiModelProperty(value = "搜索关键字", example = "")
    private String searchKey;
    /**
     * 开始时间
     */
    @ApiModelProperty(value = "开始时间", example = "")
    private String startTime;
    /**
     * 结束时间
     */
    @ApiModelProperty(value = "结束时间", example = "")
    private String endTime;
    /**
     * 乡镇名称
     */
    @ApiModelProperty(value = "乡镇名称", example = "")
    private String townName;
    /**
     * 社区名称
     */
    @ApiModelProperty(value = "社区名称", example = "")
    private String communityName;
    /**
     * 派出所名称
     */
    @ApiModelProperty(value = "派出所名称", example = "")
    private String pcsName;
    @ApiModelProperty(value = "机构名称", example = "")
    private String deptName;
    @ApiModelProperty(value = "小区名称", example = "")
    private String aoiName;
    @ApiModelProperty(value = "房屋名称", example = "")
    private String houseName;
    @ApiModelProperty(value = "网格名称", example = "")
    private String gridName;
    /**
     * 反诈宣防对象
     */
    @ApiModelProperty(value = "反诈宣防对象", example = "")
    private List<BackblastPubPersonEntity> backblastPubPersonEntityList = new ArrayList<>();
}
src/main/java/org/springblade/modules/backblast/vo/BackblastWarnHanRecVO.java
New file
@@ -0,0 +1,82 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.backblast.vo;
import io.swagger.annotations.ApiModelProperty;
import org.springblade.modules.backblast.entity.BackblastWarnHanRecEntity;
import org.springblade.core.tool.node.INode;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
 * 反炸预警处置记录表 视图实体类
 *
 * @author BladeX
 * @since 2024-03-15
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class BackblastWarnHanRecVO extends BackblastWarnHanRecEntity {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = "社区编号", example = "")
    private String communityCode;
    @ApiModelProperty(value = "角色别名", example = "")
    private String roleName;
    /**
     * 搜索关键字
     */
    @ApiModelProperty(value = "搜索关键字", example = "")
    private String searchKey;
    /**
     * 开始时间
     */
    @ApiModelProperty(value = "开始时间", example = "")
    private String startTime;
    /**
     * 结束时间
     */
    @ApiModelProperty(value = "结束时间", example = "")
    private String endTime;
    /**
     * 乡镇名称
     */
    @ApiModelProperty(value = "乡镇名称", example = "")
    private String townName;
    /**
     * 社区名称
     */
    @ApiModelProperty(value = "社区名称", example = "")
    private String communityName;
    /**
     * 派出所名称
     */
    @ApiModelProperty(value = "派出所名称", example = "")
    private String pcsName;
    @ApiModelProperty(value = "机构名称", example = "")
    private String deptName;
}
src/main/java/org/springblade/modules/backblast/wrapper/BackblastPubPersonWrapper.java
New file
@@ -0,0 +1,34 @@
package org.springblade.modules.backblast.wrapper;
import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.modules.backblast.entity.BackblastPubPersonEntity;
import org.springblade.modules.backblast.vo.BackblastPubPersonVO;
import java.util.Objects;
/**
 * 反炸宣传记录表 包装类,返回视图层所需的字段
 *
 * @author BladeX
 * @since 2024-03-15
 */
public class BackblastPubPersonWrapper extends BaseEntityWrapper<BackblastPubPersonEntity, BackblastPubPersonVO>  {
    public static BackblastPubPersonWrapper build() {
        return new BackblastPubPersonWrapper();
     }
    @Override
    public BackblastPubPersonVO entityVO(BackblastPubPersonEntity backblastPubRecord) {
        BackblastPubPersonVO backblastPubRecordVO = Objects.requireNonNull(BeanUtil.copy(backblastPubRecord, BackblastPubPersonVO.class));
        //User createUser = UserCache.getUser(backblastPubRecord.getCreateUser());
        //User updateUser = UserCache.getUser(backblastPubRecord.getUpdateUser());
        //backblastPubRecordVO.setCreateUserName(createUser.getName());
        //backblastPubRecordVO.setUpdateUserName(updateUser.getName());
        return backblastPubRecordVO;
    }
}
src/main/java/org/springblade/modules/backblast/wrapper/BackblastPubRecordWrapper.java
New file
@@ -0,0 +1,50 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.backblast.wrapper;
import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.modules.backblast.entity.BackblastPubRecordEntity;
import org.springblade.modules.backblast.vo.BackblastPubRecordVO;
import java.util.Objects;
/**
 * 反炸宣传记录表 包装类,返回视图层所需的字段
 *
 * @author BladeX
 * @since 2024-03-15
 */
public class BackblastPubRecordWrapper extends BaseEntityWrapper<BackblastPubRecordEntity, BackblastPubRecordVO>  {
    public static BackblastPubRecordWrapper build() {
        return new BackblastPubRecordWrapper();
     }
    @Override
    public BackblastPubRecordVO entityVO(BackblastPubRecordEntity backblastPubRecord) {
        BackblastPubRecordVO backblastPubRecordVO = Objects.requireNonNull(BeanUtil.copy(backblastPubRecord, BackblastPubRecordVO.class));
        //User createUser = UserCache.getUser(backblastPubRecord.getCreateUser());
        //User updateUser = UserCache.getUser(backblastPubRecord.getUpdateUser());
        //backblastPubRecordVO.setCreateUserName(createUser.getName());
        //backblastPubRecordVO.setUpdateUserName(updateUser.getName());
        return backblastPubRecordVO;
    }
}
src/main/java/org/springblade/modules/backblast/wrapper/BackblastWarnHanRecWrapper.java
New file
@@ -0,0 +1,50 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.backblast.wrapper;
import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.modules.backblast.entity.BackblastWarnHanRecEntity;
import org.springblade.modules.backblast.vo.BackblastWarnHanRecVO;
import java.util.Objects;
/**
 * 反炸预警处置记录表 包装类,返回视图层所需的字段
 *
 * @author BladeX
 * @since 2024-03-15
 */
public class BackblastWarnHanRecWrapper extends BaseEntityWrapper<BackblastWarnHanRecEntity, BackblastWarnHanRecVO>  {
    public static BackblastWarnHanRecWrapper build() {
        return new BackblastWarnHanRecWrapper();
     }
    @Override
    public BackblastWarnHanRecVO entityVO(BackblastWarnHanRecEntity backblastWarnHanRec) {
        BackblastWarnHanRecVO backblastWarnHanRecVO = Objects.requireNonNull(BeanUtil.copy(backblastWarnHanRec, BackblastWarnHanRecVO.class));
        //User createUser = UserCache.getUser(backblastWarnHanRec.getCreateUser());
        //User updateUser = UserCache.getUser(backblastWarnHanRec.getUpdateUser());
        //backblastWarnHanRecVO.setCreateUserName(createUser.getName());
        //backblastWarnHanRecVO.setUpdateUserName(updateUser.getName());
        return backblastWarnHanRecVO;
    }
}
src/main/java/org/springblade/modules/category/excel/CategoryExcel.java
New file
@@ -0,0 +1,45 @@
package org.springblade.modules.category.excel;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import lombok.Data;
import java.io.Serializable;
/**
 * CategoryExcel
 *
 * @author Chill
 */
@Data
@ColumnWidth(25)
@HeadRowHeight(20)
@ContentRowHeight(18)
public class CategoryExcel implements Serializable {
    private static final long serialVersionUID = 2L;
    /** 标签名称 */
    @ExcelProperty( "小类")
    private String categoryName;
    /** 标签编号 */
    @ExcelProperty( "类别代码")
    private String categoryNo;
    /** 层级 */
    @ExcelProperty( "层级")
    private Integer level;
    /** 提示词分类描述 */
    @ExcelProperty( "提示词分类描述")
    private String description;
    /** 备注 */
    @ExcelProperty( "备注")
    private String remark;
}
src/main/java/org/springblade/modules/category/excel/CategoryImporter.java
New file
@@ -0,0 +1,39 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.category.excel;
import lombok.RequiredArgsConstructor;
import org.springblade.core.excel.support.ExcelImporter;
import org.springblade.modules.category.service.ICategoryService;
import java.util.List;
/**
 * 场所标签poi数据导入类
 *
 * @author Chill
 */
@RequiredArgsConstructor
public class CategoryImporter implements ExcelImporter<CategoryExcel> {
    private final ICategoryService categoryService;
    private final Boolean isCovered;
    @Override
    public void save(List<CategoryExcel> data) {
        categoryService.importCategory(data, isCovered);
    }
}
src/main/java/org/springblade/modules/counties/controller/CountiesController.java
New file
@@ -0,0 +1,129 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.counties.controller;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import lombok.AllArgsConstructor;
import javax.validation.Valid;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springblade.modules.counties.dto.CountiesDTO;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.modules.counties.entity.CountiesEntity;
import org.springblade.modules.counties.vo.CountiesVO;
import org.springblade.modules.counties.wrapper.CountiesWrapper;
import org.springblade.modules.counties.service.ICountiesService;
import org.springblade.core.boot.ctrl.BladeController;
import java.util.List;
/**
 * E呼即办区县 控制器
 *
 * @author BladeX
 * @since 2024-05-16
 */
@RestController
@AllArgsConstructor
@RequestMapping("blade-counties/counties")
@Api(value = "E呼即办区县", tags = "E呼即办区县接口")
public class CountiesController extends BladeController {
    private final ICountiesService countiesService;
    /**
     * E呼即办区县 详情
     */
    @GetMapping("/detail")
    @ApiOperationSupport(order = 1)
    @ApiOperation(value = "详情", notes = "传入counties")
    public R<CountiesVO> detail(CountiesEntity counties) {
        CountiesEntity detail = countiesService.getOne(Condition.getQueryWrapper(counties));
        return R.data(CountiesWrapper.build().entityVO(detail));
    }
    /**
     * E呼即办区县 分页
     */
    @GetMapping("/list")
    @ApiOperationSupport(order = 2)
    @ApiOperation(value = "分页", notes = "传入counties")
    public R<List<CountiesVO>> list(CountiesEntity counties, Query query) {
        List<CountiesEntity> list = countiesService.list();
        return R.data(CountiesWrapper.build().listVO(list));
    }
    /**
     * E呼即办区县 自定义分页
     */
    @GetMapping("/page")
    @ApiOperationSupport(order = 3)
    @ApiOperation(value = "分页", notes = "传入counties")
    public R<IPage<CountiesVO>> page(CountiesVO counties, Query query) {
        IPage<CountiesVO> pages = countiesService.selectCountiesPage(Condition.getPage(query), counties);
        return R.data(pages);
    }
    /**
     * E呼即办区县 新增
     */
    @PostMapping("/save")
    @ApiOperationSupport(order = 4)
    @ApiOperation(value = "新增", notes = "传入counties")
    public R save(@Valid @RequestBody CountiesEntity counties) {
        return R.status(countiesService.save(counties));
    }
    /**
     * E呼即办区县 修改
     */
    @PostMapping("/update")
    @ApiOperationSupport(order = 5)
    @ApiOperation(value = "修改", notes = "传入counties")
    public R update(@Valid @RequestBody CountiesEntity counties) {
        return R.status(countiesService.updateById(counties));
    }
    /**
     * E呼即办区县 新增或修改
     */
    @PostMapping("/submit")
    @ApiOperationSupport(order = 6)
    @ApiOperation(value = "新增或修改", notes = "传入counties")
    public R submit(@Valid @RequestBody CountiesEntity counties) {
        return R.status(countiesService.saveOrUpdate(counties));
    }
    /**
     * E呼即办区县 删除
     */
    @PostMapping("/remove")
    @ApiOperationSupport(order = 7)
    @ApiOperation(value = "逻辑删除", notes = "传入ids")
    public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
        return R.status(countiesService.removeBatchByIds(Func.toLongList(ids)));
    }
}
src/main/java/org/springblade/modules/counties/dto/CountiesDTO.java
New file
@@ -0,0 +1,53 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.counties.dto;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * E呼即办区县 数据传输对象实体类
 *
 * @author BladeX
 * @since 2024-05-16
 */
@Data
public class CountiesDTO {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = "", example = "")
    @TableField("name")
    private String name;
    @ApiModelProperty(value = "主键ID", example = "")
    @TableId(value = "code", type = IdType.ASSIGN_UUID)
    private String code;
    @ApiModelProperty(value = "", example = "")
    @TableField("up_code")
    private String upCode;
    @ApiModelProperty(value = "", example = "")
    @TableField("code6")
    private String code6;
    @ApiModelProperty(value = "", example = "")
    @TableField("code_append")
    private String codeAppend;
}
src/main/java/org/springblade/modules/counties/entity/CountiesEntity.java
New file
@@ -0,0 +1,59 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.counties.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
/**
 * E呼即办区县 实体类
 *
 * @author BladeX
 * @since 2024-05-16
 */
@Data
@TableName("jczz_counties")
@ApiModel(value = "Counties对象", description = "E呼即办区县")
public class CountiesEntity  {
    @ApiModelProperty(value = "", example = "")
    @TableField("name")
    private String name;
    @ApiModelProperty(value = "主键ID", example = "")
    @TableId(value = "code", type = IdType.ASSIGN_UUID)
    private String code;
    @ApiModelProperty(value = "", example = "")
    @TableField("up_code")
    private String upCode;
    @ApiModelProperty(value = "", example = "")
    @TableField("code6")
    private String code6;
    @ApiModelProperty(value = "", example = "")
    @TableField("code_append")
    private String codeAppend;
}
src/main/java/org/springblade/modules/counties/mapper/CountiesMapper.java
New file
@@ -0,0 +1,43 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.counties.mapper;
import org.springblade.modules.counties.entity.CountiesEntity;
import org.springblade.modules.counties.vo.CountiesVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List;
/**
 * E呼即办区县 Mapper 接口
 *
 * @author BladeX
 * @since 2024-05-16
 */
public interface CountiesMapper extends BaseMapper<CountiesEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param counties
     * @return
     */
    List<CountiesVO> selectCountiesPage(IPage page, CountiesVO counties);
}
src/main/java/org/springblade/modules/counties/mapper/CountiesMapper.xml
New file
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.springblade.modules.counties.mapper.CountiesMapper">
    <!-- 通用查询映射结果 -->
    <resultMap id="countiesResultMap" type="org.springblade.modules.counties.entity.CountiesEntity">
    </resultMap>
    <select id="selectCountiesPage" resultMap="countiesResultMap">
        select * from jczz_counties
    </select>
</mapper>
src/main/java/org/springblade/modules/counties/service/ICountiesService.java
New file
@@ -0,0 +1,43 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.counties.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springblade.modules.counties.entity.CountiesEntity;
import org.springblade.modules.counties.vo.CountiesVO;
import org.springblade.core.mp.base.BaseService;
import com.baomidou.mybatisplus.core.metadata.IPage;
/**
 * E呼即办区县 服务类
 *
 * @author BladeX
 * @since 2024-05-16
 */
public interface ICountiesService extends IService<CountiesEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param counties
     * @return
     */
    IPage<CountiesVO> selectCountiesPage(IPage<CountiesVO> page, CountiesVO counties);
}
src/main/java/org/springblade/modules/counties/service/impl/CountiesServiceImpl.java
New file
@@ -0,0 +1,43 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.counties.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springblade.modules.counties.entity.CountiesEntity;
import org.springblade.modules.counties.vo.CountiesVO;
import org.springblade.modules.counties.mapper.CountiesMapper;
import org.springblade.modules.counties.service.ICountiesService;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;
/**
 * E呼即办区县 服务实现类
 *
 * @author BladeX
 * @since 2024-05-16
 */
@Service
public class CountiesServiceImpl extends ServiceImpl<CountiesMapper, CountiesEntity> implements ICountiesService {
    @Override
    public IPage<CountiesVO> selectCountiesPage(IPage<CountiesVO> page, CountiesVO counties) {
        return page.setRecords(baseMapper.selectCountiesPage(page, counties));
    }
}
src/main/java/org/springblade/modules/counties/vo/CountiesVO.java
New file
@@ -0,0 +1,35 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.counties.vo;
import org.springblade.modules.counties.entity.CountiesEntity;
import org.springblade.core.tool.node.INode;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
 * E呼即办区县 视图实体类
 *
 * @author BladeX
 * @since 2024-05-16
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class CountiesVO extends CountiesEntity {
    private static final long serialVersionUID = 1L;
}
src/main/java/org/springblade/modules/counties/wrapper/CountiesWrapper.java
New file
@@ -0,0 +1,50 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.counties.wrapper;
import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.modules.counties.entity.CountiesEntity;
import org.springblade.modules.counties.vo.CountiesVO;
import java.util.Objects;
/**
 * E呼即办区县 包装类,返回视图层所需的字段
 *
 * @author BladeX
 * @since 2024-05-16
 */
public class CountiesWrapper extends BaseEntityWrapper<CountiesEntity, CountiesVO>  {
    public static CountiesWrapper build() {
        return new CountiesWrapper();
     }
    @Override
    public CountiesVO entityVO(CountiesEntity counties) {
        CountiesVO countiesVO = Objects.requireNonNull(BeanUtil.copy(counties, CountiesVO.class));
        //User createUser = UserCache.getUser(counties.getCreateUser());
        //User updateUser = UserCache.getUser(counties.getUpdateUser());
        //countiesVO.setCreateUserName(createUser.getName());
        //countiesVO.setUpdateUserName(updateUser.getName());
        return countiesVO;
    }
}
src/main/java/org/springblade/modules/discuss/excel/UserTopicsExcel.java
New file
@@ -0,0 +1,62 @@
package org.springblade.modules.discuss.excel;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
/**
 * HouseExcel
 *
 * @author Chill
 */
@Data
@ColumnWidth(25)
@HeadRowHeight(20)
@ContentRowHeight(18)
public class UserTopicsExcel implements Serializable {
    private static final long serialVersionUID = 2L;
    @ExcelProperty( "业主姓名")
    private String name;
    @ExcelProperty( "业主电话")
    private String phone;
    @ExcelProperty( "地块")
    private String districtName;
    @ExcelProperty( "栋号")
    private String building;
    @ExcelProperty( "房号")
    private String room;
    @ExcelProperty( "地址")
    private String addressName;
    @ExcelProperty( "面积")
    private BigDecimal area;
    @ExcelProperty( "候选人")
    private String optionContent;
    @ExcelProperty(value = "投票时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;
}
src/main/java/org/springblade/modules/discuss/excel/holdExcel.java
New file
@@ -0,0 +1,73 @@
package org.springblade.modules.discuss.excel;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
 * HouseExcel
 *
 * @author Chill
 */
@Data
@ColumnWidth(25)
@HeadRowHeight(20)
@ContentRowHeight(18)
public class holdExcel implements Serializable {
    private static final long serialVersionUID = 2L;
    @ExcelProperty( "业主姓名")
    private String name;
    @ExcelProperty( "业主电话")
    private String phone;
    @ExcelProperty( "地块")
    private String districtName;
    @ExcelProperty( "栋号")
    private String building;
    @ExcelProperty( "房号")
    private String room;
    @ExcelProperty( "地址")
    private String houseName;
//    @ExcelProperty( "小区")
//    private String aoiName;
    @ExcelProperty( "面积")
    private BigDecimal area;
    @ExcelProperty( "是否投票")
    private String voteFlag;
    @ExcelProperty( "管理规约")
    private String managementRegulations;
    @ExcelProperty( "议事规则")
    private String rulesOfProcedure;
    @ExcelProperty( "投票项")
    @ExcelIgnore
    private String optionContent;
    @ExcelProperty(value = "投票时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;
}
src/main/java/org/springblade/modules/discuss/excel/topicsExcel.java
New file
@@ -0,0 +1,54 @@
package org.springblade.modules.discuss.excel;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
 * HouseExcel
 *
 * @author Chill
 */
@Data
@ColumnWidth(25)
@HeadRowHeight(20)
@ContentRowHeight(18)
public class topicsExcel implements Serializable {
    private static final long serialVersionUID = 2L;
    @ExcelProperty( "姓名")
    private String name;
    @ExcelProperty( "手机号")
    private String phone;
    @ExcelProperty( "地址")
    private String addressName;
    @ExcelProperty( "小区")
    private String aoiName;
    @ExcelProperty( "面积")
    private String area;
    @ExcelProperty( "地块")
    private String remark;
    @ExcelProperty( "投票项")
    private String optionContent;
    @ExcelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;
}
src/main/java/org/springblade/modules/disputeRecord/controller/DisputeRecordController.java
New file
@@ -0,0 +1,212 @@
package org.springblade.modules.disputeRecord.controller;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import lombok.AllArgsConstructor;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import org.springblade.core.excel.util.ExcelUtil;
import org.springblade.core.log.logger.BladeLogger;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.jackson.JsonUtil;
import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.tool.utils.Func;
import org.springblade.modules.disputeRecord.excel.DisputeRecordExcel;
import org.springblade.modules.disputeRecord.excel.DisputeRecordImporter;
import org.springblade.modules.disputeRecord.excel.ExportDisputeRecordExcel;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.modules.disputeRecord.entity.DisputeRecordEntity;
import org.springblade.modules.disputeRecord.vo.DisputeRecordVO;
import org.springblade.modules.disputeRecord.wrapper.DisputeRecordWrapper;
import org.springblade.modules.disputeRecord.service.IDisputeRecordService;
import org.springframework.web.multipart.MultipartFile;
import java.util.ArrayList;
import java.util.List;
/**
 * 矛盾纠纷记录表 控制器
 *
 * @author BladeX
 * @since 2024-03-23
 */
@RestController
@AllArgsConstructor
@RequestMapping("blade-disputeRecord/disputeRecord")
@Api(value = "矛盾纠纷记录表", tags = "矛盾纠纷记录表接口")
public class DisputeRecordController {
    private final IDisputeRecordService disputeRecordService;
    private final BladeLogger bladeLogger;
    /**
     * 矛盾纠纷记录表 详情
     */
    @GetMapping("/detail")
    @ApiOperationSupport(order = 1)
    @ApiOperation(value = "详情", notes = "传入disputeRecord")
    public R detail(DisputeRecordEntity disputeRecord) {
        DisputeRecordEntity detail = disputeRecordService.getOne(Condition.getQueryWrapper(disputeRecord));
        return R.data(detail);
    }
    /**
     * 矛盾纠纷记录表 分页
     */
    @GetMapping("/list")
    @ApiOperationSupport(order = 2)
    @ApiOperation(value = "分页", notes = "传入disputeRecord")
    public R<IPage<DisputeRecordVO>> list(DisputeRecordEntity disputeRecord, Query query) {
        IPage<DisputeRecordEntity> pages = disputeRecordService.page(Condition.getPage(query), Condition.getQueryWrapper(disputeRecord));
        return R.data(DisputeRecordWrapper.build().pageVO(pages));
    }
    /**
     * 矛盾纠纷记录表 自定义分页
     */
    @GetMapping("/page")
    @ApiOperationSupport(order = 3)
    @ApiOperation(value = "分页", notes = "传入disputeRecord")
    public R<IPage<DisputeRecordVO>> page(DisputeRecordVO disputeRecord, Query query) {
        IPage<DisputeRecordVO> pages = disputeRecordService.selectDisputeRecordPage(Condition.getPage(query), disputeRecord);
        return R.data(pages);
    }
    /**
     * 矛盾纠纷记录表 新增
     */
    @PostMapping("/save")
    @ApiOperationSupport(order = 4)
    @ApiOperation(value = "新增", notes = "传入disputeRecord")
    public R save(@Valid @RequestBody DisputeRecordEntity disputeRecord) {
        return R.status(disputeRecordService.save(disputeRecord));
    }
    /**
     * 矛盾纠纷记录表 修改
     */
    @PostMapping("/update")
    @ApiOperationSupport(order = 5)
    @ApiOperation(value = "修改", notes = "传入disputeRecord")
    public R update(@Valid @RequestBody DisputeRecordEntity disputeRecord) {
        return R.status(disputeRecordService.updateById(disputeRecord));
    }
    /**
     * 矛盾纠纷记录表 新增或修改
     */
    @PostMapping("/submit")
    @ApiOperationSupport(order = 6)
    @ApiOperation(value = "新增或修改", notes = "传入disputeRecord")
    public R submit(@Valid @RequestBody DisputeRecordEntity disputeRecord) {
        return R.status(disputeRecordService.saveOrUpdate(disputeRecord));
    }
    /**
     * 矛盾纠纷记录表 删除
     */
    @PostMapping("/remove")
    @ApiOperationSupport(order = 7)
    @ApiOperation(value = "逻辑删除", notes = "传入ids")
    public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
        return R.status(disputeRecordService.removeByIds(Func.toLongList(ids)));
    }
    /**
     * 矛盾纠纷记录表 自定义新增或修改
     * @param disputeRecord
     * @return
     */
    @PostMapping("/saveOrUpdate")
    @ApiOperationSupport(order = 8)
    @ApiOperation(value = "自定义新增或修改", notes = "传入disputeRecord")
    public R saveOrUpdate(@Valid @RequestBody DisputeRecordEntity disputeRecord) {
        return R.status(disputeRecordService.saveOrUpdateDisputeRecord(disputeRecord));
    }
    /**
     * 矛盾纠纷记录表 自定义详情
     * @param disputeRecord
     * @return
     */
    @GetMapping("/getDetail")
    @ApiOperationSupport(order = 9)
    @ApiOperation(value = "自定义详情", notes = "传入disputeRecord")
    public R getDetail(DisputeRecordVO disputeRecord) {
        return R.data(disputeRecordService.getDetail(disputeRecord));
    }
    /**
     * 导入矛盾纠纷记录表
     */
    @PostMapping("import-disputeRecord")
    @ApiOperationSupport(order = 10)
    @ApiOperation(value = "批量导入矛盾纠纷记录", notes = "传入excel")
    public R importDisputeRecord(MultipartFile file, Integer isCovered) {
        bladeLogger.info("批量导入矛盾纠纷记录", JsonUtil.toJson(isCovered));
        String result = disputeRecordService.importDisputeRecord(ExcelUtil.read(file, DisputeRecordExcel.class),isCovered==1);
        return R.data(200, result, null);
    }
    /**
     * 导出矛盾纠纷记录表
     */
    @GetMapping("export-disputeRecord")
    @ApiOperationSupport(order = 11)
    @ApiOperation(value = "导出矛盾纠纷记录表", notes = "传入disputeRecord")
    public void exportDisputeRecord(DisputeRecordVO disputeRecord, HttpServletResponse response) {
        List<ExportDisputeRecordExcel> list = disputeRecordService.exportDisputeRecordList(disputeRecord);
        ExcelUtil.export(response, "矛盾纠纷记录数据" + DateUtil.time(), "矛盾纠纷记录数据表", list, ExportDisputeRecordExcel.class);
    }
    /**
     * 导出模板
     */
    @GetMapping("/export-template")
    @ApiOperationSupport(order = 12)
    @ApiOperation(value = "导出模板")
    public void exportTemplate(HttpServletResponse response) {
        List<DisputeRecordExcel> list = new ArrayList<>();
        DisputeRecordExcel disputeRecordExcel = new DisputeRecordExcel();
        disputeRecordExcel.setAddress("江西省上饶市茅家岭街道***社区****");
        disputeRecordExcel.setLng("117.12241224");
        disputeRecordExcel.setLat("28.154412451");
        disputeRecordExcel.setEventTime("2024-01-01 12:00:00");
        disputeRecordExcel.setNameOne("张三");
        disputeRecordExcel.setGenderOne("男");
        disputeRecordExcel.setPhoneOne("131****1234");
        disputeRecordExcel.setIdCardOne("360728*********0000");
        disputeRecordExcel.setNameTwo("李四");
        disputeRecordExcel.setGenderTwo("女");
        disputeRecordExcel.setPhoneTwo("132****1234");
        disputeRecordExcel.setIdCardTwo("360728*********0001");
        disputeRecordExcel.setDisputeType("2");
        disputeRecordExcel.setDisputeContent("隔壁半夜放音乐太大声");
        disputeRecordExcel.setInjuryFlag("否");
        disputeRecordExcel.setInjuryDesc("");
        disputeRecordExcel.setAlarmNum(3);
        disputeRecordExcel.setSource("1");
        disputeRecordExcel.setHandleResult("未化解");
        // 加入集合
        list.add(disputeRecordExcel);
        // 写入返回
        ExcelUtil.export(response, "矛盾纠纷记录数据模板", "矛盾纠纷记录数据表", list, DisputeRecordExcel.class);
    }
    /**
     * e呼即办数据临时转换到矛盾纠纷
     */
    @GetMapping("/eCallToDis")
    @ApiOperationSupport(order = 13)
    public void eCallToDis() {
        disputeRecordService.eCallToDis();
    }
}
src/main/java/org/springblade/modules/disputeRecord/dto/DisputeRecordDTO.java
New file
@@ -0,0 +1,34 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.disputeRecord.dto;
import org.springblade.modules.disputeRecord.entity.DisputeRecordEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
 * 矛盾纠纷记录表 数据传输对象实体类
 *
 * @author BladeX
 * @since 2024-03-23
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class DisputeRecordDTO extends DisputeRecordEntity {
    private static final long serialVersionUID = 1L;
}
src/main/java/org/springblade/modules/disputeRecord/entity/DisputeRecordEntity.java
New file
@@ -0,0 +1,164 @@
package org.springblade.modules.disputeRecord.entity;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
/**
 * 矛盾纠纷记录表 实体类
 *
 * @author BladeX
 * @since 2024-03-23
 */
@Data
@TableName("jczz_dispute_record")
@ApiModel(value = "DisputeRecord对象", description = "矛盾纠纷记录表")
public class DisputeRecordEntity implements Serializable {
    private static final long serialVersionUID = 1L;
    /** 主键id */
    @ApiModelProperty(value = "主键ID", example = "")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;
    /**
     * 事发地址
     */
    @ApiModelProperty(value = "事发地址")
    private String address;
    /**
     * 事发经度
     */
    @ApiModelProperty(value = "事发经度")
    private String lng;
    /**
     * 事发纬度
     */
    @ApiModelProperty(value = "事发纬度")
    private String lat;
    /** 事发时间 */
    @ApiModelProperty(value = "事发时间", example = "")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(value = "event_time")
    private Date eventTime;
    /**
     * 当事人1姓名
     */
    @ApiModelProperty(value = "当事人1姓名")
    private String nameOne;
    /**
     * 当事人1性别
     */
    @ApiModelProperty(value = "当事人1性别")
    private Integer genderOne;
    /**
     * 当事人1电话
     */
    @ApiModelProperty(value = "当事人1电话")
    private String phoneOne;
    /**
     * 当事人1身份证号码
     */
    @ApiModelProperty(value = "当事人1身份证号码")
    private String idCardOne;
    /**
     * 当事人2姓名
     */
    @ApiModelProperty(value = "当事人2姓名")
    private String nameTwo;
    /**
     * 当事人2性别
     */
    @ApiModelProperty(value = "当事人2性别")
    private Integer genderTwo;
    /**
     * 当事人2电话
     */
    @ApiModelProperty(value = "当事人2电话")
    private String phoneTwo;
    /**
     * 当事人2身份证号码
     */
    @ApiModelProperty(value = "当事人2身份证号码")
    private String idCardTwo;
    /**
     * 纠纷类型  业务字典:disputeType
     */
    @ApiModelProperty(value = "纠纷类型  业务字典:disputeType")
    private Integer disputeType;
    /**
     * 纠纷内容
     */
    @ApiModelProperty(value = "纠纷内容")
    private String disputeContent;
    /**
     * 0:否 1:是   是否受伤
     */
    @ApiModelProperty(value = "0:否 1:是   是否受伤 ")
    private Integer injuryFlag;
    /**
     * 受伤情况描述
     */
    @ApiModelProperty(value = "受伤情况描述")
    private String injuryDesc;
    /**
     * 报警次数
     */
    @ApiModelProperty(value = "报警次数")
    private Integer alarmNum;
    /**
     * 信息来源:1:群众报警  2:e呼即办推送 3:走访发现 业务字典:disputeSource
     */
    @ApiModelProperty(value = "信息来源 业务字典:disputeSource")
    private Integer source;
    /**
     * 处理结果 1:已化解 2:未化解 3:移送e呼即办
     */
    @ApiModelProperty(value = "处理结果 1:已化解 2:未化解 3:移送e呼即办")
    private Integer handleResult;
    /**
     * 网格编码
     */
    @ApiModelProperty(value = "网格编码")
    private String gridCode;
    /**
     * 警务网格编码
     */
    @ApiModelProperty(value = "警务网格编码")
    private String jwGridCode;
    /** 创建人 */
    @ApiModelProperty(value = "创建人", example = "")
    @TableField("create_user")
    private Long createUser;
    /** 创建时间 */
    @ApiModelProperty(value = "创建时间", example = "")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private Date createTime;
    /** 更新人 */
    @ApiModelProperty(value = "更新人", example = "")
    @TableField("update_user")
    private Long updateUser;
    /** 更新时间 */
    @ApiModelProperty(value = "更新时间", example = "")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(value = "update_time",fill = FieldFill.UPDATE)
    private Date updateTime;
    /** 是否删除 0:否  1:是 */
    @ApiModelProperty(value = "是否删除 0:否  1:是", example = "")
    @TableField("is_deleted")
    @TableLogic
    private Integer isDeleted;
}
src/main/java/org/springblade/modules/disputeRecord/excel/DisputeRecordExcel.java
New file
@@ -0,0 +1,150 @@
package org.springblade.modules.disputeRecord.excel;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springblade.common.excel.ExcelDictConverter;
import org.springblade.common.excel.ExcelDictItem;
import org.springblade.common.excel.ExcelDictItemLabel;
import java.io.Serializable;
import java.util.Date;
/**
 * DisputeRecordExcel
 * 矛盾纠纷事件
 * @author Chill
 */
@Data
@ColumnWidth(25)
@HeadRowHeight(20)
@ContentRowHeight(18)
public class DisputeRecordExcel implements Serializable {
    private static final long serialVersionUID = 2L;
    /** 事发地址 */
    @ExcelProperty( "事发地址")
    private String address;
    /**
     * 事发经度
     */
    @ExcelProperty( "事发经度")
    private String lng;
    /**
     * 事发纬度
     */
    @ExcelProperty( "事发纬度")
    private String lat;
    /**
     * 事发时间
     */
    @ApiModelProperty(value = "创建时间", example = "")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ExcelProperty( "事发时间")
    private String eventTime;
    /**
     * 当事人1姓名
     */
    @ApiModelProperty(value = "当事人1姓名")
    @ExcelProperty( "当事人1姓名")
    private String nameOne;
    /**
     * 当事人1性别
     */
    @ApiModelProperty(value = "当事人1性别")
    @ExcelProperty( "当事人1性别(男/女)")
    private String genderOne;
    /**
     * 当事人1电话
     */
    @ApiModelProperty(value = "当事人1电话")
    @ExcelProperty( "当事人1电话")
    private String phoneOne;
    /**
     * 当事人1身份证号码
     */
    @ApiModelProperty(value = "当事人1身份证号码")
    @ExcelProperty( "当事人1身份证号码")
    private String idCardOne;
    /**
     * 当事人2姓名
     */
    @ApiModelProperty(value = "当事人2姓名")
    @ExcelProperty( "当事人2姓名")
    private String nameTwo;
    /**
     * 当事人2性别
     */
    @ApiModelProperty(value = "当事人2性别")
    @ExcelProperty( "当事人2性别(男/女)")
    private String genderTwo;
    /**
     * 当事人2电话
     */
    @ApiModelProperty(value = "当事人2电话")
    @ExcelProperty( "当事人2电话")
    private String phoneTwo;
    /**
     * 当事人2身份证号码
     */
    @ApiModelProperty(value = "当事人2身份证号码")
    @ExcelProperty( "当事人2身份证号码")
    private String idCardTwo;
    /**
     * 纠纷类型  业务字典:disputeType
     */
    @ApiModelProperty(value = "纠纷类型  业务字典:disputeType")
    @ExcelProperty( value = "纠纷类型(家庭婚恋纠纷/邻里纠纷/劳务劳资纠纷/经济纠纷/消防纠纷/医疗纠纷/交通纠纷/其他纠纷)",converter = ExcelDictConverter.class)
    @ExcelDictItemLabel(type = "disputeType")
    @ExcelDictItem(type = "disputeType")
    private String disputeType;
    /**
     * 纠纷内容
     */
    @ApiModelProperty(value = "纠纷内容")
    @ExcelProperty( "纠纷内容")
    private String disputeContent;
    /**
     * 0:否 1:是   是否受伤
     */
    @ApiModelProperty(value = "0:否 1:是   是否受伤 ")
    @ExcelProperty( "是否受伤(是/否)")
    private String injuryFlag;
    /**
     * 受伤情况描述
     */
    @ApiModelProperty(value = "受伤情况描述")
    @ExcelProperty( "受伤情况描述")
    private String injuryDesc;
    /**
     * 报警次数
     */
    @ApiModelProperty(value = "报警次数")
    @ExcelProperty( "报警次数")
    private Integer alarmNum;
    /**
     * 信息来源:1:群众报警  2:e呼即办推送 3:走访发现 业务字典:disputeSource
     */
    @ApiModelProperty(value = "信息来源 业务字典:disputeSource")
    @ExcelProperty( value = "信息来源(群众报警/e呼即办推送/走访发现/)",converter = ExcelDictConverter.class)
    @ExcelDictItemLabel(type = "disputeSource")
    @ExcelDictItem(type = "disputeSource")
    private String source;
    /**
     * 处理结果 1:已化解 2:未化解 3:移送e呼即办
     */
    @ApiModelProperty(value = "处理结果 1:已化解 2:未化解 3:移送e呼即办")
    @ExcelProperty( value = "处理结果(已化解/未化解/移送e呼即办)")
    private String handleResult;
}
src/main/java/org/springblade/modules/disputeRecord/excel/DisputeRecordImporter.java
New file
@@ -0,0 +1,23 @@
package org.springblade.modules.disputeRecord.excel;
import lombok.RequiredArgsConstructor;
import org.springblade.core.excel.support.ExcelImporter;
import org.springblade.modules.disputeRecord.service.IDisputeRecordService;
import java.util.List;
/**
 * 矛盾纠纷事件数据导入类
 *
 * @author Chill
 */
@RequiredArgsConstructor
public class DisputeRecordImporter implements ExcelImporter<DisputeRecordExcel> {
    private final IDisputeRecordService disputeRecordService;
    private final Boolean isCovered;
    @Override
    public void save(List<DisputeRecordExcel> data) {
        disputeRecordService.importDisputeRecord(data, isCovered);
    }
}
src/main/java/org/springblade/modules/disputeRecord/excel/ExportDisputeRecordExcel.java
New file
@@ -0,0 +1,158 @@
package org.springblade.modules.disputeRecord.excel;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springblade.common.excel.ExcelDictConverter;
import org.springblade.common.excel.ExcelDictItem;
import java.io.Serializable;
import java.util.Date;
/**
 * DisputeRecordExcel
 * 矛盾纠纷事件
 * @author Chill
 */
@Data
@ColumnWidth(25)
@HeadRowHeight(20)
@ContentRowHeight(18)
public class ExportDisputeRecordExcel implements Serializable {
    private static final long serialVersionUID = 2L;
    /** 事发地址 */
    @ExcelProperty( "事发地址")
    private String address;
//    /**
//     * 事发经度
//     */
//    @ExcelProperty( "事发经度")
//    private String lng;
//    /**
//     * 事发纬度
//     */
//    @ExcelProperty( "事发纬度")
//    private String lat;
    /**
     * 事发时间
     */
    @ApiModelProperty(value = "创建时间", example = "")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ExcelProperty( "事发时间")
    private Date eventTime;
    /**
     * 纠纷方1姓名
     */
    @ApiModelProperty(value = "纠纷方1姓名")
    @ExcelProperty( "纠纷方1姓名")
    private String nameOne;
    /**
     * 当事人1性别
     */
    @ApiModelProperty(value = "当事人1性别")
    @ExcelProperty( "当事人1性别(男/女)")
    private String genderOne;
    /**
     * 纠纷方1电话
     */
    @ApiModelProperty(value = "纠纷方1电话")
    @ExcelProperty( "纠纷方1电话")
    private String phoneOne;
    /**
     * 纠纷方1身份证号码
     */
    @ApiModelProperty(value = "纠纷方1身份证号码")
    @ExcelProperty( "纠纷方1身份证号码")
    private String idCardOne;
    /**
     * 纠纷方2姓名
     */
    @ApiModelProperty(value = "纠纷方2姓名")
    @ExcelProperty( "纠纷方2姓名")
    private String nameTwo;
    /**
     * 当事人2性别
     */
    @ApiModelProperty(value = "当事人2性别")
    @ExcelProperty( "当事人2性别(男/女)")
    private String genderTwo;
    /**
     * 纠纷方2电话
     */
    @ApiModelProperty(value = "纠纷方2电话")
    @ExcelProperty( "纠纷方2电话")
    private String phoneTwo;
    /**
     * 纠纷方2身份证号码
     */
    @ApiModelProperty(value = "纠纷方2身份证号码")
    @ExcelProperty( "纠纷方2身份证号码")
    private String idCardTwo;
    /**
     * 纠纷类型  业务字典:disputeType
     */
    @ApiModelProperty(value = "纠纷类型  业务字典:disputeType")
    @ExcelProperty( value = "纠纷类型(家庭婚恋纠纷/邻里纠纷/劳务劳资纠纷/经济纠纷/消防纠纷/医疗纠纷/交通纠纷/其他纠纷)",converter = ExcelDictConverter.class)
    @ExcelDictItem(type = "disputeType")
    private String disputeType;
    /**
     * 纠纷内容
     */
    @ApiModelProperty(value = "纠纷内容")
    @ExcelProperty( "纠纷内容")
    private String disputeContent;
    /**
     * 0:否 1:是   是否受伤
     */
    @ApiModelProperty(value = "0:否 1:是   是否受伤 ")
    @ExcelProperty( "是否受伤(是/否)")
    private String injuryFlag;
    /**
     * 受伤情况描述
     */
    @ApiModelProperty(value = "受伤情况描述")
    @ExcelProperty( "受伤情况描述")
    private String injuryDesc;
    /**
     * 报警次数
     */
    @ApiModelProperty(value = "报警次数")
    @ExcelProperty( "报警次数")
    private Integer alarmNum;
    /**
     * 信息来源:1:群众报警  2:e呼即办推送 3:走访发现 业务字典:disputeSource
     */
    @ApiModelProperty(value = "信息来源 业务字典:disputeSource")
    @ExcelProperty( value = "信息来源(群众报警/e呼即办推送/走访发现/)",converter = ExcelDictConverter.class)
    @ExcelDictItem(type = "disputeSource")
    private String source;
    /**
     * 处理结果 1:已化解 2:未化解 3:移送e呼即办
     */
    @ApiModelProperty(value = "处理结果 1:已化解 2:未化解 3:移送e呼即办")
    @ExcelProperty( value = "处理结果(已化解/未化解/移送e呼即办)")
    private String handleResult;
    /**
     * 乡镇名称
     */
    @ApiModelProperty(value = "乡镇名称", example = "")
    @ExcelProperty( value = "地区")
    private String townName;
    /**
     * 派出所名称
     */
    @ApiModelProperty(value = "派出所名称", example = "")
    @ExcelProperty( value = "辖区派出所")
    private String pcsName;
}
src/main/java/org/springblade/modules/disputeRecord/mapper/DisputeRecordMapper.java
New file
@@ -0,0 +1,66 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.disputeRecord.mapper;
import org.apache.ibatis.annotations.Param;
import org.springblade.modules.disputeRecord.entity.DisputeRecordEntity;
import org.springblade.modules.disputeRecord.excel.DisputeRecordExcel;
import org.springblade.modules.disputeRecord.excel.ExportDisputeRecordExcel;
import org.springblade.modules.disputeRecord.vo.DisputeRecordVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List;
/**
 * 矛盾纠纷记录表 Mapper 接口
 *
 * @author BladeX
 * @since 2024-03-23
 */
public interface DisputeRecordMapper extends BaseMapper<DisputeRecordEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param disputeRecord
     * @return
     */
    List<DisputeRecordVO> selectDisputeRecordPage(IPage page,
                                                  @Param("disputeRecord") DisputeRecordVO disputeRecord,
                                                  @Param("isAdministrator") Integer isAdministrator,
                                                  @Param("regionChildCodesList") List<String> regionChildCodesList,
                                                  @Param("gridCodeList") List<String> gridCodeList);
    /**
     * 矛盾纠纷记录表 自定义详情
     * @param disputeRecord
     * @return
     */
    DisputeRecordVO getDetail(@Param("disputeRecord") DisputeRecordVO disputeRecord);
    /**
     * 导出矛盾纠纷记录表
     * @param disputeRecord
     * @return
     */
    List<ExportDisputeRecordExcel> exportDisputeRecordList(@Param("disputeRecord") DisputeRecordVO disputeRecord,
                                                           @Param("isAdministrator") Integer isAdministrator,
                                                           @Param("regionChildCodesList") List<String> regionChildCodesList,
                                                           @Param("gridCodeList") List<String> gridCodeList);
}
src/main/java/org/springblade/modules/disputeRecord/mapper/DisputeRecordMapper.xml
New file
@@ -0,0 +1,378 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.springblade.modules.disputeRecord.mapper.DisputeRecordMapper">
    <!-- 通用查询映射结果 -->
    <resultMap id="disputeRecordResultMap" type="org.springblade.modules.disputeRecord.vo.DisputeRecordVO">
        <result column="id" property="id"/>
        <result column="address" property="address"/>
        <result column="lng" property="lng"/>
        <result column="lat" property="lat"/>
        <result column="name_one" property="nameOne"/>
        <result column="phone_one" property="phoneOne"/>
        <result column="id_card_one" property="idCardOne"/>
        <result column="name_two" property="nameTwo"/>
        <result column="phone_two" property="phoneTwo"/>
        <result column="id_card_two" property="idCardTwo"/>
        <result column="dispute_type" property="disputeType"/>
        <result column="dispute_content" property="disputeContent"/>
        <result column="injury_flag" property="injuryFlag"/>
        <result column="injury_desc" property="injuryDesc"/>
        <result column="alarm_num" property="alarmNum"/>
        <result column="source" property="source"/>
        <result column="handle_result" property="handleResult"/>
        <result column="grid_code" property="gridCode"/>
        <result column="jw_grid_code" property="jwGridCode"/>
        <result column="create_user" property="createUser"/>
        <result column="create_time" property="createTime"/>
        <result column="update_user" property="updateUser"/>
        <result column="update_time" property="updateTime"/>
        <result column="is_deleted" property="isDeleted"/>
    </resultMap>
    <!--自定列表分页查询-->
    <select id="selectDisputeRecordPage" resultMap="disputeRecordResultMap">
        select
        jdr.*,
        br.town_name as townName,
        br.name as communityName,
        jpag.pcs_name pcsName
        from jczz_dispute_record jdr
        LEFT JOIN jczz_grid jg on jg.grid_code = jdr.grid_code and jg.is_deleted = 0
        LEFT JOIN jczz_police_affairs_grid jpag on jdr.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0
        LEFT JOIN blade_region br on br.code = jpag.community_code
        where jdr.is_deleted = 0
        <if test="disputeRecord.disputeType != null">
            and jdr.dispute_type = #{disputeRecord.disputeType}
        </if>
        <if test="disputeRecord.injuryFlag != null">
            and jdr.injury_flag = #{disputeRecord.injuryFlag}
        </if>
        <if test="disputeRecord.source != null">
            and jdr.source = #{disputeRecord.source}
        </if>
        <if test="disputeRecord.townName != null and disputeRecord.townName != ''">
            and br.town_name like concat('%',#{disputeRecord.townName},'%')
        </if>
        <if test="disputeRecord.communityName != null and disputeRecord.communityName != ''">
            and jbr.name like concat('%',#{disputeRecord.communityName},'%')
        </if>
        <if test="disputeRecord.pcsName != null and disputeRecord.pcsName != ''">
            and jpag.pcs_name like concat('%',#{disputeRecord.pcsName},'%')
        </if>
        <if test="disputeRecord.address != null and disputeRecord.address != ''">
            and jdr.address like concat('%',#{disputeRecord.address},'%')
        </if>
        <if test="disputeRecord.disputeContent != null and disputeRecord.disputeContent != ''">
            and jdr.dispute_content like concat('%',#{disputeRecord.disputeContent},'%')
        </if>
        <if test="disputeRecord.nameOne != null and disputeRecord.nameOne != ''">
            and jdr.name_one like concat('%',#{disputeRecord.nameOne},'%')
        </if>
        <if test="disputeRecord.phoneOne != null and disputeRecord.phoneOne != ''">
            and jdr.phone_one like concat('%',#{disputeRecord.phoneOne},'%')
        </if>
        <if test="disputeRecord.idCardOne != null and disputeRecord.idCardOne != ''">
            and jdr.id_card_one like concat('%',#{disputeRecord.idCardOne},'%')
        </if>
        <if test="disputeRecord.nameTwo != null and disputeRecord.nameTwo != ''">
            and jdr.name_two like concat('%',#{disputeRecord.nameTwo},'%')
        </if>
        <if test="disputeRecord.phoneTwo != null and disputeRecord.phoneTwo != ''">
            and jdr.phone_two like concat('%',#{disputeRecord.phoneOne},'%')
        </if>
        <if test="disputeRecord.idCardTwo != null and disputeRecord.idCardTwo != ''">
            and jdr.id_card_two like concat('%',#{disputeRecord.idCardTwo},'%')
        </if>
        <if test="disputeRecord.startTime != null and disputeRecord.startTime != ''">
            and date_format(jdr.event_time,'%Y-%m-%d') &gt;= #{disputeRecord.startTime}
        </if>
        <if test="disputeRecord.endTime != null and disputeRecord.endTime != ''">
            and date_format(jdr.event_time,'%Y-%m-%d') &lt;= #{disputeRecord.endTime}
        </if>
        <if test="disputeRecord.searchKey!=null and disputeRecord.searchKey!=''">
            and CONCAT(
            ifnull(jdr.name_one,''),
            ifnull(jdr.phone_one,''),
            ifnull(jdr.name_two,''),
            ifnull(jdr.phone_two,''),
            ifnull(jdr.address,''),
            ifnull(jdr.dispute_content,'')
            ) like CONCAT ('%', #{disputeRecord.searchKey},'%')
        </if>
        <if test="isAdministrator==2">
            <choose>
                <when test="disputeRecord.roleName != null and disputeRecord.roleName != ''">
                    <if test="disputeRecord.roleName=='wgy'">
                        <choose>
                            <when test="gridCodeList !=null and gridCodeList.size()>0">
                                and jg.grid_code in
                                <foreach collection="gridCodeList" item="code" open="(" close=")" separator=",">
                                    #{code}
                                </foreach>
                            </when>
                            <otherwise>
                                and jg.grid_code in ('')
                            </otherwise>
                        </choose>
                    </if>
                    <if test="disputeRecord.roleName=='mj'">
                        <choose>
                            <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
                                and jpag.community_code in
                                <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
                                    #{code}
                                </foreach>
                            </when>
                            <otherwise>
                                and jpag.community_code in ('')
                            </otherwise>
                        </choose>
                    </if>
                </when>
                <otherwise>
                    <choose>
                        <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
                            and
                            (
                            jg.grid_code in
                            <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
                                #{code}
                            </foreach>
                            or
                            jpag.community_code in
                            <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
                                #{code}
                            </foreach>
                            )
                        </when>
                        <otherwise>
                            and
                            (
                            jg.grid_code in ('') or jpag.community_code in ('')
                            )
                        </otherwise>
                    </choose>
                </otherwise>
            </choose>
        </if>
        order by jdr.id desc,jdr.create_time desc
    </select>
    <!--自定列表分页查询-->
    <select id="getDetail" resultType="org.springblade.modules.disputeRecord.vo.DisputeRecordVO">
        select
        jdr.*,
        br.town_name as townName,
        br.name as communityName,
        jpag.pcs_name pcsName
        from jczz_dispute_record jdr
        LEFT JOIN jczz_grid jg on jg.grid_code = jdr.grid_code and jg.is_deleted = 0
        LEFT JOIN jczz_police_affairs_grid jpag on jdr.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0
        LEFT JOIN blade_region br on br.code = jpag.community_code
        where jdr.is_deleted = 0
        <if test="disputeRecord.id != null">
            and jdr.id = #{disputeRecord.id}
        </if>
        <if test="disputeRecord.disputeType != null">
            and jdr.dispute_type = #{disputeRecord.disputeType}
        </if>
        <if test="disputeRecord.injuryFlag != null">
            and jdr.injury_flag = #{disputeRecord.injuryFlag}
        </if>
        <if test="disputeRecord.source != null">
            and jdr.source = #{disputeRecord.source}
        </if>
        <if test="disputeRecord.handleResult != null">
            and jdr.handle_result = #{disputeRecord.handleResult}
        </if>
        <if test="disputeRecord.townName != null and disputeRecord.townName != ''">
            and br.town_name like concat('%',#{disputeRecord.townName},'%')
        </if>
        <if test="disputeRecord.communityName != null and disputeRecord.communityName != ''">
            and jbr.name like concat('%',#{disputeRecord.communityName},'%')
        </if>
        <if test="disputeRecord.pcsName != null and disputeRecord.pcsName != ''">
            and jpag.pcs_name like concat('%',#{disputeRecord.pcsName},'%')
        </if>
        <if test="disputeRecord.address != null and disputeRecord.address != ''">
            and jdr.address like concat('%',#{disputeRecord.address},'%')
        </if>
        <if test="disputeRecord.disputeContent != null and disputeRecord.disputeContent != ''">
            and jdr.dispute_content like concat('%',#{disputeRecord.disputeContent},'%')
        </if>
        <if test="disputeRecord.nameOne != null and disputeRecord.nameOne != ''">
            and jdr.name_one like concat('%',#{disputeRecord.nameOne},'%')
        </if>
        <if test="disputeRecord.phoneOne != null and disputeRecord.phoneOne != ''">
            and jdr.phone_one like concat('%',#{disputeRecord.phoneOne},'%')
        </if>
        <if test="disputeRecord.idCardOne != null and disputeRecord.idCardOne != ''">
            and jdr.id_card_one like concat('%',#{disputeRecord.idCardOne},'%')
        </if>
        <if test="disputeRecord.nameTwo != null and disputeRecord.nameTwo != ''">
            and jdr.name_two like concat('%',#{disputeRecord.nameTwo},'%')
        </if>
        <if test="disputeRecord.phoneTwo != null and disputeRecord.phoneTwo != ''">
            and jdr.phone_two like concat('%',#{disputeRecord.phoneOne},'%')
        </if>
        <if test="disputeRecord.idCardTwo != null and disputeRecord.idCardTwo != ''">
            and jdr.id_card_two like concat('%',#{disputeRecord.idCardTwo},'%')
        </if>
    </select>
    <!--导出矛盾纠纷记录表-->
    <select id="exportDisputeRecordList" resultType="org.springblade.modules.disputeRecord.excel.ExportDisputeRecordExcel">
        select
        jdr.address,
        jdr.event_time,
        jdr.name_one,
        case when jdr.gender_one =1 then '男'
        when jdr.gender_one=2 then '女'
        end as gender_one,
        jdr.phone_one,
        jdr.id_card_one,
        jdr.name_two,
        case when jdr.gender_two =1 then '男'
        when jdr.gender_two=2 then '女'
        end as gender_two,
        jdr.phone_two,
        jdr.id_card_two,
        jdr.dispute_type,
        jdr.dispute_content,
        case when jdr.injury_flag=1 then '是'
        when jdr.injury_flag=0 then '否'
        end as injury_flag,
        jdr.injury_desc,
        jdr.alarm_num,
        jdr.source,
        case when jdr.handle_result=1 then '已化解'
        when jdr.handle_result=2 then '未化解'
        when jdr.handle_result=3 then '移送e呼即办'
        end as handle_result,
        br.town_name as townName,
        br.name as communityName,
        jpag.pcs_name pcsName
        from jczz_dispute_record jdr
        LEFT JOIN jczz_grid jg on jg.grid_code = jdr.grid_code and jg.is_deleted = 0
        LEFT JOIN jczz_police_affairs_grid jpag on jdr.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0
        LEFT JOIN blade_region br on br.code = jpag.community_code
        where jdr.is_deleted = 0
        <if test="disputeRecord.disputeType != null">
            and jdr.dispute_type = #{disputeRecord.disputeType}
        </if>
        <if test="disputeRecord.injuryFlag != null">
            and jdr.injury_flag = #{disputeRecord.injuryFlag}
        </if>
        <if test="disputeRecord.source != null">
            and jdr.source = #{disputeRecord.source}
        </if>
        <if test="disputeRecord.townName != null and disputeRecord.townName != ''">
            and br.town_name like concat('%',#{disputeRecord.townName},'%')
        </if>
        <if test="disputeRecord.communityName != null and disputeRecord.communityName != ''">
            and jbr.name like concat('%',#{disputeRecord.communityName},'%')
        </if>
        <if test="disputeRecord.pcsName != null and disputeRecord.pcsName != ''">
            and jpag.pcs_name like concat('%',#{disputeRecord.pcsName},'%')
        </if>
        <if test="disputeRecord.address != null and disputeRecord.address != ''">
            and jdr.address like concat('%',#{disputeRecord.address},'%')
        </if>
        <if test="disputeRecord.disputeContent != null and disputeRecord.disputeContent != ''">
            and jdr.dispute_content like concat('%',#{disputeRecord.disputeContent},'%')
        </if>
        <if test="disputeRecord.nameOne != null and disputeRecord.nameOne != ''">
            and jdr.name_one like concat('%',#{disputeRecord.nameOne},'%')
        </if>
        <if test="disputeRecord.phoneOne != null and disputeRecord.phoneOne != ''">
            and jdr.phone_one like concat('%',#{disputeRecord.phoneOne},'%')
        </if>
        <if test="disputeRecord.idCardOne != null and disputeRecord.idCardOne != ''">
            and jdr.id_card_one like concat('%',#{disputeRecord.idCardOne},'%')
        </if>
        <if test="disputeRecord.nameTwo != null and disputeRecord.nameTwo != ''">
            and jdr.name_two like concat('%',#{disputeRecord.nameTwo},'%')
        </if>
        <if test="disputeRecord.phoneTwo != null and disputeRecord.phoneTwo != ''">
            and jdr.phone_two like concat('%',#{disputeRecord.phoneOne},'%')
        </if>
        <if test="disputeRecord.idCardTwo != null and disputeRecord.idCardTwo != ''">
            and jdr.id_card_two like concat('%',#{disputeRecord.idCardTwo},'%')
        </if>
        <if test="disputeRecord.startTime != null and disputeRecord.startTime != ''">
            and date_format(jdr.event_time,'%Y-%m-%d') &gt;= #{disputeRecord.startTime}
        </if>
        <if test="disputeRecord.endTime != null and disputeRecord.endTime != ''">
            and date_format(jdr.event_time,'%Y-%m-%d') &lt;= #{disputeRecord.endTime}
        </if>
        <if test="disputeRecord.searchKey!=null and disputeRecord.searchKey!=''">
            and CONCAT(
            ifnull(jdr.name_one,''),
            ifnull(jdr.phone_one,''),
            ifnull(jdr.name_two,''),
            ifnull(jdr.phone_two,''),
            ifnull(jdr.address,''),
            ifnull(jdr.dispute_content,'')
            ) like CONCAT ('%', #{disputeRecord.searchKey},'%')
        </if>
        <if test="isAdministrator==2">
            <choose>
                <when test="disputeRecord.roleName != null and disputeRecord.roleName != ''">
                    <if test="disputeRecord.roleName=='wgy'">
                        <choose>
                            <when test="gridCodeList !=null and gridCodeList.size()>0">
                                and jg.grid_code in
                                <foreach collection="gridCodeList" item="code" open="(" close=")" separator=",">
                                    #{code}
                                </foreach>
                            </when>
                            <otherwise>
                                and jg.grid_code in ('')
                            </otherwise>
                        </choose>
                    </if>
                    <if test="disputeRecord.roleName=='mj'">
                        <choose>
                            <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
                                and jpag.community_code in
                                <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
                                    #{code}
                                </foreach>
                            </when>
                            <otherwise>
                                and jpag.community_code in ('')
                            </otherwise>
                        </choose>
                    </if>
                </when>
                <otherwise>
                    <choose>
                        <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
                            and
                            (
                            jg.grid_code in
                            <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
                                #{code}
                            </foreach>
                            or
                            jpag.community_code in
                            <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
                                #{code}
                            </foreach>
                            )
                        </when>
                        <otherwise>
                            and
                            (
                            jg.grid_code in ('') or jpag.community_code in ('')
                            )
                        </otherwise>
                    </choose>
                </otherwise>
            </choose>
        </if>
        order by jdr.id desc,jdr.create_time desc
    </select>
</mapper>
src/main/java/org/springblade/modules/disputeRecord/service/IDisputeRecordService.java
New file
@@ -0,0 +1,61 @@
package org.springblade.modules.disputeRecord.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springblade.modules.disputeRecord.entity.DisputeRecordEntity;
import org.springblade.modules.disputeRecord.excel.DisputeRecordExcel;
import org.springblade.modules.disputeRecord.excel.ExportDisputeRecordExcel;
import org.springblade.modules.disputeRecord.vo.DisputeRecordVO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List;
/**
 * 矛盾纠纷记录表 服务类
 *
 * @author BladeX
 * @since 2024-03-23
 */
public interface IDisputeRecordService extends IService<DisputeRecordEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param disputeRecord
     * @return
     */
    IPage<DisputeRecordVO> selectDisputeRecordPage(IPage<DisputeRecordVO> page, DisputeRecordVO disputeRecord);
    /**
     * 矛盾纠纷记录表 自定义新增或修改
     * @param disputeRecord
     * @return
     */
    boolean saveOrUpdateDisputeRecord(DisputeRecordEntity disputeRecord);
    /**
     * 矛盾纠纷记录表 自定义详情
     * @param disputeRecord
     * @return
     */
    DisputeRecordVO getDetail(DisputeRecordVO disputeRecord);
    /**
     * 矛盾纠纷事件数据导入类
     * @author Chill
     */
    String importDisputeRecord(List<DisputeRecordExcel> data, Boolean isCovered);
    /**
     * 导出矛盾纠纷记录表
     * @param disputeRecord
     * @return
     */
    List<ExportDisputeRecordExcel> exportDisputeRecordList(DisputeRecordVO disputeRecord);
    /**
     * e呼即办数据临时转换到矛盾纠纷
     */
    void eCallToDis();
}
src/main/java/org/springblade/modules/disputeRecord/service/impl/DisputeRecordServiceImpl.java
New file
@@ -0,0 +1,255 @@
package org.springblade.modules.disputeRecord.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.logging.log4j.util.Strings;
import org.springblade.common.param.CommonParamSet;
import org.springblade.common.param.GridSet;
import org.springblade.common.utils.SpringUtils;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.modules.backblast.entity.BackblastWarnHanRecEntity;
import org.springblade.modules.community.dto.CommunityDTO;
import org.springblade.modules.disputeRecord.entity.DisputeRecordEntity;
import org.springblade.modules.disputeRecord.excel.DisputeRecordExcel;
import org.springblade.modules.disputeRecord.excel.ExportDisputeRecordExcel;
import org.springblade.modules.disputeRecord.vo.DisputeRecordVO;
import org.springblade.modules.disputeRecord.mapper.DisputeRecordMapper;
import org.springblade.modules.disputeRecord.service.IDisputeRecordService;
import org.springblade.modules.system.entity.DictBiz;
import org.springblade.modules.system.service.IDictBizService;
import org.springblade.modules.task.entity.ECallEventEntity;
import org.springblade.modules.task.service.IECallEventService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springframework.transaction.annotation.Transactional;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Objects;
/**
 * 矛盾纠纷记录表 服务实现类
 *
 * @author BladeX
 * @since 2024-03-23
 */
@Service
public class DisputeRecordServiceImpl extends ServiceImpl<DisputeRecordMapper, DisputeRecordEntity> implements IDisputeRecordService {
    @Override
    public IPage<DisputeRecordVO> selectDisputeRecordPage(IPage<DisputeRecordVO> page, DisputeRecordVO disputeRecord) {
        CommonParamSet commonParamSet = new CommonParamSet<>().invoke(DisputeRecordVO.class, disputeRecord);
        return page.setRecords(
            baseMapper.selectDisputeRecordPage(page,
            disputeRecord,
            commonParamSet.getIsAdministrator(),
            commonParamSet.getRegionChildCodesList(),
            commonParamSet.getGridCodeList())
        );
    }
    /**
     * 矛盾纠纷记录表 自定义新增或修改
     * @param disputeRecord
     * @return
     */
    @Override
    public boolean saveOrUpdateDisputeRecord(DisputeRecordEntity disputeRecord) {
        // 点落面计算警格,网格,警格
        GridSet invoke = new GridSet().invoke(DisputeRecordEntity.class, disputeRecord,
            "lng", "lat", "gridCode", "jwGridCode");
        if (null!=disputeRecord.getId()){
            // 更新
            return updateById(disputeRecord);
        }
        // 新增
        return save(disputeRecord);
    }
    /**
     * 矛盾纠纷记录表 自定义详情
     * @param disputeRecord
     * @return
     */
    @Override
    public DisputeRecordVO getDetail(DisputeRecordVO disputeRecord) {
        return baseMapper.getDetail(disputeRecord);
    }
    /**
     * 矛盾纠纷事件数据导入类
     * @param data
     * @param isCovered
     */
    @Override
    @Transactional(rollbackFor = Exception.class)
    public String importDisputeRecord(List<DisputeRecordExcel> data, Boolean isCovered) {
        int totalNum = data.size();
        int importNum = 0;
        int updateNum = 0;
        int errorNum = 0;
        for (DisputeRecordExcel disputeRecordExcel : data) {
            // 判断地址,时间
            if (Strings.isBlank(disputeRecordExcel.getAddress())
            ) {
                errorNum++;
                continue;
            }
            // 获取转换数据对象
            DisputeRecordEntity disputeRecordEntity
                = Objects.requireNonNull(BeanUtil.copy(disputeRecordExcel, DisputeRecordEntity.class));
            //处理经纬度
            GridSet gridSet
                = new GridSet<>().invoke(DisputeRecordEntity.class, disputeRecordEntity, "lng", "lat", "gridCode", "jwGridCode");
            //处理需要转换的数据(字典/非字典)
            // 纠纷类型
            if (!Strings.isBlank(disputeRecordExcel.getDisputeType())) {
                disputeRecordEntity.setDisputeType(Integer.parseInt(disputeRecordExcel.getDisputeType()));
            }
            // 信息来源
            if (!Strings.isBlank(disputeRecordExcel.getSource())) {
                disputeRecordEntity.setSource(Integer.parseInt(disputeRecordExcel.getSource()));
            }
            // 受伤情况 0:否 1:是
            if (!Strings.isBlank(disputeRecordExcel.getInjuryFlag())) {
                if (disputeRecordExcel.getInjuryFlag().equals("是")){
                    disputeRecordEntity.setInjuryFlag(1);
                }
                if (disputeRecordExcel.getInjuryFlag().equals("否")){
                    disputeRecordEntity.setInjuryFlag(0);
                }
            }
            // 当事人1性别 1:男 2:女
            if (!Strings.isBlank(disputeRecordExcel.getGenderOne())) {
                if (disputeRecordExcel.getGenderOne().contains("男")){
                    disputeRecordEntity.setGenderOne(1);
                }
                if (disputeRecordExcel.getGenderOne().contains("女")){
                    disputeRecordEntity.setGenderOne(2);
                }
            }
            // 当事人2性别 1:男 2:女
            if (!Strings.isBlank(disputeRecordExcel.getGenderTwo())) {
                if (disputeRecordExcel.getGenderTwo().contains("男")){
                    disputeRecordEntity.setGenderTwo(1);
                }
                if (disputeRecordExcel.getGenderTwo().contains("女")){
                    disputeRecordEntity.setGenderTwo(2);
                }
            }
            // 处理结果 1:已化解 2:未化解 3:移送e呼即办
            if (!Strings.isBlank(disputeRecordExcel.getHandleResult())) {
                if (disputeRecordExcel.getHandleResult().equals("已化解")) {
                    disputeRecordEntity.setHandleResult(1);
                }
                if (disputeRecordExcel.getHandleResult().equals("未化解")) {
                    disputeRecordEntity.setHandleResult(2);
                }
                if (disputeRecordExcel.getHandleResult().equals("移送e呼即办")) {
                    disputeRecordEntity.setHandleResult(3);
                }
            }
            // 日期处理
            if (!Strings.isBlank(disputeRecordExcel.getEventTime())) {
                try {
                    Date date = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(disputeRecordExcel.getEventTime());
                    disputeRecordEntity.setEventTime(date);
                } catch (ParseException e) {
                    e.printStackTrace();
                }
            }
            // 判断是否重复
            QueryWrapper<DisputeRecordEntity> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("address", disputeRecordExcel.getAddress())
                .eq("event_time", disputeRecordEntity.getEventTime())
                .eq("is_deleted", 0);
            // 查询
            List<DisputeRecordEntity> list = list(queryWrapper);
            if (list.size()>0){
                updateNum++;
                if (isCovered) {
                    // 更新
                    disputeRecordEntity.setId(list.get(0).getId());
                    // 更新
                    updateById(disputeRecordEntity);
                    importNum++;
                }
            }else {
                // 插入
                save(disputeRecordEntity);
                importNum ++;
            }
        }
        StringBuilder builder = new StringBuilder("导入完成!");
        builder.append("其中本次表格共有 ").append(totalNum).append(" 条数据,")
            .append("成功导入 ").append(importNum).append(" 条数据。");
        if (updateNum>0) {
            builder.append("其中有 ").append(updateNum).append(" 条数据已存在。");
        }
        if (errorNum>0){
            builder.append("共有 ").append(errorNum).append(" 条数据由于无地址信息未导入!");
        }
        return builder.toString();
    }
    /**
     * 导出矛盾纠纷记录表
     * @param disputeRecord
     * @return
     */
    @Override
    public List<ExportDisputeRecordExcel> exportDisputeRecordList(DisputeRecordVO disputeRecord) {
        CommonParamSet commonParamSet = new CommonParamSet<>().invoke(DisputeRecordVO.class, disputeRecord);
        return baseMapper.exportDisputeRecordList(
                disputeRecord,
                commonParamSet.getIsAdministrator(),
                commonParamSet.getRegionChildCodesList(),
                commonParamSet.getGridCodeList());
    }
    /**
     * e呼即办数据临时转换到矛盾纠纷
     */
    @Override
    @Transactional(rollbackFor = Exception.class)
    public void eCallToDis() {
        // 查询所有的e 呼即办数据
        IECallEventService callEventService = SpringUtils.getBean(IECallEventService.class);
        IDictBizService dictBizService = SpringUtils.getBean(IDictBizService.class);
        // 查询所有
        QueryWrapper<ECallEventEntity> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("is_deleted",0);
        List<ECallEventEntity> eCallEventEntityList = callEventService.list(queryWrapper);
        // 遍历处理
        for (ECallEventEntity eCallEventEntity : eCallEventEntityList) {
            if (eCallEventEntity.getName().contains("纠纷")) {
                DisputeRecordEntity disputeRecordEntity = new DisputeRecordEntity();
                disputeRecordEntity.setAddress(eCallEventEntity.getAddress());
                disputeRecordEntity.setLng(eCallEventEntity.getLng());
                disputeRecordEntity.setLat(eCallEventEntity.getLat());
                disputeRecordEntity.setEventTime(eCallEventEntity.getOccurrenceTime());
                disputeRecordEntity.setDisputeContent(eCallEventEntity.getRemark());
                disputeRecordEntity.setAddress(eCallEventEntity.getAddress());
                // 设置处置结果,暂时放在受伤结果里面
                disputeRecordEntity.setInjuryDesc(eCallEventEntity.getDisRes());
                // 设置网格,警格编号
                GridSet gridSet
                    = new GridSet().invoke(DisputeRecordEntity.class, disputeRecordEntity, "lng", "lat", "gridCode", "jwGridCode");
                // 纠纷类型转换
                QueryWrapper<DictBiz> wrapper = new QueryWrapper<>();
                wrapper.eq("code", "disputeType").eq("is_deleted", 0).eq("dict_value", eCallEventEntity.getName());
                DictBiz one = dictBizService.getOne(wrapper);
                if (null!=one){
                    disputeRecordEntity.setDisputeType(Integer.parseInt(one.getDictKey()));
                }else {
                    // 设置为其他纠纷
                    disputeRecordEntity.setDisputeType(8);
                }
                // 保存
                save(disputeRecordEntity);
            }
        }
    }
}
src/main/java/org/springblade/modules/disputeRecord/vo/DisputeRecordVO.java
New file
@@ -0,0 +1,79 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.disputeRecord.vo;
import io.swagger.annotations.ApiModelProperty;
import org.springblade.modules.disputeRecord.entity.DisputeRecordEntity;
import org.springblade.core.tool.node.INode;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
 * 矛盾纠纷记录表 视图实体类
 *
 * @author BladeX
 * @since 2024-03-23
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class DisputeRecordVO extends DisputeRecordEntity {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = "社区编号", example = "")
    private String communityCode;
    @ApiModelProperty(value = "角色别名", example = "")
    private String roleName;
    /**
     * 搜索关键字
     */
    @ApiModelProperty(value = "搜索关键字", example = "")
    private String searchKey;
    /**
     * 开始时间
     */
    @ApiModelProperty(value = "开始时间", example = "")
    private String startTime;
    /**
     * 结束时间
     */
    @ApiModelProperty(value = "结束时间", example = "")
    private String endTime;
    /**
     * 乡镇名称
     */
    @ApiModelProperty(value = "乡镇名称", example = "")
    private String townName;
    /**
     * 社区名称
     */
    @ApiModelProperty(value = "社区名称", example = "")
    private String communityName;
    /**
     * 派出所名称
     */
    @ApiModelProperty(value = "派出所名称", example = "")
    private String pcsName;
}
src/main/java/org/springblade/modules/disputeRecord/wrapper/DisputeRecordWrapper.java
New file
@@ -0,0 +1,50 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.disputeRecord.wrapper;
import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.modules.disputeRecord.entity.DisputeRecordEntity;
import org.springblade.modules.disputeRecord.vo.DisputeRecordVO;
import java.util.Objects;
/**
 * 矛盾纠纷记录表 包装类,返回视图层所需的字段
 *
 * @author BladeX
 * @since 2024-03-23
 */
public class DisputeRecordWrapper extends BaseEntityWrapper<DisputeRecordEntity, DisputeRecordVO>  {
    public static DisputeRecordWrapper build() {
        return new DisputeRecordWrapper();
     }
    @Override
    public DisputeRecordVO entityVO(DisputeRecordEntity disputeRecord) {
        DisputeRecordVO disputeRecordVO = Objects.requireNonNull(BeanUtil.copy(disputeRecord, DisputeRecordVO.class));
        //User createUser = UserCache.getUser(disputeRecord.getCreateUser());
        //User updateUser = UserCache.getUser(disputeRecord.getUpdateUser());
        //disputeRecordVO.setCreateUserName(createUser.getName());
        //disputeRecordVO.setUpdateUserName(updateUser.getName());
        return disputeRecordVO;
    }
}
src/main/java/org/springblade/modules/doorplateAddress/excel/ImportDoorplateExcel.java
New file
@@ -0,0 +1,272 @@
package org.springblade.modules.doorplateAddress.excel;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import java.io.Serializable;
/**
 * ImportHouseHoldExcel
 *
 * @author Chill
 */
@Data
@ColumnWidth(25)
@HeadRowHeight(20)
@ContentRowHeight(18)
public class ImportDoorplateExcel implements Serializable {
    private static final long serialVersionUID = 2L;
    /**
     * 地址名称
     */
    @ExcelProperty(value = "地址名称")
    private String addressName;
    /**
     * 门牌地址编码
     */
    @ExcelProperty(value = "门牌地址编码")
    private String addressCode;
    /**
     * 经度
     */
    @ExcelProperty(value = "经度")
    private String X;
    /**
     * 纬度
     */
    @ExcelProperty(value = "纬度")
    private String Y;
    /**
     * x84经度
     */
    @ExcelProperty(value = "x84经度")
    @TableField("x_84")
    private String x84;
    /**
     * y84纬度
     */
    @ExcelProperty(value = "y84纬度")
    @TableField("y_84")
    private String y84;
    /**
     * 行政区编码
     */
    @ExcelProperty(value = "行政区编码")
    private String regionCode;
    /**
     * 行政区名称
     */
    @ExcelProperty(value = "行政区名称")
    private String regionName;
    /**
     * 乡镇街道编号
     */
    @ExcelProperty(value = "乡镇街道编号")
    @TableField("town_street_code")
    private String townStreetCode;
    /**
     * 乡镇街道名称
     */
    @ExcelProperty(value = "乡镇街道名称")
    private String townStreetName;
    /**
     * 居委会(社区)编号
     */
    @ExcelProperty(value = "居委会(社区)编号")
    private String neiCode;
    /**
     * 居委会(社区)名称
     */
    @ExcelProperty(value = "居委会(社区)名称")
    private String neiName;
    /**
     * 街路巷编码
     */
    @ExcelProperty(value = "街路巷编码")
    private String streetRuCode;
    /**
     * 街路巷名称
     */
    @ExcelProperty(value = "街路巷名称")
    private String streetRuName;
    /**
     * 分局代码
     */
    @ExcelProperty(value = "分局代码")
    private String branchCode;
    /**
     * 分局名称
     */
    @ExcelProperty(value = "分局名称")
    private String branchName;
    /**
     * 派出所代码
     */
    @ExcelProperty(value = "派出所代码")
    private String localPoliceStationCode;
    /**
     * 派出所名称
     */
    @ExcelProperty(value = "派出所名称")
    private String localPoliceStationName;
    /**
     * 警务室代码
     */
    @ExcelProperty(value = "警务室代码")
    private String policeAffairsCode;
    /**
     * 警务室名称
     */
    @ExcelProperty(value = "警务室名称")
    private String policeAffairsName;
    /**
     * 单元编码
     */
    @ExcelProperty(value = "单元编码")
    private String unitCode;
    /**
     * 单元号(名称)
     */
    @ExcelProperty(value = "单元号(名称)")
    private String unitName;
    /**
     * 楼栋编码
     */
    @ExcelProperty(value = "楼栋编码")
    private String buildingCode;
    /**
     * 楼栋号(名称)
     */
    @ExcelProperty(value = "楼栋号(名称)")
    private String buildingName;
    /**
     * 户室号(名称)
     */
    @ExcelProperty(value = "户室号(名称)")
    private String houseName;
    /**
     * 楼层
     */
    @ExcelProperty(value = "楼层")
    private String floor;
    /**
     * 小区编码
     */
    @ExcelProperty(value = "小区编码")
    private String aoiCode;
    /**
     * 小区名称
     */
    @ExcelProperty(value = "小区名称")
    private String aoiName;
    /**
     * 兴趣点code
     */
    @ExcelProperty(value = "兴趣点code")
    private String poiCode;
    /**
     * 兴趣点名称
     */
    @ExcelProperty(value = "兴趣点名称")
    private String poi;
    /**
     * 地址级别
     */
    @ExcelProperty(value = "地址级别")
    private Integer addressLevel;
    /**
     * 父节点地址编码
     */
    @ExcelProperty(value = "父节点地址编码")
    private String parentAddressCode;
    /**
     * 采集照片url
     */
    @ExcelProperty(value = "采集照片url")
    private String gatPicUrl;
    /**
     * 门牌状态
     */
    @ExcelProperty(value = "门牌状态")
    private String doorplateStatus;
    /**
     * 门牌类型
     */
    @ExcelProperty(value = "门牌类型")
    private String doorplateType;
    /**
     * 门牌类型编号
     */
    @ExcelProperty(value = "门牌类型编号")
    private String doorplateTypeCode;
    /**
     * 门牌号
     */
    @ExcelProperty(value = "门牌号")
    private String doorplateNum;
    /**
     * 门牌名称
     */
    @ExcelProperty(value = "门牌名称")
    private String doorplateName;
    /**
     * 二维码路径
     */
    @ExcelProperty(value = "二维码路径")
    private String qrCodePath;
    /**
     * 子门牌号
     */
    @ExcelProperty(value = "子门牌号")
    private String subDoorPlateNo;
    /**
     * 大门名称
     */
    @ExcelProperty(value = "大门名称")
    private String gateName;
    /**
     * 操作类型
     */
    @ExcelProperty(value = "操作类型")
    private Integer operationType;
    /**
     * 地址类型
     */
    @ExcelProperty(value = "地址类型")
    private Integer addressType;
    /**
     * 子小区名称
     */
    @ExcelProperty(value = "子小区名称")
    private String subAoi;
    /**
     * 民警姓名
     */
    @ExcelProperty(value = "民警姓名")
    private String policeman;
    /**
     * 民警电话
     */
    @ExcelProperty(value = "民警电话")
    private String policemanPhone;
    /**
     * 警务网格编码
     */
    @ExcelProperty(value = "警务网格编码")
    private String jwwgCode;
}
src/main/java/org/springblade/modules/eCallEventTwo/controller/ECallEventTwoController.java
New file
@@ -0,0 +1,212 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.eCallEventTwo.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import org.springblade.common.utils.SpringUtils;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springblade.modules.eCallEventTwo.dto.EcOrderDTO;
import org.springblade.modules.eCallEventTwo.dto.EcOrderParamDTO;
import org.springblade.modules.eCallEventTwo.entity.ECallEventTwoEntity;
import org.springblade.modules.eCallEventTwo.service.EcOrderService;
import org.springblade.modules.eCallEventTwo.service.IECallEventTwoService;
import org.springblade.modules.eCallEventTwo.vo.ECallEventTwoVO;
import org.springblade.modules.eCallEventTwo.wrapper.ECallEventTwoWrapper;
import org.springblade.modules.task.entity.ECallEventEntity;
import org.springblade.modules.task.service.IECallEventService;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
/**
 * 工单 控制器
 *
 * @author BladeX
 * @since 2024-05-15
 */
@RestController
@AllArgsConstructor
@RequestMapping("blade-eCallEventTwo/eCallEventTwo")
@Api(value = "工单", tags = "工单接口")
public class ECallEventTwoController extends BladeController {
    private final IECallEventTwoService eCallEventTwoService;
    private final EcOrderService ecOrderService;
    /**
     * 工单 详情
     */
    @GetMapping("/detail")
    @ApiOperationSupport(order = 1)
    @ApiOperation(value = "详情", notes = "传入eCallEventTwo")
    public R<ECallEventTwoVO> detail(ECallEventTwoEntity eCallEventTwo) {
        ECallEventTwoEntity detail = eCallEventTwoService.getOne(Condition.getQueryWrapper(eCallEventTwo));
        return R.data(ECallEventTwoWrapper.build().entityVO(detail));
    }
    /**
     * 工单 分页
     */
    @GetMapping("/list")
    @ApiOperationSupport(order = 2)
    @ApiOperation(value = "分页", notes = "传入eCallEventTwo")
    public R<IPage<ECallEventTwoVO>> list(ECallEventTwoEntity eCallEventTwo, Query query) {
        IPage<ECallEventTwoEntity> pages = eCallEventTwoService.page(Condition.getPage(query), Condition.getQueryWrapper(eCallEventTwo));
        return R.data(ECallEventTwoWrapper.build().pageVO(pages));
    }
    /**
     * 工单 自定义分页
     */
    @GetMapping("/page")
    @ApiOperationSupport(order = 3)
    @ApiOperation(value = "分页", notes = "传入eCallEventTwo")
    public R<IPage<ECallEventTwoVO>> page(ECallEventTwoVO eCallEventTwo, Query query) {
        IPage<ECallEventTwoVO> pages = eCallEventTwoService.selectECallEventTwoPage(Condition.getPage(query), eCallEventTwo);
        return R.data(pages);
    }
    /**
     * 工单 新增
     */
    @PostMapping("/save")
    @ApiOperationSupport(order = 4)
    @ApiOperation(value = "新增", notes = "传入eCallEventTwo")
    public R save(@Valid @RequestBody ECallEventTwoVO eCallEventTwo) {
        eCallEventTwo.setCreateUserId(AuthUtil.getUserId());
        return R.status(eCallEventTwoService.saveTwo(eCallEventTwo));
    }
    /**
     * 工单 修改
     */
    @PostMapping("/update")
    @ApiOperationSupport(order = 5)
    @ApiOperation(value = "修改", notes = "传入eCallEventTwo")
    public R update(@Valid @RequestBody ECallEventTwoEntity eCallEventTwo) {
        return R.status(eCallEventTwoService.updateById(eCallEventTwo));
    }
    /**
     * 工单 新增或修改
     */
    @PostMapping("/submit")
    @ApiOperationSupport(order = 6)
    @ApiOperation(value = "新增或修改", notes = "传入eCallEventTwo")
    public R submit(@Valid @RequestBody ECallEventTwoVO eCallEventTwo) {
        return R.status(eCallEventTwoService.saveTwo(eCallEventTwo));
    }
    /**
     * 工单 删除
     */
    @PostMapping("/remove")
    @ApiOperationSupport(order = 7)
    @ApiOperation(value = "逻辑删除", notes = "传入ids")
    public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
        return R.status(eCallEventTwoService.removeBatchByIds(Func.toLongList(ids)));
    }
    /**
     * 工单 同步
     */
    @GetMapping("/synchronizeData")
    @ApiOperationSupport(order = 8)
    @ApiOperation(value = "工单 同步")
    public R synchronizeData() {
        // 创建居住证发送短信定时任务
        EcOrderParamDTO ecOrderParamDTO = new EcOrderParamDTO();
        // 获取当前日期时间
        // LocalDateTime now = LocalDateTime.now();
        // 获取前一天的开始时间
        // LocalDateTime yesterdayStart = now.minus(1, ChronoUnit.DAYS).with(LocalTime.MIN);
        // 获取前一天的结束时间
        // LocalDateTime yesterdayEnd = now.minus(1, ChronoUnit.DAYS).with(LocalTime.MAX);
        // ecOrderParamDTO.setEndTime(yesterdayEnd.format(DateUtil.DATETIME_FORMATTER));
        // ecOrderParamDTO.setStartTime(yesterdayStart.format(DateUtil.DATETIME_FORMATTER));
        boolean b = ecOrderService.SynchronizeData(ecOrderParamDTO);
        return R.status(b);
    }
    /**
     * 工单 同步
     */
    @GetMapping("/getCount")
    @ApiOperationSupport(order = 8)
    @ApiOperation(value = "工单统计")
    public R getCount( EcOrderParamDTO ecOrderParamDTO, Query query) {
        IPage<EcOrderDTO> pages = ecOrderService.getCount(Condition.getPage(query),ecOrderParamDTO);
        return  R.data(pages);
    }
    /**
     * 工单 同步
     */
    @GetMapping("/getUnitAssessmentIndicators")
    @ApiOperationSupport(order = 8)
    @ApiOperation(value = "单位考核指标")
    public R getUnitAssessmentIndicators( ) {
        List<Map<String, String>> count = ecOrderService.getUnitAssessmentIndicators();
        return R.data(count);
    }
    @GetMapping("/synchronousData")
    @ApiOperationSupport(order = 8)
    @ApiOperation(value = "E呼基本信息入录同步到新E呼即办")
    public void synchronousData() {
        IECallEventService bean = SpringUtils.getBean(IECallEventService.class);
        List<ECallEventEntity> list = bean.list(Wrappers.<ECallEventEntity>lambdaQuery().eq(ECallEventEntity::getIsDeleted, 0));
        for (ECallEventEntity eCallEventEntity : list) {
            long count = eCallEventTwoService.count(Wrappers.<ECallEventTwoEntity>lambdaQuery()
                .eq(ECallEventTwoEntity::getOrderId, eCallEventEntity.getId()));
            if (count > 0) {
                continue;
            }
            ECallEventTwoEntity eCallEventTwoEntity = new ECallEventTwoEntity();
            eCallEventTwoEntity.setLocation(eCallEventEntity.getLocation());
            eCallEventTwoEntity.setSceneGeoLat(new BigDecimal(eCallEventEntity.getLat()));
            eCallEventTwoEntity.setSceneGeoLng(new BigDecimal(eCallEventEntity.getLng()));
            eCallEventTwoEntity.setIssueContent(eCallEventEntity.getRemark());
            eCallEventTwoEntity.setIssueTitle(eCallEventEntity.getName());
            eCallEventTwoEntity.setApplicantPhone(eCallEventEntity.getPhone());
            eCallEventTwoEntity.setApplicantName(eCallEventEntity.getRealName());
            eCallEventTwoEntity.setCreateTime(eCallEventEntity.getCreateTime());
            eCallEventTwoEntity.setStatus("3");
            eCallEventTwoEntity.setIssueOrigin("0");
            eCallEventTwoEntity.setOrderId(eCallEventEntity.getId());
            eCallEventTwoService.save(eCallEventTwoEntity);
        }
    }
}
src/main/java/org/springblade/modules/eCallEventTwo/dto/ECallEventTwoDTO.java
New file
@@ -0,0 +1,34 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.eCallEventTwo.dto;
import org.springblade.modules.eCallEventTwo.entity.ECallEventTwoEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
 * 工单 数据传输对象实体类
 *
 * @author BladeX
 * @since 2024-05-15
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class ECallEventTwoDTO extends ECallEventTwoEntity {
    private static final long serialVersionUID = 1L;
}
src/main/java/org/springblade/modules/eCallEventTwo/dto/EcDispatchDTO.java
New file
@@ -0,0 +1,32 @@
package org.springblade.modules.eCallEventTwo.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springblade.modules.eCallEventTwo.entity.EcDispatch;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
/**
 * 派发单对象 ec_dispatch
 *
 * @author ${context.author}
 * @date 2024-05-28 14:42:26
 */
@ApiModel(value = "EcDispatchDTO对象")
@Data
public class EcDispatchDTO extends EcDispatch {
    @ApiModelProperty(value = "开始时间", example = "")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime startTime;
    @ApiModelProperty(value = "结束时间", example = "")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endTime;
}
src/main/java/org/springblade/modules/eCallEventTwo/dto/EcHandleDTO.java
New file
@@ -0,0 +1,48 @@
package org.springblade.modules.eCallEventTwo.dto;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springblade.modules.eCallEventTwo.entity.EcHandle;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
/**
 * 办理单对象 ec_handle
 *
 * @author ${context.author}
 * @date 2024-05-28 14:42:26
 */
@ApiModel(value = "EcHandleDTO对象")
@Data
public class EcHandleDTO extends EcHandle {
    @ApiModelProperty(value = "开始时间", example = "")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime startTime;
    @ApiModelProperty(value = "结束时间", example = "")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endTime;
    @ApiModelProperty(value = "调度单位", example = "")
    private String subjectOrgCode;
    @ApiModelProperty(value = "调度单位名称", example = "")
    private String subjectOrgName;
    @ApiModelProperty(value = "主办单位", example = "")
    private String sinkOrgCode;
    @ApiModelProperty(value = "主办单位名称", example = "")
    private String sinkOrgName;
    @ApiModelProperty(value = "是否主办(Y/N)", example = "")
    private String tagMain;
}
src/main/java/org/springblade/modules/eCallEventTwo/dto/EcOrderCheckDTO.java
New file
@@ -0,0 +1,47 @@
package org.springblade.modules.eCallEventTwo.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springblade.modules.eCallEventTwo.entity.EcOrderCheck;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
/**
 * 回访单对象 ec_order_check
 *
 * @author ${context.author}
 * @date 2024-05-28 14:42:26
 */
@ApiModel(value = "EcOrderCheckDTO对象")
@Data
public class EcOrderCheckDTO extends EcOrderCheck {
    @ApiModelProperty(value = "开始时间", example = "")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime startTime;
    @ApiModelProperty(value = "结束时间", example = "")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endTime;
    @ApiModelProperty(value = "调度单位", example = "")
    private String subjectOrgCode;
    @ApiModelProperty(value = "调度单位名称", example = "")
    private String subjectOrgName;
    @ApiModelProperty(value = "主办单位", example = "")
    private String sinkOrgCode;
    @ApiModelProperty(value = "主办单位名称", example = "")
    private String sinkOrgName;
    @ApiModelProperty(value = "是否主办(Y/N)", example = "")
    private String tagMain;
}
src/main/java/org/springblade/modules/eCallEventTwo/dto/EcOrderDTO.java
New file
@@ -0,0 +1,64 @@
package org.springblade.modules.eCallEventTwo.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springblade.modules.eCallEventTwo.entity.EcOrder;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
/**
 * 工单对象 ec_order
 *
 * @author ${context.author}
 * @date 2024-05-27 16:26:59
 */
@ApiModel(value = "EcOrderDTO对象")
@Data
public class EcOrderDTO extends EcOrder {
    @ApiModelProperty(value = "开始时间", example = "")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime startTime;
    @ApiModelProperty(value = "结束时间", example = "")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endTime;
    @ApiModelProperty(value = "调度单位", example = "")
    private String subjectOrgCode;
    @ApiModelProperty(value = "调度单位名称", example = "")
    private String subjectOrgName;
    @ApiModelProperty(value = "主办单位", example = "")
    private String sinkOrgCode;
    @ApiModelProperty(value = "主办单位", example = "")
    private String sinkOrgName;
    @ApiModelProperty(value = "是否主办(Y/N)", example = "")
    private String tagMain;
    private String orderNumber;
    private String dispatchRate;
    private String dispatchNumber;
    private String handRate;
    private String checkRate;
    private String doneRate;
    private String respRate;
    private String reviewRate;
    private String superviseNumber;
    private String orgCode;
    private String orgName;
}
src/main/java/org/springblade/modules/eCallEventTwo/dto/EcOrderDoneDTO.java
New file
@@ -0,0 +1,47 @@
package org.springblade.modules.eCallEventTwo.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springblade.modules.eCallEventTwo.entity.EcOrderDone;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
/**
 * 办结单对象 ec_order_done
 *
 * @author ${context.author}
 * @date 2024-05-28 14:42:26
 */
@ApiModel(value = "EcOrderDoneDTO对象")
@Data
public class EcOrderDoneDTO extends EcOrderDone {
    @ApiModelProperty(value = "开始时间", example = "")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime startTime;
    @ApiModelProperty(value = "结束时间", example = "")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endTime;
    @ApiModelProperty(value = "调度单位", example = "")
    private String subjectOrgCode;
    @ApiModelProperty(value = "调度单位名称", example = "")
    private String subjectOrgName;
    @ApiModelProperty(value = "主办单位", example = "")
    private String sinkOrgCode;
    @ApiModelProperty(value = "主办单位名称", example = "")
    private String sinkOrgName;
    @ApiModelProperty(value = "是否主办(Y/N)", example = "")
    private String tagMain;
}
src/main/java/org/springblade/modules/eCallEventTwo/dto/EcOrderParamDTO.java
New file
@@ -0,0 +1,42 @@
package org.springblade.modules.eCallEventTwo.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
@ApiModel(value = "EcOrderParamDTO参数")
@Data
public class EcOrderParamDTO {
    @ApiModelProperty(value = "开始时间", example = "")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private String startTime;
    @ApiModelProperty(value = "结束时间", example = "")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private String endTime;
    @ApiModelProperty(value = "调度单位", example = "")
    private String subjectOrgCode;
    @ApiModelProperty(value = "调度单位名称", example = "")
    private String subjectOrgName;
    @ApiModelProperty(value = "主办单位", example = "")
    private String sinkOrgCode;
    @ApiModelProperty(value = "主办单位名称", example = "")
    private String sinkOrgName;
    @ApiModelProperty(value = "是否主办(Y/N)", example = "")
    private String tagMain;
    @ApiModelProperty(value = "是否主办(1/2)", example = "")
    private Integer mainFlag;
}
src/main/java/org/springblade/modules/eCallEventTwo/dto/EcOrderRespDTO.java
New file
@@ -0,0 +1,47 @@
package org.springblade.modules.eCallEventTwo.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springblade.modules.eCallEventTwo.entity.EcOrderResp;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
/**
 * 答复单对象 ec_order_resp
 *
 * @author ${context.author}
 * @date 2024-05-28 14:42:26
 */
@ApiModel(value = "EcOrderRespDTO对象")
@Data
public class EcOrderRespDTO extends EcOrderResp {
    @ApiModelProperty(value = "开始时间", example = "")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime startTime;
    @ApiModelProperty(value = "结束时间", example = "")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endTime;
    @ApiModelProperty(value = "调度单位", example = "")
    private String subjectOrgCode;
    @ApiModelProperty(value = "调度单位名称", example = "")
    private String subjectOrgName;
    @ApiModelProperty(value = "主办单位", example = "")
    private String sinkOrgCode;
    @ApiModelProperty(value = "主办单位名称", example = "")
    private String sinkOrgName;
    @ApiModelProperty(value = "是否主办(Y/N)", example = "")
    private String tagMain;
}
src/main/java/org/springblade/modules/eCallEventTwo/dto/EcOrderReviewDTO.java
New file
@@ -0,0 +1,47 @@
package org.springblade.modules.eCallEventTwo.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springblade.modules.eCallEventTwo.entity.EcOrderReview;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
/**
 * 核实单对象 ec_order_review
 *
 * @author ${context.author}
 * @date 2024-05-28 14:42:26
 */
@ApiModel(value = "EcOrderReviewDTO对象")
@Data
public class EcOrderReviewDTO extends EcOrderReview {
    @ApiModelProperty(value = "开始时间", example = "")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime startTime;
    @ApiModelProperty(value = "结束时间", example = "")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endTime;
    @ApiModelProperty(value = "调度单位", example = "")
    private String subjectOrgCode;
    @ApiModelProperty(value = "调度单位名称", example = "")
    private String subjectOrgName;
    @ApiModelProperty(value = "主办单位", example = "")
    private String sinkOrgCode;
    @ApiModelProperty(value = "主办单位名称", example = "")
    private String sinkOrgName;
    @ApiModelProperty(value = "是否主办(Y/N)", example = "")
    private String tagMain;
}
src/main/java/org/springblade/modules/eCallEventTwo/dto/EcOrderSuperviseDTO.java
New file
@@ -0,0 +1,47 @@
package org.springblade.modules.eCallEventTwo.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springblade.modules.eCallEventTwo.entity.EcOrderSupervise;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
/**
 * 督办单对象 ec_order_supervise
 *
 * @author ${context.author}
 * @date 2024-05-28 14:42:26
 */
@ApiModel(value = "EcOrderSuperviseDTO对象")
@Data
public class EcOrderSuperviseDTO extends EcOrderSupervise {
    @ApiModelProperty(value = "开始时间", example = "")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime startTime;
    @ApiModelProperty(value = "结束时间", example = "")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endTime;
    @ApiModelProperty(value = "调度单位", example = "")
    private String subjectOrgCode;
    @ApiModelProperty(value = "调度单位名称", example = "")
    private String subjectOrgName;
    @ApiModelProperty(value = "主办单位", example = "")
    private String sinkOrgCode;
    @ApiModelProperty(value = "主办单位名称", example = "")
    private String sinkOrgName;
    @ApiModelProperty(value = "是否主办(Y/N)", example = "")
    private String tagMain;
}
src/main/java/org/springblade/modules/eCallEventTwo/entity/ECallEventTwoEntity.java
New file
@@ -0,0 +1,300 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.eCallEventTwo.entity;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
import org.springframework.format.annotation.DateTimeFormat;
import java.math.BigDecimal;
import java.util.Date;
/**
 * 工单 实体类
 *
 * @author BladeX
 * @since 2024-05-15
 */
@Data
@TableName("jczz_e_call_event_two")
@ApiModel(value = "ECallEventTwo对象", description = "工单")
public class ECallEventTwoEntity   {
    private static final long serialVersionUID = 1L;
    /**
     * 工单ID
     */
    @ApiModelProperty(value = "主键ID", example = "")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;
    /** 工单ID */
    @ApiModelProperty(value = "orderId", example = "")
    @TableField(value = "order_id")
    private Long orderId;
    /** 工单号/话务单号 */
    @ApiModelProperty(value = "工单号/话务单号", example = "")
    @TableField("order_code")
    private String orderCode;
    /** 诉求来源(0热线 1公安110 2微信 3微博) */
    @ApiModelProperty(value = "诉求来源(0热线 1公安110 2微信 3微博)", example = "")
    @TableField("issue_origin")
    private String issueOrigin;
    /** 诉求主题 */
    @ApiModelProperty(value = "诉求主题", example = "")
    @TableField("issue_title")
    private String issueTitle;
    /** 诉求内容 */
    @ApiModelProperty(value = "诉求内容", example = "")
    @TableField("issue_content")
    private String issueContent;
    /** 诉求用户类别(0个人 1企业) */
    @ApiModelProperty(value = "诉求用户类别(0个人 1企业)", example = "")
    @TableField("applicant_type")
    private String applicantType;
    /** 诉求人姓名 */
    @ApiModelProperty(value = "诉求人姓名", example = "")
    @TableField("applicant_name")
    private String applicantName;
    /** 诉求人性别(0男 1女) */
    @ApiModelProperty(value = "诉求人性别(0男 1女)", example = "")
    @TableField("applicant_gender")
    private String applicantGender;
    /** 诉求人住址 */
    @ApiModelProperty(value = "诉求人住址", example = "")
    @TableField("applicant_homeaddr")
    private String applicantHomeaddr;
    /** 现场联系电话 */
    @ApiModelProperty(value = "现场联系电话", example = "")
    @TableField("applicant_phone")
    private String applicantPhone;
    /** 网格 */
    @ApiModelProperty(value = "网格", example = "")
    @TableField("applicant_grid")
    private String applicantGrid;
    /** 诉求人行政区划 */
    @ApiModelProperty(value = "诉求人行政区划", example = "")
    @TableField("applicant_district")
    private String applicantDistrict;
    /** 事发地址 */
    @ApiModelProperty(value = "事发地址", example = "")
    @TableField("scene_addr")
    private String sceneAddr;
    /** 事发地址网格 */
    @ApiModelProperty(value = "事发地址网格", example = "")
    @TableField("scene_addr_grid")
    private String sceneAddrGrid;
    /** 事发所属行政区划 */
    @ApiModelProperty(value = "事发所属行政区划", example = "")
    @TableField("scene_district")
    private String sceneDistrict;
    /** 事发场所 */
    @ApiModelProperty(value = "事发场所", example = "")
    @TableField("scene_place")
    private String scenePlace;
    /** 事发地点-经度 */
    @ApiModelProperty(value = "事发地点-经度", example = "")
    @TableField("scene_geo_lat")
    private BigDecimal sceneGeoLat;
    /** 事发地点-维度 */
    @ApiModelProperty(value = "事发地点-维度", example = "")
    @TableField("scene_geo_lng")
    private BigDecimal sceneGeoLng;
    /** 是否保密 */
    @ApiModelProperty(value = "是否保密", example = "")
    @TableField("is_secret")
    private String isSecret;
    /** 是否重复 */
    @ApiModelProperty(value = "是否重复", example = "")
    @TableField("is_repeat")
    private String isRepeat;
    /** 诉求类别(咨询、投诉、求助、举报、建议) */
    @ApiModelProperty(value = "诉求类别(咨询、投诉、求助、举报、建议)", example = "")
    @TableField("issue_type")
    private String issueType;
    /** 归口类型-多级 */
    @ApiModelProperty(value = "归口类型-多级", example = "")
    @TableField("issue_clazz")
    private String issueClazz;
    /** 紧急程度(一般、即办) */
    @ApiModelProperty(value = "紧急程度(一般、即办)", example = "")
    @TableField("issue_level")
    private String issueLevel;
    /** 办理时限(分钟) */
    @ApiModelProperty(value = "办理时限(分钟)", example = "")
    @TableField("deadline")
    private Integer deadline;
    /** 关联工单ID */
    @ApiModelProperty(value = "关联工单ID", example = "")
    @TableField("link_orders")
    private String linkOrders;
    /** 关联工单号 */
    @ApiModelProperty(value = "关联工单号", example = "")
    @TableField("link_orders_code")
    private String linkOrdersCode;
    /** 知识引用 */
    @ApiModelProperty(value = "知识引用", example = "")
    @TableField("wiki_ref")
    private String wikiRef;
    /** 受理单位 */
    @ApiModelProperty(value = "受理单位", example = "")
    @TableField("acpt_org_code")
    private String acptOrgCode;
    /** 受理单位 */
    @ApiModelProperty(value = "受理单位", example = "")
    @TableField("acpt_org_name")
    private String acptOrgName;
    /** 处办方式 */
    @ApiModelProperty(value = "处办方式", example = "")
    @TableField("handle_way")
    private String handleWay;
    /** 外部处办方式 */
    @ApiModelProperty(value = "外部处办方式", example = "")
    @TableField("external_handle_way")
    private String externalHandleWay;
    /** 直接答复内容 */
    @ApiModelProperty(value = "直接答复内容", example = "")
    @TableField("direct_feed")
    private String directFeed;
    /** 直接答复人员 */
    @ApiModelProperty(value = "直接答复人员", example = "")
    @TableField("direct_feed_handler")
    private String directFeedHandler;
    /** 直接答复时间 */
    @ApiModelProperty(value = "直接答复时间", example = "")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @TableField("direct_feed_time")
    private Date directFeedTime;
    /** 工单附件 */
    @ApiModelProperty(value = "工单附件", example = "")
    @TableField("images")
    private String images;
    /** 工单状态(0受理 1处理中 2已归档) */
    @ApiModelProperty(value = "工单状态(0受理 1处理中 2已归档)", example = "")
    @TableField("status")
    private String status;
    /** 交办标签(N未交办 Y已交办 R已退回) */
    @ApiModelProperty(value = "交办标签(N未交办 Y已交办 R已退回)", example = "")
    @TableField("tag_apply")
    private String tagApply;
    /** 已延期(Y/N) */
    @ApiModelProperty(value = "已延期(Y/N)", example = "")
    @TableField("tag_delay")
    private String tagDelay;
    /** 已反馈(Y/N) */
    @ApiModelProperty(value = "已反馈(Y/N)", example = "")
    @TableField("tag_doing")
    private String tagDoing;
    /** 已答复(Y/N) */
    @ApiModelProperty(value = "已答复(Y/N)", example = "")
    @TableField("tag_resp")
    private String tagResp;
    /** 已办结(Y/N) */
    @ApiModelProperty(value = "已办结(Y/N)", example = "")
    @TableField("tag_done")
    private String tagDone;
    /** 已回访(Y/N) */
    @ApiModelProperty(value = "已回访(Y/N)", example = "")
    @TableField("tag_check")
    private String tagCheck;
    /** 已电话回访(Y/N) */
    @ApiModelProperty(value = "已电话回访(Y/N)", example = "")
    @TableField("tag_chk_tel")
    private String tagChkTel;
    /** 核实/督办(N1/N2) */
    @ApiModelProperty(value = "核实/督办(N1/N2)", example = "")
    @TableField("tag_redo")
    private String tagRedo;
    @ApiModelProperty(value = "定位地址", example = "")
    @TableField("location")
    private String location;
    @ApiModelProperty(value = "创建人", example = "")
    @TableField("create_user_id")
    private Long createUserId;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private Date createTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(value = "update_time",fill = FieldFill.UPDATE)
    private Date updateTime;
    /**
     * 网格编号
     */
    @ApiModelProperty(value = "网格编号")
    @TableField("grid_code")
    private String gridCode;
    /**
     * 警务网格编号
     */
    @ApiModelProperty(value = "警务网格编号")
    @TableField("jw_grid_code")
    private String jwGridCode;
}
src/main/java/org/springblade/modules/eCallEventTwo/entity/EcDispatch.java
New file
@@ -0,0 +1,261 @@
package org.springblade.modules.eCallEventTwo.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
 * 派发单对象 ec_dispatch
 *
 * @author ${context.author}
 * @date 2024-05-28 14:42:26
 */
@ApiModel(value = "EcDispatch对象", description = "派发单")
@Data
@TableName("ec_dispatch")
public class EcDispatch implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * 派发ID
     */
    @ApiModelProperty(value = "主键ID", example = "")
    @TableId(value = "dispatch_id", type = IdType.AUTO)
    private Long dispatchId;
    /**
     * 工单ID
     */
    @ApiModelProperty(value = "工单ID", example = "")
    @TableField("order_id")
    private Long orderId;
    /**
     * 派发单号
     */
    @ApiModelProperty(value = "派发单号", example = "")
    @TableField("dispatch_code")
    private String dispatchCode;
    /**
     * 派发时间
     */
    @ApiModelProperty(value = "派发时间", example = "")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField("dispatch_time")
    private Date dispatchTime;
    /**
     * 派发意见
     */
    @ApiModelProperty(value = "派发意见", example = "")
    @TableField("dispatch_note")
    private String dispatchNote;
    /**
     * 派发附件
     */
    @ApiModelProperty(value = "派发附件", example = "")
    @TableField("dispatch_images")
    private String dispatchImages;
    /**
     * 派出单位
     */
    @ApiModelProperty(value = "派出单位", example = "")
    @TableField("subject_org_code")
    private String subjectOrgCode;
    /**
     * 派出单位
     */
    @ApiModelProperty(value = "派出单位", example = "")
    @TableField("subject_org_name")
    private String subjectOrgName;
    /**
     * 派出人员
     */
    @ApiModelProperty(value = "派出人员", example = "")
    @TableField("subject_user_name")
    private String subjectUserName;
    /**
     * 派出人员
     */
    @ApiModelProperty(value = "派出人员", example = "")
    @TableField("subject_user_cnname")
    private String subjectUserCnname;
    /**
     * 派发目标单位
     */
    @ApiModelProperty(value = "派发目标单位", example = "")
    @TableField("object_org_code")
    private String objectOrgCode;
    /**
     * 派发目标单位
     */
    @ApiModelProperty(value = "派发目标单位", example = "")
    @TableField("object_org_name")
    private String objectOrgName;
    /**
     * 实际接收单位(含抄送)
     */
    @ApiModelProperty(value = "实际接收单位(含抄送)", example = "")
    @TableField("sink_org_code")
    private String sinkOrgCode;
    /**
     * 实际接收单位(含抄送)
     */
    @ApiModelProperty(value = "实际接收单位(含抄送)", example = "")
    @TableField("sink_org_name")
    private String sinkOrgName;
    /**
     * 是否主办(Y/N)
     */
    @ApiModelProperty(value = "是否主办(Y/N)", example = "")
    @TableField("tag_main")
    private String tagMain;
    /**
     * 是否抄送(Y/N)
     */
    @ApiModelProperty(value = "是否抄送(Y/N)", example = "")
    @TableField("tag_cc")
    private String tagCc;
    /**
     * 话务送审(Y/N)
     */
    @ApiModelProperty(value = "话务送审(Y/N)", example = "")
    @TableField("tag_cti")
    private String tagCti;
    /**
     * 联指派发联指(Y/N)
     */
    @ApiModelProperty(value = "联指派发联指(Y/N)", example = "")
    @TableField("tag_trans")
    private String tagTrans;
    /**
     * 前序派发单
     */
    @ApiModelProperty(value = "前序派发单", example = "")
    @TableField("up_dispatch_id")
    private Long upDispatchId;
    /**
     * 签收单位
     */
    @ApiModelProperty(value = "签收单位", example = "")
    @TableField("ack_org_code")
    private String ackOrgCode;
    /**
     * 签收单位
     */
    @ApiModelProperty(value = "签收单位", example = "")
    @TableField("ack_org_name")
    private String ackOrgName;
    /**
     * 签收人员
     */
    @ApiModelProperty(value = "签收人员", example = "")
    @TableField("ack_user_name")
    private String ackUserName;
    /**
     * 签收人员
     */
    @ApiModelProperty(value = "签收人员", example = "")
    @TableField("ack_user_cnname")
    private String ackUserCnname;
    /**
     * 签收时间
     */
    @ApiModelProperty(value = "签收时间", example = "")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField("ack_time")
    private Date ackTime;
    /**
     * 退回人员
     */
    @ApiModelProperty(value = "退回人员", example = "")
    @TableField("reject_user_name")
    private String rejectUserName;
    /**
     * 退回人员
     */
    @ApiModelProperty(value = "退回人员", example = "")
    @TableField("reject_user_cnname")
    private String rejectUserCnname;
    /**
     * 退回单位
     */
    @ApiModelProperty(value = "退回单位", example = "")
    @TableField("reject_org_code")
    private String rejectOrgCode;
    /**
     * 退回单位
     */
    @ApiModelProperty(value = "退回单位", example = "")
    @TableField("reject_org_name")
    private String rejectOrgName;
    /**
     * 退回时间
     */
    @ApiModelProperty(value = "退回时间", example = "")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField("reject_time")
    private Date rejectTime;
    /**
     * 退回意见
     */
    @ApiModelProperty(value = "退回意见", example = "")
    @TableField("reject_note")
    private String rejectNote;
    /**
     * 退回附件
     */
    @ApiModelProperty(value = "退回附件", example = "")
    @TableField("reject_images")
    private String rejectImages;
    /**
     * 是否退回(Y/N)
     */
    @ApiModelProperty(value = "是否退回(Y/N)", example = "")
    @TableField("tag_reject")
    private String tagReject;
    /**
     * 退回类型(0退回 1改派)
     */
    @ApiModelProperty(value = "退回类型(0退回 1改派)", example = "")
    @TableField("reject_type")
    private String rejectType;
}
src/main/java/org/springblade/modules/eCallEventTwo/entity/EcHandle.java
New file
@@ -0,0 +1,123 @@
package org.springblade.modules.eCallEventTwo.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
 * 办理单对象 ec_handle
 *
 * @author ${context.author}
 * @date 2024-05-28 14:42:26
 */
@ApiModel(value = "EcHandle对象" , description = "办理单")
@Data
@TableName("ec_handle")
public class EcHandle implements Serializable
{
    private static final long serialVersionUID = 1L;
    /** 办理单ID */
    @ApiModelProperty(value = "主键ID", example = "")
    @TableId(value = "handle_id", type = IdType.AUTO)
    private Long handleId;
    /** 工单ID */
    @ApiModelProperty(value = "工单ID", example = "")
    @TableField("order_id")
    private Long orderId;
    /** 派发单ID */
    @ApiModelProperty(value = "派发单ID", example = "")
    @TableField("dispatch_id")
    private Long dispatchId;
    /** 办理单号 */
    @ApiModelProperty(value = "办理单号", example = "")
    @TableField("handle_code")
    private String handleCode;
    /** 办理单位 */
    @ApiModelProperty(value = "办理单位", example = "")
    @TableField("hdl_org_code")
    private String hdlOrgCode;
    /** 办理单位 */
    @ApiModelProperty(value = "办理单位", example = "")
    @TableField("hdl_org_name")
    private String hdlOrgName;
    /** 到达现场地点 */
    @ApiModelProperty(value = "到达现场地点", example = "")
    @TableField("arrive_loc")
    private String arriveLoc;
    /** 到达现场地点-经度 */
    @ApiModelProperty(value = "到达现场地点-经度", example = "")
    @TableField("arrive_loc_lat")
    private BigDecimal arriveLocLat;
    /** 到达现场地点-维度 */
    @ApiModelProperty(value = "到达现场地点-维度", example = "")
    @TableField("arrive_loc_lng")
    private BigDecimal arriveLocLng;
    /** 到达现场时间 */
    @ApiModelProperty(value = "到达现场时间", example = "")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField("arrive_biz_time")
    private Date arriveBizTime;
    /** 远程处置时间 */
    @ApiModelProperty(value = "远程处置时间", example = "")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField("remote_hdl_time")
    private Date remoteHdlTime;
    /** 远程处置说明 */
    @ApiModelProperty(value = "远程处置说明", example = "")
    @TableField("remote_hdl_note")
    private String remoteHdlNote;
    /** 远程处置附件 */
    @ApiModelProperty(value = "远程处置附件", example = "")
    @TableField("remote_hdl_images")
    private String remoteHdlImages;
    /** 未规范处置说明 */
    @ApiModelProperty(value = "未规范处置说明", example = "")
    @TableField("nosop_hdl_note")
    private String nosopHdlNote;
    /** 未规范处置附件 */
    @ApiModelProperty(value = "未规范处置附件", example = "")
    @TableField("nosop_hdl_images")
    private String nosopHdlImages;
    /** 截止日期 */
    @ApiModelProperty(value = "截止日期", example = "")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField("limit_time")
    private Date limitTime;
    /** 延期后截止日期 */
    @ApiModelProperty(value = "延期后截止日期", example = "")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField("delay_time")
    private Date delayTime;
    /** 已反馈(Y/N) */
    @ApiModelProperty(value = "已反馈(Y/N)", example = "")
    @TableField("tag_hdl_doing")
    private String tagHdlDoing;
}
src/main/java/org/springblade/modules/eCallEventTwo/entity/EcOrder.java
New file
@@ -0,0 +1,392 @@
package org.springblade.modules.eCallEventTwo.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
 * 工单对象 ec_order
 *
 * @author ${context.author}
 * @date 2024-05-27 16:26:59
 */
@ApiModel(value = "EcOrder对象", description = "工单")
@Data
@TableName("ec_order")
public class EcOrder implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * 工单ID
     */
    @ApiModelProperty(value = "主键ID", example = "")
    @TableId(value = "order_id", type = IdType.AUTO)
    private Long orderId;
    /**
     * 工单号/话务单号
     */
    @ApiModelProperty(value = "工单号/话务单号", example = "")
    @TableField("order_code")
    private String orderCode;
    /**
     * 诉求来源(0热线 1公安110 2微信 3微博)
     */
    @ApiModelProperty(value = "诉求来源(0热线 1公安110 2微信 3微博)", example = "")
    @TableField("issue_origin")
    private String issueOrigin;
    /**
     * 诉求主题
     */
    @ApiModelProperty(value = "诉求主题", example = "")
    @TableField("issue_title")
    private String issueTitle;
    /**
     * 诉求内容
     */
    @ApiModelProperty(value = "诉求内容", example = "")
    @TableField("issue_content")
    private String issueContent;
    /**
     * 诉求用户类别(0个人 1企业)
     */
    @ApiModelProperty(value = "诉求用户类别(0个人 1企业)", example = "")
    @TableField("applicant_type")
    private String applicantType;
    /**
     * 诉求人姓名
     */
    @ApiModelProperty(value = "诉求人姓名", example = "")
    @TableField("applicant_name")
    private String applicantName;
    /**
     * 诉求人性别(0男 1女)
     */
    @ApiModelProperty(value = "诉求人性别(0男 1女)", example = "")
    @TableField("applicant_gender")
    private String applicantGender;
    /**
     * 诉求人住址
     */
    @ApiModelProperty(value = "诉求人住址", example = "")
    @TableField("applicant_homeaddr")
    private String applicantHomeaddr;
    /**
     * 现场联系电话
     */
    @ApiModelProperty(value = "现场联系电话", example = "")
    @TableField("applicant_phone")
    private String applicantPhone;
    /**
     * 网格
     */
    @ApiModelProperty(value = "网格", example = "")
    @TableField("applicant_grid")
    private String applicantGrid;
    /**
     * 诉求人行政区划
     */
    @ApiModelProperty(value = "诉求人行政区划", example = "")
    @TableField("applicant_district")
    private String applicantDistrict;
    /**
     * 事发地址
     */
    @ApiModelProperty(value = "事发地址", example = "")
    @TableField("scene_addr")
    private String sceneAddr;
    /**
     * 事发地址网格
     */
    @ApiModelProperty(value = "事发地址网格", example = "")
    @TableField("scene_addr_grid")
    private String sceneAddrGrid;
    /**
     * 事发所属行政区划
     */
    @ApiModelProperty(value = "事发所属行政区划", example = "")
    @TableField("scene_district")
    private String sceneDistrict;
    /**
     * 事发场所
     */
    @ApiModelProperty(value = "事发场所", example = "")
    @TableField("scene_place")
    private String scenePlace;
    /**
     * 事发地点-经度
     */
    @ApiModelProperty(value = "事发地点-经度", example = "")
    @TableField("scene_geo_lat")
    private BigDecimal sceneGeoLat;
    /**
     * 事发地点-维度
     */
    @ApiModelProperty(value = "事发地点-维度", example = "")
    @TableField("scene_geo_lng")
    private BigDecimal sceneGeoLng;
    /**
     * 事发地址(App校正)
     */
    @ApiModelProperty(value = "事发地址(App校正)", example = "")
    @TableField("scene_addr_cor")
    private String sceneAddrCor;
    /**
     * 事发地点-经度(App校正)
     */
    @ApiModelProperty(value = "事发地点-经度(App校正)", example = "")
    @TableField("scene_geo_lat_cor")
    private BigDecimal sceneGeoLatCor;
    /**
     * 事发地点-维度(App校正)
     */
    @ApiModelProperty(value = "事发地点-维度(App校正)", example = "")
    @TableField("scene_geo_lng_cor")
    private BigDecimal sceneGeoLngCor;
    /**
     * 是否保密
     */
    @ApiModelProperty(value = "是否保密", example = "")
    @TableField("is_secret")
    private String isSecret;
    /**
     * 是否重复
     */
    @ApiModelProperty(value = "是否重复", example = "")
    @TableField("is_repeat")
    private String isRepeat;
    /**
     * 诉求类别(咨询、投诉、求助、举报、建议)
     */
    @ApiModelProperty(value = "诉求类别(咨询、投诉、求助、举报、建议)", example = "")
    @TableField("issue_type")
    private String issueType;
    /**
     * 归口类型-多级
     */
    @ApiModelProperty(value = "归口类型-多级", example = "")
    @TableField("issue_clazz")
    private String issueClazz;
    /**
     * 紧急程度(一般、即办)
     */
    @ApiModelProperty(value = "紧急程度(一般、即办)", example = "")
    @TableField("issue_level")
    private String issueLevel;
    /**
     * 办理时限(分钟)
     */
    @ApiModelProperty(value = "办理时限(分钟)", example = "")
    @TableField("deadline")
    private Integer deadline;
    /**
     * 关联工单ID
     */
    @ApiModelProperty(value = "关联工单ID", example = "")
    @TableField("link_orders")
    private String linkOrders;
    /**
     * 关联工单号
     */
    @ApiModelProperty(value = "关联工单号", example = "")
    @TableField("link_orders_code")
    private String linkOrdersCode;
    /**
     * 知识引用
     */
    @ApiModelProperty(value = "知识引用", example = "")
    @TableField("wiki_ref")
    private String wikiRef;
    /**
     * 受理单位
     */
    @ApiModelProperty(value = "受理单位", example = "")
    @TableField("acpt_org_code")
    private String acptOrgCode;
    /**
     * 受理单位
     */
    @ApiModelProperty(value = "受理单位", example = "")
    @TableField("acpt_org_name")
    private String acptOrgName;
    /**
     * 处办方式
     */
    @ApiModelProperty(value = "处办方式", example = "")
    @TableField("handle_way")
    private String handleWay;
    /**
     * 外部处办方式
     */
    @ApiModelProperty(value = "外部处办方式", example = "")
    @TableField("external_handle_way")
    private String externalHandleWay;
    /**
     * 直接答复内容
     */
    @ApiModelProperty(value = "直接答复内容", example = "")
    @TableField("direct_feed")
    private String directFeed;
    /**
     * 直接答复人员
     */
    @ApiModelProperty(value = "直接答复人员", example = "")
    @TableField("direct_feed_handler")
    private String directFeedHandler;
    /**
     * 直接答复时间
     */
    @ApiModelProperty(value = "直接答复时间", example = "")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField("direct_feed_time")
    private Date directFeedTime;
    /**
     * 工单附件
     */
    @ApiModelProperty(value = "工单附件", example = "")
    @TableField("images")
    private String images;
    /**
     * 有效工单(Y/N)
     */
    @ApiModelProperty(value = "有效工单(Y/N)", example = "")
    @TableField("flag_vaild")
    private String flagVaild;
    /**
     * 无效说明
     */
    @ApiModelProperty(value = "无效说明", example = "")
    @TableField("invalid_note")
    private String invalidNote;
    /**
     * 无效设置时间
     */
    @ApiModelProperty(value = "无效设置时间", example = "")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField("invalid_time")
    private Date invalidTime;
    /**
     * 无效设置人员
     */
    @ApiModelProperty(value = "无效设置人员", example = "")
    @TableField("invalid_user_name")
    private String invalidUserName;
    /**
     * 工单状态(0受理 1处理中 2已归档)
     */
    @ApiModelProperty(value = "工单状态(0受理 1处理中 2已归档)", example = "")
    @TableField("status")
    private String status;
    /**
     * 交办标签(N未交办 Y已交办 R已退回)
     */
    @ApiModelProperty(value = "交办标签(N未交办 Y已交办 R已退回)", example = "")
    @TableField("tag_apply")
    private String tagApply;
    /**
     * 已延期(Y/N)
     */
    @ApiModelProperty(value = "已延期(Y/N)", example = "")
    @TableField("tag_delay")
    private String tagDelay;
    /**
     * 已反馈(Y/N)
     */
    @ApiModelProperty(value = "已反馈(Y/N)", example = "")
    @TableField("tag_doing")
    private String tagDoing;
    /**
     * 已答复(Y/N)
     */
    @ApiModelProperty(value = "已答复(Y/N)", example = "")
    @TableField("tag_resp")
    private String tagResp;
    /**
     * 已办结(Y/N)
     */
    @ApiModelProperty(value = "已办结(Y/N)", example = "")
    @TableField("tag_done")
    private String tagDone;
    /**
     * 已回访(Y/N)
     */
    @ApiModelProperty(value = "已回访(Y/N)", example = "")
    @TableField("tag_check")
    private String tagCheck;
    /**
     * 已电话回访(Y/N)
     */
    @ApiModelProperty(value = "已电话回访(Y/N)", example = "")
    @TableField("tag_chk_tel")
    private String tagChkTel;
    /**
     * 核实/督办(N1/N2)
     */
    @ApiModelProperty(value = "核实/督办(N1/N2)", example = "")
    @TableField("tag_redo")
    private String tagRedo;
    @ApiModelProperty(value = "导入时间", example = "")
    @TableField("import_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date importTime;
}
src/main/java/org/springblade/modules/eCallEventTwo/entity/EcOrderCheck.java
New file
@@ -0,0 +1,60 @@
package org.springblade.modules.eCallEventTwo.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
 * 回访单对象 ec_order_check
 *
 * @author ${context.author}
 * @date 2024-05-28 14:42:26
 */
@ApiModel(value = "EcOrderCheck对象" , description = "回访单")
@Data
@TableName("ec_order_check")
public class EcOrderCheck implements Serializable
{
    private static final long serialVersionUID = 1L;
    /** 工单ID */
    @ApiModelProperty(value = "主键ID", example = "")
    @TableId(value = "order_id", type = IdType.ASSIGN_ID)
    private Long orderId;
    /** 回访单号 */
    @ApiModelProperty(value = "回访单号", example = "")
    @TableField("check_code")
    private String checkCode;
    /** 回访单位 */
    @ApiModelProperty(value = "回访单位", example = "")
    @TableField("check_org_code")
    private String checkOrgCode;
    /** 回访单位 */
    @ApiModelProperty(value = "回访单位", example = "")
    @TableField("check_org_name")
    private String checkOrgName;
    /** 回访时限起点 */
    @ApiModelProperty(value = "回访时限起点", example = "")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField("limit_start_time")
    private Date limitStartTime;
    /** 回访时限终点 */
    @ApiModelProperty(value = "回访时限终点", example = "")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField("limit_end_time")
    private Date limitEndTime;
}
src/main/java/org/springblade/modules/eCallEventTwo/entity/EcOrderDone.java
New file
@@ -0,0 +1,50 @@
package org.springblade.modules.eCallEventTwo.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
 * 办结单对象 ec_order_done
 *
 * @author ${context.author}
 * @date 2024-05-28 14:42:26
 */
@ApiModel(value = "EcOrderDone对象" , description = "办结单")
@Data
@TableName("ec_order_done")
public class EcOrderDone implements Serializable
{
    private static final long serialVersionUID = 1L;
    /** 工单ID */
    @ApiModelProperty(value = "主键ID", example = "")
    @TableId(value = "order_id", type = IdType.ASSIGN_ID)
    private Long orderId;
    /** 办结单号 */
    @ApiModelProperty(value = "办结单号", example = "")
    @TableField("done_code")
    private String doneCode;
    /** 首次办结申请时间 */
    @ApiModelProperty(value = "首次办结申请时间", example = "")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField("first_done_apply_time")
    private Date firstDoneApplyTime;
    /** 首次办结审核通过时间 */
    @ApiModelProperty(value = "首次办结审核通过时间", example = "")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField("first_done_audit_yes_time")
    private Date firstDoneAuditYesTime;
}
src/main/java/org/springblade/modules/eCallEventTwo/entity/EcOrderResp.java
New file
@@ -0,0 +1,36 @@
package org.springblade.modules.eCallEventTwo.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
 * 答复单对象 ec_order_resp
 *
 * @author ${context.author}
 * @date 2024-05-28 14:42:26
 */
@ApiModel(value = "EcOrderResp对象" , description = "答复单")
@Data
@TableName("ec_order_resp")
public class EcOrderResp implements Serializable
{
    private static final long serialVersionUID = 1L;
    /** 工单号 */
    @ApiModelProperty(value = "主键ID", example = "")
    @TableId(value = "order_id", type = IdType.ASSIGN_ID)
    private Long orderId;
    /** 答复单号 */
    @ApiModelProperty(value = "答复单号", example = "")
    @TableField("resp_code")
    private String respCode;
}
src/main/java/org/springblade/modules/eCallEventTwo/entity/EcOrderReview.java
New file
@@ -0,0 +1,150 @@
package org.springblade.modules.eCallEventTwo.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
 * 核实单对象 ec_order_review
 *
 * @author ${context.author}
 * @date 2024-05-28 14:42:26
 */
@ApiModel(value = "EcOrderReview对象" , description = "核实单")
@Data
@TableName("ec_order_review")
public class EcOrderReview implements Serializable
{
    private static final long serialVersionUID = 1L;
    /** 工单ID */
    @ApiModelProperty(value = "主键ID", example = "")
    @TableId(value = "order_id", type = IdType.ASSIGN_ID)
    private Long orderId;
    /** 核实单号 */
    @ApiModelProperty(value = "核实单号", example = "")
    @TableField("review_code")
    private String reviewCode;
    /** 工单号 */
    @ApiModelProperty(value = "工单号", example = "")
    @TableField("order_code")
    private String orderCode;
    /** 关联电话回访流水号 */
    @ApiModelProperty(value = "关联电话回访流水号", example = "")
    @TableField("tel_chk_id")
    private Long telChkId;
    /** 核实时间 */
    @ApiModelProperty(value = "核实时间", example = "")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField("review_time")
    private Date reviewTime;
    /** 核实人员 */
    @ApiModelProperty(value = "核实人员", example = "")
    @TableField("review_user_cnname")
    private String reviewUserCnname;
    /** 核实人员 */
    @ApiModelProperty(value = "核实人员", example = "")
    @TableField("review_user_name")
    private String reviewUserName;
    /** 核实坐席分机 */
    @ApiModelProperty(value = "核实坐席分机", example = "")
    @TableField("review_user_phone")
    private String reviewUserPhone;
    /** 核实单位 */
    @ApiModelProperty(value = "核实单位", example = "")
    @TableField("review_org_code")
    private String reviewOrgCode;
    /** 核实单位名称 */
    @ApiModelProperty(value = "核实单位名称", example = "")
    @TableField("review_org_name")
    private String reviewOrgName;
    /** 核实诉求人 */
    @ApiModelProperty(value = "核实诉求人", example = "")
    @TableField("review_issuer")
    private String reviewIssuer;
    /** 核实诉求人号码 */
    @ApiModelProperty(value = "核实诉求人号码", example = "")
    @TableField("review_issuer_phone")
    private String reviewIssuerPhone;
    /** 核实内容 */
    @ApiModelProperty(value = "核实内容", example = "")
    @TableField("review_note")
    private String reviewNote;
    /** 核实结果 */
    @ApiModelProperty(value = "核实结果", example = "")
    @TableField("review_yesno")
    private String reviewYesno;
    /** 核实附件 */
    @ApiModelProperty(value = "核实附件", example = "")
    @TableField("review_images")
    private String reviewImages;
    /** 核实录音文件 */
    @ApiModelProperty(value = "核实录音文件", example = "")
    @TableField("cti_voice_record_id")
    private String ctiVoiceRecordId;
    /** 核实录音播放地址 */
    @ApiModelProperty(value = "核实录音播放地址", example = "")
    @TableField("cti_voice_record_url")
    private String ctiVoiceRecordUrl;
    /** 重新办理单位 */
    @ApiModelProperty(value = "重新办理单位", example = "")
    @TableField("redo_org_code")
    private String redoOrgCode;
    /** 重新办理单位 */
    @ApiModelProperty(value = "重新办理单位", example = "")
    @TableField("redo_org_name")
    private String redoOrgName;
    /** 重新办理人员 */
    @ApiModelProperty(value = "重新办理人员", example = "")
    @TableField("redo_user_name")
    private String redoUserName;
    /** 重新办理人员 */
    @ApiModelProperty(value = "重新办理人员", example = "")
    @TableField("redo_user_cnname")
    private String redoUserCnname;
    /** 重新办理时间 */
    @ApiModelProperty(value = "重新办理时间", example = "")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField("redo_time")
    private Date redoTime;
    /** 重新办理情况 */
    @ApiModelProperty(value = "重新办理情况", example = "")
    @TableField("redo_note")
    private String redoNote;
    /** 重新办理附件 */
    @ApiModelProperty(value = "重新办理附件", example = "")
    @TableField("redo_images")
    private String redoImages;
}
src/main/java/org/springblade/modules/eCallEventTwo/entity/EcOrderSupervise.java
New file
@@ -0,0 +1,155 @@
package org.springblade.modules.eCallEventTwo.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
 * 督办单对象 ec_order_supervise
 *
 * @author ${context.author}
 * @date 2024-05-28 14:42:26
 */
@ApiModel(value = "EcOrderSupervise对象", description = "督办单")
@Data
@TableName("ec_order_supervise")
public class EcOrderSupervise implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * 工单ID
     */
    @ApiModelProperty(value = "主键ID", example = "")
    @TableId(value = "order_id", type = IdType.ASSIGN_ID)
    private Long orderId;
    /**
     * 督办单号
     */
    @ApiModelProperty(value = "督办单号", example = "")
    @TableField("supervise_code")
    private String superviseCode;
    /**
     * 工单号
     */
    @ApiModelProperty(value = "工单号", example = "")
    @TableField("order_code")
    private String orderCode;
    /**
     * 关联电话回访流水号
     */
    @ApiModelProperty(value = "关联电话回访流水号", example = "")
    @TableField("tel_chk_id")
    private Long telChkId;
    /**
     * 督办生成时间
     */
    @ApiModelProperty(value = "督办生成时间", example = "")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField("supervise_time")
    private Date superviseTime;
    /**
     * 督办领导
     */
    @ApiModelProperty(value = "督办领导", example = "")
    @TableField("supervisor_name")
    private String supervisorName;
    /**
     * 督办领导
     */
    @ApiModelProperty(value = "督办领导", example = "")
    @TableField("supervisor_cnname")
    private String supervisorCnname;
    /**
     * 督办意见
     */
    @ApiModelProperty(value = "督办意见", example = "")
    @TableField("supervise_note")
    private String superviseNote;
    /**
     * 督办附件
     */
    @ApiModelProperty(value = "督办附件", example = "")
    @TableField("supervise_images")
    private String superviseImages;
    /**
     * 督办单位
     */
    @ApiModelProperty(value = "督办单位", example = "")
    @TableField("supervisor_org_code")
    private String supervisorOrgCode;
    /**
     * 督办单位
     */
    @ApiModelProperty(value = "督办单位", example = "")
    @TableField("supervisor_org_name")
    private String supervisorOrgName;
    /**
     * 重新办理单位
     */
    @ApiModelProperty(value = "重新办理单位", example = "")
    @TableField("redo_org_code")
    private String redoOrgCode;
    /**
     * 重新办理单位
     */
    @ApiModelProperty(value = "重新办理单位", example = "")
    @TableField("redo_org_name")
    private String redoOrgName;
    /**
     * 重新办理人员
     */
    @ApiModelProperty(value = "重新办理人员", example = "")
    @TableField("redo_user_name")
    private String redoUserName;
    /**
     * 重新办理人员
     */
    @ApiModelProperty(value = "重新办理人员", example = "")
    @TableField("redo_user_cnname")
    private String redoUserCnname;
    /**
     * 重新办理时间
     */
    @ApiModelProperty(value = "重新办理时间", example = "")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField("redo_time")
    private Date redoTime;
    /**
     * 重新办理情况
     */
    @ApiModelProperty(value = "重新办理情况", example = "")
    @TableField("redo_note")
    private String redoNote;
    /**
     * 重新办理附件
     */
    @ApiModelProperty(value = "重新办理附件", example = "")
    @TableField("redo_images")
    private String redoImages;
}
src/main/java/org/springblade/modules/eCallEventTwo/mapper/EcCallEventTwoMapper.java
New file
@@ -0,0 +1,69 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.eCallEventTwo.mapper;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import org.springblade.modules.eCallEventTwo.dto.ECallEventTwoDTO;
import org.springblade.modules.eCallEventTwo.entity.ECallEventTwoEntity;
import org.springblade.modules.eCallEventTwo.vo.ECallEventTwoVO;
import java.util.List;
/**
 * 工单 Mapper 接口
 *
 * @author BladeX
 * @since 2024-05-15
 */
@DS("master")
public interface EcCallEventTwoMapper extends BaseMapper<ECallEventTwoEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param eCallEventTwo
     * @return
     */
    List<ECallEventTwoVO> selectECallEventTwoPage(IPage page,
                                                  @Param("eCallEventTwo") ECallEventTwoVO eCallEventTwo,
                                                  @Param("gridCodeList") List<String> gridCodeList,
                                                  @Param("regionChildCodesList") List<String> regionChildCodesList,
                                                  @Param("isAdministrator") Integer isAdministrator);
    /**
     * 查询工单
     *
     * @param orderId 工单ID
     * @return 工单
     */
    public ECallEventTwoDTO selectECallEventTwoById(Long orderId);
    /**
     * 查询工单列表
     *
     * @param eCallEventTwoDTO 工单
     * @return 工单集合
     */
    public List<ECallEventTwoDTO> selectECallEventTwoList(ECallEventTwoDTO eCallEventTwoDTO);
}
src/main/java/org/springblade/modules/eCallEventTwo/mapper/EcCallEventTwoMapper.xml
New file
@@ -0,0 +1,284 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.springblade.modules.eCallEventTwo.mapper.EcCallEventTwoMapper">
    <!-- 通用查询映射结果 -->
    <resultMap id="eCallEventTwoResultMap" type="org.springblade.modules.eCallEventTwo.vo.ECallEventTwoVO">
    </resultMap>
    <select id="selectECallEventTwoPage" resultMap="eCallEventTwoResultMap">
        select jecet.* from jczz_e_call_event_two jecet
        <where>
            <if test="eCallEventTwo.orderId != null "> and order_id = #{eCallEventTwo.orderId}</if>
            <if test="eCallEventTwo.orderCode != null  and eCallEventTwo.orderCode != ''"> and order_code like concat('%',#{eCallEventTwo.orderCode},'%') </if>
            <if test="eCallEventTwo.issueOrigin != null  and eCallEventTwo.issueOrigin != ''"> and issue_origin = #{eCallEventTwo.issueOrigin}</if>
            <if test="eCallEventTwo.issueTitle != null  and eCallEventTwo.issueTitle != ''"> and issue_title like concat('%',#{eCallEventTwo.issueTitle},'%') </if>
            <if test="eCallEventTwo.issueContent != null  and eCallEventTwo.issueContent != ''"> and issue_content = #{eCallEventTwo.issueContent}</if>
            <if test="eCallEventTwo.applicantType != null  and eCallEventTwo.applicantType != ''"> and applicant_type = #{eCallEventTwo.applicantType}</if>
            <if test="eCallEventTwo.applicantName != null  and eCallEventTwo.applicantName != ''"> and applicant_name like concat('%',#{eCallEventTwo.applicantName},'%') </if>
            <if test="eCallEventTwo.applicantGender != null  and eCallEventTwo.applicantGender != ''"> and applicant_gender = #{eCallEventTwo.applicantGender}</if>
            <if test="eCallEventTwo.applicantHomeaddr != null  and eCallEventTwo.applicantHomeaddr != ''"> and applicant_homeaddr = #{eCallEventTwo.applicantHomeaddr}</if>
            <if test="eCallEventTwo.applicantPhone != null  and eCallEventTwo.applicantPhone != ''"> and applicant_phone = #{eCallEventTwo.applicantPhone}</if>
            <if test="eCallEventTwo.applicantGrid != null  and eCallEventTwo.applicantGrid != ''"> and applicant_grid = #{eCallEventTwo.applicantGrid}</if>
            <if test="eCallEventTwo.applicantDistrict != null  and eCallEventTwo.applicantDistrict != ''"> and applicant_district = #{eCallEventTwo.applicantDistrict}</if>
            <if test="eCallEventTwo.sceneAddr != null  and eCallEventTwo.sceneAddr != ''"> and scene_addr = #{eCallEventTwo.sceneAddr}</if>
            <if test="eCallEventTwo.sceneAddrGrid != null  and eCallEventTwo.sceneAddrGrid != ''"> and scene_addr_grid = #{eCallEventTwo.sceneAddrGrid}</if>
            <if test="eCallEventTwo.sceneDistrict != null  and eCallEventTwo.sceneDistrict != ''"> and scene_district = #{eCallEventTwo.sceneDistrict}</if>
            <if test="eCallEventTwo.scenePlace != null  and eCallEventTwo.scenePlace != ''"> and scene_place = #{eCallEventTwo.scenePlace}</if>
            <if test="eCallEventTwo.sceneGeoLat != null "> and scene_geo_lat = #{eCallEventTwo.sceneGeoLat}</if>
            <if test="eCallEventTwo.sceneGeoLng != null "> and scene_geo_lng = #{eCallEventTwo.sceneGeoLng}</if>
            <if test="eCallEventTwo.isSecret != null  and eCallEventTwo.isSecret != ''"> and is_secret = #{eCallEventTwo.isSecret}</if>
            <if test="eCallEventTwo.isRepeat != null  and eCallEventTwo.isRepeat != ''"> and is_repeat = #{eCallEventTwo.isRepeat}</if>
            <if test="eCallEventTwo.issueType != null  and eCallEventTwo.issueType != ''"> and issue_type = #{eCallEventTwo.issueType}</if>
            <if test="eCallEventTwo.issueClazz != null  and eCallEventTwo.issueClazz != ''"> and issue_clazz = #{eCallEventTwo.issueClazz}</if>
            <if test="eCallEventTwo.issueLevel != null  and eCallEventTwo.issueLevel != ''"> and issue_level = #{eCallEventTwo.issueLevel}</if>
            <if test="eCallEventTwo.deadline != null "> and deadline = #{eCallEventTwo.deadline}</if>
            <if test="eCallEventTwo.linkOrders != null  and eCallEventTwo.linkOrders != ''"> and link_orders = #{eCallEventTwo.linkOrders}</if>
            <if test="eCallEventTwo.linkOrdersCode != null  and eCallEventTwo.linkOrdersCode != ''"> and link_orders_code = #{leCallEventTwo.inkOrdersCode}</if>
            <if test="eCallEventTwo.wikiRef != null  and eCallEventTwo.wikiRef != ''"> and wiki_ref = #{eCallEventTwo.wikiRef}</if>
            <if test="eCallEventTwo.acptOrgCode != null  and eCallEventTwo.acptOrgCode != ''"> and acpt_org_code = #{eCallEventTwo.acptOrgCode}</if>
            <if test="eCallEventTwo.acptOrgName != null  and eCallEventTwo.acptOrgName != ''"> and acpt_org_name = #{eCallEventTwo.acptOrgName}</if>
            <if test="eCallEventTwo.handleWay != null  and eCallEventTwo.handleWay != ''"> and handle_way = #{eCallEventTwo.handleWay}</if>
            <if test="eCallEventTwo.externalHandleWay != null  and eCallEventTwo.externalHandleWay != ''"> and external_handle_way = #{eCallEventTwo.eCallEventTwo.externalHandleWay}</if>
            <if test="eCallEventTwo.directFeed != null  and eCallEventTwo.directFeed != ''"> and direct_feed = #{eCallEventTwo.directFeed}</if>
            <if test="eCallEventTwo.directFeedHandler != null  and eCallEventTwo.directFeedHandler != ''"> and direct_feed_handler = #{eCallEventTwo.directFeedHandler}</if>
            <if test="eCallEventTwo.directFeedTime != null "> and direct_feed_time = #{eCallEventTwo.directFeedTime}</if>
            <if test="eCallEventTwo.images != null  and eCallEventTwo.images != ''">and images =
                #{eCallEventTwo.images}
            </if>
            <if test="eCallEventTwo.status != null  and eCallEventTwo.status != ''">and status =
                #{eCallEventTwo.status}
            </if>
            <if test="eCallEventTwo.tagApply != null  and eCallEventTwo.tagApply != ''">and tag_apply =
                #{eCallEventTwo.tagApply}
            </if>
            <if test="eCallEventTwo.tagDelay != null  and eCallEventTwo.tagDelay != ''">and tag_delay =
                #{eCallEventTwo.tagDelay}
            </if>
            <if test="eCallEventTwo.tagDoing != null  and eCallEventTwo.tagDoing != ''">and tag_doing =
                #{eCallEventTwo.tagDoing}
            </if>
            <if test="eCallEventTwo.tagResp != null  and eCallEventTwo.tagResp != ''">and tag_resp =
                #{eCallEventTwo.tagResp}
            </if>
            <if test="eCallEventTwo.tagDone != null  and eCallEventTwo.tagDone != ''">and tag_done =
                #{eCallEventTwo.tagDone}
            </if>
            <if test="eCallEventTwo.tagCheck != null  and eCallEventTwo.tagCheck != ''">and tag_check =
                #{eCallEventTwo.tagCheck}
            </if>
            <if test="eCallEventTwo.tagChkTel != null  and eCallEventTwo.tagChkTel != ''">and tag_chk_tel =
                #{eCallEventTwo.tagChkTel}
            </if>
            <if test="eCallEventTwo.tagRedo != null  and eCallEventTwo.tagRedo != ''">and tag_redo =
                #{eCallEventTwo.tagRedo}
            </if>
            <if test="isAdministrator==2">
                <choose>
                    <when test="eCallEventTwo.roleName != null and eCallEventTwo.roleName != ''">
                        <if test="eCallEventTwo.roleName=='wgy'">
                            <choose>
                                <when test="gridCodeList !=null and gridCodeList.size()>0">
                                    and jecet.grid_code in
                                    <foreach collection="gridCodeList" item="code" open="(" close=")" separator=",">
                                        #{code}
                                    </foreach>
                                </when>
                                <otherwise>
                                    and jecet.grid_code in ('')
                                </otherwise>
                            </choose>
                        </if>
                        <if test="eCallEventTwo.roleName=='mj'">
                            <choose>
                                <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
                                    and jecet.jw_grid_code in
                                    <foreach collection="regionChildCodesList" item="code" open="(" close=")"
                                             separator=",">
                                        #{code}
                                    </foreach>
                                </when>
                                <otherwise>
                                    and jecet.jw_grid_code in ('')
                                </otherwise>
                            </choose>
                        </if>
                    </when>
                    <otherwise>
                        <choose>
                            <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
                                and
                                (
                                jecet.grid_code in
                                <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
                                    #{code}
                                </foreach>
                                )
                            </when>
                            <otherwise>
                                and  ( jecet.grid_code in ('')  )
                            </otherwise>
                        </choose>
                    </otherwise>
                </choose>
            </if>
        </where>
        order by order_id desc
    </select>
    <resultMap type="org.springblade.modules.eCallEventTwo.dto.ECallEventTwoDTO" id="ECallEventTwoDTOResult">
        <result property="orderId"    column="order_id"    />
        <result property="orderCode"    column="order_code"    />
        <result property="issueOrigin"    column="issue_origin"    />
        <result property="issueTitle"    column="issue_title"    />
        <result property="issueContent"    column="issue_content"    />
        <result property="applicantType"    column="applicant_type"    />
        <result property="applicantName"    column="applicant_name"    />
        <result property="applicantGender"    column="applicant_gender"    />
        <result property="applicantHomeaddr"    column="applicant_homeaddr"    />
        <result property="applicantPhone"    column="applicant_phone"    />
        <result property="applicantGrid"    column="applicant_grid"    />
        <result property="applicantDistrict"    column="applicant_district"    />
        <result property="sceneAddr"    column="scene_addr"    />
        <result property="sceneAddrGrid"    column="scene_addr_grid"    />
        <result property="sceneDistrict"    column="scene_district"    />
        <result property="scenePlace"    column="scene_place"    />
        <result property="sceneGeoLat"    column="scene_geo_lat"    />
        <result property="sceneGeoLng"    column="scene_geo_lng"    />
        <result property="isSecret"    column="is_secret"    />
        <result property="isRepeat"    column="is_repeat"    />
        <result property="issueType"    column="issue_type"    />
        <result property="issueClazz"    column="issue_clazz"    />
        <result property="issueLevel"    column="issue_level"    />
        <result property="deadline"    column="deadline"    />
        <result property="linkOrders"    column="link_orders"    />
        <result property="linkOrdersCode"    column="link_orders_code"    />
        <result property="wikiRef"    column="wiki_ref"    />
        <result property="acptOrgCode"    column="acpt_org_code"    />
        <result property="acptOrgName"    column="acpt_org_name"    />
        <result property="handleWay"    column="handle_way"    />
        <result property="externalHandleWay"    column="external_handle_way"    />
        <result property="directFeed"    column="direct_feed"    />
        <result property="directFeedHandler"    column="direct_feed_handler"    />
        <result property="directFeedTime"    column="direct_feed_time"    />
        <result property="images"    column="images"    />
        <result property="status"    column="status"    />
        <result property="tagApply"    column="tag_apply"    />
        <result property="tagDelay"    column="tag_delay"    />
        <result property="tagDoing"    column="tag_doing"    />
        <result property="tagResp"    column="tag_resp"    />
        <result property="tagDone"    column="tag_done"    />
        <result property="tagCheck"    column="tag_check"    />
        <result property="tagChkTel"    column="tag_chk_tel"    />
        <result property="tagRedo"    column="tag_redo"    />
    </resultMap>
    <sql id="selectECallEventTwo">
        select
            order_id,
            order_code,
            issue_origin,
            issue_title,
            issue_content,
            applicant_type,
            applicant_name,
            applicant_gender,
            applicant_homeaddr,
            applicant_phone,
            applicant_grid,
            applicant_district,
            scene_addr,
            scene_addr_grid,
            scene_district,
            scene_place,
            scene_geo_lat,
            scene_geo_lng,
            is_secret,
            is_repeat,
            issue_type,
            issue_clazz,
            issue_level,
            deadline,
            link_orders,
            link_orders_code,
            wiki_ref,
            acpt_org_code,
            acpt_org_name,
            handle_way,
            external_handle_way,
            direct_feed,
            direct_feed_handler,
            direct_feed_time,
            images,
            status,
            tag_apply,
            tag_delay,
            tag_doing,
            tag_resp,
            tag_done,
            tag_check,
            tag_chk_tel,
            tag_redo
        from
            jczz_e_call_event_two
    </sql>
    <select id="selectECallEventTwoById" parameterType="long" resultMap="ECallEventTwoDTOResult">
        <include refid="selectECallEventTwo"/>
        where
        order_id = #{orderId}
    </select>
    <select id="selectECallEventTwoList" parameterType="org.springblade.modules.eCallEventTwo.dto.ECallEventTwoDTO" resultMap="ECallEventTwoDTOResult">
        <include refid="selectECallEventTwo"/>
        <where>
            <if test="orderId != null "> and order_id = #{orderId}</if>
            <if test="orderCode != null  and orderCode != ''"> and order_code = #{orderCode}</if>
            <if test="issueOrigin != null  and issueOrigin != ''"> and issue_origin = #{issueOrigin}</if>
            <if test="issueTitle != null  and issueTitle != ''"> and issue_title = #{issueTitle}</if>
            <if test="issueContent != null  and issueContent != ''"> and issue_content = #{issueContent}</if>
            <if test="applicantType != null  and applicantType != ''"> and applicant_type = #{applicantType}</if>
            <if test="applicantName != null  and applicantName != ''"> and applicant_name = #{applicantName}</if>
            <if test="applicantGender != null  and applicantGender != ''"> and applicant_gender = #{applicantGender}</if>
            <if test="applicantHomeaddr != null  and applicantHomeaddr != ''"> and applicant_homeaddr = #{applicantHomeaddr}</if>
            <if test="applicantPhone != null  and applicantPhone != ''"> and applicant_phone = #{applicantPhone}</if>
            <if test="applicantGrid != null  and applicantGrid != ''"> and applicant_grid = #{applicantGrid}</if>
            <if test="applicantDistrict != null  and applicantDistrict != ''"> and applicant_district = #{applicantDistrict}</if>
            <if test="sceneAddr != null  and sceneAddr != ''"> and scene_addr = #{sceneAddr}</if>
            <if test="sceneAddrGrid != null  and sceneAddrGrid != ''"> and scene_addr_grid = #{sceneAddrGrid}</if>
            <if test="sceneDistrict != null  and sceneDistrict != ''"> and scene_district = #{sceneDistrict}</if>
            <if test="scenePlace != null  and scenePlace != ''"> and scene_place = #{scenePlace}</if>
            <if test="sceneGeoLat != null "> and scene_geo_lat = #{sceneGeoLat}</if>
            <if test="sceneGeoLng != null "> and scene_geo_lng = #{sceneGeoLng}</if>
            <if test="isSecret != null  and isSecret != ''"> and is_secret = #{isSecret}</if>
            <if test="isRepeat != null  and isRepeat != ''"> and is_repeat = #{isRepeat}</if>
            <if test="issueType != null  and issueType != ''"> and issue_type = #{issueType}</if>
            <if test="issueClazz != null  and issueClazz != ''"> and issue_clazz = #{issueClazz}</if>
            <if test="issueLevel != null  and issueLevel != ''"> and issue_level = #{issueLevel}</if>
            <if test="deadline != null "> and deadline = #{deadline}</if>
            <if test="linkOrders != null  and linkOrders != ''"> and link_orders = #{linkOrders}</if>
            <if test="linkOrdersCode != null  and linkOrdersCode != ''"> and link_orders_code = #{linkOrdersCode}</if>
            <if test="wikiRef != null  and wikiRef != ''"> and wiki_ref = #{wikiRef}</if>
            <if test="acptOrgCode != null  and acptOrgCode != ''"> and acpt_org_code = #{acptOrgCode}</if>
            <if test="acptOrgName != null  and acptOrgName != ''"> and acpt_org_name = #{acptOrgName}</if>
            <if test="handleWay != null  and handleWay != ''"> and handle_way = #{handleWay}</if>
            <if test="externalHandleWay != null  and externalHandleWay != ''"> and external_handle_way = #{externalHandleWay}</if>
            <if test="directFeed != null  and directFeed != ''"> and direct_feed = #{directFeed}</if>
            <if test="directFeedHandler != null  and directFeedHandler != ''"> and direct_feed_handler = #{directFeedHandler}</if>
            <if test="directFeedTime != null "> and direct_feed_time = #{directFeedTime}</if>
            <if test="images != null  and images != ''"> and images = #{images}</if>
            <if test="status != null  and status != ''"> and status = #{status}</if>
            <if test="tagApply != null  and tagApply != ''"> and tag_apply = #{tagApply}</if>
            <if test="tagDelay != null  and tagDelay != ''"> and tag_delay = #{tagDelay}</if>
            <if test="tagDoing != null  and tagDoing != ''"> and tag_doing = #{tagDoing}</if>
            <if test="tagResp != null  and tagResp != ''"> and tag_resp = #{tagResp}</if>
            <if test="tagDone != null  and tagDone != ''"> and tag_done = #{tagDone}</if>
            <if test="tagCheck != null  and tagCheck != ''"> and tag_check = #{tagCheck}</if>
            <if test="tagChkTel != null  and tagChkTel != ''"> and tag_chk_tel = #{tagChkTel}</if>
            <if test="tagRedo != null  and tagRedo != ''"> and tag_redo = #{tagRedo}</if>
        </where>
    </select>
</mapper>
src/main/java/org/springblade/modules/eCallEventTwo/mapper/EcOrderMapper.java
New file
@@ -0,0 +1,98 @@
package org.springblade.modules.eCallEventTwo.mapper;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.modules.eCallEventTwo.dto.*;
import org.springblade.modules.eCallEventTwo.entity.EcOrder;
import java.util.List;
import java.util.Map;
@DS("slave_1")
public interface EcOrderMapper extends BaseMapper<EcOrder>{
        /**
         * 查询工单
         *
         * @param orderId 工单ID
         * @return 工单
         */
        public EcOrderDTO selectEcOrderById(Long orderId);
    /**
     * 查询工单列表
     *
     * @param ecOrderDTO 工单
     * @return 工单集合
     */
    public List<EcOrderDTO> selectEcOrderList(EcOrderDTO ecOrderDTO);
    /**
     * 查询工单列表
     *
     * @param ecOrderDTO 工单
     * @return 工单集合
     */
    public int selectEcOrderCount(EcOrderDTO ecOrderDTO);
    /**
     * 查询派单
     *
     * @param ecDispatchDTO 工单ID
     * @return 派单
     */
    public int selectEcDispatchCount(EcDispatchDTO ecDispatchDTO);
    /**
     * 查询办理单列表
     *
     * @param ecHandleDTO 办理单
     * @return 办理单集合
     */
    public int selectEcHandleCount(EcHandleDTO ecHandleDTO);
    /**
     * 查询回访单列表
     *
     * @param ecOrderCheckDTO 回访单
     * @return 回访单集合
     */
    public int selectEcOrderCheckCount(EcOrderCheckDTO ecOrderCheckDTO);
    /**
     * 查询办结单列表
     *
     * @param ecOrderDoneDTO 办结单
     * @return 办结单集合
     */
    public int selectEcOrderDoneCount(EcOrderDoneDTO ecOrderDoneDTO);
    /**
     * 查询答复单列表
     *
     * @param ecOrderRespDTO 答复单
     * @return 答复单集合
     */
    public int selectEcOrderRespCount(EcOrderRespDTO ecOrderRespDTO);
    /**
     * 查询核实单列表
     *
     * @param ecOrderReviewDTO 核实单
     * @return 核实单集合
     */
    public int selectEcOrderReviewCount(EcOrderReviewDTO ecOrderReviewDTO);
    /**
     * 查询督办单列表
     *
     * @param ecOrderSuperviseDTO 督办单
     * @return 督办单集合
     */
    public int selectEcOrderSuperviseCount(EcOrderSuperviseDTO ecOrderSuperviseDTO);
    List<Map<String, String>> getUnitAssessmentIndicators();
    List<EcOrderDTO> getOrgCode(IPage page, EcOrderParamDTO ecOrderParamDTO);
}
src/main/java/org/springblade/modules/eCallEventTwo/mapper/EcOrderMapper.xml
New file
@@ -0,0 +1,599 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.springblade.modules.eCallEventTwo.mapper.EcOrderMapper">
    <resultMap type="org.springblade.modules.eCallEventTwo.dto.EcOrderDTO" id="EcOrderDTOResult">
        <result property="orderId"    column="order_id"    />
        <result property="orderCode"    column="order_code"    />
        <result property="issueOrigin"    column="issue_origin"    />
        <result property="issueTitle"    column="issue_title"    />
        <result property="issueContent"    column="issue_content"    />
        <result property="applicantType"    column="applicant_type"    />
        <result property="applicantName"    column="applicant_name"    />
        <result property="applicantGender"    column="applicant_gender"    />
        <result property="applicantHomeaddr"    column="applicant_homeaddr"    />
        <result property="applicantPhone"    column="applicant_phone"    />
        <result property="applicantGrid"    column="applicant_grid"    />
        <result property="applicantDistrict"    column="applicant_district"    />
        <result property="sceneAddr"    column="scene_addr"    />
        <result property="sceneAddrGrid"    column="scene_addr_grid"    />
        <result property="sceneDistrict"    column="scene_district"    />
        <result property="scenePlace"    column="scene_place"    />
        <result property="sceneGeoLat"    column="scene_geo_lat"    />
        <result property="sceneGeoLng"    column="scene_geo_lng"    />
        <result property="sceneAddrCor"    column="scene_addr_cor"    />
        <result property="sceneGeoLatCor"    column="scene_geo_lat_cor"    />
        <result property="sceneGeoLngCor"    column="scene_geo_lng_cor"    />
        <result property="isSecret"    column="is_secret"    />
        <result property="isRepeat"    column="is_repeat"    />
        <result property="issueType"    column="issue_type"    />
        <result property="issueClazz"    column="issue_clazz"    />
        <result property="issueLevel"    column="issue_level"    />
        <result property="deadline"    column="deadline"    />
        <result property="linkOrders"    column="link_orders"    />
        <result property="linkOrdersCode"    column="link_orders_code"    />
        <result property="wikiRef"    column="wiki_ref"    />
        <result property="acptOrgCode"    column="acpt_org_code"    />
        <result property="acptOrgName"    column="acpt_org_name"    />
        <result property="handleWay"    column="handle_way"    />
        <result property="externalHandleWay"    column="external_handle_way"    />
        <result property="directFeed"    column="direct_feed"    />
        <result property="directFeedHandler"    column="direct_feed_handler"    />
        <result property="directFeedTime"    column="direct_feed_time"    />
        <result property="images"    column="images"    />
        <result property="flagVaild"    column="flag_vaild"    />
        <result property="invalidNote"    column="invalid_note"    />
        <result property="invalidTime"    column="invalid_time"    />
        <result property="invalidUserName"    column="invalid_user_name"    />
        <result property="status"    column="status"    />
        <result property="tagApply"    column="tag_apply"    />
        <result property="tagDelay"    column="tag_delay"    />
        <result property="tagDoing"    column="tag_doing"    />
        <result property="tagResp"    column="tag_resp"    />
        <result property="tagDone"    column="tag_done"    />
        <result property="tagCheck"    column="tag_check"    />
        <result property="tagChkTel"    column="tag_chk_tel"    />
        <result property="tagRedo"    column="tag_redo"    />
    </resultMap>
    <sql id="selectEcOrder">
        select
            order_id,
            order_code,
            issue_origin,
            issue_title,
            issue_content,
            applicant_type,
            applicant_name,
            applicant_gender,
            applicant_homeaddr,
            applicant_phone,
            applicant_grid,
            applicant_district,
            scene_addr,
            scene_addr_grid,
            scene_district,
            scene_place,
            scene_geo_lat,
            scene_geo_lng,
            scene_addr_cor,
            scene_geo_lat_cor,
            scene_geo_lng_cor,
            is_secret,
            is_repeat,
            issue_type,
            issue_clazz,
            issue_level,
            deadline,
            link_orders,
            link_orders_code,
            wiki_ref,
            acpt_org_code,
            acpt_org_name,
            handle_way,
            external_handle_way,
            direct_feed,
            direct_feed_handler,
            direct_feed_time,
            images,
            flag_vaild,
            invalid_note,
            invalid_time,
            invalid_user_name,
            status,
            tag_apply,
            tag_delay,
            tag_doing,
            tag_resp,
            tag_done,
            tag_check,
            tag_chk_tel,
            tag_redo
        from
            ec_order
    </sql>
    <select id="selectEcOrderById" parameterType="long" resultMap="EcOrderDTOResult">
        <include refid="selectEcOrder"/>
        where
            order_id = #{orderId}
    </select>
    <select id="selectEcOrderList" parameterType="org.springblade.modules.eCallEventTwo.dto.EcOrderDTO" resultMap="EcOrderDTOResult">
        SELECT
        *
        FROM ec_order
        <where>
        <if test="startTime != null and endTime != null">and eoc.callin_time BETWEEN #{startTime} AND #{endTime}
        </if>
        <if test="orderId != null "> and order_id = #{orderId}</if>
        <if test="orderCode != null  and orderCode != ''"> and order_code = #{orderCode}</if>
        <if test="issueOrigin != null  and issueOrigin != ''"> and issue_origin = #{issueOrigin}</if>
        <if test="issueTitle != null  and issueTitle != ''"> and issue_title = #{issueTitle}</if>
        <if test="issueContent != null  and issueContent != ''"> and issue_content = #{issueContent}</if>
        <if test="applicantType != null  and applicantType != ''"> and applicant_type = #{applicantType}</if>
        <if test="applicantName != null  and applicantName != ''"> and applicant_name = #{applicantName}</if>
        <if test="applicantGender != null  and applicantGender != ''"> and applicant_gender = #{applicantGender}</if>
        <if test="applicantHomeaddr != null  and applicantHomeaddr != ''"> and applicant_homeaddr = #{applicantHomeaddr}</if>
        <if test="applicantPhone != null  and applicantPhone != ''"> and applicant_phone = #{applicantPhone}</if>
        <if test="applicantGrid != null  and applicantGrid != ''"> and applicant_grid = #{applicantGrid}</if>
        <if test="applicantDistrict != null  and applicantDistrict != ''"> and applicant_district = #{applicantDistrict}</if>
        <if test="sceneAddr != null  and sceneAddr != ''"> and scene_addr = #{sceneAddr}</if>
            <if test="sceneAddrGrid != null  and sceneAddrGrid != ''">and scene_addr_grid = #{sceneAddrGrid}</if>
            <if test="sceneDistrict != null  and sceneDistrict != ''">and scene_district = #{sceneDistrict}</if>
            <if test="scenePlace != null  and scenePlace != ''">and scene_place = #{scenePlace}</if>
            <if test="sceneGeoLat != null ">and scene_geo_lat = #{sceneGeoLat}</if>
            <if test="sceneGeoLng != null ">and scene_geo_lng = #{sceneGeoLng}</if>
            <if test="sceneAddrCor != null  and sceneAddrCor != ''">and scene_addr_cor = #{sceneAddrCor}</if>
            <if test="sceneGeoLatCor != null ">and scene_geo_lat_cor = #{sceneGeoLatCor}</if>
            <if test="sceneGeoLngCor != null ">and scene_geo_lng_cor = #{sceneGeoLngCor}</if>
            <if test="isSecret != null  and isSecret != ''">and is_secret = #{isSecret}</if>
            <if test="isRepeat != null  and isRepeat != ''">and is_repeat = #{isRepeat}</if>
            <if test="issueType != null  and issueType != ''">and issue_type = #{issueType}</if>
            <if test="issueClazz != null  and issueClazz != ''">and issue_clazz = #{issueClazz}</if>
            <if test="issueLevel != null  and issueLevel != ''">and issue_level = #{issueLevel}</if>
            <if test="deadline != null ">and deadline = #{deadline}</if>
            <if test="linkOrders != null  and linkOrders != ''">and link_orders = #{linkOrders}</if>
            <if test="linkOrdersCode != null  and linkOrdersCode != ''">and link_orders_code = #{linkOrdersCode}</if>
            <if test="wikiRef != null  and wikiRef != ''">and wiki_ref = #{wikiRef}</if>
            <if test="acptOrgCode != null  and acptOrgCode != ''">and acpt_org_code = #{acptOrgCode}</if>
            <if test="acptOrgName != null  and acptOrgName != ''">and acpt_org_name = #{acptOrgName}</if>
            <if test="handleWay != null  and handleWay != ''">and handle_way = #{handleWay}</if>
            <if test="externalHandleWay != null  and externalHandleWay != ''">and external_handle_way =
                #{externalHandleWay}
            </if>
            <if test="directFeed != null  and directFeed != ''">and direct_feed = #{directFeed}</if>
            <if test="directFeedHandler != null  and directFeedHandler != ''">and direct_feed_handler =
                #{directFeedHandler}
            </if>
            <if test="directFeedTime != null ">and direct_feed_time = #{directFeedTime}</if>
            <if test="images != null  and images != ''">and images = #{images}</if>
            <if test="flagVaild != null  and flagVaild != ''">and flag_vaild = #{flagVaild}</if>
            <if test="invalidNote != null  and invalidNote != ''">and invalid_note = #{invalidNote}</if>
            <if test="invalidTime != null ">and invalid_time = #{invalidTime}</if>
            <if test="invalidUserName != null  and invalidUserName != ''">and invalid_user_name = #{invalidUserName}
            </if>
            <if test="status != null  and status != ''">and status = #{status}</if>
            <if test="tagApply != null  and tagApply != ''">and tag_apply = #{tagApply}</if>
            <if test="tagDelay != null  and tagDelay != ''">and tag_delay = #{tagDelay}</if>
            <if test="tagDoing != null  and tagDoing != ''">and tag_doing = #{tagDoing}</if>
            <if test="tagResp != null  and tagResp != ''">and tag_resp = #{tagResp}</if>
            <if test="tagDone != null  and tagDone != ''">and tag_done = #{tagDone}</if>
            <if test="tagCheck != null  and tagCheck != ''">and tag_check = #{tagCheck}</if>
            <if test="tagChkTel != null  and tagChkTel != ''">and tag_chk_tel = #{tagChkTel}</if>
            <if test="tagRedo != null  and tagRedo != ''">and tag_redo = #{tagRedo}</if>
        </where>
    </select>
    <select id="selectEcOrderCount" parameterType="org.springblade.modules.eCallEventTwo.dto.EcOrderDTO"
            resultType="java.lang.Integer">
        SELECT
        COUNT(DISTINCT(eo.order_id))
        FROM ec_order eo
        LEFT JOIN ec_dispatch ed ON eo.order_id = ed.order_id
        LEFT JOIN ec_order_cti eoc on eoc.order_id = eo.order_id
        <where>
            <if test="tagMain != null and tagMain != ''">and ed.tag_main = #{tagMain}</if>
            <if test="subjectOrgCode != null and subjectOrgCode != ''">and ed.subject_org_code = #{subjectOrgCode}</if>
            <if test="sinkOrgCode != null and sinkOrgCode != ''">and ed.sink_org_code = #{sinkOrgCode}</if>
            <if test="startTime != null and endTime != null">and eoc.callin_time BETWEEN #{startTime} AND #{endTime}
            </if>
            <if test="orderId != null ">and eo.order_id = #{orderId}</if>
            <if test="orderCode != null  and orderCode != ''">and eo.order_code = #{orderCode}</if>
            <if test="issueOrigin != null  and issueOrigin != ''">and eo.issue_origin = #{issueOrigin}</if>
            <if test="issueTitle != null  and issueTitle != ''">and eo.issue_title = #{issueTitle}</if>
            <if test="issueContent != null  and issueContent != ''">and eo.issue_content = #{issueContent}</if>
            <if test="applicantType != null  and applicantType != ''">and eo.applicant_type = #{applicantType}</if>
            <if test="applicantName != null  and applicantName != ''">and eo.applicant_name = #{applicantName}</if>
            <if test="applicantGender != null  and applicantGender != ''">and eo.applicant_gender = #{applicantGender}
            </if>
            <if test="applicantHomeaddr != null  and applicantHomeaddr != ''">and eo.applicant_homeaddr =
                #{applicantHomeaddr}
            </if>
            <if test="applicantPhone != null  and applicantPhone != ''">and eo.applicant_phone = #{applicantPhone}</if>
            <if test="applicantGrid != null  and applicantGrid != ''">and eo.applicant_grid = #{applicantGrid}</if>
            <if test="applicantDistrict != null  and applicantDistrict != ''">and eo.applicant_district =
                #{applicantDistrict}
            </if>
            <if test="sceneAddr != null  and sceneAddr != ''">and eo.scene_addr = #{sceneAddr}</if>
            <if test="sceneAddrGrid != null  and sceneAddrGrid != ''">and eo.scene_addr_grid = #{sceneAddrGrid}</if>
            <if test="sceneDistrict != null  and sceneDistrict != ''">and eo.scene_district = #{sceneDistrict}</if>
            <if test="scenePlace != null  and scenePlace != ''">and eo.scene_place = #{scenePlace}</if>
            <if test="sceneGeoLat != null ">and eo.scene_geo_lat = #{sceneGeoLat}</if>
            <if test="sceneGeoLng != null ">and eo.scene_geo_lng = #{sceneGeoLng}</if>
            <if test="sceneAddrCor != null  and sceneAddrCor != ''">and eo.scene_addr_cor = #{sceneAddrCor}</if>
            <if test="sceneGeoLatCor != null ">and eo.scene_geo_lat_cor = #{sceneGeoLatCor}</if>
            <if test="sceneGeoLngCor != null ">and eo.scene_geo_lng_cor = #{sceneGeoLngCor}</if>
            <if test="isSecret != null  and isSecret != ''">and eo.is_secret = #{isSecret}</if>
            <if test="isRepeat != null  and isRepeat != ''">and eo.is_repeat = #{isRepeat}</if>
            <if test="issueType != null  and issueType != ''">and eo.issue_type = #{issueType}</if>
            <if test="issueClazz != null  and issueClazz != ''">and eo.issue_clazz = #{issueClazz}</if>
            <if test="issueLevel != null  and issueLevel != ''">and eo.issue_level = #{issueLevel}</if>
            <if test="deadline != null ">and eo.deadline = #{deadline}</if>
            <if test="linkOrders != null  and linkOrders != ''">and eo.link_orders = #{linkOrders}</if>
            <if test="linkOrdersCode != null  and linkOrdersCode != ''">and eo.link_orders_code = #{linkOrdersCode}</if>
            <if test="wikiRef != null  and wikiRef != ''">and eo.wiki_ref = #{wikiRef}</if>
            <if test="acptOrgCode != null  and acptOrgCode != ''">and eo.acpt_org_code = #{acptOrgCode}</if>
            <if test="acptOrgName != null  and acptOrgName != ''">and eo.acpt_org_name = #{acptOrgName}</if>
            <if test="handleWay != null  and handleWay != ''">and eo.handle_way = #{handleWay}</if>
            <if test="externalHandleWay != null  and externalHandleWay != ''">and eo.external_handle_way =
                #{externalHandleWay}
            </if>
            <if test="directFeed != null  and directFeed != ''">and eo.direct_feed = #{directFeed}</if>
            <if test="directFeedHandler != null  and directFeedHandler != ''">and eo.direct_feed_handler =
                #{directFeedHandler}
            </if>
            <if test="directFeedTime != null ">and eo.direct_feed_time = #{directFeedTime}</if>
            <if test="images != null  and images != ''">and eo.images = #{images}</if>
            <if test="flagVaild != null  and flagVaild != ''">and eo.flag_vaild = #{flagVaild}</if>
            <if test="invalidNote != null  and invalidNote != ''">and eo.invalid_note = #{invalidNote}</if>
            <if test="invalidTime != null ">and eo.invalid_time = #{invalidTime}</if>
            <if test="invalidUserName != null  and invalidUserName != ''">and eo.invalid_user_name = #{invalidUserName}
            </if>
            <if test="status != null  and status != ''">and eo.status = #{status}</if>
            <if test="tagApply != null  and tagApply != ''">and eo.tag_apply = #{tagApply}</if>
            <if test="tagDelay != null  and tagDelay != ''">and eo.tag_delay = #{tagDelay}</if>
            <if test="tagDoing != null  and tagDoing != ''">and eo.tag_doing = #{tagDoing}</if>
            <if test="tagResp != null  and tagResp != ''">and eo.tag_resp = #{tagResp}</if>
            <if test="tagDone != null  and tagDone != ''">and eo.tag_done = #{tagDone}</if>
            <if test="tagCheck != null  and tagCheck != ''">and eo.tag_check = #{tagCheck}</if>
            <if test="tagChkTel != null  and tagChkTel != ''">and eo.tag_chk_tel = #{tagChkTel}</if>
            <if test="tagRedo != null  and tagRedo != ''">and eo.tag_redo = #{tagRedo}</if>
        </where>
    </select>
    <select id="selectEcDispatchCount" parameterType="org.springblade.modules.eCallEventTwo.dto.EcDispatchDTO"
            resultType="java.lang.Integer">
        SELECT
        COUNT(1)
        FROM
        ec_dispatch ed
        LEFT JOIN ec_order eo ON eo.order_id = ed.order_id
        LEFT JOIN ec_order_cti eoc on eoc.order_id = eo.order_id
        <where>
            <if test="tagMain != null and tagMain != ''">and ed.tag_main = #{tagMain}</if>
            <if test="subjectOrgCode != null and subjectOrgCode != ''">and ed.subject_org_code = #{subjectOrgCode}</if>
            <if test="sinkOrgCode != null and sinkOrgCode != ''">and ed.sink_org_code = #{sinkOrgCode}</if>
            <if test="startTime != null and endTime != null">and ed.dispatch_time BETWEEN #{startTime} AND #{endTime}
            </if>
            <if test="startTime != null and endTime != null">and eoc.callin_time BETWEEN #{startTime} AND #{endTime}
            </if>
            <if test="dispatchId != null ">and dispatch_id = #{dispatchId}</if>
            <if test="orderId != null ">and order_id = #{orderId}</if>
            <if test="dispatchCode != null  and dispatchCode != ''">and dispatch_code = #{dispatchCode}</if>
            <if test="dispatchTime != null ">and dispatch_time = #{dispatchTime}</if>
            <if test="dispatchNote != null  and dispatchNote != ''">and dispatch_note = #{dispatchNote}</if>
            <if test="dispatchImages != null  and dispatchImages != ''">and dispatch_images = #{dispatchImages}</if>
            <if test="subjectOrgCode != null  and subjectOrgCode != ''">and subject_org_code = #{subjectOrgCode}</if>
            <if test="subjectOrgName != null  and subjectOrgName != ''">and subject_org_name = #{subjectOrgName}</if>
            <if test="subjectUserName != null  and subjectUserName != ''">and subject_user_name = #{subjectUserName}
            </if>
            <if test="subjectUserCnname != null  and subjectUserCnname != ''">and subject_user_cnname =
                #{subjectUserCnname}
            </if>
            <if test="objectOrgCode != null  and objectOrgCode != ''">and object_org_code = #{objectOrgCode}</if>
            <if test="objectOrgName != null  and objectOrgName != ''">and object_org_name = #{objectOrgName}</if>
            <if test="sinkOrgCode != null  and sinkOrgCode != ''">and sink_org_code = #{sinkOrgCode}</if>
            <if test="sinkOrgName != null  and sinkOrgName != ''">and sink_org_name = #{sinkOrgName}</if>
            <if test="tagMain != null  and tagMain != ''">and tag_main = #{tagMain}</if>
            <if test="tagCc != null  and tagCc != ''">and tag_cc = #{tagCc}</if>
            <if test="tagCti != null  and tagCti != ''">and tag_cti = #{tagCti}</if>
            <if test="tagTrans != null  and tagTrans != ''">and tag_trans = #{tagTrans}</if>
            <if test="upDispatchId != null ">and up_dispatch_id = #{upDispatchId}</if>
            <if test="ackOrgCode != null  and ackOrgCode != ''">and ack_org_code = #{ackOrgCode}</if>
            <if test="ackOrgName != null  and ackOrgName != ''">and ack_org_name = #{ackOrgName}</if>
            <if test="ackUserName != null  and ackUserName != ''">and ack_user_name = #{ackUserName}</if>
            <if test="ackUserCnname != null  and ackUserCnname != ''">and ack_user_cnname = #{ackUserCnname}</if>
            <if test="ackTime != null ">and ack_time = #{ackTime}</if>
            <if test="rejectUserName != null  and rejectUserName != ''">and reject_user_name = #{rejectUserName}</if>
            <if test="rejectUserCnname != null  and rejectUserCnname != ''">and reject_user_cnname =
                #{rejectUserCnname}
            </if>
            <if test="rejectOrgCode != null  and rejectOrgCode != ''">and reject_org_code = #{rejectOrgCode}</if>
            <if test="rejectOrgName != null  and rejectOrgName != ''">and reject_org_name = #{rejectOrgName}</if>
            <if test="rejectTime != null ">and reject_time = #{rejectTime}</if>
            <if test="rejectNote != null  and rejectNote != ''">and reject_note = #{rejectNote}</if>
            <if test="rejectImages != null  and rejectImages != ''">and reject_images = #{rejectImages}</if>
            <if test="tagReject != null  and tagReject != ''">and tag_reject = #{tagReject}</if>
            <if test="rejectType != null  and rejectType != ''">and reject_type = #{rejectType}</if>
        </where>
    </select>
    <select id="selectEcHandleCount" parameterType="org.springblade.modules.eCallEventTwo.dto.EcHandleDTO"
            resultType="java.lang.Integer">
        SELECT
        COUNT(DISTINCT(ehd.uid))
        FROM
        ec_handle_doing ehd
        LEFT JOIN ec_handle eh ON ehd.order_id = eh.order_id
        LEFT JOIN ec_order eo ON eh.order_id = eo.order_id
        LEFT JOIN ec_dispatch ed ON eo.order_id = ed.order_id
        LEFT JOIN ec_order_cti eoc on eoc.order_id = eo.order_id
        <where>
            <if test="tagMain != null and tagMain != ''">and ed.tag_main = #{tagMain}</if>
            <if test="subjectOrgCode != null and subjectOrgCode != ''">and ed.subject_org_code = #{subjectOrgCode}</if>
            <if test="sinkOrgCode != null and sinkOrgCode != ''">and ed.sink_org_code = #{sinkOrgCode}</if>
            <if test="startTime != null and endTime != null">and ehd.biz_time BETWEEN #{startTime} AND
                #{endTime}
            </if>
            <if test="startTime != null and endTime != null">and eoc.callin_time BETWEEN #{startTime} AND #{endTime}
            </if>
            <if test="handleId != null ">and handle_id = #{handleId}</if>
            <if test="orderId != null ">and order_id = #{orderId}</if>
            <if test="dispatchId != null ">and dispatch_id = #{dispatchId}</if>
            <if test="handleCode != null  and handleCode != ''">and handle_code = #{handleCode}</if>
            <if test="hdlOrgCode != null  and hdlOrgCode != ''">and hdl_org_code = #{hdlOrgCode}</if>
            <if test="hdlOrgName != null  and hdlOrgName != ''">and hdl_org_name = #{hdlOrgName}</if>
            <if test="arriveLoc != null  and arriveLoc != ''">and arrive_loc = #{arriveLoc}</if>
            <if test="arriveLocLat != null ">and arrive_loc_lat = #{arriveLocLat}</if>
            <if test="arriveLocLng != null ">and arrive_loc_lng = #{arriveLocLng}</if>
            <if test="arriveBizTime != null ">and arrive_biz_time = #{arriveBizTime}</if>
            <if test="remoteHdlTime != null ">and remote_hdl_time = #{remoteHdlTime}</if>
            <if test="remoteHdlNote != null  and remoteHdlNote != ''">and remote_hdl_note = #{remoteHdlNote}</if>
            <if test="remoteHdlImages != null  and remoteHdlImages != ''">and remote_hdl_images = #{remoteHdlImages}
            </if>
            <if test="nosopHdlNote != null  and nosopHdlNote != ''">and nosop_hdl_note = #{nosopHdlNote}</if>
            <if test="nosopHdlImages != null  and nosopHdlImages != ''">and nosop_hdl_images = #{nosopHdlImages}</if>
            <if test="limitTime != null ">and limit_time = #{limitTime}</if>
            <if test="delayTime != null ">and delay_time = #{delayTime}</if>
            <if test="tagHdlDoing != null  and tagHdlDoing != ''">and tag_hdl_doing = #{tagHdlDoing}</if>
        </where>
    </select>
    <select id="selectEcOrderCheckCount" parameterType="org.springblade.modules.eCallEventTwo.dto.EcOrderCheckDTO"
            resultType="java.lang.Integer">
        SELECT
        COUNT(
        DISTINCT ( eoct.uid ))
        FROM
        ec_order_check_tel eoct
        LEFT JOIN ec_order_check eoc ON eoct.order_id = eoc.order_id
        LEFT JOIN ec_order eo ON eoc.order_id = eo.order_id
        LEFT JOIN ec_dispatch ed ON eo.order_id = ed.order_id
        LEFT JOIN ec_order_cti eoci on eoci.order_id = eo.order_id
        <where>
            <if test="tagMain != null and tagMain != ''">and ed.tag_main = #{tagMain}</if>
            <if test="subjectOrgCode != null and subjectOrgCode != ''">and ed.subject_org_code = #{subjectOrgCode}</if>
            <if test="sinkOrgCode != null and sinkOrgCode != ''">and ed.sink_org_code = #{sinkOrgCode}</if>
            <if test="startTime != null and endTime != null">and eoct.chk_time BETWEEN #{startTime} AND #{endTime}</if>
            <if test="startTime != null and endTime != null">and eoci.callin_time BETWEEN #{startTime} AND #{endTime}
            </if>
            <if test="orderId != null ">and order_id = #{orderId}</if>
            <if test="checkCode != null  and checkCode != ''">and check_code = #{checkCode}</if>
            <if test="checkOrgCode != null  and checkOrgCode != ''">and check_org_code = #{checkOrgCode}</if>
            <if test="checkOrgName != null  and checkOrgName != ''">and check_org_name = #{checkOrgName}</if>
            <if test="limitStartTime != null ">and limit_start_time = #{limitStartTime}</if>
            <if test="limitEndTime != null ">and limit_end_time = #{limitEndTime}</if>
        </where>
    </select>
    <select id="selectEcOrderDoneCount" parameterType="org.springblade.modules.eCallEventTwo.dto.EcOrderDoneDTO"
            resultType="java.lang.Integer">
        SELECT
        COUNT(
        DISTINCT ( eodl.uid ))
        FROM
        ec_order_done_log eodl
        LEFT JOIN ec_order_done eod ON eod.order_id = eodl.order_id
        LEFT JOIN ec_order eo ON eod.order_id = eo.order_id
        LEFT JOIN ec_dispatch ed ON eo.order_id = ed.order_id
        LEFT JOIN ec_order_cti eoc on eoc.order_id = eo.order_id
        <where>
            <if test="tagMain != null and tagMain != ''">and ed.tag_main = #{tagMain}</if>
            <if test="subjectOrgCode != null and subjectOrgCode != ''">and ed.subject_org_code = #{subjectOrgCode}</if>
            <if test="sinkOrgCode != null and sinkOrgCode != ''">and ed.sink_org_code = #{sinkOrgCode}</if>
            <if test="startTime != null and endTime != null">and eodl.in_audit_time BETWEEN #{startTime} AND
                #{endTime}
            </if>
            <if test="startTime != null and endTime != null">and eoc.callin_time BETWEEN #{startTime} AND #{endTime}
            </if>
            <if test="orderId != null ">and order_id = #{orderId}</if>
            <if test="doneCode != null  and doneCode != ''">and done_code = #{doneCode}</if>
            <if test="firstDoneApplyTime != null ">and first_done_apply_time = #{firstDoneApplyTime}</if>
            <if test="firstDoneAuditYesTime != null ">and first_done_audit_yes_time = #{firstDoneAuditYesTime}</if>
        </where>
    </select>
    <select id="selectEcOrderRespCount" parameterType="org.springblade.modules.eCallEventTwo.dto.EcOrderRespDTO"
            resultType="java.lang.Integer">
        SELECT
        COUNT(
        DISTINCT ( eorl.uid ))
        FROM
        ec_order_resp_log eorl
        LEFT JOIN ec_order_resp eor ON eorl.order_id = eor.order_id
        LEFT JOIN ec_order eo ON eor.order_id = eo.order_id
        LEFT JOIN ec_dispatch ed ON eo.order_id = ed.order_id
        LEFT JOIN ec_order_cti eoc on eoc.order_id = eo.order_id
        <where>
            <if test="tagMain != null and tagMain != ''">and ed.tag_main = #{tagMain}</if>
            <if test="subjectOrgCode != null and subjectOrgCode != ''">and ed.subject_org_code = #{subjectOrgCode}</if>
            <if test="sinkOrgCode != null and sinkOrgCode != ''">and ed.sink_org_code = #{sinkOrgCode}</if>
            <if test="startTime != null and endTime != null">and eorl.audit_time BETWEEN #{startTime} AND #{endTime}
            </if>
            <if test="startTime != null and endTime != null">and eoc.callin_time BETWEEN #{startTime} AND #{endTime}
            </if>
            <if test="orderId != null ">and order_id = #{orderId}</if>
            <if test="respCode != null  and respCode != ''">and resp_code = #{respCode}</if>
        </where>
    </select>
    <select id="selectEcOrderReviewCount" parameterType="org.springblade.modules.eCallEventTwo.dto.EcOrderReviewDTO"
            resultType="java.lang.Integer">
        SELECT
        COUNT(DISTINCT(eo.order_id))
        FROM
        ec_order_review eor
        LEFT JOIN ec_order eo on eor.order_id = eo.order_id
        LEFT JOIN ec_dispatch ed ON eo.order_id = ed.order_id
        LEFT JOIN ec_order_cti eoc on eoc.order_id = eo.order_id
        <where>
            <if test="tagMain != null and tagMain != ''">and ed.tag_main = #{tagMain}</if>
            <if test="subjectOrgCode != null and subjectOrgCode != ''">and ed.subject_org_code = #{subjectOrgCode}</if>
            <if test="sinkOrgCode != null and sinkOrgCode != ''">and ed.sink_org_code = #{sinkOrgCode}</if>
            <if test="startTime != null and endTime != null">and eor.review_time BETWEEN #{startTime} AND #{endTime}
            </if>
            <if test="startTime != null and endTime != null">and eoc.callin_time BETWEEN #{startTime} AND #{endTime}
            </if>
            <if test="orderId != null ">and order_id = #{orderId}</if>
            <if test="reviewCode != null  and reviewCode != ''">and review_code = #{reviewCode}</if>
            <if test="orderCode != null  and orderCode != ''">and order_code = #{orderCode}</if>
            <if test="telChkId != null ">and tel_chk_id = #{telChkId}</if>
            <if test="reviewTime != null ">and review_time = #{reviewTime}</if>
            <if test="reviewUserCnname != null  and reviewUserCnname != ''">and review_user_cnname =
                #{reviewUserCnname}
            </if>
            <if test="reviewUserName != null  and reviewUserName != ''">and review_user_name = #{reviewUserName}</if>
            <if test="reviewUserPhone != null  and reviewUserPhone != ''">and review_user_phone = #{reviewUserPhone}
            </if>
            <if test="reviewOrgCode != null  and reviewOrgCode != ''">and review_org_code = #{reviewOrgCode}</if>
            <if test="reviewOrgName != null  and reviewOrgName != ''">and review_org_name = #{reviewOrgName}</if>
            <if test="reviewIssuer != null  and reviewIssuer != ''">and review_issuer = #{reviewIssuer}</if>
            <if test="reviewIssuerPhone != null  and reviewIssuerPhone != ''">and review_issuer_phone =
                #{reviewIssuerPhone}
            </if>
            <if test="reviewNote != null  and reviewNote != ''">and review_note = #{reviewNote}</if>
            <if test="reviewYesno != null  and reviewYesno != ''">and review_yesno = #{reviewYesno}</if>
            <if test="reviewImages != null  and reviewImages != ''">and review_images = #{reviewImages}</if>
            <if test="ctiVoiceRecordId != null  and ctiVoiceRecordId != ''">and cti_voice_record_id =
                #{ctiVoiceRecordId}
            </if>
            <if test="ctiVoiceRecordUrl != null  and ctiVoiceRecordUrl != ''">and cti_voice_record_url =
                #{ctiVoiceRecordUrl}
            </if>
            <if test="redoOrgCode != null  and redoOrgCode != ''">and redo_org_code = #{redoOrgCode}</if>
            <if test="redoOrgName != null  and redoOrgName != ''">and redo_org_name = #{redoOrgName}</if>
            <if test="redoUserName != null  and redoUserName != ''">and redo_user_name = #{redoUserName}</if>
            <if test="redoUserCnname != null  and redoUserCnname != ''">and redo_user_cnname = #{redoUserCnname}</if>
            <if test="redoTime != null ">and redo_time = #{redoTime}</if>
            <if test="redoNote != null  and redoNote != ''">and redo_note = #{redoNote}</if>
            <if test="redoImages != null  and redoImages != ''">and redo_images = #{redoImages}</if>
        </where>
    </select>
    <select id="selectEcOrderSuperviseCount"
            parameterType="org.springblade.modules.eCallEventTwo.dto.EcOrderSuperviseDTO"
            resultType="java.lang.Integer">
        SELECT
        COUNT(DISTINCT(eo.order_id))
        FROM
        ec_order_supervise eos
        LEFT JOIN ec_order eo on eos.order_id = eo.order_id
        LEFT JOIN ec_dispatch ed ON eo.order_id = ed.order_id
        LEFT JOIN ec_order_cti eoc on eoc.order_id = eo.order_id
        <where>
            <if test="tagMain != null and tagMain != ''">and ed.tag_main = #{tagMain}</if>
            <if test="subjectOrgCode != null and subjectOrgCode != ''">and ed.subject_org_code = #{subjectOrgCode}</if>
            <if test="sinkOrgCode != null and sinkOrgCode != ''">and ed.sink_org_code = #{sinkOrgCode}</if>
            <if test="startTime != null and endTime != null">and eos.supervise_time BETWEEN #{startTime} AND
                #{endTime}
            </if>
            <if test="startTime != null and endTime != null">and eoc.callin_time BETWEEN #{startTime} AND #{endTime}
            </if>
            <if test="orderId != null ">and order_id = #{orderId}</if>
            <if test="superviseCode != null  and superviseCode != ''">and supervise_code = #{superviseCode}</if>
            <if test="orderCode != null  and orderCode != ''">and order_code = #{orderCode}</if>
            <if test="telChkId != null ">and tel_chk_id = #{telChkId}</if>
            <if test="superviseTime != null ">and supervise_time = #{superviseTime}</if>
            <if test="supervisorName != null  and supervisorName != ''">and supervisor_name = #{supervisorName}</if>
            <if test="supervisorCnname != null  and supervisorCnname != ''">and supervisor_cnname =
                #{supervisorCnname}
            </if>
            <if test="superviseNote != null  and superviseNote != ''">and supervise_note = #{superviseNote}</if>
            <if test="superviseImages != null  and superviseImages != ''">and supervise_images = #{superviseImages}</if>
            <if test="supervisorOrgCode != null  and supervisorOrgCode != ''">and supervisor_org_code =
                #{supervisorOrgCode}
            </if>
            <if test="supervisorOrgName != null  and supervisorOrgName != ''">and supervisor_org_name =
                #{supervisorOrgName}
            </if>
            <if test="redoOrgCode != null  and redoOrgCode != ''">and redo_org_code = #{redoOrgCode}</if>
            <if test="redoOrgName != null  and redoOrgName != ''">and redo_org_name = #{redoOrgName}</if>
            <if test="redoUserName != null  and redoUserName != ''">and redo_user_name = #{redoUserName}</if>
            <if test="redoUserCnname != null  and redoUserCnname != ''">and redo_user_cnname = #{redoUserCnname}</if>
            <if test="redoTime != null ">and redo_time = #{redoTime}</if>
            <if test="redoNote != null  and redoNote != ''">and redo_note = #{redoNote}</if>
            <if test="redoImages != null  and redoImages != ''">and redo_images = #{redoImages}</if>
        </where>
    </select>
    <select id="getUnitAssessmentIndicators" resultType="java.util.Map">
        select *
        from `v_statistics_examine_2`
    </select>
    <select id="getOrgCode" resultType="org.springblade.modules.eCallEventTwo.dto.EcOrderDTO">
        SELECT
        ed.subject_org_code,ed.subject_org_name,ed.sink_org_code,ed.sink_org_name
        FROM
        ec_order eo
        LEFT JOIN ec_dispatch ed ON eo.order_id = ed.order_id
        LEFT JOIN ec_order_cti eoc ON eoc.order_id = eo.order_id
        <where>
            <if test="ecOrderParamDTO.tagMain != null and ecOrderParamDTO.tagMain != '' ">
                and ed.tag_main = #{ecOrderParamDTO.tagMain}
                <if test="ecOrderParamDTO.mainFlag != null and ecOrderParamDTO.mainFlag == 2">
                    <if test="ecOrderParamDTO.subjectOrgName != null and ecOrderParamDTO.subjectOrgName != ''">
                        and ed.subject_org_name like concat('%',#{ecOrderParamDTO.subjectOrgName},'%')
                    </if>
                    GROUP BY ed.subject_org_code
                </if>
                <if test="ecOrderParamDTO.mainFlag != null and ecOrderParamDTO.mainFlag == 1">
                    <if test="ecOrderParamDTO.sinkOrgName != null and ecOrderParamDTO.sinkOrgName != ''">
                        and ed.sink_org_name like concat('%',#{ecOrderParamDTO.sinkOrgName},'%')
                    </if>
                    GROUP BY ed.sink_org_code
                </if>
            </if>
        </where>
    </select>
</mapper>
src/main/java/org/springblade/modules/eCallEventTwo/service/EcOrderService.java
New file
@@ -0,0 +1,90 @@
package org.springblade.modules.eCallEventTwo.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springblade.modules.eCallEventTwo.dto.EcOrderDTO;
import org.springblade.modules.eCallEventTwo.dto.EcOrderParamDTO;
import org.springblade.modules.eCallEventTwo.entity.ECallEventTwoEntity;
import org.springblade.modules.eCallEventTwo.entity.EcOrder;
import org.springblade.modules.eCallEventTwo.vo.ECallEventTwoVO;
import java.util.List;
import java.util.Map;
/**
 * EcOrderService接口
 *
 * @author ${context.author}
 * @date 2024-05-27 16:26:59
 */
public interface EcOrderService extends IService<EcOrder> {
    /**
     * 查询工单
     *
     * @param orderId 工单ID
     * @return 工单
     */
    public EcOrderDTO selectEcOrderById(Long orderId);
    /**
     * 查询工单列表
     *
     * @param ecOrderDTO 工单
     * @return 工单集合
     */
    public List<EcOrderDTO> selectEcOrderList(EcOrderDTO ecOrderDTO);
    /**
     * 新增工单
     *
     * @param ecOrderDTO 工单
     * @return 结果
     */
    public int insertEcOrder(EcOrderDTO ecOrderDTO);
    /**
     * 修改工单
     *
     * @param ecOrderDTO 工单
     * @return 结果
     */
    public int updateEcOrder(EcOrderDTO ecOrderDTO);
    /**
     * 批量删除工单
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    public int deleteEcOrderByIds(String ids);
    /**
     * 删除工单信息
     *
     * @param orderId 工单ID
     * @return 结果
     */
    public int deleteEcOrderById(Long orderId);
    boolean SynchronizeData(EcOrderParamDTO ecOrderParamDTO);
    /**
     * 批量同步工单
     * @param recordEntityList
     * @return
     */
    public boolean saveEcOrder(List<ECallEventTwoEntity> recordEntityList);
    /**
     * 单位考核指标
     * @return
     */
    List<Map<String, String>> getUnitAssessmentIndicators();
    /**
     * 统计工单
     * @param ecOrderParamDTO
     * @return
     */
    IPage<EcOrderDTO> getCount(IPage<EcOrderDTO> page, EcOrderParamDTO ecOrderParamDTO);
}
src/main/java/org/springblade/modules/eCallEventTwo/service/IECallEventTwoService.java
New file
@@ -0,0 +1,62 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.eCallEventTwo.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springblade.modules.eCallEventTwo.dto.ECallEventTwoDTO;
import org.springblade.modules.eCallEventTwo.entity.ECallEventTwoEntity;
import org.springblade.modules.eCallEventTwo.vo.ECallEventTwoVO;
import org.springblade.core.mp.base.BaseService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List;
/**
 * 工单 服务类
 *
 * @author BladeX
 * @since 2024-05-15
 */
public interface IECallEventTwoService extends IService<ECallEventTwoEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param eCallEventTwo
     * @return
     */
    IPage<ECallEventTwoVO> selectECallEventTwoPage(IPage<ECallEventTwoVO> page, ECallEventTwoVO eCallEventTwo);
    /**
     * 查询工单
     *
     * @param orderId 工单ID
     * @return 工单
     */
    public ECallEventTwoDTO selectECallEventTwoById(Long orderId);
    /**
     * 查询工单列表
     *
     * @param eCallEventTwoDTO 工单
     * @return 工单集合
     */
    public List<ECallEventTwoDTO> selectECallEventTwoList(ECallEventTwoDTO eCallEventTwoDTO);
    boolean saveTwo(ECallEventTwoVO eCallEventTwo);
}
src/main/java/org/springblade/modules/eCallEventTwo/service/impl/EcCallEventTwoServiceImpl.java
New file
@@ -0,0 +1,144 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.eCallEventTwo.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springblade.common.param.CommonParamSet;
import org.springblade.common.param.GridSet;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.modules.eCallEventTwo.dto.ECallEventTwoDTO;
import org.springblade.modules.eCallEventTwo.entity.ECallEventTwoEntity;
import org.springblade.modules.eCallEventTwo.mapper.EcCallEventTwoMapper;
import org.springblade.modules.eCallEventTwo.service.IECallEventTwoService;
import org.springblade.modules.eCallEventTwo.vo.ECallEventTwoVO;
import org.springblade.modules.system.entity.Dept;
import org.springblade.modules.system.service.IDeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.List;
import java.util.Random;
/**
 * 工单 服务实现类
 *
 * @author BladeX
 * @since 2024-05-15
 */
@Service
public class EcCallEventTwoServiceImpl extends ServiceImpl<EcCallEventTwoMapper, ECallEventTwoEntity> implements IECallEventTwoService {
    @Autowired
    private IDeptService deptService;
    @Override
    public IPage<ECallEventTwoVO> selectECallEventTwoPage(IPage<ECallEventTwoVO> page, ECallEventTwoVO eCallEventTwo) {
        // 公共参数设置
        CommonParamSet commonParamSet = new CommonParamSet().invoke(ECallEventTwoVO.class, eCallEventTwo);
        // 如果是委办局,直接设置成管理角色
        if(AuthUtil.getUserRole().equals("wbj")){
            commonParamSet.setIsAdministrator(1);
        }
        // 返回
        List<ECallEventTwoVO> eCallEventTwoVOS = baseMapper.selectECallEventTwoPage(page,
            eCallEventTwo,
            commonParamSet.getGridCodeList(),
            commonParamSet.getRegionChildCodesList(),
            commonParamSet.getIsAdministrator());
        return page.setRecords(eCallEventTwoVOS);
    }
    /**
     * 查询工单
     *
     * @param orderId 工单ID
     * @return 工单
     */
    @Override
    public ECallEventTwoDTO selectECallEventTwoById(Long orderId) {
        return this.baseMapper.selectECallEventTwoById(orderId);
    }
    /**
     * 查询工单列表
     *
     * @param eCallEventTwoDTO 工单
     * @return 工单集合
     */
    @Override
    public List<ECallEventTwoDTO> selectECallEventTwoList(ECallEventTwoDTO eCallEventTwoDTO) {
        return this.baseMapper.selectECallEventTwoList(eCallEventTwoDTO);
    }
    @Override
    public boolean saveTwo(ECallEventTwoVO eCallEventTwo) {
        eCallEventTwo.setLat(eCallEventTwo.getSceneGeoLat().toString());
        eCallEventTwo.setLng(eCallEventTwo.getSceneGeoLng().toString());
        // 设置工单号
        eCallEventTwo.setOrderCode(getOrderCode());
        // 计算网格
        if (eCallEventTwo.getLng() != null && eCallEventTwo.getLat() != null) {
            // 点落面计算警格,网格,警格
            GridSet invoke = new GridSet().invoke(ECallEventTwoVO.class, eCallEventTwo,
                "lng", "lat", "applicantGrid", "jwGridCode");
        }
        return save(eCallEventTwo);
    }
    /**
     * 获取工单号
     * @return
     */
    private String getOrderCode() {
        String deptId1 = AuthUtil.getDeptId();
        Dept dept = deptService.getOne(Wrappers.<Dept>lambdaQuery().eq(Dept::getId, deptId1));
        // 生成工单号:
        // 话务行政区划、编号类型、来电时间、来源渠道、流水号6    361100-00-202402131524-01-123456
        // 行政区划
        String deptId = dept.getSort().toString();
        // 编号类型
        String no = "00";
        // 时间
        String dateStr = getDateStr();
        // 来源渠道
        int sort = dept.getSort();
        String source = String.format("%02d", sort);
        // 流水号6位
        String serial = getSerialStr();
        String orderCode = "361100" + "-" + no + "-" + dateStr + "-" + source + "-" + serial;
        return orderCode;
    }
    private String getSerialStr() {
        Random random = new Random();
        int sixDigitNumber = random.nextInt(900000) + 100000; // 生成100000到999999之间的随机数
        return String.valueOf(sixDigitNumber);
    }
    private String getDateStr() {
        LocalDateTime now = LocalDateTime.now();
        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMddHHmm");
        return now.format(formatter);
    }
}
src/main/java/org/springblade/modules/eCallEventTwo/service/impl/EcOrderServiceImpl.java
New file
@@ -0,0 +1,326 @@
package org.springblade.modules.eCallEventTwo.service.impl;
import cn.hutool.core.convert.Convert;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import liquibase.repackaged.org.apache.commons.lang3.StringUtils;
import org.jetbrains.annotations.NotNull;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springblade.common.utils.SpringUtils;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.modules.eCallEventTwo.dto.*;
import org.springblade.modules.eCallEventTwo.entity.ECallEventTwoEntity;
import org.springblade.modules.eCallEventTwo.entity.EcOrder;
import org.springblade.modules.eCallEventTwo.mapper.EcOrderMapper;
import org.springblade.modules.eCallEventTwo.service.EcOrderService;
import org.springblade.modules.eCallEventTwo.service.IECallEventTwoService;
import org.springblade.modules.grid.entity.GridEntity;
import org.springblade.modules.grid.service.IGridService;
import org.springblade.modules.police.entity.PoliceAffairsGridEntity;
import org.springblade.modules.police.service.IPoliceAffairsGridService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
 * EcOrderService业务层处理
 *
 * @author ${context.author}
 * @date 2024-05-27 16:26:59
 */
@Service
public class EcOrderServiceImpl extends ServiceImpl<EcOrderMapper, EcOrder> implements EcOrderService {
    private static final int DEFAULT_SCALE = 2; // 默认保留两位小数
    private static final RoundingMode DEFAULT_ROUNDING_MODE = RoundingMode.HALF_UP; // 默认四舍五入
    @Autowired
    private IECallEventTwoService ecOrderService;
    protected static final Logger log = LoggerFactory.getLogger(EcOrderServiceImpl.class);
    /**
     * 查询工单
     *
     * @param orderId 工单ID
     * @return 工单
     */
    @Override
    public EcOrderDTO selectEcOrderById(Long orderId) {
        return this.baseMapper.selectEcOrderById(orderId);
    }
    /**
     * 查询工单列表
     *
     * @param ecOrderDTO 工单
     * @return 工单集合
     */
    @Override
    public List<EcOrderDTO> selectEcOrderList(EcOrderDTO ecOrderDTO) {
        return this.baseMapper.selectEcOrderList(ecOrderDTO);
    }
    /**
     * 新增工单
     *
     * @param ecOrderDTO 工单
     * @return 结果
     */
    @Override
    public int insertEcOrder(EcOrderDTO ecOrderDTO) {
        return this.baseMapper.insert(ecOrderDTO);
    }
    /**
     * 修改工单
     *
     * @param ecOrderDTO 工单
     * @return 结果
     */
    @Override
    public int updateEcOrder(EcOrderDTO ecOrderDTO) {
        return this.baseMapper.updateById(ecOrderDTO);
    }
    /**
     * 删除工单对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteEcOrderByIds(String ids) {
        return this.removeByIds(Arrays.asList(Convert.toStrArray(ids))) ? 1 : 0;
    }
    /**
     * 删除工单信息
     *
     * @param orderId 工单ID
     * @return 结果
     */
    @Override
    public int deleteEcOrderById(Long orderId) {
        return this.removeById(orderId) ? 1 : 0;
    }
    @Override
    public boolean SynchronizeData(EcOrderParamDTO ecOrderParamDTO) {
        processPages(100, ecOrderParamDTO);
        return true;
    }
    public void processPages(int pageSize, EcOrderParamDTO ecOrderParamDTO) {
        QueryWrapper<EcOrder> ecOrderQueryWrapper = new QueryWrapper<>();
        if (StringUtils.isNotBlank(ecOrderParamDTO.getStartTime()) && StringUtils.isNotEmpty(ecOrderParamDTO.getEndTime())) {
            ecOrderQueryWrapper.between("import_time", ecOrderParamDTO.getStartTime(), ecOrderParamDTO.getEndTime());
        }
        // System.out.println("**********参数**************************" + JSON.toJSONString(ecOrderParamDTO));
        long count = count(ecOrderQueryWrapper);
        System.out.println("**********总数**************************" + count);
        int totalPages = (int) Math.ceil((double) count / pageSize); // 计算总页数
        for (int pageNum = 1; pageNum <= totalPages; pageNum++) {
            Page<EcOrder> page = new Page<>(pageNum, pageSize);
            IPage<EcOrder> resultPage = baseMapper.selectPage(page, ecOrderQueryWrapper);
            List<EcOrder> records = resultPage.getRecords();
            List<ECallEventTwoEntity> recordEntityList = BeanUtil.copy(records, ECallEventTwoEntity.class);
            List<ECallEventTwoEntity> addList = new ArrayList<>();
            List<ECallEventTwoEntity> updateList = new ArrayList<>();
            // 过滤出已同步的订单
            recordEntityList.forEach(record -> {
                long count1 = ecOrderService.count(Wrappers.<ECallEventTwoEntity>lambdaQuery().eq(ECallEventTwoEntity::getOrderCode, record.getOrderCode()));
                if (count1 == 0) {
                    setGridInfo(record);
                    addList.add(record);
                } else {
                    setGridInfo(record);
                    updateList.add(record);
                }
            });
            // 同步订单
            boolean b = false;
            if (addList.size() > 0) {
                b = ecOrderService.saveBatch(addList);
            }
            if (updateList.size() > 0) {
                b = ecOrderService.saveOrUpdateBatch(updateList);
            }
            System.out.println("更新第" + pageNum + "页" + b);
        }
    }
    @Override
    @DS("master")
    public boolean saveEcOrder(List<ECallEventTwoEntity> recordEntityList) {
        return false;
    }
    /**
     * 设置警格网格信息
     *
     * @param ecOrderEntity
     */
    public void setGridInfo(ECallEventTwoEntity ecOrderEntity) {
        try {
            if (ecOrderEntity.getSceneGeoLng() == null || ecOrderEntity.getSceneGeoLat() == null) {
                return;
            }
            // 根据位置设置网格,警格编号
            IGridService gridService = SpringUtils.getBean(IGridService.class);
            IPoliceAffairsGridService policeAffairsGridService = SpringUtils.getBean(IPoliceAffairsGridService.class);
            String point = "'POINT(" + ecOrderEntity.getSceneGeoLng().toString() + " " + ecOrderEntity.getSceneGeoLat().toString() + ")'";
            // 点坐标解析网格
            List<GridEntity> gridEntityList = gridService.spatialAnalysis(point);
            if (gridEntityList.size() > 0) {
                GridEntity gridEntity = gridEntityList.get(0);
                ecOrderEntity.setGridCode(gridEntity.getGridCode());
            }
            // 点坐标解析警格
            List<PoliceAffairsGridEntity> policeAffairsGridEntityList = policeAffairsGridService.spatialAnalysis(point);
            if (policeAffairsGridEntityList.size() > 0) {
                PoliceAffairsGridEntity policeAffairsGridEntity = policeAffairsGridEntityList.get(0);
                ecOrderEntity.setJwGridCode(policeAffairsGridEntity.getJwGridCode());
            }
        } catch (Exception e) {
            System.out.println("获取警格网格信息失败" + e);
        }
    }
    /**
     * 获取单位考核指标
     *
     * @return
     */
    @Override
    public List<Map<String, String>> getUnitAssessmentIndicators() {
        List<Map<String, String>> result = baseMapper.getUnitAssessmentIndicators();
        return result;
    }
    /**
     * 统计办结率
     */
    @Override
    public IPage<EcOrderDTO> getCount(IPage<EcOrderDTO> page, EcOrderParamDTO ecOrderParamDTO) {
        // acpt_org_code
        List<EcOrderDTO> result = baseMapper.getOrgCode(page, ecOrderParamDTO);
        for (EcOrderDTO ecOrderDTO : result) {
            if (ecOrderParamDTO.getTagMain().equals("Y")) {
                ecOrderParamDTO.setSinkOrgCode(ecOrderDTO.getSinkOrgCode());
            } else {
                ecOrderParamDTO.setSubjectOrgCode(ecOrderDTO.getSubjectOrgCode());
            }
            // 统计办结率
            buildRate(ecOrderParamDTO, ecOrderDTO);
            // 获取单位名称
            if (ecOrderParamDTO.getTagMain().equals("Y")) {
                ecOrderDTO.setOrgCode(ecOrderDTO.getSinkOrgCode());
                ecOrderDTO.setOrgName(ecOrderDTO.getSinkOrgName());
            } else {
                ecOrderDTO.setOrgCode(ecOrderDTO.getSubjectOrgCode());
                ecOrderDTO.setOrgName(ecOrderDTO.getSubjectOrgName());
            }
        }
        return page.setRecords(result);
    }
    @NotNull
    private void buildRate(EcOrderParamDTO ecOrderParamDTO, EcOrderDTO ecOrder) {
        // 统计订单
        EcOrderDTO ecOrderDTO = BeanUtil.copy(ecOrderParamDTO, EcOrderDTO.class);
        int i = baseMapper.selectEcOrderCount(ecOrderDTO);
        // 统计派发
        EcDispatchDTO ecDispatchDTO = BeanUtil.copy(ecOrderParamDTO, EcDispatchDTO.class);
        int i1 = baseMapper.selectEcDispatchCount(ecDispatchDTO);
        // 统计处理
        EcHandleDTO ecHandleDTO = BeanUtil.copy(ecOrderParamDTO, EcHandleDTO.class);
        int i2 = baseMapper.selectEcHandleCount(ecHandleDTO);
        // 统计回访
        EcOrderCheckDTO ecOrderCheckDTO = BeanUtil.copy(ecOrderParamDTO, EcOrderCheckDTO.class);
        int i3 = baseMapper.selectEcOrderCheckCount(ecOrderCheckDTO);
        // 统计办结
        EcOrderDoneDTO ecOrderDoneDTO = BeanUtil.copy(ecOrderParamDTO, EcOrderDoneDTO.class);
        int i4 = baseMapper.selectEcOrderDoneCount(ecOrderDoneDTO);
        // 统计答复
        EcOrderRespDTO ecOrderRespDTO = BeanUtil.copy(ecOrderParamDTO, EcOrderRespDTO.class);
        int i5 = baseMapper.selectEcOrderRespCount(ecOrderRespDTO);
        // 统计核实
        EcOrderReviewDTO ecOrderReviewDTO = BeanUtil.copy(ecOrderParamDTO, EcOrderReviewDTO.class);
        int i6 = baseMapper.selectEcOrderReviewCount(ecOrderReviewDTO);
        // 统计督办
        EcOrderSuperviseDTO ecOrderSuperviseDTO = BeanUtil.copy(ecOrderParamDTO, EcOrderSuperviseDTO.class);
        int i7 = baseMapper.selectEcOrderSuperviseCount(ecOrderSuperviseDTO);
        // 工单数    派发单数    办理单数(率)    办结单数(率)    答复单数(率)    回访单数(率)    核实单数    督办单数
        // Map<String, String> result = new HashMap<>();
        // 工单数
        // result.put("orderNumber", String.valueOf(i));
        ecOrder.setOrderNumber(String.valueOf(i));
        // 派发单数(率)
        // result.put("dispatchRate", getRate(i1, i));
        ecOrder.setDispatchRate(getRate(i1, i));
        // result.put("dispatchNumber", String.valueOf(i1));
        ecOrder.setDispatchNumber(String.valueOf(i1));
        // 办理单数(率)
        // result.put("handRate", getRate(i2, i));
        ecOrder.setHandRate(getRate(i2, i));
        // result.put("handNumber", String.valueOf(i2));
        // 办结单数(率)
        // result.put("checkRate", getRate(i3, i));
        ecOrder.setCheckRate(getRate(i3, i));
        // result.put("checkNumber", String.valueOf(i3));
        // 答复单数(率)
        // result.put("doneRate", getRate(i4, i));
        ecOrder.setDoneRate(getRate(i4, i));
        // result.put("doneNumber", String.valueOf(i4));
        // 回访单数(率)
        // result.put("respRate", getRate(i5, i));
        ecOrder.setRespRate(getRate(i5, i));
        // result.put("respNumber", String.valueOf(i5));
        // 核实单数(率)
        // result.put("reviewRate", getRate(i6, i));
        ecOrder.setReviewRate(getRate(i6, i));
        // result.put("reviewNumber", String.valueOf(i6));
        // 督办单数
        // result.put("superviseNumber", String.valueOf(i7));
        ecOrder.setSuperviseNumber(String.valueOf(i7));
        // 返回结果
        // return result;
    }
    public static String getRate(int dividend, int divisor) {
        // 检查除数是否为0
        if (divisor == 0) {
            return "0";
        }
        // 将int转换为BigDecimal
        BigDecimal bdDividend = BigDecimal.valueOf(dividend);
        BigDecimal bdDivisor = BigDecimal.valueOf(divisor);
        // 执行除法操作,设置精度(scale)和舍入模式(RoundingMode)
        int scale = DEFAULT_SCALE;
        RoundingMode roundingMode = DEFAULT_ROUNDING_MODE;
        // 进行除法运算
        BigDecimal result;
        try {
            result = bdDividend.divide(bdDivisor, scale, roundingMode);
        } catch (ArithmeticException e) {
            // 处理因除数为0或其他原因引发的算术异常
            throw new RuntimeException("除法运算出错", e);
        }
        return result.toString();
    }
}
src/main/java/org/springblade/modules/eCallEventTwo/vo/ECallEventTwoVO.java
New file
@@ -0,0 +1,49 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.eCallEventTwo.vo;
import io.swagger.annotations.ApiModelProperty;
import org.springblade.modules.eCallEventTwo.entity.ECallEventTwoEntity;
import org.springblade.core.tool.node.INode;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
 * 工单 视图实体类
 *
 * @author BladeX
 * @since 2024-05-15
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class ECallEventTwoVO extends ECallEventTwoEntity {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = "经度")
    private String lng;
    @ApiModelProperty(value = "纬度")
    private String lat;
    @ApiModelProperty(value = "警务网格编号")
    private String jwGridCode;
    @ApiModelProperty(value = "社区编号")
    private String communityCode;
    @ApiModelProperty(value = "角色名称")
    private String roleName;
}
src/main/java/org/springblade/modules/eCallEventTwo/wrapper/ECallEventTwoWrapper.java
New file
@@ -0,0 +1,50 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.eCallEventTwo.wrapper;
import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.modules.eCallEventTwo.entity.ECallEventTwoEntity;
import org.springblade.modules.eCallEventTwo.vo.ECallEventTwoVO;
import java.util.Objects;
/**
 * 工单 包装类,返回视图层所需的字段
 *
 * @author BladeX
 * @since 2024-05-15
 */
public class ECallEventTwoWrapper extends BaseEntityWrapper<ECallEventTwoEntity, ECallEventTwoVO>  {
    public static ECallEventTwoWrapper build() {
        return new ECallEventTwoWrapper();
     }
    @Override
    public ECallEventTwoVO entityVO(ECallEventTwoEntity eCallEventTwo) {
        ECallEventTwoVO eCallEventTwoVO = Objects.requireNonNull(BeanUtil.copy(eCallEventTwo, ECallEventTwoVO.class));
        //User createUser = UserCache.getUser(eCallEventTwo.getCreateUser());
        //User updateUser = UserCache.getUser(eCallEventTwo.getUpdateUser());
        //eCallEventTwoVO.setCreateUserName(createUser.getName());
        //eCallEventTwoVO.setUpdateUserName(updateUser.getName());
        return eCallEventTwoVO;
    }
}
src/main/java/org/springblade/modules/email/controller/EmailTemplateController.java
New file
@@ -0,0 +1,126 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.email.controller;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import lombok.AllArgsConstructor;
import javax.validation.Valid;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.modules.email.entity.EmailTemplateEntity;
import org.springblade.modules.email.vo.EmailTemplateVO;
import org.springblade.modules.email.wrapper.EmailTemplateWrapper;
import org.springblade.modules.email.service.IEmailTemplateService;
import org.springblade.core.boot.ctrl.BladeController;
/**
 * 邮件模版表 控制器
 *
 * @author BladeX
 * @since 2024-03-04
 */
@RestController
@AllArgsConstructor
@RequestMapping("blade-email/emailTemplate")
@Api(value = "邮件模版表", tags = "邮件模版表接口")
public class EmailTemplateController extends BladeController {
    private final IEmailTemplateService emailTemplateService;
    /**
     * 邮件模版表 详情
     */
    @GetMapping("/detail")
    @ApiOperationSupport(order = 1)
    @ApiOperation(value = "详情", notes = "传入emailTemplate")
    public R<EmailTemplateVO> detail(EmailTemplateEntity emailTemplate) {
        EmailTemplateEntity detail = emailTemplateService.getOne(Condition.getQueryWrapper(emailTemplate));
        return R.data(EmailTemplateWrapper.build().entityVO(detail));
    }
    /**
     * 邮件模版表 分页
     */
    @GetMapping("/list")
    @ApiOperationSupport(order = 2)
    @ApiOperation(value = "分页", notes = "传入emailTemplate")
    public R<IPage<EmailTemplateVO>> list(EmailTemplateEntity emailTemplate, Query query) {
        IPage<EmailTemplateEntity> pages = emailTemplateService.page(Condition.getPage(query), Condition.getQueryWrapper(emailTemplate));
        return R.data(EmailTemplateWrapper.build().pageVO(pages));
    }
    /**
     * 邮件模版表 自定义分页
     */
    @GetMapping("/page")
    @ApiOperationSupport(order = 3)
    @ApiOperation(value = "分页", notes = "传入emailTemplate")
    public R<IPage<EmailTemplateVO>> page(EmailTemplateVO emailTemplate, Query query) {
        IPage<EmailTemplateVO> pages = emailTemplateService.selectEmailTemplatePage(Condition.getPage(query), emailTemplate);
        return R.data(pages);
    }
    /**
     * 邮件模版表 新增
     */
    @PostMapping("/save")
    @ApiOperationSupport(order = 4)
    @ApiOperation(value = "新增", notes = "传入emailTemplate")
    public R save(@Valid @RequestBody EmailTemplateEntity emailTemplate) {
        return R.status(emailTemplateService.save(emailTemplate));
    }
    /**
     * 邮件模版表 修改
     */
    @PostMapping("/update")
    @ApiOperationSupport(order = 5)
    @ApiOperation(value = "修改", notes = "传入emailTemplate")
    public R update(@Valid @RequestBody EmailTemplateEntity emailTemplate) {
        return R.status(emailTemplateService.updateById(emailTemplate));
    }
    /**
     * 邮件模版表 新增或修改
     */
    @PostMapping("/submit")
    @ApiOperationSupport(order = 6)
    @ApiOperation(value = "新增或修改", notes = "传入emailTemplate")
    public R submit(@Valid @RequestBody EmailTemplateEntity emailTemplate) {
        return R.status(emailTemplateService.saveOrUpdate(emailTemplate));
    }
    /**
     * 邮件模版表 删除
     */
    @PostMapping("/remove")
    @ApiOperationSupport(order = 7)
    @ApiOperation(value = "逻辑删除", notes = "传入ids")
    public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
        return R.status(emailTemplateService.removeBatchByIds(Func.toLongList(ids)));
    }
}
src/main/java/org/springblade/modules/email/dto/EmailTemplateDTO.java
New file
@@ -0,0 +1,34 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.email.dto;
import org.springblade.modules.email.entity.EmailTemplateEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
 * 邮件模版表 数据传输对象实体类
 *
 * @author BladeX
 * @since 2024-03-04
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class EmailTemplateDTO extends EmailTemplateEntity {
    private static final long serialVersionUID = 1L;
}
src/main/java/org/springblade/modules/email/entity/EmailTemplateEntity.java
New file
@@ -0,0 +1,79 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.email.entity;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
import java.util.Date;
/**
 * 邮件模版表 实体类
 *
 * @author BladeX
 * @since 2024-03-04
 */
@Data
@TableName("blade_email_template")
@ApiModel(value = "EmailTemplate对象", description = "邮件模版表")
public class EmailTemplateEntity{
    private static final long serialVersionUID = 1L;
    /** id */
    @ApiModelProperty(value = "主键ID", example = "")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;
    /** 标题 */
    @ApiModelProperty(value = "标题", example = "")
    @TableField("title")
    private String title;
    /** 邮件内容 */
    @ApiModelProperty(value = "邮件内容", example = "")
    @TableField("content")
    private String content;
    /** 创建时间 */
    @ApiModelProperty(value = "创建时间", example = "")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private Date createTime;
    /** 更新时间 */
    @ApiModelProperty(value = "更新时间", example = "")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(value = "update_time",fill = FieldFill.UPDATE)
    private Date updateTime;
    /** 是否已删除 */
    @ApiModelProperty(value = "是否已删除", example = "")
    @TableField("is_deleted")
    private Integer isDeleted;
    /** 创建人 */
    @ApiModelProperty(value = "创建人", example = "")
    @TableField("create_by")
    private Long createBy;
}
src/main/java/org/springblade/modules/email/mapper/EmailTemplateMapper.java
New file
@@ -0,0 +1,60 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.email.mapper;
import io.lettuce.core.dynamic.annotation.Param;
import org.springblade.modules.email.dto.EmailTemplateDTO;
import org.springblade.modules.email.entity.EmailTemplateEntity;
import org.springblade.modules.email.vo.EmailTemplateVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List;
/**
 * 邮件模版表 Mapper 接口
 *
 * @author BladeX
 * @since 2024-03-04
 */
public interface EmailTemplateMapper extends BaseMapper<EmailTemplateEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param emailTemplate
     * @return
     */
    List<EmailTemplateVO> selectEmailTemplatePage(IPage page, @Param("emailTemplate") EmailTemplateVO emailTemplate);
    /**
     * 查询
     *
     * @param id ID
     * @return
     */
    public EmailTemplateDTO selectBladeEmailTemplateById(Integer id);
    /**
     * 查询列表
     *
     * @param bladeEmailTemplateDTO
     * @return 集合
     */
    public List<EmailTemplateDTO> selectBladeEmailTemplateList(EmailTemplateDTO bladeEmailTemplateDTO);
}
src/main/java/org/springblade/modules/email/mapper/EmailTemplateMapper.xml
New file
@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.springblade.modules.email.mapper.EmailTemplateMapper">
    <!-- 通用查询映射结果 -->
    <resultMap id="emailTemplateResultMap" type="org.springblade.modules.email.entity.EmailTemplateEntity">
    </resultMap>
    <select id="selectEmailTemplatePage" resultMap="emailTemplateResultMap">
        select * from blade_email_template
        <where>
            <if test="emailTemplate.id != null ">and id = #{emailTemplate.id}</if>
            <if test="emailTemplate.title != null  and emailTemplate.title != ''">and title like CONCAT('%', #{emailTemplate.title},'%')</if>
            <if test="emailTemplate.content != null  and emailTemplate.content != ''">and content = #{emailTemplate.content}</if>
            <if test="emailTemplate.createTime != null ">and create_time = #{emailTemplate.createTime}</if>
            <if test="emailTemplate.updateTime != null ">and update_time = #{emailTemplate.updateTime}</if>
            <if test="emailTemplate.isDeleted != null ">and is_deleted = #{emailTemplate.isDeleted}</if>
            <if test="emailTemplate.createBy != null ">and create_by = #{emailTemplate.createBy}</if>
            and is_deleted = 0
        </where>
    </select>
    <resultMap type="org.springblade.modules.email.dto.EmailTemplateDTO" id="BladeEmailTemplateDTOResult">
        <result property="id" column="id"/>
        <result property="title" column="title"/>
        <result property="content" column="content"/>
        <result property="createTime" column="create_time"/>
        <result property="updateTime" column="update_time"/>
        <result property="isDeleted" column="is_deleted"/>
        <result property="createBy" column="create_by"/>
    </resultMap>
    <sql id="selectBladeEmailTemplate">
        select id,
               title,
               content,
               create_time,
               update_time,
               is_deleted,
               create_by
        from blade_email_template
    </sql>
    <select id="selectBladeEmailTemplateById" parameterType="int" resultMap="BladeEmailTemplateDTOResult">
        <include refid="selectBladeEmailTemplate"/>
        where
        id = #{id}
    </select>
    <select id="selectBladeEmailTemplateList" parameterType="org.springblade.modules.email.dto.EmailTemplateDTO"
            resultMap="BladeEmailTemplateDTOResult">
        <include refid="selectBladeEmailTemplate"/>
        <where>
            <if test="id != null ">and id = #{id}</if>
            <if test="title != null  and title != ''">and title = #{title}</if>
            <if test="content != null  and content != ''">and content = #{content}</if>
            <if test="createTime != null ">and create_time = #{createTime}</if>
            <if test="updateTime != null ">and update_time = #{updateTime}</if>
            <if test="isDeleted != null ">and is_deleted = #{isDeleted}</if>
            <if test="createBy != null ">and create_by = #{createBy}</if>
        </where>
    </select>
</mapper>
src/main/java/org/springblade/modules/email/service/IEmailTemplateService.java
New file
@@ -0,0 +1,60 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.email.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springblade.modules.email.dto.EmailTemplateDTO;
import org.springblade.modules.email.entity.EmailTemplateEntity;
import org.springblade.modules.email.vo.EmailTemplateVO;
import org.springblade.core.mp.base.BaseService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List;
/**
 * 邮件模版表 服务类
 *
 * @author BladeX
 * @since 2024-03-04
 */
public interface IEmailTemplateService extends IService<EmailTemplateEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param emailTemplate
     * @return
     */
    IPage<EmailTemplateVO> selectEmailTemplatePage(IPage<EmailTemplateVO> page, EmailTemplateVO emailTemplate);
    /**
     * 查询
     *
     * @param id ID
     * @return
     */
    public EmailTemplateDTO selectBladeEmailTemplateById(Integer id);
    /**
     * 查询列表
     *
     * @param bladeEmailTemplateDTO
     * @return 集合
     */
    public List<EmailTemplateDTO> selectBladeEmailTemplateList(EmailTemplateDTO bladeEmailTemplateDTO);
}
src/main/java/org/springblade/modules/email/service/impl/EmailTemplateServiceImpl.java
New file
@@ -0,0 +1,71 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.email.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springblade.modules.email.dto.EmailTemplateDTO;
import org.springblade.modules.email.entity.EmailTemplateEntity;
import org.springblade.modules.email.vo.EmailTemplateVO;
import org.springblade.modules.email.mapper.EmailTemplateMapper;
import org.springblade.modules.email.service.IEmailTemplateService;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List;
/**
 * 邮件模版表 服务实现类
 *
 * @author BladeX
 * @since 2024-03-04
 */
@Service
public class EmailTemplateServiceImpl extends ServiceImpl<EmailTemplateMapper, EmailTemplateEntity> implements IEmailTemplateService {
    @Override
    public IPage<EmailTemplateVO> selectEmailTemplatePage(IPage<EmailTemplateVO> page, EmailTemplateVO emailTemplate) {
        return page.setRecords(baseMapper.selectEmailTemplatePage(page, emailTemplate));
    }
    /**
     * 查询
     *
     * @param id ID
     * @return
     */
    @Override
    public EmailTemplateDTO selectBladeEmailTemplateById(Integer id)
    {
        return this.baseMapper.selectBladeEmailTemplateById(id);
    }
    /**
     * 查询列表
     *
     * @param bladeEmailTemplateDTO
     * @return 集合
     */
    @Override
    public List<EmailTemplateDTO> selectBladeEmailTemplateList(EmailTemplateDTO bladeEmailTemplateDTO)
    {
        return this.baseMapper.selectBladeEmailTemplateList(bladeEmailTemplateDTO);
    }
}
src/main/java/org/springblade/modules/email/vo/EmailTemplateVO.java
New file
@@ -0,0 +1,35 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.email.vo;
import org.springblade.modules.email.entity.EmailTemplateEntity;
import org.springblade.core.tool.node.INode;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
 * 邮件模版表 视图实体类
 *
 * @author BladeX
 * @since 2024-03-04
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class EmailTemplateVO extends EmailTemplateEntity {
    private static final long serialVersionUID = 1L;
}
src/main/java/org/springblade/modules/email/wrapper/EmailTemplateWrapper.java
New file
@@ -0,0 +1,50 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.email.wrapper;
import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.modules.email.entity.EmailTemplateEntity;
import org.springblade.modules.email.vo.EmailTemplateVO;
import java.util.Objects;
/**
 * 邮件模版表 包装类,返回视图层所需的字段
 *
 * @author BladeX
 * @since 2024-03-04
 */
public class EmailTemplateWrapper extends BaseEntityWrapper<EmailTemplateEntity, EmailTemplateVO>  {
    public static EmailTemplateWrapper build() {
        return new EmailTemplateWrapper();
     }
    @Override
    public EmailTemplateVO entityVO(EmailTemplateEntity emailTemplate) {
        EmailTemplateVO emailTemplateVO = Objects.requireNonNull(BeanUtil.copy(emailTemplate, EmailTemplateVO.class));
        //User createUser = UserCache.getUser(emailTemplate.getCreateUser());
        //User updateUser = UserCache.getUser(emailTemplate.getUpdateUser());
        //emailTemplateVO.setCreateUserName(createUser.getName());
        //emailTemplateVO.setUpdateUserName(updateUser.getName());
        return emailTemplateVO;
    }
}
src/main/java/org/springblade/modules/grid/excel/GridPatrolRecordExcel.java
New file
@@ -0,0 +1,71 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.grid.excel;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
 * 网格巡查记录表 实体类
 *
 * @author BladeX
 * @since 2023-11-16
 */
@Data
@ColumnWidth(25)
@HeadRowHeight(20)
@ContentRowHeight(18)
public class GridPatrolRecordExcel implements Serializable {
    private static final long serialVersionUID = 1L;
    @ExcelProperty(value = "巡查人名称")
    private String userName;
    @ExcelProperty(value = "街道名称")
    private String townStreetName;
    @ExcelProperty(value = "社区名称")
    private String neiName;
    @ExcelProperty(value = "名称")
    private String name;
    @ExcelProperty(value = "内容")
    private String context;
    @ExcelProperty(value = "巡查时间")
    private Date patrolTime;
    @ExcelProperty(value = "创建时间")
    private Date createTime;
    @ExcelProperty(value = "纬度")
    private String latitude;
    @ExcelProperty(value = "经度")
    private String longitude;
    @ExcelProperty(value = "地址")
    private String location;
}
src/main/java/org/springblade/modules/house/excel/ExportHouseTenantExcel.java
New file
@@ -0,0 +1,93 @@
package org.springblade.modules.house.excel;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springblade.common.excel.ExcelDictConverter;
import org.springblade.common.excel.ExcelDictItem;
import java.io.Serializable;
import java.util.Date;
@Data
@ColumnWidth(25)
@HeadRowHeight(20)
@ContentRowHeight(18)
public class ExportHouseTenantExcel implements Serializable {
    private static final long serialVersionUID = 2L;
    /**
     * 出租屋ID
     */
    @ExcelProperty(value = "房屋地址")
    @ColumnWidth(25)
    private String addressName;
    /**
     * 出租屋ID
     */
    @ExcelProperty(value = "地址编码")
    @ColumnWidth(25)
    private String houseCode;
    /**
     * 姓名
     */
    @ExcelProperty(value = "姓名")
    @ColumnWidth(25)
    private String name;
    /**
     * 联系电话
     */
    @ExcelProperty(value = "联系电话")
    @ColumnWidth(25)
    private String phone;
    /**
     * 身份证
     */
    @ExcelProperty(value = "身份证")
    @ColumnWidth(25)
    private String idCard;
    /**
     * 户籍
     */
    @ExcelProperty(value = "户籍")
    @ColumnWidth(25)
    private String domicile;
    /**
     * 工作单位
     */
    @ExcelProperty(value = "工作单位")
    @ColumnWidth(25)
    private String workUnit;
    /**
     * 备注
     */
    @ExcelProperty(value = "备注")
    @ColumnWidth(25)
    private String remark;
    /** 性别 */
    @ExcelProperty(value = "性别",converter = ExcelDictConverter.class)
    @ExcelDictItem(type = "sex")
    @ColumnWidth(25)
    private Integer gender;
    /** 民族 */
    @ExcelProperty(value = "民族",converter = ExcelDictConverter.class)
    @ExcelDictItem(type = "nationType")
    private Integer ethnicity;
    /** 创建时间 */
    @ExcelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;
}
src/main/java/org/springblade/modules/house/excel/ExportHouseholdExcel.java
New file
@@ -0,0 +1,237 @@
package org.springblade.modules.house.excel;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import lombok.Data;
import org.springblade.common.excel.ExcelDictConverter;
import org.springblade.common.excel.ExcelDictItem;
import org.springblade.common.excel.ExcelDictItemLabel;
import java.io.Serializable;
/**
 * ExportHouseholdExcel
 * 导出住户信息
 * @author Chill
 */
@Data
@ColumnWidth(25)
@HeadRowHeight(20)
@ContentRowHeight(18)
public class ExportHouseholdExcel implements Serializable {
    private static final long serialVersionUID = 2L;
//    /**
//     * 门牌地址编码
//     */
//    @ColumnWidth(25)
//    @ExcelProperty( "门牌地址编码")
//    private String houseCode;
    /** 姓名 */
    @ColumnWidth(15)
    @ExcelProperty( "姓名*")
    private String name;
    /** 性别 1: 男 0:女  2: 未知 */
    @ColumnWidth(15)
    @ExcelProperty( value = "性别",converter = ExcelDictConverter.class)
    @ExcelDictItemLabel(type = "sex")
    @ExcelDictItem(type = "sex")
    private String gender;
    /** 手机号 */
    @ColumnWidth(15)
    @ExcelProperty( "手机号*")
    private String phoneNumber;
    /** 生日 */
    @ColumnWidth(15)
    @ExcelProperty( "生日")
    private String birthday;
    /** 身份证 */
    @ColumnWidth(15)
    @ExcelProperty( "身份证号码")
    private String idCard;
    /** 其他联系方式 */
    @ColumnWidth(15)
    @ExcelProperty( "其他联系方式")
    private String otherContact;
    /** 所属街道 */
    @ColumnWidth(15)
    @ExcelProperty( "所属街道")
    private String townName;
    /** 所属社区 */
    @ColumnWidth(15)
    @ExcelProperty( "所属社区")
    private String communityName;
    /** 所属网格 */
    @ColumnWidth(15)
    @ExcelProperty( "所属网格")
    private String gridName;
    /** 小区名称 */
    @ColumnWidth(15)
    @ExcelProperty( "小区名称")
    private String aoiName;
    /** 与业主关系 */
    @ColumnWidth(15)
    @ExcelProperty( value = "与业主关系*(业主/妻子/丈夫/女儿/儿子/母亲/父亲/.../租户/其他)",converter = ExcelDictConverter.class)
    @ExcelDictItemLabel(type = "roleRelation")
    @ExcelDictItem(type = "roleRelation")
    private String relationship;
    /** 是否主要联系人 1:是  0:否 */
    @ColumnWidth(15)
    @ExcelProperty( value = "是否主要联系人",converter = ExcelDictConverter.class)
    @ExcelDictItemLabel(type = "primaryContactType")
    @ExcelDictItem(type = "primaryContactType")
    private String isPrimaryContact;
    /** 居住状态 1: 是  0:否 */
    @ColumnWidth(15)
    @ExcelProperty( value = "居住状态",converter = ExcelDictConverter.class)
    @ExcelDictItemLabel(type = "residentialStatusType")
    @ExcelDictItem(type = "residentialStatusType")
    private String residentialStatus;
    /** 民族 */
    @ColumnWidth(15)
    @ExcelProperty( value = "民族",converter = ExcelDictConverter.class)
    @ExcelDictItemLabel(type = "nationType")
    @ExcelDictItem(type = "nationType")
    private String ethnicity;
    /** 户籍地址 */
    @ColumnWidth(15)
    @ExcelProperty( "户籍地址")
    private String hukouRegistration;
    /** 现居住地址 */
    @ColumnWidth(15)
    @ExcelProperty( "现居住地址")
    private String currentAddress;
    /** 是否党员  1:党员  2:群众 */
    @ColumnWidth(15)
    @ExcelProperty( value = "是否党员(党员/群众)",converter = ExcelDictConverter.class)
    @ExcelDictItemLabel(type = "partyEmberType")
    @ExcelDictItem(type = "partyEmberType")
    private String partyEmber;
    /** 学历 */
    @ColumnWidth(15)
    @ExcelProperty( value = "学历",converter = ExcelDictConverter.class)
    @ExcelDictItemLabel(type = "educationType")
    @ExcelDictItem(type = "educationType")
    private String education;
    /**
     * 职业类别
     */
    @ColumnWidth(15)
    @ExcelProperty( "职业类别")
    private String occupation;
    /** 工作单位 */
    @ColumnWidth(15)
    @ExcelProperty( "工作单位")
    private String employer;
    /**
     * 工作单位地址
     */
    @ExcelProperty( "工作单位地址")
    private String cmpyRegAddr;
    /** 工作状态 */
    @ColumnWidth(15)
    @ExcelProperty( value = "工作状态(在职/离职/退休/其他)",converter = ExcelDictConverter.class)
    @ExcelDictItemLabel(type = "workStatusType")
    @ExcelDictItem(type = "workStatusType")
    private String workStatus;
    /** 婚姻状态 */
    @ColumnWidth(15)
    @ExcelProperty( value = "婚姻状态(未婚/已婚/离异/丧偶/其他)",converter = ExcelDictConverter.class)
    @ExcelDictItemLabel(type = "marriageStatusType")
    @ExcelDictItem(type = "marriageStatusType")
    private String maritalStatus;
    /**
     * 宗教信仰
     */
    @ColumnWidth(15)
    @ExcelProperty( "宗教信仰")
    private String religiousBelief;
    /**
     * 健康状况    业务字典 healthStatus
     */
    @ColumnWidth(15)
    @ExcelProperty( value = "健康状况(健康/良好/较差)",converter = ExcelDictConverter.class)
    @ExcelDictItemLabel(type = "healthStatus")
    @ExcelDictItem(type = "healthStatus")
    private String healthStatus;
    /**
     * 疾病名称
     */
    @ColumnWidth(15)
    @ExcelProperty( "疾病名称")
    private String diseaseName;
    /**
     * 外出去向
     */
    @ColumnWidth(15)
    @ExcelProperty( "外出去向")
    private String goOutWhere;
    /**
     * 外出原因
     */
    @ColumnWidth(15)
    @ExcelProperty( "外出原因")
    private String goOutReason;
    /**
     * 外出时间
     */
    @ColumnWidth(15)
    @ExcelProperty( "外出时间")
    private String goOutTime;
    /**
     * 外出详址
     */
    @ExcelProperty( "外出详址")
    private String goOutAddr;
    /** 车牌号 */
    @ColumnWidth(15)
    @ExcelProperty( "车牌号")
    private String cardNumber;
    /**
     * 自愿者组织
     */
    @ColumnWidth(15)
    @ExcelProperty( "自愿者组织")
    private String volunteerOrg;
    /** 备注 */
    @ColumnWidth(15)
    @ExcelProperty( "备注")
    private String remark;
    /** 备注 */
    @ColumnWidth(15)
    @ExcelProperty( "标签")
    private String labelName;
}
src/main/java/org/springblade/modules/house/excel/HouseTenantExcel.java
New file
@@ -0,0 +1,86 @@
package org.springblade.modules.house.excel;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import org.springblade.common.excel.ExcelDictConverter;
import org.springblade.common.excel.ExcelDictItem;
import org.springblade.common.excel.ExcelDictItemLabel;
import java.io.Serializable;
@Data
@ColumnWidth(25)
@HeadRowHeight(20)
@ContentRowHeight(18)
public class HouseTenantExcel implements Serializable {
    private static final long serialVersionUID = 2L;
    /**
     * 门牌地址编码
     */
    @ColumnWidth(25)
    @ExcelProperty( "门牌地址编码*")
    private String houseCode;
    /** 姓名 */
    @ColumnWidth(15)
    @ExcelProperty( "姓名*")
    private String name;
    /** 性别 1: 男 0:女  2: 未知 */
    @ColumnWidth(15)
    @ExcelProperty( value = "性别",converter = ExcelDictConverter.class)
    @ExcelDictItemLabel(type = "sex")
    @ExcelDictItem(type = "sex")
    private String gender;
    /** 手机号 */
    @ColumnWidth(15)
    @ExcelProperty( "手机号*")
    private String phoneNumber;
    /** 生日 */
    @ColumnWidth(15)
    @ExcelProperty( "生日")
    private String birthday;
    /** 身份证 */
    @ColumnWidth(15)
    @ExcelProperty( "身份证号码")
    private String idCard;
    /** 与业主关系 */
    @ColumnWidth(15)
    @ExcelProperty( value = "与业主关系*(业主/妻子/丈夫/女儿/儿子/母亲/父亲/.../租户/其他)",converter = ExcelDictConverter.class)
    @ExcelDictItemLabel(type = "roleRelation")
    @ExcelDictItem(type = "roleRelation")
    private String relationship;
    /** 民族 */
    @ColumnWidth(15)
    @ExcelProperty( value = "民族",converter = ExcelDictConverter.class)
    @ExcelDictItemLabel(type = "nationType")
    @ExcelDictItem(type = "nationType")
    private String ethnicity;
    /** 户籍地址 */
    @ColumnWidth(15)
    @ExcelProperty( "户籍地址")
    private String hukouRegistration;
    /** 工作单位 */
    @ColumnWidth(15)
    @ExcelProperty( "工作单位")
    private String employer;
}
src/main/java/org/springblade/modules/house/excel/ImportTenantHouseholdExcel.java
New file
@@ -0,0 +1,90 @@
package org.springblade.modules.house.excel;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import lombok.Data;
import org.springblade.common.excel.ExcelDictConverter;
import org.springblade.common.excel.ExcelDictItem;
import org.springblade.common.excel.ExcelDictItemLabel;
import java.io.Serializable;
/**
 * ImportHouseHoldExcel
 *
 * @author Chill
 */
@Data
@ColumnWidth(25)
@HeadRowHeight(20)
@ContentRowHeight(18)
public class ImportTenantHouseholdExcel implements Serializable {
    private static final long serialVersionUID = 2L;
    /**
     * 门牌地址编码
     */
    @ColumnWidth(25)
    @ExcelProperty( "门牌地址编码*")
    private String houseCode;
    /** 姓名 */
    @ColumnWidth(15)
    @ExcelProperty( "姓名*")
    private String name;
    /** 性别 1: 男 0:女  2: 未知 */
    @ColumnWidth(15)
    @ExcelProperty( value = "性别",converter = ExcelDictConverter.class)
    @ExcelDictItemLabel(type = "sex")
    @ExcelDictItem(type = "sex")
    private String gender;
    /** 手机号 */
    @ColumnWidth(15)
    @ExcelProperty( "手机号*")
    private String phoneNumber;
    /** 生日 */
    @ColumnWidth(15)
    @ExcelProperty( "生日")
    private String birthday;
    /** 身份证 */
    @ColumnWidth(15)
    @ExcelProperty( "身份证号码")
    private String idCard;
    /** 与业主关系 */
    @ColumnWidth(15)
    @ExcelProperty( value = "与业主关系*(业主/妻子/丈夫/女儿/儿子/母亲/父亲/.../租户/其他)",converter = ExcelDictConverter.class)
    @ExcelDictItemLabel(type = "roleRelation")
    @ExcelDictItem(type = "roleRelation")
    private String relationship;
    /** 民族 */
    @ColumnWidth(15)
    @ExcelProperty( value = "民族",converter = ExcelDictConverter.class)
    @ExcelDictItemLabel(type = "nationType")
    @ExcelDictItem(type = "nationType")
    private String ethnicity;
    /** 户籍地址 */
    @ColumnWidth(15)
    @ExcelProperty( "户籍地址")
    private String hukouRegistration;
    /** 工作单位 */
    @ColumnWidth(15)
    @ExcelProperty( "工作单位")
    private String employer;
}
src/main/java/org/springblade/modules/house/vo/AddHouseholdVO.java
New file
@@ -0,0 +1,11 @@
package org.springblade.modules.house.vo;
import lombok.Data;
import java.util.List;
@Data
public class AddHouseholdVO {
    private List<HouseholdVO> householdVOList;
}
src/main/java/org/springblade/modules/issueClazz/controller/IssueClazzController.java
New file
@@ -0,0 +1,140 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.issueClazz.controller;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import lombok.AllArgsConstructor;
import javax.validation.Valid;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springblade.modules.system.vo.DeptVO;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.modules.issueClazz.entity.IssueClazzEntity;
import org.springblade.modules.issueClazz.vo.IssueClazzVO;
import org.springblade.modules.issueClazz.wrapper.IssueClazzWrapper;
import org.springblade.modules.issueClazz.service.IIssueClazzService;
import org.springblade.core.boot.ctrl.BladeController;
import java.util.List;
/**
 * E呼即办 归口文档 控制器
 *
 * @author BladeX
 * @since 2024-05-16
 */
@RestController
@AllArgsConstructor
@RequestMapping("blade-issueClazz/issueClazz")
@Api(value = "E呼即办 归口文档", tags = "E呼即办 归口文档接口")
public class IssueClazzController extends BladeController {
    private final IIssueClazzService issueClazzService;
    /**
     * E呼即办 归口文档 详情
     */
    @GetMapping("/detail")
    @ApiOperationSupport(order = 1)
    @ApiOperation(value = "详情", notes = "传入issueClazz")
    public R<IssueClazzVO> detail(IssueClazzEntity issueClazz) {
        IssueClazzEntity detail = issueClazzService.getOne(Condition.getQueryWrapper(issueClazz));
        return R.data(IssueClazzWrapper.build().entityVO(detail));
    }
    /**
     * E呼即办 归口文档 分页
     */
    @GetMapping("/list")
    @ApiOperationSupport(order = 2)
    @ApiOperation(value = "分页", notes = "传入issueClazz")
    public R<IPage<IssueClazzVO>> list(IssueClazzEntity issueClazz, Query query) {
        IPage<IssueClazzEntity> pages = issueClazzService.page(Condition.getPage(query), Condition.getQueryWrapper(issueClazz));
        return R.data(IssueClazzWrapper.build().pageVO(pages));
    }
    /**
     * E呼即办 归口文档 自定义分页
     */
    @GetMapping("/page")
    @ApiOperationSupport(order = 3)
    @ApiOperation(value = "分页", notes = "传入issueClazz")
    public R<IPage<IssueClazzVO>> page(IssueClazzVO issueClazz, Query query) {
        IPage<IssueClazzVO> pages = issueClazzService.selectIssueClazzPage(Condition.getPage(query), issueClazz);
        return R.data(pages);
    }
    /**
     * E呼即办 归口文档 新增
     */
    @PostMapping("/save")
    @ApiOperationSupport(order = 4)
    @ApiOperation(value = "新增", notes = "传入issueClazz")
    public R save(@Valid @RequestBody IssueClazzEntity issueClazz) {
        return R.status(issueClazzService.save(issueClazz));
    }
    /**
     * E呼即办 归口文档 修改
     */
    @PostMapping("/update")
    @ApiOperationSupport(order = 5)
    @ApiOperation(value = "修改", notes = "传入issueClazz")
    public R update(@Valid @RequestBody IssueClazzEntity issueClazz) {
        return R.status(issueClazzService.updateById(issueClazz));
    }
    /**
     * E呼即办 归口文档 新增或修改
     */
    @PostMapping("/submit")
    @ApiOperationSupport(order = 6)
    @ApiOperation(value = "新增或修改", notes = "传入issueClazz")
    public R submit(@Valid @RequestBody IssueClazzEntity issueClazz) {
        return R.status(issueClazzService.saveOrUpdate(issueClazz));
    }
    /**
     * E呼即办 归口文档 删除
     */
    @PostMapping("/remove")
    @ApiOperationSupport(order = 7)
    @ApiOperation(value = "逻辑删除", notes = "传入ids")
    public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
        return R.status(issueClazzService.removeBatchByIds(Func.toLongList(ids)));
    }
    /**
     * 获取部门树形结构
     */
    @GetMapping("/tree")
    @ApiOperationSupport(order = 4)
    @ApiOperation(value = "树形结构", notes = "树形结构")
    public R<List<IssueClazzVO>> tree() {
        List<IssueClazzVO> tree = issueClazzService.tree();
        return R.data(tree);
    }
}
src/main/java/org/springblade/modules/issueClazz/dto/IssueClazzDTO.java
New file
@@ -0,0 +1,48 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.issueClazz.dto;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * E呼即办 归口文档 数据传输对象实体类
 *
 * @author BladeX
 * @since 2024-05-16
 */
@Data
public class IssueClazzDTO {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = "主键ID", example = "")
    @TableId(value = "code", type = IdType.ASSIGN_UUID)
    private String code;
    @ApiModelProperty(value = "", example = "")
    @TableField("name")
    private String name;
    @ApiModelProperty(value = "", example = "")
    @TableField("parent_code")
    private String parentCode;
}
src/main/java/org/springblade/modules/issueClazz/entity/IssueClazzEntity.java
New file
@@ -0,0 +1,53 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.issueClazz.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
/**
 * E呼即办 归口文档 实体类
 *
 * @author BladeX
 * @since 2024-05-16
 */
@Data
@TableName("jczz_issue_clazz")
@ApiModel(value = "IssueClazz对象", description = "E呼即办 归口文档")
public class IssueClazzEntity  {
    @ApiModelProperty(value = "主键ID", example = "")
    @TableId(value = "code", type = IdType.ASSIGN_UUID)
    private String code;
    @ApiModelProperty(value = "", example = "")
    @TableField("name")
    private String name;
    @ApiModelProperty(value = "", example = "")
    @TableField("parent_code")
    private String parentCode;
}
src/main/java/org/springblade/modules/issueClazz/mapper/IssueClazzMapper.java
New file
@@ -0,0 +1,44 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.issueClazz.mapper;
import org.springblade.modules.issueClazz.entity.IssueClazzEntity;
import org.springblade.modules.issueClazz.vo.IssueClazzVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List;
/**
 * E呼即办 归口文档 Mapper 接口
 *
 * @author BladeX
 * @since 2024-05-16
 */
public interface IssueClazzMapper extends BaseMapper<IssueClazzEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param issueClazz
     * @return
     */
    List<IssueClazzVO> selectIssueClazzPage(IPage page, IssueClazzVO issueClazz);
    List<IssueClazzVO> tree();
}
src/main/java/org/springblade/modules/issueClazz/mapper/IssueClazzMapper.xml
New file
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.springblade.modules.issueClazz.mapper.IssueClazzMapper">
    <!-- 通用查询映射结果 -->
    <resultMap id="issueClazzResultMap" type="org.springblade.modules.issueClazz.entity.IssueClazzEntity">
    </resultMap>
    <select id="selectIssueClazzPage" resultMap="issueClazzResultMap">
        select * from jczz_issue_clazz where is_deleted = 0
    </select>
    <resultMap id="treeNodeResultMap" type="org.springblade.core.tool.node.TreeNode">
        <id column="id" property="id"/>
<!--        <result column="parent_id" property="parentId"/>-->
        <result column="title" property="title"/>
        <result column="value" property="value"/>
        <result column="key" property="key"/>
        <result column="has_children" property="hasChildren"/>
    </resultMap>
    <select id="tree" resultMap="treeNodeResultMap">
        SELECT CODE        id,
               NAME AS     title,
               CODE AS     "value",
               CODE AS     "key",
               parent_code parentId
        FROM jczz_issue_clazz
    </select>
</mapper>
src/main/java/org/springblade/modules/issueClazz/service/IIssueClazzService.java
New file
@@ -0,0 +1,46 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.issueClazz.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springblade.modules.issueClazz.entity.IssueClazzEntity;
import org.springblade.modules.issueClazz.vo.IssueClazzVO;
import org.springblade.core.mp.base.BaseService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List;
/**
 * E呼即办 归口文档 服务类
 *
 * @author BladeX
 * @since 2024-05-16
 */
public interface IIssueClazzService extends IService<IssueClazzEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param issueClazz
     * @return
     */
    IPage<IssueClazzVO> selectIssueClazzPage(IPage<IssueClazzVO> page, IssueClazzVO issueClazz);
    List<IssueClazzVO> tree();
}
src/main/java/org/springblade/modules/issueClazz/service/impl/IssueClazzServiceImpl.java
New file
@@ -0,0 +1,51 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.issueClazz.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springblade.core.tool.node.ForestNodeMerger;
import org.springblade.modules.issueClazz.entity.IssueClazzEntity;
import org.springblade.modules.issueClazz.vo.IssueClazzVO;
import org.springblade.modules.issueClazz.mapper.IssueClazzMapper;
import org.springblade.modules.issueClazz.service.IIssueClazzService;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.modules.system.vo.DeptVO;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List;
/**
 * E呼即办 归口文档 服务实现类
 *
 * @author BladeX
 * @since 2024-05-16
 */
@Service
public class IssueClazzServiceImpl extends ServiceImpl<IssueClazzMapper, IssueClazzEntity> implements IIssueClazzService {
    @Override
    public IPage<IssueClazzVO> selectIssueClazzPage(IPage<IssueClazzVO> page, IssueClazzVO issueClazz) {
        return page.setRecords(baseMapper.selectIssueClazzPage(page, issueClazz));
    }
    @Override
    public List<IssueClazzVO> tree() {
        List<IssueClazzVO> tree = baseMapper.tree();
        return ForestNodeMerger.merge(tree);
    }
}
src/main/java/org/springblade/modules/issueClazz/vo/IssueClazzVO.java
New file
@@ -0,0 +1,93 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.issueClazz.vo;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import org.springblade.modules.issueClazz.entity.IssueClazzEntity;
import org.springblade.core.tool.node.INode;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.modules.system.vo.DeptVO;
import java.util.ArrayList;
import java.util.List;
/**
 * E呼即办 归口文档 视图实体类
 *
 * @author BladeX
 * @since 2024-05-16
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class IssueClazzVO extends IssueClazzEntity  implements INode<IssueClazzVO> {
    private static final long serialVersionUID = 1L;
    /**
     * 主键ID
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;
    /**
     * 父节点ID
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long parentId;
    @JsonSerialize(using = ToStringSerializer.class)
    private String title;
    /**
     * 子孙节点
     */
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<IssueClazzVO> children;
    /**
     * 是否有子孙节点
     */
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private Boolean hasChildren;
    @Override
    public List<IssueClazzVO> getChildren() {
        if (this.children == null) {
            this.children = new ArrayList<>();
        }
        return this.children;
    }
    /**
     * 上级机构
     */
    private String parentName;
    /**
     * 机构类型名称
     */
    private String deptCategoryName;
    private Boolean disabled;
    /**
     * 保持树型结构统一
     */
    private String name;
}
src/main/java/org/springblade/modules/issueClazz/wrapper/IssueClazzWrapper.java
New file
@@ -0,0 +1,50 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.issueClazz.wrapper;
import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.modules.issueClazz.entity.IssueClazzEntity;
import org.springblade.modules.issueClazz.vo.IssueClazzVO;
import java.util.Objects;
/**
 * E呼即办 归口文档 包装类,返回视图层所需的字段
 *
 * @author BladeX
 * @since 2024-05-16
 */
public class IssueClazzWrapper extends BaseEntityWrapper<IssueClazzEntity, IssueClazzVO>  {
    public static IssueClazzWrapper build() {
        return new IssueClazzWrapper();
     }
    @Override
    public IssueClazzVO entityVO(IssueClazzEntity issueClazz) {
        IssueClazzVO issueClazzVO = Objects.requireNonNull(BeanUtil.copy(issueClazz, IssueClazzVO.class));
        //User createUser = UserCache.getUser(issueClazz.getCreateUser());
        //User updateUser = UserCache.getUser(issueClazz.getUpdateUser());
        //issueClazzVO.setCreateUserName(createUser.getName());
        //issueClazzVO.setUpdateUserName(updateUser.getName());
        return issueClazzVO;
    }
}
src/main/java/org/springblade/modules/nursingCheckIn/controller/NursingCheckInController.java
New file
@@ -0,0 +1,126 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.nursingCheckIn.controller;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import lombok.AllArgsConstructor;
import javax.validation.Valid;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.modules.nursingCheckIn.entity.NursingCheckInEntity;
import org.springblade.modules.nursingCheckIn.vo.NursingCheckInVO;
import org.springblade.modules.nursingCheckIn.wrapper.NursingCheckInWrapper;
import org.springblade.modules.nursingCheckIn.service.INursingCheckInService;
import org.springblade.core.boot.ctrl.BladeController;
/**
 * 护学打卡 控制器
 *
 * @author BladeX
 * @since 2024-04-18
 */
@RestController
@AllArgsConstructor
@RequestMapping("blade-nursingCheckIn/nursingCheckIn")
@Api(value = "护学打卡", tags = "护学打卡接口")
public class NursingCheckInController extends BladeController {
    private final INursingCheckInService nursingCheckInService;
    /**
     * 护学打卡 详情
     */
    @GetMapping("/detail")
    @ApiOperationSupport(order = 1)
    @ApiOperation(value = "详情", notes = "传入nursingCheckIn")
    public R<NursingCheckInVO> detail(NursingCheckInEntity nursingCheckIn) {
        NursingCheckInEntity detail = nursingCheckInService.getOne(Condition.getQueryWrapper(nursingCheckIn));
        return R.data(NursingCheckInWrapper.build().entityVO(detail));
    }
    /**
     * 护学打卡 分页
     */
    @GetMapping("/list")
    @ApiOperationSupport(order = 2)
    @ApiOperation(value = "分页", notes = "传入nursingCheckIn")
    public R<IPage<NursingCheckInVO>> list(NursingCheckInEntity nursingCheckIn, Query query) {
        IPage<NursingCheckInEntity> pages = nursingCheckInService.page(Condition.getPage(query), Condition.getQueryWrapper(nursingCheckIn));
        return R.data(NursingCheckInWrapper.build().pageVO(pages));
    }
    /**
     * 护学打卡 自定义分页
     */
    @GetMapping("/page")
    @ApiOperationSupport(order = 3)
    @ApiOperation(value = "分页", notes = "传入nursingCheckIn")
    public R<IPage<NursingCheckInVO>> page(NursingCheckInVO nursingCheckIn, Query query) {
        IPage<NursingCheckInVO> pages = nursingCheckInService.selectNursingCheckInPage(Condition.getPage(query), nursingCheckIn);
        return R.data(pages);
    }
    /**
     * 护学打卡 新增
     */
    @PostMapping("/save")
    @ApiOperationSupport(order = 4)
    @ApiOperation(value = "新增", notes = "传入nursingCheckIn")
    public R save(@Valid @RequestBody NursingCheckInEntity nursingCheckIn) {
        return R.status(nursingCheckInService.save(nursingCheckIn));
    }
    /**
     * 护学打卡 修改
     */
    @PostMapping("/update")
    @ApiOperationSupport(order = 5)
    @ApiOperation(value = "修改", notes = "传入nursingCheckIn")
    public R update(@Valid @RequestBody NursingCheckInEntity nursingCheckIn) {
        return R.status(nursingCheckInService.updateById(nursingCheckIn));
    }
    /**
     * 护学打卡 新增或修改
     */
    @PostMapping("/submit")
    @ApiOperationSupport(order = 6)
    @ApiOperation(value = "新增或修改", notes = "传入nursingCheckIn")
    public R submit(@Valid @RequestBody NursingCheckInEntity nursingCheckIn) {
        return R.status(nursingCheckInService.saveOrUpdate(nursingCheckIn));
    }
    /**
     * 护学打卡 删除
     */
    @PostMapping("/remove")
    @ApiOperationSupport(order = 7)
    @ApiOperation(value = "逻辑删除", notes = "传入ids")
    public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
        return R.status(nursingCheckInService.removeBatchByIds(Func.toLongList(ids)));
    }
}
src/main/java/org/springblade/modules/nursingCheckIn/dto/NursingCheckInDTO.java
New file
@@ -0,0 +1,34 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.nursingCheckIn.dto;
import org.springblade.modules.nursingCheckIn.entity.NursingCheckInEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
 * 护学打卡 数据传输对象实体类
 *
 * @author BladeX
 * @since 2024-04-18
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class NursingCheckInDTO extends NursingCheckInEntity {
    private static final long serialVersionUID = 1L;
}
src/main/java/org/springblade/modules/nursingCheckIn/entity/NursingCheckInEntity.java
New file
@@ -0,0 +1,110 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.nursingCheckIn.entity;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
import java.util.Date;
/**
 * 护学打卡 实体类
 *
 * @author BladeX
 * @since 2024-04-18
 */
@Data
@TableName("jczz_nursing_check_in")
@ApiModel(value = "NursingCheckIn对象", description = "护学打卡")
public class NursingCheckInEntity   {
    /** id */
    @ApiModelProperty(value = "主键ID", example = "")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;
    /** 创建人 */
    @ApiModelProperty(value = "创建人", example = "")
    @TableField("create_user")
    private Long createUser;
    /** 定位地址 */
    @ApiModelProperty(value = "定位地址", example = "")
    @TableField("location")
    private String location;
    /** 家长名称 */
    @ApiModelProperty(value = "家长名称", example = "")
    @TableField("name")
    private String name;
    /** 家长电话 */
    @ApiModelProperty(value = "家长电话", example = "")
    @TableField("phone")
    private String phone;
    /** 年级与班级 */
    @ApiModelProperty(value = "年级与班级", example = "")
    @TableField("grade_and_class")
    private String gradeAndClass;
    /** 图片 */
    @ApiModelProperty(value = "图片", example = "")
    @TableField("images")
    private String images;
    /** 场所id */
    @ApiModelProperty(value = "场所id", example = "")
    @TableField("place_id")
    private Long placeId;
    /** 1:民警 2:家长 */
    @ApiModelProperty(value = "1:民警 2:家长", example = "")
    @TableField("type")
    private String type;
    /** 创建时间 */
    @ApiModelProperty(value = "创建时间", example = "")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private Date createTime;
    /** 经度 */
    @ApiModelProperty(value = "经度", example = "")
    @TableField("longitude")
    private String longitude;
    /** 纬度 */
    @ApiModelProperty(value = "纬度", example = "")
    @TableField("latitude")
    private String latitude;
    /** 地址编码 */
    @ApiModelProperty(value = "地址编码", example = "")
    @TableField("house_code")
    private String houseCode;
    /** 场所名称 */
    @ApiModelProperty(value = "场所名称", example = "")
    @TableField("place_name")
    private String placeName;
}
src/main/java/org/springblade/modules/nursingCheckIn/mapper/NursingCheckInMapper.java
New file
@@ -0,0 +1,43 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.nursingCheckIn.mapper;
import org.springblade.modules.nursingCheckIn.entity.NursingCheckInEntity;
import org.springblade.modules.nursingCheckIn.vo.NursingCheckInVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List;
/**
 * 护学打卡 Mapper 接口
 *
 * @author BladeX
 * @since 2024-04-18
 */
public interface NursingCheckInMapper extends BaseMapper<NursingCheckInEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param nursingCheckIn
     * @return
     */
    List<NursingCheckInVO> selectNursingCheckInPage(IPage page, NursingCheckInVO nursingCheckIn);
}
src/main/java/org/springblade/modules/nursingCheckIn/mapper/NursingCheckInMapper.xml
New file
@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.springblade.modules.nursingCheckIn.mapper.NursingCheckInMapper">
    <!-- 通用查询映射结果 -->
    <resultMap id="nursingCheckInResultMap" type="org.springblade.modules.nursingCheckIn.entity.NursingCheckInEntity">
    </resultMap>
    <select id="selectNursingCheckInPage" resultMap="nursingCheckInResultMap">
        select * from jczz_nursing_check_in
        <where>
            <if test="nursingCheckIn.id != null ">and id = #{nursingCheckIn.id}</if>
            <if test="nursingCheckIn.createUser != null ">and create_user = #{nursingCheckIn.createUser}</if>
            <if test="nursingCheckIn.location != null  and nursingCheckIn.location != ''">and location = #{nursingCheckIn.location}</if>
            <if test="nursingCheckIn.name != null  and nursingCheckIn.name != ''">and name like concat('%',#{nursingCheckIn.name},'%')</if>
            <if test="nursingCheckIn.phone != null  and nursingCheckIn.phone != ''">and phone like concat('%',#{nursingCheckIn.phone},'%')</if>
            <if test="nursingCheckIn.gradeAndClass != null  and nursingCheckIn.gradeAndClass != ''">and grade_and_class = #{nursingCheckIn.gradeAndClass}</if>
            <if test="nursingCheckIn.images != null  and nursingCheckIn.images != ''">and images = #{nursingCheckIn.images}</if>
            <if test="nursingCheckIn.placeId != null ">and place_id = #{nursingCheckIn.placeId}</if>
            <if test="nursingCheckIn.type != null  and nursingCheckIn.type != ''">and type = #{nursingCheckIn.type}</if>
            <if test="nursingCheckIn.startTime != null and nursingCheckIn.startTime != '' and nursingCheckIn.endTime != null and nursingCheckIn.endTime != '' ">
                AND create_time BETWEEN #{nursingCheckIn.startTime} and #{nursingCheckIn.endTime}
            </if>
        </where>
        order by id desc
    </select>
    <resultMap type="org.springblade.modules.nursingCheckIn.dto.NursingCheckInDTO" id="NursingCheckInDTOResult">
        <result property="id"    column="id"    />
        <result property="createUser"    column="create_user"    />
        <result property="location"    column="location"    />
        <result property="name"    column="name"    />
        <result property="phone"    column="phone"    />
        <result property="gradeAndClass"    column="grade_and_class"    />
        <result property="images"    column="images"    />
        <result property="placeId"    column="place_id"    />
        <result property="type"    column="type"    />
    </resultMap>
    <sql id="selectNursingCheckIn">
        select
            id,
            create_user,
            location,
            name,
            phone,
            grade_and_class,
            images,
            place_id,
            type
        from
            jczz_nursing_check_in
    </sql>
<!--    <select id="selectNursingCheckInById" parameterType="long" resultMap="NursingCheckInDTOResult">-->
<!--        <include refid="selectNursingCheckIn"/>-->
<!--        where-->
<!--        id = #{id}-->
<!--    </select>-->
<!--    <select id="selectNursingCheckInList" parameterType="org.springblade.modules..dto.NursingCheckInDTO" resultMap="NursingCheckInDTOResult">-->
<!--        <include refid="selectNursingCheckIn"/>-->
<!--        <where>-->
<!--            <if test="id != null "> and id = #{id}</if>-->
<!--            <if test="createUser != null "> and create_user = #{createUser}</if>-->
<!--            <if test="location != null  and location != ''"> and location = #{location}</if>-->
<!--            <if test="name != null  and name != ''"> and name = #{name}</if>-->
<!--            <if test="phone != null  and phone != ''"> and phone = #{phone}</if>-->
<!--            <if test="gradeAndClass != null  and gradeAndClass != ''"> and grade_and_class = #{gradeAndClass}</if>-->
<!--            <if test="images != null  and images != ''"> and images = #{images}</if>-->
<!--            <if test="placeId != null "> and place_id = #{placeId}</if>-->
<!--            <if test="type != null  and type != ''"> and type = #{type}</if>-->
<!--        </where>-->
<!--    </select>-->
</mapper>
src/main/java/org/springblade/modules/nursingCheckIn/service/INursingCheckInService.java
New file
@@ -0,0 +1,43 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.nursingCheckIn.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springblade.modules.nursingCheckIn.entity.NursingCheckInEntity;
import org.springblade.modules.nursingCheckIn.vo.NursingCheckInVO;
import org.springblade.core.mp.base.BaseService;
import com.baomidou.mybatisplus.core.metadata.IPage;
/**
 * 护学打卡 服务类
 *
 * @author BladeX
 * @since 2024-04-18
 */
public interface INursingCheckInService extends IService<NursingCheckInEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param nursingCheckIn
     * @return
     */
    IPage<NursingCheckInVO> selectNursingCheckInPage(IPage<NursingCheckInVO> page, NursingCheckInVO nursingCheckIn);
}
src/main/java/org/springblade/modules/nursingCheckIn/service/impl/NursingCheckInServiceImpl.java
New file
@@ -0,0 +1,43 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.nursingCheckIn.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springblade.modules.nursingCheckIn.entity.NursingCheckInEntity;
import org.springblade.modules.nursingCheckIn.vo.NursingCheckInVO;
import org.springblade.modules.nursingCheckIn.mapper.NursingCheckInMapper;
import org.springblade.modules.nursingCheckIn.service.INursingCheckInService;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;
/**
 * 护学打卡 服务实现类
 *
 * @author BladeX
 * @since 2024-04-18
 */
@Service
public class NursingCheckInServiceImpl extends ServiceImpl<NursingCheckInMapper, NursingCheckInEntity> implements INursingCheckInService {
    @Override
    public IPage<NursingCheckInVO> selectNursingCheckInPage(IPage<NursingCheckInVO> page, NursingCheckInVO nursingCheckIn) {
        return page.setRecords(baseMapper.selectNursingCheckInPage(page, nursingCheckIn));
    }
}
src/main/java/org/springblade/modules/nursingCheckIn/vo/NursingCheckInVO.java
New file
@@ -0,0 +1,42 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.nursingCheckIn.vo;
import io.swagger.annotations.ApiModelProperty;
import org.springblade.modules.nursingCheckIn.entity.NursingCheckInEntity;
import org.springblade.core.tool.node.INode;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
 * 护学打卡 视图实体类
 *
 * @author BladeX
 * @since 2024-04-18
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class NursingCheckInVO extends NursingCheckInEntity {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty("开始时间")
    private String startTime;
    @ApiModelProperty("结束时间")
    private String endTime;
}
src/main/java/org/springblade/modules/nursingCheckIn/wrapper/NursingCheckInWrapper.java
New file
@@ -0,0 +1,50 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.nursingCheckIn.wrapper;
import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.modules.nursingCheckIn.entity.NursingCheckInEntity;
import org.springblade.modules.nursingCheckIn.vo.NursingCheckInVO;
import java.util.Objects;
/**
 * 护学打卡 包装类,返回视图层所需的字段
 *
 * @author BladeX
 * @since 2024-04-18
 */
public class NursingCheckInWrapper extends BaseEntityWrapper<NursingCheckInEntity, NursingCheckInVO>  {
    public static NursingCheckInWrapper build() {
        return new NursingCheckInWrapper();
     }
    @Override
    public NursingCheckInVO entityVO(NursingCheckInEntity nursingCheckIn) {
        NursingCheckInVO nursingCheckInVO = Objects.requireNonNull(BeanUtil.copy(nursingCheckIn, NursingCheckInVO.class));
        //User createUser = UserCache.getUser(nursingCheckIn.getCreateUser());
        //User updateUser = UserCache.getUser(nursingCheckIn.getUpdateUser());
        //nursingCheckInVO.setCreateUserName(createUser.getName());
        //nursingCheckInVO.setUpdateUserName(updateUser.getName());
        return nursingCheckInVO;
    }
}
src/main/java/org/springblade/modules/pay/controller/OrderInfoController.java
New file
@@ -0,0 +1,135 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.pay.controller;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import lombok.AllArgsConstructor;
import javax.validation.Valid;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springblade.modules.pay.entity.OrderInfoEntity;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.modules.pay.vo.OrderInfoVO;
import org.springblade.modules.pay.wrapper.OrderInfoWrapper;
import org.springblade.modules.pay.service.IOrderInfoService;
import org.springblade.core.boot.ctrl.BladeController;
/**
 * 订单信息 控制器
 *
 * @author BladeX
 * @since 2024-04-07
 */
@RestController
@AllArgsConstructor
@RequestMapping("blade-orderInfo/orderInfo")
@Api(value = "订单信息", tags = "订单信息接口")
public class OrderInfoController extends BladeController {
    private final IOrderInfoService orderInfoService;
    /**
     * 订单信息 详情
     */
    @GetMapping("/detail")
    @ApiOperationSupport(order = 1)
    @ApiOperation(value = "详情", notes = "传入orderInfo")
    public R<OrderInfoVO> detail(OrderInfoEntity orderInfo) {
        OrderInfoEntity detail = orderInfoService.getOne(Condition.getQueryWrapper(orderInfo));
        return R.data(OrderInfoWrapper.build().entityVO(detail));
    }
    /**
     * 订单信息 分页
     */
    @GetMapping("/list")
    @ApiOperationSupport(order = 2)
    @ApiOperation(value = "分页", notes = "传入orderInfo")
    public R<IPage<OrderInfoVO>> list(OrderInfoEntity orderInfo, Query query) {
        IPage<OrderInfoEntity> pages = orderInfoService.page(Condition.getPage(query), Condition.getQueryWrapper(orderInfo));
        return R.data(OrderInfoWrapper.build().pageVO(pages));
    }
    /**
     * 订单信息 自定义分页
     */
    @GetMapping("/page")
    @ApiOperationSupport(order = 3)
    @ApiOperation(value = "分页", notes = "传入orderInfo")
    public R<IPage<OrderInfoVO>> page(OrderInfoVO orderInfo, Query query) {
        IPage<OrderInfoVO> pages = orderInfoService.selectOrderInfoPage(Condition.getPage(query), orderInfo);
        return R.data(pages);
    }
    /**
     * 订单信息 新增
     */
    @PostMapping("/save")
    @ApiOperationSupport(order = 4)
    @ApiOperation(value = "新增", notes = "传入orderInfo")
    public R save(@Valid @RequestBody OrderInfoEntity orderInfo) {
        return R.status(orderInfoService.save(orderInfo));
    }
    /**
     * 创建订单信息
     */
    @PostMapping("/add")
    @ApiOperationSupport(order = 4)
    @ApiOperation(value = "新增", notes = "传入orderInfo")
    public R save(@RequestParam Long propertyChargeRecordId) {
        return R.data(orderInfoService.createOrderByPropertyChargeRecordId(propertyChargeRecordId));
    }
    /**
     * 订单信息 修改
     */
    @PostMapping("/update")
    @ApiOperationSupport(order = 5)
    @ApiOperation(value = "修改", notes = "传入orderInfo")
    public R update(@Valid @RequestBody OrderInfoEntity orderInfo) {
        return R.status(orderInfoService.updateById(orderInfo));
    }
    /**
     * 订单信息 新增或修改
     */
    @PostMapping("/submit")
    @ApiOperationSupport(order = 6)
    @ApiOperation(value = "新增或修改", notes = "传入orderInfo")
    public R submit(@Valid @RequestBody OrderInfoEntity orderInfo) {
        return R.status(orderInfoService.saveOrUpdate(orderInfo));
    }
    /**
     * 订单信息 删除
     */
    @PostMapping("/remove")
    @ApiOperationSupport(order = 7)
    @ApiOperation(value = "逻辑删除", notes = "传入ids")
    public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
        return R.status(orderInfoService.removeBatchByIds(Func.toLongList(ids)));
    }
}
src/main/java/org/springblade/modules/pay/controller/PaymentInfoController.java
New file
@@ -0,0 +1,125 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.pay.controller;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import lombok.AllArgsConstructor;
import javax.validation.Valid;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springblade.modules.pay.entity.PaymentInfoEntity;
import org.springblade.modules.pay.vo.PaymentInfoVO;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.modules.pay.wrapper.PaymentInfoWrapper;
import org.springblade.modules.pay.service.IPaymentInfoService;
import org.springblade.core.boot.ctrl.BladeController;
/**
 * 支付信息 控制器
 *
 * @author BladeX
 * @since 2024-04-07
 */
@RestController
@AllArgsConstructor
@RequestMapping("blade-paymentInfo/paymentInfo")
@Api(value = "支付信息", tags = "支付信息接口")
public class PaymentInfoController extends BladeController {
    private final IPaymentInfoService paymentInfoService;
    /**
     * 支付信息 详情
     */
    @GetMapping("/detail")
    @ApiOperationSupport(order = 1)
    @ApiOperation(value = "详情", notes = "传入paymentInfo")
    public R<PaymentInfoVO> detail(PaymentInfoEntity paymentInfo) {
        PaymentInfoEntity detail = paymentInfoService.getOne(Condition.getQueryWrapper(paymentInfo));
        return R.data(PaymentInfoWrapper.build().entityVO(detail));
    }
    /**
     * 支付信息 分页
     */
    @GetMapping("/list")
    @ApiOperationSupport(order = 2)
    @ApiOperation(value = "分页", notes = "传入paymentInfo")
    public R<IPage<PaymentInfoVO>> list(PaymentInfoEntity paymentInfo, Query query) {
        IPage<PaymentInfoEntity> pages = paymentInfoService.page(Condition.getPage(query), Condition.getQueryWrapper(paymentInfo));
        return R.data(PaymentInfoWrapper.build().pageVO(pages));
    }
    /**
     * 支付信息 自定义分页
     */
    @GetMapping("/page")
    @ApiOperationSupport(order = 3)
    @ApiOperation(value = "分页", notes = "传入paymentInfo")
    public R<IPage<PaymentInfoVO>> page(PaymentInfoVO paymentInfo, Query query) {
        IPage<PaymentInfoVO> pages = paymentInfoService.selectPaymentInfoPage(Condition.getPage(query), paymentInfo);
        return R.data(pages);
    }
    /**
     * 支付信息 新增
     */
    @PostMapping("/save")
    @ApiOperationSupport(order = 4)
    @ApiOperation(value = "新增", notes = "传入paymentInfo")
    public R save(@Valid @RequestBody PaymentInfoEntity paymentInfo) {
        return R.status(paymentInfoService.save(paymentInfo));
    }
    /**
     * 支付信息 修改
     */
    @PostMapping("/update")
    @ApiOperationSupport(order = 5)
    @ApiOperation(value = "修改", notes = "传入paymentInfo")
    public R update(@Valid @RequestBody PaymentInfoEntity paymentInfo) {
        return R.status(paymentInfoService.updateById(paymentInfo));
    }
    /**
     * 支付信息 新增或修改
     */
    @PostMapping("/submit")
    @ApiOperationSupport(order = 6)
    @ApiOperation(value = "新增或修改", notes = "传入paymentInfo")
    public R submit(@Valid @RequestBody PaymentInfoEntity paymentInfo) {
        return R.status(paymentInfoService.saveOrUpdate(paymentInfo));
    }
    /**
     * 支付信息 删除
     */
    @PostMapping("/remove")
    @ApiOperationSupport(order = 7)
    @ApiOperation(value = "逻辑删除", notes = "传入ids")
    public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
        return R.status(paymentInfoService.removeBatchByIds(Func.toLongList(ids)));
    }
}
src/main/java/org/springblade/modules/pay/controller/RefundInfoController.java
New file
@@ -0,0 +1,125 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.pay.controller;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import lombok.AllArgsConstructor;
import javax.validation.Valid;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springblade.modules.pay.entity.RefundInfoEntity;
import org.springblade.modules.pay.service.IRefundInfoService;
import org.springblade.modules.pay.vo.RefundInfoVO;
import org.springblade.modules.pay.wrapper.RefundInfoWrapper;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.boot.ctrl.BladeController;
/**
 * 退款信息 控制器
 *
 * @author BladeX
 * @since 2024-04-07
 */
@RestController
@AllArgsConstructor
@RequestMapping("blade-refundInfo/refundInfo")
@Api(value = "退款信息", tags = "退款信息接口")
public class RefundInfoController extends BladeController {
    private final IRefundInfoService refundInfoService;
    /**
     * 退款信息 详情
     */
    @GetMapping("/detail")
    @ApiOperationSupport(order = 1)
    @ApiOperation(value = "详情", notes = "传入refundInfo")
    public R<RefundInfoVO> detail(RefundInfoEntity refundInfo) {
        RefundInfoEntity detail = refundInfoService.getOne(Condition.getQueryWrapper(refundInfo));
        return R.data(RefundInfoWrapper.build().entityVO(detail));
    }
    /**
     * 退款信息 分页
     */
    @GetMapping("/list")
    @ApiOperationSupport(order = 2)
    @ApiOperation(value = "分页", notes = "传入refundInfo")
    public R<IPage<RefundInfoVO>> list(RefundInfoEntity refundInfo, Query query) {
        IPage<RefundInfoEntity> pages = refundInfoService.page(Condition.getPage(query), Condition.getQueryWrapper(refundInfo));
        return R.data(RefundInfoWrapper.build().pageVO(pages));
    }
    /**
     * 退款信息 自定义分页
     */
    @GetMapping("/page")
    @ApiOperationSupport(order = 3)
    @ApiOperation(value = "分页", notes = "传入refundInfo")
    public R<IPage<RefundInfoVO>> page(RefundInfoVO refundInfo, Query query) {
        IPage<RefundInfoVO> pages = refundInfoService.selectRefundInfoPage(Condition.getPage(query), refundInfo);
        return R.data(pages);
    }
    /**
     * 退款信息 新增
     */
    @PostMapping("/save")
    @ApiOperationSupport(order = 4)
    @ApiOperation(value = "新增", notes = "传入refundInfo")
    public R save(@Valid @RequestBody RefundInfoEntity refundInfo) {
        return R.status(refundInfoService.save(refundInfo));
    }
    /**
     * 退款信息 修改
     */
    @PostMapping("/update")
    @ApiOperationSupport(order = 5)
    @ApiOperation(value = "修改", notes = "传入refundInfo")
    public R update(@Valid @RequestBody RefundInfoEntity refundInfo) {
        return R.status(refundInfoService.updateById(refundInfo));
    }
    /**
     * 退款信息 新增或修改
     */
    @PostMapping("/submit")
    @ApiOperationSupport(order = 6)
    @ApiOperation(value = "新增或修改", notes = "传入refundInfo")
    public R submit(@Valid @RequestBody RefundInfoEntity refundInfo) {
        return R.status(refundInfoService.saveOrUpdate(refundInfo));
    }
    /**
     * 退款信息 删除
     */
    @PostMapping("/remove")
    @ApiOperationSupport(order = 7)
    @ApiOperation(value = "逻辑删除", notes = "传入ids")
    public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
        return R.status(refundInfoService.removeBatchByIds(Func.toLongList(ids)));
    }
}
src/main/java/org/springblade/modules/pay/dto/OrderInfoDTO.java
New file
@@ -0,0 +1,34 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.pay.dto;
import org.springblade.modules.pay.entity.OrderInfoEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
 * 订单信息 数据传输对象实体类
 *
 * @author BladeX
 * @since 2024-04-07
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class OrderInfoDTO extends OrderInfoEntity {
    private static final long serialVersionUID = 1L;
}
src/main/java/org/springblade/modules/pay/dto/PaymentInfoDTO.java
New file
@@ -0,0 +1,34 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.pay.dto;
import org.springblade.modules.pay.entity.PaymentInfoEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
 * 支付信息 数据传输对象实体类
 *
 * @author BladeX
 * @since 2024-04-07
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class PaymentInfoDTO extends PaymentInfoEntity {
    private static final long serialVersionUID = 1L;
}
src/main/java/org/springblade/modules/pay/dto/RefundInfoDTO.java
New file
@@ -0,0 +1,34 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.pay.dto;
import org.springblade.modules.pay.entity.RefundInfoEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
 * 退款信息 数据传输对象实体类
 *
 * @author BladeX
 * @since 2024-04-07
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class RefundInfoDTO extends RefundInfoEntity {
    private static final long serialVersionUID = 1L;
}
src/main/java/org/springblade/modules/pay/entity/OrderInfoEntity.java
New file
@@ -0,0 +1,100 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.pay.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
import java.util.Date;
/**
 * 订单信息 实体类
 *
 * @author BladeX
 * @since 2024-04-07
 */
@Data
@TableName("jczz_order_info")
@ApiModel(value = "OrderInfo对象", description = "订单信息")
public class OrderInfoEntity {
    /** id */
    @ApiModelProperty(value = "主键ID", example = "")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;
    /** 订单标题 */
    @ApiModelProperty(value = "订单标题", example = "")
    @TableField("title")
    private String title;
    /** 商户订单编号 */
    @ApiModelProperty(value = "商户订单编号", example = "")
    @TableField("order_no")
    private String orderNo;
    /** 用户id */
    @ApiModelProperty(value = "用户id", example = "")
    @TableField("user_id")
    private Long userId;
    /** 支付产品id */
    @ApiModelProperty(value = "支付产品id", example = "")
    @TableField("proper_charge_record_id")
    private Long properChargeRecordId;
    /** 订单二维码连接 */
    @ApiModelProperty(value = "订单二维码连接", example = "")
    @TableField("code_url")
    private String codeUrl;
    /** 订单金额(分) */
    @ApiModelProperty(value = "订单金额(分)", example = "")
    @TableField("total_fee")
    private Integer totalFee;
    /** 订单状态 */
    @ApiModelProperty(value = "订单状态", example = "")
    @TableField("order_status")
    private String orderStatus;
    /** 创建时间 */
    @ApiModelProperty(value = "创建时间", example = "")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField("create_time")
    private Date createTime;
    /** 更新时间 */
    @ApiModelProperty(value = "更新时间", example = "")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField("update_time")
    private Date updateTime;
    /** 物业id */
    @ApiModelProperty(value = "物业id", example = "")
    @TableField("proper_id")
    private Long properId;
}
src/main/java/org/springblade/modules/pay/entity/PaymentInfoEntity.java
New file
@@ -0,0 +1,95 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.pay.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
import java.util.Date;
/**
 * 支付信息 实体类
 *
 * @author BladeX
 * @since 2024-04-07
 */
@Data
@TableName("jczz_payment_info")
@ApiModel(value = "PaymentInfo对象", description = "支付信息")
public class PaymentInfoEntity {
    /** id */
    @ApiModelProperty(value = "主键ID", example = "")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;
    /** 订单编号 */
    @ApiModelProperty(value = "订单编号", example = "")
    @TableField("order_no")
    private String orderNo;
    /** 支付系统交易编号 */
    @ApiModelProperty(value = "支付系统交易编号", example = "")
    @TableField("transaction_id")
    private String transactionId;
    /** 支付类型 */
    @ApiModelProperty(value = "支付类型", example = "")
    @TableField("payment_type")
    private String paymentType;
    /** 交易类型 */
    @ApiModelProperty(value = "交易类型", example = "")
    @TableField("trade_type")
    private String tradeType;
    /** 交易状态 */
    @ApiModelProperty(value = "交易状态", example = "")
    @TableField("trade_state")
    private String tradeState;
    /** 支付金额(分) */
    @ApiModelProperty(value = "支付金额(分)", example = "")
    @TableField("payer_total")
    private Integer payerTotal;
    /** 通知参数 */
    @ApiModelProperty(value = "通知参数", example = "")
    @TableField("content")
    private String content;
    /** 创建时间 */
    @ApiModelProperty(value = "创建时间", example = "")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField("create_time")
    private Date createTime;
    /** 更新时间 */
    @ApiModelProperty(value = "更新时间", example = "")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField("update_time")
    private Date updateTime;
}
src/main/java/org/springblade/modules/pay/entity/RefundInfoEntity.java
New file
@@ -0,0 +1,102 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.pay.entity;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
import java.util.Date;
/**
 * 退款信息 实体类
 *
 * @author BladeX
 * @since 2024-04-07
 */
@Data
@TableName("jczz_refund_info")
@ApiModel(value = "RefundInfo对象", description = "退款信息")
public class RefundInfoEntity  {
    /** id */
    @ApiModelProperty(value = "主键ID", example = "")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;
    /** 订单编号 */
    @ApiModelProperty(value = "订单编号", example = "")
    @TableField("order_no")
    private String orderNo;
    /** 退款单编号 */
    @ApiModelProperty(value = "退款单编号", example = "")
    @TableField("refund_no")
    private String refundNo;
    /** 支付系统退款单号 */
    @ApiModelProperty(value = "支付系统退款单号", example = "")
    @TableField("refund_id")
    private String refundId;
    /** 原订单金额(分) */
    @ApiModelProperty(value = "原订单金额(分)", example = "")
    @TableField("total_fee")
    private Integer totalFee;
    /** 退款金额(分) */
    @ApiModelProperty(value = "退款金额(分)", example = "")
    @TableField("refund")
    private Integer refund;
    /** 退款原因 */
    @ApiModelProperty(value = "退款原因", example = "")
    @TableField("reason")
    private String reason;
    /** 退款单状态 */
    @ApiModelProperty(value = "退款单状态", example = "")
    @TableField("refund_status")
    private String refundStatus;
    /** 申请退款返回参数 */
    @ApiModelProperty(value = "申请退款返回参数", example = "")
    @TableField("content_return")
    private String contentReturn;
    /** 退款结果通知参数 */
    @ApiModelProperty(value = "退款结果通知参数", example = "")
    @TableField("content_notify")
    private String contentNotify;
    /** 创建时间 */
    @ApiModelProperty(value = "创建时间", example = "")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private Date createTime;
    /** 更新时间 */
    @ApiModelProperty(value = "更新时间", example = "")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(value = "update_time",fill = FieldFill.UPDATE)
    private Date updateTime;
}
src/main/java/org/springblade/modules/pay/entity/WeChatMiniAuthorizeVo.java
New file
@@ -0,0 +1,39 @@
package org.springblade.modules.pay.entity;
import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="WeChatMiniAuthorizeVo对象", description="微信小程序用户授权返回数据")
public class WeChatMiniAuthorizeVo implements Serializable {
    private static final long serialVersionUID=1L;
    @ApiModelProperty(value = "会话密钥")
    @JSONField(name = "session_key")
    private String sessionKey;
    @ApiModelProperty(value = "用户唯一标识")
    @JSONField(name = "openid")
    private String openId;
    @ApiModelProperty(value = "用户在开放平台的唯一标识符,若当前小程序已绑定到微信开放平台帐号下会返回")
    @JSONField(name = "unionid")
    private String unionId;
    @ApiModelProperty(value = "错误码")
    @JSONField(name = "errcode")
    private String errCode;
    @ApiModelProperty(value = "错误信息")
    @JSONField(name = "errmsg")
    private String errMsg;
}
src/main/java/org/springblade/modules/pay/mapper/OrderInfoMapper.java
New file
@@ -0,0 +1,44 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.pay.mapper;
import org.springblade.modules.pay.entity.OrderInfoEntity;
import org.springblade.modules.pay.vo.OrderInfoVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List;
/**
 * 订单信息 Mapper 接口
 *
 * @author BladeX
 * @since 2024-04-07
 */
public interface OrderInfoMapper extends BaseMapper<OrderInfoEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param orderInfo
     * @return
     */
    List<OrderInfoVO> selectOrderInfoPage(IPage page, OrderInfoVO orderInfo);
}
src/main/java/org/springblade/modules/pay/mapper/OrderInfoMapper.xml
New file
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.springblade.modules.pay.mapper.OrderInfoMapper">
    <!-- 通用查询映射结果 -->
    <resultMap id="orderInfoResultMap" type="org.springblade.modules.pay.vo.OrderInfoVO">
    </resultMap>
    <select id="selectOrderInfoPage" resultMap="orderInfoResultMap">
        select * from jczz_order_info where is_deleted = 0
    </select>
</mapper>
src/main/java/org/springblade/modules/pay/mapper/PaymentInfoMapper.java
New file
@@ -0,0 +1,59 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.pay.mapper;
import org.springblade.modules.pay.dto.PaymentInfoDTO;
import org.springblade.modules.pay.entity.PaymentInfoEntity;
import org.springblade.modules.pay.vo.PaymentInfoVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List;
/**
 * 支付信息 Mapper 接口
 *
 * @author BladeX
 * @since 2024-04-07
 */
public interface PaymentInfoMapper extends BaseMapper<PaymentInfoEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param paymentInfo
     * @return
     */
    List<PaymentInfoVO> selectPaymentInfoPage(IPage page, PaymentInfoVO paymentInfo);
    /**
     * 查询支付信息
     *
     * @param id 支付信息ID
     * @return 支付信息
     */
    public PaymentInfoDTO selectPaymentInfoById(Long id);
    /**
     * 查询支付信息列表
     *
     * @param paymentInfoDTO 支付信息
     * @return 支付信息集合
     */
    public List<PaymentInfoDTO> selectPaymentInfoList(PaymentInfoDTO paymentInfoDTO);
}
src/main/java/org/springblade/modules/pay/mapper/PaymentInfoMapper.xml
New file
@@ -0,0 +1,64 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.springblade.modules.pay.mapper.PaymentInfoMapper">
    <!-- 通用查询映射结果 -->
    <resultMap id="paymentInfoResultMap" type="org.springblade.modules.pay.entity.PaymentInfoEntity">
    </resultMap>
    <select id="selectPaymentInfoPage" resultMap="paymentInfoResultMap">
        select * from jczz_payment_info where is_deleted = 0
    </select>
    <resultMap type="org.springblade.modules.pay.dto.PaymentInfoDTO" id="PaymentInfoDTOResult">
        <result property="id"    column="id"    />
        <result property="orderNo"    column="order_no"    />
        <result property="transactionId"    column="transaction_id"    />
        <result property="paymentType"    column="payment_type"    />
        <result property="tradeType"    column="trade_type"    />
        <result property="tradeState"    column="trade_state"    />
        <result property="payerTotal"    column="payer_total"    />
        <result property="content"    column="content"    />
        <result property="createTime"    column="create_time"    />
        <result property="updateTime"    column="update_time"    />
    </resultMap>
    <sql id="selectPaymentInfo">
        select
            id,
            order_no,
            transaction_id,
            payment_type,
            trade_type,
            trade_state,
            payer_total,
            content,
            create_time,
            update_time
        from
            jczz_payment_info
    </sql>
    <select id="selectPaymentInfoById" parameterType="long" resultMap="PaymentInfoDTOResult">
        <include refid="selectPaymentInfo"/>
        where
        id = #{id}
    </select>
    <select id="selectPaymentInfoList" parameterType="org.springblade.modules.pay.dto.PaymentInfoDTO" resultMap="PaymentInfoDTOResult">
        <include refid="selectPaymentInfo"/>
        <where>
            <if test="id != null "> and id = #{id}</if>
            <if test="orderNo != null  and orderNo != ''"> and order_no = #{orderNo}</if>
            <if test="transactionId != null  and transactionId != ''"> and transaction_id = #{transactionId}</if>
            <if test="paymentType != null  and paymentType != ''"> and payment_type = #{paymentType}</if>
            <if test="tradeType != null  and tradeType != ''"> and trade_type = #{tradeType}</if>
            <if test="tradeState != null  and tradeState != ''"> and trade_state = #{tradeState}</if>
            <if test="payerTotal != null  and payerTotal != ''"> and payer_total = #{payerTotal}</if>
            <if test="content != null  and content != ''"> and content = #{content}</if>
            <if test="createTime != null "> and create_time = #{createTime}</if>
            <if test="updateTime != null "> and update_time = #{updateTime}</if>
        </where>
    </select>
</mapper>
src/main/java/org/springblade/modules/pay/mapper/RefundInfoMapper.java
New file
@@ -0,0 +1,60 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.pay.mapper;
import org.springblade.modules.pay.dto.RefundInfoDTO;
import org.springblade.modules.pay.entity.RefundInfoEntity;
import org.springblade.modules.pay.vo.RefundInfoVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List;
/**
 * 退款信息 Mapper 接口
 *
 * @author BladeX
 * @since 2024-04-07
 */
public interface RefundInfoMapper extends BaseMapper<RefundInfoEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param refundInfo
     * @return
     */
    List<RefundInfoVO> selectRefundInfoPage(IPage page, RefundInfoVO refundInfo);
    /**
     * 查询退款信息
     *
     * @param id 退款信息ID
     * @return 退款信息
     */
    public RefundInfoDTO selectRefundInfoById(Long id);
    /**
     * 查询退款信息列表
     *
     * @param refundInfoDTO 退款信息
     * @return 退款信息集合
     */
    public List<RefundInfoDTO> selectRefundInfoList(RefundInfoDTO refundInfoDTO);
}
src/main/java/org/springblade/modules/pay/mapper/RefundInfoMapper.xml
New file
@@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.springblade.modules.pay.mapper.RefundInfoMapper">
    <!-- 通用查询映射结果 -->
    <resultMap id="refundInfoResultMap" type="org.springblade.modules.pay.entity.RefundInfoEntity">
    </resultMap>
    <select id="selectRefundInfoPage" resultMap="refundInfoResultMap">
        select * from jczz_refund_info where is_deleted = 0
    </select>
    <resultMap type="org.springblade.modules.pay.dto.RefundInfoDTO" id="RefundInfoDTOResult">
        <result property="id"    column="id"    />
        <result property="orderNo"    column="order_no"    />
        <result property="refundNo"    column="refund_no"    />
        <result property="refundId"    column="refund_id"    />
        <result property="totalFee"    column="total_fee"    />
        <result property="refund"    column="refund"    />
        <result property="reason"    column="reason"    />
        <result property="refundStatus"    column="refund_status"    />
        <result property="contentReturn"    column="content_return"    />
        <result property="contentNotify"    column="content_notify"    />
        <result property="createTime"    column="create_time"    />
        <result property="updateTime"    column="update_time"    />
    </resultMap>
    <sql id="selectRefundInfo">
        select
            id,
            order_no,
            refund_no,
            refund_id,
            total_fee,
            refund,
            reason,
            refund_status,
            content_return,
            content_notify,
            create_time,
            update_time
        from
            jczz_refund_info
    </sql>
    <select id="selectRefundInfoById" parameterType="long" resultMap="RefundInfoDTOResult">
        <include refid="selectRefundInfo"/>
        where
        id = #{id}
    </select>
    <select id="selectRefundInfoList" parameterType="org.springblade.modules.pay.dto.RefundInfoDTO" resultMap="RefundInfoDTOResult">
        <include refid="selectRefundInfo"/>
        <where>
            <if test="id != null "> and id = #{id}</if>
            <if test="orderNo != null "> and order_no = #{orderNo}</if>
            <if test="refundNo != null "> and refund_no = #{refundNo}</if>
            <if test="refundId != null "> and refund_id = #{refundId}</if>
            <if test="totalFee != null  and totalFee != ''"> and total_fee = #{totalFee}</if>
            <if test="refund != null  and refund != ''"> and refund = #{refund}</if>
            <if test="reason != null  and reason != ''"> and reason = #{reason}</if>
            <if test="refundStatus != null  and refundStatus != ''"> and refund_status = #{refundStatus}</if>
            <if test="contentReturn != null  and contentReturn != ''"> and content_return = #{contentReturn}</if>
            <if test="contentNotify != null  and contentNotify != ''"> and content_notify = #{contentNotify}</if>
            <if test="createTime != null "> and create_time = #{createTime}</if>
            <if test="updateTime != null "> and update_time = #{updateTime}</if>
        </where>
    </select>
</mapper>
src/main/java/org/springblade/modules/pay/service/IOrderInfoService.java
New file
@@ -0,0 +1,59 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.pay.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springblade.common.enums.OrderStatus;
import org.springblade.modules.pay.entity.OrderInfoEntity;
import org.springblade.modules.pay.vo.OrderInfoVO;
import org.springblade.core.mp.base.BaseService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List;
/**
 * 订单信息 服务类
 *
 * @author BladeX
 * @since 2024-04-07
 */
public interface IOrderInfoService extends IService<OrderInfoEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param orderInfo
     * @return
     */
    IPage<OrderInfoVO> selectOrderInfoPage(IPage<OrderInfoVO> page, OrderInfoVO orderInfo);
    OrderInfoEntity createOrderByPropertyChargeRecordId(Long propertyChargeRecordId);
    void saveCodeUrl(String orderNo, String codeUrl);
    List<OrderInfoEntity> listOrderByCreateTimeDesc();
    void updateStatusByOrderNo(String orderNo, OrderStatus orderStatus);
    String getOrderStatus(String orderNo);
    List<OrderInfoEntity> getNoPayOrderByDuration(int minutes);
    OrderInfoEntity getOrderByOrderNo(String orderNo);
}
src/main/java/org/springblade/modules/pay/service/IPaymentInfoService.java
New file
@@ -0,0 +1,45 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.pay.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springblade.modules.pay.entity.PaymentInfoEntity;
import org.springblade.modules.pay.vo.PaymentInfoVO;
import org.springblade.core.mp.base.BaseService;
import com.baomidou.mybatisplus.core.metadata.IPage;
/**
 * 支付信息 服务类
 *
 * @author BladeX
 * @since 2024-04-07
 */
public interface IPaymentInfoService extends IService<PaymentInfoEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param paymentInfo
     * @return
     */
    IPage<PaymentInfoVO> selectPaymentInfoPage(IPage<PaymentInfoVO> page, PaymentInfoVO paymentInfo);
    void createPaymentInfo(String plainText);
}
src/main/java/org/springblade/modules/pay/service/IRefundInfoService.java
New file
@@ -0,0 +1,46 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.pay.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springblade.modules.pay.entity.RefundInfoEntity;
import org.springblade.modules.pay.vo.RefundInfoVO;
import org.springblade.core.mp.base.BaseService;
import com.baomidou.mybatisplus.core.metadata.IPage;
/**
 * 退款信息 服务类
 *
 * @author BladeX
 * @since 2024-04-07
 */
public interface IRefundInfoService extends IService<RefundInfoEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param refundInfo
     * @return
     */
    IPage<RefundInfoVO> selectRefundInfoPage(IPage<RefundInfoVO> page, RefundInfoVO refundInfo);
    RefundInfoEntity createRefundByOrderNo(String orderNo, String reason);
    void updateRefund(String plainText);
}
src/main/java/org/springblade/modules/pay/service/impl/OrderInfoServiceImpl.java
New file
@@ -0,0 +1,207 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.pay.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springblade.common.enums.OrderStatus;
import org.springblade.modules.pay.entity.OrderInfoEntity;
import org.springblade.modules.pay.vo.OrderInfoVO;
import org.springblade.modules.pay.mapper.OrderInfoMapper;
import org.springblade.modules.pay.service.IOrderInfoService;
import org.springblade.modules.property.entity.PropertyChargeRecord;
import org.springblade.modules.property.service.IPropertyChargeRecordService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import javax.annotation.Resource;
import java.text.SimpleDateFormat;
import java.time.Duration;
import java.time.Instant;
import java.util.Date;
import java.util.List;
import java.util.Random;
/**
 * 订单信息 服务实现类
 *
 * @author BladeX
 * @since 2024-04-07
 */
@Service
public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfoEntity> implements IOrderInfoService {
    private static Logger logger = LoggerFactory.getLogger(OrderInfoServiceImpl.class);
    @Resource
    private IPropertyChargeRecordService iPropertyChargeRecordService;
    @Override
    public IPage<OrderInfoVO> selectOrderInfoPage(IPage<OrderInfoVO> page, OrderInfoVO orderInfo) {
        return page.setRecords(baseMapper.selectOrderInfoPage(page, orderInfo));
    }
    @Override
    public OrderInfoEntity createOrderByPropertyChargeRecordId(Long propertyChargeRecordId) {
        //查找已存在但未支付的订单
        OrderInfoEntity orderInfo = this.getNoPayOrderByPropertyChargeRecordId(propertyChargeRecordId);
        if( orderInfo != null){
            return orderInfo;
        }
        //获取商品信息
        PropertyChargeRecord propertyChargeRecord = iPropertyChargeRecordService.getById(propertyChargeRecordId);
        //生成订单
        orderInfo = new OrderInfoEntity();
        orderInfo.setTitle(propertyChargeRecord.getPayContent());
        orderInfo.setOrderNo(getOrderNoStr()); //订单号
        orderInfo.setProperChargeRecordId(propertyChargeRecordId);
        orderInfo.setTotalFee(propertyChargeRecord.getPayPrice().intValue()); //分
        orderInfo.setOrderStatus(OrderStatus.NOTPAY.getType());
        baseMapper.insert(orderInfo);
        return orderInfo;
    }
    /**
     * 存储订单二维码
     * @param orderNo
     * @param codeUrl
     */
    @Override
    public void saveCodeUrl(String orderNo, String codeUrl) {
        QueryWrapper<OrderInfoEntity> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("order_no", orderNo);
        OrderInfoEntity orderInfo = new OrderInfoEntity();
        orderInfo.setCodeUrl(codeUrl);
        baseMapper.update(orderInfo, queryWrapper);
    }
    /**
     * 查询订单列表,并倒序查询
     * @return
     */
    @Override
    public List<OrderInfoEntity> listOrderByCreateTimeDesc() {
        QueryWrapper<OrderInfoEntity> queryWrapper = new QueryWrapper<OrderInfoEntity>().orderByDesc("create_time");
        return baseMapper.selectList(queryWrapper);
    }
    /**
     * 根据订单号更新订单状态
     * @param orderNo
     * @param orderStatus
     */
    @Override
    public void updateStatusByOrderNo(String orderNo, OrderStatus orderStatus) {
        logger.info("更新订单状态 ===> {}", orderStatus.getType());
        QueryWrapper<OrderInfoEntity> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("order_no", orderNo);
        OrderInfoEntity orderInfo = new OrderInfoEntity();
        orderInfo.setOrderStatus(orderStatus.getType());
        baseMapper.update(orderInfo, queryWrapper);
    }
    /**
     * 根据订单号获取订单状态
     * @param orderNo
     * @return
     */
    @Override
    public String getOrderStatus(String orderNo) {
        QueryWrapper<OrderInfoEntity> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("order_no", orderNo);
        OrderInfoEntity orderInfo = baseMapper.selectOne(queryWrapper);
        if(orderInfo == null){
            return null;
        }
        return orderInfo.getOrderStatus();
    }
    /**
     * 查询创建超过minutes分钟并且未支付的订单
     * @param minutes
     * @return
     */
    @Override
    public List<OrderInfoEntity> getNoPayOrderByDuration(int minutes) {
        Instant instant = Instant.now().minus(Duration.ofMinutes(minutes));
        QueryWrapper<OrderInfoEntity> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("order_status", OrderStatus.NOTPAY.getType());
        queryWrapper.le("create_time", instant);
        List<OrderInfoEntity> orderInfoList = baseMapper.selectList(queryWrapper);
        return orderInfoList;
    }
    /**
     * 根据订单号获取订单
     * @param orderNo
     * @return
     */
    @Override
    public OrderInfoEntity getOrderByOrderNo(String orderNo) {
        QueryWrapper<OrderInfoEntity> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("order_no", orderNo);
        OrderInfoEntity orderInfo = baseMapper.selectOne(queryWrapper);
        return orderInfo;
    }
    /**
     * 根据商品id查询未支付订单
     * 防止重复创建订单对象
     * @param propertyChargeRecordId
     * @return
     */
    private OrderInfoEntity getNoPayOrderByPropertyChargeRecordId(Long propertyChargeRecordId) {
        QueryWrapper<OrderInfoEntity> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("product_id", propertyChargeRecordId);
        queryWrapper.eq("order_status", OrderStatus.NOTPAY.getType());
//        queryWrapper.eq("user_id", userId);
        OrderInfoEntity orderInfo = baseMapper.selectOne(queryWrapper);
        return orderInfo;
    }
    //生成订单号
    public static String getOrderNoStr() {
        String order = "pay" + new SimpleDateFormat("yyyyMMdd").format(new Date());
        Random r = new Random();
        for (int i = 0; i < 10; i++) {
            order += r.nextInt(9);
        }
        return order;
    }
}
src/main/java/org/springblade/modules/pay/service/impl/PaymentInfoServiceImpl.java
New file
@@ -0,0 +1,88 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.pay.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.google.gson.Gson;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springblade.common.enums.PayType;
import org.springblade.modules.pay.entity.PaymentInfoEntity;
import org.springblade.modules.pay.mapper.PaymentInfoMapper;
import org.springblade.modules.pay.vo.PaymentInfoVO;
import org.springblade.modules.pay.service.IPaymentInfoService;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.HashMap;
import java.util.Map;
/**
 * 支付信息 服务实现类
 *
 * @author BladeX
 * @since 2024-04-07
 */
@Service
public class PaymentInfoServiceImpl extends ServiceImpl<PaymentInfoMapper, PaymentInfoEntity> implements IPaymentInfoService {
    private static Logger logger = LoggerFactory.getLogger(PaymentInfoServiceImpl.class);
    @Override
    public IPage<PaymentInfoVO> selectPaymentInfoPage(IPage<PaymentInfoVO> page, PaymentInfoVO paymentInfo) {
        return page.setRecords(baseMapper.selectPaymentInfoPage(page, paymentInfo));
    }
    /**
     * 记录支付日志
     * @param plainText
     */
    @Override
    public void createPaymentInfo(String plainText) {
        logger.info("记录支付日志");
        Gson gson = new Gson();
        HashMap plainTextMap = gson.fromJson(plainText, HashMap.class);
        //订单号
        String orderNo = (String)plainTextMap.get("out_trade_no");
        //业务编号
        String transactionId = (String)plainTextMap.get("transaction_id");
        //支付类型
        String tradeType = (String)plainTextMap.get("trade_type");
        //交易状态
        String tradeState = (String)plainTextMap.get("trade_state");
        //用户实际支付金额
        Map<String, Object> amount = (Map)plainTextMap.get("amount");
        Integer payerTotal = ((Double) amount.get("payer_total")).intValue();
        PaymentInfoEntity paymentInfo = new PaymentInfoEntity();
        paymentInfo.setOrderNo(orderNo);
        paymentInfo.setPaymentType(PayType.WXPAY.getType());
        paymentInfo.setTransactionId(transactionId);
        paymentInfo.setTradeType(tradeType);
        paymentInfo.setTradeState(tradeState);
        paymentInfo.setPayerTotal(payerTotal);
        paymentInfo.setContent(plainText);
        baseMapper.insert(paymentInfo);
    }
}
Diff truncated after the above file
src/main/java/org/springblade/modules/pay/service/impl/RefundInfoServiceImpl.java src/main/java/org/springblade/modules/pay/vo/OrderInfoVO.java src/main/java/org/springblade/modules/pay/vo/PaymentInfoVO.java src/main/java/org/springblade/modules/pay/vo/RefundInfoVO.java src/main/java/org/springblade/modules/pay/wrapper/OrderInfoWrapper.java src/main/java/org/springblade/modules/pay/wrapper/PaymentInfoWrapper.java src/main/java/org/springblade/modules/pay/wrapper/RefundInfoWrapper.java src/main/java/org/springblade/modules/place/excel/ExportPlaceExcel.java src/main/java/org/springblade/modules/place/excel/ImportPlaceExcel.java src/main/java/org/springblade/modules/place/excel/ImportPractitionerExcel.java src/main/java/org/springblade/modules/place/excel/PractitionerExcel.java src/main/java/org/springblade/modules/police/controller/PolicTrajectoryPointController.java src/main/java/org/springblade/modules/police/controller/PoliceAlarmRecordsController.java src/main/java/org/springblade/modules/police/dto/PolicTrajectoryPointDTO.java src/main/java/org/springblade/modules/police/dto/PoliceAlarmRecordsDTO.java src/main/java/org/springblade/modules/police/entity/PolicTrajectoryPointEntity.java src/main/java/org/springblade/modules/police/entity/PoliceAlarmRecordsEntity.java src/main/java/org/springblade/modules/police/mapper/PolicTrajectoryPointMapper.java src/main/java/org/springblade/modules/police/mapper/PolicTrajectoryPointMapper.xml src/main/java/org/springblade/modules/police/mapper/PoliceAlarmRecordsMapper.java src/main/java/org/springblade/modules/police/mapper/PoliceAlarmRecordsMapper.xml src/main/java/org/springblade/modules/police/service/IPolicTrajectoryPointService.java src/main/java/org/springblade/modules/police/service/IPoliceAlarmRecordsService.java src/main/java/org/springblade/modules/police/service/impl/PolicTrajectoryPointServiceImpl.java src/main/java/org/springblade/modules/police/service/impl/PoliceAlarmRecordsServiceImpl.java src/main/java/org/springblade/modules/police/vo/PolicTrajectoryPointVO.java src/main/java/org/springblade/modules/police/vo/PoliceAlarmRecordsVO.java src/main/java/org/springblade/modules/police/wrapper/PolicTrajectoryPointWrapper.java src/main/java/org/springblade/modules/police/wrapper/PoliceAlarmRecordsWrapper.java src/main/java/org/springblade/modules/property/dto/PropertyChargeRecordDTO.java src/main/java/org/springblade/modules/property/vo/ExpenseDetails.java src/main/java/org/springblade/modules/report/controller/ReportController.java src/main/java/org/springblade/modules/report/controller/ReportDbController.java src/main/java/org/springblade/modules/report/dto/ReportDTO.java src/main/java/org/springblade/modules/report/dto/ReportDbDTO.java src/main/java/org/springblade/modules/report/entity/ReportDbEntity.java src/main/java/org/springblade/modules/report/entity/ReportEntity.java src/main/java/org/springblade/modules/report/mapper/ReportDbMapper.java src/main/java/org/springblade/modules/report/mapper/ReportDbMapper.xml src/main/java/org/springblade/modules/report/mapper/ReportMapper.java src/main/java/org/springblade/modules/report/mapper/ReportMapper.xml src/main/java/org/springblade/modules/report/service/IReportDbService.java src/main/java/org/springblade/modules/report/service/IReportService.java src/main/java/org/springblade/modules/report/service/impl/ReportDbServiceImpl.java src/main/java/org/springblade/modules/report/service/impl/ReportServiceImpl.java src/main/java/org/springblade/modules/report/vo/ReportDbVO.java src/main/java/org/springblade/modules/report/vo/ReportVO.java src/main/java/org/springblade/modules/report/wrapper/ReportDbWrapper.java src/main/java/org/springblade/modules/report/wrapper/ReportWrapper.java src/main/java/org/springblade/modules/resource/utils/ImageUtil.java src/main/java/org/springblade/modules/sms/controller/SmsRecordController.java src/main/java/org/springblade/modules/sms/controller/SmsSendController.java src/main/java/org/springblade/modules/sms/controller/SmsTemplateController.java src/main/java/org/springblade/modules/sms/dto/SmsRecordDTO.java src/main/java/org/springblade/modules/sms/dto/SmsTemplateDTO.java src/main/java/org/springblade/modules/sms/entity/SmsRecordEntity.java src/main/java/org/springblade/modules/sms/entity/SmsTemplateEntity.java src/main/java/org/springblade/modules/sms/mapper/SmsRecordMapper.java src/main/java/org/springblade/modules/sms/mapper/SmsRecordMapper.xml src/main/java/org/springblade/modules/sms/mapper/SmsTemplateMapper.java src/main/java/org/springblade/modules/sms/mapper/SmsTemplateMapper.xml src/main/java/org/springblade/modules/sms/service/ISmsRecordService.java src/main/java/org/springblade/modules/sms/service/ISmsSendService.java src/main/java/org/springblade/modules/sms/service/ISmsTemplateService.java src/main/java/org/springblade/modules/sms/service/impl/SmsRecordServiceImpl.java src/main/java/org/springblade/modules/sms/service/impl/SmsSendServiceImpl.java src/main/java/org/springblade/modules/sms/service/impl/SmsTemplateServiceImpl.java src/main/java/org/springblade/modules/sms/vo/SmsRecordVO.java src/main/java/org/springblade/modules/sms/vo/SmsTemplateVO.java src/main/java/org/springblade/modules/sms/wrapper/SmsRecordWrapper.java src/main/java/org/springblade/modules/sms/wrapper/SmsTemplateWrapper.java src/main/java/org/springblade/modules/smsTask/controller/SmsTaskController.java src/main/java/org/springblade/modules/smsTask/dto/SmsTaskDTO.java src/main/java/org/springblade/modules/smsTask/entity/SmsTaskEntity.java src/main/java/org/springblade/modules/smsTask/mapper/SmsTaskMapper.java src/main/java/org/springblade/modules/smsTask/mapper/SmsTaskMapper.xml src/main/java/org/springblade/modules/smsTask/service/ISmsTaskService.java src/main/java/org/springblade/modules/smsTask/service/impl/SmsTaskServiceImpl.java src/main/java/org/springblade/modules/smsTask/vo/SmsTaskVO.java src/main/java/org/springblade/modules/smsTask/wrapper/SmsTaskWrapper.java src/main/java/org/springblade/modules/system/controller/DeptController.java src/main/java/org/springblade/modules/system/controller/DictBizController.java src/main/java/org/springblade/modules/system/controller/LogApiController.java src/main/java/org/springblade/modules/system/controller/LogErrorController.java src/main/java/org/springblade/modules/system/controller/LogUsualController.java src/main/java/org/springblade/modules/system/controller/MenuController.java src/main/java/org/springblade/modules/system/controller/RegionController.java src/main/java/org/springblade/modules/system/controller/TenantController.java src/main/java/org/springblade/modules/system/controller/UserController.java src/main/java/org/springblade/modules/system/entity/Dept.java src/main/java/org/springblade/modules/system/entity/LogApiExt.java src/main/java/org/springblade/modules/system/entity/TreeNodeTwo.java src/main/java/org/springblade/modules/system/entity/User.java src/main/java/org/springblade/modules/system/excel/PoliceUserExcel.java src/main/java/org/springblade/modules/system/mapper/DeptMapper.java src/main/java/org/springblade/modules/system/mapper/DeptMapper.xml src/main/java/org/springblade/modules/system/mapper/DictBizMapper.xml src/main/java/org/springblade/modules/system/mapper/LogApiMapper.java src/main/java/org/springblade/modules/system/mapper/LogApiMapper.xml src/main/java/org/springblade/modules/system/mapper/LogErrorMapper.java src/main/java/org/springblade/modules/system/mapper/LogErrorMapper.xml src/main/java/org/springblade/modules/system/mapper/LogUsualMapper.java src/main/java/org/springblade/modules/system/mapper/LogUsualMapper.xml src/main/java/org/springblade/modules/system/mapper/RegionMapper.java src/main/java/org/springblade/modules/system/mapper/RegionMapper.xml src/main/java/org/springblade/modules/system/mapper/RoleMapper.java src/main/java/org/springblade/modules/system/mapper/RoleMapper.xml src/main/java/org/springblade/modules/system/mapper/UserMapper.java src/main/java/org/springblade/modules/system/mapper/UserMapper.xml src/main/java/org/springblade/modules/system/node/DeptUserTreeNode.java src/main/java/org/springblade/modules/system/service/IDeptService.java src/main/java/org/springblade/modules/system/service/ILogApiService.java src/main/java/org/springblade/modules/system/service/ILogErrorService.java src/main/java/org/springblade/modules/system/service/ILogService.java src/main/java/org/springblade/modules/system/service/ILogUsualService.java src/main/java/org/springblade/modules/system/service/IMenuService.java src/main/java/org/springblade/modules/system/service/IRegionService.java src/main/java/org/springblade/modules/system/service/IRoleService.java src/main/java/org/springblade/modules/system/service/IUserService.java src/main/java/org/springblade/modules/system/service/impl/LogApiServiceImpl.java src/main/java/org/springblade/modules/system/service/impl/LogErrorServiceImpl.java src/main/java/org/springblade/modules/system/service/impl/LogServiceImpl.java src/main/java/org/springblade/modules/system/service/impl/LogUsualServiceImpl.java src/main/java/org/springblade/modules/system/service/impl/RegionServiceImpl.java src/main/java/org/springblade/modules/system/service/impl/RoleServiceImpl.java src/main/java/org/springblade/modules/system/vo/RegionParamVO.java src/main/java/org/springblade/modules/system/vo/UserVO.java src/main/java/org/springblade/modules/task/controller/TaskNoFraudReportingController.java src/main/java/org/springblade/modules/task/controller/TaskResidencePermitApplyController.java src/main/java/org/springblade/modules/task/controller/TaskSchoolEvenController.java src/main/java/org/springblade/modules/task/dto/TaskNoFraudReportingDTO.java src/main/java/org/springblade/modules/task/dto/TaskResidencePermitApplyDTO.java src/main/java/org/springblade/modules/task/dto/TaskSchoolEvenDTO.java src/main/java/org/springblade/modules/task/entity/TaskNoFraudReportingEntity.java src/main/java/org/springblade/modules/task/entity/TaskResidencePermitApplyEntity.java src/main/java/org/springblade/modules/task/entity/TaskSchoolEvenEntity.java src/main/java/org/springblade/modules/task/excel/TaskNoExplosionExcel.java src/main/java/org/springblade/modules/task/mapper/TaskNoFraudReportingMapper.java src/main/java/org/springblade/modules/task/mapper/TaskNoFraudReportingMapper.xml src/main/java/org/springblade/modules/task/mapper/TaskResidencePermitApplyMapper.java src/main/java/org/springblade/modules/task/mapper/TaskResidencePermitApplyMapper.xml src/main/java/org/springblade/modules/task/mapper/TaskSchoolEvenMapper.java src/main/java/org/springblade/modules/task/mapper/TaskSchoolEvenMapper.xml src/main/java/org/springblade/modules/task/service/ITaskNoFraudReportingService.java src/main/java/org/springblade/modules/task/service/ITaskResidencePermitApplyService.java src/main/java/org/springblade/modules/task/service/ITaskSchoolEvenService.java src/main/java/org/springblade/modules/task/service/TaskHandle.java src/main/java/org/springblade/modules/task/service/impl/SelfExaminationTaskHandler.java src/main/java/org/springblade/modules/task/service/impl/TaskNoFraudReportingServiceImpl.java src/main/java/org/springblade/modules/task/service/impl/TaskResidencePermitApplyServiceImpl.java src/main/java/org/springblade/modules/task/service/impl/TaskSchoolEvenServiceImpl.java src/main/java/org/springblade/modules/task/service/impl/VisitingTaskHandler.java src/main/java/org/springblade/modules/task/vo/TaskNoFraudReportingVO.java src/main/java/org/springblade/modules/task/vo/TaskResidencePermitApplyVO.java src/main/java/org/springblade/modules/task/vo/TaskSchoolEvenVO.java src/main/java/org/springblade/modules/task/wrapper/TaskNoFraudReportingWrapper.java src/main/java/org/springblade/modules/task/wrapper/TaskResidencePermitApplyWrapper.java src/main/java/org/springblade/modules/task/wrapper/TaskSchoolEvenWrapper.java src/main/java/org/springblade/modules/test4j/Test4jController.java src/main/java/org/springblade/modules/test4j/util/Test4jUtil.java src/main/java/org/springblade/modules/threeColorTask/controller/CustomTaskController.java src/main/java/org/springblade/modules/threeColorTask/dto/CustomTaskDTO.java src/main/java/org/springblade/modules/threeColorTask/entity/CustomTaskEntity.java src/main/java/org/springblade/modules/threeColorTask/mapper/CustomTaskMapper.java src/main/java/org/springblade/modules/threeColorTask/mapper/CustomTaskMapper.xml src/main/java/org/springblade/modules/threeColorTask/service/ICustomTaskService.java src/main/java/org/springblade/modules/threeColorTask/service/impl/CustomTaskServiceImpl.java src/main/java/org/springblade/modules/threeColorTask/vo/CustomTaskVO.java src/main/java/org/springblade/modules/threeColorTask/wrapper/CustomTaskWrapper.java src/main/java/org/springblade/modules/wechat/controller/WechatController.java src/main/java/org/springblade/modules/wechat/service/WechatService.java src/main/java/org/springblade/modules/wechat/service/impl/WechatServiceImpl.java src/main/java/org/springblade/xxljob/cron/CronExpression.java src/main/java/org/springblade/xxljob/jobhandler/DataHandleJob.java src/main/java/org/springblade/xxljob/jobhandler/SynchronizationEhjb.java src/main/java/org/springblade/xxljob/util/CookieUtil.java src/main/java/org/springblade/xxljob/util/JacksonUtil.java src/main/java/org/springblade/xxljob/util/LocalCacheUtil.java src/main/java/org/yaml/snakeyaml/representer/Representer.java src/main/java/sql/report.menu.sql src/main/java/sql/reportdb.menu.sql src/main/resources/application.yml src/main/resources/log/logback-test.xml src/test/java/org/springblade/test/BladeTest.java src/test/resources/application.yml