🗃️ PSC 수집 제외 컬럼 반영
This commit is contained in:
부모
9fed34e1bc
커밋
8d2cd09725
@ -45,7 +45,6 @@ public class PscAllCertificateRepositoryImpl extends BaseJdbcRepository<PscAllCe
|
||||
return """
|
||||
INSERT INTO new_snp.psc_all_certificate(
|
||||
certificate_id,
|
||||
type_id,
|
||||
data_set_version,
|
||||
inspection_id,
|
||||
lrno,
|
||||
@ -53,7 +52,6 @@ public class PscAllCertificateRepositoryImpl extends BaseJdbcRepository<PscAllCe
|
||||
certificate_title,
|
||||
issuing_authority_code,
|
||||
issuing_authority,
|
||||
class_soc_of_issuer,
|
||||
other_issuing_authority,
|
||||
issue_date,
|
||||
expiry_date,
|
||||
@ -67,13 +65,11 @@ public class PscAllCertificateRepositoryImpl extends BaseJdbcRepository<PscAllCe
|
||||
inspection_date,
|
||||
inspected_by
|
||||
) VALUES (
|
||||
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, \s
|
||||
?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
|
||||
?, ?
|
||||
?, ?, ?, ?, ?, ?, ?, ?, ?, ?
|
||||
)
|
||||
ON CONFLICT (certificate_id)
|
||||
DO UPDATE SET
|
||||
type_id = EXCLUDED.type_id,
|
||||
data_set_version = EXCLUDED.data_set_version,
|
||||
inspection_id = EXCLUDED.inspection_id,
|
||||
lrno = EXCLUDED.lrno,
|
||||
@ -81,7 +77,6 @@ public class PscAllCertificateRepositoryImpl extends BaseJdbcRepository<PscAllCe
|
||||
certificate_title = EXCLUDED.certificate_title,
|
||||
issuing_authority_code = EXCLUDED.issuing_authority_code,
|
||||
issuing_authority = EXCLUDED.issuing_authority,
|
||||
class_soc_of_issuer = EXCLUDED.class_soc_of_issuer,
|
||||
other_issuing_authority = EXCLUDED.other_issuing_authority,
|
||||
issue_date = EXCLUDED.issue_date,
|
||||
expiry_date = EXCLUDED.expiry_date,
|
||||
@ -108,7 +103,6 @@ public class PscAllCertificateRepositoryImpl extends BaseJdbcRepository<PscAllCe
|
||||
int i = 1;
|
||||
|
||||
ps.setString(i++, e.getCertificateId());
|
||||
ps.setString(i++, e.getTypeId());
|
||||
ps.setString(i++, e.getDataSetVersion());
|
||||
ps.setString(i++, e.getInspectionId());
|
||||
ps.setString(i++, e.getLrno());
|
||||
@ -116,7 +110,6 @@ public class PscAllCertificateRepositoryImpl extends BaseJdbcRepository<PscAllCe
|
||||
ps.setString(i++, e.getCertificateTitle());
|
||||
ps.setString(i++, e.getIssuingAuthorityCode());
|
||||
ps.setString(i++, e.getIssuingAuthority());
|
||||
ps.setString(i++, e.getClassSocOfIssuer());
|
||||
ps.setString(i++, e.getOtherIssuingAuthority());
|
||||
ps.setTimestamp(i++, e.getIssueDate() != null ? Timestamp.valueOf(e.getIssueDate()) : null);
|
||||
ps.setTimestamp(i++, e.getExpiryDate() != null ? Timestamp.valueOf(e.getExpiryDate()) : null);
|
||||
|
||||
@ -47,7 +47,6 @@ public class PscDefectRepositoryImpl extends BaseJdbcRepository<PscDefectEntity,
|
||||
INSERT INTO new_snp.psc_defect(
|
||||
defect_id,
|
||||
inspection_id,
|
||||
type_id,
|
||||
data_set_version,
|
||||
action_1,
|
||||
action_2,
|
||||
@ -55,9 +54,6 @@ public class PscDefectRepositoryImpl extends BaseJdbcRepository<PscDefectEntity,
|
||||
action_code_1,
|
||||
action_code_2,
|
||||
action_code_3,
|
||||
amsa_action_code_1,
|
||||
amsa_action_code_2,
|
||||
amsa_action_code_3,
|
||||
class_is_responsible,
|
||||
defect_code,
|
||||
defect_text,
|
||||
@ -73,13 +69,14 @@ public class PscDefectRepositoryImpl extends BaseJdbcRepository<PscDefectEntity,
|
||||
recognised_org_resp_code,
|
||||
recognised_org_resp_yn,
|
||||
is_accidental_damage
|
||||
) VALUES (?,?,?,?,?,?,?,?,?,?,
|
||||
) VALUES (
|
||||
?,?,?,?,?,?,?,?,?,?,
|
||||
?,?,?,?,?,?,?,?)
|
||||
?,?,?,?,?,?,?,?,?,?,
|
||||
?,?,?,?
|
||||
)
|
||||
ON CONFLICT (defect_id)
|
||||
DO UPDATE SET
|
||||
inspection_id = EXCLUDED.inspection_id,
|
||||
type_id = EXCLUDED.type_id,
|
||||
data_set_version = EXCLUDED.data_set_version,
|
||||
action_1 = EXCLUDED.action_1,
|
||||
action_2 = EXCLUDED.action_2,
|
||||
@ -87,9 +84,6 @@ public class PscDefectRepositoryImpl extends BaseJdbcRepository<PscDefectEntity,
|
||||
action_code_1 = EXCLUDED.action_code_1,
|
||||
action_code_2 = EXCLUDED.action_code_2,
|
||||
action_code_3 = EXCLUDED.action_code_3,
|
||||
amsa_action_code_1 = EXCLUDED.amsa_action_code_1,
|
||||
amsa_action_code_2 = EXCLUDED.amsa_action_code_2,
|
||||
amsa_action_code_3 = EXCLUDED.amsa_action_code_3,
|
||||
class_is_responsible = EXCLUDED.class_is_responsible,
|
||||
defect_code = EXCLUDED.defect_code,
|
||||
defect_text = EXCLUDED.defect_text,
|
||||
@ -120,7 +114,6 @@ public class PscDefectRepositoryImpl extends BaseJdbcRepository<PscDefectEntity,
|
||||
|
||||
ps.setString(i++, e.getDefectId());
|
||||
ps.setString(i++, e.getInspectionId());
|
||||
ps.setString(i++, e.getTypeId());
|
||||
ps.setString(i++, e.getDataSetVersion());
|
||||
ps.setString(i++, e.getAction1());
|
||||
ps.setString(i++, e.getAction2());
|
||||
@ -128,9 +121,6 @@ public class PscDefectRepositoryImpl extends BaseJdbcRepository<PscDefectEntity,
|
||||
ps.setString(i++, e.getActionCode1());
|
||||
ps.setString(i++, e.getActionCode2());
|
||||
ps.setString(i++, e.getActionCode3());
|
||||
ps.setString(i++, e.getAmsaActionCode1());
|
||||
ps.setString(i++, e.getAmsaActionCode2());
|
||||
ps.setString(i++, e.getAmsaActionCode3());
|
||||
ps.setString(i++, e.getClassIsResponsible());
|
||||
ps.setString(i++, e.getDefectCode());
|
||||
ps.setString(i++, e.getDefectText());
|
||||
|
||||
@ -40,12 +40,10 @@ public class PscInspectionRepositoryImpl extends BaseJdbcRepository<PscInspectio
|
||||
return """
|
||||
INSERT INTO new_snp.psc_detail(
|
||||
inspection_id,
|
||||
type_id,
|
||||
data_set_version,
|
||||
authorisation,
|
||||
call_sign,
|
||||
class,
|
||||
cargo,
|
||||
charterer,
|
||||
country,
|
||||
inspection_date,
|
||||
@ -56,9 +54,7 @@ public class PscInspectionRepositoryImpl extends BaseJdbcRepository<PscInspectio
|
||||
flag,
|
||||
follow_up_inspection,
|
||||
gross_tonnage,
|
||||
inspection_port_code,
|
||||
inspection_port_decode,
|
||||
keel_laid,
|
||||
last_updated,
|
||||
ihslr_or_imo_ship_no,
|
||||
manager,
|
||||
@ -76,17 +72,14 @@ public class PscInspectionRepositoryImpl extends BaseJdbcRepository<PscInspectio
|
||||
) VALUES (
|
||||
?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
|
||||
?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
|
||||
?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
|
||||
?, ?, ?, ?
|
||||
?, ?, ?, ?, ?, ?, ?, ?, ?, ?
|
||||
)
|
||||
ON CONFLICT (inspection_id)
|
||||
DO UPDATE SET
|
||||
type_id = EXCLUDED.type_id,
|
||||
data_set_version = EXCLUDED.data_set_version,
|
||||
authorisation = EXCLUDED.authorisation,
|
||||
call_sign = EXCLUDED.call_sign,
|
||||
class = EXCLUDED.class,
|
||||
cargo = EXCLUDED.cargo,
|
||||
charterer = EXCLUDED.charterer,
|
||||
country = EXCLUDED.country,
|
||||
inspection_date = EXCLUDED.inspection_date,
|
||||
@ -97,9 +90,7 @@ public class PscInspectionRepositoryImpl extends BaseJdbcRepository<PscInspectio
|
||||
flag = EXCLUDED.flag,
|
||||
follow_up_inspection = EXCLUDED.follow_up_inspection,
|
||||
gross_tonnage = EXCLUDED.gross_tonnage,
|
||||
inspection_port_code = EXCLUDED.inspection_port_code,
|
||||
inspection_port_decode = EXCLUDED.inspection_port_decode,
|
||||
keel_laid = EXCLUDED.keel_laid,
|
||||
last_updated = EXCLUDED.last_updated,
|
||||
ihslr_or_imo_ship_no = EXCLUDED.ihslr_or_imo_ship_no,
|
||||
manager = EXCLUDED.manager,
|
||||
@ -123,12 +114,10 @@ public class PscInspectionRepositoryImpl extends BaseJdbcRepository<PscInspectio
|
||||
int i = 1;
|
||||
|
||||
ps.setString(i++, e.getInspectionId());
|
||||
ps.setString(i++, e.getTypeId());
|
||||
ps.setString(i++, e.getDataSetVersion());
|
||||
ps.setString(i++, e.getAuthorisation());
|
||||
ps.setString(i++, e.getCallSign());
|
||||
ps.setString(i++, e.getShipClass());
|
||||
ps.setString(i++, e.getCargo());
|
||||
ps.setString(i++, e.getCharterer());
|
||||
ps.setString(i++, e.getCountry());
|
||||
ps.setTimestamp(i++, e.getInspectionDate() != null ? Timestamp.valueOf(e.getInspectionDate()) : null);
|
||||
@ -139,9 +128,7 @@ public class PscInspectionRepositoryImpl extends BaseJdbcRepository<PscInspectio
|
||||
ps.setString(i++, e.getFlag());
|
||||
ps.setString(i++, e.getFollowUpInspection());
|
||||
ps.setString(i++, e.getGrossTonnage());
|
||||
ps.setString(i++, e.getInspectionPortCode());
|
||||
ps.setString(i++, e.getInspectionPortDecode());
|
||||
ps.setString(i++, e.getKeelLaid());
|
||||
ps.setTimestamp(i++, e.getLastUpdated() != null ? Timestamp.valueOf(e.getLastUpdated()) : null);
|
||||
ps.setString(i++, e.getIhslrOrImoShipNo());
|
||||
ps.setString(i++, e.getManager());
|
||||
|
||||
불러오는 중...
Reference in New Issue
Block a user