| | |
| | | |
| | | <resultMap type="com.smartor.domain.PatMedInspection" id="PatMedInspectionResult"> |
| | | <result property="id" column="id"/> |
| | | <result property="serialnum" column="serialnum"/> |
| | | <result property="patid" column="patid"/> |
| | | <result property="projecttype" column="projecttype"/> |
| | | <result property="projectcode" column="projectcode"/> |
| | | <result property="projectname" column="projectname"/> |
| | | <result property="reporttime" column="reporttime"/> |
| | | <result property="hospitalname" column="hospitalname"/> |
| | | <result property="hospitalcode" column="hospitalcode"/> |
| | | <result property="inhospno" column="inhospno"/> |
| | | <result property="patidHis" column="patid_his"/> |
| | | <result property="idcardno" column="idcardno"/> |
| | | <result property="patname" column="patname"/> |
| | | <result property="telcode" column="telcode"/> |
| | | <result property="adviceId" column="adviceId"/> |
| | | <result property="appliyid" column="appliyid"/> |
| | | <result property="priority" column="priority"/> |
| | | <result property="orgid" column="orgid"/> |
| | | <result property="delFlag" column="del_flag"/> |
| | | <result property="updateBy" column="update_by"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | <result property="createBy" column="create_by"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="isupload" column="isupload"/> |
| | | <result property="uploadTime" column="upload_time"/> |
| | | <result property="projectid" column="projectid"/> |
| | | <result property="applicationtime" column="applicationtime"/> |
| | | <result property="visittype" column="visittype"/> |
| | | <result property="visitid" column="visitid"/> |
| | | <result property="schemestatus" column="schemestatus"/> |
| | | <result property="isabnormal" column="isabnormal"/> |
| | | <result property="reportconclusion" column="reportconclusion"/> |
| | | <result property="schemetime" column="schemetime"/> |
| | | <result property="drcode" column="drcode"/> |
| | | <result property="drname" column="drname"/> |
| | | <result property="deptcode" column="deptcode"/> |
| | | <result property="deptname" column="deptname"/> |
| | | <result property="deptid" column="deptid"/> |
| | | <result property="opendate" column="opendate"/> |
| | | <result property="operatorId" column="operator_id"/> |
| | | <result property="operatorName" column="operator_name"/> |
| | | <result property="operatorDate" column="operator_date"/> |
| | | <result property="money" column="money"/> |
| | | <result property="updateBy" column="update_by"/> |
| | | <result property="updateDate" column="update_date"/> |
| | | <result property="createBy" column="create_by"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="startTime" column="start_time"/> |
| | | <result property="projectId" column="project_id"/> |
| | | <result property="projectName" column="project_name"/> |
| | | <result property="diagid" column="diagid"/> |
| | | <result property="diagname" column="diagname"/> |
| | | <result property="partId" column="part_id"/> |
| | | <result property="partName" column="part_name"/> |
| | | <result property="typeId" column="type_id"/> |
| | | <result property="typeName" column="type_name"/> |
| | | <result property="filmFlag" column="film_flag"/> |
| | | <result property="bedFlag" column="bed_flag"/> |
| | | <result property="pushFlag" column="push_flag"/> |
| | | <result property="urgentFlag" column="urgent_flag"/> |
| | | <result property="nostartFlag" column="nostart_flag"/> |
| | | <result property="pguid" column="pguid"/> |
| | | <result property="guid" column="guid"/> |
| | | <result property="pid" column="pid"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectPatMedInspectionVo"> |
| | | select id, |
| | | serialnum, |
| | | guid, |
| | | patid, |
| | | projecttype, |
| | | projectcode, |
| | | projectname, |
| | | reporttime, |
| | | hospitalname, |
| | | hospitalcode, |
| | | inhospno, |
| | | patid_his, |
| | | idcardno, |
| | | patname, |
| | | telcode, |
| | | adviceId, |
| | | appliyid, |
| | | priority, |
| | | orgid, |
| | | del_flag, |
| | | update_by, |
| | | update_time, |
| | | create_by, |
| | | create_time, |
| | | isupload, |
| | | upload_time, |
| | | projectid, |
| | | applicationtime, |
| | | visittype, |
| | | visitid, |
| | | schemestatus, |
| | | isabnormal, |
| | | reportconclusion, |
| | | schemetime, |
| | | drcode, |
| | | drname, |
| | | deptcode, |
| | | deptname, |
| | | deptid |
| | | opendate, |
| | | operator_id, |
| | | operator_name, |
| | | operator_date, |
| | | money, |
| | | update_by, |
| | | update_date, |
| | | create_by, |
| | | create_time, |
| | | start_time, |
| | | project_id, |
| | | project_name, |
| | | diagid, |
| | | diagname, |
| | | part_id, |
| | | part_name, |
| | | type_id, |
| | | type_name, |
| | | film_flag, |
| | | bed_flag, |
| | | push_flag, |
| | | urgent_flag, |
| | | nostart_flag, |
| | | pguid, |
| | | guid, |
| | | pid |
| | | from pat_med_inspection |
| | | </sql> |
| | | |
| | |
| | | resultMap="PatMedInspectionResult"> |
| | | <include refid="selectPatMedInspectionVo"/> |
| | | <where> |
| | | <if test="serialnum != null and serialnum != ''">and serialnum = #{serialnum}</if> |
| | | <if test="patid != null ">and patid = #{patid}</if> |
| | | <if test="projecttype != null ">and projecttype = #{projecttype}</if> |
| | | <if test="projectcode != null and projectcode != ''">and projectcode = #{projectcode}</if> |
| | | <if test="projectname != null and projectname != ''">and projectname like concat('%', #{projectname}, |
| | | '%') |
| | | </if> |
| | | <if test="reporttime != null ">and reporttime = #{reporttime}</if> |
| | | <if test="hospitalname != null and hospitalname != ''">and hospitalname like concat('%', #{hospitalname}, |
| | | '%') |
| | | </if> |
| | | <if test="hospitalcode != null and hospitalcode != ''">and hospitalcode = #{hospitalcode}</if> |
| | | <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if> |
| | | <if test="isupload != null ">and isupload = #{isupload}</if> |
| | | <if test="uploadTime != null ">and upload_time = #{uploadTime}</if> |
| | | <if test="projectid != null ">and projectid = #{projectid}</if> |
| | | <if test="applicationtime != null ">and applicationtime = #{applicationtime}</if> |
| | | <if test="visittype != null ">and visittype = #{visittype}</if> |
| | | <if test="visitid != null ">and visitid = #{visitid}</if> |
| | | <if test="schemestatus != null ">and schemestatus = #{schemestatus}</if> |
| | | <if test="isabnormal != null ">and isabnormal = #{isabnormal}</if> |
| | | <if test="reportconclusion != null and reportconclusion != ''">and reportconclusion = #{reportconclusion} |
| | | </if> |
| | | <if test="schemetime != null ">and schemetime = #{schemetime}</if> |
| | | <if test="deptcode != null and deptcode != ''">and deptcode = #{deptcode}</if> |
| | | <if test="deptname != null and deptname != ''">and deptname like concat('%', #{deptname}, '%')</if> |
| | | <if test="deptid != null ">and deptid = #{deptid}</if> |
| | | <if test="projecttype != null">and projecttype = #{projecttype}</if> |
| | | <if test="inhospno != null">and inhospno = #{inhospno}</if> |
| | | <if test="patidHis != null">and patid_his = #{patidHis}</if> |
| | | <if test="idcardno != null">and idcardno = #{idcardno}</if> |
| | | <if test="patname != null">and patname = #{patname}</if> |
| | | <if test="telcode != null ">and telcode = #{telcode}</if> |
| | | <if test="adviceId != null">and adviceId = #{adviceId}</if> |
| | | <if test="appliyid != null">and appliyid = #{appliyid}</if> |
| | | <if test="priority != null">and priority = #{priority}</if> |
| | | <if test="orgid != null">and orgid = #{orgid}</if> |
| | | <if test="delFlag != null">and del_flag = #{delFlag}</if> |
| | | <if test="drcode != null">and drcode = #{drcode}</if> |
| | | <if test="drname != null">and drname = #{drname}</if> |
| | | <if test="deptcode != null">and deptcode = #{deptcode}</if> |
| | | <if test="deptname != null">and deptname = #{deptname}</if> |
| | | <if test="opendate != null">and opendate = #{opendate}</if> |
| | | <if test="operatorId != null">and operator_id = #{operatorId}</if> |
| | | <if test="operatorName != null">and operator_name = #{operatorName}</if> |
| | | <if test="operatorDate != null">and operator_date = #{operatorDate}</if> |
| | | <if test="money != null">and money = #{money}</if> |
| | | <if test="updateBy != null">and update_by = #{updateBy}</if> |
| | | <if test="updateDate != null">and update_date = #{updateDate}</if> |
| | | <if test="createBy != null">and create_by = #{createBy}</if> |
| | | <if test="createTime != null">and create_time = #{createTime}</if> |
| | | <if test="startTime != null">and start_time = #{startTime}</if> |
| | | <if test="projectId != null">and project_id = #{projectId}</if> |
| | | <if test="projectName != null">and project_name = #{projectName}</if> |
| | | <if test="diagid != null">and diagid = #{diagid}</if> |
| | | <if test="diagname != null">and diagname = #{diagname}</if> |
| | | <if test="partId != null">and part_id = #{partId}</if> |
| | | <if test="partName != null">and part_name = #{partName}</if> |
| | | <if test="typeId != null">and type_id = #{typeId}</if> |
| | | <if test="typeName != null">and type_name = #{type}</if> |
| | | <if test="filmFlag != null">and film_flag = #{filmFlag}</if> |
| | | <if test="bedFlag != null">and bed_flag = #{bedFlag}</if> |
| | | <if test="pushFlag != null">and push_flag = #{pushFlag}</if> |
| | | <if test="urgentFlag != null">and urgent_flag = #{urgentFlag}</if> |
| | | <if test="nostartFlag != null">and nostart_flag = #{nostartFlag}</if> |
| | | <if test="pguid != null">and pguid = #{pguid}</if> |
| | | <if test="guid != null">and guid = #{guid}</if> |
| | | <if test="pid != null">and pid = #{pid}</if> |
| | | </where> |
| | | order by update_time desc |
| | | -- order by update_time desc |
| | | </select> |
| | | |
| | | <select id="selectPatMedInspectionById" parameterType="Long" resultMap="PatMedInspectionResult"> |
| | |
| | | keyProperty="id"> |
| | | insert into pat_med_inspection |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="serialnum != null">serialnum,</if> |
| | | <if test="patid != null">patid,</if> |
| | | <if test="projecttype != null">projecttype,</if> |
| | | <if test="projectcode != null">projectcode,</if> |
| | | <if test="projectname != null">projectname,</if> |
| | | <if test="reporttime != null">reporttime,</if> |
| | | <if test="hospitalname != null">hospitalname,</if> |
| | | <if test="hospitalcode != null">hospitalcode,</if> |
| | | <if test="inhospno != null">inhospno,</if> |
| | | <if test="patidHis != null">patid_his,</if> |
| | | <if test="idcardno != null">idcardno,</if> |
| | | <if test="patname != null">patname,</if> |
| | | <if test="telcode != null">telcode,</if> |
| | | <if test="adviceId != null">adviceId,</if> |
| | | <if test="appliyid != null">appliyid,</if> |
| | | <if test="priority != null">priority,</if> |
| | | <if test="orgid != null">orgid,</if> |
| | | <if test="delFlag != null and delFlag != ''">del_flag,</if> |
| | | <if test="updateBy != null">update_by,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | | <if test="createBy != null">create_by,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="isupload != null">isupload,</if> |
| | | <if test="uploadTime != null">upload_time,</if> |
| | | <if test="projectid != null">projectid,</if> |
| | | <if test="applicationtime != null">applicationtime,</if> |
| | | <if test="visittype != null">visittype,</if> |
| | | <if test="visitid != null">visitid,</if> |
| | | <if test="schemestatus != null">schemestatus,</if> |
| | | <if test="isabnormal != null">isabnormal,</if> |
| | | <if test="reportconclusion != null">reportconclusion,</if> |
| | | <if test="schemetime != null">schemetime,</if> |
| | | <if test="delFlag != null">del_flag,</if> |
| | | <if test="drcode != null">drcode,</if> |
| | | <if test="drname != null">drname,</if> |
| | | <if test="deptcode != null">deptcode,</if> |
| | | <if test="deptname != null">deptname,</if> |
| | | <if test="deptid != null">deptid,</if> |
| | | <if test="opendate != null">opendate,</if> |
| | | <if test="operatorId != null">operator_id,</if> |
| | | <if test="operatorName != null">operator_name,</if> |
| | | <if test="operatorDate != null">operator_date,</if> |
| | | <if test="money != null">money,</if> |
| | | <if test="updateBy != null">update_by,</if> |
| | | <if test="updateDate != null">update_date,</if> |
| | | <if test="createBy != null">create_by,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="startTime != null">start_time,</if> |
| | | <if test="projectId != null">project_id,</if> |
| | | <if test="projectName != null">project_name,</if> |
| | | <if test="diagid != null">diagid,</if> |
| | | <if test="diagname != null">diagname,</if> |
| | | <if test="partId != null">part_id,</if> |
| | | <if test="partName != null">part_name,</if> |
| | | <if test="typeId != null">type_id,</if> |
| | | <if test="typeName != null">type_name,</if> |
| | | <if test="filmFlag != null">film_flag,</if> |
| | | <if test="bedFlag != null">bed_flag,</if> |
| | | <if test="pushFlag != null">push_flag,</if> |
| | | <if test="urgentFlag != null">urgent_flag,</if> |
| | | <if test="nostartFlag != null">nostart_flag,</if> |
| | | <if test="pguid != null">pguid,</if> |
| | | <if test="guid != null">guid,</if> |
| | | <if test="pid != null">pid,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="serialnum != null">#{serialnum},</if> |
| | | <if test="patid != null">#{patid},</if> |
| | | <if test="projecttype != null">#{projecttype},</if> |
| | | <if test="projectcode != null">#{projectcode},</if> |
| | | <if test="projectname != null">#{projectname},</if> |
| | | <if test="reporttime != null">#{reporttime},</if> |
| | | <if test="hospitalname != null">#{hospitalname},</if> |
| | | <if test="hospitalcode != null">#{hospitalcode},</if> |
| | | <if test="inhospno != null">#{inhospno},</if> |
| | | <if test="patidHis != null">#{patidHis},</if> |
| | | <if test="idcardno != null">#{idcardno},</if> |
| | | <if test="patname != null">#{patname},</if> |
| | | <if test="telcode != null">#{telcode},</if> |
| | | <if test="adviceId != null">#{adviceId},</if> |
| | | <if test="appliyid != null">#{appliyid},</if> |
| | | <if test="priority != null">#{priority},</if> |
| | | <if test="orgid != null">#{orgid},</if> |
| | | <if test="delFlag != null and delFlag != ''">#{delFlag},</if> |
| | | <if test="updateBy != null">#{updateBy},</if> |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | | <if test="createBy != null">#{createBy},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | | <if test="isupload != null">#{isupload},</if> |
| | | <if test="uploadTime != null">#{uploadTime},</if> |
| | | <if test="projectid != null">#{projectid},</if> |
| | | <if test="applicationtime != null">#{applicationtime},</if> |
| | | <if test="visittype != null">#{visittype},</if> |
| | | <if test="visitid != null">#{visitid},</if> |
| | | <if test="schemestatus != null">#{schemestatus},</if> |
| | | <if test="isabnormal != null">#{isabnormal},</if> |
| | | <if test="reportconclusion != null">#{reportconclusion},</if> |
| | | <if test="schemetime != null">#{schemetime},</if> |
| | | <if test="delFlag != null">#{delFlag},</if> |
| | | <if test="drcode != null">#{drcode},</if> |
| | | <if test="drname != null">#{drname},</if> |
| | | <if test="deptcode != null">#{deptcode},</if> |
| | | <if test="deptname != null">#{deptname},</if> |
| | | <if test="deptid != null">#{deptid},</if> |
| | | <if test="opendate != null">#{opendate},</if> |
| | | <if test="operatorId != null">#{operatorId},</if> |
| | | <if test="operatorName != null">#{operatorName},</if> |
| | | <if test="operatorDate != null">#{operatorDate},</if> |
| | | <if test="money != null">#{money},</if> |
| | | <if test="updateBy != null">#{updateBy},</if> |
| | | <if test="updateDate != null">#{updateDate},</if> |
| | | <if test="createBy != null">#{createBy},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | | <if test="startTime != null">#{startTime},</if> |
| | | <if test="projectId != null">#{projectId},</if> |
| | | <if test="projectName != null">#{projectName},</if> |
| | | <if test="diagid != null">#{diagid},</if> |
| | | <if test="diagname != null">#{diagname},</if> |
| | | <if test="partId != null">#{partId},</if> |
| | | <if test="partName != null">#{partName},</if> |
| | | <if test="typeId != null">#{typeId},</if> |
| | | <if test="typeName != null">#{typeName},</if> |
| | | <if test="filmFlag != null">#{filmFlag},</if> |
| | | <if test="bedFlag != null">#{bedFlag},</if> |
| | | <if test="pushFlag != null">#{pushFlag},</if> |
| | | <if test="urgentFlag != null">#{urgentFlag},</if> |
| | | <if test="nostartFlag != null">#{nostartFlag},</if> |
| | | <if test="pguid != null">#{pguid},</if> |
| | | <if test="guid != null">#{guid},</if> |
| | | <if test="pid != null">#{pid},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updatePatMedInspection" parameterType="com.smartor.domain.PatMedInspection"> |
| | | update pat_med_inspection |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="serialnum != null">serialnum = #{serialnum},</if> |
| | | <if test="patid != null">patid = #{patid},</if> |
| | | <if test="projecttype != null">projecttype = #{projecttype},</if> |
| | | <if test="projectcode != null">projectcode = #{projectcode},</if> |
| | | <if test="projectname != null">projectname = #{projectname},</if> |
| | | <if test="reporttime != null">reporttime = #{reporttime},</if> |
| | | <if test="hospitalname != null">hospitalname = #{hospitalname},</if> |
| | | <if test="hospitalcode != null">hospitalcode = #{hospitalcode},</if> |
| | | <if test="inhospno != null">inhospno = #{inhospno},</if> |
| | | <if test="patidHis != null">patid_his = #{patidHis},</if> |
| | | <if test="idcardno != null">idcardno = #{idcardno},</if> |
| | | <if test="patname != null">patname = #{patname},</if> |
| | | <if test="telcode != null">telcode = #{telcode},</if> |
| | | <if test="adviceId != null">adviceId = #{adviceId},</if> |
| | | <if test="appliyid != null">appliyid = #{appliyid},</if> |
| | | <if test="priority != null">priority = #{priority},</if> |
| | | <if test="orgid != null">orgid = #{orgid},</if> |
| | | <if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if> |
| | | <if test="updateBy != null">update_by = #{updateBy},</if> |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |
| | | <if test="createBy != null">create_by = #{createBy},</if> |
| | | <if test="createTime != null">create_time = #{createTime},</if> |
| | | <if test="isupload != null">isupload = #{isupload},</if> |
| | | <if test="uploadTime != null">upload_time = #{uploadTime},</if> |
| | | <if test="projectid != null">projectid = #{projectid},</if> |
| | | <if test="applicationtime != null">applicationtime = #{applicationtime},</if> |
| | | <if test="visittype != null">visittype = #{visittype},</if> |
| | | <if test="visitid != null">visitid = #{visitid},</if> |
| | | <if test="schemestatus != null">schemestatus = #{schemestatus},</if> |
| | | <if test="isabnormal != null">isabnormal = #{isabnormal},</if> |
| | | <if test="reportconclusion != null">reportconclusion = #{reportconclusion},</if> |
| | | <if test="schemetime != null">schemetime = #{schemetime},</if> |
| | | <if test="delFlag != null">del_flag = #{delFlag},</if> |
| | | <if test="drcode != null">drcode = #{drcode},</if> |
| | | <if test="drname != null">drname = #{drname},</if> |
| | | <if test="deptcode != null">deptcode = #{deptcode},</if> |
| | | <if test="deptname != null">deptname = #{deptname},</if> |
| | | <if test="deptid != null">deptid = #{deptid},</if> |
| | | <if test="guid != null">guid = #{guid},</if> |
| | | <if test="opendate != null">opendate = #{opendate},</if> |
| | | <if test="operatorId != null">operator_id = #{operatorId},</if> |
| | | <if test="operatorName != null">operator_name = #{operatorName},</if> |
| | | <if test="operatorDate != null">operator_date = #{operatorDate},</if> |
| | | <if test="money != null">money = #{money},</if> |
| | | <if test="updateBy != null">update_by = #{updateBy},</if> |
| | | <if test="updateDate != null">update_date = #{updateDate},</if> |
| | | <if test="createBy != null">create_by = #{createBy},</if> |
| | | <if test="createTime != null">create_time = #{createTime},</if> |
| | | <if test="startTime != null">start_time = #{startTime},</if> |
| | | <if test="projectId != null">project_id = #{projectId},</if> |
| | | <if test="projectName != null">project_name = #{projectName},</if> |
| | | <if test="diagid != null">diagid = #{diagid},</if> |
| | | <if test="diagname != null">diagname = #{diagname},</if> |
| | | <if test="partId != null">part_id = #{partId},</if> |
| | | <if test="partName != null">part_name = #{partName},</if> |
| | | <if test="typeId != null">type_id = #{typeId},</if> |
| | | <if test="typeName != null">type_name = #{typeName},</if> |
| | | <if test="filmFlag != null">film_flag = #{filmFlag},</if> |
| | | <if test="bedFlag != null">bed_flag = #{bedFlag},</if> |
| | | <if test="pushFlag != null">push_flag = #{pushFlag},</if> |
| | | <if test="urgentFlag != null">urgent_flag = #{urgentFlag},</if> |
| | | <if test="nostartFlag != null">nostart_flag = #{nostartFlag},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | where projecttype = #{projecttype} |
| | | and inhospno = #{inhospno} |
| | | and patid_his = #{patidHis} |
| | | and idcardno = #{idcardno} |
| | | </update> |
| | | |
| | | <delete id="deletePatMedInspectionById" parameterType="Long"> |