기업사용자 입력시스템 엑셀업로드 입력시 토사시험>압밀시험 테스트번호와 물성시험샘플 순서가 연동되도록 처리(기존에는 테스트번호를 따르지 않고 row순서대로 연동되었음)
parent
93b56a1744
commit
2e38baf91c
|
|
@ -4901,10 +4901,27 @@ public class ManageExcelUploadProc03Controller {
|
|||
|
||||
|
||||
for(int i=0; i < consolidationTestCount; i++){
|
||||
|
||||
int testSampleNo = Integer.valueOf(excelWp.get("col0",i).trim()); // 사용자가 입력한 순번(물성시험 샘플을 순번으로 찾을때 사용)
|
||||
String targetSampleCode = null;
|
||||
for (Map<String, Object> sample : _sampleInfoList) {
|
||||
String sampleCode = (String) sample.get("SAMPLE_CODE");
|
||||
// SAMPLE_CODE 끝 숫자 추출
|
||||
String numberPart = sampleCode.replaceAll(".*?(\\d+)$", "$1");
|
||||
int number = Integer.parseInt(numberPart);
|
||||
if (number == testSampleNo) {
|
||||
targetSampleCode = sampleCode;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (targetSampleCode == null) { // 테스트번호에 매핑되는 물성시험 sample코드가 존재하지 않음
|
||||
throw new IllegalArgumentException(
|
||||
String.format("물성시험 시료번호를 확인 하세요. (테스트 번호:%s)",testNo));
|
||||
}
|
||||
HashMap<String,Object> map = new HashMap<>();
|
||||
map.put("PROJECT_CODE", _projectCode);
|
||||
map.put("HOLE_CODE", _holeCode);
|
||||
map.put("SAMPLE_CODE", (String) _sampleInfoList.get(i).get("SAMPLE_CODE"));
|
||||
map.put("SAMPLE_CODE", targetSampleCode);
|
||||
map.put("CONSOL_SAMPLE_DIA", excelWp.get("col1", i).trim()); // 직경(cm)
|
||||
map.put("CONSOL_SAMPLE_HEIGHT", excelWp.get("col2", i).trim()); // 길이(cm)
|
||||
map.put("CONSOL_W0", excelWp.get("col3", i).trim()); // 초기 함수비(%)
|
||||
|
|
|
|||
Loading…
Reference in New Issue