Commit c2b7c6d0 authored by 赵啸非's avatar 赵啸非

优化窗口业务查询

parent d2fb943d
package com.mortals.xhx.common.utils; package com.mortals.xhx.common.utils;
import cn.hutool.core.util.ReUtil;
import cn.hutool.http.HttpUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.mortals.xhx.common.code.FiletypeEnum; import com.mortals.xhx.common.code.FiletypeEnum;
import com.mortals.xhx.common.code.SourceEnum; import com.mortals.xhx.common.code.SourceEnum;
import com.mortals.xhx.module.matter.model.MatterDatumFileEntity; import com.mortals.xhx.module.matter.model.MatterDatumFileEntity;
...@@ -146,7 +149,23 @@ public class MatterDetailHtmlParseUtil { ...@@ -146,7 +149,23 @@ public class MatterDetailHtmlParseUtil {
fileEntity.setSource(SourceEnum.政务网.getValue()); fileEntity.setSource(SourceEnum.政务网.getValue());
fileEntity.setFiletype(FiletypeEnum.空白表格.getValue()); fileEntity.setFiletype(FiletypeEnum.空白表格.getValue());
fileEntity.setFileName(prenode.text().trim()); fileEntity.setFileName(prenode.text().trim());
fileEntity.setFileUrl(node.firstChild().attr("href").trim());
String onclickStr = node.firstChild().attr("onclick").trim();
List<String> allGroup = ReUtil.findAllGroup1("'(.*?)'", onclickStr);
if (!ObjectUtils.isEmpty(allGroup)) {
String encryUrl = "http://www.sczwfw.gov.cn/jiq/interface/item/annex/encryptUrl?id=" + allGroup.get(0);
String resp = HttpUtil.get(encryUrl);
JSONObject obj = JSON.parseObject(resp);
String code = obj.getString("code");
String data = obj.getString("data");
if ("0".equals(code)) {
fileEntity.setFileUrl(data);
}
}
// fileEntity.setFileUrl(node.firstChild().attr("href").trim());
datumFileEntities.add(fileEntity); datumFileEntities.add(fileEntity);
} }
} }
...@@ -168,7 +187,22 @@ public class MatterDetailHtmlParseUtil { ...@@ -168,7 +187,22 @@ public class MatterDetailHtmlParseUtil {
fileEntity.setSource(SourceEnum.政务网.getValue()); fileEntity.setSource(SourceEnum.政务网.getValue());
fileEntity.setFiletype(FiletypeEnum.示例样表.getValue()); fileEntity.setFiletype(FiletypeEnum.示例样表.getValue());
fileEntity.setFileName(prenode.text().trim()); fileEntity.setFileName(prenode.text().trim());
fileEntity.setFileUrl(node.firstChild().attr("href").trim());
String onclickStr = node.firstChild().attr("onclick").trim();
List<String> allGroup = ReUtil.findAllGroup1("'(.*?)'", onclickStr);
if (!ObjectUtils.isEmpty(allGroup)) {
String encryUrl = "http://www.sczwfw.gov.cn/jiq/interface/item/annex/encryptUrl?id=" + allGroup.get(0);
String resp = HttpUtil.get(encryUrl);
JSONObject obj = JSON.parseObject(resp);
String code = obj.getString("code");
String data = obj.getString("data");
if ("0".equals(code)) {
fileEntity.setFileUrl(data);
}
}
// fileEntity.setFileUrl(node.firstChild().attr("href").trim());
datumSampleFileEntities.add(fileEntity); datumSampleFileEntities.add(fileEntity);
} }
map.put("sampleList", datumSampleFileEntities); map.put("sampleList", datumSampleFileEntities);
...@@ -478,6 +512,7 @@ public class MatterDetailHtmlParseUtil { ...@@ -478,6 +512,7 @@ public class MatterDetailHtmlParseUtil {
}); });
List<Map<String, Object>> mapList = MatterDetailHtmlParseUtil.getsqclInfoMapByHtml(dom); List<Map<String, Object>> mapList = MatterDetailHtmlParseUtil.getsqclInfoMapByHtml(dom);
System.out.println("==============材料==============");
System.out.println(JSON.toJSONString(mapList)); System.out.println(JSON.toJSONString(mapList));
Map<String, String> sltjMapByHtml = MatterDetailHtmlParseUtil.getSltjMapByHtml(dom); Map<String, String> sltjMapByHtml = MatterDetailHtmlParseUtil.getSltjMapByHtml(dom);
......
...@@ -247,7 +247,7 @@ public class MatterHtmlParseUtil { ...@@ -247,7 +247,7 @@ public class MatterHtmlParseUtil {
params.put("taskType", ""); params.put("taskType", "");
Rest<List<MatterEntity>> rest = MatterHtmlParseUtil.getMatterList(params, url); Rest<List<MatterEntity>> rest = MatterHtmlParseUtil.getMatterList(params, url);
System.out.println(rest.getData().size());*/ System.out.println(rest.getData().size());
/* HashMap<String, String> params = new HashMap<>(); /* HashMap<String, String> params = new HashMap<>();
......
...@@ -102,8 +102,8 @@ project_ui_deploy() { ...@@ -102,8 +102,8 @@ project_ui_deploy() {
main() { main() {
echo "后台服务部署" echo "后台服务部署"
project_deploy project_deploy
echo "前端服务部署" #echo "前端服务部署"
project_ui_deploy #project_ui_deploy
exit ${RETVAL} exit ${RETVAL}
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment