From 3abb7e2268f4b9cd46b6dcef736e3d5bff198110 Mon Sep 17 00:00:00 2001 From: lichuanyang <1176537920@qq.com> Date: Mon, 21 Oct 2024 15:32:02 +0800 Subject: [PATCH] =?UTF-8?q?=E7=97=85=E7=90=86=E5=B7=A5=E4=BD=9C=E5=8F=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PatientexamlistController.java | 111 ++++++++---------- .../ultrasonic/ultrasonicController.java | 19 ++- .../medicalimg/medicalimgMapper.java | 2 + .../service/ultrasonic/ultrasonicService.java | 1 + .../ultrasonic/ultrasonicServiceImpl.java | 5 + .../mapper/ultrasonic/medicalimgMapper.xml | 19 +++ .../src/main/resources/application.yaml | 2 + 7 files changed, 95 insertions(+), 64 deletions(-) diff --git a/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/controller/admin/patientexamlist/PatientexamlistController.java b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/controller/admin/patientexamlist/PatientexamlistController.java index be35f699e..9ec8deff7 100644 --- a/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/controller/admin/patientexamlist/PatientexamlistController.java +++ b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/controller/admin/patientexamlist/PatientexamlistController.java @@ -73,6 +73,7 @@ public class PatientexamlistController { private OrgService OrgService; @Resource private OrgUnitService Service; + @PostMapping("/create") @Operation(summary = "创建PACS检查列表") @PreAuthorize("@ss.hasPermission('tblist:patientexamlist:create')") @@ -134,11 +135,18 @@ public class PatientexamlistController { .filter(PatientexamlistDO -> (PatientexamlistDO.getDeviceType().contains("US"))) .sorted(Comparator.comparing(PatientexamlistDO::getExamDate, Comparator.nullsLast(Comparator.reverseOrder()))) // 降序排序,null值排在后面 .collect(Collectors.toList()); + } else if (devicetype != null && devicetype.contains("CSH1"))//表示只查询病理工作台的数据 + { + // 筛选条件: + doList = pageResult.getList().stream() + .filter(PatientexamlistDO -> (PatientexamlistDO.getDeviceType().contains("CSH1"))) + .sorted(Comparator.comparing(PatientexamlistDO::getExamDate, Comparator.nullsLast(Comparator.reverseOrder()))) // 降序排序,null值排在后面 + .collect(Collectors.toList()); } else if (devicetype != null && !devicetype.trim().isEmpty())//表示只查询影像的数据 { // 筛选条件: doList = pageResult.getList().stream() - .filter(PatientexamlistDO -> !(PatientexamlistDO.getDeviceType().contains("US"))) + .filter(PatientexamlistDO -> !(PatientexamlistDO.getDeviceType().contains("US")) && !(PatientexamlistDO.getDeviceType().contains("CSH1"))) .sorted(Comparator.comparing(PatientexamlistDO::getExamDate, Comparator.nullsLast(Comparator.reverseOrder()))) // 降序排序,null值排在后面 .collect(Collectors.toList()); } else //devicetype为空,查询全部数据 @@ -240,17 +248,15 @@ public class PatientexamlistController { //先拿orgid查询出来对应的org表的上级机构代码 String hiorgid = OrgService.GetOrgHiORGId(orgId); log.debug("查询出来对应的org表的上级机构代码" + hiorgid); - if (hiorgid!=null &&!hiorgid.isEmpty()) { + if (hiorgid != null && !hiorgid.isEmpty()) { PatientexamlistSaveReqVO updateReqVO = new PatientexamlistSaveReqVO(); updateReqVO.setId(id); updateReqVO.setHighLevelOrgId(hiorgid); updateReqVO.setApplicationDate(LocalDateTime.parse(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); patientexamlistService.updatePatientexamlist(updateReqVO); - } - else - { - return error(9999,"上级机构为空,请先设置上级机构"); + } else { + return error(9999, "上级机构为空,请先设置上级机构"); } return success("申请成功"); } @@ -288,42 +294,38 @@ public class PatientexamlistController { patientexamlistService.updatePatientexamlist(updateReqVO); return success(true); } + @GetMapping("/WholeDiagFlagCount") @Operation(summary = "首页饼状图统计") - public CommonResult GetWholeDiagFlagCount() - { + public CommonResult GetWholeDiagFlagCount() { //获取当前登陆用户 AdminUserDO user = userService.getUser(getLoginUserId()); - PatientexamlistCountVO patientexamlistCountVO= patientexamlistService.GetWholeDiagFlagCount(user.getOrgId()); + PatientexamlistCountVO patientexamlistCountVO = patientexamlistService.GetWholeDiagFlagCount(user.getOrgId()); return success(patientexamlistCountVO); } @GetMapping("/GetDateYYZDYXCount") @Operation(summary = "首页折线图统计") - public CommonResult> GetDateYYZDYXCount() - { + public CommonResult> GetDateYYZDYXCount() { //获取当前登陆用户 AdminUserDO user = userService.getUser(getLoginUserId()); - List patientexamlistCountVO= patientexamlistService.GetDateWholeDiagFlagCount(user.getOrgId()); + List patientexamlistCountVO = patientexamlistService.GetDateWholeDiagFlagCount(user.getOrgId()); return success(patientexamlistCountVO); } + @GetMapping("/CollectAndCancellation") @Operation(summary = "收藏以及取消") - public CommonResult CollectAndCancellation(@RequestParam("id") String id,@RequestParam("type") String type) - { + public CommonResult CollectAndCancellation(@RequestParam("id") String id, @RequestParam("type") String type) { LocalDateTime dateTime = LocalDateTime.parse(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); PatientexamlistSaveReqVO updateReqVO = new PatientexamlistSaveReqVO(); updateReqVO.setId(id); updateReqVO.setIsFavourite(type); - if(type.equals("1")) - { + if (type.equals("1")) { updateReqVO.setFavouriteTime(dateTime); - } - else if(type.equals("0")) - { + } else if (type.equals("0")) { updateReqVO.setFavouriteTime(null); } @@ -333,34 +335,27 @@ public class PatientexamlistController { @GetMapping("/GetAnalysisInfo") @Operation(summary = "获取报告信息") - public CommonResult GetAnalysisInfo(@RequestParam(value = "examId", required = false) String examId,@RequestParam("regId") String regId,@RequestParam("orgId") String orgId) - { - String msg=""; + public CommonResult GetAnalysisInfo(@RequestParam(value = "examId", required = false) String examId, @RequestParam("regId") String regId, @RequestParam("orgId") String orgId) { + String msg = ""; - if (regId!=null &&!regId.isEmpty() && orgId!=null &&!orgId.isEmpty()) - { - String CloudDicom=""; - OrgUnitDO unitDO= Service.getonekey(orgId); - if(unitDO!=null) - { - CloudDicom= unitDO.getCloudDicom(); + if (regId != null && !regId.isEmpty() && orgId != null && !orgId.isEmpty()) { + String CloudDicom = ""; + OrgUnitDO unitDO = Service.getonekey(orgId); + if (unitDO != null) { + CloudDicom = unitDO.getCloudDicom(); } Map params = new HashMap<>(); params.put("regId", regId); params.put("orgId", orgId); - if(examId!=null&&!examId.isEmpty()) - { + if (examId != null && !examId.isEmpty()) { params.put("examId", examId); } - List analysisInfoVOS=new ArrayList<>(); - List patientexamlistDOList= patientexamlistService.selectMp(params); - if(!patientexamlistDOList.isEmpty()) - { - for (PatientexamlistDO patientexamlistDO:patientexamlistDOList) - { - if(patientexamlistDO.getDiagDoctor()!=null &&!patientexamlistDO.getDiagDoctor().isEmpty()) - { - AnalysisInfoVO infoVO=new AnalysisInfoVO(); + List analysisInfoVOS = new ArrayList<>(); + List patientexamlistDOList = patientexamlistService.selectMp(params); + if (!patientexamlistDOList.isEmpty()) { + for (PatientexamlistDO patientexamlistDO : patientexamlistDOList) { + if (patientexamlistDO.getDiagDoctor() != null && !patientexamlistDO.getDiagDoctor().isEmpty()) { + AnalysisInfoVO infoVO = new AnalysisInfoVO(); infoVO.setExamId(patientexamlistDO.getExamId()); infoVO.setRegId(patientexamlistDO.getRegId()); infoVO.setPName(patientexamlistDO.getPName()); @@ -373,30 +368,25 @@ public class PatientexamlistController { infoVO.setDiagDoctor(patientexamlistDO.getDiagDoctor()); infoVO.setDiagDate(patientexamlistDO.getDiagDate() != null ? patientexamlistDO.getDiagDate().toString() : null); infoVO.setReviewDoctor(patientexamlistDO.getReviewDoctor()); - infoVO.setReviewDate(patientexamlistDO.getReviewDate()!=null ?patientexamlistDO.getReviewDate().toString():null); - infoVO.setCloudurl(CloudDicom+"/?no="+regId+"&orgId="+orgId);//http://1.119.159.138:48082/flyCloudDicom + infoVO.setReviewDate(patientexamlistDO.getReviewDate() != null ? patientexamlistDO.getReviewDate().toString() : null); + infoVO.setCloudurl(CloudDicom + "/?no=" + regId + "&orgId=" + orgId);//http://1.119.159.138:48082/flyCloudDicom analysisInfoVOS.add(infoVO); } } - if(!analysisInfoVOS.isEmpty()) - { - Gson gson = new GsonBuilder() - .serializeSpecialFloatingPointValues() // 序列化特殊浮点数值(如 NaN, Infinity) - .disableHtmlEscaping() // 禁用 HTML 转义 - .create(); - msg= gson.toJson(analysisInfoVOS); - } - else - { - msg="未查询到数据或数据未进行分析"; + if (!analysisInfoVOS.isEmpty()) { + Gson gson = new GsonBuilder() + .serializeSpecialFloatingPointValues() // 序列化特殊浮点数值(如 NaN, Infinity) + .disableHtmlEscaping() // 禁用 HTML 转义 + .create(); + msg = gson.toJson(analysisInfoVOS); + } else { + msg = "未查询到数据或数据未进行分析"; } } - } - else - { - msg="参数为空"; + } else { + msg = "参数为空"; } return success(msg); @@ -404,15 +394,14 @@ public class PatientexamlistController { @PostMapping("/ftppdf") @Operation(summary = "获取pdf上传ftp") - public void FtpPdf(@RequestBody inspdfscreenshotVO insimagescreenshotVO) - { + public void FtpPdf(@RequestBody inspdfscreenshotVO insimagescreenshotVO) { String base64String = insimagescreenshotVO.getImagebase(); String ftpServer = "114.55.171.231"; int ftpPort = 21; // FTP端口,默认为21 String ftpUser = "pacs"; String ftpPassword = "pacs"; String uploadPath = "/"; - String fileName = System.currentTimeMillis()+".pdf"; + String fileName = System.currentTimeMillis() + ".pdf"; FTPClient ftpClient = new FTPClient(); @@ -442,7 +431,7 @@ public class PatientexamlistController { AdminUserDO user = userService.getUser(getLoginUserId()); PatientexamlistSaveReqVO updateReqVO = new PatientexamlistSaveReqVO(); updateReqVO.setId(insimagescreenshotVO.getID()); - updateReqVO.setPdfurl("http://114.55.171.231:48082/"+fileName); + updateReqVO.setPdfurl("http://114.55.171.231:48082/" + fileName); patientexamlistService.updatePatientexamlist(updateReqVO); } else { System.out.println("文件上传失败"); diff --git a/yudao-module-ultrasoniccom/yudao-module-ultrasoniccom-biz/src/main/java/cn/iocoder/yudao/module/ultrasoniccom/controller/admin/ultrasonic/ultrasonicController.java b/yudao-module-ultrasoniccom/yudao-module-ultrasoniccom-biz/src/main/java/cn/iocoder/yudao/module/ultrasoniccom/controller/admin/ultrasonic/ultrasonicController.java index 8caceb692..cd0e4c5be 100644 --- a/yudao-module-ultrasoniccom/yudao-module-ultrasoniccom-biz/src/main/java/cn/iocoder/yudao/module/ultrasoniccom/controller/admin/ultrasonic/ultrasonicController.java +++ b/yudao-module-ultrasoniccom/yudao-module-ultrasoniccom-biz/src/main/java/cn/iocoder/yudao/module/ultrasoniccom/controller/admin/ultrasonic/ultrasonicController.java @@ -226,6 +226,16 @@ public class ultrasonicController { } } } + + @GetMapping("/getpathologyimglist") + @Operation(summary = "获取病理图片列表") + @Parameter(name = "orgid", description = "机构ID", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('ultrasoniccom:ultrasonic:create')") + public CommonResult> getPathologyImgList(@RequestParam("orgID") String orgId, @RequestParam("regID") String regId, @RequestParam("select") String select) { + List devicelist = ultrasonicService.getPathologyImgList(orgId, regId, select); + return success(BeanUtils.toBean(devicelist, medicalimgDO.class)); + } + @GetMapping("/getimageslist") @Operation(summary = "获取图片列表") @Parameter(name = "orgid", description = "机构ID", required = true, example = "1024") @@ -262,12 +272,12 @@ public class ultrasonicController { //新增对象 medicalimgDO medicalimgDO = new medicalimgDO(); medicalimgDO.setId(s.getId()); - if (!s.getIsDelete().isEmpty()) { + if (s.getIsDelete() != null && !s.getIsDelete().isEmpty()) { medicalimgDO.setIsDelete(s.getIsDelete()); medicalimgDO.setDeletePerson(s.getDeletePerson()); medicalimgDO.setDeleteDate(dateTime); } - if (!s.getSelected().isEmpty()) { + if (s.getSelected() != null && !s.getSelected().isEmpty()) { medicalimgDO.setSelected(s.getSelected()); } doList.add(medicalimgDO); @@ -468,7 +478,10 @@ public class ultrasonicController { medicalimgDO.setRegId(insimagescreenshotVO.getID()); medicalimgDO.setOrgId(user.getOrgId()); medicalimgDO.setSelected("0"); - medicalimgDO.setImgType("1"); + if (insimagescreenshotVO.getImgType() == null || insimagescreenshotVO.getImgType().trim().equals("")) + medicalimgDO.setImgType("1"); + else + medicalimgDO.setImgType(insimagescreenshotVO.getImgType().trim()); int count=medicalimgService.insimage(medicalimgDO); } else { System.out.println("文件上传失败"); diff --git a/yudao-module-ultrasoniccom/yudao-module-ultrasoniccom-biz/src/main/java/cn/iocoder/yudao/module/ultrasoniccom/dal/ultrasonic/medicalimg/medicalimgMapper.java b/yudao-module-ultrasoniccom/yudao-module-ultrasoniccom-biz/src/main/java/cn/iocoder/yudao/module/ultrasoniccom/dal/ultrasonic/medicalimg/medicalimgMapper.java index 2bbf46847..8c9d6219b 100644 --- a/yudao-module-ultrasoniccom/yudao-module-ultrasoniccom-biz/src/main/java/cn/iocoder/yudao/module/ultrasoniccom/dal/ultrasonic/medicalimg/medicalimgMapper.java +++ b/yudao-module-ultrasoniccom/yudao-module-ultrasoniccom-biz/src/main/java/cn/iocoder/yudao/module/ultrasoniccom/dal/ultrasonic/medicalimg/medicalimgMapper.java @@ -14,6 +14,8 @@ public interface medicalimgMapper extends BaseMapperX { List getmedicalimgist(@Param("orgId") String orgId,@Param("regId") String regId,@Param("select") String select); + List getPathologyImgList(@Param("orgId") String orgId,@Param("regId") String regId,@Param("select") String select); + List getmedicalimgist(UserDataDocumentFactory UserDataDocumentFactory); String GetImageVideo(@Param("orgId") String orgId,@Param("regId") String regId); diff --git a/yudao-module-ultrasoniccom/yudao-module-ultrasoniccom-biz/src/main/java/cn/iocoder/yudao/module/ultrasoniccom/service/ultrasonic/ultrasonicService.java b/yudao-module-ultrasoniccom/yudao-module-ultrasoniccom-biz/src/main/java/cn/iocoder/yudao/module/ultrasoniccom/service/ultrasonic/ultrasonicService.java index 49631ec16..7bead7c39 100644 --- a/yudao-module-ultrasoniccom/yudao-module-ultrasoniccom-biz/src/main/java/cn/iocoder/yudao/module/ultrasoniccom/service/ultrasonic/ultrasonicService.java +++ b/yudao-module-ultrasoniccom/yudao-module-ultrasoniccom-biz/src/main/java/cn/iocoder/yudao/module/ultrasoniccom/service/ultrasonic/ultrasonicService.java @@ -21,6 +21,7 @@ public interface ultrasonicService extends IService { */ List getreporttemplate(); + List getPathologyImgList(@Param("orgId") String orgId, @Param("regId") String regId,@Param("select") String select); List getmedicalimgist(@Param("orgId") String orgId, @Param("regId") String regId,@Param("select") String select); diff --git a/yudao-module-ultrasoniccom/yudao-module-ultrasoniccom-biz/src/main/java/cn/iocoder/yudao/module/ultrasoniccom/service/ultrasonic/ultrasonicServiceImpl.java b/yudao-module-ultrasoniccom/yudao-module-ultrasoniccom-biz/src/main/java/cn/iocoder/yudao/module/ultrasoniccom/service/ultrasonic/ultrasonicServiceImpl.java index b0aad1c3c..c9e9c7f2f 100644 --- a/yudao-module-ultrasoniccom/yudao-module-ultrasoniccom-biz/src/main/java/cn/iocoder/yudao/module/ultrasoniccom/service/ultrasonic/ultrasonicServiceImpl.java +++ b/yudao-module-ultrasoniccom/yudao-module-ultrasoniccom-biz/src/main/java/cn/iocoder/yudao/module/ultrasoniccom/service/ultrasonic/ultrasonicServiceImpl.java @@ -29,6 +29,11 @@ public class ultrasonicServiceImpl extends ServiceImpl getPathologyImgList(String orgId, String regId, String select) { + return medicalimgMapper.getPathologyImgList(orgId,regId,select); + } + @Override public List getmedicalimgist(String orgId, String regId,String select) { return medicalimgMapper.getmedicalimgist(orgId,regId,select); diff --git a/yudao-module-ultrasoniccom/yudao-module-ultrasoniccom-biz/src/main/resources/mapper/ultrasonic/medicalimgMapper.xml b/yudao-module-ultrasoniccom/yudao-module-ultrasoniccom-biz/src/main/resources/mapper/ultrasonic/medicalimgMapper.xml index de54f2c35..89e448b97 100644 --- a/yudao-module-ultrasoniccom/yudao-module-ultrasoniccom-biz/src/main/resources/mapper/ultrasonic/medicalimgMapper.xml +++ b/yudao-module-ultrasoniccom/yudao-module-ultrasoniccom-biz/src/main/resources/mapper/ultrasonic/medicalimgMapper.xml @@ -9,6 +9,25 @@ 文档可见:https://www.iocoder.cn/MyBatis/x-plugins/ --> + +