From df99e46312fdd5ee830f1451e478f6658e09f9ed Mon Sep 17 00:00:00 2001
From: 潘志宝 <979469083@qq.com>
Date: 星期一, 16 十二月 2024 13:41:41 +0800
Subject: [PATCH] 导出测点数据 修改

---
 iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmItemOutputServiceImpl.java |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmItemOutputServiceImpl.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmItemOutputServiceImpl.java
index a6f793e..0e3bdc7 100644
--- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmItemOutputServiceImpl.java
+++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmItemOutputServiceImpl.java
@@ -6,6 +6,7 @@
 import com.iailab.module.model.mcs.pre.dto.MmItemOutputDTO;
 import com.iailab.module.model.mcs.pre.entity.MmItemOutputEntity;
 import com.iailab.module.model.mcs.pre.service.MmItemOutputService;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.util.CollectionUtils;
@@ -30,6 +31,9 @@
     
     @Override
     public void saveMmItemOutput(List<MmItemOutputEntity> mmItemOutput) {
+        mmItemOutput.forEach(e -> {
+            e.setId(e.getId().replace("+","").replace("-",""));
+        });
         mmItemOutputDao.insert(mmItemOutput);
         // 清空缓存
         clearCache();
@@ -71,9 +75,11 @@
     }
 
     @Override
-    public MmItemOutputEntity getByItemid(String itemid, String resultstr) {
+    public MmItemOutputEntity getByItemid(String itemid, String resultstr, String resultIndex) {
         QueryWrapper<MmItemOutputEntity> queryWrapper = new QueryWrapper<>();
-        queryWrapper.eq("itemid", itemid).eq("resultstr", resultstr);
+        queryWrapper.eq("itemid", itemid)
+                .eq("resultstr", resultstr)
+                .eq(StringUtils.isNotBlank(resultIndex), "result_index", resultIndex);
         return mmItemOutputDao.selectOne(queryWrapper);
     }
 

--
Gitblit v1.9.3