新增org表的相关内容 在PatientexamlistController 新增获取到org表的上级机构ID 更新到检查表 方法
Some checks are pending
Java CI with Maven / build (11) (push) Waiting to run
Java CI with Maven / build (17) (push) Waiting to run
Java CI with Maven / build (8) (push) Waiting to run
yudao-ui-admin CI / build (14.x) (push) Waiting to run
yudao-ui-admin CI / build (16.x) (push) Waiting to run

This commit is contained in:
lxd 2024-07-10 17:36:49 +08:00
parent 5720851f20
commit 6660a18755
10 changed files with 202 additions and 26 deletions

View File

@ -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);
}
}
}

View File

@ -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;
}

View File

@ -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;

View File

@ -32,7 +32,7 @@ public interface PatientexamlistMapper extends BaseMapperX<PatientexamlistDO> {
.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<PatientexamlistDO> {
.betweenIfPresent(PatientexamlistDO::getReviewDate, reqVO.getReviewDate())
.eqIfPresent(PatientexamlistDO::getThumbnailImgUrl, reqVO.getThumbnailImgUrl())
.betweenIfPresent(PatientexamlistDO::getCreateTime, reqVO.getCreateTime())
.inIfPresent(PatientexamlistDO::getOrgId, reqVO.getHighLevelOrgId())
.orderByDesc(PatientexamlistDO::getId));
}
}

View File

@ -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;
}

View File

@ -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<OrgDO>
{
/**
* @param orgId
* @return
*/
//获取机构表里的上级机构
String SelectOrgHigID(@Param("orgId") String orgId);
}

View File

@ -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);
}

View File

@ -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);
}
}

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.iocoder.yudao.module.tblist.dal.orgMapper.OrgMapper">
<!--
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
文档可见https://www.iocoder.cn/MyBatis/x-plugins/
-->
<select id="SelectOrgHigID" parameterType="String" resultType="String">
SELECT highLevelOrgID FROM tb_org WHERE orgID = #{orgId}
</select>
</mapper>

View File

@ -8,5 +8,4 @@
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
文档可见https://www.iocoder.cn/MyBatis/x-plugins/
-->
</mapper>