Ver código fonte

Merge branch 'lvy' of http://219.151.181.73:3000/zhuwei/bladex into test-merge-02

lvy 2 meses atrás
pai
commit
d5dfb966b9

+ 1 - 1
blade-service/blade-business/src/main/java/org/springblade/business/service/impl/TrialSampleInfoServiceImpl.java

@@ -80,7 +80,7 @@ public class TrialSampleInfoServiceImpl extends BaseServiceImpl<TrialSampleInfoM
             return trialSampleInfo != null;
         } else {
             TrialSampleInfo trialSampleInfo = list.stream().filter(f -> f.getId().equals(Long.parseLong(id))).findAny().orElse(null);
-            if (trialSampleInfo != null && !trialSampleInfo.getSpecificationNumber().equals(specificationNumber)) {
+            if (trialSampleInfo != null && trialSampleInfo.getSpecificationNumber() != null && !trialSampleInfo.getSpecificationNumber().equals(specificationNumber)) {
                 TrialSampleInfo trialSampleInfo1 = list.stream().filter(f -> f.getSpecificationNumber().equals(specificationNumber)).findAny().orElse(null);
                 return trialSampleInfo1 != null;
             }

+ 12 - 5
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/TextdictInfoServiceImpl.java

@@ -27,6 +27,7 @@ import org.jsoup.select.Elements;
 import org.springblade.common.constant.CommonConstant;
 import org.springblade.common.utils.CommonUtil;
 import org.springblade.common.utils.SnowFlakeUtil;
+import org.springblade.common.utils.SystemUtils;
 import org.springblade.core.tool.utils.*;
 import org.springblade.manager.entity.TextdictInfo;
 import org.springblade.manager.entity.WbsTreePrivate;
@@ -96,9 +97,12 @@ public class TextdictInfoServiceImpl extends ServiceImpl<TextdictInfoMapper, Tex
                         }
                         addSign(textdict, doc, privateInfo, dqid);
                     } else if (textdictList != null && !textdictList.isEmpty()) {
-                        Map<String, Map<String, TextdictInfoVO>> map = textdict.stream().collect(Collectors.groupingBy(TextdictInfoVO::getColKey, Collectors.toMap(TextdictInfoVO::getSigRoleId, v -> v, (v1, v2) -> v1)));
+                        Map<String, Map<String, TextdictInfoVO>> map = textdict.stream().filter(vo -> vo.getColKey() != null && vo.getColKey().contains("__")).collect(Collectors.groupingBy(vo -> vo.getColKey().split("__")[1], Collectors.toMap(TextdictInfoVO::getSigRoleId, v -> v, (v1, v2) -> v1)));
                         List<TextdictInfoVO> collect = textdictList.stream().filter(textdictInfoVO -> {
-                            Map<String, TextdictInfoVO> voMap = map.get(textdictInfoVO.getColKey());
+                            if (textdictInfoVO.getColKey() == null || !textdictInfoVO.getColKey().contains("__")) {
+                                return true;
+                            }
+                            Map<String, TextdictInfoVO> voMap = map.get(textdictInfoVO.getColKey().split("__")[1]);
                             textdictInfoVO.setIsSystem(2);
                             if (voMap != null && !voMap.isEmpty() ) {
                                 return voMap.get(textdictInfoVO.getSigRoleId()) == null;
@@ -125,9 +129,12 @@ public class TextdictInfoServiceImpl extends ServiceImpl<TextdictInfoMapper, Tex
                         if (textdict == null || textdict.isEmpty()) {
                             textdict = textdictConfigList;
                         } else {
-                            Map<String, Map<String, TextdictInfoVO>> map = textdict.stream().collect(Collectors.groupingBy(TextdictInfoVO::getColKey, Collectors.toMap(TextdictInfoVO::getSigRoleId, v -> v, (v1, v2) -> v1)));
+                            Map<String, Map<String, TextdictInfoVO>> map = textdict.stream().filter(vo -> vo.getColKey() != null && vo.getColKey().contains("__")).collect(Collectors.groupingBy(TextdictInfoVO::getColKey, Collectors.toMap(TextdictInfoVO::getSigRoleId, v -> v, (v1, v2) -> v1)));
                             List<TextdictInfoVO> collect = textdictConfigList.stream().filter(textdictInfoVO -> {
-                                Map<String, TextdictInfoVO> voMap = map.get(textdictInfoVO.getColKey());
+                                if (textdictInfoVO.getColKey() == null || !textdictInfoVO.getColKey().contains("__")) {
+                                    return true;
+                                }
+                                Map<String, TextdictInfoVO> voMap = map.get(textdictInfoVO.getColKey().split("__")[1]);
                                 if (voMap != null && !voMap.isEmpty() ) {
                                     return voMap.get(textdictInfoVO.getSigRoleId()) == null;
                                 }
@@ -184,7 +191,7 @@ public class TextdictInfoServiceImpl extends ServiceImpl<TextdictInfoMapper, Tex
                 isUpdate.set(true);
             }
         });
-        if (!isUpdate.get()) {
+        if (!isUpdate.get() || !SystemUtils.isLinux()) {
             return;
         }
         String file_path = FileUtils.getSysLocalFileUrl();