| | |
| | | |
| | | import com.zy.asrs.task.handler.WorkLogHandler; |
| | | import com.zy.asrs.task.handler.WorkMastHandler; |
| | | import com.zy.system.entity.Config; |
| | | import com.zy.system.service.ConfigService; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.PostConstruct; |
| | | import javax.annotation.PreDestroy; |
| | | |
| | | /** |
| | | * 单线程模式 ( 已弃用 ) |
| | | * 任务中心调度器 |
| | | * Created by vincent on 2020/7/4 |
| | | */ |
| | | @Component |
| | | //@Component |
| | | @Deprecated |
| | | public class WcsDispatcher { |
| | | |
| | | private static final Logger log = LoggerFactory.getLogger(WcsDispatcher.class); |
| | |
| | | try { |
| | | Thread.sleep(3000); |
| | | |
| | | // workMastHandler.start(); |
| | | workMastHandler.start(); |
| | | |
| | | if(!workLogHandler.start()) { |
| | | Config config = new Config( |
| | | "name", // 名称[非空] |
| | | "code", // 编码[非空] |
| | | "val", // 对应值[非空] |
| | | (short)1, // 类型[非空] |
| | | (short)1 // 状态[非空] |
| | | ); |
| | | boolean insert = configService.insert(config); |
| | | System.out.println(insert); |
| | | } |
| | | workLogHandler.start(); |
| | | |
| | | } catch (Exception e) { |
| | | log.error("Exception", e); |