|
|
@@ -108,7 +108,6 @@ import java.util.concurrent.ConcurrentHashMap;
|
|
|
import java.util.concurrent.CountDownLatch;
|
|
|
import java.util.concurrent.TimeUnit;
|
|
|
import java.util.function.Function;
|
|
|
-import java.util.function.Predicate;
|
|
|
import java.util.regex.Matcher;
|
|
|
import java.util.regex.Pattern;
|
|
|
import java.util.stream.Collectors;
|
|
|
@@ -258,7 +257,6 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
|
}
|
|
|
return excelTabVOs;
|
|
|
}
|
|
|
-
|
|
|
@Override
|
|
|
public List<ExceTabTreVO> tabLazyTree(String tenantId, Long modeId, Long parentId) {
|
|
|
if (AuthUtil.isAdministrator()) {
|
|
|
@@ -2250,9 +2248,9 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
|
vo2.setInitTableName(tableInfo.getTabEnName());
|
|
|
vo2.setInitTabId(tableInfo.getId());
|
|
|
//判断同级其他节点 是否存在相同元素表
|
|
|
- List<WbsNodeTableVO> wbsNodeTableVOS = wbsTreeService.selectByNodeTable(id+"");
|
|
|
+ List<WbsNodeTableVO> wbsNodeTableVOS = wbsTreeService.selectByNodeTable(nodeId+"");
|
|
|
if(!wbsNodeTableVOS.isEmpty()){
|
|
|
- Set<String> initTabIds = wbsNodeTableVOS.stream().filter(w -> StringUtils.isNotEmpty(w.getInitTableId())).map(w -> w.getInitTableId()).collect(Collectors.toSet());
|
|
|
+ Set<String> initTabIds = wbsNodeTableVOS.stream().map(WbsNodeTableVO::getInitTableId).filter(StringUtils::isNotEmpty).collect(Collectors.toSet());
|
|
|
if(!initTabIds.isEmpty()){
|
|
|
if(initTabIds.contains(tableInfo.getId()+"")){
|
|
|
vo2.setIsCreate(1);
|
|
|
@@ -6405,7 +6403,6 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
|
list.add(reData);
|
|
|
return list;
|
|
|
}
|
|
|
-
|
|
|
private static List<String> setBasicFormData(Document doc, Map<String, Object> reData, TrialSampleInfo sampleInfo ,TrialMaterialMobilization trialMaterialMobilization, EntrustInfo entrustInfo) {
|
|
|
List<String> isCancelList=new ArrayList<>();
|
|
|
if(sampleInfo==null){
|
|
|
@@ -6590,48 +6587,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- @Override
|
|
|
- @Async("taskExecutor1")
|
|
|
- public void synchronizedPdf(List<TableInfo> tableInfoList, String nodeId, String classify, String contractId, String projectId) {
|
|
|
- try {
|
|
|
- List<String> errorPKeyIds = new ArrayList<>();
|
|
|
- //单个pdf加载
|
|
|
- if (tableInfoList != null) {
|
|
|
- tableInfoList.parallelStream().forEach(tableInfo -> {
|
|
|
- R bussPdfInfo = null;
|
|
|
- try {
|
|
|
- bussPdfInfo = this.getBussPdfInfo(Long.parseLong(tableInfo.getPkeyId()));
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- if (ObjectUtil.isEmpty(bussPdfInfo) || bussPdfInfo.getCode() != 200) {
|
|
|
- //如果返回的单张pdfUrl为空,那么表示发生异常,返回异常信息
|
|
|
- errorPKeyIds.add(tableInfo.getPkeyId());
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
- //发生异常后直接返回,不进行合并
|
|
|
-// if (errorPKeyIds.size() > 0) {
|
|
|
-// List<AppWbsTreeContractVO> errorTabs = new LinkedList<>();
|
|
|
-// for (AppWbsTreeContractVO appWbsTreeContractVO : tableAll) {
|
|
|
-// if (errorPKeyIds.contains(appWbsTreeContractVO.getPKeyId().toString())) {
|
|
|
-// errorTabs.add(appWbsTreeContractVO);
|
|
|
-// }
|
|
|
-// }
|
|
|
-// if (errorTabs.size() > 0) {
|
|
|
-// List<String> names = errorTabs.stream().map(WbsTreeContract::getNodeName).collect(Collectors.toList());
|
|
|
-// return R.fail("以下的表在生成pdf文件时发生了异常【" + StringUtils.join(names, "、") + "】");
|
|
|
-// }
|
|
|
-// }
|
|
|
|
|
|
- //合并pdf加载
|
|
|
- this.getBussPdfs(nodeId, classify, contractId, projectId);
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- throw new ServiceException("问题");
|
|
|
- }
|
|
|
- }
|
|
|
|
|
|
@Override
|
|
|
public void cancelSample(Long groupId, Long pkeyId, Long contractId, Long sampleId1) throws Exception {
|
|
|
@@ -6824,48 +6780,6 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
|
jdbcTemplate.update(sql);
|
|
|
}
|
|
|
|
|
|
- @Override
|
|
|
- @Async("taskExecutor1")
|
|
|
- public void synchronizedPdf(List<TableInfo> tableInfoList, String nodeId, String classify, String contractId, String projectId) {
|
|
|
- try {
|
|
|
- List<String> errorPKeyIds = new ArrayList<>();
|
|
|
- //单个pdf加载
|
|
|
- if (tableInfoList != null) {
|
|
|
- tableInfoList.parallelStream().forEach(tableInfo -> {
|
|
|
- R bussPdfInfo = null;
|
|
|
- try {
|
|
|
- bussPdfInfo = this.getBussPdfInfo(Long.parseLong(tableInfo.getPkeyId()));
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- if (ObjectUtil.isEmpty(bussPdfInfo) || bussPdfInfo.getCode() != 200) {
|
|
|
- //如果返回的单张pdfUrl为空,那么表示发生异常,返回异常信息
|
|
|
- errorPKeyIds.add(tableInfo.getPkeyId());
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
- //发生异常后直接返回,不进行合并
|
|
|
-// if (errorPKeyIds.size() > 0) {
|
|
|
-// List<AppWbsTreeContractVO> errorTabs = new LinkedList<>();
|
|
|
-// for (AppWbsTreeContractVO appWbsTreeContractVO : tableAll) {
|
|
|
-// if (errorPKeyIds.contains(appWbsTreeContractVO.getPKeyId().toString())) {
|
|
|
-// errorTabs.add(appWbsTreeContractVO);
|
|
|
-// }
|
|
|
-// }
|
|
|
-// if (errorTabs.size() > 0) {
|
|
|
-// List<String> names = errorTabs.stream().map(WbsTreeContract::getNodeName).collect(Collectors.toList());
|
|
|
-// return R.fail("以下的表在生成pdf文件时发生了异常【" + StringUtils.join(names, "、") + "】");
|
|
|
-// }
|
|
|
-// }
|
|
|
-
|
|
|
- //合并pdf加载
|
|
|
- this.getBussPdfs(nodeId, classify, contractId, projectId);
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- throw new ServiceException("问题");
|
|
|
- }
|
|
|
- }
|
|
|
@Override
|
|
|
public void synPdfKeyInfo(String nodeId, String classify, String contractId, String projectId) throws Exception {
|
|
|
// 获取有权限的节点信息
|