格式化代码

This commit is contained in:
纪寒 2024-04-01 10:26:15 +08:00
parent 1a99ff2754
commit 6560540c4a
4 changed files with 628 additions and 543 deletions

View File

@ -5,13 +5,14 @@ import com.xinelu.common.annotation.Excel;
import com.xinelu.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.time.LocalDate;
import java.time.LocalDateTime;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import java.time.LocalDate;
import java.time.LocalDateTime;
/**
* 患者信息对象 patient_info
*
@ -25,50 +26,70 @@ import lombok.NoArgsConstructor;
@ApiModel(value = "患者信息对象", description = "patient_info")
public class PatientInfo extends BaseEntity {
private static final long serialVersionUID=1L;
private static final long serialVersionUID = 1L;
/** 主键id */
/**
* 主键id
*/
private Long id;
/** 居民信息表id */
/**
* 居民信息表id
*/
@ApiModelProperty(value = "居民信息表id")
private Long residentId;
/** 患者姓名 */
/**
* 患者姓名
*/
@ApiModelProperty(value = "患者姓名")
@Excel(name = "患者姓名")
private String patientName;
/** 患者电话 */
/**
* 患者电话
*/
@ApiModelProperty(value = "患者电话")
@Excel(name = "患者电话")
private String patientPhone;
/** 家属电话 */
/**
* 家属电话
*/
@ApiModelProperty(value = "家属电话")
private String familyMemberPhone;
/** 出生日期格式yyyy-MM-dd */
/**
* 出生日期格式yyyy-MM-dd
*/
@ApiModelProperty(value = "出生日期格式yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd")
private LocalDate birthDate;
/** 身份证号 */
/**
* 身份证号
*/
@ApiModelProperty(value = "身份证号")
private String cardNo;
/** 性别MALEFEMALE */
/**
* 性别MALEFEMALE
*/
@ApiModelProperty(value = "性别MALEFEMALE")
@Excel(name = "性别MALEFEMALE")
private String sex;
/** 住址 */
/**
* 住址
*/
@ApiModelProperty(value = "住址")
@Excel(name = "住址")
private String address;
/** 患者类型预住院患者PRE_HOSPITALIZED_PATIENT在院患者IN_HOSPITAL_PATIENT门诊患者OUTPATIENT出院患者DISCHARGED_PATIENT
签约患者CONTRACTED_PATIENT */
/**
* 患者类型预住院患者PRE_HOSPITALIZED_PATIENT在院患者IN_HOSPITAL_PATIENT门诊患者OUTPATIENT出院患者DISCHARGED_PATIENT
* 签约患者CONTRACTED_PATIENT
*/
@ApiModelProperty(value = "患者类型预住院患者PRE_HOSPITALIZED_PATIENT在院患者IN_HOSPITAL_PATIENT门诊患者OUTPATIENT出院患者DISCHARGED_PATIENT签约患者CONTRACTED_PATIENT")
private String patientType;
@ -87,125 +108,179 @@ public class PatientInfo extends BaseEntity {
@ApiModelProperty(value = "服务状态意向签约INTENTIONAL_SIGNING服务中SERVICE_CENTER服务结束SERVICE_END")
private String serviceStatus;
/** 签约时间格式yyyy-MM-dd HH:mm:ss */
/**
* 签约时间格式yyyy-MM-dd HH:mm:ss
*/
@ApiModelProperty(value = "签约时间格式yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "签约时间格式yyyy-MM-dd HH:mm:ss", width = 30, dateFormat = "yyyy-MM-dd")
private LocalDateTime signTime;
/** 就诊方式门诊OUTPATIENT_SERVICE住院BE_IN_HOSPITAL */
/**
* 就诊方式门诊OUTPATIENT_SERVICE住院BE_IN_HOSPITAL
*/
@ApiModelProperty(value = "就诊方式门诊OUTPATIENT_SERVICE住院BE_IN_HOSPITAL")
@Excel(name = "就诊方式门诊OUTPATIENT_SERVICE住院BE_IN_HOSPITAL")
private String visitMethod;
/** 主治医生id */
/**
* 主治医生id
*/
@ApiModelProperty(value = "主治医生id")
@Excel(name = "主治医生id")
private Long attendingPhysicianId;
/** 主治医生姓名 */
/**
* 主治医生姓名
*/
@ApiModelProperty(value = "主治医生姓名")
@Excel(name = "主治医生姓名")
private String attendingPhysicianName;
/** 主要诊断 */
/**
* 主要诊断
*/
@ApiModelProperty(value = "主要诊断")
private String mainDiagnosis;
/** 所属医院id */
/**
* 所属医院id
*/
@ApiModelProperty(value = "所属医院id")
private Long hospitalAgencyId;
/** 所属医院名称 */
/**
* 所属医院名称
*/
@ApiModelProperty(value = "所属医院名称")
@Excel(name = "所属医院名称")
private String hospitalAgencyName;
/** 所属院区id */
/**
* 所属院区id
*/
@ApiModelProperty(value = "所属院区id")
private Long campusAgencyId;
/** 所属院区名称 */
/**
* 所属院区名称
*/
@ApiModelProperty(value = "所属院区名称")
@Excel(name = "所属院区名称")
private String campusAgencyName;
/** 所属科室id */
/**
* 所属科室id
*/
@ApiModelProperty(value = "所属科室id")
private Long departmentId;
/** 所属科室名称 */
/**
* 所属科室名称
*/
@ApiModelProperty(value = "所属科室名称")
@Excel(name = "所属科室名称")
private String departmentName;
/** 所属病区id */
/**
* 所属病区id
*/
@ApiModelProperty(value = "所属病区id")
private Long wardId;
/** 所属病区名称 */
/**
* 所属病区名称
*/
@ApiModelProperty(value = "所属病区名称")
@Excel(name = "所属病区名称")
private String wardName;
/** 责任护士 */
/**
* 责任护士
*/
@ApiModelProperty(value = "责任护士")
private String responsibleNurse;
/** 最新一条就诊记录id */
/**
* 最新一条就诊记录id
*/
@ApiModelProperty(value = "最新一条就诊记录id")
private Long patientVisitRecordId;
/** 就诊流水号 */
/**
* 就诊流水号
*/
@ApiModelProperty(value = "就诊流水号")
private String visitSerialNumber;
/** 入院时间时间格式yyyy-MM-dd */
/**
* 入院时间时间格式yyyy-MM-dd
*/
@ApiModelProperty(value = "入院时间")
private LocalDateTime admissionTime;
/** 出院时间出院患者时间格式yyyy-MM-dd */
/**
* 出院时间出院患者时间格式yyyy-MM-dd
*/
@ApiModelProperty(value = "出院时间(出院患者)")
private LocalDateTime dischargeTime;
/** 预约治疗组(取值以及枚举未知?) */
/**
* 预约治疗组取值以及枚举未知
*/
@ApiModelProperty(value = "预约治疗组(取值以及枚举未知?)")
private String appointmentTreatmentGroup;
/** 登记号(预住院患者) */
/**
* 登记号预住院患者
*/
@ApiModelProperty(value = "登记号(预住院患者)")
private String registrationNo;
/** 登记日期预住院患者时间格式yyyy-MM-dd */
/**
* 登记日期预住院患者时间格式yyyy-MM-dd
*/
@ApiModelProperty(value = "登记日期预住院患者时间格式yyyy-MM-dd")
private LocalDate registrationDate;
/** 预约时间预住院患者时间格式yyyy-MM-dd */
/**
* 预约时间预住院患者时间格式yyyy-MM-dd
*/
@ApiModelProperty(value = "预约时间预住院患者时间格式yyyy-MM-dd")
private LocalDate appointmentDate;
/** 门诊/住院号 */
/**
* 门诊/住院号
*/
@ApiModelProperty(value = "门诊/住院号 ")
@Excel(name = "门诊/住院号 ", readConverterExp = "门诊/住院号 ")
private String inHospitalNumber;
/** 就诊时间格式yyyy-MM-dd HH:mm:ss */
/**
* 就诊时间格式yyyy-MM-dd HH:mm:ss
*/
@ApiModelProperty(value = "就诊时间格式yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "就诊时间格式yyyy-MM-dd HH:mm:ss", width = 30, dateFormat = "yyyy-MM-dd")
private LocalDateTime visitDate;
/** 出院方式(出院患者) */
/**
* 出院方式出院患者
*/
@ApiModelProperty(value = "出院方式")
@Excel(name = "出院方式", readConverterExp = "出=院患者")
private String dischargeMethod;
/** 患者来源微信小程序WE_CHAT_APPLET微信公众号WE_CHAT_OFFICIAL_ACCOUNT管理端MANAGE_END */
/**
* 患者来源微信小程序WE_CHAT_APPLET微信公众号WE_CHAT_OFFICIAL_ACCOUNT管理端MANAGE_END
*/
@ApiModelProperty(value = "患者来源微信小程序WE_CHAT_APPLET微信公众号WE_CHAT_OFFICIAL_ACCOUNT管理端MANAGE_END")
@Excel(name = "患者来源微信小程序WE_CHAT_APPLET微信公众号WE_CHAT_OFFICIAL_ACCOUNT管理端MANAGE_END")
private String patientSource;
/** 删除标识0未删除1已删除 */
/**
* 删除标识0未删除1已删除
*/
private Integer delFlag;
}

View File

@ -3,6 +3,7 @@ package com.xinelu.manage.mapper.patientinfo;
import com.xinelu.manage.domain.patientinfo.PatientInfo;
import com.xinelu.manage.dto.patientinfo.PatientInfoDto;
import com.xinelu.manage.vo.patientinfo.PatientBaseInfoVo;
import java.util.List;
/**
@ -20,6 +21,12 @@ public interface PatientInfoMapper {
*/
public PatientInfo selectPatientInfoById(Long id);
/**
* 查询患者信息
*
* @param id 主键id
* @return 患者信息
*/
public PatientBaseInfoVo getPatientBaseInfo(Long id);
/**

View File

@ -4,50 +4,50 @@
<mapper namespace="com.xinelu.manage.mapper.patientinfo.PatientInfoMapper">
<resultMap type="com.xinelu.manage.domain.patientinfo.PatientInfo" id="PatientInfoResult">
<result property="id" column="id" />
<result property="residentId" column="resident_id" />
<result property="patientName" column="patient_name" />
<result property="patientPhone" column="patient_phone" />
<result property="familyMemberPhone" column="family_member_phone" />
<result property="birthDate" column="birth_date" />
<result property="cardNo" column="card_no" />
<result property="sex" column="sex" />
<result property="address" column="address" />
<result property="patientType" column="patient_type" />
<result property="signStatus" column="sign_status" />
<result property="signPatientRecordId" column="sign_patient_record_id" />
<result property="serviceStatus" column="service_status" />
<result property="signTime" column="sign_time" />
<result property="visitMethod" column="visit_method" />
<result property="attendingPhysicianId" column="attending_physician_id" />
<result property="attendingPhysicianName" column="attending_physician_name" />
<result property="mainDiagnosis" column="main_diagnosis" />
<result property="hospitalAgencyId" column="hospital_agency_id" />
<result property="hospitalAgencyName" column="hospital_agency_name" />
<result property="campusAgencyId" column="campus_agency_id" />
<result property="campusAgencyName" column="campus_agency_name" />
<result property="departmentId" column="department_id" />
<result property="departmentName" column="department_name" />
<result property="wardId" column="ward_id" />
<result property="wardName" column="ward_name" />
<result property="responsibleNurse" column="responsible_nurse" />
<result property="patientVisitRecordId" column="patient_visit_record_id" />
<result property="visitSerialNumber" column="visit_serial_number" />
<result property="admissionTime" column="admission_time" />
<result property="dischargeTime" column="discharge_time" />
<result property="appointmentTreatmentGroup" column="appointment_treatment_group" />
<result property="registrationNo" column="registration_no" />
<result property="registrationDate" column="registration_date" />
<result property="appointmentDate" column="appointment_date" />
<result property="inHospitalNumber" column="in_hospital_number" />
<result property="visitDate" column="visit_date" />
<result property="dischargeMethod" column="discharge_method" />
<result property="patientSource" column="patient_source" />
<result property="delFlag" column="del_flag" />
<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="id" column="id"/>
<result property="residentId" column="resident_id"/>
<result property="patientName" column="patient_name"/>
<result property="patientPhone" column="patient_phone"/>
<result property="familyMemberPhone" column="family_member_phone"/>
<result property="birthDate" column="birth_date"/>
<result property="cardNo" column="card_no"/>
<result property="sex" column="sex"/>
<result property="address" column="address"/>
<result property="patientType" column="patient_type"/>
<result property="signStatus" column="sign_status"/>
<result property="signPatientRecordId" column="sign_patient_record_id"/>
<result property="serviceStatus" column="service_status"/>
<result property="signTime" column="sign_time"/>
<result property="visitMethod" column="visit_method"/>
<result property="attendingPhysicianId" column="attending_physician_id"/>
<result property="attendingPhysicianName" column="attending_physician_name"/>
<result property="mainDiagnosis" column="main_diagnosis"/>
<result property="hospitalAgencyId" column="hospital_agency_id"/>
<result property="hospitalAgencyName" column="hospital_agency_name"/>
<result property="campusAgencyId" column="campus_agency_id"/>
<result property="campusAgencyName" column="campus_agency_name"/>
<result property="departmentId" column="department_id"/>
<result property="departmentName" column="department_name"/>
<result property="wardId" column="ward_id"/>
<result property="wardName" column="ward_name"/>
<result property="responsibleNurse" column="responsible_nurse"/>
<result property="patientVisitRecordId" column="patient_visit_record_id"/>
<result property="visitSerialNumber" column="visit_serial_number"/>
<result property="admissionTime" column="admission_time"/>
<result property="dischargeTime" column="discharge_time"/>
<result property="appointmentTreatmentGroup" column="appointment_treatment_group"/>
<result property="registrationNo" column="registration_no"/>
<result property="registrationDate" column="registration_date"/>
<result property="appointmentDate" column="appointment_date"/>
<result property="inHospitalNumber" column="in_hospital_number"/>
<result property="visitDate" column="visit_date"/>
<result property="dischargeMethod" column="discharge_method"/>
<result property="patientSource" column="patient_source"/>
<result property="delFlag" column="del_flag"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
</resultMap>
<sql id="selectPatientInfoVo">
@ -71,8 +71,9 @@
from patient_info
</sql>
<select id="selectPatientInfoList" parameterType="com.xinelu.manage.dto.patientinfo.PatientInfoDto" resultMap="PatientInfoResult">
<include refid="selectPatientInfoVo" />
<select id="selectPatientInfoList" parameterType="com.xinelu.manage.dto.patientinfo.PatientInfoDto"
resultMap="PatientInfoResult">
<include refid="selectPatientInfoVo"/>
<where>
del_flag = 0
<if test="patientName != null and patientName != ''">
@ -152,18 +153,20 @@
</select>
<select id="selectPatientInfoById" parameterType="Long" resultMap="PatientInfoResult">
<include refid="selectPatientInfoVo" />
<include refid="selectPatientInfoVo"/>
where id = #{id}
</select>
<select id="getPatientBaseInfo" parameterType="Long" resultType="com.xinelu.manage.vo.patientinfo.PatientBaseInfoVo">
<select id="getPatientBaseInfo" parameterType="Long"
resultType="com.xinelu.manage.vo.patientinfo.PatientBaseInfoVo">
select id, resident_id, patient_name, patient_phone, family_member_phone,
birth_date, card_no, sex, address
from patient_info
where id = #{id}
</select>
<insert id="insertPatientInfo" parameterType="com.xinelu.manage.domain.patientinfo.PatientInfo" useGeneratedKeys="true" keyProperty="id">
<insert id="insertPatientInfo" parameterType="com.xinelu.manage.domain.patientinfo.PatientInfo"
useGeneratedKeys="true" keyProperty="id">
insert into patient_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="residentId != null">