radius 动态列隐藏来导出Excel
This commit is contained in:
@@ -11,6 +11,7 @@ public class BaseLogEntity<T> extends BaseEntity<T> {
|
||||
protected Integer cfgId;
|
||||
@ExcelField(title="found_time",sort=5)
|
||||
protected String foundTime; //发现时间,timestamp
|
||||
@ExcelField(title="recv_time",sort=6)
|
||||
protected String recvTime; //接收时间,timestamp
|
||||
@ExcelField(title="transport_layer_protocol",dictType="LOG_PROTOCOL",sort=30)
|
||||
protected String transProto; //协议类型,从字典LOG_PROTOCOL取值
|
||||
@@ -29,12 +30,15 @@ public class BaseLogEntity<T> extends BaseEntity<T> {
|
||||
@ExcelField(title="client_port",sort=43)
|
||||
protected String sPort; //客户端ip端口
|
||||
protected Integer service; //配置表的serviceId
|
||||
@ExcelField(title="entrance_id",dictType="ENTRANCE",sort=7)
|
||||
protected Integer entranceId; //出入口编号
|
||||
@ExcelField(title="deviceid",dictType="DEVICE",sort=45)
|
||||
protected Integer deviceId; //串联设备编号
|
||||
@ExcelField(title="direction",dictType="LOG_DIRECTION",sort=55)
|
||||
protected Integer direction; //传输方向 0:域内->域外,1:域外->域内,从字典LOG_DIRECTION取值
|
||||
@ExcelField(title="stream_type",dictType="LOG_STREAM_TYPE",sort=65)
|
||||
protected Integer streamDir; //流类型 0:c2s;1:s2c;2:double,从字典LOG_STREAMTYPE取值
|
||||
@ExcelField(title="clj_ip",sort=27)
|
||||
protected String capIp; //处理机IP
|
||||
@ExcelField(title="nest_addr_list",sort=66)
|
||||
protected String addrList; //嵌套地址列表
|
||||
@@ -42,12 +46,17 @@ public class BaseLogEntity<T> extends BaseEntity<T> {
|
||||
protected String serverLocate;// 服务端地址定位信息
|
||||
@ExcelField(title="client_locate",sort=68)
|
||||
protected String clientLocate;// 客户端地址定位信息
|
||||
@ExcelField(title="user_region",sort=76)
|
||||
protected String userRegion; //用户自定义
|
||||
@ExcelField(title="s_asn",sort=70)
|
||||
protected String sAsn;//客户端ASN
|
||||
@ExcelField(title="d_asn",sort=71)
|
||||
protected String dAsn;//服务端ASN
|
||||
@ExcelField(title="s_subscribe_id",sort=73)
|
||||
protected String sSubscribeId;//客户端用户名
|
||||
@ExcelField(title="d_subscribe_id",sort=74)
|
||||
protected String dSubscribeId;//服务端用户名
|
||||
@ExcelField(title="scene_file",sort=70)
|
||||
@ExcelField(title="scene_file",sort=77)
|
||||
protected String sceneFile;//现场日志文件地址
|
||||
|
||||
protected Integer functionId;
|
||||
@@ -65,6 +74,7 @@ public class BaseLogEntity<T> extends BaseEntity<T> {
|
||||
//新增字段
|
||||
@ExcelField(title="encap_type",dictType="ENCAP_TYPE",sort=50)
|
||||
protected Integer encapType;//原始二层封装格式
|
||||
@ExcelField(title="link_id",dictType="LINK",sort=47)
|
||||
protected Integer linkId;//串联设备链路号
|
||||
@ExcelField(title="inner_smac",sort=58)
|
||||
protected String innerSmac;//MAC_IN_MAC的内层源MAC
|
||||
|
||||
@@ -49,6 +49,14 @@ public class Reflections {
|
||||
getName="dPort";
|
||||
}else if(getName.equals("SPort")){
|
||||
getName="sPort";
|
||||
}else if(getName.equals("SAsn")){
|
||||
getName="sAsn";
|
||||
}else if(getName.equals("DAsn")){
|
||||
getName="dAsn";
|
||||
}else if(getName.equals("SSubscribeId")){
|
||||
getName="sSubscribeId";
|
||||
}else if(getName.equals("DSubscribeId")){
|
||||
getName="dSubscribeId";
|
||||
}
|
||||
String getterMethodName = GETTER_PREFIX + getName;
|
||||
object = invokeMethod(object, getterMethodName, new Class[] {}, new Object[] {});
|
||||
|
||||
@@ -1910,7 +1910,7 @@ public class ExportExcel {
|
||||
val = getBasicInfo(ef.dictType(),map,valStr);
|
||||
}else{
|
||||
//字典数据已做国际化处理
|
||||
String dict=DictUtils.getDictLabel(ef.dictType(), valStr, "");
|
||||
String dict=DictUtils.getDictLabel(ef.dictType(), valStr, valStr);
|
||||
//如果找不到字典国际化值,把字典本身作为默认值放进去,不然导出就是空了
|
||||
val = msgProp.getProperty(dict,dict);
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ public class NtcCollectRadiusLogController extends BaseController {
|
||||
|
||||
//radius配置导出
|
||||
@RequestMapping(value = "exportRadius")
|
||||
public void exportRadius(@ModelAttribute("log") NtcCollectRadiusLog log, Model model, HttpServletRequest request, HttpServletResponse response,RedirectAttributes redirectAttributes){
|
||||
public void exportRadius(@ModelAttribute("log") NtcCollectRadiusLog log, Model model,String hColumns, HttpServletRequest request, HttpServletResponse response,RedirectAttributes redirectAttributes){
|
||||
try {
|
||||
//export data info
|
||||
List<String> titleList=new ArrayList<String>();
|
||||
@@ -114,7 +114,7 @@ public class NtcCollectRadiusLogController extends BaseController {
|
||||
}
|
||||
titleList.add("radius_log");
|
||||
classMap.put("radius_log", NtcCollectRadiusLog.class);
|
||||
String cfgIndexInfoNoExport="";
|
||||
String cfgIndexInfoNoExport=","+hColumns;
|
||||
noExportMap.put("radius_log",cfgIndexInfoNoExport);
|
||||
dataMap.put("radius_log",list);
|
||||
/*}*/
|
||||
@@ -125,4 +125,5 @@ public class NtcCollectRadiusLogController extends BaseController {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user