| | |
| | | |
| | | <delete id="deleteStationAndLockList"> |
| | | <foreach collection="list" item="item" separator=";"> |
| | | delete from db_user.tb_baojigroup_power where baoji_id = #{item.baojiId} and |
| | | delete from db_user.tb_baojigroup_power where baoji_group_id = #{item.baojiId} and |
| | | station_id = #{item.stationId} and power_id=#{item.powerId} |
| | | </foreach> |
| | | </delete> |
| | |
| | | where |
| | | tb_baojigroup_power.station_id=tb_station_inf.station_id |
| | | and tb_baojigroup_power.power_id=tb_power_inf.power_id |
| | | and baoji_id=#{id} |
| | | order by tb_baojigroup_power.baoji_id asc ,tb_baojigroup_power.station_id asc,tb_baojigroup_power.power_id asc |
| | | and baoji_group_id=#{id} |
| | | order by tb_baojigroup_power.baoji_group_id asc ,tb_baojigroup_power.station_id asc,tb_baojigroup_power.power_id asc |
| | | </select> |
| | | <select id="getHomeStationAndLock" resultType="com.whyc.pojo.db_user.BaojigroupPower"> |
| | | select distinct tb_baojigroup_power.station_id,tb_baojigroup_power.power_id |
| | | from db_user.tb_baojigroup_power,db_user.tb_baojigroup_usr |
| | | <where> |
| | | tb_baojigroup_power.baoji_id=tb_baojigroup_usr.baoji_id |
| | | tb_baojigroup_power.baoji_group_id=tb_baojigroup_usr.baoji_group_id |
| | | <if test="uid>100"> |
| | | and tb_baojigroup_usr.uid=#{uid} |
| | | </if> |
| | |
| | | select distinct tb_baojigroup_power.power_id |
| | | from db_user.tb_baojigroup_power |
| | | <where> |
| | | tb_baojigroup_power.baoji_id=#{baojiId} |
| | | tb_baojigroup_power.baoji_group_id=#{baojiId} |
| | | and tb_baojigroup_power.station_id=#{stationId} |
| | | </where> |
| | | </select> |
| | |
| | | select distinct l.power_id,l.power_name,l.station_id,s.station_name |
| | | from db_user.tb_baojigroup_power bl ,db_station.tb_power_inf l,db_station.tb_station_inf s |
| | | where bl.power_id = l.power_id and bl.station_id = s.station_id |
| | | and l.del_flag=0 |
| | | and bl.baoji_id = #{id} |
| | | and bl.baoji_group_id = #{id} |
| | | order by s.station_name |
| | | </select> |
| | | <select id="getPowerList" resultType="com.whyc.pojo.db_station.PowerInf"> |
| | | select distinct l.power_id,l.power_name,l.station_id,s.station_name |
| | | from db_user.tb_baojigroup_power bl ,db_station.tb_power_inf l,db_station.tb_station_inf s |
| | | where bl.power_id = l.power_id and bl.station_id = s.station_id |
| | | and l.del_flag=0 |
| | | and bl.baoji_id = #{id} |
| | | and bl.baoji_group_id = #{id} |
| | | order by s.station_name |
| | | </select> |
| | | </mapper> |