From fcc929fa2888c6b06a168f1ca84344e3bf9fdce5 Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期二, 28 十月 2025 11:34:14 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10105/r/ERP_override
---
north-glass-erp/src/main/java/com/example/erp/service/pp/ReportService.java | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 54 insertions(+), 0 deletions(-)
diff --git a/north-glass-erp/src/main/java/com/example/erp/service/pp/ReportService.java b/north-glass-erp/src/main/java/com/example/erp/service/pp/ReportService.java
index e02228a..60f47e5 100644
--- a/north-glass-erp/src/main/java/com/example/erp/service/pp/ReportService.java
+++ b/north-glass-erp/src/main/java/com/example/erp/service/pp/ReportService.java
@@ -332,6 +332,7 @@
// return map;
// }
+ //璺ㄥ伐搴忔鐮�
public Map<String, Object> crossProcessBreakingSv(Integer pageNum, Integer pageSize,
List<String> selectDate,
CrossProcessBreakingDTO crossProcessBreakingDTO) {
@@ -360,6 +361,55 @@
CompletableFuture<Map<String, Integer>> totalFuture = asyncExecutor.runAsync(() ->
reportMapper.getProcessBreakingTotal(offset, pageSize, finalStartDate, finalEndDate, crossProcessBreakingDTO));
+
+ // 绛夊緟涓や釜浠诲姟鎵ц瀹屾瘯
+ CompletableFuture.allOf(dataFuture, totalFuture).join();
+
+ try {
+ result.put("data", dataFuture.get());
+ result.put("total", totalFuture.get());
+ } catch (Exception e) {
+ e.printStackTrace();
+ throw new RuntimeException("骞惰鏌ヨ寮傚父锛�" + e.getMessage(), e);
+ }
+
+ List<String> list = new ArrayList<>();
+ list.add(startDate);
+ list.add(endDate);
+ result.put("selectDate", list);
+
+ return result;
+ }
+
+ //闈炶法宸ュ簭娆$牬
+ public Map<String, Object> notCrossProcessBreakingSv(Integer pageNum, Integer pageSize,
+ List<String> selectDate,
+ CrossProcessBreakingDTO crossProcessBreakingDTO) {
+ Integer offset = (pageNum - 1) * pageSize;
+
+ // 榛樿鏃堕棿鑼冨洿锛氳繃鍘� 15 澶�
+ String endDate = LocalDate.now().toString();
+ String startDate = LocalDate.now().minusDays(15).toString();
+
+ if (selectDate != null && selectDate.size() == 2) {
+ if (!selectDate.get(0).isEmpty()) {
+ startDate = selectDate.get(0);
+ }
+ if (!selectDate.get(1).isEmpty()) {
+ endDate = selectDate.get(1);
+ }
+ }
+
+ Map<String, Object> result = new HashMap<>();
+
+ // 浣跨敤寮傛绾跨▼姹�
+ String finalEndDate = endDate;
+ String finalStartDate = startDate;
+ CompletableFuture<List<CrossProcessBreakingDTO>> dataFuture = asyncExecutor.runAsync(() ->
+ reportMapper.getNotProcessBreaking(offset, pageSize, finalStartDate, finalEndDate, crossProcessBreakingDTO));
+
+ CompletableFuture<Map<String, Integer>> totalFuture = asyncExecutor.runAsync(() ->
+ reportMapper.getNotProcessBreakingTotal(offset, pageSize, finalStartDate, finalEndDate, crossProcessBreakingDTO));
// 绛夊緟涓や釜浠诲姟鎵ц瀹屾瘯
CompletableFuture.allOf(dataFuture, totalFuture).join();
@@ -756,6 +806,10 @@
return reportMapper.exportCrossProcessBreakingMp(dates);
}
+ public List exportNotCrossProcessBreakingSv(List<LocalDate> dates) {
+ return reportMapper.exportNotCrossProcessBreakingMp(dates);
+ }
+
// public List exportTeamOutputSv(Map<String, Object> dates) {
// List<LocalDate> date= (List<LocalDate>) dates.get("date");
// String process= (String) dates.get("processes");
--
Gitblit v1.8.0