| | |
| | | import com.zy.core.thread.SiemensDevpThread; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.rmi.CORBA.Util; |
| | |
| | | private BasDevpPositionService basDevpPositionService; |
| | | @Autowired |
| | | private BasCircularShuttleService basCircularShuttleService; |
| | | |
| | | @Value("${constant-parameters.perimeter}") |
| | | private Long perimeter; |
| | | |
| | | @PostMapping("/table/rgv/state") |
| | | @ManagerAuth(memo = "RGV信息表") |
| | |
| | | |
| | | ringThroughParam.setIndex(rgv.getId()); |
| | | // ringThroughParam.setIndex(i); |
| | | // double[] doubles = Utils.RingThroughXY2(1737000.0, NumUtils.GetRandomIntInRange(183)); |
| | | double[] doubles = Utils.RingThroughXYRgv(1737000.0, 1737000.0-rgvProtocol.RgvPos.doubleValue()); |
| | | // 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); |
| | |
| | | |
| | | @PostMapping("/ring/through/dev/position/data") |
| | | // @ManagerAuth(memo = "站点信息") |
| | | // 站点位置信息 |
| | | public R ringThroughDev(){ |
| | | List<RingThroughParam> result = new ArrayList<>(); |
| | | List<BasDevpPosition> basDevpPositions = basDevpPositionService.selectList(new EntityWrapper<>()); |
| | | for (BasDevpPosition basDevpPosition : basDevpPositions){ |
| | | RingThroughParam ringThroughParam = new RingThroughParam(); |
| | | ringThroughParam.setIndex(basDevpPosition.getDevNo()); |
| | | double[] doubles = Utils.RingThroughXYSta(1737000.0, 1737000.0-basDevpPosition.getPlcPosition()); |
| | | 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); |
| | | result.add(ringThroughParam); |
| | |
| | | return R.ok().add(result); |
| | | } |
| | | |
| | | |
| | | @PostMapping("/disable/rgv/status") |
| | | // @ManagerAuth(memo = "作业信息") |
| | | public R rgvDisableStatus(@RequestParam Integer rgvId, |
| | | @RequestParam Integer status){ |
| | | BasCircularShuttle basCircularShuttle = basCircularShuttleService.selectOne(new EntityWrapper<BasCircularShuttle>().eq("rgv_id", rgvId)); |
| | | basCircularShuttle.setStatus(status); |
| | | basCircularShuttleService.updateById(basCircularShuttle); |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |