|
@ -78,15 +78,20 @@ public class DeviceServiceImpl implements DeviceService, ApplicationAutoInitial |
|
|
@Override |
|
|
@Override |
|
|
public Map<String, Object> queryAll(Map whereJson, Pageable page) { |
|
|
public Map<String, Object> queryAll(Map whereJson, Pageable page) { |
|
|
logger.info("Hello World"); |
|
|
logger.info("Hello World"); |
|
|
|
|
|
|
|
|
HashMap param = new HashMap(); |
|
|
HashMap param = new HashMap(); |
|
|
param.put("flag", "01"); |
|
|
param.put("flag", "01"); |
|
|
if (whereJson.get("blurry") != null) { |
|
|
if (whereJson.get("blurry") != null) { |
|
|
param.put("blurry", "%" + whereJson.get("blurry") + "%"); |
|
|
param.put("blurry", "%" + whereJson.get("blurry") + "%"); |
|
|
} |
|
|
} |
|
|
|
|
|
if (whereJson.get("region") != null) { |
|
|
|
|
|
param.put("region", whereJson.get("region")); |
|
|
|
|
|
} |
|
|
|
|
|
if (whereJson.get("device_type") != null) { |
|
|
param.put("device_type", whereJson.get("device_type")); |
|
|
param.put("device_type", whereJson.get("device_type")); |
|
|
|
|
|
} |
|
|
JSONObject json = WQL.getWO("Qdevice_query_002").addParamMap(param).pageQuery(WqlUtil.getHttpContext(page), "is_config asc,seq_num desc,update_time desc"); |
|
|
JSONObject json = WQL.getWO("Qdevice_query_002").addParamMap(param).pageQuery(WqlUtil.getHttpContext(page), "is_config asc,seq_num desc,update_time desc"); |
|
|
return json; |
|
|
return json; |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
@ -269,25 +274,14 @@ public class DeviceServiceImpl implements DeviceService, ApplicationAutoInitial |
|
|
@Override |
|
|
@Override |
|
|
public void download(List<DeviceDto> all, HttpServletResponse response) throws IOException { |
|
|
public void download(List<DeviceDto> all, HttpServletResponse response) throws IOException { |
|
|
List<Map<String, Object>> list = new ArrayList<>(); |
|
|
List<Map<String, Object>> list = new ArrayList<>(); |
|
|
for (DeviceDto device : all) { |
|
|
|
|
|
Map<String, Object> map = new LinkedHashMap<>(); |
|
|
Map<String, Object> map = new LinkedHashMap<>(); |
|
|
map.put("生产厂家", device.getManufacturer()); |
|
|
map.put("device_code",null); |
|
|
map.put("厂家电话", device.getManufacturer_phone()); |
|
|
map.put("device_name",null); |
|
|
map.put("opcServer标识", device.getOpc_server_id()); |
|
|
map.put("device_type",null); |
|
|
map.put("opcPlc标识", device.getOpc_plc_id()); |
|
|
map.put("is_config",null); |
|
|
map.put("是否启用", device.getIs_active()); |
|
|
map.put("is_route",null); |
|
|
map.put("是否删除", device.getIs_delete()); |
|
|
map.put("region",null); |
|
|
map.put("创建者", device.getCreate_by()); |
|
|
|
|
|
map.put("创建时间", device.getCreate_time()); |
|
|
|
|
|
map.put("修改者", device.getUpdate_by()); |
|
|
|
|
|
map.put("修改时间", device.getUpdate_time()); |
|
|
|
|
|
map.put("设备编码", device.getDevice_code()); |
|
|
|
|
|
map.put("设备名字", device.getDevice_name()); |
|
|
|
|
|
map.put("设备类型", device.getDevice_type()); |
|
|
|
|
|
map.put("是否配置", device.getIs_config()); |
|
|
|
|
|
map.put("备注", device.getRemark()); |
|
|
|
|
|
list.add(map); |
|
|
list.add(map); |
|
|
} |
|
|
|
|
|
FileUtil.downloadExcel(list, response); |
|
|
FileUtil.downloadExcel(list, response); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|