260421_03_ENH: 인접지역에 복수개의 권역 허용
This commit is contained in:
@@ -43,7 +43,8 @@ public class PairingNormalizeService {
|
||||
.municipalities(workbookData.getMunicipalities().stream().map(this::toMunicipality).toList())
|
||||
.centers(workbookData.getCenters().stream().map(this::toCenter).toList())
|
||||
.centerAdjacentRegions(workbookData.getCenterAdjacentRegions().stream()
|
||||
.map(this::toCenterAdjacentRegion).toList())
|
||||
.flatMap(row -> toCenterAdjacentRegions(row).stream())
|
||||
.toList())
|
||||
.preferenceMatchRules(workbookData.getPreferenceMatchRules().stream()
|
||||
.map(this::toPreferenceMatchRule).toList())
|
||||
.commonUnavailableDates(Set.of())
|
||||
@@ -87,11 +88,14 @@ public class PairingNormalizeService {
|
||||
.build();
|
||||
}
|
||||
|
||||
private CenterAdjacentRegion toCenterAdjacentRegion(CenterAdjacentRegionExcelDto row) {
|
||||
return CenterAdjacentRegion.builder()
|
||||
.dispatchRegion(normalizeCode(row.getDispatchRegion(), regionCodeLength(), "파견 권역"))
|
||||
.adjacentRegionClassification(required(row.getAdjacentRegionClassification(), "인접지역 분류"))
|
||||
.build();
|
||||
private List<CenterAdjacentRegion> toCenterAdjacentRegions(CenterAdjacentRegionExcelDto row) {
|
||||
String adjacentRegionClassification = required(row.getAdjacentRegionClassification(), "인접지역 분류");
|
||||
return parseCsv(row.getDispatchRegion()).stream()
|
||||
.map(dispatchRegion -> CenterAdjacentRegion.builder()
|
||||
.dispatchRegion(normalizeCode(dispatchRegion, regionCodeLength(), "파견 권역"))
|
||||
.adjacentRegionClassification(adjacentRegionClassification)
|
||||
.build())
|
||||
.toList();
|
||||
}
|
||||
|
||||
private PreferenceMatchRule toPreferenceMatchRule(PreferenceMatchExcelDto row) {
|
||||
|
||||
Reference in New Issue
Block a user