| | |
| | | import com.zy.asrs.domain.vo.PlcErrorTableVo; |
| | | import com.zy.asrs.domain.vo.SiteTableVo; |
| | | import com.zy.asrs.entity.BasDevp; |
| | | import com.zy.asrs.entity.BasExt; |
| | | import com.zy.asrs.service.BasDevpService; |
| | | import com.zy.asrs.service.BasExtService; |
| | | import com.zy.asrs.utils.CommandUtils; |
| | | import com.zy.core.cache.MessageQueue; |
| | | import com.zy.core.cache.OutputQueue; |
| | | import com.zy.core.cache.SlaveConnection; |
| | | import com.zy.core.enums.SlaveType; |
| | | import com.zy.core.model.DevpSlave; |
| | | import com.zy.core.model.ExtSlave; |
| | | import com.zy.core.model.Task; |
| | | import com.zy.core.model.protocol.ExtProtocol; |
| | | import com.zy.core.model.protocol.StaProtocol; |
| | | import com.zy.core.properties.SlaveProperties; |
| | | import com.zy.core.DevpThread; |
| | | import com.zy.core.thread.BarcodeThread; |
| | | import com.zy.core.thread.MelsecExtThread; |
| | | import com.zy.core.thread.SiemensDevpThread; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | private SlaveProperties slaveProperties; |
| | | @Autowired |
| | | private BasDevpService basDevpService; |
| | | @Autowired |
| | | private BasExtService basExtService; |
| | | |
| | | |
| | | @GetMapping("/io/mode/info/site") |
| | |
| | | vo.setPakMk(staProtocol.isPakMk()?"Y":"N"); // 入库标记 |
| | | vo.setEmptyMk(staProtocol.isEmptyMk()?"Y":"N"); // 空板信号 |
| | | vo.setStaNo(staProtocol.getStaNo()); // 目标站 |
| | | vo.setStaNo(staProtocol.getStaNo()); // 目标站 |
| | | vo.setStaNo(staProtocol.getStaNo()); // 目标站 |
| | | vo.setFullPlt(staProtocol.isFullPlt()?"Y":"N"); |
| | | vo.setLow(staProtocol.isLow()?"Y":"N"); |
| | | vo.setCar(staProtocol.isCar()?"Y":"N"); |
| | | // vo.setLocType1(staProtocol.isHigh() != staProtocol.isLow() && staProtocol.isLow() ? "低" : "高"); //高低库位 |
| | | vo.setLocType1(devp.getDevNo()==102 ? "高" : "低"); |
| | | vo.setBarcode(staProtocol.getBarcode()); |
| | |
| | | return R.ok().add(list); |
| | | } |
| | | |
| | | @GetMapping("/list/ext/auth") |
| | | @ManagerAuth(memo = "机械臂信息") |
| | | public R extList(){ |
| | | List<SiteTableVo> list = new ArrayList<>(); |
| | | // 持久数据 |
| | | List<BasExt> basExts = basExtService.selectList(new EntityWrapper<BasExt>().orderBy("ext_no")); |
| | | for (BasExt ext : basExts) { |
| | | SiteTableVo vo = new SiteTableVo(); |
| | | vo.setDevNo(ext.getExtNo()); // 站点编号 |
| | | vo.setInEnable(ext.getExtTask()); // 可入 可取 |
| | | vo.setOutEnable(ext.getExtPut()); // 可出 可放 |
| | | list.add(vo); |
| | | } |
| | | return R.ok().add(list); |
| | | } |
| | | |
| | | @PostMapping("/table/plc/errors") |
| | | @ManagerAuth(memo = "输送设备plc异常信息表") |
| | | public R plcErrorTable(){ |