From 95e31befbb6c59b9100ada9758c0632ddb1c40f4 Mon Sep 17 00:00:00 2001 From: eastargh Date: Mon, 20 Jul 2026 14:47:59 +0900 Subject: [PATCH] =?UTF-8?q?Djb=20=EC=BB=A4=EC=8A=A4=ED=85=80=20=EC=9B=90?= =?UTF-8?q?=EB=B3=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rule/layoutsync/LayoutSyncController.java | 73 +------------------ 1 file changed, 4 insertions(+), 69 deletions(-) diff --git a/src/main/java/com/eactive/eai/rms/onl/manage/rule/layoutsync/LayoutSyncController.java b/src/main/java/com/eactive/eai/rms/onl/manage/rule/layoutsync/LayoutSyncController.java index 907f678..b8df9ea 100644 --- a/src/main/java/com/eactive/eai/rms/onl/manage/rule/layoutsync/LayoutSyncController.java +++ b/src/main/java/com/eactive/eai/rms/onl/manage/rule/layoutsync/LayoutSyncController.java @@ -683,9 +683,7 @@ public class LayoutSyncController extends OnlBaseAnnotationController implements param.put("recvData", ""); } - //syncLayout(param, recvTime, json); - syncLayoutDjb(param, recvTime, json); - + syncLayout(param, recvTime, json); // results.getChild("Result").setText("S".equals(param.get("prcssRslt"))?"True":"False"); // results.getChild("ResultMessage").setText("S".equals(param.get("prcssRslt"))?"성공":param.get("prcssRsltCmnt")); @@ -902,11 +900,7 @@ public class LayoutSyncController extends OnlBaseAnnotationController implements private void syncLayout(HashMap param, JSONObject body, String command, JSONObject layout) throws Exception, BizException, ParseException { - String id = (String) layout.get("id"); - String layoutName = (String) layout.get("layoutName"); - if (StringUtils.isEmpty(layoutName)) { - layoutName = id; - } + String layoutName = (String) layout.get("id"); String useSystem = (String) layout.get("usesystem"); param.put("logPrcssSeqno", UUIDGenerator.getUUID()); @@ -941,7 +935,7 @@ public class LayoutSyncController extends OnlBaseAnnotationController implements break; } - if(!id.matches(fattern)) { + if(!layoutName.matches(fattern)) { throw new BizException("잘못된 전문레이아웃명 입니다.\n명명규칙을 확인하세요.\n"+fattern); } @@ -961,8 +955,7 @@ public class LayoutSyncController extends OnlBaseAnnotationController implements // Layout Format (TR07) vo.put("loutName",layoutName); vo.put("loutPtrnName",msgType); // ASCII, EBCDIC, XML - vo.put("loutDesc",layout.get("desc")); - vo.put("useYn", "1"); + vo.put("loutDesc",layout.get("desc")); String date = (String) layout.get("date"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); @@ -1190,63 +1183,5 @@ public class LayoutSyncController extends OnlBaseAnnotationController implements } return null ; } - - - private void syncLayoutDjb(HashMap param, String recvTime, JSONObject json) - throws Exception, BizException, ParseException { - JSONObject header = (JSONObject) ((JSONObject) json.get("Message")).get("Header"); - JSONObject body = (JSONObject) ((JSONObject) json.get("Message")).get("Body"); - - String serviceName = (String) header.get("ServiceName"); - String command = (String) header.get("Command"); - - param.put("serviceName", serviceName); - param.put("command", command); - param.put("recvAmndHMS", recvTime); - - - Object layoutObject = body.get("Layout"); - - JSONArray layoutArray = null; - if (layoutObject instanceof JSONArray) { - - String interfaceId = (String) body.get("interfaceCode"); - if (interfaceId.startsWith("ES")) { - interfaceId = interfaceId.replaceFirst("ES", "AS"); - } - - layoutArray = (JSONArray) layoutObject; - - for (int i = 0; i < layoutArray.size(); i++) { - JSONObject layout = (JSONObject)layoutArray.get(i); - - String usesystem = (String)layout.get("usesystem"); - - if ("EAI".equals(usesystem)) { - String id = (String)layout.get("id"); - String inOutType = "OPA".equals(id.substring(5,8)) ? "S1" : "S2"; - String group = (String)layout.get("group"); - String ioType = (String)layout.get("ioType"); - - if ("I".equals(ioType)) { - layout.put("layoutName", group + "_" + interfaceId + inOutType + "_SRCS"); - syncLayout(param, body, command, layout); - - layout.put("layoutName", group + "_" + interfaceId + inOutType + "_TGTS"); - syncLayout(param, body, command, layout); - } else { - layout.put("layoutName", group + "_" + interfaceId + inOutType + "_SRCR"); - syncLayout(param, body, command, layout); - - layout.put("layoutName", group + "_" + interfaceId + inOutType + "_TGTR"); - syncLayout(param, body, command, layout); - } - } - } - - } else { - throw new BizException("단독 레이아웃 연동은 지원하지 않습니다."); - } - } }