新增心电分析模块
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 2024-11-20 11:25:04 +08:00
parent 54336efc20
commit 7febfc0181
9 changed files with 866 additions and 0 deletions

View File

@ -0,0 +1,100 @@
package cn.iocoder.yudao.module.tblist.controller.admin.ecganalysisparas;
import cn.iocoder.yudao.module.tblist.dal.mysql.ecganalysisparas.EcganalysisparasMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.web.bind.annotation.*;
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 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.tblist.controller.admin.ecganalysisparas.vo.*;
import cn.iocoder.yudao.module.tblist.dal.dataobject.ecganalysisparas.EcganalysisparasDO;
import cn.iocoder.yudao.module.tblist.service.ecganalysisparas.EcganalysisparasService;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
@Tag(name = "管理后台 - 心电分析数据")
@RestController
@RequestMapping("/tblist/ecganalysisparas")
@Validated
public class EcganalysisparasController {
@Resource
private EcganalysisparasService ecganalysisparasService;
@Resource
private EcganalysisparasMapper ecganalysisparasMapper;
@PostMapping("/create")
@Operation(summary = "创建心电分析数据")
@PreAuthorize("@ss.hasPermission('tblist:ecganalysisparas:create')")
public CommonResult<String> createEcganalysisparas(@Valid @RequestBody EcganalysisparasSaveReqVO createReqVO) {
return success(ecganalysisparasService.createEcganalysisparas(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新心电分析数据")
@PreAuthorize("@ss.hasPermission('tblist:ecganalysisparas:update')")
public CommonResult<Boolean> updateEcganalysisparas(@Valid @RequestBody EcganalysisparasSaveReqVO updateReqVO) {
ecganalysisparasService.updateEcganalysisparas(updateReqVO);
return success(true);
}
@DeleteMapping("/delete")
@Operation(summary = "删除心电分析数据")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('tblist:ecganalysisparas:delete')")
public CommonResult<Boolean> deleteEcganalysisparas(@RequestParam("id") String id) {
ecganalysisparasService.deleteEcganalysisparas(id);
return success(true);
}
@GetMapping("/get")
@Operation(summary = "获得心电分析数据")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('tblist:ecganalysisparas:query')")
public CommonResult<EcganalysisparasRespVO> getEcganalysisparas(@RequestParam("id") String id) {
EcganalysisparasDO ecganalysisparas = ecganalysisparasService.getEcganalysisparas(id);
return success(BeanUtils.toBean(ecganalysisparas, EcganalysisparasRespVO.class));
}
@GetMapping("/page")
@Operation(summary = "获得心电分析数据分页")
@PreAuthorize("@ss.hasPermission('tblist:ecganalysisparas:query')")
public CommonResult<PageResult<EcganalysisparasRespVO>> getEcganalysisparasPage(@Valid EcganalysisparasPageReqVO pageReqVO) {
PageResult<EcganalysisparasDO> pageResult = ecganalysisparasService.getEcganalysisparasPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, EcganalysisparasRespVO.class));
}
@GetMapping("/export-excel")
@Operation(summary = "导出心电分析数据 Excel")
@PreAuthorize("@ss.hasPermission('tblist:ecganalysisparas:export')")
@ApiAccessLog(operateType = EXPORT)
public void exportEcganalysisparasExcel(@Valid EcganalysisparasPageReqVO pageReqVO,
HttpServletResponse response) throws IOException {
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
List<EcganalysisparasDO> list = ecganalysisparasService.getEcganalysisparasPage(pageReqVO).getList();
// 导出 Excel
ExcelUtils.write(response, "心电分析数据.xls", "数据", EcganalysisparasRespVO.class,
BeanUtils.toBean(list, EcganalysisparasRespVO.class));
}
}

View File

@ -0,0 +1,117 @@
package cn.iocoder.yudao.module.tblist.controller.admin.ecganalysisparas.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
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class EcganalysisparasPageReqVO extends PageParam {
@Schema(description = "机构ID", example = "32527")
private String orgId;
@Schema(description = "检查ID体检编号、住院号、门诊号等", example = "18100")
private String examId;
@Schema(description = "采集时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] collectionTime;
@Schema(description = "心率")
private String hr;
@Schema(description = "P电轴")
private String pAxle;
@Schema(description = "QRS电轴")
private String qrsAxle;
@Schema(description = "T电轴")
private String tAxle;
@Schema(description = "P波时限")
private String pTimeLimit;
@Schema(description = "PR间期")
private String pr;
@Schema(description = "QRS时限")
private String qrsTimeLimit;
@Schema(description = "QT间期")
private String qt;
@Schema(description = "QTC间期")
private String qtc;
@Schema(description = "胸导V5导联电压")
private String rv5;
@Schema(description = "V1导联S波深度")
private String sv1;
@Schema(description = "RV5+SV1")
private String rv5Sv1;
@Schema(description = "快照时间:参考心电波形的起始时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] snapshotTime;
@Schema(description = "算法自动诊断结果")
private String autoDiagResult;
@Schema(description = "自动诊断的时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] autoDiagTime;
@Schema(description = "医生诊断结果")
private String doctorDiagResult;
@Schema(description = "医生诊断的时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] doctorDiagTime;
@Schema(description = "诊断医生的姓名", example = "赵六")
private String doctorName;
@Schema(description = "诊断医生的医生id", example = "29431")
private Integer doctorId;
@Schema(description = "诊断医生的科室id", example = "15130")
private Integer departId;
@Schema(description = "诊断医生的科室名称", example = "赵六")
private String departName;
@Schema(description = "是否删除: 1 为删除 ")
private String isDelete;
@Schema(description = "删除时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] deleteTime;
@Schema(description = "执行删除操作的医生姓名", example = "赵六")
private String deleteDoctorName;
@Schema(description = "执行删除操作的医生id", example = "10049")
private Integer deleteDoctorId;
@Schema(description = "心电数据文件的路径: 路径或URL")
private String ecgDataFilePath;
@Schema(description = "心电数据json格式的数据文件路径路径或URL")
private String ecgJsonDataFilePath;
@Schema(description = "分析参数的创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createDate;
}

View File

@ -0,0 +1,144 @@
package cn.iocoder.yudao.module.tblist.controller.admin.ecganalysisparas.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
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 EcganalysisparasRespVO {
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "31424")
@ExcelProperty("主键")
private String id;
@Schema(description = "机构ID", example = "32527")
@ExcelProperty("机构ID")
private String orgId;
@Schema(description = "检查ID体检编号、住院号、门诊号等", example = "18100")
@ExcelProperty("检查ID体检编号、住院号、门诊号等")
private String examId;
@Schema(description = "采集时间")
@ExcelProperty("采集时间")
private LocalDateTime collectionTime;
@Schema(description = "心率")
@ExcelProperty("心率")
private String hr;
@Schema(description = "P电轴")
@ExcelProperty("P电轴")
private String pAxle;
@Schema(description = "QRS电轴")
@ExcelProperty("QRS电轴")
private String qrsAxle;
@Schema(description = "T电轴")
@ExcelProperty("T电轴")
private String tAxle;
@Schema(description = "P波时限")
@ExcelProperty("P波时限")
private String pTimeLimit;
@Schema(description = "PR间期")
@ExcelProperty("PR间期")
private String pr;
@Schema(description = "QRS时限")
@ExcelProperty("QRS时限")
private String qrsTimeLimit;
@Schema(description = "QT间期")
@ExcelProperty("QT间期")
private String qt;
@Schema(description = "QTC间期")
@ExcelProperty("QTC间期")
private String qtc;
@Schema(description = "胸导V5导联电压")
@ExcelProperty("胸导V5导联电压")
private String rv5;
@Schema(description = "V1导联S波深度")
@ExcelProperty("V1导联S波深度")
private String sv1;
@Schema(description = "RV5+SV1")
@ExcelProperty("RV5+SV1")
private String rv5Sv1;
@Schema(description = "快照时间:参考心电波形的起始时间")
@ExcelProperty("快照时间:参考心电波形的起始时间")
private LocalDateTime snapshotTime;
@Schema(description = "算法自动诊断结果")
@ExcelProperty("算法自动诊断结果")
private String autoDiagResult;
@Schema(description = "自动诊断的时间")
@ExcelProperty("自动诊断的时间")
private LocalDateTime autoDiagTime;
@Schema(description = "医生诊断结果")
@ExcelProperty("医生诊断结果")
private String doctorDiagResult;
@Schema(description = "医生诊断的时间")
@ExcelProperty("医生诊断的时间")
private LocalDateTime doctorDiagTime;
@Schema(description = "诊断医生的姓名", example = "赵六")
@ExcelProperty("诊断医生的姓名")
private String doctorName;
@Schema(description = "诊断医生的医生id", example = "29431")
@ExcelProperty("诊断医生的医生id")
private Integer doctorId;
@Schema(description = "诊断医生的科室id", example = "15130")
@ExcelProperty("诊断医生的科室id")
private Integer departId;
@Schema(description = "诊断医生的科室名称", example = "赵六")
@ExcelProperty("诊断医生的科室名称")
private String departName;
@Schema(description = "是否删除: 1 为删除 ")
@ExcelProperty("是否删除: 1 为删除 ")
private String isDelete;
@Schema(description = "删除时间")
@ExcelProperty("删除时间")
private LocalDateTime deleteTime;
@Schema(description = "执行删除操作的医生姓名", example = "赵六")
@ExcelProperty("执行删除操作的医生姓名")
private String deleteDoctorName;
@Schema(description = "执行删除操作的医生id", example = "10049")
@ExcelProperty("执行删除操作的医生id")
private Integer deleteDoctorId;
@Schema(description = "心电数据文件的路径: 路径或URL")
@ExcelProperty("心电数据文件的路径: 路径或URL")
private String ecgDataFilePath;
@Schema(description = "心电数据json格式的数据文件路径路径或URL")
@ExcelProperty("心电数据json格式的数据文件路径路径或URL")
private String ecgJsonDataFilePath;
@Schema(description = "分析参数的创建时间")
@ExcelProperty("分析参数的创建时间")
private LocalDateTime createDate;
}

View File

@ -0,0 +1,109 @@
package cn.iocoder.yudao.module.tblist.controller.admin.ecganalysisparas.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
@Schema(description = "管理后台 - 心电分析数据新增/修改 Request VO")
@Data
public class EcganalysisparasSaveReqVO {
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "31424")
private String id;
@Schema(description = "机构ID", example = "32527")
private String orgId;
@Schema(description = "检查ID体检编号、住院号、门诊号等", example = "18100")
private String examId;
@Schema(description = "采集时间")
private LocalDateTime collectionTime;
@Schema(description = "心率")
private String hr;
@Schema(description = "P电轴")
private String pAxle;
@Schema(description = "QRS电轴")
private String qrsAxle;
@Schema(description = "T电轴")
private String tAxle;
@Schema(description = "P波时限")
private String pTimeLimit;
@Schema(description = "PR间期")
private String pr;
@Schema(description = "QRS时限")
private String qrsTimeLimit;
@Schema(description = "QT间期")
private String qt;
@Schema(description = "QTC间期")
private String qtc;
@Schema(description = "胸导V5导联电压")
private String rv5;
@Schema(description = "V1导联S波深度")
private String sv1;
@Schema(description = "RV5+SV1")
private String rv5Sv1;
@Schema(description = "快照时间:参考心电波形的起始时间")
private LocalDateTime snapshotTime;
@Schema(description = "算法自动诊断结果")
private String autoDiagResult;
@Schema(description = "自动诊断的时间")
private LocalDateTime autoDiagTime;
@Schema(description = "医生诊断结果")
private String doctorDiagResult;
@Schema(description = "医生诊断的时间")
private LocalDateTime doctorDiagTime;
@Schema(description = "诊断医生的姓名", example = "赵六")
private String doctorName;
@Schema(description = "诊断医生的医生id", example = "29431")
private Integer doctorId;
@Schema(description = "诊断医生的科室id", example = "15130")
private Integer departId;
@Schema(description = "诊断医生的科室名称", example = "赵六")
private String departName;
@Schema(description = "是否删除: 1 为删除 ")
private String isDelete;
@Schema(description = "删除时间")
private LocalDateTime deleteTime;
@Schema(description = "执行删除操作的医生姓名", example = "赵六")
private String deleteDoctorName;
@Schema(description = "执行删除操作的医生id", example = "10049")
private Integer deleteDoctorId;
@Schema(description = "心电数据文件的路径: 路径或URL")
private String ecgDataFilePath;
@Schema(description = "心电数据json格式的数据文件路径路径或URL")
private String ecgJsonDataFilePath;
@Schema(description = "分析参数的创建时间")
private LocalDateTime createDate;
}

View File

@ -0,0 +1,189 @@
package cn.iocoder.yudao.module.tblist.dal.dataobject.ecganalysisparas;
import lombok.*;
import java.util.*;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
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_ecganalysisparas")
@KeySequence("tb_ecganalysisparas_seq") // 用于 OraclePostgreSQLKingbaseDB2H2 数据库的主键自增如果是 MySQL 等数据库可不写
@Data
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class EcganalysisparasDO {
/**
* 主键
*/
@TableId(type = IdType.INPUT)
private String id;
/**
* 机构ID
*/
@TableField("orgId")
private String orgId;
/**
* 检查ID体检编号住院号门诊号等
*/
@TableField("examId")
private String examId;
/**
* 采集时间
*/
@TableField("collectionTime")
private LocalDateTime collectionTime;
/**
* 心率
*/
@TableField("HR")
private String hr;
/**
* P电轴
*/
@TableField("P_Axle")
private String pAxle;
/**
* QRS电轴
*/
@TableField("QRS_Axle")
private String qrsAxle;
/**
* T电轴
*/
@TableField("T_Axle")
private String tAxle;
/**
* P波时限
*/
@TableField("PTimeLimit")
private String pTimeLimit;
/**
* PR间期
*/
@TableField("PR")
private String pr;
/**
* QRS时限
*/
@TableField("qrsTimeLimit")
private String qrsTimeLimit;
/**
* QT间期
*/
@TableField("QT")
private String qt;
/**
* QTC间期
*/
@TableField("QTC")
private String qtc;
/**
* 胸导V5导联电压
*/
@TableField("RV5")
private String rv5;
/**
* V1导联S波深度
*/
@TableField("SV1")
private String sv1;
/**
* RV5+SV1
*/
@TableField("RV5_SV1")
private String rv5Sv1;
/**
* 快照时间参考心电波形的起始时间
*/
@TableField("snapshotTime")
private LocalDateTime snapshotTime;
/**
* 算法自动诊断结果
*/
@TableField("autoDiagResult")
private String autoDiagResult;
/**
* 自动诊断的时间
*/
@TableField("autoDiagTime")
private LocalDateTime autoDiagTime;
/**
* 医生诊断结果
*/
@TableField("doctorDiagResult")
private String doctorDiagResult;
/**
* 医生诊断的时间
*/
@TableField("doctorDiagTime")
private LocalDateTime doctorDiagTime;
/**
* 诊断医生的姓名
*/
@TableField("doctorName")
private String doctorName;
/**
* 诊断医生的医生id
*/
@TableField("doctorId")
private Integer doctorId;
/**
* 诊断医生的科室id
*/
@TableField("DepartId")
private Integer departId;
/**
* 诊断医生的科室名称
*/
@TableField("DepartName")
private String departName;
/**
* 是否删除 1 为删除
*/
@TableField("isDelete")
private String isDelete;
/**
* 删除时间
*/
@TableField("deleteTime")
private LocalDateTime deleteTime;
/**
* 执行删除操作的医生姓名
*/
@TableField("deleteDoctorName")
private String deleteDoctorName;
/**
* 执行删除操作的医生id
*/
@TableField("deleteDoctorId")
private Integer deleteDoctorId;
/**
* 心电数据文件的路径 路径或URL
*/
@TableField("ecgDataFilePath")
private String ecgDataFilePath;
/**
* 心电数据json格式的数据文件路径路径或URL
*/
@TableField("ecgJsonDataFilePath")
private String ecgJsonDataFilePath;
/**
* 分析参数的创建时间
*/
@TableField("createDate")
private LocalDateTime createDate;
}

View File

@ -0,0 +1,58 @@
package cn.iocoder.yudao.module.tblist.dal.mysql.ecganalysisparas;
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.tblist.dal.dataobject.ecganalysisparas.EcganalysisparasDO;
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.tblist.controller.admin.ecganalysisparas.vo.*;
/**
* 心电分析数据 Mapper
*
* @author 李晓东
*/
@Mapper
@InterceptorIgnore(tenantLine = "true")
public interface EcganalysisparasMapper extends BaseMapperX<EcganalysisparasDO> {
default PageResult<EcganalysisparasDO> selectPage(EcganalysisparasPageReqVO reqVO) {
return selectPage(reqVO, new LambdaQueryWrapperX<EcganalysisparasDO>()
.eqIfPresent(EcganalysisparasDO::getOrgId, reqVO.getOrgId())
.eqIfPresent(EcganalysisparasDO::getExamId, reqVO.getExamId())
.betweenIfPresent(EcganalysisparasDO::getCollectionTime, reqVO.getCollectionTime())
.eqIfPresent(EcganalysisparasDO::getHr, reqVO.getHr())
.eqIfPresent(EcganalysisparasDO::getPAxle, reqVO.getPAxle())
.eqIfPresent(EcganalysisparasDO::getQrsAxle, reqVO.getQrsAxle())
.eqIfPresent(EcganalysisparasDO::getTAxle, reqVO.getTAxle())
.eqIfPresent(EcganalysisparasDO::getPTimeLimit, reqVO.getPTimeLimit())
.eqIfPresent(EcganalysisparasDO::getPr, reqVO.getPr())
.eqIfPresent(EcganalysisparasDO::getQrsTimeLimit, reqVO.getQrsTimeLimit())
.eqIfPresent(EcganalysisparasDO::getQt, reqVO.getQt())
.eqIfPresent(EcganalysisparasDO::getQtc, reqVO.getQtc())
.eqIfPresent(EcganalysisparasDO::getRv5, reqVO.getRv5())
.eqIfPresent(EcganalysisparasDO::getSv1, reqVO.getSv1())
.eqIfPresent(EcganalysisparasDO::getRv5Sv1, reqVO.getRv5Sv1())
.betweenIfPresent(EcganalysisparasDO::getSnapshotTime, reqVO.getSnapshotTime())
.eqIfPresent(EcganalysisparasDO::getAutoDiagResult, reqVO.getAutoDiagResult())
.betweenIfPresent(EcganalysisparasDO::getAutoDiagTime, reqVO.getAutoDiagTime())
.eqIfPresent(EcganalysisparasDO::getDoctorDiagResult, reqVO.getDoctorDiagResult())
.betweenIfPresent(EcganalysisparasDO::getDoctorDiagTime, reqVO.getDoctorDiagTime())
.likeIfPresent(EcganalysisparasDO::getDoctorName, reqVO.getDoctorName())
.eqIfPresent(EcganalysisparasDO::getDoctorId, reqVO.getDoctorId())
.eqIfPresent(EcganalysisparasDO::getDepartId, reqVO.getDepartId())
.likeIfPresent(EcganalysisparasDO::getDepartName, reqVO.getDepartName())
.eqIfPresent(EcganalysisparasDO::getIsDelete, reqVO.getIsDelete())
.betweenIfPresent(EcganalysisparasDO::getDeleteTime, reqVO.getDeleteTime())
.likeIfPresent(EcganalysisparasDO::getDeleteDoctorName, reqVO.getDeleteDoctorName())
.eqIfPresent(EcganalysisparasDO::getDeleteDoctorId, reqVO.getDeleteDoctorId())
.eqIfPresent(EcganalysisparasDO::getEcgDataFilePath, reqVO.getEcgDataFilePath())
.eqIfPresent(EcganalysisparasDO::getEcgJsonDataFilePath, reqVO.getEcgJsonDataFilePath())
.betweenIfPresent(EcganalysisparasDO::getCreateDate, reqVO.getCreateDate())
.orderByDesc(EcganalysisparasDO::getId));
}
}

View File

@ -0,0 +1,58 @@
package cn.iocoder.yudao.module.tblist.service.ecganalysisparas;
import java.util.*;
import cn.iocoder.yudao.module.tblist.controller.admin.ecganalysisparas.vo.*;
import cn.iocoder.yudao.module.tblist.dal.dataobject.ecganalysisparas.EcganalysisparasDO;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import cn.iocoder.yudao.module.tblist.dal.dataobject.patientexamlist.PatientexamlistDO;
import com.baomidou.mybatisplus.extension.service.IService;
import javax.validation.Valid;
/**
* 心电分析数据 Service 接口
*
* @author 李晓东
*/
public interface EcganalysisparasService extends IService<EcganalysisparasDO> {
/**
* 创建心电分析数据
*
* @param createReqVO 创建信息
* @return 编号
*/
String createEcganalysisparas(@Valid EcganalysisparasSaveReqVO createReqVO);
/**
* 更新心电分析数据
*
* @param updateReqVO 更新信息
*/
void updateEcganalysisparas(@Valid EcganalysisparasSaveReqVO updateReqVO);
/**
* 删除心电分析数据
*
* @param id 编号
*/
void deleteEcganalysisparas(String id);
/**
* 获得心电分析数据
*
* @param id 编号
* @return 心电分析数据
*/
EcganalysisparasDO getEcganalysisparas(String id);
/**
* 获得心电分析数据分页
*
* @param pageReqVO 分页查询
* @return 心电分析数据分页
*/
PageResult<EcganalysisparasDO> getEcganalysisparasPage(EcganalysisparasPageReqVO pageReqVO);
}

View File

@ -0,0 +1,79 @@
package cn.iocoder.yudao.module.tblist.service.ecganalysisparas;
import cn.iocoder.yudao.framework.common.exception.ErrorCode;
import cn.iocoder.yudao.module.tblist.dal.dataobject.patientexamlist.PatientexamlistDO;
import cn.iocoder.yudao.module.tblist.dal.mysql.patientexamlist.PatientexamlistMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;
import org.springframework.transaction.annotation.Transactional;
import java.util.*;
import cn.iocoder.yudao.module.tblist.controller.admin.ecganalysisparas.vo.*;
import cn.iocoder.yudao.module.tblist.dal.dataobject.ecganalysisparas.EcganalysisparasDO;
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.tblist.dal.mysql.ecganalysisparas.EcganalysisparasMapper;
import javax.annotation.Resource;
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
/**
* 心电分析数据 Service 实现类
*
* @author 李晓东
*/
@Service
@Validated
public class EcganalysisparasServiceImpl extends ServiceImpl<EcganalysisparasMapper,EcganalysisparasDO > implements EcganalysisparasService {
@Resource
private EcganalysisparasMapper ecganalysisparasMapper;
@Override
public String createEcganalysisparas(EcganalysisparasSaveReqVO createReqVO) {
// 插入
EcganalysisparasDO ecganalysisparas = BeanUtils.toBean(createReqVO, EcganalysisparasDO.class);
ecganalysisparasMapper.insert(ecganalysisparas);
// 返回
return ecganalysisparas.getId();
}
@Override
public void updateEcganalysisparas(EcganalysisparasSaveReqVO updateReqVO) {
// 校验存在
validateEcganalysisparasExists(updateReqVO.getId());
// 更新
EcganalysisparasDO updateObj = BeanUtils.toBean(updateReqVO, EcganalysisparasDO.class);
ecganalysisparasMapper.updateById(updateObj);
}
@Override
public void deleteEcganalysisparas(String id) {
// 校验存在
validateEcganalysisparasExists(id);
// 删除
ecganalysisparasMapper.deleteById(id);
}
private void validateEcganalysisparasExists(String id) {
if (ecganalysisparasMapper.selectById(id) == null) {
throw exception(new ErrorCode(999,"1111"));
}
}
@Override
public EcganalysisparasDO getEcganalysisparas(String id) {
return ecganalysisparasMapper.selectById(id);
}
@Override
public PageResult<EcganalysisparasDO> getEcganalysisparasPage(EcganalysisparasPageReqVO pageReqVO) {
return ecganalysisparasMapper.selectPage(pageReqVO);
}
}

View File

@ -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.tblist.dal.mysql.ecganalysisparas.EcganalysisparasMapper">
<!--
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
文档可见https://www.iocoder.cn/MyBatis/x-plugins/
-->
</mapper>