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