Browse Source

Merge pull request #1437 in DESIGN/design from ~BJORN/design:release/10.0 to release/10.0

* commit 'b93b6f2ca65ebd4629211b747bd125e7052d2183':
  CHART-12815  天数不增加的问题
feature/big-screen
Bjorn 5 years ago
parent
commit
2ddaeacc24
  1. 2
      designer-base/src/main/java/com/fr/design/mainframe/chart/info/ChartInfo.java
  2. 7
      designer-base/src/main/java/com/fr/design/mainframe/chart/info/ChartInfoCollector.java

2
designer-base/src/main/java/com/fr/design/mainframe/chart/info/ChartInfo.java

@ -57,8 +57,6 @@ public class ChartInfo extends AbstractPointInfo {
private boolean testTemplate;
private int idleDayCount; // 到现在为止,埋点闲置的天数
private ChartInfo() {
}

7
designer-base/src/main/java/com/fr/design/mainframe/chart/info/ChartInfoCollector.java

@ -13,10 +13,9 @@ import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils;
import com.fr.stable.xml.XMLPrintWriter;
import com.fr.stable.xml.XMLableReader;
import com.fr.third.joda.time.DateTime;
import java.io.File;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.HashMap;
import java.util.Map;
@ -36,7 +35,7 @@ public class ChartInfoCollector extends AbstractPointCollector<ChartInfo> {
private Map<String, ChartInfo> chartInfoCacheMap;
private String lastEditDay = StringUtils.EMPTY;
private String lastEditDay;
private ChartInfoCollector() {
init();
@ -186,7 +185,7 @@ public class ChartInfoCollector extends AbstractPointCollector<ChartInfo> {
@Override
protected void addIdleDayCount() {
// 判断今天是否第一次打开设计器,为了防止同一天内,多次 addIdleDayCount
String today = new SimpleDateFormat("yyyy-MM-dd").format(Calendar.getInstance().getTime());
String today = DateTime.now().toString("yyyy-MM-dd");
if (ComparatorUtils.equals(today, lastEditDay)) {
return;
}

Loading…
Cancel
Save