eCams 연동시 로그 저장
This commit is contained in:
@@ -47,7 +47,7 @@
|
|||||||
mtype: 'POST',
|
mtype: 'POST',
|
||||||
url: url,
|
url: url,
|
||||||
postData: getSearchForJqgrid("cmd", "LIST"),
|
postData: getSearchForJqgrid("cmd", "LIST"),
|
||||||
colNames: ['No', 'Service Name', 'Command', '레이아웃명', '연동시간', '결과', '결과메세지'],
|
colNames: ['No', '서비스명', 'Command', '연동구분명', '연동시간', '결과', '결과메세지'],
|
||||||
colModel: [
|
colModel: [
|
||||||
{name: 'seqno', align: 'center', width: 50, sortable: false},
|
{name: 'seqno', align: 'center', width: 50, sortable: false},
|
||||||
{name: 'serviceName', align: 'center', width: 100, sortable: false},
|
{name: 'serviceName', align: 'center', width: 100, sortable: false},
|
||||||
@@ -123,8 +123,8 @@
|
|||||||
<div class="search_wrap">
|
<div class="search_wrap">
|
||||||
<button type="button" class="cssbtn" id="btn_search" level="R"><i class="material-icons">search</i> <%= localeMessage.getString("button.search") %></button>
|
<button type="button" class="cssbtn" id="btn_search" level="R"><i class="material-icons">search</i> <%= localeMessage.getString("button.search") %></button>
|
||||||
</div>
|
</div>
|
||||||
<div class="title">전문레이아웃 연동 이력<span class="tooltip">IIM에서 연동한 인터페이스 및 전문 레이아웃 이력을 조회합니다.</span></div>
|
<div class="title">연동 배포 이력<span class="tooltip">IIM 레이아웃 연동 이력과 eCams 인터페이스 배포 이력을 조회합니다.</span></div>
|
||||||
<form id="ajaxForm" onsubmit="return false;">
|
<form id="ajaxForm" onsubmit="return false;">
|
||||||
<table class="search_condition" cellspacing=0;>
|
<table class="search_condition" cellspacing=0;>
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col style="width:120px;"><col style="width:260px;">
|
<col style="width:120px;"><col style="width:260px;">
|
||||||
@@ -133,8 +133,6 @@
|
|||||||
</colgroup>
|
</colgroup>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<th>레이아웃명</th>
|
|
||||||
<td><input type="text" name="searchLoutName" autocomplete="off" style="width:95%;"></td>
|
|
||||||
<th>연동시간</th>
|
<th>연동시간</th>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" name="searchStartYYYYMMDD" id="startDatepicker" readonly="readonly" value="" size="10" style="width:100px; border:1px solid #ebebec;">
|
<input type="text" name="searchStartYYYYMMDD" id="startDatepicker" readonly="readonly" value="" size="10" style="width:100px; border:1px solid #ebebec;">
|
||||||
@@ -143,6 +141,14 @@
|
|||||||
<input type="hidden" name="searchStartDate" value="">
|
<input type="hidden" name="searchStartDate" value="">
|
||||||
<input type="hidden" name="searchEndDate" value="">
|
<input type="hidden" name="searchEndDate" value="">
|
||||||
</th>
|
</th>
|
||||||
|
<th>서비스명</th>
|
||||||
|
<td><input type="text" name="searchServiceName" autocomplete="off" style="width:95%;"></td>
|
||||||
|
<th>Command</th>
|
||||||
|
<td><input type="text" name="searchCommand" autocomplete="off" style="width:95%;"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>연동구분명</th>
|
||||||
|
<td><input type="text" name="searchLoutName" autocomplete="off" style="width:95%;"></td>
|
||||||
<th>결과</th>
|
<th>결과</th>
|
||||||
<td>
|
<td>
|
||||||
<div class="select-style" style="display:inline-block; margin-left:6px;">
|
<div class="select-style" style="display:inline-block; margin-left:6px;">
|
||||||
@@ -153,6 +159,8 @@
|
|||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
<th></th>
|
||||||
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
+6
@@ -31,6 +31,12 @@ public class LayoutSyncHistoryService extends AbstractDataService<LayoutSyncHist
|
|||||||
if (StringUtils.isNotBlank(search.getSearchLoutName())) {
|
if (StringUtils.isNotBlank(search.getSearchLoutName())) {
|
||||||
query.where(q.loutname.containsIgnoreCase(search.getSearchLoutName()));
|
query.where(q.loutname.containsIgnoreCase(search.getSearchLoutName()));
|
||||||
}
|
}
|
||||||
|
if (StringUtils.isNotBlank(search.getSearchServiceName())) {
|
||||||
|
query.where(q.servicename.containsIgnoreCase(search.getSearchServiceName()));
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(search.getSearchCommand())) {
|
||||||
|
query.where(q.command.containsIgnoreCase(search.getSearchCommand()));
|
||||||
|
}
|
||||||
if (StringUtils.isNotBlank(search.getSearchStartDate())) {
|
if (StringUtils.isNotBlank(search.getSearchStartDate())) {
|
||||||
query.where(q.recvamndhms.goe(parseYYYYMMDD(search.getSearchStartDate()).atStartOfDay()));
|
query.where(q.recvamndhms.goe(parseYYYYMMDD(search.getSearchStartDate()).atStartOfDay()));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package com.eactive.eai.rms.onl.loader.controller;
|
package com.eactive.eai.rms.onl.loader.controller;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileInputStream;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.net.URLDecoder;
|
import java.net.URLDecoder;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@@ -1451,77 +1451,92 @@ public class LoaderController implements InterceptorSkipController {
|
|||||||
*/
|
*/
|
||||||
@SuppressWarnings("rawtypes")
|
@SuppressWarnings("rawtypes")
|
||||||
@RequestMapping( params ={"cmd=interface","control=downloadfull"})
|
@RequestMapping( params ={"cmd=interface","control=downloadfull"})
|
||||||
public ModelAndView interfaceDownLoadFully(String serviceType, String interfaceId) throws Exception {
|
public ModelAndView interfaceDownLoadFully(String serviceType, String interfaceId) {
|
||||||
DataSourceType dt = DataSourceTypeManager.getDataSourceType(serviceType);
|
DataSourceType dt = DataSourceTypeManager.getDataSourceType(serviceType);
|
||||||
DataSourceContextHolder.setDataSourceType(dt);
|
DataSourceContextHolder.setDataSourceType(dt);
|
||||||
|
|
||||||
// 1. interface 데이터 다운로드
|
String json = "";
|
||||||
InterfaceDeployPack interfaceDeployPack = new InterfaceDeployPack();
|
try {
|
||||||
|
// 1. interface 데이터 다운로드
|
||||||
|
InterfaceDeployPack interfaceDeployPack = new InterfaceDeployPack();
|
||||||
|
|
||||||
EAIMessageDeploy eaiMessageDeploy = interfaceDeployService.selectDeploy(interfaceId);
|
EAIMessageDeploy eaiMessageDeploy = interfaceDeployService.selectDeploy(interfaceId);
|
||||||
eaiMessageDeploy.setEailastamndyms(null);
|
eaiMessageDeploy.setEailastamndyms(null);
|
||||||
|
|
||||||
interfaceDeployPack.setEaiMessageDeploy(eaiMessageDeploy);
|
interfaceDeployPack.setEaiMessageDeploy(eaiMessageDeploy);
|
||||||
|
|
||||||
for(StandardMessageInfoDeploy standardMessageInfoDeploy : eaiMessageDeploy.getStandardMessageInfoDeploys()){
|
for(StandardMessageInfoDeploy standardMessageInfoDeploy : eaiMessageDeploy.getStandardMessageInfoDeploys()){
|
||||||
standardMessageInfoDeploy.setEailastamndyms(null);
|
standardMessageInfoDeploy.setEailastamndyms(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (ServiceMessageDeploy serviceMessageDeploy : eaiMessageDeploy.getServiceMessages()){
|
for (ServiceMessageDeploy serviceMessageDeploy : eaiMessageDeploy.getServiceMessages()){
|
||||||
String[] transformNames = {serviceMessageDeploy.getChngmsgidname(), serviceMessageDeploy.getBascrspnschngmsgidname()};
|
String[] transformNames = {serviceMessageDeploy.getChngmsgidname(), serviceMessageDeploy.getBascrspnschngmsgidname()};
|
||||||
// 2. Layout 데이터 생성
|
// 2. Layout 데이터 생성
|
||||||
for(String transformName: transformNames){
|
for(String transformName: transformNames){
|
||||||
if(StringUtils.isBlank(transformName)){
|
if(StringUtils.isBlank(transformName)){
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
for(TransformSourceResultUI transformSourceResultUI : transform2Service.selectTransformSourceResult(transformName)){
|
|
||||||
String loutName = transformSourceResultUI.getLoutName();
|
|
||||||
if(StringUtils.isBlank(loutName)){
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
LayoutDeploy layoutDeploy = layoutDeployService.selectDeploy(loutName);
|
|
||||||
layoutDeploy.setLastamndhms(null);
|
for(TransformSourceResultUI transformSourceResultUI : transform2Service.selectTransformSourceResult(transformName)){
|
||||||
interfaceDeployPack.getLayoutDeployList().add(layoutDeploy);
|
String loutName = transformSourceResultUI.getLoutName();
|
||||||
|
if(StringUtils.isBlank(loutName)){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
LayoutDeploy layoutDeploy = layoutDeployService.selectDeploy(loutName);
|
||||||
|
layoutDeploy.setLastamndhms(null);
|
||||||
|
interfaceDeployPack.getLayoutDeployList().add(layoutDeploy);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 3. Transform 데이터 생성
|
||||||
|
TransformDeploy transformDeploy = transformDeployService.selectDeploy(transformName);
|
||||||
|
transformDeploy.setLastamndhms(null);
|
||||||
|
interfaceDeployPack.getTransformDeployList().add(transformDeploy);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 3. Transform 데이터 생성
|
|
||||||
TransformDeploy transformDeploy = transformDeployService.selectDeploy(transformName);
|
|
||||||
transformDeploy.setLastamndhms(null);
|
|
||||||
interfaceDeployPack.getTransformDeployList().add(transformDeploy);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 4. API 스펙 정보(ptl_api_spec_info) 추가 (감사(audit) 컬럼은 제외)
|
||||||
|
Optional<ApiSpecInfo> optSpecInfo = apiSpecInfoService.findById(interfaceId);
|
||||||
|
if (optSpecInfo.isPresent()) {
|
||||||
|
ApiSpecInfoUI specInfo = apiSpecUIMapper.mapToUI(optSpecInfo.get());
|
||||||
|
specInfo.setCreatedBy(null);
|
||||||
|
specInfo.setCreatedDate(null);
|
||||||
|
specInfo.setLastModifiedBy(null);
|
||||||
|
specInfo.setLastModifiedDate(null);
|
||||||
|
interfaceDeployPack.setSpecInfo(specInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
ObjectMapper objectMapper = new ObjectMapper();
|
||||||
|
objectMapper.registerModule(new JavaTimeModule());
|
||||||
|
objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
|
||||||
|
ObjectWriter writer = objectMapper.writerWithDefaultPrettyPrinter();
|
||||||
|
String bizCode = eaiMessageDeploy.getEaibzwkdstcd();
|
||||||
|
String ioMapPath = monitoringContext.getStringProperty(MonitoringContext.IOMAP_DOWNLOAD_PATH);
|
||||||
|
String fileDir = FilenameUtils.concat(ioMapPath, bizCode);
|
||||||
|
String fileFullPath = FilenameUtils.concat(fileDir, interfaceId+".json");
|
||||||
|
|
||||||
|
FileWriteUtil.makeDirWithGroupPermission(fileDir);
|
||||||
|
File file = new File(fileFullPath);
|
||||||
|
json = writer.writeValueAsString(interfaceDeployPack);
|
||||||
|
FileUtils.writeStringToFile(file, json, StandardCharsets.UTF_8);
|
||||||
|
|
||||||
|
// TSEAITR10 배포 이력 저장 (SERVICENAME=eCams, COMMAND=downloadfull, LOUTNAME=interfaceId, RECVDATA=json)
|
||||||
|
loaderService.insertDeploySyncLog(dt, "downloadfull", interfaceId, json);
|
||||||
|
|
||||||
|
Map<String,String> result = new HashMap<>();
|
||||||
|
result.put("status", "success");
|
||||||
|
result.put("message", fileFullPath+" write done.");
|
||||||
|
|
||||||
|
return new ModelAndView(resultView, "result", result);
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("interface downloadfull error - interfaceId=" + interfaceId, e);
|
||||||
|
loaderService.insertDeployFailLog(dt, "downloadfull", interfaceId, json, e.toString());
|
||||||
|
|
||||||
|
Map<String,String> result = new HashMap<>();
|
||||||
|
result.put("status", "fail");
|
||||||
|
result.put("message", e.toString());
|
||||||
|
|
||||||
|
return new ModelAndView(resultView, "result", result);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 4. API 스펙 정보(ptl_api_spec_info) 추가 (감사(audit) 컬럼은 제외)
|
|
||||||
Optional<ApiSpecInfo> optSpecInfo = apiSpecInfoService.findById(interfaceId);
|
|
||||||
if (optSpecInfo.isPresent()) {
|
|
||||||
ApiSpecInfoUI specInfo = apiSpecUIMapper.mapToUI(optSpecInfo.get());
|
|
||||||
specInfo.setCreatedBy(null);
|
|
||||||
specInfo.setCreatedDate(null);
|
|
||||||
specInfo.setLastModifiedBy(null);
|
|
||||||
specInfo.setLastModifiedDate(null);
|
|
||||||
interfaceDeployPack.setSpecInfo(specInfo);
|
|
||||||
}
|
|
||||||
|
|
||||||
ObjectMapper objectMapper = new ObjectMapper();
|
|
||||||
objectMapper.registerModule(new JavaTimeModule());
|
|
||||||
objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
|
|
||||||
ObjectWriter writer = objectMapper.writerWithDefaultPrettyPrinter();
|
|
||||||
String bizCode = eaiMessageDeploy.getEaibzwkdstcd();
|
|
||||||
String ioMapPath = monitoringContext.getStringProperty(MonitoringContext.IOMAP_DOWNLOAD_PATH);
|
|
||||||
String fileDir = FilenameUtils.concat(ioMapPath, bizCode);
|
|
||||||
String fileFullPath = FilenameUtils.concat(fileDir, interfaceId+".json");
|
|
||||||
|
|
||||||
FileWriteUtil.makeDirWithGroupPermission(fileDir);
|
|
||||||
File file = new File(fileFullPath);
|
|
||||||
writer.writeValue(file, interfaceDeployPack);
|
|
||||||
|
|
||||||
Map<String,String> result = new HashMap<>();
|
|
||||||
String status = "success";
|
|
||||||
result.put("status", status);
|
|
||||||
result.put("message", fileFullPath+" write done.");
|
|
||||||
|
|
||||||
return new ModelAndView(resultView, "result", result);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1533,57 +1548,73 @@ public class LoaderController implements InterceptorSkipController {
|
|||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping( params ={"cmd=interface","control=uploadfull"})
|
@RequestMapping( params ={"cmd=interface","control=uploadfull"})
|
||||||
public ModelAndView interfaceLoadFully(String serviceType, String filePath) throws Exception {
|
public ModelAndView interfaceLoadFully(String serviceType, String filePath) {
|
||||||
DataSourceType dt = DataSourceTypeManager.getDataSourceType(serviceType);
|
DataSourceType dt = DataSourceTypeManager.getDataSourceType(serviceType);
|
||||||
DataSourceContextHolder.setDataSourceType(dt);
|
DataSourceContextHolder.setDataSourceType(dt);
|
||||||
|
|
||||||
String ioMapPath = monitoringContext.getStringProperty(MonitoringContext.IOMAP_UPLOAD_PATH);
|
String json = "";
|
||||||
String fileFullPath ;
|
String loutName = filePath;
|
||||||
if(StringUtils.isBlank(ioMapPath)) {
|
try {
|
||||||
fileFullPath = filePath;
|
String ioMapPath = monitoringContext.getStringProperty(MonitoringContext.IOMAP_UPLOAD_PATH);
|
||||||
} else {
|
String fileFullPath ;
|
||||||
fileFullPath = FilenameUtils.concat(ioMapPath, filePath);
|
if(StringUtils.isBlank(ioMapPath)) {
|
||||||
}
|
fileFullPath = filePath;
|
||||||
|
|
||||||
File file = new File(fileFullPath);
|
|
||||||
InputStream inputStream = new FileInputStream(file);
|
|
||||||
// ObjectMapper 생성 및 설정
|
|
||||||
ObjectMapper objectMapper = new ObjectMapper();
|
|
||||||
objectMapper.registerModule(new JavaTimeModule());
|
|
||||||
InterfaceDeployPack interfaceDeployPack = objectMapper.readValue(inputStream, InterfaceDeployPack.class);
|
|
||||||
|
|
||||||
EAIMessageDeploy eaiMessageDeploy = interfaceDeployPack.getEaiMessageDeploy();
|
|
||||||
|
|
||||||
interfaceDeployService.saveDeploy(eaiMessageDeploy);
|
|
||||||
agentUtilService.broadcast(new CommonCommand("com.ext.eai.agent.stdmessage.ReloadSTDMessageCommand", "ALL"));
|
|
||||||
agentUtilService.broadcast(new CommonCommand("com.eactive.eai.agent.eaimessage.ReloadEAIMessageCommand", eaiMessageDeploy.getEaisvcname()));
|
|
||||||
|
|
||||||
for(LayoutDeploy layoutDeploy: interfaceDeployPack.getLayoutDeployList()){
|
|
||||||
layoutDeployService.saveDeploy(layoutDeploy);
|
|
||||||
agentUtilService.broadcast(new CommonCommand( "com.eactive.eai.agent.transformer.ReloadLayoutCommand", layoutDeploy.getLoutname()));
|
|
||||||
}
|
|
||||||
|
|
||||||
for(TransformDeploy transformDeploy : interfaceDeployPack.getTransformDeployList()){
|
|
||||||
transformDeployService.saveDeploy(transformDeploy);
|
|
||||||
agentUtilService.broadcast(new CommonCommand( "com.eactive.eai.agent.transformer.ReloadTransformCommand", transformDeploy.getCnvsnname()));
|
|
||||||
}
|
|
||||||
|
|
||||||
ApiSpecInfoUI specInfoUI = interfaceDeployPack.getSpecInfo();
|
|
||||||
if (specInfoUI != null && StringUtils.isNotBlank(specInfoUI.getApiId())) {
|
|
||||||
ApiSpecInfo specInfo = apiSpecUIMapper.mapToEntity(specInfoUI);
|
|
||||||
if (apiSpecInfoService.findById(specInfo.getApiId()).isPresent()) {
|
|
||||||
apiSpecInfoService.updateById(specInfo.getApiId(), specInfo);
|
|
||||||
} else {
|
} else {
|
||||||
apiSpecInfoService.create(specInfo);
|
fileFullPath = FilenameUtils.concat(ioMapPath, filePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
File file = new File(fileFullPath);
|
||||||
|
json = FileUtils.readFileToString(file, StandardCharsets.UTF_8);
|
||||||
|
// ObjectMapper 생성 및 설정
|
||||||
|
ObjectMapper objectMapper = new ObjectMapper();
|
||||||
|
objectMapper.registerModule(new JavaTimeModule());
|
||||||
|
InterfaceDeployPack interfaceDeployPack = objectMapper.readValue(json, InterfaceDeployPack.class);
|
||||||
|
|
||||||
|
EAIMessageDeploy eaiMessageDeploy = interfaceDeployPack.getEaiMessageDeploy();
|
||||||
|
loutName = eaiMessageDeploy.getEaisvcname();
|
||||||
|
|
||||||
|
interfaceDeployService.saveDeploy(eaiMessageDeploy);
|
||||||
|
agentUtilService.broadcast(new CommonCommand("com.ext.eai.agent.stdmessage.ReloadSTDMessageCommand", "ALL"));
|
||||||
|
agentUtilService.broadcast(new CommonCommand("com.eactive.eai.agent.eaimessage.ReloadEAIMessageCommand", eaiMessageDeploy.getEaisvcname()));
|
||||||
|
|
||||||
|
for(LayoutDeploy layoutDeploy: interfaceDeployPack.getLayoutDeployList()){
|
||||||
|
layoutDeployService.saveDeploy(layoutDeploy);
|
||||||
|
agentUtilService.broadcast(new CommonCommand( "com.eactive.eai.agent.transformer.ReloadLayoutCommand", layoutDeploy.getLoutname()));
|
||||||
|
}
|
||||||
|
|
||||||
|
for(TransformDeploy transformDeploy : interfaceDeployPack.getTransformDeployList()){
|
||||||
|
transformDeployService.saveDeploy(transformDeploy);
|
||||||
|
agentUtilService.broadcast(new CommonCommand( "com.eactive.eai.agent.transformer.ReloadTransformCommand", transformDeploy.getCnvsnname()));
|
||||||
|
}
|
||||||
|
|
||||||
|
ApiSpecInfoUI specInfoUI = interfaceDeployPack.getSpecInfo();
|
||||||
|
if (specInfoUI != null && StringUtils.isNotBlank(specInfoUI.getApiId())) {
|
||||||
|
ApiSpecInfo specInfo = apiSpecUIMapper.mapToEntity(specInfoUI);
|
||||||
|
if (apiSpecInfoService.findById(specInfo.getApiId()).isPresent()) {
|
||||||
|
apiSpecInfoService.updateById(specInfo.getApiId(), specInfo);
|
||||||
|
} else {
|
||||||
|
apiSpecInfoService.create(specInfo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// TSEAITR10 배포 이력 저장 (SERVICENAME=eCams, COMMAND=uploadfull, LOUTNAME=eaisvcname, RECVDATA=json)
|
||||||
|
loaderService.insertDeploySyncLog(dt, "uploadfull", loutName, json);
|
||||||
|
|
||||||
|
Map<String,String> result = new HashMap<String,String>();
|
||||||
|
result.put("status", "success");
|
||||||
|
result.put("message", fileFullPath+" deploy done.");
|
||||||
|
|
||||||
|
return new ModelAndView(resultView, "result", result);
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("interface uploadfull error - filePath=" + filePath, e);
|
||||||
|
loaderService.insertDeployFailLog(dt, "uploadfull", loutName, json, e.toString());
|
||||||
|
|
||||||
|
Map<String,String> result = new HashMap<String,String>();
|
||||||
|
result.put("status", "fail");
|
||||||
|
result.put("message", e.toString());
|
||||||
|
|
||||||
|
return new ModelAndView(resultView, "result", result);
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String,String> result = new HashMap<String,String>();
|
|
||||||
String status = "success";
|
|
||||||
result.put("status", status);
|
|
||||||
result.put("message", fileFullPath+" deploy done.");
|
|
||||||
|
|
||||||
return new ModelAndView(resultView, "result", result);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,4 +41,9 @@ public interface LoaderDao {
|
|||||||
public List<LinkedHashMap> selectTableDataForListValue( DataSourceType dataSourceType, String tableName, String key1, List<String> param1 ) ;
|
public List<LinkedHashMap> selectTableDataForListValue( DataSourceType dataSourceType, String tableName, String key1, List<String> param1 ) ;
|
||||||
|
|
||||||
public List<LinkedHashMap> selectSnaAdpApList( DataSourceType dataSourceType, String param1 ) ;
|
public List<LinkedHashMap> selectSnaAdpApList( DataSourceType dataSourceType, String param1 ) ;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TSEAITR10(배포/동기화 이력)에 로그 1건을 저장한다.
|
||||||
|
*/
|
||||||
|
public int insertSyncLog( DataSourceType dt, HashMap<String, String> param ) ;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -189,10 +189,15 @@ public class LoaderDaoImpl extends SqlMapClientTemplateDao implements LoaderDao
|
|||||||
// }
|
// }
|
||||||
// }.execute();
|
// }.execute();
|
||||||
}
|
}
|
||||||
|
public int insertSyncLog( DataSourceType dt, HashMap<String, String> param ) {
|
||||||
|
param.put("schemaId", dt.getSchema());
|
||||||
|
return this.template.update("Layout.insertLayoutSyncLog", param);
|
||||||
|
}
|
||||||
|
|
||||||
public List<LinkedHashMap> selectSnaAdpApList( DataSourceType dataSourceType, String param1 ) {
|
public List<LinkedHashMap> selectSnaAdpApList( DataSourceType dataSourceType, String param1 ) {
|
||||||
final HashMap param = new HashMap();
|
final HashMap param = new HashMap();
|
||||||
param.put("param1", param1);
|
param.put("param1", param1);
|
||||||
|
|
||||||
return template.queryForList("Loader.selectSnaAdpApList", param);
|
return template.queryForList("Loader.selectSnaAdpApList", param);
|
||||||
|
|
||||||
// return new SpecifiedDataSourceExecutor<List<LinkedHashMap>>(
|
// return new SpecifiedDataSourceExecutor<List<LinkedHashMap>>(
|
||||||
|
|||||||
@@ -157,5 +157,15 @@ public interface TransactionLoaderService{
|
|||||||
|
|
||||||
public HashMap syncResult(Command command ,String fileName ) throws Exception;
|
public HashMap syncResult(Command command ,String fileName ) throws Exception;
|
||||||
|
|
||||||
public void appendToListfile(String bizCode, String interfaceId) throws Exception ;
|
public void appendToListfile(String bizCode, String interfaceId) throws Exception ;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* downloadfull / uploadfull 성공 시 TSEAITR10 에 배포 이력을 저장한다. (PRCSSRSLT=S)
|
||||||
|
*/
|
||||||
|
public void insertDeploySyncLog(DataSourceType dt, String command, String interfaceId, String recvData) ;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* downloadfull / uploadfull 실패 시 TSEAITR10 에 실패 이력을 저장한다. (PRCSSRSLT=F, PRCSSRSLTCMNT=errMsg)
|
||||||
|
*/
|
||||||
|
public void insertDeployFailLog(DataSourceType dt, String command, String interfaceId, String recvData, String errMsg) ;
|
||||||
}
|
}
|
||||||
+30
@@ -2,6 +2,7 @@ package com.eactive.eai.rms.onl.loader.service;
|
|||||||
|
|
||||||
import com.eactive.eai.agent.command.Command;
|
import com.eactive.eai.agent.command.Command;
|
||||||
import com.eactive.eai.agent.command.CommonCommand;
|
import com.eactive.eai.agent.command.CommonCommand;
|
||||||
|
import com.eactive.eai.common.util.UUIDGenerator;
|
||||||
import com.eactive.eai.rms.common.base.BaseService;
|
import com.eactive.eai.rms.common.base.BaseService;
|
||||||
import com.eactive.eai.rms.common.context.MonitoringContext;
|
import com.eactive.eai.rms.common.context.MonitoringContext;
|
||||||
import com.eactive.eai.rms.common.converter.ElinkObjectMapper;
|
import com.eactive.eai.rms.common.converter.ElinkObjectMapper;
|
||||||
@@ -1483,4 +1484,33 @@ public class TransactionLoaderServiceImpl extends BaseService implements Transac
|
|||||||
String targetLine = bizCode+"|"+interfaceId+System.lineSeparator();
|
String targetLine = bizCode+"|"+interfaceId+System.lineSeparator();
|
||||||
org.apache.commons.io.FileUtils.writeStringToFile(listFile, targetLine, Charset.defaultCharset(), true);
|
org.apache.commons.io.FileUtils.writeStringToFile(listFile, targetLine, Charset.defaultCharset(), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void insertDeploySyncLog(DataSourceType dt, String command, String interfaceId, String recvData) {
|
||||||
|
insertDeployLog(dt, command, interfaceId, recvData, "S", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void insertDeployFailLog(DataSourceType dt, String command, String interfaceId, String recvData, String errMsg) {
|
||||||
|
insertDeployLog(dt, command, interfaceId, recvData, "F", errMsg);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void insertDeployLog(DataSourceType dt, String command, String interfaceId, String recvData,
|
||||||
|
String prcssRslt, String prcssRsltCmnt) {
|
||||||
|
try {
|
||||||
|
HashMap<String, String> param = new HashMap<String, String>();
|
||||||
|
param.put("logPrcssSeqno", UUIDGenerator.getUUID());
|
||||||
|
param.put("serviceName", "InterfaceDeploy");
|
||||||
|
param.put("command", command);
|
||||||
|
param.put("loutName", interfaceId);
|
||||||
|
param.put("recvData", recvData == null ? "" : recvData);
|
||||||
|
param.put("recvAmndHMS", DateUtil.getDateTime("yyyyMMddHHmmssSS").substring(0, 16));
|
||||||
|
param.put("prcssRslt", prcssRslt);
|
||||||
|
param.put("prcssRsltCmnt", StringUtils.left(prcssRsltCmnt, 4000)); // PRCSSRSLTCMNT 길이 보호
|
||||||
|
dao.insertSyncLog(dt, param);
|
||||||
|
} catch (Exception e) {
|
||||||
|
// 이력 저장 실패가 download/upload 본기능을 중단시키지 않도록 한다.
|
||||||
|
logger.error("insertDeployLog error (command=" + command + ", interfaceId=" + interfaceId + ")", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
+6
@@ -7,6 +7,12 @@ public class LayoutSyncHistoryUISearch {
|
|||||||
|
|
||||||
private String searchLoutName;
|
private String searchLoutName;
|
||||||
|
|
||||||
|
/* 서비스명 (부분일치) */
|
||||||
|
private String searchServiceName;
|
||||||
|
|
||||||
|
/* 커맨드 (부분일치) */
|
||||||
|
private String searchCommand;
|
||||||
|
|
||||||
/* 연동시간 기간 검색 (yyyyMMdd, 8자리) */
|
/* 연동시간 기간 검색 (yyyyMMdd, 8자리) */
|
||||||
private String searchStartDate;
|
private String searchStartDate;
|
||||||
private String searchEndDate;
|
private String searchEndDate;
|
||||||
|
|||||||
Reference in New Issue
Block a user