| | |
| | | package com.zy.asrs.task; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.core.common.Cools; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.entity.AgvLocDetl; |
| | | import com.zy.asrs.entity.Order; |
| | | import com.zy.asrs.entity.OrderDetl; |
| | | import com.zy.asrs.service.AgvLocDetlService; |
| | | import com.zy.asrs.service.ApiLogService; |
| | | import com.zy.asrs.service.OrderDetlService; |
| | |
| | | import com.zy.common.entity.Parameter; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Async; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | @Scheduled(cron = "0/5 * * * * ? ") |
| | | //@Scheduled(cron = "0/5 * * * * ? ") |
| | | @Scheduled(fixedDelay = 5000) |
| | | //@Async("orderThreadPool") |
| | | public void completeAndReport() { |
| | | String erpReport = Parameter.get().getErpReport(); |
| | |
| | | } |
| | | |
| | | //@Scheduled(cron = "* 0/5 * * * ? ") |
| | | @Scheduled(cron = "0/30 * * * * ? ") |
| | | @Async("orderThreadPool") |
| | | public synchronized void reportOrder() { |
| | | //@Scheduled(cron = "0/30 * * * * ? ") |
| | | @Scheduled(fixedDelay = 30000) |
| | | //@Async("orderThreadPool") |
| | | public synchronized void reportOrder() { |
| | | List<Order> orderList = orderService.selectList(new EntityWrapper<Order>().in("settle", 2, 4)); |
| | | orderList.forEach(order -> { |
| | | orderSyncHandler.timelyStart(order); |
| | |
| | | /* |
| | | 定时查询状态为2.作业中的单据,检查是否完成 |
| | | */ |
| | | @Scheduled(cron = "0 */1 * * * ? ") |
| | | //@Scheduled(cron = "0 */1 * * * ? ") |
| | | @Scheduled(fixedDelay = 60000) |
| | | public void completeOrder() { |
| | | List<Order> orderList = orderService.selectList(new EntityWrapper<Order>().eq("settle", 2)); |
| | | orderList.forEach(order -> { |
| | | orderService.checkComplete(order.getOrderNo(), null); |
| | | if (order.getPltType() != null) { |
| | | orderService.checkComplete(order.getOrderNo(), order.getPltType()); |
| | | } |
| | | }); |
| | | } |
| | | |