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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
package com.mes;
 
import com.mes.bigstorage.service.BigStorageCageService;
import com.mes.common.config.Const;
import com.mes.job.PlcStorageCageTask;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
 
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
 
/**
 * @Author : zhoush
 * @Date: 2024/3/27 16:37
 * @Description:
 */
@Slf4j
@RunWith(SpringRunner.class)
@SpringBootTest(classes = CacheVerticalClassModuleApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
public class CacheVerticalGlassModuleApplicationTest {
 
    @Autowired
    BigStorageCageService bigStorageCageService;
    @Autowired
    PlcStorageCageTask plcStorageCageTask;
 
    @Test
    public void testFindPath() {
        log.info("完整路径:{}", Arrays.asList("123"));
    }
 
    @Test
    public void outGlass() {
        log.info("完整路径:{}", bigStorageCageService.outGlass());
    }
 
    @Test
    public void plcToHomeEdgOutTask() {
//        log.info("获取大理片笼信息:{}",bigStorageCageService.querybigStorageCageDetail());
        plcStorageCageTask.plcToHomeEdgOutTask();
    }
 
    @Test
    public void plcToHomeEdgFreeCarTask() {
//        log.info("获取大理片笼信息:{}",bigStorageCageService.querybigStorageCageDetail());
        plcStorageCageTask.plcToHomeEdgFreeCarTask();
    }
 
    @Test
    public void plcStorageCageTask() {
//        log.info("获取大理片笼信息:{}",bigStorageCageService.querybigStorageCageDetail());
        List<String> list = new ArrayList<>();
        //2002
//        list.add("P24060403|4|3");
//        list.add("P24060403|5|4");
//        list.add("P24060403|2|1");
//        list.add("P24060403|3|2");
//        list.add("P24060403|1|3");
//        list.add("P24060403|3|1");
//        list.add("P24060403|2|3");
//        list.add("P24060403|1|1");
//        list.add("P24060403|8|6");
//        list.add("P24060403|7|2");
        //2001
//        list.add("P24060403|3|6");
//        list.add("P24060403|5|2");
//        list.add("P24060403|4|4");
//        list.add("P24060403|3|5");
//        list.add("P24060403|5|3");
//        list.add("P24060403|1|2");
//        list.add("P24060403|2|2");
//        list.add("P24060403|5|1");
        list.add("P24060403|2|4");
        list.add("P24060403|1|5");
        list.add("P24060403|4|2");
        list.add("P24060403|1|4");
        list.add("P24060403|4|1");
        list.add("P24060403|8|7");
        for (String e : list) {
            plcStorageCageTask.plcToHomeEdgScan(e);
        }
    }
 
    @Test
    public void computeTargetByLine() {
//        log.info("获取大理片笼信息:{}",bigStorageCageService.querybigStorageCageDetail());
        plcStorageCageTask.computeTargetByLine(2001);
    }
 
    @Test
    public void judgeGlassTypeStatus() {
//        log.info("获取大理片笼信息:{}",bigStorageCageService.querybigStorageCageDetail());
        plcStorageCageTask.judgeGlassTypeStatus("P24060403|6|7", Const.A09_OUT_TARGET_POSITION);
    }
 
    @Test
    public void getStartLine() {
//        log.info("获取大理片笼信息:{}",bigStorageCageService.querybigStorageCageDetail());
        Integer startLine = plcStorageCageTask.getStartLine();
        log.info("---------{}", startLine);
    }
 
    @Test
    public void selectBigStorageCageUsage() {
//        bigStorageCageService.querybigStorageCageDetail(1);
        log.info("获取大理片笼信息:{}", bigStorageCageService.selectBigStorageCageUsage());
    }
 
}