153 lines
10 KiB
XML
Raw Normal View History

2026-03-12 10:52:16 +08:00
<?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.transitPlatForm.interfaceCommon.mapper.RegApplyMapper">
<insert id="insert">
2026-03-12 16:59:25 +08:00
insert into reg_apply(
<if test="PatId != null and PatId !=''">PatId,</if>
<if test="PatCardType != null and PatCardType !=''">PatCardType,</if>
<if test="PatCardNo != null and PatCardNo !=''">PatCardNo,</if>
<if test="PatType != null and PatType !=''">PatType,</if>
<if test="RegNo != null and RegNo !=''">RegNo,</if>
<if test="PatName != null and PatName !=''">PatName,</if>
<if test="PatSex != null and PatSex !=''">PatSex,</if>
<if test="PatAge != null and PatAge !=''">PatAge,</if>
<if test="AgeUnit != null and AgeUnit !=''">AgeUnit,</if>
<if test="PatAgeShow != null and PatAgeShow !=''">PatAgeShow,</if>
<if test="PatBirthday != null">PatBirthday,</if>
<if test="PatIdentity != null and PatIdentity !=''">PatIdentity,</if>
<if test="Phone != null and Phone !=''">Phone,</if>
<if test="Address != null and Address !=''">Address,</if>
<if test="PatFeeType != null and PatFeeType !=''">PatFeeType,</if>
<if test="DepartCode != null and DepartCode !=''">DepartCode,</if>
<if test="DepartName != null and DepartName !=''">DepartName,</if>
<if test="AreaCode != null and AreaCode !=''">AreaCode,</if>
<if test="AreaName != null and AreaName !=''">AreaName,</if>
<if test="PatBed != null and PatBed !=''">PatBed,</if>
<if test="DiagnosisCode != null and DiagnosisCode !=''">DiagnosisCode,</if>
<if test="DiagnosisName != null and DiagnosisName !=''">DiagnosisName,</if>
<if test="ReciNumber != null and ReciNumber !=''">ReciNumber,</if>
<if test="DoctorCode != null and DoctorCode !=''">DoctorCode,</if>
<if test="DoctorName != null and DoctorName !=''">DoctorName,</if>
<if test="OrderTime != null">OrderTime,</if>
<if test="ExecDeptCode != null and ExecDeptCode !=''">ExecDeptCode,</if>
<if test="ExecDeptName != null and ExecDeptName !=''">ExecDeptName,</if>
<if test="SrcHospCode != null and SrcHospCode !=''">SrcHospCode,</if>
<if test="SrcHospName != null and SrcHospName !=''">SrcHospName,</if>
<if test="Amount != null">Amount,</if>
<if test="ChargeState != null and ChargeState !=''">ChargeState,</if>
<if test="PatInvoiceNum != null and PatInvoiceNum !=''">PatInvoiceNum,</if>
<if test="UserCode != null and UserCode !=''">UserCode,</if>
<if test="UserName != null and UserName !=''">UserName,</if>
<if test="DataSource != null and DataSource !=''">DataSource,</if>
<if test="applyid != null and applyid !=''">applyid,</if>
<if test="Status != null and Status !=''">Status,</if>
2026-03-13 11:03:55 +08:00
<if test="reqDetailName != null and reqDetailName !=''">reqDetailName,</if>
2026-03-12 16:59:25 +08:00
create_by,create_time
)
values (
<if test="PatId != null and PatId != ''">#{PatId},</if>
<if test="PatCardType != null and PatCardType !=''">#{PatCardType},</if>
<if test="PatCardNo != null and PatCardNo !=''">#{PatCardNo},</if>
<if test="PatType != null and PatType !=''">#{PatType},</if>
<if test="RegNo != null and RegNo !=''">#{RegNo},</if>
<if test="PatName != null and PatName !=''">#{PatName},</if>
<if test="PatSex != null and PatSex !=''">#{PatSex},</if>
<if test="PatAge != null and PatAge !=''">#{PatAge},</if>
<if test="AgeUnit != null and AgeUnit !=''">#{AgeUnit},</if>
<if test="PatAgeShow != null and PatAgeShow !=''">#{PatAgeShow},</if>
<if test="PatBirthday != null">#{PatBirthday},</if>
<if test="PatIdentity != null and PatIdentity !=''">#{PatIdentity},</if>
<if test="Phone != null and Phone !=''">#{Phone},</if>
<if test="Address != null and Address !=''">#{Address},</if>
<if test="PatFeeType != null and PatFeeType !=''">#{PatFeeType},</if>
<if test="DepartCode != null and DepartCode !=''">#{DepartCode},</if>
<if test="DepartName != null and DepartName !=''">#{DepartName},</if>
<if test="AreaCode != null and AreaCode !=''">#{AreaCode},</if>
<if test="AreaName != null and AreaName !=''">#{AreaName},</if>
<if test="PatBed != null and PatBed !=''">#{PatBed},</if>
<if test="DiagnosisCode != null and DiagnosisCode !=''">#{DiagnosisCode},</if>
<if test="DiagnosisName != null and DiagnosisName !=''">#{DiagnosisName},</if>
<if test="ReciNumber != null and ReciNumber !=''">#{ReciNumber},</if>
<if test="DoctorCode != null and DoctorCode !=''">#{DoctorCode},</if>
<if test="DoctorName != null and DoctorName !=''">#{DoctorName},</if>
<if test="OrderTime != null">#{OrderTime},</if>
<if test="ExecDeptCode != null and ExecDeptCode !=''">#{ExecDeptCode},</if>
<if test="ExecDeptName != null and ExecDeptName !=''">#{ExecDeptName},</if>
<if test="SrcHospCode != null and SrcHospCode !=''">#{SrcHospCode},</if>
<if test="SrcHospName != null and SrcHospName !=''">#{SrcHospName},</if>
<if test="Amount != null">#{Amount},</if>
<if test="ChargeState != null and ChargeState !=''">#{ChargeState},</if>
<if test="PatInvoiceNum != null and PatInvoiceNum !=''">#{PatInvoiceNum},</if>
<if test="UserCode != null and UserCode !=''">#{UserCode},</if>
<if test="UserName != null and UserName !=''">#{UserName},</if>
<if test="DataSource != null and DataSource !=''">#{DataSource},</if>
<if test="applyid != null and applyid !=''">#{applyid},</if>
<if test="Status != null and Status !=''">#{Status},</if>
2026-03-13 11:03:55 +08:00
<if test="reqDetailName != null and reqDetailName !=''">#{reqDetailName},</if>
2026-03-12 16:59:25 +08:00
#{create_by},#{create_time}
)
2026-03-12 10:52:16 +08:00
</insert>
<select id="queryOne" resultType="com.transitPlatForm.common.core.domain.entity.reg.RegApply">
select * from reg_apply
<where>
<if test="applyid != null and applyid != ''">and applyid = #{applyid}</if>
</where>
</select>
<update id="update">
update reg_apply
<set>
<if test="PatId != null and PatId != ''">PatId = #{PatId},</if>
<if test="PatCardType != null and PatCardType != ''">PatCardType = #{PatCardType},</if>
<if test="PatCardNo != null and PatCardNo != ''">PatCardNo = #{PatCardNo},</if>
<if test="PatType != null and PatType != ''">PatType = #{PatType},</if>
<if test="RegNo != null and RegNo != ''">RegNo = #{RegNo},</if>
<if test="PatName != null and PatName != ''">PatName = #{PatName},</if>
<if test="PatSex != null and PatSex != ''">PatSex = #{PatSex},</if>
<if test="PatAge != null and PatAge != ''">PatAge = #{PatAge},</if>
<if test="AgeUnit != null and AgeUnit != ''">AgeUnit = #{AgeUnit},</if>
<if test="PatAgeShow != null and PatAgeShow != ''">PatAgeShow = #{PatAgeShow},</if>
<if test="PatBirthday != null ">PatBirthday = #{PatBirthday},</if>
<if test="PatIdentity != null and PatIdentity != ''">PatIdentity = #{PatIdentity},</if>
<if test="Phone != null and Phone != ''">Phone = #{Phone},</if>
<if test="Address != null and Address != ''">Address = #{Address},</if>
<if test="PatFeeType != null and PatFeeType != ''">PatFeeType = #{PatFeeType},</if>
<if test="DepartCode != null and DepartCode != ''">DepartCode = #{DepartCode},</if>
<if test="DepartName != null and DepartName != ''">DepartName = #{DepartName},</if>
<if test="AreaCode != null and AreaCode != ''">AreaCode = #{AreaCode},</if>
<if test="AreaName != null and AreaName != ''">AreaName = #{AreaName},</if>
<if test="PatBed != null and PatBed != ''">PatBed = #{PatBed},</if>
<if test="DiagnosisCode != null and DiagnosisCode != ''">DiagnosisCode = #{DiagnosisCode},</if>
<if test="DiagnosisName != null and DiagnosisName != ''">DiagnosisName = #{DiagnosisName},</if>
<if test="ReciNumber != null and ReciNumber != ''">ReciNumber = #{ReciNumber},</if>
<if test="DoctorCode != null and DoctorCode != ''">DoctorCode = #{DoctorCode},</if>
<if test="DoctorName != null and DoctorName != ''">DoctorName = #{DoctorName},</if>
<if test="OrderTime != null">OrderTime = #{OrderTime},</if>
<if test="ExecDeptCode != null and ExecDeptCode != ''">ExecDeptCode = #{ExecDeptCode},</if>
<if test="ExecDeptName != null and ExecDeptName != ''">ExecDeptName = #{ExecDeptName},</if>
<if test="SrcHospCode != null and SrcHospCode != ''">SrcHospCode = #{SrcHospCode},</if>
<if test="SrcHospName != null and SrcHospName != ''">SrcHospName = #{SrcHospName},</if>
<if test="Amount != null">Amount = #{Amount},</if>
<if test="ChargeState != null and ChargeState != ''">ChargeState = #{ChargeState},</if>
<if test="PatInvoiceNum != null and PatInvoiceNum != ''">PatInvoiceNum = #{PatInvoiceNum},</if>
<if test="UserCode != null and UserCode != ''">UserCode = #{UserCode},</if>
<if test="UserName != null and UserName != ''">UserName = #{UserName},</if>
<if test="DataSource != null and DataSource != ''">DataSource = #{DataSource},</if>
<if test="create_by != null and create_by != ''">create_by = #{create_by},</if>
<if test="create_time != null">create_time = #{create_time},</if>
<if test="update_by != null and update_by != ''">update_by = #{update_by},</if>
<if test="update_time != null">update_time = #{update_time},</if>
<if test="Status != null and Status != ''">Status = #{Status},</if>
2026-03-13 11:03:55 +08:00
<if test="reqDetailName != null and reqDetailName != ''">reqDetailName = #{reqDetailName},</if>
2026-03-12 10:52:16 +08:00
applyid = #{applyid}
</set>
where applyid = #{applyid}
</update>
<delete id="delete">
delete from reg_apply where applyid = #{applyid}
</delete>
</mapper>