From 5eaa5ee48d6b55246ec47c1c75ba00f8ddc0fb8f Mon Sep 17 00:00:00 2001 From: 李宇 <986321569@qq.com> Date: 星期二, 02 二月 2021 17:17:30 +0800 Subject: [PATCH] 修改危废状态 --- src/main/java/com/nanometer/smartlab/dao/OpeApplyDao.xml | 31 ++++++++++++++++++++++++++++--- 1 files changed, 28 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/nanometer/smartlab/dao/OpeApplyDao.xml b/src/main/java/com/nanometer/smartlab/dao/OpeApplyDao.xml index 38cef0d..cda1831 100644 --- a/src/main/java/com/nanometer/smartlab/dao/OpeApplyDao.xml +++ b/src/main/java/com/nanometer/smartlab/dao/OpeApplyDao.xml @@ -64,6 +64,7 @@ <result property="status" column="status" typeHandler="com.nanometer.smartlab.entity.handler.ApplyStatusHandler"></result> <result property="applyUserId" column="apply_user_id"></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 +360,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> @@ -414,6 +425,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"> @@ -470,9 +491,13 @@ <update id="updateOpeApplyInfo" parameterType="java.util.Map"> update ope_apply - set status = #{status}, - arrival_time = #{arrivalTime}, - consignee_id = #{consigneeId} + 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> -- Gitblit v1.9.2