Merge branch 'master' of http://114.55.171.231:3000/Euni4U/backend
Some checks are pending
Java CI with Maven / build (11) (push) Waiting to run
Java CI with Maven / build (17) (push) Waiting to run
Java CI with Maven / build (8) (push) Waiting to run
yudao-ui-admin CI / build (14.x) (push) Waiting to run
yudao-ui-admin CI / build (16.x) (push) Waiting to run

This commit is contained in:
lxd 2025-06-10 14:51:56 +08:00
commit da2e3f554a
9 changed files with 94 additions and 2 deletions

View File

@ -90,4 +90,12 @@ public class DeviceuserController {
BeanUtils.toBean(list, DeviceuserRespVO.class));
}
@GetMapping("/getDeviceuserByDeviceId")
@Operation(summary = "根据设备ID获得设备人员关联")
@Parameter(name = "deviceid", description = "设备编号", required = true)
public CommonResult<List<DeviceuserRespVO>> getDeviceuserByDeviceId(@RequestParam("deviceid") Integer deviceid) {
List<DeviceuserDO> deviceusers = deviceuserService.getDeviceuserByDeviceId(deviceid);
return success(BeanUtils.toBean(deviceusers, DeviceuserRespVO.class));
}
}

View File

@ -86,4 +86,22 @@ public class EcgdataController {
BeanUtils.toBean(list, EcgdataRespVO.class));
}
@GetMapping("/getByUserId")
@Operation(summary = "根据用户ID获得心电采集时间列表")
@Parameter(name = "userId", description = "用户编号", required = true, example = "1024")
public CommonResult<List<EcgdataTimeRespVO>> getEcgdataByUserId(@RequestParam("userId") Integer userId) {
List<EcgdataDO> ecgdataList = ecgdataService.getEcgdataByUserId(userId);
return success(BeanUtils.toBean(ecgdataList, EcgdataTimeRespVO.class));
}
@GetMapping("/getByTime")
@Operation(summary = "根据时间戳和用户ID获得心电数据")
@Parameter(name = "collecttime", description = "采集时间戳", required = true)
@Parameter(name = "userId", description = "用户编号", required = true)
public CommonResult<EcgdataRespVO> getEcgdataByTime(@RequestParam("collecttime") Long collecttime,
@RequestParam("userId") Integer userId) {
EcgdataDO ecgdata = ecgdataService.getEcgdataByTime(collecttime, userId);
return success(BeanUtils.toBean(ecgdata, EcgdataRespVO.class));
}
}

View File

@ -0,0 +1,14 @@
package cn.iocoder.yudao.module.system.controller.admin.ecgdata.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.time.LocalDateTime;
@Schema(description = "管理后台 - 心电数据采集时间 Response VO")
@Data
public class EcgdataTimeRespVO {
@Schema(description = "采集时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime collecttime;
}

View File

@ -17,12 +17,11 @@ import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
@TableName("tb_ecgdata")
@KeySequence("tb_ecgdata_seq") // 用于 OraclePostgreSQLKingbaseDB2H2 数据库的主键自增如果是 MySQL 等数据库可不写
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class EcgdataDO extends BaseDO {
public class EcgdataDO {
/**
* 主键ID

View File

@ -56,4 +56,12 @@ public interface DeviceuserService {
*/
PageResult<DeviceuserDO> getDeviceuserPage(DeviceuserPageReqVO pageReqVO);
/**
* 根据设备ID获得设备人员关联列表
*
* @param deviceid 设备编号
* @return 设备人员关联列表
*/
List<DeviceuserDO> getDeviceuserByDeviceId(Integer deviceid);
}

View File

@ -1,5 +1,6 @@
package cn.iocoder.yudao.module.system.service.deviceuser;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
@ -71,4 +72,10 @@ public class DeviceuserServiceImpl implements DeviceuserService {
return deviceuserMapper.selectPage(pageReqVO);
}
@Override
public List<DeviceuserDO> getDeviceuserByDeviceId(Integer deviceid) {
return deviceuserMapper.selectList(new LambdaQueryWrapper<DeviceuserDO>()
.eq(DeviceuserDO::getDeviceid, deviceid));
}
}

View File

@ -52,4 +52,21 @@ public interface EcgdataService {
*/
PageResult<EcgdataDO> getEcgdataPage(EcgdataPageReqVO pageReqVO);
/**
* 根据用户ID获得心电数据采集列表
*
* @param userId 用户编号
* @return 心电数据采集列表
*/
List<EcgdataDO> getEcgdataByUserId(Integer userId);
/**
* 根据时间戳和用户ID获得心电数据采集
*
* @param collecttime 采集时间戳
* @param userId 用户编号
* @return 心电数据采集
*/
EcgdataDO getEcgdataByTime(Long collecttime, Integer userId);
}

View File

@ -1,5 +1,6 @@
package cn.iocoder.yudao.module.system.service.ecgdata;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
@ -71,4 +72,19 @@ public class EcgdataServiceImpl implements EcgdataService {
return ecgdataMapper.selectPage(pageReqVO);
}
@Override
public List<EcgdataDO> getEcgdataByUserId(Integer userId) {
return ecgdataMapper.selectList(new LambdaQueryWrapperX<EcgdataDO>()
.eq(EcgdataDO::getUserid, userId)
.orderByDesc(EcgdataDO::getId));
}
@Override
public EcgdataDO getEcgdataByTime(Long collecttime, Integer userId) {
return ecgdataMapper.selectOne(new LambdaQueryWrapperX<EcgdataDO>()
.eq(EcgdataDO::getUserid, userId)
.eq(EcgdataDO::getCollecttime, new Date(collecttime))
.orderByDesc(EcgdataDO::getId));
}
}

View File

@ -281,6 +281,11 @@ yudao:
- tb_person_archive # 忽略人员档案表
- tb_user # 忽略小程序用户表
- visit_record # 忽略电话回访记录表
- tb_device # 忽略设备表
- tb_deviceuser # 忽略设备用户表
- tb_devicedata # 忽略设备数据表
- tb_ecgdata # 忽略ECG设备数据类型表
- tb_doctornotice # 忽略医生通知表
ignore-caches:
- user_role_ids
- permission_menu_ids