레이아웃관리 - Array 아이템유형 추가
eapim-admin CI / build (push) Has been cancelled

This commit is contained in:
eastargh
2026-07-06 11:25:16 +09:00
parent f23cb02b1c
commit 142d402bad
5 changed files with 84 additions and 32 deletions
@@ -352,7 +352,7 @@ public class LayoutManService extends OnlBaseService {
}
if (max == 0 && min == 0) {
if ("GRID".equalsIgnoreCase(loutItemType)) {
if ("GRID".equalsIgnoreCase(loutItemType) || "ARRAY".equalsIgnoreCase(loutItemType)) {
min = 1;
max = -1;
} else {
@@ -371,7 +371,8 @@ public class LayoutManService extends OnlBaseService {
}
private String determineOccurNoItem(LayoutItemUI layoutItemUI, String loutItemType) {
if ("GRID".equalsIgnoreCase(loutItemType) && NumberUtils.toInt(layoutItemUI.getLoutItemOccCnt()) == 0) {
if (("GRID".equalsIgnoreCase(loutItemType) || "ARRAY".equalsIgnoreCase(loutItemType))
&& NumberUtils.toInt(layoutItemUI.getLoutItemOccCnt()) == 0) {
return "*";
}
return String.valueOf(layoutItemUI.getLoutItemOccCnt());
@@ -385,6 +386,8 @@ public class LayoutManService extends OnlBaseService {
node = Item.NODE_GROUP;
} else if ("ATTR".equalsIgnoreCase(el.getLoutItemType())) {
node = Item.NODE_ATTR;
} else if ("ARRAY".equalsIgnoreCase(el.getLoutItemType())) {
node = Item.NODE_FIELD;
} else {
node = Item.NODE_FIELD;
}
@@ -71,13 +71,33 @@ public interface LayoutItemUIMapper extends GenericMapper<LayoutItemUI, LayoutIt
itemType = isGridCondition ? "GRID" : "GROUP";
// isGridCondition이 참이고, 참조 정보2가 비어 있는 경우, itemLoopCount 설정
if (isGridCondition && StringUtils.isBlank(item.getLoutitemrefinfo2())
&& NumberUtils.isCreatable(item.getLoutitemoccurptrndstcd())
&& Integer.parseInt(item.getLoutitemoccurptrndstcd()) > -1 ) {
itemLoopCount = item.getLoutitemoccurptrndstcd();
if (isGridCondition && StringUtils.isBlank(item.getLoutitemrefinfo2())) {
if ("*".equals(item.getLoutitemoccurptrndstcd())) {
// 반복횟수로 '*'(무제한)이 저장된 경우, 화면 그리드에도 '*'을 그대로 표시
itemLoopCount = "*";
} else if (NumberUtils.isCreatable(item.getLoutitemoccurptrndstcd())
&& Integer.parseInt(item.getLoutitemoccurptrndstcd()) > -1) {
itemLoopCount = item.getLoutitemoccurptrndstcd();
}
}
} else if (ItemNodeType.FIELD.getNumber() == item.getLoutitemnodeptrnidname()) {
// 아이템 발생 포인터 명이 '*'이거나 숫자로 생성 가능한 경우
boolean isArrayCondition = "*".equals(item.getLoutitemoccurptrndstcd()) || NumberUtils.isCreatable(item.getLoutitemoccurptrndstcd());
// itemType을 ARRAY 또는 FIELD 로 설정
itemType = isArrayCondition ? "ARRAY" : "FIELD";
// isArrayCondition이 참이고, 참조 정보2가 비어 있는 경우, itemLoopCount 설정
if (isArrayCondition && StringUtils.isBlank(item.getLoutitemrefinfo2())) {
if ("*".equals(item.getLoutitemoccurptrndstcd())) {
// 반복횟수로 '*'(무제한)이 저장된 경우, 화면 그리드에도 '*'을 그대로 표시
itemLoopCount = "*";
} else if (NumberUtils.isCreatable(item.getLoutitemoccurptrndstcd())
&& Integer.parseInt(item.getLoutitemoccurptrndstcd()) > -1) {
itemLoopCount = item.getLoutitemoccurptrndstcd();
}
}
} else {
// 아이템 노드 타입이 GROUP 아닌 경우, 해당 노드 타입으로 itemType 설정
// 아이템 노드 타입이 GROUP/FIELD가 아닌 경우, 해당 노드 타입으로 itemType 설정
itemType = ItemNodeType.fromNumber(item.getLoutitemnodeptrnidname()).toString();
}
@@ -85,7 +105,7 @@ public interface LayoutItemUIMapper extends GenericMapper<LayoutItemUI, LayoutIt
itemUi.setLoutItemType(itemType);
if(NumberUtils.toInt(itemLoopCount) == 0){
if (!"*".equals(itemLoopCount) && NumberUtils.toInt(itemLoopCount) == 0) {
itemLoopCount = "";
}
itemUi.setLoutItemOccCnt(itemLoopCount);
@@ -71,10 +71,30 @@ public interface LayoutPopupUIMapper extends GenericMapper<LayoutPopupUI, Layout
itemType = isGridCondition ? "GRID" : "GROUP";
// isGridCondition이 참이고, 참조 정보2가 비어 있는 경우, itemLoopCount 설정
if (isGridCondition && StringUtils.isBlank(item.getLoutitemrefinfo2())
&& NumberUtils.isCreatable(item.getLoutitemoccurptrndstcd())
&& Integer.parseInt(item.getLoutitemoccurptrndstcd()) > -1 ) {
itemLoopCount = item.getLoutitemoccurptrndstcd();
if (isGridCondition && StringUtils.isBlank(item.getLoutitemrefinfo2())) {
if ("*".equals(item.getLoutitemoccurptrndstcd())) {
// 반복횟수로 '*'(무제한) 저장된 경우, 화면 그리드에도 '*' 그대로 표시
itemLoopCount = "*";
} else if (NumberUtils.isCreatable(item.getLoutitemoccurptrndstcd())
&& Integer.parseInt(item.getLoutitemoccurptrndstcd()) > -1) {
itemLoopCount = item.getLoutitemoccurptrndstcd();
}
}
} else if (ItemNodeType.FIELD.getNumber() == item.getLoutitemnodeptrnidname()) {
// 아이템 발생 포인터 명이 '*'이거나 숫자로 생성 가능한 경우
boolean isArrayCondition = "*".equals(item.getLoutitemoccurptrndstcd()) || NumberUtils.isCreatable(item.getLoutitemoccurptrndstcd());
// itemType을 ARRAY 또는 FIELD 설정
itemType = isArrayCondition ? "ARRAY" : "FIELD";
// isArrayCondition이 참이고, 참조 정보2가 비어 있는 경우, itemLoopCount 설정
if (isArrayCondition && StringUtils.isBlank(item.getLoutitemrefinfo2())) {
if ("*".equals(item.getLoutitemoccurptrndstcd())) {
// 반복횟수로 '*'(무제한) 저장된 경우, 화면 그리드에도 '*' 그대로 표시
itemLoopCount = "*";
} else if (NumberUtils.isCreatable(item.getLoutitemoccurptrndstcd())
&& Integer.parseInt(item.getLoutitemoccurptrndstcd()) > -1) {
itemLoopCount = item.getLoutitemoccurptrndstcd();
}
}
} else {
// 아이템 노드 타입이 GROUP이 아닌 경우, 해당 노드 타입으로 itemType 설정
@@ -85,7 +105,7 @@ public interface LayoutPopupUIMapper extends GenericMapper<LayoutPopupUI, Layout
popupUI.setLoutItemType(itemType);
if(NumberUtils.toInt(itemLoopCount) == 0){
if (!"*".equals(itemLoopCount) && NumberUtils.toInt(itemLoopCount) == 0) {
itemLoopCount = "";
}
popupUI.setLoutItemOccCnt(itemLoopCount);