| | |
| | | import com.moral.service.DeviceService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import static com.moral.common.util.WebUtils.getParametersStartingWith; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | |
| | | @RestController |
| | | @RequestMapping("device") |
| | |
| | | List<Device> devices = deviceService.getDevicesByMonitorPointId(monitorPointId); |
| | | return new ResultBean<List<Device>>(devices); |
| | | } |
| | | |
| | | @GetMapping("professionId") |
| | | public ResultBean<List<Device>> getDevicesByProfessionId(HttpServletRequest request) { |
| | | Map<String, Object> parameters = getParametersStartingWith(request, null); |
| | | List<Device> devices = deviceService.getDevicesByProfessionId(parameters); |
| | | return new ResultBean<List<Device>>(devices); |
| | | } |
| | | } |