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) {