| | |
| | | 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; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Author : zhoush |
| | |
| | | */ |
| | | @Slf4j |
| | | @RunWith(SpringRunner.class) |
| | | @SpringBootTest(classes = CacheVerticalClassModuleApplication.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()); |
| | | } |
| | | |
| | | } |