fix(69): 지난 예방접종에서 다시 체크를 지우면 위로 올라오기

dev_bert
Shallwe 2 years ago
parent a5bd4e9374
commit caf0350655

@ -7,8 +7,9 @@ import com.renastudio.creative.web.util.DataMap;
public interface M_Bf_boardBO {
public abstract DataMap select_bf_view_board(DataMap paramMap) throws Exception;
public abstract DataMap select_bf_view_board(DataMap paramMap) throws Exception;
public abstract List<DataMap> select_list_bf_board(DataMap paramMap) throws Exception;
public abstract int select_list_bf_board_count(DataMap paramMap) throws Exception;
public abstract DataMap select_top_bf_board(DataMap paramMap) throws Exception;
public abstract List<DataMap> select_bf_board_img_by_b_no(DataMap paramMap) throws Exception;
public abstract List<DataMap> select_bf_board_vote_by_b_no(DataMap paramMap) throws Exception;

@ -28,6 +28,19 @@ public class M_Bf_boardBOImpl extends AbstractBOManager implements M_Bf_boardBO
return lm;
}
public int select_list_bf_board_count(DataMap paramMap) throws Exception{
int result = 0;
try {
generalDAO.setNamespace(SQLMAP_NAMESPACE);
result = generalDAO.select_item_to_number("select_list_bf_board_count", paramMap);
} catch (SQLException e) {
throw e;
}
return result;
}
public DataMap select_top_bf_board(DataMap paramMap) throws Exception{
DataMap rm = null;
@ -174,7 +187,7 @@ public class M_Bf_boardBOImpl extends AbstractBOManager implements M_Bf_boardBO
generalDAO.insert("insert_bf_board_vote_by_b_no", dm);
}
}
generalDAO.commitTransaction();
generalDAO.commitTransaction();
} catch (SQLException e) {
throw e;
}finally{
@ -296,7 +309,7 @@ public class M_Bf_boardBOImpl extends AbstractBOManager implements M_Bf_boardBO
if( M_Util.null2Str(paramMap.get("reply_new"),"Y").equals("Y")){
if(!M_Util.null2Str(paramMap.get("ct_no"),"").equals(""))
paramMap.put("p_ct_no", Integer.parseInt(paramMap.get("ct_no").toString()));
result = (int) generalDAO.insert("insert_bf_board_comment_by_b_no", paramMap);
result = (int) generalDAO.insert("insert_bf_board_comment_by_b_no", paramMap);
}else {
paramMap.put("ct_no", Integer.parseInt(paramMap.get("ct_no").toString())); // 댓글 수정
result = (int)generalDAO.update("update_bf_board_comment_by_b_no", paramMap);

@ -79,7 +79,17 @@ public class M_Bf_boardController extends AbstractControllerManager {
int tutorial_cnt = bf_tutorialBO.select_tbl_tutorial(paramMap);
paramMap.put("tutorial_cnt", tutorial_cnt);
List<DataMap> lm = bf_boardBo.select_list_bf_board(paramMap);
//---beigin--
// int lm_count= bf_boardBo.select_list_bf_board_count(paramMap);
log.debug("lm_count.....");
// log.fatal(lm_count);
paramMap.put("lm_count", 100);
paramMap.put("lm_page", 1);
paramMap.put("lm_pagesize", 30);
//---end ---
List<DataMap> lm = bf_boardBo.select_list_bf_board(paramMap);
DataMap.putToModel(model, "lm", lm);
// 인기글 셀렉
@ -89,7 +99,10 @@ public class M_Bf_boardController extends AbstractControllerManager {
DataMap.putToModel(model, "rm_child", rm_child);
DataMap.putToModel(model, "rm_mem", rm_mem);
}
}catch(Exception ex1){ redirect_url = gmUtil.redirectError(true, ex1, request, paramMap, ra, ""); ex1.printStackTrace();}
}catch(Exception ex1){
redirect_url = gmUtil.redirectError(true, ex1, request, paramMap, ra, "");
ex1.printStackTrace();
}
if(paramMap.get("bd_tp") == null) {
paramMap.put("bd_tp" ,"");
}

@ -9,6 +9,7 @@ import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import javax.xml.crypto.Data;
import com.backoffice.constants.ConstantResultCode;
import com.backoffice.m.tutorial.M_Bf_tutorialBO;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@ -18,6 +19,8 @@ import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
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.ResponseBody;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import com.backoffice.admin.bf.bf_recommend.A_Bf_recommendBO;
@ -675,29 +678,26 @@ public class M_Bf_growthController extends AbstractControllerManager{
}
//---begin-------
@RequestMapping(value="vac_schedule_check")
public String vac_schedule_check(@ModelAttribute("model") ModelMap model, HttpServletRequest request, HttpServletResponse response
, RedirectAttributes ra) {
// @RequestMapping(value="vac_schedule_check")
@RequestMapping(value="vac_schedule_check", method= RequestMethod.GET)
@ResponseBody
public HashMap<String, Object> vac_schedule_check(@ModelAttribute("model") ModelMap model, HttpServletRequest request, HttpServletResponse response) {
DataMap paramMap = gmUtil.getDataMapFromRequest(request);
String redirect_url = "m/bf_growth/vac_schedule";
log.info("vac_schedule_check.....");
log.info(paramMap);
try{
int result = bf_growthBO.update_bf_vac_schedule_check(paramMap);
if(result == 1) {
paramMap.put("ERROR_MSG", "반영되었습니다:" + result);
}else {
paramMap.put("ERROR_MSG", "반영되지 못했습니다:" + result);
}
}catch(Exception ex1){ redirect_url = gmUtil.redirectError(true, ex1, request, paramMap, ra, ""); ex1.printStackTrace();}
HashMap<String, Object> rm = new HashMap<String, Object>();
rm.put("RESULT", ConstantResultCode.RESULT_INIT);
gmUtil.redirectParam(model, paramMap);
return redirect_url;
try{
int result = bf_growthBO.update_bf_vac_schedule_check(paramMap);
rm.put("result", result);
}catch(Exception ex1){
ex1.printStackTrace();
rm.put("RESULT", ConstantResultCode.RESULT_EXCEPTION);
}
return rm;
}
// ---end----------

@ -406,7 +406,8 @@
on dvs.dv_no = dv.dv_no
left join tbl_bf_family_baby fb
on fb.smc_no = #smc_no#
where not now() > date_add(date_add(fb.birthday, interval dvs.end_label month), interval -1 day)
where (not now() > date_add(date_add(fb.birthday, interval dvs.end_label month), interval -1 day))
AND dvs.dv_check=0
order by recmnd_from_dt desc , dvs.dv_no, dvs.round
</select>
@ -423,7 +424,8 @@
on dvs.dv_no = dv.dv_no
left join tbl_bf_family_baby fb
on fb.smc_no = #smc_no#
where now() > date_add(date_add(fb.birthday, interval dvs.end_label month), interval -1 day)
where (now() > date_add(date_add(fb.birthday, interval dvs.end_label month), interval -1 day))
OR dvs.dv_check=1
order by recmnd_from_dt , dvs.dv_no, dvs.round
</select>

@ -44,21 +44,23 @@
return s ;
}
function OncheckBox(e){
console.log(e,e.checked,$(e).attr('name'), e.value, 'onckbox=====')
const url = "${URL_ROOT}/m/bf_growth/vac_schedule_check.do?dvs_no=" + ($(e).attr('name')) + "&dv_check=" + (e.checked ? '1' : '0');
const url = "${URL_ROOT}/m/bf_growth/vac_schedule_check.do?dvs_no=" + ($(e).attr('name')) + "&dv_check=1";
console.log('打印请求的接口:', url)
$.ajax({
url: url,
processData: false,
contentType: false,
type: 'GET',
async : false,
success: function(response){
Swal.fire({text: '저장 되었습니다.'}).then((result)=>{ location.reload(); })
// callback(response);
}
});
}
function OncheckBox1(e){
const url = "${URL_ROOT}/m/bf_growth/vac_schedule_check.do?dvs_no=" + ($(e).attr('name')) + "&dv_check=0";
console.log('打印请求的接口:', url)
// $.ajax({
// url:'url,
// type:'get',
// dataType:'json',
// error:function(request,status,error){
// is_loading = false;
// alert("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+error);
// },
// success:function(result){
// }
// });
$.ajax({
url: url,
processData: false,
@ -167,7 +169,9 @@
<div class="date">${item['recmnd_month']!}</div>
<!-- content -->
<div class="content content_pick">
<input onclick="OncheckBox(this)" type="checkbox" class="agree_grain" name="${item['dvs_no']!}" value="${item['dv_check']}">
<#if ( item['dv_check'] == '1')>
<input onclick="OncheckBox1(this)" type="checkbox" class="agree_grain" name="${item['dvs_no']!}" value="${item['dv_check']}">
</#if>
<div class="title">${item['dv_disease']!}</div>
<div class="box">
<div class="box_title">권장일</div>

Loading…
Cancel
Save