From fd219f18da0fbdf208d8bd4f0dada75ed783fd66 Mon Sep 17 00:00:00 2001 From: lxd <1004405501@qq.com> Date: Wed, 25 Dec 2024 14:04:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=B0=83=E7=94=A8=E5=BF=83?= =?UTF-8?q?=E7=94=B5=E6=89=93=E5=8D=B0=E6=9C=8D=E5=8A=A1=E5=AE=9E=E4=BD=93?= =?UTF-8?q?=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/warning/WarningController.java | 1 + .../EcganalysisparasController.java | 48 +++++++++++++++++++ .../ecganalysisparas/vo/EcgPrintPdf.java | 31 ++++++++++++ .../vo/EcganalysisparasSaveReqVO.java | 4 ++ 4 files changed, 84 insertions(+) create mode 100644 yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/controller/admin/ecganalysisparas/vo/EcgPrintPdf.java diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/warning/WarningController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/warning/WarningController.java index ee4a4cb06..bc5894dbd 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/warning/WarningController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/warning/WarningController.java @@ -112,6 +112,7 @@ public class WarningController { return success(true); } + @GetMapping("/sendMessage") @Operation(summary = "发送站内信给某个用户") public CommonResult sendMessage(@RequestParam("userid") String userid,@RequestParam("name") String name) diff --git a/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/controller/admin/ecganalysisparas/EcganalysisparasController.java b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/controller/admin/ecganalysisparas/EcganalysisparasController.java index 1f7526d50..b5008ef90 100644 --- a/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/controller/admin/ecganalysisparas/EcganalysisparasController.java +++ b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/controller/admin/ecganalysisparas/EcganalysisparasController.java @@ -1,7 +1,13 @@ package cn.iocoder.yudao.module.tblist.controller.admin.ecganalysisparas; +import cn.iocoder.yudao.module.system.dal.dataobject.doctor.DoctorDO; +import cn.iocoder.yudao.module.system.dal.dataobject.org.OrgUnitDO; +import cn.iocoder.yudao.module.system.service.doctor.DoctorService; +import cn.iocoder.yudao.module.system.service.org.OrgUnitService; import cn.iocoder.yudao.module.tblist.dal.mysql.ecganalysisparas.EcganalysisparasMapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; import org.springframework.web.bind.annotation.*; import org.springframework.validation.annotation.Validated; @@ -41,6 +47,10 @@ import java.net.URLEncoder; @Validated public class EcganalysisparasController { + @Resource + private OrgUnitService orgService; + @Resource + private DoctorService Service; @Resource private EcganalysisparasService ecganalysisparasService; @Resource @@ -79,6 +89,44 @@ public class EcganalysisparasController { return success(true); } + @PutMapping("/SaveEcgPdf") + @Operation(summary = "保存心电分析数据调用打印服务生成pdf") + public CommonResult SaveEcgPdf(@RequestBody EcganalysisparasSaveReqVO updateReqVO) throws JsonProcessingException { + EcgPrintPdf ecgPrintPdf=new EcgPrintPdf(); + ecgPrintPdf.setExamid(updateReqVO.getExamId()); + ecgPrintPdf.setName(updateReqVO.getName()); + ecgPrintPdf.setGender(updateReqVO.getGender()); + ecgPrintPdf.setAge(updateReqVO.getAge()); + ecgPrintPdf.setRegid(updateReqVO.getRegId()); + ecgPrintPdf.setHr(updateReqVO.getHr()); + ecgPrintPdf.setPr(updateReqVO.getPr()); + ecgPrintPdf.setQrs(updateReqVO.getQrsTimeLimit()); + ecgPrintPdf.setQtqtc(updateReqVO.getQt()+"/"+updateReqVO.getQtc()); + ecgPrintPdf.setRv5sv1(updateReqVO.getRv5()+"/"+updateReqVO.getSv1()); + ecgPrintPdf.setRv5sv1plus(updateReqVO.getRv5Sv1()); + ecgPrintPdf.setPt(updateReqVO.getPAxle()+"/"+updateReqVO.getTAxle()+"/"+updateReqVO.getQrsAxle()); + ecgPrintPdf.setDepartment(updateReqVO.getDepartName()); + //查询医生的签名图片 + DoctorDO doctorDO = Service.getBydoctorID(String.valueOf(updateReqVO.getDoctorId())); + if(!doctorDO.getESignatureUrl().isEmpty()) + { + ecgPrintPdf.setImage(doctorDO.getESignatureUrl()); + } + ecgPrintPdf.setDoctorDiagTime(String.valueOf(updateReqVO.getDoctorDiagTime())); + ecgPrintPdf.setDiagContent(updateReqVO.getDoctorDiagResult()); + ecgPrintPdf.setDepartName(updateReqVO.getDepartName()); + ecgPrintPdf.setDoctorName(updateReqVO.getDoctorName()); + ecgPrintPdf.setType("2"); + ecgPrintPdf.setFilepath(updateReqVO.getEcgJsonDataFilePath()); + OrgUnitDO aDo = orgService.getonekey(updateReqVO.getOrgId()); + if(!aDo.getOrgName().isEmpty()) + { + ecgPrintPdf.setOrgname(aDo.getOrgName()); + } + ObjectMapper mapper = new ObjectMapper(); + String json = mapper.writeValueAsString(ecgPrintPdf); + return success(true); + } @DeleteMapping("/delete") diff --git a/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/controller/admin/ecganalysisparas/vo/EcgPrintPdf.java b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/controller/admin/ecganalysisparas/vo/EcgPrintPdf.java new file mode 100644 index 000000000..481c9db15 --- /dev/null +++ b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/controller/admin/ecganalysisparas/vo/EcgPrintPdf.java @@ -0,0 +1,31 @@ +package cn.iocoder.yudao.module.tblist.controller.admin.ecganalysisparas.vo; + +import lombok.Data; + +@Data +public class EcgPrintPdf { + + private String examid; + private String name; + private String gender; + private String age; + private String ward; + private String regid; + private String hr; + private String pr; + private String qrs; + private String qtqtc; + private String rv5sv1; + private String rv5sv1plus; + private String pt; + private String diagnosisHint; + private String department; + private String image; + private String doctorDiagTime; + private String diagContent; + private String DepartName; + private String doctorName; + private String type; + private String filepath; + private String orgname; +} diff --git a/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/controller/admin/ecganalysisparas/vo/EcganalysisparasSaveReqVO.java b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/controller/admin/ecganalysisparas/vo/EcganalysisparasSaveReqVO.java index 1555e2587..97c520abf 100644 --- a/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/controller/admin/ecganalysisparas/vo/EcganalysisparasSaveReqVO.java +++ b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/controller/admin/ecganalysisparas/vo/EcganalysisparasSaveReqVO.java @@ -109,5 +109,9 @@ public class EcganalysisparasSaveReqVO { @Schema(description = "登记ID") private String regId; + /* 额外字段 在调用保存打印服务时候回用到 */ + private String name; + private String gender; + private String age; } \ No newline at end of file