| | |
| | | package com.zy.asrs.task; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.zy.asrs.entity.BasJarMast; |
| | | import com.zy.asrs.service.BasJarMastService; |
| | | import com.zy.asrs.task.handler.WrkMastExecuteHandler; |
| | | 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; |
| | | |
| | | |
| | | /** |
| | |
| | | @Autowired |
| | | private WrkMastExecuteHandler wrkMastExecuteHandler; |
| | | @Autowired |
| | | private BasJarMastService basJarMastService; |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | @Scheduled(cron = "0/3 * * * * ? ") |
| | | private void executeJarMast(){ |
| | | List<BasJarMast> basJarMastList = basJarMastService.selectList(new EntityWrapper<BasJarMast>().eq("status", 17)); |
| | | for (BasJarMast basJarMast : basJarMastList){ |
| | | try{ |
| | | wrkMastExecuteHandler.start2(basJarMast); |
| | | } catch (Exception e){ |
| | | log.error("硫化罐任务转历史档案失败!!!"); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |