diff --git a/ddl_20220205.txt b/ddl_20220205.txt index a0ce2d4..dbe90ad 100644 --- a/ddl_20220205.txt +++ b/ddl_20220205.txt @@ -53,3 +53,7 @@ CREATE TABLE `tbl_favorite_word` ( -- tbl_member 테이블 sns_id 컬럼 사이즈 변경 alter table tbl_member modify sns_id varchar(255) comment '소셜 아이디'; + + +-- tbl_bf_family 테이블 name 컬럼값 필수 삭제 +alter table tbl_bf_family modify name varchar(30) comment '부모이름'; \ No newline at end of file diff --git a/src/main/java/com/backoffice/m/bf_family/M_Bf_familyBO.java b/src/main/java/com/backoffice/m/bf_family/M_Bf_familyBO.java index a7692e5..ee426ba 100644 --- a/src/main/java/com/backoffice/m/bf_family/M_Bf_familyBO.java +++ b/src/main/java/com/backoffice/m/bf_family/M_Bf_familyBO.java @@ -15,9 +15,11 @@ public interface M_Bf_familyBO { public abstract List select_bf_family_list(DataMap paramMap) throws Exception; public abstract DataMap select_bf_family(DataMap paramMap) throws Exception; - public abstract Object insert_bf_family(DataMap paramMap) throws Exception; - public abstract int update_bf_family(DataMap paramMap) throws Exception; - + public abstract Object insert_bf_f_family(DataMap paramMap) throws Exception; + public abstract Object insert_bf_m_family(DataMap paramMap) throws Exception; + public abstract int update_bf_m_family(DataMap paramMap) throws Exception; + public abstract int update_bf_f_family(DataMap paramMap) throws Exception; + public abstract int delete_bf_family_single(DataMap paramMap) throws Exception; public abstract int delete_bf_family_multi(DataMap paramMap) throws Exception; diff --git a/src/main/java/com/backoffice/m/bf_family/M_Bf_familyBOImpl.java b/src/main/java/com/backoffice/m/bf_family/M_Bf_familyBOImpl.java index d0d36ad..288193e 100644 --- a/src/main/java/com/backoffice/m/bf_family/M_Bf_familyBOImpl.java +++ b/src/main/java/com/backoffice/m/bf_family/M_Bf_familyBOImpl.java @@ -70,7 +70,7 @@ public class M_Bf_familyBOImpl extends AbstractBOManager implements M_Bf_familyB return rm; } - public Object insert_bf_family(DataMap paramMap) throws Exception{ + public Object insert_bf_m_family(DataMap paramMap) throws Exception{ Object resultObj = null; try { @@ -83,12 +83,11 @@ public class M_Bf_familyBOImpl extends AbstractBOManager implements M_Bf_familyB paramMap.put("bf_no", bf_no); generalDAO.delete("delete_bf_family_disease_by_bf_no", paramMap); - - - if(paramMap.get("list_disease_cd_no") != null) { - generalDAO.insert("insert_bf_family_disease", paramMap); + + if(paramMap.get("list_m_disease_cd_no") != null) { + generalDAO.insert("insert_bf_m_family_disease", paramMap); } - + generalDAO.commitTransaction(); } catch (SQLException e) { throw e; @@ -99,7 +98,35 @@ public class M_Bf_familyBOImpl extends AbstractBOManager implements M_Bf_familyB return resultObj; } - public int update_bf_family(DataMap paramMap) throws Exception{ + public Object insert_bf_f_family(DataMap paramMap) throws Exception{ + Object resultObj = null; + + try { + generalDAO.setNamespace(SQLMAP_NAMESPACE); + generalDAO.startTransaction(); + + resultObj = generalDAO.insert("insert_bf_family", paramMap); + + String bf_no = String.valueOf(resultObj); + paramMap.put("bf_no", bf_no); + + generalDAO.delete("delete_bf_family_disease_by_bf_no", paramMap); + + if(paramMap.get("list_f_disease_cd_no") != null) { + generalDAO.insert("insert_bf_f_family_disease", paramMap); + } + + generalDAO.commitTransaction(); + } catch (SQLException e) { + throw e; + }finally{ + generalDAO.endTransaction(); + } + + return resultObj; + } + + public int update_bf_m_family(DataMap paramMap) throws Exception{ int result = 0; try { @@ -110,10 +137,9 @@ public class M_Bf_familyBOImpl extends AbstractBOManager implements M_Bf_familyB generalDAO.delete("delete_bf_family_disease_by_bf_no", paramMap); - if(paramMap.get("list_disease_cd_no") != null) { - generalDAO.insert("insert_bf_family_disease", paramMap); + if(paramMap.get("list_m_disease_cd_no") != null) { + generalDAO.insert("insert_bf_m_family_disease", paramMap); } - generalDAO.commitTransaction(); } catch (SQLException e) { throw e; @@ -124,6 +150,32 @@ public class M_Bf_familyBOImpl extends AbstractBOManager implements M_Bf_familyB return result; } + public int update_bf_f_family(DataMap paramMap) throws Exception{ + int result = 0; + + try { + generalDAO.setNamespace(SQLMAP_NAMESPACE); + generalDAO.startTransaction(); + + result = generalDAO.update("update_bf_family", paramMap); + + generalDAO.delete("delete_bf_family_disease_by_bf_no", paramMap); + + if(paramMap.get("list_f_disease_cd_no") != null) { + generalDAO.insert("insert_bf_f_family_disease", paramMap); + } + + generalDAO.commitTransaction(); + } catch (SQLException e) { + throw e; + }finally{ + generalDAO.endTransaction(); + } + + return result; + } + + public int delete_bf_family_single(DataMap paramMap) throws Exception{ int result = 0; diff --git a/src/main/java/com/backoffice/m/bf_family/M_Bf_familyController.java b/src/main/java/com/backoffice/m/bf_family/M_Bf_familyController.java index e89e0f4..6f38cca 100644 --- a/src/main/java/com/backoffice/m/bf_family/M_Bf_familyController.java +++ b/src/main/java/com/backoffice/m/bf_family/M_Bf_familyController.java @@ -73,10 +73,17 @@ public class M_Bf_familyController extends AbstractControllerManager{ return redirect_url; } - + + /** + * 부모정보 등록/수정 - snut97 + * @param model + * @param request + * @param response + * @param ra + * @return + */ @RequestMapping(value="view_bf_family") - public String view_bf_family(@ModelAttribute("model") ModelMap model, HttpServletRequest request, HttpServletResponse response - , RedirectAttributes ra) { + public String view_bf_family(@ModelAttribute("model") ModelMap model, HttpServletRequest request, HttpServletResponse response, RedirectAttributes ra) { DataMap paramMap = gmUtil.getDataMapFromRequest(request); @@ -88,15 +95,25 @@ public class M_Bf_familyController extends AbstractControllerManager{ ra.addFlashAttribute("call_native_login", "Y"); redirect_url = "redirect:/m/login/view_login.do"; }else{ - String parent_tp = paramMap.getString("parent_tp"); - if(RenaStringUtil.isNullOrEmpty(parent_tp)) paramMap.put("parent_tp", "BF_P_T_1"); // 엄마 - - DataMap rm = bf_familyBO.select_bf_family(paramMap); - DataMap.putToModel(model, "rm", rm); - - List lm_f_disease = bf_familyBO.select_bf_family_disease_list(rm); - DataMap.putToModel(model, "lm_f_disease", lm_f_disease); - } + //엄마 기본정보 + paramMap.put("parent_tp", "BF_P_T_1"); + DataMap rm_m = bf_familyBO.select_bf_family(paramMap); +// DataMap.putToModel(model, "rm", rm); + DataMap.putToModel(model, "rm_m", rm_m); + + //아빠 기본정보 + paramMap.put("parent_tp", "BF_P_T_2"); + DataMap rm_f = bf_familyBO.select_bf_family(paramMap); + DataMap.putToModel(model, "rm_f", rm_f); + + //엄마 질병정보 + List lm_m_disease = bf_familyBO.select_bf_family_disease_list(rm_m); + DataMap.putToModel(model, "lm_f_m_disease", lm_m_disease); + + //아빠 질병정보 + List lm_f_disease = bf_familyBO.select_bf_family_disease_list(rm_f); + DataMap.putToModel(model, "lm_f_f_disease", lm_f_disease); + } }catch(Exception ex1){ redirect_url = gmUtil.redirectError(true, ex1, request, paramMap, ra, ""); ex1.printStackTrace();} gmUtil.redirectParam(model, paramMap); @@ -139,7 +156,15 @@ public class M_Bf_familyController extends AbstractControllerManager{ return result; } - + + /** + * 부모정보 등록/수정 - snut97 + * @param model + * @param request + * @param response + * @param ra + * @return + */ @RequestMapping(value="insert_bf_family") public String insert_bf_family(@ModelAttribute("model") ModelMap model, HttpServletRequest request, HttpServletResponse response , RedirectAttributes ra) { @@ -154,16 +179,32 @@ public class M_Bf_familyController extends AbstractControllerManager{ ra.addFlashAttribute("call_native_login", "Y"); redirect_url = "redirect:/m/login/view_login.do"; }else{ - String bf_no = RenaStringUtil.getData(paramMap, "bf_no"); - if(RenaStringUtil.isNullOrEmpty(RenaStringUtil.getData(paramMap, "bf_no"))){ - bf_no = String.valueOf(bf_familyBO.insert_bf_family(paramMap)); - paramMap.put("bf_no", bf_no); - - ra.addFlashAttribute("script_msg", "등록되었습니다"); + //엄마 정보 등록/수정 + String bf_m_no = RenaStringUtil.getData(paramMap, "bf_m_no"); + if(RenaStringUtil.isNullOrEmpty(bf_m_no)) { + paramMap.put("parent_tp", "BF_P_T_1"); + bf_m_no = String.valueOf(bf_familyBO.insert_bf_m_family(paramMap)); + paramMap.put("bf_m_no", bf_m_no); + }else{ + paramMap.put("bf_no", bf_m_no); + bf_familyBO.update_bf_m_family(paramMap); + } + + //아빠 정보 등록/수정 + String bf_f_no = RenaStringUtil.getData(paramMap, "bf_f_no"); + if(RenaStringUtil.isNullOrEmpty(bf_f_no)) { + paramMap.put("parent_tp", "BF_P_T_2"); + paramMap.put("birthday", paramMap.get("f_birthday")); + paramMap.put("weight", paramMap.get("f_weight")); + paramMap.put("height", paramMap.get("f_height")); + + bf_f_no = String.valueOf(bf_familyBO.insert_bf_f_family(paramMap)); + paramMap.put("bf_f_no", bf_f_no); }else{ - bf_familyBO.update_bf_family(paramMap); - ra.addFlashAttribute("script_msg", "수정되었습니다"); + paramMap.put("bf_no", bf_f_no); + bf_familyBO.update_bf_f_family(paramMap); } + ra.addFlashAttribute("script_msg", "저장 되었습니다"); } }catch(Exception ex1){ redirect_url = gmUtil.redirectError(true, ex1, request, paramMap, ra, ""); ex1.printStackTrace();} diff --git a/src/main/resources/bf.properties b/src/main/resources/bf.properties index f85fb53..b89d982 100644 --- a/src/main/resources/bf.properties +++ b/src/main/resources/bf.properties @@ -1,11 +1,13 @@ ########## Environment ########## #개발서버 : 45.50.165.220 -URL_BASE=http://qoolsystem.com +URL_BASE=http://devops.lookylooks.ai:14280 +#URL_BASE=http://qoolsystem.com #URL_BASE=http://dev.bf.co.kr:8080 SERVER_TP_KOR=개발 SERVER_TP=DEV -system.domain=http://qoolsystem.com +#system.domain=http://qoolsystem.com +system.domain=http://devops.lookylooks.ai:14280 SERVER_NAME=bf diff --git a/src/main/resources/sqlmap/m/bf_family/com.backoffice.m.bf_family.xml b/src/main/resources/sqlmap/m/bf_family/com.backoffice.m.bf_family.xml index 7614ce4..efdfc6c 100644 --- a/src/main/resources/sqlmap/m/bf_family/com.backoffice.m.bf_family.xml +++ b/src/main/resources/sqlmap/m/bf_family/com.backoffice.m.bf_family.xml @@ -7,21 +7,38 @@ WHERE bf_no = #bf_no# - + INSERT tbl_bf_family_disease ( disease_cd_no ,bf_no ) VALUES - - ( - #list_disease_cd_no[]# - , #bf_no# - ) - + + ( + #list_m_disease_cd_no[]# + , #bf_no# + ) + + + + INSERT tbl_bf_family_disease + ( + disease_cd_no + ,bf_no + ) VALUES + + ( + #list_f_disease_cd_no[]# + , #bf_no# + ) + + + + + - - + + +
+

엄마 기본정보

-

부모선택

- -
- checked> - - - checked> - -
+
-

이름

-
- -
- -
-
- -

이메일

-
- -
- -
-
-
- -
- -
+
+ +
+
+
- <#if (model['rm']['weight'])?has_content && model['rm']['weight'] != 0> - + <#if (model['rm_m']['weight'])?has_content && model['rm_m']['weight'] != 0> + <#else> - + kg
+
- <#if (model['rm']['height'])?has_content && model['rm']['height'] != 0> - + <#if (model['rm_m']['height'])?has_content && model['rm_m']['height'] != 0> + <#else> - + cm
@@ -77,13 +57,61 @@

질환

- <#if model['lm_f_disease']? has_content> - <#list model['lm_f_disease'] as item> -
checked=checked class="m-r-5" />
+ <#if model['lm_f_m_disease']? has_content> + <#list model['lm_f_m_disease'] as item> +
checked=checked class="m-r-5" />
+ +

아빠 기본정보

+ + + +
+ +
+ +
+ +
+
+ +
+ +
+ <#if (model['rm_f']['weight'])?has_content && model['rm_f']['weight'] != 0> + + <#else> + + + kg +
+
+ +
+ +
+ <#if (model['rm_f']['height'])?has_content && model['rm_f']['height'] != 0> + + <#else> + + + cm +
+
+ +

질환

+
+
+ <#if model['lm_f_f_disease']? has_content> + <#list model['lm_f_f_disease'] as item> +
checked=checked class="m-r-5" />
+ + +
+
@@ -108,8 +136,9 @@ init: function(){ SNUtil.initInputAction() - SNUtil.makeAnyPicker('birthday', $("#birthday").val(), -80, '.'); - + SNUtil.makeAnyPicker('m_birthday', $("#m_birthday").val(), -80, '.'); + SNUtil.makeAnyPicker('f_birthday', $("#f_birthday").val(), -80, '.'); + $("input[name=parent_tp]").on("change",function(e){ let parent_tp = $(this).val(); $.ajax({ @@ -134,8 +163,8 @@ SNUtil.makeAnyPicker('birthday', $("#birthday").val(), -80, '.'); - // checkbox - var disease_cd_no = document.getElementsByName('disease_cd_no'); + // 엄마질병코드 - 질병 checkbox + var disease_cd_no = document.getElementsByName('m_disease_cd_no'); for(var i=0 ; i{ window.location.href = '${URL_ROOT}/m/index.do' }) }else if(result.RESULT == 6){ diff --git a/src/main/webapp/WEB-INF/views/ftl/m/bf_family/view_bf_family_20220207.ftl b/src/main/webapp/WEB-INF/views/ftl/m/bf_family/view_bf_family_20220207.ftl new file mode 100644 index 0000000..4049f5c --- /dev/null +++ b/src/main/webapp/WEB-INF/views/ftl/m/bf_family/view_bf_family_20220207.ftl @@ -0,0 +1,234 @@ +<#include "/m/include/index_top.ftl"> + + + +
+
+ +

프로필

+ +
+
+ <#-- FORM --> + +
+ + + +
+ +

부모선택

+ +
+ checked> + + + checked> + +
+ +
+

이름

+
+ +
+ +
+
+ +

이메일

+
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ <#if (model['rm']['weight'])?has_content && model['rm']['weight'] != 0> + + <#else> + + + kg +
+
+
+ +
+ <#if (model['rm']['height'])?has_content && model['rm']['height'] != 0> + + <#else> + + + cm +
+
+ +

질환

+
+
+ <#if model['lm_f_disease']? has_content> + <#list model['lm_f_disease'] as item> +
checked=checked class="m-r-5" />
+ + +
+
+
+ +
+ + +
+ + + <#include "/m/include/index_bottom_info.ftl"> +
+
+ + +<#include "/m/bf_family_baby/include_return_url.ftl"> + + +<#include "/m/include/index_bottom.ftl"> \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/ftl/m/login/view_find_id.ftl b/src/main/webapp/WEB-INF/views/ftl/m/login/view_find_id.ftl index 528a6c4..61a0f1d 100644 --- a/src/main/webapp/WEB-INF/views/ftl/m/login/view_find_id.ftl +++ b/src/main/webapp/WEB-INF/views/ftl/m/login/view_find_id.ftl @@ -7,22 +7,28 @@

아이디 찾기

-
-
-

가입시 사용한 휴대전화 번호를 입력하세요.

-
-
+ +
+ + +
+
+

회원가입을 위해 아래정보를 입력해주세요.

+ + +
+

휴대폰 인증

-
+
-
-
+ +
diff --git a/src/main/webapp/WEB-INF/views/ftl/m/login/view_find_id_20220207.ftl b/src/main/webapp/WEB-INF/views/ftl/m/login/view_find_id_20220207.ftl new file mode 100644 index 0000000..30f13c2 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/ftl/m/login/view_find_id_20220207.ftl @@ -0,0 +1,172 @@ +<#include "/m/include/index_top.ftl"> + + +
+
+ +

아이디 찾기

+ +
+
+ +
+

가입시 사용한 휴대전화 번호를 입력하세요.

+
+
+
+
+ +
+
+ +
+ +
+
+
+
+ + + + + + + + +<#if model['script_msg']?has_content> + + + +<#include "/m/include/index_bottom.ftl"> \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/ftl/m/login/view_pw_reset_phone.ftl b/src/main/webapp/WEB-INF/views/ftl/m/login/view_pw_reset_phone.ftl index 469c53d..5e88852 100644 --- a/src/main/webapp/WEB-INF/views/ftl/m/login/view_pw_reset_phone.ftl +++ b/src/main/webapp/WEB-INF/views/ftl/m/login/view_pw_reset_phone.ftl @@ -7,22 +7,25 @@

비밀번호 재설정

-
-
-

가입시 사용한 휴대전화 번호를 입력하세요.

-
-
-
-
- -
-
- -
- -
-
-
+ +
+
+

가입시 사용한 휴대전화 번호를 입력하세요.

+ + +
+

휴대폰 인증

+
+
+ +
+
+
+ + +
+
+
diff --git a/src/main/webapp/WEB-INF/views/ftl/m/login/view_pw_reset_phone_20220207.ftl b/src/main/webapp/WEB-INF/views/ftl/m/login/view_pw_reset_phone_20220207.ftl new file mode 100644 index 0000000..469c53d --- /dev/null +++ b/src/main/webapp/WEB-INF/views/ftl/m/login/view_pw_reset_phone_20220207.ftl @@ -0,0 +1,169 @@ +<#include "/m/include/index_top.ftl"> + + +
+
+ +

비밀번호 재설정

+ +
+
+
+

가입시 사용한 휴대전화 번호를 입력하세요.

+
+
+
+
+ +
+
+ +
+ +
+
+
+
+ + + + + + + + +<#if model['script_msg']?has_content> + + + +<#include "/m/include/index_bottom.ftl"> \ No newline at end of file