From f866d4c98e2f69a8f4ba6a12bf492b02e734d488 Mon Sep 17 00:00:00 2001 From: 廖井涛 <2265517004@qq.com> Date: 星期二, 28 五月 2024 16:51:11 +0800 Subject: [PATCH] Merge branch 'master' of http://bore.pub:10439/r/ERP_override --- north-glass-erp/src/main/java/com/example/erp/controller/pp/ReportController.java | 114 +++++++++++++++++++++++++++++++++++++------------------- 1 files changed, 75 insertions(+), 39 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 d95100b..a9db4eb 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 @@ -3,6 +3,7 @@ import cn.dev33.satoken.annotation.SaCheckPermission; import com.example.erp.common.Constants; import com.example.erp.common.Result; +import com.example.erp.dto.pp.*; import com.example.erp.entity.pp.DamageDetails; import com.example.erp.entity.pp.FlowCard; import com.example.erp.entity.pp.Report; @@ -26,7 +27,7 @@ import java.util.Map; @RestController -@Api(value="鐢熶骇鎶ヨ〃controller",tags={"鐢熶骇鎶ヨ〃鎿嶄綔鎺ュ彛"}) +@Api(value = "鐢熶骇鎶ヨ〃controller", tags = {"鐢熶骇鎶ヨ〃鎿嶄綔鎺ュ彛"}) @RequestMapping("/report") public class ReportController { private final ReportService reportService; @@ -38,9 +39,9 @@ //娴佺▼鍗¤繘搴� @ApiOperation("娴佺▼鍗¤繘搴�") @SaCheckPermission("ProcessCardProgress.search") - @PostMapping ("/processCardProgress/{orderId}") - public Result processCardProgress(@PathVariable String orderId, @RequestBody List<Integer> columns){ - return Result.seccess(reportService.processCardProgressSv(orderId,columns)); + @PostMapping("/processCardProgress/{orderId}") + public Result processCardProgress(@PathVariable String orderId, @RequestBody List<Integer> columns) { + return Result.seccess(reportService.processCardProgressSv(orderId, columns)); } @ApiOperation("璺ㄥ伐搴忔鐮�") @@ -49,8 +50,8 @@ 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)); + @RequestBody DamageDetails damageDetails) { + return Result.seccess(reportService.crossProcessBreakingSv(pageNum, pageSize, selectDate, damageDetails)); } @@ -58,13 +59,13 @@ @SaCheckPermission("WorkInProgress.search") @PostMapping("/workInProgress/{selectTime1}/{selectTime2}/{orderId}/{inputProject}/{selectProcesses}") 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 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)); } @@ -77,28 +78,31 @@ @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.seccess(reportService.selectProcessToBeCompletedSv(selectTime1, selectTime2, orderId, inputProject, selectProcesses, report)); } @ApiOperation("娆$牬鏄庣粏鎶ヨ〃") @SaCheckPermission("DamageReport.search") - @PostMapping("/damageReport/{selectTime1}/{selectTime2}") + @PostMapping("/damageReport/{pageNum}/{pageSize}/{selectTime1}/{selectTime2}") public Result damageReport( + @PathVariable Integer pageNum, + @PathVariable Integer pageSize, @PathVariable Date selectTime1, @PathVariable Date selectTime2, - @RequestBody Report report) { - return Result.seccess(reportService.selectDamageReportSv(selectTime1,selectTime2,report)); + @RequestBody DamageReportDTO damageReportDTO) { + return Result.seccess(reportService.selectDamageReportSv(pageNum, pageSize, selectTime1, selectTime2, damageReportDTO)); } + @ApiOperation("鍒嗘灦鏄庣粏鎶ヨ〃") @SaCheckPermission("SplittingDetailsOutside.search") @PostMapping("/splittingDetailsOutside/{orderId}") public Result splittingDetailsOutside( @PathVariable String orderId, - @RequestBody Report report) { - return Result.seccess(reportService.splittingDetailsOutsideSv(orderId,report)); + @RequestBody Report report) { + return Result.seccess(reportService.splittingDetailsOutsideSv(orderId, report)); } @@ -108,8 +112,8 @@ public Result qualityReport( @PathVariable Date selectTime1, @PathVariable Date selectTime2, - @RequestBody Report report) { - return Result.seccess(reportService.qualityReportSv(selectTime1,selectTime2,report)); + @RequestBody Report report) { + return Result.seccess(reportService.qualityReportSv(selectTime1, selectTime2, report)); } @@ -120,49 +124,81 @@ @PathVariable Date selectTime1, @PathVariable Date selectTime2, @PathVariable String selectProcesses, - @RequestBody Report report) { - return Result.seccess(reportService.yieldSv(selectTime1,selectTime2,selectProcesses,report)); + @RequestBody Report report) { + return Result.seccess(reportService.yieldSv(selectTime1, selectTime2, selectProcesses, report)); } @ApiOperation("鐢熶骇鍙戣揣杩涘害") @SaCheckPermission("ProductionSchedule.search") - @PostMapping ("/productionSchedule/{orderId}") - public Result productionSchedule(@PathVariable String orderId, @RequestBody List<Integer> columns){ - return Result.seccess(reportService.productionScheduleSv(orderId,columns)); + @PostMapping("/productionSchedule/{orderId}") + public Result productionSchedule(@PathVariable String orderId, @RequestBody List<Integer> columns) { + return Result.seccess(reportService.productionScheduleSv(orderId, columns)); } @ApiOperation("浠诲姟瀹屾垚鎯呭喌姹囨�昏繘搴�") @SaCheckPermission("TaskCompletionStatus.search") - @PostMapping ("/taskCompletionStatus/{selectTime1}/{selectTime2}") + @PostMapping("/taskCompletionStatus/{selectTime1}/{selectTime2}") public Result taskCompletionStatus(@PathVariable Date selectTime1, @PathVariable Date selectTime2, - @RequestBody List<Integer> columns){ - return Result.seccess(reportService.taskCompletionStatusSv(selectTime1,selectTime2,columns)); + @RequestBody List<Integer> columns) { + return Result.seccess(reportService.taskCompletionStatusSv(selectTime1, selectTime2, columns)); } @ApiOperation("璁㈠崟璁″垝鍒嗚В") @SaCheckPermission("OrderPlanDecomposition.search") - @PostMapping ("/orderPlanDecomposition/{selectTime1}/{selectTime2}") + @PostMapping("/orderPlanDecomposition/{selectTime1}/{selectTime2}") public Result orderPlanDecomposition(@PathVariable Date selectTime1, - @PathVariable Date selectTime2, - @RequestBody Report report){ - return Result.seccess(reportService.orderPlanDecompositionSv(selectTime1,selectTime2,report)); + @PathVariable Date selectTime2, + @RequestBody Report report) { + return Result.seccess(reportService.orderPlanDecompositionSv(selectTime1, selectTime2, report)); } @ApiOperation("鍘熺墖棰嗘枡") @SaCheckPermission("RawMaterialRequisition.search") - @PostMapping ("/rawMaterialRequisition/{selectTime1}/{selectTime2}") + @PostMapping("/rawMaterialRequisition/{selectTime1}/{selectTime2}") public Result rawMaterialRequisition(@PathVariable Date selectTime1, @PathVariable Date selectTime2, - @RequestBody Report report){ - return Result.seccess(reportService.rawMaterialRequisitionSv(selectTime1,selectTime2,report)); + @RequestBody Report report) { + return Result.seccess(reportService.rawMaterialRequisitionSv(selectTime1, selectTime2, report)); } + @ApiOperation("璺ㄥ伐搴忔鐮存姤琛ㄥ鍑�") @PostMapping("/exportCrossProcessBreaking") public void exportCrossProcessBreaking(HttpServletResponse response, @RequestBody List<LocalDate> dates) throws IOException, IllegalAccessException, InstantiationException { - //鍙傛暟锛氱浉搴旂殑鏁版嵁锛屽疄浣撶被淇℃伅锛岀浉搴旂殑鏂规硶锛堟暟鎹幏鍙栵級锛岀敓鎴愮殑excel鍚嶅瓧 - DownExcel.download(response, DamageDetails.class, reportService.exportCrossProcessBreakingSv(dates),"CrossProcessBreaking"); + DownExcel.download(response, CrossProcessBreakingDTO.class, reportService.exportCrossProcessBreakingSv(dates), "CrossProcessBreaking"); + } + + @ApiOperation("娆$牬鏄庣粏鎶ヨ〃瀵煎嚭") + @PostMapping("/exportDamageReport") + public void exportDamageReport(HttpServletResponse response, @RequestBody List<LocalDate> 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"); } } -- Gitblit v1.8.0