From cabf73ad986474eaab28b711cceaf642f9789c26 Mon Sep 17 00:00:00 2001 From: hylee Date: Thu, 25 Jul 2024 18:21:25 +0900 Subject: [PATCH] =?UTF-8?q?=EC=A3=BC=EC=86=8C=EB=A1=9D=20=EC=A7=84?= =?UTF-8?q?=ED=96=89=EC=A4=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../itn/let/mjo/addr/web/AddrController.java | 8 + .../let/mjo/addr/web/AddrRestController.java | 117 ++ .../webapp/WEB-INF/jsp/web/addr/AddrList.jsp | 1122 +++-------------- ...717.jsp => AddrList_advcBack_20240723.jsp} | 953 +++++++++----- .../web/addr/include/addrListforClipboard.jsp | 668 ++++++++++ .../jsp/web/addr/include/addrListforExcel.jsp | 955 ++++++++++++++ .../jsp/web/addr/include/addrListforSelf.jsp | 697 ++++++++++ src/main/webapp/js/web/addr/event.js | 117 ++ src/main/webapp/js/web/addr/init.js | 120 ++ src/main/webapp/js/web/addr/utils.js | 24 + 10 files changed, 3503 insertions(+), 1278 deletions(-) create mode 100644 src/main/java/itn/let/mjo/addr/web/AddrRestController.java rename src/main/webapp/WEB-INF/jsp/web/addr/{AddrList_advcBackup_20240717.jsp => AddrList_advcBack_20240723.jsp} (65%) create mode 100644 src/main/webapp/WEB-INF/jsp/web/addr/include/addrListforClipboard.jsp create mode 100644 src/main/webapp/WEB-INF/jsp/web/addr/include/addrListforExcel.jsp create mode 100644 src/main/webapp/WEB-INF/jsp/web/addr/include/addrListforSelf.jsp create mode 100644 src/main/webapp/js/web/addr/event.js create mode 100644 src/main/webapp/js/web/addr/init.js create mode 100644 src/main/webapp/js/web/addr/utils.js diff --git a/src/main/java/itn/let/mjo/addr/web/AddrController.java b/src/main/java/itn/let/mjo/addr/web/AddrController.java index 1811aadb..aa44f7ab 100644 --- a/src/main/java/itn/let/mjo/addr/web/AddrController.java +++ b/src/main/java/itn/let/mjo/addr/web/AddrController.java @@ -402,6 +402,14 @@ public class AddrController { return "/web/addr/AddrListAjax"; } + + + @RequestMapping("/web/mjon/addr/addrListforExcelAjax.do") + public String AddrListforExcel(HttpServletRequest request, ModelMap model, + @ModelAttribute("searchVO") AddrVO addrVO) throws Exception { + + return "/web/addr/addrListforExcel"; + } /** * 사용자 주소록 중복 리스트 Ajax * @param request diff --git a/src/main/java/itn/let/mjo/addr/web/AddrRestController.java b/src/main/java/itn/let/mjo/addr/web/AddrRestController.java new file mode 100644 index 00000000..84881bce --- /dev/null +++ b/src/main/java/itn/let/mjo/addr/web/AddrRestController.java @@ -0,0 +1,117 @@ +package itn.let.mjo.addr.web; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +import javax.annotation.Resource; + +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +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.RestController; +import org.springframework.web.servlet.ModelAndView; +import org.springframework.web.servlet.mvc.support.RedirectAttributes; + +import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper; +import itn.com.cmm.EgovMessageSource; +import itn.com.cmm.LoginVO; +import itn.com.utl.fcc.service.EgovStringUtil; +import itn.let.fax.admin.service.FaxStatVO; +import itn.let.mail.service.StatusResponse; +import itn.let.mjo.addr.service.AddrGroupService; +import itn.let.mjo.addr.service.AddrGroupVO; +import itn.let.mjo.addr.service.AddrService; +import itn.let.mjo.addr.service.AddrVO; + +/** + * 주소록 관한 controller 클래스를 정의한다. + * @author ITN + * @since 2021.04.08 + * @version 1.0 + * @see + * + *
+ * << 개정이력(Modification Information) >>
+ *
+ *   수정일      수정자           수정내용
+ *  -------    --------    ---------------------------
+ *   2021.04.08  ITN          최초 생성
+ *
+ * 
+ */ +@RestController +public class AddrRestController { + + + @Resource (name = "AddrService") + private AddrService addrService; + + @Resource (name = "AddrGroupService") + private AddrGroupService addrGroupService; + + /** EgovMessageSource */ + @Resource(name="egovMessageSource") + EgovMessageSource egovMessageSource; + + + + /** + * 주소록 대량등록 저장 + * @param searchVO + * @param model + * @return "/web/mjon/addr/addrMassInsertByTempAjax.do" + * @throws Exception + */ + @RequestMapping(value= {"/web/mjon/addr/addrMassInsertByTempAjax_advc.do"}) + public ResponseEntity addrMassInsertByTempAjax(@RequestBody List addrListVO, + RedirectAttributes redirectAttributes, + ModelMap model) throws Exception{ + + + System.out.println("??"); + System.out.println("?? " + addrListVO.get(0).toString()); + + return ResponseEntity.ok().body(new StatusResponse(HttpStatus.OK, "", LocalDateTime.now())); + } + + /* 바이트 자르기 + UTF-8일 경우 + subStringBytes("블라블라블라라", 10, 3); + EUC-KR일 경우 + subStringBytes("블라블라블라라", 10, 2); + */ + public String subStringBytes(String str, int byteLength, int sizePerLetter) { + int retLength = 0; + int tempSize = 0; + int asc; + if (str == null || "".equals(str) || "null".equals(str)) { + str = ""; + } + + int length = str.length(); + + for (int i = 1; i <= length; i++) { + asc = (int) str.charAt(i - 1); + if (asc > 127) { + if (byteLength >= tempSize + sizePerLetter) { + tempSize += sizePerLetter; + retLength++; + } + } else { + if (byteLength > tempSize) { + tempSize++; + retLength++; + } + } + } + + return str.substring(0, retLength); + } + + + +} \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/web/addr/AddrList.jsp b/src/main/webapp/WEB-INF/jsp/web/addr/AddrList.jsp index be4f10a2..6e258f84 100644 --- a/src/main/webapp/WEB-INF/jsp/web/addr/AddrList.jsp +++ b/src/main/webapp/WEB-INF/jsp/web/addr/AddrList.jsp @@ -6,38 +6,30 @@ + + + +
@@ -1431,147 +757,58 @@ function GetAddrMassSaveDupli() {
Loading
+ +
+ -
- - - - - - - - -
-