From 0d9c19184e72995fd8f57266c1ac5cf7f875e30c Mon Sep 17 00:00:00 2001
From: Mr.Zhang <710666463@qq.com>
Date: 星期一, 04 九月 2023 10:39:57 +0800
Subject: [PATCH] 小程序
---
server/src/main/java/doumeemes/api/ext/StatisticsController.java | 71 +++++++++++++++++++++++++++++++----
1 files changed, 62 insertions(+), 9 deletions(-)
diff --git a/server/src/main/java/doumeemes/api/ext/StatisticsController.java b/server/src/main/java/doumeemes/api/ext/StatisticsController.java
index b12b15a..078144f 100644
--- a/server/src/main/java/doumeemes/api/ext/StatisticsController.java
+++ b/server/src/main/java/doumeemes/api/ext/StatisticsController.java
@@ -2,14 +2,19 @@
import doumeemes.api.BaseController;
import doumeemes.core.model.ApiResponse;
-import doumeemes.dao.business.dto.statistics.StatisticsPlanDataModel;
-import doumeemes.dao.business.dto.statistics.Unqualified7DayModel;
-import doumeemes.dao.business.dto.statistics.UserProduceTopModel;
+import doumeemes.core.model.PageData;
+import doumeemes.core.model.PageWrap;
+import doumeemes.dao.business.dto.statistics.*;
+import doumeemes.dao.ext.dto.*;
+import doumeemes.dao.ext.vo.DepartmentExtListVO;
+import doumeemes.dao.ext.vo.DeviceCheckExtListVO;
+import doumeemes.dao.ext.vo.PlansExtListVO;
import doumeemes.service.ext.StatisticsService;
import doumeemes.service.ext.WorkorderExtService;
import doumeemes.service.ext.WorkorderRecordExtService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -21,28 +26,76 @@
* @date 2022/04/20 10:56
*/
@RestController
-@RequestMapping("/ext/statistic")
+@RequestMapping("/statistics")
@Api(tags = "澶у睆鏁版嵁鐪嬫澘-缁熻鏁版嵁鎺ュ彛")
public class StatisticsController extends BaseController {
@Autowired
private StatisticsService statisticsService;
- @ApiOperation("鏁版嵁缁熻锛屾墽琛屼腑銆佸欢鏈熻鍒掓暟銆佷粖鏃ョ敓浜т汉鏁般�佷粖鏃ョ敓浜ц澶囨暟銆佷粖鏃ヤ笉鑹搧")
+ @ApiOperation("鏁版嵁缁熻-鎴愬搧璁″垝锛屾墽琛屼腑銆佸欢鏈熻鍒掓暟銆佷粖鏃ョ敓浜т汉鏁般�佷粖鏃ョ敓浜ц澶囨暟銆佷粖鏃ヤ笉鑹搧")
@GetMapping("/getPlanData/{companyId}/{departId}")
public ApiResponse<StatisticsPlanDataModel> getPlansData(@PathVariable Integer companyId, @PathVariable Integer departId) {
return ApiResponse.success(statisticsService.getPlansData(companyId,departId));
}
+ @ApiOperation("鏁版嵁缁熻-宸ュ簭璁″垝锛屾墽琛屼腑銆佸欢鏈熻鍒掓暟銆佷粖鏃ョ敓浜т汉鏁般�佷粖鏃ョ敓浜ц澶囨暟銆佷粖鏃ヤ笉鑹搧")
+ @GetMapping("/getProcedurePlanData/{companyId}/{departId}")
+ public ApiResponse<StatisticsPlanDataModel> getProcedurePlanData(@PathVariable Integer companyId, @PathVariable Integer departId,@RequestParam(required = false) Integer procedureId) {
+ return ApiResponse.success(statisticsService.getProcedurePlanData(companyId,departId,procedureId));
+ }
@ApiOperation("鍛樺伐浜у搧缁熻TOP10")
@GetMapping("/userProduceTop/{companyId}/{departId}")
- public ApiResponse<List<UserProduceTopModel>> getUserProducceTop(@PathVariable Integer companyId, @PathVariable Integer departId) {
- return ApiResponse.success(statisticsService.getUserProduceTopData(companyId,departId));
+ public ApiResponse<List<UserProduceTopModel>> getUserProducceTop(@PathVariable Integer companyId, @PathVariable Integer departId,@RequestParam(required = false) Integer procedureId) {
+ return ApiResponse.success(statisticsService.getUserProduceTopData(companyId,departId,procedureId));
}
@ApiOperation("杩�7澶╀笉鑹搧鍒嗗竷-涓嶈壇鍝佹暟閲忕粺璁�")
@GetMapping("/getUnqualified7DayData/{companyId}/{departId}")
- public ApiResponse<List<Unqualified7DayModel>> getUnqualified7DayData(@PathVariable Integer companyId, @PathVariable Integer departId) {
- return ApiResponse.success(statisticsService.getUnqualified7DayData(companyId,departId));
+ public ApiResponse<List<Unqualified7DayModel>> getUnqualified7DayData(@PathVariable Integer companyId, @PathVariable Integer departId,@RequestParam(required = false) Integer procedureId) {
+ return ApiResponse.success(statisticsService.getUnqualified7DayData(companyId,departId,procedureId));
+ }
+ @ApiOperation("杩�7澶╀笉鑹搧鍒嗗竷-涓嶈壇鍝佹暟閲�-鎸変笉鑹」缁熻")
+ @GetMapping("/getUnqualifiedCateData/{companyId}/{departId}")
+ public ApiResponse<List<UnqualifiedCateModel>> getUnqualifiedCateData(@PathVariable Integer companyId, @PathVariable Integer departId,@RequestParam(required = false) Integer procedureId) {
+ return ApiResponse.success(statisticsService.getUnqualifiedCateData(companyId,departId,procedureId));
+ }
+ @ApiOperation("鎶ュ伐鏃ュ織鍒嗛〉鏌ヨ")
+ @PostMapping("/getRecordLogPage/{companyId}/{departId}")
+ public ApiResponse<PageData<RecordLogModel>> getRecordLogPage(@PathVariable Integer companyId, @PathVariable Integer departId
+ , @RequestBody PageWrap<QueryWorkorderRecordExtDTO> pageWrap) {
+ return ApiResponse.success(statisticsService.getRecordLogPage(companyId,departId,pageWrap));
+ }
+ @ApiOperation("宸℃璁板綍鍒嗛〉鏌ヨ")
+ @PostMapping("/getDeviceCheckPage/{companyId}/{departId}")
+ public ApiResponse<PageData<DeviceCheckExtListVO>> getDeviceCheckPage (@PathVariable Integer companyId, @PathVariable Integer departId
+ ,@RequestBody PageWrap<QueryDeviceCheckExtDTO> pageWrap) {
+ return ApiResponse.success(statisticsService.getDeviceCheckPage(companyId,departId,pageWrap));
+ }
+ @ApiOperation("宸ュ簭璁″垝杩涘害鏌ヨ")
+ @GetMapping("/getProcedurePlansList/{companyId}/{departId}")
+ public ApiResponse<List<ProcedurePlansPageModel>> getProcedurePlansList (@PathVariable Integer companyId, @PathVariable Integer departId,@RequestParam(required = false) Integer procedureId) {
+ return ApiResponse.success(statisticsService.getProcedurePlansPage(companyId,departId,procedureId));
+ }
+ @ApiOperation("鎴愬搧璁″垝杩涘害鏌ヨ")
+ @GetMapping("/getWorkPlansList/{companyId}/{departId}")
+ public ApiResponse<List<WorkPlansPageModel>> getWorkPlansList (@PathVariable Integer companyId, @PathVariable Integer departId ) {
+ return ApiResponse.success(statisticsService.getWorkPlansList(companyId,departId));
+ }
+ @ApiOperation("鎴愬搧璁″垝-宸ュ簭杩涘害鏌ヨ")
+ @GetMapping("/getProcedureProcessList/{companyId}/{departId}")
+ public ApiResponse<List<ProcedureProcessModel>> getProcedureProcessList (@PathVariable Integer companyId, @PathVariable Integer departId ) {
+ return ApiResponse.success(statisticsService.getProcedureProcessList(companyId,departId));
+ }
+ @ApiOperation("鎴愬搧璁″垝-瀹炴椂浠撳簱浣欓噺缁熻")
+ @GetMapping("/getStockList/{companyId}/{departId}")
+ public ApiResponse<List<StockDataModel>> getStockList (@PathVariable Integer companyId, @PathVariable Integer departId ) {
+ return ApiResponse.success(statisticsService.getStockList(companyId,departId));
+ }
+
+ @ApiOperation("鏉′欢鏌ヨ浼佷笟鍏ㄩ儴鍏徃閮ㄩ棬")
+ @GetMapping("/getDepartmentList/{companyId}")
+ public ApiResponse<List<DepartmentExtListVO>> getDepartmentList (@PathVariable Integer companyId ) {
+ return ApiResponse.success(statisticsService.getDepartmentList(companyId));
}
--
Gitblit v1.9.3