|
|
|
@ -12,6 +12,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
|
|
|
|
|
|
|
|
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.fims.base.service.bean.OgdpBean;
|
|
|
|
|
import cokr.xit.fims.task.TaskRequestMappingHandlerMapping;
|
|
|
|
@ -36,17 +38,34 @@ public class MainController extends cokr.xit.base.web.MainController {
|
|
|
|
|
@Resource(name="userService")
|
|
|
|
|
private UserService userService;
|
|
|
|
|
|
|
|
|
|
@Resource(name="sigunguDepartmentService")
|
|
|
|
|
private SigunguDepartmentService sggDeptService;
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
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("sysSggCd", sggCd);
|
|
|
|
|
return mav;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|