Commit 74e0e099c30d42aeb92ffb96a7eb19925bed44dd
1 parent
58a9b563
update
Showing
1 changed file
with
9 additions
and
4 deletions
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,15 @@ 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 | + | |
| 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 | 64 | this.updateDate = new DateTime(ttInfo.getUpdateDate()); |
| 60 | 65 | this.isEnable = ttInfo.getIsEnableDisTemplate(); |
| 61 | 66 | this.qyDate = new DateTime(ttInfo.getQyrq()); | ... | ... |