PCS 회로구성 로직 수정
This commit is contained in:
parent
f622f67b80
commit
477056d1bd
@ -693,8 +693,10 @@ public class EstimateService {
|
||||
circuitItemRequest.setObjectNo(estimateRequest.getObjectNo());
|
||||
circuitItemRequest.setPlanNo(estimateRequest.getPlanNo());
|
||||
|
||||
if (!StringUtils.isEmpty(circuitItemRequest.getCircuitCfg())) {
|
||||
estimateMapper.insertEstimateCircuitItem(circuitItemRequest);
|
||||
}
|
||||
}
|
||||
|
||||
// 견적서 도면 아이템 제거
|
||||
estimateMapper.deleteEstimateDrawingItemList(estimateRequest);
|
||||
@ -2272,18 +2274,26 @@ public class EstimateService {
|
||||
List<ItemRequest> pcsItemList, List<ItemRequest> moduleList) {
|
||||
|
||||
if (pcsItemList != null && pcsItemList.size() > 0) {
|
||||
|
||||
for (ItemRequest itemRequest : moduleList) {
|
||||
itemRequest.setCircuit(
|
||||
itemRequest.getCircuit().replaceAll("\\(", "").replaceAll("\\)", ""));
|
||||
}
|
||||
|
||||
if (pcsItemList.size() == 1) {
|
||||
pcsItemList.get(0).setCircuitCfg(this.getPcsCircuitCtg(moduleList));
|
||||
} else {
|
||||
if (moduleList != null && moduleList.size() > 0) {
|
||||
int j = 1;
|
||||
for (ItemRequest data : pcsItemList) {
|
||||
String val = data.getItemId();
|
||||
String val = String.valueOf(j);
|
||||
|
||||
List<ItemRequest> resultList =
|
||||
moduleList.stream()
|
||||
.filter(t -> StringUtils.equals(val, t.getPcItemId()))
|
||||
.filter(t -> StringUtils.equals(val, t.getCircuit().split("-")[0]))
|
||||
.collect(Collectors.toList());
|
||||
data.setCircuitCfg(this.getPcsCircuitCtg(resultList));
|
||||
j++;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2306,7 +2316,7 @@ public class EstimateService {
|
||||
// ArrayList 생성 변환
|
||||
ArrayList<String> list = new ArrayList<String>();
|
||||
for (ItemRequest pcsSerItemReq : circuitList) {
|
||||
list.add(pcsSerItemReq.getCircuit().replaceAll("\\(", "").replaceAll("\\)", ""));
|
||||
list.add(pcsSerItemReq.getCircuit());
|
||||
}
|
||||
|
||||
// ArrayList 회로 중복수 오름차순 정렬
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user