반응형

www.npmjs.com/package/tableexport.jquery.plugin 

github.com/hhurz/tableExport.jquery.plugin

 

hhurz/tableExport.jquery.plugin

jQuery plugin to export a html table to JSON, XML, CSV, TSV, TXT, SQL, Word, Excel, PNG and PDF - hhurz/tableExport.jquery.plugin

github.com

tableExport_test.zip
0.05MB

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>tableExport Plug-in</title>
</head>
<!-- <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> -->
<script src="jquery-1.12.3.min.js"></script>
<script src="tableExport.js"></script>
<script src="FileSaver.min.js"></script>
<script>

$(document).ready(function(){
	
	$("#btnExport1").on('click', function () {
		$ ('#table').tableExport({type:'excel'});
	});

	$("#btnExport2").on('click', function () {
		$('table').tableExport({type:'excel',
            excelFileFormat:'xmlss',
            worksheetName: ['Table 1','Table 2' ]});
	});
	
	$("#btnExport3").on('click', function () {
		$('#table').tableExport( 
			{type: 'excel', excelFileFormat: 'xmlss', ignoreColumn: [2,3],ignoreRow: [3,4]}
		);
	});
	//원하는 부분만 출력하게
	//ignoreColunm : [x, y], ignoreRow : [x, y]
	//x부터 y까지를 제외하고 출력한다
	
	$("#btnExport4").on('click', function () {
		$('#table2').tableExport( 
			{type:'excel'}
		);
	});
	
	$("#btnExport5").on('click', function() {
		$('#table3').tableExport( 
			{type: 'excel', 
			numbers: {output: false}, 
			excelstyles: ['background-color', 'color']}
		);
	});
	//화면과 동일한 css를 적용하고 하고싶다면 excelstyles에 원하는 css속성 이름을 적어주면 된다.
});

</script>
<style>
	body, div,  ul, ol, li, p, table, th, td,h1,h2 {margin:0; padding:0;font-size:13px; word-spacing:0;}
	table {border-collapse:collapse; border-spacing:0;}
	.revenueInfo {padding:4px; page-break-after: always; clear: both;}
	.revenueInfo table {width:100%; margin-top:4px;border-top:1px solid #c5c5c5;border-right:1px solid #c5c5c5;table-layout:fixed;word-wrap:break-word;}
	.revenueInfo table th , .revenueInfo table td {padding:8px 0 5px; border-bottom:1px solid #c5c5c5;border-left:1px solid #c5c5c5;border-right:1px solid #c5c5c5;}
	.revenueInfo table th  {font-size:12px;color: #666666; font-weight: 600;}
	.revenueInfo table caption {display:none;} 
	.revenueInfo tbody td  {background-color:rgb(242,242,242);text-align:left; padding-left: 4px; font-size: 12px;}
	.al_tot { background-color:#EDECE9;  font-weight: bold;} /*   분홍> background:#FFCBCB */
	.list_tot { background-color:#DAE7EE;  font-weight: bold;} /*  color: #FF6407;   주황> background:#FF6407,  하늘 > background:#DAE7EE */	 
	.al_c {text-align:center  !important;}
	
	/* mouse hover color */
       .mouseHover{cursor:pointer;background-color:#ffcc99 !important;}  /*  background-color:#fdf7df !important;   **/   
       
    /*  선택일 까지의 합 */ 
	.al_sum { background:#FCD0B5;  font-weight: bold;} 
	.total_layerPop {position:absolute; display:none; padding:5px; width:560px; box-sizing:Border-box; border:1px solid #202022; top: 20px; left: 20px; background-color: #fff; z-index:100;}
	.total_layerPop.on {display:block;}
	.total_layerPop table {width: 100%; margin-top: 10px; border: 1px solid #c5c5c5; table-layout: fixed; word-wrap: break-word;}
	.total_layerPop table th, .total_layerPop table td{padding: 8px 0 5px; border-bottom: 1px solid #c5c5c5; border-left: 1px solid #c5c5c5; border-right: 1px solid #c5c5c5;}
	.total_layerPop table th {background-color:#eae9e9;}
	.total_layerPop table td {padding-right:4px; text-align:right; border-bottom:1px solid #c5c5c5;}
	.btn		{ background-color: #2E6E9E; color: white; padding: 3px 15px 3px 15px; border: 0px; border-radius: 3px; cursor: pointer;}
	
	.table-striped > tbody > tr:nth-child(2n+1) > td {background-color: #ccdf88;}
	
</style>
<body>
<div class="revenueInfo">
	<table id="table">
		<thead>
			<tr id="inflowTable1">      <th>PC/MO</th>      <th>유입경로</th>      <th>페이지</th>      <th>페이지 상세</th>      <th>접속 건수</th>			</tr>
		</thead>
		<tbody id="inflowTable2">
			<tr class="">      <td class="al_c">PC</td>      <td class="al_c">eknote</td>      <td class="al_c">공지사항</td>       <td class="">남동산업</td><td class="al_c">1</td>			</tr>
			<tr class="">      <td class="al_c">PC</td>      <td class="al_c">eknote</td>      <td class="al_c">메인페이지</td>      <td class=""></td>      <td class="al_c">4</td>			</tr>
			<tr class="">      <td class="al_c">Mobile</td>      <td class="al_c">eknote</td>      <td class="al_c">Season</td>      <td class="">뽀삐뽀삐</td>      <td class="al_c">1</td>			</tr>
			<tr class="">      <td class="al_c">Mobile</td>      <td class="al_c">eknote</td>      <td class="al_c">메인페이지</td>      <td class=""></td>      <td class="al_c">2</td>			</tr>
		</tbody>
	</table>
</div>
<div class="revenueInfo">
	<table>
		<thead>
			<tr id="inflowTable1">      <th>PC/MO</th>      <th>유입경로</th>      <th>페이지</th>			</tr>
		</thead>
		<tbody id="inflowTable2">
			<tr class="">      <td class="al_c">PC</td>      <td class="al_c">eknote</td>      <td class="al_c">공지사항</td>			</tr>
			<tr class="">      <td class="al_c">PC</td>      <td class="al_c">eknote</td>      <td class="al_c">메인페이지</td>			</tr>
			<tr class="">      <td class="al_c">Mobile</td>      <td class="al_c">eknote</td>      <td class="al_c">Season</td>			</tr>
			<tr class="">      <td class="al_c">Mobile</td>      <td class="al_c">eknote</td>      <td class="al_c">메인페이지</td>			</tr>
		</tbody>
	</table>
</div>
<div class="revenueInfo">
	<table id="table2">
		<thead>
			<tr id="inflowTable1">      <th>PC/MO</th>      <th>유입경로</th>			</tr>
		</thead>
		<tbody id="inflowTable2">
			<tr class="">      <td colspan="2" class="al_c">PC</td>			</tr>
			<tr class="">      <td class="al_c">PC</td>      <td class="al_c">eknote</td>			</tr>
		</tbody>
	</table>
</div>
<div class="revenueInfo">
	<table class="table-striped" id="table3">
	      <thead>
	      <tr>      <th>PC/MO</th>      <th>유입경로</th>	      </tr>
	      </thead>
	      <tbody>
	      <tr>      <td class="al_c">Mobile</td>      <td class="al_c">eknote</td>	      </tr>
	      <tr>      <td class="al_c">PC</td>      <td class="al_c">eknote</td>	      </tr>
	      <tr>      <td class="al_c">Mobile</td>      <td class="al_c">eknote</td>	      </tr>
	      </tbody>
	</table>
</div>
<input type="button" value="기본 엑셀다운로드" class="btn" id="btnExport1" title="기본 엑셀다운로드"/>
<input type="button" value="테이블 2개 이상 엑셀다운" class="btn" id="btnExport2" title="테이블 2개 이상 엑셀다운"/>
<input type="button" value="원하는부분만 엑셀다운" class="btn" id="btnExport3" title="원하는부분만 엑셀다운"/>
<input type="button" value="rowspan테이블 엑셀다운" class="btn" id="btnExport4" title="rowspan테이블 엑셀다운"/>
<input type="button" value="스타일적용 엑셀다운" class="btn" id="btnExport5" title="스타일적용 엑셀다운"/>
</body>
</html>

 

* P.S.  모든 파일 포멧 다운로드

www.jqueryscript.net/demo/Exporting-Html-Tables-To-CSV-XLS-XLSX-Text-TableExport/ 

반응형
Posted by Edward. K
반응형

- 입력형식 : YYYYMMDD , YYYY/MM/DD , YYYY-MM-DD
- 결과 : 0(날자형식), 1(날자형식 아님)

<!doctype html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  <meta name="Generator" content="EditPlus®">
  <title>JS Data Chaek</title>
 </head>
 <body>
  <script type="text/javascript">
  <!--
    var yyyymmdd = '20201231';
    alert('yyyymmdd : '+yyyymmdd +  '   >  isDate = ' +isDate(yyyymmdd)       );

    yyyymmdd = '2020-12-31';
    alert('yyyymmdd : '+yyyymmdd +  '   >  isDate = ' +isDate(yyyymmdd)       );

    yyyymmdd = '2020/12/31'; 
    alert('yyyymmdd : '+yyyymmdd +  '   >  isDate = ' +isDate(yyyymmdd)       );
     
    yyyymmdd = '00201231';
    alert('yyyymmdd : '+yyyymmdd +  '   >  isDate = ' +isDate(yyyymmdd)       );

    yyyymmdd = '20201331';
    alert('yyyymmdd : '+yyyymmdd +  '   >  isDate = ' +isDate(yyyymmdd)       );

    yyyymmdd = '20201232';
    alert('yyyymmdd : '+yyyymmdd +  '   >  isDate = ' +isDate(yyyymmdd)       );

     /*
      * 날자 입력 제한 형식  " YYYYMMDD, YYYY-MM-DD, YYYY/MM/DD 
      *  return  > 0: 정상, 1: 날자형식 아님.
      */
    function isDate(yyyymmdd) {

        var yy, mm, dd, splitStr = '-';

        // 8자리로 입력된 경우, 
        if (yyyymmdd.length == 8) 
        {
            if (!yyyymmdd.match(/[0-9]{8}/g)) 
            {
                alert('is not date');
                return 1;    // 입력값 오류
            }
            yy = yyyymmdd.substring(0, 4);
            mm = yyyymmdd.substring(4, 6);
            dd = yyyymmdd.substring(6, 8);
        } 
        // 10자리 입력
        else if (yyyymmdd.length == 10) 
        {
            if (!yyyymmdd.match(/[0-9]{4}[-/][0-9]{2}[-/][0-9]{2}/g))
            {
                alert('is not date');
                return 1;    // 입력값 오류
            }

            if(yyyymmdd.indexOf('/')>0)  splitStr = '/';

            yy = yyyymmdd.split(splitStr)[0];
            mm = yyyymmdd.split(splitStr)[1];
            dd = yyyymmdd.split(splitStr)[2];
        }
        // 그외 .  입력형식 에러   YYYYMMDD, YYYY-MM-DD, YYYY/MM/DD  형태만가능 
        else
        {
            return 1;
        }
        
        // 1000년 이하인 경우 에러처리  
        if(eval(yy)<1000)
        {
            alert('is not year');
            return 1;    // 입력값 오류
        }

        // 해당월이 1보다 작거나 12보다 큰 겨우.
        if (eval(mm) < 1 || eval(mm) > 12)
        {
            alert('is not month');
            return 1;
        }

        // 해당월의 마지막 날자 
        var limit_day;
        switch (eval(mm))
        {
            case 2:
                if ((yy - 2008) % 4 == 0) limit_day = 29;
                else limit_day = 28;
                break;
            case 4:        case 6:        case 9:        case 11:
                limit_day = 30;
                break;
            default:  // 1 ,3, 5, 7, 8, 10, 12
                limit_day = 31;
                break;
        }
        // 해당월의 날자 초과  하거나, 해당일의 수가 1보다 작은 경우
        if (eval(dd) > limit_day || eval(dd) < 1)
        {
            alert('is not day');
            return 1;
        }
        return 0;
    } 
  //-->
  </script>
 </body>
</html>
반응형
Posted by Edward. K
반응형
반응형
Posted by Edward. K
반응형

crontab_to_infoStr.html
다운로드

TMS, PUSH 등을 주기적으로 전송하는 시스템을 위해 만든 크론탭 생성 스크립트.
크론탭을 모르는 일반 관리자들을 위해,.  DB 저장시엔 crontab 양식으로,  화면에 노출되는 방식은 한글로 처리 하기 위해

주기적으로 전송건이마, 전송 기한이 정해여 있기 때문에 크론탭 형식으로 등록하고 관리.

<!doctype html>
<html lang="en">
 <head>
 <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script type="text/javascript">
<!--
    $(document).ready(function() {
      translateCrontab();

       itemChange();  // 주기 세팅
       
       // 발송주기 세팅 start
       for ( var i=0 ;  i < 24 ; i ++)      
       {
            // 분
            if(i<6)
               $('#cycle_mm').append($("<option>"+(i==0?"0":"")+( i*10) +"</option>"));      
               
           // 시각
           $('#cycle_tt').append( $("<option>"+(i<10?"0":"")+i +"</option>"));             
        }
        // 발송주기 세팅 end  
    });

    /**
     * 발송 주기 변환   * crontab -> 설명  
     *    발송주기를 사용하는 ellement 에 class 선언 필수   class ='regulary_cycle'
     * @author edward  2019-03-21
     * @return 발송주기 한글 
     *   Spring Quartz crontab  형식을 한글로 변환한다.
     *        >>  1: 초(0~59)  , 2: 분(0~59) ,  3: 시(0~23)   , 4 : 일 ( 1~ 31 )   ,  5 :  월 (1~12) ,  6:  요일 ( 0~6 ) ,  7:년도(생략 )

        ? : 조건없음 [일, 요일 에서만 사용가능]
        * : 모든 조건에서 참
        L : [일, 요일 에서만 사용가능]
            - 일에서 사용하면 : 예(L) 마지막 날짜입니다. 예를들어 1월이라면 31일 2월이라면 윤년에 따라 28혹은 29일 4월이라면 30일에 참.
            - 요일에서 사용하면 : 예(6L) 6은(토요일) 마지막 토요일에 실행됩니다. 마지막주가 토요일이 없다면 그전주 토요일에 참.\


        W : [일에서만 사용가능]
                - 가장 가까운 평일(월~토)를 찾습니다.
                - 15W 라고 설정했다면 15일이 월~금 범위라면 해당 날짜에서 참.
                - 15W 15일이 토요일이라면 가장 가까운 금요일인 14일에 참.
                - 15W 15일이 일요일이라면 가장 가까운 월요일인 16일에 참.

        # : [요일에서만 사용가능]
            - 예를들어 3#2 라고 썻다면 (수요일#2번째주)라는 의미가 됩니다.
            - 즉 2번째주의 수요일에 참이 됩니다.
     */
    function translateCrontab()
    {     
         var arrList = $(".regulary_cycle");  // 발송주기를 사용하는 ellement 에 class 선언
         var cronrtabExp ;
         var crontabStr ; 

          $.each(arrList, function(index, item)
          {	  		   
              // 0: 초(0~59)  , 1: 분(0~59) ,  2: 시(0~23)   , 3 : 일 ( 1~ 31 )   ,  4 :  월 (1~12) , 5:  요일 ( 0~6 )
              cronrtabExp = $(this).text().split(" ");
              crontabStr = '';
              
            // 특정 요일    
              if(cronrtabExp[5] !="*")
              {
                  switch(cronrtabExp[5])//   6:  요일 ( 0~6 ) 
                  {
                     case '0' :  	  crontabStr =  "일" ;	  break;
                     case '1' :  	  crontabStr =  "월" ;	  break;
                     case '2' :  	  crontabStr =  "화" ;	  break;
                     case '3' :  	  crontabStr =  "수" ;	  break;
                     case '4' :  	  crontabStr =  "목" ;	  break;
                     case '5' :  	  crontabStr =  "금" ;	  break;
                     case '6' :  	  crontabStr =  "토" ;	  break;
                  }
                  crontabStr =   "매주 "+ crontabStr+"요일 ";	
              }
              else
              {	  
                  if(cronrtabExp[3] !="*"){// 특정 일    
                      crontabStr =   "매월 "+ cronrtabExp[3]+"일 ";
                  } else{  // 전체 일
                      crontabStr =   "매일 ";			  
                  }
              }
              crontabStr =  crontabStr + cronrtabExp[2] + " 시 ";//   3: 시(0~23)   
              crontabStr =  crontabStr + cronrtabExp[1] + " 분"; //   2: 분(0~59)
              // crontabStr =  crontabStr + cronrtabExp[0] + " 초" //   1: 초(0~59)   parseInt    
              //crontabStr = " [ "+ $(this).text() + " ] "+crontabStr ;              
              $(this).text(crontabStr);
          }); 	 
    }

    function itemChange()
    {        	 
        	var cycleDD = ["1일","2일","3일","4일","5일","6일","7일","8일","9일","10일"
					        		,"11일","12일","13일","14일","15일","16일","17일","18일","19일","20일"
					        		,"21일","22일","23일","24일","25일","26일","27일","28일","29일","30일","31일"];  // 매월 
        	var cycleW = ["일요일","월요일","화요일","수요일","목요일","금요일","토요일"];  // 매주 
        	 
        	var selectItem = $("#cycle_1").val();        	        	 

        	$('#cycle_2').empty();
        	
        	if(selectItem == "매일")    {
				$('#cycle_2').hide();	
 
        	}else{
				$('#cycle_2').show();	
				
	        	var changeItem;
            	if(selectItem == "매월")        	  changeItem = cycleDD;        	
            	else if(selectItem == "매주")      changeItem = cycleW;  
            	
     		   for (var j in changeItem) { 
    	      	   var option = $("<option>"+changeItem[j]+"</option>");
    	      	   $('#cycle_2').append(option);
          	   }
        	}       
    }  // en itemChange
   //-->
</script>
</head>
<body>


<!--  crontab to 한글 주기 설명 변환 -->
  0 40 3 * * 2 : <span class="regulary_cycle">0 40 3 * * 2</span></br>
  0 20 3 * * * : <span class="regulary_cycle">0 20 3 * * *</span></br>
  0 0 4 19 * * : <span class="regulary_cycle">0 0 4 19 * *</span></br>
  0 0 1 * * 1 : <span class="regulary_cycle">0 0 1 * * 1</span></br>
  

<!-- 주기 선택에 따른 선택 사항 자동 변경 -->
<select id="cycle_1" onchange="itemChange()" style="width:60px;">
    <option>매월</option>
    <option>매주</option>
    <option>매일</option>
</select>  <!--   월/주/일  -->								 
<select id="cycle_2" style="width:60px;">	</select>    <!--  일자/요일  -->
<select id="cycle_tt" style="width:40px;"> 	</select><!--   시간 -->
<select id="cycle_mm" style="width:40px;">	 </select><!-- 분 -->

 </body>
</html>

JAVA 단에서는 실행주기에 따른 다음 실행일(getCronTabData)을 등록하였다.  

    public String getCurrentDate(String format) {
        SimpleDateFormat dateFormat = new SimpleDateFormat(format);
        long now = System.currentTimeMillis();
        return dateFormat.format(new Date(now));
    }

    public int getDayOfWeek(String dateStr) {
        // dateStr = "2020-07-12";  

        dateStr = dateStr.replace("-",""); 
		Calendar calendar = Calendar.getInstance(); 

		int year = Integer.parseInt(dateStr.substring(0,4));
		int month = Integer.parseInt(dateStr.substring(4,6)) -1 ; // 입력월. 
		int day = Integer.parseInt(dateStr.substring(6)) ; // -1;
        System.out.println(  "year : "+year +   "  /   month : "+month  +"  /   day : "+day );

        calendar.set(year, month, day);
		int o_lastDay = calendar.getActualMaximum(Calendar.DAY_OF_MONTH);
        System.out.println(  "o_lastDay : "+o_lastDay  );
  
        return calendar.get(Calendar.DAY_OF_WEEK);     // 1(일) ~7(토) 
         
    }
    
    
    
	// 날짜 더하기
	//
	// @param dt(날짜) , y(년) , m(월), d(일)
	// @Exam  addDate("2019-03-21",1,6,1) -> 2020-09-22
	// @return String 
	//
	public String addDate(String dt, int y, int m, int d) throws Exception  {
		SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
	
		Calendar cal = Calendar.getInstance();
		Date date = format.parse(dt);
		cal.setTime(date);
		cal.add(Calendar.YEAR, y);      //년 더하기
		cal.add(Calendar.MONTH, m);     //월 더하기
		cal.add(Calendar.DATE, d);      // 더하기
		
		return format.format(cal.getTime());	
	  }
     
     //이번주 해당요일의 날자를 구함 .
     // @author   edward  
     // @param dateStr
     // @return
     //
    public String getCurrentWeekDate(String dateStr, int dayofWeek ) throws Exception  {
		SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
		Calendar cal = Calendar.getInstance();
		Date date = format.parse(dateStr);
		cal.setTime(date);
    	cal.set(Calendar.DAY_OF_WEEK, dayofWeek);    // 일요일 (1) ~ 토요일(7)
		return format.format(cal.getTime());
    }


 
	public String getCronTabData(Map<String,Object> params) {
		String  nextSendDate = this.getCurrentDate("yyyy-MM-dd");  // yyyyMMdd   오늘 날자 이후로 cycle에 맞게 등록. 
		String cycle_1 = String.valueOf(params.get("cycle_1"));                               //   매월, 매주,매일
		String cycle_2 = String.valueOf(params.get("cycle_2"));                               //  매월 (1일 ~ 31일)  ,   매주 (일요일 ~ 토요일)  ,         매일 (없음)
		int cycle_tt =  Integer.valueOf(String.valueOf(params.get("cycle_tt")));       //  시간 : 00 ~ 23
		int cycle_mm =  Integer.valueOf(String.valueOf(params.get("cycle_mm")));  // 분 : 00 ~ 50 10분단위		
		int todayDayOfWeek = this.getDayOfWeek(nextSendDate.replace("-", "")) ;//  오늘날자의 요일 가져오기   //  1 (일) ~ 7 (토)

	    /*
	     *  PUSH_CYCLE ( 발송주기)은   Spring Quartz crontab  형식으로 저장한다.
		         >>  1: 초(0~59)  , 2: 분(0~59) ,  3: 시(0~23)   , 4 : 일 ( 1~ 31 )   ,  5 :  월 (1~12) ,  6:  요일 ( 0~6 ) ,  7:년도(생략 )
				  초   분   시  일  월  요일  년도(생략)
		          0    0     3   *   *   *                매일 3시    
		          0  30  0/1   *   *   *                매 시각 30분  
		          0    0   18   *   *   3                매주 수요일  6시   				          
	    */
		StringBuffer  pushCycle = new StringBuffer("0"); //초
		pushCycle.append(" ").append(cycle_mm);  // 분
		pushCycle.append(" ").append(cycle_tt);  // 시 	 
 
		if(cycle_1.equals("매월")) {		
			
			// 다음 실행일 세팅 : 등록한 날자가 오늘보다 같거나 작은 경우 다음주에 실행
			int todayDD = Integer.parseInt(nextSendDate.substring(8));
			int cycleDD = Integer.parseInt(cycle_2.replace("일", ""));
	        if(todayDD >=  cycleDD ) {;   
	        	nextSendDate = this.addDate(nextSendDate,0,1,0) ;  
	        }				
			pushCycle.append(" ").append(cycleDD);  // 일
			pushCycle.append(" *");  // 월
			pushCycle.append(" *");  // 요일
			
		}else if(cycle_1.equals("매주")) {
			pushCycle.append(" *"); // 일   
			pushCycle.append(" *");  // 월
			pushCycle.append(" ");  // 요일			
			
			String dayOfWeek   =   cycle_2.substring(0,1);  // dow : Days Of The Week
			int cycleDayOfWeek =0; 
			
			if(dayOfWeek.equals("일"))     	  cycleDayOfWeek = 1;    //pushCycle.append(0);  
			else if(dayOfWeek.equals("월"))    cycleDayOfWeek = 2;    //pushCycle.append(1);  
			else if(dayOfWeek.equals("화"))    cycleDayOfWeek = 3;    //pushCycle.append(2);  
			else if(dayOfWeek.equals("수"))    cycleDayOfWeek = 4;    //pushCycle.append(3); 
			else if(dayOfWeek.equals("목"))    cycleDayOfWeek = 5;    //pushCycle.append(4); 
			else if(dayOfWeek.equals("금"))    cycleDayOfWeek = 6;    //pushCycle.append(5);  
			else if(dayOfWeek.equals("토"))    cycleDayOfWeek = 7;    //pushCycle.append(6); 
			else 		return  "푸시 등록에 실패 하였습니다 관리자에게 문의하여 주십시오.";			
			
			pushCycle.append(--cycleDayOfWeek);  // 요일	  일(0) ~ 토(6) 	

			// 다음 실행일 세팅 :   등록한 요일 정보가 오늘보다 같거나 작은 경우 다음주에 실행				
        	nextSendDate =  this.getCurrentWeekDate(nextSendDate, cycleDayOfWeek ); // 이번주 주기를 세팅한다. // 일요일 (1) ~ 토요일(7)
	        
			if( todayDayOfWeek  >= cycleDayOfWeek) {
	        	// addDate( 기준일자,년,월,일) ;   
	        	nextSendDate = this.addDate(nextSendDate,0,0,7) ;  
			}				
			
		}else if(cycle_1.equals("매일")) {
			pushCycle.append(" *");  // 일
			pushCycle.append(" *");  // 월
			pushCycle.append(" *");  // 요일
			
		}else {
			return "푸시 등록에 실패 하였습니다 관리자에게 문의하여 주십시오.";			
		} 
		return pushCycle.toString();  // 발송 주기 	
	}
반응형
Posted by Edward. K
반응형

엑셀 다운로드 jquery 플러그인

   https://www.npmjs.com/package/tableexport.jquery.plugin

tableExport_test.zip


> 모든 문서포맷 다운로드 가능한...jquery 

      https://www.jqueryscript.net/demo/Exporting-Html-Tables-To-CSV-XLS-XLSX-Text-TableExport/

TableExport-master.zip


반응형
Posted by Edward. K