|
|
@ -12,6 +12,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
|
|
|
|
|
|
|
|
|
|
import cokr.xit.base.user.ManagedUser;
|
|
|
|
import cokr.xit.base.user.ManagedUser;
|
|
|
|
|
|
|
|
import cokr.xit.base.user.SigunguQuery;
|
|
|
|
|
|
|
|
import cokr.xit.base.user.service.SigunguDepartmentService;
|
|
|
|
import cokr.xit.base.user.service.UserService;
|
|
|
|
import cokr.xit.base.user.service.UserService;
|
|
|
|
import cokr.xit.fims.base.service.bean.OgdpBean;
|
|
|
|
import cokr.xit.fims.base.service.bean.OgdpBean;
|
|
|
|
import cokr.xit.fims.task.TaskRequestMappingHandlerMapping;
|
|
|
|
import cokr.xit.fims.task.TaskRequestMappingHandlerMapping;
|
|
|
@ -36,17 +38,34 @@ public class MainController extends cokr.xit.base.web.MainController {
|
|
|
|
@Resource(name="userService")
|
|
|
|
@Resource(name="userService")
|
|
|
|
private UserService userService;
|
|
|
|
private UserService userService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource(name="sigunguDepartmentService")
|
|
|
|
|
|
|
|
private SigunguDepartmentService sggDeptService;
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public ModelAndView loginPage() {
|
|
|
|
public ModelAndView loginPage() {
|
|
|
|
|
|
|
|
ModelAndView mav = new ModelAndView("login");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<DataObject> sggs = sggDeptService.getSigunguList(new SigunguQuery());
|
|
|
|
|
|
|
|
if (sggs.isEmpty()) {
|
|
|
|
|
|
|
|
throw new RuntimeException("No sigungu info found.");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
for(DataObject sgg : sggs) {
|
|
|
|
|
|
|
|
int count = ogdpBean.countUser(sgg.string("SGG_CD"));
|
|
|
|
|
|
|
|
String userUseYn = count > 0 ? "Y" : "N";
|
|
|
|
|
|
|
|
sgg.set("USER_USE_YN", userUseYn);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
boolean multiple = sggs.size() > 1;
|
|
|
|
|
|
|
|
mav.addObject("sggs", toJson(sggs));
|
|
|
|
|
|
|
|
mav.addObject("multipleSggs", multiple);
|
|
|
|
|
|
|
|
|
|
|
|
ModelAndView mav = new ModelAndView("login");
|
|
|
|
|
|
|
|
List<DataObject> sggList = ogdpBean.selectAllSggList();
|
|
|
|
|
|
|
|
mav.addObject("sggList", sggList);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mav.addObject("sggList", sggs);
|
|
|
|
mav.addObject("sysInstCd", instCd);
|
|
|
|
mav.addObject("sysInstCd", instCd);
|
|
|
|
mav.addObject("sysSggCd", sggCd);
|
|
|
|
mav.addObject("sysSggCd", sggCd);
|
|
|
|
return mav;
|
|
|
|
return mav;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|