新增获取lis检验报告接口

This commit is contained in:
lxd 2025-03-13 09:51:10 +08:00
parent d999ef31d9
commit 2da071a1f2
4 changed files with 27 additions and 3 deletions

View File

@ -150,7 +150,7 @@ public class DateUtils {
// 获取当前日期和时间
LocalDateTime now = LocalDateTime.now();
// 定义格式化模式
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMddHHmmss");
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMddHHmmssSSS");
// 格式化当前日期和时间为字符串
return now.format(formatter);
}

View File

@ -328,10 +328,18 @@ public class InspectPatientController {
// Java 对象转换为 JSON 字符串
String jsonRequestBody = objectMapper.writeValueAsString(patient);
//获取配置项地址
ConfigDO config = configService.getConfigByKey("url.ftpurl");
ConfigDO config = configService.getConfigByKey("url.applytj");
// 发送 POST 请求
String url = config.getValue();
String response = HttpUtils.postJson(url, jsonRequestBody);
InspectPatientSaveReqVO updateReqVO = new InspectPatientSaveReqVO();
updateReqVO.setMedicalSn(patientDO.getMedicalSn());
updateReqVO.setHospitalNo("121526004609160793");//乌兰察布第四医院 暂时写死
updateReqVO.setNcgcode(checkBarCode2);
updateReqVO.setXcgcode(checkBarCode1);
updateReqVO.setShqx(checkBarCode3);
patientService.updatePatientInfo(updateReqVO);
}
return success(true);
@ -361,7 +369,7 @@ public class InspectPatientController {
barCode=patientDO.getShqx();
break;
}
ConfigDO config = configService.getConfigByKey("url.ftpurl");
ConfigDO config = configService.getConfigByKey("url.reporttj");
String url = config.getValue();
String response = HttpUtils.get(url+"?"+"barCode="+barCode+"&"+"hospitalCode="+patientDO.getHospitalNo());
if(response!=null)

View File

@ -53,6 +53,10 @@ public interface InspectPatientService {
* 根据体检编号获取患者信息的json
* */
InspectPatientDO getPatientInfo(String medicalSn);
/*
* 根据体检编号更新数据
* */
Integer updatePatientInfo(InspectPatientSaveReqVO updateReqVO);
/**
* 获得患者信息分页

View File

@ -81,6 +81,18 @@ public class InspectPatientServiceImpl implements InspectPatientService {
return patientDO;
}
@Override
public Integer updatePatientInfo(InspectPatientSaveReqVO updateReqVO)
{
LambdaUpdateWrapper<InspectPatientDO> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.eq(InspectPatientDO::getMedicalSn, updateReqVO.getMedicalSn())
.set(InspectPatientDO::getHospitalNo, updateReqVO.getHospitalNo())
.set(InspectPatientDO::getXcgcode, updateReqVO.getXcgcode())
.set(InspectPatientDO::getNcgcode, updateReqVO.getNcgcode())
.set(InspectPatientDO::getShqx, updateReqVO.getShqx());
return patientMapper.update(null, updateWrapper);
}
@Override
public PageResult<InspectPatientDO> getPatientPage(InspectPatientPageReqVO pageReqVO) {