123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129 |
- package com.ozs.web.controller.statisticalAnalysis;
- import com.ozs.common.annotation.Log;
- import com.ozs.common.constant.ModularConstans;
- import com.ozs.common.core.controller.BaseController;
- import com.ozs.common.core.domain.AjaxResult;
- import com.ozs.common.enums.BusinessType;
- import com.ozs.common.utils.StringUtils;
- import com.ozs.pm.doman.vo.requestVo.PmDemandReqVo;
- import com.ozs.pm.doman.vo.responseVo.StatisticalChartsResVo;
- import com.ozs.pm.service.IPmDemandService;
- import io.swagger.annotations.ApiOperation;
- 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.annotation.Resource;
- import java.util.List;
- /**
- * 统计分析页面控制层
- * (需求更新后进行的整理)
- *
- * @author buzhanyi
- */
- @RestController
- @RequestMapping("/analysis")
- public class AnalysisController extends BaseController {
- @Resource
- private IPmDemandService pmDemandService;
- @ApiOperation(value = "需求提报情况")
- @PostMapping("/demandSubCount")
- @Log(title = ModularConstans.statisticalAnalysis, businessType = BusinessType.QUERY)
- public AjaxResult demandSubCount(@RequestBody PmDemandReqVo pmDemandReqVo) {
- if (StringUtils.isNull(pmDemandReqVo.getPurchaseDeptId())) {
- return error("登录账号的单位 不能为空!");
- }
- List<StatisticalChartsResVo> resVos = pmDemandService.demandSubCount(pmDemandReqVo);
- return success(resVos);
- }
- @ApiOperation(value = "项目类型情况统计")
- @PostMapping("/countByProjectType")
- //@PreAuthorize("@ss.hasPermi('statistical:countByProjectType')")
- @Log(title = ModularConstans.statisticalAnalysis, businessType = BusinessType.QUERY)
- public AjaxResult countByProjectType(@RequestBody PmDemandReqVo pmDemandReqVo) {
- if (StringUtils.isNull(pmDemandReqVo.getPurchaseDeptId())) {
- return error("登录账号的单位 不能为空!");
- }
- List<StatisticalChartsResVo> resVos = pmDemandService.countByProjectType(pmDemandReqVo);
- return AjaxResult.success(resVos);
- }
- @ApiOperation(value = "项目属性情况统计")
- @PostMapping("/countByProjectAttr")
- //@PreAuthorize("@ss.hasPermi('statistical:countByProjectAttr')")
- @Log(title = ModularConstans.statisticalAnalysis, businessType = BusinessType.QUERY)
- public AjaxResult countByProjectAttr(@RequestBody PmDemandReqVo pmDemandReqVo) {
- //按照项目属性统计所有的项目
- if (StringUtils.isNull(pmDemandReqVo.getPurchaseDeptId())) {
- return error("登录账号的单位 不能为空!");
- }
- List<StatisticalChartsResVo> resVos = pmDemandService.countByProjectAttr(pmDemandReqVo);
- return AjaxResult.success(resVos);
- }
- @ApiOperation(value = "需采转化情况统计")
- @PostMapping("/countByPurchaseChange")
- //@PreAuthorize("@ss.hasPermi('statistical:countByPurchaseChange')")
- @Log(title = ModularConstans.statisticalAnalysis, businessType = BusinessType.QUERY)
- public AjaxResult countByPurchaseChange(@RequestBody PmDemandReqVo pmDemandReqVo) {
- if (StringUtils.isNull(pmDemandReqVo.getPurchaseDeptId())) {
- return error("登录账号的单位 不能为空!");
- }
- List<StatisticalChartsResVo> resVos = pmDemandService.countByPurchaseChange(pmDemandReqVo);
- return AjaxResult.success(resVos);
- }
- @ApiOperation(value = "执行滞后分析")
- @PostMapping("/countProjectExceed")
- //@PreAuthorize("@ss.hasPermi('statistical:countProjectExceed')")
- @Log(title = ModularConstans.statisticalAnalysis, businessType = BusinessType.QUERY)
- public AjaxResult countProjectExceed(@RequestBody PmDemandReqVo pmDemandReqVo) {
- if (StringUtils.isNull(pmDemandReqVo.getPurchaseDeptId())) {
- return error("登录账号的单位 不能为空!");
- }
- return pmDemandService.countProjectExceed(pmDemandReqVo);
- }
- @ApiOperation(value = "滞后项目时长分析")
- @PostMapping("/exceedMarketAnalysis")
- //@PreAuthorize("@ss.hasPermi('statistical:exceedMarketAnalysis')")
- @Log(title = ModularConstans.statisticalAnalysis, businessType = BusinessType.QUERY)
- public AjaxResult exceedMarketAnalysis(@RequestBody PmDemandReqVo pmDemandReqVo) {
- //按照滞后时长统计项目数量
- //滞后时长包括:滞后1个月以内的采购任务、滞后1至3个月采购任务、滞后3至6个月采购任务、滞后6个月至1年采购任务、滞后1年以上采购任务
- if (StringUtils.isNull(pmDemandReqVo.getPurchaseDeptId())) {
- return error("登录账号的单位 不能为空!");
- }
- return pmDemandService.exceedMarketAnalysis(pmDemandReqVo);
- }
- @ApiOperation(value = "滞后主要直接原因")
- @PostMapping("/exceedReason")
- //@PreAuthorize("@ss.hasPermi('statistical:exceedReason')")
- @Log(title = ModularConstans.statisticalAnalysis, businessType = BusinessType.QUERY)
- public AjaxResult exceedReason(@RequestBody PmDemandReqVo pmDemandReqVo) {
- //按照滞后时长统计项目数量
- //滞后时长包括:滞后1个月以内的采购任务、滞后1至3个月采购任务、滞后3至6个月采购任务、滞后6个月至1年采购任务、滞后1年以上采购任务
- if (StringUtils.isNull(pmDemandReqVo.getPurchaseDeptId())) {
- return error("登录账号的单位 不能为空!");
- }
- return pmDemandService.exceedReason(pmDemandReqVo);
- }
- @ApiOperation(value = "重大规划采购任务专项计划管理情况")
- @PostMapping("/countMajorProject")
- //@PreAuthorize("@ss.hasPermi('statistical:countMajorProject')")
- @Log(title = ModularConstans.statisticalAnalysis, businessType = BusinessType.QUERY)
- public AjaxResult countMajorProject(@RequestBody PmDemandReqVo pmDemandReqVo) {
- if (StringUtils.isNull(pmDemandReqVo.getPurchaseDeptId())) {
- return error("登录账号的单位 不能为空!");
- }
- return pmDemandService.countMajorProject(pmDemandReqVo);
- }
- }
|