업무시스템 수동 통보 추가

main
이범준 1 year ago
parent 921b86bc4e
commit b3a36cd234

@ -1,6 +1,8 @@
package cokr.xit.fims.base; package cokr.xit.fims.base;
import java.io.File; import java.io.File;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Resource; import javax.annotation.Resource;
@ -13,6 +15,7 @@ import org.springframework.web.servlet.ModelAndView;
import cokr.xit.base.user.ManagedUser; import cokr.xit.base.user.ManagedUser;
import cokr.xit.fims.cmmn.DirectoryStructureToJson; import cokr.xit.fims.cmmn.DirectoryStructureToJson;
import cokr.xit.fims.cmmn.DirectoryStructureToJson.Node; import cokr.xit.fims.cmmn.DirectoryStructureToJson.Node;
import cokr.xit.fims.crdn.service.bean.ImportServiceBean;
import cokr.xit.interfaces.smg.service.bean.SmgServiceBean; import cokr.xit.interfaces.smg.service.bean.SmgServiceBean;
@Controller @Controller
@ -20,6 +23,9 @@ public class UserController extends cokr.xit.base.user.web.UserController<Manage
@Resource @Resource
SmgServiceBean smgServiceBean; SmgServiceBean smgServiceBean;
@Resource
ImportServiceBean importServiceBean;
@RequestMapping(name="최고관리자 메인",value="/superUser/main.do") @RequestMapping(name="최고관리자 메인",value="/superUser/main.do")
public ModelAndView superUserMain() { public ModelAndView superUserMain() {
ModelAndView mav = new ModelAndView(); ModelAndView mav = new ModelAndView();
@ -55,6 +61,41 @@ public class UserController extends cokr.xit.base.user.web.UserController<Manage
return mav; return mav;
} }
@RequestMapping(name="업무통보 수동 실행",value="/superUser/executeAlert.do")
public ModelAndView executeAlert(String alertName, String interfaceKey) {
ModelAndView mav = new ModelAndView();
switch (alertName) {
case "smgReceive" : {
if(interfaceKey == null || interfaceKey.equals("")) {
new RuntimeException("인터페이스키 없음");
}
List<String> interfaceKeys = new ArrayList<String>();
interfaceKeys.add(interfaceKey);
importServiceBean.createCrdns(interfaceKeys);
break;
}
case "smgSend" : {
break;
}
case "epostSend" : {
break;
}
case "epostReceive" : {
break;
}
default:
}
mav.setViewName("jsonView");
return mav;
}
@RequestMapping(name="서버 파일 현황 조회",value="/superUser/getFileTree.do") @RequestMapping(name="서버 파일 현황 조회",value="/superUser/getFileTree.do")
public ModelAndView getFileTree() throws Exception { public ModelAndView getFileTree() throws Exception {

@ -17,6 +17,12 @@
</div> </div>
</div> </div>
<div class="doc-example mt-4">
<div class="doc-example-content fs-big" data-label="업무시스템 수동 통보">
<button type="button" class="btn btn-primary" onclick="exceuteAlert('smgReceive');">국민신문고 수신</button>
</div>
</div>
<div class="doc-example mt-4"> <div class="doc-example mt-4">
<div class="doc-example-content fs-big" data-label="파일 현황"> <div class="doc-example-content fs-big" data-label="파일 현황">
<div class="card-datatable text-nowrap"> <div class="card-datatable text-nowrap">
@ -79,6 +85,29 @@ function exceuteBatch(batch){
}); });
} }
function exceuteAlert(alertName){
if(alertName != "smgReceive"){
return;
}
var interfaceKey = prompt("인터페이스키를 입력하세요.");
if(interfaceKey == null || interfaceKey == ""){
return;
}
ajax.post({
url : wctx.url("/user/superUser/executeAlert.do"),
data : {
alertName : alertName,
interfaceKey : interfaceKey
},
success : resp => {
dialog.alert("실행되었습니다.");
}
});
}
var tempPathArray = []; var tempPathArray = [];
/** /**

Loading…
Cancel
Save