최고관리자 화면 추가(배치 수동 실행 등)
parent
3348eb2828
commit
f6db42e912
@ -1,8 +1,51 @@
|
||||
package cokr.xit.fims.base;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import cokr.xit.base.user.ManagedUser;
|
||||
import cokr.xit.interfaces.smg.service.bean.SmgServiceBean;
|
||||
|
||||
@Controller
|
||||
public class UserController extends cokr.xit.base.user.web.UserController<ManagedUser> {}
|
||||
public class UserController extends cokr.xit.base.user.web.UserController<ManagedUser> {
|
||||
@Resource
|
||||
SmgServiceBean smgServiceBean;
|
||||
|
||||
@RequestMapping(name="최고관리자 메인",value="/superUserMain.do")
|
||||
public ModelAndView superUserMain() {
|
||||
ModelAndView mav = new ModelAndView();
|
||||
mav.setViewName("fims/superUser-main");
|
||||
return mav;
|
||||
}
|
||||
|
||||
@RequestMapping(name="배치실행",value="/executeBatch.do")
|
||||
public ModelAndView executeBatch(String batch) {
|
||||
ModelAndView mav = new ModelAndView();
|
||||
System.out.println("파라미터:"+batch);
|
||||
switch (batch) {
|
||||
case "smgReceive" : {
|
||||
smgServiceBean.receivePetitions();
|
||||
break;
|
||||
}
|
||||
case "smgSend" : {
|
||||
smgServiceBean.sendReplies();
|
||||
break;
|
||||
}
|
||||
case "epostSend" : {
|
||||
|
||||
break;
|
||||
}
|
||||
case "epostReceive" : {
|
||||
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
||||
}
|
||||
mav.setViewName("jsonView");
|
||||
return mav;
|
||||
}
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%>
|
||||
<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%>
|
||||
<!-- inner page html -->
|
||||
<div class="content-wrapper">
|
||||
<div class="container-xxl flex-grow-1 px-0">
|
||||
<c:set var="pageKorName" scope="request">최고관리자 메뉴</c:set>
|
||||
<div class="card">
|
||||
<div class="wrapper-list">
|
||||
|
||||
<div class="doc-example">
|
||||
<div class="doc-example-content fs-big" data-label="배치 수동 실행">
|
||||
<button type="button" class="btn btn-primary" onclick="exceuteBatch('smgReceive');">국민신문고 수신</button>
|
||||
<button type="button" class="btn btn-primary" onclick="exceuteBatch('smgSend');">국민신문고 답변 송신</button>
|
||||
<button type="button" class="btn btn-primary" onclick="exceuteBatch('epostSend');">전자우편 송신</button>
|
||||
<button type="button" class="btn btn-primary" onclick="exceuteBatch('epostReceive');">전자우편결과 수신</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<jsp:include page="/WEB-INF/jsp/include/bottom.jsp" />
|
||||
|
||||
<div class="content-backdrop fade"></div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function exceuteBatch(batch){
|
||||
ajax.get({
|
||||
url : wctx.url("/user/executeBatch.do"),
|
||||
data : { batch : batch},
|
||||
success : resp => {
|
||||
dialog.alert("실행되었습니다.");
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
Loading…
Reference in New Issue