1.微调
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
<if test="type == 1">
|
||||
pq_dept_line.id unitId,
|
||||
point.id pointId,
|
||||
lineDetail.Time_Interval as interval,
|
||||
lineDetail.Time_Interval as timeInterval,
|
||||
lineDetail.load_type lineTag,
|
||||
dic.id voltageLevel,
|
||||
dev.id devId,
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
|
||||
<select id="getMonitorDetail" resultType="com.njcn.device.biz.pojo.dto.LineDevGetDTO">
|
||||
select a.id pointId,a.name pointName,b.Time_Interval interval
|
||||
select a.id pointId,a.name pointName,b.Time_Interval timeInterval
|
||||
from pq_line a
|
||||
inner join pq_line_detail b on a.id=b.id
|
||||
where a.id = #{monitorId}
|
||||
|
||||
@@ -1156,7 +1156,7 @@
|
||||
<select id="getLineBySubStation" resultType="com.njcn.device.biz.pojo.dto.LineDevGetDTO">
|
||||
SELECT
|
||||
pq_line.id pointId,
|
||||
lineDetail.Time_Interval interval,
|
||||
lineDetail.Time_Interval timeInterval,
|
||||
dev.id devId,
|
||||
device.com_flag
|
||||
FROM
|
||||
@@ -1177,7 +1177,7 @@
|
||||
</select>
|
||||
|
||||
<select id="getMonitorListDetail" resultType="com.njcn.device.biz.pojo.dto.LineDevGetDTO">
|
||||
select line.id pointId,dev.id devId,0 type,1 lineType,lineDetail.Time_Interval as interval
|
||||
select line.id pointId,dev.id devId,0 type,1 lineType,lineDetail.Time_Interval as timeInterval
|
||||
from pq_line line
|
||||
inner join pq_line_detail lineDetail on line.id = lineDetail.id
|
||||
inner join pq_line subv on line.pid = subv.id
|
||||
|
||||
@@ -188,6 +188,7 @@ public class LineServiceImpl extends ServiceImpl<LineMapper, Line> implements Li
|
||||
@Override
|
||||
public CommunicateVO getComFlagInfoData(String id, String searchBeginTime, String searchEndTime) {
|
||||
String devId = lineMapper.getDevIndex(id);
|
||||
Device device = deviceMapper.selectById(devId);
|
||||
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
List<PqsCommunicate> communicateList = getCommunicate(devId, searchBeginTime, searchEndTime);
|
||||
CommunicateVO communicateVOList = new CommunicateVO();
|
||||
@@ -208,6 +209,7 @@ public class LineServiceImpl extends ServiceImpl<LineMapper, Line> implements Li
|
||||
Long time = instant.toEpochMilli();
|
||||
String timeText = df.format(time);
|
||||
updateTime.add(timeText);
|
||||
//取反(正常来时,有变动才会有数据)
|
||||
if(CollUtil.isNotEmpty(communicateList)){
|
||||
if(communicateList.get(0).getType()==0){
|
||||
comType.add(1);
|
||||
@@ -215,7 +217,7 @@ public class LineServiceImpl extends ServiceImpl<LineMapper, Line> implements Li
|
||||
comType.add(0);
|
||||
}
|
||||
}else{
|
||||
comType.add(1);
|
||||
comType.add(device.getComFlag());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -248,7 +250,7 @@ public class LineServiceImpl extends ServiceImpl<LineMapper, Line> implements Li
|
||||
if(CollUtil.isNotEmpty(communicateList)){
|
||||
comType.add(communicateList.get(communicateList.size()-1).getType());
|
||||
}else{
|
||||
comType.add(1);
|
||||
comType.add(device.getComFlag());
|
||||
}
|
||||
}
|
||||
communicateVOList.setUpdateTime(updateTime);
|
||||
|
||||
Reference in New Issue
Block a user