1
13693261870
2024-11-01 a6415c0c5116172db31fd353032fdfd11ac91544
src/main/java/com/se/simu/service/WaterService.java
@@ -37,9 +37,9 @@
    /**
     * 获取元数据信息
     */
    public byte[] getLayerJson(String serviceName) {
    public byte[] getson(String serviceName, String json) {
        try {
            String filePath = config.getOutPath() + File.separator + serviceName + File.separator + "layer.json";
            String filePath = config.getOutPath() + File.separator + serviceName + File.separator + json;
            File dat = new File(filePath);
            if (!dat.exists()) {
@@ -54,6 +54,7 @@
            return bytes;
        } catch (Exception ex) {
            log.error(ex.getMessage(), ex);
            return null;
        }
    }
@@ -101,30 +102,6 @@
        layer.setWaters(new Water(data));
        return layer;
    }
    /**
     * 获取降水曲线文件曲线图
     */
    public byte[] getRainfall(String serviceName) {
        try {
            String filePath = config.getOutPath() + File.separator + serviceName + File.separator + "rainfall.json";
            File rainfall = new File(filePath);
            if (!rainfall.exists()) {
                return null;
            }
            byte[] bytes = new byte[(int) rainfall.length()];
            FileInputStream fs = new FileInputStream(filePath);
            fs.read(bytes);
            fs.close();
            return bytes;
        } catch (Exception ex) {
            return null;
        }
    }
    /**