#20230510 欣影管理平台装置信息查询代码

jni
18616268358 2 years ago
parent dce66641d5
commit d44dc16bb3

@ -180,8 +180,8 @@ public class TerminalPhotoController extends BaseController {
@ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")})
@RequestMapping("/updatePhotoParam")
@Log(title = "图像采集参数设置", type = "查询")
public ResponseReult<String> addOrUpdatePhotoParams(@RequestBody @Validated PhotoParamsVo vo) {
ServiceBody<String> serviceBody = terminalPhotoService.addOrUpdatePhotoParams(vo);
public ResponseReult<Integer> addOrUpdatePhotoParams(@RequestBody @Validated PhotoParamsVo vo) {
ServiceBody<Integer> serviceBody = terminalPhotoService.addOrUpdatePhotoParams(vo);
if (serviceBody.getCode() == ServiceStatus.SUCCESS) {
return ResponseReult.success(serviceBody.getData());
} else {

@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.math.BigInteger;
import java.util.Date;
import java.util.List;
@ -41,7 +42,7 @@ public class TerminalModel implements Serializable {
private String cmId;
@ApiModelProperty(value = "工作状态更新时间", example = "123456")
private String wsUpdateTime;
private BigInteger wsUpdateTime;
@ApiModelProperty(value = "是否最新", example = "123456")
private Boolean isNew = false;

@ -35,6 +35,7 @@ import com.shxy.xymanager_dao.dao.TerminalPhotoDao;
import com.shxy.xymanager_dao.dao.TerminalsDao;
import com.shxy.xymanager_service.service.TerminalPhotoService;
import com.shxy.xymanager_service.service.TerminalScheduleRuleService;
import io.swagger.models.auth.In;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
@ -405,13 +406,13 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService {
}
@Override
public ServiceBody<String> addOrUpdatePhotoParams(PhotoParamsVo vo) {
public ServiceBody<Integer> addOrUpdatePhotoParams(PhotoParamsVo vo) {
Integer result = terminalPhotoDao.updateOrInsertParams(vo);
if (result>0) {
String cmd = "/usr/local/bin/xympadmn --server=127.0.0.1 --port=6891 --act=imgparams --cmdid=" + vo.getCmdId() + "\t" + "--color=" + vo.getColor() + "\t" + "--resolution=" + vo.getResolution() + "\t"
+ "--luminance=" + vo.getLuminance() + "\t" + "-contrast=" + vo.getContrast() + "\t" + "--saturation=" + vo.getSaturation();
String cmd = "/usr/local/bin/xympadmn --server=127.0.0.1 --port=6891 --act=imgparams --clientid=10 --cmdid=" + vo.getCmdId() + "\t" + "--color=" + vo.getColor() + "\t" + "--resolution=" + vo.getResolution() + "\t"
+ "--luminance=" + vo.getLuminance() + "\t" + "-contrast=" + vo.getContrast() + "\t" + "--saturation=" + vo.getSaturation()+ "\t" + "--reqid=" + Constants.REQUEST_ID;
ProcessExecUtils.exec(cmd);
return Asserts.success("更新成功");
return Asserts.success(Constants.REQUEST_ID.addAndGet(1));
}
return Asserts.error("更新失败");

@ -203,7 +203,7 @@ public class TerminalServiceImpl implements TerminalService {
public ServiceBody<TerminalStatusGetModel> getTerminalStatus(Integer termId) {
TerminalStatusGetModel model = new TerminalStatusGetModel();
String cmdId = terminalsDao.getCmdIdByTermId(termId);
String cmd = "/usr/local/bin/xympadmn --server=127.0.0.1 --act=runningstatus --cmdid=" + cmdId+ "\t" + "--reqid=="+Constants.REQUEST_ID;
String cmd = "/usr/local/bin/xympadmn --server=127.0.0.1 --act=runningstatus --clientid=10 --cmdid=" + cmdId+ "\t" + "--reqid=="+Constants.REQUEST_ID;
ProcessExecUtils.exec(cmd);
/* TerminalModel model = new TerminalModel();*/

@ -71,7 +71,7 @@ public interface TerminalPhotoService {
*/
ServiceBody<String> getPhotoQueryParam(Integer termId);
ServiceBody<String> addOrUpdatePhotoParams(PhotoParamsVo vo);
ServiceBody<Integer> addOrUpdatePhotoParams(PhotoParamsVo vo);
ServiceBody<TerminalPhotosParamsModel> getLastedPhotoQueryParam(ReturnedPhotoParamsVo vo);

Loading…
Cancel
Save