IIM연동시 개발 인터페이스를 추가로 만들어 준다
eapim-admin CI / build (push) Has been cancelled

This commit is contained in:
eastargh
2026-08-11 15:17:19 +09:00
parent d8a1ca84e2
commit 347cca2d7c
4 changed files with 108 additions and 6 deletions
@@ -14,12 +14,29 @@ class KJBInterfaceDao extends SqlMapClientTemplateDao {
private static final Logger logger = LoggerFactory.getLogger(InterfaceDao.class);
public void lazyInsertToIF01(HashMap paramMap) throws Exception {
this.template.insert("Interface.insertToIF01", paramMap);
}
public HashMap selectDetail(HashMap paramMap) throws Exception {
return (HashMap) template.queryForObject("Interface.selectDetail", paramMap);
}
public void lazyInsertToIF01(HashMap paramMap) throws Exception {
this.template.insert("Interface.insertToIF01", paramMap);
}
public HashMap selectDetailAPI(HashMap paramMap) throws Exception {
return (HashMap) template.queryForObject("Interface.selectDetailAPI", paramMap);
}
public void insertToHE01(HashMap paramMap) throws Exception {
this.template.insert("Interface.insertToHE01", paramMap);
}
public void insertToHE02(HashMap paramMap) throws Exception {
this.template.insert("Interface.insertToHE02", paramMap);
}
public void deleteToHE02(HashMap paramMap) throws Exception {
this.template.insert("Interface.deleteToHE02", paramMap);
}
}
@@ -20,5 +20,15 @@ class KJBInterfaceService {
dao.lazyInsertToIF01(param);
}
}
public void insertInterface(HashMap<String, Object> param) throws Exception {
HashMap detail = dao.selectDetailAPI(param);
if (detail == null) {
dao.insertToHE01(param);
dao.deleteToHE02(param);
dao.insertToHE02(param);
}
}
}
@@ -1223,22 +1223,64 @@ public class LayoutSyncController extends OnlBaseAnnotationController implements
String serviceName = (String) header.get("ServiceName");
String command = (String) header.get("Command");
String interfaceId = (String) body.get("interfaceCode");
Object layoutObject = body.get("Layout");
param.put("serviceName", serviceName);
param.put("command", command);
param.put("recvAmndHMS", recvTime);
//interfaceId 9번째 글자가 D가 아니면 interfaceId의 8번째 자리에 D를 추가하여 insert한다
boolean isDevMake = !"D".equals(interfaceId.substring(7,8));
if (command.equals("insert")) {
insertInterfaceDjb(interfaceId, body);
if (isDevMake) {
interfaceId = interfaceId.substring(0,8) + "D" + interfaceId.substring(8);
insertInterfaceDjb(interfaceId, body);
}
}
JSONArray layoutArray = null;
if (layoutObject instanceof JSONArray) {
layoutArray = (JSONArray) layoutObject;
for (int i = 0; i < layoutArray.size(); i++) {
syncLayout(param, body, command, (JSONObject) layoutArray.get(i));
JSONObject layout = (JSONObject) layoutArray.get(i);
syncLayout(param, body, command, layout);
if (isDevMake) {
String layoutName = (String) layout.get("id");
layoutName = layoutName.substring(0,12) + "D" + layoutName.substring(12);
layout.put("id", layoutName);
syncLayout(param, body, command, layout);
}
}
} else {
syncLayout(param, body, command, (JSONObject) layoutObject);
JSONObject layout = (JSONObject) layoutObject;
syncLayout(param, body, command, layout);
if (isDevMake) {
String layoutName = (String) layout.get("id");
layoutName = layoutName.substring(0,12) + "D" + layoutName.substring(12);
layout.put("id", layoutName);
syncLayout(param, body, command, layout);
}
}
}
private void insertInterfaceDjb(String interfaceId, JSONObject body) throws Exception
{
HashMap<String, Object> param = new HashMap<String, Object>();
String bizCode = (String) body.get("bzSystemCode");
String interfaceDesc = (String) body.get("interfaceDesc");
param.put("EAISVCNAME", interfaceId);
param.put("EAIBZWKDSTCD", bizCode);
param.put("EAISVCDESC", interfaceDesc);
interfaceService.insertInterface(param);
}
}