Conflicts:
	xymanager_service/src/main/java/com/shxy/xymanager_service/interaction/Cma.java
jni
liuguijing 2 years ago
commit 262e1d28b7

Binary file not shown.

@ -7,6 +7,8 @@ import com.shxy.xymanager_common.bean.ServiceBody;
import com.shxy.xymanager_common.bean.ServiceStatus;
import com.shxy.xymanager_common.model.TerminalPhotoListModel;
import com.shxy.xymanager_common.vo.TerminalAndChannelIdAndTimeVo;
import com.shxy.xymanager_common.vo.TerminalPhotoVo;
import com.shxy.xymanager_service.interaction.Cma;
import com.shxy.xymanager_service.service.TerminalPhotoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -28,6 +30,7 @@ public class TerminalPhotoController extends BaseController {
@Autowired
TerminalPhotoService terminalPhotoService;
@ApiOperation(value = "获取图片列表", notes = "获取图片列表接口", httpMethod = "POST")
@ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")})
@RequestMapping("/getTerminalPhotoList")
@ -41,6 +44,19 @@ public class TerminalPhotoController extends BaseController {
}
}
@ApiOperation(value = "获取最新图片", notes = "获取最新图片接口", httpMethod = "POST")
@ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")})
@RequestMapping("/getLatestPhoto")
@Log(title = "获取最新图片", type = "查询")
public ResponseReult<Boolean> getLatestPhoto(@RequestBody @Validated TerminalPhotoVo vo) {
ServiceBody<Boolean> serviceBody = terminalPhotoService.getLatestPhoto(vo);
if (serviceBody.getCode() == ServiceStatus.SUCCESS) {
return ResponseReult.success(serviceBody.getData());
} else {
return ResponseReult.error(serviceBody.getCode(), serviceBody.getMsg());
}
}
@ApiOperation(value = "图片查询", notes = "图片查询接口", httpMethod = "POST")
@ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")})

@ -165,3 +165,10 @@ swagger2:
# # 匹配链接
# urlPatterns: /system/*,/monitor/*,/tool/*
cma:
server: 47.96.238.157
port: 6891
upload:
# path: file:/usr/local/home/manager/download/
path: C:\software\upload\

@ -0,0 +1,31 @@
package com.shxy.xymanager_common.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.util.List;
@Data
@ApiModel(value = "最近图片请求参数", description = "最近图片请求参数")
public class TerminalPhotoVo {
@NotNull(message = "装置列表不能缺少")
@ApiModelProperty(value = "装置通道编号列表", example = "123455")
private String cmdid;
@NotNull(message = "通道号")
@ApiModelProperty(value = "通道号", example = "123455")
private Short channel;
@NotNull(message = "装置列表不能缺少")
@ApiModelProperty(value = "装置通道编号列表", example = "123455")
private Short preset;
@NotNull(message = "图片类型")
@ApiModelProperty(value = "图片类型", example = "123455")
private Short captureType;
}

@ -8,10 +8,13 @@ import com.shxy.xymanager_common.exception.Asserts;
import com.shxy.xymanager_common.model.TerminalPhotoListModel;
import com.shxy.xymanager_common.util.MyDateUtils;
import com.shxy.xymanager_common.vo.TerminalAndChannelIdAndTimeVo;
import com.shxy.xymanager_common.vo.TerminalPhotoVo;
import com.shxy.xymanager_dao.dao.TerminalPhotoDao;
import com.shxy.xymanager_service.interaction.Cma;
import com.shxy.xymanager_service.service.TerminalPhotoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.math.BigInteger;
@ -29,6 +32,13 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService {
@Autowired
TerminalPhotoDao terminalPhotoDao;
@Value("${cma.server}")
private String server;
@Value("${cma.port}")
private int port;
/**
* idid
*
@ -72,4 +82,11 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService {
return Asserts.success(model);
}
@Override
public ServiceBody<Boolean> getLatestPhoto(TerminalPhotoVo vo) {
Cma cma = new Cma(server,port);
Boolean hasNew = cma.requestCapture(vo.getCmdid(),vo.getChannel(),vo.getPreset(),vo.getCaptureType());
return Asserts.success(hasNew);
}
}

@ -3,6 +3,7 @@ package com.shxy.xymanager_service.service;
import com.shxy.xymanager_common.bean.ServiceBody;
import com.shxy.xymanager_common.model.TerminalPhotoListModel;
import com.shxy.xymanager_common.vo.TerminalAndChannelIdAndTimeVo;
import com.shxy.xymanager_common.vo.TerminalPhotoVo;
/**
*
@ -17,4 +18,11 @@ public interface TerminalPhotoService {
*/
ServiceBody<TerminalPhotoListModel> getTerminalPhotoList(TerminalAndChannelIdAndTimeVo vo);
/**
* id
*
* @return
*/
ServiceBody<Boolean> getLatestPhoto(TerminalPhotoVo vo);
}

Loading…
Cancel
Save