From 8b1691efd59291b618974a8cb77f6491245e16e2 Mon Sep 17 00:00:00 2001 From: 廖井涛 <2265517004@qq.com> Date: 星期一, 14 四月 2025 11:10:46 +0800 Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override --- 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