1821349743@qq.com
2023-02-20 059154a3b7d812b3bb4b89ecfa4d94f9b905f7e0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
package com.product.server.report.controller;
 
import com.product.core.controller.support.AbstractBaseController;
import com.product.core.entity.RequestParameterEntity;
import com.product.core.exception.BaseException;
import com.product.module.sys.version.ApiVersion;
import com.product.server.report.config.ReportCode;
import com.product.server.report.service.ListReportConfigServiceImple;
import com.product.util.BaseUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
 
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
 
/**
 * @author : shicf
 * @Description: 公司国际化语言Controller
 * @date :
 */
@RestController
@RequestMapping("/api/report/statement")
public class ListReportConfigController extends AbstractBaseController {
 
    @Autowired
    public ListReportConfigServiceImple listReportConfigServiceImple;
 
    @ResponseBody
    @RequestMapping(value = "/getReportInfo/{version}", method = RequestMethod.POST)
    @ApiVersion(1)
    public String getReportInfo(HttpServletResponse response, HttpServletRequest request, HttpSession session) {
        Object bean = request.getAttribute("requestPara");
        RequestParameterEntity reqp = (RequestParameterEntity) bean;
        try {
            String report_uuid = (String) reqp.getValue("report_uuid");
            return BaseUtil.success(listReportConfigServiceImple.createReportInfo(report_uuid));//BaseUtil.success(fieldName);
        } catch (BaseException e) {
            return error(ReportCode.REPORT_GET_CONFIG_BE_DEFEATED.getText(), e.getMessage());
        }
    }
 
    @ResponseBody
    @RequestMapping(value = "/getReportName/{version}", method = RequestMethod.POST)
    @ApiVersion(1)
    public String getReportName(HttpServletResponse response, HttpServletRequest request, HttpSession session) {
        Object bean = request.getAttribute("requestPara");
        RequestParameterEntity reqp = (RequestParameterEntity) bean;
        try {
            String report_uuid = (String) reqp.getValue("report_uuid");
 
            return BaseUtil.success(listReportConfigServiceImple.getReportName(report_uuid));//BaseUtil.success(fieldName);
        } catch (BaseException e) {
            return error(ReportCode.REPORT_GET_CONFIG_BE_DEFEATED.getText(), e.getMessage());
        }
    }
}