Commit d283920bad8a26f22d99dbafd564cc773c859907

Authored by 徐烜
1 parent e17a2183

update

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