|
@@ -15,6 +15,8 @@ import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import java.time.LocalDate;
|
|
|
+import java.time.LocalDateTime;
|
|
|
+import java.time.LocalTime;
|
|
|
|
|
|
/**
|
|
|
* <p>
|
|
@@ -38,8 +40,14 @@ public class PmTimeConfController {
|
|
|
*/
|
|
|
@GetMapping("/submitCount")
|
|
|
public PmSubmitCountResponseVO submitCount(@RequestParam(value = "submitDate", required = false) String submitDate) {
|
|
|
- if (submitDate == null || submitDate.isEmpty()) {
|
|
|
- submitDate = LocalDate.now().toString();
|
|
|
+ if (submitDate == null) {
|
|
|
+ LocalDateTime now = LocalDateTime.now();
|
|
|
+ LocalDateTime today1800 = LocalDateTime.of(now.toLocalDate(), LocalTime.of(18, 0));
|
|
|
+ if (now.isBefore(today1800)) {
|
|
|
+ submitDate = now.toLocalDate().minusDays(1).toString();
|
|
|
+ } else {
|
|
|
+ submitDate = now.toLocalDate().toString();
|
|
|
+ }
|
|
|
}
|
|
|
return pmTimeConfService.submitCount(submitDate);
|
|
|
}
|