| | |
| | | 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; |
| | |
| | | |
| | | @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}") |
| | |
| | | @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"); |
| | | } |
| | | } |