zhoushihao
2024-06-21 e555f50e1bb0cb6b8facca208c70df4dcce06b80
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
package com.mes;
 
import com.mes.base.entity.BigStorageCageBaseInfo;
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 updateSlotRemain() {
        List<String> taskGlassIds = Arrays.asList(
//                "P24060403|1|1",
//                "P24060403|1|2",
//                "P24060403|1|3",
//                "P24060403|1|4",
                "P24060403|1|5");
        List<BigStorageCageBaseInfo> list = new ArrayList<>();
        list.add(new BigStorageCageBaseInfo("P24060403|1|1", 1080.0, 4));
        list.add(new BigStorageCageBaseInfo("P24060403|1|2", 1080.0, 1));
        list.add(new BigStorageCageBaseInfo("P24060403|1|3", 1080.0, 1));
        list.add(new BigStorageCageBaseInfo("P24060403|1|4", 1080.0, 16));
        list.add(new BigStorageCageBaseInfo("P24060403|1|5", 1080.0, 15));
 
        plcStorageCageTask.updateSlotRemain(list, taskGlassIds);
    }
 
    @Test
    public void plcToHomeEdgOutTask() {
        plcStorageCageTask.plcToHomeEdgOutTask();
    }
 
    @Test
    public void plcToHomeEdgFreeCarTask() {
        plcStorageCageTask.plcToHomeEdgFreeCarTask();
    }
 
    @Test
    public void plcStorageCageTask() {
        plcStorageCageTask.plcToHomeEdgScan();
 
    }
 
    @Test
    public void computeTargetByLine() {
        plcStorageCageTask.computeTargetByLine(2001);
    }
 
    @Test
    public void judgeGlassTypeStatus() {
        plcStorageCageTask.judgeGlassTypeStatus("P24060403|6|7", Const.A09_OUT_TARGET_POSITION);
    }
 
    @Test
    public void getStartLine() {
        Integer startLine = plcStorageCageTask.getStartLine();
        log.info("---------{}", startLine);
    }
 
    @Test
    public void selectBigStorageCageUsage() {
        log.info("获取大理片笼信息:{}", bigStorageCageService.selectBigStorageCageUsage());
    }
 
}