|
|
|
@ -397,7 +397,7 @@ 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+"--flag=1 --rf=7 --channel=" + vo.getChannelId();
|
|
|
|
|
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();
|
|
|
|
|
ProcessExecUtils.exec(cmd);
|
|
|
|
|
model.setRequestId(Constants.REQUEST_ID.addAndGet(1));
|
|
|
|
|
/* TerminalPhotosParamsModel model = new TerminalPhotosParamsModel();
|
|
|
|
@ -410,24 +410,18 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
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 --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 + "\t" + "--channel=" + vo.getChannelId();
|
|
|
|
|
ProcessExecUtils.exec(cmd);
|
|
|
|
|
return Asserts.success(Constants.REQUEST_ID.addAndGet(1));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return Asserts.error("更新失败");
|
|
|
|
|
}
|
|
|
|
|
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" + "--channel=" + vo.getChannelId();
|
|
|
|
|
ProcessExecUtils.exec(cmd);
|
|
|
|
|
return Asserts.success(Constants.REQUEST_ID.addAndGet(1));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public ServiceBody<TerminalPhotosParamsModel> getLastedPhotoQueryParam(ReturnedPhotoParamsVo vo) {
|
|
|
|
|
String result = terminalPhotoDao.getRequestResult(vo.getRequestId());
|
|
|
|
|
String result = terminalPhotoDao.getRequestResult(5);//待修改
|
|
|
|
|
TerminalPhotosParamsModel model = new TerminalPhotosParamsModel();
|
|
|
|
|
if (StringUtils.isNotBlank(result)) {
|
|
|
|
|
JSONObject resultObj = JSONObject.parseObject(result);
|
|
|
|
|
model = JSONObject.parseObject(resultObj.get("groupData").toString(), TerminalPhotosParamsModel.class);
|
|
|
|
|
model = JSONObject.parseObject(result, TerminalPhotosParamsModel.class);
|
|
|
|
|
model.setIsNew(true);
|
|
|
|
|
} else {
|
|
|
|
|
PhotoParamsDto dto = terminalPhotoDao.selectPhotoParams(vo);
|
|
|
|
@ -440,7 +434,7 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public ServiceBody<TerminalScheduleRuleTimeListModel> selectPhotoTime(TerminalReqPhotoTimeVo vo) {
|
|
|
|
|
String result = terminalPhotoDao.getRequestResult(vo.getRequestId());
|
|
|
|
|
String result = terminalPhotoDao.getRequestResult(5);//待修改
|
|
|
|
|
TerminalScheduleRuleTimeListModel model = new TerminalScheduleRuleTimeListModel();
|
|
|
|
|
if (StringUtils.isNotBlank(result)) {
|
|
|
|
|
JSONObject resultObj = JSONObject.parseObject(result);
|
|
|
|
|