wu
2024-06-24 09a010c5dc11c68a866a6075a74bd1bbefb4a9a8
hangzhoumesParent/moduleService/UnLoadGlassModule/src/test/java/mes/UnloadGlassModuleApplicationTest.java
@@ -1,22 +1,30 @@
package mes;
import com.mes.UnLoadGlassApplication;
import com.mes.downglassinfo.service.DownGlassTaskService;
import com.mes.downglassinfo.service.impl.DownGlassInfoServiceImpl;
import com.mes.downglassinfo.service.impl.DownGlassTaskServiceImpl;
import com.mes.downstorage.entity.DownStorageCage;
import com.mes.downstorage.entity.DownStorageCageDetails;
import com.mes.downstorage.service.DownStorageCageDetailsService;
import com.mes.downstorage.service.DownStorageCageService;
import com.mes.downstorage.service.impl.DownStorageCageDetailsServiceImpl;
import com.mes.downstorage.service.impl.DownStorageCageServiceImpl;
import com.mes.downworkstation.service.DownWorkstationService;
import com.mes.downworkstation.service.impl.DownWorkstationServiceImpl;
import com.mes.glassinfo.service.impl.GlassInfoServiceImpl;
import com.mes.utils.Result;
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 org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.Arrays;
import java.util.List;
@@ -30,6 +38,7 @@
@Slf4j
@RunWith(SpringRunner.class)
@SpringBootTest(classes = UnLoadGlassApplication.class)
public class UnloadGlassModuleApplicationTest {
    @Autowired
@@ -48,6 +57,13 @@
    GlassInfoServiceImpl glassInfoServiceImpl;
    @Autowired
    DownWorkstationService downWorkstationService;
    @Autowired
    DownStorageCageService downStorageCageService;
    @Autowired
    DownGlassTaskService downGlassTaskService;
    @Test
    public void testFindPath() {
@@ -56,8 +72,9 @@
    @Test
    public void testCacheGlass() {
        List<Map<String, Object>> 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
@@ -105,18 +122,29 @@
    }
//    @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("工位显示");
        downWorkstationService.getTotalGlassDimensionsByWorkstation();
        downWorkstationService.getTotalGlassDimensionsByWorkstation(1,3);
    }
@@ -132,7 +160,7 @@
    public void updateTaskStateToZero() {
        log.info("更新状态0");
        downGlassTaskServiceImpl.updateTaskStateToZero("3");
        downGlassTaskServiceImpl.updateTaskState("3");
    }
@@ -143,5 +171,30 @@
        downStorageCageServiceImpl.selectCacheEmpty();
    }
    @Test
    public void getFlowCardId() {
        glassInfoServiceImpl.getFlowCardId();
    }
    @Test
    public void getUnloadingTaskState() {
        downGlassTaskService.getUnloadingTaskState();
    }
    @Test
    public void updateDownStorageCage() {
        DownStorageCage downStorageCage=  new DownStorageCage();
        downStorageCage.setEnableState("0");
        downStorageCage.setId(1);
        downStorageCageService.updateDownStorageCage(downStorageCage);
    }
}