|
@@ -82,6 +82,54 @@
|
|
|
</select>
|
|
|
|
|
|
<select id="getPlanDeviceList" resultMap="planFactoryMap">
|
|
|
+ SELECT
|
|
|
+ t1.belong_station_id,
|
|
|
+ t1.belong_Pump_Id,
|
|
|
+ t1.category,
|
|
|
+ t1.id as device_Id,
|
|
|
+ t1.type as device_Type,
|
|
|
+ t1.latitude,
|
|
|
+ t1.longitude,
|
|
|
+ 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
|
|
|
+ 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
|
|
|
+ RIGHT 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}
|
|
|
+ </if>
|
|
|
+ <if test="dto.belongStationId != null ">
|
|
|
+ and t1.belong_station_id =#{dto.belongStationId}
|
|
|
+ </if>
|
|
|
+ <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>
|
|
|
+ <if test="dto.belongPumpName != null and dto.belongPumpName != '' ">
|
|
|
+ and t3.name like CONCAT ('%',#{dto.belongPumpName,jdbcType=VARCHAR},'%')
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="getDeviceList" resultMap="planFactoryMap">
|
|
|
SELECT
|
|
|
t1.belong_station_id,
|
|
|
t1.belong_Pump_Id,
|