package com.zy.ints.task; import com.zy.asrs.task.core.ReturnT; import com.zy.ints.entity.WaitMatin; import com.zy.ints.task.handler.WaitMatinLogHandler; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; import java.util.List; /** * 入库通知档转历史档 * Created by TQS on 2021/8/31 */ @Component public class WaitMatinLogScheduler { private static final Logger log = LoggerFactory.getLogger(WaitMatinLogScheduler.class); @Autowired private WaitMatinLogHandler waitMatinLogHandler; @Scheduled(cron = "0/3 * * * * ? ") private void execute(){ List WaitMatins = null; for (WaitMatin waitMatin : WaitMatins) { ReturnT result = waitMatinLogHandler.start(waitMatin); if (!result.isSuccess()) { log.error("入库通知档[billNo={}],[seqNo={}]历史档处理失败", waitMatin.getBillNo(),waitMatin.getSeqNo()); } } } }