浏览代码

矫正数据

hongchuangyanfa 2 年之前
父节点
当前提交
4e774e8913

+ 3 - 3
blade-service/blade-business/src/main/java/org/springblade/business/mapper/InformationQueryMapper.xml

@@ -171,9 +171,9 @@
         CASE (select count(tcf.id) from u_tree_contract_first AS tcf where tcf.is_deleted = 0 and tcf.wbs_node_id = wtc.p_key_id) WHEN 0 THEN 'false' ELSE 'true' END AS isFirst,
 			 ( SELECT count(1) from m_wbs_tree_contract where id in(SELECT parent_id from m_wbs_tree_contract a where a.is_deleted=0 and a.type=2 and table_owner in(1,2,3)) and contract_id=wtc.contract_id and type =1 and is_deleted=0 and (FIND_IN_SET(wtc.id,ancestors) or wtc.p_key_id=p_key_id)
 				) as allCount,
-			 (SELECT count(1) from u_information_query b where b.wbs_id in(SELECT p_key_id from m_wbs_tree_contract a where (FIND_IN_SET(wtc.id,a.ancestors) or wtc.p_key_id=a.p_key_id) and a.is_deleted=0 and a.`status`='0' ) and b.is_deleted=0 and b.classify=1) as savaCont,
-			 (SELECT count(1) from u_information_query b where b.wbs_id in(SELECT p_key_id from m_wbs_tree_contract a where (FIND_IN_SET(wtc.id,a.ancestors) or wtc.p_key_id=a.p_key_id) and a.is_deleted=0 and a.`status`='1' ) and b.is_deleted=0 and b.classify=1) as submitCounts,
-			 (SELECT count(1) from u_information_query b where b.wbs_id in(SELECT p_key_id from m_wbs_tree_contract a where (FIND_IN_SET(wtc.id,a.ancestors) or wtc.p_key_id=a.p_key_id) and a.is_deleted=0 and a.`status`='2' ) and b.is_deleted=0 and b.classify=1) as appCount
+			 (SELECT count(1) from u_information_query b where b.wbs_id in(SELECT p_key_id from m_wbs_tree_contract a where (FIND_IN_SET(wtc.id,a.ancestors) or wtc.p_key_id=a.p_key_id) and a.is_deleted=0 ) and b.`status`='0' and b.is_deleted=0 and b.classify=1 and b.contract_id=wtc.contract_id ) as savaCont,
+			 (SELECT count(1) from u_information_query b where b.wbs_id in(SELECT p_key_id from m_wbs_tree_contract a where (FIND_IN_SET(wtc.id,a.ancestors) or wtc.p_key_id=a.p_key_id) and a.is_deleted=0 ) and b.`status`='1' and b.is_deleted=0 and b.classify=1 and b.contract_id=wtc.contract_id) as submitCounts,
+			 (SELECT count(1) from u_information_query b where b.wbs_id in(SELECT p_key_id from m_wbs_tree_contract a where (FIND_IN_SET(wtc.id,a.ancestors) or wtc.p_key_id=a.p_key_id) and a.is_deleted=0 ) and b.`status`='2' and b.is_deleted=0 and b.classify=1 and b.contract_id=wtc.contract_id) as appCount
 				FROM
         m_wbs_tree_contract AS wtc
         LEFT JOIN u_contract_tree_drawings AS ctd ON ctd.is_deleted = 0 and ctd.process_id = wtc.p_key_id

+ 2 - 4
blade-service/blade-manager/src/main/java/org/springblade/manager/controller/ExcelTabController.java

@@ -1075,7 +1075,7 @@ public class ExcelTabController extends BladeController {
                         ExctabCell exctabCell = new ExctabCell();
                         if ((textInfo.indexOf("年") >= 0 && textInfo.indexOf("月") >= 0 && textInfo.indexOf("日") >= 0) || inputText.indexOf("日期") >= 0) {
                             if (inputText.indexOf("日期") >= 0) {
-                                data.empty().append("<el-date-picker type='date' @keyDowns='dateKeydown' format='YYYY年MM月DD日' value-format='YYYY年MM月DD日' @contextmenu.prevent.native='contextmenuClick("+parm+")'  @mouseup.right='RightClick(" + parm + ")' trIndex=" + i + " tdIndex=" + j + "  x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + " style='width:100%;height:100%;' placeholder='" + inputText + "'> </el-date-picker>");
+                                data.empty().append("<el-date-picker type='date' @keyDowns='dateKeydown()' format='YYYY年MM月DD日' value-format='YYYY年MM月DD日' @contextmenu.prevent.native='contextmenuClick("+parm+")'  @mouseup.right='RightClick(" + parm + ")' trIndex=" + i + " tdIndex=" + j + "  x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + " style='width:100%;height:100%;' placeholder='" + inputText + "'> </el-date-picker>");
                             } else if (textInfo.indexOf("年") >= 0 && textInfo.indexOf("月") >= 0 && textInfo.indexOf("日") >= 0) {
                                 if (inputText.indexOf("专业监理工程师") >= 0) {
                                     inputText = "专业监理工程师_年月日";
@@ -1085,7 +1085,7 @@ public class ExcelTabController extends BladeController {
                                     inputText = "年月日";
                                 }
                             }
-                            data.empty().append("<el-date-picker @keyDowns='dateKeydown'  type='date' format='YYYY年MM月DD日' value-format='YYYY年MM月DD日' @contextmenu.prevent.native='contextmenuClick("+parm+")'  @mouseup.right='RightClick(" + parm + ")' trIndex=" + i + " tdIndex=" + j + "  x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + " style='width:100%;height:100%;' placeholder='年月日'> </el-date-picker>");
+                            data.empty().append("<el-date-picker @keyDowns='dateKeydown()'  type='date' format='YYYY年MM月DD日' value-format='YYYY年MM月DD日' @contextmenu.prevent.native='contextmenuClick("+parm+")'  @mouseup.right='RightClick(" + parm + ")' trIndex=" + i + " tdIndex=" + j + "  x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + " style='width:100%;height:100%;' placeholder='年月日'> </el-date-picker>");
                             exctabCell.setTextInfo(inputText);
                             exctabCell.setExctabId(excelId);
                             exctabCell.setIsDeleted(0);
@@ -2957,8 +2957,6 @@ public class ExcelTabController extends BladeController {
     })
     public R getHtmlBussCols(String contractId){
         excelTabService.updateContractById(contractId);
-
-
         return R.data("成功");
     }
 

+ 10 - 10
blade-service/blade-manager/src/main/java/org/springblade/manager/controller/TextdictInfoController.java

@@ -277,7 +277,7 @@ public class TextdictInfoController extends BladeController {
 
         } else if (textdictInfo.getTextId().equals("radio")) { // 单选按钮
 
-            String radioText = "<el-radio-group id=" + keyname + " @keyDowns='dateKeydown' v-model=" + vmode + " keyname=" + keyname + " weighing=" + weighing + " placeholder=" + placeholder + " trIndex=" + trindex + " tdIndex=" + tdindex + "  x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + ">";
+            String radioText = "<el-radio-group id=" + keyname + " @keyDowns='dateKeydown()' v-model=" + vmode + " keyname=" + keyname + " weighing=" + weighing + " placeholder=" + placeholder + " trIndex=" + trindex + " tdIndex=" + tdindex + "  x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + ">";
             List<TextdictInfo_vo> optionList = textdictInfo.getTextInfo();
             if (optionList != null && optionList.size() >= 1) {
                 for (int i = 0; i < optionList.size(); i++)
@@ -295,26 +295,26 @@ public class TextdictInfoController extends BladeController {
                     jsonObject.put("name", optionList.get(i).getDictValue());
                     objs.add(jsonObject);
                 }
-                String checkbox = "<hc-form-checkbox-group   @keyDowns='dateKeydown' :objs='" + objs + "'  @change='checkboxGroupChange' :val=" + vmode + " v-model=" + vmode + " keyname=" + keyname + " weighing=" + weighing + " placeholder=" + placeholder + " trIndex=" + trindex + " tdIndex=" + tdindex + "  x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + "> </hc-form-checkbox-group>";
+                String checkbox = "<hc-form-checkbox-group   @keyDowns='dateKeydown()' :objs='" + objs + "'  @change='checkboxGroupChange' :val=" + vmode + " v-model=" + vmode + " keyname=" + keyname + " weighing=" + weighing + " placeholder=" + placeholder + " trIndex=" + trindex + " tdIndex=" + tdindex + "  x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + "> </hc-form-checkbox-group>";
                 element.empty().append(checkbox);
             }
         } else if (textdictInfo.getTextId().equals("date")) { // 日期--年月日时分秒
-            element.empty().append("<el-date-picker @keyDowns='dateKeydown' v-model=" + vmode + " type='datetime' format='YYYY年MM月DD日 HH:mm:ss' value-format='YYYY年MM月DD日 hh:mm:ss' placeholder=" + placeholder + " keyname=" + keyname + " weighing=" + weighing + "  @contextmenu.prevent.native='contextmenuClick("+parm+")'  @mouseup.right='RightClick(" + parm + ")' trIndex=" + trindex + " tdIndex=" + tdindex + "  x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + " style='width:100%;height:100%'   placeholder='" + placeholder + "'> </el-date-picker>");
+            element.empty().append("<el-date-picker @keyDowns='dateKeydown()' v-model=" + vmode + " type='datetime' format='YYYY年MM月DD日 HH:mm:ss' value-format='YYYY年MM月DD日 hh:mm:ss' placeholder=" + placeholder + " keyname=" + keyname + " weighing=" + weighing + "  @contextmenu.prevent.native='contextmenuClick("+parm+")'  @mouseup.right='RightClick(" + parm + ")' trIndex=" + trindex + " tdIndex=" + tdindex + "  x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + " style='width:100%;height:100%'   placeholder='" + placeholder + "'> </el-date-picker>");
         } else if (textdictInfo.getTextId().equals("dateYMD")) { // 日期--年月日
-            element.empty().append("<el-date-picker @keyDowns='dateKeydown' v-model=" + vmode + " type='date' format='YYYY年MM月DD日' value-format='YYYY年MM月DD日' placeholder=" + placeholder + " keyname=" + keyname + " weighing=" + weighing + "  @contextmenu.prevent.native='contextmenuClick("+parm+")'  @mouseup.right='RightClick(" + parm + ")' trIndex=" + trindex + " tdIndex=" + tdindex + "  x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + " style='width:100%;height:100%'   placeholder='" + placeholder + "'> </el-date-picker>");
+            element.empty().append("<el-date-picker @keyDowns='dateKeydown()' v-model=" + vmode + " type='date' format='YYYY年MM月DD日' value-format='YYYY年MM月DD日' placeholder=" + placeholder + " keyname=" + keyname + " weighing=" + weighing + "  @contextmenu.prevent.native='contextmenuClick("+parm+")'  @mouseup.right='RightClick(" + parm + ")' trIndex=" + trindex + " tdIndex=" + tdindex + "  x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + " style='width:100%;height:100%'   placeholder='" + placeholder + "'> </el-date-picker>");
         } else if (textdictInfo.getTextId().equals("dateHMS")) { // 日期--时分秒
-            element.empty().append("<el-time-picker @keyDowns='dateKeydown' v-model=" + vmode + " type='date' format='HH:mm:ss' value-format='HH:mm:ss' placeholder=" + placeholder + " keyname=" + keyname + " weighing=" + weighing + "  @contextmenu.prevent.native='contextmenuClick("+parm+")'  @mouseup.right='RightClick(" + parm + ")' trIndex=" + trindex + " tdIndex=" + tdindex + "  x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + " style='width:100%;height:100%'   placeholder='" + placeholder + "'> </el-time-picker>");
+            element.empty().append("<el-time-picker @keyDowns='dateKeydown()' v-model=" + vmode + " type='date' format='HH:mm:ss' value-format='HH:mm:ss' placeholder=" + placeholder + " keyname=" + keyname + " weighing=" + weighing + "  @contextmenu.prevent.native='contextmenuClick("+parm+")'  @mouseup.right='RightClick(" + parm + ")' trIndex=" + trindex + " tdIndex=" + tdindex + "  x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + " style='width:100%;height:100%'   placeholder='" + placeholder + "'> </el-time-picker>");
         } else if (textdictInfo.getTextId().equals("dateSM")) { // 日期--时分
-            element.empty().append("<el-time-picker @keyDowns='dateKeydown' v-model=" + vmode + " type='date' format='HH:mm' value-format='HH:mm' placeholder=" + placeholder + " keyname=" + keyname + " weighing=" + weighing + "  @contextmenu.prevent.native='contextmenuClick("+parm+")'  @mouseup.right='RightClick(" + parm + ")' trIndex=" + trindex + " tdIndex=" + tdindex + "  x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + " style='width:100%;height:100%'   placeholder='" + placeholder + "'> </el-time-picker>");
+            element.empty().append("<el-time-picker @keyDowns='dateKeydown()' v-model=" + vmode + " type='date' format='HH:mm' value-format='HH:mm' placeholder=" + placeholder + " keyname=" + keyname + " weighing=" + weighing + "  @contextmenu.prevent.native='contextmenuClick("+parm+")'  @mouseup.right='RightClick(" + parm + ")' trIndex=" + trindex + " tdIndex=" + tdindex + "  x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + " style='width:100%;height:100%'   placeholder='" + placeholder + "'> </el-time-picker>");
         } else if (textdictInfo.getTextId().equals("dateMDHM")) { // 日期--月日时分
-            element.empty().append("<el-date-picker @keyDowns='dateKeydown' v-model=" + vmode + " type='datetime' format='MM月DD日 HH:mm' value-format='MM月DD日 HH:mm' placeholder=" + placeholder + " keyname=" + keyname + " weighing=" + weighing + "  @contextmenu.prevent.native='contextmenuClick("+parm+")'  @mouseup.right='RightClick(" + parm + ")' trIndex=" + trindex + " tdIndex=" + tdindex + "  x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + " style='width:100%;height:100%'   placeholder='" + placeholder + "'> </el-time-picker>");
+            element.empty().append("<el-date-picker @keyDowns='dateKeydown()' v-model=" + vmode + " type='datetime' format='MM月DD日 HH:mm' value-format='MM月DD日 HH:mm' placeholder=" + placeholder + " keyname=" + keyname + " weighing=" + weighing + "  @contextmenu.prevent.native='contextmenuClick("+parm+")'  @mouseup.right='RightClick(" + parm + ")' trIndex=" + trindex + " tdIndex=" + tdindex + "  x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + " style='width:100%;height:100%'   placeholder='" + placeholder + "'> </el-time-picker>");
         } else if (textdictInfo.getTextId().equals("dateDHM")) { // 日期--日时分
-            element.empty().append("<el-date-picker @keyDowns='dateKeydown' v-model=" + vmode + " type='datetime' format='DD日 HH:mm' value-format='DD日 HH:mm' placeholder=" + placeholder + " keyname=" + keyname + " weighing=" + weighing + "  @contextmenu.prevent.native='contextmenuClick("+parm+")'  @mouseup.right='RightClick(" + parm + ")' trIndex=" + trindex + " tdIndex=" + tdindex + "  x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + " style='width:100%;height:100%'   placeholder='" + placeholder + "'> </el-time-picker>");
+            element.empty().append("<el-date-picker @keyDowns='dateKeydown()' v-model=" + vmode + " type='datetime' format='DD日 HH:mm' value-format='DD日 HH:mm' placeholder=" + placeholder + " keyname=" + keyname + " weighing=" + weighing + "  @contextmenu.prevent.native='contextmenuClick("+parm+")'  @mouseup.right='RightClick(" + parm + ")' trIndex=" + trindex + " tdIndex=" + tdindex + "  x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + " style='width:100%;height:100%'   placeholder='" + placeholder + "'> </el-time-picker>");
         } else if (textdictInfo.getTextId().equals("daterange")) { // 时间段
-            element.empty().append("<el-date-picker @keyDowns='dateKeydown' v-model=" + vmode + " type='datetimerange' placeholder=" + placeholder + "  start-placeholder='开始日期'  end-placeholder='结束日期' format='YYYY年MM月DD日' trIndex=" + trindex + " keyname=" + keyname + " weighing=" + weighing + " tdIndex=" + tdindex + "  x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + ">");
+            element.empty().append("<el-date-picker @keyDowns='dateKeydown()' v-model=" + vmode + " type='datetimerange' placeholder=" + placeholder + "  start-placeholder='开始日期'  end-placeholder='结束日期' format='YYYY年MM月DD日' trIndex=" + trindex + " keyname=" + keyname + " weighing=" + weighing + " tdIndex=" + tdindex + "  x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + ">");
             element.children().get(0).attr("@change", "datePickerChange($event,'" + keyname + "')");
         } else if (textdictInfo.getTextId().equals("daterangeYMD")) { // 时间段 /
-            element.empty().append("<el-date-picker @keyDowns='dateKeydown' v-model=" + vmode + " type='datetimerange' range-separator='/' placeholder=" + placeholder + "  start-placeholder='开始日期'  end-placeholder='结束日期' format='YYYY年MM月DD日' trIndex=" + trindex + " keyname=" + keyname + " weighing=" + weighing + " tdIndex=" + tdindex + "  x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + ">");
+            element.empty().append("<el-date-picker @keyDowns='dateKeydown()' v-model=" + vmode + " type='datetimerange' range-separator='/' placeholder=" + placeholder + "  start-placeholder='开始日期'  end-placeholder='结束日期' format='YYYY年MM月DD日' trIndex=" + trindex + " keyname=" + keyname + " weighing=" + weighing + " tdIndex=" + tdindex + "  x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + ">");
             element.children().get(0).attr("@change", "datePickerChange($event,'" + keyname + "')");
 
         } else if (textdictInfo.getTextId().equals("img")) {

+ 43 - 46
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ExcelTabServiceImpl.java

@@ -18,6 +18,7 @@ package org.springblade.manager.service.impl;
 
 import cn.hutool.core.date.StopWatch;
 import cn.hutool.log.StaticLog;
+import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -26,6 +27,9 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.mixsmart.utils.ListUtils;
 import com.mixsmart.utils.RegexUtils;
+import com.spire.xls.CellRange;
+import com.spire.xls.Workbook;
+import com.spire.xls.*;
 import lombok.AllArgsConstructor;
 import org.apache.commons.collections4.CollectionUtils;
 import org.apache.commons.lang.StringUtils;
@@ -86,6 +90,7 @@ import java.util.*;
 import java.util.function.Function;
 import java.util.regex.Matcher;
 import java.util.stream.Collectors;
+import java.util.stream.Stream;
 
 /**
  * 清表基础数据表 服务实现类
@@ -379,7 +384,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
             currentNode.setPkId(wtc.getPKeyId());
             currentNode.setParentId(wtc.getParentId());
             currentNode.setWbsId(Long.parseLong(wtc.getWbsId()));
-            currentNode.setId(StringUtils.isNotEmpty(wtc.getOldId()) ? Long.valueOf(wtc.getOldId()) : wtc.getId());
+            currentNode.setId(StringUtils.isNotEmpty(wtc.getOldId())? Long.valueOf(wtc.getOldId()) :wtc.getId());
             currentNode.setRelateId(wtc.getId());
             List<Long> privateIds = this.jdbcTemplate.queryForList("select p_key_id from m_wbs_tree_private where id=" + currentNode.getRelateId() + " and  project_id=" + wtc.getProjectId() + " and wbs_id=" + wtc.getWbsId(), Long.class);
             if (Func.isNotEmpty(privateIds)) {
@@ -563,77 +568,67 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
                 .eq(WbsTreeContract::getIsDeleted, 0));
 
         // 数据维数据
-        Map<String, List<WbsTreeContract>> Data = new HashMap<>();
-        if (wbsTreeContractList != null && wbsTreeContractList.size() >= 1) {
-            for (WbsTreeContract dataInfo : wbsTreeContractList) {
-                String dataId = dataInfo.getId() + "";
-                String parentId = dataInfo.getParentId() + "";
+        Map<String , List<WbsTreeContract> > Data = new HashMap<>();
+        if(wbsTreeContractList!=null && wbsTreeContractList.size()>=1){
+            for(WbsTreeContract dataInfo : wbsTreeContractList){
+                String dataId = dataInfo.getId()+"";
+                String parentId = dataInfo.getParentId()+"";
 
-                if (!Data.containsKey(dataId)) {
+                if(!Data.containsKey(dataId)){
                     List<WbsTreeContract> newData = new ArrayList<>();
-                    Data.put(dataId, newData);
+                    Data.put(dataId,newData);
                 }
                 // 添加数据
-                if (Data.containsKey(parentId)) {
+                if(Data.containsKey(parentId)){
                     List<WbsTreeContract> newData = Data.get(parentId);
                     newData.add(dataInfo);
-                    Data.put(parentId, newData);
+                    Data.put(parentId,newData);
                 }
             }
         }
 
         //
-        List<WbsTreeContract> lastList = new ArrayList<>();
+        Map<Long,String> lastList = new HashMap<>();
         List<WbsTreeContract> collect = wbsTreeContractList.stream().filter(wbsTreeContract -> "0".equals(wbsTreeContract.getParentId().toString())).collect(Collectors.toList());
 
-        this.dataInfo(collect, lastList, Data);
-
-        if (lastList != null && lastList.size() >= 1) {
-            for (WbsTreeContract data : lastList) {
-                UpdateWrapper<WbsTreeContract> updateWrapper = new UpdateWrapper<>();
-                updateWrapper.eq("p_key_id", data.getPKeyId() + "");
-                updateWrapper.set("ancestors", data.getAncestors());
-                wbsTreeContractService.getBaseMapper().update(data, updateWrapper);
+        this.dataInfo(collect,lastList,Data);
+
+        if(lastList!=null && lastList.size()>=1){
+            int index = 0;
+            StringBuffer sb =new StringBuffer();
+            for(Long data : lastList.keySet()){
+                sb.append(" update m_wbs_tree_contract set ancestors='"+lastList.get(data)+"' where p_key_id="+data+";");
+                index = index+1;
+                System.out.println(index);
+                if(index>=1000){
+                    jdbcTemplate.execute(sb.toString());
+                    sb = new StringBuffer();
+                }
             }
         }
         return R.data("成功");
     }
 
 
-    public void dataInfo(List<WbsTreeContract> collect, List<WbsTreeContract> lastList, Map<String, List<WbsTreeContract>> Data) {
-
-        /*List<WbsTreeContract> redata = new ArrayList<>();
-        if (collect!=null && collect.size()==1){
-            // 主节点
-            for(WbsTreeContract fu:collect){
-                String dataId = fu.getId()+"";
-                List<WbsTreeContract> er = Data.get(dataId);
-                redata.add(fu);
-                if(er!=null && er.size()>=1){
-                    for(WbsTreeContract erData : er){
-                        erData.setAncestors(fu.getAncestors()+","+erData.getParentId());
-                        lastList.add(erData);
-                    }
-                }
-            }
-        }
-        if(redata!=null && redata.size()>=1){
-            this.dataInfo(redata,lastList,Data);
-        }*/
-
+    public void dataInfo(List<WbsTreeContract> collect,Map<Long ,String > lastList,Map<String , List<WbsTreeContract> > Data){
 
         Queue<WbsTreeContract> queue = new LinkedList<>();
         //将第一层级的目录全部入列
         collect.forEach(queue::offer);
         while (!queue.isEmpty()) {
             //每次循环出列一个对象 一直到队列为空
-            WbsTreeContract tree = queue.poll();
-            String dataId = tree.getId() + "";
+            WbsTreeContract tree= queue.poll();
+            String dataId = tree.getId()+"";
             List<WbsTreeContract> er = Data.get(dataId);
-            if (er != null && er.size() >= 1) {
-                for (WbsTreeContract erData : er) {
-                    erData.setAncestors(tree.getAncestors() + "," + erData.getParentId());
-                    lastList.add(erData);
+            if(er!=null && er.size()>=1){
+                for(WbsTreeContract erData : er){
+                    String Ancestors="";
+                    if(lastList.containsKey(tree.getPKeyId())){
+                        Ancestors = lastList.get(tree.getPKeyId());
+                    }else{
+                        Ancestors = tree.getAncestors();
+                    }
+                    lastList.put(erData.getPKeyId(),Ancestors+","+erData.getParentId());
                 }
             }
 
@@ -645,6 +640,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
     }
 
 
+
     /**
      * 保存首件
      */
@@ -2262,6 +2258,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
 
             return bladeFile2.getLink();
         }
+
         return "";
     }