package com.yfd.platform.utils;

import java.net.URLDecoder;
import java.net.URLEncoder;

public class TestFileDir {
    public static void main(String[] args) throws Exception {
        double resultvalue = 50;
        double baseValue = 100;
        double abs = Math.abs((resultvalue - baseValue) / baseValue * 100);
        System.out.println(abs);
        String decode = URLDecoder.decode("%E5%95%86%E4%B8%98%E5%B8%82%2F500Kv%E6%A0%87%E5%87%86%E5%8F%98%E7%94%B5%E7%AB%99%E7%AE%A1%E7%90%86%E5%8C%BA%E5%9F%9F%2F500V%E5%8F%98%E7%94%B5%E7%AB%99%2F%E7%BC%BA%E9%99%B7%2F202505%2F20250519_160142_500kV%E6%B5%8B%E8%AF%95%E9%97%B4%E9%9A%94_500kV%E6%B5%8B%E8%AF%95%E4%B8%BB%E8%AE%BE%E5%A4%87_%E5%A3%B0%E7%BA%B9%E7%82%B9%E4%BD%8D.wav", "utf-8");
        System.out.println(decode);
        String encode = URLEncoder.encode("商丘市\\500Kv标准变电站管理区域\\500V变电站\\缺陷\\202505\\test.mp4", "UTF-8");
        System.out.println(encode);
    }
}
