|  | @@ -13,6 +13,7 @@ import com.ym.mec.biz.service.StudentExtracurricularExercisesSituationService;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.service.StudentServeService;
 | 
	
		
			
				|  |  |  import com.ym.mec.common.controller.BaseController;
 | 
	
		
			
				|  |  |  import com.ym.mec.common.entity.HttpResponseResult;
 | 
	
		
			
				|  |  | +import com.ym.mec.util.date.DateUtil;
 | 
	
		
			
				|  |  |  import io.swagger.annotations.Api;
 | 
	
		
			
				|  |  |  import io.swagger.annotations.ApiOperation;
 | 
	
		
			
				|  |  |  import org.apache.commons.lang3.StringUtils;
 | 
	
	
		
			
				|  | @@ -22,6 +23,8 @@ import org.springframework.web.bind.annotation.GetMapping;
 | 
	
		
			
				|  |  |  import org.springframework.web.bind.annotation.RequestMapping;
 | 
	
		
			
				|  |  |  import org.springframework.web.bind.annotation.RestController;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +import java.time.DayOfWeek;
 | 
	
		
			
				|  |  | +import java.time.LocalDate;
 | 
	
		
			
				|  |  |  import java.util.Arrays;
 | 
	
		
			
				|  |  |  import java.util.List;
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -94,13 +97,19 @@ public class StudentExtracurricularExercisesSituationController extends BaseCont
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @GetMapping("/exercisesSituationStatistics")
 | 
	
		
			
				|  |  | -    public HttpResponseResult exercisesSituationStatistics(String monday){
 | 
	
		
			
				|  |  | +    public HttpResponseResult exercisesSituationStatistics(String startDay, String monday){
 | 
	
		
			
				|  |  |          if(StringUtils.isNotBlank(monday)){
 | 
	
		
			
				|  |  |              studentServeService.exercisesSituationStatistics(monday);
 | 
	
		
			
				|  |  | -        }else{
 | 
	
		
			
				|  |  | -            String[] mondays=new String[]{"2020-05-13","2020-05-20","2020-05-27"};
 | 
	
		
			
				|  |  | -            for (String mondayStr : mondays) {
 | 
	
		
			
				|  |  | -                studentServeService.exercisesSituationStatistics(mondayStr);
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        if(StringUtils.isNotBlank(startDay)){
 | 
	
		
			
				|  |  | +            LocalDate date=LocalDate.now();
 | 
	
		
			
				|  |  | +            if(StringUtils.isNotBlank(startDay)){
 | 
	
		
			
				|  |  | +                date= LocalDate.parse(startDay, DateUtil.dateFormatter);
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            while (date.isBefore(LocalDate.now())){
 | 
	
		
			
				|  |  | +                date = date.with(DateUtil.weekFields.dayOfWeek(), DayOfWeek.MONDAY.getValue());
 | 
	
		
			
				|  |  | +                studentServeService.exercisesSituationStatistics(date.format(DateUtil.dateFormatter));
 | 
	
		
			
				|  |  | +                date = date.with(DateUtil.weekFields.dayOfWeek(), DayOfWeek.SUNDAY.getValue()).plusDays(1);
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          return succeed();
 |