|
|
|
@ -286,7 +286,9 @@ public class MtFactoryDataServiceImpl implements IMtFactoryDataService {
|
|
|
|
|
@Override |
|
|
|
|
public R handleStatusData(OrderStatusDTO orderStatusDTO) throws CustomerException, JsonProcessingException, NoSuchAlgorithmException { |
|
|
|
|
logger.info("TAG {} #############handleStatusData: orderStatusDTO={}", FactoryConstant.MENGT,orderStatusDTO); |
|
|
|
|
|
|
|
|
|
if(!mtFactoryProperties.getSendEnable()){ |
|
|
|
|
return R.fail(400, "当前数据不推送"); |
|
|
|
|
} |
|
|
|
|
String status = orderStatusDTO.getStatus(); |
|
|
|
|
|
|
|
|
|
R rd = null; |
|
|
|
@ -324,6 +326,9 @@ public class MtFactoryDataServiceImpl implements IMtFactoryDataService {
|
|
|
|
|
String distributionContactId, |
|
|
|
|
String destinationWarehouse |
|
|
|
|
) throws JsonProcessingException, NoSuchAlgorithmException { |
|
|
|
|
if(!mtFactoryProperties.getSendEnable()){ |
|
|
|
|
return R.fail(400, "当前数据不推送"); |
|
|
|
|
} |
|
|
|
|
QueryWrapper<MtPackageInfo> packageInfoQueryWrapper = new QueryWrapper<>(); |
|
|
|
|
packageInfoQueryWrapper.eq("package_code", orderPackageCode); |
|
|
|
|
MtPackageInfo one = mtPackageInfoService.getOne(packageInfoQueryWrapper); |
|
|
|
@ -474,7 +479,9 @@ public class MtFactoryDataServiceImpl implements IMtFactoryDataService {
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public R sendReceiveInfoByNewSystem(MtReceiveDTO mtReceiveDTO) throws JsonProcessingException, NoSuchAlgorithmException { |
|
|
|
|
|
|
|
|
|
if(!mtFactoryProperties.getSendEnable()){ |
|
|
|
|
return R.fail("发送数据已关闭"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
List<MtReceiveContentDTO> receiveContentList = mtReceiveDTO.getReceiveContentList(); |
|
|
|
|
|
|
|
|
@ -685,6 +692,9 @@ public class MtFactoryDataServiceImpl implements IMtFactoryDataService {
|
|
|
|
|
* @throws NoSuchAlgorithmException |
|
|
|
|
*/ |
|
|
|
|
public String retryPushMtFactoryData(String url, String data) throws NoSuchAlgorithmException { |
|
|
|
|
if(!mtFactoryProperties.getSendEnable()){ |
|
|
|
|
return ""; |
|
|
|
|
} |
|
|
|
|
return sendMtFactoryDataRequest(url, data); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -698,7 +708,9 @@ public class MtFactoryDataServiceImpl implements IMtFactoryDataService {
|
|
|
|
|
* @throws NoSuchAlgorithmException |
|
|
|
|
*/ |
|
|
|
|
private R sendMtFactoryData(String url, String data, Integer type,String refCode) throws NoSuchAlgorithmException { |
|
|
|
|
|
|
|
|
|
if(!mtFactoryProperties.getSendEnable()){ |
|
|
|
|
return R.fail(400, "当前数据不推送"); |
|
|
|
|
} |
|
|
|
|
logger.info("##############sendMtFactoryData 发送数据: {}", data); |
|
|
|
|
|
|
|
|
|
String result = sendMtFactoryDataRequest(url, data); |
|
|
|
@ -747,6 +759,9 @@ public class MtFactoryDataServiceImpl implements IMtFactoryDataService {
|
|
|
|
|
* @throws NoSuchAlgorithmException |
|
|
|
|
*/ |
|
|
|
|
private String sendMtFactoryDataRequest(String url, String data) throws NoSuchAlgorithmException { |
|
|
|
|
if(!mtFactoryProperties.getSendEnable()){ |
|
|
|
|
return ""; |
|
|
|
|
} |
|
|
|
|
//先获取token
|
|
|
|
|
String token = getMtToken(); |
|
|
|
|
|
|
|
|
|