认证-参数项收集-bug55353

This commit is contained in:
liyawei
2022-07-04 17:29:13 +08:00
parent ecbf1abd00
commit 8fa718fe6a
3 changed files with 32 additions and 6 deletions
@@ -1660,8 +1660,16 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
field.setAccessible(true);
// 获取在对象f中属性fields[i]对应的对象中的变量
Object o = field.get(obj);
if (o != null)
map.put(varName, o);
if (o != null) {
if (Date.class.equals(field.getType())) {
Date date = (Date) o;
SimpleDateFormat formatter=new SimpleDateFormat("yyyy-MM-dd");
String time=formatter.format(date);
map.put(varName, time);
} else {
map.put(varName, o);
}
}
// 恢复访问控制权限
field.setAccessible(accessFlag);
} catch (IllegalArgumentException ex) {
@@ -28,6 +28,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.lang.reflect.Field;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
@@ -497,8 +498,16 @@ public class ParamsCollectManifestHistoryEOServiceImpl extends ServiceImpl<Param
field.setAccessible(true);
// 获取在对象f中属性fields[i]对应的对象中的变量
Object o = field.get(obj);
if (o != null)
map.put(varName, o);
if (o != null) {
if (Date.class.equals(field.getType())) {
Date date = (Date) o;
SimpleDateFormat formatter=new SimpleDateFormat("yyyy-MM-dd");
String time=formatter.format(date);
map.put(varName, time);
} else {
map.put(varName, o);
}
}
// 恢复访问控制权限
field.setAccessible(accessFlag);
} catch (IllegalArgumentException ex) {
@@ -69,6 +69,7 @@ import java.lang.reflect.Field;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.file.StandardOpenOption;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
@@ -905,8 +906,16 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
field.setAccessible(true);
// 获取在对象f中属性fields[i]对应的对象中的变量
Object o = field.get(obj);
if (o != null)
map.put(varName, o);
if (o != null) {
if (Date.class.equals(field.getType())) {
Date date = (Date) o;
SimpleDateFormat formatter=new SimpleDateFormat("yyyy-MM-dd");
String time=formatter.format(date);
map.put(varName, time);
} else {
map.put(varName, o);
}
}
// 恢复访问控制权限
field.setAccessible(accessFlag);
} catch (IllegalArgumentException ex) {