| | |
| | | import com.ycl.platform.mapper.DeviceInfoMapper; |
| | | import com.ycl.platform.mapper.WorkOrderCheckImgMapper; |
| | | import com.ycl.platform.service.WorkOrderService; |
| | | import com.ycl.utils.DateUtils; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.bytedeco.javacv.FFmpegFrameGrabber; |
| | |
| | | private final DeviceInfoMapper deviceInfoMapper; |
| | | private final WorkOrderCheckImgMapper workOrderCheckImgMapper; |
| | | |
| | | private static final ExecutorService executorService = new ThreadPoolExecutor(8, |
| | | 24, |
| | | private static final ExecutorService executorService = new ThreadPoolExecutor(16, |
| | | 32, |
| | | 5000, |
| | | TimeUnit.SECONDS, |
| | | new ArrayBlockingQueue<>(600), |
| | | new ArrayBlockingQueue<>(1000), |
| | | new ThreadPoolExecutor.CallerRunsPolicy() |
| | | ); |
| | | |
| | |
| | | Calendar ca = Calendar.getInstance(); |
| | | ca.setTime(now); |
| | | ca.add(Calendar.DATE, -6); |
| | | List<DeviceInfoVO> deviceList = workOrderService.hasErrorWorkOrderList(now, ca.getTime()); |
| | | List<DeviceInfoVO> deviceList = workOrderService.hasErrorWorkOrderList(DateUtils.getDayStart(ca.getTime()), DateUtils.getDayEnd(now)); |
| | | if (CollectionUtils.isEmpty(deviceList)) { |
| | | return; |
| | | } |