动态血压相关
This commit is contained in:
parent
544710ef21
commit
542c41ee59
@ -55,9 +55,9 @@ public class abpmPageReqVO extends PageParam {
|
||||
@Schema(description = "心率(次/分)")
|
||||
private Integer heartRate;
|
||||
|
||||
@Schema(description = "测量时间")
|
||||
@Schema(description = "佩戴时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] measureTime;
|
||||
private LocalDateTime[] weartime;
|
||||
|
||||
@Schema(description = "分析结果")
|
||||
private String analysisResult;
|
||||
|
||||
@ -72,9 +72,9 @@ public class abpmRespVO {
|
||||
@ExcelProperty("心率(次/分)")
|
||||
private Integer heartRate;
|
||||
|
||||
@Schema(description = "测量时间")
|
||||
@ExcelProperty("测量时间")
|
||||
private LocalDateTime measureTime;
|
||||
@Schema(description = "佩戴时间")
|
||||
@ExcelProperty("weartime")
|
||||
private LocalDateTime weartime;
|
||||
|
||||
@Schema(description = "分析结果")
|
||||
@ExcelProperty("分析结果")
|
||||
|
||||
@ -56,8 +56,8 @@ public class abpmSaveReqVO {
|
||||
@Schema(description = "心率(次/分)")
|
||||
private Integer heartRate;
|
||||
|
||||
@Schema(description = "测量时间")
|
||||
private LocalDateTime measureTime;
|
||||
@Schema(description = "佩戴时间")
|
||||
private LocalDateTime weartime;
|
||||
|
||||
@Schema(description = "分析结果")
|
||||
private String analysisResult;
|
||||
|
||||
@ -0,0 +1,105 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.abpmdata;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.iocoder.yudao.module.system.controller.admin.abpmdata.vo.*;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.abpmdata.AbpmdataDO;
|
||||
import cn.iocoder.yudao.module.system.service.abpmdata.AbpmdataService;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.abpmdata.vo.AbpmdataStatisticsReqVO;
|
||||
|
||||
@Tag(name = "管理后台 - 动态血压监测数据")
|
||||
@RestController
|
||||
@RequestMapping("/system/abpmdata")
|
||||
@Validated
|
||||
public class AbpmdataController {
|
||||
|
||||
@Resource
|
||||
private AbpmdataService abpmdataService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建动态血压监测数据")
|
||||
public CommonResult<Long> createAbpmdata(@Valid @RequestBody AbpmdataSaveReqVO createReqVO) {
|
||||
return success(abpmdataService.createAbpmdata(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新动态血压监测数据")
|
||||
public CommonResult<Boolean> updateAbpmdata(@Valid @RequestBody AbpmdataSaveReqVO updateReqVO) {
|
||||
abpmdataService.updateAbpmdata(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除动态血压监测数据")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
public CommonResult<Boolean> deleteAbpmdata(@RequestParam("id") Long id) {
|
||||
abpmdataService.deleteAbpmdata(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除动态血压监测数据")
|
||||
public CommonResult<Boolean> deleteAbpmdataList(@RequestParam("ids") List<Long> ids) {
|
||||
abpmdataService.deleteAbpmdataListByIds(ids);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得动态血压监测数据")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
public CommonResult<AbpmdataRespVO> getAbpmdata(@RequestParam("id") Long id) {
|
||||
AbpmdataDO abpmdata = abpmdataService.getAbpmdata(id);
|
||||
return success(BeanUtils.toBean(abpmdata, AbpmdataRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得动态血压监测数据分页")
|
||||
public CommonResult<PageResult<AbpmdataRespVO>> getAbpmdataPage(@Valid AbpmdataPageReqVO pageReqVO) {
|
||||
PageResult<AbpmdataDO> pageResult = abpmdataService.getAbpmdataPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, AbpmdataRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出动态血压监测数据 Excel")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportAbpmdataExcel(@Valid AbpmdataPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<AbpmdataDO> list = abpmdataService.getAbpmdataPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "动态血压监测数据.xls", "数据", AbpmdataRespVO.class,
|
||||
BeanUtils.toBean(list, AbpmdataRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/statistics")
|
||||
@Operation(summary = "查询动态血压监测数据统计")
|
||||
public CommonResult<List<AbpmdataRespVO>> getAbpmdataStatistics(@Validated AbpmdataStatisticsReqVO reqVO) {
|
||||
List<AbpmdataDO> list = abpmdataService.getAbpmdataStatistics(reqVO);
|
||||
return success(BeanUtils.toBean(list, AbpmdataRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,53 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.abpmdata.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 动态血压监测数据分页 Request VO")
|
||||
@Data
|
||||
public class AbpmdataPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "注册ID", example = "11582")
|
||||
private String regid;
|
||||
|
||||
@Schema(description = "检查ID", example = "9200")
|
||||
private String examid;
|
||||
|
||||
@Schema(description = "佩戴时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] weartime;
|
||||
|
||||
@Schema(description = "测量时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] measuretime;
|
||||
|
||||
@Schema(description = "设备ID", example = "29486")
|
||||
private String deviceid;
|
||||
|
||||
@Schema(description = "设备名称", example = "张三")
|
||||
private String devicename;
|
||||
|
||||
@Schema(description = "收缩压(mmHg)")
|
||||
private Integer systolicpressure;
|
||||
|
||||
@Schema(description = "舒张压(mmHg)")
|
||||
private Integer diastolicpressure;
|
||||
|
||||
@Schema(description = "心率(次/分)")
|
||||
private Integer heartrate;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createtime;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] updatedtime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,63 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.abpmdata.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 动态血压监测数据 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class AbpmdataRespVO {
|
||||
|
||||
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "671")
|
||||
@ExcelProperty("主键ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "注册ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "11582")
|
||||
@ExcelProperty("注册ID")
|
||||
private String regid;
|
||||
|
||||
@Schema(description = "检查ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "9200")
|
||||
@ExcelProperty("检查ID")
|
||||
private String examid;
|
||||
|
||||
@Schema(description = "佩戴时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("佩戴时间")
|
||||
private LocalDateTime weartime;
|
||||
|
||||
@Schema(description = "测量时间")
|
||||
@ExcelProperty("测量时间")
|
||||
private LocalDateTime measuretime;
|
||||
|
||||
@Schema(description = "设备ID", example = "29486")
|
||||
@ExcelProperty("设备ID")
|
||||
private String deviceid;
|
||||
|
||||
@Schema(description = "设备名称", example = "张三")
|
||||
@ExcelProperty("设备名称")
|
||||
private String devicename;
|
||||
|
||||
@Schema(description = "收缩压(mmHg)")
|
||||
@ExcelProperty("收缩压(mmHg)")
|
||||
private Integer systolicpressure;
|
||||
|
||||
@Schema(description = "舒张压(mmHg)")
|
||||
@ExcelProperty("舒张压(mmHg)")
|
||||
private Integer diastolicpressure;
|
||||
|
||||
@Schema(description = "心率(次/分)")
|
||||
@ExcelProperty("心率(次/分)")
|
||||
private Integer heartrate;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createtime;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
@ExcelProperty("更新时间")
|
||||
private LocalDateTime updatedtime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,53 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.abpmdata.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 动态血压监测数据新增/修改 Request VO")
|
||||
@Data
|
||||
public class AbpmdataSaveReqVO {
|
||||
|
||||
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "671")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "注册ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "11582")
|
||||
@NotEmpty(message = "注册ID不能为空")
|
||||
private String regid;
|
||||
|
||||
@Schema(description = "检查ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "9200")
|
||||
@NotEmpty(message = "检查ID不能为空")
|
||||
private String examid;
|
||||
|
||||
@Schema(description = "佩戴时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "佩戴时间不能为空")
|
||||
private LocalDateTime weartime;
|
||||
|
||||
@Schema(description = "测量时间")
|
||||
private LocalDateTime measuretime;
|
||||
|
||||
@Schema(description = "设备ID", example = "29486")
|
||||
private String deviceid;
|
||||
|
||||
@Schema(description = "设备名称", example = "张三")
|
||||
private String devicename;
|
||||
|
||||
@Schema(description = "收缩压(mmHg)")
|
||||
private Integer systolicpressure;
|
||||
|
||||
@Schema(description = "舒张压(mmHg)")
|
||||
private Integer diastolicpressure;
|
||||
|
||||
@Schema(description = "心率(次/分)")
|
||||
private Integer heartrate;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createtime;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
private LocalDateTime updatedtime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.abpmdata.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 动态血压监测数据统计查询 Request VO")
|
||||
@Data
|
||||
public class AbpmdataStatisticsReqVO {
|
||||
@Schema(description = "注册ID", example = "REG001")
|
||||
private String regid;
|
||||
|
||||
@Schema(description = "检查ID", example = "EXAM001")
|
||||
private String examid;
|
||||
|
||||
@Schema(description = "设备ID", example = "DEV001")
|
||||
private String deviceid;
|
||||
|
||||
@Schema(description = "佩戴时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime weartime;
|
||||
}
|
||||
@ -98,10 +98,10 @@ public class abpmDO {
|
||||
@TableField("heartrate")
|
||||
private Integer heartRate;
|
||||
/**
|
||||
* 测量时间
|
||||
* 佩戴时间
|
||||
*/
|
||||
@TableField("measuretime")
|
||||
private LocalDateTime measureTime;
|
||||
@TableField("weartime")
|
||||
private LocalDateTime weartime;
|
||||
/**
|
||||
* 分析结果
|
||||
*/
|
||||
|
||||
@ -0,0 +1,88 @@
|
||||
package cn.iocoder.yudao.module.system.dal.dataobject.abpmdata;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 动态血压监测数据 DO
|
||||
*
|
||||
* @author 艾康菲
|
||||
*/
|
||||
@TableName("tb_abpmdata")
|
||||
@KeySequence("tb_abpmdata_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class AbpmdataDO {
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 注册ID
|
||||
*/
|
||||
@TableField("regid")
|
||||
private String regid;
|
||||
/**
|
||||
* 检查ID
|
||||
*/
|
||||
@TableField("examid")
|
||||
private String examid;
|
||||
/**
|
||||
* 佩戴时间
|
||||
*/
|
||||
@TableField("weartime")
|
||||
private LocalDateTime weartime;
|
||||
/**
|
||||
* 测量时间
|
||||
*/
|
||||
@TableField("measuretime")
|
||||
private LocalDateTime measuretime;
|
||||
/**
|
||||
* 设备ID
|
||||
*/
|
||||
@TableField("deviceid")
|
||||
private String deviceid;
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
@TableField("devicename")
|
||||
private String devicename;
|
||||
/**
|
||||
* 收缩压(mmHg)
|
||||
*/
|
||||
@TableField("systolicpressure")
|
||||
private Integer systolicpressure;
|
||||
/**
|
||||
* 舒张压(mmHg)
|
||||
*/
|
||||
@TableField("diastolicpressure")
|
||||
private Integer diastolicpressure;
|
||||
/**
|
||||
* 心率(次/分)
|
||||
*/
|
||||
@TableField("heartrate")
|
||||
private Integer heartrate;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField("createtime")
|
||||
private LocalDateTime createtime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField("updatedtime")
|
||||
private LocalDateTime updatedtime;
|
||||
|
||||
|
||||
}
|
||||
@ -33,7 +33,7 @@ public interface abpmMapper extends BaseMapperX<abpmDO> {
|
||||
.eqIfPresent(abpmDO::getSystolicPressure, reqVO.getSystolicPressure())
|
||||
.eqIfPresent(abpmDO::getDiastolicPressure, reqVO.getDiastolicPressure())
|
||||
.eqIfPresent(abpmDO::getHeartRate, reqVO.getHeartRate())
|
||||
.betweenIfPresent(abpmDO::getMeasureTime, reqVO.getMeasureTime())
|
||||
.betweenIfPresent(abpmDO::getWeartime, reqVO.getWeartime())
|
||||
.eqIfPresent(abpmDO::getAnalysisResult, reqVO.getAnalysisResult())
|
||||
.orderByDesc(abpmDO::getId));
|
||||
}
|
||||
|
||||
@ -0,0 +1,44 @@
|
||||
package cn.iocoder.yudao.module.system.dal.mysql.abpmdata;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.abpmdata.AbpmdataDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.abpmdata.vo.*;
|
||||
|
||||
/**
|
||||
* 动态血压监测数据 Mapper
|
||||
*
|
||||
* @author 艾康菲
|
||||
*/
|
||||
@Mapper
|
||||
public interface AbpmdataMapper extends BaseMapperX<AbpmdataDO> {
|
||||
|
||||
default PageResult<AbpmdataDO> selectPage(AbpmdataPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<AbpmdataDO>()
|
||||
.eqIfPresent(AbpmdataDO::getRegid, reqVO.getRegid())
|
||||
.eqIfPresent(AbpmdataDO::getExamid, reqVO.getExamid())
|
||||
.betweenIfPresent(AbpmdataDO::getWeartime, reqVO.getWeartime())
|
||||
.betweenIfPresent(AbpmdataDO::getMeasuretime, reqVO.getMeasuretime())
|
||||
.eqIfPresent(AbpmdataDO::getDeviceid, reqVO.getDeviceid())
|
||||
.likeIfPresent(AbpmdataDO::getDevicename, reqVO.getDevicename())
|
||||
.eqIfPresent(AbpmdataDO::getSystolicpressure, reqVO.getSystolicpressure())
|
||||
.eqIfPresent(AbpmdataDO::getDiastolicpressure, reqVO.getDiastolicpressure())
|
||||
.eqIfPresent(AbpmdataDO::getHeartrate, reqVO.getHeartrate())
|
||||
.betweenIfPresent(AbpmdataDO::getCreatetime, reqVO.getCreatetime())
|
||||
.betweenIfPresent(AbpmdataDO::getUpdatedtime, reqVO.getUpdatedtime())
|
||||
.orderByDesc(AbpmdataDO::getId));
|
||||
}
|
||||
|
||||
default List<AbpmdataDO> selectStatistics(AbpmdataStatisticsReqVO reqVO) {
|
||||
return selectList(new LambdaQueryWrapperX<AbpmdataDO>()
|
||||
.eqIfPresent(AbpmdataDO::getRegid, reqVO.getRegid())
|
||||
.eqIfPresent(AbpmdataDO::getExamid, reqVO.getExamid())
|
||||
.eqIfPresent(AbpmdataDO::getDeviceid, reqVO.getDeviceid())
|
||||
.eqIfPresent(AbpmdataDO::getWeartime, reqVO.getWeartime())
|
||||
.orderByDesc(AbpmdataDO::getId));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,67 @@
|
||||
package cn.iocoder.yudao.module.system.service.abpmdata;
|
||||
|
||||
import java.util.*;
|
||||
import javax.validation.*;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.abpmdata.vo.*;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.abpmdata.vo.AbpmdataStatisticsReqVO;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.abpmdata.AbpmdataDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
|
||||
/**
|
||||
* 动态血压监测数据 Service 接口
|
||||
*
|
||||
* @author 艾康菲
|
||||
*/
|
||||
public interface AbpmdataService {
|
||||
|
||||
/**
|
||||
* 创建动态血压监测数据
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Long createAbpmdata(@Valid AbpmdataSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新动态血压监测数据
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateAbpmdata(@Valid AbpmdataSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除动态血压监测数据
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteAbpmdata(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除动态血压监测数据
|
||||
*
|
||||
* @param ids 编号
|
||||
*/
|
||||
void deleteAbpmdataListByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* 获得动态血压监测数据
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 动态血压监测数据
|
||||
*/
|
||||
AbpmdataDO getAbpmdata(Long id);
|
||||
|
||||
/**
|
||||
* 获得动态血压监测数据分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 动态血压监测数据分页
|
||||
*/
|
||||
PageResult<AbpmdataDO> getAbpmdataPage(AbpmdataPageReqVO pageReqVO);
|
||||
|
||||
/**
|
||||
* 动态血压监测数据统计多条件查询
|
||||
*/
|
||||
List<AbpmdataDO> getAbpmdataStatistics(AbpmdataStatisticsReqVO reqVO);
|
||||
}
|
||||
@ -0,0 +1,95 @@
|
||||
package cn.iocoder.yudao.module.system.service.abpmdata;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.abpmdata.vo.*;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.abpmdata.AbpmdataDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
|
||||
import cn.iocoder.yudao.module.system.dal.mysql.abpmdata.AbpmdataMapper;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList;
|
||||
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.diffList;
|
||||
import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.*;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.abpmdata.vo.AbpmdataStatisticsReqVO;
|
||||
|
||||
/**
|
||||
* 动态血压监测数据 Service 实现类
|
||||
*
|
||||
* @author 艾康菲
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class AbpmdataServiceImpl implements AbpmdataService {
|
||||
|
||||
@Resource
|
||||
private AbpmdataMapper abpmdataMapper;
|
||||
|
||||
@Override
|
||||
public Long createAbpmdata(AbpmdataSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
AbpmdataDO abpmdata = BeanUtils.toBean(createReqVO, AbpmdataDO.class);
|
||||
abpmdataMapper.insert(abpmdata);
|
||||
// 返回
|
||||
return abpmdata.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateAbpmdata(AbpmdataSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateAbpmdataExists(updateReqVO.getId());
|
||||
// 更新
|
||||
AbpmdataDO updateObj = BeanUtils.toBean(updateReqVO, AbpmdataDO.class);
|
||||
abpmdataMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteAbpmdata(Long id) {
|
||||
// 校验存在
|
||||
validateAbpmdataExists(id);
|
||||
// 删除
|
||||
abpmdataMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteAbpmdataListByIds(List<Long> ids) {
|
||||
// 校验存在
|
||||
validateAbpmdataExists(ids);
|
||||
// 删除
|
||||
abpmdataMapper.deleteByIds(ids);
|
||||
}
|
||||
|
||||
private void validateAbpmdataExists(List<Long> ids) {
|
||||
List<AbpmdataDO> list = abpmdataMapper.selectByIds(ids);
|
||||
if (CollUtil.isEmpty(list) || list.size() != ids.size()) {
|
||||
}
|
||||
}
|
||||
|
||||
private void validateAbpmdataExists(Long id) {
|
||||
if (abpmdataMapper.selectById(id) == null) {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbpmdataDO getAbpmdata(Long id) {
|
||||
return abpmdataMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<AbpmdataDO> getAbpmdataPage(AbpmdataPageReqVO pageReqVO) {
|
||||
return abpmdataMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AbpmdataDO> getAbpmdataStatistics(AbpmdataStatisticsReqVO reqVO) {
|
||||
return abpmdataMapper.selectStatistics(reqVO);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,12 @@
|
||||
<?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="cn.iocoder.yudao.module.system.dal.mysql.abpmdata.AbpmdataMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
</mapper>
|
||||
@ -284,6 +284,7 @@ yudao:
|
||||
- patientinfo #忽略人员基础信息表
|
||||
- ecgdyndata #忽略动态心电数据表
|
||||
- tb_abpm #忽略abpm表
|
||||
- tb_abpmdata #忽略abpmdata表
|
||||
ignore-caches:
|
||||
- user_role_ids
|
||||
- permission_menu_ids
|
||||
|
||||
Loading…
Reference in New Issue
Block a user