소스 검색

巡检路线设备处理

lipenghui 1 개월 전
부모
커밋
1b071b4842
1개의 변경된 파일4개의 추가작업 그리고 3개의 파일을 삭제
  1. 4 3
      yudao-module-pms/yudao-module-pms-biz/src/main/resources/mapper/static/IotInspectRouteMapper.xml

+ 4 - 3
yudao-module-pms/yudao-module-pms-biz/src/main/resources/mapper/static/IotInspectRouteMapper.xml

@@ -11,10 +11,11 @@
     <select id="getRoute"
             resultType="cn.iocoder.yudao.module.pms.dal.dataobject.inspect.IotInspectRouteDO">
         select* from (select * from (select route.route_name, device.device_name, device.id device_id,route.id, route.item_json,route.create_time,device.dept_id, device.device_code from
-            (select * from rq_iot_inspect_route where device_id is null) route
-        left join rq_iot_device device on route.device_classify = device.asset_class)a where a.device_id not in (select device_id from rq_iot_inspect_route where device_id is not null)
+        (select * from rqiot.rq_iot_inspect_route where device_id is null and deleted=0) route
+        left join (select * from rqiot.rq_iot_device where deleted=0) device on route.device_classify = device.asset_class)a where a.device_id not in (select device_id from rqiot.rq_iot_inspect_route where device_id is not null)
         union all
-        select route_name, device_name, device_id,id,item_json,create_time,dept_id,device_code from rq_iot_inspect_route where device_id is not null)fin
+        select route_name, device_name, device_id,id,item_json,create_time,dept_id,device_code from rqiot.rq_iot_inspect_route where device_id is not null
+        and deleted=0)fin
         <where>
         <if test="reqVO.deviceName!=null and reqVO.deviceName!=''">
             and fin.device_name LIKE CONCAT('%',#{reqVO.deviceName},'%')