| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638 |
- package com.ydtech.modules.admin.controller.taskStatistics;
- import com.baomidou.mybatisplus.core.metadata.IPage;
- import com.github.pagehelper.PageInfo;
- import com.ydtech.core.page.HttpResult;
- import com.ydtech.modules.admin.model.dto.TaskStatisticsDto;
- import com.ydtech.modules.admin.model.dto.TaskStatisticsDtoNew;
- import com.ydtech.modules.admin.model.report.profitAnalysis.ProfitAnalysisQueryDto;
- import com.ydtech.modules.admin.model.vo.BusinessAgentData;
- import com.ydtech.modules.admin.model.vo.BusinessOrderData;
- import com.ydtech.modules.admin.model.vo.KztGetDeptUtilsDto;
- import com.ydtech.modules.admin.model.vo.TaskStatisticsVo;
- import com.ydtech.modules.admin.service.TaskStatisticsService;
- import com.ydtech.modules.admin.utils.KztGetDeptUtils;
- import io.swagger.annotations.*;
- import org.apache.commons.lang3.ObjectUtils;
- import org.apache.commons.lang3.StringUtils;
- import org.springframework.beans.factory.annotation.Autowired;
- 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 javax.servlet.http.HttpServletRequest;
- import java.util.HashMap;
- import java.util.List;
- /**
- * @description: 任务统计
- * @author: whp
- * @date: 2024/7/25
- **/
- @Api(tags = "控制台-任务统计")
- @RequestMapping("/taskStatistics")
- @RestController
- public class TaskStatisticsController {
- @Autowired
- private TaskStatisticsService taskStatisticsService;
- /**
- * @description: 渠道任务统计查询
- * @author: whp
- * @date: 2024/7/25
- **/
- @PostMapping("queryPage")
- @ApiOperation(value = "控制台-渠道任务统计查询")
- public HttpResult<IPage<TaskStatisticsDto>> queryPage(@RequestBody TaskStatisticsVo taskStatisticsVo, HttpServletRequest httpServerRequest) {
- try{
- KztGetDeptUtils kztGetDeptUtils = new KztGetDeptUtils();
- KztGetDeptUtilsDto kztGetDeptUtilsDto = kztGetDeptUtils.KztGetDeptIds(httpServerRequest.getRequestURL().toString());
- if(ObjectUtils.isNotEmpty(kztGetDeptUtilsDto)){
- if("1".equals(kztGetDeptUtilsDto.getType())){
- taskStatisticsVo.setDeptIds(kztGetDeptUtilsDto.getIds());
- } else if ("2".equals(kztGetDeptUtilsDto.getType())) {
- taskStatisticsVo.setUserIds(kztGetDeptUtilsDto.getIds());
- }
- }
- IPage<TaskStatisticsDto> result = taskStatisticsService.queryPage(taskStatisticsVo);
- return HttpResult.ok("查询数据成功", result);
- }catch (Exception e){
- return HttpResult.error("查询错误"+e.getMessage());
- }
- }
- /**
- * @param taskStatisticsVo
- * @param httpServerRequest
- * @return 任务统计明细导出
- */
- @PostMapping("/ordersDetailsExcel")
- @ApiOperation(value = "控制台-任务统计导出")
- public HttpResult ordersDetailsExcel(@RequestBody TaskStatisticsVo taskStatisticsVo, HttpServletRequest httpServerRequest) {
- KztGetDeptUtils kztGetDeptUtils = new KztGetDeptUtils();
- KztGetDeptUtilsDto kztGetDeptUtilsDto = kztGetDeptUtils.KztGetDeptIds(httpServerRequest.getRequestURL().toString());
- if(ObjectUtils.isNotEmpty(kztGetDeptUtilsDto)){
- if("1".equals(kztGetDeptUtilsDto.getType())){
- taskStatisticsVo.setDeptIds(kztGetDeptUtilsDto.getIds());
- } else if ("2".equals(kztGetDeptUtilsDto.getType())) {
- taskStatisticsVo.setUserIds(kztGetDeptUtilsDto.getIds());
- }
- }
- return this.taskStatisticsService.ordersDetailsExcel(taskStatisticsVo);
- }
- /**
- * @description: 电销任务统计查询
- * @author: whp
- * @date: 2024/10/11
- **/
- @PostMapping("queryPageElectric")
- @ApiOperation(value = "控制台-电销任务统计查询")
- public HttpResult<IPage<TaskStatisticsDto>> queryPageElectric(@RequestBody TaskStatisticsVo taskStatisticsVo, HttpServletRequest httpServerRequest) {
- try{
- KztGetDeptUtils kztGetDeptUtils = new KztGetDeptUtils();
- KztGetDeptUtilsDto kztGetDeptUtilsDto = kztGetDeptUtils.KztGetDeptIds(httpServerRequest.getRequestURL().toString());
- if(ObjectUtils.isNotEmpty(kztGetDeptUtilsDto)){
- if("1".equals(kztGetDeptUtilsDto.getType())){
- taskStatisticsVo.setDeptIds(kztGetDeptUtilsDto.getIds());
- } else if ("2".equals(kztGetDeptUtilsDto.getType())) {
- taskStatisticsVo.setUserIds(kztGetDeptUtilsDto.getIds());
- }
- }
- IPage<TaskStatisticsDto> result = taskStatisticsService.queryPageElectric(taskStatisticsVo);
- return HttpResult.ok("查询数据成功", result);
- }catch (Exception e){
- return HttpResult.error("查询错误"+e.getMessage());
- }
- }
- /**
- * @description: 任务统计-电销导出
- * @author: whp
- * @date: 2024/10/29
- **/
- @PostMapping("/electricExcel")
- @ApiOperation(value = "任务统计-电销导出")
- public HttpResult electricExcel(@RequestBody TaskStatisticsVo taskStatisticsVo) {
- return this.taskStatisticsService.electricExcel(taskStatisticsVo);
- }
- /**
- * @description: 保险公司统计查询
- * @author: whp
- * @date: 2024/7/25
- **/
- @PostMapping("insuranceCompanyQueryPage")
- @ApiOperation(value = "控制台-保险公司统计查询")
- public HttpResult<IPage<TaskStatisticsDto>> insuranceCompanyQueryPage(@RequestBody TaskStatisticsVo taskStatisticsVo, HttpServletRequest httpServerRequest) {
- try{
- KztGetDeptUtils kztGetDeptUtils = new KztGetDeptUtils();
- KztGetDeptUtilsDto kztGetDeptUtilsDto = kztGetDeptUtils.KztGetDeptIds(httpServerRequest.getRequestURL().toString());
- if(ObjectUtils.isNotEmpty(kztGetDeptUtilsDto)){
- if("1".equals(kztGetDeptUtilsDto.getType())){
- taskStatisticsVo.setDeptIds(kztGetDeptUtilsDto.getIds());
- } else if ("2".equals(kztGetDeptUtilsDto.getType())) {
- taskStatisticsVo.setUserIds(kztGetDeptUtilsDto.getIds());
- }
- }
- IPage<TaskStatisticsDto> result = taskStatisticsService.insuranceCompanyQueryPage(taskStatisticsVo);
- return HttpResult.ok("查询数据成功", result);
- }catch (Exception e){
- return HttpResult.error("查询错误"+e.getMessage());
- }
- }
- /**
- * @description: 代理人统计查询
- * @author: whp
- * @date: 2024/7/26
- **/
- @PostMapping("agentStatisticsQueryPage")
- @ApiOperation(value = "控制台-代理人统计查询")
- public HttpResult<IPage<TaskStatisticsDto>> agentStatisticsQueryPage(@RequestBody TaskStatisticsVo taskStatisticsVo, HttpServletRequest httpServerRequest) {
- try{
- KztGetDeptUtils kztGetDeptUtils = new KztGetDeptUtils();
- KztGetDeptUtilsDto kztGetDeptUtilsDto = kztGetDeptUtils.KztGetDeptIds(httpServerRequest.getRequestURL().toString());
- if(ObjectUtils.isNotEmpty(kztGetDeptUtilsDto)){
- if("1".equals(kztGetDeptUtilsDto.getType())){
- taskStatisticsVo.setDeptIds(kztGetDeptUtilsDto.getIds());
- } else if ("2".equals(kztGetDeptUtilsDto.getType())) {
- taskStatisticsVo.setUserIds(kztGetDeptUtilsDto.getIds());
- }
- }
- IPage<TaskStatisticsDto> result = taskStatisticsService.agentStatisticsQueryPage(taskStatisticsVo);
- return HttpResult.ok("查询数据成功", result);
- }catch (Exception e){
- return HttpResult.error("查询错误"+e.getMessage());
- }
- }
- /**
- * @description: 任务统计-代理人导出
- * @author: whp
- * @date: 2024/9/9
- **/
- @PostMapping("/agentExcel")
- @ApiOperation(value = "任务统计-代理人导出")
- public HttpResult channelAgentExcel(@RequestBody TaskStatisticsVo taskStatisticsVo) {
- return this.taskStatisticsService.agentExcel(taskStatisticsVo);
- }
- /**
- * @description: 财务中心-费用校验
- * @author: whp
- * @date: 2024/7/29
- **/
- @PostMapping("costCenter")
- @ApiOperation(value = "控制台-财务中心-费用校验")
- public HttpResult<IPage<TaskStatisticsDto>> costCenter(@RequestBody TaskStatisticsVo taskStatisticsVo, HttpServletRequest httpServerRequest) {
- try{
- KztGetDeptUtils kztGetDeptUtils = new KztGetDeptUtils();
- KztGetDeptUtilsDto kztGetDeptUtilsDto = kztGetDeptUtils.KztGetDeptIds(httpServerRequest.getRequestURL().toString());
- if(ObjectUtils.isNotEmpty(kztGetDeptUtilsDto)){
- if("1".equals(kztGetDeptUtilsDto.getType())){
- taskStatisticsVo.setDeptIds(kztGetDeptUtilsDto.getIds());
- } else if ("2".equals(kztGetDeptUtilsDto.getType())) {
- taskStatisticsVo.setUserIds(kztGetDeptUtilsDto.getIds());
- }
- }
- IPage<TaskStatisticsDto> result = taskStatisticsService.costCenter(taskStatisticsVo);
- return HttpResult.ok("查询数据成功", result);
- }catch (Exception e){
- return HttpResult.error("查询错误"+e.getMessage());
- }
- }
- /**
- * @description: 财务中心-费用校验 -人员查询
- * @author: whp
- **/
- @PostMapping("costReviewer")
- @ApiOperation(value = "控制台-财务中心-费用校验")
- public HttpResult<IPage<TaskStatisticsDto>> costReviewer(@RequestBody TaskStatisticsVo taskStatisticsVo, HttpServletRequest httpServerRequest) {
- try{
- KztGetDeptUtils kztGetDeptUtils = new KztGetDeptUtils();
- KztGetDeptUtilsDto kztGetDeptUtilsDto = kztGetDeptUtils.KztGetDeptIds(httpServerRequest.getRequestURL().toString());
- if(ObjectUtils.isNotEmpty(kztGetDeptUtilsDto)){
- if("1".equals(kztGetDeptUtilsDto.getType())){
- taskStatisticsVo.setDeptIds(kztGetDeptUtilsDto.getIds());
- } else if ("2".equals(kztGetDeptUtilsDto.getType())) {
- taskStatisticsVo.setUserIds(kztGetDeptUtilsDto.getIds());
- }
- }
- IPage<TaskStatisticsDto> result = taskStatisticsService.costReviewer(taskStatisticsVo);
- return HttpResult.ok("查询数据成功", result);
- }catch (Exception e){
- return HttpResult.error("查询错误"+e.getMessage());
- }
- }
- /**
- * @description: 财务中心-费用校验-明细
- * @author: whp
- * @date: 2024/10/10
- **/
- @PostMapping("costCenterDetails")
- @ApiOperation(value = "控制台-财务中心-费用校验详情")
- public HttpResult<IPage<TaskStatisticsDto>> costCenterDetails(@RequestBody TaskStatisticsVo taskStatisticsVo, HttpServletRequest httpServerRequest) {
- try{
- KztGetDeptUtils kztGetDeptUtils = new KztGetDeptUtils();
- KztGetDeptUtilsDto kztGetDeptUtilsDto = kztGetDeptUtils.KztGetDeptIds(httpServerRequest.getRequestURL().toString());
- if(ObjectUtils.isNotEmpty(kztGetDeptUtilsDto)){
- if("1".equals(kztGetDeptUtilsDto.getType())){
- taskStatisticsVo.setDeptIds(kztGetDeptUtilsDto.getIds());
- } else if ("2".equals(kztGetDeptUtilsDto.getType())) {
- taskStatisticsVo.setUserIds(kztGetDeptUtilsDto.getIds());
- }
- }
- IPage<TaskStatisticsDto> result = taskStatisticsService.costCenterDetails(taskStatisticsVo);
- return HttpResult.ok("查询数据成功", result);
- }catch (Exception e){
- return HttpResult.error("查询错误"+e.getMessage());
- }
- }
- /**
- * @description: 财务中心-费用校验-明细-查看
- * @author: whp
- * @date: 2024/10/10
- **/
- @PostMapping("costCenterDetailsLicense")
- @ApiOperation(value = "控制台-财务中心-费用校验详情-查看")
- public HttpResult<TaskStatisticsDtoNew> costCenterDetailsLicense(@RequestBody TaskStatisticsVo taskStatisticsVo, HttpServletRequest httpServerRequest) {
- try{
- KztGetDeptUtils kztGetDeptUtils = new KztGetDeptUtils();
- KztGetDeptUtilsDto kztGetDeptUtilsDto = kztGetDeptUtils.KztGetDeptIds(httpServerRequest.getRequestURL().toString());
- if(ObjectUtils.isNotEmpty(kztGetDeptUtilsDto)){
- if("1".equals(kztGetDeptUtilsDto.getType())){
- taskStatisticsVo.setDeptIds(kztGetDeptUtilsDto.getIds());
- } else if ("2".equals(kztGetDeptUtilsDto.getType())) {
- taskStatisticsVo.setUserIds(kztGetDeptUtilsDto.getIds());
- }
- }
- TaskStatisticsDtoNew result = taskStatisticsService.costCenterDetailsLicense(taskStatisticsVo);
- return HttpResult.ok("查询数据成功", result);
- }catch (Exception e){
- return HttpResult.error("查询错误"+e.getMessage());
- }
- }
- /**
- * @description: 任务统计-保险公司-导出
- * @author: whp
- * @date: 2024/9/9
- **/
- @PostMapping("/costCenterDetailsExcel")
- @ApiOperation(value = "控制台-财务中心-费用校验详情-导出")
- public HttpResult costCenterDetailsExcel(@RequestBody TaskStatisticsVo taskStatisticsVo, HttpServletRequest httpServerRequest) {
- KztGetDeptUtils kztGetDeptUtils = new KztGetDeptUtils();
- KztGetDeptUtilsDto kztGetDeptUtilsDto = kztGetDeptUtils.KztGetDeptIds(httpServerRequest.getRequestURL().toString());
- if(ObjectUtils.isNotEmpty(kztGetDeptUtilsDto)){
- if("1".equals(kztGetDeptUtilsDto.getType())){
- taskStatisticsVo.setDeptIds(kztGetDeptUtilsDto.getIds());
- } else if ("2".equals(kztGetDeptUtilsDto.getType())) {
- taskStatisticsVo.setUserIds(kztGetDeptUtilsDto.getIds());
- }
- }
- return this.taskStatisticsService.costCenterDetailsExcel(taskStatisticsVo);
- }
- /**
- * @description: 财务中心-费用校验-合计
- * @author: whp
- * @date: 2024/9/28
- **/
- @PostMapping("costCenterTotal")
- @ApiOperation(value = "财务中心-费用校验-合计")
- public HttpResult<HashMap<String,Object>> costCenterTotal(@RequestBody TaskStatisticsVo taskStatisticsVo, HttpServletRequest httpServerRequest) {
- try{
- KztGetDeptUtils kztGetDeptUtils = new KztGetDeptUtils();
- KztGetDeptUtilsDto kztGetDeptUtilsDto = kztGetDeptUtils.KztGetDeptIds(httpServerRequest.getRequestURL().toString());
- if(ObjectUtils.isNotEmpty(kztGetDeptUtilsDto)){
- if("1".equals(kztGetDeptUtilsDto.getType())){
- taskStatisticsVo.setDeptIds(kztGetDeptUtilsDto.getIds());
- } else if ("2".equals(kztGetDeptUtilsDto.getType())) {
- taskStatisticsVo.setUserIds(kztGetDeptUtilsDto.getIds());
- }
- }
- HashMap<String,Object> result = taskStatisticsService.costCenterTotal(taskStatisticsVo);
- return HttpResult.ok("查询数据成功", result);
- }catch (Exception e){
- return HttpResult.error("查询错误"+e.getMessage());
- }
- }
- /**
- * @description: 保险公司统计总报价
- * @author: whp
- * @date: 2024/8/12
- **/
- @PostMapping("totalQuotation")
- @ApiOperation(value = "控制台-保险公司统计查询")
- public HttpResult<IPage<TaskStatisticsDto>> totalQuotation(@RequestBody TaskStatisticsVo taskStatisticsVo) {
- try{
- IPage<TaskStatisticsDto> result = taskStatisticsService.totalQuotation(taskStatisticsVo);
- return HttpResult.ok("查询数据成功", result);
- }catch (Exception e){
- return HttpResult.error("查询错误"+e.getMessage());
- }
- }
- /**
- * @description: 任务统计-保险公司-导出
- * @author: whp
- * @date: 2024/9/9
- **/
- @PostMapping("/insuranceCompanyExcel")
- @ApiOperation(value = "任务统计-保险公司-导出")
- public HttpResult insuranceCompanyExcel(@RequestBody TaskStatisticsVo taskStatisticsVo) {
- return this.taskStatisticsService.insuranceCompanyExcel(taskStatisticsVo);
- }
- /**
- * @description: 控制台-业务数据
- * @author: whp
- * @date: 2024/8/13
- **/
- @PostMapping("getBusinessData")
- @ApiOperation(value = "控制台-业务数据")
- public HttpResult<IPage<TaskStatisticsDto>> getBusinessData(@RequestBody TaskStatisticsVo taskStatisticsVo, HttpServletRequest httpServerRequest) {
- try{
- KztGetDeptUtils kztGetDeptUtils = new KztGetDeptUtils();
- KztGetDeptUtilsDto kztGetDeptUtilsDto = kztGetDeptUtils.KztGetDeptIds(httpServerRequest.getRequestURL().toString());
- if(ObjectUtils.isNotEmpty(kztGetDeptUtilsDto)){
- if("1".equals(kztGetDeptUtilsDto.getType())){
- taskStatisticsVo.setDeptIds(kztGetDeptUtilsDto.getIds());
- } else if ("2".equals(kztGetDeptUtilsDto.getType())) {
- taskStatisticsVo.setUserIds(kztGetDeptUtilsDto.getIds());
- }
- }
- IPage<TaskStatisticsDto> result = taskStatisticsService.getBusinessData(taskStatisticsVo);
- return HttpResult.ok("查询数据成功", result);
- }catch (Exception e){
- return HttpResult.error("查询错误"+e.getMessage());
- }
- }
- /**
- * @description: 控制台 - 业务数据 -保险公司导出
- * @author: whp
- * @date: 2024/12/13
- **/
- @PostMapping("/getBusinessDataExcel")
- @ApiOperation(value = "任务统计-保险公司导出")
- public HttpResult getBusinessDataExcel(@RequestBody TaskStatisticsVo taskStatisticsVo, HttpServletRequest httpServerRequest) {
- KztGetDeptUtils kztGetDeptUtils = new KztGetDeptUtils();
- KztGetDeptUtilsDto kztGetDeptUtilsDto = kztGetDeptUtils.KztGetDeptIds(httpServerRequest.getRequestURL().toString());
- if(ObjectUtils.isNotEmpty(kztGetDeptUtilsDto)){
- if("1".equals(kztGetDeptUtilsDto.getType())){
- taskStatisticsVo.setDeptIds(kztGetDeptUtilsDto.getIds());
- } else if ("2".equals(kztGetDeptUtilsDto.getType())) {
- taskStatisticsVo.setUserIds(kztGetDeptUtilsDto.getIds());
- }
- }
- return this.taskStatisticsService.getBusinessDataExcel(taskStatisticsVo);
- }
- /**
- * @description: 控制台-业务数据-统计
- * @author: whp
- * @date: 2024/10/12
- **/
- @PostMapping("getCountBusinessData")
- @ApiOperation(value = "控制台-业务数据")
- public HttpResult<TaskStatisticsDto> getCountBusinessData(@RequestBody TaskStatisticsVo taskStatisticsVo, HttpServletRequest httpServerRequest) {
- try{
- KztGetDeptUtils kztGetDeptUtils = new KztGetDeptUtils();
- KztGetDeptUtilsDto kztGetDeptUtilsDto = kztGetDeptUtils.KztGetDeptIds(httpServerRequest.getRequestURL().toString());
- if(ObjectUtils.isNotEmpty(kztGetDeptUtilsDto)){
- if("1".equals(kztGetDeptUtilsDto.getType())){
- taskStatisticsVo.setDeptIds(kztGetDeptUtilsDto.getIds());
- } else if ("2".equals(kztGetDeptUtilsDto.getType())) {
- taskStatisticsVo.setUserIds(kztGetDeptUtilsDto.getIds());
- }
- }
- TaskStatisticsDto result = taskStatisticsService.getCountBusinessData(taskStatisticsVo);
- return HttpResult.ok("查询数据成功", result);
- }catch (Exception e){
- return HttpResult.error("查询错误"+e.getMessage());
- }
- }
- /**
- * @description: 控制台-业务数据 - 保险分布
- * @author: whp
- * @date: 2024/8/13
- **/
- @PostMapping("getDistribution")
- @ApiOperation(value = "控制台-业务数据-保险分布")
- public HttpResult<List<TaskStatisticsDto>> getDistribution(@RequestBody TaskStatisticsVo taskStatisticsVo, HttpServletRequest httpServerRequest) {
- try{
- KztGetDeptUtils kztGetDeptUtils = new KztGetDeptUtils();
- KztGetDeptUtilsDto kztGetDeptUtilsDto = kztGetDeptUtils.KztGetDeptIds(httpServerRequest.getRequestURL().toString());
- if(ObjectUtils.isNotEmpty(kztGetDeptUtilsDto)){
- if("1".equals(kztGetDeptUtilsDto.getType())){
- taskStatisticsVo.setDeptIds(kztGetDeptUtilsDto.getIds());
- } else if ("2".equals(kztGetDeptUtilsDto.getType())) {
- taskStatisticsVo.setUserIds(kztGetDeptUtilsDto.getIds());
- }
- }
- List<TaskStatisticsDto> result = taskStatisticsService.getDistribution(taskStatisticsVo);
- return HttpResult.ok("查询数据成功", result);
- }catch (Exception e){
- return HttpResult.error("查询错误"+e.getMessage());
- }
- }
- /**
- * @description: 任务统计-渠道导出
- * @author: whp
- * @date: 2024/8/13
- **/
- @PostMapping("/channelExcel")
- @ApiOperation(value = "任务统计-渠道导出")
- public HttpResult channelExcel(@RequestBody TaskStatisticsVo taskStatisticsVo) {
- return this.taskStatisticsService.channelExcel(taskStatisticsVo);
- }
- /**
- * @description: 任控制台-业务数据-代理人
- * @author: whp
- * @date: 2024/09/09
- **/
- @PostMapping("getBusinessAgentData")
- @ApiOperation(value = "控制台-业务数据-代理人")
- public HttpResult<IPage<BusinessAgentData>> getBusinessAgentData(@RequestBody TaskStatisticsVo taskStatisticsVo) {
- try{
- IPage<BusinessAgentData> result = taskStatisticsService.getBusinessAgentData(taskStatisticsVo);
- return HttpResult.ok("查询数据成功", result);
- }catch (Exception e){
- return HttpResult.error("查询错误"+e.getMessage());
- }
- }
- /**
- * @description: 控制台 - 业务数据 -代理人导出
- * @author: whp
- * @date: 2024/12/13
- **/
- @PostMapping("/getBusinessAgentExcel")
- @ApiOperation(value = "任务统计-代理人导出")
- public HttpResult getBusinessAgentExcel(@RequestBody TaskStatisticsVo taskStatisticsVo, HttpServletRequest httpServerRequest) {
- KztGetDeptUtils kztGetDeptUtils = new KztGetDeptUtils();
- KztGetDeptUtilsDto kztGetDeptUtilsDto = kztGetDeptUtils.KztGetDeptIds(httpServerRequest.getRequestURL().toString());
- if(ObjectUtils.isNotEmpty(kztGetDeptUtilsDto)){
- if("1".equals(kztGetDeptUtilsDto.getType())){
- taskStatisticsVo.setDeptIds(kztGetDeptUtilsDto.getIds());
- } else if ("2".equals(kztGetDeptUtilsDto.getType())) {
- taskStatisticsVo.setUserIds(kztGetDeptUtilsDto.getIds());
- }
- }
- return this.taskStatisticsService.getBusinessAgentExcel(taskStatisticsVo);
- }
- /**
- * @description: 控制台 - 业务数据 -渠道导出
- * @author: whp
- * @date: 2024/12/13
- **/
- @PostMapping("/getChannelExcel")
- @ApiOperation(value = "任务统计-渠道导出")
- public HttpResult getChannelExcel(@RequestBody TaskStatisticsVo taskStatisticsVo, HttpServletRequest httpServerRequest) {
- KztGetDeptUtils kztGetDeptUtils = new KztGetDeptUtils();
- KztGetDeptUtilsDto kztGetDeptUtilsDto = kztGetDeptUtils.KztGetDeptIds(httpServerRequest.getRequestURL().toString());
- if(ObjectUtils.isNotEmpty(kztGetDeptUtilsDto)){
- if("1".equals(kztGetDeptUtilsDto.getType())){
- taskStatisticsVo.setDeptIds(kztGetDeptUtilsDto.getIds());
- } else if ("2".equals(kztGetDeptUtilsDto.getType())) {
- taskStatisticsVo.setUserIds(kztGetDeptUtilsDto.getIds());
- }
- }
- return this.taskStatisticsService.getChannelExcel(taskStatisticsVo);
- }
- /**
- * @description: 任控制台-业务数据-渠道
- * @author: whp
- * @date: 2024/12/05
- **/
- @PostMapping("getBusinessElectricData")
- @ApiOperation(value = "任控制台-业务数据-渠道")
- public HttpResult<IPage<BusinessAgentData>> getBusinessElectricData(@RequestBody TaskStatisticsVo taskStatisticsVo) {
- try{
- IPage<BusinessAgentData> result = taskStatisticsService.getBusinessElectricData(taskStatisticsVo);
- return HttpResult.ok("查询数据成功", result);
- }catch (Exception e){
- return HttpResult.error("查询错误"+e.getMessage());
- }
- }
- /**
- * @description: 任控制台-业务数据-代理人-合计
- * @author: whp
- * @date: 2024/09/09
- **/
- @PostMapping("getBusinessAgentDataTotal")
- @ApiOperation(value = "控制台-业务数据-代理人-合计")
- public HttpResult<BusinessAgentData> getBusinessAgentDataTotal(@RequestBody TaskStatisticsVo taskStatisticsVo) {
- try{
- BusinessAgentData result = taskStatisticsService.getBusinessAgentDataTotal(taskStatisticsVo);
- return HttpResult.ok("查询数据成功", result);
- }catch (Exception e){
- return HttpResult.error("查询错误"+e.getMessage());
- }
- }
- /**
- * @description: 任控制台-业务数据-代理人-合计
- * @author: whp
- *
- **/
- @PostMapping("getBusinessElectricDataTotal")
- @ApiOperation(value = "控制台-业务数据-渠道-合计")
- public HttpResult<BusinessAgentData> getBusinesElectricDataTotal(@RequestBody TaskStatisticsVo taskStatisticsVo) {
- try{
- BusinessAgentData result = taskStatisticsService.getBusinessElectricDataTotal(taskStatisticsVo);
- return HttpResult.ok("查询数据成功", result);
- }catch (Exception e){
- return HttpResult.error("查询错误"+e.getMessage());
- }
- }
- /**
- * @description: 任控制台-业务数据-代理人-详情
- * @author: whp
- * @date: 2024/09/10
- **/
- @PostMapping("getBusinessAgentDataDetails")
- @ApiOperation(value = "控制台-业务数据-代理人-详情")
- public HttpResult<IPage<BusinessAgentData>> getBusinessAgentDataDetails(@RequestBody TaskStatisticsVo taskStatisticsVo) {
- try{
- IPage<BusinessAgentData> result = taskStatisticsService.getBusinessAgentDataDetails(taskStatisticsVo);
- return HttpResult.ok("查询数据成功", result);
- }catch (Exception e){
- return HttpResult.error("查询错误"+e.getMessage());
- }
- }
- /**
- *
- * @param taskStatisticsVo
- * @return 控制台任务统计 渠道代理人详情
- */
- @PostMapping("channelAgentDetails")
- @ApiOperation(value = "控制台任务统计 渠道代理人详情")
- public HttpResult<IPage<TaskStatisticsDto>> channelAgentDetails(@RequestBody TaskStatisticsVo taskStatisticsVo) {
- try{
- IPage<TaskStatisticsDto> result = taskStatisticsService.channelAgentDetails(taskStatisticsVo);
- return HttpResult.ok("查询数据成功", result);
- }catch (Exception e){
- return HttpResult.error("查询错误"+e.getMessage());
- }
- }
- /**
- * @description: 任控制台-业务数据-渠道-详情
- * @author: hh
- * @date: 2024/11/19
- **/
- @PostMapping("getBusinessOrderDataDetails")
- @ApiOperation(value = "控制台-业务数据-电销-订单详情-详情")
- public HttpResult<PageInfo<BusinessOrderData>> getBusinessOrderDataDetails(@RequestBody TaskStatisticsVo taskStatisticsVo) {
- try {
- PageInfo<BusinessOrderData> businessOrderDataDetails = taskStatisticsService.getBusinessOrderDataDetails(taskStatisticsVo);
- return HttpResult.ok("查询数据成功", businessOrderDataDetails);
- } catch (Exception e) {
- return HttpResult.error("查询错误"+e.getMessage());
- }
- }
- /**
- * @description: 控制台-业务数据-渠道-订单详情-合计
- * @author: hh
- * @date: 2024/11/19
- **/
- @PostMapping("getBusinessOrderDataTotal")
- @ApiOperation(value = "控制台-业务数据-电销-订单详情-合计")
- public HttpResult<BusinessOrderData> getBusinessOrderDataTotal(@RequestBody TaskStatisticsVo taskStatisticsVo) {
- try {
- BusinessOrderData result = taskStatisticsService.getBusinessOrderDataTotal(taskStatisticsVo);
- return HttpResult.ok("查询数据成功", result);
- } catch (Exception e) {
- return HttpResult.error("查询错误"+e.getMessage());
- }
- }
- }
|