修改心电功能接口参数
This commit is contained in:
parent
b1ae70419d
commit
0cb1ddcf41
yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/pojo
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin
yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist
controller/admin
dal/dataobject/patientexamlist
service
ecganalysisparas
patientexamlist
@ -67,7 +67,21 @@ public class CommonResult<T> implements Serializable {
|
||||
result.msg = "";
|
||||
return result;
|
||||
}
|
||||
public static <T> CommonResult<T> success(T data, String msg) {
|
||||
CommonResult<T> result = new CommonResult<>();
|
||||
result.code = GlobalErrorCodeConstants.SUCCESS.getCode();
|
||||
result.data = data;
|
||||
result.msg = msg;
|
||||
return result;
|
||||
}
|
||||
|
||||
public static <T> CommonResult<T> success( String msg) {
|
||||
CommonResult<T> result = new CommonResult<>();
|
||||
result.code = GlobalErrorCodeConstants.SUCCESS.getCode();
|
||||
result.data = null;
|
||||
result.msg = msg;
|
||||
return result;
|
||||
}
|
||||
public static boolean isSuccess(Integer code) {
|
||||
return Objects.equals(code, GlobalErrorCodeConstants.SUCCESS.getCode());
|
||||
}
|
||||
|
@ -159,7 +159,6 @@ public class DoctorController {
|
||||
|
||||
@GetMapping("/getAlllist")
|
||||
@Operation(summary = "获得医生全部list")
|
||||
@PreAuthorize("@ss.hasPermission('doctor::query')")
|
||||
public CommonResult<List<DoctorDO>> getAlllist() {
|
||||
|
||||
List<DoctorDO> doctorDOs = Service.getDoctorList(null);
|
||||
@ -168,7 +167,6 @@ public class DoctorController {
|
||||
|
||||
@GetMapping("/getlist")
|
||||
@Operation(summary = "获得医生list")
|
||||
@PreAuthorize("@ss.hasPermission('doctor::query')")
|
||||
public CommonResult<List<DoctorDO>> getlist() {
|
||||
|
||||
//当前登陆用户
|
||||
|
@ -18,13 +18,13 @@ public class JwtTokenInterceptor implements HandlerInterceptor {
|
||||
if (JwtTokenService.verifyToken(token.trim()))
|
||||
_out = true;
|
||||
else {
|
||||
params.put("code", "TokenError");
|
||||
params.put("code", "500");
|
||||
params.put("msg", "TokenError");
|
||||
responseReturn(response, params);
|
||||
_out = false;
|
||||
}
|
||||
} else {
|
||||
params.put("code", "TokenEmpty");
|
||||
params.put("code", "500");
|
||||
params.put("msg", "TokenEmpty");
|
||||
responseReturn(response, params);
|
||||
_out = false;
|
||||
|
@ -36,6 +36,8 @@ 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.error;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
@ -99,11 +101,11 @@ public class EcganalysisparasController {
|
||||
}
|
||||
@GetMapping("/getIdCardEcgData")
|
||||
@Operation(summary = "通过身份证获取心电数据")
|
||||
public CommonResult<List<EcgidCardDataVO>> getIdCardEcgData(@RequestParam("idCard") String idCard)
|
||||
public CommonResult<List<EcgidCardDataVO>> getIdCardEcgData(@RequestParam("idCard") String idCard,@RequestParam("date") String datestring)
|
||||
{
|
||||
List<EcgidCardDataVO> list1 = new ArrayList<>();
|
||||
List<EcganalysisparasDO> list =ecganalysisparasService.idCardEcgData(idCard);
|
||||
if (list!=null)
|
||||
List<EcganalysisparasDO> list =ecganalysisparasService.idCardEcgData(idCard,datestring);
|
||||
if (list!=null&&list.size()>0)
|
||||
{
|
||||
for (EcganalysisparasDO ecganalysisparasDO:list)
|
||||
{
|
||||
@ -120,6 +122,10 @@ public class EcganalysisparasController {
|
||||
ecgidCardDataVO.setHeartRateUneven(heartRateUneven);
|
||||
list1.add(ecgidCardDataVO);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return success("未获取到相关数据");
|
||||
}
|
||||
return success(list1);
|
||||
}
|
||||
|
@ -348,16 +348,16 @@ public class PatientexamlistController {
|
||||
@Operation(summary = "超声审核更新数据")
|
||||
@PreAuthorize("@ss.hasPermission('tblist:patientexamlist:update')")
|
||||
@LogRecord(type = "超声审核", subType = "审核", bizNo = "1002", success = "审核ID为{{#id}}的患者")
|
||||
public CommonResult<Boolean> examine(@RequestParam("id") String id) {
|
||||
public CommonResult<Boolean> examine(@RequestParam("id") String id,@RequestParam("doctorid") String doctorid,@RequestParam("doctorname") String doctorname) {
|
||||
|
||||
LocalDateTime dateTime = LocalDateTime.parse(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")),
|
||||
DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
|
||||
//获取当前登陆用户
|
||||
AdminUserDO user = userService.getUser(getLoginUserId());
|
||||
// AdminUserDO user = userService.getUser(getLoginUserId());
|
||||
PatientexamlistSaveReqVO updateReqVO = new PatientexamlistSaveReqVO();
|
||||
updateReqVO.setId(id);
|
||||
updateReqVO.setReviewDoctorId(user.getDoctorID());
|
||||
updateReqVO.setReviewDoctor(user.getDoctorname());
|
||||
updateReqVO.setReviewDoctorId(doctorid);
|
||||
updateReqVO.setReviewDoctor(doctorname);
|
||||
updateReqVO.setReviewDate(dateTime);
|
||||
updateReqVO.setReviewStatus("1");
|
||||
updateReqVO.setReportstatus("已审核");
|
||||
|
@ -131,6 +131,12 @@ public class PatientexamlistDO extends BaseDO {
|
||||
*/
|
||||
@TableField(value = "diagDoctor")
|
||||
private String diagDoctor;
|
||||
|
||||
/**
|
||||
* 诊断医生
|
||||
*/
|
||||
@TableField(value = "diagDoctorId")
|
||||
private String diagDoctorId;
|
||||
/**
|
||||
* 审核医生ID
|
||||
*/
|
||||
|
@ -76,7 +76,7 @@ public interface EcganalysisparasService extends IService<EcganalysisparasDO> {
|
||||
/*
|
||||
* 根据身份证号获取心电分析数据
|
||||
* */
|
||||
List<EcganalysisparasDO> idCardEcgData(String idcard);
|
||||
List<EcganalysisparasDO> idCardEcgData(String idcard,String dateString);
|
||||
|
||||
/**
|
||||
* 获取心电分析数据对应的pdf图像
|
||||
|
@ -23,6 +23,9 @@ import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.module.tblist.controller.admin.ecganalysisparas.vo.*;
|
||||
@ -130,9 +133,23 @@ public class EcganalysisparasServiceImpl extends ServiceImpl<EcganalysisparasMap
|
||||
return ecganalysisparasMapper.selectOne(queryWrapper);
|
||||
}
|
||||
@Override
|
||||
public List<EcganalysisparasDO> idCardEcgData(String idcard) {
|
||||
public List<EcganalysisparasDO> idCardEcgData(String idcard,String dateString) {
|
||||
// 创建 QueryWrapper 并添加条件
|
||||
QueryWrapper<EcganalysisparasDO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("idcard", idcard);
|
||||
|
||||
// 检查日期字符串是否为空
|
||||
if (dateString != null && !dateString.trim().isEmpty()) {
|
||||
// 将字符串日期转换为 LocalDate
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||
LocalDate localDate = LocalDate.parse(dateString, formatter);
|
||||
|
||||
// 创建 LocalDateTime 对象,表示当天的开始时间
|
||||
LocalDateTime startOfDay = localDate.atStartOfDay();
|
||||
|
||||
// 添加时间条件
|
||||
queryWrapper.ge("doctorDiagTime", startOfDay);
|
||||
}
|
||||
return ecganalysisparasMapper.selectList(queryWrapper);
|
||||
}
|
||||
@Override
|
||||
|
@ -45,6 +45,7 @@ import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.module.tblist.dal.mysql.patientexamlist.PatientexamlistMapper;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.net.ssl.SSLContext;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
|
||||
@ -629,20 +630,27 @@ public class PatientexamlistServiceImpl extends ServiceImpl<PatientexamlistMappe
|
||||
return out;
|
||||
}
|
||||
|
||||
private Image getAcroField_Image(String url) {
|
||||
public Image getAcroField_Image(String url) {
|
||||
Image out = null;
|
||||
try {
|
||||
// 创建忽略证书验证的HttpClient
|
||||
SSLContext sslContext = SSLContextBuilder.create()
|
||||
.loadTrustMaterial(null, (x509Certificates, s) -> true)
|
||||
.build();
|
||||
HttpClient httpClient = HttpClients.custom()
|
||||
.setSSLHostnameVerifier(NoopHostnameVerifier.INSTANCE)
|
||||
.setSSLContext(SSLContextBuilder.create().loadTrustMaterial(null, (x509Certificates, s) -> true).build())
|
||||
.setSSLContext(sslContext)
|
||||
.build();
|
||||
|
||||
HttpGet request = new HttpGet(safeString(url));
|
||||
try (CloseableHttpResponse response = (CloseableHttpResponse) httpClient.execute(request)) {
|
||||
byte[] imageData = EntityUtils.toByteArray(response.getEntity());
|
||||
if (imageData != null)
|
||||
if (imageData != null) {
|
||||
out = Image.getInstance(imageData);
|
||||
}
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace(); // 打印异常信息以便调试
|
||||
out = null;
|
||||
}
|
||||
return out;
|
||||
|
Loading…
Reference in New Issue
Block a user