|
|
|
@ -56,24 +56,30 @@ public class ExportAspect {
|
|
|
|
|
//-------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
if (paramtes == null || args == null || args.length == 0) return joinPoint.proceed();
|
|
|
|
|
//-------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
request.setCharacterEncoding("UTF-8");
|
|
|
|
|
|
|
|
|
|
Object[] params = new Object[1];
|
|
|
|
|
Map<String, Object> paramMap = new HashMap<>();
|
|
|
|
|
while (paramtes.hasMoreElements()) {
|
|
|
|
|
String param = paramtes.nextElement();
|
|
|
|
|
String value = request.getParameter(param);
|
|
|
|
|
//-------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
if (param != null && param.equals("export")) export = true;
|
|
|
|
|
if (param != null && param.equals("exportCode")) exportCode = value;
|
|
|
|
|
if (export && StringUtil.notEmpty(exportCode)) break;
|
|
|
|
|
|
|
|
|
|
paramMap.put(param, value);
|
|
|
|
|
}//while
|
|
|
|
|
params[0] = paramMap;
|
|
|
|
|
//-------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
if (export == false || StringUtil.isEmpty(exportCode)) return joinPoint.proceed();
|
|
|
|
|
//-------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
for (Object arg : args) {
|
|
|
|
|
for (Object arg : params) {
|
|
|
|
|
if (arg instanceof FrontPage) {
|
|
|
|
|
((FrontPage)arg).setRows(20000);
|
|
|
|
|
}
|
|
|
|
|
}//for
|
|
|
|
|
//-------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
Object result = joinPoint.proceed(args);
|
|
|
|
|
Object result = joinPoint.proceed(params);
|
|
|
|
|
JSONObject resultJson = JSON.parseObject(JSON.toJSONStringWithDateFormat(result, "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat));
|
|
|
|
|
if (resultJson.get("data") instanceof List) {
|
|
|
|
|
List dataList = (List)resultJson.get("data");
|
|
|
|
|