Commit 93eaef2b authored by 李秀明's avatar 李秀明

Merge remote-tracking branch 'origin/develop_dl_bugfix' into develop_dl_bugfix

parents 2a6ae852 5a72e0c1
...@@ -16,6 +16,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -16,6 +16,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.redis.connection.RedisConnection; import org.springframework.data.redis.connection.RedisConnection;
import org.springframework.data.redis.core.RedisTemplate; import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.util.ReflectionUtils;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.core.foundation.context.RequestContext; import org.typroject.tyboot.core.foundation.context.RequestContext;
import org.typroject.tyboot.core.foundation.enumeration.UserType; import org.typroject.tyboot.core.foundation.enumeration.UserType;
...@@ -131,7 +132,8 @@ public class DataDictionaryController extends BaseController { ...@@ -131,7 +132,8 @@ public class DataDictionaryController extends BaseController {
Class<? extends DataDictionary> aClass = dataDictionary.getClass(); Class<? extends DataDictionary> aClass = dataDictionary.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); // field.setAccessible(true);
ReflectionUtils.makeAccessible(field);
Object o = field.get(dataDictionary); Object o = field.get(dataDictionary);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
...@@ -369,7 +371,7 @@ public class DataDictionaryController extends BaseController { ...@@ -369,7 +371,7 @@ public class DataDictionaryController extends BaseController {
@ApiOperation(httpMethod = "GET", value = "清楚redis缓存", notes = "清楚redis缓存") @ApiOperation(httpMethod = "GET", value = "清楚redis缓存", notes = "清楚redis缓存")
public ResponseModel<Object> cleanRedis(@RequestParam String type) throws Exception { public ResponseModel<Object> cleanRedis(@RequestParam String type) throws Exception {
type = type.toLowerCase(); type = type.toLowerCase();
if ("all".equals(type)) { if ("all".equalsIgnoreCase(type)) {
RedisConnection redisConnection = redisTemplate.getConnectionFactory().getConnection(); RedisConnection redisConnection = redisTemplate.getConnectionFactory().getConnection();
redisConnection.flushAll(); redisConnection.flushAll();
redisConnection.close(); redisConnection.close();
......
...@@ -22,10 +22,7 @@ import java.io.OutputStream; ...@@ -22,10 +22,7 @@ import java.io.OutputStream;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.net.URLEncoder; import java.net.URLEncoder;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.util.ArrayList; import java.util.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class ExcelUtil { public class ExcelUtil {
...@@ -215,7 +212,7 @@ public class ExcelUtil { ...@@ -215,7 +212,7 @@ public class ExcelUtil {
if (fileName == null) { if (fileName == null) {
throw new Exception("文件不存在!"); throw new Exception("文件不存在!");
} }
if (!fileName.toLowerCase().endsWith(ExcelTypeEnum.XLS.getValue()) && !fileName.toLowerCase().endsWith(ExcelTypeEnum.XLSX.getValue())) { if (!fileName.toLowerCase(Locale.ENGLISH).endsWith(ExcelTypeEnum.XLS.getValue()) && !fileName.toLowerCase(Locale.ENGLISH).endsWith(ExcelTypeEnum.XLSX.getValue())) {
throw new Exception("文件类型异常!"); throw new Exception("文件类型异常!");
} }
InputStream inputStream; InputStream inputStream;
......
...@@ -24,7 +24,7 @@ public class DynamicEnumUtil { ...@@ -24,7 +24,7 @@ public class DynamicEnumUtil {
IllegalAccessException { IllegalAccessException {
// 反射访问私有变量 // 反射访问私有变量
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
/** /**
* 接下来,我们将字段实例中的修饰符更改为不再是final, * 接下来,我们将字段实例中的修饰符更改为不再是final,
......
...@@ -7,10 +7,7 @@ import java.lang.reflect.Field; ...@@ -7,10 +7,7 @@ import java.lang.reflect.Field;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import java.net.URLEncoder; import java.net.URLEncoder;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.util.ArrayList; import java.util.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
...@@ -282,8 +279,8 @@ public class ExcelUtil { ...@@ -282,8 +279,8 @@ public class ExcelUtil {
if (fileName == null) { if (fileName == null) {
throw new Exception("文件不存在!"); throw new Exception("文件不存在!");
} }
if (!fileName.toLowerCase().endsWith(ExcelTypeEnum.XLS.getValue()) if (!fileName.toLowerCase(Locale.ENGLISH).endsWith(ExcelTypeEnum.XLS.getValue())
&& !fileName.toLowerCase().endsWith(ExcelTypeEnum.XLSX.getValue())) { && !fileName.toLowerCase(Locale.ENGLISH).endsWith(ExcelTypeEnum.XLSX.getValue())) {
throw new Exception("文件类型异常!"); throw new Exception("文件类型异常!");
} }
InputStream inputStream; InputStream inputStream;
......
package com.yeejoin.equipmanage.common.utils; package com.yeejoin.equipmanage.common.utils;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Locale;
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentHashMap;
/** /**
...@@ -224,7 +225,7 @@ public class BillCodeManagerUtil { ...@@ -224,7 +225,7 @@ public class BillCodeManagerUtil {
throw new IllegalArgumentException("未输入正确参数,编码前缀(prefix),编码(code)!"); throw new IllegalArgumentException("未输入正确参数,编码前缀(prefix),编码(code)!");
} }
String tmp_prefix = prefix.toUpperCase(); String tmp_prefix = prefix.toUpperCase(Locale.ENGLISH);
switch (tmp_prefix) { switch (tmp_prefix) {
case INBOUND: case INBOUND:
return checkInboundCode(code); return checkInboundCode(code);
......
...@@ -264,7 +264,7 @@ public class EquipmentStateUtil { ...@@ -264,7 +264,7 @@ public class EquipmentStateUtil {
} }
public static String judgeEquipState(EquipmentSpecificIndex index) { public static String judgeEquipState(EquipmentSpecificIndex index) {
if (TrueOrFalseEnum.real.value.toUpperCase().equals(String.valueOf(index.getValue()).toUpperCase())) { if (TrueOrFalseEnum.real.value.equalsIgnoreCase(String.valueOf(index.getValue()))) {
return AlarmStatusEnum.BJ.getCode() == index.getIsAlarm() ? index.getEmergencyLevelColor() : ""; return AlarmStatusEnum.BJ.getCode() == index.getIsAlarm() ? index.getEmergencyLevelColor() : "";
} }
return ""; return "";
......
...@@ -9,10 +9,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel; ...@@ -9,10 +9,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.io.File; import java.io.File;
import java.io.FileOutputStream; import java.io.FileOutputStream;
import java.io.IOException; import java.io.IOException;
import java.util.Calendar; import java.util.*;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
public class FileUtil { public class FileUtil {
...@@ -91,7 +88,7 @@ public class FileUtil { ...@@ -91,7 +88,7 @@ public class FileUtil {
fileName = System.currentTimeMillis() + "_" + name; fileName = System.currentTimeMillis() + "_" + name;
// 获取文件的后缀名 // 获取文件的后缀名
String suffixName = fileName.substring(fileName.lastIndexOf(".")).toLowerCase();// 例如:.jpg String suffixName = fileName.substring(fileName.lastIndexOf(".")).toLowerCase(Locale.ENGLISH);// 例如:.jpg
// 文件上传后的路径 // 文件上传后的路径
String filePath = getFilePath(suffixName);// 1.images 2.musics 3.videos String filePath = getFilePath(suffixName);// 1.images 2.musics 3.videos
// 4.docs // 4.docs
......
...@@ -201,7 +201,7 @@ public class ReflectUtil { ...@@ -201,7 +201,7 @@ public class ReflectUtil {
public static void makeAccessible(Method method) { public static void makeAccessible(Method method) {
if ((!Modifier.isPublic(method.getModifiers()) || !Modifier.isPublic(method.getDeclaringClass().getModifiers())) if ((!Modifier.isPublic(method.getModifiers()) || !Modifier.isPublic(method.getDeclaringClass().getModifiers()))
&& !method.isAccessible()) { && !method.isAccessible()) {
method.setAccessible(true); ReflectionUtils.makeAccessible(method);
} }
} }
...@@ -211,7 +211,7 @@ public class ReflectUtil { ...@@ -211,7 +211,7 @@ public class ReflectUtil {
public static void makeAccessible(Field field) { public static void makeAccessible(Field field) {
if ((!Modifier.isPublic(field.getModifiers()) || !Modifier.isPublic(field.getDeclaringClass().getModifiers()) || Modifier if ((!Modifier.isPublic(field.getModifiers()) || !Modifier.isPublic(field.getDeclaringClass().getModifiers()) || Modifier
.isFinal(field.getModifiers())) && !field.isAccessible()) { .isFinal(field.getModifiers())) && !field.isAccessible()) {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
} }
} }
......
...@@ -167,7 +167,7 @@ public final class ResponseUtils { ...@@ -167,7 +167,7 @@ public final class ResponseUtils {
public static Object getGetMethod(Object ob , String name)throws Exception{ public static Object getGetMethod(Object ob , String name)throws Exception{
Method[] m = ob.getClass().getMethods(); Method[] m = ob.getClass().getMethods();
for(int i = 0;i < m.length;i++){ for(int i = 0;i < m.length;i++){
if(("get"+name).toLowerCase().equals(m[i].getName().toLowerCase())){ if(("get"+name).equalsIgnoreCase(m[i].getName())){
return m[i].invoke(ob); return m[i].invoke(ob);
} }
} }
......
package com.yeejoin.amos.boot.module.jcs.api.enums; package com.yeejoin.amos.boot.module.jcs.api.enums;
import lombok.AllArgsConstructor;
import lombok.Getter; import lombok.Getter;
/** /**
...@@ -9,7 +8,6 @@ import lombok.Getter; ...@@ -9,7 +8,6 @@ import lombok.Getter;
* @author DELL * @author DELL
*/ */
@Getter @Getter
@AllArgsConstructor
public enum EquipTypeEnum { public enum EquipTypeEnum {
/** /**
...@@ -34,4 +32,9 @@ public enum EquipTypeEnum { ...@@ -34,4 +32,9 @@ public enum EquipTypeEnum {
public void setName(String name) { public void setName(String name) {
this.name = name; this.name = name;
} }
EquipTypeEnum(String key, String name) {
this.key = key;
this.name = name;
}
} }
package com.yeejoin.amos.boot.module.jcs.api.enums; package com.yeejoin.amos.boot.module.jcs.api.enums;
import lombok.AllArgsConstructor;
import lombok.Getter; import lombok.Getter;
/** /**
...@@ -9,7 +8,6 @@ import lombok.Getter; ...@@ -9,7 +8,6 @@ import lombok.Getter;
* @author DELL * @author DELL
*/ */
@Getter @Getter
@AllArgsConstructor
public enum FireBrigadeTypeEnum { public enum FireBrigadeTypeEnum {
专职消防队("fullTime", "116", "专职消防队"), 专职消防队("fullTime", "116", "专职消防队"),
医疗救援队("medicalTeam", "830", "医疗救援队"), 医疗救援队("medicalTeam", "830", "医疗救援队"),
...@@ -18,4 +16,10 @@ public enum FireBrigadeTypeEnum { ...@@ -18,4 +16,10 @@ public enum FireBrigadeTypeEnum {
private String key; private String key;
private String code; private String code;
private String name; private String name;
FireBrigadeTypeEnum(String key, String code, String name) {
this.key = key;
this.code = code;
this.name = name;
}
} }
...@@ -305,7 +305,7 @@ public class ExcelParser { ...@@ -305,7 +305,7 @@ public class ExcelParser {
} }
String type = fieldTypeMap.get(fieldName).getDataType(); String type = fieldTypeMap.get(fieldName).getDataType();
String cellValue = convertCellValueToString(cell); String cellValue = convertCellValueToString(cell);
if (type.toUpperCase().equals("ENUM")) { if (type.toUpperCase(Locale.ENGLISH).equals("ENUM")) {
if (!enumMap.containsKey(colIndex)) { if (!enumMap.containsKey(colIndex)) {
throw new BadRequest("缺少枚举字段的配置信息:" + fieldName); throw new BadRequest("缺少枚举字段的配置信息:" + fieldName);
} }
......
...@@ -344,7 +344,7 @@ public class ExcelParserOld { ...@@ -344,7 +344,7 @@ public class ExcelParserOld {
} }
String type = fieldTypeMap.get(fieldName).getDataType(); String type = fieldTypeMap.get(fieldName).getDataType();
String cellValue = convertCellValueToString(cell); String cellValue = convertCellValueToString(cell);
if (type.toUpperCase().equals("ENUM")) { if (type.toUpperCase(Locale.ENGLISH).equals("ENUM")) {
if (!enumMap.containsKey(colIndex)) { if (!enumMap.containsKey(colIndex)) {
throw new BadRequest("缺少枚举字段的配置信息:" + fieldName); throw new BadRequest("缺少枚举字段的配置信息:" + fieldName);
} }
......
...@@ -583,7 +583,7 @@ public class DocxBuilder { ...@@ -583,7 +583,7 @@ public class DocxBuilder {
textStyle = new TextStyle(textStyle); textStyle = new TextStyle(textStyle);
Map<String, String> spanStyleMap = styleStr2Map(style); Map<String, String> spanStyleMap = styleStr2Map(style);
for (String key : spanStyleMap.keySet()) { for (String key : spanStyleMap.keySet()) {
switch (key.trim().toLowerCase()) { switch (key.trim().toLowerCase(Locale.ENGLISH)) {
case "text-decoration": case "text-decoration":
textStyle.setUnderscore(true); textStyle.setUnderscore(true);
break; break;
...@@ -716,7 +716,7 @@ public class DocxBuilder { ...@@ -716,7 +716,7 @@ public class DocxBuilder {
HpsMeasure measure = new HpsMeasure(); HpsMeasure measure = new HpsMeasure();
rpr.setSzCs(measure); rpr.setSzCs(measure);
rpr.setSz(measure); rpr.setSz(measure);
measure.setVal(BigInteger.valueOf((Long.parseLong(fontSize.toLowerCase().replaceAll("px", "")) - 4) * 2)); measure.setVal(BigInteger.valueOf((Long.parseLong(fontSize.toLowerCase(Locale.ENGLISH).replaceAll("px", "")) - 4) * 2));
// 加粗/斜体/下划线 // 加粗/斜体/下划线
if (this.bold) { if (this.bold) {
rpr.setB(new BooleanDefaultTrue()); rpr.setB(new BooleanDefaultTrue());
......
...@@ -8,6 +8,7 @@ import org.aspectj.lang.JoinPoint; ...@@ -8,6 +8,7 @@ import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.*; import org.aspectj.lang.annotation.*;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.util.ReflectionUtils;
import java.lang.annotation.Annotation; import java.lang.annotation.Annotation;
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
...@@ -49,7 +50,8 @@ public class EntityInsertAop { ...@@ -49,7 +50,8 @@ public class EntityInsertAop {
if (annotation != null) { if (annotation != null) {
//当前method就是我需要操作的method //当前method就是我需要操作的method
try { try {
method.setAccessible(true); // method.setAccessible(true);
ReflectionUtils.makeAccessible(method);
method.invoke(listenerBean, obj); method.invoke(listenerBean, obj);
} catch (IllegalAccessException e) { } catch (IllegalAccessException e) {
log.error("方法AOP前置处理权限不足"); log.error("方法AOP前置处理权限不足");
...@@ -86,7 +88,7 @@ public class EntityInsertAop { ...@@ -86,7 +88,7 @@ public class EntityInsertAop {
if (annotation != null) { if (annotation != null) {
//当前method就是我需要操作的method //当前method就是我需要操作的method
try { try {
method.setAccessible(true); ReflectionUtils.makeAccessible(method);
method.invoke(listenerBean, obj); method.invoke(listenerBean, obj);
} catch (IllegalAccessException e) { } catch (IllegalAccessException e) {
log.error("方法AOP前置处理权限不足"); log.error("方法AOP前置处理权限不足");
......
...@@ -91,7 +91,7 @@ public class AppMenuConfigController { ...@@ -91,7 +91,7 @@ public class AppMenuConfigController {
Class<? extends AppMenuConfig> aClass = appMenuConfig.getClass(); Class<? extends AppMenuConfig> aClass = appMenuConfig.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(appMenuConfig); Object o = field.get(appMenuConfig);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
......
...@@ -190,7 +190,7 @@ public class ReflectUtil { ...@@ -190,7 +190,7 @@ public class ReflectUtil {
public static void makeAccessible(Method method) { public static void makeAccessible(Method method) {
if ((!Modifier.isPublic(method.getModifiers()) || !Modifier.isPublic(method.getDeclaringClass().getModifiers())) if ((!Modifier.isPublic(method.getModifiers()) || !Modifier.isPublic(method.getDeclaringClass().getModifiers()))
&& !method.isAccessible()) { && !method.isAccessible()) {
method.setAccessible(true); ReflectionUtils.makeAccessible(method);
} }
} }
...@@ -200,7 +200,7 @@ public class ReflectUtil { ...@@ -200,7 +200,7 @@ public class ReflectUtil {
public static void makeAccessible(Field field) { public static void makeAccessible(Field field) {
if ((!Modifier.isPublic(field.getModifiers()) || !Modifier.isPublic(field.getDeclaringClass().getModifiers()) || Modifier if ((!Modifier.isPublic(field.getModifiers()) || !Modifier.isPublic(field.getDeclaringClass().getModifiers()) || Modifier
.isFinal(field.getModifiers())) && !field.isAccessible()) { .isFinal(field.getModifiers())) && !field.isAccessible()) {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
} }
} }
......
...@@ -28,7 +28,7 @@ public class TranslateUtil { ...@@ -28,7 +28,7 @@ public class TranslateUtil {
try { try {
Class<? extends BaseEntity> aClass = data.getClass(); Class<? extends BaseEntity> aClass = data.getClass();
Field field = aClass.getDeclaredField(keyName); Field field = aClass.getDeclaredField(keyName);
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object name = field.get(data); Object name = field.get(data);
if (name != null) { if (name != null) {
String tableName = aClass.getAnnotation(TableName.class).value(); String tableName = aClass.getAnnotation(TableName.class).value();
...@@ -56,7 +56,7 @@ public class TranslateUtil { ...@@ -56,7 +56,7 @@ public class TranslateUtil {
try { try {
Class<? extends BaseEntity> aClass = data.getClass(); Class<? extends BaseEntity> aClass = data.getClass();
Field field = aClass.getDeclaredField(keyName); Field field = aClass.getDeclaredField(keyName);
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object name = field.get(data); Object name = field.get(data);
if (name != null) { if (name != null) {
String tableName = aClass.getAnnotation(TableName.class).value(); String tableName = aClass.getAnnotation(TableName.class).value();
......
...@@ -123,7 +123,7 @@ ...@@ -123,7 +123,7 @@
// Class<? extends DataDictionary> aClass = dataDictionary.getClass(); // Class<? extends DataDictionary> aClass = dataDictionary.getClass();
// Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { // Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
// try { // try {
// field.setAccessible(true); // ReflectionUtils.makeAccessible(field);
// Object o = field.get(dataDictionary); // Object o = field.get(dataDictionary);
// if (o != null) { // if (o != null) {
// Class<?> type = field.getType(); // Class<?> type = field.getType();
......
...@@ -258,7 +258,7 @@ public class FireTeamController extends BaseController { ...@@ -258,7 +258,7 @@ public class FireTeamController extends BaseController {
Class<? extends FireTeam> aClass = fireTeam.getClass(); Class<? extends FireTeam> aClass = fireTeam.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(fireTeam); Object o = field.get(fireTeam);
if (o != null && !"serialVersionUID".equals(field)) { if (o != null && !"serialVersionUID".equals(field)) {
Class<?> type = field.getType(); Class<?> type = field.getType();
......
...@@ -107,7 +107,7 @@ public class FirefightersContactsController extends BaseController { ...@@ -107,7 +107,7 @@ public class FirefightersContactsController extends BaseController {
Class<? extends FirefightersContacts> aClass = firefightersContacts.getClass(); Class<? extends FirefightersContacts> aClass = firefightersContacts.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(firefightersContacts); Object o = field.get(firefightersContacts);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
......
...@@ -150,7 +150,7 @@ public class FirefightersContractController extends BaseController { ...@@ -150,7 +150,7 @@ public class FirefightersContractController extends BaseController {
Class<? extends FirefightersContract> aClass = firefightersContract.getClass(); Class<? extends FirefightersContract> aClass = firefightersContract.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(firefightersContract); Object o = field.get(firefightersContract);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
......
...@@ -107,7 +107,7 @@ public class FirefightersEducationController extends BaseController { ...@@ -107,7 +107,7 @@ public class FirefightersEducationController extends BaseController {
Class<? extends FirefightersEducation> aClass = firefightersEducation.getClass(); Class<? extends FirefightersEducation> aClass = firefightersEducation.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(firefightersEducation); Object o = field.get(firefightersEducation);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
......
...@@ -213,7 +213,7 @@ public class FirefightersPostController extends BaseController { ...@@ -213,7 +213,7 @@ public class FirefightersPostController extends BaseController {
Class<? extends FirefightersPost> aClass = firefightersPost.getClass(); Class<? extends FirefightersPost> aClass = firefightersPost.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(firefightersPost); Object o = field.get(firefightersPost);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
......
...@@ -166,7 +166,7 @@ public class FirefightersThoughtController extends BaseController { ...@@ -166,7 +166,7 @@ public class FirefightersThoughtController extends BaseController {
Class<? extends FirefightersThought> aClass = firefightersThought.getClass(); Class<? extends FirefightersThought> aClass = firefightersThought.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(firefightersThought); Object o = field.get(firefightersThought);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
......
...@@ -107,7 +107,7 @@ public class FirefightersWorkexperienceController extends BaseController { ...@@ -107,7 +107,7 @@ public class FirefightersWorkexperienceController extends BaseController {
Class<? extends FirefightersWorkexperience> aClass = firefightersWorkexperience.getClass(); Class<? extends FirefightersWorkexperience> aClass = firefightersWorkexperience.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(firefightersWorkexperience); Object o = field.get(firefightersWorkexperience);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
......
...@@ -115,7 +115,7 @@ public class OrgDepartmentController { ...@@ -115,7 +115,7 @@ public class OrgDepartmentController {
Class<? extends OrgUsr> aClass = orgUsr.getClass(); Class<? extends OrgUsr> aClass = orgUsr.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(orgUsr); Object o = field.get(orgUsr);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
......
...@@ -107,7 +107,7 @@ public class OrgUsrAuthController extends BaseController { ...@@ -107,7 +107,7 @@ public class OrgUsrAuthController extends BaseController {
Class<? extends OrgUsrAuth> aClass = orgUsrAuth.getClass(); Class<? extends OrgUsrAuth> aClass = orgUsrAuth.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(orgUsrAuth); Object o = field.get(orgUsrAuth);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
......
...@@ -319,7 +319,7 @@ public class OrgUsrController extends BaseController { ...@@ -319,7 +319,7 @@ public class OrgUsrController extends BaseController {
Class<? extends OrgUsr> aClass = orgUsr.getClass(); Class<? extends OrgUsr> aClass = orgUsr.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(orgUsr); Object o = field.get(orgUsr);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
...@@ -369,7 +369,7 @@ public class OrgUsrController extends BaseController { ...@@ -369,7 +369,7 @@ public class OrgUsrController extends BaseController {
Class<? extends OrgUsr> aClass = orgUsr.getClass(); Class<? extends OrgUsr> aClass = orgUsr.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(orgUsr); Object o = field.get(orgUsr);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
......
...@@ -251,7 +251,7 @@ public class MaintenanceCompanyServiceImpl ...@@ -251,7 +251,7 @@ public class MaintenanceCompanyServiceImpl
public List<Map<String, Object>> getAllMaintenanceList(String maintenanceType) { public List<Map<String, Object>> getAllMaintenanceList(String maintenanceType) {
List<Map<String, Object>> da=null; List<Map<String, Object>> da=null;
String type = null; String type = null;
switch (maintenanceType.toUpperCase()) { switch (maintenanceType.toUpperCase(Locale.ENGLISH)) {
case PERSON: case PERSON:
type = MAINTENANCE_PERSON; type = MAINTENANCE_PERSON;
break; break;
...@@ -418,7 +418,7 @@ public class MaintenanceCompanyServiceImpl ...@@ -418,7 +418,7 @@ public class MaintenanceCompanyServiceImpl
} }
int current = Integer.parseInt(paramsMap.get("current").toString()); int current = Integer.parseInt(paramsMap.get("current").toString());
int size = Integer.parseInt(paramsMap.get("size").toString()); int size = Integer.parseInt(paramsMap.get("size").toString());
String maintenanceType = paramsMap.get("maintenanceType").toString().toUpperCase(); String maintenanceType = paramsMap.get("maintenanceType").toString().toUpperCase(Locale.ENGLISH);
Map<String, String> filedParamsMap = Maps.newHashMap(); Map<String, String> filedParamsMap = Maps.newHashMap();
List<MaintenanceCompany> mainTableList; List<MaintenanceCompany> mainTableList;
......
...@@ -3057,7 +3057,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp ...@@ -3057,7 +3057,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
Field[] fields = peopleInfoDto.getFirefighters().getClass().getDeclaredFields(); Field[] fields = peopleInfoDto.getFirefighters().getClass().getDeclaredFields();
for (Field field : fields) { for (Field field : fields) {
try{ try{
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object value = field.get(peopleInfoDto.getFirefighters()); Object value = field.get(peopleInfoDto.getFirefighters());
String name = field.getName(); String name = field.getName();
map.put(name, value); map.put(name, value);
...@@ -3238,7 +3238,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp ...@@ -3238,7 +3238,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
Field[] fields = peopleBasicInfoDto.getClass().getDeclaredFields(); Field[] fields = peopleBasicInfoDto.getClass().getDeclaredFields();
for (Field field : fields) { for (Field field : fields) {
try{ try{
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
String name = field.getName(); String name = field.getName();
Object value = collect.get(name); Object value = collect.get(name);
String genericType = ((Class)field.getGenericType()).getSimpleName(); String genericType = ((Class)field.getGenericType()).getSimpleName();
...@@ -3319,7 +3319,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp ...@@ -3319,7 +3319,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
Field[] fields = peopleBasicInfoDto.getClass().getDeclaredFields(); Field[] fields = peopleBasicInfoDto.getClass().getDeclaredFields();
for (Field field : fields) { for (Field field : fields) {
try{ try{
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
String name = field.getName(); String name = field.getName();
Object value = collect.get(name); Object value = collect.get(name);
String genericType = ((Class)field.getGenericType()).getSimpleName(); String genericType = ((Class)field.getGenericType()).getSimpleName();
......
...@@ -98,7 +98,7 @@ public class DemoController extends BaseController { ...@@ -98,7 +98,7 @@ public class DemoController extends BaseController {
Class<? extends Demo> aClass = demo.getClass(); Class<? extends Demo> aClass = demo.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(demo); Object o = field.get(demo);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
......
...@@ -97,7 +97,7 @@ public class AlarmController { ...@@ -97,7 +97,7 @@ public class AlarmController {
Class<? extends Alarm> aClass = alarm.getClass(); Class<? extends Alarm> aClass = alarm.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(alarm); Object o = field.get(alarm);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
......
...@@ -100,7 +100,7 @@ public class CarConfController { ...@@ -100,7 +100,7 @@ public class CarConfController {
Class<? extends CarConf> aClass = carConf.getClass(); Class<? extends CarConf> aClass = carConf.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(carConf); Object o = field.get(carConf);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
......
...@@ -518,7 +518,7 @@ public class CarController extends AbstractBaseController { ...@@ -518,7 +518,7 @@ public class CarController extends AbstractBaseController {
Class<? extends Car> aClass = car.getClass(); Class<? extends Car> aClass = car.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(car); Object o = field.get(car);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
......
...@@ -100,7 +100,7 @@ public class CarInfoController { ...@@ -100,7 +100,7 @@ public class CarInfoController {
Class<? extends CarInfo> aClass = carInfo.getClass(); Class<? extends CarInfo> aClass = carInfo.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(carInfo); Object o = field.get(carInfo);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
......
...@@ -97,7 +97,7 @@ public class CarPropertyController { ...@@ -97,7 +97,7 @@ public class CarPropertyController {
Class<? extends CarProperty> aClass = carProperty.getClass(); Class<? extends CarProperty> aClass = carProperty.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(carProperty); Object o = field.get(carProperty);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
......
...@@ -100,7 +100,7 @@ public class DeviceServicingController { ...@@ -100,7 +100,7 @@ public class DeviceServicingController {
Class<? extends DeviceServicing> aClass = deviceServicing.getClass(); Class<? extends DeviceServicing> aClass = deviceServicing.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(deviceServicing); Object o = field.get(deviceServicing);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
......
...@@ -100,7 +100,7 @@ public class EquPropertyController { ...@@ -100,7 +100,7 @@ public class EquPropertyController {
Class<? extends EquProperty> aClass = equProperty.getClass(); Class<? extends EquProperty> aClass = equProperty.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(equProperty); Object o = field.get(equProperty);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
......
...@@ -222,7 +222,7 @@ public class EquipmentCategoryController extends AbstractBaseController { ...@@ -222,7 +222,7 @@ public class EquipmentCategoryController extends AbstractBaseController {
Class<? extends EquipmentCategory> aClass = equipmentCategory.getClass(); Class<? extends EquipmentCategory> aClass = equipmentCategory.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(equipmentCategory); Object o = field.get(equipmentCategory);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
......
...@@ -435,7 +435,7 @@ public class EquipmentDetailController extends AbstractBaseController { ...@@ -435,7 +435,7 @@ public class EquipmentDetailController extends AbstractBaseController {
Class<? extends EquipmentDetail> aClass = equipmentDetail.getClass(); Class<? extends EquipmentDetail> aClass = equipmentDetail.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(equipmentDetail); Object o = field.get(equipmentDetail);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
......
...@@ -125,7 +125,7 @@ public class EquipmentOnCarController { ...@@ -125,7 +125,7 @@ public class EquipmentOnCarController {
Class<? extends EquipmentOnCar> aClass = equipmentOnCar.getClass(); Class<? extends EquipmentOnCar> aClass = equipmentOnCar.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(equipmentOnCar); Object o = field.get(equipmentOnCar);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
......
...@@ -57,7 +57,7 @@ public class EquipmentPointController extends AbstractBaseController{ ...@@ -57,7 +57,7 @@ public class EquipmentPointController extends AbstractBaseController{
Class<? extends EquipmentPoint> aClass = equipmentPoint.getClass(); Class<? extends EquipmentPoint> aClass = equipmentPoint.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(equipmentPoint); Object o = field.get(equipmentPoint);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
......
...@@ -97,7 +97,7 @@ public class EquipmentQrcodeController { ...@@ -97,7 +97,7 @@ public class EquipmentQrcodeController {
Class<? extends EquipmentQrcode> aClass = equipmentQrcode.getClass(); Class<? extends EquipmentQrcode> aClass = equipmentQrcode.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(equipmentQrcode); Object o = field.get(equipmentQrcode);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
......
...@@ -100,7 +100,7 @@ public class EquipmentStandardRelationsController { ...@@ -100,7 +100,7 @@ public class EquipmentStandardRelationsController {
Class<? extends EquipmentStandardRelations> aClass = equipmentStandardRelations.getClass(); Class<? extends EquipmentStandardRelations> aClass = equipmentStandardRelations.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(equipmentStandardRelations); Object o = field.get(equipmentStandardRelations);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
......
...@@ -100,7 +100,7 @@ public class EquipmentStandardWarningController { ...@@ -100,7 +100,7 @@ public class EquipmentStandardWarningController {
Class<? extends EquipmentStandardWarning> aClass = equipmentStandardWarning.getClass(); Class<? extends EquipmentStandardWarning> aClass = equipmentStandardWarning.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(equipmentStandardWarning); Object o = field.get(equipmentStandardWarning);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
......
...@@ -100,7 +100,7 @@ public class ExtinguishantOnCarController { ...@@ -100,7 +100,7 @@ public class ExtinguishantOnCarController {
Class<? extends ExtinguishantOnCar> aClass = extinguishantOnCar.getClass(); Class<? extends ExtinguishantOnCar> aClass = extinguishantOnCar.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(extinguishantOnCar); Object o = field.get(extinguishantOnCar);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
......
...@@ -100,7 +100,7 @@ public class JournalController { ...@@ -100,7 +100,7 @@ public class JournalController {
Class<? extends Journal> aClass = journal.getClass(); Class<? extends Journal> aClass = journal.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(journal); Object o = field.get(journal);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
......
...@@ -100,7 +100,7 @@ public class LochusEquipmentController { ...@@ -100,7 +100,7 @@ public class LochusEquipmentController {
Class<? extends LochusEquipment> aClass = lochusEquipment.getClass(); Class<? extends LochusEquipment> aClass = lochusEquipment.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(lochusEquipment); Object o = field.get(lochusEquipment);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
......
...@@ -100,7 +100,7 @@ public class LochusStandardController { ...@@ -100,7 +100,7 @@ public class LochusStandardController {
Class<? extends LochusStandard> aClass = lochusStandard.getClass(); Class<? extends LochusStandard> aClass = lochusStandard.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(lochusStandard); Object o = field.get(lochusStandard);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
......
...@@ -105,7 +105,7 @@ public class MaintainController extends AbstractBaseController { ...@@ -105,7 +105,7 @@ public class MaintainController extends AbstractBaseController {
Class<? extends Maintain> aClass = maintain.getClass(); Class<? extends Maintain> aClass = maintain.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(maintain); Object o = field.get(maintain);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
......
...@@ -102,7 +102,7 @@ public class MaintainDetailController { ...@@ -102,7 +102,7 @@ public class MaintainDetailController {
Class<? extends MaintainDetail> aClass = maintainDetail.getClass(); Class<? extends MaintainDetail> aClass = maintainDetail.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(maintainDetail); Object o = field.get(maintainDetail);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
......
...@@ -100,7 +100,7 @@ public class MaintainResultController { ...@@ -100,7 +100,7 @@ public class MaintainResultController {
Class<? extends MaintainResult> aClass = maintainResult.getClass(); Class<? extends MaintainResult> aClass = maintainResult.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(maintainResult); Object o = field.get(maintainResult);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
......
...@@ -100,7 +100,7 @@ public class MaintainWithinSevenDaysController { ...@@ -100,7 +100,7 @@ public class MaintainWithinSevenDaysController {
Class<? extends MaintainWithinSevenDays> aClass = maintainWithinSevenDays.getClass(); Class<? extends MaintainWithinSevenDays> aClass = maintainWithinSevenDays.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(maintainWithinSevenDays); Object o = field.get(maintainWithinSevenDays);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
......
...@@ -148,7 +148,7 @@ public class MaintenanceResourceDataController extends AbstractBaseController { ...@@ -148,7 +148,7 @@ public class MaintenanceResourceDataController extends AbstractBaseController {
Class<? extends MaintenanceResourceData> aClass = data.getClass(); Class<? extends MaintenanceResourceData> aClass = data.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(data); Object o = field.get(data);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
......
...@@ -100,7 +100,7 @@ public class MaintianQueryController { ...@@ -100,7 +100,7 @@ public class MaintianQueryController {
Class<? extends MaintianQuery> aClass = maintianQuery.getClass(); Class<? extends MaintianQuery> aClass = maintianQuery.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(maintianQuery); Object o = field.get(maintianQuery);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
......
...@@ -168,7 +168,7 @@ public class ManufacturerInfoController { ...@@ -168,7 +168,7 @@ public class ManufacturerInfoController {
Class<? extends ManufacturerInfo> aClass = manufacturerInfo.getClass(); Class<? extends ManufacturerInfo> aClass = manufacturerInfo.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(manufacturerInfo); Object o = field.get(manufacturerInfo);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
......
...@@ -100,7 +100,7 @@ public class NoticeController { ...@@ -100,7 +100,7 @@ public class NoticeController {
Class<? extends Notice> aClass = notice.getClass(); Class<? extends Notice> aClass = notice.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(notice); Object o = field.get(notice);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
......
...@@ -103,7 +103,7 @@ public class RepairController extends AbstractBaseController { ...@@ -103,7 +103,7 @@ public class RepairController extends AbstractBaseController {
Class<? extends Repair> aClass = repair.getClass(); Class<? extends Repair> aClass = repair.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(repair); Object o = field.get(repair);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
......
...@@ -102,7 +102,7 @@ public class RepairDetailController { ...@@ -102,7 +102,7 @@ public class RepairDetailController {
Class<? extends RepairDetail> aClass = repairDetail.getClass(); Class<? extends RepairDetail> aClass = repairDetail.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(repairDetail); Object o = field.get(repairDetail);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
......
...@@ -105,7 +105,7 @@ public class ScrapController extends AbstractBaseController { ...@@ -105,7 +105,7 @@ public class ScrapController extends AbstractBaseController {
Class<? extends Scrap> aClass = scrap.getClass(); Class<? extends Scrap> aClass = scrap.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(scrap); Object o = field.get(scrap);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
......
...@@ -99,7 +99,7 @@ public class ScrapDetailController { ...@@ -99,7 +99,7 @@ public class ScrapDetailController {
Class<? extends ScrapDetail> aClass = scrapDetail.getClass(); Class<? extends ScrapDetail> aClass = scrapDetail.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(scrapDetail); Object o = field.get(scrapDetail);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
......
...@@ -100,7 +100,7 @@ public class StockBillDetailController { ...@@ -100,7 +100,7 @@ public class StockBillDetailController {
Class<? extends StockBillDetail> aClass = stockBillDetail.getClass(); Class<? extends StockBillDetail> aClass = stockBillDetail.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(stockBillDetail); Object o = field.get(stockBillDetail);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
......
...@@ -102,7 +102,7 @@ public class StockController extends AbstractBaseController { ...@@ -102,7 +102,7 @@ public class StockController extends AbstractBaseController {
Class<? extends Stock> aClass = stock.getClass(); Class<? extends Stock> aClass = stock.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(stock); Object o = field.get(stock);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
......
...@@ -102,7 +102,7 @@ public class StockDetailController { ...@@ -102,7 +102,7 @@ public class StockDetailController {
Class<? extends StockDetail> aClass = stockDetail.getClass(); Class<? extends StockDetail> aClass = stockDetail.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(stockDetail); Object o = field.get(stockDetail);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
......
...@@ -100,7 +100,7 @@ public class StockWarningRuleController { ...@@ -100,7 +100,7 @@ public class StockWarningRuleController {
Class<? extends StockWarningRule> aClass = stockWarningRule.getClass(); Class<? extends StockWarningRule> aClass = stockWarningRule.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(stockWarningRule); Object o = field.get(stockWarningRule);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
......
...@@ -111,7 +111,7 @@ public class SystemDicController { ...@@ -111,7 +111,7 @@ public class SystemDicController {
Class<? extends SystemDic> aClass = systemDic.getClass(); Class<? extends SystemDic> aClass = systemDic.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(systemDic); Object o = field.get(systemDic);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
......
...@@ -155,7 +155,7 @@ public class UnitController { ...@@ -155,7 +155,7 @@ public class UnitController {
Class<? extends Unit> aClass = unit.getClass(); Class<? extends Unit> aClass = unit.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(unit); Object o = field.get(unit);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
......
...@@ -100,7 +100,7 @@ public class UploadFileController { ...@@ -100,7 +100,7 @@ public class UploadFileController {
Class<? extends UploadFile> aClass = uploadFile.getClass(); Class<? extends UploadFile> aClass = uploadFile.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(uploadFile); Object o = field.get(uploadFile);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
......
...@@ -638,7 +638,7 @@ public class UserController extends AbstractBaseController { ...@@ -638,7 +638,7 @@ public class UserController extends AbstractBaseController {
if (obj != null) { if (obj != null) {
Class<?> clazz = obj.getClass(); Class<?> clazz = obj.getClass();
for (Field field : clazz.getDeclaredFields()) { for (Field field : clazz.getDeclaredFields()) {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
String fieldName = field.getName(); String fieldName = field.getName();
Object value = nvl(field.get(obj)); Object value = nvl(field.get(obj));
......
...@@ -171,7 +171,7 @@ public class WarehouseController extends AbstractBaseController { ...@@ -171,7 +171,7 @@ public class WarehouseController extends AbstractBaseController {
Class<? extends Warehouse> aClass = warehouse.getClass(); Class<? extends Warehouse> aClass = warehouse.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(warehouse); Object o = field.get(warehouse);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
......
...@@ -109,7 +109,7 @@ public class WarehouseStructureController extends AbstractBaseController { ...@@ -109,7 +109,7 @@ public class WarehouseStructureController extends AbstractBaseController {
Class<? extends WarehouseStructure> aClass = warehouseStructure.getClass(); Class<? extends WarehouseStructure> aClass = warehouseStructure.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(warehouseStructure); Object o = field.get(warehouseStructure);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
......
...@@ -100,7 +100,7 @@ public class WastageBillController { ...@@ -100,7 +100,7 @@ public class WastageBillController {
Class<? extends WastageBill> aClass = wastageBill.getClass(); Class<? extends WastageBill> aClass = wastageBill.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(wastageBill); Object o = field.get(wastageBill);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
......
...@@ -100,7 +100,7 @@ public class WastageBillDetailController { ...@@ -100,7 +100,7 @@ public class WastageBillDetailController {
Class<? extends WastageBillDetail> aClass = wastageBillDetail.getClass(); Class<? extends WastageBillDetail> aClass = wastageBillDetail.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(wastageBillDetail); Object o = field.get(wastageBillDetail);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
......
...@@ -106,7 +106,7 @@ public class WlCarMileageController { ...@@ -106,7 +106,7 @@ public class WlCarMileageController {
Class<? extends WlCarMileage> aClass = wlCarMileage.getClass(); Class<? extends WlCarMileage> aClass = wlCarMileage.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(wlCarMileage); Object o = field.get(wlCarMileage);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
......
...@@ -483,7 +483,7 @@ public class EquipmentDetailServiceImpl extends ServiceImpl<EquipmentDetailMappe ...@@ -483,7 +483,7 @@ public class EquipmentDetailServiceImpl extends ServiceImpl<EquipmentDetailMappe
private String handleIndexValue(Object indexValue) { private String handleIndexValue(Object indexValue) {
if (!ObjectUtils.isEmpty(indexValue)) { if (!ObjectUtils.isEmpty(indexValue)) {
String val = String.valueOf(indexValue).toUpperCase(); String val = String.valueOf(indexValue).toUpperCase(Locale.ENGLISH);
switch (val) { switch (val) {
case "TRUE": case "TRUE":
return "是"; return "是";
......
...@@ -838,7 +838,7 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste ...@@ -838,7 +838,7 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
map.put("color", ""); map.put("color", "");
return map; return map;
} }
if (StringUtil.isNotEmpty(indexVo.getIndexValue()) && TrueOrFalseEnum.real.value.toUpperCase().equals(indexVo.getIndexValue().toUpperCase())) { if (StringUtil.isNotEmpty(indexVo.getIndexValue()) && TrueOrFalseEnum.real.value.equalsIgnoreCase(indexVo.getIndexValue())) {
map.put("runStatus", indexVo.getIndexName()); map.put("runStatus", indexVo.getIndexName());
map.put("color", indexVo.getColor()); map.put("color", indexVo.getColor());
return map; return map;
......
...@@ -263,7 +263,7 @@ public class PressurePumpServiceImpl implements IPressurePumpService { ...@@ -263,7 +263,7 @@ public class PressurePumpServiceImpl implements IPressurePumpService {
continue; continue;
} }
// (此处如果不设置 无法获取对象的私有属性) // (此处如果不设置 无法获取对象的私有属性)
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
if ("key".equals(field.getName())) { if ("key".equals(field.getName())) {
field.set(o, indexKey); field.set(o, indexKey);
} else if ("value".equals(field.getName())) { } else if ("value".equals(field.getName())) {
......
...@@ -20,10 +20,7 @@ import java.io.OutputStream; ...@@ -20,10 +20,7 @@ import java.io.OutputStream;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.net.URLEncoder; import java.net.URLEncoder;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.util.ArrayList; import java.util.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class ExcelUtil { public class ExcelUtil {
...@@ -154,7 +151,7 @@ public class ExcelUtil { ...@@ -154,7 +151,7 @@ public class ExcelUtil {
if (fileName == null) { if (fileName == null) {
throw new Exception("文件不存在!"); throw new Exception("文件不存在!");
} }
if (!fileName.toLowerCase().endsWith(ExcelTypeEnum.XLS.getValue()) && !fileName.toLowerCase().endsWith(ExcelTypeEnum.XLSX.getValue())) { if (!fileName.toLowerCase(Locale.ENGLISH).endsWith(ExcelTypeEnum.XLS.getValue()) && !fileName.toLowerCase(Locale.ENGLISH).endsWith(ExcelTypeEnum.XLSX.getValue())) {
throw new Exception("文件类型异常!"); throw new Exception("文件类型异常!");
} }
InputStream inputStream; InputStream inputStream;
......
...@@ -59,7 +59,7 @@ public class ReflectUtil ...@@ -59,7 +59,7 @@ public class ReflectUtil
Method method = clazz.getDeclaredMethod(methodname, ftype); // 获取定义的方法 Method method = clazz.getDeclaredMethod(methodname, ftype); // 获取定义的方法
if (!Modifier.isPublic(method.getModifiers())) if (!Modifier.isPublic(method.getModifiers()))
{ // 设置非共有方法权限 { // 设置非共有方法权限
method.setAccessible(true); ReflectionUtils.makeAccessible(method);
} }
method.invoke(target, fvalue); // 执行方法回调 method.invoke(target, fvalue); // 执行方法回调
} }
...@@ -70,7 +70,7 @@ public class ReflectUtil ...@@ -70,7 +70,7 @@ public class ReflectUtil
Field field = clazz.getDeclaredField(fname); // 获取定义的类属性 Field field = clazz.getDeclaredField(fname); // 获取定义的类属性
if (!Modifier.isPublic(field.getModifiers())) if (!Modifier.isPublic(field.getModifiers()))
{ // 设置非共有类属性权限 { // 设置非共有类属性权限
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
} }
field.set(target, fvalue); // 设置类属性值 field.set(target, fvalue); // 设置类属性值
...@@ -115,7 +115,7 @@ public class ReflectUtil ...@@ -115,7 +115,7 @@ public class ReflectUtil
Method method = clazz.getDeclaredMethod(methodname); // 获取定义的方法 Method method = clazz.getDeclaredMethod(methodname); // 获取定义的方法
if (!Modifier.isPublic(method.getModifiers())) if (!Modifier.isPublic(method.getModifiers()))
{ // 设置非共有方法权限 { // 设置非共有方法权限
method.setAccessible(true); ReflectionUtils.makeAccessible(method);
} }
return method.invoke(target); // 方法回调,返回值 return method.invoke(target); // 方法回调,返回值
} }
...@@ -130,7 +130,7 @@ public class ReflectUtil ...@@ -130,7 +130,7 @@ public class ReflectUtil
Field field = clazz.getDeclaredField(fname); // 获取定义的类属性 Field field = clazz.getDeclaredField(fname); // 获取定义的类属性
if (!Modifier.isPublic(field.getModifiers())) if (!Modifier.isPublic(field.getModifiers()))
{ // 设置非共有类属性权限 { // 设置非共有类属性权限
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
} }
return field.get(target);// 返回类属性值 return field.get(target);// 返回类属性值
} }
......
...@@ -13,19 +13,7 @@ import java.text.ParseException; ...@@ -13,19 +13,7 @@ import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.time.ZoneOffset; import java.time.ZoneOffset;
import java.util.ArrayList; import java.util.*;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import java.util.function.BiConsumer; import java.util.function.BiConsumer;
import java.util.function.Consumer; import java.util.function.Consumer;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -1040,7 +1028,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al ...@@ -1040,7 +1028,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
String filePath = ""; String filePath = "";
String fileName = ""; String fileName = "";
if(os.toLowerCase().startsWith("win")) { if(os.toLowerCase(Locale.ENGLISH).startsWith("win")) {
filePath = this.getClass().getClassLoader().getResource("templates").getPath(); filePath = this.getClass().getClassLoader().getResource("templates").getPath();
fileName = filePath + "/" + System.currentTimeMillis() + ".docx"; fileName = filePath + "/" + System.currentTimeMillis() + ".docx";
} else { } else {
...@@ -1100,7 +1088,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al ...@@ -1100,7 +1088,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
//拼接完整连接 //拼接完整连接
String pa1 = ""; String pa1 = "";
if(os.toLowerCase().startsWith("win")){ if(os.toLowerCase(Locale.ENGLISH).startsWith("win")){
String pa = fileName.substring(1); String pa = fileName.substring(1);
document.loadFromFile(pa); document.loadFromFile(pa);
newFileName = System.currentTimeMillis()+".doc"; newFileName = System.currentTimeMillis()+".doc";
......
...@@ -42,6 +42,7 @@ import org.springframework.transaction.annotation.Transactional; ...@@ -42,6 +42,7 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.support.TransactionSynchronization; import org.springframework.transaction.support.TransactionSynchronization;
import org.springframework.transaction.support.TransactionSynchronizationManager; import org.springframework.transaction.support.TransactionSynchronizationManager;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import org.springframework.util.ReflectionUtils;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader; import org.springframework.web.bind.annotation.RequestHeader;
...@@ -823,7 +824,7 @@ public class ExcelServiceImpl { ...@@ -823,7 +824,7 @@ public class ExcelServiceImpl {
Field[] fields = orgUsrExcelDto.getClass().getDeclaredFields(); Field[] fields = orgUsrExcelDto.getClass().getDeclaredFields();
for (Field field : fields) { for (Field field : fields) {
try{ try{
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object value = field.get(orgUsrExcelDto); Object value = field.get(orgUsrExcelDto);
String name = field.getName(); String name = field.getName();
// 解析注解信息 // 解析注解信息
...@@ -1206,7 +1207,7 @@ private void saveuser(OrgUsrTPDlExcelDto orgUsrExcelDto,Set<String> set,String a ...@@ -1206,7 +1207,7 @@ private void saveuser(OrgUsrTPDlExcelDto orgUsrExcelDto,Set<String> set,String a
Field[] fields = orgUsrExcelDto.getClass().getDeclaredFields(); Field[] fields = orgUsrExcelDto.getClass().getDeclaredFields();
for (Field field : fields) { for (Field field : fields) {
try{ try{
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object value = field.get(orgUsrExcelDto); Object value = field.get(orgUsrExcelDto);
String name = field.getName(); String name = field.getName();
// 解析注解信息 // 解析注解信息
...@@ -2116,8 +2117,8 @@ private void saveuser(OrgUsrTPDlExcelDto orgUsrExcelDto,Set<String> set,String a ...@@ -2116,8 +2117,8 @@ private void saveuser(OrgUsrTPDlExcelDto orgUsrExcelDto,Set<String> set,String a
if (fileName == null) { if (fileName == null) {
throw new BadRequest("文件不存在!"); throw new BadRequest("文件不存在!");
} }
if (!fileName.toLowerCase().endsWith(ExcelTypeEnum.XLS.getValue()) if (!fileName.toLowerCase(Locale.ENGLISH).endsWith(ExcelTypeEnum.XLS.getValue())
&& !fileName.toLowerCase().endsWith(ExcelTypeEnum.XLSX.getValue())) { && !fileName.toLowerCase(Locale.ENGLISH).endsWith(ExcelTypeEnum.XLSX.getValue())) {
throw new BadRequest("文件类型异常!"); throw new BadRequest("文件类型异常!");
} }
InputStream input = multipartFile.getInputStream(); InputStream input = multipartFile.getInputStream();
...@@ -2208,8 +2209,8 @@ private void saveuser(OrgUsrTPDlExcelDto orgUsrExcelDto,Set<String> set,String a ...@@ -2208,8 +2209,8 @@ private void saveuser(OrgUsrTPDlExcelDto orgUsrExcelDto,Set<String> set,String a
if (fileName == null) { if (fileName == null) {
throw new BadRequest("文件不存在!"); throw new BadRequest("文件不存在!");
} }
if (!fileName.toLowerCase().endsWith(ExcelTypeEnum.XLS.getValue()) if (!fileName.toLowerCase(Locale.ENGLISH).endsWith(ExcelTypeEnum.XLS.getValue())
&& !fileName.toLowerCase().endsWith(ExcelTypeEnum.XLSX.getValue())) { && !fileName.toLowerCase(Locale.ENGLISH).endsWith(ExcelTypeEnum.XLSX.getValue())) {
throw new BadRequest("文件类型异常!"); throw new BadRequest("文件类型异常!");
} }
List<OrgUsrSafeReportExcelDto> excelDtoList = ExcelUtil.readFirstSheetExcel(multipartFile, List<OrgUsrSafeReportExcelDto> excelDtoList = ExcelUtil.readFirstSheetExcel(multipartFile,
......
...@@ -140,7 +140,7 @@ public class TaskController extends AbstractBaseController{ ...@@ -140,7 +140,7 @@ public class TaskController extends AbstractBaseController{
if(obj!=null){ if(obj!=null){
Class<?> clazz = obj.getClass(); Class<?> clazz = obj.getClass();
for (Field field : ClazzFieldUtil.getAllFields(obj)) { for (Field field : ClazzFieldUtil.getAllFields(obj)) {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
String fieldName = field.getName(); String fieldName = field.getName();
Object value = nvl(field.get(obj)); Object value = nvl(field.get(obj));
if("executorId".equals(fieldName)){ if("executorId".equals(fieldName)){
...@@ -871,7 +871,7 @@ public class TaskController extends AbstractBaseController{ ...@@ -871,7 +871,7 @@ public class TaskController extends AbstractBaseController{
Map<String, Object> map = new HashMap<String,Object>(); Map<String, Object> map = new HashMap<String,Object>();
if(obj!=null){ if(obj!=null){
for (Field field : ClazzFieldUtil.getAllFields(obj)) { for (Field field : ClazzFieldUtil.getAllFields(obj)) {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
String fieldName = field.getName(); String fieldName = field.getName();
Object value = nvl(field.get(obj)); Object value = nvl(field.get(obj));
if("userId".equals(fieldName)){ if("userId".equals(fieldName)){
......
...@@ -270,7 +270,7 @@ public abstract class AbstractBaseController extends BaseController{ ...@@ -270,7 +270,7 @@ public abstract class AbstractBaseController extends BaseController{
criteria.setPropertyName(query.getName()); criteria.setPropertyName(query.getName());
String column = criteria.getPropertyName(); String column = criteria.getPropertyName();
if (!(query.getValue() instanceof Collection<?>) if (!(query.getValue() instanceof Collection<?>)
&& column.substring(column.length() - 2, column.length()).toUpperCase().equals("ID")) { && column.substring(column.length() - 2, column.length()).equalsIgnoreCase("ID")) {
criteria.setValue(Long.valueOf(query.getValue().toString())); criteria.setValue(Long.valueOf(query.getValue().toString()));
} else { } else {
criteria.setValue(query.getValue()); criteria.setValue(query.getValue());
...@@ -296,10 +296,10 @@ public abstract class AbstractBaseController extends BaseController{ ...@@ -296,10 +296,10 @@ public abstract class AbstractBaseController extends BaseController{
} }
} }
if (flag) { if (flag) {
if (XJConstant.ROLE_NAME_SUPERADMIN.equals(roleTypeName.toUpperCase()) if (XJConstant.ROLE_NAME_SUPERADMIN.equalsIgnoreCase(roleTypeName)
|| XJConstant.ROLE_NAME_ADMIN.equals(roleTypeName.toUpperCase())) { || XJConstant.ROLE_NAME_ADMIN.equalsIgnoreCase(roleTypeName)) {
daoCriterias = buildOrgDaoCriteriaInChildren(daoCriterias, orgCode); daoCriterias = buildOrgDaoCriteriaInChildren(daoCriterias, orgCode);
} else if (XJConstant.ROLE_NAME_PERSON.equals(roleTypeName.toUpperCase())) { } else if (XJConstant.ROLE_NAME_PERSON.equalsIgnoreCase(roleTypeName)) {
DaoCriteria compDaoCriteria = new DaoCriteria(); DaoCriteria compDaoCriteria = new DaoCriteria();
compDaoCriteria.setPropertyName("userId"); compDaoCriteria.setPropertyName("userId");
compDaoCriteria.setOperator(QueryOperatorEnum.EQUAL.getName()); compDaoCriteria.setOperator(QueryOperatorEnum.EQUAL.getName());
...@@ -326,7 +326,7 @@ public abstract class AbstractBaseController extends BaseController{ ...@@ -326,7 +326,7 @@ public abstract class AbstractBaseController extends BaseController{
// criteria.setPropertyName(query.getName()); // criteria.setPropertyName(query.getName());
// String column = criteria.getPropertyName(); // String column = criteria.getPropertyName();
// if (!(query.getValue() instanceof Collection<?>) // if (!(query.getValue() instanceof Collection<?>)
// && column.substring(column.length() - 2, column.length()).toUpperCase().equals("ID")) { // && column.substring(column.length() - 2, column.length()).equalsIgnoreCase("ID")) {
// criteria.setValue(Long.valueOf(query.getValue().toString())); // criteria.setValue(Long.valueOf(query.getValue().toString()));
// } else { // } else {
// criteria.setValue(query.getValue()); // criteria.setValue(query.getValue());
...@@ -357,14 +357,14 @@ public abstract class AbstractBaseController extends BaseController{ ...@@ -357,14 +357,14 @@ public abstract class AbstractBaseController extends BaseController{
// throw new YeeException("非法请求"); // throw new YeeException("非法请求");
// } // }
// String roleTypeName = param.getRole().getRoleName(); // String roleTypeName = param.getRole().getRoleName();
// if (XJConstant.ROLE_NAME_SUPERADMIN.equals(roleTypeName) // if (XJConstant.ROLE_NAME_SUPERADMIN.equalsIgnoreCase(roleTypeName)
// || XJConstant.ROLE_NAME_ADMIN.equals(roleTypeName)) { // || XJConstant.ROLE_NAME_ADMIN.equalsIgnoreCase(roleTypeName)) {
// orgCode = param.getCompany().getOrgCode(); // orgCode = param.getCompany().getOrgCode();
// daoCriterias = buildOrgDaoCriteriaInChildren(daoCriterias, orgCode); // daoCriterias = buildOrgDaoCriteriaInChildren(daoCriterias, orgCode);
// } else if (XJConstant.ROLE_NAME_DEPTADMIN.equals(roleTypeName)) { // } else if (XJConstant.ROLE_NAME_DEPTADMIN.equalsIgnoreCase(roleTypeName)) {
// orgCode = param.getUserOrgCode(); // orgCode = param.getUserOrgCode();
// daoCriterias = buildOrgDaoCriteriaOutChildren(daoCriterias, orgCode); // daoCriterias = buildOrgDaoCriteriaOutChildren(daoCriterias, orgCode);
// } else if (XJConstant.ROLE_NAME_PERSON.equals(roleTypeName)) { // } else if (XJConstant.ROLE_NAME_PERSON.equalsIgnoreCase(roleTypeName)) {
// DaoCriteria compDaoCriteria = new DaoCriteria(); // DaoCriteria compDaoCriteria = new DaoCriteria();
// compDaoCriteria.setPropertyName("userId"); // compDaoCriteria.setPropertyName("userId");
// compDaoCriteria.setOperator(QueryOperatorEnum.EQUAL.getName()); // compDaoCriteria.setOperator(QueryOperatorEnum.EQUAL.getName());
...@@ -402,13 +402,13 @@ public abstract class AbstractBaseController extends BaseController{ ...@@ -402,13 +402,13 @@ public abstract class AbstractBaseController extends BaseController{
*/ */
public HashMap<String, Object> buildMybatisDaoCriterias(String orgCode, String roleTypeName) { public HashMap<String, Object> buildMybatisDaoCriterias(String orgCode, String roleTypeName) {
HashMap<String, Object> paramMap = new HashMap<>(); HashMap<String, Object> paramMap = new HashMap<>();
if (XJConstant.ROLE_NAME_SUPERADMIN.equals(roleTypeName.toUpperCase()) || XJConstant.ROLE_NAME_ADMIN.equals(roleTypeName.toUpperCase())) { if (XJConstant.ROLE_NAME_SUPERADMIN.equalsIgnoreCase(roleTypeName) || XJConstant.ROLE_NAME_ADMIN.equalsIgnoreCase(roleTypeName)) {
paramMap.put("orgCode", orgCode + "%"); paramMap.put("orgCode", orgCode + "%");
paramMap.put("roleFlag", XJConstant.ADMIN_FLAG); paramMap.put("roleFlag", XJConstant.ADMIN_FLAG);
} else if (XJConstant.ROLE_NAME_DEPTADMIN.equals(roleTypeName.toUpperCase())) { } else if (XJConstant.ROLE_NAME_DEPTADMIN.equalsIgnoreCase(roleTypeName)) {
paramMap.put("orgCode", orgCode + "%"); paramMap.put("orgCode", orgCode + "%");
paramMap.put("roleFlag", XJConstant.DEPART_FLAG); paramMap.put("roleFlag", XJConstant.DEPART_FLAG);
} else if (XJConstant.ROLE_NAME_PERSON.equals(roleTypeName.toUpperCase())) { } else if (XJConstant.ROLE_NAME_PERSON.equalsIgnoreCase(roleTypeName)) {
paramMap.put("userId", getUserId()); paramMap.put("userId", getUserId());
paramMap.put("roleFlag", XJConstant.PERSON_FLAG); paramMap.put("roleFlag", XJConstant.PERSON_FLAG);
} }
...@@ -423,15 +423,15 @@ public abstract class AbstractBaseController extends BaseController{ ...@@ -423,15 +423,15 @@ public abstract class AbstractBaseController extends BaseController{
// HashMap<String, Object> paramMap = new HashMap<String, Object>(); // HashMap<String, Object> paramMap = new HashMap<String, Object>();
// String roleTypeName = param.getRoleTypeName(); // String roleTypeName = param.getRoleTypeName();
// //
// if (XJConstant.ROLE_NAME_SUPERADMIN.equals(roleTypeName) || XJConstant.ROLE_NAME_ADMIN.equals(roleTypeName)) { // if (XJConstant.ROLE_NAME_SUPERADMIN.equalsIgnoreCase(roleTypeName) || XJConstant.ROLE_NAME_ADMIN.equalsIgnoreCase(roleTypeName)) {
// orgCode = param.getLoginOrgCode(); // orgCode = param.getLoginOrgCode();
// paramMap.put("orgCode", orgCode + "%"); // paramMap.put("orgCode", orgCode + "%");
// paramMap.put("roleFlag", XJConstant.ADMIN_FLAG); // paramMap.put("roleFlag", XJConstant.ADMIN_FLAG);
// } else if (XJConstant.ROLE_NAME_DEPTADMIN.equals(roleTypeName)) { // } else if (XJConstant.ROLE_NAME_DEPTADMIN.equalsIgnoreCase(roleTypeName)) {
// orgCode = param.getUserOrgCode(); // orgCode = param.getUserOrgCode();
// paramMap.put("orgCode", orgCode + "%"); // paramMap.put("orgCode", orgCode + "%");
// paramMap.put("roleFlag", XJConstant.DEPART_FLAG); // paramMap.put("roleFlag", XJConstant.DEPART_FLAG);
// } else if (XJConstant.ROLE_NAME_PERSON.equals(roleTypeName)) { // } else if (XJConstant.ROLE_NAME_PERSON.equalsIgnoreCase(roleTypeName)) {
// paramMap.put("userId", param.getUserId()); // paramMap.put("userId", param.getUserId());
// paramMap.put("roleFlag", XJConstant.PERSON_FLAG); // paramMap.put("roleFlag", XJConstant.PERSON_FLAG);
// } // }
...@@ -441,13 +441,13 @@ public abstract class AbstractBaseController extends BaseController{ ...@@ -441,13 +441,13 @@ public abstract class AbstractBaseController extends BaseController{
public HashMap<String, Object> buildMybatisCriterias(String orgCode, String roleTypeName) { public HashMap<String, Object> buildMybatisCriterias(String orgCode, String roleTypeName) {
HashMap<String, Object> paramMap = new HashMap<>(); HashMap<String, Object> paramMap = new HashMap<>();
if(StringUtil.isNotEmpty(roleTypeName)){ if(StringUtil.isNotEmpty(roleTypeName)){
if (XJConstant.ROLE_NAME_SUPERADMIN.equals(roleTypeName.toUpperCase()) || XJConstant.ROLE_NAME_ADMIN.equals(roleTypeName.toUpperCase())) { if (XJConstant.ROLE_NAME_SUPERADMIN.equalsIgnoreCase(roleTypeName) || XJConstant.ROLE_NAME_ADMIN.equalsIgnoreCase(roleTypeName)) {
paramMap.put("orgCode", orgCode); paramMap.put("orgCode", orgCode);
paramMap.put("roleFlag", XJConstant.ADMIN_FLAG); paramMap.put("roleFlag", XJConstant.ADMIN_FLAG);
} else if (XJConstant.ROLE_NAME_DEPTADMIN.equals(roleTypeName.toUpperCase())) { } else if (XJConstant.ROLE_NAME_DEPTADMIN.equalsIgnoreCase(roleTypeName)) {
paramMap.put("orgCode", orgCode); paramMap.put("orgCode", orgCode);
paramMap.put("roleFlag", XJConstant.DEPART_FLAG); paramMap.put("roleFlag", XJConstant.DEPART_FLAG);
} else if (XJConstant.ROLE_NAME_PERSON.equals(roleTypeName.toUpperCase())) { } else if (XJConstant.ROLE_NAME_PERSON.equalsIgnoreCase(roleTypeName)) {
paramMap.put("userId", getUserId()); paramMap.put("userId", getUserId());
paramMap.put("orgCode", orgCode); paramMap.put("orgCode", orgCode);
paramMap.put("roleFlag", XJConstant.PERSON_FLAG); paramMap.put("roleFlag", XJConstant.PERSON_FLAG);
......
...@@ -704,10 +704,10 @@ public class CheckController extends AbstractBaseController { ...@@ -704,10 +704,10 @@ public class CheckController extends AbstractBaseController {
req.put("orgCode", reginParams.getPersonIdentity().getCompanyBizOrgCode()); req.put("orgCode", reginParams.getPersonIdentity().getCompanyBizOrgCode());
// if (XJConstant.ROLE_NAME_ADMIN.equals(roleTypeName.toUpperCase()) // if (XJConstant.ROLE_NAME_ADMIN.equalsIgnoreCase(roleTypeName)
// || XJConstant.ROLE_NAME_SUPERADMIN.equals(roleTypeName.toUpperCase())) { // || XJConstant.ROLE_NAME_SUPERADMIN.equalsIgnoreCase(roleTypeName)) {
// req.put("orgCode", loginOrgCode); // req.put("orgCode", loginOrgCode);
// } else if (XJConstant.ROLE_NAME_DEPTADMIN.equals(roleTypeName.toUpperCase())) { // } else if (XJConstant.ROLE_NAME_DEPTADMIN.equalsIgnoreCase(roleTypeName)) {
// req.put("departmentId",departmentId); // req.put("departmentId",departmentId);
// } else { // } else {
// if(StringUtil.isNotEmpty(req.get("userId"))&&req.get("userId")==null){ // if(StringUtil.isNotEmpty(req.get("userId"))&&req.get("userId")==null){
...@@ -805,10 +805,10 @@ public class CheckController extends AbstractBaseController { ...@@ -805,10 +805,10 @@ public class CheckController extends AbstractBaseController {
String roleTypeName = getRoleTypeName(reginParams); String roleTypeName = getRoleTypeName(reginParams);
String departmentId = getDepartmentId(reginParams); String departmentId = getDepartmentId(reginParams);
HashMap<String, Object> req = CheckPageParamUtil.fillInfo(queryRequests); HashMap<String, Object> req = CheckPageParamUtil.fillInfo(queryRequests);
if (XJConstant.ROLE_NAME_ADMIN.equals(roleTypeName.toUpperCase()) if (XJConstant.ROLE_NAME_ADMIN.equalsIgnoreCase(roleTypeName)
|| XJConstant.ROLE_NAME_SUPERADMIN.equals(roleTypeName.toUpperCase())) { || XJConstant.ROLE_NAME_SUPERADMIN.equalsIgnoreCase(roleTypeName)) {
req.put("orgCode", loginOrgCode); req.put("orgCode", loginOrgCode);
} else if (XJConstant.ROLE_NAME_DEPTADMIN.equals(roleTypeName.toUpperCase())) { } else if (XJConstant.ROLE_NAME_DEPTADMIN.equalsIgnoreCase(roleTypeName)) {
req.put("departmentId",departmentId); req.put("departmentId",departmentId);
} else { } else {
if(StringUtil.isNotEmpty(req.get("userId"))&&req.get("userId")==null){ if(StringUtil.isNotEmpty(req.get("userId"))&&req.get("userId")==null){
......
...@@ -415,7 +415,7 @@ public class MsgController extends AbstractBaseController { ...@@ -415,7 +415,7 @@ public class MsgController extends AbstractBaseController {
Map<String, Object> map = new HashMap<String,Object>(); Map<String, Object> map = new HashMap<String,Object>();
if(obj!=null){ if(obj!=null){
for (Field field : ClazzFieldUtil.getAllFields(obj)) { for (Field field : ClazzFieldUtil.getAllFields(obj)) {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
String fieldName = field.getName(); String fieldName = field.getName();
Object value = nvl(field.get(obj)); Object value = nvl(field.get(obj));
if("userId".equals(fieldName)){ if("userId".equals(fieldName)){
......
...@@ -877,7 +877,7 @@ public class PlanTaskController extends AbstractBaseController { ...@@ -877,7 +877,7 @@ public class PlanTaskController extends AbstractBaseController {
Map<String, Object> userResp = planTaskService.getPlanTaskStatisticsForApp(params); Map<String, Object> userResp = planTaskService.getPlanTaskStatisticsForApp(params);
resp.put("user", userResp); resp.put("user", userResp);
params.put("userId", null); params.put("userId", null);
if (XJConstant.ROLE_NAME_PERSON.equals(roleTypeName.toUpperCase())) { if (XJConstant.ROLE_NAME_PERSON.equalsIgnoreCase(roleTypeName)) {
return CommonResponseUtil.success(resp); return CommonResponseUtil.success(resp);
} }
if (!ObjectUtils.isEmpty(reginParams.getDepartment())) { if (!ObjectUtils.isEmpty(reginParams.getDepartment())) {
...@@ -887,7 +887,7 @@ public class PlanTaskController extends AbstractBaseController { ...@@ -887,7 +887,7 @@ public class PlanTaskController extends AbstractBaseController {
params.put("userDept", null); params.put("userDept", null);
} }
if (XJConstant.ROLE_NAME_DEPTADMIN.equals(roleTypeName.toUpperCase())) { if (XJConstant.ROLE_NAME_DEPTADMIN.equalsIgnoreCase(roleTypeName)) {
return CommonResponseUtil.success(resp); return CommonResponseUtil.success(resp);
} }
params.put("orgCode", loginOrgCode); params.put("orgCode", loginOrgCode);
......
...@@ -1250,9 +1250,9 @@ public class PointController extends AbstractBaseController { ...@@ -1250,9 +1250,9 @@ public class PointController extends AbstractBaseController {
String departmentId = getDepartmentId(reginParams); String departmentId = getDepartmentId(reginParams);
HashMap<String, Object> params = new HashMap<String, Object>(); HashMap<String, Object> params = new HashMap<String, Object>();
params.put("orgCode", loginOrgCode); params.put("orgCode", loginOrgCode);
if (XJConstant.ROLE_NAME_DEPTADMIN.equals(roleTypeName.toUpperCase())) { if (XJConstant.ROLE_NAME_DEPTADMIN.equalsIgnoreCase(roleTypeName)) {
params.put("department", departmentId); params.put("department", departmentId);
} else if (XJConstant.ROLE_NAME_PERSON.equals(roleTypeName.toUpperCase())){ } else if (XJConstant.ROLE_NAME_PERSON.equalsIgnoreCase(roleTypeName)){
params.put("userId", getUserId()); params.put("userId", getUserId());
} }
HashMap<String, Object> response = iPointService.queryPointPie(params); HashMap<String, Object> response = iPointService.queryPointPie(params);
...@@ -1269,9 +1269,9 @@ public class PointController extends AbstractBaseController { ...@@ -1269,9 +1269,9 @@ public class PointController extends AbstractBaseController {
String departmentId = getDepartmentId(reginParams); String departmentId = getDepartmentId(reginParams);
HashMap<String, Object> params = new HashMap<String, Object>(); HashMap<String, Object> params = new HashMap<String, Object>();
params.put("orgCode", loginOrgCode); params.put("orgCode", loginOrgCode);
if (XJConstant.ROLE_NAME_DEPTADMIN.equals(roleTypeName.toUpperCase())) { if (XJConstant.ROLE_NAME_DEPTADMIN.equalsIgnoreCase(roleTypeName)) {
params.put("department", departmentId); params.put("department", departmentId);
} else if (XJConstant.ROLE_NAME_PERSON.equals(roleTypeName.toUpperCase())){ } else if (XJConstant.ROLE_NAME_PERSON.equalsIgnoreCase(roleTypeName)){
params.put("userId", getUserId()); params.put("userId", getUserId());
} }
List<HashMap<String, Object>> response = iPointService.queryPointHistogram(params); List<HashMap<String, Object>> response = iPointService.queryPointHistogram(params);
......
...@@ -140,10 +140,7 @@ public class RouteController extends AbstractBaseController { ...@@ -140,10 +140,7 @@ public class RouteController extends AbstractBaseController {
String orgCode =reginParams.getPersonIdentity().getBizOrgCode(); String orgCode =reginParams.getPersonIdentity().getBizOrgCode();
//2.查询 //2.查询
List<Route> routeList = routeService.queryRouteListNew(orgCode); List<Route> routeList = routeService.queryRouteListNew(orgCode);
List<Route> list = routeList.stream().filter(e -> e.getIsExist().equals("true")).collect(Collectors.toList()); List<Route> list = routeList.stream().filter(e -> e.getIsExist().equalsIgnoreCase("true")).collect(Collectors.toList());
return CommonResponseUtil.success(!Objects.isNull(isRemove) && 1 == isRemove ? (routeList!=null?ToJson.tojson(routeList):null) : (list!=null?ToJson.tojson(list):null)); return CommonResponseUtil.success(!Objects.isNull(isRemove) && 1 == isRemove ? (routeList!=null?ToJson.tojson(routeList):null) : (list!=null?ToJson.tojson(list):null));
} catch (Exception e) { } catch (Exception e) {
log.error(e.getMessage(), e); log.error(e.getMessage(), e);
...@@ -520,13 +517,13 @@ public class RouteController extends AbstractBaseController { ...@@ -520,13 +517,13 @@ public class RouteController extends AbstractBaseController {
String departmentId = ""; String departmentId = "";
String roleTypeName = getRoleTypeName(reginParams); String roleTypeName = getRoleTypeName(reginParams);
if(XJConstant.ROLE_NAME_SUPERADMIN.equals(roleTypeName.toUpperCase()) || XJConstant.ROLE_NAME_ADMIN.equals(roleTypeName.toUpperCase())){ if(XJConstant.ROLE_NAME_SUPERADMIN.equalsIgnoreCase(roleTypeName) || XJConstant.ROLE_NAME_ADMIN.equalsIgnoreCase(roleTypeName)){
loginOrgCode = getOrgCode(reginParams); loginOrgCode = getOrgCode(reginParams);
}else if(XJConstant.ROLE_NAME_DEPTADMIN.equals(roleTypeName.toUpperCase())){ }else if(XJConstant.ROLE_NAME_DEPTADMIN.equalsIgnoreCase(roleTypeName)){
departmentId = getDepartmentId(reginParams); departmentId = getDepartmentId(reginParams);
loginOrgCode = getOrgCode(reginParams); loginOrgCode = getOrgCode(reginParams);
userId = userModel.getUserId(); userId = userModel.getUserId();
}else if(XJConstant.ROLE_NAME_PERSON.equals(roleTypeName.toUpperCase())){ }else if(XJConstant.ROLE_NAME_PERSON.equalsIgnoreCase(roleTypeName)){
userId = userModel.getUserId(); userId = userModel.getUserId();
loginOrgCode = getOrgCode(reginParams); loginOrgCode = getOrgCode(reginParams);
} }
......
...@@ -864,7 +864,7 @@ public class UserController extends AbstractBaseController { ...@@ -864,7 +864,7 @@ public class UserController extends AbstractBaseController {
if (obj != null) { if (obj != null) {
Class<?> clazz = obj.getClass(); Class<?> clazz = obj.getClass();
for (Field field : clazz.getDeclaredFields()) { for (Field field : clazz.getDeclaredFields()) {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
String fieldName = field.getName(); String fieldName = field.getName();
Object value = nvl(field.get(obj)); Object value = nvl(field.get(obj));
map.put(fieldName, value); map.put(fieldName, value);
......
...@@ -1363,15 +1363,15 @@ public class CheckServiceImpl implements ICheckService { ...@@ -1363,15 +1363,15 @@ public class CheckServiceImpl implements ICheckService {
QueryCriteriaRespone pointQueryCriteriaRespone = new QueryCriteriaRespone(); QueryCriteriaRespone pointQueryCriteriaRespone = new QueryCriteriaRespone();
if (XJConstant.ROLE_NAME_SUPERADMIN.equals(roleTypeName.toUpperCase()) || XJConstant.ROLE_NAME_ADMIN.equals(roleTypeName.toUpperCase())) { if (XJConstant.ROLE_NAME_SUPERADMIN.equalsIgnoreCase(roleTypeName) || XJConstant.ROLE_NAME_ADMIN.equalsIgnoreCase(roleTypeName)) {
List<DepartmentModel> departmentBos = remoteSecurityService.listDepartmentsByCompanyId(toke, product, appKey,companyId); List<DepartmentModel> departmentBos = remoteSecurityService.listDepartmentsByCompanyId(toke, product, appKey,companyId);
//查询没有部门的人员信息 //查询没有部门的人员信息
CompanyModel companyModel = remoteSecurityService.listUserByCompanyId1(toke, product, appKey,companyId); CompanyModel companyModel = remoteSecurityService.listUserByCompanyId1(toke, product, appKey,companyId);
pointQueryCriteriaRespone.setDepartments(Lists.newArrayList(getDepartmentMap(departmentBos,companyModel)));//公司下部门 pointQueryCriteriaRespone.setDepartments(Lists.newArrayList(getDepartmentMap(departmentBos,companyModel)));//公司下部门
} else if (XJConstant.ROLE_NAME_DEPTADMIN.equals(roleTypeName.toUpperCase())) { } else if (XJConstant.ROLE_NAME_DEPTADMIN.equalsIgnoreCase(roleTypeName)) {
DepartmentModel departmentBo = remoteSecurityService.getDepartmentByDeptId( toke, product, appKey,departmentId); DepartmentModel departmentBo = remoteSecurityService.getDepartmentByDeptId( toke, product, appKey,departmentId);
pointQueryCriteriaRespone.setDepartments(Lists.newArrayList(beanToMap(departmentBo)));//本公司 pointQueryCriteriaRespone.setDepartments(Lists.newArrayList(beanToMap(departmentBo)));//本公司
} else if (XJConstant.ROLE_NAME_PERSON.equals(roleTypeName.toUpperCase())) {//个人不返回 } else if (XJConstant.ROLE_NAME_PERSON.equalsIgnoreCase(roleTypeName)) {//个人不返回
return null; return null;
} }
...@@ -1703,14 +1703,14 @@ public class CheckServiceImpl implements ICheckService { ...@@ -1703,14 +1703,14 @@ public class CheckServiceImpl implements ICheckService {
pointQueryCriteriaRespone.setTypes(catalogTreeDao.findByOrgCode(orgCode)); pointQueryCriteriaRespone.setTypes(catalogTreeDao.findByOrgCode(orgCode));
} else if ("departments".equals(type)) { } else if ("departments".equals(type)) {
// pointQueryCriteriaRespone.setDepartments(iUserService.getGroupListByUser(user)); // pointQueryCriteriaRespone.setDepartments(iUserService.getGroupListByUser(user));
if (XJConstant.ROLE_NAME_SUPERADMIN.equals(roleTypeName.toUpperCase()) if (XJConstant.ROLE_NAME_SUPERADMIN.equalsIgnoreCase(roleTypeName)
|| XJConstant.ROLE_NAME_ADMIN.equals(roleTypeName.toUpperCase())) { || XJConstant.ROLE_NAME_ADMIN.equalsIgnoreCase(roleTypeName)) {
List<DepartmentModel> departmentBoList = remoteSecurityService.listDepartmentsByCompanyId(toke, product, appKey,companyId); List<DepartmentModel> departmentBoList = remoteSecurityService.listDepartmentsByCompanyId(toke, product, appKey,companyId);
pointQueryCriteriaRespone.setDepartments(objectsToMaps(departmentBoList));// 公司下部门 pointQueryCriteriaRespone.setDepartments(objectsToMaps(departmentBoList));// 公司下部门
} else if (XJConstant.ROLE_NAME_DEPTADMIN.equals(roleTypeName.toUpperCase())) { } else if (XJConstant.ROLE_NAME_DEPTADMIN.equalsIgnoreCase(roleTypeName)) {
DepartmentModel departmentBo = remoteSecurityService.getDepartmentByDeptId(toke, product, appKey,departmentId); DepartmentModel departmentBo = remoteSecurityService.getDepartmentByDeptId(toke, product, appKey,departmentId);
pointQueryCriteriaRespone.setDepartments(Lists.newArrayList(beanToMap(departmentBo)));// 本公司 pointQueryCriteriaRespone.setDepartments(Lists.newArrayList(beanToMap(departmentBo)));// 本公司
} else if (XJConstant.ROLE_NAME_PERSON.equals(roleTypeName.toUpperCase())) {// 个人不返回 } else if (XJConstant.ROLE_NAME_PERSON.equalsIgnoreCase(roleTypeName)) {// 个人不返回
return null; return null;
} }
} }
......
...@@ -67,11 +67,11 @@ public class BaseQuerySpecification<T> implements Specification<T> { ...@@ -67,11 +67,11 @@ public class BaseQuerySpecification<T> implements Specification<T> {
List<Order> orders = new ArrayList<>(); List<Order> orders = new ArrayList<>();
orderbys.keySet().forEach(key -> { orderbys.keySet().forEach(key -> {
if (key.toLowerCase().equals("asc") && !orderbys.get(key).isEmpty()) { if ("asc".equalsIgnoreCase(key) && !orderbys.get(key).isEmpty()) {
orderbys.get(key).forEach(propertyName -> { orderbys.get(key).forEach(propertyName -> {
orders.add(builder.asc(root.get(propertyName))); orders.add(builder.asc(root.get(propertyName)));
}); });
} else if (key.toLowerCase().equals("desc") && !orderbys.get(key).isEmpty()) { } else if ("desc".equalsIgnoreCase(key) && !orderbys.get(key).isEmpty()) {
orderbys.get(key).forEach(propertyName -> { orderbys.get(key).forEach(propertyName -> {
orders.add(builder.desc(root.get(propertyName))); orders.add(builder.desc(root.get(propertyName)));
}); });
......
...@@ -93,7 +93,7 @@ public class CompanyDepartmentController { ...@@ -93,7 +93,7 @@ public class CompanyDepartmentController {
Class<? extends CompanyDepartment> aClass = companyDepartment.getClass(); Class<? extends CompanyDepartment> aClass = companyDepartment.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(companyDepartment); Object o = field.get(companyDepartment);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
......
...@@ -108,7 +108,7 @@ public class CompanyEvaluationLogController { ...@@ -108,7 +108,7 @@ public class CompanyEvaluationLogController {
Class<? extends CompanyEvaluationLog> aClass = companyEvaluationLog.getClass(); Class<? extends CompanyEvaluationLog> aClass = companyEvaluationLog.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(companyEvaluationLog); Object o = field.get(companyEvaluationLog);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
......
...@@ -96,7 +96,7 @@ public class PersonContractController { ...@@ -96,7 +96,7 @@ public class PersonContractController {
Class<? extends PersonContract> aClass = personContract.getClass(); Class<? extends PersonContract> aClass = personContract.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(personContract); Object o = field.get(personContract);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
......
...@@ -95,7 +95,7 @@ public class ProjectDeviceController { ...@@ -95,7 +95,7 @@ public class ProjectDeviceController {
Class<? extends ProjectDevice> aClass = projectDevice.getClass(); Class<? extends ProjectDevice> aClass = projectDevice.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(projectDevice); Object o = field.get(projectDevice);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
......
...@@ -95,7 +95,7 @@ public class RewardConfigController { ...@@ -95,7 +95,7 @@ public class RewardConfigController {
Class<? extends RewardConfig> aClass = rewardConfig.getClass(); Class<? extends RewardConfig> aClass = rewardConfig.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(rewardConfig); Object o = field.get(rewardConfig);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
......
...@@ -96,7 +96,7 @@ public class RiskWorkHazadousWorkController { ...@@ -96,7 +96,7 @@ public class RiskWorkHazadousWorkController {
Class<? extends RiskWorkHazadousWork> aClass = riskWorkHazadousWork.getClass(); Class<? extends RiskWorkHazadousWork> aClass = riskWorkHazadousWork.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(riskWorkHazadousWork); Object o = field.get(riskWorkHazadousWork);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
......
...@@ -96,7 +96,7 @@ public class RiskWorkMeasureController { ...@@ -96,7 +96,7 @@ public class RiskWorkMeasureController {
Class<? extends RiskWorkMeasure> aClass = riskWorkMeasure.getClass(); Class<? extends RiskWorkMeasure> aClass = riskWorkMeasure.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> { Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try { try {
field.setAccessible(true); ReflectionUtils.makeAccessible(field);
Object o = field.get(riskWorkMeasure); Object o = field.get(riskWorkMeasure);
if (o != null) { if (o != null) {
Class<?> type = field.getType(); Class<?> type = field.getType();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment