From 93e554de49b2b87c337df71ea9ece51dd4e1d31d Mon Sep 17 00:00:00 2001
From: zhanghl <253316343@qq.com>
Date: 星期四, 22 五月 2025 15:31:24 +0800
Subject: [PATCH] 更新job计时功能,显示为分秒

---
 aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsGasPipelinePredictionServiceImpl.java |   24 +++++++++++++-----------
 1 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsGasPipelinePredictionServiceImpl.java b/aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsGasPipelinePredictionServiceImpl.java
index 3012ee2..f4715e4 100644
--- a/aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsGasPipelinePredictionServiceImpl.java
+++ b/aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsGasPipelinePredictionServiceImpl.java
@@ -114,7 +114,7 @@
         if (rows > 0) {
             List<ApsGasPipelinePrediction> list = new ArrayList<>();
             Set<String> keys = new HashSet<>();
-            /*鏁版嵁鍒椾粠1寮�濮�*/
+            /*鏁版嵁琛屼粠1寮�濮�*/
             for (int i = rows; i > 0; --i) {
                 Row row = sheet.getRow(i);
                 if (row.getCell(0) == null) {
@@ -150,16 +150,18 @@
                     Iterator<ApsGasPipelinePrediction> it = list.iterator();
                     while (it.hasNext()) {
                         ApsGasPipelinePrediction item = it.next();
-                        long count = facCodeKey.stream()
-                                .filter(map -> map.get("key").equals(item.getKey()))
-                                .peek(row -> {
-                                    item.setId((Long) row.get("id"));
-                                    item.setCreateBy(null);
-                                    item.setCreateTime(null);
-                                    item.setUpdateBy(SecurityUtils.getUsername());
-                                    item.setUpdateTime(new Timestamp(System.currentTimeMillis()));
-                                    apsGasPipelinePredictionMapper.updateById(item);
-                                }).count();
+                        int count = 0;
+                        for (Map<String, Object> map : facCodeKey) {
+                            if (map.get("key").equals(item.getKey())) {
+                                item.setId((Long) map.get("id"));
+                                item.setCreateBy(null);
+                                item.setCreateTime(null);
+                                item.setUpdateBy(SecurityUtils.getUsername());
+                                item.setUpdateTime(new Timestamp(System.currentTimeMillis()));
+                                apsGasPipelinePredictionMapper.updateById(item);
+                                count++;
+                            }
+                        }
                         if (count > 0){
                             it.remove();
                         }

--
Gitblit v1.9.3