|
|
@ -15,11 +15,10 @@ import cokr.xit.base.user.service.UserService;
|
|
|
|
import cokr.xit.fims.mngt.service.bean.FimsOgdpBean;
|
|
|
|
import cokr.xit.fims.mngt.service.bean.FimsOgdpBean;
|
|
|
|
import cokr.xit.fims.task.TaskRequestMappingHandlerMapping;
|
|
|
|
import cokr.xit.fims.task.TaskRequestMappingHandlerMapping;
|
|
|
|
import cokr.xit.foundation.data.DataObject;
|
|
|
|
import cokr.xit.foundation.data.DataObject;
|
|
|
|
import cokr.xit.foundation.web.AbstractController;
|
|
|
|
|
|
|
|
import cokr.xit.foundation.web.RequestHandlerReader;
|
|
|
|
import cokr.xit.foundation.web.RequestHandlerReader;
|
|
|
|
|
|
|
|
|
|
|
|
@Controller
|
|
|
|
@Controller
|
|
|
|
public class MainController extends AbstractController {
|
|
|
|
public class MainController extends cokr.xit.base.web.MainController {
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
|
private TaskRequestMappingHandlerMapping requestHandlers;
|
|
|
|
private TaskRequestMappingHandlerMapping requestHandlers;
|
|
|
@ -30,9 +29,40 @@ public class MainController extends AbstractController {
|
|
|
|
@Resource(name="userService")
|
|
|
|
@Resource(name="userService")
|
|
|
|
private UserService userService;
|
|
|
|
private UserService userService;
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping(name="로그인", value="/login.do")
|
|
|
|
@Override
|
|
|
|
public String loginPage() {
|
|
|
|
public ModelAndView loginPage() {
|
|
|
|
return "login";
|
|
|
|
return new ModelAndView("login");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public ModelAndView getURLs(boolean multiple) {
|
|
|
|
|
|
|
|
List<DataObject> urls = new RequestHandlerReader().read(requestHandlers);
|
|
|
|
|
|
|
|
attachTaskPrefixName(urls);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return new ModelAndView("select-url")
|
|
|
|
|
|
|
|
.addObject("multiple", multiple)
|
|
|
|
|
|
|
|
.addObject("urls", toJson(urls));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@SuppressWarnings("unchecked")
|
|
|
|
|
|
|
|
private void attachTaskPrefixName(List<DataObject> list) {
|
|
|
|
|
|
|
|
for(DataObject item : list) {
|
|
|
|
|
|
|
|
String name = item.string("name");
|
|
|
|
|
|
|
|
String url = item.string("url");
|
|
|
|
|
|
|
|
if(!name.equals(url)) {
|
|
|
|
|
|
|
|
switch (url) {
|
|
|
|
|
|
|
|
case "/BPV": item.set("name","전용차로과태료업무 "+name);
|
|
|
|
|
|
|
|
case "/PVS": item.set("name","주정차위반과태료업무 "+name);
|
|
|
|
|
|
|
|
case "/DPV": item.set("name","장애인주차위반과태료업무 "+name);
|
|
|
|
|
|
|
|
case "/ECA": item.set("name","전기차주차위반과태료업무 "+name);
|
|
|
|
|
|
|
|
case "/PES": item.set("name","밤샘주차위반과태료업무 "+name);
|
|
|
|
|
|
|
|
case "/DVS": item.set("name","미세먼지과태료업무 "+name);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if(item.get("children") != null) {
|
|
|
|
|
|
|
|
attachTaskPrefixName((List<DataObject>) item.get("children"));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping(name="회원가입 페이지", value="/signupPage.do")
|
|
|
|
@GetMapping(name="회원가입 페이지", value="/signupPage.do")
|
|
|
@ -77,40 +107,6 @@ public class MainController extends AbstractController {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping(name="홈", value={"/", "/index.do"})
|
|
|
|
|
|
|
|
public ModelAndView mainPage() {
|
|
|
|
|
|
|
|
return new ModelAndView("index");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(name="기능 URL 선택", value="/urls.do")
|
|
|
|
|
|
|
|
public ModelAndView getURLs(boolean multiple) {
|
|
|
|
|
|
|
|
List<DataObject> urls = new RequestHandlerReader().read(requestHandlers);
|
|
|
|
|
|
|
|
attachTaskPrefixName(urls);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return new ModelAndView("select-url")
|
|
|
|
|
|
|
|
.addObject("multiple", multiple)
|
|
|
|
|
|
|
|
.addObject("urls", toJson(urls));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@SuppressWarnings("unchecked")
|
|
|
|
|
|
|
|
private void attachTaskPrefixName(List<DataObject> list) {
|
|
|
|
|
|
|
|
for(DataObject item : list) {
|
|
|
|
|
|
|
|
String name = item.string("name");
|
|
|
|
|
|
|
|
String url = item.string("url");
|
|
|
|
|
|
|
|
if(!name.equals(url)) {
|
|
|
|
|
|
|
|
switch (url) {
|
|
|
|
|
|
|
|
case "/BPV": item.set("name","전용차로과태료업무 "+name);
|
|
|
|
|
|
|
|
case "/PVS": item.set("name","주정차위반과태료업무 "+name);
|
|
|
|
|
|
|
|
case "/DPV": item.set("name","장애인주차위반과태료업무 "+name);
|
|
|
|
|
|
|
|
case "/ECA": item.set("name","전기차주차위반과태료업무 "+name);
|
|
|
|
|
|
|
|
case "/PES": item.set("name","밤샘주차위반과태료업무 "+name);
|
|
|
|
|
|
|
|
case "/DVS": item.set("name","미세먼지과태료업무 "+name);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if(item.get("children") != null) {
|
|
|
|
|
|
|
|
attachTaskPrefixName((List<DataObject>) item.get("children"));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|