liusheng
9 天以前 e4e220916dd2a4aa649a9b0162e5b5ed0dc9d7e5
smartor/src/main/resources/mapper/smartor/PatMedOperationMapper.xml
@@ -12,8 +12,8 @@
        <result property="opreqid" column="opreqid"/>
        <result property="opreqcode" column="opreqcode"/>
        <result property="opsstatus" column="opsstatus"/>
        <result property="operationcode" column="operationcode"/>
        <result property="operationname" column="operationname"/>
        <result property="optypecode" column="optypecode"/>
        <result property="optypename" column="optypename"/>
        <result property="operatortime" column="operatortime"/>
        <result property="opreqtime" column="opreqtime"/>
        <result property="reqdoccode" column="reqdoccode"/>
@@ -69,6 +69,13 @@
        <result property="drname" column="drname"/>
        <result property="nurseId" column="nurse_id"/>
        <result property="nurseName" column="nurse_name"/>
        <result property="checkFlag" column="check_flag"/>
        <result property="longTaskReason" column="long_task_reason"/>
        <result property="opid" column="opid"/>
        <result property="opcode" column="opcode"/>
        <result property="opdesc" column="opdesc"/>
        <result property="oplevelcode" column="oplevelcode"/>
        <result property="opleveldesc" column="opleveldesc"/>
    </resultMap>
    <sql id="selectPatMedOperationVo">
@@ -79,8 +86,8 @@
               opreqid,
               opreqcode,
               opsstatus,
               operationcode,
               operationname,
               optypecode,
               optypename,
               operatortime,
               opreqtime,
               reqdoccode,
@@ -135,7 +142,14 @@
               drcode,
               drname,
               nurse_id,
               nurse_name
               nurse_name,
               check_flag,
               long_task_reason,
               opid,
               opcode,
               opdesc,
               oplevelcode,
               opleveldesc
        from pat_med_operation
    </sql>
@@ -143,6 +157,7 @@
            resultMap="PatMedOperationResult">
        <include refid="selectPatMedOperationVo"/>
        <where>
            del_flag='0'
            <if test="patid != null ">
                and patid = #{patid}
            </if>
@@ -161,15 +176,20 @@
            <if test="opsstatus != null  and opsstatus != ''">
                and opsstatus = #{opsstatus}
            </if>
            <if test="operationcode != null  and operationcode != ''">
                and operationcode = #{operationcode}
            <if test="optypecode != null  and optypecode != ''">
                and optypecode = #{optypecode}
            </if>
            <if test="operationname != null  and operationname != ''">
                and operationname like concat('%', #{operationname}, '%')
            <if test="optypename != null  and optypename != ''">
                and optypename like concat('%', #{optypename}, '%')
            </if>
            <if test="operatortime != null ">
                and operatortime = #{operatortime}
            <!--            <if test="operatortime != null ">-->
            <!--                and operatortime = #{operatortime}-->
            <!--            </if>-->
            <if test="beginTime != null ">and date_format(operatortime,'%y%m%d') &gt;=
                date_format(#{beginTime},'%y%m%d')
            </if>
            <if test="endTime != null ">and date_format(operatortime,'%y%m%d') &lt;=
                date_format(#{endTime},'%y%m%d')
            </if>
            <if test="opreqtime != null ">
                and opreqtime = #{opreqtime}
@@ -315,6 +335,27 @@
            <if test="nurseName != null  and nurseName != ''">
                and nurse_name like concat('%', #{nurseName}, '%')
            </if>
            <if test="checkFlag != null  and checkFlag != ''">
                and check_flag = #{checkFlag}
            </if>
            <if test="longTaskReason != null  and longTaskReason != ''">
                and long_task_reason = #{longTaskReason}
            </if>
            <if test="opid != null  and opid != ''">
                and opid = #{opid}
            </if>
            <if test="opcode != null  and opcode != ''">
                and opcode = #{opcode}
            </if>
            <if test="opdesc != null  and opdesc != ''">
                and opdesc = #{opdesc}
            </if>
            <if test="oplevelcode != null  and oplevelcode != ''">
                and oplevelcode = #{oplevelcode}
            </if>
            <if test="opleveldesc != null  and opleveldesc != ''">
                and opleveldesc = #{opleveldesc}
            </if>
        </where>
    </select>
@@ -324,8 +365,7 @@
        where id = #{id}
    </select>
    <insert id="insertPatMedOperation" parameterType="com.smartor.domain.PatMedOperation" useGeneratedKeys="true"
            keyProperty="id">
    <insert id="insertPatMedOperation" parameterType="com.smartor.domain.PatMedOperation">
        insert into pat_med_operation
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">id,
@@ -342,9 +382,9 @@
            </if>
            <if test="opsstatus != null">opsstatus,
            </if>
            <if test="operationcode != null">operationcode,
            <if test="optypecode != null">optypecode,
            </if>
            <if test="operationname != null">operationname,
            <if test="optypename != null">optypename,
            </if>
            <if test="operatortime != null">operatortime,
            </if>
@@ -456,6 +496,20 @@
            </if>
            <if test="nurseName != null">nurse_name,
            </if>
            <if test="checkFlag != null">check_flag,
            </if>
            <if test="longTaskReason != null">long_task_reason,
            </if>
            <if test="opid != null">opid,
            </if>
            <if test="opcode != null">opcode,
            </if>
            <if test="opdesc != null">opdesc,
            </if>
            <if test="oplevelcode != null">oplevelcode,
            </if>
            <if test="opleveldesc != null">opleveldesc,
            </if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="id != null">#{id},
@@ -472,9 +526,9 @@
            </if>
            <if test="opsstatus != null">#{opsstatus},
            </if>
            <if test="operationcode != null">#{operationcode},
            <if test="optypecode != null">#{optypecode},
            </if>
            <if test="operationname != null">#{operationname},
            <if test="optypename != null">#{optypename},
            </if>
            <if test="operatortime != null">#{operatortime},
            </if>
@@ -586,6 +640,20 @@
            </if>
            <if test="nurseName != null">#{nurseName},
            </if>
            <if test="checkFlag != null">#{checkFlag},
            </if>
            <if test="longTaskReason != null">#{longTaskReason},
            </if>
            <if test="opid != null">#{opid},
            </if>
            <if test="opcode != null">#{opcode},
            </if>
            <if test="opdesc != null">#{opdesc},
            </if>
            <if test="oplevelcode != null">#{oplevelcode},
            </if>
            <if test="opleveldesc != null">#{opleveldesc},
            </if>
        </trim>
    </insert>
@@ -610,11 +678,11 @@
            <if test="opsstatus != null">opsstatus =
                #{opsstatus},
            </if>
            <if test="operationcode != null">operationcode =
                #{operationcode},
            <if test="optypecode != null">optypecode =
                #{optypecode},
            </if>
            <if test="operationname != null">operationname =
                #{operationname},
            <if test="optypename != null">optypename =
                #{optypename},
            </if>
            <if test="operatortime != null">operatortime =
                #{operatortime},
@@ -781,6 +849,27 @@
            <if test="nurseName != null">nurse_name =
                #{nurseName},
            </if>
            <if test="checkFlag != null">check_flag =
                #{checkFlag},
            </if>
            <if test="longTaskReason != null">long_task_reason =
                #{longTaskReason},
            </if>
            <if test="opid != null">opid =
                #{opid},
            </if>
            <if test="opcode != null">opcode =
                #{opcode},
            </if>
            <if test="opdesc != null">opdesc =
                #{opdesc},
            </if>
            <if test="oplevelcode != null">oplevelcode =
                #{oplevelcode},
            </if>
            <if test="opleveldesc != null">opleveldesc =
                #{opleveldesc},
            </if>
        </trim>
        where id = #{id}
    </update>