From 38e75e6b6b81cf551f57fbb8da42dc43438e17b1 Mon Sep 17 00:00:00 2001
From: mocheng <3057647414@qq.com>
Date: Mon, 18 Aug 2025 19:46:03 +0800
Subject: [PATCH 1/9] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E8=AE=BF=E5=AE=A2?=
=?UTF-8?q?=E4=B8=8A=E4=BC=A0=E5=9B=BE=E7=89=87?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../api/RemoteVisitoreGetCodeInfoService.java | 5 +++++
.../dubbo/RemoteVisitoreGetCodeInfo.java | 19 +++++++++++++++++++
ruoyi-modules/ruoyi-resource/pom.xml | 4 ++++
.../resource/controller/SysOssController.java | 13 +++++++++----
.../resource/service/ISysOssService.java | 2 +-
.../service/impl/SysOssServiceImpl.java | 6 +++---
6 files changed, 41 insertions(+), 8 deletions(-)
create mode 100644 ruoyi-api/property-api/src/main/java/org/dromara/property/api/RemoteVisitoreGetCodeInfoService.java
create mode 100644 ruoyi-modules/Property/src/main/java/org/dromara/property/dubbo/RemoteVisitoreGetCodeInfo.java
diff --git a/ruoyi-api/property-api/src/main/java/org/dromara/property/api/RemoteVisitoreGetCodeInfoService.java b/ruoyi-api/property-api/src/main/java/org/dromara/property/api/RemoteVisitoreGetCodeInfoService.java
new file mode 100644
index 00000000..255df77f
--- /dev/null
+++ b/ruoyi-api/property-api/src/main/java/org/dromara/property/api/RemoteVisitoreGetCodeInfoService.java
@@ -0,0 +1,5 @@
+package org.dromara.property.api;
+
+public interface RemoteVisitoreGetCodeInfoService {
+ String getCodeInfo(String code);
+}
diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/dubbo/RemoteVisitoreGetCodeInfo.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/dubbo/RemoteVisitoreGetCodeInfo.java
new file mode 100644
index 00000000..726ab370
--- /dev/null
+++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/dubbo/RemoteVisitoreGetCodeInfo.java
@@ -0,0 +1,19 @@
+package org.dromara.property.dubbo;
+
+import lombok.RequiredArgsConstructor;
+import org.apache.dubbo.config.annotation.DubboService;
+import org.dromara.common.core.constant.GlobalConstants;
+import org.dromara.common.redis.utils.RedisUtils;
+import org.dromara.property.api.RemoteVisitoreGetCodeInfoService;
+import org.dromara.property.domain.bo.QrCodeInfo;
+
+@DubboService
+@RequiredArgsConstructor
+public class RemoteVisitoreGetCodeInfo implements RemoteVisitoreGetCodeInfoService {
+
+ @Override
+ public String getCodeInfo(String code) {
+ QrCodeInfo info = RedisUtils.getCacheObject(GlobalConstants.CAPTCHA_CODE_KEY +"Qrcode" +code);
+ return info.getUserid().toString();
+ }
+}
diff --git a/ruoyi-modules/ruoyi-resource/pom.xml b/ruoyi-modules/ruoyi-resource/pom.xml
index 90e4b66e..13bc9242 100644
--- a/ruoyi-modules/ruoyi-resource/pom.xml
+++ b/ruoyi-modules/ruoyi-resource/pom.xml
@@ -117,6 +117,10 @@
org.dromara
ruoyi-api-resource
+
+ org.dromara
+ property-api
+
diff --git a/ruoyi-modules/ruoyi-resource/src/main/java/org/dromara/resource/controller/SysOssController.java b/ruoyi-modules/ruoyi-resource/src/main/java/org/dromara/resource/controller/SysOssController.java
index 8d6a8849..231e3dc3 100644
--- a/ruoyi-modules/ruoyi-resource/src/main/java/org/dromara/resource/controller/SysOssController.java
+++ b/ruoyi-modules/ruoyi-resource/src/main/java/org/dromara/resource/controller/SysOssController.java
@@ -4,6 +4,8 @@ package org.dromara.resource.controller;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.util.ObjectUtil;
import lombok.RequiredArgsConstructor;
+import org.apache.dubbo.config.annotation.DubboReference;
+import org.apache.dubbo.config.annotation.DubboService;
import org.dromara.common.core.constant.GlobalConstants;
import org.dromara.common.core.domain.R;
import org.dromara.common.core.validate.QueryGroup;
@@ -13,6 +15,7 @@ import org.dromara.common.log.annotation.Log;
import org.dromara.common.log.enums.BusinessType;
import org.dromara.common.mybatis.core.page.PageQuery;
import org.dromara.common.mybatis.core.page.TableDataInfo;
+import org.dromara.property.api.RemoteVisitoreGetCodeInfoService;
import org.dromara.resource.domain.QrCodeInfo;
import org.dromara.resource.domain.bo.SysOssBo;
import org.dromara.resource.domain.vo.SysOssUploadVo;
@@ -41,7 +44,8 @@ import java.util.List;
public class SysOssController extends BaseController {
private final ISysOssService iSysOssService;
-
+ @DubboReference
+ private RemoteVisitoreGetCodeInfoService remoteVisitoreGetCodeInfoService;
/**
* 查询OSS对象存储列表
*/
@@ -96,12 +100,13 @@ public class SysOssController extends BaseController {
if (ObjectUtil.isNull(file)) {
return R.fail("上传文件不能为空");
}
- QrCodeInfo info = RedisUtils.getCacheObject(GlobalConstants.CAPTCHA_CODE_KEY+"Qrcode" + code);
- if (info==null){
+ String codeInfo = remoteVisitoreGetCodeInfoService.getCodeInfo(code);
+// QrCodeInfo info = RedisUtils.getCacheObject(GlobalConstants.CAPTCHA_CODE_KEY+"Qrcode" + code);
+ if (codeInfo.isBlank()){
return R.fail("二维码已过期");
}
- SysOssVo oss = iSysOssService.qrupload(file,info);
+ SysOssVo oss = iSysOssService.qrupload(file,codeInfo);
SysOssUploadVo uploadVo = new SysOssUploadVo();
uploadVo.setUrl(oss.getUrl());
uploadVo.setFileName(oss.getOriginalName());
diff --git a/ruoyi-modules/ruoyi-resource/src/main/java/org/dromara/resource/service/ISysOssService.java b/ruoyi-modules/ruoyi-resource/src/main/java/org/dromara/resource/service/ISysOssService.java
index 22472437..1b2a2b9c 100644
--- a/ruoyi-modules/ruoyi-resource/src/main/java/org/dromara/resource/service/ISysOssService.java
+++ b/ruoyi-modules/ruoyi-resource/src/main/java/org/dromara/resource/service/ISysOssService.java
@@ -67,7 +67,7 @@ public interface ISysOssService {
* @param file 要上传的 MultipartFile 对象
* @return 上传成功后的 SysOssVo 对象,包含文件信息
*/
- SysOssVo qrupload(MultipartFile file, QrCodeInfo qrCodeInfo);
+ SysOssVo qrupload(MultipartFile file, String qrCodeInfo);
/**
* 上传文件到对象存储服务,并保存文件信息到数据库
diff --git a/ruoyi-modules/ruoyi-resource/src/main/java/org/dromara/resource/service/impl/SysOssServiceImpl.java b/ruoyi-modules/ruoyi-resource/src/main/java/org/dromara/resource/service/impl/SysOssServiceImpl.java
index 6069bc5d..48ab3a39 100644
--- a/ruoyi-modules/ruoyi-resource/src/main/java/org/dromara/resource/service/impl/SysOssServiceImpl.java
+++ b/ruoyi-modules/ruoyi-resource/src/main/java/org/dromara/resource/service/impl/SysOssServiceImpl.java
@@ -200,7 +200,7 @@ public class SysOssServiceImpl implements ISysOssService {
}
@Override
- public SysOssVo qrupload(MultipartFile file, QrCodeInfo info) {
+ public SysOssVo qrupload(MultipartFile file, String info) {
String originalfileName = file.getOriginalFilename();
String suffix = StringUtils.substring(originalfileName, originalfileName.lastIndexOf("."), originalfileName.length());
OssClient storage = OssFactory.instance();
@@ -242,14 +242,14 @@ public class SysOssServiceImpl implements ISysOssService {
return this.matchingUrl(sysOssVo);
}
- private SysOssVo buildResultEntityQr(String originalfileName, String suffix, String configKey, UploadResult uploadResult,QrCodeInfo info) {
+ private SysOssVo buildResultEntityQr(String originalfileName, String suffix, String configKey, UploadResult uploadResult,String info) {
SysOss oss = new SysOss();
oss.setUrl(uploadResult.getUrl());
oss.setFileSuffix(suffix);
oss.setFileName(uploadResult.getFilename());
oss.setOriginalName(originalfileName);
oss.setService(configKey);
- oss.setCreateBy(info.getUserid());
+ oss.setCreateBy(Long.valueOf(info));
oss.setCreateTime(new Date());
baseMapper.insert(oss);
SysOssVo sysOssVo = MapstructUtils.convert(oss, SysOssVo.class);
From c8179e164d1cf70ea0b24e76ed44711b27b6d96d Mon Sep 17 00:00:00 2001
From: dy <2389062315@qq.com>
Date: Mon, 18 Aug 2025 20:07:47 +0800
Subject: [PATCH 2/9] =?UTF-8?q?=E5=8C=BA=E5=9F=9F=E6=91=84=E5=83=8F?=
=?UTF-8?q?=E5=A4=B4=E5=90=8D=E7=A7=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../dromara/sis/api/RemoteDeviceService.java | 6 +++
.../sis/api/domain/RemoteSisDeviceManage.java | 32 +++++++++--
.../domain/vo/AttendanceAreaDeviceVo.java | 2 +
.../property/domain/vo/AttendanceAreaVo.java | 2 +-
.../impl/AttendanceAreaServiceImpl.java | 54 +++++++++++--------
.../impl/TbVisitorManagementServiceImpl.java | 2 +
.../sis/domain/covert/CommonBeanCovert.java | 1 +
.../sis/dubbo/RemoteDeviceServiceImpl.java | 10 ++++
.../sis/service/ISisDeviceChannelService.java | 2 +
.../sis/service/ISisDeviceManageService.java | 5 ++
.../impl/SisDeviceManageServiceImpl.java | 8 +++
11 files changed, 98 insertions(+), 26 deletions(-)
diff --git a/ruoyi-api/sis-api/src/main/java/org/dromara/sis/api/RemoteDeviceService.java b/ruoyi-api/sis-api/src/main/java/org/dromara/sis/api/RemoteDeviceService.java
index 95929d84..c8f5a62c 100644
--- a/ruoyi-api/sis-api/src/main/java/org/dromara/sis/api/RemoteDeviceService.java
+++ b/ruoyi-api/sis-api/src/main/java/org/dromara/sis/api/RemoteDeviceService.java
@@ -25,6 +25,12 @@ public interface RemoteDeviceService {
*/
Boolean updateDeviceState(RemoteSisDeviceManage item);
+ /**
+ * 根据id查询的设备信息
+ *
+ */
+ RemoteSisDeviceManage queryDeviceById(Long id);
+
/**
* 查询设备通道信息
*
diff --git a/ruoyi-api/sis-api/src/main/java/org/dromara/sis/api/domain/RemoteSisDeviceManage.java b/ruoyi-api/sis-api/src/main/java/org/dromara/sis/api/domain/RemoteSisDeviceManage.java
index 8cd5247b..8aab67ac 100644
--- a/ruoyi-api/sis-api/src/main/java/org/dromara/sis/api/domain/RemoteSisDeviceManage.java
+++ b/ruoyi-api/sis-api/src/main/java/org/dromara/sis/api/domain/RemoteSisDeviceManage.java
@@ -2,11 +2,17 @@ package org.dromara.sis.api.domain;
import lombok.Data;
+import java.io.Serial;
+import java.io.Serializable;
+
/**
* 设备远程调用对象
*/
@Data
-public class RemoteSisDeviceManage {
+public class RemoteSisDeviceManage implements Serializable {
+
+ @Serial
+ private static final long serialVersionUID = 1L;
/**
* 主键id
@@ -63,8 +69,26 @@ public class RemoteSisDeviceManage {
*/
private Long groupId;
- /**
- * 租户编号
- */
private String tenantId;
+
+ /**
+ * 楼层id
+ */
+ private Long floorId;
+
+ /**
+ * 是否支持人脸比对
+ */
+ private Boolean isComparison;
+
+ /**
+ * 设备经度
+ */
+ private Double lon;
+
+ /**
+ * 设备维度
+ */
+ private Double lat;
+
}
diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/AttendanceAreaDeviceVo.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/AttendanceAreaDeviceVo.java
index 90f0dc0e..79f8c15e 100644
--- a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/AttendanceAreaDeviceVo.java
+++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/AttendanceAreaDeviceVo.java
@@ -7,6 +7,7 @@ import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
+import org.dromara.sis.api.domain.RemoteSisDeviceManage;
import java.io.Serial;
import java.io.Serializable;
@@ -47,4 +48,5 @@ public class AttendanceAreaDeviceVo implements Serializable {
private Long deviceManageId;
+ private RemoteSisDeviceManage remoteSisDeviceManage;
}
diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/AttendanceAreaVo.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/AttendanceAreaVo.java
index 8536ed99..0528524d 100644
--- a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/AttendanceAreaVo.java
+++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/AttendanceAreaVo.java
@@ -53,7 +53,7 @@ public class AttendanceAreaVo implements Serializable {
@ExcelProperty(value = "备注")
private String reamark;
- private List areaDevice;
+ private List areaDevice;
}
diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/AttendanceAreaServiceImpl.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/AttendanceAreaServiceImpl.java
index ea1edd95..c368f2ab 100644
--- a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/AttendanceAreaServiceImpl.java
+++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/AttendanceAreaServiceImpl.java
@@ -1,29 +1,31 @@
package org.dromara.property.service.impl;
-import cn.hutool.core.util.ObjectUtil;
-import org.dromara.common.core.utils.MapstructUtils;
-import org.dromara.common.core.utils.StringUtils;
-import org.dromara.common.mybatis.core.page.TableDataInfo;
-import org.dromara.common.mybatis.core.page.PageQuery;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
-import org.dromara.property.domain.AttendanceAreaDevice;
-import org.dromara.property.mapper.AttendanceAreaDeviceMapper;
-import org.springframework.stereotype.Service;
-import org.dromara.property.domain.bo.AttendanceAreaBo;
-import org.dromara.property.domain.vo.AttendanceAreaVo;
+import org.apache.dubbo.config.annotation.DubboReference;
+import org.dromara.common.core.utils.MapstructUtils;
+import org.dromara.common.core.utils.StringUtils;
+import org.dromara.common.mybatis.core.page.PageQuery;
+import org.dromara.common.mybatis.core.page.TableDataInfo;
import org.dromara.property.domain.AttendanceArea;
+import org.dromara.property.domain.AttendanceAreaDevice;
+import org.dromara.property.domain.bo.AttendanceAreaBo;
+import org.dromara.property.domain.vo.AttendanceAreaDeviceVo;
+import org.dromara.property.domain.vo.AttendanceAreaVo;
+import org.dromara.property.mapper.AttendanceAreaDeviceMapper;
import org.dromara.property.mapper.AttendanceAreaMapper;
import org.dromara.property.service.IAttendanceAreaService;
+import org.dromara.sis.api.RemoteDeviceService;
+import org.dromara.sis.api.domain.RemoteSisDeviceManage;
+import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
-import java.util.ArrayList;
+import java.util.Collection;
import java.util.List;
import java.util.Map;
-import java.util.Collection;
/**
* 区域区域管理Service业务层处理
@@ -40,6 +42,10 @@ public class AttendanceAreaServiceImpl implements IAttendanceAreaService {
private final AttendanceAreaDeviceMapper areaDeviceMapper;
+// private TdDeviceTypeServiceImpl deviceTypeService;
+
+ @DubboReference
+ private RemoteDeviceService remoteDeviceService;
/**
* 查询区域区域管理
*
@@ -47,7 +53,7 @@ public class AttendanceAreaServiceImpl implements IAttendanceAreaService {
* @return 区域区域管理
*/
@Override
- public AttendanceAreaVo queryById(Long id){
+ public AttendanceAreaVo queryById(Long id) {
return baseMapper.selectVoById(id);
}
@@ -64,11 +70,17 @@ public class AttendanceAreaServiceImpl implements IAttendanceAreaService {
Page result = baseMapper.selectVoPage(pageQuery.build(), lqw);
Page attendanceAreaVoPage = result.setRecords(result.getRecords().stream().map(vo -> {
- //获取areaId
- Long areaId = vo.getId();
- //根据areaId查询中间表数据
- List attendanceAreaDeviceList = areaDeviceMapper.selectList(Wrappers.lambdaQuery().eq(AttendanceAreaDevice::getAreaId, areaId));
- vo.setAreaDevice(attendanceAreaDeviceList);
+ //获取areaId
+ Long areaId = vo.getId();
+ //根据areaId查询中间表数据
+ List attendanceAreaDeviceList =areaDeviceMapper.selectVoList(Wrappers.lambdaQuery().eq(AttendanceAreaDevice::getAreaId, areaId));
+// List attendanceAreaDeviceList = areaDeviceMapper.selectList(Wrappers.lambdaQuery().eq(AttendanceAreaDevice::getAreaId, areaId));
+ attendanceAreaDeviceList.forEach(item -> {
+ //根据deviceManageId查询设备数据
+ RemoteSisDeviceManage remoteSisDeviceManage = remoteDeviceService.queryDeviceById(item.getDeviceManageId());
+ item.setRemoteSisDeviceManage(remoteSisDeviceManage);
+ });
+ vo.setAreaDevice(attendanceAreaDeviceList);
return vo;
}
).toList());
@@ -163,7 +175,7 @@ public class AttendanceAreaServiceImpl implements IAttendanceAreaService {
/**
* 保存前的数据校验
*/
- private void validEntityBeforeSave(AttendanceArea entity){
+ private void validEntityBeforeSave(AttendanceArea entity) {
//TODO 做一些数据校验,如唯一约束
}
@@ -177,7 +189,7 @@ public class AttendanceAreaServiceImpl implements IAttendanceAreaService {
@Transactional(rollbackFor = Exception.class)
@Override
public Boolean deleteWithValidByIds(Collection ids, Boolean isValid) {
- if(isValid){
+ if (isValid) {
//TODO 做一些业务上的校验,判断是否需要校验
}
diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/TbVisitorManagementServiceImpl.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/TbVisitorManagementServiceImpl.java
index 63dd52d0..09318f70 100644
--- a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/TbVisitorManagementServiceImpl.java
+++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/TbVisitorManagementServiceImpl.java
@@ -113,6 +113,8 @@ public class TbVisitorManagementServiceImpl implements ITbVisitorManagementServi
add.setTenantId(userInfoById.getTenantId());
add.setCreateBy(userInfoById.getUserId());
add.setUpdateById(userInfoById.getUserId());
+ //调用SysOssController.upload方法上传图片
+
add.setUpdateBy(userInfoById.getUserId());
add.setCreateDept(userInfoById.getDeptId());
boolean flag = baseMapper.insert(add) > 0;
diff --git a/ruoyi-modules/Sis/src/main/java/org/dromara/sis/domain/covert/CommonBeanCovert.java b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/domain/covert/CommonBeanCovert.java
index cabe53bf..c16eabb1 100644
--- a/ruoyi-modules/Sis/src/main/java/org/dromara/sis/domain/covert/CommonBeanCovert.java
+++ b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/domain/covert/CommonBeanCovert.java
@@ -24,4 +24,5 @@ public interface CommonBeanCovert {
List sdkChannelEntity2Remote(List sdkChannels);
+ RemoteSisDeviceManage entities2Remote(SisDeviceManage sisDeviceManage);
}
diff --git a/ruoyi-modules/Sis/src/main/java/org/dromara/sis/dubbo/RemoteDeviceServiceImpl.java b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/dubbo/RemoteDeviceServiceImpl.java
index 8b495801..eb158ced 100644
--- a/ruoyi-modules/Sis/src/main/java/org/dromara/sis/dubbo/RemoteDeviceServiceImpl.java
+++ b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/dubbo/RemoteDeviceServiceImpl.java
@@ -3,6 +3,7 @@ package org.dromara.sis.dubbo;
import cn.hutool.core.util.StrUtil;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
+import org.apache.dubbo.config.annotation.DubboService;
import org.dromara.sis.api.RemoteDeviceService;
import org.dromara.sis.api.domain.RemoteSdkChannel;
import org.dromara.sis.api.domain.RemoteSisDeviceChannel;
@@ -14,6 +15,7 @@ import org.dromara.sis.sdk.hik.HikSdkConstans;
import org.dromara.sis.service.ISisDeviceChannelService;
import org.dromara.sis.service.ISisDeviceManageService;
import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Service;
import java.util.List;
@@ -25,6 +27,8 @@ import java.util.List;
@Slf4j
@Component
@RequiredArgsConstructor
+@Service
+@DubboService
public class RemoteDeviceServiceImpl implements RemoteDeviceService {
private final ISisDeviceManageService deviceManageService;
@@ -41,6 +45,12 @@ public class RemoteDeviceServiceImpl implements RemoteDeviceService {
return deviceManageService.updateDeviceState(CommonBeanCovert.INSTANCE.Remote2Entity(item));
}
+ @Override
+ public RemoteSisDeviceManage queryDeviceById(Long id) {
+ SisDeviceManage sisDeviceManage = deviceManageService.queryDeviceById(id);
+ return CommonBeanCovert.INSTANCE.entities2Remote(sisDeviceManage);
+ }
+
@Override
public List queryDeviceChannels(String deviceIp) {
List channels = deviceChannelService.queryByDeviceIp(deviceIp);
diff --git a/ruoyi-modules/Sis/src/main/java/org/dromara/sis/service/ISisDeviceChannelService.java b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/service/ISisDeviceChannelService.java
index 8cf5edb7..c16df746 100644
--- a/ruoyi-modules/Sis/src/main/java/org/dromara/sis/service/ISisDeviceChannelService.java
+++ b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/service/ISisDeviceChannelService.java
@@ -4,6 +4,7 @@ import jakarta.validation.constraints.NotEmpty;
import org.dromara.common.core.domain.TreeNode;
import org.dromara.common.mybatis.core.page.PageQuery;
import org.dromara.common.mybatis.core.page.TableDataInfo;
+import org.dromara.sis.api.domain.RemoteSisDeviceChannel;
import org.dromara.sis.domain.SisDeviceChannel;
import org.dromara.sis.domain.bo.SisDeviceChannelBo;
import org.dromara.sis.domain.bo.SisDeviceManageBo;
@@ -138,4 +139,5 @@ public interface ISisDeviceChannelService {
* @return 返回通道信息
*/
SisDeviceChannel queryChannels(@NotEmpty String deviceIp, @NotEmpty String channelNo);
+
}
diff --git a/ruoyi-modules/Sis/src/main/java/org/dromara/sis/service/ISisDeviceManageService.java b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/service/ISisDeviceManageService.java
index 06f89f2d..745faef2 100644
--- a/ruoyi-modules/Sis/src/main/java/org/dromara/sis/service/ISisDeviceManageService.java
+++ b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/service/ISisDeviceManageService.java
@@ -3,6 +3,7 @@ package org.dromara.sis.service;
import org.dromara.common.core.domain.TreeNode;
import org.dromara.common.mybatis.core.page.PageQuery;
import org.dromara.common.mybatis.core.page.TableDataInfo;
+import org.dromara.sis.api.domain.RemoteSisDeviceManage;
import org.dromara.sis.domain.SisDeviceManage;
import org.dromara.sis.domain.bo.SisDeviceManageBo;
import org.dromara.sis.domain.vo.SisDeviceManageVo;
@@ -26,6 +27,7 @@ public interface ISisDeviceManageService {
*/
SisDeviceManageVo queryById(Long id);
+
/**
* 分页查询设备管理列表
*
@@ -95,6 +97,9 @@ public interface ISisDeviceManageService {
*/
List queryHikDevices();
+
+ SisDeviceManage queryDeviceById(Long id);
+
/**
* 更新设备状态信息
* @param sisDeviceManage 设备信息
diff --git a/ruoyi-modules/Sis/src/main/java/org/dromara/sis/service/impl/SisDeviceManageServiceImpl.java b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/service/impl/SisDeviceManageServiceImpl.java
index 5a82f2bd..10d0ae28 100644
--- a/ruoyi-modules/Sis/src/main/java/org/dromara/sis/service/impl/SisDeviceManageServiceImpl.java
+++ b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/service/impl/SisDeviceManageServiceImpl.java
@@ -13,6 +13,7 @@ import org.dromara.common.core.utils.SpringUtils;
import org.dromara.common.core.utils.StringUtils;
import org.dromara.common.mybatis.core.page.PageQuery;
import org.dromara.common.mybatis.core.page.TableDataInfo;
+import org.dromara.sis.api.domain.RemoteSisDeviceManage;
import org.dromara.sis.api.enums.FactoryNoEnum;
import org.dromara.sis.domain.SisDeviceManage;
import org.dromara.sis.domain.bo.SisDeviceManageBo;
@@ -57,6 +58,7 @@ public class SisDeviceManageServiceImpl implements ISisDeviceManageService {
return deviceManageVo;
}
+
/**
* 分页查询设备管理列表
*
@@ -222,6 +224,12 @@ public class SisDeviceManageServiceImpl implements ISisDeviceManageService {
return baseMapper.selectList(lqw);
}
+
+ @Override
+ public SisDeviceManage queryDeviceById(Long id) {
+ return baseMapper.selectById(id);
+ }
+
@Override
public Boolean updateDeviceState(SisDeviceManage sisDeviceManage) {
LambdaUpdateWrapper lqw = Wrappers.lambdaUpdate();
From 6d3849fa642375391e2b8f483ebc8b5e1122e256 Mon Sep 17 00:00:00 2001
From: mocheng <3057647414@qq.com>
Date: Mon, 18 Aug 2025 20:43:12 +0800
Subject: [PATCH 3/9] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E8=AE=BF=E5=AE=A2?=
=?UTF-8?q?=E4=B8=8A=E4=BC=A0=E5=9B=BE=E7=89=87?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../org/dromara/property/dubbo/RemoteVisitoreGetCodeInfo.java | 3 +++
.../java/org/dromara/resource/controller/SysOssController.java | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/dubbo/RemoteVisitoreGetCodeInfo.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/dubbo/RemoteVisitoreGetCodeInfo.java
index 726ab370..c0656633 100644
--- a/ruoyi-modules/Property/src/main/java/org/dromara/property/dubbo/RemoteVisitoreGetCodeInfo.java
+++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/dubbo/RemoteVisitoreGetCodeInfo.java
@@ -14,6 +14,9 @@ public class RemoteVisitoreGetCodeInfo implements RemoteVisitoreGetCodeInfoServi
@Override
public String getCodeInfo(String code) {
QrCodeInfo info = RedisUtils.getCacheObject(GlobalConstants.CAPTCHA_CODE_KEY +"Qrcode" +code);
+ if (info == null){
+ return "";
+ }
return info.getUserid().toString();
}
}
diff --git a/ruoyi-modules/ruoyi-resource/src/main/java/org/dromara/resource/controller/SysOssController.java b/ruoyi-modules/ruoyi-resource/src/main/java/org/dromara/resource/controller/SysOssController.java
index 231e3dc3..1a0beb8c 100644
--- a/ruoyi-modules/ruoyi-resource/src/main/java/org/dromara/resource/controller/SysOssController.java
+++ b/ruoyi-modules/ruoyi-resource/src/main/java/org/dromara/resource/controller/SysOssController.java
@@ -102,7 +102,7 @@ public class SysOssController extends BaseController {
}
String codeInfo = remoteVisitoreGetCodeInfoService.getCodeInfo(code);
// QrCodeInfo info = RedisUtils.getCacheObject(GlobalConstants.CAPTCHA_CODE_KEY+"Qrcode" + code);
- if (codeInfo.isBlank()){
+ if (codeInfo.isEmpty()){
return R.fail("二维码已过期");
}
From 6397085fe98b7c3ae54dea19349a4d288ae63147 Mon Sep 17 00:00:00 2001
From: dy <2389062315@qq.com>
Date: Tue, 19 Aug 2025 09:54:33 +0800
Subject: [PATCH 4/9] =?UTF-8?q?=E6=8E=92=E7=8F=AD=E7=9A=84=E5=8C=BA?=
=?UTF-8?q?=E5=9F=9F=E7=AE=A1=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../AttendanceArrangementAreaController.java | 106 ++++++++++++++
.../domain/AttendanceArrangementArea.java | 41 ++++++
.../bo/AttendanceArrangementAreaBo.java | 40 ++++++
.../domain/bo/AttendanceArrangementBo.java | 1 +
.../vo/AttendanceArrangementAreaVo.java | 50 +++++++
.../domain/vo/AttendanceArrangementVo.java | 2 +-
.../domain/vo/AttendanceUserGroupVo.java | 4 +
.../AttendanceArrangementAreaMapper.java | 15 ++
.../IAttendanceArrangementAreaService.java | 69 +++++++++
.../AttendanceArrangementAreaServiceImpl.java | 133 ++++++++++++++++++
.../AttendanceArrangementServiceImpl.java | 82 +++++++++--
.../impl/AttendanceUserGroupServiceImpl.java | 21 ++-
.../src/main/resources/application.properties | 2 +-
13 files changed, 540 insertions(+), 26 deletions(-)
create mode 100644 ruoyi-modules/Property/src/main/java/org/dromara/property/controller/AttendanceArrangementAreaController.java
create mode 100644 ruoyi-modules/Property/src/main/java/org/dromara/property/domain/AttendanceArrangementArea.java
create mode 100644 ruoyi-modules/Property/src/main/java/org/dromara/property/domain/bo/AttendanceArrangementAreaBo.java
create mode 100644 ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/AttendanceArrangementAreaVo.java
create mode 100644 ruoyi-modules/Property/src/main/java/org/dromara/property/mapper/AttendanceArrangementAreaMapper.java
create mode 100644 ruoyi-modules/Property/src/main/java/org/dromara/property/service/IAttendanceArrangementAreaService.java
create mode 100644 ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/AttendanceArrangementAreaServiceImpl.java
diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/controller/AttendanceArrangementAreaController.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/controller/AttendanceArrangementAreaController.java
new file mode 100644
index 00000000..1c3c224a
--- /dev/null
+++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/controller/AttendanceArrangementAreaController.java
@@ -0,0 +1,106 @@
+package org.dromara.property.controller;
+
+import java.util.List;
+
+import lombok.RequiredArgsConstructor;
+import jakarta.servlet.http.HttpServletResponse;
+import jakarta.validation.constraints.*;
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.validation.annotation.Validated;
+import org.dromara.common.idempotent.annotation.RepeatSubmit;
+import org.dromara.common.log.annotation.Log;
+import org.dromara.common.web.core.BaseController;
+import org.dromara.common.mybatis.core.page.PageQuery;
+import org.dromara.common.core.domain.R;
+import org.dromara.common.core.validate.AddGroup;
+import org.dromara.common.core.validate.EditGroup;
+import org.dromara.common.log.enums.BusinessType;
+import org.dromara.common.excel.utils.ExcelUtil;
+import org.dromara.property.domain.vo.AttendanceArrangementAreaVo;
+import org.dromara.property.domain.bo.AttendanceArrangementAreaBo;
+import org.dromara.property.service.IAttendanceArrangementAreaService;
+import org.dromara.common.mybatis.core.page.TableDataInfo;
+
+/**
+ * 区域排班中间
+ * 前端访问路由地址为:/property/arrangementArea
+ *
+ * @author LionLi
+ * @date 2025-08-18
+ */
+@Validated
+@RequiredArgsConstructor
+@RestController
+@RequestMapping("/arrangementArea")
+public class AttendanceArrangementAreaController extends BaseController {
+
+ private final IAttendanceArrangementAreaService attendanceArrangementAreaService;
+
+ /**
+ * 查询区域排班中间列表
+ */
+ @SaCheckPermission("property:arrangementArea:list")
+ @GetMapping("/list")
+ public TableDataInfo list(AttendanceArrangementAreaBo bo, PageQuery pageQuery) {
+ return attendanceArrangementAreaService.queryPageList(bo, pageQuery);
+ }
+
+ /**
+ * 导出区域排班中间列表
+ */
+ @SaCheckPermission("property:arrangementArea:export")
+ @Log(title = "区域排班中间", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ public void export(AttendanceArrangementAreaBo bo, HttpServletResponse response) {
+ List list = attendanceArrangementAreaService.queryList(bo);
+ ExcelUtil.exportExcel(list, "区域排班中间", AttendanceArrangementAreaVo.class, response);
+ }
+
+ /**
+ * 获取区域排班中间详细信息
+ *
+ * @param id 主键
+ */
+ @SaCheckPermission("property:arrangementArea:query")
+ @GetMapping("/{id}")
+ public R getInfo(@NotNull(message = "主键不能为空")
+ @PathVariable("id") Long id) {
+ return R.ok(attendanceArrangementAreaService.queryById(id));
+ }
+
+ /**
+ * 新增区域排班中间
+ */
+ @SaCheckPermission("property:arrangementArea:add")
+ @Log(title = "区域排班中间", businessType = BusinessType.INSERT)
+ @RepeatSubmit()
+ @PostMapping()
+ public R add(@Validated(AddGroup.class) @RequestBody AttendanceArrangementAreaBo bo) {
+ return toAjax(attendanceArrangementAreaService.insertByBo(bo));
+ }
+
+ /**
+ * 修改区域排班中间
+ */
+ @SaCheckPermission("property:arrangementArea:edit")
+ @Log(title = "区域排班中间", businessType = BusinessType.UPDATE)
+ @RepeatSubmit()
+ @PutMapping()
+ public R edit(@Validated(EditGroup.class) @RequestBody AttendanceArrangementAreaBo bo) {
+ return toAjax(attendanceArrangementAreaService.updateByBo(bo));
+ }
+
+ /**
+ * 删除区域排班中间
+ *
+ * @param ids 主键串
+ */
+ @SaCheckPermission("property:arrangementArea:remove")
+ @Log(title = "区域排班中间", businessType = BusinessType.DELETE)
+ @DeleteMapping("/{ids}")
+ public R remove(@NotEmpty(message = "主键不能为空")
+ @PathVariable("ids") Long[] ids) {
+ return toAjax(attendanceArrangementAreaService.deleteWithValidByIds(List.of(ids), true));
+ }
+}
diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/AttendanceArrangementArea.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/AttendanceArrangementArea.java
new file mode 100644
index 00000000..19dc1965
--- /dev/null
+++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/AttendanceArrangementArea.java
@@ -0,0 +1,41 @@
+package org.dromara.property.domain;
+
+import org.dromara.common.tenant.core.TenantEntity;
+import com.baomidou.mybatisplus.annotation.*;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.io.Serial;
+
+/**
+ * 区域排班中间对象 attendance_arrangement_area
+ *
+ * @author LionLi
+ * @date 2025-08-18
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("attendance_arrangement_area")
+public class AttendanceArrangementArea extends TenantEntity {
+
+ @Serial
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 主键id
+ */
+ @TableId(value = "id")
+ private Long id;
+
+ /**
+ * 区域id
+ */
+ private Long areaId;
+
+ /**
+ * 排班id
+ */
+ private Long shceduleId;
+
+
+}
diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/bo/AttendanceArrangementAreaBo.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/bo/AttendanceArrangementAreaBo.java
new file mode 100644
index 00000000..3a1d8bcc
--- /dev/null
+++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/bo/AttendanceArrangementAreaBo.java
@@ -0,0 +1,40 @@
+package org.dromara.property.domain.bo;
+
+import org.dromara.property.domain.AttendanceArrangementArea;
+import org.dromara.common.mybatis.core.domain.BaseEntity;
+import org.dromara.common.core.validate.AddGroup;
+import org.dromara.common.core.validate.EditGroup;
+import io.github.linpeilie.annotations.AutoMapper;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import jakarta.validation.constraints.*;
+
+/**
+ * 区域排班中间业务对象 attendance_arrangement_area
+ *
+ * @author LionLi
+ * @date 2025-08-18
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@AutoMapper(target = AttendanceArrangementArea.class, reverseConvertGenerate = false)
+public class AttendanceArrangementAreaBo extends BaseEntity {
+
+ /**
+ * 主键id
+ */
+ @NotNull(message = "主键id不能为空", groups = { EditGroup.class })
+ private Long id;
+
+ /**
+ * 区域id
+ */
+ private Long areaId;
+
+ /**
+ * 排班id
+ */
+ private Long shceduleId;
+
+
+}
diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/bo/AttendanceArrangementBo.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/bo/AttendanceArrangementBo.java
index 8ea4e355..8de8f3eb 100644
--- a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/bo/AttendanceArrangementBo.java
+++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/bo/AttendanceArrangementBo.java
@@ -103,6 +103,7 @@ public class AttendanceArrangementBo extends BaseEntity {
*/
private List scheduleCycleList;
+ private List areaId;
}
diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/AttendanceArrangementAreaVo.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/AttendanceArrangementAreaVo.java
new file mode 100644
index 00000000..09340d88
--- /dev/null
+++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/AttendanceArrangementAreaVo.java
@@ -0,0 +1,50 @@
+package org.dromara.property.domain.vo;
+
+import org.dromara.property.domain.AttendanceArrangementArea;
+import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
+import cn.idev.excel.annotation.ExcelProperty;
+import org.dromara.common.excel.annotation.ExcelDictFormat;
+import org.dromara.common.excel.convert.ExcelDictConvert;
+import io.github.linpeilie.annotations.AutoMapper;
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+import java.util.Date;
+
+
+
+/**
+ * 区域排班中间视图对象 attendance_arrangement_area
+ *
+ * @author LionLi
+ * @date 2025-08-18
+ */
+@Data
+@ExcelIgnoreUnannotated
+@AutoMapper(target = AttendanceArrangementArea.class)
+public class AttendanceArrangementAreaVo implements Serializable {
+
+ @Serial
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 主键id
+ */
+ @ExcelProperty(value = "主键id")
+ private Long id;
+
+ /**
+ * 区域id
+ */
+ @ExcelProperty(value = "区域id")
+ private Long areaId;
+
+ /**
+ * 排班id
+ */
+ @ExcelProperty(value = "排班id")
+ private Long shceduleId;
+
+
+}
diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/AttendanceArrangementVo.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/AttendanceArrangementVo.java
index f53ae519..82007f55 100644
--- a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/AttendanceArrangementVo.java
+++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/AttendanceArrangementVo.java
@@ -96,7 +96,7 @@ public class AttendanceArrangementVo implements Serializable {
//排班制
private AttendanceScheduleCycle scheduleCycle;
- private AttendanceArea attendanceArea;
+ private List areaList;
}
diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/AttendanceUserGroupVo.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/AttendanceUserGroupVo.java
index 2451103f..3185512e 100644
--- a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/AttendanceUserGroupVo.java
+++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/AttendanceUserGroupVo.java
@@ -11,6 +11,7 @@ import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDate;
+import java.util.List;
/**
@@ -89,5 +90,8 @@ public class AttendanceUserGroupVo implements Serializable {
private AttendanceArea attendanceArea;
+ private List attendanceArrangementAreaList;
+
+ private List attendanceAreaList;
}
diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/mapper/AttendanceArrangementAreaMapper.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/mapper/AttendanceArrangementAreaMapper.java
new file mode 100644
index 00000000..91975d83
--- /dev/null
+++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/mapper/AttendanceArrangementAreaMapper.java
@@ -0,0 +1,15 @@
+package org.dromara.property.mapper;
+
+import org.dromara.property.domain.AttendanceArrangementArea;
+import org.dromara.property.domain.vo.AttendanceArrangementAreaVo;
+import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
+
+/**
+ * 区域排班中间Mapper接口
+ *
+ * @author LionLi
+ * @date 2025-08-18
+ */
+public interface AttendanceArrangementAreaMapper extends BaseMapperPlus {
+
+}
diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/IAttendanceArrangementAreaService.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/IAttendanceArrangementAreaService.java
new file mode 100644
index 00000000..d389dc15
--- /dev/null
+++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/IAttendanceArrangementAreaService.java
@@ -0,0 +1,69 @@
+package org.dromara.property.service;
+
+import org.dromara.property.domain.AttendanceArrangementArea;
+import org.dromara.property.domain.vo.AttendanceArrangementAreaVo;
+import org.dromara.property.domain.bo.AttendanceArrangementAreaBo;
+import org.dromara.common.mybatis.core.page.TableDataInfo;
+import org.dromara.common.mybatis.core.page.PageQuery;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * 区域排班中间Service接口
+ *
+ * @author LionLi
+ * @date 2025-08-18
+ */
+public interface IAttendanceArrangementAreaService {
+
+ /**
+ * 查询区域排班中间
+ *
+ * @param id 主键
+ * @return 区域排班中间
+ */
+ AttendanceArrangementAreaVo queryById(Long id);
+
+ /**
+ * 分页查询区域排班中间列表
+ *
+ * @param bo 查询条件
+ * @param pageQuery 分页参数
+ * @return 区域排班中间分页列表
+ */
+ TableDataInfo queryPageList(AttendanceArrangementAreaBo bo, PageQuery pageQuery);
+
+ /**
+ * 查询符合条件的区域排班中间列表
+ *
+ * @param bo 查询条件
+ * @return 区域排班中间列表
+ */
+ List queryList(AttendanceArrangementAreaBo bo);
+
+ /**
+ * 新增区域排班中间
+ *
+ * @param bo 区域排班中间
+ * @return 是否新增成功
+ */
+ Boolean insertByBo(AttendanceArrangementAreaBo bo);
+
+ /**
+ * 修改区域排班中间
+ *
+ * @param bo 区域排班中间
+ * @return 是否修改成功
+ */
+ Boolean updateByBo(AttendanceArrangementAreaBo bo);
+
+ /**
+ * 校验并批量删除区域排班中间信息
+ *
+ * @param ids 待删除的主键集合
+ * @param isValid 是否进行有效性校验
+ * @return 是否删除成功
+ */
+ Boolean deleteWithValidByIds(Collection ids, Boolean isValid);
+}
diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/AttendanceArrangementAreaServiceImpl.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/AttendanceArrangementAreaServiceImpl.java
new file mode 100644
index 00000000..e647868c
--- /dev/null
+++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/AttendanceArrangementAreaServiceImpl.java
@@ -0,0 +1,133 @@
+package org.dromara.property.service.impl;
+
+import org.dromara.common.core.utils.MapstructUtils;
+import org.dromara.common.core.utils.StringUtils;
+import org.dromara.common.mybatis.core.page.TableDataInfo;
+import org.dromara.common.mybatis.core.page.PageQuery;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+import org.dromara.property.domain.bo.AttendanceArrangementAreaBo;
+import org.dromara.property.domain.vo.AttendanceArrangementAreaVo;
+import org.dromara.property.domain.AttendanceArrangementArea;
+import org.dromara.property.mapper.AttendanceArrangementAreaMapper;
+import org.dromara.property.service.IAttendanceArrangementAreaService;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Collection;
+
+/**
+ * 区域排班中间Service业务层处理
+ *
+ * @author LionLi
+ * @date 2025-08-18
+ */
+@Slf4j
+@RequiredArgsConstructor
+@Service
+public class AttendanceArrangementAreaServiceImpl implements IAttendanceArrangementAreaService {
+
+ private final AttendanceArrangementAreaMapper baseMapper;
+
+ /**
+ * 查询区域排班中间
+ *
+ * @param id 主键
+ * @return 区域排班中间
+ */
+ @Override
+ public AttendanceArrangementAreaVo queryById(Long id){
+ return baseMapper.selectVoById(id);
+ }
+
+ /**
+ * 分页查询区域排班中间列表
+ *
+ * @param bo 查询条件
+ * @param pageQuery 分页参数
+ * @return 区域排班中间分页列表
+ */
+ @Override
+ public TableDataInfo queryPageList(AttendanceArrangementAreaBo bo, PageQuery pageQuery) {
+ LambdaQueryWrapper lqw = buildQueryWrapper(bo);
+ Page result = baseMapper.selectVoPage(pageQuery.build(), lqw);
+ return TableDataInfo.build(result);
+ }
+
+ /**
+ * 查询符合条件的区域排班中间列表
+ *
+ * @param bo 查询条件
+ * @return 区域排班中间列表
+ */
+ @Override
+ public List queryList(AttendanceArrangementAreaBo bo) {
+ LambdaQueryWrapper lqw = buildQueryWrapper(bo);
+ return baseMapper.selectVoList(lqw);
+ }
+
+ private LambdaQueryWrapper buildQueryWrapper(AttendanceArrangementAreaBo bo) {
+ Map params = bo.getParams();
+ LambdaQueryWrapper lqw = Wrappers.lambdaQuery();
+ lqw.orderByAsc(AttendanceArrangementArea::getId);
+ lqw.eq(bo.getAreaId() != null, AttendanceArrangementArea::getAreaId, bo.getAreaId());
+ lqw.eq(bo.getShceduleId() != null, AttendanceArrangementArea::getShceduleId, bo.getShceduleId());
+ return lqw;
+ }
+
+ /**
+ * 新增区域排班中间
+ *
+ * @param bo 区域排班中间
+ * @return 是否新增成功
+ */
+ @Override
+ public Boolean insertByBo(AttendanceArrangementAreaBo bo) {
+ AttendanceArrangementArea add = MapstructUtils.convert(bo, AttendanceArrangementArea.class);
+ validEntityBeforeSave(add);
+ boolean flag = baseMapper.insert(add) > 0;
+ if (flag) {
+ bo.setId(add.getId());
+ }
+ return flag;
+ }
+
+ /**
+ * 修改区域排班中间
+ *
+ * @param bo 区域排班中间
+ * @return 是否修改成功
+ */
+ @Override
+ public Boolean updateByBo(AttendanceArrangementAreaBo bo) {
+ AttendanceArrangementArea update = MapstructUtils.convert(bo, AttendanceArrangementArea.class);
+ validEntityBeforeSave(update);
+ return baseMapper.updateById(update) > 0;
+ }
+
+ /**
+ * 保存前的数据校验
+ */
+ private void validEntityBeforeSave(AttendanceArrangementArea entity){
+ //TODO 做一些数据校验,如唯一约束
+ }
+
+ /**
+ * 校验并批量删除区域排班中间信息
+ *
+ * @param ids 待删除的主键集合
+ * @param isValid 是否进行有效性校验
+ * @return 是否删除成功
+ */
+ @Override
+ public Boolean deleteWithValidByIds(Collection ids, Boolean isValid) {
+ if(isValid){
+ //TODO 做一些业务上的校验,判断是否需要校验
+ }
+ return baseMapper.deleteByIds(ids) > 0;
+ }
+}
diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/AttendanceArrangementServiceImpl.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/AttendanceArrangementServiceImpl.java
index df12005e..50b3c22f 100644
--- a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/AttendanceArrangementServiceImpl.java
+++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/AttendanceArrangementServiceImpl.java
@@ -55,23 +55,29 @@ public class AttendanceArrangementServiceImpl implements IAttendanceArrangementS
private final AttendanceAreaMapper attendanceAreaMapper;
+ private final AttendanceArrangementAreaMapper attendanceArrangementAreaMapper;
+
@DubboReference
private RemoteUserService remoteUserService;
+
/**
- * 查询排班
+ * 根据id查询排班详情
*
* @param id 主键
* @return 排班
*/
@Override
public AttendanceArrangementVo queryById(Long id) {
+ //1.查询排班
AttendanceArrangementVo vo = baseMapper.selectVoById(id);
+ //2.查询考勤组信息
//根据id查询出groupId
Long groupId = baseMapper.selectById(id).getGroupId();
//根据groupId查询出考勤组信息
AttendanceGroup attendanceGroup = attendanceGroupMapper.selectById(groupId);
vo.setAttendanceGroup(attendanceGroup);
+ //3.查询人员表信息
//根据id查询排班人员信息
List userGroupList = userGroupMapper.selectVoList(Wrappers.lambdaQuery().eq(AttendanceUserGroup::getScheduleId, id));
//查询所有的用户信息
@@ -84,9 +90,18 @@ public class AttendanceArrangementServiceImpl implements IAttendanceArrangementS
//根据deptId查询出部门名称
String deptName = remoteUserService.selectDeptNamesByIds(Arrays.asList(deptId)).get(deptId);
userGroup.setDeptName(deptName);
- });
+ });
//将排班人员信息添加到排班信息中
vo.setUserGroupList(userGroupList);
+
+ //4.根据id查询区域信息
+ List arrangementAreaList = attendanceArrangementAreaMapper.selectList(Wrappers.lambdaQuery().eq(AttendanceArrangementArea::getShceduleId, id));
+ //过滤出排班的区域id
+ List areaIdList = arrangementAreaList.stream().map(AttendanceArrangementArea::getAreaId).collect(Collectors.toList());
+ //根据区域id查询出区域信息
+ List areaList = attendanceAreaMapper.selectList(Wrappers.lambdaQuery().in(AttendanceArea::getId, areaIdList));
+ //6.将区域信息添加到排班信息中
+ vo.setAreaList(areaList);
return vo;
}
@@ -120,18 +135,27 @@ public class AttendanceArrangementServiceImpl implements IAttendanceArrangementS
//根据排班的id查询出排班的人员详细信息
// List userGroupList = userGroupMapper.selectList(Wrappers.lambdaQuery().in(AttendanceUserGroup::getScheduleId, scheduleId));
List userGroupVoList = userGroupMapper.selectVoList(Wrappers.lambdaQuery().in(AttendanceUserGroup::getScheduleId, scheduleId));
- //通过userGroupList查询出人员的详细信息
+ // 2.查询区域信息
+ // 根据shceduleId查询出区域排班的中间表的areaId
+ List areaIdList = attendanceArrangementAreaMapper.selectList(Wrappers.lambdaQuery().eq(AttendanceArrangementArea::getShceduleId, scheduleId)).stream().map(AttendanceArrangementArea::getAreaId).collect(Collectors.toList());
+ //根据区域id查询出区域信息
+ List areaList = attendanceAreaMapper.selectList(Wrappers.lambdaQuery().in(AttendanceArea::getId, areaIdList));
+ //6.将区域信息添加到排班信息中
+ vo.setAreaList(areaList);
+
+
+ //通过userGroupList查询出人员的详细信息
//将userList存到userGroupList中
userGroupVoList.forEach(userGroup -> {
- RemoteUserVo userInfoById = remoteUserService.getUserInfoById(userGroup.getEmployeeId());
- userGroup.setRemoteUserVo(userInfoById);
- //获取deptId
- Long deptId = userGroup.getDeptId();
- //根据deptId查询出部门名称
- String deptName = remoteUserService.selectDeptNamesByIds(Arrays.asList(deptId)).get(deptId);
- userGroup.setDeptName(deptName);
+ RemoteUserVo userInfoById = remoteUserService.getUserInfoById(userGroup.getEmployeeId());
+ userGroup.setRemoteUserVo(userInfoById);
+ //获取deptId
+ Long deptId = userGroup.getDeptId();
+ //根据deptId查询出部门名称
+ String deptName = remoteUserService.selectDeptNamesByIds(Arrays.asList(deptId)).get(deptId);
+ userGroup.setDeptName(deptName);
}
);
@@ -476,10 +500,19 @@ public class AttendanceArrangementServiceImpl implements IAttendanceArrangementS
}
judgeDate(bo, add);
-
-
//取出当前新增的排班的id
Long ArrangementId = add.getId();
+ List areaId = bo.getAreaId();
+
+ //向区域排班中间表插入数据
+ areaId.forEach(area -> {
+ AttendanceArrangementArea attendanceArrangementArea = new AttendanceArrangementArea();
+ attendanceArrangementArea.setAreaId(area);
+ attendanceArrangementArea.setShceduleId(ArrangementId);
+ attendanceArrangementAreaMapper.insert(attendanceArrangementArea);
+ });
+
+
//用获取到的排班id向attendanceUserGroup表中插入数据
List userGroupList = bo.getUserGroupList();
for (AttendanceUserGroup userGroup : userGroupList) {
@@ -522,6 +555,7 @@ public class AttendanceArrangementServiceImpl implements IAttendanceArrangementS
AttendanceArrangement update = MapstructUtils.convert(bo, AttendanceArrangement.class);
validEntityBeforeSave(update);
+ //1.更新人员组信息
//取出当前排班的id
assert update != null;
Long ArrangementId = update.getId();
@@ -534,6 +568,7 @@ public class AttendanceArrangementServiceImpl implements IAttendanceArrangementS
.eq(AttendanceUserGroup::getScheduleId, ArrangementId));
}
+ //2.更新部门信息
//根据排班id获取部门id
List deptIdList = userGroupMapper.selectList(Wrappers.lambdaQuery().eq(AttendanceUserGroup::getScheduleId, ArrangementId))
.stream().map(AttendanceUserGroup::getDeptId).toList();
@@ -550,7 +585,6 @@ public class AttendanceArrangementServiceImpl implements IAttendanceArrangementS
//根据old查询出结束时间
LocalDate oldEndDate = old.getEndDate();
-
//用获取到的排班id向attendanceUserGroup表中批量插入数据
List userGroupList = bo.getUserGroupList();
for (AttendanceUserGroup userGroup : userGroupList) {
@@ -560,6 +594,26 @@ public class AttendanceArrangementServiceImpl implements IAttendanceArrangementS
}
userGroupMapper.insertBatch(userGroupList);
+
+ //2.更新区域信息
+ //根据排班id获取区域id
+ List areaIdList = attendanceArrangementAreaMapper.selectList(Wrappers.lambdaQuery().eq(AttendanceArrangementArea::getShceduleId, ArrangementId))
+ .stream().map(AttendanceArrangementArea::getAreaId).toList();
+ if (!areaIdList.isEmpty()) {
+ //根据areaId和ArrangementId删除attendanceAreaGroup表中的数据
+ attendanceArrangementAreaMapper.delete(Wrappers.lambdaQuery().in(AttendanceArrangementArea::getAreaId, areaIdList)
+ .eq(AttendanceArrangementArea::getShceduleId, ArrangementId));
+ }
+
+ //向区域排班中间表插入数据
+ List newAreaId = bo.getAreaId();
+ newAreaId.forEach(area -> {
+ AttendanceArrangementArea attendanceArrangementArea = new AttendanceArrangementArea();
+ attendanceArrangementArea.setAreaId(area);
+ attendanceArrangementArea.setShceduleId(bo.getId());
+ attendanceArrangementAreaMapper.insert(attendanceArrangementArea);
+ });
+
return baseMapper.updateById(update) > 0;
}
@@ -627,6 +681,8 @@ public class AttendanceArrangementServiceImpl implements IAttendanceArrangementS
//根据获取的id删除attendanceUserGroup表中的数据
userGroupMapper.delete(Wrappers.lambdaQuery().in(AttendanceUserGroup::getScheduleId, idList));
+ //根据id删除区域排班中间表中的数据
+ attendanceArrangementAreaMapper.delete(Wrappers.lambdaQuery().in(AttendanceArrangementArea::getShceduleId, idList));
return baseMapper.deleteByIds(ids) > 0;
}
diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/AttendanceUserGroupServiceImpl.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/AttendanceUserGroupServiceImpl.java
index 83a0b007..66a4ce1c 100644
--- a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/AttendanceUserGroupServiceImpl.java
+++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/AttendanceUserGroupServiceImpl.java
@@ -52,6 +52,8 @@ public class AttendanceUserGroupServiceImpl implements IAttendanceUserGroupServi
private final AttendanceAreaMapper attendanceAreaMapper;
+ private final AttendanceArrangementAreaMapper attendanceArrangementAreaMapper;
+
@DubboReference
private RemoteUserService remoteUserService;
@@ -209,12 +211,6 @@ public class AttendanceUserGroupServiceImpl implements IAttendanceUserGroupServi
String deptName = remoteUserService.selectDeptNamesByIds(Arrays.asList(deptId)).get(deptId);
vo.setDeptName(deptName);
-
-// //通过employeeId查询出用户的部门信息
-// String deptInfo = remoteDeptService.selectDeptNameByIds(String.valueOf(vo.getDeptId()));
-// vo.setDeptName(deptInfo);
-
-
//根据scheduleId查询出排班的详细信息
AttendanceArrangement attendanceArrangement = arrangementMapper.selectOne(Wrappers.lambdaQuery().eq(AttendanceArrangement::getId, scheduleId));
// 假设每个vo只有一个scheduleId
@@ -222,6 +218,7 @@ public class AttendanceUserGroupServiceImpl implements IAttendanceUserGroupServi
AttendanceArrangement arrangement = arrangementMapper.selectOne(Wrappers.lambdaQuery().eq(AttendanceArrangement::getId, userGroupListScheduleId));
vo.setAttendanceArrangement(arrangement);
+
// 根据scheduleId过滤出groupId
Long groupId = arrangement.getGroupId();
// 根据groupId查询出考勤组的详细信息
@@ -229,11 +226,13 @@ public class AttendanceUserGroupServiceImpl implements IAttendanceUserGroupServi
vo.setAttendanceGroup(attendanceGroup);
-// //3.根据id查询区域信息
-// Long areaId = arrangement.getAreaId();
-// //根据区域id查询出区域的详细信息
-// AttendanceArea attendanceArea = attendanceAreaMapper.selectById(areaId);
-// vo.setAttendanceArea(attendanceArea);
+ // 根据scheduleId查询出区域排班中间表
+ List attendanceArrangementAreaList = attendanceArrangementAreaMapper.selectList(Wrappers.lambdaQuery().eq(AttendanceArrangementArea::getShceduleId, scheduleId));
+ vo.setAttendanceArrangementAreaList(attendanceArrangementAreaList);
+ //根据中间表查询出区域信息
+ List areaIdList = attendanceArrangementAreaList.stream().map(AttendanceArrangementArea::getAreaId).collect(Collectors.toList());
+ List attendanceAreaList = attendanceAreaMapper.selectBatchIds(areaIdList);
+ vo.setAttendanceAreaList(attendanceAreaList);
// 判断当前考勤组的班制是固定班制还是排班制
if (Objects.equals(attendanceGroup.getAttendanceType(), StatusConstant.FIXEDSCHEDULE)) {
diff --git a/ruoyi-visual/ruoyi-nacos/src/main/resources/application.properties b/ruoyi-visual/ruoyi-nacos/src/main/resources/application.properties
index 5aa89231..eb7de32c 100644
--- a/ruoyi-visual/ruoyi-nacos/src/main/resources/application.properties
+++ b/ruoyi-visual/ruoyi-nacos/src/main/resources/application.properties
@@ -42,7 +42,7 @@ db.num=1
### Connect URL of DB:
db.url.0=jdbc:mysql://127.0.0.1:3306/ry-config?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true
db.user.0=root
-db.password.0=123456
+db.password.0=1234
### the maximum retry times for push
nacos.config.push.maxRetryTime=50
From e450c66385a9a7f44d5b186729d37ddc94d19054 Mon Sep 17 00:00:00 2001
From: dy <2389062315@qq.com>
Date: Tue, 19 Aug 2025 09:56:59 +0800
Subject: [PATCH 5/9] =?UTF-8?q?=E6=8E=92=E7=8F=AD=E7=9A=84=E5=8C=BA?=
=?UTF-8?q?=E5=9F=9F=E7=AE=A1=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../ruoyi-nacos/src/main/resources/application.properties | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ruoyi-visual/ruoyi-nacos/src/main/resources/application.properties b/ruoyi-visual/ruoyi-nacos/src/main/resources/application.properties
index eb7de32c..5aa89231 100644
--- a/ruoyi-visual/ruoyi-nacos/src/main/resources/application.properties
+++ b/ruoyi-visual/ruoyi-nacos/src/main/resources/application.properties
@@ -42,7 +42,7 @@ db.num=1
### Connect URL of DB:
db.url.0=jdbc:mysql://127.0.0.1:3306/ry-config?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true
db.user.0=root
-db.password.0=1234
+db.password.0=123456
### the maximum retry times for push
nacos.config.push.maxRetryTime=50
From 0ee671fbcf15c7be10cdd1015a41d68b02532a5e Mon Sep 17 00:00:00 2001
From: yuyongle <1150359267@qq.com>
Date: Tue, 19 Aug 2025 14:36:13 +0800
Subject: [PATCH 6/9] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=83=AD=E9=97=A8?=
=?UTF-8?q?=E6=B4=BB=E5=8A=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../PopularActivitiesController.java | 106 ++++++++++++++
.../property/domain/PopularActivities.java | 68 +++++++++
.../domain/bo/PopularActivitiesBo.java | 72 ++++++++++
.../domain/vo/PopularActivitiesVo.java | 83 +++++++++++
.../mapper/PopularActivitiesMapper.java | 15 ++
.../service/IPopularActivitiesService.java | 69 +++++++++
.../service/IServiceWorkOrdersService.java | 7 +
.../impl/CustomerNoticesServiceImpl.java | 117 ++++++++-------
.../service/impl/EnumFetcherServiceImpl.java | 9 +-
.../impl/PopularActivitiesServiceImpl.java | 136 ++++++++++++++++++
.../impl/ServiceWorkOrdersServiceImpl.java | 36 ++++-
.../Property/PopularActivitiesMapper.xml | 7 +
12 files changed, 667 insertions(+), 58 deletions(-)
create mode 100644 ruoyi-modules/Property/src/main/java/org/dromara/property/controller/PopularActivitiesController.java
create mode 100644 ruoyi-modules/Property/src/main/java/org/dromara/property/domain/PopularActivities.java
create mode 100644 ruoyi-modules/Property/src/main/java/org/dromara/property/domain/bo/PopularActivitiesBo.java
create mode 100644 ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/PopularActivitiesVo.java
create mode 100644 ruoyi-modules/Property/src/main/java/org/dromara/property/mapper/PopularActivitiesMapper.java
create mode 100644 ruoyi-modules/Property/src/main/java/org/dromara/property/service/IPopularActivitiesService.java
create mode 100644 ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/PopularActivitiesServiceImpl.java
create mode 100644 ruoyi-modules/Property/src/main/resources/mapper/Property/PopularActivitiesMapper.xml
diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/controller/PopularActivitiesController.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/controller/PopularActivitiesController.java
new file mode 100644
index 00000000..fcf18012
--- /dev/null
+++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/controller/PopularActivitiesController.java
@@ -0,0 +1,106 @@
+package org.dromara.property.controller;
+
+import java.util.List;
+
+import lombok.RequiredArgsConstructor;
+import jakarta.servlet.http.HttpServletResponse;
+import jakarta.validation.constraints.*;
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.validation.annotation.Validated;
+import org.dromara.common.idempotent.annotation.RepeatSubmit;
+import org.dromara.common.log.annotation.Log;
+import org.dromara.common.web.core.BaseController;
+import org.dromara.common.mybatis.core.page.PageQuery;
+import org.dromara.common.core.domain.R;
+import org.dromara.common.core.validate.AddGroup;
+import org.dromara.common.core.validate.EditGroup;
+import org.dromara.common.log.enums.BusinessType;
+import org.dromara.common.excel.utils.ExcelUtil;
+import org.dromara.property.domain.vo.PopularActivitiesVo;
+import org.dromara.property.domain.bo.PopularActivitiesBo;
+import org.dromara.property.service.IPopularActivitiesService;
+import org.dromara.common.mybatis.core.page.TableDataInfo;
+
+/**
+ * 热门活动
+ * 前端访问路由地址为:/property/activities
+ *
+ * @author LionLi
+ * @date 2025-08-19
+ */
+@Validated
+@RequiredArgsConstructor
+@RestController
+@RequestMapping("/activities")
+public class PopularActivitiesController extends BaseController {
+
+ private final IPopularActivitiesService popularActivitiesService;
+
+ /**
+ * 查询热门活动列表
+ */
+ @SaCheckPermission("property:activities:list")
+ @GetMapping("/list")
+ public TableDataInfo list(PopularActivitiesBo bo, PageQuery pageQuery) {
+ return popularActivitiesService.queryPageList(bo, pageQuery);
+ }
+
+ /**
+ * 导出热门活动列表
+ */
+ @SaCheckPermission("property:activities:export")
+ @Log(title = "热门活动", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ public void export(PopularActivitiesBo bo, HttpServletResponse response) {
+ List list = popularActivitiesService.queryList(bo);
+ ExcelUtil.exportExcel(list, "热门活动", PopularActivitiesVo.class, response);
+ }
+
+ /**
+ * 获取热门活动详细信息
+ *
+ * @param id 主键
+ */
+ @SaCheckPermission("property:activities:query")
+ @GetMapping("/{id}")
+ public R getInfo(@NotNull(message = "主键不能为空")
+ @PathVariable("id") Long id) {
+ return R.ok(popularActivitiesService.queryById(id));
+ }
+
+ /**
+ * 新增热门活动
+ */
+ @SaCheckPermission("property:activities:add")
+ @Log(title = "热门活动", businessType = BusinessType.INSERT)
+ @RepeatSubmit()
+ @PostMapping()
+ public R add(@Validated(AddGroup.class) @RequestBody PopularActivitiesBo bo) {
+ return toAjax(popularActivitiesService.insertByBo(bo));
+ }
+
+ /**
+ * 修改热门活动
+ */
+ @SaCheckPermission("property:activities:edit")
+ @Log(title = "热门活动", businessType = BusinessType.UPDATE)
+ @RepeatSubmit()
+ @PutMapping()
+ public R edit(@Validated(EditGroup.class) @RequestBody PopularActivitiesBo bo) {
+ return toAjax(popularActivitiesService.updateByBo(bo));
+ }
+
+ /**
+ * 删除热门活动
+ *
+ * @param ids 主键串
+ */
+ @SaCheckPermission("property:activities:remove")
+ @Log(title = "热门活动", businessType = BusinessType.DELETE)
+ @DeleteMapping("/{ids}")
+ public R remove(@NotEmpty(message = "主键不能为空")
+ @PathVariable("ids") Long[] ids) {
+ return toAjax(popularActivitiesService.deleteWithValidByIds(List.of(ids), true));
+ }
+}
diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/PopularActivities.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/PopularActivities.java
new file mode 100644
index 00000000..ca4ea2c9
--- /dev/null
+++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/PopularActivities.java
@@ -0,0 +1,68 @@
+package org.dromara.property.domain;
+
+import org.dromara.common.tenant.core.TenantEntity;
+import com.baomidou.mybatisplus.annotation.*;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+import java.io.Serial;
+
+/**
+ * 热门活动对象 popular_activities
+ *
+ * @author LionLi
+ * @date 2025-08-19
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("popular_activities")
+public class PopularActivities extends TenantEntity {
+
+ @Serial
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 主键
+ */
+ @TableId(value = "id")
+ private Long id;
+
+ /**
+ * 标题
+ */
+ private String title;
+
+ /**
+ * 头部照片
+ */
+ private String headImgUrl;
+
+ /**
+ * 开始时间
+ */
+ private Date startTime;
+
+ /**
+ * 结束时间
+ */
+ private Date endTime;
+
+ /**
+ * 活动内容
+ */
+ private String activeContent;
+
+ /**
+ * 状态(1.未开始 2.进行中 3.已结束)
+ */
+ private String status;
+
+ /**
+ * 搜索值
+ */
+ private String searchValue;
+
+
+}
diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/bo/PopularActivitiesBo.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/bo/PopularActivitiesBo.java
new file mode 100644
index 00000000..2f0d580a
--- /dev/null
+++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/bo/PopularActivitiesBo.java
@@ -0,0 +1,72 @@
+package org.dromara.property.domain.bo;
+
+import org.dromara.property.domain.PopularActivities;
+import org.dromara.common.mybatis.core.domain.BaseEntity;
+import org.dromara.common.core.validate.AddGroup;
+import org.dromara.common.core.validate.EditGroup;
+import io.github.linpeilie.annotations.AutoMapper;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import jakarta.validation.constraints.*;
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+/**
+ * 热门活动业务对象 popular_activities
+ *
+ * @author LionLi
+ * @date 2025-08-19
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@AutoMapper(target = PopularActivities.class, reverseConvertGenerate = false)
+public class PopularActivitiesBo extends BaseEntity {
+
+ /**
+ * 主键
+ */
+ @NotNull(message = "主键不能为空", groups = { EditGroup.class })
+ private Long id;
+
+ /**
+ * 标题
+ */
+ @NotBlank(message = "标题不能为空", groups = { AddGroup.class, EditGroup.class })
+ private String title;
+
+ /**
+ * 头部照片
+ */
+ private String headImgUrl;
+
+ /**
+ * 开始时间
+ */
+ @NotNull(message = "开始时间不能为空", groups = { AddGroup.class, EditGroup.class })
+ private Date startTime;
+
+ /**
+ * 结束时间
+ */
+ @NotNull(message = "结束时间不能为空", groups = { AddGroup.class, EditGroup.class })
+ private Date endTime;
+
+ /**
+ * 活动内容
+ */
+ @NotBlank(message = "活动内容不能为空", groups = { AddGroup.class, EditGroup.class })
+ private String activeContent;
+
+ /**
+ * 状态(1.未开始 2.进行中 3.已结束)
+ */
+ @NotBlank(message = "状态(1.未开始 2.进行中 3.已结束)不能为空", groups = { AddGroup.class, EditGroup.class })
+ private String status;
+
+ /**
+ * 搜索值
+ */
+ private String searchValue;
+
+
+}
diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/PopularActivitiesVo.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/PopularActivitiesVo.java
new file mode 100644
index 00000000..7f91dac0
--- /dev/null
+++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/domain/vo/PopularActivitiesVo.java
@@ -0,0 +1,83 @@
+package org.dromara.property.domain.vo;
+
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.dromara.property.domain.PopularActivities;
+import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
+import cn.idev.excel.annotation.ExcelProperty;
+import org.dromara.common.excel.annotation.ExcelDictFormat;
+import org.dromara.common.excel.convert.ExcelDictConvert;
+import io.github.linpeilie.annotations.AutoMapper;
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+import java.util.Date;
+
+
+
+/**
+ * 热门活动视图对象 popular_activities
+ *
+ * @author LionLi
+ * @date 2025-08-19
+ */
+@Data
+@ExcelIgnoreUnannotated
+@AutoMapper(target = PopularActivities.class)
+public class PopularActivitiesVo implements Serializable {
+
+ @Serial
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 主键
+ */
+ @ExcelProperty(value = "主键")
+ private Long id;
+
+ /**
+ * 标题
+ */
+ @ExcelProperty(value = "标题")
+ private String title;
+
+ /**
+ * 头部照片
+ */
+ @ExcelProperty(value = "头部照片")
+ private String headImgUrl;
+
+ /**
+ * 开始时间
+ */
+ @ExcelProperty(value = "开始时间")
+ private Date startTime;
+
+ /**
+ * 结束时间
+ */
+ @ExcelProperty(value = "结束时间")
+ private Date endTime;
+
+ /**
+ * 活动内容
+ */
+ @ExcelProperty(value = "活动内容")
+ private String activeContent;
+
+ /**
+ * 状态(1.未开始 2.进行中 3.已结束)
+ */
+ @ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
+ @ExcelDictFormat(dictType = "pro_activity_status")
+ private String status;
+
+ /**
+ * 搜索值
+ */
+ @ExcelProperty(value = "搜索值")
+ private String searchValue;
+
+
+}
diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/mapper/PopularActivitiesMapper.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/mapper/PopularActivitiesMapper.java
new file mode 100644
index 00000000..ebe895a5
--- /dev/null
+++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/mapper/PopularActivitiesMapper.java
@@ -0,0 +1,15 @@
+package org.dromara.property.mapper;
+
+import org.dromara.property.domain.PopularActivities;
+import org.dromara.property.domain.vo.PopularActivitiesVo;
+import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
+
+/**
+ * 热门活动Mapper接口
+ *
+ * @author LionLi
+ * @date 2025-08-19
+ */
+public interface PopularActivitiesMapper extends BaseMapperPlus {
+
+}
diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/IPopularActivitiesService.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/IPopularActivitiesService.java
new file mode 100644
index 00000000..0ffdba81
--- /dev/null
+++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/IPopularActivitiesService.java
@@ -0,0 +1,69 @@
+package org.dromara.property.service;
+
+import org.dromara.property.domain.PopularActivities;
+import org.dromara.property.domain.vo.PopularActivitiesVo;
+import org.dromara.property.domain.bo.PopularActivitiesBo;
+import org.dromara.common.mybatis.core.page.TableDataInfo;
+import org.dromara.common.mybatis.core.page.PageQuery;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * 热门活动Service接口
+ *
+ * @author LionLi
+ * @date 2025-08-19
+ */
+public interface IPopularActivitiesService {
+
+ /**
+ * 查询热门活动
+ *
+ * @param id 主键
+ * @return 热门活动
+ */
+ PopularActivitiesVo queryById(Long id);
+
+ /**
+ * 分页查询热门活动列表
+ *
+ * @param bo 查询条件
+ * @param pageQuery 分页参数
+ * @return 热门活动分页列表
+ */
+ TableDataInfo queryPageList(PopularActivitiesBo bo, PageQuery pageQuery);
+
+ /**
+ * 查询符合条件的热门活动列表
+ *
+ * @param bo 查询条件
+ * @return 热门活动列表
+ */
+ List queryList(PopularActivitiesBo bo);
+
+ /**
+ * 新增热门活动
+ *
+ * @param bo 热门活动
+ * @return 是否新增成功
+ */
+ Boolean insertByBo(PopularActivitiesBo bo);
+
+ /**
+ * 修改热门活动
+ *
+ * @param bo 热门活动
+ * @return 是否修改成功
+ */
+ Boolean updateByBo(PopularActivitiesBo bo);
+
+ /**
+ * 校验并批量删除热门活动信息
+ *
+ * @param ids 待删除的主键集合
+ * @param isValid 是否进行有效性校验
+ * @return 是否删除成功
+ */
+ Boolean deleteWithValidByIds(Collection ids, Boolean isValid);
+}
diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/IServiceWorkOrdersService.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/IServiceWorkOrdersService.java
index d27a8d20..c7ac8752 100644
--- a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/IServiceWorkOrdersService.java
+++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/IServiceWorkOrdersService.java
@@ -11,6 +11,7 @@ import org.dromara.property.domain.vo.ServiceWorkOrdersVo;
import java.util.Collection;
import java.util.List;
+import java.util.Map;
/**
* 【工单处理】Service接口
@@ -87,4 +88,10 @@ public interface IServiceWorkOrdersService {
*/
Boolean insertMServiceWorkOrdersBo(MServiceWorkOrdersBo bo);
+ /**
+ * 查询工单处理人枚举
+ * @param type
+ * @return
+ */
+ List