Commit 14cae3dc by 真的三个金鑫

UOM 上报 BUG 400 修复

parent d0faa3e8
...@@ -40,15 +40,16 @@ public class UOMRecordService { ...@@ -40,15 +40,16 @@ public class UOMRecordService {
} }
* */ * */
public String sendRecord(UOMDroneFlightRecordDTO uomDroneFlightRecordDTO) throws Exception { public String sendRecord(UOMDroneFlightRecordDTO uomDroneFlightRecordDTO) throws Exception {
HttpRequest post = HttpUtil.createPost(uomConfiguration.getUrl());
post.header("source", String.valueOf(uomConfiguration.getSource()));
post.header("platform", uomConfiguration.getPlatform());
post.header("programVersion", uomConfiguration.getProgramVersion());
SendUOMDTO sendUOMDTO = new SendUOMDTO(); SendUOMDTO sendUOMDTO = new SendUOMDTO();
sendUOMDTO.setAppID(uomConfiguration.getAppID()); sendUOMDTO.setAppID(uomConfiguration.getAppID());
List<UOMDroneFlightRecordDTO> paths = sendUOMDTO.getPaths(); List<UOMDroneFlightRecordDTO> paths = sendUOMDTO.getPaths();
paths.add(uomDroneFlightRecordDTO); paths.add(uomDroneFlightRecordDTO);
HttpRequest post = HttpUtil.createPost(uomConfiguration.getUrl());
post.header("source", String.valueOf(uomConfiguration.getSource()));
post.header("platform", uomConfiguration.getPlatform());
post.header("programVersion", uomConfiguration.getProgramVersion());
post.header("signature",JSONUtil.toJsonStr(sendUOMDTO));
post.header("Content-Type","application/json");
sendUOMDTO.setPaths(paths); sendUOMDTO.setPaths(paths);
String encrypt = SM3Util.encrypt(JSONUtil.toJsonStr(sendUOMDTO), uomConfiguration.getAppKey()); String encrypt = SM3Util.encrypt(JSONUtil.toJsonStr(sendUOMDTO), uomConfiguration.getAppKey());
post.body(encrypt); post.body(encrypt);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment