Djb 커스텀 원복
eapim-admin CI / build (push) Waiting to run

This commit is contained in:
eastargh
2026-07-20 14:47:59 +09:00
parent f1f7576b9d
commit 95e31befbb
@@ -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<String, String> 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<String, String> 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("단독 레이아웃 연동은 지원하지 않습니다.");
}
}
}