🩹 OwnerHistory DataSetVersion 하드코딩 제거
This commit is contained in:
부모
1241a71d31
커밋
18fa95e903
@ -49,4 +49,16 @@ public class OwnerHistoryDto {
|
||||
*/
|
||||
@JsonProperty("Sequence")
|
||||
private String Sequence;
|
||||
|
||||
@JsonProperty("DataSetVersion")
|
||||
private DataSetVersion dataSetVersion;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public static class DataSetVersion {
|
||||
@JsonProperty("DataSetVersion")
|
||||
private String version;
|
||||
}
|
||||
}
|
||||
|
||||
@ -20,4 +20,5 @@ public class OwnerHistoryEntity extends BaseEntity {
|
||||
private String Owner;
|
||||
private String OwnerCode;
|
||||
private String Sequence;
|
||||
private String dataSetVersion;
|
||||
}
|
||||
|
||||
@ -119,6 +119,7 @@ public class ShipDetailDataProcessor extends BaseProcessor<ShipDetailComparisonD
|
||||
.Owner(safeGetString(dto.getOwner()))
|
||||
.OwnerCode(safeGetString(dto.getOwnerCode()))
|
||||
.Sequence(safeGetString(dto.getSequence()))
|
||||
.dataSetVersion(safeGetString(dto.getDataSetVersion().getVersion()))
|
||||
.build();
|
||||
|
||||
ownerHistoryEntityList.add(entity);
|
||||
|
||||
@ -264,6 +264,7 @@ public class ShipDetailRepositoryImpl extends BaseJdbcRepository<ShipDetailEntit
|
||||
|
||||
private void setOwnerHistoryInsertParameters(PreparedStatement ps, OwnerHistoryEntity entity)throws Exception{
|
||||
int idx = 1;
|
||||
ps.setString(idx++, entity.getDataSetVersion());
|
||||
ps.setString(idx++, entity.getCompanyStatus());
|
||||
ps.setString(idx++, entity.getEffectiveDate());
|
||||
ps.setString(idx++, entity.getLRNO());
|
||||
|
||||
@ -7,7 +7,7 @@ public class ShipDetailSql {
|
||||
INSERT INTO test_s_p.test_ownerhistory(
|
||||
datasetversion, companystatus, effectivedate, lrno, "owner",
|
||||
ownercode, "sequence", shipresultindex, vesselid, rowindex, batch_flag
|
||||
)VALUES('1.0.0', ?, ?, ?, ?, ?, ?, nextval('test_s_p.ownerhistory_index_seq'::regclass), ?, nextval('test_s_p.ownerhistory_row_index_seq'::regclass), 'N')
|
||||
)VALUES(?, ?, ?, ?, ?, ?, ?, nextval('test_s_p.ownerhistory_index_seq'::regclass), ?, nextval('test_s_p.ownerhistory_row_index_seq'::regclass), 'N')
|
||||
ON CONFLICT (lrno,ownercode, effectivedate)
|
||||
DO UPDATE SET
|
||||
datasetversion = EXCLUDED.datasetversion,
|
||||
|
||||
불러오는 중...
Reference in New Issue
Block a user