TaskStatisticsController.java 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475
  1. package com.ydtech.modules.admin.controller.taskStatistics;
  2. import com.baomidou.mybatisplus.core.metadata.IPage;
  3. import com.ydtech.core.page.HttpResult;
  4. import com.ydtech.modules.admin.model.dto.TaskStatisticsDto;
  5. import com.ydtech.modules.admin.model.dto.TaskStatisticsDtoNew;
  6. import com.ydtech.modules.admin.model.vo.BusinessAgentData;
  7. import com.ydtech.modules.admin.model.vo.KztGetDeptUtilsDto;
  8. import com.ydtech.modules.admin.model.vo.TaskStatisticsVo;
  9. import com.ydtech.modules.admin.service.TaskStatisticsService;
  10. import com.ydtech.modules.admin.utils.KztGetDeptUtils;
  11. import io.swagger.annotations.*;
  12. import org.apache.commons.lang3.ObjectUtils;
  13. import org.springframework.beans.factory.annotation.Autowired;
  14. import org.springframework.web.bind.annotation.PostMapping;
  15. import org.springframework.web.bind.annotation.RequestBody;
  16. import org.springframework.web.bind.annotation.RequestMapping;
  17. import org.springframework.web.bind.annotation.RestController;
  18. import javax.servlet.http.HttpServletRequest;
  19. import java.util.HashMap;
  20. import java.util.List;
  21. /**
  22. * @description: 任务统计
  23. * @author: whp
  24. * @date: 2024/7/25
  25. **/
  26. @Api(tags = "控制台-任务统计")
  27. @RequestMapping("/taskStatistics")
  28. @RestController
  29. public class TaskStatisticsController {
  30. @Autowired
  31. private TaskStatisticsService taskStatisticsService;
  32. /**
  33. * @description: 渠道任务统计查询
  34. * @author: whp
  35. * @date: 2024/7/25
  36. **/
  37. @PostMapping("queryPage")
  38. @ApiOperation(value = "控制台-渠道任务统计查询")
  39. public HttpResult<IPage<TaskStatisticsDto>> queryPage(@RequestBody TaskStatisticsVo taskStatisticsVo, HttpServletRequest httpServerRequest) {
  40. try{
  41. KztGetDeptUtils kztGetDeptUtils = new KztGetDeptUtils();
  42. KztGetDeptUtilsDto kztGetDeptUtilsDto = kztGetDeptUtils.KztGetDeptIds(httpServerRequest.getRequestURL().toString());
  43. if(ObjectUtils.isNotEmpty(kztGetDeptUtilsDto)){
  44. if("1".equals(kztGetDeptUtilsDto.getType())){
  45. taskStatisticsVo.setDeptIds(kztGetDeptUtilsDto.getIds());
  46. } else if ("2".equals(kztGetDeptUtilsDto.getType())) {
  47. taskStatisticsVo.setUserIds(kztGetDeptUtilsDto.getIds());
  48. }
  49. }
  50. IPage<TaskStatisticsDto> result = taskStatisticsService.queryPage(taskStatisticsVo);
  51. return HttpResult.ok("查询数据成功", result);
  52. }catch (Exception e){
  53. return HttpResult.error("查询错误"+e.getMessage());
  54. }
  55. }
  56. /**
  57. * @description: 电销任务统计查询
  58. * @author: whp
  59. * @date: 2024/10/11
  60. **/
  61. @PostMapping("queryPageElectric")
  62. @ApiOperation(value = "控制台-电销任务统计查询")
  63. public HttpResult<IPage<TaskStatisticsDto>> queryPageElectric(@RequestBody TaskStatisticsVo taskStatisticsVo, HttpServletRequest httpServerRequest) {
  64. try{
  65. KztGetDeptUtils kztGetDeptUtils = new KztGetDeptUtils();
  66. KztGetDeptUtilsDto kztGetDeptUtilsDto = kztGetDeptUtils.KztGetDeptIds(httpServerRequest.getRequestURL().toString());
  67. if(ObjectUtils.isNotEmpty(kztGetDeptUtilsDto)){
  68. if("1".equals(kztGetDeptUtilsDto.getType())){
  69. taskStatisticsVo.setDeptIds(kztGetDeptUtilsDto.getIds());
  70. } else if ("2".equals(kztGetDeptUtilsDto.getType())) {
  71. taskStatisticsVo.setUserIds(kztGetDeptUtilsDto.getIds());
  72. }
  73. }
  74. IPage<TaskStatisticsDto> result = taskStatisticsService.queryPageElectric(taskStatisticsVo);
  75. return HttpResult.ok("查询数据成功", result);
  76. }catch (Exception e){
  77. return HttpResult.error("查询错误"+e.getMessage());
  78. }
  79. }
  80. /**
  81. * @description: 任务统计-电销导出
  82. * @author: whp
  83. * @date: 2024/10/29
  84. **/
  85. @PostMapping("/electricExcel")
  86. @ApiOperation(value = "任务统计-电销导出")
  87. public HttpResult electricExcel(@RequestBody TaskStatisticsVo taskStatisticsVo) {
  88. return this.taskStatisticsService.electricExcel(taskStatisticsVo);
  89. }
  90. /**
  91. * @description: 保险公司统计查询
  92. * @author: whp
  93. * @date: 2024/7/25
  94. **/
  95. @PostMapping("insuranceCompanyQueryPage")
  96. @ApiOperation(value = "控制台-保险公司统计查询")
  97. public HttpResult<IPage<TaskStatisticsDto>> insuranceCompanyQueryPage(@RequestBody TaskStatisticsVo taskStatisticsVo, HttpServletRequest httpServerRequest) {
  98. try{
  99. KztGetDeptUtils kztGetDeptUtils = new KztGetDeptUtils();
  100. KztGetDeptUtilsDto kztGetDeptUtilsDto = kztGetDeptUtils.KztGetDeptIds(httpServerRequest.getRequestURL().toString());
  101. if(ObjectUtils.isNotEmpty(kztGetDeptUtilsDto)){
  102. if("1".equals(kztGetDeptUtilsDto.getType())){
  103. taskStatisticsVo.setDeptIds(kztGetDeptUtilsDto.getIds());
  104. } else if ("2".equals(kztGetDeptUtilsDto.getType())) {
  105. taskStatisticsVo.setUserIds(kztGetDeptUtilsDto.getIds());
  106. }
  107. }
  108. IPage<TaskStatisticsDto> result = taskStatisticsService.insuranceCompanyQueryPage(taskStatisticsVo);
  109. return HttpResult.ok("查询数据成功", result);
  110. }catch (Exception e){
  111. return HttpResult.error("查询错误"+e.getMessage());
  112. }
  113. }
  114. /**
  115. * @description: 代理人统计查询
  116. * @author: whp
  117. * @date: 2024/7/26
  118. **/
  119. @PostMapping("agentStatisticsQueryPage")
  120. @ApiOperation(value = "控制台-代理人统计查询")
  121. public HttpResult<IPage<TaskStatisticsDto>> agentStatisticsQueryPage(@RequestBody TaskStatisticsVo taskStatisticsVo, HttpServletRequest httpServerRequest) {
  122. try{
  123. KztGetDeptUtils kztGetDeptUtils = new KztGetDeptUtils();
  124. KztGetDeptUtilsDto kztGetDeptUtilsDto = kztGetDeptUtils.KztGetDeptIds(httpServerRequest.getRequestURL().toString());
  125. if(ObjectUtils.isNotEmpty(kztGetDeptUtilsDto)){
  126. if("1".equals(kztGetDeptUtilsDto.getType())){
  127. taskStatisticsVo.setDeptIds(kztGetDeptUtilsDto.getIds());
  128. } else if ("2".equals(kztGetDeptUtilsDto.getType())) {
  129. taskStatisticsVo.setUserIds(kztGetDeptUtilsDto.getIds());
  130. }
  131. }
  132. IPage<TaskStatisticsDto> result = taskStatisticsService.agentStatisticsQueryPage(taskStatisticsVo);
  133. return HttpResult.ok("查询数据成功", result);
  134. }catch (Exception e){
  135. return HttpResult.error("查询错误"+e.getMessage());
  136. }
  137. }
  138. /**
  139. * @description: 任务统计-代理人导出
  140. * @author: whp
  141. * @date: 2024/9/9
  142. **/
  143. @PostMapping("/agentExcel")
  144. @ApiOperation(value = "任务统计-代理人导出")
  145. public HttpResult channelAgentExcel(@RequestBody TaskStatisticsVo taskStatisticsVo) {
  146. return this.taskStatisticsService.agentExcel(taskStatisticsVo);
  147. }
  148. /**
  149. * @description: 财务中心-费用校验
  150. * @author: whp
  151. * @date: 2024/7/29
  152. **/
  153. @PostMapping("costCenter")
  154. @ApiOperation(value = "控制台-财务中心-费用校验")
  155. public HttpResult<IPage<TaskStatisticsDto>> costCenter(@RequestBody TaskStatisticsVo taskStatisticsVo, HttpServletRequest httpServerRequest) {
  156. try{
  157. KztGetDeptUtils kztGetDeptUtils = new KztGetDeptUtils();
  158. KztGetDeptUtilsDto kztGetDeptUtilsDto = kztGetDeptUtils.KztGetDeptIds(httpServerRequest.getRequestURL().toString());
  159. if(ObjectUtils.isNotEmpty(kztGetDeptUtilsDto)){
  160. if("1".equals(kztGetDeptUtilsDto.getType())){
  161. taskStatisticsVo.setDeptIds(kztGetDeptUtilsDto.getIds());
  162. } else if ("2".equals(kztGetDeptUtilsDto.getType())) {
  163. taskStatisticsVo.setUserIds(kztGetDeptUtilsDto.getIds());
  164. }
  165. }
  166. IPage<TaskStatisticsDto> result = taskStatisticsService.costCenter(taskStatisticsVo);
  167. return HttpResult.ok("查询数据成功", result);
  168. }catch (Exception e){
  169. return HttpResult.error("查询错误"+e.getMessage());
  170. }
  171. }
  172. /**
  173. * @description: 财务中心-费用校验-明细
  174. * @author: whp
  175. * @date: 2024/10/10
  176. **/
  177. @PostMapping("costCenterDetails")
  178. @ApiOperation(value = "控制台-财务中心-费用校验详情")
  179. public HttpResult<IPage<TaskStatisticsDto>> costCenterDetails(@RequestBody TaskStatisticsVo taskStatisticsVo, HttpServletRequest httpServerRequest) {
  180. try{
  181. KztGetDeptUtils kztGetDeptUtils = new KztGetDeptUtils();
  182. KztGetDeptUtilsDto kztGetDeptUtilsDto = kztGetDeptUtils.KztGetDeptIds(httpServerRequest.getRequestURL().toString());
  183. if(ObjectUtils.isNotEmpty(kztGetDeptUtilsDto)){
  184. if("1".equals(kztGetDeptUtilsDto.getType())){
  185. taskStatisticsVo.setDeptIds(kztGetDeptUtilsDto.getIds());
  186. } else if ("2".equals(kztGetDeptUtilsDto.getType())) {
  187. taskStatisticsVo.setUserIds(kztGetDeptUtilsDto.getIds());
  188. }
  189. }
  190. IPage<TaskStatisticsDto> result = taskStatisticsService.costCenterDetails(taskStatisticsVo);
  191. return HttpResult.ok("查询数据成功", result);
  192. }catch (Exception e){
  193. return HttpResult.error("查询错误"+e.getMessage());
  194. }
  195. }
  196. /**
  197. * @description: 财务中心-费用校验-明细-查看
  198. * @author: whp
  199. * @date: 2024/10/10
  200. **/
  201. @PostMapping("costCenterDetailsLicense")
  202. @ApiOperation(value = "控制台-财务中心-费用校验详情-查看")
  203. public HttpResult<TaskStatisticsDtoNew> costCenterDetailsLicense(@RequestBody TaskStatisticsVo taskStatisticsVo, HttpServletRequest httpServerRequest) {
  204. try{
  205. KztGetDeptUtils kztGetDeptUtils = new KztGetDeptUtils();
  206. KztGetDeptUtilsDto kztGetDeptUtilsDto = kztGetDeptUtils.KztGetDeptIds(httpServerRequest.getRequestURL().toString());
  207. if(ObjectUtils.isNotEmpty(kztGetDeptUtilsDto)){
  208. if("1".equals(kztGetDeptUtilsDto.getType())){
  209. taskStatisticsVo.setDeptIds(kztGetDeptUtilsDto.getIds());
  210. } else if ("2".equals(kztGetDeptUtilsDto.getType())) {
  211. taskStatisticsVo.setUserIds(kztGetDeptUtilsDto.getIds());
  212. }
  213. }
  214. TaskStatisticsDtoNew result = taskStatisticsService.costCenterDetailsLicense(taskStatisticsVo);
  215. return HttpResult.ok("查询数据成功", result);
  216. }catch (Exception e){
  217. return HttpResult.error("查询错误"+e.getMessage());
  218. }
  219. }
  220. /**
  221. * @description: 任务统计-保险公司-导出
  222. * @author: whp
  223. * @date: 2024/9/9
  224. **/
  225. @PostMapping("/costCenterDetailsExcel")
  226. @ApiOperation(value = "控制台-财务中心-费用校验详情-导出")
  227. public HttpResult costCenterDetailsExcel(@RequestBody TaskStatisticsVo taskStatisticsVo, HttpServletRequest httpServerRequest) {
  228. KztGetDeptUtils kztGetDeptUtils = new KztGetDeptUtils();
  229. KztGetDeptUtilsDto kztGetDeptUtilsDto = kztGetDeptUtils.KztGetDeptIds(httpServerRequest.getRequestURL().toString());
  230. if(ObjectUtils.isNotEmpty(kztGetDeptUtilsDto)){
  231. if("1".equals(kztGetDeptUtilsDto.getType())){
  232. taskStatisticsVo.setDeptIds(kztGetDeptUtilsDto.getIds());
  233. } else if ("2".equals(kztGetDeptUtilsDto.getType())) {
  234. taskStatisticsVo.setUserIds(kztGetDeptUtilsDto.getIds());
  235. }
  236. }
  237. return this.taskStatisticsService.costCenterDetailsExcel(taskStatisticsVo);
  238. }
  239. /**
  240. * @description: 财务中心-费用校验-合计
  241. * @author: whp
  242. * @date: 2024/9/28
  243. **/
  244. @PostMapping("costCenterTotal")
  245. @ApiOperation(value = "财务中心-费用校验-合计")
  246. public HttpResult<HashMap<String,Object>> costCenterTotal(@RequestBody TaskStatisticsVo taskStatisticsVo, HttpServletRequest httpServerRequest) {
  247. try{
  248. KztGetDeptUtils kztGetDeptUtils = new KztGetDeptUtils();
  249. KztGetDeptUtilsDto kztGetDeptUtilsDto = kztGetDeptUtils.KztGetDeptIds(httpServerRequest.getRequestURL().toString());
  250. if(ObjectUtils.isNotEmpty(kztGetDeptUtilsDto)){
  251. if("1".equals(kztGetDeptUtilsDto.getType())){
  252. taskStatisticsVo.setDeptIds(kztGetDeptUtilsDto.getIds());
  253. } else if ("2".equals(kztGetDeptUtilsDto.getType())) {
  254. taskStatisticsVo.setUserIds(kztGetDeptUtilsDto.getIds());
  255. }
  256. }
  257. HashMap<String,Object> result = taskStatisticsService.costCenterTotal(taskStatisticsVo);
  258. return HttpResult.ok("查询数据成功", result);
  259. }catch (Exception e){
  260. return HttpResult.error("查询错误"+e.getMessage());
  261. }
  262. }
  263. /**
  264. * @description: 保险公司统计总报价
  265. * @author: whp
  266. * @date: 2024/8/12
  267. **/
  268. @PostMapping("totalQuotation")
  269. @ApiOperation(value = "控制台-保险公司统计查询")
  270. public HttpResult<IPage<TaskStatisticsDto>> totalQuotation(@RequestBody TaskStatisticsVo taskStatisticsVo) {
  271. try{
  272. IPage<TaskStatisticsDto> result = taskStatisticsService.totalQuotation(taskStatisticsVo);
  273. return HttpResult.ok("查询数据成功", result);
  274. }catch (Exception e){
  275. return HttpResult.error("查询错误"+e.getMessage());
  276. }
  277. }
  278. /**
  279. * @description: 任务统计-保险公司-导出
  280. * @author: whp
  281. * @date: 2024/9/9
  282. **/
  283. @PostMapping("/insuranceCompanyExcel")
  284. @ApiOperation(value = "任务统计-保险公司-导出")
  285. public HttpResult insuranceCompanyExcel(@RequestBody TaskStatisticsVo taskStatisticsVo) {
  286. return this.taskStatisticsService.insuranceCompanyExcel(taskStatisticsVo);
  287. }
  288. /**
  289. * @description: 控制台-业务数据
  290. * @author: whp
  291. * @date: 2024/8/13
  292. **/
  293. @PostMapping("getBusinessData")
  294. @ApiOperation(value = "控制台-业务数据")
  295. public HttpResult<IPage<TaskStatisticsDto>> getBusinessData(@RequestBody TaskStatisticsVo taskStatisticsVo, HttpServletRequest httpServerRequest) {
  296. try{
  297. KztGetDeptUtils kztGetDeptUtils = new KztGetDeptUtils();
  298. KztGetDeptUtilsDto kztGetDeptUtilsDto = kztGetDeptUtils.KztGetDeptIds(httpServerRequest.getRequestURL().toString());
  299. if(ObjectUtils.isNotEmpty(kztGetDeptUtilsDto)){
  300. if("1".equals(kztGetDeptUtilsDto.getType())){
  301. taskStatisticsVo.setDeptIds(kztGetDeptUtilsDto.getIds());
  302. } else if ("2".equals(kztGetDeptUtilsDto.getType())) {
  303. taskStatisticsVo.setUserIds(kztGetDeptUtilsDto.getIds());
  304. }
  305. }
  306. IPage<TaskStatisticsDto> result = taskStatisticsService.getBusinessData(taskStatisticsVo);
  307. return HttpResult.ok("查询数据成功", result);
  308. }catch (Exception e){
  309. return HttpResult.error("查询错误"+e.getMessage());
  310. }
  311. }
  312. /**
  313. * @description: 控制台-业务数据-统计
  314. * @author: whp
  315. * @date: 2024/10/12
  316. **/
  317. @PostMapping("getCountBusinessData")
  318. @ApiOperation(value = "控制台-业务数据")
  319. public HttpResult<TaskStatisticsDto> getCountBusinessData(@RequestBody TaskStatisticsVo taskStatisticsVo, HttpServletRequest httpServerRequest) {
  320. try{
  321. KztGetDeptUtils kztGetDeptUtils = new KztGetDeptUtils();
  322. KztGetDeptUtilsDto kztGetDeptUtilsDto = kztGetDeptUtils.KztGetDeptIds(httpServerRequest.getRequestURL().toString());
  323. if(ObjectUtils.isNotEmpty(kztGetDeptUtilsDto)){
  324. if("1".equals(kztGetDeptUtilsDto.getType())){
  325. taskStatisticsVo.setDeptIds(kztGetDeptUtilsDto.getIds());
  326. } else if ("2".equals(kztGetDeptUtilsDto.getType())) {
  327. taskStatisticsVo.setUserIds(kztGetDeptUtilsDto.getIds());
  328. }
  329. }
  330. TaskStatisticsDto result = taskStatisticsService.getCountBusinessData(taskStatisticsVo);
  331. return HttpResult.ok("查询数据成功", result);
  332. }catch (Exception e){
  333. return HttpResult.error("查询错误"+e.getMessage());
  334. }
  335. }
  336. /**
  337. * @description: 控制台-业务数据 - 保险分布
  338. * @author: whp
  339. * @date: 2024/8/13
  340. **/
  341. @PostMapping("getDistribution")
  342. @ApiOperation(value = "控制台-业务数据-保险分布")
  343. public HttpResult<List<TaskStatisticsDto>> getDistribution(@RequestBody TaskStatisticsVo taskStatisticsVo, HttpServletRequest httpServerRequest) {
  344. try{
  345. KztGetDeptUtils kztGetDeptUtils = new KztGetDeptUtils();
  346. KztGetDeptUtilsDto kztGetDeptUtilsDto = kztGetDeptUtils.KztGetDeptIds(httpServerRequest.getRequestURL().toString());
  347. if(ObjectUtils.isNotEmpty(kztGetDeptUtilsDto)){
  348. if("1".equals(kztGetDeptUtilsDto.getType())){
  349. taskStatisticsVo.setDeptIds(kztGetDeptUtilsDto.getIds());
  350. } else if ("2".equals(kztGetDeptUtilsDto.getType())) {
  351. taskStatisticsVo.setUserIds(kztGetDeptUtilsDto.getIds());
  352. }
  353. }
  354. List<TaskStatisticsDto> result = taskStatisticsService.getDistribution(taskStatisticsVo);
  355. return HttpResult.ok("查询数据成功", result);
  356. }catch (Exception e){
  357. return HttpResult.error("查询错误"+e.getMessage());
  358. }
  359. }
  360. /**
  361. * @description: 任务统计-渠道导出
  362. * @author: whp
  363. * @date: 2024/8/13
  364. **/
  365. @PostMapping("/channelExcel")
  366. @ApiOperation(value = "任务统计-渠道导出")
  367. public HttpResult channelExcel(@RequestBody TaskStatisticsVo taskStatisticsVo) {
  368. return this.taskStatisticsService.channelExcel(taskStatisticsVo);
  369. }
  370. /**
  371. * @description: 任控制台-业务数据-代理人
  372. * @author: whp
  373. * @date: 2024/09/09
  374. **/
  375. @PostMapping("getBusinessAgentData")
  376. @ApiOperation(value = "控制台-业务数据-代理人")
  377. public HttpResult<IPage<BusinessAgentData>> getBusinessAgentData(@RequestBody TaskStatisticsVo taskStatisticsVo, HttpServletRequest httpServerRequest) {
  378. try{
  379. KztGetDeptUtils kztGetDeptUtils = new KztGetDeptUtils();
  380. KztGetDeptUtilsDto kztGetDeptUtilsDto = kztGetDeptUtils.KztGetDeptIds(httpServerRequest.getRequestURL().toString());
  381. if(ObjectUtils.isNotEmpty(kztGetDeptUtilsDto)){
  382. if("1".equals(kztGetDeptUtilsDto.getType())){
  383. taskStatisticsVo.setDeptIds(kztGetDeptUtilsDto.getIds());
  384. } else if ("2".equals(kztGetDeptUtilsDto.getType())) {
  385. taskStatisticsVo.setUserIds(kztGetDeptUtilsDto.getIds());
  386. }
  387. }
  388. IPage<BusinessAgentData> result = taskStatisticsService.getBusinessAgentData(taskStatisticsVo);
  389. return HttpResult.ok("查询数据成功", result);
  390. }catch (Exception e){
  391. return HttpResult.error("查询错误"+e.getMessage());
  392. }
  393. }
  394. /**
  395. * @description: 任控制台-业务数据-代理人-合计
  396. * @author: whp
  397. * @date: 2024/09/09
  398. **/
  399. @PostMapping("getBusinessAgentDataTotal")
  400. @ApiOperation(value = "控制台-业务数据-代理人-合计")
  401. public HttpResult<BusinessAgentData> getBusinessAgentDataTotal(@RequestBody TaskStatisticsVo taskStatisticsVo, HttpServletRequest httpServerRequest) {
  402. try{
  403. KztGetDeptUtils kztGetDeptUtils = new KztGetDeptUtils();
  404. KztGetDeptUtilsDto kztGetDeptUtilsDto = kztGetDeptUtils.KztGetDeptIds(httpServerRequest.getRequestURL().toString());
  405. if(ObjectUtils.isNotEmpty(kztGetDeptUtilsDto)){
  406. if("1".equals(kztGetDeptUtilsDto.getType())){
  407. taskStatisticsVo.setDeptIds(kztGetDeptUtilsDto.getIds());
  408. } else if ("2".equals(kztGetDeptUtilsDto.getType())) {
  409. taskStatisticsVo.setUserIds(kztGetDeptUtilsDto.getIds());
  410. }
  411. }
  412. BusinessAgentData result = taskStatisticsService.getBusinessAgentDataTotal(taskStatisticsVo);
  413. return HttpResult.ok("查询数据成功", result);
  414. }catch (Exception e){
  415. return HttpResult.error("查询错误"+e.getMessage());
  416. }
  417. }
  418. /**
  419. * @description: 任控制台-业务数据-代理人-详情
  420. * @author: whp
  421. * @date: 2024/09/10
  422. **/
  423. @PostMapping("getBusinessAgentDataDetails")
  424. @ApiOperation(value = "控制台-业务数据-代理人-详情")
  425. public HttpResult<IPage<BusinessAgentData>> getBusinessAgentDataDetails(@RequestBody TaskStatisticsVo taskStatisticsVo) {
  426. try{
  427. IPage<BusinessAgentData> result = taskStatisticsService.getBusinessAgentDataDetails(taskStatisticsVo);
  428. return HttpResult.ok("查询数据成功", result);
  429. }catch (Exception e){
  430. return HttpResult.error("查询错误"+e.getMessage());
  431. }
  432. }
  433. /**
  434. *
  435. * @param taskStatisticsVo
  436. * @return 控制台任务统计 渠道代理人详情
  437. */
  438. @PostMapping("channelAgentDetails")
  439. @ApiOperation(value = "控制台任务统计 渠道代理人详情")
  440. public HttpResult<IPage<TaskStatisticsDto>> channelAgentDetails(@RequestBody TaskStatisticsVo taskStatisticsVo) {
  441. try{
  442. IPage<TaskStatisticsDto> result = taskStatisticsService.channelAgentDetails(taskStatisticsVo);
  443. return HttpResult.ok("查询数据成功", result);
  444. }catch (Exception e){
  445. return HttpResult.error("查询错误"+e.getMessage());
  446. }
  447. }
  448. }