|
@@ -18,7 +18,9 @@ import org.springframework.validation.BindingResult;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
import javax.validation.Valid;
|
|
import javax.validation.Valid;
|
|
|
|
|
+import java.time.LocalDate;
|
|
|
import java.time.LocalDateTime;
|
|
import java.time.LocalDateTime;
|
|
|
|
|
+import java.time.format.DateTimeFormatter;
|
|
|
import java.util.Calendar;
|
|
import java.util.Calendar;
|
|
|
import java.util.HashMap;
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
@@ -98,10 +100,18 @@ public class FosterwxTaskScheduleController extends BaseController<FosterwxTaskS
|
|
|
postBasePageHandle.setPagesize(100000);
|
|
postBasePageHandle.setPagesize(100000);
|
|
|
|
|
|
|
|
Calendar c = Calendar.getInstance();
|
|
Calendar c = Calendar.getInstance();
|
|
|
- // c.set(year, month, 0);
|
|
|
|
|
|
|
+ c.set(Integer.valueOf(year), Integer.valueOf(year), 0);
|
|
|
|
|
+ int dayOfMonth = c.get(Calendar.DAY_OF_MONTH);
|
|
|
|
|
|
|
|
|
|
|
|
|
- Map<String, Object> res = fosterwxTaskScheduleService.getList(postBasePageHandle, null, stationId, null);
|
|
|
|
|
|
|
+ Map<String, Object> res = new HashMap<>();
|
|
|
|
|
+ for (int i = 1; i <= dayOfMonth; i++) {
|
|
|
|
|
+ String date = year + "-" + String.format("%02d", Integer.valueOf(month)) + "-" + String.format("%02d", i);
|
|
|
|
|
+ LocalDate localDate = LocalDate.parse(date, DateTimeFormatter.ofPattern("yyyy-MM-dd"));
|
|
|
|
|
+
|
|
|
|
|
+ res.put(date, fosterwxTaskScheduleService.getList(postBasePageHandle, null, stationId, date));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
return AjaxResult.success(res);
|
|
return AjaxResult.success(res);
|
|
|
}
|
|
}
|
|
|
|
|
|