From 2c2413760b6467bf62402dba7338bd3bbcbd7341 Mon Sep 17 00:00:00 2001 From: huang <1532065656@qq.com> Date: 星期二, 20 五月 2025 14:20:38 +0800 Subject: [PATCH] 添加产量报表功能页面 --- JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/md/controller/TaskingLogController.java | 30 ++++++++++++++++++++++++++++-- 1 files changed, 28 insertions(+), 2 deletions(-) diff --git a/JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/md/controller/TaskingLogController.java b/JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/md/controller/TaskingLogController.java index d10e76f..af9354e 100644 --- a/JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/md/controller/TaskingLogController.java +++ b/JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/md/controller/TaskingLogController.java @@ -1,12 +1,14 @@ package com.mes.md.controller; - import com.mes.md.service.TaskingLogService; import com.mes.utils.Result; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.format.annotation.DateTimeFormat; import org.springframework.web.bind.annotation.*; +import java.util.Date; +import java.util.List; import java.util.Map; /** @@ -23,6 +25,31 @@ @Autowired TaskingLogService taskingLogService; + + @ApiOperation("鏌ヨ鎶ヨ〃") + @PostMapping("/mechanicalReport") + @ResponseBody + public Result mechanicalReport( + @RequestParam(required = false) Integer dayCount, + @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date startDate, + @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date endDate, + @RequestParam(required = false) String taskType, + @RequestParam(required = false) String operationRecord, + @RequestParam(required = false) String lineType) { + try { + List<Map> result = taskingLogService.selectMechanicalReport( + dayCount, + startDate, + endDate, + taskType, + operationRecord, + lineType + ); + return Result.build(200, "鏌ヨ鎴愬姛", result); + } catch (Exception e) { + return Result.build(199, "鏌ヨ寮傚父", null); + } + } @ApiOperation("鎻愪氦鏃ュ織浠ュ強鎶ュ伐鏁版嵁鍒颁節鐗ф暟鎹簱") @PostMapping("/reportTaskingLog") @@ -59,6 +86,5 @@ return Result.build(199,"鎻愪氦寮傚父",map); } } - } -- Gitblit v1.8.0