| | |
| | | @Autowired |
| | | private BasRgvService basRgvService; |
| | | @Autowired |
| | | private BasDevpService basDevpService; |
| | | @Autowired |
| | | private MainServiceImpl mainService; |
| | | @Autowired |
| | | private BasDevpPositionService basDevpPositionService; |
| | |
| | | // double[] doubles = Utils.RingThroughXY2(perimeter, NumUtils.GetRandomIntInRange(183)); |
| | | // double[] doubles = Utils.RingThroughXYRgv(perimeter, perimeter-rgvProtocol.RgvPos.doubleValue()); |
| | | double[] doubles = Utils.getRgvPosNew(perimeter, rgvProtocol.RgvPos.doubleValue()); |
| | | // double[] doubles = Utils.RingThroughXY2(183.0, 100*i ); |
| | | |
| | | ringThroughParam.setValueX(doubles[0]-2.94); |
| | | ringThroughParam.setValueY(doubles[1]-2.94); |
| | | ringThroughParam.setValueX(doubles[0]); |
| | | ringThroughParam.setValueY(doubles[1]); |
| | | ringThroughParam.setModeColor(rgvProtocol.modeType.color); |
| | | ringThroughParam.setStatusColor(rgvProtocol.statusType.color); |
| | | if (rgvProtocol.getModeType() == RgvModeType.AUTO){ |
| | | ringThroughParam.setAnimation(2); |
| | | } |
| | | result.add(ringThroughParam); |
| | | } |
| | | return R.ok().add(result); |
| | |
| | | List<RingThroughParam> result = new ArrayList<>(); |
| | | List<BasDevpPosition> basDevpPositions = basDevpPositionService.selectList(new EntityWrapper<>()); |
| | | for (BasDevpPosition basDevpPosition : basDevpPositions){ |
| | | if (basDevpPosition.getDevNo() == 134){ |
| | | if (basDevpPosition.getDevRegion() == 0){ |
| | | continue; |
| | | } |
| | | RingThroughParam ringThroughParam = new RingThroughParam(); |
| | | |
| | | ringThroughParam.setModeColor("#FFFFFF"); |
| | | ringThroughParam.setStatusColor("#FFFFFF"); |
| | | try{ |
| | | BasDevp basDevp = basDevpService.selectOne(new EntityWrapper<BasDevp>().eq("dev_no",basDevpPosition.getDevNo())); |
| | | if (basDevp.getAutoing().equals("Y")){ |
| | | if (basDevp.getLoading().equals("Y")){ |
| | | ringThroughParam.setModeColor("#ab1839"); |
| | | ringThroughParam.setStatusColor("#ab1839"); |
| | | } |
| | | if (basDevp.getLoading().equals("N")){ |
| | | ringThroughParam.setModeColor("#27AE60"); |
| | | ringThroughParam.setStatusColor("#27AE60"); |
| | | } |
| | | } else { |
| | | ringThroughParam.setModeColor("#C0392B"); |
| | | ringThroughParam.setStatusColor("#C0392B"); |
| | | } |
| | | |
| | | } catch (Exception e){ |
| | | System.out.println(e.getMessage()); |
| | | ringThroughParam.setModeColor("#000000"); |
| | | ringThroughParam.setStatusColor("#000000"); |
| | | |
| | | } |
| | | ringThroughParam.setIndex(basDevpPosition.getDevNo()); |
| | | // double[] doubles = Utils.RingThroughXYSta(perimeter, perimeter-basDevpPosition.getPlcPosition()); |
| | | // ringThroughParam.setValueX(doubles[0]>50? doubles[0]+6:doubles[0]-1); |