|
|
@@ -57,14 +57,16 @@ public class TemplateInfoController {
|
|
|
templateInfo.setCreateTime(new Date());
|
|
|
templateInfo.setStatus("0");
|
|
|
|
|
|
- if (templateInfo.getDateRangeArr().length == 2) {
|
|
|
- String start = templateInfo.getDateRangeArr()[0];
|
|
|
- String end = templateInfo.getDateRangeArr()[1];
|
|
|
+ if(templateInfo.getDateRangeArr()!=null) {
|
|
|
+ if (templateInfo.getDateRangeArr().length == 2) {
|
|
|
+ String start = templateInfo.getDateRangeArr()[0];
|
|
|
+ String end = templateInfo.getDateRangeArr()[1];
|
|
|
|
|
|
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");
|
|
|
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");
|
|
|
|
|
|
- templateInfo.setStartDate(sdf.parse(start));
|
|
|
- templateInfo.setEndDate(sdf.parse(end));
|
|
|
+ templateInfo.setStartDate(sdf.parse(start));
|
|
|
+ templateInfo.setEndDate(sdf.parse(end));
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|