diff --git a/src/main/java/itn/com/uss/ion/bnr/pop/service/MainPopupLinkVO.java b/src/main/java/itn/com/uss/ion/bnr/pop/service/MainPopupLinkVO.java new file mode 100644 index 00000000..f565be7b --- /dev/null +++ b/src/main/java/itn/com/uss/ion/bnr/pop/service/MainPopupLinkVO.java @@ -0,0 +1,40 @@ +package itn.com.uss.ion.bnr.pop.service; + +import java.io.Serializable; + + +import itn.com.cmm.ComDefaultVO; +import lombok.Getter; +import lombok.Setter; + + +/** + * + * @author : 이호영 + * @fileName : MainPopupLinkVO.java + * @date : 2025.02.26 + * @description : + * =========================================================== + * DATE AUTHOR NOTE + * ----------------------------------------------------------- * + * 2025.02.26 이호영 최초 생성 + * + * + * + */ +@Getter +@Setter +public class MainPopupLinkVO extends ComDefaultVO implements Serializable { + + + /** + * @description : + */ + private static final long serialVersionUID = 1998370534684278351L; + + private String popId; // 메인존ID + private String mlink; // 링크 + private String coords; // 링크좌표 + private String popLinkId; // 링크좌표 + +} diff --git a/src/main/java/itn/com/uss/ion/bnr/pop/service/MainPopupManageService.java b/src/main/java/itn/com/uss/ion/bnr/pop/service/MainPopupManageService.java new file mode 100644 index 00000000..84dc744d --- /dev/null +++ b/src/main/java/itn/com/uss/ion/bnr/pop/service/MainPopupManageService.java @@ -0,0 +1,34 @@ +package itn.com.uss.ion.bnr.pop.service; + +import java.util.List; + +import itn.com.cmm.RestResponse; + +/** + * 개요 + * - 팝업창에 대한 Service Interface를 정의한다. + * + * 상세내용 + * - 팝업창에 대한 등록, 수정, 삭제, 조회, 반영확인 기능을 제공한다. + * - 팝업창의 조회기능은 목록조회, 상세조회, 팝업사용자 보기로 구분된다. + * @author 이창원 + * @version 1.0 + * @created 05-8-2009 오후 2:19:58 + */ +public interface MainPopupManageService { + + public List selectMainPopupList(MainPopupVO mainPopupVO) throws Exception; + + public int selectMainPopupCount(MainPopupVO mainPopupVO) throws Exception; + + public MainPopupVO selectMainPopupVO(String mazId) throws Exception; + + public List selectMainPopupListRolling(); + + public void deleteMainPopup(String id); + + public void resetMainPopupSort(MainPopupVO mainPopupVO); + + public RestResponse deleteMainPopupLink(MainPopupLinkVO mainPopupLinkVO); + +} \ No newline at end of file diff --git a/src/main/java/itn/com/uss/ion/bnr/pop/service/MainPopupVO.java b/src/main/java/itn/com/uss/ion/bnr/pop/service/MainPopupVO.java new file mode 100644 index 00000000..da1636d2 --- /dev/null +++ b/src/main/java/itn/com/uss/ion/bnr/pop/service/MainPopupVO.java @@ -0,0 +1,59 @@ +package itn.com.uss.ion.bnr.pop.service; + +import java.io.Serializable; +import java.util.List; + +import itn.com.cmm.ComDefaultVO; +import lombok.Getter; +import lombok.Setter; + +/** + * + * @author : 이호영 + * @fileName : MainPopupVO.java + * @date : 2025.02.26 + * @description : + * =========================================================== + * DATE AUTHOR NOTE + * ----------------------------------------------------------- * + * 2025.02.26 이호영 최초 생성 + * + * + * + */ +@Getter +@Setter +public class MainPopupVO extends ComDefaultVO implements Serializable { + + + /** + * @description : + */ + private static final long serialVersionUID = 1998370534684278351L; + + private String popId; // 메인존ID + private String content; // 대체택스트 + private String del; // 삭제여부 + private String mainzoneImageFile; // 이미지파일ID + private String mainzoneImage; // 이미지파일명 + private String regdt; // 등록일 + private String moddt; // 수정일 + private String popNm; // 메인팝업존키 + private String useYn; // 사용여부 + private String registerId; // 등록자 아이디 + private String deviceType; // 접근타입 + private String ntceBgnde; // 게시 시작일자 + private String ntceEndde; // 게시 종료일자 + + private String ntceBgndeHH; + private String ntceBgndeMM; + private String ntceEnddeHH; + private String ntceEnddeMM; + + private String devicetype; + + private List mainPopupLinkList; // 게시 종료일자 + + + +} diff --git a/src/main/java/itn/com/uss/ion/bnr/pop/service/impl/MainPopupManageDAO.java b/src/main/java/itn/com/uss/ion/bnr/pop/service/impl/MainPopupManageDAO.java new file mode 100644 index 00000000..18e05d83 --- /dev/null +++ b/src/main/java/itn/com/uss/ion/bnr/pop/service/impl/MainPopupManageDAO.java @@ -0,0 +1,62 @@ +package itn.com.uss.ion.bnr.pop.service.impl; +import java.util.List; + +import org.springframework.stereotype.Repository; + +import itn.com.cmm.service.impl.EgovComAbstractDAO; +import itn.com.uss.ion.bnr.pop.service.MainPopupLinkVO; +import itn.com.uss.ion.bnr.pop.service.MainPopupVO; + +/** + * 개요 + * - 팝업창에 대한 DAO를 정의한다. + * + * 상세내용 + * - 팝업창에 대한 등록, 수정, 삭제, 조회, 반영확인 기능을 제공한다. + * - 팝업창의 조회기능은 목록조회, 상세조회로, 사용자화면 보기로 구분된다. + * @author 이창원 + * @version 1.0 + * @created 05-8-2009 오후 2:21:04 + */ +@Repository("mainPopupManageDAO") +public class MainPopupManageDAO extends EgovComAbstractDAO { + + + /** + * 메인이미지 목록을 조회한다. + * @return 글 목록 + * @exception Exception + */ + public List selectMainPopupList(MainPopupVO mainPopupVO ) throws Exception{ + return list("mainPopup.selectMainPopupList", mainPopupVO); + } + + + public int selectMainPopupCount(MainPopupVO mainPopupVO) throws Exception{ + return (int)select("mainPopup.selectMainPopupCount", mainPopupVO); + } + + + public MainPopupVO selectMainPopupVO(String mazId) throws Exception{ + return (MainPopupVO)select("mainPopup.selectMainPopupVO", mazId); + } + + + public List selectMainPopupListRolling() { + return (List) list("mainPopup.selectMainPopupListRolling"); + } + + + public void deleteMainPopup(String popId) { + delete("mainPopup.deleteMainPopup", popId); + } + + + public void resetMainPopupSort(MainPopupVO mainPopupVO) { + update("mainPopup.resetMainPopupSort", mainPopupVO); + } + + public void deleteMainPopupLinkInfo(MainPopupLinkVO mainPopupLinkVO) { + delete("mainPopup.deleteMainPopupLinkInfo", mainPopupLinkVO); + } +} \ No newline at end of file diff --git a/src/main/java/itn/com/uss/ion/bnr/pop/service/impl/MainPopupManageServiceImpl.java b/src/main/java/itn/com/uss/ion/bnr/pop/service/impl/MainPopupManageServiceImpl.java new file mode 100644 index 00000000..8e0a49ab --- /dev/null +++ b/src/main/java/itn/com/uss/ion/bnr/pop/service/impl/MainPopupManageServiceImpl.java @@ -0,0 +1,89 @@ +package itn.com.uss.ion.bnr.pop.service.impl; + +import java.util.List; + +import javax.annotation.Resource; + +import org.springframework.http.HttpStatus; +import org.springframework.stereotype.Service; + +import egovframework.rte.fdl.cmmn.EgovAbstractServiceImpl; +import egovframework.rte.fdl.idgnr.EgovIdGnrService; +import itn.com.cmm.RestResponse; +import itn.com.uss.ion.bnr.pop.service.MainPopupLinkVO; +import itn.com.uss.ion.bnr.pop.service.MainPopupManageService; +import itn.com.uss.ion.bnr.pop.service.MainPopupVO; +import itn.com.uss.ion.pwm.service.impl.PopupManageDAO; + +/** + * 개요 + * - 팝업창에 대한 ServiceImpl을 정의한다. + * + * 상세내용 + * - 팝업창에 대한 등록, 수정, 삭제, 조회, 반영확인 기능을 제공한다. + * - 팝업창의 조회기능은 목록조회, 상세조회로, 사용자화면 보기로 구분된다. + * @author 이창원 + * @version 1.0 + * @created 05-8-2009 오후 2:19:58 + */ + +@Service("mainPopupManageService") +public class MainPopupManageServiceImpl extends EgovAbstractServiceImpl implements MainPopupManageService { + + @Resource(name = "mainPopupManageDAO") + public MainPopupManageDAO dao; + + @Resource(name = "popupManageDAO") + public PopupManageDAO popupDao; + + @Resource(name = "egovPopupManageIdGnrService") + private EgovIdGnrService idgenService; + + @Override + public List selectMainPopupList(MainPopupVO mainPopupVO) throws Exception { + return dao.selectMainPopupList(mainPopupVO); + } + + @Override + public int selectMainPopupCount(MainPopupVO mainPopupVO) throws Exception { + return dao.selectMainPopupCount(mainPopupVO); + } + + + @Override + public MainPopupVO selectMainPopupVO(String mazId) throws Exception { + MainPopupVO resultVO = dao.selectMainPopupVO(mazId); + if (resultVO == null) + throw processException("info.nodata.msg"); + return resultVO; + } + + @Override + public List selectMainPopupListRolling() { + return dao.selectMainPopupListRolling(); + } + + @Override + public void deleteMainPopup(String id) { + popupDao.deleteMainPopupLinkInfo(id); + dao.deleteMainPopup(id); + } + + @Override + public void resetMainPopupSort(MainPopupVO mainPopupVO) { + dao.resetMainPopupSort(mainPopupVO); + + } + + @Override + public RestResponse deleteMainPopupLink(MainPopupLinkVO mainPopupLinkVO) { + dao.deleteMainPopupLinkInfo(mainPopupLinkVO); + + return RestResponse.builder() + .status(HttpStatus.OK) // 200, Series.SUCCESSFUL, "OK" + .msg("삭제 되었습니다.") + .build(); + + } + +} \ No newline at end of file diff --git a/src/main/java/itn/com/uss/ion/bnr/pop/web/MainPopupController.java b/src/main/java/itn/com/uss/ion/bnr/pop/web/MainPopupController.java new file mode 100644 index 00000000..b774f45d --- /dev/null +++ b/src/main/java/itn/com/uss/ion/bnr/pop/web/MainPopupController.java @@ -0,0 +1,343 @@ +package itn.com.uss.ion.bnr.pop.web; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpSession; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.servlet.mvc.support.RedirectAttributes; +import org.springmodules.validation.commons.DefaultBeanValidator; + +import egovframework.rte.fdl.idgnr.EgovIdGnrService; +import egovframework.rte.fdl.property.EgovPropertyService; +import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper; +import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo; +import itn.com.cmm.ComDefaultCodeVO; +import itn.com.cmm.EgovMessageSource; +import itn.com.cmm.LoginVO; +import itn.com.cmm.RestResponse; +import itn.com.cmm.service.EgovCmmUseService; +import itn.com.cmm.service.EgovFileMngService; +import itn.com.cmm.service.EgovFileMngUtil; +import itn.com.cmm.service.FileVO; +import itn.com.cmm.util.RedirectUrlMaker; +import itn.com.uss.ion.bnr.pop.service.MainPopupLinkVO; +import itn.com.uss.ion.bnr.pop.service.MainPopupManageService; +import itn.com.uss.ion.bnr.pop.service.MainPopupVO; +import itn.com.uss.ion.bnr.sub.service.SubMainZoneManageService; +import itn.let.sym.site.service.EgovSiteManagerService; + +/** + * 개요 + * - 팝업창에 대한 Controller를 정의한다. + * + * 상세내용 + * - 팝업창에 대한 등록, 수정, 삭제, 조회, 반영확인 기능을 제공한다. + * - 팝업창의 조회기능은 목록조회, 상세조회로, 사용자 화면 보기로 구분된다. + * @author 이창원 + * @version 1.0 + * @created 05-8-2009 오후 2:19:57 + *
+  * << 개정이력(Modification Information) >>
+  *
+  *   수정일      수정자           수정내용
+  *  -------    --------    ---------------------------
+  *   2025.02.24  이호영          최초 생성
+  *
+  * 
+ */ + +@Controller +public class MainPopupController { + + private static final Logger LOGGER = LoggerFactory.getLogger(MainPopupController.class); + + @Autowired + private DefaultBeanValidator beanValidator; + + /** EgovMessageSource */ + @Resource(name = "egovMessageSource") + EgovMessageSource egovMessageSource; + + /** EgovPropertyService */ + @Resource(name = "propertiesService") + protected EgovPropertyService propertiesService; + + /** EgovPopupManageService */ + @Resource(name = "subMainZoneManageService") + private SubMainZoneManageService subMainZoneManageService; + + @Resource(name = "mainPopupManageService") + private MainPopupManageService mainPopupManageService; + + /** cmmUseService */ + @Resource(name = "EgovCmmUseService") + private EgovCmmUseService cmmUseService; + + @Resource(name="EgovFileMngUtil") + private EgovFileMngUtil fileUtil; + + @Resource(name="EgovFileMngService") + private EgovFileMngService fileMngService; + + @Resource(name = "egovPopupZoneIdGnrService") + private EgovIdGnrService idgenService; + +// @Resource(name = "egovMainZoneIdGnrService") +// private EgovIdGnrService idgenServiceMain; + + @Resource(name = "egovSubMainZoneIdGnrService") + private EgovIdGnrService idgenServiceSubMain; + + @Resource(name = "egovSiteManagerService") + EgovSiteManagerService egovSiteManagerService; + + @Resource(name = "EgovFileMngService") + private EgovFileMngService fileService; + + + + + /*메인이미지 관리*/ +// @RequestMapping(value="/uss/ion/bnr/subMainZoneList.do") + @RequestMapping(value="/uss/ion/bnr/pop/mainPopupList.do") + public String selectMainzoneList(ModelMap model , MainPopupVO mainPopupVO , HttpSession session ) throws Exception { + LoginVO loginVO = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser(); + + + if(mainPopupVO.getPageUnit()% 8 != 0) {//9 배수로 넘어오지 않으면 초기세팅 + mainPopupVO.setPageUnit(8); + }else { + mainPopupVO.setPageUnit(mainPopupVO.getPageUnit()); + } + + /** pageing */ + PaginationInfo paginationInfo = new PaginationInfo(); + paginationInfo.setCurrentPageNo(mainPopupVO.getPageIndex()); + paginationInfo.setRecordCountPerPage(mainPopupVO.getPageUnit()); + paginationInfo.setPageSize(mainPopupVO.getPageSize()); + + mainPopupVO.setFirstIndex(paginationInfo.getFirstRecordIndex()); + mainPopupVO.setLastIndex(paginationInfo.getLastRecordIndex()); + mainPopupVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage()); + + if(null != loginVO && !"super".equals(loginVO.getSiteId())){ //각각의 사이트 + mainPopupVO.setSiteId(loginVO.getSiteId()); + } + List mainPopupList = mainPopupManageService.selectMainPopupList(mainPopupVO); + model.addAttribute("mainPopupList", mainPopupList); + + int totCnt = mainPopupManageService.selectMainPopupCount(mainPopupVO); + + paginationInfo.setTotalRecordCount(totCnt); + model.addAttribute("paginationInfo", paginationInfo); + + return "uss/ion/bnr/pop/mainPopupList"; + } + + + + /*알림창등록/수정 view*/ + @RequestMapping(value="/uss/ion/bnr/pop/mainPopupModify.do") + public String updateMainZoneView(@RequestParam Map commandMap, + HttpServletRequest request, Model model, HttpSession session) + throws Exception { + + MainPopupVO mainPopupVO = new MainPopupVO(); + if("Modify".equals((String)commandMap.get("pageType"))){ //수정 + String mazId = (String)commandMap.get("selectedId"); + mainPopupVO = mainPopupManageService.selectMainPopupVO(mazId); + String sNtceBgnde = mainPopupVO.getNtceBgnde(); + String sNtceEndde = mainPopupVO.getNtceEndde(); + + if(sNtceBgnde != null && sNtceEndde != null ) { + + mainPopupVO.setNtceBgndeHH(sNtceBgnde.substring(8, 10)); + mainPopupVO.setNtceBgndeMM(sNtceBgnde.substring(10, 12)); + + mainPopupVO.setNtceEnddeHH(sNtceEndde.substring(8, 10)); + mainPopupVO.setNtceEnddeMM(sNtceEndde.substring(10, 12)); + + //게시기간 시작일자(시) + model.addAttribute("ntceBgndeHH", getTimeHH()); + //게시기간 시작일자(분) + model.addAttribute("ntceBgndeMM", getTimeMM()); + //게시기간 종료일자(시) + model.addAttribute("ntceEnddeHH", getTimeHH()); + //게시기간 종료일자(분) + model.addAttribute("ntceEnddeMM", getTimeMM()); + + + } + + if(mainPopupVO != null){ + mainPopupVO.setBeSort(mainPopupVO.getSort()); + + FileVO fileVO = new FileVO(); + String atchFileId = mainPopupVO.getMainzoneImageFile(); + fileVO.setAtchFileId(atchFileId); + List fileList = fileService.selectFileInfs(fileVO); + model.addAttribute("fileList", fileList); + } + }else{ //등록 + + //게시기간 시작일자(시) + model.addAttribute("ntceBgndeHH", getTimeHH()); + //게시기간 시작일자(분) + model.addAttribute("ntceBgndeMM", getTimeMM()); + //게시기간 종료일자(시) + model.addAttribute("ntceEnddeHH", getTimeHH()); + //게시기간 종료일자(분) + model.addAttribute("ntceEnddeMM", getTimeMM()); + + } + + //model.addAttribute("sortList", sortList); + model.addAttribute("mainPopupVO", mainPopupVO); + System.out.println("mainPopupVO :: "+ mainPopupVO.toString()); + + /* 타겟 코드 */ + ComDefaultCodeVO vo = new ComDefaultCodeVO(); + vo.setCodeId("COM037"); + //List targetList = cmmUseService.selectCmmCodeDetail(vo); + //model.addAttribute("targetList", targetList); + + + return "uss/ion/bnr/pop/mainPopupModify"; + } + + + + /*메인 이미지삭제 */ + @RequestMapping("/uss/ion/bnr/pop/mainPopupListDelete.do") + public String deleteMainzoneDelete(@RequestParam("del") String[] del, RedirectAttributes redirectAttributes , Model model) throws Exception { + LoginVO loginVO = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser(); + MainPopupVO mainPopupVO = new MainPopupVO(); + for(String id:del) { + try{ + mainPopupVO = mainPopupManageService.selectMainPopupVO(id); + }catch(Exception e){ + redirectAttributes.addFlashAttribute("message", egovMessageSource.getMessage("info.nodata.msg")); + RedirectUrlMaker redirectUrlMaker = new RedirectUrlMaker("/uss/ion/bnr/pop/mainPopupList.do"); + return redirectUrlMaker.getRedirectUrl(); + } + mainPopupManageService.deleteMainPopup(id); + if(null != loginVO && !"super".equals(loginVO.getSiteId())){ + mainPopupVO.setSiteId(loginVO.getSiteId()); + } + mainPopupManageService.resetMainPopupSort(mainPopupVO); + } + + redirectAttributes.addFlashAttribute("message", egovMessageSource.getMessage("success.common.delete")); + RedirectUrlMaker redirectUrlMaker = new RedirectUrlMaker("/uss/ion/bnr/pop/mainPopupList.do"); + return redirectUrlMaker.getRedirectUrl(); + } + + /** + * @methodName : mainPopupLinkDeleteAjax + * @author : 이호영 + * @date : 2025.03.04 + * @description : 메인팝업링크 데이터 삭제 + * @param request + * @param mainPopupLinkVO + * @return + * @throws Exception + */ + @ResponseBody + @RequestMapping(value="/uss/ion/bnr/pop/mainPopupLinkDeleteAjax.do") + public ResponseEntity mainPopupLinkDeleteAjax( + HttpServletRequest request + ,@RequestBody MainPopupLinkVO mainPopupLinkVO) throws Exception { + + Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated(); + + if(!isAuthenticated) { + return ResponseEntity.ok( + RestResponse.builder() + .status(HttpStatus.UNAUTHORIZED) // 401 권한 인증 에러 + .msg("로그인을 하셔야 이용 가능합니다.") + .build() + ); + } + return ResponseEntity.ok(mainPopupManageService.deleteMainPopupLink(mainPopupLinkVO)); + } + + + + + + /** + * 시간을 LIST를 반환한다. + * @return List + * @throws + */ + @SuppressWarnings("unused") + private List getTimeHH() { + ArrayList listHH = new ArrayList(); + HashMap hmHHMM; + for (int i = 0; i <= 24; i++) { + String sHH = ""; + String strI = String.valueOf(i); + if (i < 10) { + sHH = "0" + strI; + } else { + sHH = strI; + } + + ComDefaultCodeVO codeVO = new ComDefaultCodeVO(); + codeVO.setCode(sHH); + codeVO.setCodeNm(sHH); + + listHH.add(codeVO); + } + + return listHH; + } + + /** + * 분을 LIST를 반환한다. + * @return List + * @throws + */ + @SuppressWarnings("unused") + private List getTimeMM() { + ArrayList listMM = new ArrayList(); + HashMap hmHHMM; + for (int i = 0; i <= 60; i++) { + + String sMM = ""; + String strI = String.valueOf(i); + if (i < 10) { + sMM = "0" + strI; + } else { + sMM = strI; + } + + ComDefaultCodeVO codeVO = new ComDefaultCodeVO(); + codeVO.setCode(sMM); + codeVO.setCodeNm(sMM); + + listMM.add(codeVO); + } + return listMM; + } + + + +} \ No newline at end of file diff --git a/src/main/java/itn/com/uss/ion/bnr/sub/service/SubMainZoneManageService.java b/src/main/java/itn/com/uss/ion/bnr/sub/service/SubMainZoneManageService.java new file mode 100644 index 00000000..9eda3580 --- /dev/null +++ b/src/main/java/itn/com/uss/ion/bnr/sub/service/SubMainZoneManageService.java @@ -0,0 +1,37 @@ +package itn.com.uss.ion.bnr.sub.service; + +import java.util.List; +import java.util.Map; + +import itn.com.uss.ion.pwm.service.MainzoneVO; +import itn.com.uss.ion.pwm.service.PopupManageVO; +import itn.com.uss.ion.pwm.service.PopupzoneVO; +import itn.com.uss.ion.pwm.service.SocialVO; +import itn.com.uss.ion.pwm.service.SortVO; + +/** + * 개요 + * - 팝업창에 대한 Service Interface를 정의한다. + * + * 상세내용 + * - 팝업창에 대한 등록, 수정, 삭제, 조회, 반영확인 기능을 제공한다. + * - 팝업창의 조회기능은 목록조회, 상세조회, 팝업사용자 보기로 구분된다. + * @author 이창원 + * @version 1.0 + * @created 05-8-2009 오후 2:19:58 + */ +public interface SubMainZoneManageService { + + public List selectSubMainzoneList(MainzoneVO mainzoneVO) throws Exception; + + public int selectSubMainzoneCount(MainzoneVO mainzoneVO) throws Exception; + + public MainzoneVO selectSubMainzoneVO(String mazId) throws Exception; + + public List selectSubMainzoneListRolling(); + + public void deleteSubMainzone(String id); + + public void resetSubMainVOSort(MainzoneVO mainzoneVO); + +} \ No newline at end of file diff --git a/src/main/java/itn/com/uss/ion/bnr/sub/service/impl/SubMainZoneManageDAO.java b/src/main/java/itn/com/uss/ion/bnr/sub/service/impl/SubMainZoneManageDAO.java new file mode 100644 index 00000000..8cf5d9e6 --- /dev/null +++ b/src/main/java/itn/com/uss/ion/bnr/sub/service/impl/SubMainZoneManageDAO.java @@ -0,0 +1,309 @@ +package itn.com.uss.ion.bnr.sub.service.impl; +import java.util.List; + +import org.springframework.stereotype.Repository; + +import egovframework.rte.psl.dataaccess.util.EgovMap; +import itn.com.cmm.service.impl.EgovComAbstractDAO; +import itn.com.uss.ion.pwm.service.MainzoneVO; +import itn.com.uss.ion.pwm.service.PopupManageVO; +import itn.com.uss.ion.pwm.service.PopupzoneVO; +import itn.com.uss.ion.pwm.service.SocialVO; +import itn.com.uss.ion.pwm.service.SortVO; + +/** + * 개요 + * - 팝업창에 대한 DAO를 정의한다. + * + * 상세내용 + * - 팝업창에 대한 등록, 수정, 삭제, 조회, 반영확인 기능을 제공한다. + * - 팝업창의 조회기능은 목록조회, 상세조회로, 사용자화면 보기로 구분된다. + * @author 이창원 + * @version 1.0 + * @created 05-8-2009 오후 2:21:04 + */ +@Repository("subMainZoneManageDAO") +public class SubMainZoneManageDAO extends EgovComAbstractDAO { + + + /** + * 메인이미지 목록을 조회한다. + * @return 글 목록 + * @exception Exception + */ + public List selectSubMainzoneList(MainzoneVO mainzoneVO ) throws Exception{ + return list("subMainzoneManage.selectSubMainzoneList", mainzoneVO); + } + + + public int selectSubMainzoneCount(MainzoneVO mainzoneVO) throws Exception{ + return (int)select("subMainzoneManage.selectSubMainzoneCount", mainzoneVO); + } + + + public MainzoneVO selectSubMainzoneVO(String mazId) throws Exception{ + return (MainzoneVO)select("subMainzoneManage.selectSubMainzoneVO", mazId); + } + + + public List selectSubMainzoneListRolling() { + return (List) list("subMainzoneManage.selectSubMainzoneListRolling"); + } + + + public void deleteSubMainzone(String mazId) { + delete("subMainzoneManage.deleteSubMainzone", mazId); + } + + + public void resetSubMainVOSort(MainzoneVO mainzoneVO) { + update("subMainzoneManage.resetSubMainVOSort", mainzoneVO); + } + + + +// +// public SubMainZoneManageDAO(){} +// +// /** +// * 기 등록된 팝업창정보를 삭제한다. +// * @param popupManage - 팝업창 model +// * @return boolean - 반영성공 여부 +// * +// * @param popupManage +// */ +// public void deletePopup(PopupManageVO popupManageVO) throws Exception { +// delete("PopupManage.deletePopupManage", popupManageVO); +// } +// +// /** +// * 팝업창정보를 신규로 등록한다. +// * @param popupManage - 팝업창 model +// * @return boolean - 반영성공 여부 +// * +// * @param popupManage +// */ +// public void insertPopup(PopupManageVO popupManageVO) throws Exception { +// insert("PopupManage.insertPopupManage", popupManageVO); +// } +// +// /** +// * 기 등록된 팝업창정보를 수정한다. +// * @param popupManage - 팝업창 model +// * @return boolean - 반영성공 여부 +// * +// * @param popupManage +// */ +// public void updatePopup(PopupManageVO popupManageVO) throws Exception { +// update("PopupManage.updatePopupManage", popupManageVO); +// } +// +// /** +// * 팝업창을 사용자 화면에서 볼수 있는 정보들을 조회한다. +// * @param popupManageVO - 팝업창 Vo +// * @return popupManageVO - 팝업창 Vo +// * +// * @param popupManageVO +// */ +// public PopupManageVO selectPopup(PopupManageVO popupManageVO) throws Exception { +// return (PopupManageVO)select("PopupManage.selectPopupManageDetail", popupManageVO); +// } +// +// /** +// * 팝업창를 관리하기 위해 등록된 팝업창목록을 조회한다. +// * @param popupManageVO - 팝업창 Vo +// * @return List - 팝업창 목록 +// * +// * @param popupManageVO +// */ +// public List selectPopupList(PopupManageVO popupManageVO) throws Exception { +// return list("PopupManage.selectPopupManage", popupManageVO); +// } +// +// /** +// * 팝업창를 관리하기 위해 등록된 팝업창목록 총갯수를 조회한다. +// * @param popupManageVO - 팝업창 Vo +// * @return List - 팝업창 목록 +// * +// * @param popupManageVO +// */ +// public int selectPopupListCount(PopupManageVO popupManageVO) throws Exception { +// return (Integer)select("PopupManage.selectPopupManageCnt", popupManageVO); +// } +// +// /** +// * 팝업창를 사용하기 위해 등록된 팝업창목록을 조회한다. +// * @param popupManageVO - 팝업창 Vo +// * @return List - 팝업창 목록 +// * +// * @param popupManageVO +// */ +// public List selectPopupMainList(PopupManageVO popupManageVO) throws Exception { +// return list("PopupManage.selectPopupManageMain", popupManageVO); +// } +// +// /** +// * 메인알림창 목록을 조회한다. +// * @return 글 목록 +// * @exception Exception +// */ +// public List selectPopupzoneList(PopupzoneVO popupzoneVo) throws Exception{ +// return list("PopupzoneManage.selectPopupzoneList", popupzoneVo); +// } +// +// /** +// * 메인배너 순번정보를 가져온다. +// * @param mode - 0:등록 1:수정 +// * @return 순번정보 +// * @exception Exception +// */ +// @SuppressWarnings("unchecked") +// public List getSortList() throws Exception{ +// return (List) list("PopupzoneManage.getSortList",null); +// } +// +// public PopupzoneVO selectPopupzoneVO(String pozId) throws Exception { +// return (PopupzoneVO)select("PopupzoneManage.selectPopupzoneVO", pozId); +// } +// +// /** +// * 메인배너 변경할때 나머지 배너들 순서 변경 +// * @param 입력된 sort번호 +// * @return 등록 결과 +// * @exception Exception +// */ +// public void updateSortUp(SortVO sortVO) throws Exception{ +// update("PopupzoneManage.updateSortUp", sortVO); +// } +// +// public void updateSortDown(SortVO sortVO) throws Exception { +// update("PopupzoneManage.updateSortDown", sortVO); +// } +// +// public void updatePopupzone(PopupzoneVO popupzoneVO) throws Exception { +// update("PopupzoneManage.updatePopupzone", popupzoneVO); +// } +// +// /** +// * 메인알림창을 삭제한다. +// * @param pozId - 삭제할 메인알림창 번호 +// * @return void형 +// * @exception Exception +// */ +// public void deletePopupzone(String pozId) throws Exception { +// delete("PopupzoneManage.deletePopupzone", pozId); +// } +// +// public int getMaxSort() throws Exception{ +// return (Integer)select("PopupzoneManage.getMaxSort") ; +// } +// +// /** +// * 메인배너의 새로운seq를 가지고온다. +// * @return seq +// * @exception Exception +// */ +// public int selectNextSeq() throws Exception{ +// return (Integer)select("PopupzoneManage.selectNextSeq"); +// } +// +// public void insertPopupzone(PopupzoneVO popupzoneVO) throws Exception{ +// insert("PopupzoneManage.insertPopupzone", popupzoneVO); +// } +// +// public void resetSort(PopupzoneVO popupzoneVO) throws Exception{ +// update("PopupzoneManage.resetSort", popupzoneVO); +// } +// +// /** +// * 메인이미지 목록을 조회한다. +// * @return 글 목록 +// * @exception Exception +// */ +// public List selectMainzoneList(MainzoneVO mainzoneVO ) throws Exception{ +// return list("MainzoneManage.selectMainzoneList", mainzoneVO); +// } +// +// public int getMainMaxSort() throws Exception{ +// return (Integer)select("MainzoneManage.getMainMaxSort"); +// } +// +// public void insertMainzone(MainzoneVO mainzoneVO) throws Exception{ +// insert("MainzoneManage.insertMainzone", mainzoneVO); +// } +// +// public void resetMainSort(MainzoneVO mainzoneVO) throws Exception{ +// insert("MainzoneManage.resetMainSort", mainzoneVO); +// } +// +// public void updateMainSortUp(SortVO sortVO) throws Exception{ +// update("MainzoneManage.updateMainSortUp", sortVO); +// } +// +// public MainzoneVO selectMainzoneVO(String mazId) throws Exception{ +// return (MainzoneVO)select("MainzoneManage.selectMainzoneVO", mazId); +// } +// +// @SuppressWarnings("unchecked") +// public List getMainSortList() throws Exception{ +// return (List) list("MainzoneManage.getMainSortList",null); +// } +// +// public void deleteMainzone(String mazId) throws Exception{ +// delete("MainzoneManage.deleteMainzone", mazId); +// } +// +// public void updateMainSortDown(SortVO sortVO) throws Exception{ +// update("MainzoneManage.updateMainSortDown", sortVO); +// } +// +// public void updateMainzone(MainzoneVO mainzoneVO) throws Exception{ +// update("MainzoneManage.updateMainzone", mainzoneVO); +// } +// +// @SuppressWarnings("unchecked") +// public List selectMainzoneListRolling() throws Exception{ +// return (List) list("MainzoneManage.selectMainzoneListRolling"); +// } +// +// public int selectPopupzoneListTotCnt(PopupzoneVO popupzoneVo) throws Exception { +// return (int)select("PopupzoneManage.selectPopupzoneListTotCnt", popupzoneVo); +// } +// +// public int selectMainzoneCount(MainzoneVO mainzoneVO) throws Exception{ +// return (int)select("MainzoneManage.selectMainzoneCount", mainzoneVO); +// } +// +// public void resetVOSort(PopupzoneVO popupzoneVO) throws Exception{ +// update("PopupzoneManage.resetVOSort", popupzoneVO); +// } +// +// public void resetMainVOSort(MainzoneVO mainzoneVO) throws Exception{ +// update("MainzoneManage.resetMainVOSort", mainzoneVO); +// } +// +// @SuppressWarnings("unchecked") +// public List selectSocialList(SocialVO socialVO) throws Exception{ +// return (List) list("SocialManage.selectSocialList",socialVO); +// } +// +// public SocialVO selectSocialVO(String socialId) throws Exception{ +// return (SocialVO)select("SocialManage.selectSocialVO", socialId); +// } +// +// public void updateSocial(SocialVO socialVO) throws Exception{ +// update("SocialManage.updateSocial", socialVO); +// } +// +// public void resetSocialSort(SocialVO socialVO) throws Exception{ +// update("SocialManage.resetSocialSort", socialVO); +// } +// +// public void insertSocial(SocialVO socialVO) throws Exception{ +// insert("SocialManage.insertSocial", socialVO); +// } +// +// public void deleteSocial(String id) throws Exception{ +// delete("SocialManage.deleteSocial", id); +// } +} \ No newline at end of file diff --git a/src/main/java/itn/com/uss/ion/bnr/sub/service/impl/SubMainZoneManageServiceImpl.java b/src/main/java/itn/com/uss/ion/bnr/sub/service/impl/SubMainZoneManageServiceImpl.java new file mode 100644 index 00000000..847985e3 --- /dev/null +++ b/src/main/java/itn/com/uss/ion/bnr/sub/service/impl/SubMainZoneManageServiceImpl.java @@ -0,0 +1,85 @@ +package itn.com.uss.ion.bnr.sub.service.impl; + +import java.math.BigDecimal; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +import javax.annotation.Resource; + +import org.springframework.stereotype.Service; + +import egovframework.rte.fdl.cmmn.EgovAbstractServiceImpl; +import egovframework.rte.fdl.idgnr.EgovIdGnrService; +import egovframework.rte.psl.dataaccess.util.EgovMap; +import itn.com.uss.ion.bnr.sub.service.SubMainZoneManageService; +import itn.com.uss.ion.pwm.service.MainzoneVO; +import itn.com.uss.ion.pwm.service.PopupManageVO; +import itn.com.uss.ion.pwm.service.PopupzoneVO; +import itn.com.uss.ion.pwm.service.SocialVO; +import itn.com.uss.ion.pwm.service.SortVO; +import itn.com.uss.ion.pwm.service.impl.PopupManageDAO; +import itn.com.uss.ion.pwm.service.impl.PopupzoneManageDAO; + +/** + * 개요 + * - 팝업창에 대한 ServiceImpl을 정의한다. + * + * 상세내용 + * - 팝업창에 대한 등록, 수정, 삭제, 조회, 반영확인 기능을 제공한다. + * - 팝업창의 조회기능은 목록조회, 상세조회로, 사용자화면 보기로 구분된다. + * @author 이창원 + * @version 1.0 + * @created 05-8-2009 오후 2:19:58 + */ + +@Service("subMainZoneManageService") +public class SubMainZoneManageServiceImpl extends EgovAbstractServiceImpl implements SubMainZoneManageService { + + @Resource(name = "subMainZoneManageDAO") + public SubMainZoneManageDAO dao; + + /** PopupzoneManageDAO */ + @Resource(name="popupzoneManageDAO") + private PopupzoneManageDAO popupzoneManageDAO; + + @Resource(name = "egovPopupManageIdGnrService") + private EgovIdGnrService idgenService; + + @Override + public List selectSubMainzoneList(MainzoneVO mainzoneVO) throws Exception { + return dao.selectSubMainzoneList(mainzoneVO); + } + + @Override + public int selectSubMainzoneCount(MainzoneVO mainzoneVO) throws Exception { + return dao.selectSubMainzoneCount(mainzoneVO); + } + + + @Override + public MainzoneVO selectSubMainzoneVO(String mazId) throws Exception { + MainzoneVO resultVO = dao.selectSubMainzoneVO(mazId); + if (resultVO == null) + throw processException("info.nodata.msg"); + return resultVO; + } + + @Override + public List selectSubMainzoneListRolling() { + return dao.selectSubMainzoneListRolling(); + } + + @Override + public void deleteSubMainzone(String id) { + dao.deleteSubMainzone(id); + } + + @Override + public void resetSubMainVOSort(MainzoneVO mainzoneVO) { + dao.resetSubMainVOSort(mainzoneVO); + + } + + +} \ No newline at end of file diff --git a/src/main/java/itn/com/uss/ion/bnr/sub/web/SubMainZoneManageController.java b/src/main/java/itn/com/uss/ion/bnr/sub/web/SubMainZoneManageController.java new file mode 100644 index 00000000..d926563e --- /dev/null +++ b/src/main/java/itn/com/uss/ion/bnr/sub/web/SubMainZoneManageController.java @@ -0,0 +1,308 @@ +package itn.com.uss.ion.bnr.sub.web; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpSession; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.servlet.mvc.support.RedirectAttributes; +import org.springmodules.validation.commons.DefaultBeanValidator; + +import egovframework.rte.fdl.idgnr.EgovIdGnrService; +import egovframework.rte.fdl.property.EgovPropertyService; +import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper; +import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo; +import itn.com.cmm.ComDefaultCodeVO; +import itn.com.cmm.EgovMessageSource; +import itn.com.cmm.LoginVO; +import itn.com.cmm.service.EgovCmmUseService; +import itn.com.cmm.service.EgovFileMngService; +import itn.com.cmm.service.EgovFileMngUtil; +import itn.com.cmm.service.FileVO; +import itn.com.cmm.util.RedirectUrlMaker; +import itn.com.uss.ion.bnr.sub.service.SubMainZoneManageService; +import itn.com.uss.ion.pwm.service.MainzoneVO; +import itn.let.sym.site.service.EgovSiteManagerService; + +/** + * 개요 + * - 팝업창에 대한 Controller를 정의한다. + * + * 상세내용 + * - 팝업창에 대한 등록, 수정, 삭제, 조회, 반영확인 기능을 제공한다. + * - 팝업창의 조회기능은 목록조회, 상세조회로, 사용자 화면 보기로 구분된다. + * @author 이창원 + * @version 1.0 + * @created 05-8-2009 오후 2:19:57 + *
+  * << 개정이력(Modification Information) >>
+  *
+  *   수정일      수정자           수정내용
+  *  -------    --------    ---------------------------
+  *   2025.02.24  이호영          최초 생성
+  *
+  * 
+ */ + +@Controller +public class SubMainZoneManageController { + + private static final Logger LOGGER = LoggerFactory.getLogger(SubMainZoneManageController.class); + + @Autowired + private DefaultBeanValidator beanValidator; + + /** EgovMessageSource */ + @Resource(name = "egovMessageSource") + EgovMessageSource egovMessageSource; + + /** EgovPropertyService */ + @Resource(name = "propertiesService") + protected EgovPropertyService propertiesService; + + /** EgovPopupManageService */ + @Resource(name = "subMainZoneManageService") + private SubMainZoneManageService subMainZoneManageService; + + /** cmmUseService */ + @Resource(name = "EgovCmmUseService") + private EgovCmmUseService cmmUseService; + + @Resource(name="EgovFileMngUtil") + private EgovFileMngUtil fileUtil; + + @Resource(name="EgovFileMngService") + private EgovFileMngService fileMngService; + + @Resource(name = "egovPopupZoneIdGnrService") + private EgovIdGnrService idgenService; + +// @Resource(name = "egovMainZoneIdGnrService") +// private EgovIdGnrService idgenServiceMain; + + @Resource(name = "egovSubMainZoneIdGnrService") + private EgovIdGnrService idgenServiceSubMain; + + @Resource(name = "egovSiteManagerService") + EgovSiteManagerService egovSiteManagerService; + + @Resource(name = "EgovFileMngService") + private EgovFileMngService fileService; + + + + + + /*메인이미지 관리*/ + @RequestMapping(value="/uss/ion/bnr/sub/subMainZoneList.do") +// @RequestMapping(value="/uss/ion/pwm/mainzoneList.do") + public String selectMainzoneList(ModelMap model , MainzoneVO mainzoneVO , HttpSession session ) throws Exception { + LoginVO loginVO = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser(); + + + if(mainzoneVO.getPageUnit()% 8 != 0) {//9 배수로 넘어오지 않으면 초기세팅 + mainzoneVO.setPageUnit(8); + }else { + mainzoneVO.setPageUnit(mainzoneVO.getPageUnit()); + } + + /** pageing */ + PaginationInfo paginationInfo = new PaginationInfo(); + paginationInfo.setCurrentPageNo(mainzoneVO.getPageIndex()); + paginationInfo.setRecordCountPerPage(mainzoneVO.getPageUnit()); + paginationInfo.setPageSize(mainzoneVO.getPageSize()); + + mainzoneVO.setFirstIndex(paginationInfo.getFirstRecordIndex()); + mainzoneVO.setLastIndex(paginationInfo.getLastRecordIndex()); + mainzoneVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage()); + + if(null != loginVO && !"super".equals(loginVO.getSiteId())){ //각각의 사이트 + mainzoneVO.setSiteId(loginVO.getSiteId()); + } + List mainzoneList = subMainZoneManageService.selectSubMainzoneList(mainzoneVO); + model.addAttribute("mainzoneList", mainzoneList); + + int totCnt = subMainZoneManageService.selectSubMainzoneCount(mainzoneVO); + + paginationInfo.setTotalRecordCount(totCnt); + model.addAttribute("paginationInfo", paginationInfo); + + return "uss/ion/bnr/sub/subMainZoneList"; + } + + + + /*알림창등록/수정 view*/ + @RequestMapping(value="/uss/ion/bnr/sub/subMainzoneModify.do") + public String updateMainZoneView(@RequestParam Map commandMap, + HttpServletRequest request, Model model, HttpSession session) + throws Exception { + + MainzoneVO mainzoneVO = new MainzoneVO(); + if("Modify".equals((String)commandMap.get("pageType"))){ //수정 + String mazId = (String)commandMap.get("selectedId"); + mainzoneVO = subMainZoneManageService.selectSubMainzoneVO(mazId); + String sNtceBgnde = mainzoneVO.getNtceBgnde(); + String sNtceEndde = mainzoneVO.getNtceEndde(); + + if(sNtceBgnde != null && sNtceEndde != null ) { + + mainzoneVO.setNtceBgndeHH(sNtceBgnde.substring(8, 10)); + mainzoneVO.setNtceBgndeMM(sNtceBgnde.substring(10, 12)); + + mainzoneVO.setNtceEnddeHH(sNtceEndde.substring(8, 10)); + mainzoneVO.setNtceEnddeMM(sNtceEndde.substring(10, 12)); + + //게시기간 시작일자(시) + model.addAttribute("ntceBgndeHH", getTimeHH()); + //게시기간 시작일자(분) + model.addAttribute("ntceBgndeMM", getTimeMM()); + //게시기간 종료일자(시) + model.addAttribute("ntceEnddeHH", getTimeHH()); + //게시기간 종료일자(분) + model.addAttribute("ntceEnddeMM", getTimeMM()); + + + } + + if(mainzoneVO != null){ + mainzoneVO.setBeSort(mainzoneVO.getSort()); + + FileVO fileVO = new FileVO(); + String atchFileId = mainzoneVO.getMainzoneImageFile(); + fileVO.setAtchFileId(atchFileId); + List fileList = fileService.selectFileInfs(fileVO); + model.addAttribute("fileList", fileList); + } + }else{ //등록 + + //게시기간 시작일자(시) + model.addAttribute("ntceBgndeHH", getTimeHH()); + //게시기간 시작일자(분) + model.addAttribute("ntceBgndeMM", getTimeMM()); + //게시기간 종료일자(시) + model.addAttribute("ntceEnddeHH", getTimeHH()); + //게시기간 종료일자(분) + model.addAttribute("ntceEnddeMM", getTimeMM()); + + } + + //model.addAttribute("sortList", sortList); + model.addAttribute("mainzoneVO", mainzoneVO); + System.out.println("mainzoneVO :: "+ mainzoneVO.toString()); + + /* 타겟 코드 */ + ComDefaultCodeVO vo = new ComDefaultCodeVO(); + vo.setCodeId("COM037"); + //List targetList = cmmUseService.selectCmmCodeDetail(vo); + //model.addAttribute("targetList", targetList); + + + return "uss/ion/bnr/sub/subMainZoneModify"; + } + + + + /*메인 이미지삭제 */ + @RequestMapping("/uss/ion/bnr/sub/subMainzoneListDelete.do") + public String deleteMainzoneDelete(@RequestParam("del") String[] del, RedirectAttributes redirectAttributes , Model model) throws Exception { + LoginVO loginVO = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser(); + MainzoneVO mainzoneVO = new MainzoneVO(); + for(String id:del) { + try{ + mainzoneVO = subMainZoneManageService.selectSubMainzoneVO(id); + }catch(Exception e){ + redirectAttributes.addFlashAttribute("message", egovMessageSource.getMessage("info.nodata.msg")); + RedirectUrlMaker redirectUrlMaker = new RedirectUrlMaker("/uss/ion/bnr/subMainZoneList.do"); + return redirectUrlMaker.getRedirectUrl(); + } + subMainZoneManageService.deleteSubMainzone(id); + if(null != loginVO && !"super".equals(loginVO.getSiteId())){ + mainzoneVO.setSiteId(loginVO.getSiteId()); + } + subMainZoneManageService.resetSubMainVOSort(mainzoneVO); + } + + redirectAttributes.addFlashAttribute("message", egovMessageSource.getMessage("success.common.delete")); + RedirectUrlMaker redirectUrlMaker = new RedirectUrlMaker("/uss/ion/bnr/subMainZoneList.do"); + return redirectUrlMaker.getRedirectUrl(); + } + + + + + + + + + + + /** + * 시간을 LIST를 반환한다. + * @return List + * @throws + */ + @SuppressWarnings("unused") + private List getTimeHH() { + ArrayList listHH = new ArrayList(); + HashMap hmHHMM; + for (int i = 0; i <= 24; i++) { + String sHH = ""; + String strI = String.valueOf(i); + if (i < 10) { + sHH = "0" + strI; + } else { + sHH = strI; + } + + ComDefaultCodeVO codeVO = new ComDefaultCodeVO(); + codeVO.setCode(sHH); + codeVO.setCodeNm(sHH); + + listHH.add(codeVO); + } + + return listHH; + } + + /** + * 분을 LIST를 반환한다. + * @return List + * @throws + */ + @SuppressWarnings("unused") + private List getTimeMM() { + ArrayList listMM = new ArrayList(); + HashMap hmHHMM; + for (int i = 0; i <= 60; i++) { + + String sMM = ""; + String strI = String.valueOf(i); + if (i < 10) { + sMM = "0" + strI; + } else { + sMM = strI; + } + + ComDefaultCodeVO codeVO = new ComDefaultCodeVO(); + codeVO.setCode(sMM); + codeVO.setCodeNm(sMM); + + listMM.add(codeVO); + } + return listMM; + } + +} \ No newline at end of file diff --git a/src/main/java/itn/com/uss/ion/fms/web/FmsFileController.java b/src/main/java/itn/com/uss/ion/fms/web/FmsFileController.java index a84fdef4..86795c09 100644 --- a/src/main/java/itn/com/uss/ion/fms/web/FmsFileController.java +++ b/src/main/java/itn/com/uss/ion/fms/web/FmsFileController.java @@ -38,6 +38,7 @@ import itn.com.cmm.service.EgovFileMngService; import itn.com.cmm.service.EgovFileMngUtil; import itn.com.cmm.service.FileVO; import itn.com.cmm.util.RedirectUrlMaker; +import itn.com.uss.ion.bnr.pop.service.MainPopupVO; import itn.com.uss.ion.bnr.service.Banner; import itn.com.uss.ion.bnr.service.BannerVO; import itn.com.uss.ion.bnr.service.EgovBannerService; @@ -112,6 +113,12 @@ public class FmsFileController { @Resource(name = "egovMainZoneIdGnrService") private EgovIdGnrService idgenServiceMain; + @Resource(name = "egovSubMainZoneIdGnrService") + private EgovIdGnrService idgenServiceSubMain; + + @Resource(name = "egovMainPopupIdGnrService") + private EgovIdGnrService idgenServiceMainPopup; + @Resource(name = "egovBannerService") private EgovBannerService egovBannerService; @@ -387,6 +394,7 @@ public class FmsFileController { public ModelAndView insertFmsFileInsertAjax(@RequestParam Map commandMap, @ModelAttribute("fmsFileVO") FmsFileVO fmsFileVO, MainzoneVO mainzoneVO, + MainPopupVO mainPopupVO, PopupzoneVO popupzoneVO, Banner banner, BannerVO bannerVO, @@ -414,6 +422,10 @@ public class FmsFileController { String KeyStr = "FMS_"; if("mainzone".equals(fileVO.getMenuName())) { //메인비주얼 KeyStr = "MAZ_"; + }else if("subMainzone".equals(fileVO.getMenuName())) { //메인비주얼 + KeyStr = "SMAZ_"; + }else if("mainPopup".equals(fileVO.getMenuName())) { //메인비주얼 + KeyStr = "MPP_"; }else if("popupzone".equals(fileVO.getMenuName())) { //매뉴별 비주얼 KeyStr = "POZ_"; }else if("banner".equals(fileVO.getMenuName())) { //매뉴별 비주얼 @@ -442,6 +454,9 @@ public class FmsFileController { mainzoneVO.setMainzoneImage(orignlFileNm); mainzoneVO.setMainzoneImageFile(atchFileId); + mainPopupVO.setMainzoneImage(orignlFileNm); + mainPopupVO.setMainzoneImageFile(atchFileId); + fmsFileVO.setFmsImage(orignlFileNm); fmsFileVO.setFmsImageFile(atchFileId); @@ -477,7 +492,24 @@ public class FmsFileController { egovPopupManageService.insertMainzone(mainzoneVO); mainzoneVO.setSortOver("D"); //앞쪽에 넣음 egovPopupManageService.resetMainVOSort(mainzoneVO); - }else if("popupzone".equals(fileVO.getMenuName())) { //매뉴별 비주얼 + } + else if("subMainzone".equals(fileVO.getMenuName())) { // 서브 메인비주얼 새글 + String mainId = idgenServiceSubMain.getNextStringId(); + mainzoneVO.setMazId(mainId); + mainzoneVO.setRegisterId(loginVO.getUniqId()); + egovPopupManageService.insertSubMainzone(mainzoneVO); + mainzoneVO.setSortOver("D"); //앞쪽에 넣음 + egovPopupManageService.resetSubMainVOSort(mainzoneVO); + } + else if("mainPopup".equals(fileVO.getMenuName())) { // 메인팝업 새글 + String mainId = idgenServiceMainPopup.getNextStringId(); + mainPopupVO.setPopId(mainId); + mainPopupVO.setRegisterId(loginVO.getUniqId()); + egovPopupManageService.insertMainPopup(mainPopupVO); + mainPopupVO.setSortOver("D"); //앞쪽에 넣음 + egovPopupManageService.resetMainPopup(mainPopupVO); + } + else if("popupzone".equals(fileVO.getMenuName())) { //매뉴별 비주얼 String pozId = idgenService.getNextStringId(); popupzoneVO.setPozId(pozId); popupzoneVO.setRegisterId(loginVO.getUniqId()); @@ -521,6 +553,19 @@ public class FmsFileController { mainzoneVO.setSortOver("D"); } egovPopupManageService.resetMainVOSort(mainzoneVO); + }else if("subMainzone".equals(fileVO.getMenuName())) { //메인비주얼 수정 + egovPopupManageService.updateSubMainzone(mainzoneVO); + if(mainzoneVO.getSort() < mainzoneVO.getBeSort() ){ //sortOver : A 후번호로 변경 , D : 선번호로 변경 + mainzoneVO.setSortOver("D"); + } + egovPopupManageService.resetMainVOSort(mainzoneVO); + }else if("mainPopup".equals(fileVO.getMenuName())) { // 메인팝업 새글 + egovPopupManageService.updateMainPopup(mainPopupVO); + if(mainzoneVO.getSort() < mainzoneVO.getBeSort() ){ //sortOver : A 후번호로 변경 , D : 선번호로 변경 + mainzoneVO.setSortOver("D"); + } + egovPopupManageService.resetMainPopup(mainPopupVO); + }else if("popupzone".equals(fileVO.getMenuName())) { //매뉴별 비주얼 egovPopupManageService.updatePopupzone(popupzoneVO); if(popupzoneVO.getSort() < popupzoneVO.getBeSort() ){ //sortOver : A 후번호로 변경 , D : 선번호로 변경 @@ -557,7 +602,8 @@ public class FmsFileController { } } modelAndView.addObject("result", "success"); - }catch (Exception e) { + }catch (Exception e) { + e.printStackTrace(); modelAndView.addObject("result", "fail"); } return modelAndView; diff --git a/src/main/java/itn/com/uss/ion/pwm/service/EgovPopupManageService.java b/src/main/java/itn/com/uss/ion/pwm/service/EgovPopupManageService.java index 6e3eabdb..a1f53f6b 100644 --- a/src/main/java/itn/com/uss/ion/pwm/service/EgovPopupManageService.java +++ b/src/main/java/itn/com/uss/ion/pwm/service/EgovPopupManageService.java @@ -3,6 +3,8 @@ package itn.com.uss.ion.pwm.service; import java.util.List; import java.util.Map; +import itn.com.uss.ion.bnr.pop.service.MainPopupVO; + /** * 개요 * - 팝업창에 대한 Service Interface를 정의한다. @@ -123,6 +125,8 @@ public interface EgovPopupManageService { public int getMainMaxSort() throws Exception; public void insertMainzone(MainzoneVO mainzoneVO) throws Exception; + + public void insertSubMainzone(MainzoneVO mainzoneVO) throws Exception; public void resetMainSort(MainzoneVO mainzoneVO) throws Exception; @@ -137,6 +141,8 @@ public interface EgovPopupManageService { public void updateMainSortDown(SortVO sortVO) throws Exception; public void updateMainzone(MainzoneVO mainzoneVO) throws Exception; + + public void updateSubMainzone(MainzoneVO mainzoneVO) throws Exception; public int selectPopupzoneListTotCnt(PopupzoneVO popupzoneVo) throws Exception; @@ -145,6 +151,8 @@ public interface EgovPopupManageService { public void resetVOSort(PopupzoneVO popupzoneVO) throws Exception; public void resetMainVOSort(MainzoneVO mainzoneVO) throws Exception; + + public void resetSubMainVOSort(MainzoneVO mainzoneVO) throws Exception; public List selectSocialList(SocialVO socialVO) throws Exception; @@ -161,4 +169,11 @@ public interface EgovPopupManageService { //사용자 메인화면 롤링 배너 이미지 조회 public List selectMainzoneListRolling() throws Exception; + public void insertMainPopup(MainPopupVO mainPopupVO); + + public void resetMainPopup(MainPopupVO mainPopupVO) throws Exception; + + public void updateMainPopup(MainPopupVO mainPopupVO) throws Exception; + + } \ No newline at end of file diff --git a/src/main/java/itn/com/uss/ion/pwm/service/MainzoneVO.java b/src/main/java/itn/com/uss/ion/pwm/service/MainzoneVO.java index 1afdcb34..3e065cdd 100644 --- a/src/main/java/itn/com/uss/ion/pwm/service/MainzoneVO.java +++ b/src/main/java/itn/com/uss/ion/pwm/service/MainzoneVO.java @@ -18,6 +18,8 @@ package itn.com.uss.ion.pwm.service; import java.io.Serializable; import itn.com.cmm.ComDefaultVO; +import lombok.Getter; +import lombok.Setter; /** * @Class Name : MainzoneVO.java @@ -35,6 +37,8 @@ import itn.com.cmm.ComDefaultVO; * * */ +@Getter +@Setter public class MainzoneVO extends ComDefaultVO implements Serializable { @@ -95,190 +99,8 @@ public class MainzoneVO extends ComDefaultVO implements Serializable { private String ntceEnddeHH = ""; private String ntceEnddeMM = ""; - - public int getSeq() { - return seq; - } - - public void setSeq(int seq) { - this.seq = seq; - } - - public String getUpfile() { - return upfile; - } - - public void setUpfile(String upfile) { - this.upfile = upfile; - } - - public String getUpfileUrl() { - return upfileUrl; - } - - public void setUpfileUrl(String upfileUrl) { - this.upfileUrl = upfileUrl; - } - - public String getContent() { - return content; - } - - public void setContent(String content) { - this.content = content; - } - - public String getMlink() { - return mlink; - } - - public void setMlink(String mlink) { - this.mlink = mlink; - } - - public String getIstarget() { - return istarget; - } - - public void setIstarget(String istarget) { - this.istarget = istarget; - } - - public String getDel() { - return del; - } - - public void setDel(String del) { - this.del = del; - } - - public int getSort() { - return sort; - } - - public void setSort(int sort) { - this.sort = sort; - } - - public String getRegdt() { - return regdt; - } - - public void setRegdt(String regdt) { - this.regdt = regdt; - } - - public String getMainzoneImage() { - return mainzoneImage; - } - - public void setMainzoneImage(String mainzoneImage) { - this.mainzoneImage = mainzoneImage; - } - - public String getMainzoneImageFile() { - return mainzoneImageFile; - } - - public void setMainzoneImageFile(String mainzoneImageFile) { - this.mainzoneImageFile = mainzoneImageFile; - } - - public String getMazId() { - return mazId; - } - - public void setMazId(String mazId) { - this.mazId = mazId; - } - - public String getMazNm() { - return mazNm; - } - - public void setMazNm(String mazNm) { - this.mazNm = mazNm; - } - - public String getUseYn() { - return useYn; - } - - public void setUseYn(String useYn) { - this.useYn = useYn; - } - - public String getRegisterId() { - return registerId; - } - - public void setRegisterId(String registerId) { - this.registerId = registerId; - } - - public String getModdt() { - return moddt; - } - - public void setModdt(String moddt) { - this.moddt = moddt; - } - - public String getDeviceType() { - return deviceType; - } - - public void setDeviceType(String deviceType) { - this.deviceType = deviceType; - } - - public String getNtceBgnde() { - return ntceBgnde; - } - - public void setNtceBgnde(String ntceBgnde) { - this.ntceBgnde = ntceBgnde; - } - - public String getNtceEndde() { - return ntceEndde; - } - - public void setNtceEndde(String ntceEndde) { - this.ntceEndde = ntceEndde; - } - - public String getNtceBgndeHH() { - return ntceBgndeHH; - } - - public void setNtceBgndeHH(String ntceBgndeHH) { - this.ntceBgndeHH = ntceBgndeHH; - } - - public String getNtceBgndeMM() { - return ntceBgndeMM; - } - - public void setNtceBgndeMM(String ntceBgndeMM) { - this.ntceBgndeMM = ntceBgndeMM; - } - - public String getNtceEnddeHH() { - return ntceEnddeHH; - } - - public void setNtceEnddeHH(String ntceEnddeHH) { - this.ntceEnddeHH = ntceEnddeHH; - } - - public String getNtceEnddeMM() { - return ntceEnddeMM; - } - - public void setNtceEnddeMM(String ntceEnddeMM) { - this.ntceEnddeMM = ntceEnddeMM; - } - + + private String topTxt = ""; + private String lowTxt = ""; } diff --git a/src/main/java/itn/com/uss/ion/pwm/service/impl/EgovPopupManageServiceImpl.java b/src/main/java/itn/com/uss/ion/pwm/service/impl/EgovPopupManageServiceImpl.java index 49edb2fc..8e224fb7 100644 --- a/src/main/java/itn/com/uss/ion/pwm/service/impl/EgovPopupManageServiceImpl.java +++ b/src/main/java/itn/com/uss/ion/pwm/service/impl/EgovPopupManageServiceImpl.java @@ -1,17 +1,23 @@ package itn.com.uss.ion.pwm.service.impl; import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Comparator; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; +import java.util.stream.IntStream; import javax.annotation.Resource; +import org.apache.commons.collections4.CollectionUtils; import org.springframework.stereotype.Service; import egovframework.rte.fdl.cmmn.EgovAbstractServiceImpl; import egovframework.rte.fdl.idgnr.EgovIdGnrService; import egovframework.rte.psl.dataaccess.util.EgovMap; +import itn.com.uss.ion.bnr.pop.service.MainPopupLinkVO; +import itn.com.uss.ion.bnr.pop.service.MainPopupVO; import itn.com.uss.ion.pwm.service.EgovPopupManageService; import itn.com.uss.ion.pwm.service.MainzoneVO; import itn.com.uss.ion.pwm.service.PopupManageVO; @@ -239,6 +245,15 @@ public class EgovPopupManageServiceImpl extends EgovAbstractServiceImpl implemen public void insertMainzone(MainzoneVO mainzoneVO) throws Exception { dao.insertMainzone(mainzoneVO); } + + @Override + public void insertSubMainzone(MainzoneVO mainzoneVO) throws Exception { + dao.insertSubMainzone(mainzoneVO); + } + @Override + public void resetMainPopup(MainPopupVO mainPopupVO) throws Exception { + dao.resetMainPopup(mainPopupVO); + } @Override public void resetMainSort(MainzoneVO mainzoneVO) throws Exception { @@ -295,6 +310,12 @@ public class EgovPopupManageServiceImpl extends EgovAbstractServiceImpl implemen dao.updateMainzone(mainzoneVO); } + @Override + public void updateSubMainzone(MainzoneVO mainzoneVO) throws Exception { + dao.updateSubMainzone(mainzoneVO); + } + + //사용자 메인화면 롤링 배너 이미지 조회 @Override public List selectMainzoneListRolling() throws Exception{ @@ -324,6 +345,12 @@ public class EgovPopupManageServiceImpl extends EgovAbstractServiceImpl implemen dao.resetMainVOSort(mainzoneVO); } + + @Override + public void resetSubMainVOSort(MainzoneVO mainzoneVO) throws Exception { + dao.resetSubMainVOSort(mainzoneVO); + + } @Override public List selectSocialList(SocialVO socialVO) throws Exception { @@ -355,4 +382,52 @@ public class EgovPopupManageServiceImpl extends EgovAbstractServiceImpl implemen public void deleteSocial(String id) throws Exception { dao.deleteSocial(id); } + + @Override + public void insertMainPopup(MainPopupVO mainPopupVO) { + dao.insertMainPopup(mainPopupVO); + + + + if(CollectionUtils.isNotEmpty(mainPopupVO.getMainPopupLinkList())) { + + List mainPopupLinkListVO = getMainPopupLinkList(mainPopupVO); +// mainPopupLinkListVO.stream().forEach(t-> System.out.println(t.toString())); + dao.insertMainPopupLinkInfo(mainPopupLinkListVO); + } + } + + @Override + public void updateMainPopup(MainPopupVO mainPopupVO) throws Exception { + + dao.updateMainPopup(mainPopupVO); + + + if(CollectionUtils.isNotEmpty(mainPopupVO.getMainPopupLinkList())) { + + List mainPopupLinkListVO = getMainPopupLinkList(mainPopupVO); + + dao.deleteMainPopupLinkInfo(mainPopupVO.getPopId()); + + dao.insertMainPopupLinkInfo(mainPopupLinkListVO); + } + + + } + + private List getMainPopupLinkList(MainPopupVO mainPopupVO) { + + List mainPopupLinkListVO = mainPopupVO.getMainPopupLinkList(); + + // 기존 sort 값을 숫자로 변환하여 오름차순 정렬 + mainPopupLinkListVO.sort(Comparator.comparingInt(vo -> vo.getSort())); + // 2. 정렬된 상태에서 sort 값을 연속적인 숫자로 변경 (1, 2, 3, ...) + IntStream.range(0, mainPopupLinkListVO.size()) + .forEach(i -> mainPopupLinkListVO.get(i).setSort(i + 1)); + + mainPopupLinkListVO.stream().forEach(t-> t.setPopId(mainPopupVO.getPopId())); + return mainPopupLinkListVO; + } + + } \ No newline at end of file diff --git a/src/main/java/itn/com/uss/ion/pwm/service/impl/PopupManageDAO.java b/src/main/java/itn/com/uss/ion/pwm/service/impl/PopupManageDAO.java index 6b5e31a6..4e663210 100644 --- a/src/main/java/itn/com/uss/ion/pwm/service/impl/PopupManageDAO.java +++ b/src/main/java/itn/com/uss/ion/pwm/service/impl/PopupManageDAO.java @@ -5,6 +5,8 @@ import org.springframework.stereotype.Repository; import egovframework.rte.psl.dataaccess.util.EgovMap; import itn.com.cmm.service.impl.EgovComAbstractDAO; +import itn.com.uss.ion.bnr.pop.service.MainPopupLinkVO; +import itn.com.uss.ion.bnr.pop.service.MainPopupVO; import itn.com.uss.ion.pwm.service.MainzoneVO; import itn.com.uss.ion.pwm.service.PopupManageVO; import itn.com.uss.ion.pwm.service.PopupzoneVO; @@ -193,6 +195,10 @@ public class PopupManageDAO extends EgovComAbstractDAO { public void insertMainzone(MainzoneVO mainzoneVO) throws Exception{ insert("MainzoneManage.insertMainzone", mainzoneVO); } + + public void insertSubMainzone(MainzoneVO mainzoneVO) throws Exception{ + insert("MainzoneManage.insertSubMainzone", mainzoneVO); + } public void resetMainSort(MainzoneVO mainzoneVO) throws Exception{ insert("MainzoneManage.resetMainSort", mainzoneVO); @@ -223,6 +229,10 @@ public class PopupManageDAO extends EgovComAbstractDAO { update("MainzoneManage.updateMainzone", mainzoneVO); } + public void updateSubMainzone(MainzoneVO mainzoneVO) throws Exception{ + update("MainzoneManage.updateSubMainzone", mainzoneVO); + } + @SuppressWarnings("unchecked") public List selectMainzoneListRolling() throws Exception{ return (List) list("MainzoneManage.selectMainzoneListRolling"); @@ -243,6 +253,10 @@ public class PopupManageDAO extends EgovComAbstractDAO { public void resetMainVOSort(MainzoneVO mainzoneVO) throws Exception{ update("MainzoneManage.resetMainVOSort", mainzoneVO); } + + public void resetSubMainVOSort(MainzoneVO mainzoneVO) throws Exception{ + update("MainzoneManage.resetSubMainVOSort", mainzoneVO); + } @SuppressWarnings("unchecked") public List selectSocialList(SocialVO socialVO) throws Exception{ @@ -268,4 +282,30 @@ public class PopupManageDAO extends EgovComAbstractDAO { public void deleteSocial(String id) throws Exception{ delete("SocialManage.deleteSocial", id); } + + public void insertMainPopup(MainPopupVO mainPopupVO) { + insert("MainzoneManage.insertMainPopup", mainPopupVO); + } + + public void insertMainPopupLinkInfo(List mainPopupLinkListVO) { + insert("MainzoneManage.insertMainPopupLinkInfo", mainPopupLinkListVO); + } + + public void resetMainPopup(MainPopupVO mainPopupVO) { +// update("MainzoneManage.resetSubMainVOSort", mainzoneVO); + insert("MainzoneManage.resetMainPopup", mainPopupVO); + } + + public void updateMainPopup(MainPopupVO mainPopupVO) throws Exception{ + update("MainzoneManage.updateMainPopup", mainPopupVO); + } + + public void updateMainPopupLinkInfo(MainPopupLinkVO mainPopupLinkVO) { + update("MainzoneManage.updateMainPopupLinkInfo", mainPopupLinkVO); + + } + + public void deleteMainPopupLinkInfo(String popId) { + delete("MainzoneManage.deleteMainPopupLinkInfo", popId); + } } \ No newline at end of file diff --git a/src/main/java/itn/com/uss/ion/pwm/web/EgovPopupManageController.java b/src/main/java/itn/com/uss/ion/pwm/web/EgovPopupManageController.java index 872ddf51..d0b012fa 100644 --- a/src/main/java/itn/com/uss/ion/pwm/web/EgovPopupManageController.java +++ b/src/main/java/itn/com/uss/ion/pwm/web/EgovPopupManageController.java @@ -845,6 +845,8 @@ public class EgovPopupManageController { HttpServletRequest request, Model model, HttpSession session) throws Exception { + System.out.println("??????"); + MainzoneVO mainzoneVO = new MainzoneVO(); if("Modify".equals((String)commandMap.get("pageType"))){ //수정 String mazId = (String)commandMap.get("selectedId"); @@ -896,7 +898,8 @@ public class EgovPopupManageController { //model.addAttribute("sortList", sortList); model.addAttribute("mainzoneVO", mainzoneVO); - + + System.out.println("mainzoneVO :: "+ mainzoneVO.toString()); /* 타겟 코드 */ ComDefaultCodeVO vo = new ComDefaultCodeVO(); vo.setCodeId("COM037"); diff --git a/src/main/java/itn/let/mjo/pay/web/MjonPayController.java b/src/main/java/itn/let/mjo/pay/web/MjonPayController.java index d54a74e5..08267bdb 100644 --- a/src/main/java/itn/let/mjo/pay/web/MjonPayController.java +++ b/src/main/java/itn/let/mjo/pay/web/MjonPayController.java @@ -13,11 +13,9 @@ import java.nio.charset.Charset; import java.text.NumberFormat; import java.text.SimpleDateFormat; import java.time.LocalDate; -import java.time.LocalDateTime; import java.util.ArrayList; import java.util.Calendar; import java.util.Date; -import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; @@ -41,18 +39,12 @@ import org.json.simple.JSONObject; import org.json.simple.parser.JSONParser; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.ModelAttribute; -import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartHttpServletRequest; import org.springframework.web.servlet.HandlerMapping; @@ -67,7 +59,6 @@ import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo; import itn.com.cmm.ComDefaultCodeVO; import itn.com.cmm.EgovMessageSource; import itn.com.cmm.LoginVO; -import itn.com.cmm.RestResponse; import itn.com.cmm.service.EgovCmmUseService; import itn.com.cmm.service.FileVO; import itn.com.cmm.util.DateUtils; @@ -76,8 +67,6 @@ import itn.com.cmm.util.PayUtils; import itn.com.cmm.util.RedirectUrlMaker; import itn.com.cmm.util.StringUtil; import itn.com.utl.fcc.service.EgovStringUtil; -import itn.let.fax.admin.service.FaxStatVO; -import itn.let.mail.service.StatusResponse; import itn.let.mjo.mjocommon.MjonCommon; import itn.let.mjo.msg.service.MjonMsgService; import itn.let.mjo.msg.service.MjonMsgVO; @@ -107,6 +96,7 @@ import itn.let.uss.umt.service.EgovUserManageService; import itn.let.uss.umt.service.MberManageVO; import itn.let.uss.umt.service.UserManageVO; import itn.let.utl.fcc.service.EgovCryptoUtil; +import itn.let.utl.user.service.ExcelUtil; import itn.let.utl.user.service.MjonNoticeSendUtil; @Controller @@ -1952,7 +1942,6 @@ public class MjonPayController { model.addAttribute("prePaymentYn", userManageVO.getPrePaymentYn()); - System.out.println("pattern :: "+ pattern); if(pattern.equals("/web/member/pay/PayListAllAjax.do") || pattern.equals("/web/member/pay/PayListMobileAjax.do") @@ -2051,7 +2040,7 @@ public class MjonPayController { return "/web/pay/PayListRefundAjax"; } - + //일반 결제 페이지 처리 if("".equals(mjonPayVO.getSearchSortCnd())){ //최초조회시 최신것 조회List mjonPayVO.setSearchSortCnd("moid"); @@ -2073,7 +2062,7 @@ public class MjonPayController { } } - + if(pattern.equals("/web/member/pay/PayListAllAjax.do")) { //전체 mjonPayVO.setPageType("all"); } @@ -2121,7 +2110,7 @@ public class MjonPayController { // mjonPayVO.setStartDate(mjonPayVO.getStartDate() == null ? DateUtil.getDateDaysAgo(365) : mjonPayVO.getStartDate()); // mjonPayVO.setEndDate(mjonPayVO.getEndDate() == null ? DateUtil.getCurrentDate() : mjonPayVO.getEndDate()); - + if(!DateUtils.dateChkAndValueChk(mjonPayVO.getStartDate(),mjonPayVO.getEndDate(), 12 )) { mjonPayVO.setStartDate(DateUtils.getDateMonthsAgo(12)); mjonPayVO.setEndDate(DateUtils.getCurrentDate()); @@ -4085,7 +4074,7 @@ public class MjonPayController { } //결제 엑셀 다운로드 - @RequestMapping(value= {"/web/member/pay/PayExcelDownload.do"}) + @RequestMapping(value= {"/web/member/pay/PayExcelDownload_OLD.do"}) public void PayExcelDownload( MjonPayVO mjonPayVO, HttpServletRequest request, HttpServletResponse response , @@ -4180,6 +4169,118 @@ public class MjonPayController { } } + //결제 엑셀 다운로드 + @RequestMapping(value= {"/web/member/pay/PayExcelDownload.do"}) + public void PayNewExcelDownload( MjonPayVO mjonPayVO, + HttpServletRequest request, + HttpServletResponse response , + ModelMap model) throws Exception { + + //로그인 여부 체크 및 ID 획득 + LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null; + String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId()); + if(loginVO != null) { + + String fileName ="결제내역 엑셀 리스트"; //file name + + try{ + /** pageing */ + PaginationInfo paginationInfo = new PaginationInfo(); + paginationInfo.setCurrentPageNo(1); + paginationInfo.setRecordCountPerPage(10000); + paginationInfo.setPageSize(10); + + mjonPayVO.setFirstIndex(paginationInfo.getFirstRecordIndex()); + mjonPayVO.setLastIndex(paginationInfo.getLastRecordIndex()); + mjonPayVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage()); + + mjonPayVO.setUserId(userId); + + + //url에 따른 타입 처리 + String pattern = (String) request.getAttribute(HandlerMapping.BEST_MATCHING_PATTERN_ATTRIBUTE); + System.out.println("pattern========"); + System.out.println(pattern); + + //url에 따른 검색 조건 처리 + mjonPayVO = this.p_checkSearchCnd(pattern, mjonPayVO); + + + //검색 기간 처리 + mjonPayVO = this.p_checkSearchDate(mjonPayVO); + + + //정렬 처리 + mjonPayVO = this.p_checkSortCnd(mjonPayVO); + + + //결과 리스트 정보 불러오기 + List resultList = mjonPayService.selectPayList(mjonPayVO); + + //필요 컬럼 추가 + for (int i=0;i excelData = new ArrayList<>(); + excelData.addAll(resultList); + // 세팅값 + String title = "요금결제내역"; //sheet name & title + + // 너비 + int[] width = { + 4000 + , 4000 + , 4000 + , 4000 + , 4000 + + , 4000 + //, 4000 + , 4000 + }; + + // 헤더 + String[] header = { + "번호" + , "결제일시" + , "결제방식" + , "결제금액" + , "충전금액" + + , "결제상태" + //, "증빙서류 발행 요청" + , "비고1" + }; + + // 컬럼명 + String[] order = { + "SeqNo" + , "RegDate" + , "PayMethodTxt" + , "Amt" + , "Cash" + + , "PgStatusTxt" + //, "RcptTypeTxt" + , "VbankNum" + + }; + + // 호출 - download file 처리 + SXSSFWorkbook workbook = ExcelUtil.makeSimpleFruitExcelWorkbook(excelData , header, order, width, title); + response = this.p_makeResponse(response, fileName); + workbook.write(response.getOutputStream()); + + }catch(Exception e) { + e.printStackTrace(); + } + + } + + } //포인트 교환내역 엑셀 다운로드 @RequestMapping(value= {"/web/member/pay/PointExcelDownload.do"}) @@ -6088,6 +6189,119 @@ public class MjonPayController { model.addAttribute("paginationInfo", paginationInfo); return "/uss/ion/pay/cashPointSendList"; - } + } + + /** + * @param p_pattern + * @param p_mjonPayVO + * @return + * @throws Exception + */ + private MjonPayVO p_checkSearchCnd( + String p_pattern + , MjonPayVO p_mjonPayVO + ) throws Exception{ + if(p_pattern.equals("/web/member/pay/PayListAllAjax.do")) { //전체 + p_mjonPayVO.setPageType("all"); + } + if(p_pattern.equals("/web/member/pay/PayListMobileAjax.do")) { //모바일일때 + p_mjonPayVO.setSearchCondition2("CELLPHONE"); + p_mjonPayVO.setPayMethod("CELLPHONE"); + p_mjonPayVO.setPageType("cellphone"); + } + if(p_pattern.equals("/web/member/pay/PayListCardAjax.do")) { //신용카드 + p_mjonPayVO.setSearchCondition2("CARD"); + p_mjonPayVO.setPayMethod("CARD"); + p_mjonPayVO.setPageType("card"); + } + if(p_pattern.equals("/web/member/pay/PayListVBankAjax.do")) { //전용계좌 + p_mjonPayVO.setSearchCondition2("VBANK"); + p_mjonPayVO.setPayMethod("VBANK"); + p_mjonPayVO.setPageType("vbank"); + } + if(p_pattern.equals("/web/member/pay/PayListBankAjax.do")) { //즉시이체 + p_mjonPayVO.setSearchCondition2("BANK"); + p_mjonPayVO.setPayMethod("BANK"); + p_mjonPayVO.setPageType("bank"); + } + if(p_pattern.equals("/web/member/pay/PayListSPayAjax.do")) { //즉시이체 + p_mjonPayVO.setSearchCondition2("SPAY"); + p_mjonPayVO.setPayMethod("SPAY"); + p_mjonPayVO.setPageType("SPAY"); + } + if(p_pattern.equals("/web/member/pay/PayListOfflineAjax.do")) { //무통장 + p_mjonPayVO.setSearchCondition2("OFFLINE"); + p_mjonPayVO.setPayMethod("OFFLINE"); + p_mjonPayVO.setPageType("offline"); + } + + return p_mjonPayVO; + } + + /** + * @param p_mjonPayVO + * @return + * @throws Exception + */ + private MjonPayVO p_checkSortCnd( + MjonPayVO p_mjonPayVO + ) throws Exception{ + //정렬 처리 + if("".equals(p_mjonPayVO.getSearchSortCnd())){ //최초조회시 최신것 조회List + p_mjonPayVO.setSearchSortCnd("moid"); + p_mjonPayVO.setSearchSortOrd("desc"); + }else {//포인트 교환내역에서 정렬 종류가 달라서 변환처리 해줌 + + String sortCnt = p_mjonPayVO.getSearchSortCnd(); + + if(sortCnt.equals("pointUseId") || sortCnt.equals("refundId")) { + p_mjonPayVO.setSearchSortCnd("moid"); + }else if(sortCnt.equals("frstRegistPnttm") || sortCnt.equals("frstRegisterPnttm") || sortCnt.equals("refundHandlePnttm")) { + p_mjonPayVO.setSearchSortCnd("regDate"); + }else if(sortCnt.equals("type")) { + p_mjonPayVO.setSearchSortCnd("payMethodTxt"); + }else if(sortCnt.equals("point") || sortCnt.equals("refundMoney") || sortCnt.equals("refundCash")) { + p_mjonPayVO.setSearchSortCnd("amt"); + }else if(sortCnt.equals("cmpltYn") || sortCnt.equals("refundStatus")) { + p_mjonPayVO.setSearchSortCnd("pgStatusTxt"); + } + + } + + return p_mjonPayVO; + } + + /** + * @param p_mjonPayVO + * @return + * @throws Exception + */ + private MjonPayVO p_checkSearchDate( + MjonPayVO p_mjonPayVO + ) throws Exception{ + //검색 기간 처리 + if(!DateUtils.dateChkAndValueChk(p_mjonPayVO.getStartDate(),p_mjonPayVO.getEndDate(), 12 )) + { + p_mjonPayVO.setStartDate(DateUtils.getDateMonthsAgo(12)); + p_mjonPayVO.setEndDate(DateUtils.getCurrentDate()); + } + + return p_mjonPayVO; + } + + private HttpServletResponse p_makeResponse( + HttpServletResponse p_response + , String p_fileName + ) throws Exception{ + p_response.setHeader("Set-Cookie", "fileDownload=true; path=/"); + SimpleDateFormat mSimpleDateFormat = new SimpleDateFormat ( "yyyy_MM_dd_HH_mm_ss", Locale.KOREA ); + Date currentTime = new Date (); + String mTime = mSimpleDateFormat.format ( currentTime ); + p_fileName = p_fileName+"("+mTime+")"; + + p_response.setHeader("Content-Disposition", String.format("attachment; filename=\""+new String((p_fileName).getBytes("KSC5601"),"8859_1")+".xlsx")); + + return p_response; + } } diff --git a/src/main/java/itn/let/utl/user/service/ExcelUtil.java b/src/main/java/itn/let/utl/user/service/ExcelUtil.java new file mode 100644 index 00000000..5a83eb2b --- /dev/null +++ b/src/main/java/itn/let/utl/user/service/ExcelUtil.java @@ -0,0 +1,143 @@ +package itn.let.utl.user.service; + +import java.beans.PropertyDescriptor; +import java.lang.reflect.Method; +import java.util.List; + +import org.apache.poi.hssf.usermodel.HSSFCellStyle; +import org.apache.poi.hssf.usermodel.HSSFDataFormat; +import org.apache.poi.ss.usermodel.Cell; +import org.apache.poi.ss.usermodel.CellStyle; +import org.apache.poi.ss.usermodel.HorizontalAlignment; +import org.apache.poi.ss.usermodel.Row; +import org.apache.poi.ss.usermodel.VerticalAlignment; +import org.apache.poi.xssf.streaming.SXSSFSheet; +import org.apache.poi.xssf.streaming.SXSSFWorkbook; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; + +@Component +public class ExcelUtil { + private static final Logger log = LoggerFactory.getLogger(ExcelUtil.class); + + /** + * 엑셀 파일을 방출합니다. + * + * @param voList 엑셀에 넣고 싶은 vo 리스트 형태로 넣습니다. + * @param header 엑셀 해더 + * @param order 헤더에 해당하는 내용의 vo 필드 이름을 작성합니다. 예를 들어 String userName; 필드의 1번째 해더이름을 "사용자 이름" 으로 정했으면 + * 순서를 맞추어 1번째 order 배열에 "UserName" 이라는 글짜를 입력해줍니다(*주의:첫 문자는 대문자, 낙타체). 첫번째 컬럼에는 "줄번호"가 + * 들어가는데, 이것에 대한 내용은 order에 값을 입력하지 않습니다. + * @param width 컬럼 너비를 설정합니다. length가 해더의 length와 일치할 필요는 없습니다. + * @param title + * @throws Exception + * @return SXSSFSheet + * + * 특징 : 해더보다 내용의 컬럼수가 많을 때 해당 줄의 컬럼은 cut, 해더 이름이 vo와 다르게 되면 해당 컬럼 출력 안됨 require : 날짜 포멧은 + * 지원하지 않습니다. + * + * + * *********************************************************************************************** + * EX String title = "게시판 리스트"; + * int[] width = {1500, 1500, 1500, 3000, 30000, 3000 }; + * String[] header = {"번호", "게시판번호", "작성자", "제목", "내용", "작성일" }; + * String[] order = { "Seq", "UserId", "Title", "Content", "RegDt" }; + * => 첫번째 "번호"에 대한 order 이름이 비어있습니다. + * + * *********************************************************************************************** + */ + public static SXSSFWorkbook makeSimpleFruitExcelWorkbook(List voList, String[] header, String[] order, int[] width, String title) throws Exception { + // 시트 생성 + SXSSFWorkbook workbook = new SXSSFWorkbook(); + SXSSFSheet sheet = workbook.createSheet(title); + for (int i = 0; i < width.length; i++) { + // JSP 2022.02.24 => width 변경 + //sheet.setColumnWidth(0, width[width.length - (i + 1)]); + sheet.setColumnWidth(i, width[i]); + } + + int r = 2;// 줄부터 찍기 + + CellStyle headerstyle = workbook.createCellStyle(); + headerstyle.setAlignment(HorizontalAlignment.CENTER); + headerstyle.setVerticalAlignment(VerticalAlignment.CENTER); + headerstyle.setBorderBottom(HSSFCellStyle.BORDER_THIN); + // 헤더 행 생 + Row headerRow = sheet.createRow(r); + // 해더 값 채움 (우측 방향으로) + Cell headerCell = null; + for (int i = 0; i < header.length; i++) { + headerRow.setHeight((short)512); + + headerCell = headerRow.createCell(i); + headerCell.setCellStyle(headerstyle); + headerCell.setCellValue(header[i]); + } + + // 내용 행 및 셀 생성 + Row bodyRow = null; + Cell bodyCell = null; + + bodyRow = sheet.createRow(0); + bodyCell = bodyRow.createCell(0); + bodyCell.setCellValue(title);// 읽어온 데이터 표시 + + //System.out.println("voList.size()"); + //System.out.println(voList.size()); + //System.out.println(voList.size()); + + int c = 0;// 컬럼 + for (Object vo : voList) { + bodyRow = sheet.createRow(r + 1); + bodyCell = bodyRow.createCell(0); + //bodyCell.setCellValue(r + 1); // 첫 컬럼은 줄 번호 + + PropertyDescriptor pd; // 클래스의 필드 메소드를 찾아줌. 이름을 기존에 vo.setUserId() 란 메소드를 통해서만 호출이 가능 했다면, PropertyDescriptor는 이름만으로 메소드 + // 호출이 가능함. 클래스가 변경 되어도 동일한 작동으로 getter&setter 호출이 가능하도록 도와줌 + Method[] methods = vo.getClass().getDeclaredMethods(); // 메소드들 호출함 + // 배열로 준 이름 과 같으면 해당 열 데이터 쓰기 + for (int i = 0; i < order.length; i++) { + for (Method method : methods) { // vo 내부 메소드 반복 + +// System.out.println("i :: "+ i + "methods : "+ methods); + /*System.out.println("voList.method()"); + System.out.println(method.getName());*/ + + if (method.getName().equals("get" + (order[i] == null ? "" : order[i]))) { // vo메소드 이름과 order의 이름 비교 + // getter 호출 준비 + String getMethodName = method.getName().substring(3); // getter의 이름 가져옴 + pd = new PropertyDescriptor(getMethodName, vo.getClass()); + // vo의 데이터 세팅 + String cellData = (pd.getReadMethod().invoke(vo) != null ? pd.getReadMethod().invoke(vo) : "").toString(); + bodyCell = bodyRow.createCell(c++); // 데이터 순서 + if(getMethodName.equals("InstrFee") || getMethodName.equals("SpecialWorkAllow") || getMethodName.equals("DistanceAllow") + || getMethodName.equals("TrafficFee") || getMethodName.equals("AcmdtFee") + || getMethodName.equals("Amt") || getMethodName.equals("Cash") + ){ + + // JSP 2022.02.22 => null 에러 try~catch 문 추가 + try { + double num = Double.parseDouble(cellData); + CellStyle bodyStyle = workbook.createCellStyle(); + bodyCell.setCellValue(num);// 읽어온 데이터 표시 + bodyStyle.setDataFormat(HSSFDataFormat.getBuiltinFormat("#,##0")); + bodyCell.setCellStyle(bodyStyle); + } + catch (Exception ex) { + bodyCell.setCellValue(cellData); + } + }else { + bodyCell.setCellValue(cellData);// 읽어온 데이터 표시 + } + //System.out.println("@@ : "+getMethodName +" --- " + cellData); + } + } + } + c = 0; + r++; + } + return workbook; + } + +} diff --git a/src/main/java/itn/web/MainController.java b/src/main/java/itn/web/MainController.java index 38de9d90..cfaf8028 100644 --- a/src/main/java/itn/web/MainController.java +++ b/src/main/java/itn/web/MainController.java @@ -78,8 +78,11 @@ import itn.com.cmm.service.EgovFileMngUtil; import itn.com.cmm.service.FileVO; import itn.com.cmm.util.StringUtil; import itn.com.cmm.util.WebUtil; +import itn.com.uss.ion.bnr.pop.service.MainPopupManageService; +import itn.com.uss.ion.bnr.pop.service.MainPopupVO; import itn.com.uss.ion.bnr.service.BannerVO; import itn.com.uss.ion.bnr.service.EgovBannerService; +import itn.com.uss.ion.bnr.sub.service.SubMainZoneManageService; import itn.com.uss.ion.cnf.service.MetaTagManageService; import itn.com.uss.ion.cyb.service.CyberAlertManageService; import itn.com.uss.ion.cyb.service.CyberAlertManageVO; @@ -262,6 +265,13 @@ public class MainController { @Resource(name = "mjonCandidateService") private MjonCandidateService mjonCandidateService; + + @Resource(name = "subMainZoneManageService") + private SubMainZoneManageService subMainZoneManageService; + + /** 메인팝업 service */ + @Resource(name = "mainPopupManageService") + private MainPopupManageService mainPopupManageService; @Value("#{globalSettings['Globals.email.host']}") @@ -689,6 +699,22 @@ public class MainController { } + {//하단 서브메인배너 롤링 이미지 불러오기 + + List resultSubMainzoneList = subMainZoneManageService.selectSubMainzoneListRolling(); + model.addAttribute("subMainzoneList", resultSubMainzoneList); + + } + + + {//팝업 롤링 이미지 불러오기 + + List resultMainPopupList = mainPopupManageService.selectMainPopupListRolling(); + model.addAttribute("mainPopupList", resultMainPopupList); + System.out.println("===================mainPopupList"); + + } + return "web/main/mainPage"; } diff --git a/src/main/resources/egovframework/spring/com/context-idgen.xml b/src/main/resources/egovframework/spring/com/context-idgen.xml index 29478fda..736abf18 100644 --- a/src/main/resources/egovframework/spring/com/context-idgen.xml +++ b/src/main/resources/egovframework/spring/com/context-idgen.xml @@ -2002,6 +2002,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/egovframework/sqlmap/let/uss/ion/bnr/MainPopupManage_SQL_Mysql.xml b/src/main/resources/egovframework/sqlmap/let/uss/ion/bnr/MainPopupManage_SQL_Mysql.xml new file mode 100644 index 00000000..472c3737 --- /dev/null +++ b/src/main/resources/egovframework/sqlmap/let/uss/ion/bnr/MainPopupManage_SQL_Mysql.xml @@ -0,0 +1,231 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DELETE FROM MAIN_POPUP WHERE POP_ID=#popId# + + + + /* mainPopup.deleteMainPopupLinkInfo */ + + DELETE FROM MAIN_POPUP_LINK + WHERE + POP_ID=#popId# + AND + POP_LINK_ID = #popLinkId# + + + + + /*mainPopup.resetMainPopupSort*/ + + UPDATE MAIN_POPUP A , + (SELECT ROW_NUMBER() OVER(ORDER BY SORT + + , MODDT ASC + + + , MODDT DESC + + ) AS SORT1 , POP_ID FROM MAIN_POPUP + WHERE 1=1 + ORDER BY SORT1 + ) B + SET A.SORT = B.SORT1 + WHERE A.POP_ID = B.POP_ID + + + + \ No newline at end of file diff --git a/src/main/resources/egovframework/sqlmap/let/uss/ion/bnr/SubMainZoneManage_SQL_Mysql.xml b/src/main/resources/egovframework/sqlmap/let/uss/ion/bnr/SubMainZoneManage_SQL_Mysql.xml new file mode 100644 index 00000000..e59dd231 --- /dev/null +++ b/src/main/resources/egovframework/sqlmap/let/uss/ion/bnr/SubMainZoneManage_SQL_Mysql.xml @@ -0,0 +1,205 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DELETE FROM SUB_MAINZONE WHERE MAZ_ID=#mazId# + + + + + UPDATE SUB_MAINZONE A , + (SELECT ROW_NUMBER() OVER(ORDER BY SORT + + , MODDT ASC + + + , MODDT DESC + + ) AS SORT1 , MAZ_ID FROM SUB_MAINZONE + WHERE 1=1 + ORDER BY SORT1 + ) B + SET A.SORT = B.SORT1 + WHERE A.MAZ_ID = B.MAZ_ID + + + + \ No newline at end of file diff --git a/src/main/resources/egovframework/sqlmap/let/uss/pwm/PopupManage_SQL_Mysql.xml b/src/main/resources/egovframework/sqlmap/let/uss/pwm/PopupManage_SQL_Mysql.xml index a2e2054f..45219fc3 100644 --- a/src/main/resources/egovframework/sqlmap/let/uss/pwm/PopupManage_SQL_Mysql.xml +++ b/src/main/resources/egovframework/sqlmap/let/uss/pwm/PopupManage_SQL_Mysql.xml @@ -12,6 +12,10 @@ + + + + @@ -605,6 +609,56 @@ ) + + INSERT INTO SUB_MAINZONE ( + MAZ_ID, + UPFILE, + CONTENT, + MLINK, + ISTARGET, + REGDT, + MODDT, + DEL, + SORT, + MAINZONE_IMAGE, + MAINZONE_IMAGE_FILE, + MAZ_NM, + USE_YN, + + DEVICETYPE, + + REGISTER_ID, + NTCE_BGNDE, + NTCE_ENDDE, + TOP_TXT, + LOW_TXT + ) VALUES ( + #mazId#, + #upfile#, + #content#, + #mlink#, + #istarget#, + now(), + now(), + #del#, + #sort#, + #mainzoneImage#, + #mainzoneImageFile#, + #mazNm#, + #useYn#, + + #deviceType#, + + #registerId#, + #ntceBgnde#, + #ntceEndde#, + #topTxt#, + #lowTxt# + ) + + + + UPDATE MAINZONE A , (SELECT ROW_NUMBER() OVER(ORDER BY SORT) AS SORT1 , MAZ_ID FROM MAINZONE WHERE 1=1 @@ -690,6 +744,28 @@ WHERE MAZ_ID=#mazId# + + UPDATE SUB_MAINZONE SET + UPFILE=#upfile#, + CONTENT=#content#, + MLINK=#mlink#, + ISTARGET=#istarget#, + SORT=#sort#, + MAINZONE_IMAGE = #mainzoneImage#, + MAINZONE_IMAGE_FILE = #mainzoneImageFile#, + USE_YN = #useYn#, + MAZ_NM = #mazNm# , + + DEVICETYPE = #deviceType# , + + NTCE_BGNDE = #ntceBgnde#, + NTCE_ENDDE = #ntceEndde#, + TOP_TXT = #topTxt#, + LOW_TXT = #lowTxt#, + MODDT = now() + WHERE MAZ_ID=#mazId# + + @@ -914,7 +1028,8 @@ MZ.CONTENT AS content, MZ.SORT AS sort, MZ.MAINZONE_IMAGE_FILE AS mainzoneImageFile, - MZ.MAZ_NM AS mazNm + MZ.MAZ_NM AS mazNm, + MZ.MLINK AS mlink FROM MAINZONE MZ WHERE MZ.NTCE_BGNDE IS NOT NULL AND MZ.NTCE_ENDDE IS NOT NULL @@ -926,7 +1041,95 @@ AND MZ.USE_YN = 'Y' ORDER BY MZ.SORT - + + + INSERT INTO MAIN_POPUP ( + POP_ID + , CONTENT + , SORT + , DEL + , MAINZONE_IMAGE_FILE + , MAINZONE_IMAGE + , REGDT + , MODDT + , POP_NM + , USE_YN + , REGISTER_ID + , DEVICETYPE + , NTCE_BGNDE + , NTCE_ENDDE + ) VALUES ( + #popId# + , #content# + , #sort# + , #del# + , #mainzoneImageFile# + , #mainzoneImage# + , now() + , now() + , #popNm# + , #useYn# + , #registerId# + , #devicetype# + , #ntceBgnde# + , #ntceEndde# + ) + + + + INSERT INTO MAIN_POPUP_LINK ( + POP_ID + , MLINK + , COORDS + ) + VALUES + + ( + #[].popId# + , #[].mlink# + , #[].coords# + ) + + + + + + + + UPDATE MAIN_POPUP + SET + CONTENT = #content#, + SORT = #sort#, + DEL = #del#, + MAINZONE_IMAGE_FILE = #mainzoneImageFile#, + MAINZONE_IMAGE = #mainzoneImage#, + MODDT = now(), + POP_NM = #popNm#, + USE_YN = #useYn#, + + DEVICETYPE = #deviceType# , + + NTCE_BGNDE = #ntceBgnde#, + NTCE_ENDDE = #ntceEndde# + WHERE POP_ID = #popId# + + + + UPDATE MAIN_POPUP_LINK + SET + MLINK = #mlink# + , COORDS = #coords# + WHERE POP_ID = #popId# + + + + + + DELETE FROM MAIN_POPUP_LINK + WHERE POP_ID = #popId# + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/uss/ion/bnr/pop/mainPopupList.jsp b/src/main/webapp/WEB-INF/jsp/uss/ion/bnr/pop/mainPopupList.jsp new file mode 100644 index 00000000..9ae85bd7 --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/uss/ion/bnr/pop/mainPopupList.jsp @@ -0,0 +1,236 @@ +<%-- + Class Name : EgovPopupList.jsp + Description : 팝업창관리 목록 페이지 + Modification Information + + 수정일 수정자 수정내용 + ------- -------- --------------------------- + 2009.09.16 장동한 최초 생성 + + author : 공통서비스 개발팀 장동한 + since : 2009.09.16 + + Copyright (C) 2009 by MOPAS All right reserved. +--%> +<%@ page contentType="text/html; charset=utf-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> +<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> + + + +메인이미지 관리 + + + + +
+ + + +
+
+
+

팝업 관리

+

사용자 메인 팝업에 적용되는 이미지를 등록, 수정, 삭제할 수 있습니다.

+
+
+
+ + + + + + +
+
+

+
+ + +
+
+
+
    + +
  • +
    +<%--
    --%> +
      +
    • + + 사용 + + + 미사용 + +
    • +
    +
    " alt="">
    + <%--
    " alt="">
    --%> +
    +

    ${result.mazNm}

    + + + + + + + + +
    작성자 : ${result.registerId}
    노출순서 : ${result.sort}${result.ntceBgnde} ~ ${result.ntceEndde}
    +
    +
  • +
    +
+ +
+
+
+
+ +
+
+ + +
+ + +
+
    + +
+
+
+ +
+
+
+
+ + +
+
+ + + + +
+ + diff --git a/src/main/webapp/WEB-INF/jsp/uss/ion/bnr/pop/mainPopupModify.jsp b/src/main/webapp/WEB-INF/jsp/uss/ion/bnr/pop/mainPopupModify.jsp new file mode 100644 index 00000000..ef23eab8 --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/uss/ion/bnr/pop/mainPopupModify.jsp @@ -0,0 +1,622 @@ +<%-- + Class Name : EgovPopupList.jsp + Description : 팝업창관리 목록 페이지 + Modification Information + + 수정일 수정자 수정내용 + ------- -------- --------------------------- + 2009.09.16 장동한 최초 생성 + + author : 공통서비스 개발팀 장동한 + since : 2009.09.16 + + Copyright (C) 2009 by MOPAS All right reserved. +--%> +<%@ page contentType="text/html; charset=utf-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> +<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> +<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> + + + +팝업창관리 관리 + + + + + + + + + + + + + + + + + + + + + + +
+
+
+

팝업 등록/수정

+

사용자 메인 팝업에 적용되는 이미지를 등록, 수정, 삭제할 수 있습니다.

+
+ +
+
+

*는 필수입력 항목입니다.

+ + + + + + + + + + + + + + + + + + + + + + <%-- ${mainPopupVO.deviceType eq 'P' or mainPopupVO.deviceType eq '' ? 'checked="checked"' : ''} --%> + + + <%-- ${mainPopupVO.deviceType eq 'M' ? 'checked="checked"' : ''} --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- + + + --%> + + + + + + + + + + + + +
원본이미지 + +
+
+ + ${mainPopupVO.content}?atchFileId=' style="max-width:300px;padding: 10px;" /> + <%-- ${mainPopupVO.content}?atchFileId=' style="max-width:600px;" /> --%> + +
비주얼명 + +
사용여부 + + + + +
노출순서 + +
게시기간 + + --" readonly> + + + + <%-- 달력창팝업버튼이미지 --%> + + + + 시 + + + 분 +   ~   + --" readonly> + + + <%-- 달력창팝업버튼이미지 --%> + + + + 시 + + + 분 +
[${status.index + 1}]링크주소 + + 링크좌표 + + + +
+ +
파일 첨부 +
+ + + + + + + + + + + + + + + +
파일명크기등록일시삭제
+
+ +
+
    +
  • +

    0개 | 0MB

    +
  • +
  • +

    최대 개 | 50MB제한

    +
  • +
+
+
+ + +
+
대체텍스트 + +
*첨부 파일 + + + + + + + + +
최종수정일 + ${mainPopupVO.moddt} +
작성자 + ${mainPopupVO.registerId} +
+
+
+ + + + + + + + +
+
+
+
+
+ + diff --git a/src/main/webapp/WEB-INF/jsp/uss/ion/bnr/sub/subMainZoneList.jsp b/src/main/webapp/WEB-INF/jsp/uss/ion/bnr/sub/subMainZoneList.jsp new file mode 100644 index 00000000..63dcb960 --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/uss/ion/bnr/sub/subMainZoneList.jsp @@ -0,0 +1,254 @@ +<%-- + Class Name : EgovPopupList.jsp + Description : 팝업창관리 목록 페이지 + Modification Information + + 수정일 수정자 수정내용 + ------- -------- --------------------------- + 2009.09.16 장동한 최초 생성 + + author : 공통서비스 개발팀 장동한 + since : 2009.09.16 + + Copyright (C) 2009 by MOPAS All right reserved. +--%> +<%@ page contentType="text/html; charset=utf-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> +<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> +<% + response.setHeader("Cache-Control","no-store"); + response.setHeader("Pragma","no-cache"); + response.setDateHeader("Expires",0); + if (request.getProtocol().equals("HTTP/1.1")) response.setHeader("Cache-Control", "no-cache"); +%> + + + + + + +메인이미지 관리 + + + + +
+ + + +
+
+
+

서비스안내 배너관리

+

사이트별로 사용자 메인 상단에 적용되는 (하단)비주얼 이미지를 등록, 수정, 삭제할 수 있습니다.

+
+
+
+ + + + + + +
+
+

+
+ + +
+
+
+
    + +
  • +
    +<%--
    --%> +
      + + + +
    • + +
    • +
      +
      +
      +
    • + + 사용 + + + 미사용 + +
    • +
    +
    " alt="">
    + <%--
    " alt="">
    --%> +
    +

    ${result.mazNm}

    + + + + + + + + +
    작성자 : ${result.registerId}
    노출순서 : ${result.sort}${result.ntceBgnde} ~ ${result.ntceEndde}
    +
    +
  • +
    +
+ +
+
+
+
+ +
+
+ + +
+ + +
+
    + +
+
+
+ +
+
+
+
+ + +
+
+ + + + +
+ + diff --git a/src/main/webapp/WEB-INF/jsp/uss/ion/bnr/sub/subMainZoneModify.jsp b/src/main/webapp/WEB-INF/jsp/uss/ion/bnr/sub/subMainZoneModify.jsp new file mode 100644 index 00000000..8b805b44 --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/uss/ion/bnr/sub/subMainZoneModify.jsp @@ -0,0 +1,583 @@ +<%-- + Class Name : EgovPopupList.jsp + Description : 팝업창관리 목록 페이지 + Modification Information + + 수정일 수정자 수정내용 + ------- -------- --------------------------- + 2009.09.16 장동한 최초 생성 + + author : 공통서비스 개발팀 장동한 + since : 2009.09.16 + + Copyright (C) 2009 by MOPAS All right reserved. +--%> +<%@ page contentType="text/html; charset=utf-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> +<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> +<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> +<% + response.setHeader("Cache-Control","no-store"); + response.setHeader("Pragma","no-cache"); + response.setDateHeader("Expires",0); + if (request.getProtocol().equals("HTTP/1.1")) response.setHeader("Cache-Control", "no-cache"); +%> + + + + + + +팝업창관리 관리 + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+

서비스안내 배너관리 등록/수정

+

사이트별로 사용자 메인 상단에 적용되는 비주얼 이미지를 등록, 수정, 삭제할 수 있습니다.

+
+ +
+
+

*는 필수입력 항목입니다.

+ + + + + + + <%-- + + + --%> + + + + + + + + + + + + + + + + + + <%-- ${mainzoneVO.deviceType eq 'P' or mainzoneVO.deviceType eq '' ? 'checked="checked"' : ''} --%> + + + <%-- ${mainzoneVO.deviceType eq 'M' ? 'checked="checked"' : ''} --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- + + + --%> + + + + + + + + + + + + +
메인화면에 보이는 메인 이미지 + + 등록된 메인 이미지가 없습니다. + + + ${mainzoneVO.content}?atchFileId=' width="196" height="237" /> + +
사이트 + +
원본이미지 + +
+
+ + ${mainzoneVO.content}?atchFileId=' style="max-width:300px;padding: 10px;" /> + <%-- ${mainzoneVO.content}?atchFileId=' style="max-width:600px;" /> --%> + +
비주얼명 + +
사용여부 + + +
노출순서 + +
게시기간 + + --" readonly> + + + + <%-- 달력창팝업버튼이미지 --%> + + + + 시 + + + 분 +   ~   + --" readonly> + + + <%-- 달력창팝업버튼이미지 --%> + + + + 시 + + + 분 +
상단텍스트 + +
하단텍스트 + +
링크주소 + +
파일 첨부 +
+ + + + + + + + + + + + + + + +
파일명크기등록일시삭제
+
+ +
+
    +
  • +

    0개 | 0MB

    +
  • +
  • +

    최대 개 | 50MB제한

    +
  • +
+
+
+ + +
+
대체텍스트 + +
*첨부 파일 + + + + + + + + +
최종수정일 + ${mainzoneVO.moddt} +
작성자 + ${mainzoneVO.registerId} +
+
+
+ + + + + + + + +
+
+
+
+
+ + diff --git a/src/main/webapp/WEB-INF/jsp/uss/ion/pwm/MainZoneModify.jsp b/src/main/webapp/WEB-INF/jsp/uss/ion/pwm/MainZoneModify.jsp index 939951cb..135d43bb 100644 --- a/src/main/webapp/WEB-INF/jsp/uss/ion/pwm/MainZoneModify.jsp +++ b/src/main/webapp/WEB-INF/jsp/uss/ion/pwm/MainZoneModify.jsp @@ -37,10 +37,82 @@ - - - - - - - - - - - - -
- - -
- - ${result.mazNm}?atchFileId=' - - onclick="window.open('${result.mlink}', '_blank');" - - /> - -
- - - - -
-
-
-
공지
- -
-
    - -
  • - - - - ${result.frstRegisterPnttm}
  • -
    -
-
-
-
-
사업
- -
-
    - -
  • - - - - ${result.frstRegisterPnttm}
  • -
    -
-
-
-
-
입찰
- -
-
    - -
  • - - - - ${result.frstRegisterPnttm}
  • -
    -
-
-
- -
-
채용
- -
-
    - -
  • - - - - ${result.frstRegisterPnttm}
  • -
    -
-
-
-
-
- -
-
    -
  • 공지
  • -
  • 입찰
  • -
  • 사업
  • -
  • 채용
  • -
- - -
-
- -
-
    - -
  • - - - - ${result.frstRegisterPnttm}
  • -
    -
-
-
-
- - -
-
- -
-
    - -
  • - - - - ${result.frstRegisterPnttm}
  • -
    -
-
-
-
- - -
-
- -
-
    - -
  • - - - - ${result.frstRegisterPnttm}
  • -
    -
-
-
- - -
- - -
-
- -
-
    - -
  • - - - - ${result.frstRegisterPnttm}
  • -
    -
-
-
-
-
- - -
-
아이콘 한국공예디자인문화진흥원 소식
-
-
    - -
  • -
    ); cursor:pointer;" - - onclick="javascript:location.href='${result.mlink}';" - - - onclick="window.open('${result.mlink}', '_blank');" - - > -
    -
  • -
    -
-
- - -
- -
-
- -
-
아이콘 KCDF 갤러리 안내
-
-
    -
  • KCDF 갤러리 소개
  • -
  • KCDF 갤러리 대관신청
  • -
  • KCDF 도서관 바로가기
  • -
  • KCDF 온라인샵 바로가기
  • -
-
-
- - -
-
아이콘 KCDF 갤러리 전시
-
-
    - -
  • -
    );" - - onclick="javascript:location.href='${result.mlink}';" - - - onclick="window.open('${result.mlink}', '_blank');" - - > -
    -
  • -
    -
-
- - -
- -
- -
-
아이콘 한국공예디자인문화진흥원 블로그
-
    - -
  • ') no-repeat center #f3f3f3; background-size:cover;cursor:pointer;" - - onclick="javascript:location.href='${result.mlink}';" - - - onclick="window.open('${result.mlink}', '_blank');" - - > -
    ${result.pozNm}
  • -
    -
-
- - - -
-
') no-repeat center; background-size:contain;">
- -
-
우수문화상품지정제
-
- 우수문화상품 지정제도는 - 한국의 문화적 가치를 담은 우수문화상품을 - 지정하여 한복의 옷고름 모양을 딴 - K-ribbon 마크를 부착하고, 체계적인 - 관리와 브랜드마케팅을 통해 - ‘코리아프리미엄’을 창출하고자 하는 - 제도 입니다. -

2015년 11월 부터 시행되었으며, - 문화콘텐츠, 한복, 공예품, 한식·식품 등 - 한국을 대표할 수 있는 문화상품들을 - 대상으로 합니다.

-
-
-
- -
- - -
-
') no-repeat center; background-size:contain">
- -
- 「공예+디자인」은
- 한국공예디자인문화진흥원이
- 격월로 발행하는 공예·디자인
- 전문간행물입니다. -
-
공예 + 디자인 격월발행
-
-
-
-
-
- - - -
- -
- - -
- -
- - - -
- - - - - - - -
-
-
- - ${popupListData.nttCn} -
- Close -
- 하루동안 창을 열지 않음 -
- -
-
-
-
-
-
- - - diff --git a/src/main/webapp/WEB-INF/jsp/web/main/mainPage.jsp b/src/main/webapp/WEB-INF/jsp/web/main/mainPage.jsp index b4b9bfc6..8ea353ef 100644 --- a/src/main/webapp/WEB-INF/jsp/web/main/mainPage.jsp +++ b/src/main/webapp/WEB-INF/jsp/web/main/mainPage.jsp @@ -13,138 +13,18 @@ + + + + + + + + + +<%-- --%> + +
+ + + +
+ + + + + +
+ +
+ + + + +
+ +
+ +
+
+ + + + +
+ +
+ +
+
+ + + + +
+
+
+ + + +
+
+ + + + <c:out value='${mainzone.content}'/> + + + +
+
+
+
+ + <%-- 메인 배너 이미지 등록된 건이 없는 경우 기본적으로 나오는 이미지 3개 --%> + +
+
문자온, 카카오 '알림톡' 서비스 오픈! 문자온 알림톡, 대한민국 최저가 선언! 조건없이 무조건 6.9원! 카카오톡 채널아이디 추가를 하지 않은 이용자에게도 카카오톡 메시지 발송이 가능한 서비스! 알림톡 바로가기 알림톡 도착 kakao 문자온에서 알림톡이 도착하였습니다! 기업전용/1,000자 이하 텍스트 & 이미지/문자 대비 65% 저렴
+
+
+
+
문자도 보내고! 현금도 챙기는! 문자온만의 특별한 혜택! 결제금액의 2% 포인트 추가 적립! 포인트 1만점 이상 적립 시 현금페이백
+
+
+
문자는 이제, 문자온! 선택은 역시 문자온! 문자사이트 선택의 5가지 기준 1. 가격, 속도, 성능, 기능, 보안이 보장되는가? 2. 결제, 정산, 계산서 발행 등 업무가 자동화 되어 있고 편리한가? 3. 최신 IT 기술과 트렌드가 반영되어 있는가? 4. 회원가입 및 발신번호 인증이 쉽고 빠르며, 대량문자를 전송하기에 사용이 편리한가? 5. 매일 문자샘플이 업데이트 되고, CS 및 기술응대가 실시간적으로 이루어지는가?
+
+
+
+ <%-- +
+
문자온, 카카오 '알림톡' 서비스 오픈! 문자온 알림톡, 대한민국 최저가 선언! 조건없이 무조건 6.9원! 카카오톡 채널아이디 추가를 하지 않은 이용자에게도 카카오톡 메시지 발송이 가능한 서비스! 알림톡 바로가기 알림톡 도착 kakao 문자온에서 알림톡이 도착하였습니다! 기업전용/1,000자 이하 텍스트 & 이미지/문자 대비 65% 저렴
+
+
+
문자는 이제, 문자온! 단 한번, 국내 최저가! 인생 최저가! 첫결제 단문 7.5원 장문 32원 그림 59원 Halloween 즐겁고 유쾌한 할로윈데이 보내세요 가을엔 독서 같이 책읽으실래요?
+
+
+
문자도 보내고! 현금도 챙기는! 문자온만의 특별한 혜택! 결제금액의 2% 포인트 추가 적립! 포인트 1만점 이상 적립 시 현금페이백
+
+
+
다른 사이트에는 없다! 오직 문자온에만 있다! 최고의 디자이너가 직접 제작하는 그림문자 맞춤제작을 통해 나만의 문자를 디자인 해보세요. 가을은 캠핑의 계절! 낭만캠핑 캠핑하기 좋은 계절, 가을이 돌아왔습니다. 즐거운 캠핑을 떠나고 싶으신가요? 지금 이벤트에 참여하시면, 캠핑 지원금을 드립니다. 지금 바로 참여하세요! 즐거운 캠핑 지원금 문자온에서 확인해보세요! HALLOWEEN 할로윈이벤트 이벤트에 참여하시고 무시무시한 혜택을 받아보세요 이벤트 기간 2099.10.01  10.31 이벤트 대상 10,000원 이상 구매한 모든 고객 event 01 5만원 이상 구매시 5,000원할인쿠폰 증정! event02 이벤트 기간동안 무료배송! event03 어플 설치 시 10% 추가 할인 쿠폰 증정! HALLOWEEN 할로윈 코스튬 할로윈 분위기에 맞게 코스튬을 하고 와요! 할로윈 CAKE 할로윈을 맞이하여 호박케이크를 만들어봐요! 문자온 영어학원 T.031.123.4567
+
+
+
문자는 이제, 문자온! 선택은 역시 문자온! 문자사이트 선택의 5가지 기준 1. 가격, 속도, 성능, 기능, 보안이 보장되는가? 2. 결제, 정산, 계산서 발행 등 업무가 자동화 되어 있고 편리한가? 3. 최신 IT 기술과 트렌드가 반영되어 있는가? 4. 회원가입 및 발신번호 인증이 쉽고 빠르며, 대량문자를 전송하기에 사용이 편리한가? 5. 매일 문자샘플이 업데이트 되고, CS 및 기술응대가 실시간적으로 이루어지는가?
+
+ --%> + + + + + + + + + <%-- + + 회원가입 바로가기 + + --%> +
+ +
+
+ +
+
+ +
+
+
+ + + + +
+ + + + + + + + + + +
+
+ + + + + + + + +
+
+ +

이런 단체문자, 대량문자 샘플 어때요?

+ +
+ + + + +
+ BEST + + + + + +
+
+ BEST + + + + + +
+
+
+ +
+ +
+ +
+ +
+
+
+ +
+
+ +
+
+ 공지사항 +
+ +
    + +
  • + + +
  • +
    +
+
+
+
+ 고객센터 +
+
+
+
+

1551-8011

+ E-mail : help@iten.co.kr +
+
+

월~금 : 09:30 ~ 18:30 / 점심시간 : 13:00 ~ 14:00
토, 일요일 및 법정공휴일 휴무

+
+ +
+
+
+
+
+ + +
+
+

이런 키워드는 어때요?

+ +
+
+ + +
+
+
    + + + + +
+
+
+ + + + +
+ + + + + + + + + + + + + + +
+ diff --git a/src/main/webapp/WEB-INF/jsp/web/msgdata/MsgDataSMLView.jsp b/src/main/webapp/WEB-INF/jsp/web/msgdata/MsgDataSMLView.jsp index 7a789b56..edea90ac 100644 --- a/src/main/webapp/WEB-INF/jsp/web/msgdata/MsgDataSMLView.jsp +++ b/src/main/webapp/WEB-INF/jsp/web/msgdata/MsgDataSMLView.jsp @@ -1119,20 +1119,8 @@ $(document).ready(function (){ .map(num => removeDash(num.trim())) .filter(num => num !== "") .filter(num => isValidPhoneNumber(num)); // 유효한 번호만 필터링; - - console.log('numbers : ', numbers); - const addrData = processPhoneNumbers(numbers); - - // 기존 tableL의 데이터를 가져옵니다. - var existingData = tableL.getData(); - - // 데이터 병합 및 중복 제거 - const result = mergeAndValidateData(existingData, addrData); - - - // 테이블 데이터 업데이트 - if (!updateTableData(tableL, result)) return false; + fn_phoneAddProcess(tableL, numbers); // textarea 초기화 textarea.val(''); // jQuery 객체에서 값을 초기화할 때는 .val('') 사용 @@ -1302,19 +1290,8 @@ $(document).ready(function (){ return false; } - console.log('numbers : ', numbers); - const addrData = processPhoneNumbers(numbers); - - // 기존 tableL의 데이터를 가져옵니다. - var existingData = tableL.getData(); - - // 데이터 병합 및 중복 제거 - const result = mergeAndValidateData(existingData, addrData); - - - // 테이블 데이터 업데이트 - if (!updateTableData(tableL, result)) return false; + fn_phoneAddProcess(tableL, numbers); $("#btnLatestAddPhoneClose").trigger("click"); @@ -1340,19 +1317,8 @@ $(document).ready(function (){ return false; } - console.log('numbers : ', numbers); - const addrData = processPhoneNumbers(numbers); - - // 기존 tableL의 데이터를 가져옵니다. - var existingData = tableL.getData(); - - // 데이터 병합 및 중복 제거 - const result = mergeAndValidateData(existingData, addrData); - - - // 테이블 데이터 업데이트 - if (!updateTableData(tableL, result)) return false; + fn_phoneAddProcess(tableL, numbers); $("#btnLatestAddPhoneClose").trigger("click"); @@ -1392,19 +1358,8 @@ $(document).ready(function (){ return false; } - console.log('numbers : ', numbers); - const addrData = processPhoneNumbers(numbers); - - // 기존 tableL의 데이터를 가져옵니다. - var existingData = tableL.getData(); - - // 데이터 병합 및 중복 제거 - const result = mergeAndValidateData(existingData, addrData); - - - // 테이블 데이터 업데이트 - if (!updateTableData(tableL, result)) return false; + fn_phoneAddProcess(tableL, numbers); $("#btnLatestAddPhoneClose").trigger("click"); @@ -1430,19 +1385,8 @@ $(document).ready(function (){ return false; } - console.log('numbers : ', numbers); - const addrData = processPhoneNumbers(numbers); - - // 기존 tableL의 데이터를 가져옵니다. - var existingData = tableL.getData(); - - // 데이터 병합 및 중복 제거 - const result = mergeAndValidateData(existingData, addrData); - - - // 테이블 데이터 업데이트 - if (!updateTableData(tableL, result)) return false; + fn_phoneAddProcess(tableL, numbers); $("#btnLatestAddPhoneClose").trigger("click"); @@ -3195,20 +3139,55 @@ function fnMyMsgAdd(msgId){ //fnLetterListAjax(); /* 윈도우팝업 열기 */ -function infoPop(pageUrl){ +/* 윈도우팝업 열기 */ +var infoPopT; // 전역 변수로 선언하여 팝업 추적 + +function infoPop(pageUrl) { + // 기존 팝업이 존재하면 닫기 + if (infoPopT && !infoPopT.closed) { + infoPopT.close(); + } + + // 기본값 설정 + let width = 790, height = 350; + + if (pageUrl === "adrvertisement1") { + width = 790; + height = 800; + } else if (pageUrl === "selectMsgDataView3") { + width = 500; + height = 550; + } + + // 🔥 현재 브라우저 창 크기 가져오기 + let screenWidth = window.innerWidth || document.documentElement.clientWidth || screen.width; + let screenHeight = window.innerHeight || document.documentElement.clientHeight || screen.height; + + // 💡 팝업을 브라우저 창 중앙에 위치시키기 위해 `top`, `left` 계산 + let left = (screenWidth - width) / 2 + window.screenX; + let top = (screenHeight - height) / 2 + window.screenY; + + // 📝 옵션 문자열 (정확한 중앙 정렬 적용) + let options = "width=" + width + ",height=" + height + ",top=" + top + ",left=" + left + + ",fullscreen=no,menubar=no,status=no,toolbar=no,titlebar=yes,location=no,scrollbars=1"; + + console.log('팝업 옵션 : ', options); + + // 🔥 window.open() 호출 + infoPopT = window.open("", 'infoPop', options); + + // 🔄 폼 데이터 설정 및 제출 document.popForm.pageType.value = pageUrl; document.popForm.action = "/web/pop/infoPop.do"; - document.popForm.method = "post"; - if(pageUrl == "adrvertisement1"){ - window.open("about:blank", 'infoPop', 'width=790, height=800, top=100, left=100, fullscreen=no, menubar=no, status=no, toolbar=no, titlebar=yes, location=no, scrollbars=1'); - }else{ - window.open("about:blank", 'infoPop', 'width=790, height=350, top=100, left=100, fullscreen=no, menubar=no, status=no, toolbar=no, titlebar=yes, location=no, scrollbars=1'); - } - + document.popForm.method = "post"; document.popForm.target = "infoPop"; document.popForm.submit(); } + + + + $(document).on('click', '.addressregi_btn', function() { var tableData = tableL.getRows(); var dataLen = tableL.getRows().length; @@ -3981,7 +3960,7 @@ function getMjMsgSentListAll(pageNo) { 대량문자(광고문자) - + @@ -4219,7 +4198,7 @@ function getMjMsgSentListAll(pageNo) { -