瀏覽代碼

公式相关:表内排序

yangyj 2 年之前
父節點
當前提交
ee0bc36301

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

@@ -739,7 +739,7 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
                    BeanUtil.copy(e,km);
                    km.setPkId(target.getPKeyId());
                    tec.getKeyMappers().add(km);
-                   if(StringUtils.handleNull(tec.getCoordinateMap().get(e.getCode())).contains(";")){
+                   if(StringUtils.handleNull(tec.getCoordinateMap().get(e.getTableName()).get(e.getField())).contains(";")){
                        removeKeys.add(e.getField());
                    }
                });
@@ -814,7 +814,7 @@ public  List<ElementData> setScale(Integer scale,List<ElementData> data){
                 "from m_wbs_tree_contract a " +
                 "inner join m_table_info b on a.init_table_name=b.tab_en_name " +
                 "INNER JOIN m_wbs_form_element c on b.id=c.f_id " +
-                "where a.p_key_id in("+pkIds+")  ORDER BY a.init_table_name");
+                "where a.p_key_id in("+pkIds+")  ORDER BY a.sort,a.create_time");
         List<Long> nodeIds= this.jdbcTemplate.queryForList("select b.parent_id from m_wbs_tree_contract  a join m_wbs_tree_private b on a.is_type_private_pid=b.p_key_id where a.p_key_id in("+pkIds+")",Long.class);
         if(Func.isNotEmpty(listMap)){
             /*当前节点的某个元素存在多种作用域的公式,作用域范围越小优先级越高*/