大唐会议项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

601 lines
22 KiB

<?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.acupuncture.system.persist.mapper.PmsTreatmentMapper">
<resultMap id="BaseResultMap" type="com.acupuncture.system.domain.po.PmsTreatment">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="patient_id" jdbcType="BIGINT" property="patientId" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="pinyin_full" jdbcType="VARCHAR" property="pinyinFull" />
<result column="pinyin_simple" jdbcType="VARCHAR" property="pinyinSimple" />
<result column="gender" jdbcType="TINYINT" property="gender" />
<result column="age" jdbcType="INTEGER" property="age" />
<result column="birth_date" jdbcType="DATE" property="birthDate" />
<result column="ethnicity" jdbcType="VARCHAR" property="ethnicity" />
<result column="education_years" jdbcType="INTEGER" property="educationYears" />
<result column="phone" jdbcType="VARCHAR" property="phone" />
<result column="id_card_type" jdbcType="TINYINT" property="idCardType" />
<result column="id_card" jdbcType="VARCHAR" property="idCard" />
<result column="visit_type" jdbcType="TINYINT" property="visitType" />
<result column="visit_number" jdbcType="VARCHAR" property="visitNumber" />
<result column="visit_time" jdbcType="TIMESTAMP" property="visitTime" />
<result column="discharge_time" jdbcType="TIMESTAMP" property="dischargeTime" />
<result column="doctor" jdbcType="VARCHAR" property="doctor" />
<result column="dept_name" jdbcType="VARCHAR" property="deptName" />
<result column="diagnosis_code" jdbcType="VARCHAR" property="diagnosisCode" />
<result column="diagnosis_name" jdbcType="VARCHAR" property="diagnosisName" />
<result column="status" jdbcType="TINYINT" property="status" />
<result column="member_id" jdbcType="BIGINT" property="memberId" />
<result column="del_flag" jdbcType="TINYINT" property="delFlag" />
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, patient_id, name, pinyin_full, pinyin_simple, gender, age, birth_date, ethnicity,
education_years, phone, id_card_type, id_card, visit_type, visit_number, visit_time,
discharge_time, doctor, dept_name, diagnosis_code, diagnosis_name, status, member_id,
del_flag, tenant_id, create_by, create_time, update_by, update_time, remark
</sql>
<select id="selectByExample" parameterType="com.acupuncture.system.domain.po.PmsTreatmentExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from pms_treatment
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from pms_treatment
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from pms_treatment
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" parameterType="com.acupuncture.system.domain.po.PmsTreatment">
insert into pms_treatment (id, patient_id, name,
pinyin_full, pinyin_simple, gender,
age, birth_date, ethnicity,
education_years, phone, id_card_type,
id_card, visit_type, visit_number,
visit_time, discharge_time, doctor,
dept_name, diagnosis_code, diagnosis_name,
status, member_id, del_flag,
tenant_id, create_by, create_time,
update_by, update_time, remark
)
values (#{id,jdbcType=BIGINT}, #{patientId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR},
#{pinyinFull,jdbcType=VARCHAR}, #{pinyinSimple,jdbcType=VARCHAR}, #{gender,jdbcType=TINYINT},
#{age,jdbcType=INTEGER}, #{birthDate,jdbcType=DATE}, #{ethnicity,jdbcType=VARCHAR},
#{educationYears,jdbcType=INTEGER}, #{phone,jdbcType=VARCHAR}, #{idCardType,jdbcType=TINYINT},
#{idCard,jdbcType=VARCHAR}, #{visitType,jdbcType=TINYINT}, #{visitNumber,jdbcType=VARCHAR},
#{visitTime,jdbcType=TIMESTAMP}, #{dischargeTime,jdbcType=TIMESTAMP}, #{doctor,jdbcType=VARCHAR},
#{deptName,jdbcType=VARCHAR}, #{diagnosisCode,jdbcType=VARCHAR}, #{diagnosisName,jdbcType=VARCHAR},
#{status,jdbcType=TINYINT}, #{memberId,jdbcType=BIGINT}, #{delFlag,jdbcType=TINYINT},
#{tenantId,jdbcType=BIGINT}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.acupuncture.system.domain.po.PmsTreatment">
insert into pms_treatment
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="patientId != null">
patient_id,
</if>
<if test="name != null">
name,
</if>
<if test="pinyinFull != null">
pinyin_full,
</if>
<if test="pinyinSimple != null">
pinyin_simple,
</if>
<if test="gender != null">
gender,
</if>
<if test="age != null">
age,
</if>
<if test="birthDate != null">
birth_date,
</if>
<if test="ethnicity != null">
ethnicity,
</if>
<if test="educationYears != null">
education_years,
</if>
<if test="phone != null">
phone,
</if>
<if test="idCardType != null">
id_card_type,
</if>
<if test="idCard != null">
id_card,
</if>
<if test="visitType != null">
visit_type,
</if>
<if test="visitNumber != null">
visit_number,
</if>
<if test="visitTime != null">
visit_time,
</if>
<if test="dischargeTime != null">
discharge_time,
</if>
<if test="doctor != null">
doctor,
</if>
<if test="deptName != null">
dept_name,
</if>
<if test="diagnosisCode != null">
diagnosis_code,
</if>
<if test="diagnosisName != null">
diagnosis_name,
</if>
<if test="status != null">
status,
</if>
<if test="memberId != null">
member_id,
</if>
<if test="delFlag != null">
del_flag,
</if>
<if test="tenantId != null">
tenant_id,
</if>
<if test="createBy != null">
create_by,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateBy != null">
update_by,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="remark != null">
remark,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="patientId != null">
#{patientId,jdbcType=BIGINT},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="pinyinFull != null">
#{pinyinFull,jdbcType=VARCHAR},
</if>
<if test="pinyinSimple != null">
#{pinyinSimple,jdbcType=VARCHAR},
</if>
<if test="gender != null">
#{gender,jdbcType=TINYINT},
</if>
<if test="age != null">
#{age,jdbcType=INTEGER},
</if>
<if test="birthDate != null">
#{birthDate,jdbcType=DATE},
</if>
<if test="ethnicity != null">
#{ethnicity,jdbcType=VARCHAR},
</if>
<if test="educationYears != null">
#{educationYears,jdbcType=INTEGER},
</if>
<if test="phone != null">
#{phone,jdbcType=VARCHAR},
</if>
<if test="idCardType != null">
#{idCardType,jdbcType=TINYINT},
</if>
<if test="idCard != null">
#{idCard,jdbcType=VARCHAR},
</if>
<if test="visitType != null">
#{visitType,jdbcType=TINYINT},
</if>
<if test="visitNumber != null">
#{visitNumber,jdbcType=VARCHAR},
</if>
<if test="visitTime != null">
#{visitTime,jdbcType=TIMESTAMP},
</if>
<if test="dischargeTime != null">
#{dischargeTime,jdbcType=TIMESTAMP},
</if>
<if test="doctor != null">
#{doctor,jdbcType=VARCHAR},
</if>
<if test="deptName != null">
#{deptName,jdbcType=VARCHAR},
</if>
<if test="diagnosisCode != null">
#{diagnosisCode,jdbcType=VARCHAR},
</if>
<if test="diagnosisName != null">
#{diagnosisName,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=TINYINT},
</if>
<if test="memberId != null">
#{memberId,jdbcType=BIGINT},
</if>
<if test="delFlag != null">
#{delFlag,jdbcType=TINYINT},
</if>
<if test="tenantId != null">
#{tenantId,jdbcType=BIGINT},
</if>
<if test="createBy != null">
#{createBy,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateBy != null">
#{updateBy,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.acupuncture.system.domain.po.PmsTreatmentExample" resultType="java.lang.Long">
select count(*) from pms_treatment
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update pms_treatment
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.patientId != null">
patient_id = #{record.patientId,jdbcType=BIGINT},
</if>
<if test="record.name != null">
name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.pinyinFull != null">
pinyin_full = #{record.pinyinFull,jdbcType=VARCHAR},
</if>
<if test="record.pinyinSimple != null">
pinyin_simple = #{record.pinyinSimple,jdbcType=VARCHAR},
</if>
<if test="record.gender != null">
gender = #{record.gender,jdbcType=TINYINT},
</if>
<if test="record.age != null">
age = #{record.age,jdbcType=INTEGER},
</if>
<if test="record.birthDate != null">
birth_date = #{record.birthDate,jdbcType=DATE},
</if>
<if test="record.ethnicity != null">
ethnicity = #{record.ethnicity,jdbcType=VARCHAR},
</if>
<if test="record.educationYears != null">
education_years = #{record.educationYears,jdbcType=INTEGER},
</if>
<if test="record.phone != null">
phone = #{record.phone,jdbcType=VARCHAR},
</if>
<if test="record.idCardType != null">
id_card_type = #{record.idCardType,jdbcType=TINYINT},
</if>
<if test="record.idCard != null">
id_card = #{record.idCard,jdbcType=VARCHAR},
</if>
<if test="record.visitType != null">
visit_type = #{record.visitType,jdbcType=TINYINT},
</if>
<if test="record.visitNumber != null">
visit_number = #{record.visitNumber,jdbcType=VARCHAR},
</if>
<if test="record.visitTime != null">
visit_time = #{record.visitTime,jdbcType=TIMESTAMP},
</if>
<if test="record.dischargeTime != null">
discharge_time = #{record.dischargeTime,jdbcType=TIMESTAMP},
</if>
<if test="record.doctor != null">
doctor = #{record.doctor,jdbcType=VARCHAR},
</if>
<if test="record.deptName != null">
dept_name = #{record.deptName,jdbcType=VARCHAR},
</if>
<if test="record.diagnosisCode != null">
diagnosis_code = #{record.diagnosisCode,jdbcType=VARCHAR},
</if>
<if test="record.diagnosisName != null">
diagnosis_name = #{record.diagnosisName,jdbcType=VARCHAR},
</if>
<if test="record.status != null">
status = #{record.status,jdbcType=TINYINT},
</if>
<if test="record.memberId != null">
member_id = #{record.memberId,jdbcType=BIGINT},
</if>
<if test="record.delFlag != null">
del_flag = #{record.delFlag,jdbcType=TINYINT},
</if>
<if test="record.tenantId != null">
tenant_id = #{record.tenantId,jdbcType=BIGINT},
</if>
<if test="record.createBy != null">
create_by = #{record.createBy,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.updateBy != null">
update_by = #{record.updateBy,jdbcType=VARCHAR},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if test="record.remark != null">
remark = #{record.remark,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update pms_treatment
set id = #{record.id,jdbcType=BIGINT},
patient_id = #{record.patientId,jdbcType=BIGINT},
name = #{record.name,jdbcType=VARCHAR},
pinyin_full = #{record.pinyinFull,jdbcType=VARCHAR},
pinyin_simple = #{record.pinyinSimple,jdbcType=VARCHAR},
gender = #{record.gender,jdbcType=TINYINT},
age = #{record.age,jdbcType=INTEGER},
birth_date = #{record.birthDate,jdbcType=DATE},
ethnicity = #{record.ethnicity,jdbcType=VARCHAR},
education_years = #{record.educationYears,jdbcType=INTEGER},
phone = #{record.phone,jdbcType=VARCHAR},
id_card_type = #{record.idCardType,jdbcType=TINYINT},
id_card = #{record.idCard,jdbcType=VARCHAR},
visit_type = #{record.visitType,jdbcType=TINYINT},
visit_number = #{record.visitNumber,jdbcType=VARCHAR},
visit_time = #{record.visitTime,jdbcType=TIMESTAMP},
discharge_time = #{record.dischargeTime,jdbcType=TIMESTAMP},
doctor = #{record.doctor,jdbcType=VARCHAR},
dept_name = #{record.deptName,jdbcType=VARCHAR},
diagnosis_code = #{record.diagnosisCode,jdbcType=VARCHAR},
diagnosis_name = #{record.diagnosisName,jdbcType=VARCHAR},
status = #{record.status,jdbcType=TINYINT},
member_id = #{record.memberId,jdbcType=BIGINT},
del_flag = #{record.delFlag,jdbcType=TINYINT},
tenant_id = #{record.tenantId,jdbcType=BIGINT},
create_by = #{record.createBy,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_by = #{record.updateBy,jdbcType=VARCHAR},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
remark = #{record.remark,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.acupuncture.system.domain.po.PmsTreatment">
update pms_treatment
<set>
<if test="patientId != null">
patient_id = #{patientId,jdbcType=BIGINT},
</if>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="pinyinFull != null">
pinyin_full = #{pinyinFull,jdbcType=VARCHAR},
</if>
<if test="pinyinSimple != null">
pinyin_simple = #{pinyinSimple,jdbcType=VARCHAR},
</if>
<if test="gender != null">
gender = #{gender,jdbcType=TINYINT},
</if>
<if test="age != null">
age = #{age,jdbcType=INTEGER},
</if>
<if test="birthDate != null">
birth_date = #{birthDate,jdbcType=DATE},
</if>
<if test="ethnicity != null">
ethnicity = #{ethnicity,jdbcType=VARCHAR},
</if>
<if test="educationYears != null">
education_years = #{educationYears,jdbcType=INTEGER},
</if>
<if test="phone != null">
phone = #{phone,jdbcType=VARCHAR},
</if>
<if test="idCardType != null">
id_card_type = #{idCardType,jdbcType=TINYINT},
</if>
<if test="idCard != null">
id_card = #{idCard,jdbcType=VARCHAR},
</if>
<if test="visitType != null">
visit_type = #{visitType,jdbcType=TINYINT},
</if>
<if test="visitNumber != null">
visit_number = #{visitNumber,jdbcType=VARCHAR},
</if>
<if test="visitTime != null">
visit_time = #{visitTime,jdbcType=TIMESTAMP},
</if>
<if test="dischargeTime != null">
discharge_time = #{dischargeTime,jdbcType=TIMESTAMP},
</if>
<if test="doctor != null">
doctor = #{doctor,jdbcType=VARCHAR},
</if>
<if test="deptName != null">
dept_name = #{deptName,jdbcType=VARCHAR},
</if>
<if test="diagnosisCode != null">
diagnosis_code = #{diagnosisCode,jdbcType=VARCHAR},
</if>
<if test="diagnosisName != null">
diagnosis_name = #{diagnosisName,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=TINYINT},
</if>
<if test="memberId != null">
member_id = #{memberId,jdbcType=BIGINT},
</if>
<if test="delFlag != null">
del_flag = #{delFlag,jdbcType=TINYINT},
</if>
<if test="tenantId != null">
tenant_id = #{tenantId,jdbcType=BIGINT},
</if>
<if test="createBy != null">
create_by = #{createBy,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateBy != null">
update_by = #{updateBy,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.acupuncture.system.domain.po.PmsTreatment">
update pms_treatment
set patient_id = #{patientId,jdbcType=BIGINT},
name = #{name,jdbcType=VARCHAR},
pinyin_full = #{pinyinFull,jdbcType=VARCHAR},
pinyin_simple = #{pinyinSimple,jdbcType=VARCHAR},
gender = #{gender,jdbcType=TINYINT},
age = #{age,jdbcType=INTEGER},
birth_date = #{birthDate,jdbcType=DATE},
ethnicity = #{ethnicity,jdbcType=VARCHAR},
education_years = #{educationYears,jdbcType=INTEGER},
phone = #{phone,jdbcType=VARCHAR},
id_card_type = #{idCardType,jdbcType=TINYINT},
id_card = #{idCard,jdbcType=VARCHAR},
visit_type = #{visitType,jdbcType=TINYINT},
visit_number = #{visitNumber,jdbcType=VARCHAR},
visit_time = #{visitTime,jdbcType=TIMESTAMP},
discharge_time = #{dischargeTime,jdbcType=TIMESTAMP},
doctor = #{doctor,jdbcType=VARCHAR},
dept_name = #{deptName,jdbcType=VARCHAR},
diagnosis_code = #{diagnosisCode,jdbcType=VARCHAR},
diagnosis_name = #{diagnosisName,jdbcType=VARCHAR},
status = #{status,jdbcType=TINYINT},
member_id = #{memberId,jdbcType=BIGINT},
del_flag = #{delFlag,jdbcType=TINYINT},
tenant_id = #{tenantId,jdbcType=BIGINT},
create_by = #{createBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_by = #{updateBy,jdbcType=VARCHAR},
update_time = #{updateTime,jdbcType=TIMESTAMP},
remark = #{remark,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>