From 48f5220bc5eb826402f43e440dc34867368ff17c Mon Sep 17 00:00:00 2001
From: hongjli <3117313295@qq.com>
Date: 星期五, 23 五月 2025 13:41:20 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev
---
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