浏览代码

非依法必招项目

mycopy123@163.com 5 月之前
父节点
当前提交
99cf1e903c

+ 1 - 1
src/main/java/com/trs/project/entity/AllianceCityWebsite.java

@@ -21,7 +21,7 @@ public class AllianceCityWebsite {
     private String sourceDataKey;
     private String bulletinTitle;
     private String bulletinContent;
-    private Long publishingTime;
+    private String publishingTime;
     private String regionCode;
     private String bulletinType;
     private String industryType;

+ 120 - 0
src/main/java/com/trs/project/exchange/SampleXxlJob.java

@@ -661,6 +661,23 @@ public class SampleXxlJob {
         detailMethod(1);//1:post  0:get
     }
 
+    @XxlJob("task_NMZB_TENDERBULLETIN")
+    public void NMZB_TENDERBULLETIN() throws Exception {
+        detailMethod(1);//1:post  0:get
+    }
+    @XxlJob("task_NMZB_CHANGEBULLETIN")
+    public void NMZB_CHANGEBULLETIN() throws Exception {
+        detailMethod(1);//1:post  0:get
+    }
+    @XxlJob("task_NMZB_CANDIDATEBULLETIN")
+    public void NMZB_CANDIDATEBULLETIN() throws Exception {
+        detailMethod(1);//1:post  0:get
+    }
+    @XxlJob("task_NMZB_WINBIDBULLETIN")
+    public void NMZB_WINBIDBULLETIN() throws Exception {
+        detailMethod(1);//1:post  0:get
+    }
+
 
     private void detailMethod(Integer type){
         System.out.println("进来了==================");
@@ -1393,6 +1410,108 @@ public class SampleXxlJob {
                     updateDatas(sourceDataKey,  sourceDataCode, announcementGuid, announcementName, announcementCode, announcementTitle, announcementContent, regionCode, issueTime, unifiedDealCode, platformCode, pubServicePlatCode, dataTimestamp, typeName);
                 }
                 break;
+            case "NMZB_TENDERBULLETIN"://
+                for (int j = 0; j < jsonArray.size(); j++) {
+                    String sourceDataKey = "fyfbz1-"+jsonArray.getJSONObject(j).getString("id");
+                    String sourceDataCode = jsonArray.getJSONObject(j).getString("SYS__PLATFORM_CODE");
+                    String projectCode = jsonArray.getJSONObject(j).getString("tpCode");//公告编号
+                    String bulletinTitle = jsonArray.getJSONObject(j).getString("noticeName");//公告标题
+                    String bulletinContent = jsonArray.getJSONObject(j).getString("noticeContent");//公告内容
+                    String regionCode = jsonArray.getJSONObject(j).getString("regionCode");;//地区代码
+                    String publishingTime = jsonArray.getJSONObject(j).getString("noticeSendTime");//发布时间
+                    String url = jsonArray.getJSONObject(j).getString("fileUrl");//url
+                    String bulletinType = "1";
+                    String industryType = "100";
+                    AllianceCityWebsite allianceCityWebsite = new AllianceCityWebsite();
+                    allianceCityWebsite.setSourceDataKey(sourceDataKey);
+                    allianceCityWebsite.setBulletinTitle(bulletinTitle);
+                    allianceCityWebsite.setBulletinContent(bulletinContent);
+                    allianceCityWebsite.setRegionCode(regionCode);
+                    allianceCityWebsite.setPublishingTime(publishingTime);
+                    allianceCityWebsite.setBulletinType(bulletinType);
+                    allianceCityWebsite.setIndustryType(industryType);
+                    allianceCityWebsite.setDataTimestamp(Long.parseLong(simpleDateFormat.format(new Date())));
+                    allianceCityWebsite.setProjectCode(projectCode);
+                    allianceCityWebsite.setUrl(url);
+                    allianceCityWebsiteService.saveOrUpdate(allianceCityWebsite);
+                }
+                break;
+            case "NMZB_CHANGEBULLETIN"://
+                for (int j = 0; j < jsonArray.size(); j++) {
+                    String sourceDataKey = "fyfbz2-"+jsonArray.getJSONObject(j).getString("id");
+                    String sourceDataCode = jsonArray.getJSONObject(j).getString("SYS__PLATFORM_CODE");
+                    String projectCode = jsonArray.getJSONObject(j).getString("originalTPCode");//公告编号
+                    String bulletinTitle = jsonArray.getJSONObject(j).getString("newBulletinName");//公告标题
+                    String bulletinContent = jsonArray.getJSONObject(j).getString("newBulletinContent");//公告内容
+//                    String regionCode = jsonArray.getJSONObject(j).getString("regionCode");;//地区代码
+                    String publishingTime = jsonArray.getJSONObject(j).getString("newBulletinSendTime");//发布时间
+                    String url = jsonArray.getJSONObject(j).getString("fileUrl");//url
+                    String bulletinType = "2";
+                    String industryType = "100";
+                    AllianceCityWebsite allianceCityWebsite = new AllianceCityWebsite();
+                    allianceCityWebsite.setSourceDataKey(sourceDataKey);
+                    allianceCityWebsite.setBulletinTitle(bulletinTitle);
+                    allianceCityWebsite.setBulletinContent(bulletinContent);
+                    allianceCityWebsite.setPublishingTime(publishingTime);
+                    allianceCityWebsite.setBulletinType(bulletinType);
+                    allianceCityWebsite.setIndustryType(industryType);
+                    allianceCityWebsite.setDataTimestamp(Long.parseLong(simpleDateFormat.format(new Date())));
+                    allianceCityWebsite.setProjectCode(projectCode);
+                    allianceCityWebsite.setUrl(url);
+                    allianceCityWebsiteService.saveOrUpdate(allianceCityWebsite);
+                }
+                break;
+            case "NMZB_CANDIDATEBULLETIN"://
+                for (int j = 0; j < jsonArray.size(); j++) {
+                    String sourceDataKey = "fyfbz3-"+jsonArray.getJSONObject(j).getString("id");
+                    String sourceDataCode = jsonArray.getJSONObject(j).getString("SYS__PLATFORM_CODE");
+                    String projectCode = jsonArray.getJSONObject(j).getString("tpCode");//公告编号
+                    String bulletinTitle = jsonArray.getJSONObject(j).getString("noticeName");//公告标题
+                    String bulletinContent = jsonArray.getJSONObject(j).getString("noticeContent");//公告内容
+//                    String regionCode = jsonArray.getJSONObject(j).getString("regionCode");;//地区代码
+                    String publishingTime = jsonArray.getJSONObject(j).getString("noticeSendTime");//发布时间
+                    String url = jsonArray.getJSONObject(j).getString("fileUrl");//url
+                    String bulletinType = "3";
+                    String industryType = "100";
+                    AllianceCityWebsite allianceCityWebsite = new AllianceCityWebsite();
+                    allianceCityWebsite.setSourceDataKey(sourceDataKey);
+                    allianceCityWebsite.setBulletinTitle(bulletinTitle);
+                    allianceCityWebsite.setBulletinContent(bulletinContent);
+                    allianceCityWebsite.setPublishingTime(publishingTime);
+                    allianceCityWebsite.setBulletinType(bulletinType);
+                    allianceCityWebsite.setIndustryType(industryType);
+                    allianceCityWebsite.setDataTimestamp(Long.parseLong(simpleDateFormat.format(new Date())));
+                    allianceCityWebsite.setProjectCode(projectCode);
+                    allianceCityWebsite.setUrl(url);
+                    allianceCityWebsiteService.saveOrUpdate(allianceCityWebsite);
+                }
+                break;
+            case "NMZB_WINBIDBULLETIN"://
+                for (int j = 0; j < jsonArray.size(); j++) {
+                    String sourceDataKey = "fyfbz4-"+jsonArray.getJSONObject(j).getString("id");
+                    String sourceDataCode = jsonArray.getJSONObject(j).getString("SYS__PLATFORM_CODE");
+                    String projectCode = jsonArray.getJSONObject(j).getString("tpCode");//公告编号
+                    String bulletinTitle = jsonArray.getJSONObject(j).getString("noticeName");//公告标题
+                    String bulletinContent = jsonArray.getJSONObject(j).getString("noticeContent");//公告内容
+                    String regionCode = jsonArray.getJSONObject(j).getString("regionCode");;//地区代码
+                    String publishingTime = jsonArray.getJSONObject(j).getString("noticeSendTime");//发布时间
+                    String url = jsonArray.getJSONObject(j).getString("fileUrl");//url
+                    String bulletinType = "4";
+                    String industryType = "100";
+                    AllianceCityWebsite allianceCityWebsite = new AllianceCityWebsite();
+                    allianceCityWebsite.setSourceDataKey(sourceDataKey);
+                    allianceCityWebsite.setBulletinTitle(bulletinTitle);
+                    allianceCityWebsite.setBulletinContent(bulletinContent);
+                    allianceCityWebsite.setRegionCode(regionCode);
+                    allianceCityWebsite.setPublishingTime(publishingTime);
+                    allianceCityWebsite.setBulletinType(bulletinType);
+                    allianceCityWebsite.setIndustryType(industryType);
+                    allianceCityWebsite.setDataTimestamp(Long.parseLong(simpleDateFormat.format(new Date())));
+                    allianceCityWebsite.setProjectCode(projectCode);
+                    allianceCityWebsite.setUrl(url);
+                    allianceCityWebsiteService.saveOrUpdate(allianceCityWebsite);
+                }
+                break;
             default:
         }
     }
@@ -1415,4 +1534,5 @@ public class SampleXxlJob {
         zrzySuppleService.saveOrUpdate(zrzySupple);
     }
 
+
 }