|
@@ -4815,6 +4815,11 @@ public class ExcelTabController extends BladeController {
|
|
|
for (Map.Entry<Long, List<WbsTreeContract>> entry : map.entrySet()) {
|
|
|
Long pId = entry.getKey();
|
|
|
WbsTreeContract parent = wbsTreeContractMapper.selectOne(new LambdaQueryWrapper<>(WbsTreeContract.class).eq(WbsTreeContract::getPKeyId, pId));
|
|
|
+ if(parent==null){
|
|
|
+ i--;
|
|
|
+ System.out.println("剩余:"+i+"个节点未检查");
|
|
|
+ continue;
|
|
|
+ }
|
|
|
String informationSql="select * from u_information_query where wbs_id="+parent.getPKeyId()+" and contract_id="+contractId+" and is_deleted=0";
|
|
|
List<InformationQuery> query = jdbcTemplate.query(informationSql, new BeanPropertyRowMapper<>(InformationQuery.class));
|
|
|
if(query.isEmpty()||query.get(0).getStatus()!=0){
|
|
@@ -4826,22 +4831,26 @@ public class ExcelTabController extends BladeController {
|
|
|
for (WbsTreeContract contract : wbsTreeContractList) {
|
|
|
Map<String, Object> dataInfo = excelTabService.getBussDataInfo(contract.getPKeyId(), 0, true);
|
|
|
if(dataInfo!=null){
|
|
|
- InputStream inputStreamByUrl = FileUtils.getInputStreamByUrl(contract.getHtmlUrl());
|
|
|
- String htmlString = IoUtil.readToString(inputStreamByUrl);
|
|
|
- Document doc = Jsoup.parse(htmlString);
|
|
|
- Elements dateElements = doc.select("el-date-picker");
|
|
|
- if(!dateElements.isEmpty()){
|
|
|
- Boolean dateFlag=true;
|
|
|
- for (Element element : dateElements) {
|
|
|
- String keyname = element.attr("keyname");
|
|
|
- if(!dataInfo.containsKey(keyname)||(StringUtils.isEmpty(dataInfo.get(keyname).toString()))){
|
|
|
- dateFlag=false;
|
|
|
- break;
|
|
|
+ try {
|
|
|
+ InputStream inputStreamByUrl = FileUtils.getInputStreamByUrl(contract.getHtmlUrl());
|
|
|
+ String htmlString = IoUtil.readToString(inputStreamByUrl);
|
|
|
+ Document doc = Jsoup.parse(htmlString);
|
|
|
+ Elements dateElements = doc.select("el-date-picker");
|
|
|
+ if(!dateElements.isEmpty()){
|
|
|
+ Boolean dateFlag=true;
|
|
|
+ for (Element element : dateElements) {
|
|
|
+ String keyname = element.attr("keyname");
|
|
|
+ if(!dataInfo.containsKey(keyname)||(StringUtils.isEmpty(dataInfo.get(keyname).toString()))){
|
|
|
+ dateFlag=false;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(!dateFlag){
|
|
|
+ wbsTreeContractMapper.update(null,new LambdaUpdateWrapper<WbsTreeContract>().eq(WbsTreeContract::getPKeyId,contract.getPKeyId()).set(WbsTreeContract::getDateIsComplete,2));
|
|
|
}
|
|
|
}
|
|
|
- if(!dateFlag){
|
|
|
- wbsTreeContractMapper.update(null,new LambdaUpdateWrapper<WbsTreeContract>().eq(WbsTreeContract::getPKeyId,contract.getPKeyId()).set(WbsTreeContract::getDateIsComplete,2));
|
|
|
- }
|
|
|
+ }catch (Exception e){
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
}
|