|
|
@@ -0,0 +1,142 @@
|
|
|
+package com.ydtech.modules.admin.controller;
|
|
|
+
|
|
|
+import com.ydtech.core.page.HttpResult;
|
|
|
+import com.ydtech.modules.admin.model.SysDept;
|
|
|
+import com.ydtech.modules.admin.model.report.user.HouLinePersonnelReportDto;
|
|
|
+import com.ydtech.modules.admin.model.report.user.QianLineDDPersonnelReportDto;
|
|
|
+import com.ydtech.modules.admin.model.report.user.QianLineDLPersonnelReportDto;
|
|
|
+import com.ydtech.modules.admin.service.SysDeptService;
|
|
|
+import com.ydtech.modules.admin.service.UserReportService;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @version
|
|
|
+ * @author: hxl
|
|
|
+ * @Date: 2024/6/28 8:36
|
|
|
+ * @Description: 控制台用户统计
|
|
|
+ */
|
|
|
+@Api(tags = "控制台用户统计")
|
|
|
+@RequestMapping("/userReport")
|
|
|
+@RestController
|
|
|
+public class UserReportConroller {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private SysDeptService sysDeptService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private UserReportService userReportService;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @version
|
|
|
+ * @author: hxl
|
|
|
+ * @Date: 2024/6/28 8:36
|
|
|
+ * @Description: 查询后线人员的机构
|
|
|
+ */
|
|
|
+ @PostMapping("queryHXDeptTree")
|
|
|
+ @ApiOperation(value = "查询后线人员的机构")
|
|
|
+ public HttpResult<List<SysDept>> queryHXDeptTree() {
|
|
|
+
|
|
|
+ try{
|
|
|
+ List<SysDept> result = sysDeptService.queryHXDeptTree();
|
|
|
+ return HttpResult.ok("查询数据成功", result);
|
|
|
+ }catch (Exception e){
|
|
|
+ return HttpResult.error("查询错误"+e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @version
|
|
|
+ * @author: hxl
|
|
|
+ * @Date: 2024/6/28 8:36
|
|
|
+ * @Description: 查询后线人员的机构
|
|
|
+ */
|
|
|
+ @PostMapping("queryQXDeptTree")
|
|
|
+ @ApiOperation(value = "查询前线人员的机构")
|
|
|
+ public HttpResult<List<SysDept>> queryQXDeptTree() {
|
|
|
+ try{
|
|
|
+ List<SysDept> result = sysDeptService.queryQXDeptTree();
|
|
|
+ return HttpResult.ok("查询数据成功", result);
|
|
|
+ }catch (Exception e){
|
|
|
+ return HttpResult.error("查询错误"+e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @version
|
|
|
+ * @author: hxl
|
|
|
+ * @Date: 2024/6/28 9:04
|
|
|
+ * @Description: 通过后线人员机构查询统计数据
|
|
|
+ */
|
|
|
+ @GetMapping("queryHXReportData")
|
|
|
+ @ApiOperation(value = "查询后线人员统计数据")
|
|
|
+ public HttpResult<HouLinePersonnelReportDto> queryHXReportData(String deptId) {
|
|
|
+
|
|
|
+ try{
|
|
|
+ HouLinePersonnelReportDto houLinePersonnelReportDto = userReportService.queryHXReportData(deptId);
|
|
|
+ return HttpResult.ok("查询数据成功", houLinePersonnelReportDto);
|
|
|
+ }catch (Exception e){
|
|
|
+ return HttpResult.error("查询错误"+e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @version
|
|
|
+ * @author: hxl
|
|
|
+ * @Date: 2024/6/28 9:04
|
|
|
+ * @Description: 通过前线类型查询统计数据 团队长
|
|
|
+ */
|
|
|
+ @GetMapping("queryQXTDReportData")
|
|
|
+ @ApiOperation(value = "查询前线人员统计数据")
|
|
|
+ public HttpResult<QianLineDDPersonnelReportDto> queryQXTDReportData(String deptId) {
|
|
|
+
|
|
|
+ try{
|
|
|
+ QianLineDDPersonnelReportDto qianLineDDPersonnelReportDto = userReportService.queryQXTDReportData(deptId);
|
|
|
+ return HttpResult.ok("查询数据成功", qianLineDDPersonnelReportDto);
|
|
|
+ }catch (Exception e){
|
|
|
+ return HttpResult.error("查询错误"+e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * @version
|
|
|
+ * @author: hxl
|
|
|
+ * @Date: 2024/6/28 9:04
|
|
|
+ * @Description: 查询前线人员代理统计数据 代理人
|
|
|
+ */
|
|
|
+ @GetMapping("queryQXDLReportData")
|
|
|
+ @ApiOperation(value = "查询前线人员代理统计数据")
|
|
|
+ public HttpResult<QianLineDLPersonnelReportDto> queryQXDLReportData(String deptId){
|
|
|
+
|
|
|
+ try{
|
|
|
+ QianLineDLPersonnelReportDto qianLineDLPersonnelReportDto = userReportService.queryQXDLReportData(deptId);
|
|
|
+ return HttpResult.ok("查询数据成功", qianLineDLPersonnelReportDto);
|
|
|
+ }catch (Exception e){
|
|
|
+ return HttpResult.error("查询错误"+e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @version
|
|
|
+ * @author: hxl
|
|
|
+ * @Date: 2024/6/28 9:04
|
|
|
+ * @Description: 查询前线人员渠道统计数据
|
|
|
+ */
|
|
|
+ @GetMapping("queryQXQDReportData")
|
|
|
+ @ApiOperation(value = "查询前线人员渠道统计数据")
|
|
|
+ public HttpResult<List<QianLineDLPersonnelReportDto>> queryQXQDReportData(String deptId) {
|
|
|
+
|
|
|
+ try{
|
|
|
+ List<QianLineDLPersonnelReportDto> list = userReportService.queryQXQDReportData(deptId);
|
|
|
+ return HttpResult.ok("查询数据成功", list);
|
|
|
+ }catch (Exception e){
|
|
|
+ return HttpResult.error("查询错误"+e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|