| | |
| | | |
| | | <resultMap type="com.smartor.domain.PatMedOperationItem" id="PatMedOperationItemResult"> |
| | | <result property="id" column="id"/> |
| | | <result property="operationid" column="operationid"/> |
| | | <result property="opid" column="opid"/> |
| | | <result property="opcode" column="opcode"/> |
| | | <result property="opdesc" column="opdesc"/> |
| | |
| | | <result property="pguid" column="pguid"/> |
| | | <result property="guid" column="guid"/> |
| | | <result property="pid" column="pid"/> |
| | | <result property="opercheckFlag" column="opercheck_flag"/> |
| | | <result property="longTaskReason" column="long_task_reason"/> |
| | | |
| | | <result property="deptcode" column="deptcode"/> |
| | | <result property="deptname" column="deptname"/> |
| | | <result property="hospitaldistrictcode" column="hospitaldistrictcode"/> |
| | | <result property="hospitaldistrictname" column="hospitaldistrictname"/> |
| | | <result property="patid" column="patid"/> |
| | | <result property="drcode" column="drcode"/> |
| | | <result property="drname" column="drname"/> |
| | | <result property="nurseId" column="nurse_id"/> |
| | | <result property="nurseName" column="nurse_name"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectPatMedOperationItemVo"> |
| | | select id, opid, opcode, opdesc, main_flag, incitypecode, incitypedesc, oplevelcode, opleveldesc, opposition, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, orgid, pguid, guid, pid |
| | | select id, operationid, opid, opcode, opdesc, main_flag, incitypecode, incitypedesc, oplevelcode, opleveldesc, opposition, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, orgid, pguid, guid, pid, opercheck_flag, long_task_reason |
| | | from pat_med_operation_item |
| | | </sql> |
| | | |
| | | <select id="selectPatMedOperationItemList" parameterType="com.smartor.domain.PatMedOperationItem" |
| | | resultMap="PatMedOperationItemResult"> |
| | | <include refid="selectPatMedOperationItemVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="operationid != null "> |
| | | and operationid = #{operationid} |
| | | </if> |
| | | <if test="opid != null "> |
| | | and opid = #{opid} |
| | | </if> |
| | |
| | | <if test="pid != null "> |
| | | and pid = #{pid} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectPatMedOperationItemById" parameterType="Long" |
| | |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertPatMedOperationItem" parameterType="com.smartor.domain.PatMedOperationItem"> |
| | | <insert id="insertPatMedOperationItem" parameterType="com.smartor.domain.PatMedOperationItem" useGeneratedKeys="true" keyProperty="id"> |
| | | insert into pat_med_operation_item |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id, |
| | | <if test="operationid != null">operationid, |
| | | </if> |
| | | <if test="opid != null">opid, |
| | | </if> |
| | |
| | | </if> |
| | | <if test="pid != null">pid, |
| | | </if> |
| | | <if test="opercheckFlag != null">opercheck_flag, |
| | | </if> |
| | | <if test="longTaskReason != null">long_task_reason, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id}, |
| | | <if test="operationid != null">#{operationid}, |
| | | </if> |
| | | <if test="opid != null">#{opid}, |
| | | </if> |
| | |
| | | </if> |
| | | <if test="pid != null">#{pid}, |
| | | </if> |
| | | <if test="opercheckFlag != null">#{opercheckFlag}, |
| | | </if> |
| | | <if test="longTaskReason != null">#{longTaskReason}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updatePatMedOperationItem" parameterType="com.smartor.domain.PatMedOperationItem"> |
| | | update pat_med_operation_item |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="operationid != null">operationid = |
| | | #{operationid}, |
| | | </if> |
| | | <if test="opid != null">opid = |
| | | #{opid}, |
| | | </if> |
| | |
| | | <if test="pid != null">pid = |
| | | #{pid}, |
| | | </if> |
| | | <if test="opercheckFlag != null">opercheck_flag = |
| | | #{opercheckFlag}, |
| | | </if> |
| | | <if test="longTaskReason != null">long_task_reason = |
| | | #{longTaskReason}, |
| | | </if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <update id="deletePatMedOperationItemById" parameterType="Long"> |
| | | <insert id="insertPatMedOperationItems"> |
| | | insert into pat_med_operation_item |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="operationid != null">operationid, |
| | | </if> |
| | | <if test="opid != null">opid, |
| | | </if> |
| | | <if test="opcode != null">opcode, |
| | | </if> |
| | | <if test="opdesc != null">opdesc, |
| | | </if> |
| | | <if test="mainFlag != null">main_flag, |
| | | </if> |
| | | <if test="incitypecode != null">incitypecode, |
| | | </if> |
| | | <if test="incitypedesc != null">incitypedesc, |
| | | </if> |
| | | <if test="oplevelcode != null">oplevelcode, |
| | | </if> |
| | | <if test="opleveldesc != null">opleveldesc, |
| | | </if> |
| | | <if test="opposition != null">opposition, |
| | | </if> |
| | | <if test="delFlag != null">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="orgid != null">orgid, |
| | | </if> |
| | | <if test="pguid != null">pguid, |
| | | </if> |
| | | <if test="guid != null">guid, |
| | | </if> |
| | | <if test="pid != null">pid, |
| | | </if> |
| | | <if test="opercheckFlag != null">opercheck_flag, |
| | | </if> |
| | | <if test="longTaskReason != null">long_task_reason, |
| | | </if> |
| | | </trim> |
| | | values |
| | | <foreach item="item" index="index" collection="list" separator=","> |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="operationid != null">#{item.operationid}, |
| | | </if> |
| | | <if test="opid != null">#{item.opid}, |
| | | </if> |
| | | <if test="opcode != null">#{item.opcode}, |
| | | </if> |
| | | <if test="opdesc != null">#{item.opdesc}, |
| | | </if> |
| | | <if test="mainFlag != null">#{item.mainFlag}, |
| | | </if> |
| | | <if test="incitypecode != null">#{item.incitypecode}, |
| | | </if> |
| | | <if test="incitypedesc != null">#{item.incitypedesc}, |
| | | </if> |
| | | <if test="oplevelcode != null">#{item.oplevelcode}, |
| | | </if> |
| | | <if test="opleveldesc != null">#{item.opleveldesc}, |
| | | </if> |
| | | <if test="opposition != null">#{item.opposition}, |
| | | </if> |
| | | <if test="delFlag != null">#{item.delFlag}, |
| | | </if> |
| | | <if test="updateBy != null">#{item.updateBy}, |
| | | </if> |
| | | <if test="updateTime != null">#{item.updateTime}, |
| | | </if> |
| | | <if test="createBy != null">#{item.createBy}, |
| | | </if> |
| | | <if test="createTime != null">#{item.createTime}, |
| | | </if> |
| | | <if test="isupload != null">#{item.isupload}, |
| | | </if> |
| | | <if test="uploadTime != null">#{item.uploadTime}, |
| | | </if> |
| | | <if test="orgid != null">#{item.orgid}, |
| | | </if> |
| | | <if test="pguid != null">#{item.pguid}, |
| | | </if> |
| | | <if test="guid != null">#{item.guid}, |
| | | </if> |
| | | <if test="pid != null">#{item.pid}, |
| | | </if> |
| | | <if test="opercheckFlag != null">#{item.opercheckFlag}, |
| | | </if> |
| | | <if test="longTaskReason != null">#{item.longTaskReason}, |
| | | </if> |
| | | </trim> |
| | | </foreach> |
| | | </insert> |
| | | |
| | | <update id="deletePatMedOperationItemById" parameterType="Long"> |
| | | update pat_med_operation_item |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | del_flag =1 |
| | |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <update id="deletePatMedOperationItemByIds" parameterType="String"> |
| | | <update id="deletePatMedOperationItemByIds" parameterType="String"> |
| | | update pat_med_operation_item |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | del_flag =1 |
| | |
| | | </foreach> |
| | | </update> |
| | | |
| | | <delete id="deleteHardPatMedOperationItemByOpId" parameterType="String"> |
| | | delete from pat_med_operation_item |
| | | where opid = #{opid} |
| | | </delete> |
| | | |
| | | |
| | | <select id="selectOperationItemList" parameterType="com.smartor.domain.PatMedOperationItem" |
| | | resultMap="PatMedOperationItemResult"> |
| | | select pmoi.id, pmoi.operationid, pmoi.opid, pmoi.opcode, pmoi.opdesc, pmoi.main_flag, pmoi.incitypecode, |
| | | pmoi.incitypedesc, pmoi.oplevelcode, pmoi.opleveldesc, pmoi.opposition, pmoi.del_flag, pmoi.update_by, |
| | | pmoi.update_time, pmoi.create_by, pmoi.create_time, pmoi.isupload, pmoi.upload_time, pmoi.orgid, |
| | | pmoi.pguid, pmoi.guid, pmoi.pid, pmoi.opercheck_flag, pmoi.long_task_reason, |
| | | pmo.deptcode, pmo.deptname, pmo.hospitaldistrictcode, pmo.hospitaldistrictname, pmo.patid, |
| | | pmo.drcode, pmo.drname, pmo.nurse_id, pmo.nurse_name |
| | | from pat_med_operation pmo |
| | | join pat_med_operation_item pmoi |
| | | on pmoi.opcode = pmo.opcode |
| | | where |
| | | pmo.del_flag = '0' |
| | | and pmoi.del_flag = '0' |
| | | <if test="operationid != null "> |
| | | and pmoi.operationid = #{operationid} |
| | | </if> |
| | | <if test="opid != null "> |
| | | and pmoi.opid = #{opid} |
| | | </if> |
| | | <if test="opcode != null and opcode != ''"> |
| | | and pmoi.opcode = #{opcode} |
| | | </if> |
| | | <if test="opdesc != null and opdesc != ''"> |
| | | and pmoi.opdesc = #{opdesc} |
| | | </if> |
| | | <if test="mainFlag != null and mainFlag != ''"> |
| | | and pmoi.main_flag = #{mainFlag} |
| | | </if> |
| | | <if test="incitypecode != null and incitypecode != ''"> |
| | | and pmoi.incitypecode = #{incitypecode} |
| | | </if> |
| | | <if test="incitypedesc != null and incitypedesc != ''"> |
| | | and pmoi.incitypedesc = #{incitypedesc} |
| | | </if> |
| | | <if test="oplevelcode != null and oplevelcode != ''"> |
| | | and pmoi.oplevelcode = #{oplevelcode} |
| | | </if> |
| | | <if test="opleveldesc != null and opleveldesc != ''"> |
| | | and pmoi.opleveldesc = #{opleveldesc} |
| | | </if> |
| | | <if test="opposition != null and opposition != ''"> |
| | | and pmoi.opposition = #{opposition} |
| | | </if> |
| | | <if test="isupload != null "> |
| | | and pmoi.isupload = #{isupload} |
| | | </if> |
| | | <if test="uploadTime != null "> |
| | | and pmoi.upload_time = #{uploadTime} |
| | | </if> |
| | | <if test="orgid != null and orgid != ''"> |
| | | and pmoi.orgid = #{orgid} |
| | | </if> |
| | | <if test="pguid != null and pguid != ''"> |
| | | and pmoi.pguid = #{pguid} |
| | | </if> |
| | | <if test="guid != null and guid != ''"> |
| | | and pmoi.guid = #{guid} |
| | | </if> |
| | | <if test="pid != null "> |
| | | and pmoi.pid = #{pid} |
| | | </if> |
| | | <if test="deptcode != null and deptcode != ''"> |
| | | and pmo.deptcode = #{deptcode} |
| | | </if> |
| | | <if test="deptname != null and deptname != ''"> |
| | | and pmo.deptname = #{deptname} |
| | | </if> |
| | | <if test="hospitaldistrictcode != null and hospitaldistrictcode != ''"> |
| | | and pmo.hospitaldistrictcode = #{hospitaldistrictcode} |
| | | </if> |
| | | <if test="hospitaldistrictname != null and hospitaldistrictname != ''"> |
| | | and pmo.hospitaldistrictname = #{hospitaldistrictname} |
| | | </if> |
| | | <if test="patid != null"> |
| | | and pmo.patid = #{patid} |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |