From fd2ec4214c6f8456b957c3545e7d67bcdbbb9985 Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期二, 02 十二月 2025 15:26:33 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10105/r/ERP_override
---
north-glass-erp/src/main/java/com/example/erp/controller/pp/ReportController.java | 337 +++++++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 311 insertions(+), 26 deletions(-)
diff --git a/north-glass-erp/src/main/java/com/example/erp/controller/pp/ReportController.java b/north-glass-erp/src/main/java/com/example/erp/controller/pp/ReportController.java
index ac84714..32a6f69 100644
--- a/north-glass-erp/src/main/java/com/example/erp/controller/pp/ReportController.java
+++ b/north-glass-erp/src/main/java/com/example/erp/controller/pp/ReportController.java
@@ -1,26 +1,25 @@
package com.example.erp.controller.pp;
-import com.example.erp.common.Constants;
+import cn.dev33.satoken.annotation.SaCheckPermission;
import com.example.erp.common.Result;
-import com.example.erp.entity.pp.DamageDetails;
-import com.example.erp.entity.pp.FlowCard;
+import com.example.erp.dto.pp.*;
import com.example.erp.entity.pp.Report;
-import com.example.erp.entity.sd.OrderDetail;
-import com.example.erp.entity.sd.OrderGlassDetail;
-import com.example.erp.exception.ServiceException;
import com.example.erp.service.pp.ReportService;
-import com.example.erp.service.pp.WorkOrderService;
+import com.example.erp.tools.DownExcel;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
import java.sql.Date;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;
@RestController
-@Api(value="鐢熶骇鎶ヨ〃controller",tags={"鐢熶骇鎶ヨ〃鎿嶄綔鎺ュ彛"})
+@Api(value = "鐢熶骇鎶ヨ〃controller", tags = {"鐢熶骇鎶ヨ〃鎿嶄綔鎺ュ彛"})
@RequestMapping("/report")
public class ReportController {
private final ReportService reportService;
@@ -30,32 +29,56 @@
}
//娴佺▼鍗¤繘搴�
- @ApiOperation("娴佺▼鍗¤繘搴�")
- @PostMapping ("/processCardProgress/{orderId}")
- public Result processCardProgress(@PathVariable String orderId, @RequestBody List<Integer> columns){
- return Result.seccess(reportService.processCardProgressSv(orderId,columns));
+ @ApiOperation("璁㈠崟娴佺▼鍗¤繘搴�")
+ @PostMapping("/processCardProgress/{orderId}")
+ public Result processCardProgress(@PathVariable String orderId, @RequestBody List<String> columns) {
+ return Result.success(reportService.processCardProgressSv(orderId, columns));
+ }
+ @ApiOperation("鎶ヨ〃娴佺▼鍗¤繘搴�")
+ @PostMapping("/processCardProgressReport/{orderId}")
+ public Result processCardProgressReport(@PathVariable String orderId, @RequestBody List<String> columns) {
+ return Result.success(reportService.processCardProgressReportSv(orderId, columns));
+ }
+ @ApiOperation("娴佺▼鍗¤繘搴︽眹鎬�")
+ @PostMapping("/processCardProgressCollect/{orderId}")
+ public Result processCardProgressCollect(@PathVariable String orderId, @RequestBody List<String> columns) {
+ return Result.success(reportService.processCardProgressCollectSv(orderId, columns));
}
@ApiOperation("璺ㄥ伐搴忔鐮�")
- @PostMapping("/crossProcessBreaking/{pageNum}/{pageSize}/{selectDate}")
+ @PostMapping("/crossProcessBreaking/{pageNum}/{pageSize}/{selectDate}/{reportTime}")
public Result getOrderReport(@PathVariable Integer pageNum,
@PathVariable Integer pageSize,
@PathVariable List<String> selectDate,
- @RequestBody DamageDetails damageDetails) {
- return Result.seccess(reportService.crossProcessBreakingSv(pageNum,pageSize,selectDate,damageDetails));
+ @PathVariable String reportTime,
+ @RequestBody CrossProcessBreakingDTO crossProcessBreakingDTO) {
+ return Result.success(reportService.crossProcessBreakingSv(pageNum, pageSize, selectDate,reportTime, crossProcessBreakingDTO));
+
+ }
+
+ @ApiOperation("闈炶法宸ュ簭娆$牬")
+ @PostMapping("/notCrossProcessBreaking/{pageNum}/{pageSize}/{selectDate}/{reportTime}")
+ public Result notCrossProcessBreaking(@PathVariable Integer pageNum,
+ @PathVariable Integer pageSize,
+ @PathVariable List<String> selectDate,
+ @PathVariable String reportTime,
+ @RequestBody CrossProcessBreakingDTO crossProcessBreakingDTO) {
+ return Result.success(reportService.notCrossProcessBreakingSv(pageNum, pageSize, selectDate,reportTime, crossProcessBreakingDTO));
}
@ApiOperation("鍦ㄥ埗鍝佹姤琛�")
- @PostMapping("/workInProgress/{selectTime1}/{selectTime2}/{orderId}/{inputProject}/{selectProcesses}")
+ @PostMapping("/workInProgress/{pageNum}/{pageSize}/{orderId}/{inputProject}/{selectProcesses}/{optionVal}/{terminationVals}")
public Result workInProgress(
- @PathVariable Date selectTime1,
- @PathVariable Date selectTime2,
- @PathVariable String orderId,
- @PathVariable String inputProject,
- @PathVariable String selectProcesses,
- @RequestBody Report report) {
- return Result.seccess(reportService.workInProgressSv(selectTime1,selectTime2,orderId,inputProject,selectProcesses,report));
+ @PathVariable Integer pageNum,
+ @PathVariable Integer pageSize,
+ @PathVariable String orderId,
+ @PathVariable String inputProject,
+ @PathVariable String selectProcesses,
+ @PathVariable String optionVal,
+ @PathVariable String terminationVals,
+ @RequestBody WorkInProgressDTO workInProgressDTO) {
+ return Result.success(reportService.workInProgressSv(pageNum, pageSize, orderId, inputProject, selectProcesses,optionVal,terminationVals, workInProgressDTO));
}
@@ -67,9 +90,271 @@
@PathVariable String orderId,
@PathVariable String inputProject,
@PathVariable String selectProcesses,
- @RequestBody Report report) {
- return Result.seccess(reportService.selectProcessToBeCompletedSv(selectTime1,selectTime2,orderId,inputProject,selectProcesses,report));
+ @RequestBody Report report) {
+ return Result.success(reportService.selectProcessToBeCompletedSv(selectTime1, selectTime2, orderId, inputProject, selectProcesses, report));
}
+ @ApiOperation("宸ュ簭寰呭畬鎴愭眹鎬绘姤琛�")
+ @PostMapping("/selectProcessCompleted/{selectTime1}/{selectTime2}/{orderId}/{inputProject}/{selectProcesses}")
+ public Result selectProcessCompleted(
+ @PathVariable Date selectTime1,
+ @PathVariable Date selectTime2,
+ @PathVariable String orderId,
+ @PathVariable String inputProject,
+ @PathVariable String selectProcesses,
+ @RequestBody Report report) {
+ return Result.success(reportService.selectProcessCompletedSv(selectTime1, selectTime2, orderId, inputProject, selectProcesses, report));
+
+ }
+
+ @ApiOperation("娆$牬鏄庣粏鎶ヨ〃")
+ @PostMapping("/damageReport/{pageNum}/{pageSize}/{selectDate}/{reportTime}")
+ public Result damageReport(
+ @PathVariable Integer pageNum,
+ @PathVariable Integer pageSize,
+ @PathVariable List<String> selectDate,
+ @PathVariable String reportTime,
+ @RequestBody DamageReportDTO damageReportDTO) {
+ return Result.success(reportService.selectDamageReportSv(pageNum, pageSize, selectDate,reportTime, damageReportDTO));
+
+ }
+
+ @ApiOperation("鍒嗘灦鏄庣粏鎶ヨ〃")
+ @PostMapping("/splittingDetailsOutside/{orderId}")
+ public Result splittingDetailsOutside(
+ @PathVariable String orderId,
+ @RequestBody Report report) {
+ return Result.success(reportService.splittingDetailsOutsideSv(orderId, report));
+
+ }
+
+ @ApiOperation("鍝佽川鎶ヨ〃")
+ @PostMapping("/qualityReport/{selectTime1}/{selectTime2}")
+ public Result qualityReport(
+ @PathVariable Date selectTime1,
+ @PathVariable Date selectTime2,
+ @RequestBody Report report) {
+ return Result.success(reportService.qualityReportSv(selectTime1, selectTime2, report));
+
+ }
+
+ @ApiOperation("鎴愬搧鐜囨姤琛�")
+ @PostMapping("/yield/{selectDate}/{selectProcesses}/{reportTime}")
+ public Result yield(
+ @PathVariable List<String> selectDate,
+ @PathVariable String selectProcesses,
+ @PathVariable String reportTime,
+ @RequestBody Report report) {
+ return Result.success(reportService.yieldSv(selectDate, selectProcesses,reportTime, report));
+
+ }
+
+ @ApiOperation("鎴愬搧鐜囧伐搴忔眹鎬绘姤琛�")
+ @PostMapping("/yieldProcess/{selectDate}/{reportTime}")
+ public Result yieldProcess(
+ @PathVariable List<String> selectDate,
+ @PathVariable String reportTime,
+ @RequestBody Report report) {
+ return Result.success(reportService.yieldProcessSv(selectDate,reportTime, report));
+
+ }
+
+ @ApiOperation("鐢熶骇鍙戣揣杩涘害")
+ @PostMapping("/productionSchedule/{orderId}")
+ public Result productionSchedule(@PathVariable String orderId, @RequestBody List<String> columns) {
+ return Result.success(reportService.productionScheduleSv(orderId, columns));
+ }
+
+ @ApiOperation("浠诲姟瀹屾垚鎯呭喌姹囨�昏繘搴�")
+ @PostMapping("/taskCompletionStatus/{selectTime1}/{selectTime2}/{orderId}")
+ public Result taskCompletionStatus(@PathVariable Date selectTime1,
+ @PathVariable Date selectTime2,
+ @PathVariable String orderId,
+ @RequestBody List<Integer> columns) {
+ return Result.success(reportService.taskCompletionStatusSv(selectTime1, selectTime2,orderId, columns));
+ }
+
+ @ApiOperation("璁㈠崟璁″垝鍒嗚В")
+ @PostMapping("/orderPlanDecomposition/{selectTime1}/{selectTime2}")
+ public Result orderPlanDecomposition(@PathVariable Date selectTime1,
+ @PathVariable Date selectTime2,
+ @RequestBody Report report) {
+ return Result.success(reportService.orderPlanDecompositionSv(selectTime1, selectTime2, report));
+ }
+
+ @ApiOperation("璁㈠崟鎶ュ伐")
+ @PostMapping("/orderReportingWorks/{selectTime1}/{selectTime2}")
+ public Result orderReportingWorks(@PathVariable Date selectTime1,
+ @PathVariable Date selectTime2,
+ @RequestBody Report report) {
+ return Result.success(reportService.orderReportingWorks(selectTime1, selectTime2, report));
+ }
+
+ @ApiOperation("鍘熺墖棰嗘枡")
+ @PostMapping("/rawMaterialRequisition/{selectTime1}/{selectTime2}")
+ public Result rawMaterialRequisition(@PathVariable Date selectTime1,
+ @PathVariable Date selectTime2,
+ @RequestBody Report report) {
+ return Result.success(reportService.rawMaterialRequisitionSv(selectTime1, selectTime2, report));
+ }
+
+ @ApiOperation("鐝粍浜ч噺鏄庣粏鎶ヨ〃")
+ @PostMapping("/teamOutput/{pageNum}/{pageSize}/{selectTime1}/{selectTime2}/{selectProcesses}")
+ public Result teamOutput(
+ @PathVariable Integer pageNum,
+ @PathVariable Integer pageSize,
+ @PathVariable String selectTime1,
+ @PathVariable String selectTime2,
+ @PathVariable String selectProcesses,
+ @RequestBody TeamOutputDTO teamOutputDTO) {
+ return Result.success(reportService.teamOutputSv(pageNum, pageSize, selectTime1, selectTime2,selectProcesses, teamOutputDTO));
+
+ }
+ @ApiOperation("璺ㄥ伐搴忔鐮存姤琛ㄥ鍑�")
+ @PostMapping("/exportCrossProcessBreaking")
+ public void exportCrossProcessBreaking(HttpServletResponse response, @RequestBody List<LocalDate> dates) throws IOException, IllegalAccessException, InstantiationException {
+ //鍙傛暟锛氱浉搴旂殑鏁版嵁锛屽疄浣撶被淇℃伅锛岀浉搴旂殑鏂规硶锛堟暟鎹幏鍙栵級锛岀敓鎴愮殑excel鍚嶅瓧
+ DownExcel.download(response, CrossProcessBreakingDTO.class, reportService.exportCrossProcessBreakingSv(dates), "CrossProcessBreaking");
+ }
+
+ @ApiOperation("闈炶法宸ュ簭娆$牬鎶ヨ〃瀵煎嚭")
+ @PostMapping("/exportNotCrossProcessBreaking")
+ public void exportNotCrossProcessBreaking(HttpServletResponse response, @RequestBody List<LocalDate> dates) throws IOException, IllegalAccessException, InstantiationException {
+ //鍙傛暟锛氱浉搴旂殑鏁版嵁锛屽疄浣撶被淇℃伅锛岀浉搴旂殑鏂规硶锛堟暟鎹幏鍙栵級锛岀敓鎴愮殑excel鍚嶅瓧
+ DownExcel.download(response, CrossProcessBreakingDTO.class, reportService.exportNotCrossProcessBreakingSv(dates), "CrossProcessBreaking");
+ }
+
+ @ApiOperation("娆$牬鏄庣粏鎶ヨ〃瀵煎嚭")
+ @PostMapping("/exportDamageReport")
+ public void exportDamageReport(HttpServletResponse response, @RequestBody Map<String, Object> dates) throws IOException, IllegalAccessException, InstantiationException {
+ //鍙傛暟锛氱浉搴旂殑鏁版嵁锛屽疄浣撶被淇℃伅锛岀浉搴旂殑鏂规硶锛堟暟鎹幏鍙栵級锛岀敓鎴愮殑excel鍚嶅瓧
+ DownExcel.download(response, DamageReportDTO.class, reportService.exportDamageReportSv(dates), "DamageReport");
+ }
+
+ @ApiOperation("璁㈠崟璁″垝鍒嗚В鎶ヨ〃瀵煎嚭")
+ @PostMapping("/exportOrderPlanDecomposition")
+ public void exportOrderPlanDecomposition(HttpServletResponse response, @RequestBody List<LocalDate> dates) throws IOException, IllegalAccessException, InstantiationException {
+ //鍙傛暟锛氱浉搴旂殑鏁版嵁锛屽疄浣撶被淇℃伅锛岀浉搴旂殑鏂规硶锛堟暟鎹幏鍙栵級锛岀敓鎴愮殑excel鍚嶅瓧
+ DownExcel.download(response, OrderPlanDecompositionDTO.class, reportService.exportOrderPlanDecompositionSv(dates), "OrderPlanDecomposition");
+ }
+
+ @ApiOperation("宸ュ簭寰呭畬鎴愭姤琛ㄥ鍑�")
+ @PostMapping("/exportProcessToBeCompleted")
+ public void exportProcessToBeCompleted(HttpServletResponse response,
+ @RequestBody Map<String, Object> dates)
+ throws IOException, IllegalAccessException, InstantiationException {
+ //鍙傛暟锛氱浉搴旂殑鏁版嵁锛屽疄浣撶被淇℃伅锛岀浉搴旂殑鏂规硶锛堟暟鎹幏鍙栵級锛岀敓鎴愮殑excel鍚嶅瓧
+ DownExcel.download(response, ProcessToBeCompletedDTO.class, reportService.exportProcessToBeCompletedSv(dates), "ProcessToBeCompleted");
+ }
+
+ @ApiOperation("鍦ㄥ埗鍝佹姤琛ㄥ鍑�")
+ @PostMapping("/exportWorkInProgress")
+ public void exportWorkInProgress(HttpServletResponse response,
+ @RequestBody Map<String, Object> dates)
+ throws IOException, IllegalAccessException, InstantiationException {
+ //鍙傛暟锛氱浉搴旂殑鏁版嵁锛屽疄浣撶被淇℃伅锛岀浉搴旂殑鏂规硶锛堟暟鎹幏鍙栵級锛岀敓鎴愮殑excel鍚嶅瓧
+ DownExcel.download(response, WorkInProgressDTO.class, reportService.exportWorkInProgressSv(dates), "WorkInProgress");
+ }
+
+ @ApiOperation("鍦ㄥ埗鍝佹眹鎬绘姤琛ㄥ鍑�")
+ @PostMapping("/exportWorkInProgressCombination")
+ public void exportWorkInProgressCombination(HttpServletResponse response,
+ @RequestBody Map<String, Object> dates)
+ throws IOException, IllegalAccessException, InstantiationException {
+ //鍙傛暟锛氱浉搴旂殑鏁版嵁锛屽疄浣撶被淇℃伅锛岀浉搴旂殑鏂规硶锛堟暟鎹幏鍙栵級锛岀敓鎴愮殑excel鍚嶅瓧
+ DownExcel.download(response, WorkInProgressCombinationDTO.class, reportService.exportWorkInProgressCombinationSv(dates), "WorkInProgressCombination");
+ }
+
+//
+
+// @ApiOperation("浠诲姟瀹屾垚鎯呭喌瀵煎嚭")
+// @PostMapping("/exportTaskCompletionStatus")
+// public void exportTaskCompletionStatus(HttpServletResponse response, @RequestBody List<LocalDate> dates) throws IOException, IllegalAccessException, InstantiationException {
+// //鍙傛暟锛氱浉搴旂殑鏁版嵁锛屽疄浣撶被淇℃伅锛岀浉搴旂殑鏂规硶锛堟暟鎹幏鍙栵級锛岀敓鎴愮殑excel鍚嶅瓧
+// DownExcel.download(response, TaskCompletionStatusDTO.class, reportService.exportDamageReportSv(dates), "TaskCompletionStatus");
+// }
+
+ @ApiOperation("鍘熺墖棰嗘枡瀵煎嚭")
+ @PostMapping("/exportRawMaterialRequisition")
+ public void exportRawMaterialRequisition(HttpServletResponse response, @RequestBody List<LocalDate> dates) throws IOException, IllegalAccessException, InstantiationException {
+ //鍙傛暟锛氱浉搴旂殑鏁版嵁锛屽疄浣撶被淇℃伅锛岀浉搴旂殑鏂规硶锛堟暟鎹幏鍙栵級锛岀敓鎴愮殑excel鍚嶅瓧
+ DownExcel.download(response, RawMaterialRequisitionDTO.class, reportService.exportRawMaterialRequisitionSv(dates), "RawMaterialRequisition");
+ }
+
+ @ApiOperation("鍝佽川鎶ヨ〃瀵煎嚭")
+ @PostMapping("/exportQualityReport")
+ public void exportQualityReport(HttpServletResponse response, @RequestBody List<LocalDate> dates) throws IOException, IllegalAccessException, InstantiationException {
+ //鍙傛暟锛氱浉搴旂殑鏁版嵁锛屽疄浣撶被淇℃伅锛岀浉搴旂殑鏂规硶锛堟暟鎹幏鍙栵級锛岀敓鎴愮殑excel鍚嶅瓧
+ DownExcel.download(response, QualityReportDTO.class, reportService.exportQualityReportSv(dates), "QualityReport");
+ }
+
+ @ApiOperation("鎴愬搧鐜囨姤琛ㄥ鍑�")
+ @PostMapping("/exportYield")
+ public void exportYield(HttpServletResponse response,
+ @RequestBody Map<String, Object> dates)
+ throws IOException, IllegalAccessException, InstantiationException {
+ //鍙傛暟锛氱浉搴旂殑鏁版嵁锛屽疄浣撶被淇℃伅锛岀浉搴旂殑鏂规硶锛堟暟鎹幏鍙栵級锛岀敓鎴愮殑excel鍚嶅瓧
+ DownExcel.download(response, YieldDTO.class, reportService.exportYieldSv(dates), "Yield");
+ }
+
+ @ApiOperation("鎺掍骇璁㈠崟淇℃伅鎶ヨ〃")
+ @PostMapping("/scheduleProductionSchedule/{pageNum}/{pageSize}/{selectTime1}/{selectTime2}/{processes}")
+ public Result scheduleProductionSchedule(
+ @PathVariable Integer pageNum,
+ @PathVariable Integer pageSize,
+ @PathVariable Date selectTime1,
+ @PathVariable Date selectTime2,
+ @PathVariable String processes,
+ @RequestBody ScheduleProductionScheduleDTO scheduleProductionScheduleDTO) {
+ return Result.success(reportService.scheduleProductionScheduleSv(pageNum, pageSize, selectTime1, selectTime2,processes, scheduleProductionScheduleDTO));
+
+ }
+
+ @ApiOperation("璁㈠崟鎺掍骇璁″垝瀵煎嚭")
+ @PostMapping("/exportScheduleReport")
+ public void exportScheduleReport(HttpServletResponse response,
+ @RequestBody Map<String, Object> dates
+ ) throws IOException, IllegalAccessException, InstantiationException {
+ //鍙傛暟锛氱浉搴旂殑鏁版嵁锛屽疄浣撶被淇℃伅锛岀浉搴旂殑鏂规硶锛堟暟鎹幏鍙栵級锛岀敓鎴愮殑excel鍚嶅瓧
+ DownExcel.download(response, ScheduleProductionScheduleDTO.class, reportService.exportScheduleReportSv(dates), "ScheduleProduction");
+ }
+
+ @ApiOperation("鐝粍浜ч噺瀵煎嚭")
+ @PostMapping("/exportTeamOutput")
+ public void exportTeamOutput(HttpServletResponse response,
+ @RequestBody Map<String, Object> dates
+ ) throws IOException, IllegalAccessException, InstantiationException {
+ //鍙傛暟锛氱浉搴旂殑鏁版嵁锛屽疄浣撶被淇℃伅锛岀浉搴旂殑鏂规硶锛堟暟鎹幏鍙栵級锛岀敓鎴愮殑excel鍚嶅瓧
+ DownExcel.download(response, TeamOutputDTO.class, reportService.exportTeamOutputSv(dates), "TeamOutput");
+ }
+
+ @ApiOperation("鍦ㄥ埗鍝佹眹鎬绘姤琛�")
+ @PostMapping("/workInProgressCombination/{pageNum}/{pageSize}/{orderId}/{inputProject}/{selectProcesses}/{optionVal}/{terminationVal}")
+ public Result workInProgressCombination(
+ @PathVariable Integer pageNum,
+ @PathVariable Integer pageSize,
+ @PathVariable String orderId,
+ @PathVariable String inputProject,
+ @PathVariable String selectProcesses,
+ @PathVariable String optionVal,
+ @PathVariable String terminationVal,
+ @RequestBody WorkInProgressDTO workInProgressDTO) {
+ return Result.success(reportService.workInProgressCombinationSv(pageNum, pageSize, orderId, inputProject,selectProcesses,optionVal,terminationVal, workInProgressDTO));
+
+ }
+
+ @ApiOperation("鍦ㄥ埗鍝佹眹鎬绘姤琛�")
+ @PostMapping("/workInProgressCombinationProcess/{pageNum}/{pageSize}/{orderId}/{inputProject}/{selectProcesses}/{optionVal}")
+ public Result workInProgressCombinationProcess(
+ @PathVariable Integer pageNum,
+ @PathVariable Integer pageSize,
+ @PathVariable String orderId,
+ @PathVariable String inputProject,
+ @PathVariable String selectProcesses,
+ @PathVariable String optionVal,
+ @RequestBody WorkInProgressDTO workInProgressDTO) {
+ return Result.success(reportService.workInProgressCombinationProcessSv(pageNum, pageSize, orderId, inputProject,selectProcesses,optionVal, workInProgressDTO));
+
+ }
}
--
Gitblit v1.8.0