Merge branch 'develop' of http://10.0.6.99/gwall/gwall.git into develop
This commit is contained in:
@@ -10,6 +10,7 @@ import com.nis.domain.BaseEntity;
|
||||
import com.nis.domain.SysMenu;
|
||||
import com.nis.domain.SysUser;
|
||||
import com.nis.util.Configurations;
|
||||
import com.nis.util.StringUtil;
|
||||
/**
|
||||
* 业务辅助表-业务字典信息表
|
||||
* @author zsl
|
||||
@@ -33,7 +34,6 @@ public class ServiceDictInfo extends BaseEntity<ServiceDictInfo>{
|
||||
private Date editTime; //edit_time 修改时间 date Y
|
||||
private Integer levelNo; //层级
|
||||
private List<ServiceDictInfo> childrenList = new ArrayList<ServiceDictInfo>();//子列表
|
||||
|
||||
private Date beginDate; // 开始日期
|
||||
private Date endDate; // 结束日期
|
||||
|
||||
@@ -42,14 +42,20 @@ public class ServiceDictInfo extends BaseEntity<ServiceDictInfo>{
|
||||
|
||||
private String showSequence; //显示序号
|
||||
|
||||
|
||||
private String pNames;//父节点名称
|
||||
/**
|
||||
* 封装参数数据类型,
|
||||
*
|
||||
*/
|
||||
private List<Integer> conditionType;
|
||||
|
||||
|
||||
@JsonIgnore
|
||||
public String getpNames() {
|
||||
return pNames;
|
||||
}
|
||||
public void setpNames(String pNames) {
|
||||
this.pNames = pNames;
|
||||
}
|
||||
public Integer getServiceDictId() {
|
||||
return serviceDictId;
|
||||
}
|
||||
@@ -250,5 +256,23 @@ public class ServiceDictInfo extends BaseEntity<ServiceDictInfo>{
|
||||
|
||||
|
||||
}
|
||||
//获取所有父节点
|
||||
@JsonIgnore
|
||||
public static String getPNames(List<ServiceDictInfo> list,Integer pid,String pNames) {
|
||||
String pName="";
|
||||
for (ServiceDictInfo serviceDictInfo : list) {
|
||||
if(pid==serviceDictInfo.getServiceDictId()){
|
||||
pid=serviceDictInfo.getParent().getServiceDictId();
|
||||
pName=serviceDictInfo.getItemValue();
|
||||
pNames="/"+pName+pNames;
|
||||
}
|
||||
}
|
||||
if(pid==0){
|
||||
if(!StringUtil.isEmpty(pNames)) pNames=pNames.substring(1);
|
||||
return pNames;
|
||||
}else{
|
||||
return getPNames(list, pid, pNames);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
59
src/main/java/com/nis/exceptions/MultiPartNewException.java
Normal file
59
src/main/java/com/nis/exceptions/MultiPartNewException.java
Normal file
@@ -0,0 +1,59 @@
|
||||
package com.nis.exceptions;
|
||||
|
||||
import static java.lang.String.format;
|
||||
|
||||
import java.util.Properties;
|
||||
|
||||
import org.springframework.web.multipart.MultipartException;
|
||||
|
||||
public class MultiPartNewException extends MultipartException {
|
||||
|
||||
private static final long serialVersionUID = 8922896505285617384L;
|
||||
|
||||
public MultiPartNewException(String msg) {
|
||||
super(msg);
|
||||
}
|
||||
public MultiPartNewException(Properties prop,Throwable ex) {
|
||||
super(prop.get("file_upload_error").toString(),ex);
|
||||
}
|
||||
public MultiPartNewException(String msg,Throwable ex) {
|
||||
|
||||
super(msg,ex);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param message The detail message.
|
||||
* @param actual The actual request size.
|
||||
* @param permitted The maximum permitted request size.
|
||||
*/
|
||||
public MultiPartNewException(String msg,long actual,long permitted,Properties prop,Throwable ex) {
|
||||
|
||||
super(format(prop.get("total_file_upload_size_error").toString(),
|
||||
Long.valueOf(actual),Long.valueOf(permitted)),ex);
|
||||
}
|
||||
|
||||
/**single file
|
||||
* @param fileName
|
||||
* @param message The detail message.
|
||||
* @param actual The actual request size.
|
||||
* @param permitted The maximum permitted request size.
|
||||
*/
|
||||
public MultiPartNewException(String msg,String fileName,long actual,long permitted,Properties prop,Throwable ex) {
|
||||
|
||||
super(format(prop.get("single_file_upload_size_error").toString(),
|
||||
fileName,Long.valueOf(actual), Long.valueOf(permitted)),ex);
|
||||
}
|
||||
|
||||
/**single file
|
||||
* @param fileName
|
||||
* @param message The detail message.
|
||||
* @param permitted fileType.
|
||||
*/
|
||||
public MultiPartNewException(String msg,String fileName,String fileType,Properties prop,Throwable ex) {
|
||||
|
||||
super(format(prop.get("file_upload_type_error").toString(),
|
||||
fileName, fileType),ex);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
161
src/main/java/com/nis/interceptor/MultipartFileIntercepter.java
Normal file
161
src/main/java/com/nis/interceptor/MultipartFileIntercepter.java
Normal file
@@ -0,0 +1,161 @@
|
||||
package com.nis.interceptor;
|
||||
|
||||
|
||||
import static java.lang.String.format;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.apache.commons.fileupload.FileUpload;
|
||||
import org.apache.commons.fileupload.FileUploadBase;
|
||||
import org.apache.commons.fileupload.FileUploadException;
|
||||
import org.apache.commons.fileupload.UploadContext;
|
||||
import org.apache.commons.fileupload.FileUploadBase.FileSizeLimitExceededException;
|
||||
import org.apache.commons.fileupload.servlet.ServletFileUpload;
|
||||
import org.apache.commons.fileupload.servlet.ServletRequestContext;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.springframework.context.i18n.LocaleContextHolder;
|
||||
import org.springframework.util.MultiValueMap;
|
||||
import org.springframework.web.multipart.MultipartException;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.commons.CommonsFileUploadSupport;
|
||||
import org.springframework.web.multipart.commons.CommonsMultipartResolver;
|
||||
|
||||
import com.nis.exceptions.MultiPartNewException;
|
||||
import com.nis.util.Configurations;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.FileUtils;
|
||||
|
||||
|
||||
public class MultipartFileIntercepter extends CommonsMultipartResolver{
|
||||
Logger logger = Logger.getLogger(MultipartFileIntercepter.class);
|
||||
|
||||
|
||||
protected CommonsFileUploadSupport.MultipartParsingResult parseRequest(HttpServletRequest request)throws MultipartException{
|
||||
String encoding = determineEncoding(request);
|
||||
//是否是样例文件
|
||||
boolean isSampleFileUpload = request.getRequestURI().contains(Constants.SAMPLE_UPLOAD_URL_KEYWORD);
|
||||
FileUpload fileUpload = this.prepareFileUpload(encoding,isSampleFileUpload);
|
||||
long fileUploadTotalSize=0l;
|
||||
Properties languageProp=getMsgProp();
|
||||
try {
|
||||
/*****************预先获取上传文件的总的大小************/
|
||||
FileUpload fileUploadTotal = fileUpload;
|
||||
|
||||
ServletRequestContext ctx = new ServletRequestContext(request);
|
||||
InputStream input=ctx.getInputStream();
|
||||
@SuppressWarnings("deprecation") // still has to be backward compatible
|
||||
int contentLengthInt = ctx.getContentLength();
|
||||
|
||||
fileUploadTotalSize = UploadContext.class.isAssignableFrom(input.getClass())
|
||||
// Inline conditional is OK here CHECKSTYLE:OFF
|
||||
? ((UploadContext) ctx).contentLength()
|
||||
: contentLengthInt;
|
||||
// CHECKSTYLE:ON
|
||||
logger.error("上传文件总大小为"+fileUploadTotalSize);
|
||||
/*****************预先获取上传文件的总的大小************/
|
||||
//验证文件总大小
|
||||
if(fileUploadTotalSize > fileUpload.getSizeMax()){
|
||||
throw new MultiPartNewException("", fileUploadTotalSize, fileUpload.getSizeMax(),languageProp, null);
|
||||
}
|
||||
//设置文件上传SizeMax为总文件的大小,否则无法通过SizeLimit(总的文件大小)校验,就无法进行下面单个文件大小的校验
|
||||
fileUploadTotal.setSizeMax(fileUploadTotalSize);
|
||||
|
||||
List fileItems = ((ServletFileUpload) fileUploadTotal).parseRequest(request);
|
||||
MultipartParsingResult multipartParsingResult=parseFileItems(fileItems, encoding);
|
||||
MultiValueMap<String, MultipartFile> files=multipartParsingResult.getMultipartFiles();
|
||||
//单个文件验证文件格式和文件大小
|
||||
validFileList(files,fileUpload,languageProp,isSampleFileUpload);
|
||||
|
||||
return multipartParsingResult;
|
||||
|
||||
} catch (FileUploadBase.SizeLimitExceededException ex) {
|
||||
throw new MultiPartNewException("",fileUploadTotalSize,fileUpload.getSizeMax(),languageProp,ex);
|
||||
} catch (FileUploadException ex) {
|
||||
throw new MultiPartNewException(languageProp, ex);
|
||||
}catch (IOException ex) {
|
||||
throw new MultiPartNewException(languageProp, ex);
|
||||
}catch (MultiPartNewException ex) {
|
||||
throw ex;
|
||||
}catch (Exception ex) {
|
||||
throw new MultiPartNewException(languageProp, ex);
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* 校验文件大小、类型
|
||||
* @return
|
||||
* @throws FileSizeLimitExceededException
|
||||
*/
|
||||
protected void validFileList(MultiValueMap<String, MultipartFile> multipartFile,FileUpload fileUpload,Properties prop,boolean isSampleFileUpload) throws FileSizeLimitExceededException{
|
||||
String errorInfo="";
|
||||
|
||||
String fileType="";
|
||||
long fileMaxSize=0l;
|
||||
if(isSampleFileUpload){
|
||||
fileType=Constants.SAMPLE_FILE_TYPE;
|
||||
fileMaxSize=Constants.SAMPLE_SINGLE_FILE_MAX_SIZE;
|
||||
}else{
|
||||
fileType=Constants.DIGEST_FILE_TYPE;
|
||||
fileMaxSize=Constants.DIGEST_SINGLE_FILE_MAX_SIZE;
|
||||
}
|
||||
for (String fileName : multipartFile.keySet()) {
|
||||
MultipartFile file= multipartFile.getFirst(fileName);
|
||||
//文件类型错误
|
||||
if(fileType.indexOf(","+FileUtils.getSuffix(file.getOriginalFilename(), false)+",") == -1){
|
||||
throw new MultiPartNewException(errorInfo,file.getOriginalFilename(),fileType.substring(0,fileType.length()-1).substring(1),prop,null);
|
||||
}
|
||||
if(file.getSize() > fileMaxSize){
|
||||
throw new MultiPartNewException(errorInfo, file.getOriginalFilename(), file.getSize(), fileMaxSize,prop, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 构造FileUpload
|
||||
* @param encoding
|
||||
* @param isSampleFileUpload
|
||||
* @return
|
||||
*/
|
||||
protected FileUpload prepareFileUpload(String encoding,boolean isSampleFileUpload) {
|
||||
FileUpload fileUpload = getFileUpload();
|
||||
FileUpload actualFileUpload = fileUpload;
|
||||
if (encoding != null && !encoding.equals(fileUpload.getHeaderEncoding())) {
|
||||
actualFileUpload = newFileUpload(getFileItemFactory());
|
||||
actualFileUpload.setHeaderEncoding(encoding);
|
||||
if(isSampleFileUpload){
|
||||
actualFileUpload.setSizeMax(Constants.SAMPLE_TOTAL_FILE_MAX_SIZE);
|
||||
}else{
|
||||
actualFileUpload.setSizeMax(Constants.DIGEST_TOTAL_FILE_MAX_SIZE);
|
||||
}
|
||||
}
|
||||
return actualFileUpload;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取国际化配置文件
|
||||
* @return
|
||||
*/
|
||||
public Properties getMsgProp(){
|
||||
Properties msgProp = new Properties();
|
||||
try {
|
||||
String language = LocaleContextHolder.getLocale().getLanguage();
|
||||
if(language.equals("zh_cn")||language.equals("zh")){
|
||||
msgProp.load(Configurations.class.getResourceAsStream("/messages/message_zh_CN.properties"));
|
||||
}else if(language.equals("ru")){
|
||||
msgProp.load(Configurations.class.getResourceAsStream("/messages/message_ru.properties"));
|
||||
}else{
|
||||
msgProp.load(Configurations.class.getResourceAsStream("/messages/message_en.properties"));
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
msgProp = null;
|
||||
logger.error("未知i18n消息配置文件,请确定文件是否存在!",e);
|
||||
}
|
||||
return msgProp;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -408,4 +408,12 @@ public final class Constants {
|
||||
public static final String REDIRECT_URL_KEY = Configurations.getStringProperty("redirect_url_key","url");
|
||||
public static final String REDIRECT_CONTENT_KEY = Configurations.getStringProperty("redirect_content_key","content");
|
||||
public static final String REDIRECT_RESPONSE_CODE_STARTWITH = Configurations.getStringProperty("redirect_response_code_startwith","30");
|
||||
|
||||
public static final String SAMPLE_UPLOAD_URL_KEYWORD = Configurations.getStringProperty("sample_upload_url_keyword","av");
|
||||
public static final String SAMPLE_FILE_TYPE = Configurations.getStringProperty("sample_file_type","");
|
||||
public static final long SAMPLE_SINGLE_FILE_MAX_SIZE = Configurations.getLongProperty("sample_single_file_max_size",10485760l);//10M
|
||||
public static final long SAMPLE_TOTAL_FILE_MAX_SIZE = Configurations.getLongProperty("sample_total_file_max_size",52428800l);//50M
|
||||
public static final String DIGEST_FILE_TYPE = Configurations.getStringProperty("digest_file_type","");
|
||||
public static final long DIGEST_SINGLE_FILE_MAX_SIZE = Configurations.getLongProperty("digest_single_file_max_size",10485760l);//10M
|
||||
public static final long DIGEST_TOTAL_FILE_MAX_SIZE = Configurations.getLongProperty("digest_total_file_max_size",52428800l);//50M
|
||||
}
|
||||
|
||||
@@ -48,6 +48,7 @@ import com.nis.util.Constants;
|
||||
import com.nis.util.DateUtils;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.JsonMapper;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.util.excel.ExportExcel;
|
||||
import com.nis.web.service.ArchiveServcie;
|
||||
import com.nis.web.service.AreaService;
|
||||
@@ -277,20 +278,52 @@ public class BaseController {
|
||||
List<RequestInfo> requestInfos=requestInfoService.getAllRequestInfo();
|
||||
model.addAttribute("requestInfos", requestInfos);
|
||||
List<ServiceDictInfo> fls=serviceDictInfoService.findAllFlDict();
|
||||
String pNames="";
|
||||
for (ServiceDictInfo serviceDictInfo : fls) {
|
||||
pNames="";
|
||||
pNames=serviceDictInfo.getPNames(fls, serviceDictInfo.getParent().getServiceDictId(), pNames);
|
||||
serviceDictInfo.setpNames(pNames);
|
||||
}
|
||||
model.addAttribute("fls", fls);
|
||||
List<ServiceDictInfo> xzs=serviceDictInfoService.findAllXzDict();
|
||||
for (ServiceDictInfo serviceDictInfo : xzs) {
|
||||
pNames="";
|
||||
pNames=serviceDictInfo.getPNames(xzs, serviceDictInfo.getParent().getServiceDictId(), pNames);
|
||||
serviceDictInfo.setpNames(pNames);
|
||||
}
|
||||
model.addAttribute("xzs", xzs);
|
||||
List<ServiceDictInfo> lables=serviceDictInfoService.findAllLableDict();
|
||||
for (ServiceDictInfo serviceDictInfo : lables) {
|
||||
pNames="";
|
||||
pNames=serviceDictInfo.getPNames(lables, serviceDictInfo.getParent().getServiceDictId(), pNames);
|
||||
serviceDictInfo.setpNames(pNames);
|
||||
}
|
||||
model.addAttribute("lables", lables);
|
||||
}
|
||||
protected void initPageCondition(Model model,BaseCfg cfg){
|
||||
List<RequestInfo> requestInfos=requestInfoService.getAllRequestInfo();
|
||||
model.addAttribute("requestInfos", requestInfos);
|
||||
List<ServiceDictInfo> fls=serviceDictInfoService.findAllFlDict();
|
||||
String pNames="";
|
||||
for (ServiceDictInfo serviceDictInfo : fls) {
|
||||
pNames="";
|
||||
pNames=serviceDictInfo.getPNames(fls, serviceDictInfo.getParent().getServiceDictId(), pNames);
|
||||
serviceDictInfo.setpNames(pNames);
|
||||
}
|
||||
model.addAttribute("fls", fls);
|
||||
List<ServiceDictInfo> xzs=serviceDictInfoService.findAllXzDict();
|
||||
for (ServiceDictInfo serviceDictInfo : xzs) {
|
||||
pNames="";
|
||||
pNames=serviceDictInfo.getPNames(xzs, serviceDictInfo.getParent().getServiceDictId(), pNames);
|
||||
serviceDictInfo.setpNames(pNames);
|
||||
}
|
||||
model.addAttribute("xzs", xzs);
|
||||
List<ServiceDictInfo> lables=serviceDictInfoService.findAllLableDict();
|
||||
for (ServiceDictInfo serviceDictInfo : lables) {
|
||||
pNames="";
|
||||
pNames=serviceDictInfo.getPNames(lables, serviceDictInfo.getParent().getServiceDictId(), pNames);
|
||||
serviceDictInfo.setpNames(pNames);
|
||||
}
|
||||
model.addAttribute("lables", lables);
|
||||
List<FunctionRegionDict> regionList = DictUtils.getFunctionRegionDictList(cfg.getFunctionId());
|
||||
model.addAttribute("regionList", regionList);
|
||||
@@ -315,10 +348,26 @@ public class BaseController {
|
||||
List<RequestInfo> requestInfos=requestInfoService.getValidRequestInfo();
|
||||
model.addAttribute("requestInfos", requestInfos);
|
||||
List<ServiceDictInfo> fls=serviceDictInfoService.findFlDict();
|
||||
String pNames="";
|
||||
for (ServiceDictInfo serviceDictInfo : fls) {
|
||||
pNames="";
|
||||
pNames=serviceDictInfo.getPNames(fls, serviceDictInfo.getParent().getServiceDictId(), pNames);
|
||||
serviceDictInfo.setpNames(pNames);
|
||||
}
|
||||
model.addAttribute("fls", fls);
|
||||
List<ServiceDictInfo> xzs=serviceDictInfoService.findXzDict();
|
||||
for (ServiceDictInfo serviceDictInfo : xzs) {
|
||||
pNames="";
|
||||
pNames=serviceDictInfo.getPNames(xzs, serviceDictInfo.getParent().getServiceDictId(), pNames);
|
||||
serviceDictInfo.setpNames(pNames);
|
||||
}
|
||||
model.addAttribute("xzs", xzs);
|
||||
List<ServiceDictInfo> lables=serviceDictInfoService.findLableDict();
|
||||
for (ServiceDictInfo serviceDictInfo : lables) {
|
||||
pNames="";
|
||||
pNames=serviceDictInfo.getPNames(lables, serviceDictInfo.getParent().getServiceDictId(), pNames);
|
||||
serviceDictInfo.setpNames(pNames);
|
||||
}
|
||||
model.addAttribute("lables", lables);
|
||||
List<Integer> itTypeList=new ArrayList<Integer>();
|
||||
itTypeList.add(Constants.ITEM_TYPE_AREA);
|
||||
@@ -337,10 +386,26 @@ public class BaseController {
|
||||
List<RequestInfo> requestInfos=requestInfoService.getValidRequestInfo();
|
||||
model.addAttribute("requestInfos", requestInfos);
|
||||
List<ServiceDictInfo> fls=serviceDictInfoService.findFlDict();
|
||||
String pNames="";
|
||||
for (ServiceDictInfo serviceDictInfo : fls) {
|
||||
pNames="";
|
||||
pNames=serviceDictInfo.getPNames(fls, serviceDictInfo.getParent().getServiceDictId(), pNames);
|
||||
serviceDictInfo.setpNames(pNames);
|
||||
}
|
||||
model.addAttribute("fls", fls);
|
||||
List<ServiceDictInfo> xzs=serviceDictInfoService.findXzDict();
|
||||
for (ServiceDictInfo serviceDictInfo : xzs) {
|
||||
pNames="";
|
||||
pNames=serviceDictInfo.getPNames(xzs, serviceDictInfo.getParent().getServiceDictId(), pNames);
|
||||
serviceDictInfo.setpNames(pNames);
|
||||
}
|
||||
model.addAttribute("xzs", xzs);
|
||||
List<ServiceDictInfo> lables=serviceDictInfoService.findLableDict();
|
||||
for (ServiceDictInfo serviceDictInfo : lables) {
|
||||
pNames="";
|
||||
pNames=serviceDictInfo.getPNames(lables, serviceDictInfo.getParent().getServiceDictId(), pNames);
|
||||
serviceDictInfo.setpNames(pNames);
|
||||
}
|
||||
model.addAttribute("lables", lables);
|
||||
List<Integer> itTypeList=new ArrayList<Integer>();
|
||||
itTypeList.add(Constants.ITEM_TYPE_AREA);
|
||||
@@ -399,10 +464,26 @@ public class BaseController {
|
||||
List<RequestInfo> requestInfos=requestInfoService.getValidRequestInfo();//只查询有效的
|
||||
model.addAttribute("requestInfos", requestInfos);
|
||||
List<ServiceDictInfo> fls=serviceDictInfoService.findFlDict();//只查询有效分类字典
|
||||
String pNames="";
|
||||
for (ServiceDictInfo serviceDictInfo : fls) {
|
||||
pNames="";
|
||||
pNames=serviceDictInfo.getPNames(fls, serviceDictInfo.getParent().getServiceDictId(), pNames);
|
||||
serviceDictInfo.setpNames(pNames);
|
||||
}
|
||||
model.addAttribute("fls", fls);
|
||||
List<ServiceDictInfo> xzs=serviceDictInfoService.findXzDict();//只查询有效性质字典
|
||||
for (ServiceDictInfo serviceDictInfo : xzs) {
|
||||
pNames="";
|
||||
pNames=serviceDictInfo.getPNames(xzs, serviceDictInfo.getParent().getServiceDictId(), pNames);
|
||||
serviceDictInfo.setpNames(pNames);
|
||||
}
|
||||
model.addAttribute("xzs", xzs);
|
||||
List<ServiceDictInfo> lables=serviceDictInfoService.findLableDict();//只查询有效标签字典
|
||||
for (ServiceDictInfo serviceDictInfo : lables) {
|
||||
pNames="";
|
||||
pNames=serviceDictInfo.getPNames(lables, serviceDictInfo.getParent().getServiceDictId(), pNames);
|
||||
serviceDictInfo.setpNames(pNames);
|
||||
}
|
||||
model.addAttribute("lables", lables);
|
||||
List<FunctionRegionDict> regionList = DictUtils.getFunctionRegionDictList(cfg.getFunctionId());
|
||||
model.addAttribute("regionList", regionList);
|
||||
@@ -920,4 +1001,5 @@ public class BaseController {
|
||||
}
|
||||
return msg.toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -730,3 +730,9 @@ userregion3=user region 3
|
||||
userregion4=user region 4
|
||||
userregion5=user region 5
|
||||
#=============userregions===============
|
||||
#=============multipart upload error info=================
|
||||
single_file_upload_size_error=The size of the file %s is %s,allowing the maximum value of a single file to be %s !
|
||||
total_file_upload_size_error=The total size of uploaded files is %s,allowing the total size of uploaded to be %s !
|
||||
file_upload_type_error=%s file type of error,allowing uploaded file type with %s!
|
||||
file_upload_error=File upload failure !
|
||||
#=============multipart upload error info=================
|
||||
|
||||
@@ -714,3 +714,9 @@ userregion3=user region 3
|
||||
userregion4=user region 4
|
||||
userregion5=user region 5
|
||||
#=============userregions===============
|
||||
#=============multipart upload error info=================
|
||||
single_file_upload_size_error=The size of the file %s is %s,allowing the maximum value of a single file to be %s !
|
||||
total_file_upload_size_error=The total size of uploaded files is %s,allowing the total size of uploaded to be %s !
|
||||
file_upload_type_error=%s file type of error,allowing uploaded file type with %s!
|
||||
file_upload_error=File upload failure !
|
||||
#=============multipart upload error info=================
|
||||
|
||||
@@ -831,3 +831,9 @@ userregion3=\u81EA\u5B9A\u4E49\u57DF3
|
||||
userregion4=\u81EA\u5B9A\u4E49\u57DF4
|
||||
userregion5=\u81EA\u5B9A\u4E49\u57DF5
|
||||
#=============userregions===============
|
||||
#=============multipart upload error info=================
|
||||
single_file_upload_size_error=\u6587\u4EF6%s\u7684\u5927\u5C0F\u4E3A%s\uFF0C\u5141\u8BB8\u5355\u4E2A\u6587\u4EF6\u7684\u6700\u5927\u503C\u4E3A%s\uFF01
|
||||
total_file_upload_size_error=\u4E0A\u4F20\u6587\u4EF6\u7684\u603B\u5927\u5C0F\u6700\u5927\u4E3A%s\uFF0C\u5141\u8BB8\u4E0A\u4F20\u7684\u6587\u4EF6\u603B\u5927\u5C0F\u4E3A%s\uFF01
|
||||
file_upload_type_error=%s\u6587\u4EF6\u7C7B\u578B\u51FA\u9519\uFF0C\u5141\u8BB8\u4E0A\u4F20\u7684\u6587\u4EF6\u7C7B\u578B\u6709%s\uFF01
|
||||
file_upload_error=\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25\uFF01
|
||||
#=============multipart upload error info=================
|
||||
@@ -314,3 +314,16 @@ redirect_response_code_key=code
|
||||
redirect_url_key=url
|
||||
redirect_content_key=content
|
||||
redirect_response_code_startwith=30
|
||||
#样例文件上传的uri关键词
|
||||
sample_upload_url_keyword=/av
|
||||
#样例和摘要文件大小类型设置
|
||||
sample_file_type=,mp4,flv,ivf,mp2v,
|
||||
#10M 10485760
|
||||
sample_single_file_max_size=10485760
|
||||
#12M 12582912
|
||||
sample_total_file_max_size=12582912
|
||||
digest_file_type=,txt,doc,img,
|
||||
#10M10485760
|
||||
digest_single_file_max_size=10485760
|
||||
#12M12582912
|
||||
digest_total_file_max_size=12582912
|
||||
@@ -157,7 +157,6 @@
|
||||
<property name="favorPathExtension" value="true" />
|
||||
</bean>
|
||||
|
||||
|
||||
<mvc:interceptors>
|
||||
<mvc:interceptor>
|
||||
<mvc:mapping path="/nis/**" />
|
||||
@@ -245,6 +244,10 @@
|
||||
</bean>
|
||||
-->
|
||||
|
||||
<bean id="multipartResolver"
|
||||
class="com.nis.interceptor.MultipartFileIntercepter" >
|
||||
<property name="defaultEncoding" value="utf-8"></property>
|
||||
</bean>
|
||||
|
||||
<bean
|
||||
class="org.springframework.web.servlet.handler.SimpleMappingExceptionResolver">
|
||||
@@ -257,15 +260,6 @@
|
||||
</bean>
|
||||
<!-- 支持Shiro对Controller的方法级AOP安全控制 end -->
|
||||
|
||||
|
||||
<!-- 上传文件拦截,设置最大文件大小10m=10*1024*1024(B)=10485760 bytes -->
|
||||
<bean id="multipartResolver"
|
||||
class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
|
||||
<property name="defaultEncoding" value="utf-8"></property>
|
||||
<property name="maxUploadSize" value="10737418240"></property>
|
||||
<!--<property name="maxInMemorySize" value="1000"></property> -->
|
||||
</bean>
|
||||
|
||||
<!-- 配置国际化资源文件路径 -->
|
||||
<bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource">
|
||||
<property name="basename">
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<h3 class="form-section"><spring:message code="basic_config"/></h3>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%><h3 class="form-section"><spring:message code="basic_config"/></h3>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
@@ -162,7 +161,95 @@
|
||||
|
||||
</c:forEach>
|
||||
</select> --%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%-- <div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message code="attribute"/></label>
|
||||
<div class="col-md-6">
|
||||
<div class="input-group">
|
||||
<input id="classifyId" name="classify" class="form-control singleClass" value="" type="hidden">
|
||||
<input id="classifyName" onclick="openSelct(this);" name="classifyName" readonly="readonly" value="" data-msg-required="" placeholder="" class="form-control" style="background-color:transparent" type="text">
|
||||
|
||||
<div class="input-group-btn">
|
||||
<a id="classifyButton" class="btn btn-default dropdown-toggle" href="javascript:void(0);" style=""><i class="fa fa-angle-down"></i></a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<select name="classifyTest" multiple="multiple" class="form-control">
|
||||
|
||||
<c:forEach items="${fls}" var="fl">
|
||||
<c:choose>
|
||||
<c:when test="${_cfg.classify==null or _cfg.classify==''}">
|
||||
<option value="${fl.serviceDictId}" data-section="${fl.pNames}">${fl.itemValue}</option>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<c:if test="${fl.isValid!=0}">
|
||||
<option value="${fl.serviceDictId}"
|
||||
<c:forEach items="${fn:split(_cfg.classify,',')}" var="_classify">
|
||||
<c:if test="${fn:trim(fl.serviceDictId) eq _classify}">selected</c:if>
|
||||
</c:forEach>
|
||||
data-section="${fl.pNames}"
|
||||
>
|
||||
${fl.itemValue}
|
||||
</option>
|
||||
</c:if>
|
||||
<option value="${fl.serviceDictId}"
|
||||
<c:forEach items="${fn:split(_cfg.classify,',')}" var="_classify">
|
||||
<c:if test="${fl.isValid==0}">disabled="disabled"</c:if>
|
||||
data-section="${fl.pNames}"
|
||||
<c:if test="${fn:trim(fl.serviceDictId) eq _classify}">selected</c:if>
|
||||
</c:forEach>
|
||||
>${fl.itemValue}</option>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message code="label"/></label>
|
||||
<div class="col-md-6">
|
||||
<div class="btn-group bootstrap-select form-control required dropup">
|
||||
<button aria-expanded="true" title="" type="button" class="btn dropdown-toggle btn-default" data-toggle="dropdown">
|
||||
<span class="caret"></span></button>
|
||||
</div>
|
||||
<select name="lableTest" multiple="multiple" title=<spring:message code="select"/>>
|
||||
<c:forEach items="${lables}" var="lable">
|
||||
<c:choose>
|
||||
<c:when test="${_cfg.lable==null or _cfg.lable==''}">
|
||||
<option value="${lable.serviceDictId}" data-section="${lable.pNames}">${lable.itemValue}</option>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<c:if test="${lable.isValid!=0}">
|
||||
<option value="${lable.serviceDictId}"
|
||||
<c:forEach items="${fn:split(_cfg.lable,',')}" var="_lable">
|
||||
<c:if test="${fn:trim(lable.serviceDictId) eq _lable}">selected</c:if>
|
||||
</c:forEach>
|
||||
data-section="${lable.pNames}"
|
||||
>
|
||||
${lable.itemValue}
|
||||
</option>
|
||||
</c:if>
|
||||
<c:forEach items="${fn:split(_cfg.lable,',')}" var="_lable">
|
||||
<option value="${lable.serviceDictId}"
|
||||
<c:if test="${lable.isValid==0}"> readonly</c:if>
|
||||
<c:if test="${fn:trim(lable.serviceDictId) eq _lable}">selected</c:if>
|
||||
data-section="${lable.pNames}"
|
||||
>${lable.itemValue}</option>
|
||||
</c:forEach>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
|
||||
</c:forEach>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> --%>
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
<!-- 文件导入 -->
|
||||
<link href="${pageContext.request.contextPath}/static/global/plugins/bootstrap-fileupload/css/bootstrap-fileupload.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<link href="${pageContext.request.contextPath}/static/global/plugins/jquery-tree-multiselect/jquery.tree-multiselect.min.css" rel="stylesheet" type="text/css" />
|
||||
<!--[if lt IE 9]>
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/respond.min.js"></script>
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/excanvas.min.js"></script>
|
||||
@@ -94,3 +95,5 @@
|
||||
<!-- 文件导入 -->
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/bootstrap-fileupload/js/bootstrap-fileupload.js" type="text/javascript"></script>
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/bootstrap-fileupload/js/jquery.cookie.min.js" type="text/javascript"></script>
|
||||
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/jquery-tree-multiselect/jquery.tree-multiselect.js" type="text/javascript"></script>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,2 @@
|
||||
/* jQuery Tree Multiselect v2.5.2 | (c) Patrick Tsai | MIT Licensed */
|
||||
div.tree-multiselect{border-radius:5px;display:table;height:inherit;width:100%}div.tree-multiselect>div.selected,div.tree-multiselect>div.selections{display:inline-block;box-sizing:border-box;overflow:auto;vertical-align:top;width:100%}div.tree-multiselect>div.selections div.item{margin-left:16px}div.tree-multiselect>div.selections div.item label{cursor:pointer;display:inline}div.tree-multiselect>div.selections div.item label.disabled{color:#D8D8D8}div.tree-multiselect>div.selections *[searchhit=false]{display:none}div.tree-multiselect>div.selections.no-border{border-right:none}div.tree-multiselect>div.selected>div.item{background:#EAEAEA;border-radius:2px;padding:2px 5px;overflow:auto}div.tree-multiselect>div.selected.ui-sortable>div.item:hover{cursor:move}div.tree-multiselect div.section>div.section,div.tree-multiselect div.section>div.item{padding-left:20px}div.tree-multiselect div.section.collapsed>div.title span.collapse-section:after{content:"+"}div.tree-multiselect div.section.collapsed:not([searchhit])>.item,div.tree-multiselect div.section.collapsed:not([searchhit])>.section{display:none}div.tree-multiselect div.title,div.tree-multiselect div.item{margin-bottom:2px}div.tree-multiselect div.title{background:#f6f6f6;color:#555;padding:2px}div.tree-multiselect div.title>*{display:inline-block}div.tree-multiselect div.title>span.collapse-section{margin:0 3px;width:8px}div.tree-multiselect div.title>span.collapse-section:after{content:"-"}div.tree-multiselect div.title:hover{cursor:pointer}div.tree-multiselect input[type=checkbox]{display:inline;margin-right:5px}div.tree-multiselect input[type=checkbox]:not([disabled]):hover{cursor:pointer}div.tree-multiselect span.remove-selected,div.tree-multiselect span.description{background:#777;border-radius:2px;color:white;margin-right:5px;padding:0 3px}div.tree-multiselect span.remove-selected:hover{cursor:pointer}div.tree-multiselect span.description:hover{cursor:help}div.tree-multiselect div.temp-description-popup{background:#EAEAEA;border:1px solid #676767;border-radius:3px;padding:5px}div.tree-multiselect span.section-name{float:right;font-style:italic}div.tree-multiselect .auxiliary{display:table;width:100%}div.tree-multiselect .auxiliary input.search{border-width:1px;border-style: solid solid solid solid;border-color: #D8D8D8;display:table-cell;margin:0;padding:5px;width:100%}div.tree-multiselect .auxiliary .select-all-container{display:table-cell;text-align:right}div.tree-multiselect .auxiliary .select-all-container span.select-all,div.tree-multiselect .auxiliary .select-all-container span.unselect-all{margin-right:5px;padding-right:5px}div.tree-multiselect .auxiliary .select-all-container span.select-all:hover,div.tree-multiselect .auxiliary .select-all-container span.unselect-all:hover{cursor:pointer}div.tree-multiselect .auxiliary .select-all-container span.select-all{border-right:2px solid #D8D8D8} .selectionsDiv{max-height: 169.367px; overflow-y: auto; min-height: 103px;}
|
||||
@@ -1,7 +1,14 @@
|
||||
$(function(){
|
||||
/* var tree2 = $("#test-select-2").treeMultiselect({
|
||||
searchable: true
|
||||
});*/
|
||||
var tree2 = $("select[name=lableTest]").treeMultiselect({
|
||||
searchable: true,
|
||||
hideSidePanel:true,
|
||||
startCollapsed:true
|
||||
});
|
||||
var tree1 = $("select[name=classifyTest]").treeMultiselect({
|
||||
searchable: true,
|
||||
hideSidePanel:true,
|
||||
startCollapsed:true
|
||||
});
|
||||
//全选及取消
|
||||
$("#checkAll").change(function(){
|
||||
if($("#checkAll").prop("checked")){
|
||||
@@ -874,6 +881,10 @@ var downLoadXLS=function(){
|
||||
var pathName=window.document.location.pathname.substring(0,window.document.location.pathname.lastIndexOf("/"));
|
||||
window.location =pathName+"/import/template?functionId="+$("#functionId").val()+"&cfgRegionCode="+$("#cfgRegionCode").val();
|
||||
}
|
||||
//下载模板
|
||||
var openSelct=function(obj){
|
||||
$(obj).parent().parent().find(".tree-multiselect").removeClass("hidden");
|
||||
}
|
||||
//导入配置
|
||||
var importCfg=function(){
|
||||
if($("#serviceId").val()==""){
|
||||
|
||||
Reference in New Issue
Block a user