|
@@ -84,10 +84,8 @@ public class DeviceServiceImpl implements DeviceService{
|
|
|
if (orgId != null) communityIds = organizationMapper.findCommunityIds(orgId);
|
|
|
List<DeviceDto> list = deviceMapper.getList(loginUser.getSiteId(),userId,sysId,deviceTypeId,orgId,province,city,region,communityId,buildingId,deviceNo,clientName,locDesc,status,valveStatus,communityIds,sortColumn,sortOrder);
|
|
|
|
|
|
- //水表档案号、水表电子号、设备状态、当前读数、机构、客户编号、客户名称、手机号、标签、建筑、安装地址、网格员
|
|
|
- SimpleDateFormat dateformat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
- //DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
|
- String[] rowsName = new String[]{"序号", "水表档案号", "水表电子号", "设备状态", "当前读数", "机构", "客户编号", "客户名称", "手机号", "标签","建筑","安装地址","网格员"};
|
|
|
+ //设备编号、水表档案号、设备状态、当前读数、机构、客户编号、客户名称、手机号、标签、小区、安装地址、网格员
|
|
|
+ String[] rowsName = new String[]{"序号", "设备编号", "水表档案号", "设备状态", "当前读数", "机构", "客户编号", "客户名称", "手机号", "标签","小区","安装地址","网格员"};
|
|
|
|
|
|
List<Object[]> dataList = newArrayList();
|
|
|
Object[] objs = null;
|
|
@@ -95,8 +93,8 @@ public class DeviceServiceImpl implements DeviceService{
|
|
|
DeviceDto data = list.get(i);
|
|
|
objs = new Object[rowsName.length];
|
|
|
objs[0] = i;
|
|
|
- objs[1] = data.getFileNo();
|
|
|
- objs[2] = data.getMeterNo();
|
|
|
+ objs[1] = data.getDeviceNo();
|
|
|
+ objs[2] = data.getFileNo();
|
|
|
objs[3] = getDeviceStatusName(data.getDeviceStatus());
|
|
|
objs[4] = data.getMeterReading();
|
|
|
objs[5] = data.getOrgName();
|
|
@@ -104,7 +102,7 @@ public class DeviceServiceImpl implements DeviceService{
|
|
|
objs[7] = data.getCustomerName();
|
|
|
objs[8] = data.getCustomerPhone();
|
|
|
objs[9] = data.getLabel();
|
|
|
- objs[10] = data.getBuildingName();
|
|
|
+ objs[10] = data.getCommunityName();
|
|
|
objs[11] = data.getLocDesc();
|
|
|
objs[12] = data.getUsername();
|
|
|
|
|
@@ -120,11 +118,9 @@ public class DeviceServiceImpl implements DeviceService{
|
|
|
}
|
|
|
|
|
|
private String getDeviceStatusName(Integer deviceStatus){
|
|
|
- //1:正常 2:故障 3:无 4: 预警 5:未启用
|
|
|
+ //1:正常 0:告警
|
|
|
if (deviceStatus == 1) return "正常";
|
|
|
- if (deviceStatus == 2) return "故障";
|
|
|
- if (deviceStatus == 4) return "预警";
|
|
|
- if (deviceStatus == 5) return "未启用";
|
|
|
+ if (deviceStatus == 0) return "告警";
|
|
|
return "";
|
|
|
}
|
|
|
|