| | |
| | | package com.mes; |
| | | |
| | | import com.mes.base.entity.BigStorageCageBaseInfo; |
| | | import com.mes.bigstorage.service.BigStorageCageDetailsService; |
| | | import com.mes.bigstorage.service.BigStorageCageService; |
| | | import com.mes.common.config.Const; |
| | | import com.mes.damage.entity.Damage; |
| | | import com.mes.damage.service.DamageService; |
| | | import com.mes.job.PlcStorageCageTask; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.junit.Test; |
| | |
| | | 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; |
| | | |
| | | /** |
| | | * @Author : zhoush |
| | |
| | | BigStorageCageService bigStorageCageService; |
| | | @Autowired |
| | | PlcStorageCageTask plcStorageCageTask; |
| | | @Autowired |
| | | BigStorageCageDetailsService bigStorageCageDetailsService; |
| | | @Autowired |
| | | DamageService damageService; |
| | | |
| | | @Test |
| | | public void testFindPath() { |
| | |
| | | @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 |
| | |
| | | |
| | | @Test |
| | | public void judgeGlassTypeStatus() { |
| | | plcStorageCageTask.judgeGlassTypeStatus("P24060403|6|7", Const.A09_OUT_TARGET_POSITION); |
| | | plcStorageCageTask.judgeGlassTypeStatus("P24060403|6|7", Const.A09_OUT_TARGET_POSITION, "mesD03Address"); |
| | | } |
| | | |
| | | @Test |
| | |
| | | log.info("获取大理片笼信息:{}", bigStorageCageService.selectBigStorageCageUsage()); |
| | | } |
| | | |
| | | @Test |
| | | public void selectBigStorageCageDetails() { |
| | | log.info("获取大理片笼信息:{}", bigStorageCageDetailsService.selectBigStorageCageDetails("P24060403|3|6")); |
| | | } |
| | | |
| | | @Test |
| | | public void insertDamage() { |
| | | Damage damage=new Damage(); |
| | | damage.setGlassId("P24060403|3|6"); |
| | | damage.setLine(2001); |
| | | damage.setWorkingProcedure("冷加工"); |
| | | damage.setRemark(""); |
| | | damage.setStatus(2); |
| | | damageService.insertDamage(damage); |
| | | |
| | | } |
| | | } |