| | |
| | | return new AppData<OperateUser>(operateUser);
|
| | | }
|
| | |
|
| | | /**
|
| | | * Install device.终端采集
|
| | | *
|
| | | * @param device the device
|
| | | * @return the result bean
|
| | | */
|
| | | /**
|
| | | *
|
| | | * @param request
|
| | | * @param uid
|
| | | * @param deviceName
|
| | | * @param address
|
| | | * @param longitude
|
| | | * @param latitude
|
| | | * @param mac
|
| | | * @param monitorpoint
|
| | | * @return
|
| | | */
|
| | | @PostMapping("reportDevice")
|
| | | public AppData<String> installDevice(Device device) {
|
| | | public AppData<String> installDevice(
|
| | | HttpServletRequest request ,
|
| | | @RequestParam(value ="uid") Integer uid,
|
| | | @RequestParam(value ="device_name") String deviceName,
|
| | | @RequestParam(value ="address") String address,
|
| | | @RequestParam(value ="longitude") double longitude,
|
| | | @RequestParam(value ="latitude") double latitude,
|
| | | @RequestParam(value ="mac") String mac,
|
| | | @RequestParam(value ="monitorpoint") Integer monitorpoint
|
| | | ) {
|
| | | // device 适配
|
| | | Device device = new Device();
|
| | | device.setOperateUserId(uid);
|
| | | device.setName(deviceName);
|
| | | device.setAddress(address);
|
| | | device.setLongitude(longitude);
|
| | | device.setLatitude(latitude);
|
| | | device.setMac(mac);
|
| | | device.setMonitorPointId(monitorpoint);
|
| | | deviceService.saveOrUpdateDevice(device);
|
| | | return new AppData<String>("");
|
| | | }
|