Browse Source

Merge pull request #15245 in DESIGN/design from fbp/master to fbp/release

* commit 'f5ae4f9c973ea10b0a5bf2b728ebb0386028139c':
  REPORT-137540 远程设计下地图加载卡慢
  REPORT-137540 - 远程设计下地图加载卡慢
  REPORT-138771 fix:远程设计取数异常信息解包
fbp/merge
superman 3 months ago
parent
commit
0b97d13690
  1. 7
      designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java
  2. 36
      designer-chart/src/main/java/com/fanruan/map/DesignGEOJSONHelper.java
  3. 4
      designer-realize/src/main/java/com/fanruan/boot/env/function/DesignChartBaseComponent.java
  4. 2
      designer-realize/src/main/java/com/fanruan/boot/init/DesignWorkContextComponent.java

7
designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java

@ -50,6 +50,7 @@ import javax.swing.JFrame;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.io.ByteArrayOutputStream;
import java.lang.reflect.UndeclaredThrowableException;
import java.text.Collator;
import java.util.ArrayList;
import java.util.Collections;
@ -596,7 +597,11 @@ public abstract class DesignTableDataManager {
}
} catch (Exception e) {
throw new TableDataException(e.getMessage(), e);
String msg = e.getMessage();
if (e instanceof UndeclaredThrowableException) {
msg = ((UndeclaredThrowableException) e).getUndeclaredThrowable().getMessage();
}
throw new TableDataException(msg, e);
} finally {
ScheduledExecutorService scheduledExecutorService = ComponentUtils
.getExecutor()

36
designer-chart/src/main/java/com/fanruan/map/DesignGEOJSONHelper.java

@ -0,0 +1,36 @@
package com.fanruan.map;
import com.fr.decision.webservice.v10.map.geojson.MapDataType;
import com.fr.decision.webservice.v10.map.geojson.helper.GEOJSONHelper;
import com.fr.decision.webservice.v10.map.geojson.helper.GEOJSONUtils;
import com.fr.log.FineLoggerFactory;
import com.fr.third.org.apache.commons.lang3.time.StopWatch;
import com.fr.workspace.server.repository.map.MapRepository;
/**
* 设计器地图资源Helper
*
* @author Destiny.Lin
* @since 11.0
* Created on 2024/9/27
*/
public class DesignGEOJSONHelper extends GEOJSONHelper {
@Override
protected void init() {
try {
StopWatch watch = new StopWatch();
watch.start();
URL_JSON_MAP.putAll(MapRepository.getInstance().getMapResource(GEOJSONUtils.getMapDataTypePath(MapDataType.GEOGRAPHIC)));
URL_JSON_MAP.putAll(MapRepository.getInstance().getMapResource(GEOJSONUtils.getMapDataTypePath(MapDataType.IMAGE)));
FineLoggerFactory.getLogger().info("Load chart map resources spend time {} ms", watch.getTime());
watch.stop();
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
}
}

4
designer-realize/src/main/java/com/fanruan/boot/env/function/DesignChartBaseComponent.java vendored

@ -1,11 +1,14 @@
package com.fanruan.boot.env.function;
import com.fanruan.boot.ChartBaseComponent;
import com.fanruan.carina.Carina;
import com.fanruan.carina.annotions.DependsOn;
import com.fanruan.carina.annotions.FineComponent;
import com.fanruan.carina.annotions.Start;
import com.fanruan.carina.annotions.Stop;
import com.fanruan.carina.annotions.Supplemental;
import com.fanruan.map.DesignGEOJSONHelper;
import com.fr.decision.webservice.v10.map.geojson.helper.GEOJSONHelperShell;
/**
@ -42,6 +45,7 @@ public class DesignChartBaseComponent extends ChartBaseComponent {
@Supplemental
public void prepare() {
super.prepare();
Carina.getApplicationContext().singleton(GEOJSONHelperShell.class).set(DesignGEOJSONHelper.class);
}
}

2
designer-realize/src/main/java/com/fanruan/boot/init/DesignWorkContextComponent.java

@ -63,6 +63,7 @@ import com.fr.workspace.server.repository.authority.RemoteAuthorityRepository;
import com.fr.workspace.server.repository.compatible.register.CompatibleRegister;
import com.fanruan.repository.ConfigRepository;
import com.fr.workspace.server.repository.connection.ConnectionRepository;
import com.fr.workspace.server.repository.map.MapRepository;
import com.fr.workspace.server.repository.plugin.PluginRepository;
import com.fr.workspace.server.repository.resource.PublicResourceRepository;
import com.fr.workspace.server.repository.resource.WorkResourceRepository;
@ -114,6 +115,7 @@ public class DesignWorkContextComponent {
RepositoryManager.getInstance().pureRegisterRepo4Start(PublicResourceRepository.getInstance());
RepositoryManager.getInstance().pureRegisterRepo4Start(ConfigRepository.getInstance());
RepositoryManager.getInstance().pureRegisterRepo4Start(PluginRepository.getInstance());
RepositoryManager.getInstance().pureRegisterRepo4Start(MapRepository.getInstance());
RepositoryManager.getInstance().initLocalRepository();
CompatibleRegister.registerCompatibleEnv();
for (WorkRPCRegister<?> workRPCRegister : ServiceContext.group(WorkspaceKey.class).getAll()) {

Loading…
Cancel
Save