From 2da071a1f28c04be07c101f07f8265f65f2b39e9 Mon Sep 17 00:00:00 2001 From: lxd <1004405501@qq.com> Date: Thu, 13 Mar 2025 09:51:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=8E=B7=E5=8F=96lis?= =?UTF-8?q?=E6=A3=80=E9=AA=8C=E6=8A=A5=E5=91=8A=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/framework/common/util/date/DateUtils.java | 2 +- .../inspectpatient/InspectPatientController.java | 12 ++++++++++-- .../inspectpatient/InspectPatientService.java | 4 ++++ .../inspectpatient/InspectPatientServiceImpl.java | 12 ++++++++++++ 4 files changed, 27 insertions(+), 3 deletions(-) diff --git a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/date/DateUtils.java b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/date/DateUtils.java index eb46c8a..f745f1d 100644 --- a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/date/DateUtils.java +++ b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/date/DateUtils.java @@ -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); } diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectpatient/InspectPatientController.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectpatient/InspectPatientController.java index 6d00c15..255fb4f 100644 --- a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectpatient/InspectPatientController.java +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectpatient/InspectPatientController.java @@ -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) diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/service/inspectpatient/InspectPatientService.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/service/inspectpatient/InspectPatientService.java index 8d95446..9d9d178 100644 --- a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/service/inspectpatient/InspectPatientService.java +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/service/inspectpatient/InspectPatientService.java @@ -53,6 +53,10 @@ public interface InspectPatientService { * 根据体检编号获取患者信息的json * */ InspectPatientDO getPatientInfo(String medicalSn); + /* + * 根据体检编号更新数据 + * */ + Integer updatePatientInfo(InspectPatientSaveReqVO updateReqVO); /** * 获得患者信息分页 diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/service/inspectpatient/InspectPatientServiceImpl.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/service/inspectpatient/InspectPatientServiceImpl.java index 0ac5cb0..bcc7183 100644 --- a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/service/inspectpatient/InspectPatientServiceImpl.java +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/service/inspectpatient/InspectPatientServiceImpl.java @@ -81,6 +81,18 @@ public class InspectPatientServiceImpl implements InspectPatientService { return patientDO; } + @Override + public Integer updatePatientInfo(InspectPatientSaveReqVO updateReqVO) + { + LambdaUpdateWrapper 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 getPatientPage(InspectPatientPageReqVO pageReqVO) {