|
@@ -1074,8 +1074,16 @@ public class ExcelTabController extends BladeController {
|
|
|
elements.forEach(element -> {
|
|
elements.forEach(element -> {
|
|
|
String keyname = element.attr("keyname");
|
|
String keyname = element.attr("keyname");
|
|
|
String key = keyname.split("__")[0];
|
|
String key = keyname.split("__")[0];
|
|
|
- if ( map.get(key)!= null && map.get(key).toString().contains("_^_")) {
|
|
|
|
|
- return;
|
|
|
|
|
|
|
+ if (map.get(key)!= null) {
|
|
|
|
|
+ String value = map.get(key).toString();
|
|
|
|
|
+ if (value.contains("_^_")) {
|
|
|
|
|
+ String[] split = value.split("☆");
|
|
|
|
|
+ for (String s : split) {
|
|
|
|
|
+ if (StringUtil.hasText(s.split("_\\^_")[0])) {
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
status.set(2);
|
|
status.set(2);
|
|
|
Elements parents = element.parents();
|
|
Elements parents = element.parents();
|
|
@@ -1100,8 +1108,16 @@ public class ExcelTabController extends BladeController {
|
|
|
elements.forEach(element -> {
|
|
elements.forEach(element -> {
|
|
|
String keyname = element.attr("keyname");
|
|
String keyname = element.attr("keyname");
|
|
|
String key = keyname.split("__")[0];
|
|
String key = keyname.split("__")[0];
|
|
|
- if (map.get(key) != null && map.get(key).toString().contains("_^_")) {
|
|
|
|
|
- return;
|
|
|
|
|
|
|
+ if (map.get(key)!= null) {
|
|
|
|
|
+ String value = map.get(key).toString();
|
|
|
|
|
+ if (value.contains("_^_")) {
|
|
|
|
|
+ String[] split = value.split("☆");
|
|
|
|
|
+ for (String s : split) {
|
|
|
|
|
+ if (StringUtil.hasText(s.split("_\\^_")[0])) {
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
boolean flag = true;
|
|
boolean flag = true;
|
|
|
if (keyMap.containsKey(key)) {
|
|
if (keyMap.containsKey(key)) {
|
|
@@ -1135,8 +1151,21 @@ public class ExcelTabController extends BladeController {
|
|
|
continue;
|
|
continue;
|
|
|
}
|
|
}
|
|
|
Object obj = map.get(wbsFormElement.getEKey());
|
|
Object obj = map.get(wbsFormElement.getEKey());
|
|
|
- if (obj != null && obj.toString().contains("_^_")) {
|
|
|
|
|
- continue;
|
|
|
|
|
|
|
+ if (obj!= null) {
|
|
|
|
|
+ String value = obj.toString();
|
|
|
|
|
+ if (value.contains("_^_")) {
|
|
|
|
|
+ String[] split = value.split("☆");
|
|
|
|
|
+ boolean hasText = false;
|
|
|
|
|
+ for (String s : split) {
|
|
|
|
|
+ if (StringUtil.hasText(s.split("_\\^_")[0])) {
|
|
|
|
|
+ hasText = true;
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ if (hasText) {
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
// 查找html中标签属性 keyname中包含 wbsFormElement.getEKey()的标签
|
|
// 查找html中标签属性 keyname中包含 wbsFormElement.getEKey()的标签
|
|
|
Elements keyNames = tableHtml.getElementsByAttributeValueContaining("keyname", wbsFormElement.getEKey());
|
|
Elements keyNames = tableHtml.getElementsByAttributeValueContaining("keyname", wbsFormElement.getEKey());
|
|
@@ -1182,6 +1211,38 @@ public class ExcelTabController extends BladeController {
|
|
|
wbsTreeContractService.checkNodeAllDate(parentNode);
|
|
wbsTreeContractService.checkNodeAllDate(parentNode);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ @Async
|
|
|
|
|
+ public void checkTableAllData(WbsTreeContract node) {
|
|
|
|
|
+ List<WbsTreeContract> list = wbsTreeContractService.list(new LambdaQueryWrapper<>(WbsTreeContract.class).eq(WbsTreeContract::getPId, node.getPKeyId()).apply(" (is_buss_show <> 2 or is_buss_show is null)"));
|
|
|
|
|
+ list.forEach(table -> {
|
|
|
|
|
+ WbsTreeContract wbsTreeContract = wbsTreeContractService.getBaseMapper().selectOne(Wrappers.<WbsTreeContract>query().lambda()
|
|
|
|
|
+ .eq(WbsTreeContract::getPKeyId, table.getPKeyId()));
|
|
|
|
|
+ if (wbsTreeContract == null) {
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (wbsTreeContract.getHtmlUrl() == null) {
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ try {
|
|
|
|
|
+ String fileUrl = wbsTreeContract.getHtmlUrl();
|
|
|
|
|
+ //如果有历史html就使用历史html
|
|
|
|
|
+ WbsTreeContractOldHtml one = wbsTreeContractOldHtmlService.getOne(Wrappers.<WbsTreeContractOldHtml>lambdaQuery()
|
|
|
|
|
+ .eq(WbsTreeContractOldHtml::getContractFormId, table.getPKeyId())
|
|
|
|
|
+ .eq(WbsTreeContractOldHtml::getIsDeleted, 0)
|
|
|
|
|
+ .last("limit 1"));
|
|
|
|
|
+ if(one != null && StringUtils.isNotEmpty(one.getOldHtmlUrl())){
|
|
|
|
|
+ fileUrl = one.getOldHtmlUrl();
|
|
|
|
|
+ }
|
|
|
|
|
+ InputStream fileInputStream = FileUtils.getInputStreamByUrl(fileUrl);
|
|
|
|
|
+ String htmlString = IoUtil.readToString(fileInputStream);
|
|
|
|
|
+ Document doc = Jsoup.parse(htmlString);
|
|
|
|
|
+ Element tableElement = doc.select("table").first();
|
|
|
|
|
+ setTableTips(wbsTreeContract, tableElement);
|
|
|
|
|
+ fileInputStream.close();
|
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 后管清表生成html
|
|
* 后管清表生成html
|
|
@@ -2636,7 +2697,8 @@ public class ExcelTabController extends BladeController {
|
|
|
//检查当前节点下所有的未隐藏的表单日期是否填写完整
|
|
//检查当前节点下所有的未隐藏的表单日期是否填写完整
|
|
|
WbsTreeContract contract = wbsTreeContractService.getById(Long.parseLong(nodeId));
|
|
WbsTreeContract contract = wbsTreeContractService.getById(Long.parseLong(nodeId));
|
|
|
if(contract!=null){
|
|
if(contract!=null){
|
|
|
- wbsTreeContractService.checkNodeAllDate(contract);
|
|
|
|
|
|
|
+// wbsTreeContractService.checkNodeAllDate(contract);
|
|
|
|
|
+ checkTableAllData(contract);
|
|
|
}
|
|
}
|
|
|
executionTime.info("----数据保存完毕 ----");
|
|
executionTime.info("----数据保存完毕 ----");
|
|
|
//发生异常后直接返回,不进行合并
|
|
//发生异常后直接返回,不进行合并
|