Merge branch 'dev_event' into develop
This commit is contained in:
커밋
5683000024
@ -3,7 +3,7 @@ package com.snp.batch.jobs.event.batch.repository;
|
||||
public class EventSql {
|
||||
public static String getEventDetailUpdateSql(){
|
||||
return """
|
||||
INSERT INTO snp_data.event_detail (
|
||||
INSERT INTO new_snp.event_detail (
|
||||
event_id, incident_id, ihslrorimoshipno, published_date, event_start_date, event_end_date,
|
||||
attempted_boarding, cargo_loading_status_code, casualty_action,
|
||||
casualty_zone, casualty_zone_code, component2, country_code,
|
||||
@ -64,14 +64,13 @@ public class EventSql {
|
||||
vessel_gt = EXCLUDED.vessel_gt,
|
||||
vessel_name = EXCLUDED.vessel_name,
|
||||
vessel_type = EXCLUDED.vessel_type,
|
||||
vessel_type_decode = EXCLUDED.vessel_type_decode,
|
||||
batch_flag = 'N';
|
||||
vessel_type_decode = EXCLUDED.vessel_type_decode
|
||||
""";
|
||||
}
|
||||
|
||||
public static String getEventCargoSql(){
|
||||
return """
|
||||
INSERT INTO snp_data.event_cargo (
|
||||
INSERT INTO new_snp.event_cargo (
|
||||
event_id, "sequence", ihslrorimoshipno, "type", quantity,
|
||||
unit_short, unit, cargo_damage, dangerous, "text"
|
||||
)
|
||||
@ -86,14 +85,13 @@ public class EventSql {
|
||||
unit = EXCLUDED.unit,
|
||||
cargo_damage = EXCLUDED.cargo_damage,
|
||||
dangerous = EXCLUDED.dangerous,
|
||||
"text" = EXCLUDED."text",
|
||||
batch_flag = 'N';
|
||||
"text" = EXCLUDED."text"
|
||||
""";
|
||||
}
|
||||
|
||||
public static String getEventRelationshipSql(){
|
||||
return """
|
||||
INSERT INTO snp_data.event_relationship (
|
||||
INSERT INTO new_snp.event_relationship (
|
||||
incident_id, event_id, relationship_type, relationship_type_code,
|
||||
event_id_2, event_type, event_type_code
|
||||
)
|
||||
@ -104,14 +102,13 @@ public class EventSql {
|
||||
ON CONFLICT (incident_id, event_id, event_id_2, event_type_code, relationship_type_code)
|
||||
DO UPDATE SET
|
||||
relationship_type = EXCLUDED.relationship_type,
|
||||
event_type = EXCLUDED.event_type,
|
||||
batch_flag = 'N';
|
||||
event_type = EXCLUDED.event_type
|
||||
""";
|
||||
}
|
||||
|
||||
public static String getEventHumanCasualtySql(){
|
||||
return """
|
||||
INSERT INTO snp_data.event_humancasualty (
|
||||
INSERT INTO new_snp.event_humancasualty (
|
||||
event_id, "scope", "type", qualifier, "count"
|
||||
)
|
||||
VALUES (
|
||||
@ -119,8 +116,7 @@ public class EventSql {
|
||||
)
|
||||
ON CONFLICT (event_id, "scope", "type", qualifier)
|
||||
DO UPDATE SET
|
||||
"count" = EXCLUDED."count",
|
||||
batch_flag = 'N';
|
||||
"count" = EXCLUDED."count"
|
||||
""";
|
||||
}
|
||||
}
|
||||
|
||||
불러오는 중...
Reference in New Issue
Block a user