From d562551c7efd2c19fd037ab4fb1b7a355ff80f42 Mon Sep 17 00:00:00 2001
From: buhuazhen <hua100783@gmail.com>
Date: 星期五, 13 三月 2026 17:57:52 +0800
Subject: [PATCH] feat(inspection): 新增检测项目管理相关功能
---
src/main/java/com/ruoyi/production/service/impl/ProductionProductMainServiceImpl.java | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/src/main/java/com/ruoyi/production/service/impl/ProductionProductMainServiceImpl.java b/src/main/java/com/ruoyi/production/service/impl/ProductionProductMainServiceImpl.java
index 48d3c28..31d9632 100644
--- a/src/main/java/com/ruoyi/production/service/impl/ProductionProductMainServiceImpl.java
+++ b/src/main/java/com/ruoyi/production/service/impl/ProductionProductMainServiceImpl.java
@@ -342,7 +342,18 @@
}
@Override
- public IPage<HashMap<String, Object>> queryProductInputAndOutput(Page page, ProductionProductMainDto productionProductMainDto) {
- return productionProductMainMapper.queryProductInputAndOutput(page, productionProductMainDto);
+ public IPage<HashMap<String, Object>> queryProductInputAndOutput(Page page, ProductionProductMainDto dto) {
+ if (isEmptyDate(dto.getStartTime())) {
+ dto.setStartTime(LocalDate.now().toString());
+ }
+ if (isEmptyDate(dto.getEndTime())) {
+ dto.setEndTime(LocalDate.now().plusDays(1).toString());
+ }
+
+ return productionProductMainMapper.queryProductInputAndOutput(page, dto);
+ }
+
+ private boolean isEmptyDate(String date) {
+ return date == null || date.trim().isEmpty() || "Invalid Date".equals(date);
}
}
--
Gitblit v1.9.3