修改前端不返回设备bug
All checks were successful
Build and Push to Target Registry / 构建并推送镜像到目标仓库 (push) Successful in 6m30s

This commit is contained in:
dy 2025-08-22 16:29:37 +08:00
parent 3c144d00e5
commit d0ccd668fa
2 changed files with 16 additions and 1 deletions

View File

@ -9,6 +9,7 @@ import org.dromara.sis.api.domain.RemoteSisDeviceManage;
import java.io.Serial;
import java.io.Serializable;
import java.util.List;
/**
@ -45,4 +46,6 @@ public class AttendanceAreaDeviceVo implements Serializable {
private RemoteSisDeviceManage remoteSisDeviceManage;
private List<AttendanceAreaDevice> areaDevice;
}

View File

@ -54,7 +54,19 @@ public class AttendanceAreaServiceImpl implements IAttendanceAreaService {
*/
@Override
public AttendanceAreaVo queryById(Long id) {
return baseMapper.selectVoById(id);
AttendanceAreaVo attendanceAreaVo = baseMapper.selectVoById(id);
//根据id查询中间表数据
List<AttendanceAreaDeviceVo> attendanceAreaDeviceList = areaDeviceMapper.selectVoList(Wrappers.<AttendanceAreaDevice>lambdaQuery().eq(AttendanceAreaDevice::getAreaId, id));
//根据设备id集合查询设备数据
attendanceAreaDeviceList.forEach(item -> {
//根据deviceManageId查询设备数据
RemoteSisDeviceManage remoteSisDeviceManage = remoteDeviceService.queryDeviceById(item.getDeviceManageId());
item.setRemoteSisDeviceManage(remoteSisDeviceManage);
attendanceAreaVo.setAreaDevice(attendanceAreaDeviceList);
});
return attendanceAreaVo;
}
/**