|
@@ -82,6 +82,9 @@ public class CamelJDBCConfiguration {
|
82
|
82
|
.split(body()).process(exchange -> {
|
83
|
83
|
Message in = exchange.getIn();
|
84
|
84
|
HashMap<String, Object> aRow = in.getBody(HashMap.class);
|
|
85
|
+ if (StringUtils.isEmpty(aRow.get("qyrq"))){
|
|
86
|
+ aRow.put("qyrq","2021-01-01 00:00:00");
|
|
87
|
+ }
|
85
|
88
|
if (!aRow.containsKey("JM")) aRow.put("JM",aRow.get("JH"));
|
86
|
89
|
String org_level3 = aRow.get("ZYQ") + "@" + aRow.get("CYDMC") + "@" + aRow.get("ZK");
|
87
|
90
|
String org_level2 = aRow.get("ZYQ") + "@" + aRow.get("CYDMC");
|
|
@@ -106,8 +109,6 @@ public class CamelJDBCConfiguration {
|
106
|
109
|
if(orgIDs.get(org_level3) !=null){
|
107
|
110
|
aRow.put("org_id",orgIDs.get(org_level3));
|
108
|
111
|
}
|
109
|
|
- String format = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
|
110
|
|
- aRow.putIfAbsent("QYRQ",format);
|
111
|
112
|
})
|
112
|
113
|
.setBody(simple("insert into centralbase.cb_cd_well_source (well_id,well_common_name,spud_date,org_id,station_id,station_name,completion_name,PRODUCING_AREA_name,remarks) " +
|
113
|
114
|
"select '${body[JH]}','${body[JM]}','${body[QYRQ]}'::timestamp,'${body[org_id]}','${body[station_id]}','${body[ZK]}','${body[SCCW]}','${body[QK]}','${body[BZ]}' " +
|