feat: program 추가 및 삭제 구현중

main
minuk926 2 years ago
parent 254f0282c8
commit 0a14f93d95

@ -74,28 +74,6 @@ public class ProgramMngController {
*/
@RequestMapping(value = "/mngProgramMgtFrom", method={RequestMethod.GET, RequestMethod.POST})
public void mngProgramMgtFrom() {
// 내역 조회
//searchVO.setPageUnit(Integer.parseInt(XitProperties.getProperty("Globals.Xit.Pagination.PageUnit")));
//searchVO.setPageSize(Integer.parseInt(XitProperties.getProperty("Globals.Xit.Pagination.PageSize")));
/** pageing */
//PaginationInfo paginationInfo = new PaginationInfo();
//paginationInfo.setCurrentPageNo(searchVO.getPageIndex());
//paginationInfo.setRecordCountPerPage(searchVO.getPageUnit());
//paginationInfo.setPageSize(searchVO.getPageSize());
//searchVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
//searchVO.setLastIndex(paginationInfo.getLastRecordIndex());
//searchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
//model.addAttribute("list_progrmmanage", xitProgramMngService.findList(searchVO));
//model.addAttribute("searchVO", searchVO);
//int totCnt = xitProgramMngService.findListTotCnt(searchVO);
//paginationInfo.setTotalRecordCount(totCnt);
//model.addAttribute("paginationInfo", paginationInfo);
}
/*
@ -124,10 +102,34 @@ public class ProgramMngController {
return ResultResponse.of(programMngService.findPrograms(paramMap, MybatisUtils.getPagingInfo(paramMap)));
}
@PostMapping(value = "/updateProgram")
@PostMapping(value = "/addProgram")
public ModelAndView addProgram(
@ModelAttribute("progrmMngVO") final ProgramMngVO vo
, final BindingResult bindingResult
) {
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
//유효성 확인
//2020.11.24. 주석처리
beanValidator.validate(vo, bindingResult);
// beanValidator.validate("progrmMngVO", vo, bindingResult);
if (bindingResult.hasErrors()) {
throw BizRuntimeException.create(MessageKey.CMM_INSERT_FAIL);
}else {
if (vo.getProgrmDc() == null || vo.getProgrmDc().equals("")) {
vo.setProgrmDc(" ");
}
}
programMngService.addProgram(vo);
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_INSERT_SUCCESS);
return mav;
}
@PostMapping(value = "/modifyProgram")
public ModelAndView modifyProgram(
@ModelAttribute("progrmMngVO") final ProgramMngVO vo
, @RequestParam(value="checkedProgrmFileNmForDel", required=false, defaultValue="") String checkedProgrmFileNmForDel
, final BindingResult bindingResult
) {
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
@ -151,7 +153,6 @@ public class ProgramMngController {
}
/**
* <pre> : .</pre>
* @param cmd

@ -8,8 +8,10 @@ public abstract class MessageKey {
public static final String CMM_SUCCESS = "success.request.msg";//정상적으로 수행되었습니다. (재정의 필요)
public static final String CMM_UPDATE_SUCCESS = "success.common.update";
public static final String CMM_INSERT_SUCCESS = "success.common.insert";
public static final String CMM_FAIL = "fail.request.msg";//요청처리를 실패하였습니다..
public static final String CMM_INSERT_FAIL = "fail.common.insert";
public static final String CMM_UPDATE_FAIL = "fail.common.update";
public static final String CMM_REMOVE_FAIL = "fail.common.delete";

@ -62,12 +62,11 @@
, url = #{URL}
WHERE progrm_file_nm = #{progrmFileNm}
</update>
<delete id="deleteProgram">
/** removeXitProgrmList */
/** 프로그램목록 삭제 */
DELETE FROM XIT_PROGRM_LIST
WHERE 1=1
AND PROGRM_FILE_NM = #{progrm_file_nm}
<delete id="deleteProgram" parameterType="string">
/* program-mysql-mapper|deleteProgram-프로그램 정보 변경|julim */
DELETE
FROM xit_progrm_list
WHERE progrm_file_nm = #{progrmFileNm}
</delete>

@ -143,7 +143,7 @@
var param = $(varFrom).serialize();
$.ajax({
<%--url : "<c:url value='/'/>framework/biz/mng/menu/program_update_proc.do",--%>
url : "<c:url value='/'/>framework/biz/mng/menu/updateProgram.do",
url : "<c:url value='/'/>framework/biz/mng/menu/modifyProgram.do",
data : param,
type : "post",
dataType : "json",

Loading…
Cancel
Save