🗃️ ship_detail_data,additionalshipsdata : datasetversion 컬럼 수집 추가
This commit is contained in:
부모
7a1b24e381
커밋
30304de4e6
@ -1,23 +1,25 @@
|
||||
package com.snp.batch.jobs.shipdetail.batch.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
import lombok.*;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
@NoArgsConstructor
|
||||
public class AdditionalInformationDto {
|
||||
@Getter @Setter @ToString @NoArgsConstructor
|
||||
public static class DataSetVersionDto {
|
||||
@JsonProperty("DataSetVersion")
|
||||
private String dataSetVersion;
|
||||
}
|
||||
@JsonProperty("DataSetVersion")
|
||||
private DataSetVersionDto dataSetVersion;
|
||||
private DataSetVersion dataSetVersion;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public static class DataSetVersion {
|
||||
@JsonProperty("DataSetVersion")
|
||||
private String version;
|
||||
}
|
||||
@JsonProperty("LRNO")
|
||||
private String lrno;
|
||||
@JsonProperty("ShipEmail")
|
||||
|
||||
@ -2,10 +2,7 @@ package com.snp.batch.jobs.shipdetail.batch.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -27,7 +24,17 @@ import java.util.List;
|
||||
@AllArgsConstructor
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class ShipDetailDto {
|
||||
@JsonProperty("DataSetVersion")
|
||||
private DataSetVersion dataSetVersion;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public static class DataSetVersion {
|
||||
@JsonProperty("DataSetVersion")
|
||||
private String version;
|
||||
}
|
||||
/**
|
||||
* IMO 번호
|
||||
* API: IHSLRorIMOShipNo
|
||||
|
||||
@ -26,4 +26,5 @@ public class AdditionalInformationEntity extends BaseEntity {
|
||||
private String tweendeckfixed;
|
||||
private String satcomid;
|
||||
private String satcomansback;
|
||||
private String dataSetVersion;
|
||||
}
|
||||
|
||||
@ -50,7 +50,7 @@ public class ShipDetailEntity extends BaseEntity {
|
||||
* mainenginetype varchar(2) NULL, -- 주기관 형식
|
||||
* batch_flag varchar(1) DEFAULT 'N'::character varying NULL -- 업데이트 이력 확인 (N:대기,P:진행,S:완료)
|
||||
*/
|
||||
|
||||
private String dataSetVersion;
|
||||
/**
|
||||
* 기본 키 (자동 생성)
|
||||
* 컬럼: id (BIGSERIAL)
|
||||
|
||||
@ -211,6 +211,7 @@ public class ShipDetailDataProcessor extends BaseProcessor<ShipDetailComparisonD
|
||||
.shipManagerCompanyCode(safeGetString(dto.getShipManagerCompanyCode()))
|
||||
.technicalManagerCode(safeGetString(dto.getTechnicalManagerCode()))
|
||||
.registeredOwnerCode(safeGetString(dto.getRegisteredOwnerCode()))
|
||||
.dataSetVersion(safeGetString(dto.getDataSetVersion().getVersion()))
|
||||
.build();
|
||||
}
|
||||
|
||||
@ -496,6 +497,7 @@ public class ShipDetailDataProcessor extends BaseProcessor<ShipDetailComparisonD
|
||||
.tweendeckfixed(safeGetString(dto.getTweenDeckFixed()))
|
||||
.satcomid(safeGetString(dto.getSatComID()))
|
||||
.satcomansback(safeGetString(dto.getSatComAnsBack()))
|
||||
.dataSetVersion(safeGetString(dto.getDataSetVersion().getVersion()))
|
||||
.build();
|
||||
entityList.add(entity);
|
||||
}
|
||||
|
||||
@ -63,7 +63,8 @@ public class ShipDetailRepositoryImpl extends BaseJdbcRepository<ShipDetailEntit
|
||||
primemoverdescriptivenarrative, primemoverdescriptiveoverviewnarrative,
|
||||
auxiliaryenginesnarrative, auxiliarygeneratorsdescriptivenarrative, bunkersdescriptivenarrative,
|
||||
lastupdatedate,
|
||||
documentofcompliancedoccompanycode, groupbeneficialownercompanycode, operatorcompanycode, shipmanagercompanycode, technicalmanagercode, registeredownercode
|
||||
documentofcompliancedoccompanycode, groupbeneficialownercompanycode, operatorcompanycode, shipmanagercompanycode, technicalmanagercode, registeredownercode,
|
||||
datasetversion
|
||||
) VALUES (
|
||||
?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
|
||||
?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
|
||||
@ -74,7 +75,8 @@ public class ShipDetailRepositoryImpl extends BaseJdbcRepository<ShipDetailEntit
|
||||
?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
|
||||
?, ?, ?, ?, ?,
|
||||
?,
|
||||
?, ?, ?, ?, ?, ?
|
||||
?, ?, ?, ?, ?, ?,
|
||||
?
|
||||
)
|
||||
ON CONFLICT (ihslrorimoshipno)
|
||||
DO UPDATE SET
|
||||
@ -158,7 +160,9 @@ public class ShipDetailRepositoryImpl extends BaseJdbcRepository<ShipDetailEntit
|
||||
operatorcompanycode = EXCLUDED.operatorcompanycode,
|
||||
shipmanagercompanycode = EXCLUDED.shipmanagercompanycode,
|
||||
technicalmanagercode = EXCLUDED.technicalmanagercode,
|
||||
registeredownercode = EXCLUDED.registeredownercode
|
||||
registeredownercode = EXCLUDED.registeredownercode,
|
||||
datasetversion = EXCLUDED.datasetversion,
|
||||
batch_flag = 'N'
|
||||
""";
|
||||
}
|
||||
|
||||
@ -247,7 +251,8 @@ public class ShipDetailRepositoryImpl extends BaseJdbcRepository<ShipDetailEntit
|
||||
shipmanagercompanycode = ?,
|
||||
technicalmanagercode = ?,
|
||||
registeredownercode = ?,
|
||||
batch_flag = 'N'::character varying
|
||||
datasetversion = ?,
|
||||
batch_flag = 'N'
|
||||
WHERE ihslrorimoshipno = ?
|
||||
""";
|
||||
}
|
||||
@ -368,6 +373,7 @@ public class ShipDetailRepositoryImpl extends BaseJdbcRepository<ShipDetailEntit
|
||||
ps.setString(idx++, entity.getShipManagerCompanyCode());
|
||||
ps.setString(idx++, entity.getTechnicalManagerCode());
|
||||
ps.setString(idx++, entity.getRegisteredOwnerCode());
|
||||
ps.setString(idx++, entity.getDataSetVersion());
|
||||
|
||||
// 감사 필드
|
||||
// ps.setTimestamp(idx++, entity.getCreatedAt() != null ?
|
||||
@ -538,6 +544,7 @@ public class ShipDetailRepositoryImpl extends BaseJdbcRepository<ShipDetailEntit
|
||||
ps.setString(idx++, entity.getShipManagerCompanyCode());
|
||||
ps.setString(idx++, entity.getTechnicalManagerCode());
|
||||
ps.setString(idx++, entity.getRegisteredOwnerCode());
|
||||
ps.setString(idx++, entity.getDataSetVersion());
|
||||
|
||||
ps.setString(idx++, entity.getIhslrorimoshipno());
|
||||
}
|
||||
@ -1395,6 +1402,7 @@ public class ShipDetailRepositoryImpl extends BaseJdbcRepository<ShipDetailEntit
|
||||
ps.setString(idx++, entity.getTweendeckfixed()); // 10. tweendeckfixed
|
||||
ps.setString(idx++, entity.getSatcomid()); // 11. satcomid
|
||||
ps.setString(idx++, entity.getSatcomansback()); // 12. satcomansback
|
||||
ps.setString(idx++, entity.getDataSetVersion());
|
||||
}
|
||||
|
||||
private void setPandIHistoryInsertParameters(PreparedStatement ps, PandIHistoryEntity entity)throws Exception{
|
||||
|
||||
@ -218,9 +218,10 @@ public class ShipDetailSql {
|
||||
INSERT INTO snp_data.additionalshipsdata(
|
||||
lrno, shipemail, waterdepthmax, drilldepthmax, drillbargeind,
|
||||
productionvesselind, deckheatexchangerind, deckheatexchangermaterial,
|
||||
tweendeckportable, tweendeckfixed, satcomid, satcomansback
|
||||
tweendeckportable, tweendeckfixed, satcomid, satcomansback,
|
||||
datasetversion
|
||||
)VALUES(
|
||||
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?
|
||||
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?
|
||||
)
|
||||
ON CONFLICT (lrno)
|
||||
DO UPDATE SET
|
||||
@ -234,7 +235,9 @@ public class ShipDetailSql {
|
||||
tweendeckportable = EXCLUDED.tweendeckportable,
|
||||
tweendeckfixed = EXCLUDED.tweendeckfixed,
|
||||
satcomid = EXCLUDED.satcomid,
|
||||
satcomansback = EXCLUDED.satcomansback
|
||||
satcomansback = EXCLUDED.satcomansback,
|
||||
datasetversion = EXCLUDED.datasetversion,
|
||||
batch_flag = 'N'
|
||||
""";
|
||||
}
|
||||
|
||||
|
||||
불러오는 중...
Reference in New Issue
Block a user