mirror of
http://git.mhez-qa.uplus.co.kr/hubez/hubez-admin.git
synced 2025-12-06 22:19:41 +09:00
배치 모니터링 커밋
This commit is contained in:
@@ -2,6 +2,8 @@ import AustList from '../views/AuthList'
|
|||||||
import AdminList from '../views/AdminList'
|
import AdminList from '../views/AdminList'
|
||||||
import AuthAdd from '../views/AuthAdd'
|
import AuthAdd from '../views/AuthAdd'
|
||||||
import AuthModify from '../views/AuthModify'
|
import AuthModify from '../views/AuthModify'
|
||||||
|
import BatchList from '../views/BatchList'
|
||||||
|
import BatchDetail from '../views/BatchDetail'
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
{
|
{
|
||||||
@@ -28,6 +30,18 @@ export default [
|
|||||||
name: 'authModify',
|
name: 'authModify',
|
||||||
props: true,
|
props: true,
|
||||||
meta: { public: false }
|
meta: { public: false }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/sysMgt/batchList',
|
||||||
|
component: BatchList,
|
||||||
|
name: 'batchList',
|
||||||
|
meta: { public: false }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/sysMgt/batchDetail',
|
||||||
|
component: BatchDetail,
|
||||||
|
name: 'batchDetail',
|
||||||
|
meta: { public: false }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@@ -68,6 +68,20 @@ const resetPassword = (params) => {
|
|||||||
return httpClient.post('/api/v1/bo/login/resetPassword', params, { withCredentials: false });
|
return httpClient.post('/api/v1/bo/login/resetPassword', params, { withCredentials: false });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const batchList = (params) => {
|
||||||
|
return httpClient.post('/api/v1/bo/sysMgt/batchList', params, { withCredentials: false } )
|
||||||
|
}
|
||||||
|
|
||||||
|
const batchDetail = (params) => {
|
||||||
|
return httpClient.post('/api/v1/bo/sysMgt/batchDetail', params, { withCredentials: false })
|
||||||
|
}
|
||||||
|
|
||||||
|
const batchExecuteJob = (params) => {
|
||||||
|
return httpClient.post('/api/v1/bo/sysMgt/batchExecuteJob', params, { withCredentials: false })
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
insertAdmin,
|
insertAdmin,
|
||||||
updateAdmin,
|
updateAdmin,
|
||||||
@@ -82,5 +96,8 @@ export default {
|
|||||||
authDetail,
|
authDetail,
|
||||||
insertAuth,
|
insertAuth,
|
||||||
updateAuth,
|
updateAuth,
|
||||||
resetPassword
|
resetPassword,
|
||||||
|
batchList,
|
||||||
|
batchDetail,
|
||||||
|
batchExecuteJob
|
||||||
}
|
}
|
||||||
|
|||||||
310
frontend/src/modules/sysMgt/views/BatchDetail.vue
Normal file
310
frontend/src/modules/sysMgt/views/BatchDetail.vue
Normal file
@@ -0,0 +1,310 @@
|
|||||||
|
<template>
|
||||||
|
|
||||||
|
<div class="contents">
|
||||||
|
<div class="contents_wrap">
|
||||||
|
<div class="top_wrap">
|
||||||
|
<h3 class="title">배치 모니터링</h3>
|
||||||
|
<p class="breadcrumb">모니터링 > 배치 모니터링</p>
|
||||||
|
</div>
|
||||||
|
<div class="search_wrap">
|
||||||
|
<div class="group">
|
||||||
|
<h3>
|
||||||
|
<label for="right" class="label">배치 ID | {{ this.batchId}} </label>
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
<div class="group">
|
||||||
|
<div class="input_box cal">
|
||||||
|
<label for="right" class="label">조회기간</label>
|
||||||
|
<div class="term">
|
||||||
|
<span class="custom_input icon_date">
|
||||||
|
<vuejs-datepicker
|
||||||
|
:language="ko"
|
||||||
|
:format="customFormatter"
|
||||||
|
:disabled-dates="disabledSDate"
|
||||||
|
v-model="startDate"
|
||||||
|
@selected="selectedStartDate(0)"
|
||||||
|
@closed="closeDate('start')"
|
||||||
|
></vuejs-datepicker>
|
||||||
|
</span>~
|
||||||
|
<span class="custom_input icon_date">
|
||||||
|
<vuejs-datepicker
|
||||||
|
:language="ko"
|
||||||
|
:format="customFormatter"
|
||||||
|
:disabled-dates="disabledEDate"
|
||||||
|
v-model="endDate"
|
||||||
|
@selected="selectedEndDate(0)"
|
||||||
|
@closed="closeDate('end')"
|
||||||
|
></vuejs-datepicker>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="select_box id">
|
||||||
|
<label for="right" class="label">상태</label>
|
||||||
|
<select name="" id="" v-model="sttusCd" @keyup.enter="search">
|
||||||
|
<option value="" selected>전체</option>
|
||||||
|
<option v-for="(option, i) in statType" v-bind:value="option.code" v-bind:key="i">
|
||||||
|
{{ option.codeNm }}
|
||||||
|
</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<button type="button" class="button grey" @click="search">조회</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="group" >
|
||||||
|
<div class="input_box cal" v-show ="this.batchId != 'BATCH_016'">
|
||||||
|
<label for="right" class="label">배치 수동 실행 </label>
|
||||||
|
<div class="term">
|
||||||
|
<span class="custom_input icon_date">
|
||||||
|
<vuejs-datepicker
|
||||||
|
:language="ko"
|
||||||
|
:format="customFormatter"
|
||||||
|
:disabled-dates="disabledSDate"
|
||||||
|
v-model="strDate"
|
||||||
|
></vuejs-datepicker>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<button type="button" class="button grey" @click="runExecuteJob" v-show ="this.batchId != 'BATCH_016'">실행</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="info">
|
||||||
|
<div class="count">총 <span>{{ totalItems.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</span>건
|
||||||
|
<div class="select_box NumberSe">
|
||||||
|
<select name="" id="" v-model="perPageCnt" @change="changePerPage()">
|
||||||
|
<option v-for="option in options" v-bind:value="option.value" v-bind:key="option.value">{{
|
||||||
|
option.text
|
||||||
|
}}
|
||||||
|
</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="table">
|
||||||
|
<custom-grid
|
||||||
|
ref="table"
|
||||||
|
:totalItems="'totalItems'"
|
||||||
|
:url="grid.url"
|
||||||
|
:columns="grid.columns"
|
||||||
|
:pagePerRows="grid.pagePerRows"
|
||||||
|
:pagination="grid.pagination"
|
||||||
|
:noDataStr="grid.noDataStr"
|
||||||
|
></custom-grid>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import customGrid from '@/components/CustomGrid';
|
||||||
|
import moment from 'moment';
|
||||||
|
import api from '@/service/api.js';
|
||||||
|
import sysMgtApi from '../service/sysMgtApi';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'batchDetail',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
//paramBatchId : this.$route.params.batchId,
|
||||||
|
//날짜 조회
|
||||||
|
ko: vdp_translation_ko.js,
|
||||||
|
periodDay: 7,
|
||||||
|
sDateDiv: 'day',
|
||||||
|
startDate: new Date(),
|
||||||
|
endDate: new Date(),
|
||||||
|
strDate: new Date(),
|
||||||
|
|
||||||
|
totalCnt: '',
|
||||||
|
|
||||||
|
pageType: 'CALC',
|
||||||
|
|
||||||
|
batchId : this.$route.params.batchId,
|
||||||
|
|
||||||
|
//상태조회
|
||||||
|
sttusCd: '',
|
||||||
|
statType: [],
|
||||||
|
|
||||||
|
perPageCnt: 50,
|
||||||
|
options: [
|
||||||
|
{text: '20', value: 20},
|
||||||
|
{text: '50', value: 50},
|
||||||
|
{text: '100', value: 100}
|
||||||
|
],
|
||||||
|
totalItems: 0,
|
||||||
|
grid: {
|
||||||
|
url: '/api/v1/bo/sysMgt/batchDetail',
|
||||||
|
pagePerRows: 20,
|
||||||
|
pagination: true,
|
||||||
|
header: [
|
||||||
|
[
|
||||||
|
{header: '배치ID', childNames: {}},
|
||||||
|
{header: '배치명', childNames: {}},
|
||||||
|
]
|
||||||
|
],
|
||||||
|
columns: [
|
||||||
|
// {name: 'batchId', header:'배치ID', align:'center', width:'20%'},
|
||||||
|
{name: 'stDt', header: '시작 일시', align: 'center', width: '25%'},
|
||||||
|
{name: 'fnsDt', header: '종료 일시', align: 'center', width: '25%'},
|
||||||
|
{name: 'sttusCd', header:'상태코드', align: 'center', width: '25%'},
|
||||||
|
{name: 'errMsg', header:'에러메시지', align: 'center', width: '25%'},
|
||||||
|
],
|
||||||
|
noDataStr: '검색 결과가 없습니다.',
|
||||||
|
params: {
|
||||||
|
batchId : '',
|
||||||
|
sttusCd: '',
|
||||||
|
startDt: '',
|
||||||
|
endDt: '',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
customGrid: customGrid,
|
||||||
|
vuejsDatepicker,
|
||||||
|
},
|
||||||
|
created(){
|
||||||
|
this.setPeriodDay(0);
|
||||||
|
this.setCodeData();
|
||||||
|
},
|
||||||
|
destroyed() {},
|
||||||
|
mounted(){
|
||||||
|
let page = 1;
|
||||||
|
// 페이지 정보 및 검색 조건
|
||||||
|
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
|
||||||
|
let isKeep = false;
|
||||||
|
if (getCondition) {
|
||||||
|
this.grid.pagePerRows = getCondition.perPage;
|
||||||
|
this.grid.params = getCondition.params;
|
||||||
|
page = getCondition.page;
|
||||||
|
isKeep = true;
|
||||||
|
}
|
||||||
|
this.search(isKeep);
|
||||||
|
},
|
||||||
|
beforeRouteLeave(to, from, next) {
|
||||||
|
|
||||||
|
const getP = this.$refs.table.getPagination();
|
||||||
|
this.$store.commit('searchcondition/updateSearchCondition', {
|
||||||
|
page: getP._currentPage,
|
||||||
|
perPage: this.perPageCnt,
|
||||||
|
params: this.grid.params
|
||||||
|
});
|
||||||
|
// 라우트 하기전 실행
|
||||||
|
next();
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
search: function (isKeep) {
|
||||||
|
this.$refs.table.search(this.grid.params, isKeep);
|
||||||
|
|
||||||
|
this.grid.params = {
|
||||||
|
startDt: moment(this.startDate).format('YYYYMMDD'),
|
||||||
|
endDt: moment(this.endDate).format('YYYYMMDD'),
|
||||||
|
batchId: this.$route.params.batchId,
|
||||||
|
sttusCd: this.sttusCd
|
||||||
|
}
|
||||||
|
|
||||||
|
this.$refs.table.search(this.grid.params, isKeep);
|
||||||
|
this.sendStoreData();
|
||||||
|
},
|
||||||
|
changePerPage: function () { // 페이지당 조회할 개수
|
||||||
|
this.grid.pagePerRows = this.perPageCnt;
|
||||||
|
this.search(true);
|
||||||
|
},
|
||||||
|
sendStoreData: function () {
|
||||||
|
const getP = this.$refs.table.getPagination();
|
||||||
|
this.$store.commit('searchcondition/updateSearchCondition', {
|
||||||
|
page: getP._currentPage,
|
||||||
|
perPage: this.perPageCnt,
|
||||||
|
params: this.grid.params
|
||||||
|
});
|
||||||
|
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
|
||||||
|
},
|
||||||
|
|
||||||
|
//상태코드 리스트 조회
|
||||||
|
setCodeData() {
|
||||||
|
// 상태 옵션 셋팅.
|
||||||
|
api.commCode({'grpCd': 'BTEXE_STTUS_CD'}).then(response => {
|
||||||
|
this.statType = response.data.data.list;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
customFormatter: function (date) {
|
||||||
|
if (this.sDateDiv == 'month') {
|
||||||
|
return moment(date).format('YYYY-MM');
|
||||||
|
} else if (this.sDateDiv == 'year') {
|
||||||
|
return moment(date).format('YYYY');
|
||||||
|
} else {
|
||||||
|
return moment(date).format('YYYY-MM-DD');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
initSetStartDate() {
|
||||||
|
let setYear = Number(moment(new Date()).format('YYYY'));
|
||||||
|
let initStartDate = new Date(setYear, 0, 1);
|
||||||
|
this.startDate = initStartDate;
|
||||||
|
},
|
||||||
|
setPeriodDay(day) {
|
||||||
|
this.periodDay = day;
|
||||||
|
this.endDate = new Date();
|
||||||
|
this.initSetStartDate();
|
||||||
|
|
||||||
|
this.closeDate('start');
|
||||||
|
this.closeDate('end');
|
||||||
|
},
|
||||||
|
selectedStartDate(day) {
|
||||||
|
if (day != undefined && day != null) {
|
||||||
|
this.periodDay = day;
|
||||||
|
}
|
||||||
|
if (this.startDate > this.endDate) {
|
||||||
|
this.startDate = this.endDate;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
selectedEndDate(day) {
|
||||||
|
if (day != undefined && day != null) {
|
||||||
|
this.periodDay = day;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
closeDate(type) {
|
||||||
|
if (type != undefined && type != null) {
|
||||||
|
if (type == 'start') {
|
||||||
|
this.disabledSDate = {from: this.endDate};
|
||||||
|
this.disabledEDate = {to: this.startDate, from: this.endDate};
|
||||||
|
} else if (type == 'end') {
|
||||||
|
this.disabledSDate = {from: this.endDate};
|
||||||
|
this.disabledEDate = {to: this.startDate, from: new Date()};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
async runExecuteJob(){
|
||||||
|
const params = {
|
||||||
|
strDate : this.strDate,
|
||||||
|
batchId : this.batchId
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
const response = await sysMgtApi.batchExecuteJob(params);
|
||||||
|
|
||||||
|
const result = response.data;
|
||||||
|
const batchRslt = result.data.BATCH_RSLT;
|
||||||
|
const batchRsltMsg = result.data.BATCH_RSLT_MSG;
|
||||||
|
|
||||||
|
const succ = 'S';
|
||||||
|
const fail = 'F';
|
||||||
|
|
||||||
|
if(batchRslt == succ){
|
||||||
|
alert("결과 : 성공 \n"+"결과 메시지 : "+batchRsltMsg);
|
||||||
|
this.search();
|
||||||
|
} else if (batchRslt == fail){
|
||||||
|
alert("결과 : 실패 \n"+"결과 메시지 : "+batchRsltMsg);
|
||||||
|
this.search();
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@@ -19,13 +19,36 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import mntrngApi from "../service/mntrngApi.js";
|
|
||||||
import customGrid from '@/components/CustomGrid';
|
import customGrid from '@/components/CustomGrid';
|
||||||
|
|
||||||
|
class CustomATagRenderer {
|
||||||
|
constructor(props) {
|
||||||
|
this.props = props;
|
||||||
|
const el = document.createElement('a');
|
||||||
|
el.href = 'javascript:void(0);';
|
||||||
|
el.className = 'btn_text';
|
||||||
|
el.innerText = String(props.colValue)
|
||||||
|
this.el = el;
|
||||||
|
}
|
||||||
|
|
||||||
|
getElement() {
|
||||||
|
return this.el;
|
||||||
|
}
|
||||||
|
|
||||||
|
addEvent(selEl) {
|
||||||
|
selEl.addEventListener("click", () => {
|
||||||
|
const {callback} = this.props["cgrido" + this.props.colName].options;
|
||||||
|
callback(this.props);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'batchCheck',
|
name: 'batchList',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
batchList : [],
|
row: {},
|
||||||
|
perPageCnt: 50,
|
||||||
grid: {
|
grid: {
|
||||||
url: '/api/v1/bo/sysMgt/batchList',
|
url: '/api/v1/bo/sysMgt/batchList',
|
||||||
header: [
|
header: [
|
||||||
@@ -35,13 +58,19 @@ export default {
|
|||||||
]
|
]
|
||||||
],
|
],
|
||||||
columns: [
|
columns: [
|
||||||
{name: 'batchType', header: '배치유형', align: 'center', width: '5%'},
|
{name: 'batchType', header: '배치유형', align: 'center', width: '7%'},
|
||||||
{name: 'batchNm', header:'배치명',align:'center', width:'15%'},
|
{
|
||||||
{name: 'batchId', header:'배치ID', align:'center', width:'10%'},
|
name: 'batchNm', header:'배치명',align:'left', width:'15%', renderer: {
|
||||||
{name: 'batchCycle', header:'실행일자',align:'center', width:'10%'},
|
type: CustomATagRenderer
|
||||||
{name: 'batchTime', header:'실행시간',align:'center', width:'10%'},
|
, options: {
|
||||||
{name: 'regDt', header:'배치 수행시간',align:'center', width:'10%'},
|
callback: this.batchDetail,
|
||||||
{name: 'sttusCd', header:'상태',align:'center', width:'10%'},
|
}
|
||||||
|
}},
|
||||||
|
{name: 'batchId', header:'배치ID', align:'center', width:'8%'},
|
||||||
|
{name: 'batchCycle', header:'실행일자',align:'center', width:'8%'},
|
||||||
|
{name: 'batchTime', header:'실행시간',align:'center', width:'7%'},
|
||||||
|
{name: 'regDt', header:'배치 수행시간',align:'center', width:'20%'},
|
||||||
|
{name: 'sttusCd', header:'상태',align:'center', width:'5%'},
|
||||||
{name: 'errMsg', header:'메시지',align:'left', width:'30%'}
|
{name: 'errMsg', header:'메시지',align:'left', width:'30%'}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -51,7 +80,6 @@ export default {
|
|||||||
customGrid: customGrid,
|
customGrid: customGrid,
|
||||||
},
|
},
|
||||||
created(){
|
created(){
|
||||||
this.getBatchList();
|
|
||||||
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
|
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
|
||||||
|
|
||||||
},
|
},
|
||||||
@@ -69,30 +97,19 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
async getBatchList(){
|
|
||||||
try {
|
|
||||||
console.log("확인하자")
|
|
||||||
const response = await mntrngApi.batchCheck();
|
|
||||||
const result = response.data;
|
|
||||||
if (result != null) {
|
|
||||||
this.batchList = response.data.data;
|
|
||||||
console.log("확인하자22")
|
|
||||||
} else {
|
|
||||||
}
|
|
||||||
} catch(err) {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
search: function (isKeep) {
|
search: function (isKeep) {
|
||||||
this.$refs.table.search(this.grid.params, isKeep);
|
this.$refs.table.search(this.grid.params, isKeep);
|
||||||
this.sendStoreData();
|
this.sendStoreData();
|
||||||
},
|
},
|
||||||
|
batchDetail(props){
|
||||||
|
this.row.batchId = props.batchId;
|
||||||
|
this.$router.push({name: 'batchDetail', params: this.row});
|
||||||
|
},
|
||||||
sendStoreData: function () {
|
sendStoreData: function () {
|
||||||
// const getP = this.$refs.table.getPagination();
|
const getP = this.$refs.table.getPagination();
|
||||||
this.$store.commit('searchcondition/updateSearchCondition', {
|
this.$store.commit('searchcondition/updateSearchCondition', {
|
||||||
// page: getP._currentPage,
|
page: getP._currentPage,
|
||||||
// perPage: this.perPageCnt,
|
perPage: this.perPageCnt,
|
||||||
params: this.grid.params
|
params: this.grid.params
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -185,6 +185,11 @@ router.beforeEach((to, from, next) => {
|
|||||||
moveFlag = true;
|
moveFlag = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// url 배치 모니터링
|
||||||
|
if((nextUrl == '/sysMgt/batchList') || '/sysMgt/batchDetail'){
|
||||||
|
moveFlag = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (!moveFlag) {
|
if (!moveFlag) {
|
||||||
if (
|
if (
|
||||||
fromUrl == '/login' ||
|
fromUrl == '/login' ||
|
||||||
|
|||||||
@@ -10,13 +10,17 @@ import io.swagger.annotations.ApiResponse;
|
|||||||
import io.swagger.annotations.ApiResponses;
|
import io.swagger.annotations.ApiResponses;
|
||||||
import kr.co.uplus.ez.api.sysMgt.dto.*;
|
import kr.co.uplus.ez.api.sysMgt.dto.*;
|
||||||
import kr.co.uplus.ez.common.components.ValidComponents;
|
import kr.co.uplus.ez.common.components.ValidComponents;
|
||||||
|
import kr.co.uplus.ez.common.components.WebClientRequestService;
|
||||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||||
|
import kr.co.uplus.ez.common.data.Const;
|
||||||
|
|
||||||
import org.apache.http.HttpStatus;
|
import org.apache.http.HttpStatus;
|
||||||
import org.apache.http.protocol.HTTP;
|
import org.apache.http.protocol.HTTP;
|
||||||
|
import org.json.simple.JSONObject;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.security.core.context.SecurityContextHolder;
|
import org.springframework.security.core.context.SecurityContextHolder;
|
||||||
import org.springframework.security.core.userdetails.UserDetails;
|
import org.springframework.security.core.userdetails.UserDetails;
|
||||||
import org.springframework.validation.BindingResult;
|
import org.springframework.validation.BindingResult;
|
||||||
@@ -24,6 +28,10 @@ import org.springframework.web.bind.annotation.*;
|
|||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -38,12 +46,23 @@ public class SysMgtController {
|
|||||||
|
|
||||||
private static final Logger logger = LoggerFactory.getLogger(SysMgtController.class);
|
private static final Logger logger = LoggerFactory.getLogger(SysMgtController.class);
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private WebClientRequestService clientRequestService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
SysMgtService sysService;
|
SysMgtService sysService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
ValidComponents validComponents;
|
ValidComponents validComponents;
|
||||||
|
|
||||||
|
|
||||||
|
@Value("${msghubez.batch-url:http://localhost:7070}")
|
||||||
|
private String batchDomain;
|
||||||
|
|
||||||
|
@Value("${msghubez.uri.batchExecuteJob:/executeJob}")
|
||||||
|
private String executeJob;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* date : 2022. 4. 25. auth : ckr desc : HUBEZ_BO_API_4001 - 관리자 목록 조회.
|
* date : 2022. 4. 25. auth : ckr desc : HUBEZ_BO_API_4001 - 관리자 목록 조회.
|
||||||
*
|
*
|
||||||
@@ -250,10 +269,138 @@ public class SysMgtController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* data: 2022. 10.24.
|
||||||
|
* auth: Lee minha
|
||||||
|
* desc: 배치 리스트 조회
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "batchList", notes = "배치 리스트 조회")
|
||||||
@RequestMapping(value = "/batchList", method = {RequestMethod.POST})
|
@RequestMapping(value = "/batchList", method = {RequestMethod.POST})
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object batchList() {
|
public BatchListResDto batchList() {
|
||||||
return sysService.batchList();
|
return sysService.batchList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* data : 2022. 10. 26
|
||||||
|
* auth : Lee minha
|
||||||
|
* desc : 배치 상세내용
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
|
||||||
|
@ApiOperation(value = "batchDetail", notes = "배치 상세내용")
|
||||||
|
@ApiResponses({ @ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS") })
|
||||||
|
@RequestMapping(value = "batchDetail", method = {RequestMethod.POST})
|
||||||
|
@ResponseBody
|
||||||
|
public BatchDetailResDto batchDetail(@RequestBody @Valid BatchDetailReqDto batchDetailReqDto,
|
||||||
|
BindingResult bindingResult) {
|
||||||
|
|
||||||
|
if (validComponents.validParameter(bindingResult)) {
|
||||||
|
return new BatchDetailResDto(ApiResponseCode.CM_PARAMETER_ERROR);
|
||||||
|
}
|
||||||
|
|
||||||
|
// batchDetailReqDto.setBatchId("BATCH_010");
|
||||||
|
logger.debug("param 확인 : "+ batchDetailReqDto);
|
||||||
|
return sysService.batchDetail(batchDetailReqDto);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@RequestMapping(value = "batchExecuteJob", method = {RequestMethod.POST})
|
||||||
|
@ResponseBody
|
||||||
|
public BatchExeLogResDto batchExecuteJob(@RequestBody @Valid Map<Object, Object> batchReqMap) {
|
||||||
|
|
||||||
|
logger.info("batchReqMap={}",batchReqMap);
|
||||||
|
Map<Object, Object> batchResultMap = new HashMap<Object, Object>();
|
||||||
|
Map<Object, Object> resultMap = new HashMap<Object, Object>();
|
||||||
|
JSONObject jsonObject = new JSONObject();
|
||||||
|
|
||||||
|
String callUrl = batchDomain + executeJob;
|
||||||
|
|
||||||
|
String monthBatch = "yyyyMM";
|
||||||
|
String dayBatch = "yyyyMMdd";
|
||||||
|
String timeBatch = "yyyyMMddHHmmss";
|
||||||
|
|
||||||
|
SimpleDateFormat monthDateFormat = new SimpleDateFormat(monthBatch);
|
||||||
|
SimpleDateFormat dayDateFormat = new SimpleDateFormat(dayBatch);
|
||||||
|
SimpleDateFormat timeDateFormat = new SimpleDateFormat(timeBatch);
|
||||||
|
|
||||||
|
|
||||||
|
logger.info("callUrl={}",callUrl);
|
||||||
|
String jobId = (String) batchReqMap.get("batchId");
|
||||||
|
String strDate = (String) batchReqMap.get("strDate");
|
||||||
|
|
||||||
|
if(
|
||||||
|
//월배치일 경우 날짜
|
||||||
|
jobId.equals("BATCH_001")||
|
||||||
|
jobId.equals("BATCH_002")||
|
||||||
|
jobId.equals("BATCH_004")||
|
||||||
|
jobId.equals("BATCH_005")||
|
||||||
|
jobId.equals("BATCH_006")||
|
||||||
|
jobId.equals("BATCH_009")||
|
||||||
|
jobId.equals("BATCH_011")||
|
||||||
|
jobId.equals("BATCH_020")) {
|
||||||
|
|
||||||
|
strDate = monthDateFormat.format(new Date());
|
||||||
|
logger.info("strDate={}",strDate);
|
||||||
|
|
||||||
|
} else if (
|
||||||
|
//일배치일 경우 날짜
|
||||||
|
jobId.equals("BATCH_003")||
|
||||||
|
jobId.equals("BATCH_008")||
|
||||||
|
jobId.equals("BATCH_010")||
|
||||||
|
jobId.equals("BATCH_012")||
|
||||||
|
jobId.equals("BATCH_013")||
|
||||||
|
jobId.equals("BATCH_014")||
|
||||||
|
jobId.equals("BATCH_015")||
|
||||||
|
jobId.equals("BATCH_018")||
|
||||||
|
jobId.equals("BATCH_019")){
|
||||||
|
|
||||||
|
strDate = dayDateFormat.format(new Date());
|
||||||
|
logger.info("strDate={}",strDate);
|
||||||
|
} else {
|
||||||
|
|
||||||
|
strDate = timeDateFormat.format(new Date());
|
||||||
|
logger.info("strDate={}",strDate);
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
logger.info("batchReqMap={}",batchReqMap);
|
||||||
|
jsonObject.put("strDate", strDate);
|
||||||
|
jsonObject.put("jobId", jobId);
|
||||||
|
|
||||||
|
logger.info("jsonObject={}",jsonObject);
|
||||||
|
batchResultMap = (Map<Object, Object>) clientRequestService.callBySyncPost(callUrl, jsonObject);
|
||||||
|
Map<Object, Object> returnMsg = new HashMap<Object, Object>();
|
||||||
|
returnMsg = (Map<Object, Object>) batchResultMap.get("returnMsg");
|
||||||
|
|
||||||
|
logger.info("batchResultMap={}",batchResultMap);
|
||||||
|
if(batchResultMap == null) {
|
||||||
|
resultMap.put("BATCH_RSLT", Const.BATCH_RESULT_FAIL);
|
||||||
|
resultMap.put("BATCH_RSLT_MSG", "BATCH Result Recive null error");
|
||||||
|
} else {
|
||||||
|
if("02".equals(returnMsg.get("code"))) {
|
||||||
|
resultMap.put("BATCH_RSLT", Const.BATCH_RESULT_SUCCESS);
|
||||||
|
resultMap.put("BATCH_RSLT_MSG", returnMsg.get("msg"));
|
||||||
|
} else {
|
||||||
|
resultMap.put("BATCH_RSLT", Const.BATCH_RESULT_FAIL);
|
||||||
|
resultMap.put("BATCH_RSLT_MSG", returnMsg.get("msg"));
|
||||||
|
}
|
||||||
|
resultMap.putAll(batchResultMap);
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("mhez-batch fail : {}", e.getMessage(),e);
|
||||||
|
resultMap.put("BATCH_RSLT", Const.BATCH_RESULT_FAIL);
|
||||||
|
resultMap.put("BATCH_RSLT_MSG", e.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
logger.info("getChannel start : {}", callUrl);
|
||||||
|
logger.info("jsonObject: {}",jsonObject);
|
||||||
|
logger.info("resultMap: {}",resultMap);
|
||||||
|
|
||||||
|
|
||||||
|
return new BatchExeLogResDto(ApiResponseCode.SUCCESS,resultMap);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,7 +46,9 @@ public interface SysMgtMapper {
|
|||||||
|
|
||||||
int checkAdmin(Map<String, Object> paramMap);
|
int checkAdmin(Map<String, Object> paramMap);
|
||||||
|
|
||||||
public List<BatchList> batchListSelect();
|
public List<BatchList> batchListSelect(); //배치 리스트 조회
|
||||||
|
|
||||||
public List<BatchChkDto> batchDetailSelect();
|
public List<BatchDetail> batchDetailSelect(BatchDetailReqDto batchDetailReqDto); //배치 상세내용
|
||||||
|
|
||||||
|
int batchDetailCnt(BatchDetailReqDto batchDetailReqDto);
|
||||||
}
|
}
|
||||||
@@ -1,9 +1,12 @@
|
|||||||
package kr.co.uplus.ez.api.sysMgt;
|
package kr.co.uplus.ez.api.sysMgt;
|
||||||
|
|
||||||
|
import kr.co.uplus.ez.api.calculate.dto.CalcListResDto;
|
||||||
import kr.co.uplus.ez.api.sysMgt.dto.*;
|
import kr.co.uplus.ez.api.sysMgt.dto.*;
|
||||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||||
import kr.co.uplus.ez.common.data.Paging;
|
import kr.co.uplus.ez.common.data.Paging;
|
||||||
import kr.co.uplus.ez.common.utils.EncryptionUtil;
|
import kr.co.uplus.ez.common.utils.EncryptionUtil;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.mybatis.spring.SqlSessionTemplate;
|
import org.mybatis.spring.SqlSessionTemplate;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
@@ -18,6 +21,7 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
|
@Slf4j
|
||||||
public class SysMgtService {
|
public class SysMgtService {
|
||||||
|
|
||||||
private static final Logger logger = LoggerFactory.getLogger(SysMgtService.class);
|
private static final Logger logger = LoggerFactory.getLogger(SysMgtService.class);
|
||||||
@@ -404,18 +408,69 @@ public class SysMgtService {
|
|||||||
return new UpdateAuthResDto(ApiResponseCode.SUCCESS);
|
return new UpdateAuthResDto(ApiResponseCode.SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* data : 2022. 10. 25.
|
||||||
|
* auth : Lee minha
|
||||||
|
* desc : 배치 리스트 조회
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
public BatchListResDto batchList() {
|
public BatchListResDto batchList() {
|
||||||
|
|
||||||
SysMgtMapper sysmgtmapper = sqlSessionSlave.getMapper(SysMgtMapper.class);
|
SysMgtMapper sysmgtmapper = sqlSessionSlave.getMapper(SysMgtMapper.class);
|
||||||
|
|
||||||
List<BatchList> batchLists = sysmgtmapper.batchListSelect();
|
List<BatchList> batchLists = sysmgtmapper.batchListSelect();
|
||||||
|
|
||||||
|
|
||||||
BatchListRes batchListRes = new BatchListRes();
|
BatchListRes batchListRes = new BatchListRes();
|
||||||
batchListRes.setList(batchLists);
|
batchListRes.setList(batchLists);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return new BatchListResDto(ApiResponseCode.SUCCESS, batchListRes);
|
return new BatchListResDto(ApiResponseCode.SUCCESS, batchListRes);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* data : 2022. 10. 26.
|
||||||
|
* auth : Lee minha
|
||||||
|
* desc : 배치 상세내용 조회
|
||||||
|
* @param batchDetailReqDto
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public BatchDetailResDto batchDetail(BatchDetailReqDto batchDetailReqDto) {
|
||||||
|
|
||||||
|
SysMgtMapper sysMgtMapper = sqlSessionSlave.getMapper(SysMgtMapper.class);
|
||||||
|
BatchDetailRes batchDetailRes = new BatchDetailRes();
|
||||||
|
|
||||||
|
String nowPage = String.valueOf(batchDetailReqDto.getPage());
|
||||||
|
int totalCnt = sysMgtMapper.batchDetailCnt(batchDetailReqDto);
|
||||||
|
|
||||||
|
if (totalCnt == 0) {
|
||||||
|
batchDetailRes.setList(new ArrayList<>());
|
||||||
|
Paging paging = new Paging();
|
||||||
|
paging.setPage(nowPage);
|
||||||
|
paging.setTotalCnt(String.valueOf(totalCnt));
|
||||||
|
batchDetailRes.setPaging(paging);
|
||||||
|
|
||||||
|
return new BatchDetailResDto(ApiResponseCode.CM_NOT_FOUND, batchDetailRes);
|
||||||
|
}
|
||||||
|
|
||||||
|
int page = batchDetailReqDto.getPage();
|
||||||
|
int pagePerRows = batchDetailReqDto.getPagePerRows();
|
||||||
|
page = (page - 1) * pagePerRows;
|
||||||
|
batchDetailReqDto.setPage(page);
|
||||||
|
|
||||||
|
List<BatchDetail> batchDetail = sysMgtMapper.batchDetailSelect(batchDetailReqDto);
|
||||||
|
batchDetailRes.setList(batchDetail);
|
||||||
|
Paging paging = new Paging();
|
||||||
|
paging.setPage(nowPage);
|
||||||
|
paging.setTotalCnt(String.valueOf(totalCnt));
|
||||||
|
batchDetailRes.setPaging(paging);
|
||||||
|
|
||||||
|
|
||||||
|
return new BatchDetailResDto(ApiResponseCode.SUCCESS, batchDetailRes);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
48
src/main/java/kr/co/uplus/ez/api/sysMgt/dto/BatchDetail.java
Normal file
48
src/main/java/kr/co/uplus/ez/api/sysMgt/dto/BatchDetail.java
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
package kr.co.uplus.ez.api.sysMgt.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 배치 상세조회 DTO
|
||||||
|
* @author Lee Minha
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class BatchDetail {
|
||||||
|
|
||||||
|
//일련번호
|
||||||
|
private String seqNo;
|
||||||
|
|
||||||
|
//등록 일시
|
||||||
|
private String regDt;
|
||||||
|
|
||||||
|
//배치 아이디
|
||||||
|
private String batchId;
|
||||||
|
|
||||||
|
//배치 명
|
||||||
|
private String batchNm;
|
||||||
|
|
||||||
|
//상태코드
|
||||||
|
private String sttusCd;
|
||||||
|
|
||||||
|
//시작 일시
|
||||||
|
private String stDt;
|
||||||
|
|
||||||
|
//종료 일시
|
||||||
|
private String fnsDt;
|
||||||
|
|
||||||
|
//오류 메시지
|
||||||
|
private String errMsg;
|
||||||
|
|
||||||
|
//등록 ID
|
||||||
|
private String regId;
|
||||||
|
|
||||||
|
//변경 ID
|
||||||
|
private String chgId;
|
||||||
|
|
||||||
|
//변경 일시
|
||||||
|
private String chgDt;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
package kr.co.uplus.ez.api.sysMgt.dto;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@SuppressWarnings("serial")
|
||||||
|
@Data
|
||||||
|
public class BatchDetailReqDto implements Serializable{
|
||||||
|
|
||||||
|
|
||||||
|
//배치 아이디
|
||||||
|
private String batchId;
|
||||||
|
|
||||||
|
//검색 시작일
|
||||||
|
private String startDt;
|
||||||
|
|
||||||
|
//검색 종료일
|
||||||
|
private String endDt;
|
||||||
|
|
||||||
|
//수동 실행 일자
|
||||||
|
private String strDate;
|
||||||
|
|
||||||
|
//상태코드
|
||||||
|
private String sttusCd;
|
||||||
|
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
@ApiModelProperty(example = "50", name = "페이지당 조회할 목록 수", dataType = "String")
|
||||||
|
private int pagePerRows;
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
@ApiModelProperty(example = "1", name = "현재 페이지", dataType = "int")
|
||||||
|
private int page;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package kr.co.uplus.ez.api.sysMgt.dto;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import kr.co.uplus.ez.common.data.Paging;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@SuppressWarnings("serial")
|
||||||
|
@Data
|
||||||
|
public class BatchDetailRes implements Serializable {
|
||||||
|
|
||||||
|
private Paging paging;
|
||||||
|
private List<BatchDetail> list;
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
package kr.co.uplus.ez.api.sysMgt.dto;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||||
|
import kr.co.uplus.ez.common.data.ResponseMessage;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@SuppressWarnings("serial")
|
||||||
|
@Data
|
||||||
|
public class BatchDetailResDto extends ResponseMessage implements Serializable{
|
||||||
|
|
||||||
|
private BatchDetailRes data;
|
||||||
|
|
||||||
|
public BatchDetailResDto() {
|
||||||
|
this.retCode = ApiResponseCode.SUCCESS.getResultCode();
|
||||||
|
this.retMsg = ApiResponseCode.SUCCESS.getResultMsg();
|
||||||
|
}
|
||||||
|
|
||||||
|
public BatchDetailResDto(ApiResponseCode returnStr) {
|
||||||
|
this.retCode = returnStr.getResultCode();
|
||||||
|
this.retMsg = returnStr.getResultMsg();
|
||||||
|
}
|
||||||
|
|
||||||
|
public BatchDetailResDto(ApiResponseCode returnStr, BatchDetailRes data) {
|
||||||
|
this.retCode = returnStr.getResultCode();
|
||||||
|
this.retMsg = returnStr.getResultMsg();
|
||||||
|
this.data = data;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
package kr.co.uplus.ez.api.sysMgt.dto;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||||
|
import kr.co.uplus.ez.common.data.ResponseMessage;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@SuppressWarnings("serial")
|
||||||
|
@Data
|
||||||
|
public class BatchExeLogResDto extends ResponseMessage implements Serializable{
|
||||||
|
|
||||||
|
// 데이터.
|
||||||
|
private Object data;
|
||||||
|
|
||||||
|
public BatchExeLogResDto() {
|
||||||
|
this.retCode = ApiResponseCode.SUCCESS.getResultCode();
|
||||||
|
this.retMsg = ApiResponseCode.SUCCESS.getResultMsg();
|
||||||
|
}
|
||||||
|
|
||||||
|
public BatchExeLogResDto(ApiResponseCode returnStr) {
|
||||||
|
this.retCode = returnStr.getResultCode();
|
||||||
|
this.retMsg = returnStr.getResultMsg();
|
||||||
|
}
|
||||||
|
|
||||||
|
public BatchExeLogResDto(ApiResponseCode returnStr, Object data) {
|
||||||
|
this.retCode = returnStr.getResultCode();
|
||||||
|
this.retMsg = returnStr.getResultMsg();
|
||||||
|
this.data = data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -6,7 +6,7 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 배치 모니터링 DTO
|
* 배치 리스트 조회 DTO
|
||||||
* @author Lee Minha
|
* @author Lee Minha
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@@ -24,6 +24,7 @@ public class BatchList {
|
|||||||
//배치 아이디
|
//배치 아이디
|
||||||
private String batchId;
|
private String batchId;
|
||||||
|
|
||||||
|
//배치 명
|
||||||
private String batchNm;
|
private String batchNm;
|
||||||
|
|
||||||
//상태코드
|
//상태코드
|
||||||
@@ -53,14 +54,5 @@ public class BatchList {
|
|||||||
//배치 주기
|
//배치 주기
|
||||||
private String batchCycle;
|
private String batchCycle;
|
||||||
|
|
||||||
//검색 시작 일자
|
|
||||||
private String searchSt;
|
|
||||||
|
|
||||||
//검색 종료 일자
|
|
||||||
private String searchFns;
|
|
||||||
|
|
||||||
|
|
||||||
private Object batchList;
|
|
||||||
|
|
||||||
private String batchTime;
|
private String batchTime;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -143,4 +143,10 @@ public class Const {
|
|||||||
/** 한도 차감 상세 - 차감 유형 코드 (01:차감, 02:소멸, 03:복원, 04:충전) */
|
/** 한도 차감 상세 - 차감 유형 코드 (01:차감, 02:소멸, 03:복원, 04:충전) */
|
||||||
public static final String LMTDCT_DTL_DDCT_TYPE_CD_04 = "04";
|
public static final String LMTDCT_DTL_DDCT_TYPE_CD_04 = "04";
|
||||||
|
|
||||||
|
|
||||||
|
/** 배치 결과 */
|
||||||
|
public static final String BATCH_MSG_SUCCESS = "SUCCESS";
|
||||||
|
public static final String BATCH_RESULT_SUCCESS = "S";
|
||||||
|
public static final String BATCH_RESULT_FAIL = "F";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,10 +48,12 @@ mail:
|
|||||||
msghubez:
|
msghubez:
|
||||||
homepage-url: https://mhez-dev.uplus.co.kr
|
homepage-url: https://mhez-dev.uplus.co.kr
|
||||||
api-url: https://api-int.mhez-dev.uplus.co.kr
|
api-url: https://api-int.mhez-dev.uplus.co.kr
|
||||||
|
batch-url: https://batch-int.mhez-dev.uplus.co.kr
|
||||||
applicationId: EZ_ADMIN
|
applicationId: EZ_ADMIN
|
||||||
uri:
|
uri:
|
||||||
sendTemplateMail: /api/v1/fo/sendTemplateMail
|
sendTemplateMail: /api/v1/fo/sendTemplateMail
|
||||||
notice: /api/v1/fo/notice
|
notice: /api/v1/fo/notice
|
||||||
|
batchExecuteJob: /executeJob
|
||||||
homepageLogin: /auth/bo
|
homepageLogin: /auth/bo
|
||||||
authKey: "bohubez!@#$%"
|
authKey: "bohubez!@#$%"
|
||||||
|
|
||||||
|
|||||||
@@ -47,11 +47,13 @@ mail:
|
|||||||
|
|
||||||
msghubez:
|
msghubez:
|
||||||
homepage-url: https://mhez.uplus.co.kr
|
homepage-url: https://mhez.uplus.co.kr
|
||||||
|
batch-url: https://batch-int.mhez.uplus.co.kr
|
||||||
api-url: https://api-int.mhez.uplus.co.kr
|
api-url: https://api-int.mhez.uplus.co.kr
|
||||||
applicationId: EZ_ADMIN
|
applicationId: EZ_ADMIN
|
||||||
uri:
|
uri:
|
||||||
sendTemplateMail: /api/v1/fo/sendTemplateMail
|
sendTemplateMail: /api/v1/fo/sendTemplateMail
|
||||||
notice: /api/v1/fo/notice
|
notice: /api/v1/fo/notice
|
||||||
|
batchExecuteJob: /executeJob
|
||||||
homepageLogin: /auth/bo
|
homepageLogin: /auth/bo
|
||||||
authKey: "bohubez!@#$%"
|
authKey: "bohubez!@#$%"
|
||||||
|
|
||||||
|
|||||||
@@ -48,10 +48,12 @@ mail:
|
|||||||
msghubez:
|
msghubez:
|
||||||
homepage-url: https://mhez-qa.uplus.co.kr
|
homepage-url: https://mhez-qa.uplus.co.kr
|
||||||
api-url: https://api-int.mhez-qa.uplus.co.kr
|
api-url: https://api-int.mhez-qa.uplus.co.kr
|
||||||
|
batch-url: https://batch-int.mhez-qa.uplus.co.kr
|
||||||
applicationId: EZ_ADMIN
|
applicationId: EZ_ADMIN
|
||||||
uri:
|
uri:
|
||||||
sendTemplateMail: /api/v1/fo/sendTemplateMail
|
sendTemplateMail: /api/v1/fo/sendTemplateMail
|
||||||
notice: /api/v1/fo/notice
|
notice: /api/v1/fo/notice
|
||||||
|
batchExecuteJob: /executeJob
|
||||||
homepageLogin: /auth/bo
|
homepageLogin: /auth/bo
|
||||||
authKey: "bohubez!@#$%"
|
authKey: "bohubez!@#$%"
|
||||||
|
|
||||||
|
|||||||
@@ -458,31 +458,56 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<select id="batchDetailSelect" resultType="kr.co.uplus.ez.api.sysMgt.dto.BatchList">
|
<select id="batchDetailSelect" parameterType="kr.co.uplus.ez.api.sysMgt.dto.BatchDetailReqDto" resultType="kr.co.uplus.ez.api.sysMgt.dto.BatchDetail">
|
||||||
/* sysMgt-mapper.xml(batchDetailSelect) 배치 상세 조회*/
|
/* sysMgt-mapper.xml(batchDetailSelect) 배치 상세 조회*/
|
||||||
SELECT
|
SELECT
|
||||||
ebl.BATCH_ID,
|
ebl.BATCH_ID AS batchId,
|
||||||
ebl.ST_DT,
|
ebl.ST_DT AS stDt,
|
||||||
ebl.FNS_DT,
|
ebl.FNS_DT AS fnsDt,
|
||||||
ebl.STTUS_CD,
|
CASE
|
||||||
ebl.ERR_MSG
|
WHEN ebl.STTUS_CD = '01' THEN '시작'
|
||||||
|
WHEN ebl.STTUS_CD = '02' THEN '성공'
|
||||||
|
WHEN ebl.STTUS_CD = '03' THEN '실패'
|
||||||
|
ELSE ebl.STTUS_CD
|
||||||
|
END STTUS_CD,
|
||||||
|
ebl.ERR_MSG AS errMsg
|
||||||
FROM
|
FROM
|
||||||
hubez_admin.EZ_BTEXE_LOG ebl
|
hubez_admin.EZ_BTEXE_LOG ebl
|
||||||
WHERE
|
WHERE
|
||||||
ebl.BATCH_ID =#{batchId}
|
ebl.BATCH_ID =#{batchId}
|
||||||
<if test= "searchSt != null and searchSt !=''">
|
<if test= "startDt != null and endDt !=null">
|
||||||
<![CDATA[
|
AND DATE_FORMAT(ebl.ST_DT,'%Y-%m-%d') BETWEEN DATE_FORMAT(#{startDt},'%Y-%m-%d') AND DATE_FORMAT(#{endDt},'%Y-%m-%d')
|
||||||
AND ST_DT > DATE_FORMAT(#{searchSt},'%Y-%m-%d %h:%m:%s')
|
|
||||||
]]>
|
|
||||||
</if>
|
|
||||||
<if test= "searchFns != null and searchFns !=''">
|
|
||||||
AND FNS_DT <![CDATA[ < ]]> DATE_FORMAT(#{searchFns},'%Y-%m-%d %h:%m:%s')
|
|
||||||
</if>
|
</if>
|
||||||
<if test ="sttusCd != null and sttusCd !=''">
|
<if test ="sttusCd != null and sttusCd !=''">
|
||||||
AND ebl.STTUS_CD = #{sttusCd}
|
AND ebl.STTUS_CD = #{sttusCd}
|
||||||
</if>
|
</if>
|
||||||
ORDER BY
|
ORDER BY
|
||||||
ebl.REG_DT desc
|
ebl.REG_DT desc
|
||||||
|
LIMIT #{page}, #{pagePerRows}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="batchDetailCnt" parameterType="kr.co.uplus.ez.api.sysMgt.dto.BatchDetailReqDto" resultType="int">
|
||||||
|
/* sysMgt-mapper.xml(batchDetailCnt) 배치 상세 조회 카운트*/
|
||||||
|
SELECT
|
||||||
|
COUNT(1)
|
||||||
|
FROM
|
||||||
|
hubez_admin.EZ_BTEXE_LOG ebl
|
||||||
|
WHERE
|
||||||
|
ebl.BATCH_ID =#{batchId}
|
||||||
|
<if test= "startDt != null and startDt !=''">
|
||||||
|
<![CDATA[
|
||||||
|
AND ST_DT > DATE_FORMAT(#{startDt},'%Y-%m-%d %h:%m:%s')
|
||||||
|
]]>
|
||||||
|
</if>
|
||||||
|
<if test= "endDt != null and endDt !=''">
|
||||||
|
<![CDATA[
|
||||||
|
AND FNS_DT < DATE_FORMAT(#{endDt},'%Y-%m-%d %h:%m:%s')
|
||||||
|
]]>
|
||||||
|
</if>
|
||||||
|
<if test ="sttusCd != null and sttusCd !=''">
|
||||||
|
AND ebl.STTUS_CD = #{sttusCd}
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user