|  |  |  | 
|---|
|  |  |  | import com.zy.common.entity.Parameter; | 
|---|
|  |  |  | import lombok.extern.slf4j.Slf4j; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Value; | 
|---|
|  |  |  | import org.springframework.scheduling.annotation.Async; | 
|---|
|  |  |  | import org.springframework.scheduling.annotation.Scheduled; | 
|---|
|  |  |  | import org.springframework.stereotype.Component; | 
|---|
|  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private ApiLogService apiLogService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Value("${erp.switch.ErpReportOld}") | 
|---|
|  |  |  | private boolean ErpReportOld; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Scheduled(cron = "0 0 1 * * ? ") | 
|---|
|  |  |  | public void clearApiLog() { | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Scheduled(cron = "0/30 * * * * ? ") | 
|---|
|  |  |  | @Scheduled(cron = "0 1 * * * ? ") | 
|---|
|  |  |  | @Async("orderThreadPool") | 
|---|
|  |  |  | public void completeAndReportOrderIssuedOnceMore() { | 
|---|
|  |  |  | List<Order> orderList = orderService.selectComplete99(); | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Scheduled(cron = "0/5 * * * * ? ") | 
|---|
|  |  |  | @Scheduled(cron = "0/30 * * * * ? ") | 
|---|
|  |  |  | @Async("orderThreadPool") | 
|---|
|  |  |  | public void completeAndReportOrderIssued() { | 
|---|
|  |  |  | //        String erpReport = Parameter.get().getErpReport(); | 
|---|
|  |  |  | 
|---|
|  |  |  | //        } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Scheduled(cron = "0/5 * * * * ? ") | 
|---|
|  |  |  | @Scheduled(cron = "0/30 * * * * ? ") | 
|---|
|  |  |  | @Async("orderThreadPool") | 
|---|
|  |  |  | public void completeAndReportOrderReport() { | 
|---|
|  |  |  | if (!ErpReportOld){ | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | String erpReport = Parameter.get().getErpReport(); | 
|---|
|  |  |  | if (!Cools.isEmpty(erpReport) && erpReport.equals("true")) { | 
|---|
|  |  |  | List<Order> orders = orderService.selectComplete(); | 
|---|