|
@@ -3,19 +3,24 @@ package com.lemon.lifecenter.controller;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
|
|
|
+import org.json.JSONObject;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
import org.springframework.web.bind.annotation.ModelAttribute;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
+import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
|
|
|
|
import com.lemon.lifecenter.common.LifeCenterConfigVO;
|
|
|
import com.lemon.lifecenter.common.LifeCenterController;
|
|
|
import com.lemon.lifecenter.common.LifeCenterPaging;
|
|
|
+import com.lemon.lifecenter.dto.LoginDTO;
|
|
|
import com.lemon.lifecenter.dto.StaffDTO;
|
|
|
+import com.lemon.lifecenter.service.LoginService;
|
|
|
import com.lemon.lifecenter.service.StaffService;
|
|
|
|
|
|
// 의료진관리 contorller
|
|
@@ -24,6 +29,8 @@ import com.lemon.lifecenter.service.StaffService;
|
|
|
public class StaffController extends LifeCenterController {
|
|
|
private final Logger logger = LoggerFactory.getLogger(this.getClass());
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private LoginService loginService;
|
|
|
@Autowired
|
|
|
private StaffService memberService;
|
|
|
@Autowired
|
|
@@ -101,4 +108,24 @@ public class StaffController extends LifeCenterController {
|
|
|
|
|
|
return mv;
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ @RequestMapping( value="/duplicateIdCheck", method = RequestMethod.POST )
|
|
|
+ @ResponseBody
|
|
|
+ public String duplicateIdCheck( @RequestParam( value="id", required = false, defaultValue = "" ) String id ) {
|
|
|
+ boolean result = false;
|
|
|
+ JSONObject obj = new JSONObject();
|
|
|
+ LoginDTO dto = new LoginDTO();
|
|
|
+
|
|
|
+ if( id.trim().equals( "" ) ) {
|
|
|
+ result = true;
|
|
|
+ } else {
|
|
|
+ dto.setId( id.trim() );
|
|
|
+ loginService.selectMemberIdCount( dto );
|
|
|
+ }
|
|
|
+
|
|
|
+ obj.put( "result" , result );
|
|
|
+
|
|
|
+ return obj.toString();
|
|
|
+ }
|
|
|
}
|