wuyouming666
2024-05-28 4330edfe62916213b616d14a34de0ad23bc7db0e
hangzhoumesParent/moduleService/UnLoadGlassModule/src/test/java/mes/UnloadGlassModuleApplicationTest.java
@@ -10,11 +10,13 @@
import com.mes.downworkstation.service.DownWorkstationService;
import com.mes.downworkstation.service.impl.DownWorkstationServiceImpl;
import com.mes.glassinfo.service.impl.GlassInfoServiceImpl;
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.context.annotation.Bean;
import org.springframework.test.context.junit4.SpringRunner;
import java.util.Arrays;
@@ -29,6 +31,7 @@
@Slf4j
@RunWith(SpringRunner.class)
@SpringBootTest(classes = UnLoadGlassApplication.class)
public class UnloadGlassModuleApplicationTest {
    @Autowired
@@ -43,6 +46,13 @@
    DownStorageCageDetailsService downStorageCageDetailsService;
    @Autowired
    DownWorkstationServiceImpl downWorkstationServiceImpl;
    @Autowired
    GlassInfoServiceImpl glassInfoServiceImpl;
    @Autowired
    DownWorkstationService downWorkstationService;
    @Test
    public void testFindPath() {
@@ -51,21 +61,22 @@
    @Test
    public void testCacheGlass() {
        List<Map> map = downStorageCageDetailsServiceImpl.getCacheInfo();
        log.info("笼内信息:{}", Arrays.asList(map));
        //List<Map<String, Object>> map = downStorageCageServiceImpl.selectDownStorageCages();
      //  log.info("笼内信息:{}", Arrays.asList(map));
        downStorageCageServiceImpl.updateDownStorageCageDetails(1,null);
    }
    @Test
    public void testselectCacheEmpty() {
        List<DownStorageCageDetails> map = downStorageCageDetailsServiceImpl.getCacheLeisure();
        log.info("笼内空格:{}", Arrays.asList(map));
       // List<DownStorageCageDetails> map = downStorageCageDetailsServiceImpl.getCacheLeisure();
       // log.info("笼内空格:{}", Arrays.asList(map));
    }
    @Test
    public void testgetCacheOut() {
        List<DownStorageCageDetails> map = downStorageCageDetailsServiceImpl.getCacheOut(1, 5);
        log.info("根据传入的工位查询符合按照顺序和大小出片的小片:{}", Arrays.asList(map));
       // List<DownStorageCageDetails> map = downStorageCageDetailsServiceImpl.getCacheOut(1, 5);
      //  log.info("根据传入的工位查询符合按照顺序和大小出片的小片:{}", Arrays.asList(map));
    }
@@ -79,7 +90,7 @@
    @Test
    public void testplc() {
        log.info("测试");
        downWorkstationServiceImpl.insertdownglassinfo();
        glassInfoServiceImpl.getGlassInfoCountByFlowCardId("NG24030702A01");
    }
@@ -88,7 +99,7 @@
    @Test
    public void testin2() {
        log.info("测试进片");
        downStorageCageDetailsServiceImpl.getIsExistIntoCacheByflowcardid("NG2023005",500);
        //downStorageCageDetailsServiceImpl.getIsExistIntoCacheByflowcardid("NG2023005",500);
    }
@@ -96,22 +107,33 @@
    @Test
    public void selectCacheEmpty() {
        log.info("测试进片");
        downStorageCageDetailsServiceImpl.getCacheLeisure();
        //downStorageCageDetailsServiceImpl.getCacheLeisure();
    }
//    @Test
//    public void CacheEmpty() {
//        log.info("测试出片");
//        downStorageCageDetailsService.CacheOut(1,2);
//
//    }
    @Test
    public void CacheEmpty() {
    public void CacheEmpty1() {
        log.info("测试出片");
        downStorageCageDetailsService.CacheOut(1,10);
        downStorageCageDetailsServiceImpl.CacheOut1(1,6);
    }
    @Test
    public void getTotalGlassDimensionsByWorkstation() {
        log.info("工位显示");
        downWorkstationServiceImpl.getTotalGlassDimensionsByWorkstation();
        downWorkstationService.getTotalGlassDimensionsByWorkstation(1,3);
    }
@@ -127,7 +149,7 @@
    public void updateTaskStateToZero() {
        log.info("更新状态0");
        downGlassTaskServiceImpl.updateTaskStateToZero(3);
        downGlassTaskServiceImpl.updateTaskState("3");
    }
@@ -138,5 +160,13 @@
        downStorageCageServiceImpl.selectCacheEmpty();
    }
    @Test
    public void getFlowCardId() {
        glassInfoServiceImpl.getFlowCardId();
    }
}