Browse Source

统计报表1

zhuhaiwen 3 years ago
parent
commit
f674f97209

+ 38 - 0
oa-app/src/main/java/com/css/oa/exam/report/controller/ReportController.java

@ -0,0 +1,38 @@
1
package com.css.oa.exam.report.controller;
2
3
import com.css.oa.exam.base.BaseController;
4
import com.css.oa.exam.report.service.ReportService;
5
import com.css.oa.utils.Result;
6
import io.swagger.annotations.Api;
7
import io.swagger.annotations.ApiOperation;
8
import org.apache.http.util.TextUtils;
9
import org.springframework.beans.factory.annotation.Autowired;
10
import org.springframework.web.bind.annotation.*;
11
12
import java.util.HashMap;
13
import java.util.List;
14
import java.util.Map;
15
16
@Api(tags = {"统计报表"})
17
@RestController
18
@RequestMapping("/report")
19
public class ReportController extends BaseController {
20
21
    @Autowired
22
    private ReportService mService;
23
24
    @ApiOperation(value = "统计报表-左侧列表")
25
    @GetMapping("/leftMenu")
26
    public Result leftMenu() {
27
        Result<Map> result;
28
        try {
29
            Map obj = mService.leftMenu();
30
            result = setResult("res", obj);
31
        } catch (Exception e) {
32
            result = setErr(e.toString());
33
            e.printStackTrace();
34
        }
35
        return result;
36
    }
37
38
}

+ 8 - 0
oa-app/src/main/java/com/css/oa/exam/report/service/IReportService.java

@ -0,0 +1,8 @@
1
package com.css.oa.exam.report.service;
2
3
import java.util.List;
4
import java.util.Map;
5
6
public interface IReportService {
7
8
}

+ 31 - 0
oa-app/src/main/java/com/css/oa/exam/report/service/ReportService.java

@ -0,0 +1,31 @@
1
package com.css.oa.exam.report.service;
2
3
import com.css.oa.exam.base.BaseService;
4
import lombok.extern.slf4j.Slf4j;
5
import org.springframework.stereotype.Service;
6
7
import java.util.ArrayList;
8
import java.util.HashMap;
9
import java.util.List;
10
import java.util.Map;
11
12
@Slf4j
13
@Service
14
public class ReportService extends BaseService implements IReportService {
15
16
    public Map leftMenu() {
17
        String[] arr = {"考点考场人员信息", "单位人员信息表", "考点考场统计一览表", "督考情况一览表"};
18
19
        Map map = new HashMap();
20
        map.put("total", arr.length);
21
        map.put("list", arr);
22
        return map;
23
    }
24
//
25
//    @Autowired
26
//    IExamRepository repository;
27
//
28
//    @Autowired
29
//    IUnitRepository unitRepository;
30
31
}