diff --git a/src/main/java/com/nis/web/controller/configuration/ntc/AvController.java b/src/main/java/com/nis/web/controller/configuration/ntc/AvController.java index 2b76d9509..fa2ba7b1e 100644 --- a/src/main/java/com/nis/web/controller/configuration/ntc/AvController.java +++ b/src/main/java/com/nis/web/controller/configuration/ntc/AvController.java @@ -560,8 +560,8 @@ public class AvController extends BaseController { if(validateAvDuration(uploadSrcFile)){ String shellName = Constants.VEDIO_TO_PICTURE_PROC; // String params = srcFileAllPath+" "+picFilePath+" 0.95 90.0 0.5"; - String params = srcFileAllPath+" "+picFilePath; - logger.info("调用视频转关键帧图片程序:"+shellName+" " +params); + String[] params = new String[]{srcFileAllPath,picFilePath}; + logger.info("调用视频转关键帧图片程序:"+shellName+" " +StringUtils.join(params," ")); Map resultMap = avCfgService.execShell(shellName, params); if(resultMap.get("exitStatus").equals(0)){//调用外部程序成功 String out = resultMap.get("out").toString();//输出参数 @@ -572,6 +572,18 @@ public class AvController extends BaseController { if(state==1){ //关键帧图片生成成功,删除原视频文件 FileUtils.deleteFile(srcFileAllPath); + //获取图片列表 + Collection files = FileUtils.listFiles(new File(picFilePath), null, true); + String srcPath = null; + for(File f:files){ + if(srcPath==null){ + srcPath = f.getName(); + }else{ + srcPath += "|"+f.getName(); + } + } + //将图片文件列表赋值给生成样例的源文件路径参数 + map.put("srcPath", srcPath); map.put("status", 1); map.put("msg", "success"); }else{ diff --git a/src/main/java/com/nis/web/service/configuration/AvCfgService.java b/src/main/java/com/nis/web/service/configuration/AvCfgService.java index c8028a891..1ffb15733 100644 --- a/src/main/java/com/nis/web/service/configuration/AvCfgService.java +++ b/src/main/java/com/nis/web/service/configuration/AvCfgService.java @@ -535,7 +535,7 @@ public class AvCfgService extends BaseService{ } result.put("error", out.toString());//错误信息 int waitFor = exec.waitFor(); - logger.info("调用脚本:"+shellName+",执行返回状态值:"+waitFor); + logger.info("调用脚本:"+sb.toString()+",执行返回状态值:"+waitFor); result.put("exitStatus", waitFor);//执行状态 } catch (Exception e) { e.printStackTrace(); diff --git a/src/main/webapp/WEB-INF/views/cfg/av/fileSampleForm.jsp b/src/main/webapp/WEB-INF/views/cfg/av/fileSampleForm.jsp index 9a0c9e0b8..9b0545d49 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/fileSampleForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/fileSampleForm.jsp @@ -69,9 +69,10 @@ $(function(){ top.$.jBox.closeTip(); if(data.status==1){ $("#picPath").val(data.picFilePath); + $("#srcPath").val(data.srcPath); $("#showPicture").removeClass("hidden"); var url = "${ctx}/ntc/av/sample/selectVedioPicture?picFilePath="+encodeURIComponent(data.picFilePath); - openPicWindow(url); + //openPicWindow(url); }else{ alert(data.msg); } @@ -85,7 +86,7 @@ $(function(){ height:$(document).height()*0.8, top: '10%', draggable:false, - title: "error info", buttons:{ "close":true} + title: "Error Info", buttons:{ "close":true} }); return false; }