gdg
2021-02-03 94e89a3391c7f28d9002fbcc0cafdbf6d05d7e73
src/main/java/com/nanometer/smartlab/dao/OpeApplyDao.xml
@@ -63,7 +63,9 @@
    <result property="arrivalNum" column="arrival_num"></result>
    <result property="status" column="status" typeHandler="com.nanometer.smartlab.entity.handler.ApplyStatusHandler"></result>
    <result property="applyUserId" column="apply_user_id"></result>
    <result property="applyUser" column="apply_user"></result>
    <result property="arrivalTime" column="arrival_time"></result>
    <result property="articleNumber" column="articleNumber"></result>
    <result property="projectManage" column="projectManage"/>
    <result property="project" column="project"/>
    <association property="reagent" javaType="com.nanometer.smartlab.entity.SysReagent">
@@ -359,6 +361,16 @@
        LEFT JOIN sys_user as su1 on su1.id = project.sys_user_id
        where oa.valid_flag = 1 and (oa.status=4 or oa.status=6)
        <include refid="getOpeApplyReserveList_queryWhereSql" />
        <if test="isAllApply != null">
            <choose>
                <when test="isAllApply == 1">
                    and oa.used = oa.num
                </when>
                <otherwise>
                    and oa.used != oa.num
                </otherwise>
            </choose>
        </if>
        GROUP BY oa.id
        )as oaa
    </select>
@@ -397,6 +409,7 @@
        bm1.meta_value productHome,
        sr.dangerous_flag,
        oa.num,
        oa.apply_user_id apply_user,
        oa.used,
        su.`name` apply_user_id,
        su.project,
@@ -414,6 +427,16 @@
        LEFT JOIN sys_user as su1 on su1.id = project.sys_user_id
        where oa.valid_flag = 1 and (oa.status=4 or oa.status=6)
        <include refid="getOpeApplyReserveList_queryWhereSql" />
        <if test="isAllApply != null">
            <choose>
                <when test="isAllApply == 1">
                    and oa.used = oa.num
                </when>
                <otherwise>
                    and oa.used != oa.num
                </otherwise>
            </choose>
        </if>
        GROUP BY oa.id
        order by oa.update_time desc
        <if test="first != null and pageSize != null">
@@ -466,4 +489,18 @@
    <update id="updateByReId" parameterType="java.util.Map">
        update ope_apply set reagent_id=#{newReId} where reagent_id=#{oldReId}
    </update>
    <update id="updateOpeApplyInfo" parameterType="java.util.Map">
        update
        ope_apply
        set status = #{status}
        <if test="arrivalTime!=null" >
            ,arrival_time = #{arrivalTime}
        </if>
        <if test="consigneeId!=null" >
            ,consignee_id = #{consigneeId}
        </if>
        where valid_flag = 1
        and id = #{applyId}
    </update>
</mapper>