Core20 테이블 AIS 컬럼 추가 (COG, NavStat)

This commit is contained in:
hyojin kim 2025-11-25 18:39:30 +09:00
부모 18fa95e903
커밋 6be90723b4
4개의 변경된 파일9개의 추가작업 그리고 9개의 파일을 삭제

파일 보기

@ -95,7 +95,6 @@ public class ShipDetailDataProcessor extends BaseProcessor<ShipDetailComparisonD
.grossTonnage(safeGetString(dto.getGrossTonnage())) .grossTonnage(safeGetString(dto.getGrossTonnage()))
.deadWeight(safeGetString(dto.getDeadweight())) .deadWeight(safeGetString(dto.getDeadweight()))
.teu(safeGetString(dto.getTeu())) .teu(safeGetString(dto.getTeu()))
.speedService(safeGetDouble(dto.getSpeedservice()))
.mainEngineType(safeGetString(dto.getMainenginetype())) .mainEngineType(safeGetString(dto.getMainenginetype()))
.shipStatus(safeGetString(dto.getShipStatus())) .shipStatus(safeGetString(dto.getShipStatus()))
.operator(safeGetString(dto.getOperator())) .operator(safeGetString(dto.getOperator()))

파일 보기

@ -70,7 +70,7 @@ public class ShipDetailDataReader extends BaseApiReader<ShipDetailComparisonData
} }
private static final String GET_ALL_IMO_QUERY = private static final String GET_ALL_IMO_QUERY =
"SELECT imo_number FROM ship_data ORDER BY id"; "select imo_number from ship_data where imo_number > (select max(imo_number) from ship_detail_hash_json) order by imo_number asc";
private static final String FETCH_ALL_HASHES_QUERY = private static final String FETCH_ALL_HASHES_QUERY =
"SELECT imo_number, ship_detail_hash FROM ship_detail_hash_json ORDER BY imo_number"; "SELECT imo_number, ship_detail_hash FROM ship_detail_hash_json ORDER BY imo_number";

파일 보기

@ -50,8 +50,8 @@ public class ShipDetailRepositoryImpl extends BaseJdbcRepository<ShipDetailEntit
callsign, flagname, portofregistry, classificationsociety, shiptypelevel5, callsign, flagname, portofregistry, classificationsociety, shiptypelevel5,
shiptypelevel5subtype, yearofbuild, shipbuilder, lengthoverallloa, breadthmoulded, shiptypelevel5subtype, yearofbuild, shipbuilder, lengthoverallloa, breadthmoulded,
"depth", draught, grosstonnage, deadweight, teu, "depth", draught, grosstonnage, deadweight, teu,
speedservice, mainenginetype, status, operator, flagcode, shiptypelevel2 mainenginetype, status, operator, flagcode, shiptypelevel2
) VALUES (nextval('test_s_p.core20_index_seq'::regclass), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ) VALUES (nextval('test_s_p.core20_index_seq'::regclass), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
ON CONFLICT (ihslrorimoshipno) ON CONFLICT (ihslrorimoshipno)
DO UPDATE SET DO UPDATE SET
vesselid = EXCLUDED.vesselid, vesselid = EXCLUDED.vesselid,
@ -72,7 +72,6 @@ public class ShipDetailRepositoryImpl extends BaseJdbcRepository<ShipDetailEntit
grosstonnage = EXCLUDED.grosstonnage, grosstonnage = EXCLUDED.grosstonnage,
deadweight = EXCLUDED.deadweight, deadweight = EXCLUDED.deadweight,
teu = EXCLUDED.teu, teu = EXCLUDED.teu,
speedservice = EXCLUDED.speedservice,
mainenginetype = EXCLUDED.mainenginetype, mainenginetype = EXCLUDED.mainenginetype,
status = EXCLUDED.status, status = EXCLUDED.status,
operator = EXCLUDED.operator, operator = EXCLUDED.operator,
@ -103,7 +102,6 @@ public class ShipDetailRepositoryImpl extends BaseJdbcRepository<ShipDetailEntit
grosstonnage = ?, grosstonnage = ?,
deadweight = ?, deadweight = ?,
teu = ?, teu = ?,
speedservice = ?,
mainenginetype = ?, mainenginetype = ?,
batch_flag = 'N'::character varying, batch_flag = 'N'::character varying,
status = ?, status = ?,
@ -136,7 +134,6 @@ public class ShipDetailRepositoryImpl extends BaseJdbcRepository<ShipDetailEntit
ps.setString(idx++, entity.getGrossTonnage()); ps.setString(idx++, entity.getGrossTonnage());
ps.setString(idx++, entity.getDeadWeight()); ps.setString(idx++, entity.getDeadWeight());
ps.setString(idx++, entity.getTeu()); ps.setString(idx++, entity.getTeu());
setDoubleOrNull(ps, idx++, entity.getSpeedService());
ps.setString(idx++, entity.getMainEngineType()); ps.setString(idx++, entity.getMainEngineType());
ps.setString(idx++, entity.getShipStatus()); ps.setString(idx++, entity.getShipStatus());
ps.setString(idx++, entity.getOperator()); ps.setString(idx++, entity.getOperator());
@ -181,7 +178,6 @@ public class ShipDetailRepositoryImpl extends BaseJdbcRepository<ShipDetailEntit
ps.setString(idx++, entity.getGrossTonnage()); ps.setString(idx++, entity.getGrossTonnage());
ps.setString(idx++, entity.getDeadWeight()); ps.setString(idx++, entity.getDeadWeight());
ps.setString(idx++, entity.getTeu()); ps.setString(idx++, entity.getTeu());
ps.setDouble(idx++, entity.getSpeedService());
ps.setString(idx++, entity.getMainEngineType()); ps.setString(idx++, entity.getMainEngineType());
ps.setString(idx++, entity.getShipStatus()); ps.setString(idx++, entity.getShipStatus());
ps.setString(idx++, entity.getOperator()); ps.setString(idx++, entity.getOperator());
@ -302,7 +298,6 @@ public class ShipDetailRepositoryImpl extends BaseJdbcRepository<ShipDetailEntit
.grossTonnage(rs.getString("grosstonnage")) .grossTonnage(rs.getString("grosstonnage"))
.deadWeight(rs.getString("deadweight")) .deadWeight(rs.getString("deadweight"))
.teu(rs.getString("teu")) .teu(rs.getString("teu"))
.speedService(rs.getDouble("speedservice"))
.mainEngineType(rs.getString("mainenginetype")) .mainEngineType(rs.getString("mainenginetype"))
.batchFlag(rs.getString("batch_flag")) .batchFlag(rs.getString("batch_flag"))
.shipTypeLevel2(rs.getString("shiptypelevel2")) .shipTypeLevel2(rs.getString("shiptypelevel2"))

파일 보기

@ -49,6 +49,9 @@ public class ShipLastPositionRepositoryImpl extends BaseJdbcRepository<TargetEnh
destination = ?, destination = ?,
eta = ?::timestamptz, eta = ?::timestamptz,
heading = ?, heading = ?,
speedservice = ?,
cog = ?,
navstat = ?,
batch_flag = 'N' batch_flag = 'N'
WHERE ihslrorimoshipno = ?; WHERE ihslrorimoshipno = ?;
"""; """;
@ -69,6 +72,9 @@ public class ShipLastPositionRepositoryImpl extends BaseJdbcRepository<TargetEnh
ps.setString(idx++, entity.getDestination()); // destination : destination (String) ps.setString(idx++, entity.getDestination()); // destination : destination (String)
ps.setString(idx++, entity.getEta()); // eta : eta (Datetime) ps.setString(idx++, entity.getEta()); // eta : eta (Datetime)
ps.setDouble(idx++, entity.getHeading()); // heading : heading (Double) ps.setDouble(idx++, entity.getHeading()); // heading : heading (Double)
ps.setDouble(idx++, entity.getSog()); // sog : speedservice (Double)
ps.setDouble(idx++, entity.getCog()); // cog : cog (Double)
ps.setString(idx++, entity.getStatus()); // status : navstat (String)
ps.setString(idx++, entity.getImoVerified()); // imoVerified : imo (String) ps.setString(idx++, entity.getImoVerified()); // imoVerified : imo (String)
} }