3
13693261870
2024-07-18 aa2a27793b5e4e0efd64759041f3612cd5a1c1c3
3
已修改2个文件
14 ■■■■ 文件已修改
src/main/java/com/se/simu/helper/WebHelper.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/se/simu/service/WaterService.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/se/simu/helper/WebHelper.java
@@ -32,9 +32,9 @@
    private final static String UNKNOWN = "unknown";
    /**
     * 格式化当前系统日期 4
     * 格式化日期
     */
    public static final SimpleDateFormat YMDHMS = new SimpleDateFormat("yyyyMMddHHmmss");
    public final static SimpleDateFormat YMDHMS = new SimpleDateFormat("yyyyMMddHHmmss");
    /**
     * 字符串,是否为空null和空格
@@ -52,8 +52,6 @@
    /**
     * 获取主机IP
     *
     * @return
     */
    public static String getHostIp() {
        try {
@@ -212,7 +210,6 @@
            res.setStatus(HttpStatus.NOT_FOUND.value());
            return;
        }
        String fileName = URLEncoder.encode(filePath, "UTF-8").replace("+", "%20");
        res.setHeader("Content-Disposition", "attachment; filename*=UTF-8''" + fileName);
src/main/java/com/se/simu/service/WaterService.java
@@ -61,16 +61,19 @@
     * 获取水面高度图
     */
    public String getWaterMap(String serviceName, Integer width, Integer height, Long timestamp) {
        return dataPath + File.separator + serviceName + File.separator + "waters" + File.separator + timestamp+ File.separator + width + "_" + height + ".png";
        return dataPath + File.separator + serviceName + File.separator + "waters" + File.separator + timestamp + File.separator + width + "_" + height + ".png";
    }
    /**
     * 获取水流向流速图
     */
    public String getFlowMap(String serviceName, Integer width, Integer height, Long timestamp) {
        return dataPath + File.separator + serviceName + File.separator + "flow" + File.separator + timestamp+ File.separator + width + "_" + height + ".png";
        return dataPath + File.separator + serviceName + File.separator + "flow" + File.separator + timestamp + File.separator + width + "_" + height + ".png";
    }
    /**
     * 获取图层
     */
    public Layer getLayer(String serviceName) {
        Layer layer = new Layer();
        layer.setVersion(ver);