|
|
|
@ -289,7 +289,7 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService {
|
|
|
|
|
public ServiceBody<Date> getLatestPhoto(TerminalPhotoVo vo) {
|
|
|
|
|
/* Cma cma = new Cma(server, port);*/
|
|
|
|
|
DateTime now = DateTime.now();
|
|
|
|
|
String cmd = "/usr/local/bin/xympadmn --server=127.0.0.1 --port=6891 --act=capture --cmdid=" + vo.getCmdid() + "\t" + "--channel=" + vo.getChannel() + "\t" + "--preset=255 --type=" + vo.getCaptureType();
|
|
|
|
|
String cmd =Constants.CMD+"capture --cmdid=" + vo.getCmdid() + "\t" + "--channel=" + vo.getChannel() + "\t" + "--preset=255 --type=" + vo.getCaptureType();
|
|
|
|
|
ProcessExecUtils.exec(cmd);
|
|
|
|
|
/* Boolean hasNew = cma.requestCapture(vo.getCmdid(), vo.getChannel(), vo.getPreset(), vo.getCaptureType());*/
|
|
|
|
|
return Asserts.success(now);
|
|
|
|
@ -404,7 +404,7 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService {
|
|
|
|
|
span1 = (short) 0;
|
|
|
|
|
span2 = span;
|
|
|
|
|
}
|
|
|
|
|
String cmd = "/usr/local/bin/xympadmn --server=127.0.0.1 --port=6891 --act=schedule --cmdid=" + dtoList.get(j).getCmid() + "\t" + "--channel=" + vo.getChannel() + "\t"
|
|
|
|
|
String cmd = Constants.CMD+"schedule --cmdid=" + dtoList.get(j).getCmid() + "\t" + "--channel=" + vo.getChannel() + "\t"
|
|
|
|
|
+ "--group=3 --hour1=" + startHour + "\t" + "--min1=" + startMin + "\t" + "--preset1=255 --hour2=" + endTimeHour + "\t" + "--min2=" + endTimeMin + "\t"
|
|
|
|
|
+ "--preset2=255 --hour3=" + span1 + "\t" + "--min3=" + span2 + "\t" + "--preset3=255";
|
|
|
|
|
ProcessExecUtils.exec(cmd);
|
|
|
|
@ -414,9 +414,9 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public ServiceBody<TerminalStatusGetModel> getPhotoQueryParam(ReturnedPhotoParamsGetVo vo) {
|
|
|
|
|
TerminalStatusGetModel model = new TerminalStatusGetModel();
|
|
|
|
|
String cmd = "/usr/local/bin/xympadmn --server=127.0.0.1 --port=6891 --act=imgparams --cmdid=" + vo.getCmdId() + "\t" + "--clientid=10 --reqid=" + Constants.REQUEST_ID + "\t" + "--flag=0 --rf=7 --channel=" + vo.getChannelId();
|
|
|
|
|
public ServiceBody<GetModel> getPhotoQueryParam(ReturnedPhotoParamsGetVo vo) {
|
|
|
|
|
GetModel model = new GetModel();
|
|
|
|
|
String cmd = Constants.CMD+"act=imgparams --cmdid=" + vo.getCmdId() + "\t" + "--clientid=10 --reqid=" + Constants.REQUEST_ID + "\t" + "--flag=0 --rf=7 --channel=" + vo.getChannelId();
|
|
|
|
|
ProcessExecUtils.exec(cmd);
|
|
|
|
|
model.setRequestId(Integer.parseInt(Constants.REQUEST_ID.toString()));
|
|
|
|
|
Constants.REQUEST_ID.addAndGet(1);
|
|
|
|
@ -430,7 +430,7 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public ServiceBody<String> addOrUpdatePhotoParams(PhotoParamsVo vo) {
|
|
|
|
|
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"
|
|
|
|
|
String cmd = Constants.CMD+"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" + "--channel=" + vo.getChannelId();
|
|
|
|
|
ProcessExecUtils.exec(cmd);
|
|
|
|
|
return Asserts.success("设置成功");
|
|
|
|
@ -484,9 +484,9 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public ServiceBody<CmaBackModel> selectPhotoTimeGet(TerminalPhotoTimeGetVo vo) {
|
|
|
|
|
CmaBackModel model = new CmaBackModel();
|
|
|
|
|
String cmd = "/usr/local/bin/xympadmn --server=127.0.0.1 --port=6891 --act=schedule --cmdid=" + vo.getCmdId() + "\t" + "--reqid=" + Constants.REQUEST_ID + "\t" + "--clientid=10 --flag=0 --rf=7 --channel=" + vo.getChannel();
|
|
|
|
|
public ServiceBody<GetModel> selectPhotoTimeGet(TerminalPhotoTimeGetVo vo) {
|
|
|
|
|
GetModel model = new GetModel();
|
|
|
|
|
String cmd = Constants.CMD+"schedule --cmdid=" + vo.getCmdId() + "\t" + "--reqid=" + Constants.REQUEST_ID + "\t" + "--clientid=10 --flag=0 --rf=7 --channel=" + vo.getChannel();
|
|
|
|
|
ProcessExecUtils.exec(cmd);
|
|
|
|
|
Integer requestId = Integer.parseInt(Constants.REQUEST_ID.toString());
|
|
|
|
|
model.setRequestId(requestId);
|
|
|
|
|