| | |
| | | package com.ruoyi.home.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.approve.pojo.ApproveProcess; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.home.dto.AnalysisCustomerContractAmountsDto; |
| | | import com.ruoyi.home.dto.HomeBusinessDto; |
| | | import com.ruoyi.home.dto.QualityStatisticsDto; |
| | | import com.ruoyi.home.dto.StatisticsReceivablePayableDto; |
| | | import com.ruoyi.home.dto.*; |
| | | import com.ruoyi.home.service.HomeService; |
| | | import com.ruoyi.production.dto.SalesLedgerWorkDto; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.text.ParseException; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author :yys |
| | |
| | | @Autowired |
| | | private HomeService homeService; |
| | | |
| | | /********************************************************基础类*****************************************************/ |
| | | @GetMapping("/todos") |
| | | @Log(title = "待办事项", businessType = BusinessType.OTHER) |
| | | @ApiOperation("待办事项") |
| | | public AjaxResult todos(ApproveProcess req) throws ParseException { |
| | | List<ApproveProcess> approveProcessList = homeService.todos(); |
| | | return AjaxResult.success(approveProcessList); |
| | | } |
| | | |
| | | @GetMapping("/approveAndDeviceTodos") |
| | | @ApiOperation("审批协同,设备报修待办事项") |
| | | public AjaxResult approveAndDeviceTodos(){ |
| | | Map<String, Object> map = homeService.approveAndDeviceTodos(); |
| | | return AjaxResult.success(map); |
| | | } |
| | | |
| | | @GetMapping("/noticesCount") |
| | | @ApiOperation("未过期的公告数量") |
| | | public AjaxResult noticesCount(){ |
| | | Long count = homeService.noticesCount(); |
| | | return AjaxResult.success(count); |
| | | } |
| | | |
| | | @GetMapping("/deptStaffDistribution") |
| | | @ApiOperation("各部门人员分布") |
| | | public AjaxResult deptStaffDistribution() { |
| | | DeptStaffDistributionDto dto = homeService.deptStaffDistribution(); |
| | | return AjaxResult.success(dto); |
| | | } |
| | | |
| | | @GetMapping("/summaryStatistics") |
| | | @ApiOperation("员工-客户-供应商总数") |
| | | public AjaxResult summaryStatistics() { |
| | | HomeSummaryDto homeSummaryDto = homeService.summaryStatistics(); |
| | | return AjaxResult.success(homeSummaryDto); |
| | | } |
| | | |
| | | @GetMapping("/supplierPurchaseRanking") |
| | | @ApiOperation("供应商采购排名") |
| | | public AjaxResult supplierPurchaseRanking(@RequestParam(value = "type", defaultValue = "0") Integer type) { |
| | | List<SupplierPurchaseRankingDto> list = homeService.supplierPurchaseRanking(type); |
| | | return AjaxResult.success(list); |
| | | } |
| | | |
| | | @GetMapping("/customerRevenueAnalysis") |
| | | @ApiOperation("客户营收贡献数值分析") |
| | | public AjaxResult customerRevenueAnalysis(@RequestParam("customerId") Long customerId, @RequestParam(value = "type", defaultValue = "0") Integer type) { |
| | | CustomerRevenueAnalysisDto dto = homeService.customerRevenueAnalysis(customerId, type); |
| | | return AjaxResult.success(dto); |
| | | } |
| | | |
| | | @GetMapping("/productCategoryDistribution") |
| | | @ApiOperation("产品大类分布") |
| | | public AjaxResult productCategoryDistribution() { |
| | | ProductCategoryDistributionDto dto = homeService.productCategoryDistribution(); |
| | | return AjaxResult.success(dto); |
| | | } |
| | | |
| | | @GetMapping("/customerContributionRanking") |
| | | @ApiOperation("客户金额贡献排名") |
| | | public AjaxResult customerContributionRanking(@RequestParam(value = "type", defaultValue = "1") Integer type) { |
| | | List<CustomerContributionRankingDto> list = homeService.customerContributionRanking(type); |
| | | return AjaxResult.success(list); |
| | | } |
| | | |
| | | /********************************************************营销采购类**************************************************/ |
| | | @GetMapping("/business") |
| | | @Log(title = "销售-采购-库存数据", businessType = BusinessType.OTHER) |
| | | @ApiOperation("销售-采购-库存数据") |
| | |
| | | return AjaxResult.success(analysisCustomerContractAmounts); |
| | | } |
| | | |
| | | |
| | | /********************************************************生产类*****************************************************/ |
| | | @GetMapping("/progressStatistics") |
| | | @ApiOperation("各生产订单的完成进度统计") |
| | | public AjaxResult progressStatistics(){ |
| | | ProductionProgressDto productionProgressDto = homeService.productionProgress(); |
| | | return AjaxResult.success(productionProgressDto); |
| | | } |
| | | @GetMapping("/workInProcessTurnover") |
| | | @ApiOperation("在制品周转情况") |
| | | public AjaxResult workInProcessTurnover(){ |
| | | ProductionTurnoverDto productionTurnoverDto = homeService.workInProcessTurnover(); |
| | | return AjaxResult.success(productionTurnoverDto); |
| | | } |
| | | |
| | | |
| | | /********************************************************质量类*****************************************************/ |
| | | @GetMapping("/qualityStatistics") |
| | | @Log(title = "质量分析", businessType = BusinessType.OTHER) |
| | | @ApiOperation("质量分析") |
| | |
| | | return AjaxResult.success(qualityStatisticsDto); |
| | | } |
| | | |
| | | @GetMapping("/todos") |
| | | @Log(title = "待办事项", businessType = BusinessType.OTHER) |
| | | @ApiOperation("待办事项") |
| | | public AjaxResult todos(ApproveProcess req) { |
| | | List<ApproveProcess> approveProcessList = homeService.todos(); |
| | | return AjaxResult.success(approveProcessList); |
| | | } |
| | | |
| | | /********************************************************财务类*****************************************************/ |
| | | @GetMapping("/statisticsReceivablePayable") |
| | | @Log(title = "应收应付统计", businessType = BusinessType.OTHER) |
| | | @ApiOperation("应收应付统计") |
| | |
| | | } |
| | | |
| | | |
| | | /********************************************************仓储类*****************************************************/ |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |