|
|
@ -78,15 +78,20 @@ public class DeviceServiceImpl implements DeviceService, ApplicationAutoInitial |
|
|
|
@Override |
|
|
|
public Map<String, Object> queryAll(Map whereJson, Pageable page) { |
|
|
|
logger.info("Hello World"); |
|
|
|
|
|
|
|
HashMap param = new HashMap(); |
|
|
|
param.put("flag", "01"); |
|
|
|
if (whereJson.get("blurry") != null) { |
|
|
|
param.put("blurry", "%" + whereJson.get("blurry") + "%"); |
|
|
|
} |
|
|
|
param.put("device_type", whereJson.get("device_type")); |
|
|
|
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")); |
|
|
|
} |
|
|
|
JSONObject json = WQL.getWO("Qdevice_query_002").addParamMap(param).pageQuery(WqlUtil.getHttpContext(page), "is_config asc,seq_num desc,update_time desc"); |
|
|
|
return json; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
@ -269,25 +274,14 @@ public class DeviceServiceImpl implements DeviceService, ApplicationAutoInitial |
|
|
|
@Override |
|
|
|
public void download(List<DeviceDto> all, HttpServletResponse response) throws IOException { |
|
|
|
List<Map<String, Object>> list = new ArrayList<>(); |
|
|
|
for (DeviceDto device : all) { |
|
|
|
Map<String, Object> map = new LinkedHashMap<>(); |
|
|
|
map.put("生产厂家", device.getManufacturer()); |
|
|
|
map.put("厂家电话", device.getManufacturer_phone()); |
|
|
|
map.put("opcServer标识", device.getOpc_server_id()); |
|
|
|
map.put("opcPlc标识", device.getOpc_plc_id()); |
|
|
|
map.put("是否启用", device.getIs_active()); |
|
|
|
map.put("是否删除", device.getIs_delete()); |
|
|
|
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()); |
|
|
|
map.put("device_code",null); |
|
|
|
map.put("device_name",null); |
|
|
|
map.put("device_type",null); |
|
|
|
map.put("is_config",null); |
|
|
|
map.put("is_route",null); |
|
|
|
map.put("region",null); |
|
|
|
list.add(map); |
|
|
|
} |
|
|
|
FileUtil.downloadExcel(list, response); |
|
|
|
} |
|
|
|
|
|
|
|