diff --git a/src/main/java/com/nis/domain/configuration/AvFileSampleCfg.java b/src/main/java/com/nis/domain/configuration/AvFileSampleCfg.java index f130e5387..7e6a9fccc 100644 --- a/src/main/java/com/nis/domain/configuration/AvFileSampleCfg.java +++ b/src/main/java/com/nis/domain/configuration/AvFileSampleCfg.java @@ -27,6 +27,8 @@ public class AvFileSampleCfg extends BaseCfg { private Integer compileId; private String srcPath; private String samplePath; + private Integer isSampleCreated; + private String resultPath; public String getSrcPath() { return srcPath; @@ -76,4 +78,17 @@ public class AvFileSampleCfg extends BaseCfg { public void setLevel(Integer level) { this.level = level; } + public Integer getIsSampleCreated() { + return isSampleCreated; + } + public void setIsSampleCreated(Integer isSampleCreated) { + this.isSampleCreated = isSampleCreated; + } + public String getResultPath() { + return resultPath; + } + public void setResultPath(String resultPath) { + this.resultPath = resultPath; + } + } diff --git a/src/main/java/com/nis/util/Constants.java b/src/main/java/com/nis/util/Constants.java index 56464ba8b..6c74e7fbf 100644 --- a/src/main/java/com/nis/util/Constants.java +++ b/src/main/java/com/nis/util/Constants.java @@ -434,11 +434,18 @@ public final class Constants { public static final String AV_FILE_PATH = Configurations.getStringProperty("av_file_path", "/home/ysp/"); public static final String AV_SAMPLE_AUDIO_REGION = Configurations.getStringProperty("av_sample_audio_region", "av_sample_audio"); public static final String AV_SAMPLE_VEDIO_REGION = Configurations.getStringProperty("av_sample_vedio_region", "av_sample_vedio"); - public static final String AV_SAMPLE_PITURE_REGION = Configurations.getStringProperty("av_sample_pitrue_region", "av_sample_pitrue"); + public static final String AV_SAMPLE_PICTURE_REGION = Configurations.getStringProperty("av_sample_picture_region", "av_sample_picture"); public static final String AV_SAMPLE_VOIP_REGION = Configurations.getStringProperty("av_sample_voip_region", "av_sample_voip"); public static final String AUDIO_SAMPLE_CREATE_PROC = Configurations.getStringProperty("audio_sample_create_proc", "./audio_convert_proc"); public static final String VEDIO_SAMPLE_CREATE_PROC = Configurations.getStringProperty("vedio_sample_create_proc", "./vedio_convert_proc"); public static final String PICTURE_SAMPLE_CREATE_PROC = Configurations.getStringProperty("picture_sample_create_proc", "./picture_convert_proc"); + public static final boolean AUDIO_SAMPLE_PROC_PARAM_IS_QUOTATION = Configurations.getBooleanProperty("audio_sample_proc_param_is_quotation", true); + public static final boolean VEDIO_SAMPLE_PROC_PARAM_IS_QUOTATION = Configurations.getBooleanProperty("vedio_sample_proc_param_is_quotation", true); + public static final boolean PICTURE_SAMPLE_PROC_PARAM_IS_QUOTATION = Configurations.getBooleanProperty("picture_sample_proc_param_is_quotation", true); + public static final boolean AUDIO_SAMPLE_PROC_PARAM_IS_TRANSLATION = Configurations.getBooleanProperty("audio_sample_proc_param_is_translation", false); + public static final boolean VEDIO_SAMPLE_PROC_PARAM_IS_TRANSLATION = Configurations.getBooleanProperty("vedio_sample_proc_param_is_translation", false); + public static final boolean PICTURE_SAMPLE_PROC_PARAM_IS_TRANSLATION = Configurations.getBooleanProperty("picture_sample_proc_param_is_translation", false); + //HTTP自定义域相关参数 public static String HTTP_HEADER_USER_REGION_KEY=Configurations.getStringProperty("http_header_user_region_key", "HTTP_HEADER"); public static String HTTP_HEADER_DICT_MODULE=Configurations.getStringProperty("http_header_dict_module", "REQUEST_HEADER_DISTRICT"); diff --git a/src/main/java/com/nis/web/controller/configuration/maintenance/IpMultiplexPoolCfgController.java b/src/main/java/com/nis/web/controller/configuration/maintenance/IpMultiplexPoolCfgController.java index a0bc4e9da..30bfd4288 100644 --- a/src/main/java/com/nis/web/controller/configuration/maintenance/IpMultiplexPoolCfgController.java +++ b/src/main/java/com/nis/web/controller/configuration/maintenance/IpMultiplexPoolCfgController.java @@ -97,7 +97,7 @@ public class IpMultiplexPoolCfgController extends BaseController { } @RequestMapping(value = {"/audit"}) - //@RequiresPermissions(value={"ip:mulitiplex:pool:audit"}) + @RequiresPermissions(value={"ip:mulitiplex:pool:audit"}) public String audit(Integer isAudit,Integer isValid,String ids,Integer functionId,RedirectAttributes redirectAttributes) { if(!StringUtil.isEmpty(ids)){ String[] idArray = ids.split(","); 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 2ae8137d1..61c8f5a74 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 @@ -1,6 +1,9 @@ package com.nis.web.controller.configuration.ntc; +import java.io.BufferedReader; import java.io.File; +import java.io.IOException; +import java.io.InputStreamReader; import java.lang.reflect.Type; import java.text.ParseException; import java.text.SimpleDateFormat; @@ -39,6 +42,7 @@ import com.nis.domain.maat.ToMaatResult; import com.nis.domain.maat.ToMaatResult.ResponseData; import com.nis.exceptions.MaatConvertException; import com.nis.util.ConfigServiceUtil; +import com.nis.util.Constants; import com.nis.util.DictUtils; import com.nis.util.FileUtils; import com.nis.util.JsonMapper; @@ -107,33 +111,45 @@ public class AvController extends BaseController { public String saveFileSample(Model model,HttpServletRequest request,HttpServletResponse response, RedirectAttributes redirectAttributes, String ids,AvFileSampleCfg entity,MultipartFile srcFile,MultipartFile sampleFile){ try{ - if(srcFile!=null && sampleFile!=null && - srcFile.getSize()>0 && sampleFile.getSize()>0){ - +// if(srcFile!=null && sampleFile!=null && +// srcFile.getSize()>0 && sampleFile.getSize()>0){ + if(srcFile!=null && srcFile.getSize()>0){ String sep = System.getProperty("file.separator"); - String srcFilePath = request.getRealPath("/")+"srcFile"; - String sampleFilePath = request.getRealPath("/")+"sampleFile"; + String srcFilePath = Constants.AV_FILE_PATH+entity.getCfgType()+sep+"srcFile";//源文件保存路径 + String sampleFilePath = Constants.AV_FILE_PATH+entity.getCfgType()+sep+"sampleFile";//样例文件保存路径 + String resultFilePath = Constants.AV_FILE_PATH+entity.getCfgType()+sep+"resultFile";//结果文件保存路径 FileUtils.createDirectory(srcFilePath); FileUtils.createDirectory(sampleFilePath); - String srcFileName = UUID.randomUUID()+FileUtils.getSuffix(srcFile.getOriginalFilename(), true); - String sampleFileName = UUID.randomUUID()+FileUtils.getSuffix(sampleFile.getOriginalFilename(), true); - File uploadSrcFile = new File(srcFilePath+sep+srcFileName); - File uploadSampleFile = new File(sampleFilePath+sep+sampleFileName); - FileCopyUtils.copy(srcFile.getBytes(), uploadSrcFile); - FileCopyUtils.copy(sampleFile.getBytes(),uploadSampleFile); + + String fileName = UUID.randomUUID()+""; + String srcFileAllPath = srcFilePath+sep+fileName+FileUtils.getSuffix(srcFile.getOriginalFilename(), true); + String sampleFileAllPath = sampleFilePath+sep+fileName+".sample"; + String resultFileAllPath = resultFilePath+sep+fileName+".result"; + entity.setSrcPath(srcFileAllPath); + entity.setSamplePath(sampleFileAllPath); + entity.setResultPath(resultFileAllPath); + + File uploadSrcFile = new File(srcFileAllPath); + File uploadSampleFile = new File(sampleFileAllPath); + FileCopyUtils.copy(srcFile.getBytes(), uploadSrcFile);//保存源文件 String host = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+request.getContextPath(); - String srcUrl = host+"/srcFile/"+uploadSrcFile.getName(); - String sampleUrl = host+"/sampleFile/"+uploadSampleFile.getName(); + String srcUrl = host+srcFilePath.substring(srcFilePath.indexOf(Constants.AV_FILE_PATH)+Constants.AV_FILE_PATH.length()-1)+sep+uploadSrcFile.getName(); + String sampleUrl = host+sampleFilePath.substring(sampleFilePath.indexOf(Constants.AV_FILE_PATH)+Constants.AV_FILE_PATH.length()-1)+sep+uploadSampleFile.getName(); + srcUrl = srcUrl.replace("\\", "/"); + sampleUrl = sampleUrl.replace("\\", "/"); logger.info("srcUrl:"+srcUrl); logger.info("sampleUrl:"+sampleUrl); - String srcMd5 = FileUtils.getFileMD5(uploadSrcFile); - String sampleMd5 = FileUtils.getFileMD5(uploadSampleFile); entity.setSrcUrl(srcUrl); - entity.setSrcPath(uploadSrcFile.getPath()); entity.setSampleUrl(sampleUrl); - entity.setSamplePath(uploadSampleFile.getPath()); - entity.setSrcMd5(srcMd5); - entity.setSampleMd5(sampleMd5); + +// File uploadSrcFile = new File(srcFilePath); +// FileCopyUtils.copy(srcFile.getBytes(), uploadSrcFile); +// String srcMd5 = FileUtils.getFileMD5(uploadSrcFile); +// File uploadSampleFile = new File(sampleFilePath); +// String sampleMd5 = FileUtils.getFileMD5(uploadSampleFile); + +// entity.setSrcMd5(srcMd5); +// entity.setSampleMd5(sampleMd5); } avCfgService.saveOrUpdateAvFileSample(entity); diff --git a/src/main/java/com/nis/web/controller/log/ntc/NtcPzReportController.java b/src/main/java/com/nis/web/controller/report/NtcPzReportController.java similarity index 94% rename from src/main/java/com/nis/web/controller/log/ntc/NtcPzReportController.java rename to src/main/java/com/nis/web/controller/report/NtcPzReportController.java index 95c907cb3..4ef885ab1 100644 --- a/src/main/java/com/nis/web/controller/log/ntc/NtcPzReportController.java +++ b/src/main/java/com/nis/web/controller/report/NtcPzReportController.java @@ -6,7 +6,7 @@ *@date 2018年6月12日 下午2:09:41 *@version 版本号 */ -package com.nis.web.controller.log.ntc; +package com.nis.web.controller.report; import java.text.SimpleDateFormat; import java.util.ArrayList; @@ -37,7 +37,7 @@ import com.nis.web.controller.BaseController; * @version V1.0 */ @Controller -@RequestMapping("${adminPath}/logs") +@RequestMapping("${adminPath}/report") public class NtcPzReportController extends BaseController{ @RequestMapping(value="ajaxGetLogTotal",method=RequestMethod.POST) @ResponseBody @@ -69,4 +69,5 @@ public class NtcPzReportController extends BaseController{ // } return data; } + } diff --git a/src/main/java/com/nis/web/dao/configuration/AvCfgDao.xml b/src/main/java/com/nis/web/dao/configuration/AvCfgDao.xml index a0dbe6c4f..58edbb36d 100644 --- a/src/main/java/com/nis/web/dao/configuration/AvCfgDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/AvCfgDao.xml @@ -297,7 +297,8 @@ SRC_URL,SAMPLE_URL, SRC_MD5,SAMPLE_MD5,LEVEL,CFG_DESC,ACTION,IS_VALID,IS_AUDIT, CREATOR_ID,CREATE_TIME,EDITOR_ID,EDIT_TIME,AUDITOR_ID,AUDIT_TIME, SERVICE_ID,REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,CLASSIFY, - ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS,function_id,cfg_type,cfg_region_code,src_path,sample_path + ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS,function_id,cfg_type,cfg_region_code,src_path,sample_path, + is_sample_created )values ( #{srcUrl,jdbcType=VARCHAR},#{sampleUrl,jdbcType=VARCHAR},#{srcMd5,jdbcType=VARCHAR}, #{sampleMd5,jdbcType=VARCHAR},#{level,jdbcType=INTEGER},#{cfgDesc,jdbcType=VARCHAR},#{action,jdbcType=INTEGER}, @@ -307,7 +308,8 @@ #{requestId,jdbcType=INTEGER},#{compileId,jdbcType=INTEGER},#{isAreaEffective,jdbcType=INTEGER}, #{classify,jdbcType=VARCHAR},#{attribute,jdbcType=VARCHAR},#{lable,jdbcType=VARCHAR}, #{areaEffectiveIds,jdbcType=VARCHAR},#{functionId,jdbcType=INTEGER}, - #{cfgType,jdbcType=VARCHAR},#{cfgRegionCode,jdbcType=INTEGER},#{srcPath,jdbcType=VARCHAR},#{samplePath,jdbcType=VARCHAR} + #{cfgType,jdbcType=VARCHAR},#{cfgRegionCode,jdbcType=INTEGER},#{srcPath,jdbcType=VARCHAR},#{samplePath,jdbcType=VARCHAR}, + #{isSampleCreated,jdbcType=INTEGER} ) @@ -403,6 +405,15 @@ sample_path = #{samplePath,jdbcType=VARCHAR}, + + is_sample_created = #{isSampleCreated,jdbcType=INTEGER}, + + + src_md5 = #{srcMd5,jdbcType=VARCHAR}, + + + sample_md5 = #{sampleMd5,jdbcType=VARCHAR}, + where cfg_id = #{cfgId,jdbcType=BIGINT} 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 aa16ed5fd..4316e7d6e 100644 --- a/src/main/java/com/nis/web/service/configuration/AvCfgService.java +++ b/src/main/java/com/nis/web/service/configuration/AvCfgService.java @@ -2,15 +2,20 @@ package com.nis.web.service.configuration; +import java.io.BufferedReader; import java.io.File; +import java.io.IOException; +import java.io.InputStreamReader; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; +import net.sf.json.JSONArray; import net.sf.json.JSONObject; +import org.apache.commons.lang.StringEscapeUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -23,6 +28,7 @@ import com.nis.domain.maat.ToMaatResult; import com.nis.domain.maat.ToMaatResult.ResponseData; import com.nis.exceptions.MaatConvertException; import com.nis.util.ConfigServiceUtil; +import com.nis.util.Constants; import com.nis.util.FileUtils; import com.nis.util.StringUtil; import com.nis.web.dao.configuration.AvCfgDao; @@ -86,7 +92,77 @@ public class AvCfgService extends BaseService{ } if(compileId!=0){ entity.setCompileId(compileId); + entity.setIsSampleCreated(0); + File uploadSrcFile = new File(entity.getSrcPath()); + String srcMd5 = FileUtils.getFileMD5(uploadSrcFile); + entity.setSrcMd5(srcMd5); avCfgDao.insertAvFileSample(entity); + + //调用外部脚本,生成样例文件 + List list = new ArrayList(); + Map map = new HashMap(); + map.put("srcFile", entity.getSrcPath()); + map.put("dstFile", entity.getSamplePath()); + map.put("resultFile", entity.getResultPath()); + map.put("fileId", entity.getCfgId()); + list.add(map); + String param = gsonToJson(list); + String sampleCreatelProc = ""; + if(entity.getCfgType().equals(Constants.AV_SAMPLE_AUDIO_REGION)|| + entity.getCfgType().equals(Constants.AV_SAMPLE_VOIP_REGION)){//音频样例配置或VOIP样例配置 + sampleCreatelProc = Constants.AUDIO_SAMPLE_CREATE_PROC; + if(Constants.AUDIO_SAMPLE_PROC_PARAM_IS_TRANSLATION){ + param = StringEscapeUtils.escapeJava(param); + } + if(Constants.AUDIO_SAMPLE_PROC_PARAM_IS_QUOTATION){//json参数是否需要前后单引号处理 + param = "'"+param+"'"; + } + }else if(entity.getCfgType().equals(Constants.AV_SAMPLE_VEDIO_REGION)){//视频样例配置 + sampleCreatelProc = Constants.VEDIO_SAMPLE_CREATE_PROC; + if(Constants.VEDIO_SAMPLE_PROC_PARAM_IS_TRANSLATION){ + param = StringEscapeUtils.escapeJava(param); + } + if(Constants.VEDIO_SAMPLE_PROC_PARAM_IS_QUOTATION){//json参数是否需要前后单引号处理 + param = "'"+param+"'"; + } + }else if(entity.getCfgType().equals(Constants.AV_SAMPLE_PICTURE_REGION)){//图片样例配置 + sampleCreatelProc = Constants.PICTURE_SAMPLE_CREATE_PROC; + if(Constants.PICTURE_SAMPLE_PROC_PARAM_IS_TRANSLATION){ + param = StringEscapeUtils.escapeJava(param); + } + if(Constants.PICTURE_SAMPLE_PROC_PARAM_IS_QUOTATION){//json参数是否需要前后单引号处理 + param = "'"+param+"'"; + } + } + + logger.info("调用外部程序输入参数:"+param); + Map resultMap = execShell(sampleCreatelProc,param); + logger.info("调用外部程序结果:"+resultMap); + + if(resultMap.get("exitStatus").equals(0)){//调用外部程序成功 + String out = resultMap.get("out").toString();//输出参数 + JSONArray resArray =JSONArray.fromObject(out); + JSONObject resObject = resArray.getJSONObject(0); + logger.info("调用外部程序输出参数:"+resObject); + int state = resObject.getInt("state"); + int fileSize = resObject.getInt("fileSize"); + Integer fileId = resObject.getInt("fileId"); + if(state==1 && fileSize>0){//成功 + entity.setIsSampleCreated(1);//样例文件创建成功 + }else{ + entity.setIsSampleCreated(-1);//样例文件创建失败 + } + if(fileId.equals(entity.getCfgId().intValue())){ + File uploadSampleFile = new File(entity.getSamplePath()); + String sampleMd5 = FileUtils.getFileMD5(uploadSampleFile); + entity.setSampleMd5(sampleMd5); + avCfgDao.updateAvFileSample(entity); + }else{ + logger.info("调用外部程序返回fileId错误,输入的fileId为:"+entity.getCfgId()+",输出的fileId为:"+fileId); + } + }else{ + throw new MaatConvertException(resultMap.get("error")!=null?resultMap.get("error").toString():resultMap.get("message").toString()); + } }else{ throw new MaatConvertException(""); } @@ -212,4 +288,73 @@ public class AvCfgService extends BaseService{ } } + /** + * 调用shell脚本 返回运行结果 + * + * @param shellName + * @param params + * @return + */ + public Map execShell(String shellName, + String... params) { + Map result = new HashMap(); + StringBuilder sb = new StringBuilder(); + sb.append(shellName); + for (String temp : params) { + sb.append(" " + temp); + } + String os = System.getProperty("os.name").toLowerCase(); + String cmd1 = ""; + String cmd2 = ""; + if(os.contains("windows")){ + cmd1 = "cmd.exe"; + cmd2 = "/c"; + }else{ + cmd1 = "/bin/sh"; + cmd2 = "-c"; + } + logger.info("调用脚本信息,cmd1:"+cmd1+",cmd2:"+cmd2); + String cmdarray[] = new String[] {cmd1, cmd2 ,sb.toString() }; + BufferedReader br = null; + BufferedReader bre = null; + try { + Process exec = Runtime.getRuntime().exec(cmdarray); + exec.getInputStream(); + br = new BufferedReader( + new InputStreamReader(exec.getInputStream())); + bre = new BufferedReader(new InputStreamReader( + exec.getErrorStream())); + String s = null; + StringBuilder out = new StringBuilder(); + while ((s = br.readLine()) != null) { + out.append(s); + } + result.put("out", out.toString());//输出参数 + out.setLength(0);//清空 + while ((s = bre.readLine()) != null) { + out.append(s); + } + result.put("error", out.toString());//错误信息 + int waitFor = exec.waitFor(); + logger.info("调用脚本:"+shellName+",执行返回状态值:"+waitFor); + result.put("exitStatus", waitFor);//执行状态 + } catch (Exception e) { + e.printStackTrace(); + logger.error("调用 " + shellName + " 脚本异常", e); + } finally { + if (br != null) + try { + br.close(); + } catch (IOException e) { + e.printStackTrace(); + } + if (bre != null) + try { + bre.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + return result; + } } diff --git a/src/main/resources/messages/message_en.properties b/src/main/resources/messages/message_en.properties index 1db597a9b..27a34dd9d 100644 --- a/src/main/resources/messages/message_en.properties +++ b/src/main/resources/messages/message_en.properties @@ -562,7 +562,10 @@ av_sample_voip_control=VoIPSample Control av_sample_audio_porn_control=Audio Porn Sign Sample Control av_sample_vedio_porn_control=Vedio Porn Sign Sample Control av_sample_control=Sample Control +<<<<<<< HEAD configure_statistics_info=Configure statistics info +======= +>>>>>>> branch 'develop' of http://10.0.6.99/gwall/gwall.git harm_level=Degree of harm src_file=Source File select_file=Please Select Upload File @@ -845,6 +848,7 @@ single_file_upload_size_error=Filesize of file %s is %s,Allow the maximum value total_file_upload_size_error=The maximum size of the uploaded file is %s,The total size of the file allowed to upload is %s\uFF01 file_upload_type_error=%s file type is incorrect,Allow uploaded files type contains %s\uFF01 file_upload_error=File upload failure\uFF01 +<<<<<<< HEAD #=============multipart upload error info================= #=============function_service_dict==>service_name================= audio_sample_reject=Audio and video sample control @@ -933,3 +937,6 @@ ip_reuse_adress_pool_loop=IP reuse address pool app_strategy_monit=APP strategy monitoring app_strategy_drop=APP strategy drop #=============function_service_dict==>service_name================= +======= +#=============multipart upload error info================= +>>>>>>> branch 'develop' of http://10.0.6.99/gwall/gwall.git diff --git a/src/main/resources/nis.properties b/src/main/resources/nis.properties index b99f71e81..caa632ee4 100644 --- a/src/main/resources/nis.properties +++ b/src/main/resources/nis.properties @@ -331,16 +331,32 @@ digest_single_file_max_size=10485760 #12M12582912 digest_total_file_max_size=12582912 #YSP文件保存路径 -av_file_path=d:\\ysp\\ +av_file_path=/home/ysp/ +#av_file_path=D:\\ysp\\ #YSP文件特征类型 av_sample_audio_region=av_sample_audio av_sample_vedio_region=av_sample_vedio -av_sample_pitrue_region=av_sample_pitrue +av_sample_picture_region=av_sample_picture av_sample_voip_region=av_sample_voip #样例文件生成程序 -audio_sample_create_proc=java -jar d:\\sampleTest.jar -vedio_sample_create_proc=java -jar d:\\sampleTest.jar -picture_sample_create_proc=java -jar d:\\sampleTest.jar +audio_sample_create_proc=java -jar /home/sampleTest.jar +vedio_sample_create_proc=java -jar /home/sampleTest.jar +picture_sample_create_proc=java -jar /home/sampleTest.jar +audio_sample_proc_param_is_quotation=true +vedio_sample_proc_param_is_quotation=true +picture_sample_proc_param_is_quotation=true +audio_sample_proc_param_is_translation=false +vedio_sample_proc_param_is_translation=false +picture_sample_proc_param_is_translation=false +#audio_sample_create_proc=java -jar D:\\sampleTest.jar +#vedio_sample_create_proc=java -jar D:\\sampleTest.jar +#picture_sample_create_proc=java -jar D:\\sampleTest.jar +#audio_sample_proc_param_is_quotation=false +#vedio_sample_proc_param_is_quotation=false +#picture_sample_proc_param_is_quotation=false +#audio_sample_proc_param_is_translation=true +#vedio_sample_proc_param_is_translation=true +#picture_sample_proc_param_is_translation=true #http自定义域相关参数 http_header_user_region_key=HTTP_HEADER http_header_dict_module=REQUEST_HEADER_DISTRICT diff --git a/src/main/resources/spring-mvc.xml b/src/main/resources/spring-mvc.xml index 749430c00..fd5a1bea0 100644 --- a/src/main/resources/spring-mvc.xml +++ b/src/main/resources/spring-mvc.xml @@ -34,10 +34,10 @@ cache-period="31536000" /> - + cache-period="31536000" /> --> diff --git a/src/main/webapp/WEB-INF/include/form/pageGroup.jsp b/src/main/webapp/WEB-INF/include/form/pageGroup.jsp new file mode 100644 index 000000000..fbe36812c --- /dev/null +++ b/src/main/webapp/WEB-INF/include/form/pageGroup.jsp @@ -0,0 +1,146 @@ +<%@ page contentType="text/html;charset=UTF-8"%> +<%@ include file="/WEB-INF/include/taglib.jsp"%> + \ 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 d8aa6bde3..cd6d17173 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/fileSampleForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/fileSampleForm.jsp @@ -31,12 +31,12 @@ $(function(){ $("#srcFile").on('change',function(){ $("#srcFileInfo").val($("#srcFile").val()); }); - $("#uploadSample,#sampleFileInfo").on('click',function(){ + /* $("#uploadSample,#sampleFileInfo").on('click',function(){ $("#sampleFile").trigger("click"); }); $("#sampleFile").on('change',function(){ $("#sampleFileInfo").val($("#sampleFile").val()); - }); + }); */ $("input[name='areaType']").on('change',function(){ var val=$(this).val(); if($(this).is(":visible")){ @@ -62,16 +62,16 @@ $(function(){ $("#cfgFrom").validate({ submitHandler: function(form){ var srcFile = $("#srcFile").val(); - var sampleFile = $("#sampleFile").val(); + //var sampleFile = $("#sampleFile").val(); var srcUrl = $("#srcUrl").val(); - var sampleUrl = $("#sampleUrl").val(); + //var sampleUrl = $("#sampleUrl").val(); if((srcUrl==null||srcUrl=="") && (srcFile==null || srcFile=="")){ $("div[for='srcFile']").append(""); return false; - }else if((sampleUrl==null || sampleUrl=="") && (sampleFile==null || sampleFile=="")){ + }/* else if((sampleUrl==null || sampleUrl=="") && (sampleFile==null || sampleFile=="")){ $("div[for='sampleFile']").append(""); return false; - }else{ + } */else{ loading('onloading...'); form.submit(); } @@ -164,11 +164,11 @@ $(function(){
-
+ <%--
- <%-- --%> +
- <%-- ${_cfg.srcUrl } --%> + ${_cfg.srcUrl }
- <%-- - ${_cfg.sampleUrl } --%> + + ${_cfg.sampleUrl }
-
- - -
+
--%>
@@ -212,6 +209,29 @@ $(function(){
+ <%--
+
+
+ +
+ + + +
+
+
+
+
--%> <%-- <%@include file="/WEB-INF/include/form/areaInfo.jsp" %> --%> <%@include file="/WEB-INF/include/form/basicInfo.jsp" %> diff --git a/src/main/webapp/WEB-INF/views/report/label.jsp b/src/main/webapp/WEB-INF/views/report/label.jsp index 46a92074c..1f788094c 100644 --- a/src/main/webapp/WEB-INF/views/report/label.jsp +++ b/src/main/webapp/WEB-INF/views/report/label.jsp @@ -1,9 +1,6 @@ <%@ page contentType="text/html;charset=UTF-8"%> <%@ include file="/WEB-INF/include/taglib.jsp"%> - +<%@ include file="/WEB-INF/include/form/pageGroup.jsp"%> @@ -15,18 +12,25 @@ $(function(){ - - -
- - ${label.itemValue} +
-
${page}
+
\ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/report/list.jsp b/src/main/webapp/WEB-INF/views/report/list.jsp index 51c2d88c1..af05fc72c 100644 --- a/src/main/webapp/WEB-INF/views/report/list.jsp +++ b/src/main/webapp/WEB-INF/views/report/list.jsp @@ -105,11 +105,12 @@ } var ajaxReport=function(url,target){ - loading(''); + //loading(''); $.ajax({ type:'post', async:false, - url:'${ctx}'+url,///report/ajaxNtcTagReport + cache:false, + url:'${ctx}'+url+"?random="+Math.random,///report/ajaxNtcTagReport data:{ "action":$('[name="action"]').val(), "reportType":$('[name="reportType"]').val(), @@ -118,10 +119,10 @@ var ajaxReport=function(url,target){ dataType:"html", success:function(data){ $(target).html(data);//#label - closeTip(); + //closeTip(); } - }); -} + }); +}; diff --git a/src/main/webapp/WEB-INF/views/report/lwhh.jsp b/src/main/webapp/WEB-INF/views/report/lwhh.jsp index 6f241d27d..9cd990212 100644 --- a/src/main/webapp/WEB-INF/views/report/lwhh.jsp +++ b/src/main/webapp/WEB-INF/views/report/lwhh.jsp @@ -1,9 +1,6 @@ <%@ page contentType="text/html;charset=UTF-8"%> <%@ include file="/WEB-INF/include/taglib.jsp"%> - +<%@ include file="/WEB-INF/include/form/pageGroup.jsp"%> @@ -15,18 +12,25 @@ $(function(){ - - -
- - ${lwhh.requestTitle} +
${page}
diff --git a/src/main/webapp/WEB-INF/views/report/srcIp.jsp b/src/main/webapp/WEB-INF/views/report/srcIp.jsp index be44c3c08..86c65ff27 100644 --- a/src/main/webapp/WEB-INF/views/report/srcIp.jsp +++ b/src/main/webapp/WEB-INF/views/report/srcIp.jsp @@ -1,9 +1,6 @@ <%@ page contentType="text/html;charset=UTF-8"%> <%@ include file="/WEB-INF/include/taglib.jsp"%> - +<%@ include file="/WEB-INF/include/form/pageGroup.jsp"%> @@ -16,16 +13,23 @@ $(function(){ - - - - +
${location}
-
${page}
+
diff --git a/src/main/webapp/static/global/scripts/common.js b/src/main/webapp/static/global/scripts/common.js index 0ec31e514..a0f73a832 100644 --- a/src/main/webapp/static/global/scripts/common.js +++ b/src/main/webapp/static/global/scripts/common.js @@ -767,7 +767,7 @@ var GetLogTotal=function(data){ var request=$.ajax({ type:'post', timeout:1000,//超时时间设置,查询接口时间过长超时 - url:pathName+'/logs/ajaxGetLogTotal', + url:pathName+'/report/ajaxGetLogTotal', data:{"endTime":timeStamp,"action":data.action,"functionId":data.functionId,"compileId":data.compileId}, dataType:'json', async:true,