导出文件名空格替换下划线

This commit is contained in:
leijun
2018-10-22 14:08:22 +08:00
parent 03a1991612
commit 09a0c49f93
3 changed files with 12 additions and 2 deletions

View File

@@ -2904,6 +2904,8 @@ public class BaseController {
String fileName = msgProp.getProperty(functionName, functionName) + "_" + DateUtils.getDate("yyyyMMddHHmmss")
+ ".xlsx";
fileName=fileName.replaceAll(" ", "_");
if (request.getHeader("User-Agent").toUpperCase().indexOf("MSIE") > 0) {
fileName = URLEncoder.encode(fileName, "UTF-8");
} else {

View File

@@ -239,8 +239,12 @@ public class InterceptController extends CommonController{
List<BaseStringCfg> interInfoList=new ArrayList<BaseStringCfg>();
for (CfgIndexInfo cfg : page.getList()) {
CfgIndexInfo cfgIndexInfo=interceptCfgService.exportIpInfo(cfg);
if(cfgIndexInfo.getIpPortList()!=null){
ipList.addAll(cfgIndexInfo.getIpPortList());
}
if(cfgIndexInfo.getInterceptPktBinList()!=null){
interInfoList.addAll(cfgIndexInfo.getInterceptPktBinList());
}
}
interInfoList=BaseStringCfg.replaceBaseKeyList(interInfoList);
dataMap.put(entity.getMenuNameCode(), page.getList());

View File

@@ -76,10 +76,14 @@ public class InterceptCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo>
public CfgIndexInfo exportIpInfo(CfgIndexInfo entity){
List<IpPortCfg> ipPortList = websiteCfgDao.getIpPortList(entity);
entity.setIpPortList(ipPortList);
if(StringUtils.isNotBlank(entity.getUserRegion1())) {
if(ipPortList!=null){
entity.setIpPortList(ipPortList);
}
if(entity.getFunctionId()!=null) {
List<InterceptPktBin> info=interceptCfgDao.getInterceptPktBin(entity);
if(info!=null){
entity.setInterceptPktBinList(info);
}
}
return entity;
}