|
@@ -181,20 +181,25 @@ public class ScheduleSheetServiceImpl implements ScheduleSheetService {
|
|
//设置上课整点小时
|
|
//设置上课整点小时
|
|
if (coursePeriods.length == 2) {
|
|
if (coursePeriods.length == 2) {
|
|
|
|
|
|
- int start = Integer.parseInt(coursePeriods[0]);
|
|
|
|
- int end = Integer.parseInt(coursePeriods[1]);
|
|
|
|
|
|
+ String[] startArr = coursePeriods[0].split(":");
|
|
|
|
+ String[] endArr = coursePeriods[1].split(":");
|
|
|
|
|
|
- String courseHour = "";
|
|
|
|
|
|
+ if(startArr.length>0&&endArr.length>0){
|
|
|
|
+ int start = Integer.parseInt(startArr[0]);
|
|
|
|
+ int end = Integer.parseInt(endArr[0]);
|
|
|
|
|
|
- while (start != end) {
|
|
|
|
- courseHour += String.valueOf(start) + ",";
|
|
|
|
- start++;
|
|
|
|
- }
|
|
|
|
|
|
+ String courseHour = "";
|
|
|
|
+
|
|
|
|
+ while (start != end) {
|
|
|
|
+ courseHour += String.valueOf(start) + ",";
|
|
|
|
+ start++;
|
|
|
|
+ }
|
|
|
|
|
|
- if(StringUtils.isNotEmpty(courseHour)){
|
|
|
|
- courseHour = courseHour.substring(0,courseHour.lastIndexOf(","));
|
|
|
|
|
|
+ if(StringUtils.isNotEmpty(courseHour)){
|
|
|
|
+ courseHour = courseHour.substring(0,courseHour.lastIndexOf(","));
|
|
|
|
+ }
|
|
|
|
+ scheduleSheet.setCourseHour(courseHour);
|
|
}
|
|
}
|
|
- scheduleSheet.setCourseHour(courseHour);
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|