| | |
| | | package com.example.springboot.controller; |
| | | |
| | | import com.example.springboot.common.Result; |
| | | import com.example.springboot.component.S7control; |
| | | import com.example.springboot.entity.StorageCage; |
| | | import com.example.springboot.mapper.SpianMapper; |
| | | import com.example.springboot.service.SpianService; |
| | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.List; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | @RestController |
| | |
| | | //出片任务 |
| | | @GetMapping("/all2") |
| | | public Result selectdd(String orderid){ |
| | | |
| | | |
| | | |
| | | //获取优先出片的位置 |
| | | StorageCage cageout=spianMapper.selectOut(orderid); |
| | | int cage =cageout.getCage(); //储存出片位置,笼子格子几号玻璃 |
| | |
| | | if(cage<6){ |
| | | StorageCage cagecell= spianMapper.selectGlassCage(cage,glasswidth,0,6); |
| | | //获取调拨位置进行调拨 |
| | | List<String> adddresslist=new ArrayList<>(); |
| | | adddresslist.add("DB105.6"); |
| | | adddresslist.add("DB105.8"); |
| | | adddresslist.add("DB105.10"); |
| | | adddresslist.add("DB105.14"); |
| | | List<Short> datas=new ArrayList<>(); |
| | | datas.add((short)0); |
| | | datas.add((short)0); |
| | | datas.add((short)0); |
| | | datas.add((short)0); |
| | | S7control.getinstance().WriteWord(adddresslist, datas); |
| | | return Result.success(cagecell); //调拨位置的参数内容 |
| | | //判断调拨结束后再次出片 |
| | | }else{ |