liujie
1 天以前 ee6a2aa9e265f498ce7df9c603d3148487c0b1e8
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
61
62
63
64
65
66
67
68
69
70
71
72
73
package com.panzhihua.sangeshenbian.controller;
 
import com.beust.jcommander.internal.Lists;
import com.panzhihua.common.controller.BaseController;
import com.panzhihua.common.exceptions.ServiceException;
import com.panzhihua.common.model.vos.LoginUserInfoVO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.sangeshenbian.model.entity.ComAct;
import com.panzhihua.sangeshenbian.model.query.AnalyticStatisticsQuery;
import com.panzhihua.sangeshenbian.model.query.AppStaticsQuery;
import com.panzhihua.sangeshenbian.model.vo.AnalyticStatisticsFourVo;
import com.panzhihua.sangeshenbian.model.vo.AnalyticStatisticsOneVo;
import com.panzhihua.sangeshenbian.model.vo.AnalyticStatisticsThreeVo;
import com.panzhihua.sangeshenbian.model.vo.AnalyticStatisticsTwoVo;
import com.panzhihua.sangeshenbian.model.vo.RegionVO;
import com.panzhihua.sangeshenbian.service.IdentityInformationService;
import com.panzhihua.sangeshenbian.service.impl.StaticsService;
import com.panzhihua.sangeshenbian.warpper.IdentityInformation;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.context.annotation.Lazy;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
import java.util.ArrayList;
import java.util.List;
 
/**
 * @author mitao
 * @date 2025/5/9
 */
@Api(tags = {"【2.0.1】统计分析相关接口"})
@RestController
@RequestMapping("/applet/statics")
@RequiredArgsConstructor(onConstructor_ = {@Lazy})
public class StaticsController extends BaseController {
    private final StaticsService staticsService;
 
    @GetMapping("/region-tree")
    @ApiOperation("获取区域树")
    public R<List<RegionVO>> regionTree() {
        LoginUserInfoVO loginUserInfo = getLoginUserInfo();
        return R.ok(staticsService.queryRegionTree(loginUserInfo));
    }
    @PostMapping("/part-one")
    @ApiOperation("获取统计分析-第一部分(处理满意率+诉求单量统计上面部分)")
    public R<AnalyticStatisticsOneVo> queryStaticsPartOne(@RequestBody AppStaticsQuery query) {
        LoginUserInfoVO loginUserInfo = getLoginUserInfo();
        return R.ok(staticsService.queryStaticsPartOne(query,loginUserInfo));
    }
    @PostMapping("/part-two")
    @ApiOperation("获取统计分析-第二部分(诉求单量统计柱状图)")
    public R<List<AnalyticStatisticsTwoVo>> queryStaticsPartTwo(@RequestBody AppStaticsQuery query) {
        LoginUserInfoVO loginUserInfo = getLoginUserInfo();
        return R.ok(staticsService.queryStaticsPartTwo(query,loginUserInfo));
    }
    @PostMapping("/part-three")
    @ApiOperation("获取统计分析-第三部分(问题类型排名)")
    public R<List<AnalyticStatisticsThreeVo>> queryStaticsPartThree(@RequestBody AppStaticsQuery query) {
        LoginUserInfoVO loginUserInfo = getLoginUserInfo();
        return R.ok(staticsService.queryStaticsPartThree(query,loginUserInfo));
    }
    @PostMapping("/part-four")
    @ApiOperation("获取统计分析-第四部分(评价占比)")
    public R<AnalyticStatisticsFourVo> queryStaticsPartFour(@RequestBody AppStaticsQuery query) {
        LoginUserInfoVO loginUserInfo = getLoginUserInfo();
        return R.ok(staticsService.queryStaticsPartFour(query,loginUserInfo));
    }
}