From 6660a18755b8498b4685dc9d53c39ea6b0474ba5 Mon Sep 17 00:00:00 2001 From: lxd <1004405501@qq.com> Date: Wed, 10 Jul 2024 17:36:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9Eorg=E8=A1=A8=E7=9A=84?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E5=86=85=E5=AE=B9=20=20=E5=9C=A8Patientexaml?= =?UTF-8?q?istController=20=20=E6=96=B0=E5=A2=9E=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E5=88=B0org=E8=A1=A8=E7=9A=84=E4=B8=8A=E7=BA=A7=E6=9C=BA?= =?UTF-8?q?=E6=9E=84ID=20=E6=9B=B4=E6=96=B0=E5=88=B0=E6=A3=80=E6=9F=A5?= =?UTF-8?q?=E8=A1=A8=20=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PatientexamlistController.java | 38 ++++++++++ .../vo/PatientexamlistRespVO.java | 23 +++--- .../patientexamlist/PatientexamlistDO.java | 22 +++--- .../PatientexamlistMapper.java | 4 +- .../yudao/module/tblist/dal/orgDo/OrgDO.java | 70 +++++++++++++++++++ .../tblist/dal/orgMapper/OrgMapper.java | 20 ++++++ .../patientexamlist/org/OrgService.java | 14 ++++ .../patientexamlist/org/OrgServiceImpl.java | 22 ++++++ .../mapper/patientexamlist/OrgMapper.xml | 14 ++++ .../patientexamlist/PatientexamlistMapper.xml | 1 - 10 files changed, 202 insertions(+), 26 deletions(-) create mode 100644 yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/dal/orgDo/OrgDO.java create mode 100644 yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/dal/orgMapper/OrgMapper.java create mode 100644 yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/service/patientexamlist/org/OrgService.java create mode 100644 yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/service/patientexamlist/org/OrgServiceImpl.java create mode 100644 yudao-module-tblist/yudao-module-tblist-biz/src/main/resources/mapper/patientexamlist/OrgMapper.xml 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 e39bdb382..43d397c72 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 @@ -1,5 +1,8 @@ package cn.iocoder.yudao.module.tblist.controller.admin.patientexamlist; +import cn.iocoder.yudao.module.tblist.service.patientexamlist.org.OrgService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.web.bind.annotation.*; import org.springframework.validation.annotation.Validated; @@ -9,6 +12,9 @@ import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Operation; +import java.text.SimpleDateFormat; +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; import java.util.*; import java.io.IOException; @@ -37,9 +43,14 @@ import javax.validation.Valid; @Validated public class PatientexamlistController { + private static final Logger log = LoggerFactory.getLogger(PatientexamlistController.class); @Resource private PatientexamlistService patientexamlistService; + + @Resource + private OrgService OrgService; + @PostMapping("/create") @Operation(summary = "创建PACS检查列表") @PreAuthorize("@ss.hasPermission('tblist:patientexamlist:create')") @@ -94,4 +105,31 @@ public class PatientexamlistController { BeanUtils.toBean(list, PatientexamlistRespVO.class)); } + + @GetMapping("/UPDATEHigOrg") + @Operation(summary = "获取到org表的上级机构ID 更新到检查表") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @Parameter(name = "orgId", description = "机构编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('tblist:patientexamlist:query')") + public void UPDATEHigOrg(@RequestParam("id") String id,@RequestParam("orgId") String orgId) { + + //先拿orgid查询出来对应的org表的上级机构代码 + String hiorgid= OrgService.GetOrgHiORGId(orgId); + log.debug("查询出来对应的org表的上级机构代码"+hiorgid); + if (!hiorgid.isEmpty()) + { + PatientexamlistSaveReqVO updateReqVO=new PatientexamlistSaveReqVO(); + updateReqVO.setId(id); + updateReqVO.setHighLevelOrgId(hiorgid); + updateReqVO.setReportstatus("已申请"); + 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); + } + + } + + + + } \ No newline at end of file diff --git a/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/controller/admin/patientexamlist/vo/PatientexamlistRespVO.java b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/controller/admin/patientexamlist/vo/PatientexamlistRespVO.java index 125aed557..7d7d1fb79 100644 --- a/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/controller/admin/patientexamlist/vo/PatientexamlistRespVO.java +++ b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/controller/admin/patientexamlist/vo/PatientexamlistRespVO.java @@ -14,11 +14,10 @@ import com.alibaba.excel.annotation.*; public class PatientexamlistRespVO { @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "23598") - @ExcelProperty("主键") private String id; @Schema(description = "检查ID:体检编号、住院号、门诊号等", example = "26467") - @ExcelProperty("检查ID:体检编号、住院号、门诊号等") + @ExcelProperty("检查ID") private String examId; @Schema(description = "患者姓名", example = "赵六") @@ -34,15 +33,15 @@ public class PatientexamlistRespVO { private Date birthday; @Schema(description = "检查日期:年月日时分秒") - @ExcelProperty("检查日期:年月日时分秒") + @ExcelProperty("检查日期:") private LocalDateTime examDate; @Schema(description = "设备类型:CT DR MR B超 彩超等", example = "2") - @ExcelProperty("设备类型:CT DR MR B超 彩超等") + @ExcelProperty("设备类型") private String deviceType; @Schema(description = "seri_dicomCount:序列数量/dicom数量") - @ExcelProperty("seri_dicomCount:序列数量/dicom数量") + @ExcelProperty("se/Im") private String seDc; @Schema(description = "检查项目名称", example = "张三") @@ -54,11 +53,11 @@ public class PatientexamlistRespVO { private String reportstatus; @Schema(description = "申请日期:年月日时分秒") - @ExcelProperty("申请日期:年月日时分秒") + @ExcelProperty("申请日期") private LocalDateTime applicationDate; @Schema(description = "dicom文件上传时间") - @ExcelProperty("dicom文件上传时间") + @ExcelProperty("上传时间") private LocalDateTime uploadDate; @Schema(description = "机构名称", example = "芋艿") @@ -70,11 +69,11 @@ public class PatientexamlistRespVO { private String orgId; @Schema(description = "上级判读机构id列表:orgid1,orgid2,orgid3", example = "26015") - @ExcelProperty("上级判读机构id列表:orgid1,orgid2,orgid3") + @ExcelProperty("上级判读机构id") private String highLevelOrgId; @Schema(description = "创建时间:年月日时分秒") - @ExcelProperty("创建时间:年月日时分秒") + @ExcelProperty("创建时间") private LocalDateTime createDate; @Schema(description = "检查所见", example = "随便") @@ -86,7 +85,7 @@ public class PatientexamlistRespVO { private String diagResults; @Schema(description = "下诊断结论的时间:年月日时分秒") - @ExcelProperty("下诊断结论的时间:年月日时分秒") + @ExcelProperty("下诊断结论的时间") private LocalDateTime diagDate; @Schema(description = "诊断医生") @@ -98,15 +97,13 @@ public class PatientexamlistRespVO { private String reviewDoctor; @Schema(description = "审核日期:年月日时分秒") - @ExcelProperty("审核日期:年月日时分秒") + @ExcelProperty("审核日期") private LocalDateTime reviewDate; @Schema(description = "缩略图oss url, httP:oss url", example = "https://www.iocoder.cn") - @ExcelProperty("缩略图oss url, httP:oss url") private String thumbnailImgUrl; @Schema(description = "框架需要:创建时间") - @ExcelProperty("框架需要:创建时间") private LocalDateTime createTime; } \ No newline at end of file diff --git a/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/dal/dataobject/patientexamlist/PatientexamlistDO.java b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/dal/dataobject/patientexamlist/PatientexamlistDO.java index f5dee51b3..d30be4dc1 100644 --- a/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/dal/dataobject/patientexamlist/PatientexamlistDO.java +++ b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/dal/dataobject/patientexamlist/PatientexamlistDO.java @@ -35,7 +35,7 @@ public class PatientexamlistDO extends BaseDO { @TableId(type = IdType.INPUT) private String id; /** - * 检查ID:体检编号、住院号、门诊号等 + * 检查ID */ @TableField("examId") private String examId; @@ -56,17 +56,17 @@ public class PatientexamlistDO extends BaseDO { @TableField("birthday") private Date birthday; /** - * 检查日期:年月日时分秒 + * 检查日期 */ @TableField("examDate") private LocalDateTime examDate; /** - * 设备类型:CT DR MR B超 彩超等 + * 设备类型 */ @TableField("deviceType") private String deviceType; /** - * seri_dicomCount:序列数量/dicom数量 + * se/Im */ @TableField("se_Dc") private String seDc; @@ -81,12 +81,12 @@ public class PatientexamlistDO extends BaseDO { @TableField(value = "reportstatus") private String reportstatus; /** - * 申请日期:年月日时分秒 + * 申请日期 */ @TableField(value = "applicationDate") private LocalDateTime applicationDate; /** - * dicom文件上传时间 + * 上传时间 */ @TableField(value = "uploadDate") private LocalDateTime uploadDate; @@ -101,12 +101,12 @@ public class PatientexamlistDO extends BaseDO { @TableField(value = "orgId") private String orgId; /** - * 上级判读机构id列表:orgid1,orgid2,orgid3 + * 上级机构id */ @TableField(value = "highLevelOrgId") private String highLevelOrgId; /** - * 创建时间:年月日时分秒 + * 创建时间 */ @TableField(value = "createDate") private LocalDateTime createDate; @@ -121,7 +121,7 @@ public class PatientexamlistDO extends BaseDO { @TableField(value = "diagResults") private String diagResults; /** - * 下诊断结论的时间:年月日时分秒 + * 下诊断结论的时间 */ @TableField(value = "diagDate") private LocalDateTime diagDate; @@ -136,12 +136,12 @@ public class PatientexamlistDO extends BaseDO { @TableField(value = "reviewDoctor") private String reviewDoctor; /** - * 审核日期:年月日时分秒 + * 审核日期 */ @TableField(value = "reviewDate") private LocalDateTime reviewDate; /** - * 缩略图oss url, httP:oss url + * 缩略图 */ @TableField(value = "thumbnailImgUrl") private String thumbnailImgUrl; diff --git a/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/dal/mysql/patientexamlist/PatientexamlistMapper.java b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/dal/mysql/patientexamlist/PatientexamlistMapper.java index 0dfd759a1..8b0c63190 100644 --- a/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/dal/mysql/patientexamlist/PatientexamlistMapper.java +++ b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/dal/mysql/patientexamlist/PatientexamlistMapper.java @@ -32,7 +32,7 @@ public interface PatientexamlistMapper extends BaseMapperX { .betweenIfPresent(PatientexamlistDO::getUploadDate, reqVO.getUploadDate()) .likeIfPresent(PatientexamlistDO::getOrgName, reqVO.getOrgName()) .eqIfPresent(PatientexamlistDO::getOrgId, reqVO.getOrgId()) - .eqIfPresent(PatientexamlistDO::getHighLevelOrgId, reqVO.getHighLevelOrgId()) + // .eqIfPresent(PatientexamlistDO::getHighLevelOrgId, reqVO.getHighLevelOrgId()) .betweenIfPresent(PatientexamlistDO::getCreateDate, reqVO.getCreateDate()) .eqIfPresent(PatientexamlistDO::getExamDescription, reqVO.getExamDescription()) .eqIfPresent(PatientexamlistDO::getDiagResults, reqVO.getDiagResults()) @@ -42,7 +42,9 @@ public interface PatientexamlistMapper extends BaseMapperX { .betweenIfPresent(PatientexamlistDO::getReviewDate, reqVO.getReviewDate()) .eqIfPresent(PatientexamlistDO::getThumbnailImgUrl, reqVO.getThumbnailImgUrl()) .betweenIfPresent(PatientexamlistDO::getCreateTime, reqVO.getCreateTime()) + .inIfPresent(PatientexamlistDO::getOrgId, reqVO.getHighLevelOrgId()) .orderByDesc(PatientexamlistDO::getId)); + } } \ No newline at end of file diff --git a/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/dal/orgDo/OrgDO.java b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/dal/orgDo/OrgDO.java new file mode 100644 index 000000000..6685dbb97 --- /dev/null +++ b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/dal/orgDo/OrgDO.java @@ -0,0 +1,70 @@ +package cn.iocoder.yudao.module.tblist.dal.orgDo; + +import com.baomidou.mybatisplus.annotation.*; +import lombok.*; + +import java.time.LocalDateTime; +import java.util.Date; + +/** + * 机构表 DO + * + * @author 李晓东 + */ +@TableName("tb_org") +@Data +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class OrgDO { + + /** + * 主键 机构ID + */ + @TableId(type = IdType.INPUT) + private String orgID; + /** + * 机构名称 + */ + @TableField("orgName") + private String orgName; + /** + * 机构地址 + */ + @TableField("address") + private String address; + /** + * + * 联系电话 + */ + @TableField("contactTel") + private String contactTel; + /** + * 报告上显示的名称:一般跟机构名称一致 + */ + @TableField("reportName") + private String reportName; + /** + * 上级判读医院机构ID + */ + @TableField("highLevelOrgID") + private String highLevelOrgID; + /** + * 能收到微信消息提醒的微信列表,格式为:wxopenid1,wxopenid2,wxopenid3 + */ + @TableField("wx_openIdList") + private String wx_openIdList; + /** + * 机构编号:通常为一个4位数的短号 用于与其他系统的对接之用 + */ + @TableField("orgSN") + private String orgSN; + /** + * 创建时间:年月日时分秒 + */ + @TableField("datetime") + private Date datetime; + + +} \ No newline at end of file diff --git a/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/dal/orgMapper/OrgMapper.java b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/dal/orgMapper/OrgMapper.java new file mode 100644 index 000000000..1cc7db8ef --- /dev/null +++ b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/dal/orgMapper/OrgMapper.java @@ -0,0 +1,20 @@ +package cn.iocoder.yudao.module.tblist.dal.orgMapper; + +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.tblist.dal.orgDo.OrgDO; +import com.baomidou.mybatisplus.annotation.*; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +@Mapper +@InterceptorIgnore(tenantLine = "true") +public interface OrgMapper extends BaseMapperX +{ + + /** + * @param orgId + * @return + */ + //获取机构表里的上级机构 + String SelectOrgHigID(@Param("orgId") String orgId); +} diff --git a/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/service/patientexamlist/org/OrgService.java b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/service/patientexamlist/org/OrgService.java new file mode 100644 index 000000000..bb829023e --- /dev/null +++ b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/service/patientexamlist/org/OrgService.java @@ -0,0 +1,14 @@ +package cn.iocoder.yudao.module.tblist.service.patientexamlist.org; + + + +import javax.validation.Valid; + +public interface OrgService { + + + /** 获取org表的上级机构 + * @param orgId + */ + String GetOrgHiORGId(@Valid String orgId); +} diff --git a/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/service/patientexamlist/org/OrgServiceImpl.java b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/service/patientexamlist/org/OrgServiceImpl.java new file mode 100644 index 000000000..571a76418 --- /dev/null +++ b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/service/patientexamlist/org/OrgServiceImpl.java @@ -0,0 +1,22 @@ +package cn.iocoder.yudao.module.tblist.service.patientexamlist.org; + +import cn.iocoder.yudao.module.tblist.dal.orgMapper.OrgMapper; +import org.springframework.stereotype.Service; + + +import javax.annotation.Resource; + +@Service +public class OrgServiceImpl implements OrgService { + + + @Resource + private OrgMapper OrgMapper; + + @Override + public String GetOrgHiORGId(String orgId) { + + + return OrgMapper.SelectOrgHigID(orgId); + } +} diff --git a/yudao-module-tblist/yudao-module-tblist-biz/src/main/resources/mapper/patientexamlist/OrgMapper.xml b/yudao-module-tblist/yudao-module-tblist-biz/src/main/resources/mapper/patientexamlist/OrgMapper.xml new file mode 100644 index 000000000..463f1c189 --- /dev/null +++ b/yudao-module-tblist/yudao-module-tblist-biz/src/main/resources/mapper/patientexamlist/OrgMapper.xml @@ -0,0 +1,14 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-module-tblist/yudao-module-tblist-biz/src/main/resources/mapper/patientexamlist/PatientexamlistMapper.xml b/yudao-module-tblist/yudao-module-tblist-biz/src/main/resources/mapper/patientexamlist/PatientexamlistMapper.xml index f1d383c54..994683fda 100644 --- a/yudao-module-tblist/yudao-module-tblist-biz/src/main/resources/mapper/patientexamlist/PatientexamlistMapper.xml +++ b/yudao-module-tblist/yudao-module-tblist-biz/src/main/resources/mapper/patientexamlist/PatientexamlistMapper.xml @@ -8,5 +8,4 @@ 代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。 文档可见:https://www.iocoder.cn/MyBatis/x-plugins/ --> - \ No newline at end of file