mirror of
http://git.mhez-qa.uplus.co.kr/hubez/hubez-admin.git
synced 2025-12-06 17:43:44 +09:00
작업중 설정 진행 중 & 배치 모니터링 수정
This commit is contained in:
@@ -40,7 +40,7 @@ export default [
|
||||
meta: { public: false }
|
||||
},
|
||||
{
|
||||
path: '/sysMgt/batchDetail/:batchId',
|
||||
path: '/sysMgt/batchDetail',
|
||||
component: BatchDetail,
|
||||
name: 'batchDetail',
|
||||
meta: { public: false }
|
||||
|
||||
@@ -85,6 +85,11 @@ const notiList = (params) => {
|
||||
return httpClient.post('/api/v1/bo/sysMgt/notiList', params, { withCredentials: false })
|
||||
}
|
||||
|
||||
const setWorkState = (params) => {
|
||||
console.log("api호출",params)
|
||||
return httpClient.post('/api/v1/bo/sysMgt/setWorkState', params, { withCredentials: false })
|
||||
}
|
||||
|
||||
|
||||
export default {
|
||||
insertAdmin,
|
||||
@@ -104,5 +109,6 @@ export default {
|
||||
batchList,
|
||||
batchDetail,
|
||||
batchExecuteJob,
|
||||
notiList
|
||||
notiList,
|
||||
setWorkState,
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<div class="search_wrap">
|
||||
<div class="group">
|
||||
<h3>
|
||||
<label for="right" class="label">배치 ID | {{ this.batchId }} </label>
|
||||
<label for="right" class="label">배치 ID | {{ this.batchId }} | {{ this.batchNm }} | {{ this.batchType }} </label>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="group">
|
||||
@@ -59,7 +59,6 @@
|
||||
<vuejs-datepicker
|
||||
:language="ko"
|
||||
:format="customFormatter"
|
||||
:disabled-dates="disabledSDate"
|
||||
v-model="strDate"
|
||||
></vuejs-datepicker>
|
||||
</span>
|
||||
@@ -107,7 +106,7 @@ export default {
|
||||
name: 'batchDetail',
|
||||
data() {
|
||||
return {
|
||||
//paramBatchId : this.$route.params.batchId,
|
||||
paramBatchId : this.$route.params.batchId,
|
||||
//날짜 조회
|
||||
ko: vdp_translation_ko.js,
|
||||
periodDay: 7,
|
||||
@@ -120,8 +119,9 @@ export default {
|
||||
|
||||
pageType: 'CALC',
|
||||
|
||||
batchId : this.$route.params.batchId,
|
||||
batchNm : this.$route.params.batchNm,
|
||||
batchId : this.$route.params.props.batchId,
|
||||
batchNm : this.$route.params.props.batchNm,
|
||||
batchType: this.$route.params.props.batchType,
|
||||
|
||||
//상태조회
|
||||
sttusCd: '',
|
||||
@@ -154,6 +154,8 @@ export default {
|
||||
noDataStr: '검색 결과가 없습니다.',
|
||||
params: {
|
||||
batchId : '',
|
||||
batchType: '',
|
||||
batchNm: '',
|
||||
sttusCd: '',
|
||||
startDt: '',
|
||||
endDt: '',
|
||||
@@ -220,6 +222,8 @@ export default {
|
||||
startDt: moment(this.startDate).format('YYYYMMDD'),
|
||||
endDt: moment(this.endDate).format('YYYYMMDD'),
|
||||
batchId: this.batchId,
|
||||
batchNm: this.batchNm,
|
||||
batchType: this.batchType,
|
||||
sttusCd: this.sttusCd
|
||||
}
|
||||
this.$refs.table.search(this.grid.params, isKeep);
|
||||
@@ -291,10 +295,14 @@ export default {
|
||||
},
|
||||
|
||||
async runExecuteJob(){
|
||||
console.log("this.strDate",this.strDate)
|
||||
const params = {
|
||||
strDate : this.strDate,
|
||||
batchId : this.batchId
|
||||
strDate : moment(this.strDate).format('YYYY-MM-DD'),
|
||||
batchId : this.batchId,
|
||||
batchType : this.batchType,
|
||||
batchNm : this.batchNm,
|
||||
}
|
||||
console.log("params",params)
|
||||
try {
|
||||
const response = await sysMgtApi.batchExecuteJob(params);
|
||||
|
||||
|
||||
@@ -7,13 +7,21 @@
|
||||
</div>
|
||||
<div class="table">
|
||||
<custom-grid ref="table" :url="grid.url" :columns="grid.columns"></custom-grid>
|
||||
<router-link
|
||||
:to="{
|
||||
name: 'batchDetail',
|
||||
params: { batchId : 'BATCH_003'}
|
||||
}">
|
||||
</router-link>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import customGrid from '@/components/CustomGrid';
|
||||
import batchDetail from './BatchDetail.vue'
|
||||
|
||||
class CustomATagRenderer {
|
||||
constructor(props) {
|
||||
@@ -62,7 +70,7 @@ export default {
|
||||
renderer: {
|
||||
type: CustomATagRenderer,
|
||||
options: {
|
||||
callback: this.batchDetail,
|
||||
callback: this.goBatchDetail,
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -77,6 +85,7 @@ export default {
|
||||
},
|
||||
components: {
|
||||
customGrid: customGrid,
|
||||
batchDetail: batchDetail,
|
||||
},
|
||||
created() {
|
||||
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
|
||||
@@ -112,9 +121,12 @@ export default {
|
||||
this.$refs.table.search(this.grid.params, isKeep);
|
||||
this.sendStoreData();
|
||||
},
|
||||
batchDetail(props) {
|
||||
this.row.batchId = props.batchId;
|
||||
this.$router.push({ path: `/sysMgt/batchDetail/${props.batchId}`, params: this.row });
|
||||
goBatchDetail(props) {
|
||||
// this.row = props
|
||||
// console.log("props1",props.getters)
|
||||
// console.log("props2",props)
|
||||
|
||||
this.$router.push({ name: "batchDetail", params: {props: props} });
|
||||
},
|
||||
sendStoreData: function () {
|
||||
const getP = this.$refs.table.getPagination();
|
||||
|
||||
@@ -14,38 +14,35 @@
|
||||
<vuejs-datepicker
|
||||
:language="ko"
|
||||
:format="customFormatter"
|
||||
:disabled-dates="disabledSDate"
|
||||
v-model="startDate"
|
||||
@selected="selectedStartDate(0)"
|
||||
@closed="closeDate('start')"
|
||||
></vuejs-datepicker>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div style="margin-right: 20px;">
|
||||
<label for="right" class="label">시작시간</label>
|
||||
<div class="term">
|
||||
<span class="custom_input icon_date">
|
||||
<vue-timepicker v-model="StartTime" format="hh:mm A" :minute-interval="10"></vue-timepicker>
|
||||
<vue-timepicker v-model="startTime" :minuteInterval="10"></vue-timepicker>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div style="margin-right: 30px;">
|
||||
<label for="right" class="label">종료시간</label>
|
||||
<div class="term">
|
||||
<span class="custom_input icon_date">
|
||||
<vue-timepicker v-model="EndTime" format="hh:mm A" :minute-interval="10"></vue-timepicker>
|
||||
<vue-timepicker v-model="endTime" :minuteInterval="10"></vue-timepicker>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<input type="radio" name="state" value="use" id="popup_radio1">
|
||||
<label for="popup_radio1">사용</label>
|
||||
<input type="radio" name="state" value="notUse" id="popup_radio2">
|
||||
<label for="popup_radio2">점검중</label>
|
||||
<input type="radio" v-model="state" name="state" value="use" id="popup_radio1">
|
||||
<label for="popup_radio1" style="margin-right: 20px;">사용</label>
|
||||
<input type="radio" v-model="state" name="state" value="notUse" id="popup_radio2">
|
||||
<label for="popup_radio2" style="margin-right: 30px;">점검중</label>
|
||||
</div>
|
||||
<div>
|
||||
<button type="button" class="button grey" @click="save">저장</button>
|
||||
<button type="button" class="button grey" @click="fnSaveTxt">저장</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -68,52 +65,20 @@
|
||||
|
||||
<script>
|
||||
import customGrid from '@/components/CustomGrid';
|
||||
import Timepicker from 'vue-timepicker';
|
||||
|
||||
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);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
import moment from 'moment';
|
||||
import VueTimepicker from 'vue2-timepicker';
|
||||
import 'vue2-timepicker/dist/VueTimepicker.css'
|
||||
import sysMgtApi from '../service/sysMgtApi'
|
||||
|
||||
export default {
|
||||
name: 'workState',
|
||||
data() {
|
||||
return {
|
||||
isFocused: false,
|
||||
srchGbn: '00',
|
||||
srchGbn2: '00',
|
||||
row: {},
|
||||
perPageCnt: 50,
|
||||
options: [
|
||||
{ text: '20', value: 20 },
|
||||
{ text: '50', value: 50 },
|
||||
{ text: '100', value: 100 },
|
||||
],
|
||||
//날짜 조회
|
||||
ko: vdp_translation_ko.js,
|
||||
periodDay: 7,
|
||||
sDateDiv: 'day',
|
||||
startDate: new Date(),
|
||||
|
||||
totalItems: 0,
|
||||
grid: {
|
||||
url: '/api/v1/bo/sysMgt/notiList',
|
||||
@@ -122,45 +87,32 @@ export default {
|
||||
addCls: 'box_OFvis',
|
||||
initialRequest: false,
|
||||
columns: [
|
||||
{ name: 'sndYmd', header: '발송 날짜', align: 'center', width: '15%' },
|
||||
{ name: 'userId', header: '유저 ID', align: 'center', width: '15%' },
|
||||
{ name: 'notiDiv', header: '알림 구분', align: 'center', width: '15%' },
|
||||
{ name: 'webReqId', header: '웹요청 ID', align: 'center', width: '20%' },
|
||||
// { name: 'regDt', header: '등록 일시', align: 'center', width: '15%' },
|
||||
{ name: 'day', header: '날짜', align: 'center', width: '15%' },
|
||||
{ name: 'userId', header: '시작 시간', align: 'center', width: '15%' },
|
||||
{ name: 'notiDiv', header: '종료 시간', align: 'center', width: '15%' },
|
||||
{ name: 'webReqId', header: '상태 변경', align: 'center', width: '20%' },
|
||||
],
|
||||
noDataStr: '발송 내역이 없습니다.',
|
||||
params: {
|
||||
startDt: '',
|
||||
endDt: '',
|
||||
search: '',
|
||||
srchGbn: '',
|
||||
srchGbn2: ''
|
||||
},
|
||||
StartTime : null,
|
||||
EndTime : null,
|
||||
startTime : '',
|
||||
endTime : '',
|
||||
state: 'use'
|
||||
},
|
||||
};
|
||||
},
|
||||
components: {
|
||||
customGrid: customGrid,
|
||||
vuejsDatepicker,
|
||||
Timepicker,
|
||||
VueTimepicker,
|
||||
|
||||
},
|
||||
created() {
|
||||
this.setPeriodDay(0);
|
||||
},
|
||||
destroyed() {
|
||||
// this.$store.commit('dataStore/updateDataStore', '');
|
||||
this.$store.commit('searchcondition/updateSearchCondition', {
|
||||
page: 1,
|
||||
perPage: 50,
|
||||
params: {
|
||||
startDt: '',
|
||||
endDt: '',
|
||||
search: '',
|
||||
srchGbn: '',
|
||||
srchGbn2: ''
|
||||
},
|
||||
});
|
||||
},
|
||||
@@ -182,9 +134,30 @@ export default {
|
||||
},
|
||||
|
||||
methods: {
|
||||
save(){
|
||||
alert("저장!")
|
||||
fnSaveTxt(){
|
||||
let params = {
|
||||
startDate : this.startDate,
|
||||
startTime : this.startTime,
|
||||
endTime : this.endTime,
|
||||
state : this.state,
|
||||
}
|
||||
sysMgtApi.setWorkState(params);
|
||||
|
||||
},
|
||||
search: function (isKeep) {
|
||||
this.$refs.table.search(this.grid.params, isKeep);
|
||||
},
|
||||
|
||||
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');
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -14,6 +14,7 @@ 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.Const;
|
||||
import springfox.documentation.spring.web.json.Json;
|
||||
|
||||
import org.apache.http.HttpStatus;
|
||||
import org.apache.http.protocol.HTTP;
|
||||
@@ -274,8 +275,8 @@ public class SysMgtController {
|
||||
|
||||
/**
|
||||
* data: 2022. 10.24.
|
||||
* auth: Lee minha
|
||||
* desc: 배치 리스트 조회
|
||||
* auth: Lee
|
||||
* desc: 배치 리스트 조회.
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "batchList", notes = "배치 리스트 조회")
|
||||
@@ -286,9 +287,9 @@ public class SysMgtController {
|
||||
}
|
||||
|
||||
/**
|
||||
* data : 2022. 10. 26
|
||||
* auth : Lee minha
|
||||
* desc : 배치 상세내용
|
||||
* date : 2022. 10. 26
|
||||
* auth : Lee
|
||||
* desc : 배치 상세내용.
|
||||
* @return
|
||||
*/
|
||||
|
||||
@@ -299,16 +300,21 @@ public class SysMgtController {
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* date : 2022. 10. 26
|
||||
* auth : Lee
|
||||
* @param batchReqMap
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "batchExecuteJob", method = {RequestMethod.POST})
|
||||
@ResponseBody
|
||||
public BatchExeLogResDto batchExecuteJob(@RequestBody @Valid Map<Object, Object> batchReqMap) {
|
||||
@@ -324,35 +330,22 @@ public class SysMgtController {
|
||||
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 batchType = (String) batchReqMap.get("batchType");
|
||||
String strDate = (String) batchReqMap.get("strDate");
|
||||
|
||||
logger.info("유입날짜 확인 {}",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_017")||
|
||||
jobId.equals("BATCH_020")) {
|
||||
|
||||
logger.info("batchExecuteJob input Date Check = {}",batchReqMap.get("strDate"));
|
||||
logger.debug("확인 batchType={}",batchType);
|
||||
|
||||
// 배치 타입 : 일배치, 월배치, 매시간
|
||||
if("월배치".equals(batchType)) {
|
||||
logger.debug("월배치 batchType={}",batchType);
|
||||
try {
|
||||
Date date = new SimpleDateFormat("yyyy-MM-dd").parse(strDate);
|
||||
strDate = (String)monthDateFormat.format(date);
|
||||
@@ -360,22 +353,8 @@ public class SysMgtController {
|
||||
// TODO Auto-generated catch block
|
||||
e1.printStackTrace();
|
||||
}
|
||||
|
||||
} 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")||
|
||||
jobId.equals("BATCH_021")||
|
||||
jobId.equals("BATCH_022")||
|
||||
jobId.equals("BATCH_023")){
|
||||
|
||||
}else if("일배치".equals(batchType)) {
|
||||
logger.debug("일배치 batchType={}",batchType);
|
||||
try {
|
||||
Date date = new SimpleDateFormat("yyyy-MM-dd").parse(strDate);
|
||||
strDate = (String)dayDateFormat.format(date);
|
||||
@@ -383,9 +362,8 @@ public class SysMgtController {
|
||||
// TODO Auto-generated catch block
|
||||
e1.printStackTrace();
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
}else if("매시간".equals(batchType)) {
|
||||
logger.debug("매시간 batchType={}",batchType);
|
||||
try {
|
||||
Date date = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.S").parse(strDate);
|
||||
strDate = (String)timeDateFormat.format(date);
|
||||
@@ -449,4 +427,10 @@ public class SysMgtController {
|
||||
return sysService.notiList(notiListReqDto);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/setWorkState", method = {RequestMethod.POST})
|
||||
@ResponseBody
|
||||
public void setWorkState(@RequestBody @Valid Object setWorkParam) {
|
||||
|
||||
logger.debug("setWorkParam={}",setWorkParam);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,12 @@ public class BatchDetailReqDto implements Serializable{
|
||||
//배치 아이디
|
||||
private String batchId;
|
||||
|
||||
//배치명
|
||||
private String batchNm;
|
||||
|
||||
//배치 유형
|
||||
private String batchType;
|
||||
|
||||
//검색 시작일
|
||||
private String startDt;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user