package com.mes; import com.mes.temperingglass.entity.TemperingGlassInfo; import com.mes.temperingglass.service.TemperingGlassInfoService; 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.Arrays; import java.util.List; /** * @Author : zhoush * @Date: 2024/3/27 16:37 * @Description: */ @Slf4j @RunWith(SpringRunner.class) @SpringBootTest(classes = TemperingGlassModuleApplication.class) public class TemperingApplicationTest { @Autowired private TemperingGlassInfoService temperingAgoService; @Test public void testFindPa() { List layoutId = temperingAgoService.selectLayoutId(); if(!layoutId.isEmpty()) { List intoGlass = temperingAgoService.selectIntoGlass(layoutId.get(0)); log.info("已出中的玻璃:{}", Arrays.asList(intoGlass)); //进炉中的第二个版图 if (layoutId.size() > 1) { List intoGlass2 = temperingAgoService.selectIntoGlass(layoutId.get(1)); log.info("已出中的玻璃:{}", Arrays.asList(intoGlass2)); } } } @Test public void testFindPa2() { List glass = temperingAgoService.selectOutGlass(); log.info("已出中的玻璃:{}", Arrays.asList(glass)); } @Test public void testFindPa3() { List glass = temperingAgoService.selectWaitingGlass(); log.info("等待中的玻璃:{}", Arrays.asList(glass)); } @Test public void testFindPa4() { List glass = temperingAgoService.selectOverGlass(); log.info("钢化后的玻璃:{}", Arrays.asList(glass)); } }