| | |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.text.DecimalFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | |
| | | vo.setWalkPos(p.getWalkPos() != null && p.getWalkPos() == 0 ? "在定位" : "不在定位"); |
| | | vo.setTaskReceive(p.getTaskReceive() != null && p.getTaskReceive() == 1 ? "接收" : "无任务"); |
| | | vo.setTaskReceiveTwo(p.getTaskReceiveTwo() != null && p.getTaskReceiveTwo() == 1 ? "接收" : "无任务"); |
| | | vo.setXspeed(p.getXSpeed()); |
| | | vo.setYspeed(p.getYSpeed()); |
| | | vo.setZspeed(p.getZSpeed()); |
| | | vo.setXdistance(p.getXDistance()); |
| | | vo.setYdistance(p.getYDistance()); |
| | | vo.setXduration(p.getXDuration()); |
| | | vo.setYduration(p.getYDuration()); |
| | | |
| | | vo.setXspeed(String.format("%.2f", p.getXSpeed())); |
| | | vo.setYspeed(String.format("%.2f", p.getYSpeed())); |
| | | vo.setZspeed(String.format("%.2f", p.getZSpeed())); |
| | | vo.setXdistance(String.format("%.2f", p.getXDistance())); |
| | | vo.setYdistance(String.format("%.2f", p.getYDistance())); |
| | | vo.setXduration(String.format("%.2f", p.getXDuration())); |
| | | vo.setYduration(String.format("%.2f", p.getYDuration())); |
| | | vo.setWarnCode(p.getAlarm() == null ? "-" : String.valueOf(p.getAlarm())); |
| | | if (p.getAlarm() != null && p.getAlarm() > 0) { |
| | | vo.setDeviceStatus("ERROR"); |