From ecfd47af61f29888d2b69fec73867bd475f376b6 Mon Sep 17 00:00:00 2001 From: guoyujie <guoyujie@ng.com> Date: 星期一, 14 四月 2025 08:09:38 +0800 Subject: [PATCH] 提交部分手机app后端程序 --- north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java | 23 +++++++++++++++++++++++ 1 files changed, 23 insertions(+), 0 deletions(-) diff --git a/north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java b/north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java index 1eb8bb5..b31d8ae 100644 --- a/north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java +++ b/north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java @@ -41,6 +41,8 @@ import java.text.SimpleDateFormat; import java.time.LocalDate; import java.time.LocalDateTime; +import java.time.LocalTime; +import java.time.format.DateTimeFormatter; import java.util.*; @Service @@ -1137,4 +1139,25 @@ return result; } + + public Map<String, Object> selectShiftQuantitySv(Map<String, Object> reportingWork) { + String creatorId = (String) reportingWork.get("userId"); + List<LocalDateTime> dateList = (List<LocalDateTime>) reportingWork.get("searchDate"); + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); + String startDate = LocalDateTime.now().with(LocalTime.MIN).format(formatter); + String endDate = LocalDateTime.now().format(formatter); + if (dateList.get(0)!=null){ + startDate = String.valueOf(dateList.get(0)); + } + if (dateList.get(1)!=null){ + endDate = String.valueOf(dateList.get(1)); + } + List<String> date = new ArrayList<>(); + date.add(startDate); + date.add(endDate); + Map<String, Object> result = new HashMap<>(); + result.put("data",orderProcessDetailMapper.selectShiftQuantitySv(creatorId, startDate, endDate)); + result.put("date",date); + return result; + } } -- Gitblit v1.8.0