| | |
| | | |
| | | import com.integrated.zyyt.service.ZyytService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.ControllerAdvice; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.lang.reflect.Method; |
| | |
| | | * @Description |
| | | * @Version 1.0 |
| | | **/ |
| | | @ControllerAdvice |
| | | @RestController |
| | | @Slf4j |
| | | @RequestMapping("/api/zyyt") |
| | | public class ZyytController { |
| | |
| | | |
| | | } |
| | | |
| | | @GetMapping("/shkdrbTasksAuto") |
| | | /** |
| | | * start 2022-12-01 |
| | | * end 2022-12-31 |
| | | */ |
| | | public String shkdrbTasksMonth(String start,String end) throws Exception { |
| | | LocalDate startOfYear = LocalDate.parse(start); |
| | | LocalDate endOfYear = LocalDate.parse(end); |
| | | LocalDate now = LocalDate.now(); |
| | | for (LocalDate tmp = startOfYear; endOfYear.compareTo(tmp) > 0 && now.compareTo(tmp) > 0; tmp = tmp.plus(1, ChronoUnit.DAYS)) { |
| | | zyytService.shkdrbTasks(tmp); |
| | | } |
| | | return "后台执行中 ,请不要重复请求"; |
| | | } |
| | | |
| | | |
| | | @GetMapping("/djtjbTasks") |
| | | /** |
| | |
| | | return "123"; |
| | | } |
| | | |
| | | @GetMapping("/djtjbTasksAuto") |
| | | /** |
| | | * start 2022-12-01 |
| | | * end 2022-12-31 |
| | | */ |
| | | public String djtjbTasksAuto(String start,String end) throws Exception { |
| | | LocalDate startOfYear = LocalDate.parse(start); |
| | | LocalDate endOfYear = LocalDate.parse(end); |
| | | LocalDate now = LocalDate.now(); |
| | | for (LocalDate tmp = startOfYear; endOfYear.compareTo(tmp) > 0 && now.compareTo(tmp) > 0; tmp = tmp.plus(1, ChronoUnit.DAYS)) { |
| | | zyytService.djtjbTasks(tmp); |
| | | } |
| | | return "后台执行中 ,请不要重复请求"; |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | @Slf4j |