zhs
4 天以前 2935cf3cf897c02ce6ec90a5d42cce346e3e6630
smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml
@@ -259,12 +259,16 @@
            <if test="schemestatus != null ">and b.schemestatus = #{schemestatus}</if>
            <if test="outWayId != null ">and b.out_way_id = #{outWayId}</if>
            <if test="outWayName != null ">and b.out_way_name = #{outWayName}</if>
            <if test="leaveldeptcode != null ">and b.leaveldeptcode = #{leaveldeptcode}</if>
            <if test="leavediagname != null  and leavediagname != ''">and b.leavediagname like concat('%',
                #{leavediagname}, '%')
            </if>
            <if test="drname != null  and drname != ''">and b.drname like concat('%', #{drname}, '%')</if>
            <if test="leaveldeptname != null  and leaveldeptname != ''">and b.leaveldeptname like concat('%',
                #{leaveldeptname}, '%')
            </if>
            <if test="deptname != null  and deptname != ''">and b.deptname like concat('%',
                #{deptname}, '%')
            </if>
            <if test="patid != null  and patid != ''">and a.id =#{patid}
            </if>
@@ -425,6 +429,9 @@
        where inhospid = #{inhospid}
    </select>
    <insert id="insertPatMedInhosp" parameterType="com.smartor.domain.PatMedInhosp" useGeneratedKeys="true"
            keyProperty="inhospid">
        insert into pat_med_inhosp
@@ -554,6 +561,40 @@
        </trim>
    </insert>
    <insert id="insertPatMedInhospBatch" parameterType="java.util.List"  useGeneratedKeys="true" keyProperty="item.inhospid">
        insert into pat_med_inhosp (
        serialnum, hospitalname, hospitalcode, hospitaldistrictcode, hospitaldistrictname,
        icd10code, diagname, starttime, endtime, deptcode, deptname, roomno, bed_no,
        orgid, del_flag, update_by, update_time, create_by, create_time, isupload,
        upload_time, patid, leavediagname, leaveicd10code, drcode, drname,
        schemestatus, generalschemestatus, leaveldeptcode, leaveldeptname, hospitaldistrictid,
        leavehospitaldistrictcode, leavehospitaldistrictname, leavehospitaldistrictid,
        deptid, leaveldeptid, schemetime, patname, patno, inhospstate,
        deptcheck_flag, wardcheck_flag, diagcheck_flag, long_task_reason,
        nurse_id, nurse_name, out_way_id, out_way_name, guid,
        operator, operator_id, inhospno, remark,
        fuflag, fudate, fuperiod, futypecode, futypedesc, fuadvice, fuspecialadvice
        )
        values
        <foreach collection="list" item="item" separator=",">
            (
            #{item.serialnum}, #{item.hospitalname}, #{item.hospitalcode}, #{item.hospitaldistrictcode}, #{item.hospitaldistrictname},
            #{item.icd10code}, #{item.diagname}, #{item.starttime}, #{item.endtime}, #{item.deptcode}, #{item.deptname}, #{item.roomno}, #{item.bedNo},
            #{item.orgid}, #{item.delFlag}, #{item.updateBy}, #{item.updateTime}, #{item.createBy}, #{item.createTime}, #{item.isupload},
            #{item.uploadTime}, #{item.patid}, #{item.leavediagname}, #{item.leaveicd10code}, #{item.drcode}, #{item.drname},
            #{item.schemestatus}, #{item.generalschemestatus}, #{item.leaveldeptcode}, #{item.leaveldeptname}, #{item.hospitaldistrictid},
            #{item.leavehospitaldistrictcode}, #{item.leavehospitaldistrictname}, #{item.leavehospitaldistrictid},
            #{item.deptid}, #{item.leaveldeptid}, #{item.schemetime}, #{item.patname}, #{item.patno}, #{item.inhospstate},
            #{item.deptcheckFlag}, #{item.wardcheckFlag}, #{item.diagcheckFlag}, #{item.longTaskReason},
            #{item.nurseId}, #{item.nurseName}, #{item.outWayId}, #{item.outWayName}, #{item.guid},
            #{item.operator}, #{item.operatorId}, #{item.inhospno}, #{item.remark},
            #{item.fuflag}, #{item.fudate}, #{item.fuperiod}, #{item.futypecode}, #{item.futypedesc}, #{item.fuadvice}, #{item.fuspecialadvice}
            )
        </foreach>
    </insert>
    <update id="updatePatMedInhosp" parameterType="com.smartor.domain.PatMedInhosp">
        update pat_med_inhosp
        <trim prefix="SET" suffixOverrides=",">