|
|
|
@ -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.getFormat() + " --time=" + vo.getTime()+" --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);
|
|
|
|
|