| | |
| | | import com.zy.asrs.domain.vo.*; |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.mapper.BasRgvErrMapper; |
| | | import com.zy.asrs.service.BasDevpPositionService; |
| | | import com.zy.asrs.service.BasRgvService; |
| | | import com.zy.asrs.service.WrkMastService; |
| | | import com.zy.asrs.service.impl.MainServiceImpl; |
| | |
| | | private BasRgvService basRgvService; |
| | | @Autowired |
| | | private MainServiceImpl mainService; |
| | | @Autowired |
| | | private BasDevpPositionService basDevpPositionService; |
| | | |
| | | @PostMapping("/table/rgv/state") |
| | | @ManagerAuth(memo = "RGV信息表") |
| | |
| | | |
| | | ringThroughParam.setIndex(rgv.getId()); |
| | | // ringThroughParam.setIndex(i); |
| | | double[] doubles = Utils.RingThroughXY2(183.0, NumUtils.GetRandomIntInRange(183)); |
| | | // double[] doubles = Utils.RingThroughXY2(1737000.0, NumUtils.GetRandomIntInRange(183)); |
| | | double[] doubles = Utils.RingThroughXYRgv(1737000.0, 1737000.0-rgvProtocol.RgvPos.doubleValue()); |
| | | // double[] doubles = Utils.RingThroughXY2(183.0, 100*i ); |
| | | |
| | | ringThroughParam.setValueX(doubles[0]-2.94); |
| | |
| | | // @ManagerAuth(memo = "站点信息") |
| | | public R ringThroughDev(){ |
| | | List<RingThroughParam> result = new ArrayList<>(); |
| | | // for (RgvSlave rgv : slaveProperties.getRgv()) { |
| | | for (int i = 1;i<10;i++) { |
| | | // // 获取RGV信息 |
| | | // RgvThread rgvThread = (RgvThread) SlaveConnection.get(SlaveType.Rgv, rgv.getId()); |
| | | // if (rgvThread == null) { |
| | | // continue; |
| | | // } |
| | | // RgvProtocol rgvProtocol = rgvThread.getRgvProtocol(); |
| | | // if (rgvProtocol == null) { |
| | | // continue; |
| | | // } |
| | | List<BasDevpPosition> basDevpPositions = basDevpPositionService.selectList(new EntityWrapper<>()); |
| | | for (BasDevpPosition basDevpPosition : basDevpPositions){ |
| | | RingThroughParam ringThroughParam = new RingThroughParam(); |
| | | |
| | | // ringThroughParam.setIndex(rgv.getId()); |
| | | ringThroughParam.setIndex(i); |
| | | double[] doubles = Utils.RingThroughXY2(183.0, 100*i ); |
| | | ringThroughParam.setValueX(doubles[0]+2.94); |
| | | ringThroughParam.setValueY(doubles[1]+2.94); |
| | | ringThroughParam.setIndex(basDevpPosition.getDevNo()); |
| | | double[] doubles = Utils.RingThroughXYSta(1737000.0, 1737000.0-basDevpPosition.getPlcPosition()); |
| | | ringThroughParam.setValueX(doubles[0]>50? doubles[0]+6:doubles[0]-1); |
| | | ringThroughParam.setValueY(doubles[1]>50? doubles[1]+6:doubles[1]-1); |
| | | result.add(ringThroughParam); |
| | | } |
| | | return R.ok().add(result); |
| | |
| | | List<EnergyGatheringRingParam> result = new ArrayList<>(); |
| | | try{ |
| | | for (DevpSlave devp : slaveProperties.getDevp()) { |
| | | if (devp.getId()!=1){ |
| | | break; |
| | | } |
| | | SiemensDevpThread devpThread = (SiemensDevpThread) SlaveConnection.get(SlaveType.Devp, devp.getId()); |
| | | if (devpThread.isResult()){ |
| | | if (true){ |