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