Ver código fonte

通用资源项目

devops 2 meses atrás
pai
commit
5a700d0f9b

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

@@ -678,6 +678,19 @@ public class SampleXxlJob {
         detailMethod(1);//1:post  0:get
     }
 
+    @XxlJob("task_ZRZY_TYZY_CEDE_NOTICE")
+    public void ZRZY_TYZY_CEDE_NOTICE() throws Exception {
+        detailMethod(1);//1:post  0:get
+    }
+    @XxlJob("task_ZRZY_TYZY_SUPPLE")
+    public void ZRZY_TYZY_SUPPLE() throws Exception {
+        detailMethod(1);//1:post  0:get
+    }
+    @XxlJob("task_ZRZY_TYZY_BIDWINNOTICE")
+    public void ZRZY_TYZY_BIDWINNOTICE() throws Exception {
+        detailMethod(1);//1:post  0:get
+    }
+
 
     private void detailMethod(Integer type){
         System.out.println("进来了==================");
@@ -1410,6 +1423,56 @@ public class SampleXxlJob {
                     updateDatas(sourceDataKey,  sourceDataCode, announcementGuid, announcementName, announcementCode, announcementTitle, announcementContent, regionCode, issueTime, unifiedDealCode, platformCode, pubServicePlatCode, dataTimestamp, typeName);
                 }
                 break;
+            case "ZRZY_TYZY_CEDE_NOTICE"://
+                for (int j = 0; j < jsonArray.size(); j++) {
+                    String sourceDataKey = "tyzy1-"+jsonArray.getJSONObject(j).getString("SOURCE_DATA_KEY");
+                    String announcementGuid = jsonArray.getJSONObject(j).getString("ANNOUNCEMENT_GUID");//项目编号
+                    String announcementCode = jsonArray.getJSONObject(j).getString("ANNOUNCEMENT_CODE");//公告编号
+                    String announcementTitle = jsonArray.getJSONObject(j).getString("ANNOUNCEMENT_TITLE");//公告标题
+                    String announcementContent = jsonArray.getJSONObject(j).getString("ANNOUNCEMENT_CONNECT");//公告内容
+                    String regionCode = jsonArray.getJSONObject(j).getString("RESOURCES_DISTRICT");//地区代码
+                    Long issueTime = jsonArray.getJSONObject(j).getLong("PUBLISHING_TIME");//发布时间
+                    String platformCode = jsonArray.getJSONObject(j).getString("PLATFORM_CODE");//平台编码
+                    Long dataTimestamp = jsonArray.getJSONObject(j).getLong("DATA_TIMESTAMP");//数据时间
+                    String typeCode = "1";//通用资源
+                    String typeName = "200";//类型名称
+                    updateTyzyDatas(sourceDataKey, announcementGuid, announcementCode, announcementTitle, announcementContent, regionCode, issueTime, platformCode, dataTimestamp, typeCode, typeName);
+                }
+                break;
+            case "ZRZY_TYZY_SUPPLE"://
+                for (int j = 0; j < jsonArray.size(); j++) {
+                    String sourceDataKey = "tyzy2-"+jsonArray.getJSONObject(j).getString("SOURCE_DATA_KEY");
+                    String announcementGuid = jsonArray.getJSONObject(j).getString("ANNOUNCEMENT_GUID");//项目编号
+                    String announcementCode = jsonArray.getJSONObject(j).getString("ANNOUNCEMENT_CODE");//公告编号
+                    String announcementTitle = jsonArray.getJSONObject(j).getString("ANNOUNCEMENT_TITLE");//公告标题
+                    String announcementContent = jsonArray.getJSONObject(j).getString("ANNOUNCEMENT_CONNECT");//公告内容
+                    String regionCode = jsonArray.getJSONObject(j).getString("RESOURCES_DISTRICT");//地区代码
+                    Long issueTime = jsonArray.getJSONObject(j).getLong("DATA_TIMESTAMP");//发布时间
+                    String platformCode = jsonArray.getJSONObject(j).getString("PLATFORM_CODE");//平台编码
+                    Long dataTimestamp = jsonArray.getJSONObject(j).getLong("DATA_TIMESTAMP");//数据时间
+                    String typeCode = "2";//类型名称
+                    String typeName = "200";//类型名称
+
+
+                    updateTyzyDatas(sourceDataKey, announcementGuid, announcementCode, announcementTitle, announcementContent, regionCode, issueTime, platformCode, dataTimestamp, typeCode, typeName);
+                }
+                break;
+            case "ZRZY_TYZY_BIDWINNOTICE"://
+                for (int j = 0; j < jsonArray.size(); j++) {
+                    String sourceDataKey = "tyzy3-"+jsonArray.getJSONObject(j).getString("SOURCE_DATA_KEY");
+                    String announcementGuid = jsonArray.getJSONObject(j).getString("DEAL_ANNOUNCEMENT_GUID");//项目编号
+                    String announcementCode = jsonArray.getJSONObject(j).getString("DEAL_ANNOUNCEMENT_GUID");//公告编号
+                    String announcementTitle = jsonArray.getJSONObject(j).getString("ANNOUNCEMENT_TITLE");//公告标题
+                    String announcementContent = jsonArray.getJSONObject(j).getString("ANNOUNCEMENT_CONNECT");//公告内容
+                    String regionCode = jsonArray.getJSONObject(j).getString("REGION_CODE");//地区代码
+                    Long issueTime = jsonArray.getJSONObject(j).getLong("PUBLISHING_TIME");//发布时间
+                    String platformCode = jsonArray.getJSONObject(j).getString("PLATFORM_CODE");//平台编码
+                    Long dataTimestamp = jsonArray.getJSONObject(j).getLong("DATA_TIMESTAMP");//数据时间
+                    String typeCode = "3";//类型名称
+                    String typeName = "200";//类型名称
+                    updateTyzyDatas(sourceDataKey, announcementGuid, announcementCode, announcementTitle, announcementContent, regionCode, issueTime, platformCode, dataTimestamp, typeCode, typeName);
+                }
+                break;
             case "NMZB_TENDERBULLETIN"://
                 for (int j = 0; j < jsonArray.size(); j++) {
                     String sourceDataKey = "fyfbz1-"+jsonArray.getJSONObject(j).getString("id");
@@ -1535,4 +1598,19 @@ public class SampleXxlJob {
     }
 
 
+    private void updateTyzyDatas(String sourceDataKey, String announcementGuid, String announcementCode, String announcementTitle,String announcementContent, String regionCode, Long issueTime, String platformCode, Long dataTimestamp, String typeCode, String typeName){
+        AllianceCityWebsite allianceCityWebsite = new AllianceCityWebsite();
+        allianceCityWebsite.setSourceDataKey(sourceDataKey);
+        allianceCityWebsite.setBulletinTitle(announcementTitle);
+        allianceCityWebsite.setBulletinContent(announcementContent);
+        allianceCityWebsite.setRegionCode(regionCode);
+        allianceCityWebsite.setPublishingTime(""+issueTime);
+        allianceCityWebsite.setBulletinType(typeCode);
+        allianceCityWebsite.setIndustryType(typeName);
+        allianceCityWebsite.setDataTimestamp(dataTimestamp);
+        allianceCityWebsite.setProjectCode(announcementGuid);
+        allianceCityWebsiteService.saveOrUpdate(allianceCityWebsite);
+    }
+
+
 }

Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
src/main/java/com/trs/project/util/RSAUtils.java


Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff