浏览代码

sql优化处理

linzhiwei 2 年之前
父节点
当前提交
9d61ee06c1
共有 1 个文件被更改,包括 2 次插入13 次删除
  1. 2 13
      snws-gps/snws-gps-boot/src/main/resources/mapper/plan/PlanFactoryMapper.xml

+ 2 - 13
snws-gps/snws-gps-boot/src/main/resources/mapper/plan/PlanFactoryMapper.xml

@@ -141,18 +141,13 @@
         t1.location address,
         t2.name belongStationName,
         t3.name belongPumpName,
-        t1.id as id,
-        t4.is_Over,
-        t4.OVER_DATE,
-        t4.OVER_USER,
-        t4.id as plan_Id
+        t1.id as id
         FROM tf_ywpn_monitor_device_w t1
         LEFT JOIN tf_ywpn_monitor_stationsiteinfo_w t2
         on t1.belong_station_id = t2.id
         LEFT JOIN tf_monitor_pump_station_w t3
         on t1.belong_Pump_Id = t3.id
-        LEFT JOIN tf_ywpn_plan_factory t4
-        on t1.id = t4.device_Id
+
         where 1=1
         <if test="dto.category != null ">
             and t1.category =#{dto.category}
@@ -163,12 +158,6 @@
         <if test="dto.belongPumpId != null ">
             and t1.belong_Pump_Id =#{dto.belongPumpId}
         </if>
-        <if test="dto.isOver != null ">
-            and t4.is_Over =#{dto.isOver}
-        </if>
-        <if test="dto.planId != null ">
-            and t4.PLAN_ID =#{dto.planId}
-        </if>
         <if test="dto.belongStationName != null and dto.belongStationName != '' ">
             and t2.name like CONCAT ('%',#{dto.belongStationName,jdbcType=VARCHAR},'%')
         </if>