Browse Source

设备查询增加部门判断

wangyangyang 4 years ago
parent
commit
d24ce42114
1 changed files with 4 additions and 0 deletions
  1. 4 0
      sms_water/src/main/resources/mapper/DeviceMapper.xml

+ 4 - 0
sms_water/src/main/resources/mapper/DeviceMapper.xml

@@ -190,6 +190,10 @@
         <if test="deviceDto.deptOrgId != null and deviceDto.deptOrgId != 0 ">
             and d.DEPT_ORG_ID =#{deviceDto.deptOrgId}
         </if>
+        <if test="deviceDto.deptOrgId == null or deviceDto.deptOrgId == 0 ">
+            and d.DEPT_ORG_ID is null
+        </if>
+
         <if test="deviceDto.enableState != null ">
             and d.ENABLE_STATE =#{deviceDto.enableState}
         </if>