From fbb309a90ce4184cfad6c439cc5a6515a085e44b Mon Sep 17 00:00:00 2001
From: 16639036659 <577530412@qq.com>
Date: 星期三, 19 六月 2024 08:42:33 +0800
Subject: [PATCH] 临时提交

---
 src/main/java/com/ruoyi/project/tr/specialCheck/controller/TBSpecialCheckScoreAndDangerLogController.java |   27 +++++++++++++++++++++++++++
 1 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/ruoyi/project/tr/specialCheck/controller/TBSpecialCheckScoreAndDangerLogController.java b/src/main/java/com/ruoyi/project/tr/specialCheck/controller/TBSpecialCheckScoreAndDangerLogController.java
index c3d8c31..ade0f81 100644
--- a/src/main/java/com/ruoyi/project/tr/specialCheck/controller/TBSpecialCheckScoreAndDangerLogController.java
+++ b/src/main/java/com/ruoyi/project/tr/specialCheck/controller/TBSpecialCheckScoreAndDangerLogController.java
@@ -22,6 +22,9 @@
 import org.springframework.ui.ModelMap;
 import org.springframework.web.bind.annotation.*;
 
+import java.sql.Date;
+import java.time.Instant;
+import java.time.ZoneId;
 import java.util.List;
 
 /**
@@ -63,8 +66,24 @@
     {
 
         ResultVO<List<TbSpecialCheckScoreAndDangerLog>> resultVO = scoreAndDangerDangerLogService.selectSpecialCheckScoreAndDangerLogPage(scoreAndDangerLogBO);
+
         List<TbSpecialCheckScoreAndDangerLogRespDTO> data = (List<TbSpecialCheckScoreAndDangerLogRespDTO>) resultVO.getData();
+        List<TbSpecialCheckScoreAndDangerLog> scoreList = (List<TbSpecialCheckScoreAndDangerLog>) resultVO.getData();
         List<TbSpecialCheckScoreAndDangerLogDTO> tbSpecialCheckScoreAndDangerLogDTOS = BeanCopyUtils.copyBeanList(data, TbSpecialCheckScoreAndDangerLogDTO.class);
+        for (TbSpecialCheckScoreAndDangerLogDTO score : tbSpecialCheckScoreAndDangerLogDTOS) {
+            for (TbSpecialCheckScoreAndDangerLog datum : scoreList) {
+                if (datum.getId().equals(score.getId())){
+                    Instant checkDate = datum.getCheckDate().atZone(ZoneId.systemDefault()).toInstant();
+                    score.setCheckDate(Date.from(checkDate));
+
+                    Instant createDate = datum.getCreateDate().atZone(ZoneId.systemDefault()).toInstant();
+                    score.setCreateDate(Date.from(createDate));
+
+                    Instant updateDate = datum.getUpdateDate().atZone(ZoneId.systemDefault()).toInstant();
+                    score.setUpdateDate(Date.from(updateDate));
+                }
+            }
+        }
 
         TableDataInfo dataTable = getDataTable(tbSpecialCheckScoreAndDangerLogDTOS);
         dataTable.setTotal(resultVO.getCount());
@@ -108,6 +127,14 @@
         TbSpecialCheckScoreAndDangerLog specialCheckItem = scoreAndDangerDangerLogService.getSpecialCheckScoreAndDangerLogByIndexId(indexId);
         TbSpecialCheckScoreAndDangerLogDTO data = BeanCopyUtils.copyBean(specialCheckItem, TbSpecialCheckScoreAndDangerLogDTO.class);
 
+        Instant checkDate = specialCheckItem.getCheckDate().atZone(ZoneId.systemDefault()).toInstant();
+        data.setCheckDate(Date.from(checkDate));
+
+        Instant createDate = specialCheckItem.getCreateDate().atZone(ZoneId.systemDefault()).toInstant();
+        data.setCreateDate(Date.from(createDate));
+
+        Instant updateDate = specialCheckItem.getUpdateDate().atZone(ZoneId.systemDefault()).toInstant();
+        data.setUpdateDate(Date.from(updateDate));
         mmap.put("specialCheckItem",data);
 //        TbBaseCheckTaskBO tbBaseCheckTaskBO = new TbBaseCheckTaskBO();
 //        ResultVO<List<TbBaseCheckTask>> listResultVO = tbBaseCheckService.selectTbBaseCheckTaskPage(tbBaseCheckTaskBO);

--
Gitblit v1.9.2