260421_01_ENH: 결과 파일명 및 시트명 조정 페어링시 배정가능 인접지역 고려 적용
This commit is contained in:
@@ -32,6 +32,10 @@ public class PairingController {
|
|||||||
) {
|
) {
|
||||||
String fileName = file.getOriginalFilename() == null ? "pairing" : file.getOriginalFilename();
|
String fileName = file.getOriginalFilename() == null ? "pairing" : file.getOriginalFilename();
|
||||||
|
|
||||||
|
if (fileName != null && fileName.endsWith(".xlsx")) {
|
||||||
|
fileName = fileName.substring(0, fileName.length() - 5);
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
byte[] bytes = pairingService.pairingMemberByCenterNew(file);
|
byte[] bytes = pairingService.pairingMemberByCenterNew(file);
|
||||||
return ExcelResponseBuilder.buildExcelResponse(fileName + " 결과.xlsx", bytes);
|
return ExcelResponseBuilder.buildExcelResponse(fileName + " 결과.xlsx", bytes);
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ public class PairingExcelService {
|
|||||||
ByteArrayOutputStream outputStream = new ByteArrayOutputStream()) {
|
ByteArrayOutputStream outputStream = new ByteArrayOutputStream()) {
|
||||||
|
|
||||||
ExcelMapper.appendSheetToWorkbook(workbook, result.getFinalAssignments(),
|
ExcelMapper.appendSheetToWorkbook(workbook, result.getFinalAssignments(),
|
||||||
NewFinalAssignmentExcelDto.class, "최종 배정", headerRowIndex());
|
NewFinalAssignmentExcelDto.class, "최종 배정 with 인접지역", headerRowIndex());
|
||||||
ExcelMapper.appendSheetToWorkbook(workbook, result.getFinalAssignmentsWithCenters(),
|
ExcelMapper.appendSheetToWorkbook(workbook, result.getFinalAssignmentsWithCenters(),
|
||||||
NewFinalAssignmentWithCenterExcelDto.class, "최종 배정 with 센터", headerRowIndex());
|
NewFinalAssignmentWithCenterExcelDto.class, "최종 배정 with 센터", headerRowIndex());
|
||||||
ExcelMapper.appendSheetToWorkbook(workbook, result.getAdjacentRegions(),
|
ExcelMapper.appendSheetToWorkbook(workbook, result.getAdjacentRegions(),
|
||||||
|
|||||||
@@ -48,7 +48,8 @@ public class PairingNewService {
|
|||||||
private static final long DATE_WEIGHT = 1_000_000_000L;
|
private static final long DATE_WEIGHT = 1_000_000_000L;
|
||||||
private static final long PREFERENCE_WEIGHT = 1_000_000L;
|
private static final long PREFERENCE_WEIGHT = 1_000_000L;
|
||||||
private static final long HISTORY_WEIGHT = 1_000L;
|
private static final long HISTORY_WEIGHT = 1_000L;
|
||||||
private static final boolean USE_AVAILABLE_ADJACENT_REGION_IN_PAIR_SCORE = false;
|
//배정 가능 인접지역 수를 페어 생성시 고려
|
||||||
|
private static final boolean USE_AVAILABLE_ADJACENT_REGION_IN_PAIR_SCORE = true;
|
||||||
private static final long AVAILABLE_ADJACENT_REGION_WEIGHT = 1_000_000_000_000_000L;
|
private static final long AVAILABLE_ADJACENT_REGION_WEIGHT = 1_000_000_000_000_000L;
|
||||||
|
|
||||||
private final PairingProperties pairingProperties;
|
private final PairingProperties pairingProperties;
|
||||||
|
|||||||
Reference in New Issue
Block a user