지붕재 아이템 목록 빈값 제거, 공법 중복 제거 처리
This commit is contained in:
parent
8e7ce3fe23
commit
1df9e0562f
@ -319,6 +319,7 @@ public class EstimateService {
|
||||
}
|
||||
|
||||
String splitStr = "、";
|
||||
List<RoofRequest> orgRoofList = new ArrayList<RoofRequest>();
|
||||
List<RoofRequest> roofList = new ArrayList<RoofRequest>();
|
||||
List<ItemRequest> circuitItemList = estimateRequest.getCircuitItemList();
|
||||
List<ItemRequest> itemList = estimateRequest.getItemList();
|
||||
@ -345,7 +346,12 @@ public class EstimateService {
|
||||
}
|
||||
|
||||
// [2]. 지붕재 관련 데이터 셋팅
|
||||
roofList = estimateRequest.getRoofSurfaceList();
|
||||
orgRoofList = estimateRequest.getRoofSurfaceList();
|
||||
for (RoofRequest roofRequest : orgRoofList) {
|
||||
if (!roofRequest.getModuleList().isEmpty()) { // 빈 배열은 지붕재 데이타에서 제거
|
||||
roofList.add(roofRequest);
|
||||
}
|
||||
}
|
||||
|
||||
// 지붕재 시공사양 ID
|
||||
String constructSpecifications = "";
|
||||
|
||||
@ -33,10 +33,7 @@ import java.net.URLConnection;
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.RandomStringUtils;
|
||||
@ -220,14 +217,16 @@ public class ObjectService {
|
||||
planRequest.setObjectNo(objectNo);
|
||||
List<PlanResponse> planList = objectMapper.selectPlanList(planRequest);
|
||||
|
||||
// Plan 목록에서 지붕재, 시공방법 동일 데이타 중복 제거
|
||||
for (PlanResponse planResponse : planList) {
|
||||
String roofCheckDatas = "";
|
||||
String roofMaterialIdMultis = "";
|
||||
String constructSpecificationMultis = "";
|
||||
String supportMethodIdMultis = "";
|
||||
String orgRoofMaterialIdMultis = planResponse.getRoofMaterialIdMulti();
|
||||
String orgConstructSpecificationMultis = planResponse.getConstructSpecificationMulti();
|
||||
String orgSupportMethodIdMultis = planResponse.getSupportMethodIdMulti();
|
||||
|
||||
// Plan 목록에서 지붕재, 시공방법 동일 데이타 중복 제거
|
||||
if (!StringUtils.isEmpty(orgRoofMaterialIdMultis)
|
||||
&& !StringUtils.isEmpty(orgConstructSpecificationMultis)) {
|
||||
String[] arrOrgRoofMaterialIdMultis = orgRoofMaterialIdMultis.split(splitStr);
|
||||
@ -260,6 +259,21 @@ public class ObjectService {
|
||||
planResponse.setConstructSpecificationMulti(constructSpecificationMultis);
|
||||
}
|
||||
}
|
||||
|
||||
// 공법 중복 제거
|
||||
if (!StringUtils.isEmpty(orgSupportMethodIdMultis)) {
|
||||
String[] arrOrgSupportMethodIdMultis = orgSupportMethodIdMultis.split(splitStr);
|
||||
for (String str : arrOrgSupportMethodIdMultis) {
|
||||
if (!supportMethodIdMultis.contains(str)) {
|
||||
supportMethodIdMultis +=
|
||||
StringUtils.isEmpty(supportMethodIdMultis) ? str : splitStr + str;
|
||||
}
|
||||
}
|
||||
|
||||
if (!StringUtils.isEmpty(supportMethodIdMultis)) {
|
||||
planResponse.setSupportMethodIdMulti(supportMethodIdMultis);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user