rain
2024-06-14 5655be710d599928a1d03db792212da5bf1ce667
src/main/java/com/dji/sample/territory/service/impl/TbFjServiceImpl.java
@@ -126,12 +126,11 @@
        String head = "http://dev.jxpskj.com:9000/cloud-bucket";
        String url = head + key;
        File file = downloadFile(url);
//        JSONObject jsonObjects = JSONObject.parseObject(ImgUtil.getInfo(file));
        JSONObject jsons = (JSONObject) (ImgUtil.getInfo(file));
        String str = jsons.toJSONString();
        String newstr = str.replace("+", "");
        JSONObject json = JSON.parseObject(newstr);
        Double pitch = json.getDouble("GimbalPitchDegree");
        double pitch = json.getDouble("GimbalPitchDegree");
        String focal = json.getString("FocalLength");
        String numberPart = focal.replaceAll("[^\\d]", "");
        int psjj = Integer.parseInt(numberPart);
@@ -151,10 +150,7 @@
            file1 = VideoZipUtil.compressVideo(file, 800000, 128000, 1280, 720);
            FJ = fileToByteArray(file1);
        }
        String hxz =(sm3((fjhxz + "," + pssj + "," + lng + "," + lat + "," + gimbalYawDegree + "," + psjd + "," + pshgj + "," + psry + "," + zsdm).getBytes()));
        SM2SignVO sm2signVO = SM2SignVerUtils.Sign2SM2(Util.hexStringToBytes("23E57DA1E4AB865CCBC325B668762207DEF74345B782237808AE0BABDF26734D"), hxz.getBytes(StandardCharsets.UTF_8));
        String jym= sm2signVO.getSm2_signForHard().toUpperCase();
        StringBuffer buffer=SM3.addStringBuffer(fjhxz,pssj,lng,lat,gimbalYawDegree,psjd,pshgj,psry,zsdm);
        StringBuffer buffer=SM3.addStringBuffer(fjhxz,pssj,truncateToSevenDecimalPlaces(lng),truncateToSevenDecimalPlaces(lat),(int)pitch,(int)psjd,pshgj,psry,zsdm);
        String jyms= addJym(buffer);
        TbFjEntity.TbFjEntityBuilder builder = TbFjEntity.builder();
        if (lotInfo != null) {
@@ -260,10 +256,5 @@
        BigDecimal bd = new BigDecimal(value).setScale(7, RoundingMode.DOWN);
        return bd.doubleValue();
    }
    public static void main(String[] args) {
        String s= String.valueOf(SM3HashExample.HaXi(new File("src/main/resources/FJ_10.jpeg")));
        System.out.println(s);
    }
}