+3
-68
@@ -683,9 +683,7 @@ public class LayoutSyncController extends OnlBaseAnnotationController implements
|
|||||||
param.put("recvData", "");
|
param.put("recvData", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
//syncLayout(param, recvTime, json);
|
syncLayout(param, recvTime, json);
|
||||||
syncLayoutDjb(param, recvTime, json);
|
|
||||||
|
|
||||||
// results.getChild("Result").setText("S".equals(param.get("prcssRslt"))?"True":"False");
|
// results.getChild("Result").setText("S".equals(param.get("prcssRslt"))?"True":"False");
|
||||||
// results.getChild("ResultMessage").setText("S".equals(param.get("prcssRslt"))?"성공":param.get("prcssRsltCmnt"));
|
// 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)
|
private void syncLayout(HashMap<String, String> param, JSONObject body, String command, JSONObject layout)
|
||||||
throws Exception, BizException, ParseException {
|
throws Exception, BizException, ParseException {
|
||||||
|
|
||||||
String id = (String) layout.get("id");
|
String layoutName = (String) layout.get("id");
|
||||||
String layoutName = (String) layout.get("layoutName");
|
|
||||||
if (StringUtils.isEmpty(layoutName)) {
|
|
||||||
layoutName = id;
|
|
||||||
}
|
|
||||||
String useSystem = (String) layout.get("usesystem");
|
String useSystem = (String) layout.get("usesystem");
|
||||||
|
|
||||||
param.put("logPrcssSeqno", UUIDGenerator.getUUID());
|
param.put("logPrcssSeqno", UUIDGenerator.getUUID());
|
||||||
@@ -941,7 +935,7 @@ public class LayoutSyncController extends OnlBaseAnnotationController implements
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!id.matches(fattern)) {
|
if(!layoutName.matches(fattern)) {
|
||||||
throw new BizException("잘못된 전문레이아웃명 입니다.\n명명규칙을 확인하세요.\n"+fattern);
|
throw new BizException("잘못된 전문레이아웃명 입니다.\n명명규칙을 확인하세요.\n"+fattern);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -962,7 +956,6 @@ public class LayoutSyncController extends OnlBaseAnnotationController implements
|
|||||||
vo.put("loutName",layoutName);
|
vo.put("loutName",layoutName);
|
||||||
vo.put("loutPtrnName",msgType); // ASCII, EBCDIC, XML
|
vo.put("loutPtrnName",msgType); // ASCII, EBCDIC, XML
|
||||||
vo.put("loutDesc",layout.get("desc"));
|
vo.put("loutDesc",layout.get("desc"));
|
||||||
vo.put("useYn", "1");
|
|
||||||
|
|
||||||
String date = (String) layout.get("date");
|
String date = (String) layout.get("date");
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
@@ -1191,62 +1184,4 @@ public class LayoutSyncController extends OnlBaseAnnotationController implements
|
|||||||
return null ;
|
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("단독 레이아웃 연동은 지원하지 않습니다.");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user