알림톡 엑셀 불러오기 수정 1차 작업 중
@220b9852bd0200e896064206681666220620c0cc
--- src/main/java/itn/let/kakao/user/kakaoAt/web/KakaoAlimTalkSendController.java
+++ src/main/java/itn/let/kakao/user/kakaoAt/web/KakaoAlimTalkSendController.java
... | ... | @@ -18,12 +18,22 @@ |
| 18 | 18 |
import javax.servlet.http.HttpServletRequest; |
| 19 | 19 |
import javax.servlet.http.HttpServletResponse; |
| 20 | 20 |
|
| 21 |
+import org.apache.commons.lang3.StringUtils; |
|
| 22 |
+import org.apache.poi.hssf.usermodel.HSSFCell; |
|
| 23 |
+import org.apache.poi.hssf.usermodel.HSSFRow; |
|
| 24 |
+import org.apache.poi.hssf.usermodel.HSSFSheet; |
|
| 25 |
+import org.apache.poi.hssf.usermodel.HSSFWorkbook; |
|
| 26 |
+import org.apache.poi.openxml4j.opc.OPCPackage; |
|
| 21 | 27 |
import org.apache.poi.ss.usermodel.Cell; |
| 22 | 28 |
import org.apache.poi.ss.usermodel.CellStyle; |
| 23 | 29 |
import org.apache.poi.ss.usermodel.Row; |
| 24 | 30 |
import org.apache.poi.ss.usermodel.Sheet; |
| 25 | 31 |
import org.apache.poi.xssf.streaming.SXSSFWorkbook; |
| 32 |
+import org.apache.poi.xssf.usermodel.XSSFCell; |
|
| 26 | 33 |
import org.apache.poi.xssf.usermodel.XSSFDataFormat; |
| 34 |
+import org.apache.poi.xssf.usermodel.XSSFRow; |
|
| 35 |
+import org.apache.poi.xssf.usermodel.XSSFSheet; |
|
| 36 |
+import org.apache.poi.xssf.usermodel.XSSFWorkbook; |
|
| 27 | 37 |
import org.springframework.beans.factory.annotation.Autowired; |
| 28 | 38 |
import org.springframework.stereotype.Controller; |
| 29 | 39 |
import org.springframework.ui.ModelMap; |
... | ... | @@ -31,15 +41,20 @@ |
| 31 | 41 |
import org.springframework.web.bind.annotation.RequestMapping; |
| 32 | 42 |
import org.springframework.web.bind.annotation.RequestMethod; |
| 33 | 43 |
import org.springframework.web.bind.annotation.RequestParam; |
| 44 |
+import org.springframework.web.bind.annotation.ResponseBody; |
|
| 45 |
+import org.springframework.web.multipart.MultipartFile; |
|
| 46 |
+import org.springframework.web.multipart.MultipartHttpServletRequest; |
|
| 34 | 47 |
import org.springframework.web.servlet.ModelAndView; |
| 35 | 48 |
|
| 36 | 49 |
import egovframework.rte.fdl.idgnr.EgovIdGnrService; |
| 37 | 50 |
import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper; |
| 38 | 51 |
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo; |
| 39 | 52 |
import itn.com.cmm.EgovMessageSource; |
| 53 |
+import itn.com.cmm.JsonResult; |
|
| 40 | 54 |
import itn.com.cmm.LoginVO; |
| 41 | 55 |
import itn.com.cmm.service.EgovCmmUseService; |
| 42 | 56 |
import itn.com.cmm.util.MJUtil; |
| 57 |
+import itn.com.cmm.util.StringUtil; |
|
| 43 | 58 |
import itn.com.utl.fcc.service.EgovStringUtil; |
| 44 | 59 |
import itn.let.kakao.kakaoComm.KakaoReturnVO; |
| 45 | 60 |
import itn.let.kakao.kakaoComm.KakaoSendUtil; |
... | ... | @@ -200,6 +215,233 @@ |
| 200 | 215 |
|
| 201 | 216 |
return "web/kakao/msgdata/at/KakaoAlimtalkMsgDataView"; |
| 202 | 217 |
} |
| 218 |
+ |
|
| 219 |
+ |
|
| 220 |
+ /* |
|
| 221 |
+ * 엑셀 파일 처리 |
|
| 222 |
+ * |
|
| 223 |
+ * */ |
|
| 224 |
+ @RequestMapping(value = "/web/mjon/alimtalk/sendAlimtalkExelFilePhoneNumAjax.do") |
|
| 225 |
+ @ResponseBody |
|
| 226 |
+ public Object sendAlimtalkExelFilePhoneNumAjax(final MultipartHttpServletRequest multiRequest) throws Exception {
|
|
| 227 |
+ |
|
| 228 |
+ JsonResult jr = new JsonResult(); |
|
| 229 |
+ jr.setSuccess(false); |
|
| 230 |
+ jr.setMessage("엑셀 파일만 업로드할 수 있습니다.");
|
|
| 231 |
+ |
|
| 232 |
+ try {
|
|
| 233 |
+ |
|
| 234 |
+ //final Map<String, MultipartFile> files = multiRequest.getFileMap(); |
|
| 235 |
+ List<MultipartFile> files = (List<MultipartFile>) multiRequest.getFiles("file0");
|
|
| 236 |
+ |
|
| 237 |
+ // 파일명에 .이 있을경우 오류 => Ex) 테스트6.20.xlsx |
|
| 238 |
+ int fileNameSplitCnt = 0; |
|
| 239 |
+ |
|
| 240 |
+ if(!files.isEmpty()) {
|
|
| 241 |
+ fileNameSplitCnt = files.get(0).getOriginalFilename().split("[.]").length;
|
|
| 242 |
+ |
|
| 243 |
+ if (files.get(0).getSize() > 0 |
|
| 244 |
+ && (files.get(0).getContentType().indexOf("spreadsheetml") > -1)
|
|
| 245 |
+ || files.get(0).getContentType().indexOf("ms-excel") > -1
|
|
| 246 |
+ || files.get(0).getOriginalFilename().split("[.]")[fileNameSplitCnt-1].indexOf("xlsx") > -1
|
|
| 247 |
+ || files.get(0).getOriginalFilename().split("[.]")[fileNameSplitCnt-1].indexOf("xls") > -1) {
|
|
| 248 |
+ |
|
| 249 |
+ // 엑셀 파일 용량 3MB이상 시 10만건 이상으로 서버가 다운되는 증상 발생 |
|
| 250 |
+ long fileSize = multiRequest.getFile("file0").getSize();
|
|
| 251 |
+ |
|
| 252 |
+ String Ext = files.get(0).getOriginalFilename().split("[.]")[1];
|
|
| 253 |
+ String errMessage = ""; |
|
| 254 |
+ String cellValue = ""; |
|
| 255 |
+ String errPhoneLine = ""; |
|
| 256 |
+ int errPhoneCnt = 0; |
|
| 257 |
+ |
|
| 258 |
+ //String phoneRegExp = "^01(?:0|1|[6-9])[.-]?(\\d{3}|\\d{4})[.-]?(\\d{4})$";
|
|
| 259 |
+ String phoneRegExp = "^(050[2345678]{1}|01[016789]{1})-?[0-9]{3,4}-?[0-9]{4}$";
|
|
| 260 |
+ |
|
| 261 |
+ if(Ext.equals("xls")) {
|
|
| 262 |
+ |
|
| 263 |
+ HSSFWorkbook workbook = new HSSFWorkbook(files.get(0).getInputStream()); |
|
| 264 |
+ HSSFSheet sheet = workbook.getSheetAt(0); |
|
| 265 |
+ |
|
| 266 |
+ /*if(sheet.getLastRowNum() > 500) { //
|
|
| 267 |
+ errMessage = "500건 이상의 업로드는 데이터 부하로 업로드 할수 없습니다."; |
|
| 268 |
+ jr.setSuccess(false); |
|
| 269 |
+ jr.setMessage(errMessage); |
|
| 270 |
+ return jr; |
|
| 271 |
+ }*/ |
|
| 272 |
+ |
|
| 273 |
+ for(int i=2; i< sheet.getLastRowNum() + 2; i++){ //먼저 밸리데이션 체크(1줄은 생략)
|
|
| 274 |
+ HSSFRow row = sheet.getRow(i); //열읽기 |
|
| 275 |
+ if(null == row) {
|
|
| 276 |
+ continue; |
|
| 277 |
+ } |
|
| 278 |
+ |
|
| 279 |
+ HashMap<String, String> jm = new HashMap<>(); |
|
| 280 |
+ // 행의 두번째 열(이름부터 받아오기) |
|
| 281 |
+ HSSFCell cell = null; |
|
| 282 |
+ boolean errSts = true; |
|
| 283 |
+ for(int j = 0 ; j < 1; j++){ //행읽기(첫번째 컬럼만 필요)
|
|
| 284 |
+ |
|
| 285 |
+ cellValue = ""; |
|
| 286 |
+ cell = row.getCell(j); //이름/핸드폰/변환1/변환2/변환3/변환4/변환5 |
|
| 287 |
+ if(null == cell || "".equals(cell.toString().trim())) { //셀에 값이 없으면
|
|
| 288 |
+ if(j == 1) {
|
|
| 289 |
+ if (sheet.getLastRowNum() == i) {
|
|
| 290 |
+ continue; |
|
| 291 |
+ } |
|
| 292 |
+ |
|
| 293 |
+ break; |
|
| 294 |
+ } |
|
| 295 |
+ |
|
| 296 |
+ } |
|
| 297 |
+ if(null != cell){
|
|
| 298 |
+ switch(cell.getCellType()){ //숫자타임을 문자로 변환
|
|
| 299 |
+ case Cell.CELL_TYPE_NUMERIC: |
|
| 300 |
+ cell.setCellType(Cell.CELL_TYPE_STRING); |
|
| 301 |
+ } |
|
| 302 |
+ cellValue = StringUtil.getString(cell.getStringCellValue().trim()) ; |
|
| 303 |
+ |
|
| 304 |
+ System.out.println("cellValue ::: "+cellValue);
|
|
| 305 |
+ } |
|
| 306 |
+ |
|
| 307 |
+ } |
|
| 308 |
+ } |
|
| 309 |
+ |
|
| 310 |
+ }else {//xlsx 확장자 처리
|
|
| 311 |
+ |
|
| 312 |
+ OPCPackage opcPackage = OPCPackage.open(files.get(0).getInputStream()); |
|
| 313 |
+ XSSFWorkbook workbook = new XSSFWorkbook(opcPackage); |
|
| 314 |
+ XSSFSheet sheet = workbook.getSheetAt(0); // 첫번째 시트 불러오기 |
|
| 315 |
+ opcPackage.close(); |
|
| 316 |
+ |
|
| 317 |
+ int totRowDataCnt = 0; |
|
| 318 |
+ for(int r=1; r<sheet.getPhysicalNumberOfRows(); r++) {
|
|
| 319 |
+ |
|
| 320 |
+ XSSFRow tmpRow = sheet.getRow(r); |
|
| 321 |
+ //System.out.println("=================r:"+r);
|
|
| 322 |
+ XSSFCell cell = null; |
|
| 323 |
+ if(tmpRow.getCell(1) != null) {
|
|
| 324 |
+ |
|
| 325 |
+ cell = tmpRow.getCell(1); //이름/핸드폰/변환1/변환2/변환3/변환4/변환5 |
|
| 326 |
+ if(cell != null && !cell.toString().trim().equals("")) {
|
|
| 327 |
+ //System.out.println("value-" + r + ":" +cell.getStringCellValue());
|
|
| 328 |
+ totRowDataCnt++; |
|
| 329 |
+ //System.out.println("tmpRowCnt:"+totRowDataCnt);
|
|
| 330 |
+ } |
|
| 331 |
+ |
|
| 332 |
+ } |
|
| 333 |
+ |
|
| 334 |
+ } |
|
| 335 |
+ |
|
| 336 |
+ System.out.println("+++++++++++++++++ totRowDataCnt ::: "+totRowDataCnt);
|
|
| 337 |
+ |
|
| 338 |
+ //if(sheet.getLastRowNum() > 20000) { //
|
|
| 339 |
+ /*if(totRowDataCnt > 500) { //
|
|
| 340 |
+ errMessage = "500건 이상의 업로드는 데이터 부하로 업로드 할수 없습니다."; |
|
| 341 |
+ jr.setSuccess(false); |
|
| 342 |
+ jr.setMessage(errMessage); |
|
| 343 |
+ return jr; |
|
| 344 |
+ }*/ |
|
| 345 |
+ |
|
| 346 |
+ List<HashMap<String, String>> json = new ArrayList<HashMap<String, String>>(); |
|
| 347 |
+ |
|
| 348 |
+ for(int i=2; i< sheet.getLastRowNum() + 2; i++){ //먼저 밸리데이션 체크(1줄은 생략)
|
|
| 349 |
+ XSSFRow row = sheet.getRow(i); //열읽기 |
|
| 350 |
+ if(null == row) {
|
|
| 351 |
+ continue; |
|
| 352 |
+ } |
|
| 353 |
+ |
|
| 354 |
+ HashMap<String, String> jm = new HashMap<>(); |
|
| 355 |
+ // 행의 두번째 열(이름부터 받아오기) |
|
| 356 |
+ XSSFCell cell = null; |
|
| 357 |
+ boolean errSts = true; |
|
| 358 |
+ |
|
| 359 |
+ for(int j = 0 ; j < 1; j++){ //행읽기(첫번째 컬럼만 필요)
|
|
| 360 |
+ |
|
| 361 |
+ cellValue = ""; |
|
| 362 |
+ cell = row.getCell(j); //이름/핸드폰/변환1/변환2/변환3/변환4/변환5 |
|
| 363 |
+ if(null == cell || "".equals(cell.toString().trim())) { //셀에 값이 없으면
|
|
| 364 |
+ //System.out.println("Cell 데이터가 없습니다.");
|
|
| 365 |
+ if(j == 1) {
|
|
| 366 |
+ if (sheet.getLastRowNum() == i) {
|
|
| 367 |
+ continue; |
|
| 368 |
+ } |
|
| 369 |
+ |
|
| 370 |
+ break; |
|
| 371 |
+ |
|
| 372 |
+ } |
|
| 373 |
+ } |
|
| 374 |
+ if(null != cell){
|
|
| 375 |
+ switch(cell.getCellType()){ //숫자타임을 문자로 변환
|
|
| 376 |
+ case Cell.CELL_TYPE_NUMERIC: |
|
| 377 |
+ cell.setCellType(Cell.CELL_TYPE_STRING); |
|
| 378 |
+ } |
|
| 379 |
+ cellValue = StringUtil.getString(cell.getStringCellValue().trim()) ; |
|
| 380 |
+ } |
|
| 381 |
+ |
|
| 382 |
+ if(j == 0) {
|
|
| 383 |
+ |
|
| 384 |
+ System.out.println("cellValue ::: "+cellValue);
|
|
| 385 |
+ |
|
| 386 |
+ if(cellValue.matches(phoneRegExp) && errSts) {
|
|
| 387 |
+ jm.put("phone", cellValue);
|
|
| 388 |
+ }else {
|
|
| 389 |
+ errPhoneCnt++; |
|
| 390 |
+ errPhoneLine += (i+1) + "행 "; |
|
| 391 |
+ errSts = false; |
|
| 392 |
+ break; |
|
| 393 |
+ } |
|
| 394 |
+ |
|
| 395 |
+ } |
|
| 396 |
+ |
|
| 397 |
+ } |
|
| 398 |
+ |
|
| 399 |
+ if(null != jm.get("phone") && errSts) {
|
|
| 400 |
+ json.add(jm); |
|
| 401 |
+ } |
|
| 402 |
+ |
|
| 403 |
+ } |
|
| 404 |
+ |
|
| 405 |
+ int resultErrCnt = errPhoneCnt; |
|
| 406 |
+ |
|
| 407 |
+ jr.setData(json); |
|
| 408 |
+ jr.setSuccess(true); |
|
| 409 |
+ |
|
| 410 |
+ if(resultErrCnt > 0) {
|
|
| 411 |
+ if (errPhoneCnt <= 10) {
|
|
| 412 |
+ if (StringUtils.isNotEmpty(errPhoneLine.trim())) {
|
|
| 413 |
+ errPhoneLine = "[" + errPhoneLine.trim() + "]"; |
|
| 414 |
+ } |
|
| 415 |
+ } |
|
| 416 |
+ else {
|
|
| 417 |
+ errPhoneLine = ""; |
|
| 418 |
+ } |
|
| 419 |
+ |
|
| 420 |
+ jr.setMessage("유효하지 않은 형식의 전화번호 "+ errPhoneCnt +"건" + errPhoneLine.trim() + " 있습니다.\n해당 건을 제외하고 문자 발송됩니다.");
|
|
| 421 |
+ }else {
|
|
| 422 |
+ jr.setMessage("");
|
|
| 423 |
+ } |
|
| 424 |
+ |
|
| 425 |
+ |
|
| 426 |
+ } |
|
| 427 |
+ |
|
| 428 |
+ |
|
| 429 |
+ } |
|
| 430 |
+ } |
|
| 431 |
+ |
|
| 432 |
+ //jr.setMessage("엑셀 불러오기가 완료 되었습니다.");
|
|
| 433 |
+ //jr.setSuccess(true); |
|
| 434 |
+ |
|
| 435 |
+ } catch (Exception e) {
|
|
| 436 |
+ // TODO: handle exception |
|
| 437 |
+ System.out.println("+++++++++++++++++ sendAlimtalkExelFilePhoneNumAjax Controller Error !!! "+e);
|
|
| 438 |
+ jr.setSuccess(false); |
|
| 439 |
+ jr.setMessage("엑셀 데이터에 오류가 있습니다. 엑셀 데이터를 확인해 주세요.");
|
|
| 440 |
+ return jr; |
|
| 441 |
+ } |
|
| 442 |
+ |
|
| 443 |
+ return jr; |
|
| 444 |
+ } |
|
| 203 | 445 |
|
| 204 | 446 |
|
| 205 | 447 |
// 카카오 템플릿 목록 조회 |
--- src/main/webapp/WEB-INF/jsp/web/kakao/msgdata/at/KakaoAlimtalkMsgDataView.jsp
+++ src/main/webapp/WEB-INF/jsp/web/kakao/msgdata/at/KakaoAlimtalkMsgDataView.jsp
... | ... | @@ -1736,6 +1736,7 @@ |
| 1736 | 1736 |
<label for="" class="attachedFile_label">첨부파일</label> |
| 1737 | 1737 |
<input type="text" id="excelNm01" value="" readonly> |
| 1738 | 1738 |
<input type="file" id="excelFile01" accept=".xls, .xlsx" onchange="excelExport01(event); return false;" style="display:none"/> |
| 1739 |
+ <!-- <input type="file" id="excelFile01" accept=".xls, .xlsx" onchange="excelExport01(event); return false;" style="display:none"/> --> |
|
| 1739 | 1740 |
<button type="button" class="btnType btnType6 c1">찾아보기</button> |
| 1740 | 1741 |
<!-- <p><span class="vMiddle">*</span> 첨부된 파일은 <span class="c_e40000">[추가]버튼을 클릭</span>하셔야 받는 사람에 등록됩니다.</p> --> |
| 1741 | 1742 |
<p><span class="vMiddle">*</span> 첨부된 파일은 <span class="c_e40000">[추가]버튼을 클릭</span>하셔야 받는 사람에 등록됩니다.</p> |
... | ... | @@ -1743,6 +1744,7 @@ |
| 1743 | 1744 |
</div><!--// 엑셀파일 불러오기 --> |
| 1744 | 1745 |
<div class="popup_btn_wrap2"> |
| 1745 | 1746 |
<button type="button" class="tooltip-close" data-focus="popup02-close" data-focus-next="popup02" onclick="excelAdd()">추가</button> |
| 1747 |
+ <!-- <button type="button" class="tooltip-close" data-focus="popup02-close" data-focus-next="popup02" onclick="excelAdd()">추가</button> --> |
|
| 1746 | 1748 |
<button type="button" class="tooltip-close" data-focus="popup02-close" data-focus-next="popup02">닫기</button> |
| 1747 | 1749 |
</div> |
| 1748 | 1750 |
</div> |
--- src/main/webapp/js/kakao/at/alimtalkExcel.js
+++ src/main/webapp/js/kakao/at/alimtalkExcel.js
... | ... | @@ -48,6 +48,124 @@ |
| 48 | 48 |
} |
| 49 | 49 |
} |
| 50 | 50 |
|
| 51 |
+/* |
|
| 52 |
+ * 신규 엑셀 파일 불러오기 |
|
| 53 |
+ * 기존 json 처리가 아닌 POI 방식으로 처리하기 위함 |
|
| 54 |
+ * |
|
| 55 |
+ * */ |
|
| 56 |
+ |
|
| 57 |
+function excelExport00(){
|
|
| 58 |
+ |
|
| 59 |
+ var data = new FormData(document.excelToolTipForm); |
|
| 60 |
+ //data.append("file0", $('#excelFile01').prop('files')[0]);
|
|
| 61 |
+ |
|
| 62 |
+ var fileValue = $("#excelFile01").val().split("\\");
|
|
| 63 |
+ var fileName = fileValue[fileValue.length-1]; |
|
| 64 |
+ |
|
| 65 |
+ var fileExt = fileName.split('.').pop().toLowerCase();
|
|
| 66 |
+ |
|
| 67 |
+ console.log("fileName ::: "+fileName);
|
|
| 68 |
+ console.log("fileExt ::: "+fileExt);
|
|
| 69 |
+ |
|
| 70 |
+ if(fileExt.length > 0){
|
|
| 71 |
+ if($.inArray(fileExt, ['xls','xlsx']) == -1) {
|
|
| 72 |
+ |
|
| 73 |
+ alert('xls, xlsx 파일만 업로드 할수 있습니다.');
|
|
| 74 |
+ return false; |
|
| 75 |
+ |
|
| 76 |
+ } |
|
| 77 |
+ |
|
| 78 |
+ } |
|
| 79 |
+ fn_viewDataInit02(); |
|
| 80 |
+ $('#excelNm01').val(fileName);
|
|
| 81 |
+ |
|
| 82 |
+} |
|
| 83 |
+ |
|
| 84 |
+function excelAdd1(){
|
|
| 85 |
+ |
|
| 86 |
+ var data = new FormData(document.excelToolTipForm); |
|
| 87 |
+ data.append("file0", $('#excelFile01').prop('files')[0]);
|
|
| 88 |
+ |
|
| 89 |
+ var url = "/web/mjon/alimtalk/sendAlimtalkExelFilePhoneNumAjax.do"; |
|
| 90 |
+ |
|
| 91 |
+ $.ajax({
|
|
| 92 |
+ type: "POST", |
|
| 93 |
+ enctype: 'multipart/form-data', |
|
| 94 |
+ url: url, |
|
| 95 |
+ data: data, |
|
| 96 |
+ dataType:'json', |
|
| 97 |
+ async: true, |
|
| 98 |
+ processData: false, |
|
| 99 |
+ contentType: false, |
|
| 100 |
+ cache: false, |
|
| 101 |
+ //timeout: 600000, |
|
| 102 |
+ success: function (returnData, status) {
|
|
| 103 |
+ if(status == 'success'){ // status 확인 필요한가. 석세스 안뜨면 에러 가지 않나
|
|
| 104 |
+ |
|
| 105 |
+ if(returnData.success){
|
|
| 106 |
+ |
|
| 107 |
+ var data = returnData.data; |
|
| 108 |
+ var message = returnData.message; |
|
| 109 |
+ |
|
| 110 |
+ if(message != '' ){
|
|
| 111 |
+ alert(returnData.message); |
|
| 112 |
+ } |
|
| 113 |
+ |
|
| 114 |
+ if(data != null){
|
|
| 115 |
+ |
|
| 116 |
+ /*$.each(data, function(i, item){
|
|
| 117 |
+ |
|
| 118 |
+ if(checkHpNum(item.phone)){
|
|
| 119 |
+ |
|
| 120 |
+ excelAddr.push({phone: item.phone, name: item.name, rep1: item.replace1, rep2: item.replace2, rep3: item.replace3, rep4: item.replace4});
|
|
| 121 |
+ |
|
| 122 |
+ } else{
|
|
| 123 |
+ |
|
| 124 |
+ alert("엑셀 파일 데이터의 형식이 맞지 않는 부분이 있습니다.");
|
|
| 125 |
+ excelAddr = []; //엑셀 데이터 저장 변수 초기화 |
|
| 126 |
+ $("#excelFile").val(""); //첨부파일 input 초기화
|
|
| 127 |
+ $("#excelNm").val(""); // 첨부파일 명 초기화
|
|
| 128 |
+ fileName = ""; |
|
| 129 |
+ return; |
|
| 130 |
+ |
|
| 131 |
+ } |
|
| 132 |
+ |
|
| 133 |
+ });*/ |
|
| 134 |
+ |
|
| 135 |
+ } |
|
| 136 |
+ |
|
| 137 |
+ }else{
|
|
| 138 |
+ alert(returnData.message); |
|
| 139 |
+// alert("첨부파일 불러오는 중 오류가 발생하였습니다.");
|
|
| 140 |
+ excelAddr = []; //엑셀 데이터 저장 변수 초기화 |
|
| 141 |
+ $("#excelFile01").val(""); //첨부파일 input 초기화
|
|
| 142 |
+ $("#excelNm01").val(""); // 첨부파일 명 초기화
|
|
| 143 |
+ fileName = ""; |
|
| 144 |
+ return; |
|
| 145 |
+ |
|
| 146 |
+ } |
|
| 147 |
+ } else if(status== 'fail'){
|
|
| 148 |
+ alert("첨부파일 불러오는 중 오류가 발생하였습니다.1");
|
|
| 149 |
+ console.log("status : fail ~");
|
|
| 150 |
+ } |
|
| 151 |
+ }, |
|
| 152 |
+ error: function (e) {
|
|
| 153 |
+ alert("첨부파일 불러오는 중 오류가 발생하였습니다2.");
|
|
| 154 |
+ console.log("ERROR : ", e);
|
|
| 155 |
+ }, |
|
| 156 |
+ beforeSend : function(xmlHttpRequest) {
|
|
| 157 |
+ //로딩창 show |
|
| 158 |
+ $('.loading_layer').addClass('active');
|
|
| 159 |
+ }, |
|
| 160 |
+ complete : function(xhr, textStatus) {
|
|
| 161 |
+ //로딩창 hide |
|
| 162 |
+ $('.loading_layer').removeClass('active');
|
|
| 163 |
+ } |
|
| 164 |
+ }); |
|
| 165 |
+ |
|
| 166 |
+} |
|
| 167 |
+ |
|
| 168 |
+ |
|
| 51 | 169 |
/** |
| 52 | 170 |
* 엑셀 파일 불러오기 |
| 53 | 171 |
*/ |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?