select c.id,c.num,c.online,c.status,c.updateTime,c.starttime as startTime,c.endtime as endTime,
c.equipmentElectricity,c.free,c.connectorNum,c.hourEnergy,c.alarmStatus,c.alarmInfo,
c.install_date installDate,c.expiration_date expirationDate,s.timezone,lp.name as lampPoleName
from charge c left join lamp_pole lp on lp.id = c.lamp_pole_id
left join section s on lp.sectionid = s.id
where c.lamp_pole_id != 0
and lp.sectionid in
#{dto}
and c.num like '%${keyword}%'
order by convert(lp.number using gbk) asc,c.id desc
limit #{page},#{count}
select count(c.id) as total
from charge c left join lamp_pole lp on lp.id = c.lamp_pole_id
where 1=1
and lp.sectionid in
#{dto}
and c.num like '%${keyword}%'
select count(c.id) as total
from charge c left join lamp_pole lp on lp.id = c.lamp_pole_id
where c.online = 1
and lp.sectionid in
#{dto}
and c.num like '%${keyword}%'
select count(c.id) as total
from charge c left join lamp_pole lp on lp.id = c.lamp_pole_id
where c.online = 1 and c.alarmStatus = 1
and lp.sectionid in
#{dto}
and c.num like '%${keyword}%'
select count(c.id) as total
from charge c left join lamp_pole lp on lp.id = c.lamp_pole_id
where c.online = 1 and c.status = 1
and lp.sectionid in
#{dto}
and c.num like '%${keyword}%'
select c.id,c.duration
from charge c left join lamp_pole lp on lp.id = c.lamp_pole_id
where 1=1
and lp.sectionid in
#{dto}
and c.num like '%${keyword}%'
select c.id,c.free
from charge c left join lamp_pole lp on lp.id = c.lamp_pole_id
where 1=1
and lp.sectionid in
#{dto}
and c.num like '%${keyword}%'
select c.id,c.equipmentElectricity
from charge c left join lamp_pole lp on lp.id = c.lamp_pole_id
where 1=1
and lp.sectionid in
#{dto}
and c.num like '%${keyword}%'
select c.type,c.macVoltage,c.power,c.macCurrent,c.voltage,c.current,c.model,c.num,c.chargeModel,
c.electricityFee,c.serviceFee,c.connectorCode,c.stationCode,c.createtime as createTime,
c.status,c.bill_amt as billAmt,c.energy,c.starttime as startTime,c.endtime as endTime,
c.duration,c.free,c.connectorNum,c.equipmentElectricity,c.macVoltage,c.serviceFee,c.connectorNum
from charge c
where c.lamp_pole_id = #{lampPoleId}
limit 1
delete
from charge
where id = #{id};
select c.lamp_pole_id
from charge c
where c.id = #{id}
select count(*)
from charge c
where c.lamp_pole_id = #{lampPoleId}
update charge c
set
c.num = #{num},
c.model = #{model},
c.install_date = #{installDate},
c.expiration_date = #{expirationDate},
c.power = #{power},
c.chargeModel = #{chargeModel}
where 1=1
and c.lamp_pole_id = #{lampPoleId}
and c.id = #{id}
select count(*)
from charge c
where 1=1
and c.lamp_pole_id != #{lampPoleId}
and c.num = #{num}
and c.id != #{id}
select
sum(c.equipmentElectricity) as equipmentElectricity,
sum(c.free) as free
from charge c
left join lamp_pole lp on lp.id = c.lamp_pole_id
where 1=1
and lp.sectionid in
#{item}
and lp.sectionid = #{sectionId}
and lp.areaid = #{areaId}
select
c.id,
c.current,
c.voltage,
c.free,
c.equipmentElectricity,
c.duration,
c.status
,g1.chinese_name as area,g2.chinese_name as city,g3.chinese_name as province
,g1.english_name as area,g2.english_name as city,g3.english_name as province
,g1.ru_name as area,g2.ru_name as city,g3.ru_name as province
from charge c
left join lamp_pole lp on lp.id = c.lamp_pole_id
left join section s on lp.sectionid = s.id
left join global_location g1 on s.pid = g1.id
left join global_location g2 on g1.pid = g2.id
left join global_location g3 on g2.pid = g3.id
where c.lamp_pole_id != 0
and lp.sectionid in
#{item}
and lp.sectionid = #{sectionId}
and lp.areaid = #{areaId}
limit #{page},#{count}
select count(*)
from charge c
left join lamp_pole lp on lp.id = c.lamp_pole_id
where c.lamp_pole_id != 0
and lp.sectionid in
#{item}
and lp.sectionid = #{sectionId}
and lp.areaid = #{areaId}
select C.id
from charge C
left join lamp_pole P on P.id = C.lamp_pole_id
where P.areaid = #{areaId} and P.sectionid = #{sectionid}
and C.num = #{number}
and C.model = #{model}
and C.num = #{number} and C.model = #{model}
select status,online,equipmentElectricity,bill_amt as billAmt
from charge
where lamp_pole_id = #{lampPoleId} order by id desc