新增同步公卫患者头像接口
This commit is contained in:
parent
486befd17a
commit
d97cfd103b
@ -1426,6 +1426,33 @@ public class InspectPatientController {
|
||||
}
|
||||
return success(true);
|
||||
}
|
||||
@GetMapping("/updatepersonimg")
|
||||
@Operation(summary = "从公卫同步体检患者头像")
|
||||
public CommonResult<Boolean> updatePatientpersonimg(@RequestParam("medicalSn") String medicalSn, @RequestParam("cardId") String cardId) throws IOException {
|
||||
ConfigDO config = configService.getConfigByKey("url.ybjc");
|
||||
String url = config.getValue();
|
||||
String response = HttpUtils.get(url + "?" + "idCard=" + cardId);
|
||||
if (response != null) {
|
||||
// 解析 JSON 响应
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
Map<String, Object> responseMap = objectMapper.readValue(response, Map.class);
|
||||
Map<String, Object> dataMap = (Map<String, Object>) responseMap.get("data");
|
||||
if (dataMap != null && dataMap.get("healthexaminid") != null) {
|
||||
if (dataMap.get("personimg") != null) {
|
||||
String headurl = dataMap.get("personimg").toString();
|
||||
String base64 = HttpUtils.getImageAsBase64(headurl);
|
||||
if (base64 != null || base64 != "") {
|
||||
InspectPatientSaveReqVO updateReqVO = new InspectPatientSaveReqVO();
|
||||
updateReqVO.setMedicalSn(medicalSn);
|
||||
updateReqVO.setHeadPicUrl(base64);
|
||||
patientService.updatePatientInfoheadurl(updateReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除患者信息")
|
||||
|
@ -236,6 +236,7 @@ yudao:
|
||||
- /admin-api/inspect/patient/PushJYPatientInfo #推送给公卫
|
||||
- /admin-api/inspect/patient/getworkload #获取卫生院工作量
|
||||
- /admin-api/inspect/applylog/ApplylogsByIdcard #获取检验日志信息
|
||||
- /admin-api/inspect/patient/updatepersonimg #更新体检头像图片
|
||||
websocket:
|
||||
enable: true # websocket的开关
|
||||
path: /infra/ws # 路径
|
||||
@ -287,6 +288,7 @@ yudao:
|
||||
- /admin-api/inspect/patient/PushJYPatientInfo #推送给公卫
|
||||
- /admin-api/inspect/patient/getworkload #获取卫生院工作量
|
||||
- /admin-api/inspect/applylog/ApplylogsByIdcard #获取检验日志信息
|
||||
- /admin-api/inspect/patient/updatepersonimg #更新体检头像图片
|
||||
- /adminInspect/admin-api/inspect/department/getList
|
||||
- /adminInspect/admin-api/inspect/patient/getUSPatientInfo
|
||||
- /adminInspect/admin-api/system/captcha/get
|
||||
@ -305,6 +307,7 @@ yudao:
|
||||
- /adminInspect/admin-api/inspect/patient/PushJYPatientInfo #推送给公卫
|
||||
- /adminInspect/admin-api/inspect/patient/getworkload #获取卫生院工作量
|
||||
- /adminInspect/admin-api/inspect/applylog/ApplylogsByIdcard #获取检验日志信息
|
||||
- /adminInspect/admin-api/inspect/patient/updatepersonimg #更新体检头像图片
|
||||
ignore-tables:
|
||||
- system_tenant
|
||||
- system_tenant_package
|
||||
|
Loading…
Reference in New Issue
Block a user