|
@@ -127,7 +127,7 @@
|
|
N.snr,
|
|
N.snr,
|
|
N.protocoltype,
|
|
N.protocoltype,
|
|
LI.updatetime as updateTime,
|
|
LI.updatetime as updateTime,
|
|
- L.faultstatus,
|
|
|
|
|
|
+ L.faultstatus as faultStatus,
|
|
L.mode,
|
|
L.mode,
|
|
N.hw_version as hwVersion,
|
|
N.hw_version as hwVersion,
|
|
N.sw_version as swVersion,
|
|
N.sw_version as swVersion,
|
|
@@ -138,7 +138,7 @@
|
|
L.policy_type as policyType,
|
|
L.policy_type as policyType,
|
|
L.policyid as policyId,
|
|
L.policyid as policyId,
|
|
L.longitude,
|
|
L.longitude,
|
|
- L.latitude,L.new_faultstatus,L.install_date,L.expiration_date,
|
|
|
|
|
|
+ L.latitude,L.new_faultstatus as newFaultStatus,L.install_date,L.expiration_date,
|
|
P.name as policyName,AI.status as alarmStatus,AI.id as alarmid,AI.stralarmtype,
|
|
P.name as policyName,AI.status as alarmStatus,AI.id as alarmid,AI.stralarmtype,
|
|
CD.dueDate,CD.workingCondition,CD.remainGprs,CD.useGprs,CD.totalGprs,CD.comboName,CD.comboType,CD.id as card_id
|
|
CD.dueDate,CD.workingCondition,CD.remainGprs,CD.useGprs,CD.totalGprs,CD.comboName,CD.comboType,CD.id as card_id
|
|
from lampinfo L
|
|
from lampinfo L
|
|
@@ -206,7 +206,7 @@
|
|
L.macAddress,L.section_id as loopNumber,G.name as `group`,N.network_name as network,N.rssi,
|
|
L.macAddress,L.section_id as loopNumber,G.name as `group`,N.network_name as network,N.rssi,
|
|
L.lamp_pole_id as lampPoleId,LP.name as lampPoleName,L.control_type as controlType,
|
|
L.lamp_pole_id as lampPoleId,LP.name as lampPoleName,L.control_type as controlType,
|
|
L.lighteness,N.status as netStatus,LI.colour_value as colourValue,LI.used_energy_total as usedEnergyTotal,LI.updatetime,LI.work_time_total as workTimeTotal,
|
|
L.lighteness,N.status as netStatus,LI.colour_value as colourValue,LI.used_energy_total as usedEnergyTotal,LI.updatetime,LI.work_time_total as workTimeTotal,
|
|
- LI.gridPF,LI.used_energy_tonight as usedEnergyTonight,L.faultstatus,N.snr,N.rssi,AI.id as alarmId,
|
|
|
|
|
|
+ LI.gridPF,LI.used_energy_tonight as usedEnergyTonight,L.faultstatus as faultStatus,N.snr,N.rssi,AI.id as alarmId,
|
|
AI.stralarmtype as alarmInfo,S.timezone,L.status as lampStatas,L.freqId,
|
|
AI.stralarmtype as alarmInfo,S.timezone,L.status as lampStatas,L.freqId,
|
|
L.ratedpower as power,L.address as imei,N.simid,L.name,N.sw_version as solfVersion,
|
|
L.ratedpower as power,L.address as imei,N.simid,L.name,N.sw_version as solfVersion,
|
|
N.hw_version as hardVersion,L.install_date,L.expiration_date,L.mode
|
|
N.hw_version as hardVersion,L.install_date,L.expiration_date,L.mode
|
|
@@ -244,7 +244,7 @@
|
|
L.macAddress,L.section_id as loopNumber,G.name as `group`,N.network_name as network,N.rssi,
|
|
L.macAddress,L.section_id as loopNumber,G.name as `group`,N.network_name as network,N.rssi,
|
|
L.lamp_pole_id as lampPoleId,LP.name as lampPoleName,L.control_type as controlType,
|
|
L.lamp_pole_id as lampPoleId,LP.name as lampPoleName,L.control_type as controlType,
|
|
L.lighteness,N.status as netStatus,LI.colour_value as colourValue,LI.used_energy_total as usedEnergyTotal,LI.updatetime,LI.work_time_total as workTimeTotal,
|
|
L.lighteness,N.status as netStatus,LI.colour_value as colourValue,LI.used_energy_total as usedEnergyTotal,LI.updatetime,LI.work_time_total as workTimeTotal,
|
|
- LI.gridPF,LI.used_energy_tonight as usedEnergyTonight,L.faultstatus,N.snr,N.rssi,AI.id as alarmId,
|
|
|
|
|
|
+ LI.gridPF,LI.used_energy_tonight as usedEnergyTonight,L.faultstatus as faultStatus,N.snr,N.rssi,AI.id as alarmId,
|
|
AI.stralarmtype as alarmInfo,S.timezone,L.status as lampStatas,L.freqId,
|
|
AI.stralarmtype as alarmInfo,S.timezone,L.status as lampStatas,L.freqId,
|
|
L.ratedpower as power,L.address as imei,N.simid,L.name,N.sw_version as solfVersion,
|
|
L.ratedpower as power,L.address as imei,N.simid,L.name,N.sw_version as solfVersion,
|
|
N.hw_version as hardVersion,L.install_date,L.expiration_date
|
|
N.hw_version as hardVersion,L.install_date,L.expiration_date
|
|
@@ -375,7 +375,7 @@
|
|
N.snr,
|
|
N.snr,
|
|
N.protocoltype,
|
|
N.protocoltype,
|
|
LI.updatetime as updateTime,
|
|
LI.updatetime as updateTime,
|
|
- L.faultstatus,
|
|
|
|
|
|
+ L.faultstatus as faultStatus,
|
|
L.mode,
|
|
L.mode,
|
|
N.hw_version as hwVersion,
|
|
N.hw_version as hwVersion,
|
|
N.sw_version as swVersion,
|
|
N.sw_version as swVersion,
|
|
@@ -386,7 +386,7 @@
|
|
L.policy_type as policyType,
|
|
L.policy_type as policyType,
|
|
L.policyid as policyId,
|
|
L.policyid as policyId,
|
|
L.longitude,
|
|
L.longitude,
|
|
- L.latitude,L.new_faultstatus
|
|
|
|
|
|
+ L.latitude,L.new_faultstatus as newFaultStatus
|
|
from lampinfo L
|
|
from lampinfo L
|
|
left join section as S on S.id = L.sectionid
|
|
left join section as S on S.id = L.sectionid
|
|
left join global_location as G on G.id = S.pid
|
|
left join global_location as G on G.id = S.pid
|
|
@@ -455,7 +455,7 @@
|
|
<select id="getLampInfoListByDTO" resultType="com.welampiot.dto.LampInfoDTO">
|
|
<select id="getLampInfoListByDTO" resultType="com.welampiot.dto.LampInfoDTO">
|
|
select l.id,l.number,l.status,l.lighteness,n.status as netStatus,l1.grid_active_power as power,l.updatetime as updateTime,
|
|
select l.id,l.number,l.status,l.lighteness,n.status as netStatus,l1.grid_active_power as power,l.updatetime as updateTime,
|
|
l1.gridvolt as voltage,l1.gridcurr as current,l1.gridPF,l1.used_energy_tonight as usedEnergyTonight,l1.work_time_total as lightTime,
|
|
l1.gridvolt as voltage,l1.gridcurr as current,l1.gridPF,l1.used_energy_tonight as usedEnergyTonight,l1.work_time_total as lightTime,
|
|
- l.faultstatus,l.longitude,l.latitude,l.groupid as groupId,l.loopid as loopId,n.rssi,n.snr,l1.used_energy_total as usedEnergyTotal,
|
|
|
|
|
|
+ l.faultstatus as faultStatus,l.longitude,l.latitude,l.groupid as groupId,l.loopid as loopId,n.rssi,n.snr,l1.used_energy_total as usedEnergyTotal,
|
|
l.control_type as controlType,l.colour_val as colourVal,a.id as alarmId,s.timezone
|
|
l.control_type as controlType,l.colour_val as colourVal,a.id as alarmId,s.timezone
|
|
from lampinfo l
|
|
from lampinfo l
|
|
left join network n on l.networkid = n.id
|
|
left join network n on l.networkid = n.id
|
|
@@ -1048,6 +1048,95 @@
|
|
</foreach>
|
|
</foreach>
|
|
</if>
|
|
</if>
|
|
</select>
|
|
</select>
|
|
|
|
+ <select id="getMapDataByVO" resultType="com.welampiot.dto.LampInfoDTO" parameterType="com.welampiot.vo.MapDataVO">
|
|
|
|
+ select L.id,L.number,L.longitude,L.latitude,N.status as netStatus,
|
|
|
|
+ <choose>
|
|
|
|
+ <when test="version == 1">
|
|
|
|
+ A.english_name as area,
|
|
|
|
+ </when>
|
|
|
|
+ <when test="version == 2">
|
|
|
|
+ A.ru_name as area,
|
|
|
|
+ </when>
|
|
|
|
+ <otherwise>
|
|
|
|
+ A.chinese_name as area,
|
|
|
|
+ </otherwise>
|
|
|
|
+ </choose>
|
|
|
|
+ S.name as section,L.status,L.lighteness,LI.gridvolt as voltage,LI.gridcurr as current,LI.day_gener_energy as dayConsumption,LI.work_time_total as lightTime,LI.updatetime as updateTime,L.loopid,LI.grid_active_power as power,N.rssi,N.snr,L.faultstatus as faultStatus,L.new_faultstatus as newFaultStatus,AI.stralarmtype,LO.name as loopName,AI.id as alarmId,L.name,L.install_date as installDate,L.expiration_date as expirationDate
|
|
|
|
+ from lampinfo L
|
|
|
|
+ left join network N on L.networkid = N.id
|
|
|
|
+ left join section S on L.sectionid = S.id
|
|
|
|
+ left join global_location A on A.id = S.pid
|
|
|
|
+ left join `loop` LO on LO.id = L.loopid
|
|
|
|
+ left join policy P on P.id = L.policyid
|
|
|
|
+ left join lamp_info_log_new LI on L.id = LI.lampid
|
|
|
|
+ left join (select t1.* from all_alarm_info_log t1, (select lampid, max(updatetime) as maxtime from all_alarm_info_log group by lampid) t2 where t1.lampid = t2.lampid and t1.updatetime = t2.maxtime) AI on L.id = AI.lampid
|
|
|
|
+ where L.lamp_pole_id = 0
|
|
|
|
+ <if test="sectionList != null and !sectionList.isEmpty()">
|
|
|
|
+ and L.sectionid in
|
|
|
|
+ <foreach item="vo" collection="sectionList" open="(" separator="," close=")">
|
|
|
|
+ #{vo}
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="keyword != null and !keyword.isEmpty()">
|
|
|
|
+ and L.number like "%#{keyword}%"
|
|
|
|
+ </if>
|
|
|
|
+ <choose>
|
|
|
|
+ <when test="!lngLow.isEmpty() and !lngHigh.isEmpty() and Double.parseDouble(lngLow) > Double.parseDouble(lngHigh)">
|
|
|
|
+ and ((L.longitude >= #{lngLow} and L.longitude <= 180) or (L.longitude <= #{lngLow} and L.longitude >= -180))
|
|
|
|
+ </when>
|
|
|
|
+ <otherwise>
|
|
|
|
+ <if test="!lngLow.isEmpty()">
|
|
|
|
+ and L.longitude >= #{lngLow}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="!lngHigh.isEmpty()">
|
|
|
|
+ and L.longitude <= #{lngHigh}
|
|
|
|
+ </if>
|
|
|
|
+ </otherwise>
|
|
|
|
+ </choose>
|
|
|
|
+ <if test="!latLow.isEmpty()">
|
|
|
|
+ and L.latitude >= #{latLow}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="!latHigh.isEmpty()">
|
|
|
|
+ and L.latitude <= #{latHigh}
|
|
|
|
+ </if>
|
|
|
|
+ group by L.id
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <select id="getNewMapDataByVO" resultType="com.welampiot.dto.LampInfoDTO" parameterType="com.welampiot.vo.MapDataVO">
|
|
|
|
+ select L.id,L.number,L.longitude,L.latitude,N.status as netStatus,L.status,L.lighteness as light,N.rssi,N.snr,L.faultstatus,L.name
|
|
|
|
+ from lampinfo L
|
|
|
|
+ left join network N on L.networkid = N.id
|
|
|
|
+ where L.lamp_pole_id = 0
|
|
|
|
+ <if test="sectionList != null and !sectionList.isEmpty()">
|
|
|
|
+ and L.sectionid in
|
|
|
|
+ <foreach item="vo" collection="sectionList" open="(" separator="," close=")">
|
|
|
|
+ #{vo}
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="keyword != null and !keyword.isEmpty()">
|
|
|
|
+ and L.number like "%#{keyword}%"
|
|
|
|
+ </if>
|
|
|
|
+ <choose>
|
|
|
|
+ <when test="!lngLow.isEmpty() and !lngHigh.isEmpty() and Double.parseDouble(lngLow) > Double.parseDouble(lngHigh)">
|
|
|
|
+ and ((L.longitude >= #{lngLow} and L.longitude <= 180) or (L.longitude <= #{lngLow} and L.longitude >= -180))
|
|
|
|
+ </when>
|
|
|
|
+ <otherwise>
|
|
|
|
+ <if test="!lngLow.isEmpty()">
|
|
|
|
+ and L.longitude >= #{lngLow}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="!lngHigh.isEmpty()">
|
|
|
|
+ and L.longitude <= #{lngHigh}
|
|
|
|
+ </if>
|
|
|
|
+ </otherwise>
|
|
|
|
+ </choose>
|
|
|
|
+ <if test="!latLow.isEmpty()">
|
|
|
|
+ and L.latitude >= #{latLow}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="!latHigh.isEmpty()">
|
|
|
|
+ and L.latitude <= #{latHigh}
|
|
|
|
+ </if>
|
|
|
|
+ group by L.id
|
|
|
|
+ </select>
|
|
|
|
|
|
<!-- 灯控路段故障数前十 -->
|
|
<!-- 灯控路段故障数前十 -->
|
|
<select id="getLampSectionAlarmCountTop" resultType="LampInfoDTO">
|
|
<select id="getLampSectionAlarmCountTop" resultType="LampInfoDTO">
|