|
@@ -88,7 +88,7 @@ public class CamelJDBCConfiguration /*extends RouteBuilder */ {
|
88
|
88
|
|
89
|
89
|
|
90
|
90
|
public ArrayList<ZDJG_WELL> loadKey() throws java.lang.Exception {
|
91
|
|
- String url = "http://11.72.128.71/api-service/device/query?appKey=SR5vY4bED7";
|
|
91
|
+ String url = "http://11.72.128.71/api-service/device/query?appKey=MOsEWVl8S0";
|
92
|
92
|
URL restURL = new URL(url);
|
93
|
93
|
/*
|
94
|
94
|
* 此处的urlConnection对象实际上是根据URL的请求协议(此处是http)生成的URLConnection类 的子类HttpURLConnection
|
|
@@ -159,7 +159,7 @@ public class CamelJDBCConfiguration /*extends RouteBuilder */ {
|
159
|
159
|
SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd");
|
160
|
160
|
String date1 = sf.format(ca.getTime());
|
161
|
161
|
|
162
|
|
- URL restURL = new URL("http://11.72.128.71/api-service/tsdb/getSeries?appKey=SR5vY4bED7");
|
|
162
|
+ URL restURL = new URL("http://11.72.128.71/api-service/tsdb/getSeries?appKey=MOsEWVl8S0");
|
163
|
163
|
|
164
|
164
|
//此处的urlConnection对象实际上是根据URL的请求协议(此处是http) 生成的URLConnection类 的子类HttpURLConnection
|
165
|
165
|
HttpURLConnection conn = (HttpURLConnection) restURL.openConnection();
|
|
@@ -268,7 +268,7 @@ public class CamelJDBCConfiguration /*extends RouteBuilder */ {
|
268
|
268
|
//全部执行完成的大概时间在30-40分钟
|
269
|
269
|
@Override
|
270
|
270
|
public void configure() throws Exception {
|
271
|
|
- /* RouteDefinition OrgAndWellSource= (RouteDefinition) from("timer:insert-OrgAndWellSource?period=86400000")
|
|
271
|
+ RouteDefinition OrgAndWellSource= (RouteDefinition) from("timer:insert-OrgAndWellSource?period=86400000")
|
272
|
272
|
.routeId("insert-OrgAndWellSource")
|
273
|
273
|
.setHeader("date", constant(getDate()))
|
274
|
274
|
.process(exchange -> {
|
|
@@ -764,7 +764,7 @@ public class CamelJDBCConfiguration /*extends RouteBuilder */ {
|
764
|
764
|
|
765
|
765
|
from("timer:mytimer11?period=3600000")
|
766
|
766
|
.routeId("centralbase-1")
|
767
|
|
- .setBody(simple("select so.well_id,so.well_common_name,so.org_id,ti.prod_date,ti.stroke_frequency,ti.stroke_length,ti.sgt from centralbase.cb_temp_well_mech_runtime ti, centralbase.cb_cd_well_source so where ti.well_id = so.well_id and ti.prod_date =(select prod_date from centralbase.cb_temp_well_mech_runtime GROUP BY prod_date ORDER BY prod_date desc LIMIT 1 OFFSET 1) and ti.stroke_length > 0 "))
|
|
767
|
+ .setBody(simple("select so.well_id,so.well_common_name,so.org_id,ti.prod_date,ti.stroke_frequency,ti.stroke_length,ti.sgt from centralbase.cb_temp_well_mech_runtime ti, centralbase.cb_cd_well_source so where ti.well_id = so.well_id and ti.prod_date =(select prod_date from centralbase.cb_temp_well_mech_runtime GROUP BY prod_date ORDER BY prod_date desc LIMIT 1 OFFSET 1) and ti.stroke_length > 0 and ti.sgt != '' "))
|
768
|
768
|
.to("jdbc:centralbase")
|
769
|
769
|
.split(body())
|
770
|
770
|
.doTry()
|
|
@@ -783,7 +783,7 @@ public class CamelJDBCConfiguration /*extends RouteBuilder */ {
|
783
|
783
|
})
|
784
|
784
|
.doCatch(Exception.class)
|
785
|
785
|
.log("${header.date}"+" rocketMQ send data faild")
|
786
|
|
- .end();*/
|
|
786
|
+ .end();
|
787
|
787
|
|
788
|
788
|
//稀稠油信息
|
789
|
789
|
/* from("timer:mytimer9?period=3600000")
|