| | |
| | | package com.moral.controller; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.moral.common.bean.ResultBean; |
| | | import com.moral.entity.DeviceVersion; |
| | | import com.moral.entity.Sensor; |
| | | import com.moral.entity.layout.RealTimeDeviceLayout; |
| | | import com.moral.entity.layout.RtdLayoutUpload; |
| | | import com.moral.entity.layout.SensorComb; |
| | | import com.moral.service.DeviceVersionService; |
| | | import com.moral.service.OrganizationLayoutService; |
| | | import com.moral.service.SensorService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | @RestController |
| | | @RequestMapping("org-layout") |
| | |
| | | @GetMapping("rtd-config") |
| | | public ResultBean<Map<String,Object>> getRealTimeDevicetConfig(Integer orgId){ |
| | | Map<String,Object> resultMap = new HashMap(); |
| | | resultMap.put("deviceVersions",""); |
| | | resultMap.put("sensors",""); |
| | | resultMap.put("rtdLayout",""); |
| | | resultMap.put("deviceVersions",new ArrayList<>()); |
| | | resultMap.put("sensorCombs", new ArrayList<>()); |
| | | resultMap.put("sensors", new ArrayList<>()); |
| | | resultMap.put("rtdLayout", new HashMap<>()); |
| | | // 获取当前组织所含设备版本数组 |
| | | List<DeviceVersion> deviceVersionList = deviceVersionService.queryByOrgId(orgId); |
| | | // 获取第一个version 下所有传感器 |