우편통합 - 발송상태 추가.

main
jjh 12 months ago
parent 96f6ed4de8
commit 9372ab082d

@ -42,6 +42,9 @@ public interface EpostGdccMapper extends AbstractMapper {
*/ */
default DataObject selectEpostGdccInfo(EpostQuery req) { default DataObject selectEpostGdccInfo(EpostQuery req) {
// 기본 정렬 // 기본 정렬
if (req.getUseYN() == null) {
req.setUseYN("Y");
}
if (req.getOrderBy() == null) { if (req.getOrderBy() == null) {
req.setOrderBy("EG.GDCC_ID DESC"); req.setOrderBy("EG.GDCC_ID DESC");
} }

@ -35,7 +35,25 @@ public interface EpostRcptRegMapper extends AbstractMapper {
* @param req * @param req
* @return * @return
*/ */
List<EpostRcptReg> selectEpostRcptRegs(EpostQuery req); List<DataObject> selectEpostRcptRegs(EpostQuery req);
/** 1 .
* @param levyExclId ID
* @return
*/
default DataObject selectEpostRcptRegInfo(EpostQuery req) {
// 기본 정렬
if (req.getUseYN() == null) {
req.setUseYN("Y");
}
if (req.getOrderBy() == null) {
req.setOrderBy("ERR.CON_KEY DESC");
}
List<DataObject> epostRcptReg = selectEpostRcptRegs(req);
return !epostRcptReg.isEmpty() ? epostRcptReg.get(0) : null;
}
/** . /** .
* @param params * @param params

@ -14,7 +14,7 @@ import cokr.xit.fims.epst.EpostRcptDtl;
* *
* <pre> * <pre>
* ============ ============ * ============ ============
* 2023-10-11 mjkhan * 2023-10-11 JoJH
* ================================ * ================================
* </pre> * </pre>
*/ */
@ -29,7 +29,13 @@ public interface EpostRcptRegService {
* @param req * @param req
* @return * @return
*/ */
List<EpostRcptReg> getEpostRcptRegs(EpostQuery req); List<DataObject> getEpostRcptRegs(EpostQuery req);
/** .
* @param req
* @return
*/
DataObject getEpostRcptRegInfo(EpostQuery req);
/** . /** .
* @param epostRcptReg * @param epostRcptReg

@ -56,6 +56,14 @@ public class EpostGdccBean extends AbstractComponent {
* @return * @return
*/ */
public List<DataObject> getEpostGdccs(EpostQuery req) { public List<DataObject> getEpostGdccs(EpostQuery req) {
// 삭제 여부 확인
if (req.getDelYn() == null) {
req.setDelYn("N");
}
if (req.getOrderBy() == null) {
req.setOrderBy("EG.GDCC_ID DESC");
}
return epostGdccMapper.selectEpostGdccs(req); return epostGdccMapper.selectEpostGdccs(req);
} }
@ -64,7 +72,16 @@ public class EpostGdccBean extends AbstractComponent {
* @return * @return
*/ */
public DataObject getEpostGdccInfo(EpostQuery req) { public DataObject getEpostGdccInfo(EpostQuery req) {
return epostGdccMapper.selectEpostGdccInfo(req); DataObject dataInfo = new DataObject();
if (req.getCallPurpose().equals("create")) {
dataInfo.set("SGG_CD", req.getSggCd());
dataInfo.set("TASK_SE_CD", req.getTaskSeCd());
} else {
dataInfo = epostGdccMapper.selectEpostGdccInfo(req);;
}
return dataInfo;
} }
/** . /** .

@ -10,6 +10,7 @@ import cokr.xit.foundation.AbstractComponent;
import cokr.xit.foundation.data.DataObject; import cokr.xit.foundation.data.DataObject;
import cokr.xit.fims.epst.dao.EpostRcptRegMapper; import cokr.xit.fims.epst.dao.EpostRcptRegMapper;
import cokr.xit.fims.cmmn.CmmnUtil;
import cokr.xit.fims.epst.EpostQuery; import cokr.xit.fims.epst.EpostQuery;
import cokr.xit.fims.epst.EpostRcptReg; import cokr.xit.fims.epst.EpostRcptReg;
import cokr.xit.fims.epst.EpostRcptDtl; import cokr.xit.fims.epst.EpostRcptDtl;
@ -36,6 +37,18 @@ public class EpostRcptRegBean extends AbstractComponent {
* @return * @return
*/ */
public List<DataObject> getEpostRcptRegList(EpostQuery req) { public List<DataObject> getEpostRcptRegList(EpostQuery req) {
// 삭제 여부 확인
if (req.getDelYn() == null) {
req.setDelYn("N");
}
// 정렬 확인
if (req.getOrderBy() == null) {
if (req.getBy() == null) {
req.setOrderBy("REG_DT");
} else {
req.setOrderBy(CmmnUtil.convertCamelCaseToSnakeCase(req.getBy()));
}
}
return epostRcptRegMapper.selectEpostRcptRegList(req); return epostRcptRegMapper.selectEpostRcptRegList(req);
} }
@ -43,10 +56,34 @@ public class EpostRcptRegBean extends AbstractComponent {
* @param req * @param req
* @return * @return
*/ */
public List<EpostRcptReg> getEpostRcptRegs(EpostQuery req) { public List<DataObject> getEpostRcptRegs(EpostQuery req) {
// 삭제 여부 확인
if (req.getDelYn() == null) {
req.setDelYn("N");
}
if (req.getOrderBy() == null) {
req.setOrderBy("ERR.CON_KEY DESC");
}
return epostRcptRegMapper.selectEpostRcptRegs(req); return epostRcptRegMapper.selectEpostRcptRegs(req);
} }
/** .
* @param req
* @return
*/
public DataObject getEpostRcptRegInfo(EpostQuery req) {
DataObject dataInfo = new DataObject();
if (req.getCallPurpose().equals("create")) {
dataInfo.set("SGG_CD", req.getSggCd());
dataInfo.set("TASK_SE_CD", req.getTaskSeCd());
} else {
dataInfo = epostRcptRegMapper.selectEpostRcptRegInfo(req);;
}
return dataInfo;
}
/** . /** .
* @param epostRcptReg * @param epostRcptReg
* @return * @return

@ -37,10 +37,15 @@ public class EpostRcptRegServiceBean extends AbstractServiceBean implements Epos
} }
@Override @Override
public List<EpostRcptReg> getEpostRcptRegs(EpostQuery req) { public List<DataObject> getEpostRcptRegs(EpostQuery req) {
return epostRcptRegBean.getEpostRcptRegs(req); return epostRcptRegBean.getEpostRcptRegs(req);
} }
@Override
public DataObject getEpostRcptRegInfo(EpostQuery req) {
return epostRcptRegBean.getEpostRcptRegInfo(req);
}
@Override @Override
public boolean createEpostRcptReg(EpostRcptReg epostRcptReg) { public boolean createEpostRcptReg(EpostRcptReg epostRcptReg) {
return epostRcptRegBean.createEpostRcptReg(epostRcptReg); return epostRcptRegBean.createEpostRcptReg(epostRcptReg);

@ -1,16 +1,19 @@
package cokr.xit.fims.epst.web; package cokr.xit.fims.epst.web;
import java.util.List; import java.util.List;
import java.util.Map;
import javax.annotation.Resource; import javax.annotation.Resource;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
import cokr.xit.base.code.CommonCode;
import cokr.xit.base.user.ManagedUser;
import cokr.xit.base.web.ApplicationController; import cokr.xit.base.web.ApplicationController;
import cokr.xit.fims.epst.EpostQuery; import cokr.xit.fims.epst.EpostQuery;
import cokr.xit.fims.epst.EpostRcptReg; import cokr.xit.fims.epst.EpostRcptReg;
import cokr.xit.fims.epst.service.EpostRcptRegService; import cokr.xit.fims.epst.service.EpostRcptRegService;
import cokr.xit.foundation.data.DataObject;
/** /**
* *
@ -28,11 +31,12 @@ public class Epst01Controller extends ApplicationController {
public class METHOD_URL { public class METHOD_URL {
public static final String public static final String
epostRcptRegMain = "/epostRcptRegMain.do" // 전자우편 접수 메인 epostReceiptRegistrationMain = "/010/main.do" // 전자우편 접수 메인 화면
, getEpostRcptRegList = "/getEpostRcptRegList.do" // 전자우편 접수 조회 , getEpostReceiptRegistrationList = "/010/list.do" // 전자우편 접수 대장 목록 조회
, createEpostRcptReg = "/createEpostRcptReg.do" // 전자우편 접수 등록 , getEpostReceiptRegistrationInfo = "/020/info.do" // 전자우편 접수 정보 조회
, updateEpostRcptReg = "/updateEpostRcptReg.do" // 전자우편 접수 수정 , createEpostReceiptRegistration = "/010/create.do" // 전자우편 접수 정보 등록
, deleteEpostRcptReg = "/deleteEpostRcptReg" // 전자우편 접수 삭제 , updateEpostReceiptRegistration = "/010/update.do" // 전자우편 접수 정보 수정
, deleteEpostReceiptRegistration = "/010/delete.do" // 전자우편 접수 정보 삭제
; ;
} }
@ -44,12 +48,20 @@ public class Epst01Controller extends ApplicationController {
* {@link #getEpostRcptRegList(EpostRcptRegQuery) } . * {@link #getEpostRcptRegList(EpostRcptRegQuery) } .
* @return /epostRcptReg/epostRcptReg-main * @return /epostRcptReg/epostRcptReg-main
*/ */
public ModelAndView epostRcptRegMain() { public ModelAndView epostReceiptRegistrationMain() {
ModelAndView mav = getEpostRcptRegList(new EpostQuery().setPageNum(1)); ModelAndView mav = new ModelAndView("fims/epst/epst01010-main");
mav.setViewName("/epostRcptReg/epostRcptReg-main"); // 사용자 정보
ManagedUser managedUser = (ManagedUser)currentUser().getUser();
return mav.addObject("epostRcptRegList", toJson(mav.getModel().get("epostRcptRegList"))); // View(jsp)에서 사용할 공통코드를 조회
Map<String, List<CommonCode>> commonCodes = getCodesOf("FIM054");
return mav.addObject("pageName", "epst01010") // View(jsp)에서 사용할 id 뒤에 붙일 suffix
.addObject("infoPrefix", "epost") // prefix
.addObject("sggCd", managedUser.getOrgID()) // 시군구 코드(SGG_CD)
.addObject("FIM054List", commonCodes.get("FIM054")) // 업무 구분 코드(TASK_SE_CD)
;
} }
/** .<br /> /** .<br />
@ -64,12 +76,42 @@ public class Epst01Controller extends ApplicationController {
* }</code></pre> * }</code></pre>
*/ */
public ModelAndView getEpostRcptRegList(EpostQuery req) { public ModelAndView getEpostReceiptRegistrationList(EpostQuery req) {
List<?> result = epostRcptRegService.getEpostRcptRegList(setFetchSize(req)); List<?> result = epostRcptRegService.getEpostRcptRegList(setFetchSize(req));
return setCollectionInfo(new ModelAndView("jsonView"), result, "epostRcptReg"); return setCollectionInfo(new ModelAndView("jsonView"), result, "epostRcptReg");
} }
/** (info) .
* @param req
* @return fims/epst/epst01020-info jsonView
* <pre>{
* "epostRcptReg":
* }</pre>
*/
public ModelAndView getEpostGuidanceDocumentInfo(EpostQuery req) {
//
DataObject epostRcptRegInfo = epostRcptRegService.getEpostRcptRegInfo(req);
boolean json = jsonResponse();
ModelAndView mav = new ModelAndView(json ? "jsonView" : "fims/epst/epst02020-info");
// View(jsp)에서 사용할 공통코드를 조회
Map<String, List<CommonCode>> commonCodes = getCodesOf("FIM047", "FIM054");
addCodes(commonCodes, mav, "FIM047", "FIM054");
return mav
.addObject("pageName", "epst01020") // View(jsp)에서 사용할 id 뒤에 붙일 suffix
.addObject("callPurpose", req.getCallPurpose()) // 호출 용도
.addObject("FIM047List", commonCodes.get("FIM047")) // 발송 구분 코드(SNDNG_SE_CD)
.addObject("FIM054List", commonCodes.get("FIM054")) // 업무 구분 코드(TASK_SE_CD)
.addObject("epostRcptRegInfo", json ? epostRcptRegInfo : toJson(epostRcptRegInfo))
;
}
/** . /** .
* @param epostRcptReg * @param epostRcptReg
* @return jsonView * @return jsonView
@ -77,7 +119,7 @@ public class Epst01Controller extends ApplicationController {
* "saved": true, false * "saved": true, false
* }</code></pre> * }</code></pre>
*/ */
public ModelAndView createEpostRcptReg(EpostRcptReg epostRcptReg) { public ModelAndView createEpostReceiptRegistration(EpostRcptReg epostRcptReg) {
boolean saved = epostRcptRegService.createEpostRcptReg(epostRcptReg); boolean saved = epostRcptRegService.createEpostRcptReg(epostRcptReg);
return new ModelAndView("jsonView") return new ModelAndView("jsonView")
.addObject("saved", saved); .addObject("saved", saved);
@ -90,8 +132,7 @@ public class Epst01Controller extends ApplicationController {
* "saved": true, false * "saved": true, false
* }</code></pre> * }</code></pre>
*/ */
@PostMapping(name = "전자우편 접수 등록 수정", value = "/update.do") public ModelAndView updateEpostReceiptRegistration(EpostRcptReg epostRcptReg) {
public ModelAndView updateEpostRcptReg(EpostRcptReg epostRcptReg) {
boolean saved = epostRcptRegService.updateEpostRcptReg(epostRcptReg); boolean saved = epostRcptRegService.updateEpostRcptReg(epostRcptReg);
return new ModelAndView("jsonView") return new ModelAndView("jsonView")
.addObject("saved", saved); .addObject("saved", saved);
@ -105,8 +146,7 @@ public class Epst01Controller extends ApplicationController {
* "saved": true, false * "saved": true, false
* }</code></pre> * }</code></pre>
*/ */
@PostMapping(name = "전자우편 접수 등록 제거", value = "/remove.do") public ModelAndView deleteEpostReceiptRegistration(EpostRcptReg epostRcptReg) {
public ModelAndView removeEpostRcptReg(EpostRcptReg epostRcptReg) {
boolean saved = epostRcptRegService.removeEpostRcptReg(epostRcptReg); boolean saved = epostRcptRegService.removeEpostRcptReg(epostRcptReg);
return new ModelAndView("jsonView") return new ModelAndView("jsonView")
.addObject("saved", saved); .addObject("saved", saved);

@ -5,7 +5,6 @@ import java.util.Map;
import javax.annotation.Resource; import javax.annotation.Resource;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
import cokr.xit.base.code.CommonCode; import cokr.xit.base.code.CommonCode;
@ -91,14 +90,7 @@ public class Epst02Controller extends ApplicationController {
*/ */
public ModelAndView getEpostGuidanceDocumentInfo(EpostQuery req) { public ModelAndView getEpostGuidanceDocumentInfo(EpostQuery req) {
// //
DataObject epostGdccInfo = new DataObject(); DataObject epostGdccInfo = epostGdccService.getEpostGdccInfo(req);
if (req.getCallPurpose().equals("create")) {
epostGdccInfo.set("SGG_CD", req.getSggCd());
epostGdccInfo.set("TASK_SE_CD", req.getTaskSeCd());
} else {
epostGdccInfo = epostGdccService.getEpostGdccInfo(req);
}
boolean json = jsonResponse(); boolean json = jsonResponse();
@ -219,7 +211,6 @@ public class Epst02Controller extends ApplicationController {
* "saved": true, false * "saved": true, false
* }</code></pre> * }</code></pre>
*/ */
@PostMapping(name = "전자우편 안내문 제거", value = "/remove.do")
public ModelAndView remove(EpostGdcc epostGdcc) { public ModelAndView remove(EpostGdcc epostGdcc) {
boolean saved = epostGdccService.remove(epostGdcc); boolean saved = epostGdccService.remove(epostGdcc);
return new ModelAndView("jsonView") return new ModelAndView("jsonView")

@ -49,7 +49,7 @@ public interface LevyExclMapper extends AbstractMapper {
} }
// 기본 정렬 // 기본 정렬
if (req.getOrderBy() == null) { if (req.getOrderBy() == null) {
req.setOrderBy("LE.LEVY_EXCL_ID DESC"); req.setOrderBy("C.CRDN_ID, LE.LEVY_EXCL_ID DESC");
} }
List<DataObject> levyExcls = selectLevyExcls(req); List<DataObject> levyExcls = selectLevyExcls(req);

@ -79,7 +79,13 @@ public class LevyExclBean extends AbstractComponent {
* @return * @return
*/ */
public DataObject getLevyExclInfo(LevyExclQuery req) { public DataObject getLevyExclInfo(LevyExclQuery req) {
return levyExclMapper.selectLevyExclInfo(req); DataObject levyExclInfo = levyExclMapper.selectLevyExclInfo(req);
if (req.getCallPurpose().equals("create")) {
levyExclInfo.set("LEVY_EXCL_SE_CD", req.getLevyExclSeCd()); // 부과 제외 구분 코드
}
return levyExclInfo;
} }
/** ID .<br /> /** ID .<br />

@ -41,15 +41,7 @@ public class LevyExclServiceBean extends AbstractServiceBean implements LevyExcl
@Override @Override
public DataObject getLevyExclInfo(LevyExclQuery req) { public DataObject getLevyExclInfo(LevyExclQuery req) {
if (req.getCallPurpose() == null) { return levyExclBean.getLevyExclInfo(req);
req.setCallPurpose("view");
}
if (req.getCallPurpose().equals("create")) {
return levyExclBean.getCrdnInfo(req);
} else {
return levyExclBean.getLevyExclInfo(req);
}
} }
@Override @Override

@ -546,10 +546,28 @@ public class CmnController {
} }
@Controller @Controller
@RequestMapping(name="우편통합", value=Epst02Controller.CLASS_URL) @RequestMapping(name="우편통합", value=Epst01Controller.CLASS_URL)
class Epst02Controller extends cokr.xit.fims.epst.web.Epst02Controller { class Epst01Controller extends cokr.xit.fims.epst.web.Epst01Controller {
@Override @Override
@RequestMapping(name="발송상태", value=METHOD_URL.epostReceiptRegistrationMain)
public ModelAndView epostReceiptRegistrationMain() {
return super.epostReceiptRegistrationMain();
}
// @Override
// @RequestMapping(name="정산결과", value=METHOD_URL.epostGuidanceDocumentMain)
// public ModelAndView epostGuidanceDocumentMain() {
// return super.epostGuidanceDocumentMain();
// }
}
@Controller
@RequestMapping(name="우편통합_안내문 관리", value=Epst02Controller.CLASS_URL)
class Epst02Controller extends cokr.xit.fims.epst.web.Epst02Controller {
@Override
@RequestMapping(name="전자우편 안내문 메인", value=METHOD_URL.epostGuidanceDocumentMain) @RequestMapping(name="전자우편 안내문 메인", value=METHOD_URL.epostGuidanceDocumentMain)
public ModelAndView epostGuidanceDocumentMain() { public ModelAndView epostGuidanceDocumentMain() {
return super.epostGuidanceDocumentMain(); return super.epostGuidanceDocumentMain();

@ -894,6 +894,18 @@ public class DpvController {
} }
@Controller
@RequestMapping(name="우편통합", value=CLASS_URL+Epst01Controller.CLASS_URL)
class Epst01Controller extends cokr.xit.fims.epst.web.Epst01Controller {
@Override
@RequestMapping(name="전자우편안내문 대장 목록 조회", value=METHOD_URL.getEpostReceiptRegistrationList)
public ModelAndView getEpostReceiptRegistrationList(EpostQuery req) {
return super.getEpostReceiptRegistrationList(req);
}
}
@Controller @Controller
@RequestMapping(name="우편통합", value=CLASS_URL+Epst02Controller.CLASS_URL) @RequestMapping(name="우편통합", value=CLASS_URL+Epst02Controller.CLASS_URL)
class Epst02Controller extends cokr.xit.fims.epst.web.Epst02Controller { class Epst02Controller extends cokr.xit.fims.epst.web.Epst02Controller {

@ -130,65 +130,68 @@
<result property="createdBy" column="RGTR" /> <!-- 등록자 --> <result property="createdBy" column="RGTR" /> <!-- 등록자 -->
</resultMap> </resultMap>
<sql id="selectEpostRcptReg">SELECT CON_KEY <!-- 외부연계식별키 --> <sql id="selectEpostRcptReg">
, RCEPT_ID <!-- 접수우체국국기호 --> SELECT ERR.CON_KEY <!-- 외부연계식별키 -->
, DATA_CD <!-- 접수코드 --> , ERR.RCEPT_ID <!-- 접수우체국국기호 -->
, DIV_KB <!-- 취급구분 --> , ERR.DATA_CD <!-- 접수코드 -->
, DFPAYYN <!-- 결재방법 --> , ERR.DIV_KB <!-- 취급구분 -->
, RCPT_KB <!-- 내용문 유형 --> , ERR.DFPAYYN <!-- 결재방법 -->
, SEAL_CD <!-- 내용문 상세 종류 --> , ERR.RCPT_KB <!-- 내용문 유형 -->
, WORD_KB <!-- 내용문 종류 --> , ERR.SEAL_CD <!-- 내용문 상세 종류 -->
, MAIL_CNT <!-- 내용문 매수 --> , ERR.WORD_KB <!-- 내용문 종류 -->
, RECEV_CNT <!-- 수취인 수 --> , ERR.MAIL_CNT <!-- 내용문 매수 -->
, ENV_CD <!-- 봉투 종류 --> , ERR.RECEV_CNT <!-- 수취인 수 -->
, COLOR_YN <!-- 칼라우편물 --> , ERR.ENV_CD <!-- 봉투 종류 -->
, MM_YN <!-- 메일머지 플래그 --> , ERR.COLOR_YN <!-- 칼라우편물 -->
, FLEX_CD <!-- 이면구분 --> , ERR.MM_YN <!-- 메일머지 플래그 -->
, DM_CNT <!-- 동봉물 개수 --> , ERR.FLEX_CD <!-- 이면구분 -->
, SB_FG <!-- 반송불필요 여부 --> , ERR.DM_CNT <!-- 동봉물 개수 -->
, APVL_NB <!-- 승인번호 --> , ERR.SB_FG <!-- 반송불필요 여부 -->
, SEND_DATE <!-- 신청 일자 --> , ERR.APVL_NB <!-- 승인번호 -->
, SEND_TIME <!-- 전송 시간 --> , ERR.SEND_DATE <!-- 신청 일자 -->
, RELORSECT_CD <!-- 연계기관결제부서코드 --> , ERR.SEND_TIME <!-- 전송 시간 -->
, RECEV_SENDER_ORG_CODE <!-- 발송기관코드 --> , ERR.RELORSECT_CD <!-- 연계기관결제부서코드 -->
, RECEV_SENDER_NM <!-- 발송인명 --> , ERR.RECEV_SENDER_ORG_CODE <!-- 발송기관코드 -->
, RECEV_SENDER_ZIPCODE <!-- 발송인 우편번호 --> , ERR.RECEV_SENDER_NM <!-- 발송인명 -->
, RECEV_SENDER_ADDR <!-- 주소 --> , ERR.RECEV_SENDER_ZIPCODE <!-- 발송인 우편번호 -->
, RECEV_SENDER_DETAILADDR <!-- 상세주소 --> , ERR.RECEV_SENDER_ADDR <!-- 주소 -->
, RECEV_SENDER_DEPART_TEL <!-- 부과부서 전화번호 --> , ERR.RECEV_SENDER_DETAILADDR <!-- 상세주소 -->
, RECEV_SENDER_DEPART_NM <!-- 부과부서 --> , ERR.RECEV_SENDER_DEPART_TEL <!-- 부과부서 전화번호 -->
, RECEV_DIV_CD <!-- 등기구분 --> , ERR.RECEV_SENDER_DEPART_NM <!-- 부과부서 -->
, RECEV_PRINT_DT <!-- 출력일자 --> , ERR.RECEV_DIV_CD <!-- 등기구분 -->
, RECEV_PRINT_YEAR <!-- 출력연도 --> , ERR.RECEV_PRINT_DT <!-- 출력일자 -->
, RECEV_PRINT_MONTH <!-- 출력월 --> , ERR.RECEV_PRINT_YEAR <!-- 출력연도 -->
, RECEV_PRINT_DAY <!-- 출력일 --> , ERR.RECEV_PRINT_MONTH <!-- 출력월 -->
, RECEV_SENDER_FAX <!-- 부과부서 팩스번호 --> , ERR.RECEV_PRINT_DAY <!-- 출력일 -->
, RECEV_SERDER_STAFF <!-- 부과부서 담당자 --> , ERR.RECEV_SENDER_FAX <!-- 부과부서 팩스번호 -->
, RECEV_SENDER_EMAIL <!-- 부과부서 이메일 --> , ERR.RECEV_SERDER_STAFF <!-- 부과부서 담당자 -->
, SNDNG_ID <!-- 발송 ID --> , ERR.RECEV_SENDER_EMAIL <!-- 부과부서 이메일 -->
, JOB_CD <!-- 작업 코드 --> , ERR.REG_VAR_DATA1 <!-- 추가 데이터1 -->
, POST_PROC_STT <!-- 우편 처리 상태 --> , ERR.REG_VAR_DATA2 <!-- 추가 데이터2 -->
, RCEPT_YMD <!-- 접수 일자 --> , ERR.REG_VAR_DATA3 <!-- 추가 데이터3 -->
, DEL_YN <!-- 삭제 여부 --> , ERR.REG_VAR_DATA4 <!-- 추가 데이터4 -->
, REG_DT <!-- 등록 일시 --> , ERR.REG_VAR_DATA5 <!-- 추가 데이터5 -->
, RGTR <!-- 등록자 --> , ERR.JOB_CD <!-- 작업 코드 -->
, DEL_DT <!-- 삭제 일시 --> , ERR.POST_PROC_STT <!-- 우편 처리 상태 -->
, DLTR <!-- 삭제자 --> , ERR.SNDNG_ID <!-- 발송 ID -->
, REG_VAR_DATA1 <!-- 추가 데이터1 --> , ERR.RCEPT_YMD <!-- 접수 일자 -->
, REG_VAR_DATA2 <!-- 추가 데이터2 --> , ERR.DEL_YN <!-- 삭제 여부 -->
, REG_VAR_DATA3 <!-- 추가 데이터3 --> , ERR.REG_DT <!-- 등록 일시 -->
, REG_VAR_DATA4 <!-- 추가 데이터4 --> , ERR.RGTR <!-- 등록자 -->
, REG_VAR_DATA5 <!-- 추가 데이터5 --> , ERR.DEL_DT <!-- 삭제 일시 -->
FROM TB_EPOST_RCPT_REG</sql> , ERR.DLTR <!-- 삭제자 -->
FROM TB_EPOST_RCPT_REG ERR
</sql>
<select id="selectEpostRcptRegList" parameterType="map" resultType="dataobject">/* 전자우편 접수 등록 목록 조회(epostRcptRegMapper.selectEpostRcptRegList) */ <select id="selectEpostRcptRegList" parameterType="map" resultType="dataobject">/* 전자우편 접수 등록 목록 조회(epostRcptRegMapper.selectEpostRcptRegList) */
<include refid="utility.paging-prefix" /> <include refid="utility.paging-prefix" />
<include refid="selectEpostRcptReg" /> <include refid="selectEpostRcptReg" />
<where></where> WHERE SGG_CD = #{sggCd}
<include refid="utility.orderBy" /> <include refid="utility.orderBy" />
<include refid="utility.paging-suffix" /></select> <include refid="utility.paging-suffix" />
</select>
<select id="selectEpostRcptRegs" parameterType="map" resultMap="epostRcptRegRow">/* 전자우편 접수 등록 객체 가져오기(epostRcptRegMapper.selectEpostRcptRegs) */ <select id="selectEpostRcptRegs" parameterType="map" resultType="dataobject">/* 전자우편 접수 등록 객체 가져오기(epostRcptRegMapper.selectEpostRcptRegs) */
<include refid="selectEpostRcptReg" /> <include refid="selectEpostRcptReg" />
<where></where> <where></where>
<include refid="utility.orderBy" /></select> <include refid="utility.orderBy" /></select>

@ -0,0 +1,518 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%>
<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%>
<!-- inner page html -->
<div class="content-wrapper">
<!-- Content -->
<div class="container-xxl flex-grow-1 px-0">
<c:set var="prefixName" scope="request">우편통합 안내문 관리</c:set>
<!-- Page Body -->
<div class="card">
<div class="wrapper-list">
<div>
<!-- 상단 버튼 -->
<div class="container-page-btn">
<button type="button" class="btn btn-outline-dark w-px-120" id="btnReset--${pageName}" title="초기화" onclick="fnResetAndChangeBiz${pageName}();">
초기화
</button>
<span class="container-window-btn-right">
<button type="button" class="btn btn-search w-px-120" id="btnSearch--${pageName}" title="검색" onclick="fnSearchList${pageName}();">
검색
</button>
<button type="button" class="btn btn-excel w-px-120" id="btnExcel--${pageName}" title="엑셀" onclick="fnExcel${pageName}();">
엑셀
</button>
</span>
</div>
<!-- / 상단 버튼 -->
<!-- 검색 조건 영역 -->
<form id="frmSearch--${pageName}" name="frmSearch">
<!-- hidden -->
<input type="hidden" id="sggCd--${pageName}" name="sggCd" data-map="SGG_CD" />
<!-- 메인 조건 -->
<div class="container-search">
<div class="row g-1">
<!-- 업무구분 -->
<div class="col-12">
<label class="form-label fw-bold form-search-title text-end">업무구분</label>
<span class="form-search-linebox">
<c:forEach items="${FIM054List}" var="item">
<label>
<input type="radio" class="form-check-input" name="taskSeCd" alt="업무구분"
value="${item.code}" onchange="fnResetAndChangeBiz${pageName}(this.value);">
${item.value}
</label>
</c:forEach>
</span>
</div>
<!-- -->
<div class="col-6">
</div>
<!-- 동적검색 -->
<div class="col-6">
<!-- 상세 검색조건 버튼 -->
<span class="flr">
<button type="button" class="btn btn-open-detail" data-bs-toggle="collapse" data-bs-target="#searchDetail--${pageName}">
<i class="bx bx-chevron-down"></i>
상세검색
</button>
</span>
</div>
</div>
</div> <!-- / 메인 조건 -->
<!-- 상세 조건 -->
<div id="searchDetail--${pageName}" class="container-search container-search-detail collapse">
<div class="row g-1">
<!-- 등록일자, 수정일자 -->
<div class="col-6">
<select class="form-select text-center" id="schDetailRegDtOpt--${pageName}" name="schDetailRegDtOpt">
<option value="regDt">등록일자</option>
<option value="mdfcnDt">수정일자</option>
</select>
<span class="form-search-linebox">
<input type="text" class="form-control form-date" id="schDetailRegDtFrom--${pageName}" name="schDetailRegDtFrom"
data-fmt-type="day" autocomplete="off" title="시작 날짜 선택" />
<button type="button" class="bx bx-sm bx-calendar bg-white"></button>
~
<input type="text" class="form-control form-date" id="schDetailRegDtTo--${pageName}" name="schDetailRegDtTo"
data-fmt-type="day" autocomplete="off" title="종료 날짜 선택">
<button type="button" class="bx bx-sm bx-calendar bg-white"></button>
</span>
</div>
<!-- 등록자명, 수정자명 -->
<div class="col-6">
<select class="form-select text-center" id="schDetailRgtrOpt--${pageName}" name="schDetailRgtrOpt">
<option value="rgtr">등록자</option>
<option value="mdfr">수정자</option>
</select>
<input type="text" class="form-control w-px-160" id="schDetailRgtrNm--${pageName}" name="schDetailRgtrNm" autocomplete="off" />
<button type="button" class="btn btn-sm btn-outline-dark" id="btnUser--${pageName}" title="사용자 검색" onclick="fnUser${pageName}();">
검색
</button>
</div>
</div>
</div>
<!-- / 상세 조건 -->
</form>
<!-- / 검색 조건 영역 -->
<!-- 업무 버튼 및 건수 표시 -->
<div>
<span class="container-page-btn">
<!-- 건수, 페이지 표시 -->
<div class="d-flex flex-row justify-content-between">
<label class="dataTables_info" id="paging--${pageName}PagingInfo" role="status" aria-live="polite"></label>
<ul class="pagination pagination-primary" id="paging--${pageName}">
</ul>
</div>
<span class="container-window-btn-right">
<!-- 업무 버튼 -->
<button type="button" class="btn btn-primary w-px-120" id="btnCreate--${pageName}" title="안내문 등록" onclick="fnCreate${pageName}();">
안내문 등록
</button>
<button type="button" class="btn btn-primary w-px-120" id="btnUpdate--${pageName}" title="안내문 수정" onclick="fnUpdate${pageName}();">
안내문 수정
</button>
<button type="button" class="btn btn-primary w-px-120" id="btnRemove--${pageName}" title="안내문 삭제" onclick="fnRemove${pageName}();">
안내문 삭제
</button>
</span>
</span>
</div>
<!-- / 업무 버튼 및 건수 표시 -->
<!-- DataTables(그리드) -->
<div class="card-datatable text-nowrap">
<div class="dataTables_wrapper dt-bootstrap5 no-footer" id="DataTables_Table_0_wrapper--${pageName}">
<div class="table-responsive" id="table-responsive--${pageName}" style="overflow-x:scroll; height:480px; overflow-y:scroll;" >
<table class="table-layout-fixed dataTable datatables-ajax table table-bordered no-footer" id="DataTables_Table_0--${pageName}" aria-describedby="DataTables_Table_0_info">
<thead class="sticky-thead">
<tr id="theadTr--${pageName}"
data-by="by--${pageName}" data-by-output="byOutput--${pageName}" data-main-option="mainOption--${pageName}" data-sub-option="subOption--${pageName}">
<th class="cmn" style="width: 72px;">NO.</th>
<th class="cmn" style="width: 56px;">
<input type="checkbox" class="form-check-input" onchange="${pageName}Control.select(this.checked);">
</th>
<th class="cmn" style="width: 160px;">업무구분</th>
<th class="cmn" style="width: 120px;">발송구분</th>
<th class="cmn" style="width: 100px;">사용여부</th>
<th class="cmn" style="width: 180px;">최종사용일시</th>
<th class="cmn" style="width: 300px;">제목</th>
<th class="cmn" style="width: 180px;">등록일시</th>
<th class="cmn" style="width: 140px;">등록사용자</th>
<th class="cmn" style="width: 180px;">수정일시</th>
<th class="cmn" style="width: 140px;">수정사용자</th>
<th class="cmn dummy-th"></th>
</tr>
</thead>
<tbody id="tbody--${pageName}">
</tbody>
<template id="${infoPrefix}Row--${pageName}">
<tr data-key="{GDCC_ID}">
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{ROW_NUM}</td>
<td class="cmn text-center">
<input type="checkbox" class="form-check-input" value="{GDCC_ID}" onchange="${pageName}Control.select('{GDCC_ID}', this.checked);">
</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{TASK_SE_NM}</td>
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{SNDNG_SE_NM}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{USE_YN_NM}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{LAST_USE_DT}</td>
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{TTL_NM}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{REG_DT}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{RGTR_NM}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{MDFCN_DT}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{MDFR_NM}</td>
<td class="cmn dummy-td"></td>
</tr>
</template>
<template id="${infoPrefix}NotFound--${pageName}">
<tr class="odd">
<td valign="top" colspan="10" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td>
</tr>
</template>
</table>
</div>
</div>
</div>
<!-- / DataTables(그리드) -->
</div>
</div> <!-- <div class="wrapper-list"> -->
</div> <!-- <div class="card"> -->
</div> <!-- <div class="container-xxl flex-grow-1 px-0"> -->
<jsp:include page="/WEB-INF/jsp/include/bottom.jsp" />
<div class="content-backdrop fade"></div>
</div>
<!-- / inner page html <div class="content-wrapper"> -->
<script>
/**************************************************************************
* Global Variable
**************************************************************************/
// URL
var ${pageName}PrefixUrl = "/epst/epst02";
// FormFields
var ${pageName}Fields = new FimsFormFields("#frmSearch--${pageName}");
// 시군구 코드(SGG_CD)
var ${pageName}sggCd = "${sggCd}";
/**************************************************************************
* DatasetControl
**************************************************************************/
var ${pageName}Control = new DatasetControl({
prefix : "epostGdcc"
, prefixName : "안내문 관리"
, infoSize : "md"
, keymapper : info => info ? info.GDCC_ID : ""
, dataGetter : obj => obj.epostGdccList
, appendData : true
, tableRenderComplete : false // dataTables 에 자료 추가 완료 여부
, formats : {
LAST_USE_DT : datetimeFormat
, REG_DT : datetimeFormat
, MDFCN_DT : datetimeFormat
}
});
/**************************************************************************
* DatasetControl 이벤트
**************************************************************************/
// Dataset 변경 이벤트
${pageName}Control.onDatasetChange = obj => {
renderList${pageName}();
$("#paging--${pageName}").setPagingInfo({
list : ${pageName}Control.dataset
, prefix : "paging--${pageName}"
, start : obj.${infoPrefix}Start
, totalSize : obj.${infoPrefix}Total
, fetchSize : obj.${infoPrefix}Fetch
, func : "${pageName}Control.load({index})"
});
${pageName}Control.tableRenderComplete = true; // dataTables 에 자료 추가 완료
};
// 현재 선택 자료 변경 이벤트
${pageName}Control.onCurrentChange = item => {
if (!item) return;
let key = item.data.GDCC_ID;
$("#tbody--${pageName}").setCurrentRow(key);
};
// 선택(체크) 변경 이벤트
${pageName}Control.onSelectionChange = selected => {
let ${infoPrefix}List = ${pageName}Control.dataset;
let keys = selected.map(e => ${infoPrefix}List.getKey(e));
$("#tbody--${pageName} input[type='checkbox']").each(function() {
let checkbox = $(this);
checkbox.prop("checked", keys.includes(checkbox.val()));
});
$("#btnRemove--${pageName}").prop("disabled", keys.length < 1);
};
// 전자우편 안내문 dialog
${pageName}Control.getInfo = (callPurpose, gdccId) => {
//
if (typeof callPurpose == "undefined" || callPurpose == null || callPurpose == "") {
callPurpose = "view";
}
let params = {
callPurpose : callPurpose
, sggCd : $("#sggCd--${pageName}").val() // 시군구 코드
, taskSeCd : $("input[name=taskSeCd]:checked").val() // 업무 구분 코드
};
if (callPurpose == "view" || callPurpose == "update") {
// ID가 없다면.. 종료
if (typeof gdccId == "undefined" || gdccId == null || gdccId == "") return;
params.gdccId = gdccId; // 안내문 ID
}
ajax.get({
url : ${pageName}Control.urls.getInfo
, data : params || {}
, success : resp => {
dialog.open({
id : "epostGdccDialog"
, title : "전자우편 안내문 정보"
, content : resp
, size : ${pageName}Control.infoSize
, init : () => { }
, onClose : () => { ${pageName}Control.load(${pageName}Control.query.pageNum); } // callback
});
}
});
}
// 삭제 callback
${pageName}Control.onRemove = (selected, resp) => {
let btnTitle = $("#btnRemove--${pageName}").attr("title");
let showMessage = resp.retMessage.replace(/[S]|[F]/g, btnTitle);
dialog.alert(showMessage);
if (resp.saved) {
${pageName}Control._load();
}
}
// 삭제
${pageName}Control.remove = (params) => {
let selected = ${pageName}Control.dataset.getKeys("selected");
if (selected.length < 1) return;
if (!params) {
params = {};
params["GdccIDs"] = selected.join(","); // params[${pageName}Control.prefixed("IDs")] = selected.join(",");
}
ajax.post({
url : ${pageName}Control.urls.remove
, data : params || {}
, success : resp => ${pageName}Control.onRemove(selected, resp)
});
}
/**************************************************************************
*
**************************************************************************/
// DataTables에 click, dbclick 이벤트
renderList${pageName} = () => {
let ${infoPrefix}List = ${pageName}Control.dataset;
let empty = ${infoPrefix}List.empty;
let trs = empty ?
[document.getElementById("${infoPrefix}NotFound--${pageName}").innerHTML] : <%-- from template#${infoPrefix}NotFound --%>
${infoPrefix}List.inStrings(
document.getElementById("${infoPrefix}Row--${pageName}").innerHTML, <%-- from template#${infoPrefix}Row --%>
(str, dataItem) => str
.replace(/{onclick}/gi, "${pageName}Control.setCurrent('" + dataItem.getValue("GDCC_ID") + "');")
.replace(/{ondblclick}/gi, "${pageName}Control.getInfo('update', '" + dataItem.getValue("GDCC_ID") + "');")
);
$("#tbody--${pageName}").html(trs.join());
$("th input[type='checkbox']").prop("checked", false);
//보안모드
fn_securityModeToggle($("#securityMode--top").is(":checked"));
}
/**************************************************************************
* 초기 셋팅
**************************************************************************/
// 이벤트
setEvent${pageName} = () => {
// form-date 항목에서 키보드로 입력시 날짜 포맷팅 적용
$("#frmSearch--${pageName}").find(".form-date").each(function() {
$(this).on("input", function() {
let value = this.value.replaceAll("-", "");
if (value.length > 7) {
this.value = value.substring(0, 4) + "-" + value.substring(4, 6) + "-" + value.substring(6);
} else if(value.length > 5) {
this.value = value.substring(0, 4) + "-" + value.substring(4);
}
});
});
// DataTables width 변경 조정 업무별 그리드가 존재 한다면.. crdn06010-main.jsp 참고
$("#DataTables_Table_0--${pageName}").find("th").resizable( {handles : "e"} );
// DataTables 스크롤 이벤트
$("#table-responsive--${pageName}").scroll(function() {
let el = $(this);
if (el.scrollTop() == 0) {
return;
}
if (!${pageName}Control.tableRenderComplete) {
return;
}
let itemsCnt = ${pageName}Control.dataset._items.length;
let totCnt = ${pageName}Control.dataset.getValue("TOT_CNT"); // let totCnt = ${pageName}Control.dataset.getCurrent("item").data.TOT_CNT;
if (itemsCnt >= totCnt) {
return;
}
if ((el[0].scrollHeight - el.scrollTop() + VERTICAL_SCROLL_HEIGHT) <= el.outerHeight()) {
${pageName}Control.tableRenderComplete = false; // dataTables 에 자료 추가 완료
${pageName}Control.load(${pageName}Control.query.pageNum + 1);
}
});
}
// 초기 기본 설정
initForm${pageName} = (taskSeCd) => {
// 화면 초기화
$("#frmSearch--${pageName}")[0].reset();
// 시군구 코드
$("#sggCd--${pageName}").val(${pageName}sggCd);
// 업무 구분 코드
$("#frmSearch--${pageName} input[name='taskSeCd'][value='" + taskSeCd + "']").prop("checked", true);
// 최고 관리자 경우 업무구분을 선택할 수 있도록 하자.
$("#frmSearch--${pageName} input[name='taskSeCd']").each(function(i) {
$(this).prop("disabled", "true");
});
// 달력 초기화
initDatepicker("frmSearch--${pageName}");
// dataset 초기화
${pageName}Control.dataset.clear();
}
// URL 설정
setURL${pageName} = (taskSeCd) => {
${pageName}Control.urls.load = wctx.url("/" + taskSeCd + ${pageName}PrefixUrl + "/010/list.do"); // 조회
${pageName}Control.urls.remove = wctx.url("/" + taskSeCd + ${pageName}PrefixUrl + "/010/remove.do"); // 삭제
${pageName}Control.urls.getInfo = wctx.url("/" + taskSeCd + ${pageName}PrefixUrl + "/020/info.do"); // 정보
}
// 기본 데이터 설정
setForm${pageName} = () => {
}
/**************************************************************************
* 버튼 clickEvent
**************************************************************************/
// 업무 구분 변경
fnResetAndChangeBiz${pageName} = (taskSeCd) => {
// 업무 구분 코드
if (typeof taskSeCd == "undefined" || taskSeCd == null || taskSeCd == "") {
taskSeCd = $("#layout-navbar input[name='taskSeCd']:checked").val();
}
// 초기 기본 설정
initForm${pageName}(taskSeCd);
// URL 설정
setURL${pageName}(taskSeCd);
// 기본 데이터 설정
setForm${pageName}();
}
// 검색 버튼 이벤트
fnSearchList${pageName} = () => {
// 검색조건
${pageName}Control.query = ${pageName}Fields.get();
${pageName}Control.query.fetchSize = FETCH_XS; // 한번에 조회되는 자료 건수 FETCH_XS = 30
${pageName}Control.query.useYN = "Y"; // 사용 여부 - Y
${pageName}Control.load();
}
// 엑셀 버튼 이벤트
fnExcel${pageName} = () => {
}
// 사용자 조회 버튼 이벤트
fnUser${pageName} = () => {
}
// 전자우편 안내문 등록 버튼 이벤트
fnCreate${pageName} = () => {
${pageName}Control.getInfo("create");
}
// 전자우편 안내문 수정 버튼 이벤트
fnUpdate${pageName} = () => {
let gdccId = ${pageName}Control.dataset.getValue("GDCC_ID");
// 전자우편 안내문 ID 가 없다면.. return
if (typeof gdccId == "undefined" || gdccId == null || gdccId == "") return;
${pageName}Control.getInfo("update", gdccId);
}
// 전자우편 안내문 삭제 버튼 이벤트
fnRemove${pageName} = () => {
dialog.alert({
content : "선택한 전자우편 안내문 정보를 삭제하시겠습니까?"
, onOK : () => {
${pageName}Control.remove();
}
});
}
/**************************************************************************
* script 진입
**************************************************************************/
$(document).ready(function() {
// 이벤트 설정
setEvent${pageName}();
// 보안모드
fn_securityModeToggle($("#securityMode--top").is(":checked"));
// 업무 구분 설정
let defaultBizValue = $("#layout-navbar input[name='taskSeCd']:checked").val();
$("#frmSearch--${pageName} input[name='taskSeCd'][value='" + defaultBizValue + "']").prop("checked", true);
// 화면 초기 설정 및 업무 구분 변경
fnResetAndChangeBiz${pageName}(defaultBizValue);
});
</script>

@ -0,0 +1,181 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%>
<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%>
<!-- inner page html -->
<div class="content-wrapper">
<!-- Content -->
<div class="container flex-grow-1 px-0">
<c:set var="prefixName" scope="request">우편통합 안내문 정보</c:set>
<!-- Page Body -->
<div class="card">
<!-- 입력 영역 -->
<form id="frmEdit--${pageName}" name="frmEdit">
<!-- hidden -->
<input type="hidden" id="sggCd--${pageName}" name="sggCd" data-map="SGG_CD" />
<input type="hidden" id="taskSeCd--${pageName}" name="taskSeCd" data-map="TASK_SE_CD" />
<input type="hidden" id="gdccId--${pageName}" name="gdccId" data-map="GDCC_ID" />
<div class="row g-1">
<!-- 발송 구분 코드 -->
<div class="col-md-12">
<label for="sndngSeCd--${pageName}" class="w-px-100 bg-lighter pe-2 col-form-label text-sm-end required">발송구분</label>
<select class="form-select" id="sndngSeCd--${pageName}" name="sndngSeCd" data-map="SNDNG_SE_CD" required>
<option value="">선택하세요</option>
<c:forEach items="${FIM047List}" var="item">
<option value="${item.code}">${item.value}</option>
</c:forEach>
</select>
</div>
<!-- 제목 명 -->
<div class="col-md-12">
<label for="ttlNm--${pageName}" class="w-px-100 bg-lighter pe-2 col-form-label text-sm-end required">제목</label>
<input type="text" class="form-control w-75" id="ttlNm--${pageName}" name="ttlNm" data-map="TTL_NM" required autocomplete="off" />
</div>
<!-- 문구 내용 -->
<div class="col-md-12">
<label for="wordsCn--${pageName}" class="w-px-100 bg-lighter pe-2 col-form-label text-sm-end">문구내용</label>
</div>
<div class="col-md-12">
<textarea class="form-control w-100" id="wordsCn--${pageName}" name="wordsCn" data-map="WORDS_CN" rows="15" data-maxlengthb="4000" autocomplete="off"></textarea>
</div>
</div>
</form> <!-- /입력 영역 -->
</div> <!-- <div class="card"> -->
<!-- 업무 버튼 표시 -->
<div>
<span class="container-page-btn">
<span class="container-window-btn-right">
<!-- 업무 버튼 -->
<button type="button" class="btn btn-primary w-px-80" id="btnSave--${pageName}" title="저장" onclick="fnSave${pageName}()">저장</button>
</span>
</span>
</div>
<!-- / 업무 버튼 표시 -->
</div> <!-- / Content <div class="container flex-grow-1 px-0"> -->
</div> <!-- / inner page html <div class="content-wrapper"> -->
<script>
/**************************************************************************
* Global Variable
**************************************************************************/
// URL
var ${pageName}PrefixUrl = "/epst/epst02";
// FormFields
var ${pageName}Fields = new FimsFormFields("#frmEdit--${pageName}");
// infoDialog 호출 용도(view 조회(편집불가), create 등록, update 수정)
var ${pageName}CallPurpose = "${callPurpose}";
/**************************************************************************
* DatasetControl
**************************************************************************/
var ${pageName}Control = new DatasetControl({
prefix : "epostGdcc"
, prefixName : "안내문 정보"
, keymapper : info => info ? info.GDCC_ID : ""
, dataGetter : obj => obj.epostGdccInfo
});
${pageName}Control.onCurrentChange = item => {
if (!item) return;
// Dataset 셋팅
${pageName}Fields.set(item);
// 업무구분에 따른 url 변경
${pageName}Control.urls.create = wctx.url(item.data.TASK_SE_CD + ${pageName}PrefixUrl + "/020/create.do");
${pageName}Control.urls.update = wctx.url(item.data.TASK_SE_CD + ${pageName}PrefixUrl + "/020/update.do");
}
/**************************************************************************
* DatasetControl 이벤트
**************************************************************************/
// 저장 callback
${pageName}Control.onSave = (resp) => {
let dialogTitle = $("#" + ${pageName}Control.prefix + "Dialog").find("h5.modal-title").html();
let showMessage = resp.retMessage.replace(/[S]|[F]/g, dialogTitle);
dialog.alert(showMessage);
if (resp.saved) {
dialog.close(${pageName}Control.prefix + "Dialog");
}
}
// 저장
${pageName}Control.save = (info) => {
if (!info) return;
let create = (${pageName}CallPurpose == "create"); // if 문
ajax.post({
url : !create ? ${pageName}Control.urls.update : ${pageName}Control.urls.create
, data : info
, success : resp => ${pageName}Control.onSave(resp)
});
}
/**************************************************************************
* 초기 셋팅
**************************************************************************/
// 이벤트 설정
setEvent${pageName} = () => {
}
// 초기 기본 설정
initForm${pageName} = () => {
if (${pageName}CallPurpose == "view") {
$("#sndngSeCd--${pageName}").attr("disabled", true);
$("#ttlNm--${pageName}").attr("disabled", true);
$("#wordsCn--${pageName}").attr("disabled", true);
$("#btnSave--${pageName}").attr("disabled", true);
} else {
$("#sndngSeCd--${pageName}").attr("disabled", false);
$("#ttlNm--${pageName}").attr("disabled", false);
$("#wordsCn--${pageName}").attr("disabled", false);
$("#btnSave--${pageName}").attr("disabled", false);
}
}
// 기본 데이터 설정
setForm${pageName} = () => {
}
/**************************************************************************
* function
**************************************************************************/
// 저장
fnSave${pageName} = () => {
// validate 확인
if (!customValidate($("#frmEdit--${pageName}").find("input, select, textarea"))) return;
dialog.alert({
content : "현재 " + ${pageName}Control.prefixName + " 정보를 저장하시겠습니까?"
, onOK : () => {
${pageName}Control.save(${pageName}Fields.get());
}
});
}
/**************************************************************************
* script 진입
**************************************************************************/
$(document).ready(function() {
// 이벤트 설정
setEvent${pageName}();
// 화면 초기화
initForm${pageName}();
// Dataset 셋팅 - 단건일 경우 setData
${pageName}Control.setData([${epostGdccInfo}]);
// 화면 데이터 셋팅
setForm${pageName}();
});
</script>

@ -421,9 +421,9 @@
// URL 설정 // URL 설정
setURL${pageName} = (taskSeCd) => { setURL${pageName} = (taskSeCd) => {
${pageName}Control.urls.load = wctx.url("/" + taskSeCd + ${pageName}PrefixUrl + "/010/list.do"); // 조회 ${pageName}Control.urls.load = wctx.url(taskSeCd + ${pageName}PrefixUrl + "/010/list.do"); // 조회
${pageName}Control.urls.remove = wctx.url("/" + taskSeCd + ${pageName}PrefixUrl + "/010/remove.do"); // 삭제 ${pageName}Control.urls.remove = wctx.url(taskSeCd + ${pageName}PrefixUrl + "/010/remove.do"); // 삭제
${pageName}Control.urls.getInfo = wctx.url("/" + taskSeCd + ${pageName}PrefixUrl + "/020/info.do"); // 정보 ${pageName}Control.urls.getInfo = wctx.url(taskSeCd + ${pageName}PrefixUrl + "/020/info.do"); // 정보
} }
// 기본 데이터 설정 // 기본 데이터 설정

@ -127,12 +127,12 @@
// 초기 기본 설정 // 초기 기본 설정
initForm${pageName} = () => { initForm${pageName} = () => {
$("#sndngSeCd--${pageName}").attr("disabled", true); if (${pageName}CallPurpose == "view") {
$("#ttlNm--${pageName}").attr("disabled", true); $("#sndngSeCd--${pageName}").attr("disabled", true);
$("#wordsCn--${pageName}").attr("disabled", true); $("#ttlNm--${pageName}").attr("disabled", true);
$("#btnSave--${pageName}").attr("disabled", true); $("#wordsCn--${pageName}").attr("disabled", true);
$("#btnSave--${pageName}").attr("disabled", true);
if (${pageName}CallPurpose != "view") { } else {
$("#sndngSeCd--${pageName}").attr("disabled", false); $("#sndngSeCd--${pageName}").attr("disabled", false);
$("#ttlNm--${pageName}").attr("disabled", false); $("#ttlNm--${pageName}").attr("disabled", false);
$("#wordsCn--${pageName}").attr("disabled", false); $("#wordsCn--${pageName}").attr("disabled", false);

@ -82,8 +82,8 @@
// 공통 코드 // 공통 코드
var FIM021 = new CommonCodes(${FIM021}, true); var FIM021 = new CommonCodes(${FIM021}, true);
var FIM022 = new CommonCodes(${FIM022}, true); var FIM022 = new CommonCodes(${FIM022}, true);
// 호출한 Page Name // 호출 용도
var openerPageName = "${openerPageName}"; var ${pageName}CallPurpose = "${callPurpose}";
/************************************************************************** /**************************************************************************
* DatasetControl * DatasetControl
@ -192,11 +192,21 @@
// 달력 초기화 // 달력 초기화
initDatepicker("frmEdit--${pageName}"); initDatepicker("frmEdit--${pageName}");
$("#levyExclYmd--${pageName}").datepicker("setDate", new Date()); $("#levyExclYmd--${pageName}").datepicker("setDate", new Date());
// 등록
if (${pageName}CallPurpose == "view") {
$("btnSave--${pageName}").attr("disabled", true);
} else {
$("btnSave--${pageName}").attr("disabled", false);
}
} }
// 화면 데이터 셋팅 // 화면 데이터 셋팅
setForm${pageName} = () => { setForm${pageName} = () => {
// 등록
if (${pageName}CallPurpose == "create") {
$("#levyExclYmd--${pageName}").datepicker("setDate", new Date());
}
} }
/************************************************************************** /**************************************************************************

Loading…
Cancel
Save