| | |
| | | import com.zy.asrs.domain.vo.*; |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.mapper.BasRgvErrMapper; |
| | | import com.zy.asrs.service.BasCircularShuttleService; |
| | | import com.zy.asrs.service.BasDevpPositionService; |
| | | import com.zy.asrs.service.BasRgvService; |
| | | import com.zy.asrs.service.WrkMastService; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.asrs.service.impl.MainServiceImpl; |
| | | import com.zy.asrs.utils.NumUtils; |
| | | import com.zy.asrs.utils.Utils; |
| | |
| | | private WrkMastService wrkMastService; |
| | | @Autowired |
| | | private BasRgvErrMapper basRgvErrMapper; |
| | | @Autowired |
| | | private BasRgvErrLogService basRgvErrLogService; |
| | | @Autowired |
| | | private BasRgvService basRgvService; |
| | | @Autowired |
| | |
| | | List<RingThroughParam> result = new ArrayList<>(); |
| | | List<BasDevpPosition> basDevpPositions = basDevpPositionService.selectList(new EntityWrapper<>()); |
| | | for (BasDevpPosition basDevpPosition : basDevpPositions){ |
| | | if (basDevpPosition.getDevNo() == 114){ |
| | | if (basDevpPosition.getDevNo() == 134){ |
| | | continue; |
| | | } |
| | | RingThroughParam ringThroughParam = new RingThroughParam(); |
| | | ringThroughParam.setIndex(basDevpPosition.getDevNo()-100); |
| | | ringThroughParam.setIndex(basDevpPosition.getDevNo()); |
| | | // double[] doubles = Utils.RingThroughXYSta(perimeter, perimeter-basDevpPosition.getPlcPosition()); |
| | | // ringThroughParam.setValueX(doubles[0]>50? doubles[0]+6:doubles[0]-1); |
| | | // ringThroughParam.setValueY(doubles[1]>50? doubles[1]+6:doubles[1]-1); |
| | |
| | | if (rgvCircularShuttleParam.getStatus()==0){ |
| | | rgvCircularShuttleParam.setStatus$(rgvProtocol.statusType.desc); |
| | | } |
| | | if (rgvProtocol.getAlarmList().isEmpty()){ |
| | | rgvCircularShuttleParam.setError(0); |
| | | rgvCircularShuttleParam.setError$("-"); |
| | | } else { |
| | | StringBuilder alarmList = new StringBuilder(); |
| | | for (Integer alarm : rgvProtocol.getAlarmList()){ |
| | | BasRgvErr rgvErr = basRgvErrMapper.selectById(alarm); |
| | | alarmList.append((rgvErr==null || rgvErr.getErrName()==null)? "未知异常:"+alarm:rgvErr.getErrName()); |
| | | if (alarm.equals(rgvProtocol.getAlarmList().get(rgvProtocol.getAlarmList().size() - 1))){ |
| | | break; |
| | | } |
| | | alarmList.append("---"); |
| | | } |
| | | rgvCircularShuttleParam.setError$(alarmList.toString()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | return R.ok().add(result); |
| | | } |
| | | |
| | | @PostMapping("/task/rgv/circular/shuttle/mast/position/data/v1") |
| | | // @ManagerAuth(memo = "作业信息") |
| | | public R rgvCircularShuttleV1(){ |
| | | List<BasRgvErrLog> result = new ArrayList<>(); |
| | | for (int i = 1 ; i<11; i ++){ |
| | | BasRgvErrLog basRgvErrLog = basRgvErrLogService.selectOne(new EntityWrapper<BasRgvErrLog>().eq("rgv_no", i).orderBy("id", false)); |
| | | if (basRgvErrLog!=null){ |
| | | result.add(basRgvErrLog); |
| | | } |
| | | } |
| | | return R.ok().add(result); |
| | | } |
| | | |
| | | |
| | | @PostMapping("/disable/rgv/status") |
| | | // @ManagerAuth(memo = "修改RGV状态") |