|
|
@@ -134,6 +134,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
|
private final TableInfoServiceImpl tableInfoService;
|
|
|
private final INodeBaseInfoService nodeBaseInfoService;
|
|
|
private final TrialSelfInspectionRecordClient trialSelfInspectionRecordClient;
|
|
|
+ private final IWbsTreeService wbsTreeService;
|
|
|
// excel 解析结构
|
|
|
private final IExctabCellService exctabCellService;
|
|
|
private final WbsTreeContractOldHtmlService wbsTreeContractOldHtmlService;
|
|
|
@@ -1870,6 +1871,47 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
|
return sql;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public ExcelTabVO2 getWbsTreeExcelTab(Long id,Long nodeId) {
|
|
|
+ ExcelTabVO2 vo2 = new ExcelTabVO2();
|
|
|
+ ExcelTab excelTab = this.getById(id);
|
|
|
+ if(excelTab==null){
|
|
|
+ throw new ServiceException("未找到该表单");
|
|
|
+ }
|
|
|
+ vo2.setExcelTabId(excelTab.getId());
|
|
|
+ vo2.setExcelTabName(excelTab.getName());
|
|
|
+ if(StringUtils.isNotEmpty(excelTab.getTabId())){
|
|
|
+ org.springblade.manager.entity.TableInfo tableInfo = tableInfoService.getById(excelTab.getTabId());
|
|
|
+ if(tableInfo!=null){
|
|
|
+ vo2.setElementTableName(tableInfo.getTabChName());
|
|
|
+ vo2.setTableType(tableInfo.getTabType());
|
|
|
+ vo2.setInitTableName(tableInfo.getTabEnName());
|
|
|
+ vo2.setInitTabId(tableInfo.getId());
|
|
|
+ //判断同级其他节点 是否存在相同元素表
|
|
|
+ List<WbsNodeTableVO> wbsNodeTableVOS = wbsTreeService.selectByNodeTable(nodeId+"");
|
|
|
+ if(!wbsNodeTableVOS.isEmpty()){
|
|
|
+ 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);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ vo2.setIsCreate(2);
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ vo2.setIsCreate(2);
|
|
|
+ }
|
|
|
+ if(StringUtils.isEmpty(excelTab.getFileUrl())){
|
|
|
+ vo2.setIsCreate(3);
|
|
|
+ }
|
|
|
+ if(vo2.getIsCreate()==null){
|
|
|
+ vo2.setIsCreate(0);
|
|
|
+ }
|
|
|
+ return vo2;
|
|
|
+ }
|
|
|
+
|
|
|
// 获取用户
|
|
|
@Override
|
|
|
public Map<String, String> getTablbCols(String pkeyid, String colkey) throws FileNotFoundException {
|