diff --git a/.classpath b/.classpath index 48ab83f..14ae952 100644 --- a/.classpath +++ b/.classpath @@ -21,11 +21,7 @@ - - - - - + diff --git a/.settings/org.eclipse.buildship.core.prefs b/.settings/org.eclipse.buildship.core.prefs index 7b8f972..a6350f0 100644 --- a/.settings/org.eclipse.buildship.core.prefs +++ b/.settings/org.eclipse.buildship.core.prefs @@ -1,13 +1,13 @@ -arguments= +arguments=--init-script C\:\\Users\\bd091\\AppData\\Roaming\\Antigravity\\User\\globalStorage\\redhat.java\\1.50.0\\config_win\\org.eclipse.osgi\\58\\0\\.cp\\gradle\\init\\init.gradle --init-script C\:\\Users\\bd091\\AppData\\Roaming\\Antigravity\\User\\globalStorage\\redhat.java\\1.50.0\\config_win\\org.eclipse.osgi\\58\\0\\.cp\\gradle\\protobuf\\init.gradle auto.sync=false build.scans.enabled=false connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER) connection.project.dir= eclipse.preferences.version=1 gradle.user.home= -java.home= +java.home=C\:/Program Files/Java/jdk-21 jvm.arguments= offline.mode=false -override.workspace.settings=false -show.console.view=false -show.executions.view=false +override.workspace.settings=true +show.console.view=true +show.executions.view=true diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..bcf33c3 --- /dev/null +++ b/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,11 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore +org.eclipse.jdt.core.compiler.annotation.nonnull=javax.annotation.Nonnull +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=javax.annotation.ParametersAreNonnullByDefault +org.eclipse.jdt.core.compiler.annotation.nullable=javax.annotation.Nullable +org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled +org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning +org.eclipse.jdt.core.compiler.problem.nullReference=warning +org.eclipse.jdt.core.compiler.problem.nullSpecViolation=warning +org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning +org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..b84f89c --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,4 @@ +{ + "java.configuration.updateBuildConfiguration": "interactive", + "java.compile.nullAnalysis.mode": "automatic" +} \ No newline at end of file diff --git a/src/main/java/com/madeu/crm/kiosk/ctrl/KioskController.java b/src/main/java/com/madeu/crm/kiosk/ctrl/KioskController.java index 74c30b8..ecc01f6 100644 --- a/src/main/java/com/madeu/crm/kiosk/ctrl/KioskController.java +++ b/src/main/java/com/madeu/crm/kiosk/ctrl/KioskController.java @@ -3,10 +3,9 @@ package com.madeu.crm.kiosk.ctrl; import java.util.HashMap; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RestController; import org.springframework.web.servlet.ModelAndView; import com.madeu.constants.Constants; @@ -21,241 +20,198 @@ import jakarta.servlet.http.HttpServletResponse; import lombok.extern.slf4j.Slf4j; @Slf4j -@Controller +@RestController public class KioskController extends ManagerDraftAction { - @Autowired - private KioskService kioskService; - - @Autowired + @Autowired + private KioskService kioskService; + + @Autowired private WebLogHistoryService webLogHistoryService; + // ==================== 뷰 반환 메서드 (ModelAndView) ==================== + /** * 키오스크 메인화면 화면으로 이동. - * - * @param request - * @param response - * @return */ @GetMapping("/kiosk/MainIntro.do") - public String selectMainIntro(HttpServletRequest request, HttpServletResponse response, Model model) { - log.debug("KioskController selectMainIntro START"); - - log.debug("KioskController selectMainIntro END"); - return "/kiosk/consultation"; + public ModelAndView selectMainIntro(HttpServletRequest request, HttpServletResponse response) { + log.debug("KioskController selectMainIntro START"); + log.debug("KioskController selectMainIntro END"); + return new ModelAndView("/kiosk/consultation"); } - + /** - * 키오스크 신규 환자 화면 화면으로 이동. - * - * @param request - * @param response - * @return + * 키오스크 신규 환자 화면으로 이동. */ @GetMapping("/kiosk/NewPatientIntro.do") - public String NewPatientIntro(HttpServletRequest request, HttpServletResponse response, Model model) { - log.debug("KioskController NewPatientIntro START"); - - log.debug("KioskController NewPatientIntro END"); - return "/kiosk/new-patient"; + public ModelAndView NewPatientIntro(HttpServletRequest request, HttpServletResponse response) { + log.debug("KioskController NewPatientIntro START"); + log.debug("KioskController NewPatientIntro END"); + return new ModelAndView("/kiosk/new-patient"); } - + /** - * 키오스크 기존 환자 화면 화면으로 이동. - * - * @param request - * @param response - * @return + * 키오스크 기존 환자 화면으로 이동. */ @GetMapping("/kiosk/ExistPatientIntro.do") - public String ExistPatientIntro(HttpServletRequest request, HttpServletResponse response, Model model) { - log.debug("KioskController ExistPatientIntro START"); - - log.debug("KioskController ExistPatientIntro END"); - return "/kiosk/existing-patient"; + public ModelAndView ExistPatientIntro(HttpServletRequest request, HttpServletResponse response) { + log.debug("KioskController ExistPatientIntro START"); + log.debug("KioskController ExistPatientIntro END"); + return new ModelAndView("/kiosk/existing-patient"); + } + + /** + * 키오스크 동의서 화면으로 이동. + */ + @GetMapping("/kiosk/agreement.do") + public ModelAndView agreementPage(HttpServletRequest request, HttpServletResponse response) { + log.debug("KioskController agreementPage START"); + log.debug("KioskController agreementPage END"); + return new ModelAndView("/kiosk/agreement"); + } + + // ==================== API 메서드 (JSON 반환) ==================== + + /** + * 진료 정보 리스트 조회 (option) + */ + @PostMapping("/kiosk/getTreatmentOptionList.do") + public HashMap getTreatmentOptionList(HttpServletRequest request, HttpServletResponse response) { + log.debug("KioskController getTreatmentOptionList START"); + + HashMap paramMap = HttpUtil.getParameterMap(request); + HashMap map = new HashMap(); + + try { + map = kioskService.getTreatmentOptionList(paramMap); + } catch (Exception e) { + e.printStackTrace(); + map.put("msgCode", Constants.FAIL); + map.put("msgDesc", "서버 오류가 발생했습니다."); + } finally { + if (Constants.OK != map.get("msgCode")) { + map.put("msgCode", Constants.FAIL); + map.put("success", false); + if (null == map.get("msgDesc") || ("").equals(map.get("msgDesc"))) { + map.put("msgDesc", "정상적으로 수행되지 않았습니다. 관리자에게 문의하시기 바랍니다."); + } + } + } + log.debug("KioskController getTreatmentOptionList END"); + return map; } - - /** - * 진료 정보 리스트 조회 (option) - * - * @param request - * @param response - * @return - */ - @PostMapping("/kiosk/getTreatmentOptionList.do") - public ModelAndView getTreatmentOptionList(HttpServletRequest request, HttpServletResponse response) { - log.debug("KioskController getTreatmentOptionList START"); - - HashMap paramMap = HttpUtil.getParameterMap(request); - HashMap map = new HashMap(); - - try{ - map = kioskService.getTreatmentOptionList(paramMap); - } - catch (Exception e) { - e.printStackTrace(); - return null; - } - finally { - if(Constants.OK == map.get("msgCode")) { - } - else{ - map.put("msgCode", Constants.FAIL); - map.put("success", false); - if(null == map.get("msgDesc") || ("").equals(map.get("msgDesc"))) { - map.put("msgDesc","정상적으로 수행되지 않았습니다. 관리자에게 문의하시기 바랍니다."); - } - } - } - log.debug("KioskController getTreatmentOptionList END"); - return HttpUtil.makeHashToJsonModelAndView(map); - } - /** * 병원 기타정보 카테고리 타입 조회 - * - * @param request - * @param response - * @return */ @PostMapping("/kiosk/getCategoryList.do") - public ModelAndView getCategoryList(HttpServletRequest request, HttpServletResponse response) { - + public HashMap getCategoryList(HttpServletRequest request, HttpServletResponse response) { log.debug("KioskController getCategoryList START"); HashMap paramMap = HttpUtil.getParameterMap(request); HashMap map = new HashMap(); - try{ + try { map = kioskService.getCategoryList(paramMap); - } - catch (Exception e) { + } catch (Exception e) { e.printStackTrace(); - return null; - } - finally { - if(Constants.OK == map.get("msgCode")) { - - } - else{ + map.put("msgCode", Constants.FAIL); + map.put("msgDesc", "서버 오류가 발생했습니다."); + } finally { + if (Constants.OK != map.get("msgCode")) { map.put("msgCode", Constants.FAIL); map.put("success", false); - if(null == map.get("msgDesc") || ("").equals(map.get("msgDesc"))) { - map.put("msgDesc","정상적으로 수행되지 않았습니다. 관리자에게 문의하시기 바랍니다."); + if (null == map.get("msgDesc") || ("").equals(map.get("msgDesc"))) { + map.put("msgDesc", "정상적으로 수행되지 않았습니다. 관리자에게 문의하시기 바랍니다."); } } } log.debug("KioskController getCategoryList END"); - return HttpUtil.makeHashToJsonModelAndView(map); - } - + return map; + } + /** - * 병원 기타정보 카테고리 타입 조회 - * - * @param request - * @param response - * @return + * 병원 기타정보 카테고리 아이템 조회 */ @PostMapping("/kiosk/getCategoryItem.do") - public ModelAndView getCategoryItem(HttpServletRequest request, HttpServletResponse response) { - + public HashMap getCategoryItem(HttpServletRequest request, HttpServletResponse response) { log.debug("KioskController getCategoryItem START"); HashMap paramMap = HttpUtil.getParameterMap(request); HashMap map = new HashMap(); - - try{ - map = kioskService.getCategoryItem(paramMap); - } - catch (Exception e) { - e.printStackTrace(); - return null; - } - finally { - if(Constants.OK == map.get("msgCode")) { - } - else{ + try { + map = kioskService.getCategoryItem(paramMap); + } catch (Exception e) { + e.printStackTrace(); + map.put("msgCode", Constants.FAIL); + map.put("msgDesc", "서버 오류가 발생했습니다."); + } finally { + if (Constants.OK != map.get("msgCode")) { map.put("msgCode", Constants.FAIL); map.put("success", false); - if(null == map.get("msgDesc") || ("").equals(map.get("msgDesc"))) { - map.put("msgDesc","정상적으로 수행되지 않았습니다. 관리자에게 문의하시기 바랍니다."); + if (null == map.get("msgDesc") || ("").equals(map.get("msgDesc"))) { + map.put("msgDesc", "정상적으로 수행되지 않았습니다. 관리자에게 문의하시기 바랍니다."); } } } log.debug("KioskController getCategoryItem END"); - return HttpUtil.makeHashToJsonModelAndView(map); + return map; } - + /** * 고객 정보 리스트 조회 (option) - * 예약등록 팝업 - * @param request - * @param response - * @return */ @PostMapping("/kiosk/getUserOptionList.do") - public ModelAndView getUserOptionList(HttpServletRequest request, HttpServletResponse response) { - + public HashMap getUserOptionList(HttpServletRequest request, HttpServletResponse response) { log.debug("KioskController getUserOptionList START"); HashMap paramMap = HttpUtil.getParameterMap(request); HashMap map = new HashMap(); - - try{ - map = kioskService.getUserOptionList(paramMap); - } - catch (Exception e) { - e.printStackTrace(); - return null; - } - finally { - if(Constants.OK == map.get("msgCode")) { - } - else{ + try { + map = kioskService.getUserOptionList(paramMap); + } catch (Exception e) { + e.printStackTrace(); + map.put("msgCode", Constants.FAIL); + map.put("msgDesc", "서버 오류가 발생했습니다."); + } finally { + if (Constants.OK != map.get("msgCode")) { map.put("msgCode", Constants.FAIL); map.put("success", false); - if(null == map.get("msgDesc") || ("").equals(map.get("msgDesc"))) { - map.put("msgDesc","정상적으로 수행되지 않았습니다. 관리자에게 문의하시기 바랍니다."); + if (null == map.get("msgDesc") || ("").equals(map.get("msgDesc"))) { + map.put("msgDesc", "정상적으로 수행되지 않았습니다. 관리자에게 문의하시기 바랍니다."); } } } log.debug("KioskController getUserOptionList END"); - return HttpUtil.makeHashToJsonModelAndView(map); + return map; } - + /** - * 고객 정보 리스트 조회 (option) - * 예약등록 팝업 - * @param request - * @param response - * @return + * 고객 등록 */ @PostMapping("/kiosk/putUser.do") - public ModelAndView putUser(HttpServletRequest request, HttpServletResponse response) { - + public HashMap putUser(HttpServletRequest request, HttpServletResponse response) { log.debug("KioskController putUser START"); HashMap paramMap = HttpUtil.getParameterMap(request); HashMap map = new HashMap(); - + StringBuffer errorMsg = new StringBuffer(); - try{ - paramMap.put("loginMemberId", "customer"); + try { + paramMap.put("loginMemberId", "customer"); paramMap.put("regId", "customer"); paramMap.put("modId", "customer"); map = kioskService.putUser(paramMap); - } - catch (Exception e) { + } catch (Exception e) { e.printStackTrace(); - return null; - } - finally { - if (Constants.OK == map.get("msgCode")) { - - } else { + map.put("msgCode", Constants.FAIL); + map.put("msgDesc", "서버 오류가 발생했습니다."); + errorMsg.append(e.getMessage()); + } finally { + if (Constants.OK != map.get("msgCode")) { map.put("msgCode", Constants.FAIL); map.put("success", false); if (null == map.get("msgDesc") || ("").equals(map.get("msgDesc"))) { @@ -263,6 +219,7 @@ public class KioskController extends ManagerDraftAction { } } + // 로그 기록 try { HashMap visitLogParamMap = RequestLogUtil.getVisitLogParameterMap(request); HashMap insertMap = new HashMap(); @@ -275,7 +232,8 @@ public class KioskController extends ManagerDraftAction { insertMap.put("requestValue", String.valueOf(paramMap)); insertMap.put("responseValue", String.valueOf(map)); insertMap.put("tId", map.get("tId")); - if (("").equals(String.valueOf(errorMsg)) || null == (String.valueOf(errorMsg)) || 0 == String.valueOf(errorMsg).length()) { + if (("").equals(String.valueOf(errorMsg)) || null == (String.valueOf(errorMsg)) + || 0 == String.valueOf(errorMsg).length()) { insertMap.put("resultCode", "SUCCESS"); } else { insertMap.put("resultCode", "ERROR"); @@ -288,249 +246,183 @@ public class KioskController extends ManagerDraftAction { e.printStackTrace(); } } - log.debug("KioskController getUserOptionList END"); - return HttpUtil.makeHashToJsonModelAndView(map); + log.debug("KioskController putUser END"); + return map; } - + /** * 고객 정보 조회 - * 바로접수 팝업 - * @param request - * @param response - * @return */ @PostMapping("/kiosk/getUser.do") - public ModelAndView getUser(HttpServletRequest request, HttpServletResponse response) { - + public HashMap getUser(HttpServletRequest request, HttpServletResponse response) { log.debug("KioskController getUser START"); HashMap paramMap = HttpUtil.getParameterMap(request); HashMap map = new HashMap(); - - try{ - map = kioskService.getUser(paramMap); - } - catch (Exception e) { - e.printStackTrace(); - return null; - } - finally { - if(Constants.OK == map.get("msgCode")) { - } - else{ + try { + map = kioskService.getUser(paramMap); + } catch (Exception e) { + e.printStackTrace(); + map.put("msgCode", Constants.FAIL); + map.put("msgDesc", "서버 오류가 발생했습니다."); + } finally { + if (Constants.OK != map.get("msgCode")) { map.put("msgCode", Constants.FAIL); map.put("success", false); - if(null == map.get("msgDesc") || ("").equals(map.get("msgDesc"))) { - map.put("msgDesc","정상적으로 수행되지 않았습니다. 관리자에게 문의하시기 바랍니다."); + if (null == map.get("msgDesc") || ("").equals(map.get("msgDesc"))) { + map.put("msgDesc", "정상적으로 수행되지 않았습니다. 관리자에게 문의하시기 바랍니다."); } } } log.debug("KioskController getUser END"); - return HttpUtil.makeHashToJsonModelAndView(map); + return map; } - + /** * 근무 시간 조회 - * 바로접수 팝업 - * @param request - * @param response - * @return */ @PostMapping("/kiosk/getWorkTime.do") - public ModelAndView getWorkTime(HttpServletRequest request, HttpServletResponse response) { - + public HashMap getWorkTime(HttpServletRequest request, HttpServletResponse response) { log.debug("KioskController getWorkTime START"); HashMap paramMap = HttpUtil.getParameterMap(request); HashMap map = new HashMap(); - - try{ - map = kioskService.getWorkTime(paramMap); - } - catch (Exception e) { - e.printStackTrace(); - return null; - } - finally { - if(Constants.OK == map.get("msgCode")) { - } - else{ + try { + map = kioskService.getWorkTime(paramMap); + } catch (Exception e) { + e.printStackTrace(); + map.put("msgCode", Constants.FAIL); + map.put("msgDesc", "서버 오류가 발생했습니다."); + } finally { + if (Constants.OK != map.get("msgCode")) { map.put("msgCode", Constants.FAIL); map.put("success", false); - if(null == map.get("msgDesc") || ("").equals(map.get("msgDesc"))) { - map.put("msgDesc","정상적으로 수행되지 않았습니다. 관리자에게 문의하시기 바랍니다."); + if (null == map.get("msgDesc") || ("").equals(map.get("msgDesc"))) { + map.put("msgDesc", "정상적으로 수행되지 않았습니다. 관리자에게 문의하시기 바랍니다."); } } } log.debug("KioskController getWorkTime END"); - return HttpUtil.makeHashToJsonModelAndView(map); + return map; } - + /** * 진료 시술 조회 - * 바로접수 팝업 - * @param request - * @param response - * @return */ @PostMapping("/kiosk/getTreatmentProcedureOptionList.do") - public ModelAndView getTreatmentProcedureOptionList(HttpServletRequest request, HttpServletResponse response) { - + public HashMap getTreatmentProcedureOptionList(HttpServletRequest request, + HttpServletResponse response) { log.debug("KioskController getTreatmentProcedureOptionList START"); HashMap paramMap = HttpUtil.getParameterMap(request); HashMap map = new HashMap(); - - try{ - map = kioskService.getTreatmentProcedureOptionList(paramMap); - } - catch (Exception e) { - e.printStackTrace(); - return null; - } - finally { - if(Constants.OK == map.get("msgCode")) { - } - else{ + try { + map = kioskService.getTreatmentProcedureOptionList(paramMap); + } catch (Exception e) { + e.printStackTrace(); + map.put("msgCode", Constants.FAIL); + map.put("msgDesc", "서버 오류가 발생했습니다."); + } finally { + if (Constants.OK != map.get("msgCode")) { map.put("msgCode", Constants.FAIL); map.put("success", false); - if(null == map.get("msgDesc") || ("").equals(map.get("msgDesc"))) { - map.put("msgDesc","정상적으로 수행되지 않았습니다. 관리자에게 문의하시기 바랍니다."); + if (null == map.get("msgDesc") || ("").equals(map.get("msgDesc"))) { + map.put("msgDesc", "정상적으로 수행되지 않았습니다. 관리자에게 문의하시기 바랍니다."); } } } log.debug("KioskController getTreatmentProcedureOptionList END"); - return HttpUtil.makeHashToJsonModelAndView(map); + return map; } - - /** - * 해당 시술 닥터 및 해당과 상담자 조회 (List, option) - * - * @param request - * @param response - * @return - */ - @PostMapping("/kiosk/getMemberDoctorConsultingOptionList.do") - public ModelAndView getMemberDoctorConsultingOptionList(HttpServletRequest request, HttpServletResponse response) { + /** + * 해당 시술 닥터 및 해당과 상담자 조회 + */ + @PostMapping("/kiosk/getMemberDoctorConsultingOptionList.do") + public HashMap getMemberDoctorConsultingOptionList(HttpServletRequest request, + HttpServletResponse response) { log.debug("KioskController getMemberDoctorConsultingOptionList START"); HashMap paramMap = HttpUtil.getParameterMap(request); HashMap map = new HashMap(); - - try{ - map = kioskService.getMemberDoctorConsultingOptionList(paramMap); - } - catch (Exception e) { - e.printStackTrace(); - return null; - } - finally { - if(Constants.OK == map.get("msgCode")) { - } - else{ + try { + map = kioskService.getMemberDoctorConsultingOptionList(paramMap); + } catch (Exception e) { + e.printStackTrace(); + map.put("msgCode", Constants.FAIL); + map.put("msgDesc", "서버 오류가 발생했습니다."); + } finally { + if (Constants.OK != map.get("msgCode")) { map.put("msgCode", Constants.FAIL); map.put("success", false); - if(null == map.get("msgDesc") || ("").equals(map.get("msgDesc"))) { - map.put("msgDesc","정상적으로 수행되지 않았습니다. 관리자에게 문의하시기 바랍니다."); + if (null == map.get("msgDesc") || ("").equals(map.get("msgDesc"))) { + map.put("msgDesc", "정상적으로 수행되지 않았습니다. 관리자에게 문의하시기 바랍니다."); } } } log.debug("KioskController getMemberDoctorConsultingOptionList END"); - return HttpUtil.makeHashToJsonModelAndView(map); + return map; } - - /** - * 직원 정보 리스트 조회 - * - * @param request - * @param response - * @return - */ - @PostMapping("/kiosk/getMemberList.do") - public ModelAndView getMemberList(HttpServletRequest request, HttpServletResponse response) { + /** + * 직원 정보 리스트 조회 + */ + @PostMapping("/kiosk/getMemberList.do") + public HashMap getMemberList(HttpServletRequest request, HttpServletResponse response) { log.debug("KioskController getMemberList START"); HashMap paramMap = HttpUtil.getParameterMap(request); HashMap map = new HashMap(); - - try{ - map = kioskService.getMemberList(paramMap); - } - catch (Exception e) { - e.printStackTrace(); - return null; - } - finally { - if(Constants.OK == map.get("msgCode")) { - } - else{ + try { + map = kioskService.getMemberList(paramMap); + } catch (Exception e) { + e.printStackTrace(); + map.put("msgCode", Constants.FAIL); + map.put("msgDesc", "서버 오류가 발생했습니다."); + } finally { + if (Constants.OK != map.get("msgCode")) { map.put("msgCode", Constants.FAIL); map.put("success", false); - if(null == map.get("msgDesc") || ("").equals(map.get("msgDesc"))) { - map.put("msgDesc","정상적으로 수행되지 않았습니다. 관리자에게 문의하시기 바랍니다."); + if (null == map.get("msgDesc") || ("").equals(map.get("msgDesc"))) { + map.put("msgDesc", "정상적으로 수행되지 않았습니다. 관리자에게 문의하시기 바랍니다."); } } } log.debug("KioskController getMemberList END"); - return HttpUtil.makeHashToJsonModelAndView(map); + return map; } - - /** - * 고객 - 1년간 진료내역 조회 (수납완료건) (List, option) - * - * @param request - * @param response - * @return - */ - @PostMapping("/kiosk/getReserveUserOptionList.do") - public ModelAndView getReserveUserOptionList(HttpServletRequest request, HttpServletResponse response) { + /** + * 고객 - 1년간 진료내역 조회 (수납완료건) + */ + @PostMapping("/kiosk/getReserveUserOptionList.do") + public HashMap getReserveUserOptionList(HttpServletRequest request, HttpServletResponse response) { log.debug("KioskController getReserveUserOptionList START"); HashMap paramMap = HttpUtil.getParameterMap(request); HashMap map = new HashMap(); - - try{ - map = kioskService.getReserveUserOptionList(paramMap); - } - catch (Exception e) { - e.printStackTrace(); - return null; - } - finally { - if(Constants.OK == map.get("msgCode")) { - } - else{ + try { + map = kioskService.getReserveUserOptionList(paramMap); + } catch (Exception e) { + e.printStackTrace(); + map.put("msgCode", Constants.FAIL); + map.put("msgDesc", "서버 오류가 발생했습니다."); + } finally { + if (Constants.OK != map.get("msgCode")) { map.put("msgCode", Constants.FAIL); map.put("success", false); - if(null == map.get("msgDesc") || ("").equals(map.get("msgDesc"))) { - map.put("msgDesc","정상적으로 수행되지 않았습니다. 관리자에게 문의하시기 바랍니다."); + if (null == map.get("msgDesc") || ("").equals(map.get("msgDesc"))) { + map.put("msgDesc", "정상적으로 수행되지 않았습니다. 관리자에게 문의하시기 바랍니다."); } } } log.debug("KioskController getReserveUserOptionList END"); - return HttpUtil.makeHashToJsonModelAndView(map); - } - - /** - * 키오스크 동의서 화면으로 이동. - * @param request - * @param response - * @param model - * @return - */ - @GetMapping("/kiosk/agreement.do") - public String agreementPage(HttpServletRequest request, HttpServletResponse response, Model model) { - log.debug("KioskController agreementPage START"); - log.debug("KioskController agreementPage END"); - return "/kiosk/agreement"; + return map; } } \ No newline at end of file diff --git a/src/main/resources/application-local.yml b/src/main/resources/application-local.yml index 003470d..e31dcbe 100644 --- a/src/main/resources/application-local.yml +++ b/src/main/resources/application-local.yml @@ -13,7 +13,7 @@ spring: password: apdlemdb12#$ thymeleaf: - cache: true + cache: false file: upload-path: /nvme0n1/upload diff --git a/src/main/resources/static/css/kiosk/agreement.css b/src/main/resources/static/css/kiosk/agreement.css new file mode 100644 index 0000000..d47f949 --- /dev/null +++ b/src/main/resources/static/css/kiosk/agreement.css @@ -0,0 +1,185 @@ +/* + Agreement Page - Project Design System + Based on existing-patient.css +*/ +@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700&display=swap'); + +:root { + --primary-color: #1B66C9; + --primary-hover: #1652a3; + --bg-color: #F8FBFF; + --card-bg: #ffffff; + --text-main: #494E53; + --text-sub: #777d85; + --border-color: #DDE2E8; + --input-bg: #FFFFFF; + + --header-height: 60px; + --footer-height: 70px; + --input-height: 40px; +} + +html, +body { + margin: 0; + padding: 0; + height: 100%; + font-family: 'Pretendard', 'Noto Sans KR', sans-serif !important; + background-color: var(--bg-color); + overflow-y: auto; + color: var(--text-main); +} + +.kiosk-container { + display: flex; + flex-direction: column; + min-height: 100vh; + width: 100%; +} + +.page-header { + height: var(--header-height); + background-color: var(--card-bg); + display: flex; + align-items: center; + padding: 0 40px; + border-bottom: 1px solid var(--border-color); + flex-shrink: 0; +} + +.page-header .title { + font-size: 20px; + font-weight: 700; + color: var(--text-main); + margin: 0; +} + +.page-body { + flex: 1; + padding: 24px; + display: flex; + justify-content: center; +} + +.form-grid-layout { + display: grid; + grid-template-columns: 350px 1fr; + /* Left sidebar for list, right for content */ + gap: 20px; + width: 100%; + max-width: 1800px; +} + +.form-section-card { + background-color: var(--card-bg); + border-radius: 8px; + padding: 24px; + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03); + border: 1px solid #EEF2F7; + display: flex; + flex-direction: column; + gap: 16px; + height: fit-content; +} + +.section-title { + font-size: 16px; + font-weight: 700; + color: var(--primary-color); + margin-bottom: 8px; + border-bottom: 1px solid var(--border-color); + padding-bottom: 8px; +} + +/* Agreement Content Area */ +.agreement-content { + background: #fff; + border: 1px solid #eee; + padding: 20px; + border-radius: 4px; + min-height: 400px; + max-height: 600px; + overflow-y: auto; + font-size: 14px; + line-height: 1.6; + color: #333; +} + +/* Signature Pad */ +.signature-box { + border: 2px dashed #ccc; + background: #fafafa; + border-radius: 8px; + position: relative; + height: 200px; + width: 100%; +} + +.signature-box canvas { + width: 100%; + height: 100%; + cursor: crosshair; +} + +.signature-placeholder { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + color: #ccc; + pointer-events: none; + font-weight: 700; + font-size: 24px; +} + +/* Form inputs */ +input[type="text"], +.select_box { + width: 100%; + height: var(--input-height); + border: 1px solid var(--border-color); + border-radius: 4px; + padding: 0 12px; + font-size: 14px; + background-color: var(--input-bg); + box-sizing: border-box; + font-family: 'Pretendard', sans-serif; +} + +.page-footer { + height: var(--footer-height); + background-color: var(--card-bg); + border-top: 1px solid var(--border-color); + display: flex; + justify-content: flex-end; + align-items: center; + padding: 0 40px; + gap: 12px; +} + +button { + height: 44px; + padding: 0 24px; + border-radius: 4px; + font-size: 14px; + font-weight: 500; + cursor: pointer; + border: none; + font-family: 'Pretendard', sans-serif; +} + +.cancel_btn { + background-color: #F0F2F5; + color: #494E53; +} + +.registration_bth { + background-color: var(--primary-color); + color: #fff; +} + +@media (max-width: 1199px) { + .form-grid-layout { + grid-template-columns: 1fr; + } +} \ No newline at end of file diff --git a/src/main/resources/static/css/kiosk/existing-patient.css b/src/main/resources/static/css/kiosk/existing-patient.css new file mode 100644 index 0000000..19bb56f --- /dev/null +++ b/src/main/resources/static/css/kiosk/existing-patient.css @@ -0,0 +1,220 @@ +/* + Existing Patient - Project Design System Check + Based on new-patient.css standard +*/ +@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700&display=swap'); + +:root { + --primary-color: #1B66C9; + --primary-hover: #1652a3; + --bg-color: #F8FBFF; + --card-bg: #ffffff; + --text-main: #494E53; + --text-sub: #777d85; + --border-color: #DDE2E8; + --input-bg: #FFFFFF; + + --header-height: 60px; + --footer-height: 70px; + --input-height: 40px; +} + +/* Base Setup */ +html, +body { + margin: 0; + padding: 0; + height: 100%; + font-family: 'Pretendard', 'Noto Sans KR', sans-serif !important; + background-color: var(--bg-color); + overflow-y: auto; + color: var(--text-main); +} + +.kiosk-container { + display: flex; + flex-direction: column; + min-height: 100vh; + width: 100%; + background-color: var(--bg-color); +} + +/* Header */ +.page-header { + height: var(--header-height); + background-color: var(--card-bg); + display: flex; + align-items: center; + padding: 0 40px; + border-bottom: 1px solid var(--border-color); + flex-shrink: 0; +} + +.page-header .title { + font-size: 20px; + font-weight: 700; + color: var(--text-main); + margin: 0; +} + +/* Body */ +.page-body { + flex: 1; + padding: 24px; + display: flex; + justify-content: center; +} + +/* Grid Layout */ +.form-grid-layout { + display: grid; + grid-template-columns: repeat(3, 1fr); + gap: 20px; + width: 100%; + max-width: 1800px; +} + +/* Cards */ +.form-section-card { + background-color: var(--card-bg); + border-radius: 8px; + padding: 24px; + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03); + border: 1px solid #EEF2F7; + display: flex; + flex-direction: column; + gap: 16px; + height: fit-content; +} + +.section-title { + font-size: 16px; + font-weight: 700; + color: var(--primary-color); + margin-bottom: 8px; + border-bottom: 1px solid var(--border-color); + padding-bottom: 8px; +} + +/* Form Elements */ +.form-row { + display: flex; + flex-direction: column; + gap: 6px; +} + +.form-row label { + font-size: 13px; + font-weight: 600; + color: var(--text-main); + margin: 0; +} + +input[type="text"], +input[type="date"], +.select_box { + width: 100%; + height: var(--input-height); + border: 1px solid var(--border-color); + border-radius: 4px; + padding: 0 12px; + font-size: 14px; + color: var(--text-main); + background-color: var(--input-bg); + box-sizing: border-box; + font-family: 'Pretendard', sans-serif; +} + +input[readonly] { + background-color: #f9f9f9; + cursor: default; +} + +/* Select Box Mockup */ +.select_box { + display: flex; + align-items: center; + padding: 0; + cursor: pointer; + position: relative; + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23999' d='M5 6L0 0h10z'/%3E%3C/svg%3E"); + background-repeat: no-repeat; + background-position: right 12px center; +} + +.select_box button.label { + width: 100%; + height: 100%; + border: none; + background: transparent; + text-align: left; + padding: 0 30px 0 12px; + font-size: 14px; + color: var(--text-main); +} + +/* Table Style for existing patient info */ +.info-table { + width: 100%; + border-collapse: collapse; + margin-top: 10px; +} + +.info-table th, +.info-table td { + padding: 10px; + text-align: left; + border-bottom: 1px solid #eee; + font-size: 14px; +} + +.info-table th { + color: var(--text-sub); + font-weight: 500; + width: 100px; +} + +.info-table td { + color: var(--text-main); + font-weight: 600; +} + +/* Buttons */ +.page-footer { + height: var(--footer-height); + background-color: var(--card-bg); + border-top: 1px solid var(--border-color); + display: flex; + justify-content: flex-end; + align-items: center; + padding: 0 40px; + gap: 12px; +} + +button { + height: 44px; + padding: 0 24px; + border-radius: 4px; + font-size: 14px; + font-weight: 500; + cursor: pointer; + border: none; + font-family: 'Pretendard', sans-serif; +} + +.cancel_btn { + background-color: #F0F2F5; + color: #494E53; +} + +.registration_bth { + background-color: var(--primary-color); + color: #fff; +} + +/* Responsive */ +@media (max-width: 1199px) { + .form-grid-layout { + grid-template-columns: 1fr; + } +} \ No newline at end of file diff --git a/src/main/resources/static/css/kiosk/new-patient.css b/src/main/resources/static/css/kiosk/new-patient.css new file mode 100644 index 0000000..f581b1d --- /dev/null +++ b/src/main/resources/static/css/kiosk/new-patient.css @@ -0,0 +1,537 @@ +/* + New Patient - Project Design System Applied + Font: Pretendard + Colors: Standard Project Blue (#1B66C9) & Gray (#494E53) + Layout: Compact 1080p Fit +*/ + +/* Font is loaded globally via head.html -> font.css, so just reference it */ + +:root { + --primary-color: #1B66C9; + /* Project Standard Blue */ + --primary-hover: #1652a3; + --bg-color: #F8FBFF; + /* Project Standard Background */ + --card-bg: #ffffff; + --text-main: #494E53; + /* Project Standard Text */ + --text-sub: #777d85; + --border-color: #DDE2E8; + --input-bg: #FFFFFF; + + /* Layout Variables */ + --header-height: 60px; + --footer-height: 70px; + --input-height: 40px; +} + +/* Base Setup */ +* { + box-sizing: border-box; +} + +html, +body { + margin: 0; + padding: 0; + height: 100%; + font-family: 'Pretendard', 'Noto Sans KR', sans-serif !important; + background-color: var(--bg-color); + overflow-y: auto; + /* Prevent clip */ + color: var(--text-main); +} + +input, +button, +select, +textarea { + font-family: inherit; +} + +/* Layout Container */ +.new-patient-container { + display: flex; + flex-direction: column; + min-height: 100vh; + width: 100%; + background-color: var(--bg-color); +} + +/* Header */ +.page-header { + height: var(--header-height); + background-color: var(--card-bg); + display: flex; + align-items: center; + padding: 0 40px; + border-bottom: 1px solid var(--border-color); + flex-shrink: 0; +} + +.page-header .title { + font-size: 20px; + font-weight: 700; + color: var(--text-main); + margin: 0; +} + +/* Body Area */ +.page-body { + flex: 1; + padding: 24px; + display: flex; + justify-content: center; + box-sizing: border-box; +} + +/* Grid Layout */ +.form-grid-layout { + display: grid; + grid-template-columns: repeat(3, 1fr); + /* Fixed 3 columns */ + gap: 20px; + width: 100%; + max-width: 1800px; +} + +/* Cards */ +.form-section-card { + background-color: var(--card-bg); + border-radius: 8px; + /* Border radius matching standard inputs often */ + padding: 24px; + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03); + border: 1px solid #EEF2F7; + display: flex; + flex-direction: column; + gap: 16px; + height: fit-content; + box-sizing: border-box; +} + +.section-title { + font-size: 16px; + font-weight: 700; + color: var(--primary-color); + margin-bottom: 8px; + border-bottom: 1px solid var(--border-color); + padding-bottom: 8px; +} + +/* Form Rows */ +.form-row { + display: flex; + flex-direction: column; + gap: 6px; +} + +.form-row label { + font-size: 13px; + font-weight: 600; + color: var(--text-main); + margin: 0; +} + +.form-row label.required::after { + content: ' *'; + color: #FF5A5A; +} + +/* Inputs */ +input[type="text"], +input[type="tel"], +input[type="password"], +.select_box { + width: 100%; + height: var(--input-height); + border: 1px solid var(--border-color); + background-color: var(--input-bg); + border-radius: 4px; + /* Standard radius */ + padding: 0 12px; + font-size: 14px; + color: var(--text-main); + box-sizing: border-box; + outline: none; + transition: 0.2s; + font-family: 'Pretendard', sans-serif; +} + +input:focus, +.select_box.focus { + border-color: var(--primary-color); + background-color: #fff; + box-shadow: 0 0 0 2px rgba(27, 102, 201, 0.1); +} + +input::placeholder { + color: #AAB2B9; +} + +/* =============================================== + Choices.js Custom Design + =============================================== */ +.choices { + margin-bottom: 0; + font-family: 'Pretendard', sans-serif; + overflow: visible; +} + +.choices__inner { + border: 1px solid var(--border-color); + background-color: var(--input-bg); + border-radius: 8px; + font-size: 14px; + min-height: 44px; + display: flex; + align-items: center; + padding: 0 12px; +} + +.choices.is-focused .choices__inner, +.choices.is-open .choices__inner { + border-color: var(--primary-color); + box-shadow: 0 0 0 2px rgba(27, 102, 201, 0.1); +} + +.choices__list--single { + padding: 0; + color: var(--text-main); +} + +.choices__list--single .choices__item { + width: 100%; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +/* Dropdown Container */ +.choices__list--dropdown, +.choices__list[aria-expanded] { + border: 1px solid #E5E7EB; + border-radius: 12px; + box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12); + margin-top: 6px; + background-color: #ffffff; + padding: 6px; + z-index: 100 !important; +} + +/* Dropdown Items */ +.choices__list--dropdown .choices__item { + font-size: 14px; + padding: 10px 14px; + border-radius: 8px; + color: var(--text-main); + margin-bottom: 2px; +} + +.choices__list--dropdown .choices__item--selectable.is-highlighted { + background: linear-gradient(135deg, #EBF5FF 0%, #E0F0FF 100%); + color: var(--primary-color); +} + +.choices__list--dropdown .choices__item--selectable.is-selected { + background: linear-gradient(135deg, #1B66C9 0%, #2563EB 100%); + color: #ffffff; + font-weight: 600; +} + +/* Search Input inside Dropdown */ +.choices__input { + background-color: #F8FAFC; + border-radius: 6px; + border: 1px solid #E5E7EB; + margin-bottom: 8px; + font-size: 13px; + padding: 8px 12px; +} + +/* Arrow Icon */ +.choices[data-type*="select-one"]::after { + content: '' !important; + height: 8px !important; + width: 8px !important; + border-style: solid !important; + border-color: #9CA3AF !important; + border-width: 0 2px 2px 0 !important; + transform: translateY(-70%) rotate(45deg) !important; + position: absolute !important; + right: 18px !important; + top: 50% !important; + pointer-events: none !important; + transition: all 0.2s ease !important; + margin-top: 0 !important; + background-image: none !important; + z-index: 5 !important; + display: block !important; +} + +.choices[data-type*="select-one"].is-open::after { + transform: translateY(0%) rotate(225deg) !important; + border-color: var(--primary-color) !important; +} + +/* Input Placeholder Color */ +.choices__placeholder { + opacity: 1; + color: #9CA3AF; +} + +/* Radio */ +.radio-group { + display: flex; + gap: 20px; + height: var(--input-height); + align-items: center; + background-color: var(--input-bg); + border-radius: 4px; + /* Standard radius */ + padding: 0 12px; + border: 1px solid var(--border-color); +} + +.radio-item { + display: flex; + align-items: center; + gap: 8px; + cursor: pointer; +} + +.radio-item label { + margin: 0; + cursor: pointer; + font-size: 14px; + color: var(--text-main); +} + +.radio-item input { + margin: 0; + cursor: pointer; + width: 16px; + height: 16px; + accent-color: var(--primary-color); +} + +/* Textarea */ +textarea { + width: 100%; + height: 80px; + border: 1px solid var(--border-color); + background-color: var(--input-bg); + border-radius: 4px; + padding: 12px; + font-size: 14px; + resize: none; + outline: none; + box-sizing: border-box; + font-family: 'Pretendard', sans-serif; + color: var(--text-main); +} + +textarea:focus { + border-color: var(--primary-color); +} + +/* Split Input */ +.split-inputs { + display: flex; + align-items: center; + gap: 8px; +} + +.split-inputs input { + text-align: center; +} + +/* Footer */ +.page-footer { + height: var(--footer-height); + background-color: var(--card-bg); + border-top: 1px solid var(--border-color); + display: flex; + justify-content: flex-end; + align-items: center; + padding: 0 40px; + gap: 12px; +} + +/* Buttons - Matching Global Design */ +button { + height: 44px; + padding: 0 24px; + border-radius: 4px; + font-size: 14px; + font-weight: 500; + cursor: pointer; + border: none; + font-family: 'Pretendard', sans-serif; + transition: background-color 0.2s; +} + +.cancel_btn { + background-color: #F0F2F5; + /* Light Gray */ + color: #494E53; +} + +.cancel_btn:hover { + background-color: #E6ECF4 !important; + /* From common.css */ +} + +.registration_bth { + background-color: var(--primary-color); + color: #fff; +} + +.registration_bth:hover { + background-color: #1652a3 !important; +} + +/* =============================================== + Flatpickr Custom Design + =============================================== */ +.flatpickr-calendar { + font-family: 'Pretendard', sans-serif !important; + border-radius: 12px !important; + box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12) !important; + border: 1px solid #E5E7EB !important; + width: 320px !important; +} + +.flatpickr-day { + border-radius: 8px !important; +} + +.flatpickr-day.selected, +.flatpickr-day.startRange, +.flatpickr-day.endRange, +.flatpickr-day.selected.inRange, +.flatpickr-day.startRange.inRange, +.flatpickr-day.endRange.inRange, +.flatpickr-day.selected:focus, +.flatpickr-day.startRange:focus, +.flatpickr-day.endRange:focus, +.flatpickr-day.selected:hover, +.flatpickr-day.startRange:hover, +.flatpickr-day.endRange:hover, +.flatpickr-day.selected.prevMonthDay, +.flatpickr-day.startRange.prevMonthDay, +.flatpickr-day.endRange.prevMonthDay, +.flatpickr-day.selected.nextMonthDay, +.flatpickr-day.startRange.nextMonthDay, +.flatpickr-day.endRange.nextMonthDay { + background: var(--primary-color) !important; + border-color: var(--primary-color) !important; +} + +.flatpickr-months .flatpickr-month { + background: transparent !important; + color: var(--text-main) !important; + fill: var(--text-main) !important; + height: 40px; + padding-top: 10px; +} + +.flatpickr-current-month .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month { + background-color: #fff !important; + color: var(--text-main) !important; +} + +.flatpickr-weekdays { + background: transparent !important; +} + +.flatpickr-weekday { + color: #9CA3AF !important; + font-weight: 500 !important; + font-size: 13px !important; +} + +.flatpickr-current-month { + font-size: 110% !important; + padding-top: 10px; +} + +.flatpickr-day.today { + border-color: var(--border-color) !important; +} + +.flatpickr-day.today:hover { + background: #EBF5FF !important; + border-color: #EBF5FF !important; + color: var(--text-main) !important; +} + +/* Helper classes */ +.date-input-wrapper { + position: relative; + display: flex; + align-items: center; +} + +.date-input-wrapper input { + flex: 1; + padding-right: 70px; + /* Space for age text and icon */ +} + +.date-input-wrapper img { + position: absolute; + right: 10px; + top: 50%; + transform: translateY(-50%); + width: 18px; + opacity: 0.6; + cursor: pointer; +} + +.age-text { + position: absolute; + right: 35px; + top: 50%; + transform: translateY(-50%); + font-size: 12px; + color: var(--primary-color); + font-weight: 600; +} + +/* Dropdown */ +.dropdown-menu { + border-radius: 4px; + border: 1px solid #DDE2E8; + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); +} + +.dropdown-menu li { + padding: 10px 12px; + font-size: 14px; + font-family: 'Pretendard', sans-serif; +} + +.dropdown-menu li:hover { + background-color: #ebf3fd; + /* Project hover color */ +} + +.dropdown-menu li.selected { + background-color: #ebf3fd; + color: var(--primary-color); + font-weight: 600; +} + +/* Responsive Mobile */ +@media (max-width: 1199px) { + .form-grid-layout { + grid-template-columns: 1fr; + gap: 20px; + } + + .page-body { + height: auto; + } +} \ No newline at end of file diff --git a/src/main/resources/templates/kiosk/agreement.html b/src/main/resources/templates/kiosk/agreement.html index 6240e54..59f4f5a 100644 --- a/src/main/resources/templates/kiosk/agreement.html +++ b/src/main/resources/templates/kiosk/agreement.html @@ -1,1993 +1,215 @@ - - + + - - + + - - - + + + + - - - - - +
- + function resizeCanvas(canvas) { + var ratio = Math.max(window.devicePixelRatio || 1, 1); + canvas.width = canvas.offsetWidth * ratio; + canvas.height = canvas.offsetHeight * ratio; + canvas.getContext("2d").scale(ratio, ratio); + } + - + + \ No newline at end of file diff --git a/src/main/resources/templates/kiosk/consultation.html b/src/main/resources/templates/kiosk/consultation.html index d5a5c93..87034a5 100644 --- a/src/main/resources/templates/kiosk/consultation.html +++ b/src/main/resources/templates/kiosk/consultation.html @@ -1,10 +1,23 @@ + 병원 접수 키오스크 + + - - -
-
-
-
-
+
-

병원 접수

-

환자 유형을 선택해 주세요
해당하는 버튼을 터치해 주시기 바랍니다

+

환자 유형을 선택해 주세요

-
-
-
접수 화면으로 이동 중...
+ - + + \ No newline at end of file diff --git a/src/main/resources/templates/kiosk/existing-patient.html b/src/main/resources/templates/kiosk/existing-patient.html index cce86e8..bab1455 100644 --- a/src/main/resources/templates/kiosk/existing-patient.html +++ b/src/main/resources/templates/kiosk/existing-patient.html @@ -1,705 +1,446 @@ - - + + - + + - - + + - - - - - +
- + setReserveCategoryCombo: function () { + let category = fn_selectCategoryList(); + let reservationCategory = category.find(cat => cat.categoryname === '예약경로'); + if (reservationCategory) { + fn_selectModalOtherOption(reservationCategory.categorycode, ''); + // The common function targets generic selectors. We might need to manually populate if it fails. + // Assuming fn_selectModalOtherOption works by finding selectors globally or passed context. + // For safety, let's manually populate the last row's category list if possible, + // or rely on common.js if it finds '.category-list'. + // Common.js usually finds by class. Let's assume it works or we use a custom fetch here if needed. + } + }, + + save: function (state) { + // Validation & Save Logic (Copied from original but simplified selectors) + let muUserId = $('#list1 input[name="modalUserId"]').val(); + let userName = $('#list1 input[name="modalUserName"]').val(); + + // Get reservation details from the generated row + let row = $('.reserveRowBox .modal_table_content').last(); + let reserveDate = row.find('input[name="modalReserveDate"]').val(); + let reserveTime = row.find('input[name="modalReserveTime"]').val(); + let catCode = row.find('input[name="modalReserveCategoryItemCode"]').val(); + let procId = row.find('input[name="modalTreatmentProcedureId"]').val(); + let docId = row.find('input[name="modalReserveMemberId"]').val(); + + let memId = $('input[name="modalMemberId"]').val(); // Staff + + if (!muUserId) { modalEvent.warning("접수", "고객을 선택해주세요."); return; } + if (!reserveDate || !reserveTime) { modalEvent.warning("접수", "예약 일시를 선택해주세요."); return; } + if (!procId) { modalEvent.warning("접수", "진료 유형을 선택해주세요."); return; } + + modalEvent.info("접수", "접수를 진행하시겠습니까?", function () { + let formData = new FormData(); + formData.append("muUserId", muUserId); + formData.append("userName", userName); + formData.append("reserveDate", reserveDate); + formData.append("reserveTime", reserveTime); + formData.append("reserveCategoryItemCode", catCode); + formData.append("muTreatmentProcedureId", procId); + formData.append("reserveMemberId", docId); + formData.append("muMemberId", memId); + + $.ajax({ + url: '/webreserve/insertReserveReady.do', + type: 'POST', + data: formData, + processData: false, contentType: false, + success: function (data) { + if (data.msgCode == '0') { + modalEvent.success("성공", "접수가 완료되었습니다.", function () { + history.back(); + }); + } else { + modalEvent.danger("실패", data.msgDesc); + } + } + }); + }); + } + }; + + let memberSearchModal = { + callback: null, + popup: function (cb) { + this.callback = cb; + $('#memberSearchModal').modal('show'); + }, + setSelect: function (id, name, phone) { + if (this.callback) this.callback({ selectMemberId: id, selectMemberName: name }); + $('#memberSearchModal').modal('hide'); + } + }; + + // Search Button Event + $('#searchMemberBtn').on('click', function () { + let kw = $('#memberSearchKeyword').val(); + let fd = new FormData(); + fd.append("memberSearchKeywordParam", kw); + $.ajax({ + url: '/kiosk/getMemberList.do', + type: 'POST', + data: fd, processData: false, contentType: false, + success: function (data) { + if (data.msgCode == '0') { + let tbody = $('#memberSearchModal tbody'); + tbody.empty(); + data.rows.forEach(m => { + let tr = $(` + + \${m.membername} + \${fn_setFormatPhone(m.phonenumber)} + \${m.dutyname} + + `); + tr.click(() => memberSearchModal.setSelect(m.mumemberid, m.membername, m.phonenumber)); + tbody.append(tr); + }); + } + } + }); + }); + + + \ No newline at end of file diff --git a/src/main/resources/templates/kiosk/new-patient.html b/src/main/resources/templates/kiosk/new-patient.html index c7b5486..4e96a30 100644 --- a/src/main/resources/templates/kiosk/new-patient.html +++ b/src/main/resources/templates/kiosk/new-patient.html @@ -1,12 +1,28 @@ - - + + - - - + + + 메이드유 CRM + + + + + + + + + + + + + + + + + @@ -15,685 +31,520 @@ - +
+ + + + + +
+
+ + +
+
기본 정보
+ + +
+ + +
+ + +
+ + +
+ + +
+ +
+ + + calendar +
+
+ + +
+ +
+
+ + +
+
+ + +
+
+
+ + +
+ + +
+ +
+ +
+ +
+ +
+ + - + +
+
+
+ + +
+
연락처 및 동의
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ +
+
+ + +
+
+ + +
+
+
+ + +
+ +
+
+ + +
+
+ + +
+
+
+
+ + +
+
기타 정보
+ + +
+ + +
+ + +
+ + +
+ + +
+ +
+ + search +
+
+ + +
+ + +
+ + +
+ + +
+
+ +
+
+ + +
+ + + +
+ +
- + + \ No newline at end of file