Browse Source

Merge pull request #11202 in DESIGN/design from final/11.0 to release/11.0

* commit '964f93ab34536f7b62eeb85353c833c8a47347ae':
  REPORT-86045 FR11决策报表假保存-报表块内撤销后,再编辑除此报表块外部分,保存模板 实际未保存
  REPORT-87576 取色板使用后会让fr卡住。可稳定复现
  REPORT-87013 设计器11.0.11更新日志显示的信息是重复的
newui
superman 2 years ago
parent
commit
114d91eab0
  1. 11
      designer-base/src/main/java/com/fr/design/update/ui/dialog/UpdateMainDialog.java

11
designer-base/src/main/java/com/fr/design/update/ui/dialog/UpdateMainDialog.java

@ -118,6 +118,8 @@ public class UpdateMainDialog extends UIDialog {
private ArrayList<Object[]> updateInfoList;
private Set<String> titleSet;
private boolean getUpdateInfoSuccess;
private UpdateInfoCachePropertyManager cacheProperty;
@ -267,6 +269,7 @@ public class UpdateMainDialog extends UIDialog {
String keyword = searchUpdateInfoKeyword.getText();
if (ComparatorUtils.equals(keyword, StringUtils.EMPTY) && getUpdateInfoSuccess) {
updateInfoList.clear();
titleSet.clear();
getUpdateInfo(keyword).execute();
}
}
@ -281,6 +284,7 @@ public class UpdateMainDialog extends UIDialog {
public void actionPerformed(ActionEvent e) {
if (getUpdateInfoSuccess) {
updateInfoList.clear();
titleSet.clear();
getUpdateInfo(searchUpdateInfoKeyword.getText()).execute();
}
}
@ -388,6 +392,7 @@ public class UpdateMainDialog extends UIDialog {
private SwingWorker<JSONArray, Void> getUpdateInfo(final String keyword) {
updateInfoList = new ArrayList<>();
titleSet = new HashSet<>();
lastUpdateCacheTime = UpdateConstants.CHANGELOG_X_START;
String cacheConfigPath = getUpdateCacheConfig();
cacheProperty = new UpdateInfoCachePropertyManager(StableUtils.pathJoin(WorkContext.getCurrent().getPath(), "resources", "offlineres", cacheConfigPath));
@ -489,6 +494,7 @@ public class UpdateMainDialog extends UIDialog {
}
}
if (isValid(updateInfo, GeneralUtils.objectToString(curJarDate))) {
titleSet.add(updateInfo[UpdateInfoTable.UPDATE_TITLE_INDEX]);
updateInfoList.add(new Object[]{UPDATELOG_FORMAT.format(updateTime), updateInfo[UpdateInfoTable.UPDATE_VERSION_INDEX], updateInfo[UpdateInfoTable.UPDATE_TITLE_INDEX], updateTime.after(curJarDate)});
}
}
@ -501,7 +507,7 @@ public class UpdateMainDialog extends UIDialog {
private boolean isValid(String[] updateInfo, String curJarDate) {
return isValidLogInfo(updateInfo[UpdateInfoTable.UPDATE_TITLE_INDEX]) && curJarDate != null && curJarDate.compareTo(updateInfo[UpdateInfoTable.UPDATE_DATE_INDEX]) <= 0;
return isValidLogInfo(updateInfo[UpdateInfoTable.UPDATE_TITLE_INDEX]) && curJarDate != null && curJarDate.compareTo(updateInfo[UpdateInfoTable.UPDATE_DATE_INDEX]) <= 0 && !titleSet.contains(updateInfo[UpdateInfoTable.UPDATE_TITLE_INDEX]);
}
private void updateCachedInfoFile(JSONArray jsonArray) throws Exception {
@ -561,6 +567,7 @@ public class UpdateMainDialog extends UIDialog {
}
Date curDate = UPDATE_INFO_TABLE_FORMAT.parse(currentNO, new ParsePosition(currentNO.indexOf("-") + 1));
if (isValid4GenerateInfo(updateTitle, GeneralUtils.objectToString(curDate), updateTimeStr)) {
titleSet.add(updateTitle);
updateInfoList.add(new Object[]{updateTimeStr, updateVersionStr, updateTitle, updateTime.after(curJarDate)});
}
}
@ -568,7 +575,7 @@ public class UpdateMainDialog extends UIDialog {
}
private boolean isValid4GenerateInfo(String updateTitle, String curDate, String updateTimeStr) {
return isValidLogInfo(updateTitle) && curDate.compareTo(updateTimeStr) <= 0;
return isValidLogInfo(updateTitle) && curDate.compareTo(updateTimeStr) <= 0 && !titleSet.contains(updateTitle);
}
private boolean containsKeyword(String str, String keyword) {

Loading…
Cancel
Save