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