|
|
@@ -1,25 +1,28 @@
|
|
|
package com.uas.platform.b2b.controller;
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.http.HttpHeaders;
|
|
|
+import org.springframework.http.HttpStatus;
|
|
|
+import org.springframework.http.ResponseEntity;
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
-import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
|
import com.uas.platform.b2b.service.ReportConfigService;
|
|
|
|
|
|
/**
|
|
|
* 报表请求
|
|
|
+ *
|
|
|
* @author suntg
|
|
|
* @date 2015年3月9日19:58:22
|
|
|
- *
|
|
|
+ *
|
|
|
*/
|
|
|
@Controller
|
|
|
-@RequestMapping(value="/report")
|
|
|
+@RequestMapping(value = "/report")
|
|
|
public class ReportController {
|
|
|
-
|
|
|
+
|
|
|
@Autowired
|
|
|
- private ReportConfigService configService;
|
|
|
+ private ReportConfigService reportConfigService;
|
|
|
|
|
|
/**
|
|
|
* 根据企业UU号和页面名称获取报表名称
|
|
|
@@ -28,9 +31,13 @@ public class ReportController {
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/getName", method = RequestMethod.GET)
|
|
|
- @ResponseBody
|
|
|
- public String getReportNameByEnuuAndPagename(Long enuu, String pagename) {
|
|
|
- return configService.getReportNameByEnuuAndPageName(enuu, pagename);
|
|
|
+ public ResponseEntity<String> getReportNameByEnuuAndPagename(Long enuu,
|
|
|
+ String pagename) {
|
|
|
+ HttpHeaders headers = new HttpHeaders();
|
|
|
+ headers.add("Content-Type", "application/text; charset=utf-8");
|
|
|
+ return new ResponseEntity<String>(
|
|
|
+ reportConfigService.getReportNameByEnuuAndPageName(enuu,
|
|
|
+ pagename), headers, HttpStatus.OK);
|
|
|
}
|
|
|
|
|
|
}
|