rain
2024-05-16 6ad595014ddd8578ead23116b3f9cb00f828627a
src/main/java/com/dji/sample/territory/service/impl/TbFjServiceImpl.java
@@ -94,12 +94,13 @@
        Double absoluteAltitude = jsonObject.getDouble("absoluteAltitude");
        Double relativeAltitude = jsonObject.getDouble("relativeAltitude");
        Double gimbalYawDegree = jsonObject.getDouble("gimbalYawDegree");
        Long sj =jsonObject.getLong("createdTime");
        JSONObject shootPosition = jsonObject.getJSONObject("shootPosition");
        Double lat = shootPosition.getDouble("lat");
        Double lng = shootPosition.getDouble("lng");
        double[] coordinates = extractCoordinates(pointWGStoCGCS(lng, lat));
        double x = Double.parseDouble(((formatCoordinate(coordinates[1]))));
        double y = Double.parseDouble(((formatCoordinate(coordinates[0]))));
//        double[] coordinates = extractCoordinates(pointWGStoCGCS(lng, lat));
//        double x = Double.parseDouble(((formatCoordinate(coordinates[1]))));
//        double y = Double.parseDouble(((formatCoordinate(coordinates[0]))));
        //本地数据库没有的数据在FJ表非空用0
        int psjd = 0;
        int pshgj = 0;
@@ -108,7 +109,6 @@
        String dklx = "0";
        int fjlx = 1;
        String pstz="Y";
        Long sj = mediaFile.getCreateTime();
        String pssj=convertTimestampToDateTime(sj);
        String bsm = UUID.randomUUID().toString();
        String fjmc = mediaFile.getFileName();
@@ -129,7 +129,7 @@
            file1 = VideoZipUtil.compressVideo(file, 800000, 128000, 1280, 720);
            FJ = fileToByteArray(file1);
        }
        String sm3 = Sm3Util.calculateSM3Hash(fjhxz+","+pssj+","+y+","+x+","+gimbalYawDegree+","+psjd+","+pshgj+","+psry+","+zsdm);
        String sm3 = Sm3Util.calculateSM3Hash(fjhxz+","+pssj+","+lng+","+lat+","+gimbalYawDegree+","+psjd+","+pshgj+","+psry+","+zsdm);
        byte[] hash = sm3.getBytes(); // 注意:使用SM3或其他哈希算法来计算数据的哈希值
        // 加载私钥
@@ -144,8 +144,8 @@
                    .dklx(dklx)
                    .xdgd(relativeAltitude)
                    .jdgd(absoluteAltitude)
                    .Latitude(x)
                    .longitude(y)
                    .Latitude(lat)
                    .longitude(lng)
                    .fj(FJ)
                    .fjmc(fjmc)
                    .fjlx(fjlx)