From 204a1d5c93f5f2dd2c45eb92bca250d3eceffe90 Mon Sep 17 00:00:00 2001 From: zhanghongqing Date: Tue, 27 Nov 2018 17:56:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=BA=E8=84=B8=E8=AF=86=E5=88=AB=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E8=B0=83=E7=94=A8=E8=84=9A=E6=9C=AC=E8=B7=AF=E5=BE=84?= =?UTF-8?q?=EF=BC=8C=E9=A1=B5=E9=9D=A2=E5=A2=9E=E5=8A=A0=E6=9F=A5=E7=9C=8B?= =?UTF-8?q?=E6=97=B6=E5=8F=AF=E6=96=B0=E5=A2=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/configuration/ntc/AvController.java | 14 ++++++++++---- src/main/resources/nis.properties | 4 ++-- .../webapp/WEB-INF/views/cfg/av/fileSampleForm.jsp | 11 ++++++++++- .../WEB-INF/views/cfg/av/videoPictureList.jsp | 13 +++++++++++-- 4 files changed, 33 insertions(+), 9 deletions(-) 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 2f14733de..8663abfd1 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 @@ -624,13 +624,18 @@ public class AvController extends BaseController { */ @ResponseBody @RequestMapping(value = {"/sample/faceToPicture"}) - public Map faceToPicture(Model model,@RequestParam("srcFile") CommonsMultipartFile[] srcFile){ + public Map faceToPicture(Model model,@RequestParam("srcFile") CommonsMultipartFile[] srcFile,@RequestParam("faceFilePath")String faceFilePath){ String sep = System.getProperty("file.separator"); String random = UUID.randomUUID()+""; // String srcFilePath = Constants.AV_FILE_PATH+"face"+random+sep+"srcFile";//视频源文件保存路径 - String srcFilePath = StringUtils.getUserfilesBaseDir()+"face"+sep+"picFile"+sep+random+sep;//视频生成的关键帧图片文件保存路径 - - FileUtils.createDirectory(srcFilePath); + String srcFilePath=""; + if(StringUtil.isBlank(faceFilePath)){ + srcFilePath = StringUtils.getUserfilesBaseDir()+"face"+sep+"picFile"+sep+random+sep;//视频生成的关键帧图片文件保存路径 + faceFilePath=srcFilePath; + FileUtils.createDirectory(srcFilePath); + }else{ + srcFilePath=faceFilePath; + } //保存源文件 for (CommonsMultipartFile sinFile : srcFile) { String r = UUID.randomUUID()+""; @@ -647,6 +652,7 @@ public class AvController extends BaseController { Map map = new HashMap(); map.put("picFilePath", srcFilePath); + map.put("faceFilePath", faceFilePath); //获取图片列表 Collection files = FileUtils.listFiles(new File(srcFilePath), null, true); diff --git a/src/main/resources/nis.properties b/src/main/resources/nis.properties index 704ec19d4..e74872a1c 100644 --- a/src/main/resources/nis.properties +++ b/src/main/resources/nis.properties @@ -449,7 +449,7 @@ video_sample_create_proc=/home/ceiec/av_feature_gen/video_convert_proc picture_sample_create_proc=/home/ceiec/av_feature_gen/picture_convert_proc speaker_sample_create_proc=java -jar /home/sampleTest.jar logo_sample_create_proc=java -jar /home/sampleTest.jar -face_sample_create_proc=java -jar /home/sampleTest.jar +face_sample_create_proc=/home/ceiec/av_feature_gen/face_convert_proc audio_sample_proc_param_is_quotation=true video_sample_proc_param_is_quotation=true picture_sample_proc_param_is_quotation=true @@ -558,5 +558,5 @@ http_max_connection=1000 default_max_perroute=100 poolcm_socket_timeout=3000 app_vignore_user_region_key=VIGNORE -#policies菜单的菜单ID +#policies\u83DC\u5355\u7684\u83DC\u5355ID policies_menu_id=86 \ No newline at end of file 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 ef016e0c2..b2254f118 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/fileSampleForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/fileSampleForm.jsp @@ -112,9 +112,10 @@ $(function(){ if(ifSubmit){ $("#srcFileInfo").val($("#srcFile").val()); var srcFacePath =$("#srcPath").val(); + var faceFilePath =$("#faceFilePath").val(); var fd = new FormData($('#cfgFrom')[0]); $.ajax({ - url: "${ctx}/ntc/av/sample/faceToPicture", + url: "${ctx}/ntc/av/sample/faceToPicture?faceFilePath="+encodeURIComponent(faceFilePath), type: "POST", processData: false, contentType: false, @@ -126,12 +127,17 @@ $(function(){ }, success: function(data) { top.$.jBox.closeTip(); + $.jBox.close(); if(data.status==1){ $("#picPath").val(data.picFilePath); $("#srcPath").val(data.srcPath); + $("#faceFilePath").val(data.faceFilePath); $("#showPicture").removeClass("hidden"); var url = "${ctx}/ntc/av/sample/selectVedioPicture?picFilePath="+encodeURIComponent(data.picFilePath); //openPicWindow(url); + if($.jBox.getBox().length>0){ + openPicWindow(url); + } }else{ top.$.jBox.tip(data.msg, ""); return; @@ -140,6 +146,7 @@ $(function(){ }, error:function(jqXHR, textStatus, errorThrown){ top.$.jBox.closeTip(); + $.jBox.close(); //alert(jqXHR.responseText); top.$.jBox(jqXHR.responseText,{ width: $(document).width()*0.9, @@ -287,6 +294,7 @@ function sampleFileValidate(fileType,fileName){ if(!flag){ // ("文件名不合法"); $("#fileErrorNote").append(""); + $.jBox.close(); return false; } return true; @@ -398,6 +406,7 @@ function sampleFileValidate(fileType,fileName){ +
" class="required form-control" style=" background-color:transparent" diff --git a/src/main/webapp/WEB-INF/views/cfg/av/videoPictureList.jsp b/src/main/webapp/WEB-INF/views/cfg/av/videoPictureList.jsp index 4f433efc2..0d1503eeb 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/videoPictureList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/videoPictureList.jsp @@ -5,6 +5,11 @@ <spring:message code="${cfgName}"></spring:message>