feat(login): 添加租户名称获取功能并优化前端布局
- 在登录控制器中注入租户服务并获取租户名称信息 - 添加租户名称到登录响应结果中 - 更新样式变量定义侧边栏宽度和Logo高度 - 重构公告面板组件统一公告通知显示逻辑 - 简化公告类型图标和样式映射关系 - 更新侧边栏为垂直菜单布局并添加折叠功能 - 优化Logo组件显示租户名称和系统标题 - 调整导航栏布局结构和响应式样式 - 重构主应用容器样式和标签页显示逻辑
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
package com.openhis.web.clinicalmanage.appservice;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.web.clinicalmanage.dto.SurgeryDto;
|
||||
|
||||
/**
|
||||
* 手术管理应用Service接口
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-12-30
|
||||
*/
|
||||
public interface ISurgeryAppService {
|
||||
|
||||
/**
|
||||
* 分页查询手术列表
|
||||
*
|
||||
* @param surgeryDto 查询条件
|
||||
* @param pageNo 当前页
|
||||
* @param pageSize 每页条数
|
||||
* @return 手术列表
|
||||
*/
|
||||
IPage<SurgeryDto> getSurgeryPage(SurgeryDto surgeryDto, Integer pageNo, Integer pageSize);
|
||||
|
||||
/**
|
||||
* 根据ID查询手术详情
|
||||
*
|
||||
* @param id 手术ID
|
||||
* @return 手术详情
|
||||
*/
|
||||
R<SurgeryDto> getSurgeryDetail(Long id);
|
||||
|
||||
/**
|
||||
* 新增手术信息
|
||||
*
|
||||
* @param surgeryDto 手术信息
|
||||
* @return 结果
|
||||
*/
|
||||
R<?> addSurgery(SurgeryDto surgeryDto);
|
||||
|
||||
/**
|
||||
* 修改手术信息
|
||||
*
|
||||
* @param surgeryDto 手术信息
|
||||
* @return 结果
|
||||
*/
|
||||
R<?> updateSurgery(SurgeryDto surgeryDto);
|
||||
|
||||
/**
|
||||
* 删除手术信息
|
||||
*
|
||||
* @param id 手术ID
|
||||
* @return 结果
|
||||
*/
|
||||
R<?> deleteSurgery(Long id);
|
||||
|
||||
/**
|
||||
* 更新手术状态
|
||||
*
|
||||
* @param id 手术ID
|
||||
* @param statusEnum 状态
|
||||
* @return 结果
|
||||
*/
|
||||
R<?> updateSurgeryStatus(Long id, Integer statusEnum);
|
||||
}
|
||||
@@ -0,0 +1,166 @@
|
||||
package com.openhis.web.clinicalmanage.appservice.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.core.common.core.domain.R;
|
||||
import com.core.common.utils.MessageUtils;
|
||||
import com.openhis.administration.domain.Patient;
|
||||
import com.openhis.administration.service.IPatientService;
|
||||
import com.openhis.common.constant.PromptMsgConstant;
|
||||
import com.openhis.clinical.domain.Surgery;
|
||||
import com.openhis.clinical.service.ISurgeryService;
|
||||
import com.openhis.common.utils.HisQueryUtils;
|
||||
import com.openhis.web.clinicalmanage.appservice.ISurgeryAppService;
|
||||
import com.openhis.web.clinicalmanage.dto.SurgeryDto;
|
||||
import com.openhis.web.clinicalmanage.mapper.SurgeryAppMapper;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Date;
|
||||
import java.util.HashSet;
|
||||
|
||||
/**
|
||||
* 手术管理应用Service业务层处理
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-12-30
|
||||
*/
|
||||
@Service
|
||||
public class SurgeryAppServiceImpl implements ISurgeryAppService {
|
||||
|
||||
@Resource
|
||||
private SurgeryAppMapper surgeryAppMapper;
|
||||
|
||||
@Resource
|
||||
private ISurgeryService surgeryService;
|
||||
|
||||
@Resource
|
||||
private IPatientService patientService;
|
||||
|
||||
/**
|
||||
* 分页查询手术列表
|
||||
*
|
||||
* @param surgeryDto 查询条件
|
||||
* @param pageNo 当前页
|
||||
* @param pageSize 每页条数
|
||||
* @return 手术列表
|
||||
*/
|
||||
@Override
|
||||
public IPage<SurgeryDto> getSurgeryPage(SurgeryDto surgeryDto, Integer pageNo, Integer pageSize) {
|
||||
QueryWrapper<SurgeryDto> queryWrapper = HisQueryUtils.buildQueryWrapper(surgeryDto, null,
|
||||
new HashSet<String>() {{
|
||||
add("surgery_no");
|
||||
add("surgery_name");
|
||||
add("patient_name");
|
||||
add("main_surgeon_name");
|
||||
add("anesthetist_name");
|
||||
add("org_name");
|
||||
}}, null);
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
return surgeryAppMapper.getSurgeryPage(new Page<>(pageNo, pageSize), queryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据ID查询手术详情
|
||||
*
|
||||
* @param id 手术ID
|
||||
* @return 手术详情
|
||||
*/
|
||||
@Override
|
||||
public R<SurgeryDto> getSurgeryDetail(Long id) {
|
||||
SurgeryDto surgeryDto = surgeryAppMapper.getSurgeryDetail(id);
|
||||
if (surgeryDto == null) {
|
||||
return R.fail("手术信息不存在");
|
||||
}
|
||||
return R.ok(surgeryDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增手术信息
|
||||
*
|
||||
* @param surgeryDto 手术信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public R<?> addSurgery(SurgeryDto surgeryDto) {
|
||||
// 校验患者是否存在
|
||||
Patient patient = patientService.getById(surgeryDto.getPatientId());
|
||||
if (patient == null) {
|
||||
return R.fail("患者信息不存在");
|
||||
}
|
||||
|
||||
// 转换为实体对象
|
||||
Surgery surgery = new Surgery();
|
||||
BeanUtils.copyProperties(surgeryDto, surgery);
|
||||
|
||||
Long surgeryId = surgeryService.insertSurgery(surgery);
|
||||
return R.ok(surgeryId, MessageUtils.createMessage(PromptMsgConstant.Common.M00001, new Object[]{"手术信息"}));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改手术信息
|
||||
*
|
||||
* @param surgeryDto 手术信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public R<?> updateSurgery(SurgeryDto surgeryDto) {
|
||||
// 校验手术是否存在
|
||||
Surgery existSurgery = surgeryService.getById(surgeryDto.getId());
|
||||
if (existSurgery == null) {
|
||||
return R.fail("手术信息不存在");
|
||||
}
|
||||
|
||||
// 转换为实体对象
|
||||
Surgery surgery = new Surgery();
|
||||
BeanUtils.copyProperties(surgeryDto, surgery);
|
||||
|
||||
surgeryService.updateSurgery(surgery);
|
||||
return R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[]{"手术信息"}));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除手术信息
|
||||
*
|
||||
* @param id 手术ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public R<?> deleteSurgery(Long id) {
|
||||
// 校验手术是否存在
|
||||
Surgery existSurgery = surgeryService.getById(id);
|
||||
if (existSurgery == null) {
|
||||
return R.fail("手术信息不存在");
|
||||
}
|
||||
|
||||
// 已完成的手术不能删除
|
||||
if (existSurgery.getStatusEnum() == 3) {
|
||||
return R.fail("已完成的手术不能删除");
|
||||
}
|
||||
|
||||
surgeryService.deleteSurgery(id);
|
||||
return R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00005, new Object[]{"手术信息"}));
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新手术状态
|
||||
*
|
||||
* @param id 手术ID
|
||||
* @param statusEnum 状态
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public R<?> updateSurgeryStatus(Long id, Integer statusEnum) {
|
||||
// 校验手术是否存在
|
||||
Surgery existSurgery = surgeryService.getById(id);
|
||||
if (existSurgery == null) {
|
||||
return R.fail("手术信息不存在");
|
||||
}
|
||||
|
||||
surgeryService.updateSurgeryStatus(id, statusEnum);
|
||||
return R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00004, new Object[]{"手术状态"}));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
package com.openhis.web.clinicalmanage.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.web.clinicalmanage.appservice.ISurgeryAppService;
|
||||
import com.openhis.web.clinicalmanage.dto.SurgeryDto;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* 手术管理Controller业务层处理
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-12-30
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/clinical-manage/surgery")
|
||||
@Slf4j
|
||||
@AllArgsConstructor
|
||||
public class SurgeryController {
|
||||
|
||||
private final ISurgeryAppService surgeryAppService;
|
||||
|
||||
/**
|
||||
* 分页查询手术列表
|
||||
*
|
||||
* @param surgeryDto 查询条件
|
||||
* @param pageNo 当前页
|
||||
* @param pageSize 每页条数
|
||||
* @return 手术列表
|
||||
*/
|
||||
@GetMapping(value = "/surgery-page")
|
||||
public R<IPage<SurgeryDto>> getSurgeryPage(SurgeryDto surgeryDto,
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
IPage<SurgeryDto> page = surgeryAppService.getSurgeryPage(surgeryDto, pageNo, pageSize);
|
||||
return R.ok(page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据ID查询手术详情
|
||||
*
|
||||
* @param id 手术ID
|
||||
* @return 手术详情
|
||||
*/
|
||||
@GetMapping(value = "/surgery-detail")
|
||||
public R<SurgeryDto> getSurgeryDetail(@RequestParam Long id) {
|
||||
return surgeryAppService.getSurgeryDetail(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增手术信息
|
||||
*
|
||||
* @param surgeryDto 手术信息
|
||||
* @return 结果
|
||||
*/
|
||||
@PostMapping(value = "/surgery")
|
||||
public R<?> addSurgery(@RequestBody SurgeryDto surgeryDto) {
|
||||
return surgeryAppService.addSurgery(surgeryDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改手术信息
|
||||
*
|
||||
* @param surgeryDto 手术信息
|
||||
* @return 结果
|
||||
*/
|
||||
@PutMapping(value = "/surgery")
|
||||
public R<?> updateSurgery(@RequestBody SurgeryDto surgeryDto) {
|
||||
return surgeryAppService.updateSurgery(surgeryDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除手术信息
|
||||
*
|
||||
* @param id 手术ID
|
||||
* @return 结果
|
||||
*/
|
||||
@DeleteMapping(value = "/surgery")
|
||||
public R<?> deleteSurgery(@RequestParam Long id) {
|
||||
return surgeryAppService.deleteSurgery(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新手术状态
|
||||
*
|
||||
* @param id 手术ID
|
||||
* @param statusEnum 状态
|
||||
* @return 结果
|
||||
*/
|
||||
@PutMapping(value = "/surgery-status")
|
||||
public R<?> updateSurgeryStatus(@RequestParam Long id, @RequestParam Integer statusEnum) {
|
||||
return surgeryAppService.updateSurgeryStatus(id, statusEnum);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,175 @@
|
||||
package com.openhis.web.clinicalmanage.dto;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.openhis.common.annotation.Dict;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 手术管理DTO
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class SurgeryDto {
|
||||
|
||||
/** ID */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
/** 手术编号 */
|
||||
private String surgeryNo;
|
||||
|
||||
/** 患者ID */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long patientId;
|
||||
|
||||
/** 患者姓名 */
|
||||
private String patientName;
|
||||
|
||||
/** 患者性别 */
|
||||
private String patientGender;
|
||||
|
||||
/** 患者年龄 */
|
||||
private String patientAge;
|
||||
|
||||
/** 就诊ID */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long encounterId;
|
||||
|
||||
/** 就诊流水号 */
|
||||
private String encounterNo;
|
||||
|
||||
/** 手术名称 */
|
||||
private String surgeryName;
|
||||
|
||||
/** 手术编码 */
|
||||
private String surgeryCode;
|
||||
|
||||
/** 手术类型编码 */
|
||||
@Dict(dictCode = "surgery_type")
|
||||
private Integer surgeryTypeEnum;
|
||||
private String surgeryTypeEnum_dictText;
|
||||
|
||||
/** 手术等级 */
|
||||
@Dict(dictCode = "surgery_level")
|
||||
private Integer surgeryLevel;
|
||||
private String surgeryLevel_dictText;
|
||||
|
||||
/** 手术状态 */
|
||||
@Dict(dictCode = "surgery_status")
|
||||
private Integer statusEnum;
|
||||
private String statusEnum_dictText;
|
||||
|
||||
/** 计划手术时间 */
|
||||
private Date plannedTime;
|
||||
|
||||
/** 实际开始时间 */
|
||||
private Date actualStartTime;
|
||||
|
||||
/** 实际结束时间 */
|
||||
private Date actualEndTime;
|
||||
|
||||
/** 主刀医生ID */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long mainSurgeonId;
|
||||
|
||||
/** 主刀医生姓名 */
|
||||
private String mainSurgeonName;
|
||||
|
||||
/** 助手1 ID */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long assistant1Id;
|
||||
|
||||
/** 助手1 姓名 */
|
||||
private String assistant1Name;
|
||||
|
||||
/** 助手2 ID */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long assistant2Id;
|
||||
|
||||
/** 助手2 姓名 */
|
||||
private String assistant2Name;
|
||||
|
||||
/** 麻醉医生ID */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long anesthetistId;
|
||||
|
||||
/** 麻醉医生姓名 */
|
||||
private String anesthetistName;
|
||||
|
||||
/** 巡回护士ID */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long scrubNurseId;
|
||||
|
||||
/** 巡回护士姓名 */
|
||||
private String scrubNurseName;
|
||||
|
||||
/** 麻醉方式编码 */
|
||||
@Dict(dictCode = "anesthesia_type")
|
||||
private Integer anesthesiaTypeEnum;
|
||||
private String anesthesiaTypeEnum_dictText;
|
||||
|
||||
/** 手术部位 */
|
||||
private String bodySite;
|
||||
|
||||
/** 手术切口等级 */
|
||||
@Dict(dictCode = "incision_level")
|
||||
private Integer incisionLevel;
|
||||
private String incisionLevel_dictText;
|
||||
|
||||
/** 手术切口愈合等级 */
|
||||
@Dict(dictCode = "healing_level")
|
||||
private Integer healingLevel;
|
||||
private String healingLevel_dictText;
|
||||
|
||||
/** 手术室 */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long operatingRoomId;
|
||||
|
||||
/** 手术室名称 */
|
||||
private String operatingRoomName;
|
||||
|
||||
/** 执行科室ID */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long orgId;
|
||||
|
||||
/** 执行科室名称 */
|
||||
private String orgName;
|
||||
|
||||
/** 术前诊断 */
|
||||
private String preoperativeDiagnosis;
|
||||
|
||||
/** 术后诊断 */
|
||||
private String postoperativeDiagnosis;
|
||||
|
||||
/** 手术经过描述 */
|
||||
private String surgeryDescription;
|
||||
|
||||
/** 术后医嘱 */
|
||||
private String postoperativeAdvice;
|
||||
|
||||
/** 并发症描述 */
|
||||
private String complications;
|
||||
|
||||
/** 手术费用 */
|
||||
private BigDecimal surgeryFee;
|
||||
|
||||
/** 麻醉费用 */
|
||||
private BigDecimal anesthesiaFee;
|
||||
|
||||
/** 总费用 */
|
||||
private BigDecimal totalFee;
|
||||
|
||||
/** 备注信息 */
|
||||
private String remark;
|
||||
|
||||
/** 创建时间 */
|
||||
private Date createTime;
|
||||
|
||||
/** 更新时间 */
|
||||
private Date updateTime;
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.openhis.web.clinicalmanage.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.openhis.web.clinicalmanage.dto.SurgeryDto;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* 手术管理应用Mapper
|
||||
*/
|
||||
@Repository
|
||||
public interface SurgeryAppMapper {
|
||||
|
||||
/**
|
||||
* 分页查询手术列表
|
||||
*
|
||||
* @param page 分页参数
|
||||
* @param queryWrapper 查询条件
|
||||
* @return 手术列表
|
||||
*/
|
||||
IPage<SurgeryDto> getSurgeryPage(@Param("page") Page<SurgeryDto> page,
|
||||
@Param(Constants.WRAPPER) QueryWrapper<SurgeryDto> queryWrapper);
|
||||
|
||||
/**
|
||||
* 根据ID查询手术详情
|
||||
*
|
||||
* @param id 手术ID
|
||||
* @return 手术详情
|
||||
*/
|
||||
SurgeryDto getSurgeryDetail(@Param("id") Long id);
|
||||
}
|
||||
@@ -6,7 +6,7 @@ spring:
|
||||
druid:
|
||||
# 主库数据源
|
||||
master:
|
||||
url: jdbc:postgresql://47.116.196.11:15432/postgresql?currentSchema=hisdev&characterEncoding=UTF-8&client_encoding=UTF-8
|
||||
url: jdbc:postgresql://192.168.110.252:15432/postgresql?currentSchema=hisdev&characterEncoding=UTF-8&client_encoding=UTF-8
|
||||
username: postgresql
|
||||
password: Jchl1528
|
||||
# 从库数据源
|
||||
@@ -64,9 +64,9 @@ spring:
|
||||
# redis 配置
|
||||
redis:
|
||||
# 地址
|
||||
host: 47.116.196.11
|
||||
host: 192.168.110.252
|
||||
# 端口,默认为6379
|
||||
port: 26379
|
||||
port: 6379
|
||||
# 数据库索引
|
||||
database: 1
|
||||
# 密码
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
<?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="com.openhis.clinical.mapper.SurgeryMapper">
|
||||
|
||||
<resultMap type="com.openhis.clinical.domain.Surgery" id="SurgeryResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="surgeryNo" column="surgery_no" />
|
||||
<result property="patientId" column="patient_id" />
|
||||
<result property="patientName" column="patient_name" />
|
||||
<result property="encounterId" column="encounter_id" />
|
||||
<result property="surgeryName" column="surgery_name" />
|
||||
<result property="surgeryCode" column="surgery_code" />
|
||||
<result property="surgeryTypeEnum" column="surgery_type_enum" />
|
||||
<result property="surgeryLevel" column="surgery_level" />
|
||||
<result property="statusEnum" column="status_enum" />
|
||||
<result property="plannedTime" column="planned_time" />
|
||||
<result property="actualStartTime" column="actual_start_time" />
|
||||
<result property="actualEndTime" column="actual_end_time" />
|
||||
<result property="mainSurgeonId" column="main_surgeon_id" />
|
||||
<result property="mainSurgeonName" column="main_surgeon_name" />
|
||||
<result property="assistant1Id" column="assistant_1_id" />
|
||||
<result property="assistant1Name" column="assistant_1_name" />
|
||||
<result property="assistant2Id" column="assistant_2_id" />
|
||||
<result property="assistant2Name" column="assistant_2_name" />
|
||||
<result property="anesthetistId" column="anesthetist_id" />
|
||||
<result property="anesthetistName" column="anesthetist_name" />
|
||||
<result property="scrubNurseId" column="scrub_nurse_id" />
|
||||
<result property="scrubNurseName" column="scrub_nurse_name" />
|
||||
<result property="anesthesiaTypeEnum" column="anesthesia_type_enum" />
|
||||
<result property="bodySite" column="body_site" />
|
||||
<result property="incisionLevel" column="incision_level" />
|
||||
<result property="healingLevel" column="healing_level" />
|
||||
<result property="operatingRoomId" column="operating_room_id" />
|
||||
<result property="operatingRoomName" column="operating_room_name" />
|
||||
<result property="orgId" column="org_id" />
|
||||
<result property="orgName" column="org_name" />
|
||||
<result property="preoperativeDiagnosis" column="preoperative_diagnosis" />
|
||||
<result property="postoperativeDiagnosis" column="postoperative_diagnosis" />
|
||||
<result property="surgeryDescription" column="surgery_description" />
|
||||
<result property="postoperativeAdvice" column="postoperative_advice" />
|
||||
<result property="complications" column="complications" />
|
||||
<result property="surgeryFee" column="surgery_fee" />
|
||||
<result property="anesthesiaFee" column="anesthesia_fee" />
|
||||
<result property="totalFee" column="total_fee" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="deleteFlag" column="delete_flag" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSurgeryVo">
|
||||
SELECT
|
||||
id, surgery_no, patient_id, patient_name, encounter_id, surgery_name, surgery_code,
|
||||
surgery_type_enum, surgery_level, status_enum, planned_time, actual_start_time, actual_end_time,
|
||||
main_surgeon_id, main_surgeon_name, assistant_1_id, assistant_1_name, assistant_2_id, assistant_2_name,
|
||||
anesthetist_id, anesthetist_name, scrub_nurse_id, scrub_nurse_name, anesthesia_type_enum,
|
||||
body_site, incision_level, healing_level, operating_room_id, operating_room_name,
|
||||
org_id, org_name, preoperative_diagnosis, postoperative_diagnosis, surgery_description,
|
||||
postoperative_advice, complications, surgery_fee, anesthesia_fee, total_fee, remark,
|
||||
create_by, create_time, update_by, update_time, delete_flag
|
||||
FROM cli_surgery
|
||||
</sql>
|
||||
|
||||
<select id="selectByPatientId" parameterType="Long" resultMap="SurgeryResult">
|
||||
<include refid="selectSurgeryVo"/>
|
||||
WHERE patient_id = #{patientId} AND delete_flag = '0'
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="selectByEncounterId" parameterType="Long" resultMap="SurgeryResult">
|
||||
<include refid="selectSurgeryVo"/>
|
||||
WHERE encounter_id = #{encounterId} AND delete_flag = '0'
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="selectBySurgeryNo" parameterType="String" resultMap="SurgeryResult">
|
||||
<include refid="selectSurgeryVo"/>
|
||||
WHERE surgery_no = #{surgeryNo} AND delete_flag = '0'
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,135 @@
|
||||
<?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="com.openhis.web.clinicalmanage.mapper.SurgeryAppMapper">
|
||||
|
||||
<resultMap type="com.openhis.web.clinicalmanage.dto.SurgeryDto" id="SurgeryResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="surgeryNo" column="surgery_no" />
|
||||
<result property="patientId" column="patient_id" />
|
||||
<result property="patientName" column="patient_name" />
|
||||
<result property="patientGender" column="patient_gender" />
|
||||
<result property="patientAge" column="patient_age" />
|
||||
<result property="encounterId" column="encounter_id" />
|
||||
<result property="encounterNo" column="encounter_no" />
|
||||
<result property="surgeryName" column="surgery_name" />
|
||||
<result property="surgeryCode" column="surgery_code" />
|
||||
<result property="surgeryTypeEnum" column="surgery_type_enum" />
|
||||
<result property="surgeryTypeEnum_dictText" column="surgery_type_enum_dictText" />
|
||||
<result property="surgeryLevel" column="surgery_level" />
|
||||
<result property="surgeryLevel_dictText" column="surgery_level_dictText" />
|
||||
<result property="statusEnum" column="status_enum" />
|
||||
<result property="statusEnum_dictText" column="status_enum_dictText" />
|
||||
<result property="plannedTime" column="planned_time" />
|
||||
<result property="actualStartTime" column="actual_start_time" />
|
||||
<result property="actualEndTime" column="actual_end_time" />
|
||||
<result property="mainSurgeonId" column="main_surgeon_id" />
|
||||
<result property="mainSurgeonName" column="main_surgeon_name" />
|
||||
<result property="assistant1Id" column="assistant_1_id" />
|
||||
<result property="assistant1Name" column="assistant_1_name" />
|
||||
<result property="assistant2Id" column="assistant_2_id" />
|
||||
<result property="assistant2Name" column="assistant_2_name" />
|
||||
<result property="anesthetistId" column="anesthetist_id" />
|
||||
<result property="anesthetistName" column="anesthetist_name" />
|
||||
<result property="scrubNurseId" column="scrub_nurse_id" />
|
||||
<result property="scrubNurseName" column="scrub_nurse_name" />
|
||||
<result property="anesthesiaTypeEnum" column="anesthesia_type_enum" />
|
||||
<result property="anesthesiaTypeEnum_dictText" column="anesthesia_type_enum_dictText" />
|
||||
<result property="bodySite" column="body_site" />
|
||||
<result property="incisionLevel" column="incision_level" />
|
||||
<result property="incisionLevel_dictText" column="incision_level_dictText" />
|
||||
<result property="healingLevel" column="healing_level" />
|
||||
<result property="healingLevel_dictText" column="healing_level_dictText" />
|
||||
<result property="operatingRoomId" column="operating_room_id" />
|
||||
<result property="operatingRoomName" column="operating_room_name" />
|
||||
<result property="orgId" column="org_id" />
|
||||
<result property="orgName" column="org_name" />
|
||||
<result property="preoperativeDiagnosis" column="preoperative_diagnosis" />
|
||||
<result property="postoperativeDiagnosis" column="postoperative_diagnosis" />
|
||||
<result property="surgeryDescription" column="surgery_description" />
|
||||
<result property="postoperativeAdvice" column="postoperative_advice" />
|
||||
<result property="complications" column="complications" />
|
||||
<result property="surgeryFee" column="surgery_fee" />
|
||||
<result property="anesthesiaFee" column="anesthesia_fee" />
|
||||
<result property="totalFee" column="total_fee" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSurgeryVo">
|
||||
SELECT
|
||||
s.id,
|
||||
s.surgery_no,
|
||||
s.patient_id,
|
||||
p.name as patient_name,
|
||||
CASE p.gender_enum WHEN 1 THEN '男' WHEN 2 THEN '女' ELSE '未知' END as patient_gender,
|
||||
EXTRACT(YEAR FROM AGE(p.birth_date)) as patient_age,
|
||||
s.encounter_id,
|
||||
e.bus_no as encounter_no,
|
||||
s.surgery_name,
|
||||
s.surgery_code,
|
||||
s.surgery_type_enum,
|
||||
s.surgery_type_enum as surgery_type_enum_dictText,
|
||||
s.surgery_level,
|
||||
s.surgery_level as surgery_level_dictText,
|
||||
s.status_enum,
|
||||
s.status_enum as status_enum_dictText,
|
||||
s.planned_time,
|
||||
s.actual_start_time,
|
||||
s.actual_end_time,
|
||||
s.main_surgeon_id,
|
||||
s.main_surgeon_name,
|
||||
s.assistant_1_id,
|
||||
s.assistant_1_name,
|
||||
s.assistant_2_id,
|
||||
s.assistant_2_name,
|
||||
s.anesthetist_id,
|
||||
s.anesthetist_name,
|
||||
s.scrub_nurse_id,
|
||||
s.scrub_nurse_name,
|
||||
s.anesthesia_type_enum,
|
||||
s.anesthesia_type_enum as anesthesia_type_enum_dictText,
|
||||
s.body_site,
|
||||
s.incision_level,
|
||||
s.incision_level as incision_level_dictText,
|
||||
s.healing_level,
|
||||
s.healing_level as healing_level_dictText,
|
||||
s.operating_room_id,
|
||||
s.operating_room_name,
|
||||
s.org_id,
|
||||
o.name as org_name,
|
||||
s.preoperative_diagnosis,
|
||||
s.postoperative_diagnosis,
|
||||
s.surgery_description,
|
||||
s.postoperative_advice,
|
||||
s.complications,
|
||||
s.surgery_fee,
|
||||
s.anesthesia_fee,
|
||||
s.total_fee,
|
||||
s.remark,
|
||||
s.create_time,
|
||||
s.update_time
|
||||
FROM cli_surgery s
|
||||
LEFT JOIN adm_patient p ON s.patient_id = p.id
|
||||
LEFT JOIN adm_encounter e ON s.encounter_id = e.id
|
||||
LEFT JOIN adm_organization o ON s.org_id = o.id
|
||||
</sql>
|
||||
|
||||
<select id="getSurgeryPage" parameterType="com.baomidou.mybatisplus.core.conditions.query.QueryWrapper" resultMap="SurgeryResult">
|
||||
<include refid="selectSurgeryVo"/>
|
||||
<where>
|
||||
s.delete_flag = '0'
|
||||
<if test="ew.sqlSegment != null and ew.sqlSegment != ''">
|
||||
AND ${ew.sqlSegment}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="getSurgeryDetail" parameterType="Long" resultMap="SurgeryResult">
|
||||
<include refid="selectSurgeryVo"/>
|
||||
WHERE s.id = #{id} AND s.delete_flag = '0'
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user