| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- package com.ydtech.modules.admin.controller.quoteCount;
- import com.ydtech.core.page.HttpResult;
- import com.ydtech.modules.admin.model.report.company.CompanyQutationCountDataDto;
- import com.ydtech.modules.admin.model.report.company.CompanyQutationCountDataQueryDto;
- import com.ydtech.modules.admin.model.vo.KztGetDeptUtilsDto;
- import com.ydtech.modules.admin.service.CompanyDataReportService;
- import com.ydtech.modules.admin.utils.KztGetDeptUtils;
- import com.ydtech.modules.order.entity.BasePageResult;
- import io.swagger.annotations.Api;
- import io.swagger.annotations.ApiOperation;
- import org.apache.commons.lang3.ObjectUtils;
- 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;
- /**
- * @version
- * @author: hxl
- * @Date: 2024/7/30 14:38
- * @Description: 报价次数查询
- */
- @Api(tags = "报价次数")
- @RequestMapping("/quoteCount")
- @RestController
- public class QuoteCountController {
- @Autowired
- private CompanyDataReportService companyDataReportService;
- /**
- * @version
- * @author: hxl
- * @Date: 2024/7/3 15:35
- * @Description: 查询报价次数数据
- */
- @PostMapping("queryCompanyQutationCountDataPage")
- @ApiOperation(value = "查询报价次数数据")
- public HttpResult<BasePageResult<CompanyQutationCountDataDto>> queryCompanyQutationCountDataPage(@RequestBody CompanyQutationCountDataQueryDto companyQutationCountDataQueryDto, HttpServletRequest httpServerRequest) {
- try{
- KztGetDeptUtils kztGetDeptUtils = new KztGetDeptUtils();
- KztGetDeptUtilsDto kztGetDeptUtilsDto = kztGetDeptUtils.KztGetDeptIds(httpServerRequest.getRequestURL().toString());
- if(ObjectUtils.isNotEmpty(kztGetDeptUtilsDto)){
- if("1".equals(kztGetDeptUtilsDto.getType())){
- companyQutationCountDataQueryDto.setDeptIds(kztGetDeptUtilsDto.getIds());
- } else if ("2".equals(kztGetDeptUtilsDto.getType())) {
- companyQutationCountDataQueryDto.setUserIds(kztGetDeptUtilsDto.getIds());
- }
- }
- BasePageResult<CompanyQutationCountDataDto> result = companyDataReportService.queryCompanyQutationCountDataPage(companyQutationCountDataQueryDto);
- return HttpResult.ok("查询数据成功", result);
- }catch (Exception e){
- return HttpResult.error("查询错误"+e.getMessage());
- }
- }
- }
|