通过examID获取检查数据

This commit is contained in:
Euni4U 2024-11-20 11:53:01 +08:00
parent 7febfc0181
commit bc3f19a5c6
3 changed files with 23 additions and 1 deletions

View File

@ -96,5 +96,11 @@ public class EcganalysisparasController {
ExcelUtils.write(response, "心电分析数据.xls", "数据", EcganalysisparasRespVO.class, ExcelUtils.write(response, "心电分析数据.xls", "数据", EcganalysisparasRespVO.class,
BeanUtils.toBean(list, EcganalysisparasRespVO.class)); BeanUtils.toBean(list, EcganalysisparasRespVO.class));
} }
@GetMapping("/getexamIDdata")
@Operation(summary = "根据examId获得心电数据")
@Parameter(name = "examID", description = "检查编号", required = true, example = "1024")
public CommonResult<EcganalysisparasRespVO> getexamIDdata(@RequestParam("examId") String examId) {
EcganalysisparasDO ecganalysisparas= ecganalysisparasService.getexamIDdata(examId);
return success(BeanUtils.toBean(ecganalysisparas, EcganalysisparasRespVO.class));
}
} }

View File

@ -54,5 +54,12 @@ public interface EcganalysisparasService extends IService<EcganalysisparasDO> {
* @return 心电分析数据分页 * @return 心电分析数据分页
*/ */
PageResult<EcganalysisparasDO> getEcganalysisparasPage(EcganalysisparasPageReqVO pageReqVO); PageResult<EcganalysisparasDO> getEcganalysisparasPage(EcganalysisparasPageReqVO pageReqVO);
/**
* 获得心电分析数据
*
* @param examID 编号
* @return 心电分析数据
*/
EcganalysisparasDO getexamIDdata(String examID);
} }

View File

@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.tblist.service.ecganalysisparas;
import cn.iocoder.yudao.framework.common.exception.ErrorCode; 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.dataobject.patientexamlist.PatientexamlistDO;
import cn.iocoder.yudao.module.tblist.dal.mysql.patientexamlist.PatientexamlistMapper; import cn.iocoder.yudao.module.tblist.dal.mysql.patientexamlist.PatientexamlistMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
@ -76,4 +77,12 @@ public class EcganalysisparasServiceImpl extends ServiceImpl<EcganalysisparasMap
} }
@Override
public EcganalysisparasDO getexamIDdata(String examID) {
QueryWrapper<EcganalysisparasDO> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("examId", examID);
return ecganalysisparasMapper.selectOne(queryWrapper);
}
} }