| | |
| | | package com.mes; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.github.yulichang.query.MPJLambdaQueryWrapper; |
| | | import com.github.yulichang.query.MPJQueryWrapper; |
| | | import com.github.yulichang.toolkit.JoinWrappers; |
| | | import com.mes.common.config.Const; |
| | | import com.mes.edgstoragecage.entity.EdgStorageCage; |
| | | import com.mes.edgstoragecage.entity.EdgStorageCageDetails; |
| | | import com.mes.edgstoragecage.service.EdgStorageCageDetailsService; |
| | | import com.mes.edgstoragecage.service.EdgStorageCageService; |
| | | import com.mes.edgstoragecage.service.impl.EdgStorageCageServiceImpl; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | import com.mes.glassinfo.service.GlassInfoService; |
| | | import com.mes.job.CacheGlassTask; |
| | | import com.mes.pp.entity.OptimizeDetail; |
| | | import com.mes.pp.entity.OptimizeLayout; |
| | | import com.mes.pp.mapper.OptimizeDetailMapper; |
| | |
| | | import org.springframework.boot.test.context.SpringBootTest; |
| | | import org.springframework.test.context.junit4.SpringRunner; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | */ |
| | | @Slf4j |
| | | @RunWith(SpringRunner.class) |
| | | @SpringBootTest(classes = CacheGlassModuleApplication.class) |
| | | @SpringBootTest(classes = CacheGlassModuleApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) |
| | | public class CacheGlassModuleApplicationTest { |
| | | |
| | | @Autowired |
| | | EdgStorageCageService edgStorageCageService; |
| | | @Autowired |
| | | EdgStorageCageDetailsService edgStorageCageDetailsService; |
| | | |
| | | @Autowired |
| | | @Resource |
| | | TaskCacheMapper taskCacheMapper; |
| | | |
| | | @Autowired |
| | |
| | | OptimizeDetailMapper optimizeDetailMapper; |
| | | @Autowired |
| | | GlassInfoService glassInfoService; |
| | | @Autowired |
| | | CacheGlassTask cacheGlassTask; |
| | | |
| | | @Test |
| | | public void testFindPath() { |
| | | String url=getClass().getResource("").getPath(); |
| | | log.info("完整路径:{}", Arrays.asList(url)); |
| | | } |
| | | |
| | | @Test |
| | | public void queryChangeGlassInfo() { |
| | | cacheGlassTask.queryChangeGlassInfo(Const.A10_OUT_TARGET_POSITION, ""); |
| | | } |
| | | |
| | | @Test |
| | | public void testChangeCellSize() { |
| | | // String url=getClass().getResource("").getPath(); |
| | | // log.info("完整路径:{}", Arrays.asList(url)); |
| | | cacheGlassTask.queryChangeGlassInfo(Const.A09_OUT_TARGET_POSITION, ""); |
| | | } |
| | | |
| | | @Test |
| | | public void testCellSize() { |
| | | // String url=getClass().getResource("").getPath(); |
| | | // log.info("完整路径:{}", Arrays.asList(url)); |
| | | cacheGlassTask.outTo(0, 0, "", "NG24051802A001|1|1|1|1", 0); |
| | | } |
| | | |
| | | @Test |
| | | public void testinTo() { |
| | | // String url=getClass().getResource("").getPath(); |
| | | // log.info("完整路径:{}", Arrays.asList(url)); |
| | | // NG24051802A001|1|4|1|4 |
| | | // cacheGlassTask.inTo("NG24051802A001|1|1|1|1", "1", "1"); |
| | | // cacheGlassTask.inTo("NG24051802A001|1|4|1|4", "1", "1"); |
| | | cacheGlassTask.inTo("NG24051802A001|1|1|2|1", "1", "1"); |
| | | } |
| | | |
| | | @Test |
| | | public void testChangeGlassInfo() { |
| | | // String url=getClass().getResource("").getPath(); |
| | | // log.info("完整路径:{}", Arrays.asList(url)); |
| | | // NG24051802A001|1|4|1|4 |
| | | cacheGlassTask.queryAndChangeGlass("NG24051802A001|1|1|1|1"); |
| | | // cacheGlassTask.queryAndChangeGlass("NG24051802A001|1|4|1|4"); |
| | | } |
| | | |
| | | @Test |
| | |
| | | List<Map<String, Object>> map= edgStorageCageService.selectEdgStorageCages(); |
| | | log.info("笼内信息:{}", Arrays.asList(map)); |
| | | } |
| | | |
| | | @Test |
| | | public void testSelectCacheEmpty() { |
| | | List<EdgStorageCage> map= edgStorageCageService.selectCacheEmpty(); |
| | | log.info("笼内空格:{}", Arrays.asList(map)); |
| | | } |
| | | |
| | | @Test |
| | | public void testScan() { |
| | | List<Map<String, Object>> map= edgStorageCageDetailsService.selectCutTerritory(); |
| | |
| | | log.info("切割当前版图信息:{}", Arrays.asList(optimizeDetail)); |
| | | |
| | | } |
| | | |
| | | @Test |
| | | public void testOptimizeDetail() { |
| | | List<Map<String, Object>> map2=optimizeDetailMapper.selectJoinMaps(JoinWrappers.lambda(OptimizeDetail.class) |