Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
1aba80b199
|
@ -1,6 +1,5 @@
|
||||||
package com.hisense.monitormanage.controller;
|
package com.hisense.monitormanage.controller;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import com.hisense.monitormanage.dto.*;
|
import com.hisense.monitormanage.dto.*;
|
||||||
import com.hisense.monitormanage.entity.*;
|
import com.hisense.monitormanage.entity.*;
|
||||||
import com.hisense.monitormanage.mapper.*;
|
import com.hisense.monitormanage.mapper.*;
|
||||||
|
@ -134,7 +133,7 @@ public class Controller {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("selectByChannelCode")
|
@GetMapping("selectByChannelCode")
|
||||||
@ApiOperation("根据channelCode查询摄像头详细信息")
|
@ApiOperation("根据摄像头编号查询摄像头详细信息")
|
||||||
@ApiImplicitParam(name = "channelCode",value = "摄像头标识",required = true,dataType = "String")
|
@ApiImplicitParam(name = "channelCode",value = "摄像头标识",required = true,dataType = "String")
|
||||||
public Result selectByChannelCode(String channelCode){
|
public Result selectByChannelCode(String channelCode){
|
||||||
|
|
||||||
|
@ -170,7 +169,7 @@ public class Controller {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("selectByParentId")
|
@GetMapping("selectByParentId")
|
||||||
@ApiOperation("根据parentId和checkStatus查询摄像头")
|
@ApiOperation("根据摄像头的组织Id和异常状态查询摄像头")
|
||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
@ApiImplicitParam(name = "parentId",value = "摄像头的组织Id",required = true,dataType = "String"),
|
@ApiImplicitParam(name = "parentId",value = "摄像头的组织Id",required = true,dataType = "String"),
|
||||||
@ApiImplicitParam(name = "checkStatus",value = "异常状态 1正常,0异常",required = true,dataType = "String")
|
@ApiImplicitParam(name = "checkStatus",value = "异常状态 1正常,0异常",required = true,dataType = "String")
|
||||||
|
@ -231,14 +230,13 @@ public class Controller {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询所有标签
|
* 查询所有标签
|
||||||
* @param label
|
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("selectAllLabel")
|
@GetMapping("selectAllLabel")
|
||||||
@ApiOperation("查询所有标签")
|
@ApiOperation("查询所有标签")
|
||||||
public Result selectAllLabel(Label label ){
|
public Result selectAllLabel(){
|
||||||
|
|
||||||
List<Label> labels = cameraChannelMapper.selectAllLabel(label);
|
List<Label> labels = cameraChannelMapper.selectAllLabel();
|
||||||
|
|
||||||
Result success = Result.success(labels);
|
Result success = Result.success(labels);
|
||||||
|
|
||||||
|
@ -250,6 +248,8 @@ public class Controller {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("selectByLabelName")
|
@GetMapping("selectByLabelName")
|
||||||
|
@ApiOperation("根据标签名字模糊查询标签")
|
||||||
|
@ApiImplicitParam(name = "labelName",value = "标签名称",required = true,dataType = "String")
|
||||||
public Result selectByLabelName(String labelName){
|
public Result selectByLabelName(String labelName){
|
||||||
|
|
||||||
List<Label> labels = cameraChannelMapper.selectByLabelName(labelName);
|
List<Label> labels = cameraChannelMapper.selectByLabelName(labelName);
|
||||||
|
@ -265,7 +265,7 @@ public class Controller {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("selectSubOrgan")
|
@GetMapping("selectSubOrgan")
|
||||||
@ApiOperation("根据parentId查询组织")
|
@ApiOperation("根据上级组织id查询组织")
|
||||||
@ApiImplicitParam(name = "parentId",value = "上级组织id",required = true,dataType = "String")
|
@ApiImplicitParam(name = "parentId",value = "上级组织id",required = true,dataType = "String")
|
||||||
public Result selectSubOrganization(String parentId){
|
public Result selectSubOrganization(String parentId){
|
||||||
if (parentId == null){
|
if (parentId == null){
|
||||||
|
|
|
@ -4,9 +4,9 @@ import com.alibaba.fastjson.JSONObject;
|
||||||
import com.hisense.monitormanage.entity.Event;
|
import com.hisense.monitormanage.entity.Event;
|
||||||
import com.hisense.monitormanage.entity.Result;
|
import com.hisense.monitormanage.entity.Result;
|
||||||
import com.hisense.monitormanage.mapper.EventMapper;
|
import com.hisense.monitormanage.mapper.EventMapper;
|
||||||
import com.hisense.monitormanage.mapper.SedimentTrailMapper;
|
|
||||||
import com.hisense.monitormanage.service.EventService;
|
import com.hisense.monitormanage.service.EventService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.log4j.Log4j2;
|
import lombok.extern.log4j.Log4j2;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
@ -17,6 +17,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import javax.servlet.ServletInputStream;
|
import javax.servlet.ServletInputStream;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
@ -141,6 +142,7 @@ public class EventController {
|
||||||
@GetMapping("selectEvent")
|
@GetMapping("selectEvent")
|
||||||
@ApiOperation("查询所有事件")
|
@ApiOperation("查询所有事件")
|
||||||
public Result selectEvent(){
|
public Result selectEvent(){
|
||||||
|
|
||||||
List<Event> events = eventMapper.selectEvent();
|
List<Event> events = eventMapper.selectEvent();
|
||||||
|
|
||||||
Result success = Result.success(events);
|
Result success = Result.success(events);
|
||||||
|
@ -170,6 +172,7 @@ public class EventController {
|
||||||
*/
|
*/
|
||||||
@GetMapping("selectByName")
|
@GetMapping("selectByName")
|
||||||
@ApiOperation("根据事件名称查询事件")
|
@ApiOperation("根据事件名称查询事件")
|
||||||
|
@ApiImplicitParam(name = "eventCnName",value = "事件名称",required = true,dataType = "String")
|
||||||
public Result selectByName(String eventCnName){
|
public Result selectByName(String eventCnName){
|
||||||
List<Event> byName = eventMapper.selectByName(eventCnName);
|
List<Event> byName = eventMapper.selectByName(eventCnName);
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,52 @@
|
||||||
|
package com.hisense.monitormanage.controller;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
|
||||||
|
import javax.servlet.ServletOutputStream;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.net.URL;
|
||||||
|
import java.net.URLConnection;
|
||||||
|
|
||||||
|
@Controller
|
||||||
|
public class FordController {
|
||||||
|
|
||||||
|
@GetMapping("components/**")
|
||||||
|
public void ford(HttpServletRequest request, HttpServletResponse response)throws Exception{
|
||||||
|
|
||||||
|
String imageDomain = "http://10.132.191.48:30080";
|
||||||
|
|
||||||
|
String uri = request.getRequestURI();
|
||||||
|
String fordUrl = imageDomain + uri;
|
||||||
|
|
||||||
|
URLConnection con = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
URL url = new URL(fordUrl);
|
||||||
|
con = url.openConnection();
|
||||||
|
|
||||||
|
//允许写出
|
||||||
|
con.setDoOutput(true);
|
||||||
|
//允许读入
|
||||||
|
con.setDoInput(true);
|
||||||
|
//不使用缓存
|
||||||
|
con.setUseCaches(false);
|
||||||
|
//得到响应流
|
||||||
|
InputStream inputStream = con.getInputStream();
|
||||||
|
|
||||||
|
ServletOutputStream outputStream = response.getOutputStream();
|
||||||
|
byte[] buffer = new byte[1024];
|
||||||
|
int len = inputStream.read(buffer);
|
||||||
|
while (len != -1) {
|
||||||
|
outputStream.write(buffer, 0, len);
|
||||||
|
len = inputStream.read(buffer);
|
||||||
|
}
|
||||||
|
inputStream.close();
|
||||||
|
}catch(Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -10,7 +10,6 @@ import org.apache.ibatis.annotations.Param;
|
||||||
import org.apache.ibatis.annotations.Select;
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public interface CameraChannelMapper extends BaseMapper<CameraChannel> {
|
public interface CameraChannelMapper extends BaseMapper<CameraChannel> {
|
||||||
|
|
||||||
|
@ -32,7 +31,7 @@ public interface CameraChannelMapper extends BaseMapper<CameraChannel> {
|
||||||
void updateState(@Param("list") List list);
|
void updateState(@Param("list") List list);
|
||||||
|
|
||||||
@Select("select * from t_label")
|
@Select("select * from t_label")
|
||||||
List<Label> selectAllLabel(Label label);
|
List<Label> selectAllLabel();
|
||||||
|
|
||||||
@Select("select * from t_label where label_name like concat('%',#{labelName},'%')")
|
@Select("select * from t_label where label_name like concat('%',#{labelName},'%')")
|
||||||
List<Label> selectByLabelName(String labelName);
|
List<Label> selectByLabelName(String labelName);
|
||||||
|
|
Loading…
Reference in New Issue