Commit d69fed0c authored by 廖旭伟's avatar 廖旭伟

设备列表查询增加桌面式自助服务终端,告警消息列表过滤自助服务终端

parent f85706c7
......@@ -3,6 +3,7 @@ package com.mortals.xhx.common.pdu.device;
import com.mortals.framework.model.BaseEntityLong;
import java.util.Date;
import java.util.List;
public class DeviceAlarmPdu extends BaseEntityLong {
private static final long serialVersionUID = 1L;
......@@ -56,7 +57,15 @@ public class DeviceAlarmPdu extends BaseEntityLong {
/** 结束 创建时间 */
private String createTimeEnd;
private List<Long> alarmDeviceList;
public List<Long> getAlarmDeviceList() {
return alarmDeviceList;
}
public void setAlarmDeviceList(List<Long> alarmDeviceList) {
this.alarmDeviceList = alarmDeviceList;
}
public DeviceAlarmPdu(){}
/**
......
......@@ -48,7 +48,7 @@ public class DeviceServiceImpl extends AbstractCRUDServiceImpl<DeviceDao, Device
Result<DeviceEntity> result = new Result();
DevicePdu devicePdu = new DevicePdu();
BeanUtils.copyProperties(entity, devicePdu, BeanUtil.getNullPropertyNames(entity));
devicePdu.setProductName(productName);
devicePdu.setProductName(entity.getProductName());
Rest<RespData<List<DevicePdu>>> rest = deviceFeign.list(devicePdu);
if (rest.getCode().equals(YesNoEnum.YES.getValue())) {
List<DeviceEntity> collect = rest.getData().getData().stream().map(item -> {
......
......@@ -24,6 +24,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
......@@ -162,6 +163,17 @@ public class DeviceController extends BaseCRUDJsonBodyMappingController<DeviceSe
if (!ObjectUtils.isEmpty(query) && !ObjectUtils.isEmpty(query.getSize())) {
pageInfo.setPrePageResult(query.getSize());
}
DevicePdu devicePdu = new DevicePdu();
devicePdu.setSiteId(query.getSiteId());
devicePdu.setProductName("%自助服务终端%");
Rest<RespData<List<DevicePdu>>> restd = deviceFeign.list(devicePdu);
if (restd.getCode().equals(YesNoEnum.YES.getValue())) {
List<Long> deviceIdList = restd.getData().getData().stream().map(item -> {
return item.getId();
}).collect(Collectors.toList());
query.setAlarmDeviceList(deviceIdList);
}
Result<DeviceAlarmPdu> result = new Result();
Rest<RespData<List<DeviceAlarmPdu>>> rest = deviceAlarmFeign.list(query);
if (rest.getCode().equals(YesNoEnum.YES.getValue())) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment