|
|
@@ -88,7 +88,6 @@ public class ExcelTabClientImpl implements ExcelTabClient {
|
|
|
|
|
|
//应用抽取的数据
|
|
|
dataArray = excelTabService.addLoadDataInfo(dataArray);
|
|
|
- dataArray = putIfAbsent(dataArray);
|
|
|
List<TableInfo> tableInfoList = this.excelTabService.getTableInfoListTrial(dataArray, tabIds);
|
|
|
for (TableInfo tableInfo : tableInfoList) {
|
|
|
tableInfo.setTestGroupId(dto.getId()+"");
|
|
|
@@ -886,50 +885,7 @@ public class ExcelTabClientImpl implements ExcelTabClient {
|
|
|
return R.data(resultMapList);
|
|
|
}
|
|
|
|
|
|
- private JSONArray putIfAbsent(JSONArray jsonArray) {
|
|
|
- JSONArray json2 = new JSONArray();
|
|
|
- for (int i = 0; i < jsonArray.size(); i++) {
|
|
|
- JSONObject jsonObject = jsonArray.getJSONObject(i);
|
|
|
- json2.add(jsonObject);
|
|
|
- String pkeyId = jsonObject.getString("pkeyId");
|
|
|
- WbsTreePrivate wbsTreePrivate = this.wbsTreePrivateService.getOne(Wrappers.<WbsTreePrivate>lambdaQuery().eq(WbsTreePrivate::getPKeyId, pkeyId));
|
|
|
- if(wbsTreePrivate == null || StringUtil.isBlank(wbsTreePrivate.getHtmlUrl())) {
|
|
|
- continue;
|
|
|
- }
|
|
|
- if (!StringUtil.hasText(wbsTreePrivate.getInitTableId()) && !StringUtil.hasText(wbsTreePrivate.getInitTableName())) {
|
|
|
- continue;
|
|
|
- }
|
|
|
- List<WbsFormElement> wbsFormElements;
|
|
|
- if (StringUtil.hasText(wbsTreePrivate.getInitTableId())) {
|
|
|
- wbsFormElements = jdbcTemplate.query("SELECT e_key from m_wbs_form_element WHERE is_deleted = 0 and e_type = 6 and f_id = " + wbsTreePrivate.getInitTableId(), new BeanPropertyRowMapper<>(WbsFormElement.class) );
|
|
|
- } else {
|
|
|
- wbsFormElements = jdbcTemplate.query("SELECT e_key from m_wbs_form_element WHERE e_type = 6 and f_id = (SELECT id from m_table_info WHERE tab_en_name = ' " + wbsTreePrivate.getInitTableName()
|
|
|
- + "' and is_deleted = 0 limit 1) and is_deleted = 0" + wbsTreePrivate.getInitTableName(), new BeanPropertyRowMapper<>(WbsFormElement.class) );
|
|
|
- }
|
|
|
- Map<String, String> map = wbsFormElements.stream().collect(Collectors.toMap(WbsFormElement::getEKey, WbsFormElement::getEKey));
|
|
|
- String htmlString = null;
|
|
|
- try {
|
|
|
- htmlString = IoUtil.readToString(FileUtils.getInputStreamByUrl(wbsTreePrivate.getHtmlUrl()));
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- Document doc = Jsoup.parse(htmlString);
|
|
|
- for (Element element : doc.getElementsByAttributeValueStarting("id", "key_")) {
|
|
|
- String id = element.attr("id");
|
|
|
- if(id == null || id.startsWith("key__")) {
|
|
|
- continue;
|
|
|
- }
|
|
|
- if (map.containsKey(id.split("__")[0])) {
|
|
|
- continue;
|
|
|
- }
|
|
|
- String text = jsonObject.getString(id);
|
|
|
- if (text == null || text.trim().isEmpty()) {
|
|
|
- jsonObject.put(id, "/");
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- return json2;
|
|
|
- }
|
|
|
+
|
|
|
@Override
|
|
|
public R synPdfKeyInfo(String contractId, String nodeIds, String classify, String projectId, String authorization) throws Exception {
|
|
|
|