Przeglądaj źródła

1.修改测温记录查询,可以查看单位拥有设备中的测温记录。

zhengqiang 5 lat temu
rodzic
commit
e857720d32

+ 14 - 12
common/src/main/resources/mapper/base/PersonDeviceLog.xml

@@ -152,18 +152,20 @@
                 </foreach>
             </if>
             <if test="searchParams.companyCode != null">
-                and exists (
-                    select t1.id_ from base_person_info t1,base_company_info t2
-                    where t1.company_id =t2.id_
-                    and t2.code_ like #{searchParams.companyCode}
-                    and t1.del_flag=0 and t1.id_ = a.person_id
-                )
-                or
-                exists (
-                    select t1.id_ from base_device_info t1,base_company_info t2
-                    where t1.company_id =t2.id_
-                    and t2.code_ like #{searchParams.companyCode}
-                    and t1.device_no = a.device_no
+                and (
+                    exists (
+                        select t1.id_ from base_person_info t1,base_company_info t2
+                        where t1.company_id =t2.id_
+                        and t2.code_ like #{searchParams.companyCode}
+                        and t1.del_flag=0 and t1.id_ = a.person_id
+                    )
+                    or
+                    exists (
+                        select t1.id_ from base_device_info t1,base_company_info t2
+                        where t1.company_id =t2.id_
+                        and t2.code_ like #{searchParams.companyCode}
+                        and t1.device_no = a.device_no
+                    )
                 )
             </if>
             <if test="searchParams.personId != null">