1.调整终端周期检测功能
This commit is contained in:
@@ -21,6 +21,8 @@ public class TerminalCheckParam extends BaseParam {
|
|||||||
|
|
||||||
private String objName;
|
private String objName;
|
||||||
|
|
||||||
|
private String city;
|
||||||
|
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
private LocalDate thisCheckTime;
|
private LocalDate thisCheckTime;
|
||||||
|
|
||||||
|
|||||||
@@ -48,4 +48,6 @@ public class TerminalMaintainVO implements Serializable {
|
|||||||
private Integer strategyFlag;
|
private Integer strategyFlag;
|
||||||
@ApiModelProperty(name = "子级")
|
@ApiModelProperty(name = "子级")
|
||||||
List<TerminalMaintainVO> children;
|
List<TerminalMaintainVO> children;
|
||||||
|
|
||||||
|
private String objName;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.njcn.device.pq.mapper;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.njcn.device.pq.pojo.param.TerminalCheckParam;
|
||||||
import com.njcn.device.pq.pojo.po.Alarm;
|
import com.njcn.device.pq.pojo.po.Alarm;
|
||||||
import com.njcn.device.pq.pojo.vo.TerminalAlarmVO;
|
import com.njcn.device.pq.pojo.vo.TerminalAlarmVO;
|
||||||
import com.njcn.device.pq.pojo.vo.TerminalCheckVO;
|
import com.njcn.device.pq.pojo.vo.TerminalCheckVO;
|
||||||
@@ -44,6 +45,6 @@ public interface AlarmMapper extends BaseMapper<Alarm> {
|
|||||||
boolean updateAlarmInfo(@Param("type")String type,@Param("devLineId")String devLineId,@Param("processTime")LocalDateTime processTime,@Param("userIndex")String userIndex);
|
boolean updateAlarmInfo(@Param("type")String type,@Param("devLineId")String devLineId,@Param("processTime")LocalDateTime processTime,@Param("userIndex")String userIndex);
|
||||||
|
|
||||||
|
|
||||||
Page<TerminalCheckVO> terminalCheckPage(Page<TerminalCheckVO> page);
|
Page<TerminalCheckVO> terminalCheckPage(Page<TerminalCheckVO> page, @Param("terminalCheckParam")TerminalCheckParam terminalCheckParam);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -162,10 +162,10 @@ ORDER BY
|
|||||||
SELECT
|
SELECT
|
||||||
dev.id AS devId,
|
dev.id AS devId,
|
||||||
dev.NAME AS devName,
|
dev.NAME AS devName,
|
||||||
dept.NAME AS areaName,
|
users.city AS areaName,
|
||||||
bd.name AS bdName,
|
bd.name AS bdName,
|
||||||
detail.obj_id AS objId,
|
detail.obj_id AS objId,
|
||||||
detail.obj_name AS objName,
|
users.project_name AS objName,
|
||||||
dev_detail.this_time_check AS thisCheckTime,
|
dev_detail.this_time_check AS thisCheckTime,
|
||||||
dev_detail.next_time_check AS nextCheckTime,
|
dev_detail.next_time_check AS nextCheckTime,
|
||||||
dev_detail.login_time AS loginDate,
|
dev_detail.login_time AS loginDate,
|
||||||
@@ -190,10 +190,17 @@ ORDER BY
|
|||||||
INNER JOIN pq_line dev ON bus.pid = dev.id
|
INNER JOIN pq_line dev ON bus.pid = dev.id
|
||||||
INNER JOIN pq_device dev_detail ON dev.id = dev_detail.id
|
INNER JOIN pq_device dev_detail ON dev.id = dev_detail.id
|
||||||
INNER JOIN pq_line bd ON dev.pid = bd.id
|
INNER JOIN pq_line bd ON dev.pid = bd.id
|
||||||
INNER JOIN pq_dept_line dept_line ON line.id = dept_line.line_id
|
LEFT JOIN SUPERVISION_USER_REPORT users ON users.id = detail.obj_id
|
||||||
INNER JOIN sys_dept dept ON dept_line.id = dept.id AND dept.type = 0
|
LEFT JOIN SUPERVISION_USER_REPORT_FILE files on users.id = files.id
|
||||||
LEFT JOIN SUPERVISION_USER_REPORT_FILE files on detail.obj_id = files.id
|
<where>
|
||||||
order by overdueDay desc
|
<if test="terminalCheckParam.city!=null and terminalCheckParam.city !=''">
|
||||||
|
users.city = #{terminalCheckParam.city}
|
||||||
|
</if>
|
||||||
|
<if test="terminalCheckParam.searchValue!=null and terminalCheckParam.searchValue !=''">
|
||||||
|
and users.project_name like concat('%',#{terminalCheckParam.searchValue},'%')
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
order by checkStatus desc,loginDate desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ public class TerminalAlarmServiceImpl implements TerminalAlarmService {
|
|||||||
@Override
|
@Override
|
||||||
public Page<TerminalCheckVO> terminalCheckPage(TerminalCheckParam terminalCheckParam) {
|
public Page<TerminalCheckVO> terminalCheckPage(TerminalCheckParam terminalCheckParam) {
|
||||||
Page<TerminalCheckVO> page = new Page<>(PageFactory.getPageNum(terminalCheckParam),PageFactory.getPageSize(terminalCheckParam));
|
Page<TerminalCheckVO> page = new Page<>(PageFactory.getPageNum(terminalCheckParam),PageFactory.getPageSize(terminalCheckParam));
|
||||||
Page<TerminalCheckVO> pageResult = alarmMapper.terminalCheckPage(page);
|
Page<TerminalCheckVO> pageResult = alarmMapper.terminalCheckPage(page,terminalCheckParam);
|
||||||
return pageResult;
|
return pageResult;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -209,18 +209,24 @@
|
|||||||
|
|
||||||
|
|
||||||
<select id="getDeviceByIdOnOrOff" resultType="com.njcn.device.pq.pojo.vo.TerminalBaseVO">
|
<select id="getDeviceByIdOnOrOff" resultType="com.njcn.device.pq.pojo.vo.TerminalBaseVO">
|
||||||
SELECT
|
SELECT distinct
|
||||||
case when
|
case when
|
||||||
t3.obj_id is not null and t3.obj_id !='' then t3.obj_name
|
t4.obj_id is not null and t4.obj_id !='' then t4.obj_name
|
||||||
else sub.name end subName,
|
else sub.name end subName,
|
||||||
t1.id devId,t1.name devName,t2.ip,t2.dev_type,t2.update_time,gd.name gdName
|
t1.id devId,t1.name devName,t2.ip,t2.dev_type,t2.update_time,gd.name gdName
|
||||||
FROM
|
FROM
|
||||||
|
pq_line t3,
|
||||||
|
pq_line_detail t4,
|
||||||
|
pq_line bus,
|
||||||
pq_line t1,
|
pq_line t1,
|
||||||
pq_device t2,
|
pq_device t2,
|
||||||
pq_line sub,
|
pq_line sub,
|
||||||
pq_line gd
|
pq_line gd
|
||||||
WHERE
|
WHERE
|
||||||
t1.id = t2.id
|
t3.id = t4.id
|
||||||
|
and t3.pid = bus.id
|
||||||
|
and bus.pid = t1.id
|
||||||
|
and t1.id = t2.id
|
||||||
and t1.pid = sub.id
|
and t1.pid = sub.id
|
||||||
and sub.pid = gd.id
|
and sub.pid = gd.id
|
||||||
<if test="deviceType.devModel!=null and deviceType.devModel.size()!=0">
|
<if test="deviceType.devModel!=null and deviceType.devModel.size()!=0">
|
||||||
|
|||||||
@@ -24,6 +24,10 @@ public interface TerminalMaintainMapper {
|
|||||||
*/
|
*/
|
||||||
List<TerminalMaintainVO> getTerminalDevInfo(@Param("devIds") List<String> devIds, @Param("comFlag") Integer comFlag, @Param("devType") String devType);
|
List<TerminalMaintainVO> getTerminalDevInfo(@Param("devIds") List<String> devIds, @Param("comFlag") Integer comFlag, @Param("devType") String devType);
|
||||||
|
|
||||||
|
|
||||||
|
List<TerminalMaintainVO> terminalConfig(@Param("devIds") List<String> devIds, @Param("comFlag") Integer comFlag, @Param("devType") String devType);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取区域
|
* 获取区域
|
||||||
* @author cdf
|
* @author cdf
|
||||||
|
|||||||
@@ -38,6 +38,35 @@
|
|||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="terminalConfig" resultType="TerminalMaintainVO">
|
||||||
|
SELECT distinct
|
||||||
|
IF(TRIM(detail.obj_name) != '', CONCAT(detail.obj_name,'_',a.NAME), a.NAME) as name,
|
||||||
|
a.id,
|
||||||
|
a.pid,
|
||||||
|
a.level,
|
||||||
|
b.run_flag,
|
||||||
|
b.ip,
|
||||||
|
b.com_flag,
|
||||||
|
b.dev_type devType
|
||||||
|
FROM
|
||||||
|
pq_line line
|
||||||
|
inner join pq_line_detail detail on line.id = detail.id
|
||||||
|
inner join pq_line bus on line.pid = bus.id
|
||||||
|
inner join pq_line a on bus.pid = a.id
|
||||||
|
INNER JOIN pq_device b ON a.id = b.id
|
||||||
|
where a.id in
|
||||||
|
<foreach collection="devIds" item="item" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
<if test="comFlag != null">
|
||||||
|
AND b.Com_Flag=#{comFlag}
|
||||||
|
</if>
|
||||||
|
<if test="devType !=null and devType != ''">
|
||||||
|
AND b.Dev_Type =#{devType}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
<select id="getGdAndSubList" resultType="TerminalMaintainVO">
|
<select id="getGdAndSubList" resultType="TerminalMaintainVO">
|
||||||
select id,name,level,pid from pq_line where level = #{level} and state = 1 order by sort
|
select id,name,level,pid from pq_line where level = #{level} and state = 1 order by sort
|
||||||
</select>
|
</select>
|
||||||
@@ -77,14 +106,17 @@
|
|||||||
|
|
||||||
<select id="getRunFlagList" resultType="TerminalMaintainVO">
|
<select id="getRunFlagList" resultType="TerminalMaintainVO">
|
||||||
SELECT
|
SELECT
|
||||||
|
IF(TRIM(detail.obj_name) != '', CONCAT(detail.obj_name,'_',a.NAME), a.NAME) as name,
|
||||||
a.id,
|
a.id,
|
||||||
a.pid,
|
a.pid,
|
||||||
a.NAME,
|
|
||||||
b.ip,
|
b.ip,
|
||||||
a.level,
|
a.level,
|
||||||
b.run_flag
|
b.run_flag
|
||||||
FROM
|
FROM
|
||||||
pq_line a
|
pq_line line
|
||||||
|
inner join pq_line_detail detail on line.id = detail.id
|
||||||
|
inner join pq_line bus on line.pid = bus.id
|
||||||
|
inner join pq_line a on bus.pid = a.id
|
||||||
INNER JOIN pq_device b ON a.id = b.id
|
INNER JOIN pq_device b ON a.id = b.id
|
||||||
WHERE a.id in
|
WHERE a.id in
|
||||||
<foreach collection="ids" item="item" separator="," index="index" open="(" close=")">
|
<foreach collection="ids" item="item" separator="," index="index" open="(" close=")">
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.njcn.device.terminal.service.impl;
|
|||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
import com.njcn.common.pojo.dto.SimpleDTO;
|
import com.njcn.common.pojo.dto.SimpleDTO;
|
||||||
@@ -108,10 +109,13 @@ public class TerminalMaintainServiceImpl implements TerminalMaintainService {
|
|||||||
terminalMaintainVO.setName(generalDeviceDTO.getName());
|
terminalMaintainVO.setName(generalDeviceDTO.getName());
|
||||||
terminalMaintainVO.setId(generalDeviceDTO.getIndex());
|
terminalMaintainVO.setId(generalDeviceDTO.getIndex());
|
||||||
terminalMaintainVO.setLevel(1);
|
terminalMaintainVO.setLevel(1);
|
||||||
List<TerminalMaintainVO> devList = terminalMaintainMapper.getTerminalDevInfo(devIds,terminalMainQueryParam.getComFlag(),terminalMainQueryParam.getDevType());
|
List<TerminalMaintainVO> devList = terminalMaintainMapper.terminalConfig(devIds,terminalMainQueryParam.getComFlag(),terminalMainQueryParam.getDevType());
|
||||||
if (CollectionUtil.isEmpty(devList)) {
|
if (CollectionUtil.isEmpty(devList)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
List<String> subIndexes = devList.stream().map(TerminalMaintainVO::getPid).collect(Collectors.toList());
|
List<String> subIndexes = devList.stream().map(TerminalMaintainVO::getPid).collect(Collectors.toList());
|
||||||
List<TerminalMaintainVO> subList1 = terminalMaintainMapper.getPqLineGdAndSubList(subIndexes);
|
List<TerminalMaintainVO> subList1 = terminalMaintainMapper.getPqLineGdAndSubList(subIndexes);
|
||||||
List<String> gdIndexes = subList1.stream().map(TerminalMaintainVO::getPid).collect(Collectors.toList());
|
List<String> gdIndexes = subList1.stream().map(TerminalMaintainVO::getPid).collect(Collectors.toList());
|
||||||
|
|||||||
@@ -68,8 +68,6 @@ public class ComAssessServiceImpl extends ServiceImpl<RStatComassesDMapper, RSta
|
|||||||
|
|
||||||
String systemType = commTerminalGeneralClient.isPqOrPms().getData();
|
String systemType = commTerminalGeneralClient.isPqOrPms().getData();
|
||||||
if (systemType.equals("pq")) {
|
if (systemType.equals("pq")) {
|
||||||
|
|
||||||
|
|
||||||
List<UserLedgerVO> userLedgerVOList = userLedgerFeignClient.selectUserList(new UserReportParam()).getData();
|
List<UserLedgerVO> userLedgerVOList = userLedgerFeignClient.selectUserList(new UserReportParam()).getData();
|
||||||
Map<String, UserLedgerVO> userLedgerVOMap = userLedgerVOList.stream().collect(Collectors.toMap(UserLedgerVO::getId, Function.identity()));
|
Map<String, UserLedgerVO> userLedgerVOMap = userLedgerVOList.stream().collect(Collectors.toMap(UserLedgerVO::getId, Function.identity()));
|
||||||
|
|
||||||
@@ -158,8 +156,8 @@ public class ComAssessServiceImpl extends ServiceImpl<RStatComassesDMapper, RSta
|
|||||||
comAssessVOList.add(comAssessVO);
|
comAssessVOList.add(comAssessVO);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
List<ComAssessVO> list = comAssessVOList.stream().sorted(Comparator.comparing(ComAssessVO::getData).reversed()).collect(Collectors.toList());
|
// List<ComAssessVO> list = comAssessVOList.stream().sorted(Comparator.comparing(ComAssessVO::getData).reversed()).collect(Collectors.toList());
|
||||||
return list;
|
return comAssessVOList;
|
||||||
} else {
|
} else {
|
||||||
DictData dictData = dicDataFeignClient.getDicDataByCodeAndType(DicDataEnum.RUN.getCode(), DicDataTypeEnum.LINE_STATE.getCode()).getData();
|
DictData dictData = dicDataFeignClient.getDicDataByCodeAndType(DicDataEnum.RUN.getCode(), DicDataTypeEnum.LINE_STATE.getCode()).getData();
|
||||||
PmsDeviceInfoParam param = new PmsDeviceInfoParam();
|
PmsDeviceInfoParam param = new PmsDeviceInfoParam();
|
||||||
|
|||||||
@@ -340,11 +340,11 @@ public class PollutionSubstationServiceImpl extends ServiceImpl<RStatPollutionSu
|
|||||||
list.add(pollutionVO);
|
list.add(pollutionVO);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!CollectionUtils.isEmpty(list)) {
|
/* if (!CollectionUtils.isEmpty(list)) {
|
||||||
List<PollutionVO> listSort = list.stream().filter(x -> x.getData() != 3.14159).sorted(Comparator.comparing(PollutionVO::getData).reversed().thenComparing(PollutionVO::getName)).collect(Collectors.toList());
|
List<PollutionVO> listSort = list.stream().filter(x -> x.getData() != 3.14159).sorted(Comparator.comparing(PollutionVO::getData).reversed().thenComparing(PollutionVO::getName)).collect(Collectors.toList());
|
||||||
listSort.addAll(list.stream().filter(x -> x.getData() == 3.14159).collect(Collectors.toList()));
|
listSort.addAll(list.stream().filter(x -> x.getData() == 3.14159).collect(Collectors.toList()));
|
||||||
return listSort;
|
return listSort;
|
||||||
}
|
}*/
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user