Commit 50f3de93cef88ad4266e61b10ab7d1fed89f8e57

Authored by 徐烜
1 parent 5942a230

update

src/main/java/com/bsth/service/schedule/rules/ttinfo/TTInfo_input.java
1 package com.bsth.service.schedule.rules.ttinfo; 1 package com.bsth.service.schedule.rules.ttinfo;
2 2
3 import com.bsth.entity.schedule.TTInfo; 3 import com.bsth.entity.schedule.TTInfo;
  4 +import org.apache.commons.lang3.StringUtils;
4 import org.joda.time.DateTime; 5 import org.joda.time.DateTime;
5 import org.joda.time.format.DateTimeFormat; 6 import org.joda.time.format.DateTimeFormat;
6 7
@@ -51,11 +52,15 @@ public class TTInfo_input implements Comparable<TTInfo_input> { @@ -51,11 +52,15 @@ public class TTInfo_input implements Comparable<TTInfo_input> {
51 weekdays.add(false); 52 weekdays.add(false);
52 } 53 }
53 } 54 }
54 - String[] sdays = ttInfo.getSpecial_days().split(",");  
55 - for (int i = 0; i < sdays.length; i++) {  
56 - specialDays.add(DateTimeFormat.forPattern("yyyy-MM-dd").  
57 - parseDateTime(sdays[i])); 55 +
  56 + if (StringUtils.isNotEmpty(ttInfo.getSpecial_days())) {
  57 + String[] sdays = ttInfo.getSpecial_days().split(",");
  58 + for (int i = 0; i < sdays.length; i++) {
  59 + specialDays.add(DateTimeFormat.forPattern("yyyy-MM-dd").
  60 + parseDateTime(sdays[i]));
  61 + }
58 } 62 }
  63 +
59 this.updateDate = new DateTime(ttInfo.getUpdateDate()); 64 this.updateDate = new DateTime(ttInfo.getUpdateDate());
60 this.isEnable = ttInfo.getIsEnableDisTemplate(); 65 this.isEnable = ttInfo.getIsEnableDisTemplate();
61 this.qyDate = new DateTime(ttInfo.getQyrq()); 66 this.qyDate = new DateTime(ttInfo.getQyrq());