| | |
| | | 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); |
| | |
| | | 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); |
| | | String jyms= addJym(buffer); |
| | | StringBuffer buffer=SM3.addStringBuffer(fjhxz,pssj,truncateToSevenDecimalPlaces(lng),truncateToSevenDecimalPlaces(lat),(int)pitch,(int)psjd,pshgj,psry,zsdm); |
| | | String jyms= SM3.addJym(buffer); |
| | | TbFjEntity.TbFjEntityBuilder builder = TbFjEntity.builder(); |
| | | if (lotInfo != null) { |
| | | builder.bsm(bsm) |
| | |
| | | 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); |
| | | } |
| | | } |