Merge remote-tracking branch 'origin/master'

master
liuguijing 2 years ago
commit 4acb80b04b

@ -4,8 +4,6 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
/**
@ -15,17 +13,15 @@ import java.io.Serializable;
@ApiModel(value = "视频参数对象", description = "视频参数对象信息")
public class TerminalVideoParamsModel implements Serializable {
@ApiModelProperty(value = "装置编号", example = "123456")
private String cmdId;
@ApiModelProperty(value = "预置位", example = "123456")
private Integer preset;
@ApiModelProperty(value = "通道编号", example = "123456")
private Integer channel;
@ApiModelProperty(value = "视频格式", example = "123456")
private Integer format;
@ApiModelProperty(value = "视频分辨率", example = "123456")
private Integer videoFormat;
@ApiModelProperty(value = "录制时长", example = "123456")
private Integer time;
private Integer videoTime;
@ApiModelProperty(value = "录制时长", example = "123456")
private Boolean isNew = false;

@ -16,15 +16,19 @@ public class VideoParamsVo {
@NotNull(message = "通道编号不能缺少")
@ApiModelProperty(value = "通道编号", example = "123456")
private Integer channel;
private Integer channelId;
@NotNull(message = "视频格式不能缺少")
@ApiModelProperty(value = "视频格式", example = "123456")
private Integer format;
private Integer videoFormat;
@NotNull(message = "录制时长不能缺少")
@ApiModelProperty(value = "录制时长", example = "123456")
private Integer time;
private Integer videoTime;
@NotNull(message = "预制位")
@ApiModelProperty(value = "预制位", example = "123456")
private Integer preset;

@ -1,47 +1,19 @@
package com.shxy.xymanager_service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.date.DateField;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.PageInfo;
import com.google.common.collect.Lists;
import com.shxy.xymanager_common.bean.ServiceBody;
import com.shxy.xymanager_common.constant.Constants;
import com.shxy.xymanager_common.dto.*;
import com.shxy.xymanager_common.entity.Lines;
import com.shxy.xymanager_common.entity.TerminalChannels;
import com.shxy.xymanager_common.entity.TerminalPhoto;
import com.shxy.xymanager_common.entity.Terminals;
import com.shxy.xymanager_common.enums.CommonStatus;
import com.shxy.xymanager_common.exception.Asserts;
import com.shxy.xymanager_common.model.*;
import com.shxy.xymanager_common.page.PageUtils;
import com.shxy.xymanager_common.util.MyDateUtils;
import com.shxy.xymanager_common.util.ProcessExecUtils;
import com.shxy.xymanager_common.util.StringUtils;
import com.shxy.xymanager_common.vo.*;
import com.shxy.xymanager_dao.dao.LinesDao;
import com.shxy.xymanager_dao.dao.TerminalChannelsDao;
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 com.shxy.xymanager_service.service.TerminalVideoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
*
*/
@ -54,8 +26,8 @@ public class TerminalVideoServiceImpl implements TerminalVideoService {
@Override
public ServiceBody<String> updateVideoParam(VideoParamsVo vo) {
String cmd = Constants.CMD + "videoparams --flag=1 --preset=255 --cmdid=" + vo.getCmdId() + " --channel=" + vo.getChannel() + " --format=" +
vo.getFormat() + " --time=" + vo.getTime();
String cmd = Constants.CMD + "videoparams --flag=1 --cmdid=" + vo.getCmdId() + " --channel=" + vo.getChannelId() + " --format=" +
vo.getVideoFormat() + " --time=" + vo.getVideoTime()+" --preset="+vo.getPreset();
ProcessExecUtils.exec(cmd);
return Asserts.success("修改完成");
}
@ -63,7 +35,7 @@ public class TerminalVideoServiceImpl implements TerminalVideoService {
@Override
public ServiceBody<GetModel> videoParamGet(VideoGetVo vo) {
GetModel model = new GetModel();
String cmd = Constants.CMD + "videoparams --clientid=10 --flag=0 --cmdid=" + vo.getCmdId() + "\t" + "--reqid=" + Constants.REQUEST_ID;
String cmd = Constants.CMD + "videoparams --clientid=10 --flag=0 --cmdid=" + vo.getCmdId()+ " --reqid=" + Constants.REQUEST_ID+ " --channel=" + vo.getChannelId();
ProcessExecUtils.exec(cmd);
model.setRequestId(Integer.parseInt(Constants.REQUEST_ID.toString()));
Constants.REQUEST_ID.addAndGet(1);

Loading…
Cancel
Save