|
|
|
@ -324,7 +324,7 @@ public class MtFactoryDataServiceImpl implements IMtFactoryDataService {
|
|
|
|
|
|
|
|
|
|
@Transactional |
|
|
|
|
@Override |
|
|
|
|
public R sendReceiveInfo(ReceiveInfoDTO receiveInfoDTO) { |
|
|
|
|
public R sendReceiveInfo(ReceiveInfoDTO receiveInfoDTO) throws JsonProcessingException { |
|
|
|
|
log.info("###########sendReceiveInfo: 处理签收图片数据开始"); |
|
|
|
|
Integer newDistributionContactId = receiveInfoDTO.getNewDistributionContactId(); |
|
|
|
|
List<ReceiveBodyDTO> receiveBodyList = receiveInfoDTO.getReceiveBodyList(); |
|
|
|
@ -387,12 +387,16 @@ public class MtFactoryDataServiceImpl implements IMtFactoryDataService {
|
|
|
|
|
//签收图片数据存入头部数据
|
|
|
|
|
mtReceiveDTO.setReceiveImagesList(mtReceiveImagesDTOList); |
|
|
|
|
|
|
|
|
|
ObjectMapper objectMapper = new ObjectMapper(); |
|
|
|
|
|
|
|
|
|
String s = objectMapper.writeValueAsString(mtReceiveDTO); |
|
|
|
|
|
|
|
|
|
//推送数据到梦天
|
|
|
|
|
//先获取token
|
|
|
|
|
String token = getMtToken(); |
|
|
|
|
|
|
|
|
|
//请求参数
|
|
|
|
|
logger.info("##############sendReceiveInfo: 推送包件状态请求参数 {}",mtReceiveDTO); |
|
|
|
|
logger.info("##############sendReceiveInfo: 推送包件状态请求参数 {}",s); |
|
|
|
|
|
|
|
|
|
//处理逻辑
|
|
|
|
|
String result = HttpRequest.post(mtFactoryProperties.getUrl()+"/Auth/text2") |
|
|
|
@ -401,7 +405,7 @@ public class MtFactoryDataServiceImpl implements IMtFactoryDataService {
|
|
|
|
|
.header("USERID",mtFactoryProperties.getUserid()) |
|
|
|
|
.header("USERPWD",mtFactoryProperties.getUserpwd()) |
|
|
|
|
.header("Content-Type","application/json") |
|
|
|
|
.body(JSONObject.toJSONString(mtReceiveDTO)).timeout(5 * 1000) |
|
|
|
|
.body(s).timeout(5 * 1000) |
|
|
|
|
.execute().body(); |
|
|
|
|
|
|
|
|
|
logger.info("##############sendReceiveInfo: 推送包件状态返回参数 {}",result); |
|
|
|
|