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