| | |
| | | import org.springblade.jfpt.catalog.service.catalogService; |
| | | import org.springblade.jfpt.deploy.service.IDeployService; |
| | | import org.springblade.jfpt.equipment.entity.Equipment; |
| | | import org.springblade.jfpt.equipment.entity.EquipmentPlayInfo; |
| | | import org.springblade.jfpt.equipment.feign.DeptFeignApi; |
| | | import org.springblade.jfpt.equipment.feign.RegionFeignApi; |
| | | import org.springblade.jfpt.equipment.service.IEquipmentService; |
| | |
| | | equipment.setHeartbeat(null); |
| | | } |
| | | |
| | | if (equipment.getJtype() != null && equipment.getJtype().equals("")) { |
| | | equipment.setJtype("0"); |
| | | if (equipment.getDtype() == null || equipment.getDtype().equals("")) { |
| | | equipment.setDtype("0"); |
| | | } |
| | | |
| | | //判断省市区的值是否为数字或者中文字符串 |
| | |
| | | // catalogService.updateCatalog(deviceName,deviceNumber,pId); |
| | | // } |
| | | |
| | | |
| | | return R.status(equipmentService.saveOrUpdate(equipment)); |
| | | } |
| | | |
| | |
| | | equipment.setHeartbeat(null); |
| | | } |
| | | |
| | | if (equipment.getJtype() != null && equipment.getJtype().equals("")) { |
| | | equipment.setJtype("0"); |
| | | if (equipment.getDtype() == null || equipment.getDtype().equals("")) { |
| | | equipment.setDtype("0"); |
| | | } |
| | | |
| | | // String deviceName = equipment.getDeviceName(); |
| | |
| | | return R.data(equipmentService.selEqTypeSum()); |
| | | } |
| | | |
| | | /** |
| | | * 获取设备视频播放的信息 |
| | | * @param equipmentPlayInfo 视频播放地址对象,只需包含设备编号,以及视频播放格式即可 |
| | | * @param response 响应域,设置跨域 |
| | | * @return |
| | | */ |
| | | @GetMapping("/selectEquimentPlayInfo") |
| | | public R selectEquimentPlayInfo(EquipmentPlayInfo equipmentPlayInfo,HttpServletResponse response){ |
| | | response.setHeader("Access-Control-Allow-Origin", "*"); |
| | | response.setHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS, DELETE"); |
| | | response.setHeader("Access-Control-Allow-Credentials", "true"); |
| | | //返回 |
| | | return R.data(equipmentService.selectEquimentPlayInfo(equipmentPlayInfo)); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 新增或修改设备视频播放的信息 |
| | | * @param equipmentPlayInfo 视频播放地址对象 |
| | | * @return |
| | | */ |
| | | @PostMapping("/submitEquimentPlayInfo") |
| | | public R submitEquimentPlayInfo(EquipmentPlayInfo equipmentPlayInfo){ |
| | | return R.status(equipmentService.saveOrUpdateEquipmentPlayInfo(equipmentPlayInfo)); |
| | | } |
| | | |
| | | } |