| | |
| | | if (deviceCode.isEmpty()) { |
| | | return ResponseUtil.fail("设备编号不能为空"); |
| | | } |
| | | int length = deviceCode.length(); |
| | | if (length != 24) { |
| | | return ResponseUtil.fail("设备编号长度不正确"); |
| | | } |
| | | String url = lightReportDataService.exportList(request,response, deviceCode); |
| | | return ResponseUtil.success(url); |
| | | } |
| | |
| | | return; |
| | | } |
| | | ips = new FileInputStream(file); |
| | | response.setContentType("multipart/form-data"); |
| | | response.setContentType("application/json;charset=utf-8"); |
| | | //为文件重新设置名字,采用数据库内存储的文件名称 |
| | | response.addHeader("Content-Disposition", "attachment; filename=\"" + new String(newFileName.getBytes("UTF-8"), "ISO8859-1") + "\""); |
| | | out = response.getOutputStream(); |