| | |
| | | private Thread thread2; |
| | | private Thread thread3; |
| | | private Thread thread4; |
| | | private Thread thread5; |
| | | |
| | | /** |
| | | * =====>> 开始工作 |
| | |
| | | |
| | | thread2 = new Thread(this::crnAndDevOtherRun); |
| | | thread2.start(); |
| | | |
| | | thread5 = new Thread(this::demoRun5); |
| | | thread5.start(); |
| | | |
| | | thread3 = new Thread(this::demoRun); |
| | | thread3.start(); |
| | |
| | | } |
| | | } |
| | | |
| | | private void demoRun5() { |
| | | while (!Thread.currentThread().isInterrupted()) { |
| | | try { |
| | | // 间隔 |
| | | Thread.sleep(200); |
| | | // 系统运行状态判断 |
| | | if (!SystemProperties.WCS_RUNNING_STATUS.get()) { |
| | | continue; |
| | | } |
| | | // 系统演示模式运行状态判断 |
| | | if (!SystemProperties.WCS_RUNNING_STATUS_DEMO.get()) { |
| | | continue; |
| | | } |
| | | // 系统演示模式运行状态判断 |
| | | if (SystemProperties.WCS_RUNNING_STATUS_DEMO_VALUE != 2) { |
| | | continue; |
| | | } |
| | | // 入库 ===>> 执行对工作档的完成操作 |
| | | mainService.locMastTaskDemo(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | private void demoOpenRun() { |
| | | while (!Thread.currentThread().isInterrupted()) { |
| | | try { |
| | |
| | | SystemProperties.WCS_RUNNING_STATUS_DEMO.set(true); |
| | | SystemProperties.WCS_RUNNING_STATUS_DEMO_VALUE = 2; |
| | | } else if (signHpMk == 1) { |
| | | SystemProperties.WCS_RUNNING_STATUS_DEMO_VALUE = 1; |
| | | // SystemProperties.WCS_RUNNING_STATUS_DEMO_VALUE = 1; |
| | | |
| | | SystemProperties.WCS_RUNNING_STATUS_DEMO.set(true); |
| | | SystemProperties.WCS_RUNNING_STATUS_DEMO_VALUE = 2; |
| | | } else { |
| | | SystemProperties.WCS_RUNNING_STATUS_DEMO_VALUE = 0; |
| | | } |
| | |
| | | if (thread2 != null) thread2.interrupt(); |
| | | if (thread3 != null) thread3.interrupt(); |
| | | if (thread4 != null) thread4.interrupt(); |
| | | if (thread5 != null) thread5.interrupt(); |
| | | } |
| | | |
| | | } |