liuyc 2 tahun lalu
induk
melakukan
3101837658

+ 3 - 3
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/feign/ExcelTabClient.java

@@ -30,9 +30,9 @@ public interface ExcelTabClient {
 
     @PostMapping(API_PREFIX + "/getBussPDFTrial")
     String getBussPDFTrial(@RequestParam Long pkeyId,
-                         @RequestParam String contractId,
-                         @RequestParam String id,
-                         @RequestBody TrialSelfInspectionRecordDTO dto) throws Exception;
+                           @RequestParam String contractId,
+                           @RequestParam String id,
+                           @RequestBody TrialSelfInspectionRecordDTO dto) throws Exception;
 
 
     @PostMapping(API_PREFIX + "/getBussPDFSTrial")

+ 7 - 2
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/feign/ExcelTabClientFallBack.java

@@ -1,5 +1,7 @@
 package org.springblade.manager.feign;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springblade.business.dto.TrialSelfInspectionRecordDTO;
 import org.springblade.manager.entity.ExcelTab;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -11,6 +13,7 @@ public class ExcelTabClientFallBack implements ExcelTabClient {
 
     @Autowired
     private JdbcTemplate jdbcTemplate;
+    private static final Logger logger = LoggerFactory.getLogger(ExcelTabClientFallBack.class);
 
     @Override
     public ExcelTab getById(String id) {
@@ -18,9 +21,11 @@ public class ExcelTabClientFallBack implements ExcelTabClient {
     }
 
     @Override
-    public String saveTabData(TrialSelfInspectionRecordDTO dto, Integer isBatchSave, Integer type, String tableType, Long id, String tabIds) throws RuntimeException {
+    public String saveTabData(TrialSelfInspectionRecordDTO dto, Integer isBatchSave, Integer type, String tableType, Long id, String tabIds) {
         jdbcTemplate.execute("delete from u_information_query where wbs_id = " + id);
-        throw new RuntimeException("试验数据保存失败,原因:ExcelTabClient#saveTabDataError...");
+        jdbcTemplate.execute("delete from u_trial_self_inspection_record where id = " + id);
+        logger.info("-----------------远程feign调用试验保存方法saveTabData失败-----------------");
+        return "500";
     }
 
     @Override

+ 4 - 2
blade-service/blade-business/src/main/java/org/springblade/business/service/impl/TrialSelfInspectionRecordServiceImpl.java

@@ -1018,10 +1018,12 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
         }
     }
 
-    public void submitTrialData(TrialSelfInspectionRecord obj, TrialSelfInspectionRecordDTO dto) throws RuntimeException {
+    public void submitTrialData(TrialSelfInspectionRecord obj, TrialSelfInspectionRecordDTO dto) {
         String pdfURL = excelTabClient.saveTabData(dto, dto.getIsBatchSave(), dto.getType(), dto.getTableType(), dto.getId(), obj.getTableIds());
-        if (StringUtils.isNotEmpty(pdfURL)) {
+        if (StringUtils.isNotEmpty(pdfURL) && !pdfURL.equals("500")) {
             this.update(Wrappers.<TrialSelfInspectionRecord>lambdaUpdate().set(TrialSelfInspectionRecord::getPdfUrl, pdfURL).eq(TrialSelfInspectionRecord::getId, dto.getId()));
+        } else if (pdfURL.equals("500")) {
+            throw new ServiceException("试验填报保存操作失败");
         }
     }
 

+ 0 - 9
blade-service/blade-manager/src/main/java/org/springblade/manager/feign/ExcelTabClientImpl.java

@@ -8,11 +8,9 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springblade.business.dto.TrialSelfInspectionRecordDTO;
 import org.springblade.business.entity.InformationQuery;
-import org.springblade.business.entity.TrialSelfInspectionRecord;
 import org.springblade.business.feign.InformationQueryClient;
 import org.springblade.common.constant.CommonConstant;
 import org.springblade.core.oss.model.BladeFile;
-import org.springblade.core.tool.utils.BeanUtil;
 import org.springblade.core.tool.utils.ObjectUtil;
 import org.springblade.core.tool.utils.ResourceUtil;
 import org.springblade.manager.bean.TableInfo;
@@ -25,11 +23,9 @@ import org.springblade.resource.feign.NewIOSSClient;
 import org.springblade.system.cache.ParamCache;
 import org.springframework.jdbc.core.BeanPropertyRowMapper;
 import org.springframework.jdbc.core.JdbcTemplate;
-import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RestController;
 
 import java.io.File;
-import java.rmi.ServerException;
 import java.util.List;
 import java.util.stream.Collectors;
 
@@ -50,14 +46,12 @@ public class ExcelTabClientImpl implements ExcelTabClient {
 
     @Override
     public String saveTabData(TrialSelfInspectionRecordDTO dto, Integer isBatchSave, Integer type, String tableType, Long id, String tabIds) throws RuntimeException {
-        //通用参数
         String pdfUrl = "";
         JSONArray dataArray = dto.getDataInfo().getJSONArray("orderList");
         JSONObject table = dataArray.getJSONObject(0);
         String nodeId = table.getString("nodeId");
         String projectId = table.getString("projectId");
         String contractId = table.getString("contractId");
-        //获取表模板,已处理隐藏表问题
         List<TableInfo> tableInfoList = this.excelTabService.getTableInfoListTrial(dataArray, tabIds);
         try {
             //------公式填充------
@@ -78,10 +72,8 @@ public class ExcelTabClientImpl implements ExcelTabClient {
                 //------单表PDF保存------
                 TableInfo tableInfo = tableInfoList.stream().findAny().orElse(null);
                 if (tableInfo != null && tabIds.contains(tableInfo.getPkeyId())) {
-                    //构造pdf
                     String bussPDFTrial = excelTabService.getBussPDFTrial(Long.valueOf(tableInfo.getPkeyId()), contractId, id, 0, 0, dto);
                     if (StringUtils.isNotEmpty(bussPDFTrial)) {
-                        //重新合并pdf
                         List<TrialSelfDataRecord> query = jdbcTemplate.query("select pdf_url from u_trial_self_data_record where record_id = " + id, new BeanPropertyRowMapper<>(TrialSelfDataRecord.class));
                         List<String> pdfList = query.stream().map(TrialSelfDataRecord::getPdfUrl).collect(Collectors.toList());
                         if (ObjectUtil.isNotEmpty(pdfList) && pdfList.size() > 0) {
@@ -94,7 +86,6 @@ public class ExcelTabClientImpl implements ExcelTabClient {
                             FileUtils.mergePdfPublicMethods(pdfList, pdfPath);
                             BladeFile bladeFile = newIOSSClient.uploadFile(id + "2.pdf", pdfPath);
                             if (bladeFile != null) {
-                                //重新合并pdf集合(解决单表保存后上报找不到题名问题)
                                 List<InformationQuery> query2 = jdbcTemplate.query("select id from u_information_query where classify ='" + type + "' and wbs_id ='" + id + "' and contract_id ='" + contractId + "'", new BeanPropertyRowMapper<>(InformationQuery.class));
                                 if (query2.size() > 0) {
                                     jdbcTemplate.execute("update u_information_query set pdf_url ='" + bladeFile.getLink() + "', name ='" + (StringUtils.isNotEmpty(dto.getTrialProjectName()) ? dto.getTrialProjectName() : "") + "'  where classify='" + type + "' and  wbs_id='" + id + "' and contract_id ='" + contractId + "'");

+ 142 - 144
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ExcelTabServiceImpl.java

@@ -12,13 +12,10 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.mixsmart.utils.FormulaUtils;
 import com.mixsmart.utils.ListUtils;
 import com.mixsmart.utils.RegexUtils;
-import com.spire.xls.CellRange;
-import com.spire.xls.*;
 import lombok.AllArgsConstructor;
 import org.apache.commons.collections4.CollectionUtils;
 import org.apache.commons.lang.StringUtils;
 import org.apache.commons.lang3.ObjectUtils;
-import org.apache.poi.ss.formula.functions.T;
 import org.apache.poi.ss.usermodel.CellStyle;
 import org.apache.poi.ss.usermodel.Font;
 import org.apache.poi.ss.usermodel.*;
@@ -74,14 +71,12 @@ import org.springframework.transaction.support.DefaultTransactionDefinition;
 
 import java.io.*;
 import java.net.URL;
-import java.nio.charset.StandardCharsets;
 import java.text.SimpleDateFormat;
 import java.util.List;
 import java.util.*;
 import java.util.function.Function;
 import java.util.regex.Matcher;
 import java.util.stream.Collectors;
-import java.util.stream.Stream;
 
 /**
  * 清表基础数据表 服务实现类
@@ -346,19 +341,19 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
 
                     CurrentNode currentNode = null;
                     Long pKeyId = null;
-                    Long contractId=null;
-                    Long projectId=null;
+                    Long contractId = null;
+                    Long projectId = null;
                     if (type.equals(ExecuteType.INSPECTION)) {
                         WbsTreeContract wtc = this.wbsTreeContractService.getOne(Wrappers.<WbsTreeContract>lambdaQuery().eq(WbsTreeContract::getPKeyId, nodeId));
                         pKeyId = wtc.getPKeyId();
                         currentNode = createCurrentNode(wtc);
-                        contractId=Long.parseLong(wtc.getContractId());
-                        projectId=Long.parseLong(wtc.getProjectId());
+                        contractId = Long.parseLong(wtc.getContractId());
+                        projectId = Long.parseLong(wtc.getProjectId());
                     } else if (type.equals(ExecuteType.TESTING)) {
                         WbsTreePrivate wtp = this.wbsTreePrivateService.getOne(Wrappers.<WbsTreePrivate>lambdaQuery().eq(WbsTreePrivate::getPKeyId, nodeId));
                         pKeyId = wtp.getPKeyId();
                         currentNode = createCurrentNode(wtp);
-                        projectId=Long.parseLong(wtp.getProjectId());
+                        projectId = Long.parseLong(wtp.getProjectId());
                     }
                     if (currentNode != null) {
                         TableElementConverter tec = new TableElementConverter(tableInfoList, keyMappers, formulas, coordinateMap, currentNode, tableAll);
@@ -1389,102 +1384,101 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
                             Element ytzData = trs.get(Integer.parseInt(xy[0]));
                             if (ytzData != null) {
                                 Elements tdsx = ytzData.select("td");
-                                    if (Integer.parseInt(xy[1]) < tdsx.size()) {
-                                        Element data = ytzData.select("td").get(Integer.parseInt(xy[1]));
-                                        if (data != null) {
-                                            if (data.html().indexOf("x1") >= 0 && data.html().indexOf("y1") >= 0) {
-                                                int x1 = 0;
-                                                int x2 = 0;
-                                                int y1 = 0;
-                                                int y2 = 0;
-
-                                                if (data.html().indexOf("el-tooltip") >= 0) {
-                                                    x1 = Integer.parseInt(data.children().get(0).children().get(0).attr("x1"));
-                                                    x2 = Integer.parseInt(data.children().get(0).children().get(0).attr("x2"));
-                                                    y1 = Integer.parseInt(data.children().get(0).children().get(0).attr("y1"));
-                                                } else {
-                                                    x1 = Integer.parseInt(data.children().get(0).attr("x1"));
-                                                    y1 = Integer.parseInt(data.children().get(0).attr("y1"));
-                                                }
-                                                if (x1 == 0) {
-                                                    x1 = 1;
-                                                }
-                                                String myData = DataInfo.get(val) + "";
-                                                if ((myData.indexOf("T") >= 0 && myData.indexOf("-") >= 0) || (myData.indexOf(",") >= 0 && myData.indexOf("]") >= 0)) {
-                                                    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
-                                                    sdf.setTimeZone(TimeZone.getTimeZone("GTM+8"));
-                                                    SimpleDateFormat formatStr = new SimpleDateFormat("yyyy年MM月dd日");
-                                                    if (myData.indexOf(",") >= 0 && myData.indexOf("]") >= 0) {
-
-                                                        myData = myData.replace("[", "").replace("]", "").replaceAll("'", "");
-                                                        String[] dataVal = myData.split(",");
-
-                                                        Date Start_dataStr = sdf.parse(dataVal[0]);
-                                                        Date end_dataStr = sdf.parse(dataVal[1]);
-                                                        String StartDate = formatStr.format(Start_dataStr);
-                                                        String endDate = formatStr.format(end_dataStr);
-                                                        if (StartDate.equals(endDate)) {
-                                                            myData = StartDate;
-                                                        } else {
-                                                            myData = StartDate + "-" + endDate;
-                                                        }
+                                if (Integer.parseInt(xy[1]) < tdsx.size()) {
+                                    Element data = ytzData.select("td").get(Integer.parseInt(xy[1]));
+                                    if (data != null) {
+                                        if (data.html().indexOf("x1") >= 0 && data.html().indexOf("y1") >= 0) {
+                                            int x1 = 0;
+                                            int x2 = 0;
+                                            int y1 = 0;
+                                            int y2 = 0;
+
+                                            if (data.html().indexOf("el-tooltip") >= 0) {
+                                                x1 = Integer.parseInt(data.children().get(0).children().get(0).attr("x1"));
+                                                x2 = Integer.parseInt(data.children().get(0).children().get(0).attr("x2"));
+                                                y1 = Integer.parseInt(data.children().get(0).children().get(0).attr("y1"));
+                                            } else {
+                                                x1 = Integer.parseInt(data.children().get(0).attr("x1"));
+                                                y1 = Integer.parseInt(data.children().get(0).attr("y1"));
+                                            }
+                                            if (x1 == 0) {
+                                                x1 = 1;
+                                            }
+                                            String myData = DataInfo.get(val) + "";
+                                            if ((myData.indexOf("T") >= 0 && myData.indexOf("-") >= 0) || (myData.indexOf(",") >= 0 && myData.indexOf("]") >= 0)) {
+                                                SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
+                                                sdf.setTimeZone(TimeZone.getTimeZone("GTM+8"));
+                                                SimpleDateFormat formatStr = new SimpleDateFormat("yyyy年MM月dd日");
+                                                if (myData.indexOf(",") >= 0 && myData.indexOf("]") >= 0) {
+
+                                                    myData = myData.replace("[", "").replace("]", "").replaceAll("'", "");
+                                                    String[] dataVal = myData.split(",");
+
+                                                    Date Start_dataStr = sdf.parse(dataVal[0]);
+                                                    Date end_dataStr = sdf.parse(dataVal[1]);
+                                                    String StartDate = formatStr.format(Start_dataStr);
+                                                    String endDate = formatStr.format(end_dataStr);
+                                                    if (StartDate.equals(endDate)) {
+                                                        myData = StartDate;
                                                     } else {
-                                                        String[] dataStr = myData.split("T")[0].split("-");
-                                                        if (dataStr.length == 3) {
-                                                            myData = StringUtil.format("{}年{}月{}日", dataStr[0], dataStr[1], Integer.parseInt(dataStr[2]));
-                                                        }
+                                                        myData = StartDate + "-" + endDate;
+                                                    }
+                                                } else {
+                                                    String[] dataStr = myData.split("T")[0].split("-");
+                                                    if (dataStr.length == 3) {
+                                                        myData = StringUtil.format("{}年{}月{}日", dataStr[0], dataStr[1], Integer.parseInt(dataStr[2]));
                                                     }
                                                 }
+                                            }
 
-                                                if (myData.indexOf("lang.String") >= 0) {
-                                                    Object obj = DataInfo.get(val);
-                                                    if (obj instanceof String[]) {
-                                                        String[] dataDate = (String[]) obj;
-                                                        myData = dataDate[0] + "-" + dataDate[1].trim();
-                                                    }
+                                            if (myData.indexOf("lang.String") >= 0) {
+                                                Object obj = DataInfo.get(val);
+                                                if (obj instanceof String[]) {
+                                                    String[] dataDate = (String[]) obj;
+                                                    myData = dataDate[0] + "-" + dataDate[1].trim();
                                                 }
+                                            }
 
-                                                //https:bladex-test-info.oss-cn-chengdu.aliyuncs.com//upload/20220819/b53cb6700db369381e3b03d7737bcdec.jpg__16_1
-                                                if ((myData.indexOf("https") >= 0 || myData.indexOf("http") >= 0) && myData.indexOf("aliyuncs") >= 0) {
-
-                                                    InputStream imageIn = CommonUtil.getOSSInputStream(myData);
-                                                    byte[] byteNew = IOUtils.toByteArray(imageIn);
-                                                    byte[] bytes = CommonUtil.compressImage(byteNew);
-                                                    // 这里根据实际需求选择图片类型
-                                                    int pictureIdx = workbook.addPicture(bytes, 6);
-                                                    CreationHelper helper = workbook.getCreationHelper();
-                                                    ClientAnchor anchor = helper.createClientAnchor();
-                                                    anchor.setCol1(x1); // param1是列号
-                                                    anchor.setCol2(x2);
-                                                    anchor.setRow1(y1); // param2是行号
-                                                    anchor.setRow2(y2); // param2是行号
-                                                    //
-                                                    Drawing drawing = sheet.createDrawingPatriarch();
-                                                    anchor.setAnchorType(ClientAnchor.AnchorType.MOVE_AND_RESIZE);
-                                                    // 插入图片
-                                                    Picture pict = drawing.createPicture(anchor, pictureIdx); // 调整图片占单元格百分比的大小,1.0就是100%
-                                                    pict.resize(1, 1);
-                                                    FileUtils.imageOrientation(sheet, anchor, new DataVO(x1 - 1, y1 - 1));
-
-                                                } else if (myData.equals("1") && data.html().indexOf("hc-form-checkbox-group") >= 0) {
-                                                    Row row = sheet.getRow(y1 - 1);
-                                                    if (row != null) {
-                                                        Cell cell = row.getCell(x1 - 1);
-                                                        if (cell != null || ObjectUtils.isNotEmpty(cell)) {
-                                                            String exceVal = cell.getStringCellValue().replaceAll(" ", "");
-                                                            short fontIndex = cell.getCellStyle().getFontIndex();
-                                                            Font fontAt = workbook.getFontAt(fontIndex);
-                                                            fontAt.setFontName("EUDC");
-                                                            cell.setCellValue(exceVal.replace("□", "\u2611"));
-                                                        }
+                                            //https:bladex-test-info.oss-cn-chengdu.aliyuncs.com//upload/20220819/b53cb6700db369381e3b03d7737bcdec.jpg__16_1
+                                            if ((myData.indexOf("https") >= 0 || myData.indexOf("http") >= 0) && myData.indexOf("aliyuncs") >= 0) {
+
+                                                InputStream imageIn = CommonUtil.getOSSInputStream(myData);
+                                                byte[] byteNew = IOUtils.toByteArray(imageIn);
+                                                byte[] bytes = CommonUtil.compressImage(byteNew);
+                                                // 这里根据实际需求选择图片类型
+                                                int pictureIdx = workbook.addPicture(bytes, 6);
+                                                CreationHelper helper = workbook.getCreationHelper();
+                                                ClientAnchor anchor = helper.createClientAnchor();
+                                                anchor.setCol1(x1); // param1是列号
+                                                anchor.setCol2(x2);
+                                                anchor.setRow1(y1); // param2是行号
+                                                anchor.setRow2(y2); // param2是行号
+                                                //
+                                                Drawing drawing = sheet.createDrawingPatriarch();
+                                                anchor.setAnchorType(ClientAnchor.AnchorType.MOVE_AND_RESIZE);
+                                                // 插入图片
+                                                Picture pict = drawing.createPicture(anchor, pictureIdx); // 调整图片占单元格百分比的大小,1.0就是100%
+                                                pict.resize(1, 1);
+                                                FileUtils.imageOrientation(sheet, anchor, new DataVO(x1 - 1, y1 - 1));
+
+                                            } else if (myData.equals("1") && data.html().indexOf("hc-form-checkbox-group") >= 0) {
+                                                Row row = sheet.getRow(y1 - 1);
+                                                if (row != null) {
+                                                    Cell cell = row.getCell(x1 - 1);
+                                                    if (cell != null || ObjectUtils.isNotEmpty(cell)) {
+                                                        String exceVal = cell.getStringCellValue().replaceAll(" ", "");
+                                                        short fontIndex = cell.getCellStyle().getFontIndex();
+                                                        Font fontAt = workbook.getFontAt(fontIndex);
+                                                        fontAt.setFontName("EUDC");
+                                                        cell.setCellValue(exceVal.replace("□", "\u2611"));
                                                     }
-                                                } else {
-                                                    Row row = sheet.getRow(y1 - 1);
-                                                    if (row != null) {
-                                                        Cell cell = row.getCell(x1 - 1);
-                                                        if (cell != null || ObjectUtils.isNotEmpty(cell)) {
-                                                            cell.setCellValue(myData);
-                                                        }
+                                                }
+                                            } else {
+                                                Row row = sheet.getRow(y1 - 1);
+                                                if (row != null) {
+                                                    Cell cell = row.getCell(x1 - 1);
+                                                    if (cell != null || ObjectUtils.isNotEmpty(cell)) {
+                                                        cell.setCellValue(myData);
                                                     }
                                                 }
                                             }
@@ -1495,58 +1489,59 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
                         }
                     }
                 }
+            }
 
-                // 组装电签设置
-                QueryWrapper<TextdictInfo> queryWrapper = new QueryWrapper<>();
-                queryWrapper.in("type", 2, 6);
-                queryWrapper.eq("tab_id", wbsTreeContract.getIsTypePrivatePid());
-
-                List<TextdictInfo> textdictInfos = textdictInfoService.getBaseMapper().selectList(queryWrapper);
-                if (textdictInfos != null && !textdictInfos.isEmpty()) {
-                    for (TextdictInfo e : textdictInfos) {
-                        String key = e.getColKey();
-                        String[] keys = key.split("__");
-                        String[] trtd = keys[1].split("_");
-                        if (Integer.parseInt(trtd[0]) < trs.size()) {
-                            Element ytzData = trs.get(Integer.parseInt(trtd[0]));
-                            if (ytzData != null) {
-                                Elements tdsx = ytzData.select("td");
-                                if (Integer.parseInt(trtd[1]) < tdsx.size()) {
-                                    Element data = ytzData.select("td").get(Integer.parseInt(trtd[1]));
-                                    if (data.html().indexOf("el-tooltip") >= 0) {
-                                        data = data.children().get(0);
-                                    }
-
-                                    int x1 = Integer.parseInt(data.children().get(0).attr("x1"));
-                                    if (x1 == 0) {
-                                        x1 = 1;
-                                    }
-                                    int y1 = Integer.parseInt(data.children().get(0).attr("y1"));
-
-                                    Row row = sheet.getRow(y1 - 1);
-                                    if (row != null) {
-                                        Cell cell = sheet.getRow(y1 - 1).getCell(x1 - 1);
-                                        if (cell != null || ObjectUtils.isNotEmpty(cell)) {
-                                            short fontIndex = cell.getCellStyle().getFontIndex();
-                                            Font oldfontAt = workbook.getFontAt(fontIndex);
-
-                                            Font redFont = workbook.createFont();
-                                            redFont.setColor(IndexedColors.WHITE.getIndex()); //设置字体颜色
-                                            redFont.setFontHeightInPoints(oldfontAt.getFontHeightInPoints());//设置字体大小
-                                            redFont.setFontName(oldfontAt.getFontName());//设置字体
+            // 组装电签设置
+            QueryWrapper<TextdictInfo> queryWrapper = new QueryWrapper<>();
+            queryWrapper.in("type", 2, 6);
+            queryWrapper.eq("tab_id", wbsTreeContract.getIsTypePrivatePid());
+
+            List<TextdictInfo> textdictInfos = textdictInfoService.getBaseMapper().selectList(queryWrapper);
+            if (textdictInfos != null && !textdictInfos.isEmpty()) {
+                for (TextdictInfo e : textdictInfos) {
+                    String key = e.getColKey();
+                    String[] keys = key.split("__");
+                    String[] trtd = keys[1].split("_");
+                    if (Integer.parseInt(trtd[0]) < trs.size()) {
+                        Element ytzData = trs.get(Integer.parseInt(trtd[0]));
+                        if (ytzData != null) {
+                            Elements tdsx = ytzData.select("td");
+                            if (Integer.parseInt(trtd[1]) < tdsx.size()) {
+                                Element data = ytzData.select("td").get(Integer.parseInt(trtd[1]));
+                                if (data.html().indexOf("el-tooltip") >= 0) {
+                                    data = data.children().get(0);
+                                }
 
-                                            CellStyle newStyle = workbook.createCellStyle(); //创建单元格样式
-                                            newStyle.cloneStyleFrom(cell.getCellStyle());
-                                            newStyle.setFont(redFont);
-                                            cell.setCellStyle(newStyle);
-                                            cell.setCellValue(e.getId() + "");
-                                        }
+                                int x1 = Integer.parseInt(data.children().get(0).attr("x1"));
+                                if (x1 == 0) {
+                                    x1 = 1;
+                                }
+                                int y1 = Integer.parseInt(data.children().get(0).attr("y1"));
+
+                                Row row = sheet.getRow(y1 - 1);
+                                if (row != null) {
+                                    Cell cell = sheet.getRow(y1 - 1).getCell(x1 - 1);
+                                    if (cell != null || ObjectUtils.isNotEmpty(cell)) {
+                                        short fontIndex = cell.getCellStyle().getFontIndex();
+                                        Font oldfontAt = workbook.getFontAt(fontIndex);
+
+                                        Font redFont = workbook.createFont();
+                                        redFont.setColor(IndexedColors.WHITE.getIndex()); //设置字体颜色
+                                        redFont.setFontHeightInPoints(oldfontAt.getFontHeightInPoints());//设置字体大小
+                                        redFont.setFontName(oldfontAt.getFontName());//设置字体
+
+                                        CellStyle newStyle = workbook.createCellStyle(); //创建单元格样式
+                                        newStyle.cloneStyleFrom(cell.getCellStyle());
+                                        newStyle.setFont(redFont);
+                                        cell.setCellStyle(newStyle);
+                                        cell.setCellValue(e.getId() + "");
                                     }
                                 }
                             }
                         }
                     }
                 }
+            }
         }
         //输出流
 
@@ -2137,6 +2132,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
 
         String pdfPath = file_path + "/pdf//" + pkeyId + ".pdf";
         String excelPath = file_path + "/pdf//" + pkeyId + ".xlsx";
+
         File tabPdf = ResourceUtil.getFile(pdfPath);
         if (tabPdf.exists()) {
             tabPdf.delete();
@@ -2171,7 +2167,9 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
         ProjectInfo projectInfo = projectInfoService.getById(wbsTreePrivate.getProjectId());
         int all = sheet.getRow(0).getLastCellNum();
         int mergedCellCnt = sheet.getNumMergedRegions();
-        for (int i = 0; i < mergedCellCnt - 1; i++) {
+        for (
+                int i = 0;
+                i < mergedCellCnt - 1; i++) {
             CellRangeAddress mergedCell = sheet.getMergedRegion(i);
             int xx = mergedCell.getNumberOfCells();
             if (xx <= all) {