开发OTA备案工具-导入导出
This commit is contained in:
+7
-7
@@ -38,7 +38,7 @@ public class ComparisonUtil<T> {
|
||||
String newStr = parseDictText(ote, field, newClazz, sysDictService);
|
||||
String oldStr = parseDictText(ote, field, oldClazz, sysDictService);
|
||||
if (!newStr.equals(oldStr)) {
|
||||
String content = "由" + title + "的" + oldStr + "改为" + newStr;
|
||||
String content = "将" + title + "的'" + oldStr + "'改为'" + newStr + "'";
|
||||
resList.add(new OtaBaCxTxjl(otaId, otaModuleEnum.getName(), content));
|
||||
}
|
||||
}
|
||||
@@ -56,7 +56,7 @@ public class ComparisonUtil<T> {
|
||||
if (ObjectUtils.isEmpty(id)) {
|
||||
Field tableField = newObj.getClass().getDeclaredField(tableTitle);
|
||||
tableField.setAccessible(true);
|
||||
String content = "新增了一条" + tableField.get(newObj).toString();
|
||||
String content = "新增了一条'" + tableField.get(newObj).toString() + "'";
|
||||
resList.add(new OtaBaCxTxjl(otaId, otaModuleEnum.getName(), content));
|
||||
Field[] fields = newObj.getClass().getDeclaredFields();
|
||||
for (Field field : fields) {
|
||||
@@ -68,12 +68,12 @@ public class ComparisonUtil<T> {
|
||||
title = ote.getValue();
|
||||
field.setAccessible(true);
|
||||
Object newVal = field.get(newObj);
|
||||
String newStr = "空";
|
||||
String newStr = "";
|
||||
if (ObjectUtils.isNotEmpty(newVal)) {
|
||||
newStr = newVal.toString();
|
||||
content = tableField.get(newObj).toString() + "-" + title + "由'空'改为'" + newStr + "'";
|
||||
resList.add(new OtaBaCxTxjl(otaId, otaModuleEnum.getName(), content));
|
||||
}
|
||||
content = "增加" + tableField.get(newObj).toString() + "中" + title + "为" + newStr;
|
||||
resList.add(new OtaBaCxTxjl(otaId, otaModuleEnum.getName(), content));
|
||||
}
|
||||
} else {
|
||||
for (T oldObj : oldList) {
|
||||
@@ -105,7 +105,7 @@ public class ComparisonUtil<T> {
|
||||
if (ObjectUtils.isNotEmpty(tableTitleObj)) {
|
||||
tableTitleObjStr = tableTitleObj.toString();
|
||||
}
|
||||
String content = "删除了" + tableTitleObjStr;
|
||||
String content = "删除了'" + tableTitleObjStr + "'";
|
||||
resList.add(new OtaBaCxTxjl(otaId, otaModuleEnum.getName(), content));
|
||||
}
|
||||
}
|
||||
@@ -143,7 +143,7 @@ public class ComparisonUtil<T> {
|
||||
newTitleStr = newTitleVal.toString();
|
||||
}
|
||||
}
|
||||
String content = newTitleStr + "的" + title + "由" + oldStr + "改为" + newStr;
|
||||
String content = newTitleStr + "-" + title + "由'" + oldStr + "'改为'" + newStr + "'";
|
||||
resList.add(new OtaBaCxTxjl(otaId, otaModuleEnum.getName(), content));
|
||||
}
|
||||
} catch (IllegalAccessException | NoSuchFieldException e) {
|
||||
|
||||
Reference in New Issue
Block a user