#
TQS
2024-08-15 3ad8eac4b257e4bfcaef175ec1477758ad71a420
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
package com.zy.asrs.utils;
 
public class Roles {
 
    public Roles() {}
 
    // 组托入库判断
    public static Boolean pakinRole(Boolean autoing, Boolean loading, Boolean inEnable,Boolean emptyMk, Boolean pakMk,Short workNo) {
        if (!autoing) {
            System.out.println("输送线无物");
            return false;
        } else if (!loading) {
            System.out.println("输送线无物");
            return false;
        } else if (!inEnable){
            System.out.println("输送线不能入");
            return false;
        } else if (emptyMk) {
            System.out.println("有空板信号");
            return false;
        } else if (!pakMk) {
            System.out.println("锁定标记为False");
            return false;
        } else if (workNo == 0 || (workNo >= 9990 && workNo <= 9999)) {
            System.out.println("当前工作号异常");
            return false;
        } else {
            return true;
        }
    }
 
    // 拣料、并板、盘点再入库 工作号判断 判断
    public static Boolean pickRole(Boolean autoing, Boolean loading, Boolean inEnable, Boolean pakMk,Short staNo, Short siteId, Short workNo) {
        if (!autoing) {
            System.out.println("输送线无物");
            return false;
        } else if (!loading) {
            System.out.println("输送线无物");
            return false;
        } else if (!inEnable){
            System.out.println("输送线不能入");
            return false;
        }  else if (!pakMk) {
            System.out.println("锁定标记为False");
            return false;
        } else if (workNo <= 0 || (workNo >= 9990 && workNo != 9996)) {
            System.out.println("当前工作号异常");
            return false;
        } else if (!staNo.equals(siteId)) {
            System.out.println("当前站点与目标站不匹配");
            return false;
        } else {
            System.out.println("*****");
            return true;
        }
    }
}