|
@@ -0,0 +1,641 @@
|
|
|
|
|
+package space.anyi;
|
|
|
|
|
+
|
|
|
|
|
+import org.apache.http.HttpEntity;
|
|
|
|
|
+import org.apache.http.NameValuePair;
|
|
|
|
|
+import org.apache.http.client.config.RequestConfig;
|
|
|
|
|
+import org.apache.http.client.entity.UrlEncodedFormEntity;
|
|
|
|
|
+import org.apache.http.client.methods.CloseableHttpResponse;
|
|
|
|
|
+import org.apache.http.client.methods.HttpGet;
|
|
|
|
|
+import org.apache.http.client.methods.HttpPost;
|
|
|
|
|
+import org.apache.http.entity.ContentType;
|
|
|
|
|
+import org.apache.http.entity.StringEntity;
|
|
|
|
|
+import org.apache.http.impl.client.CloseableHttpClient;
|
|
|
|
|
+import org.apache.http.impl.client.HttpClients;
|
|
|
|
|
+import org.apache.http.message.BasicNameValuePair;
|
|
|
|
|
+import org.apache.http.util.EntityUtils;
|
|
|
|
|
+import org.json.JSONArray;
|
|
|
|
|
+import org.json.JSONObject;
|
|
|
|
|
+import org.jsoup.parser.Parser;
|
|
|
|
|
+
|
|
|
|
|
+import java.sql.Connection;
|
|
|
|
|
+import java.sql.Date;
|
|
|
|
|
+import java.sql.PreparedStatement;
|
|
|
|
|
+import java.sql.ResultSet;
|
|
|
|
|
+import java.time.Instant;
|
|
|
|
|
+import java.time.LocalDate;
|
|
|
|
|
+import java.time.LocalDateTime;
|
|
|
|
|
+import java.time.ZoneId;
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
|
|
+import java.util.List;
|
|
|
|
|
+import java.util.Objects;
|
|
|
|
|
+import java.util.regex.Matcher;
|
|
|
|
|
+import java.util.regex.Pattern;
|
|
|
|
|
+
|
|
|
|
|
+public class Application8 {
|
|
|
|
|
+ static String indexUrl = "https://www.ymzec.com/bid-api/api/truelore-business-support/noauth/trans/trade/pageEs";
|
|
|
|
|
+ static String detailUrl = "https://www.ymzec.com/bid-api/api/truelore-business-support/noauth/trans/trade/getByTradeId?id=%s¬iceType=%d";
|
|
|
|
|
+ static String detailHtmlUrl = "https://www.ymzec.com/bid/web-outportal/index.html#/trade-info-detail?id=%s¬iceType=%d";
|
|
|
|
|
+ static String baseUrl = "https://www.ymzec.com";
|
|
|
|
|
+ public static Pattern pattern = Pattern.compile("(\\d{4})(年|/|-|\\.)(\\d{1,2})(月|/|-|\\.)(\\d{1,2})");
|
|
|
|
|
+
|
|
|
|
|
+ public static void main(String[] args) throws Exception {
|
|
|
|
|
+ getList();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ static int total = 1;
|
|
|
|
|
+ static int index = 1;
|
|
|
|
|
+ static int pageSize = 10;
|
|
|
|
|
+ static int count = 0;
|
|
|
|
|
+ public static void getList() throws Exception {
|
|
|
|
|
+ while (true){
|
|
|
|
|
+ //列表url构建
|
|
|
|
|
+ String listUrl = indexUrl;
|
|
|
|
|
+ System.out.println(listUrl);
|
|
|
|
|
+ //采集列表页
|
|
|
|
|
+ String res = doPost(indexUrl);
|
|
|
|
|
+ //采集总页数
|
|
|
|
|
+ JSONObject response = new JSONObject(res).getJSONObject("data");
|
|
|
|
|
+ total = response.getInt("totalCount");
|
|
|
|
|
+
|
|
|
|
|
+ JSONArray items = response.getJSONArray("list");
|
|
|
|
|
+ for (int i = 0; i < items.length(); i++) {
|
|
|
|
|
+ count++;
|
|
|
|
|
+ JSONObject item = items.getJSONObject(i);
|
|
|
|
|
+
|
|
|
|
|
+ String id = item.get("id").toString();
|
|
|
|
|
+ //标的名称
|
|
|
|
|
+ String businessName = item.get("businessName").toString();
|
|
|
|
|
+ int noticeType = item.getInt("noticeType");
|
|
|
|
|
+ LocalDateTime releaseTime = Instant.ofEpochMilli(Long.parseLong(item.get("releaseTime").toString())).atZone(ZoneId.systemDefault()).toLocalDateTime();
|
|
|
|
|
+
|
|
|
|
|
+ String link = String.format(detailUrl, id,noticeType);
|
|
|
|
|
+ System.out.println(businessName);
|
|
|
|
|
+ System.out.println(link);
|
|
|
|
|
+ //数据库是否已存在
|
|
|
|
|
+ String querySql = "select DETAIL_LINK from XIN_XI_INFO_TEST where DETAIL_LINK = ?";
|
|
|
|
|
+ try(Connection connection = MyDao.getConnection();
|
|
|
|
|
+ PreparedStatement prepareStatement = connection.prepareStatement(querySql);){
|
|
|
|
|
+ prepareStatement.setString(1,link);
|
|
|
|
|
+ ResultSet resultSet = prepareStatement.executeQuery();
|
|
|
|
|
+ if (resultSet.next()) {
|
|
|
|
|
+ System.out.println("跳过" + link);
|
|
|
|
|
+ resultSet.close();
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
|
|
+ resultSet.close();
|
|
|
|
|
+ }
|
|
|
|
|
+ //详情
|
|
|
|
|
+ String detailResStr = doGet(link);
|
|
|
|
|
+ JSONObject detailResponse = new JSONObject(detailResStr).getJSONObject("data");
|
|
|
|
|
+ JSONObject detail = new JSONObject();
|
|
|
|
|
+ StringBuilder template = new StringBuilder();
|
|
|
|
|
+ String detailBusinessName = "";
|
|
|
|
|
+ switch (noticeType){
|
|
|
|
|
+ case 1:
|
|
|
|
|
+ detail = detailResponse.getJSONObject("biddingNotice");
|
|
|
|
|
+ detailBusinessName = detail.get("businessName").toString();
|
|
|
|
|
+ template = new StringBuilder("<div data-v-133901b8=\"\" class=\"template-container customize\">\n" +
|
|
|
|
|
+ "\t<div data-v-133901b8=\"\" class=\"title-container\">\n" +
|
|
|
|
|
+ "\t\t<div data-v-133901b8=\"\">\n" +
|
|
|
|
|
+ "\t\t\t<div data-v-133901b8=\"\" class=\"title-container-top\">\n" +
|
|
|
|
|
+ "\t\t\t\t<p data-v-133901b8=\"\" class=\"detail-title\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t<span data-v-133901b8=\"\" class=\"el-tooltip\" aria-describedby=\"el-tooltip-8937\" tabindex=\"0\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t"+ detailBusinessName +"\n" +
|
|
|
|
|
+ "\t\t\t\t\t</span>\n" +
|
|
|
|
|
+ "\t\t\t\t</p>\n" +
|
|
|
|
|
+ "\t\t\t</div>\n" +
|
|
|
|
|
+ "\t\t\t<div data-v-133901b8=\"\" class=\"title-container-middle\">\n" +
|
|
|
|
|
+ "\t\t\t\t<span data-v-133901b8=\"\" class=\"el-tag el-tag--small el-tag--light\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t采购方式:"+detail.get("purchaseModeName").toString()+"\n" +
|
|
|
|
|
+ "\t\t\t\t</span>\n" +
|
|
|
|
|
+ "\t\t\t\t<span data-v-133901b8=\"\" class=\"el-tag el-tag--warning el-tag--small el-tag--light\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t项目类型:"+detail.get("purchaseProjectTypeName").toString()+"\n" +
|
|
|
|
|
+ "\t\t\t\t</span>\n" +
|
|
|
|
|
+ "\t\t\t</div>\n" +
|
|
|
|
|
+ "\t\t\t<div data-v-133901b8=\"\" class=\"title-container-bottom\">\n" +
|
|
|
|
|
+ "\t\t\t\t<div data-v-133901b8=\"\" class=\"el-row\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t<div data-v-133901b8=\"\" class=\"el-col el-col-12\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t<p data-v-133901b8=\"\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t发布时间:\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t</p>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t<p data-v-133901b8=\"\" class=\"content\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t"+ releaseTime +"\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t</p>\n" +
|
|
|
|
|
+ "\t\t\t\t\t</div>\n" +
|
|
|
|
|
+ "\t\t\t\t</div>\n" +
|
|
|
|
|
+ "\t\t\t\t<div data-v-133901b8=\"\" class=\"customize-bid-item customize-bid-item-more\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t<div data-v-133901b8=\"\" class=\"content-title\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t<div data-v-133901b8=\"\" class=\"content-title-left\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t<p data-v-133901b8=\"\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t"+detail.get("purchaseProjectName")+"\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t</p>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t<span data-v-133901b8=\"\" class=\"bid-tab-ketou\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t可投\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t</span>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t</div>\n" +
|
|
|
|
|
+ "\t\t\t\t\t</div>\n" +
|
|
|
|
|
+ "\t\t\t\t\t<div data-v-133901b8=\"\" class=\"content-title\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t<div data-v-133901b8=\"\" class=\"content-title-left\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t<p data-v-133901b8=\"\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t标段编号:"+detail.get("bidSectionCode")+"\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t</p>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t</div>\n" +
|
|
|
|
|
+ "\t\t\t\t\t</div>\n" +
|
|
|
|
|
+ "\t\t\t\t</div>\n" +
|
|
|
|
|
+ "\t\t\t\t<!---->\n" +
|
|
|
|
|
+ "\t\t\t</div>\n" +
|
|
|
|
|
+ "\t\t</div>\n" +
|
|
|
|
|
+ "\t</div>\n" +
|
|
|
|
|
+ "\t<div data-v-133901b8=\"\" class=\"content-container content-margin\">\n" +
|
|
|
|
|
+ "\t\t<!---->\n" +
|
|
|
|
|
+ "\t\t<div data-v-133901b8=\"\" class=\"content-part\">\n" +
|
|
|
|
|
+ "\t\t\t<iframe data-v-133901b8=\"\" id=\"pdfIframe\" src=\""+ detail.get("htmlFileUrl")+"\" allowfullscreen=\"allowfullscreen\" frameborder=\"0\" style=\"margin-top: 20px; width: 100%; height: 500px;\">\n" +
|
|
|
|
|
+ "\t\t\t</iframe>\n" +
|
|
|
|
|
+ "\t\t</div>\n" +
|
|
|
|
|
+ "\t</div>\n");
|
|
|
|
|
+
|
|
|
|
|
+ break;
|
|
|
|
|
+ case 2:
|
|
|
|
|
+ detail = detailResponse.getJSONObject("biddingChangeNotice");
|
|
|
|
|
+ detailBusinessName = detail.get("businessName").toString();
|
|
|
|
|
+ JSONObject changeContent = detail.getJSONObject("changeContent");
|
|
|
|
|
+ template = new StringBuilder("<div data-v-7fb3b652=\"\" class=\"template-container customize\">\n" +
|
|
|
|
|
+ "\t<div data-v-7fb3b652=\"\" class=\"title-container\">\n" +
|
|
|
|
|
+ "\t\t<div data-v-7fb3b652=\"\" class=\"title-container-top\">\n" +
|
|
|
|
|
+ "\t\t\t<p data-v-7fb3b652=\"\" class=\"detail-title\">\n" +
|
|
|
|
|
+ "\t\t\t\t<span data-v-7fb3b652=\"\" class=\"el-tooltip\" aria-describedby=\"el-tooltip-7898\" tabindex=\"0\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t"+detailBusinessName+"\n" +
|
|
|
|
|
+ "\t\t\t\t</span>\n" +
|
|
|
|
|
+ "\t\t\t</p>\n" +
|
|
|
|
|
+ "\t\t</div>\n" +
|
|
|
|
|
+ "\t\t<div data-v-7fb3b652=\"\" class=\"title-container-middle\">\n" +
|
|
|
|
|
+ "\t\t\t<span data-v-7fb3b652=\"\" class=\"el-tag el-tag--small el-tag--light\">\n" +
|
|
|
|
|
+ "\t\t\t\t采购方式:"+detail.get("purchaseModeName")+"\n" +
|
|
|
|
|
+ "\t\t\t</span>\n" +
|
|
|
|
|
+ "\t\t\t<span data-v-7fb3b652=\"\" class=\"el-tag el-tag--warning el-tag--small el-tag--light\">\n" +
|
|
|
|
|
+ "\t\t\t\t项目类型:"+detail.get("purchaseProjectTypeName")+"\n" +
|
|
|
|
|
+ "\t\t\t</span>\n" +
|
|
|
|
|
+ "\t\t</div>\n" +
|
|
|
|
|
+ "\t\t<div data-v-7fb3b652=\"\" class=\"title-container-bottom\">\n" +
|
|
|
|
|
+ "\t\t\t<div data-v-7fb3b652=\"\" class=\"el-row\">\n" +
|
|
|
|
|
+ "\t\t\t\t<div data-v-7fb3b652=\"\" class=\"el-col el-col-12\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t<p data-v-7fb3b652=\"\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t发布时间:\n" +
|
|
|
|
|
+ "\t\t\t\t\t</p>\n" +
|
|
|
|
|
+ "\t\t\t\t\t<p data-v-7fb3b652=\"\" class=\"content\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t"+releaseTime+"\n" +
|
|
|
|
|
+ "\t\t\t\t\t</p>\n" +
|
|
|
|
|
+ "\t\t\t\t</div>\n" +
|
|
|
|
|
+ "\t\t\t</div>\n" +
|
|
|
|
|
+ "\t\t\t<div data-v-7fb3b652=\"\" class=\"customize-bid-item customize-bid-item-more\">\n" +
|
|
|
|
|
+ "\t\t\t\t<div data-v-7fb3b652=\"\" class=\"content-title\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t"+detail.get("purchaseProjectName")+"\n" +
|
|
|
|
|
+ "\t\t\t\t\t<span data-v-7fb3b652=\"\" class=\"code-name\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t"+detail.get("bidSectionCode")+"\n" +
|
|
|
|
|
+ "\t\t\t\t\t</span>\n" +
|
|
|
|
|
+ "\t\t\t\t</div>\n" +
|
|
|
|
|
+ "\t\t\t\t<div data-v-7fb3b652=\"\" class=\"item-container\" style=\"margin-top: 16px;\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t<p data-v-7fb3b652=\"\" class=\"content-title\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t标段最新时间\n" +
|
|
|
|
|
+ "\t\t\t\t\t</p>\n" +
|
|
|
|
|
+ "\t\t\t\t\t<div data-v-7fb3b652=\"\" class=\"content-part\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t<div data-v-7fb3b652=\"\" class=\"el-row\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t<div data-v-7fb3b652=\"\" class=\"el-col el-col-12\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t<p data-v-7fb3b652=\"\" class=\"name\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t\t标段/包名称:\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t</p>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t<p data-v-7fb3b652=\"\" class=\"content\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t\t"+ changeContent.get("bidSectionName")+"\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t</p>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t</div>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t<div data-v-7fb3b652=\"\" class=\"el-col el-col-12\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t<p data-v-7fb3b652=\"\" class=\"name\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t\t标段/包编号:\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t</p>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t<p data-v-7fb3b652=\"\" class=\"content\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t\t"+changeContent.get("bidSectionCode")+"\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t</p>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t</div>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t</div>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t<div data-v-7fb3b652=\"\" class=\"el-row\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t<div data-v-7fb3b652=\"\" class=\"el-col el-col-12\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t<p data-v-7fb3b652=\"\" class=\"name\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t\t文件获取开始时间:\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t</p>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t<p data-v-7fb3b652=\"\" class=\"content\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t\t--\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t</p>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t</div>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t<div data-v-7fb3b652=\"\" class=\"el-col el-col-12\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t<p data-v-7fb3b652=\"\" class=\"name\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t\t文件获取截止时间:\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t</p>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t<p data-v-7fb3b652=\"\" class=\"content\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t\t"+Instant.ofEpochMilli(Long.parseLong(changeContent.get("tenderDocGetEndTime").toString())).atZone(ZoneId.systemDefault()).toLocalDateTime()+"\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t</p>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t</div>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t</div>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t<div data-v-7fb3b652=\"\" class=\"el-row\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t<div data-v-7fb3b652=\"\" class=\"el-col el-col-12\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t<p data-v-7fb3b652=\"\" class=\"name\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t\t供应商提问截止时间:\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t</p>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t<p data-v-7fb3b652=\"\" class=\"content\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t\t--\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t</p>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t</div>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t<div data-v-7fb3b652=\"\" class=\"el-col el-col-12\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t<p data-v-7fb3b652=\"\" class=\"name\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t\t截标/开标时间:\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t</p>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t<p data-v-7fb3b652=\"\" class=\"content\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t\t"+Instant.ofEpochMilli(Long.parseLong(changeContent.get("bidEndTime").toString())).atZone(ZoneId.systemDefault()).toLocalDateTime()+"\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t</p>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t</div>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t</div>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t<div data-v-7fb3b652=\"\" class=\"el-row\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t<div data-v-7fb3b652=\"\" class=\"el-col el-col-12\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t<p data-v-7fb3b652=\"\" class=\"name\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t\t报名开始时间:\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t</p>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t<p data-v-7fb3b652=\"\" class=\"content\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t\t--\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t</p>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t</div>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t<div data-v-7fb3b652=\"\" class=\"el-col el-col-12\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t<p data-v-7fb3b652=\"\" class=\"name\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t\t报名截止时间:\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t</p>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t<p data-v-7fb3b652=\"\" class=\"content\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t\t--\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t</p>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t</div>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t</div>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t<div data-v-7fb3b652=\"\" class=\"el-row\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t<div data-v-7fb3b652=\"\" class=\"el-col el-col-12\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t<p data-v-7fb3b652=\"\" class=\"name\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t\t文件递交截止时间:\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t</p>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t<p data-v-7fb3b652=\"\" class=\"content\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t\t"+Instant.ofEpochMilli(Long.parseLong(changeContent.get("tenderDocSubmitEndTime").toString())).atZone(ZoneId.systemDefault()).toLocalDateTime()+"\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t</p>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t</div>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t<div data-v-7fb3b652=\"\" class=\"el-col el-col-12\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t<p data-v-7fb3b652=\"\" class=\"name\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t\t异议提出截止时间:\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t</p>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t<p data-v-7fb3b652=\"\" class=\"content\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t\t"+Instant.ofEpochMilli(Long.parseLong(changeContent.get("dissentEndTime").toString())).atZone(ZoneId.systemDefault()).toLocalDateTime()+"\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t</p>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t</div>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t</div>\n" +
|
|
|
|
|
+ "\t\t\t\t\t</div>\n" +
|
|
|
|
|
+ "\t\t\t\t</div>\n" +
|
|
|
|
|
+ "\t\t\t</div>\n" +
|
|
|
|
|
+ "\t\t</div>\n" +
|
|
|
|
|
+ "\t\t<!---->\n" +
|
|
|
|
|
+ "\t</div>\n" +
|
|
|
|
|
+ "\t<div data-v-7fb3b652=\"\" class=\"content-container\">\n" +
|
|
|
|
|
+ "\t\t<!---->\n" +
|
|
|
|
|
+ "\t\t<div data-v-7fb3b652=\"\" class=\"content-part\">\n" +
|
|
|
|
|
+ "\t\t\t<iframe data-v-7fb3b652=\"\" id=\"pdfIframe\" src=\"https%3A%2F%2Fwww.ymzec.com%2Fbid-api%2Foss-ymz-prd-bc-bidbase%2F1252684541891436545%2F2%2F2026%2F10%2F21%2F1562396160526450688%2F1562396160534839297%2F%25E9%2594%25A6%25E5%25B7%259E%25E7%259F%25B3%25E5%258C%2596%25E5%2588%2586%25E5%2585%25AC%25E5%258F%25B82026%25E8%2587%25B32027%25E5%25B9%25B4%25E5%25BA%25A6%25E6%25B5%25B7%25E4%25B8%258A%25E5%258E%259F%25E6%25B2%25B9%25E8%25BF%2590%25E8%25BE%2593%25E6%259C%258D%25E5%258A%25A1%25E6%25A1%2586%25E6%259E%25B61.0.3.20261021%25E5%2585%25AC%25E5%2591%258A%2528%25E9%2582%2580%25E8%25AF%25B7%25E5%2587%25BD%2529.pdf%3Fresponse-content-disposition%3Dattachment%253Bfilename%253D%2525E9%252594%2525A6%2525E5%2525B7%25259E%2525E7%25259F%2525B3%2525E5%25258C%252596%2525E5%252588%252586%2525E5%252585%2525AC%2525E5%25258F%2525B82026%2525E8%252587%2525B32027%2525E5%2525B9%2525B4%2525E5%2525BA%2525A6%2525E6%2525B5%2525B7%2525E4%2525B8%25258A%2525E5%25258E%25259F%2525E6%2525B2%2525B9%2525E8%2525BF%252590%2525E8%2525BE%252593%2525E6%25259C%25258D%2525E5%25258A%2525A1%2525E6%2525A1%252586%2525E6%25259E%2525B61.0.3.20261021%2525E5%252585%2525AC%2525E5%252591%25258A%252528%2525E9%252582%252580%2525E8%2525AF%2525B7%2525E5%252587%2525BD%252529.pdf%26X-Amz-Algorithm%3DAWS4-HMAC-SHA256%26X-Amz-Date%3D20261022T054514Z%26X-Amz-SignedHeaders%3Dhost%26X-Amz-Expires%3D1800%26X-Amz-Credential%3D6w2sulE5ALA2bxEW%252F20261022%252Fcn-north-1%252Fs3%252Faws4_request%26X-Amz-Signature%3D85f7a798fefcf32c334fbc0877944651314bfa5c908aabecf2e86715d58a841c\" allowfullscreen=\"allowfullscreen\" frameborder=\"0\" style=\"margin-top: 20px; width: 100%; height: 500px;\">\n" +
|
|
|
|
|
+ "\t\t\t</iframe>\n" +
|
|
|
|
|
+ "\t\t</div>\n" +
|
|
|
|
|
+ "\t</div>\n" +
|
|
|
|
|
+ "</div>");
|
|
|
|
|
+
|
|
|
|
|
+ break;
|
|
|
|
|
+ case 3:
|
|
|
|
|
+ detail = detailResponse.getJSONObject("bidCandidateAnnounces");
|
|
|
|
|
+ detailBusinessName = detail.get("businessName").toString();
|
|
|
|
|
+ template = new StringBuilder("<div data-v-b4fad760=\"\">\n" +
|
|
|
|
|
+ "\t<div data-v-b4fad760=\"\" class=\"title-container\">\n" +
|
|
|
|
|
+ "\t\t<div data-v-b4fad760=\"\" class=\"title-container-middle\">\n" +
|
|
|
|
|
+ "\t\t\t<span data-v-b4fad760=\"\" class=\"el-tag el-tag--small el-tag--light\">\n" +
|
|
|
|
|
+ "\t\t\t\t采购方式:公开招标\n" +
|
|
|
|
|
+ "\t\t\t</span>\n" +
|
|
|
|
|
+ "\t\t\t<span data-v-b4fad760=\"\" class=\"el-tag el-tag--warning el-tag--small el-tag--light\">\n" +
|
|
|
|
|
+ "\t\t\t\t项目类型:服务类\n" +
|
|
|
|
|
+ "\t\t\t</span>\n" +
|
|
|
|
|
+ "\t\t</div>\n" +
|
|
|
|
|
+ "\t\t<div data-v-b4fad760=\"\" class=\"title-container-bottom\">\n" +
|
|
|
|
|
+ "\t\t\t<div data-v-1b67d0d5=\"\" data-v-b4fad760=\"\">\n" +
|
|
|
|
|
+ "\t\t\t\t<form data-v-1b67d0d5=\"\" class=\"el-form dynamic-form el-form--label-left\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t<div data-v-6b4b44e0=\"\" data-v-1b67d0d5=\"\" class=\"dynamic-form-item\" data-key=\"noticeName\" style=\"width: 50%;\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t<div data-v-6b4b44e0=\"\" class=\"el-form-item formItemRef is-no-asterisk el-form-item--small\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t<label class=\"el-form-item__label\" style=\"width: 150px;\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t公示名称:\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t<!---->\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t</label>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t<div class=\"el-form-item__content\" style=\"margin-left: 150px;\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t<span data-v-6b4b44e0=\"\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t\t"+detailBusinessName+"\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t</span>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t<!---->\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t</div>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t</div>\n" +
|
|
|
|
|
+ "\t\t\t\t\t</div>\n" +
|
|
|
|
|
+ "\t\t\t\t\t<div data-v-6b4b44e0=\"\" data-v-1b67d0d5=\"\" class=\"dynamic-form-item\" data-key=\"industrySort\" style=\"width: 50%;\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t<div data-v-6b4b44e0=\"\" class=\"el-form-item formItemRef is-no-asterisk el-form-item--small\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t<label class=\"el-form-item__label\" style=\"width: 150px;\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t所属行业分类:\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t<!---->\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t</label>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t<div class=\"el-form-item__content\" style=\"margin-left: 150px;\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t<span data-v-6b4b44e0=\"\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t\t--\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t</span>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t<!---->\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t</div>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t</div>\n" +
|
|
|
|
|
+ "\t\t\t\t\t</div>\n" +
|
|
|
|
|
+ "\t\t\t\t\t<div data-v-6b4b44e0=\"\" data-v-1b67d0d5=\"\" class=\"dynamic-form-item\" data-key=\"startTime\" style=\"width: 50%;\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t<div data-v-6b4b44e0=\"\" class=\"el-form-item formItemRef is-no-asterisk el-form-item--small\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t<label class=\"el-form-item__label\" style=\"width: 150px;\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t公示开始时间:\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t<!---->\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t</label>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t<div class=\"el-form-item__content\" style=\"margin-left: 150px;\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t<span data-v-6b4b44e0=\"\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t\t"+Instant.ofEpochMilli(Long.parseLong(detail.get("startTime").toString())).atZone(ZoneId.systemDefault()).toLocalDateTime()+"\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t</span>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t<!---->\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t</div>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t</div>\n" +
|
|
|
|
|
+ "\t\t\t\t\t</div>\n" +
|
|
|
|
|
+ "\t\t\t\t\t<div data-v-6b4b44e0=\"\" data-v-1b67d0d5=\"\" class=\"dynamic-form-item\" data-key=\"endTime\" style=\"width: 50%;\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t<div data-v-6b4b44e0=\"\" class=\"el-form-item formItemRef is-no-asterisk el-form-item--small\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t<label class=\"el-form-item__label\" style=\"width: 150px;\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t公示结束时间:\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t<!---->\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t</label>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t<div class=\"el-form-item__content\" style=\"margin-left: 150px;\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t<span data-v-6b4b44e0=\"\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t\t"+Instant.ofEpochMilli(Long.parseLong(detail.get("endTime").toString())).atZone(ZoneId.systemDefault()).toLocalDateTime()+"\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t</span>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t<!---->\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t</div>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t</div>\n" +
|
|
|
|
|
+ "\t\t\t\t\t</div>\n" +
|
|
|
|
|
+ "\t\t\t\t\t<div data-v-6b4b44e0=\"\" data-v-1b67d0d5=\"\" class=\"dynamic-form-item\" data-key=\"bidEvaluationInfo\" style=\"width: 100%;\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t<div data-v-6b4b44e0=\"\" class=\"el-form-item formItemRef is-no-asterisk el-form-item--small\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t<label class=\"el-form-item__label\" style=\"width: 150px;\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t评标情况:\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t<!---->\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t</label>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t<div class=\"el-form-item__content\" style=\"margin-left: 150px;\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t<span data-v-6b4b44e0=\"\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t\t--\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t</span>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t<!---->\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t</div>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t</div>\n" +
|
|
|
|
|
+ "\t\t\t\t\t</div>\n" +
|
|
|
|
|
+ "\t\t\t\t\t<div data-v-6b4b44e0=\"\" data-v-1b67d0d5=\"\" class=\"dynamic-form-item\" data-key=\"remarks\" style=\"width: 50%;\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t<div data-v-6b4b44e0=\"\" class=\"el-form-item formItemRef is-no-asterisk el-form-item--small\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t<label class=\"el-form-item__label\" style=\"width: 150px;\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t备注:\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t<!---->\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t</label>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t<div class=\"el-form-item__content\" style=\"margin-left: 150px;\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t<span data-v-6b4b44e0=\"\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t\t--\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t</span>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t<!---->\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t</div>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t</div>\n" +
|
|
|
|
|
+ "\t\t\t\t\t</div>\n" +
|
|
|
|
|
+ "\t\t\t\t</form>\n" +
|
|
|
|
|
+ "\t\t\t</div>\n" +
|
|
|
|
|
+ "\t\t</div>\n" +
|
|
|
|
|
+ "\t</div>\n" +
|
|
|
|
|
+ "</div>");
|
|
|
|
|
+ //
|
|
|
|
|
+ template.append("<div data-v-b4fad760=\"\" style=\"font-size: 16px; font-weight: 700; margin-bottom: 10px;\">\n" +
|
|
|
|
|
+ "\t\t\t标段/包名称:"+businessName+"\n" +
|
|
|
|
|
+ "\t\t</div>\n" +
|
|
|
|
|
+ "\t\t<div data-v-b4fad760=\"\" style=\"font-size: 16px; font-weight: 700; margin-bottom: 10px;\">\n" +
|
|
|
|
|
+ "\t\t\t标段/包编号:"+detail.get("bidSectionCode")+"\n" +
|
|
|
|
|
+ "\t\t</div>");
|
|
|
|
|
+ //todo:标段/包信息
|
|
|
|
|
+ JSONArray bidInfoForPlatFormDTOList = detail.getJSONArray("bidInfoForPlatFormDTOList");
|
|
|
|
|
+ template.append("<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" class=\"el-table__header\" style=\"width: 1255px;\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t<thead class=\"has-gutter\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t<tr class=\"\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t<th colspan=\"1\" rowspan=\"1\" class=\"el-table_1_column_1 is-leaf el-table__cell\" style=\"background-color: rgb(243, 244, 247);\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t\t<div class=\"cell\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t\t\t项目类型\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t\t</div>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t</th>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t<th colspan=\"1\" rowspan=\"1\" class=\"el-table_1_column_2 is-leaf el-table__cell\" style=\"background-color: rgb(243, 244, 247);\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t\t<div class=\"cell\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t\t\t采购/招标方式\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t\t</div>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t</th>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t<th colspan=\"1\" rowspan=\"1\" class=\"el-table_1_column_3 is-leaf el-table__cell\" style=\"background-color: rgb(243, 244, 247);\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t\t<div class=\"cell\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t\t\t中标形式\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t\t</div>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t</th>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t<th colspan=\"1\" rowspan=\"1\" class=\"el-table_1_column_4 is-leaf el-table__cell\" style=\"background-color: rgb(243, 244, 247);\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t\t<div class=\"cell\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t\t\t评标时间\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t\t</div>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t</th>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t<th class=\"el-table__cell gutter\" style=\"width: 0px; display: none;\">\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t\t</th>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t\t</tr>\n" +
|
|
|
|
|
+ "\t\t\t\t\t\t</thead>\n" +
|
|
|
|
|
+ " <tbody>");
|
|
|
|
|
+// Objects.
|
|
|
|
|
+ //中标候选人
|
|
|
|
|
+ JSONArray candidates = detail.getJSONArray("candidates");
|
|
|
|
|
+ //非中标候选人评审情况
|
|
|
|
|
+ JSONArray notCandidates = detail.getJSONArray("notCandidates");
|
|
|
|
|
+ break;
|
|
|
|
|
+ default:
|
|
|
|
|
+ System.err.println(String.format("未处理的通知类型:%d", noticeType));
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
|
|
+ //附件
|
|
|
|
|
+ JSONArray announceFileDtoList = detail.getJSONArray("announceFileDtoList");
|
|
|
|
|
+ if (Objects.nonNull(announceFileDtoList)) {
|
|
|
|
|
+ template.append("公告附件:");
|
|
|
|
|
+ for (int j = 0; j < announceFileDtoList.length(); j++) {
|
|
|
|
|
+ JSONObject jsonObject = announceFileDtoList.getJSONObject(j);
|
|
|
|
|
+ template.append(String.format("<div>点击内容:<a href='%s'>%s</a></div>", jsonObject.get("downLoadUrl"),jsonObject.get("fileName")));
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ JSONArray remarksFileDtoList = detail.getJSONArray("remarksFileDtoList");
|
|
|
|
|
+ if (Objects.nonNull(remarksFileDtoList)) {
|
|
|
|
|
+ template.append("其他附件:");
|
|
|
|
|
+ for (int j = 0; j < remarksFileDtoList.length(); j++) {
|
|
|
|
|
+ JSONObject jsonObject = remarksFileDtoList.getJSONObject(j);
|
|
|
|
|
+ template.append(String.format("<div>点击内容:<a href='%s'>%s</a></div>", jsonObject.get("downLoadUrl"),jsonObject.get("fileName")));
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ //招标单位
|
|
|
|
|
+ template.append(String.format("招标人:%s-%s-%s", detail.get("tendererName").toString(),detail.get("contactPerson").toString(),detail.get("contactNumber").toString()));
|
|
|
|
|
+ //save
|
|
|
|
|
+ //字段:ID,SOURCE_NAME(网站名称),DETAIL_LINK(详情链接),DETAIL_TITLE(详情标题),DETAIL_CONTENT(正文HTML),PAGE_TIME(列表时间),CREATE_TIME(创建时间),LIST_TITLE(列表标题),CREATE_BY(创建者名称)
|
|
|
|
|
+ String SOURCE_NAME = "中国石油采购与招标网";
|
|
|
|
|
+ String DETAIL_LINK = String.format(detailHtmlUrl, id,noticeType);
|
|
|
|
|
+ String DETAIL_TITLE = detailBusinessName;
|
|
|
|
|
+ String DETAIL_CONTENT = template.toString();
|
|
|
|
|
+ LocalDate PAGE_TIME = releaseTime.toLocalDate();
|
|
|
|
|
+ LocalDate CREATE_TIME = LocalDate.now();
|
|
|
|
|
+ String LIST_TITLE = businessName;
|
|
|
|
|
+ String CREATE_BY = "黄略";
|
|
|
|
|
+
|
|
|
|
|
+ String sql = "insert into " + MyDao.TABLE_NAME +"(SOURCE_NAME,DETAIL_LINK,DETAIL_TITLE,DETAIL_CONTENT,PAGE_TIME,CREATE_TIME,LIST_TITLE,CREATE_BY) VALUES (?,?,?,?,?,?,?,?)";
|
|
|
|
|
+ try(Connection connection = MyDao.getConnection();
|
|
|
|
|
+ PreparedStatement preparedStatement = connection.prepareStatement(sql);){
|
|
|
|
|
+ preparedStatement.setString(1, SOURCE_NAME);
|
|
|
|
|
+ preparedStatement.setString(2, DETAIL_LINK);
|
|
|
|
|
+ preparedStatement.setString(3, DETAIL_TITLE);
|
|
|
|
|
+ preparedStatement.setString(4, DETAIL_CONTENT);
|
|
|
|
|
+ preparedStatement.setDate(5, Date.valueOf(PAGE_TIME)); // LocalDate -> java.sql.Date
|
|
|
|
|
+ preparedStatement.setDate(6, Date.valueOf(CREATE_TIME));
|
|
|
|
|
+ preparedStatement.setString(7, LIST_TITLE);
|
|
|
|
|
+ preparedStatement.setString(8, CREATE_BY);
|
|
|
|
|
+// preparedStatement.executeUpdate();
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (index<= (total % pageSize == 0 ? total / pageSize : (total / pageSize) + 1)) {
|
|
|
|
|
+ index++;
|
|
|
|
|
+ }else {
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ //先只处理一页
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ System.out.println(count);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ public static String doGet(String url) throws Exception {
|
|
|
|
|
+ String result = "";
|
|
|
|
|
+ CloseableHttpClient httpClient = HttpClients.createDefault();
|
|
|
|
|
+ HttpGet httpGet = new HttpGet(url);
|
|
|
|
|
+ RequestConfig requestConfig = RequestConfig.custom()
|
|
|
|
|
+ .setConnectTimeout(10 * 1000).setSocketTimeout(60 * 1000)
|
|
|
|
|
+ .build();
|
|
|
|
|
+ httpGet.setConfig(requestConfig);
|
|
|
|
|
+ CloseableHttpResponse response = null;
|
|
|
|
|
+ try {
|
|
|
|
|
+ response = httpClient.execute(httpGet);
|
|
|
|
|
+ if (response.getStatusLine().getStatusCode() == 200) {
|
|
|
|
|
+ String content = EntityUtils.toString(response.getEntity(), "UTF-8");
|
|
|
|
|
+ result = content;
|
|
|
|
|
+ }
|
|
|
|
|
+ } finally {
|
|
|
|
|
+ if (response != null) {
|
|
|
|
|
+ response.close();
|
|
|
|
|
+ }
|
|
|
|
|
+ httpClient.hashCode();
|
|
|
|
|
+ }
|
|
|
|
|
+ return result;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public static String doPost(String path) throws Exception {
|
|
|
|
|
+ String result = "";
|
|
|
|
|
+
|
|
|
|
|
+ CloseableHttpClient httpclient = HttpClients.createDefault();
|
|
|
|
|
+ // 创建http POST请求
|
|
|
|
|
+ HttpPost httpPost = new HttpPost(path);
|
|
|
|
|
+ RequestConfig requestConfig = RequestConfig.custom()
|
|
|
|
|
+ .setConnectTimeout(10 * 1000).setSocketTimeout(60 * 1000)
|
|
|
|
|
+ .build();
|
|
|
|
|
+ httpPost.setConfig(requestConfig);
|
|
|
|
|
+// List<NameValuePair> parameters = new ArrayList<NameValuePair>(0);
|
|
|
|
|
+// parameters.add(new BasicNameValuePair("pagesize",pageSize+""));
|
|
|
|
|
+// parameters.add(new BasicNameValuePair("currentpage",index+""));
|
|
|
|
|
+// parameters.add(new BasicNameValuePair("search","{\"startDate\":\"\",\"endDate\":\"\",\"extVal\":\"\",\"extVal2\":\"\",\"extVal3\":\"\",\"extVal4\":\"\",\"extVal5\":\"\",\"extVal6\":-999999,\"extVal7\":-999999,\"extVal8\":null,\"extVal9\":\"02\",\"extVal10\":null,\"extVal11\":null,\"extVal12\":null,\"extVal13\":null,\"extVal14\":null,\"extVal15\":null,\"extVal16\":null,\"orderField\":\"\",\"orderType\":\"desc\",\"name\":\"\",\"code\":\"\"}"));
|
|
|
|
|
+
|
|
|
|
|
+ // 构造一个form表单式的实体
|
|
|
|
|
+ String json = String.format("{\"pageNum\":%d,\"pageSize\":%d,\"releaseEndTime\":\"\",\"releaseStartTime\":\"\",\"purchaseProjectType\":\"\",\"purchaseModes\":[],\"purchasePatternId\":\"\",\"tendererName\":\"\",\"noticeTypes\":[\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"8\",\"9\",\"10\",\"15\",\"16\",\"17\",\"21\",\"22\"]}", index, pageSize);
|
|
|
|
|
+ StringEntity entity = new StringEntity(json,ContentType.APPLICATION_JSON);
|
|
|
|
|
+// UrlEncodedFormEntity formEntity = new UrlEncodedFormEntity(parameters);
|
|
|
|
|
+ // 将请求实体设置到httpPost对象中
|
|
|
|
|
+ httpPost.setEntity(entity);
|
|
|
|
|
+ httpPost.setHeader("Content-Type", "application/json");
|
|
|
|
|
+ httpPost.setHeader("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36");
|
|
|
|
|
+ CloseableHttpResponse response = null;
|
|
|
|
|
+ try {
|
|
|
|
|
+ response = httpclient.execute(httpPost);
|
|
|
|
|
+ if (response.getStatusLine().getStatusCode() == 200) {
|
|
|
|
|
+ String content = EntityUtils.toString(response.getEntity(), "UTF-8");
|
|
|
|
|
+ return content;
|
|
|
|
|
+ }
|
|
|
|
|
+ } finally {
|
|
|
|
|
+ if (response != null) {
|
|
|
|
|
+ response.close();
|
|
|
|
|
+ }
|
|
|
|
|
+ httpclient.close();
|
|
|
|
|
+ }
|
|
|
|
|
+ return result;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public static String urlClean(String url,String baseUrl,String currentUrl){
|
|
|
|
|
+ if (url.startsWith("http")) {
|
|
|
|
|
+ return url;
|
|
|
|
|
+ }
|
|
|
|
|
+ String result = "";
|
|
|
|
|
+ if (url.startsWith("/")) {
|
|
|
|
|
+ //根路径开始
|
|
|
|
|
+ result = baseUrl + url;
|
|
|
|
|
+ }else if (url.startsWith("./")){
|
|
|
|
|
+ //当前同级目录
|
|
|
|
|
+ result = currentUrl.substring(0, currentUrl.lastIndexOf("/")) + url.substring(url.indexOf("./") + 1);
|
|
|
|
|
+ }else if (url.startsWith("../")){
|
|
|
|
|
+ //多级目录,取最后的uri拼接到baseUrl,等价于所有 "../" 替换成 "/"
|
|
|
|
|
+ result = baseUrl + url.substring(url.lastIndexOf("../") + 2);
|
|
|
|
|
+ }else {
|
|
|
|
|
+ //等价于当前目录
|
|
|
|
|
+ result = currentUrl.substring(0,currentUrl.lastIndexOf("/") + 1) + url;
|
|
|
|
|
+ }
|
|
|
|
|
+ return result;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ public static String getNoticeType(int val){
|
|
|
|
|
+ switch (val){
|
|
|
|
|
+ case 1:
|
|
|
|
|
+ return "公告";
|
|
|
|
|
+ case 2:
|
|
|
|
|
+ return "变更公告";
|
|
|
|
|
+ case 3:
|
|
|
|
|
+ return "中标候选人/拟成交结果公示";
|
|
|
|
|
+ case 4:
|
|
|
|
|
+ return "中标/成交结果公告";
|
|
|
|
|
+ case 5:
|
|
|
|
|
+ return "招标/采购异常";
|
|
|
|
|
+ case 8:
|
|
|
|
|
+ return "候选人变更公告";
|
|
|
|
|
+ case 9:
|
|
|
|
|
+ return "中标/成交结果变更公告";
|
|
|
|
|
+ case 15:
|
|
|
|
|
+ return "临时公告";
|
|
|
|
|
+ case 16:
|
|
|
|
|
+ return "物资类";
|
|
|
|
|
+ case 17:
|
|
|
|
|
+ return "服务类";
|
|
|
|
|
+ default:
|
|
|
|
|
+ throw new RuntimeException(String.format("未知的类型:%d", val));
|
|
|
|
|
+// return "未知的类型:"+val;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public static String getWinBidForm(int val){
|
|
|
|
|
+ switch (val){
|
|
|
|
|
+ case 1:
|
|
|
|
|
+ return "费率";
|
|
|
|
|
+ case 4:
|
|
|
|
|
+ return "总价";
|
|
|
|
|
+ default:
|
|
|
|
|
+ throw new RuntimeException(String.format("未知的类型:%d", val));
|
|
|
|
|
+// return "未知的类型:"+val;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+}
|