From 018813f357dd04756103149c6f12cfd94bc0aba4 Mon Sep 17 00:00:00 2001
From: Lius <Lius2225@163.com>
Date: 星期四, 10 七月 2025 20:52:44 +0800
Subject: [PATCH] 点检流程

---
 lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamWeekInspectionDetailController.java |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamWeekInspectionDetailController.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamWeekInspectionDetailController.java
index 0b54f4e..d98e0b9 100644
--- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamWeekInspectionDetailController.java
+++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamWeekInspectionDetailController.java
@@ -6,15 +6,16 @@
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.system.base.controller.JeecgController;
+import org.jeecg.common.util.StrUtils;
 import org.jeecg.modules.eam.entity.EamWeekInspectionDetail;
 import org.jeecg.modules.eam.service.IEamWeekInspectionDetailService;
 import org.jeecg.modules.eam.util.DateUtils;
-import org.springframework.format.annotation.DateTimeFormat;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
-import java.util.Date;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 /**
  * @Description: 鍛ㄧ偣妫�宸ュ崟鏄庣粏
@@ -45,7 +46,17 @@
         queryWrapper.between(EamWeekInspectionDetail::getPlanInspectionDate, DateUtils.getFirstDayOfWeek(inspectionDate), DateUtils.getLastDayOfWeek(inspectionDate));
         queryWrapper.orderByAsc(EamWeekInspectionDetail::getItemCode);
         List<EamWeekInspectionDetail> list = eamWeekInspectionDetailService.list(queryWrapper);
-        return Result.OK(list);
+        //娣诲姞鐐规鍛ㄧ偣妫�鏄惁宸插畬鎴愭爣璇�
+        Map<String, Object> result = new HashMap<>();
+        result.put("list", list);
+        if (list != null && !list.isEmpty()) {
+            if (!StrUtils.isEmpty(list.get(0).getInspector())) {
+                result.put("weekInsFlag", true);
+            } else {
+                result.put("weekInsFlag", false);
+            }
+        }
+        return Result.OK(result);
     }
 
 }

--
Gitblit v1.9.3