From 3e6202c61c182bc26150f1e30caa9c9519659cc8 Mon Sep 17 00:00:00 2001 From: 李宇 <986321569@qq.com> Date: 星期二, 17 八月 2021 13:35:58 +0800 Subject: [PATCH] 修改个人领用查询 --- src/main/java/com/nanometer/smartlab/dao/SysReagentDao.xml | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/nanometer/smartlab/dao/SysReagentDao.xml b/src/main/java/com/nanometer/smartlab/dao/SysReagentDao.xml index 0c3bb58..6cb3fa6 100644 --- a/src/main/java/com/nanometer/smartlab/dao/SysReagentDao.xml +++ b/src/main/java/com/nanometer/smartlab/dao/SysReagentDao.xml @@ -118,6 +118,7 @@ AND f.user_id= #{user} WHERE f.id IS NOT NULL and sr.valid_flag = 1 + and supplier.valid_flag = 1 and sr.type != 3 <if test="cas != null and cas != ''"> and sr.cas like concat("%", #{cas} ,"%") @@ -149,6 +150,7 @@ AND f.user_id = #{user} AND f.id IS NULL where sr.valid_flag = 1 + and supplier.valid_flag = 1 and sr.type != 3 <if test="cas != null and cas != ''"> and sr.cas like concat("%", #{cas} ,"%") @@ -247,13 +249,12 @@ <select id="getSysReagentListNew" parameterType="java.util.Map" resultMap="SysReagent"> select sr.*, ss.meta_value as product_home_name, ifnull(w.reserve,0) as reserve, bm.meta_value as control_products_name,supplier.name as supplierName from sys_reagent as sr - left join base_meta as ss on sr.product_home = ss.id left join base_meta bm on bm.id = sr.control_products left join (select reagent_id, sum(reserve) reserve from ope_warehouse_reserve where valid_flag = 1 group by reagent_id) w on w.reagent_id = sr.id - left join sys_supplier supplier on supplier.id = sr.supplier_id where sr.valid_flag = 1 + and supplier.valid_flag = 1 <if test="cas != null and cas != ''"> and sr.cas = #{cas} </if> @@ -299,6 +300,7 @@ left join sys_supplier supplier on supplier.id = sr.supplier_id LEFT JOIN favor f on f.reagent_id = sr.id AND f.user_id = #{user} where sr.valid_flag = 1 + and supplier.valid_flag = 1 <if test="cas != null and cas != ''"> and sr.cas like concat("%", #{cas} ,"%") </if> @@ -316,7 +318,9 @@ <select id="getSysReagentTotalCountNew" parameterType="java.util.Map" resultType="int"> select count(1) from sys_reagent as sr + LEFT JOIN sys_supplier ss on ss.id = sr.supplier_id where sr.valid_flag = 1 + and ss.valid_flag = 1 <if test="cas != null and cas != ''"> and sr.cas = #{cas} </if> -- Gitblit v1.9.2