|
|
@@ -1,5 +1,7 @@
|
|
|
package com.uas.platform.b2b.controller;
|
|
|
|
|
|
+import java.net.URLEncoder;
|
|
|
+
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.http.HttpHeaders;
|
|
|
import org.springframework.http.HttpStatus;
|
|
|
@@ -9,6 +11,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
|
|
|
import com.uas.platform.b2b.service.ReportConfigService;
|
|
|
+import com.uas.platform.core.util.Des;
|
|
|
|
|
|
/**
|
|
|
* 报表请求
|
|
|
@@ -33,11 +36,24 @@ public class ReportController {
|
|
|
String pagename) {
|
|
|
HttpHeaders headers = new HttpHeaders();
|
|
|
headers.add("Content-Type", "application/text; charset=utf-8");
|
|
|
+ String key="12345678";
|
|
|
String reportName = reportConfigService.getReportNameByEnuuAndPageName(enuu,
|
|
|
pagename);
|
|
|
if(reportName == null) {
|
|
|
return new ResponseEntity<String>("未找到报表文件", headers, HttpStatus.EXPECTATION_FAILED);
|
|
|
- }
|
|
|
+ }else{
|
|
|
+ Des de = new Des();
|
|
|
+ //文件名
|
|
|
+ String name;
|
|
|
+ try {
|
|
|
+ name = URLEncoder.encode(reportName, "utf-8").toLowerCase();
|
|
|
+ String a = de.toHexString(de.encrypt(name, key)).toUpperCase();
|
|
|
+ reportName = a;
|
|
|
+ } catch (Exception e) {
|
|
|
+ // TODO Auto-generated catch block
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
return new ResponseEntity<String>(reportName, headers, HttpStatus.OK);
|
|
|
}
|
|
|
|