새로만든 홈메이드 이유식/ 간식/ 시판이유식 초기화 재작업

dev_bert
kyebyungha 3 years ago
parent 50453e7381
commit d7a76884b1

@ -504,10 +504,11 @@ public class M_Bf_daily_nutritionController extends AbstractControllerManager{
@ResponseBody
public HashMap<String, Object> ajax_list_db_homemade_self(@ModelAttribute("model") ModelMap model, HttpServletRequest request, HttpServletResponse response) {
DataMap paramMap = this.getDataMapFromRequest(request);
HashMap<String, Object> result = new HashMap<String, Object>();
HttpSession session = request.getSession(false);
DataMap rm_mem = (DataMap) session.getAttribute(ConstantSystem.SESSION_RM_MEMBER);
try{
paramMap.put("member_id", rm_mem.get("member_id"));
int rowMax = bf_daily_nutritionBO.select_homemade_self_list_count(paramMap);
initPage(paramMap, 100, PAGE_COUNT, rowMax); // check page count
@ -564,7 +565,7 @@ public class M_Bf_daily_nutritionController extends AbstractControllerManager{
ObjectMapper mapper = new ObjectMapper();
Map<String, String> map = mapper.readValue(mRequest.getParameter("fileData"), Map.class);
paramMap.putAll(map);
paramMap.put("member_id", rm_mem.get("member_id"));
HashMap<String, Object> result = new HashMap<String, Object>();
result.put("RESULT", ConstantResultCode.RESULT_INIT);
@ -662,10 +663,12 @@ public class M_Bf_daily_nutritionController extends AbstractControllerManager{
@ResponseBody
public HashMap<String, Object> ajax_list_db_commerce_self(@ModelAttribute("model") ModelMap model, HttpServletRequest request, HttpServletResponse response) {
DataMap paramMap = this.getDataMapFromRequest(request);
HashMap<String, Object> result = new HashMap<String, Object>();
HttpSession session = request.getSession(false);
DataMap rm_mem = (DataMap) session.getAttribute(ConstantSystem.SESSION_RM_MEMBER);
try{
paramMap.put("member_id", rm_mem.get("member_id"));
int rowMax = bf_daily_nutritionBO.select_commerce_list_count(paramMap);
initPage(paramMap, 100, PAGE_COUNT, rowMax); // check page count

@ -1634,7 +1634,7 @@
FROM tbl_db_home_sf x
WHERE 1 = 1
AND name like N'%$prd_nm$%'
AND member_id = #member_id#
</select>
<select id="select_homemade_list_count" resultClass="Integer" parameterClass="dataMap">
@ -1669,11 +1669,13 @@
<isNotEmpty property="name">,name</isNotEmpty>
<isNotEmpty property="for_m">,for_m</isNotEmpty>
<isNotEmpty property="imgurl1">,imgurl1</isNotEmpty>
<isNotEmpty property="member_id">,member_id</isNotEmpty>
) VALUES (
NOW()
<isNotEmpty property="name">,#name#</isNotEmpty>
<isNotEmpty property="for_m">,#for_m#</isNotEmpty>
<isNotEmpty property="imgurl1">,#imgurl1#</isNotEmpty>
<isNotEmpty property="member_id">,#member_id#</isNotEmpty>
)
<selectKey keyProperty="dhb_no" resultClass="int">
@ -1691,7 +1693,6 @@
<isNotEmpty property="rate_100">,rate_100</isNotEmpty>
<isNotEmpty property="di_name">,di_name</isNotEmpty>
<isNotEmpty property="for_m">,for_m</isNotEmpty>
,sys_member_id
) VALUES (
NOW()
,#dhb_no#
@ -1699,7 +1700,6 @@
<isNotEmpty property="rate_100">,#rate_100#</isNotEmpty>
<isNotEmpty property="di_name">,#di_name#</isNotEmpty>
<isNotEmpty property="for_m">,#for_m#</isNotEmpty>
,''
)
</insert>
@ -1714,7 +1714,6 @@
FROM tbl_db_bf_commerce x
WHERE 1 = 1
AND prd_nm like N'%$prd_nm$%'
</select>
<select id="select_commerce_list_count" resultClass="Integer" parameterClass="dataMap">
@ -1766,7 +1765,7 @@
<isNotEmpty property="none">,none</isNotEmpty>
<isNotEmpty property="company">,company</isNotEmpty>
<isNotEmpty property="imgurl1">,imgurl1</isNotEmpty>
<isNotEmpty property="member_id">,member_id</isNotEmpty>
) VALUES (
NOW()
<isNotEmpty property="prd_nm">,#prd_nm#</isNotEmpty>
@ -1807,6 +1806,7 @@
<isNotEmpty property="none">,#none#</isNotEmpty>
<isNotEmpty property="company">,#company#</isNotEmpty>
<isNotEmpty property="imgurl1">,#imgurl1#</isNotEmpty>
<isNotEmpty property="member_id">,#member_id#</isNotEmpty>
)
<selectKey keyProperty="dbc_no" resultClass="int">
SELECT LAST_INSERT_ID()

@ -301,7 +301,6 @@
e.preventDefault()
return;
}
this.ajax_insert_home()
e.preventDefault()
return;
@ -480,7 +479,7 @@
var RESULT = result.RESULT
if(RESULT == 0){ //0:RESULT_SUCCESS
save_set('', result.dbc_no, $("#menu_nm").val(), 'sf');
this.init_self();
frmCommerce.init_self();
Swal.fire({text:"입력되었습니다"});
}else{
Swal.fire({text:"등록되지 않았습니다"})

@ -351,7 +351,6 @@
// form Data 객체 생성
formData.append("attachedImage",img.files[0]);
formData.append('fileData',JSON.stringify(param));
$.ajax({
url:'${URL_ROOT}/m/bf_daily_nutrition/ajax_insert_homemade_self.do?1=1',
processData: false, // 데이터 객체를 문자열로 바꿀지에 대한 값이다. true면 일반문자...
@ -369,7 +368,7 @@
$('#popup_self2').removeClass('open');
$("#db_dhb_no").val(result.dhb_no);
$("#prd_nm").text($("#prd_nm_sch2").val());
this.init_self();
frmCommerce.init_self();
Swal.fire({text:"입력되었습니다"});
}else{
Swal.fire({text:"등록되지 않았습니다"});
@ -381,17 +380,12 @@
$('#imgSrc').attr("src", "${URL_STATIC_ROOT}/m/img/main/main_cont_img_camera.png");
$('#img').val('');
$('#prd_nm_sch2').val('');
$('#prd_nm_search2').val('');
$("input[name=dbi_no]").each ( function(idx, ele) {
ele.value="";
});
$("input[name=rate_100]").each ( function(idx, ele) {
ele.value="";
});
$("input[name=di_name]").each ( function(idx, ele) {
ele.value="";
});
$("#nutrition_kinds_basic3").html("");
$('#ul_board2').html("");
}
}

Loading…
Cancel
Save