yangyj 2 éve
szülő
commit
a638e5cc8e

+ 4 - 3
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/FormulaServiceImpl.java

@@ -263,7 +263,8 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
                         String targetIds=tableNamePkIdsMaps.stream().filter(m->StringUtils.isEquals(m.get("tableName"),tn)).map(m->m.get("pkId")).map(StringUtils::handleNull).collect(Collectors.joining(","));
                         if(Func.isNotEmpty(targetIds)){
                             List<Map<String,Object>> tableDatas= this.jdbcTemplate.queryForList("select * from "+tn+" where p_key_id in ("+targetIds+")");
-                            fill(tableDatas,removeList,tn,key,StringUtils.handleNull(elementInfo.get("ename")));
+                            String tmp =elementInfo==null?"":StringUtils.handleNull(elementInfo.get("ename"));
+                            fill(tableDatas,removeList,tn,key,tmp);
                         }
                     });
                 }
@@ -849,7 +850,7 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
                  }
                  if(f.contains("quantity")){
                      /*聚合*/
-                     Matcher m = RegexUtils.matcher("T\\(com.mixsmart.utils.CustomFunction\\)\\.(quantity)\\(([^]]+)\\)",f);
+                     Matcher m = RegexUtils.matcher("T\\(com.mixsmart.utils.CustomFunction\\)\\.(quantity)\\(([^)]+)\\)",f);
                      while (m.find()) {
                          Object data=null;
                          List<String> codeList = getCodeList(m.group(2));
@@ -988,7 +989,7 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
             List<Map<String,Object>> mapList =this.jdbcTemplate.queryForList("select CONCAT(a.tab_en_name,':',b.e_key) ekey,a.tab_ch_name tableName,b.e_name ename  ,b.e_length elength,c.dict_value type f" +
                     "rom m_table_info a JOIN m_wbs_form_element b on a.id=b.f_id  " +
                     "LEFT JOIN (select dict_key, dict_value from blade_dict where code ='data_type' and parent_id > 0 and is_sealed = 0 and is_deleted = 0 )c on b.e_type=c.dict_key" +
-                    " where  a.tab_en_name in( "+ Arrays.stream(relyArr).map(e->e.split(StringPool.COLON)[0]).distinct().collect(Collectors.joining(StringPool.COMMA,"'","'"))+")");
+                    " where  a.tab_en_name in( "+ Arrays.stream(relyArr).map(e->e.split(StringPool.COLON)[0]).distinct().collect(Collectors.joining("','","'","'"))+")");
             if(ListUtils.isNotEmpty(mapList)){
              return   mapList.stream().filter(e-> Arrays.stream(relyArr).anyMatch(c->StringUtils.isEquals(e.get("ekey"),c))).collect(Collectors.toMap(e->StringUtils.handleNull(e.get("ekey")), e->e));
             }