Commit 15a4ed15 authored by AllenChen's avatar AllenChen

commit

parent 7727f186
......@@ -24,7 +24,7 @@ public class RepeatedlyReadFilter implements Filter {
} catch (Exception e) {
e.printStackTrace();
}
log.info("RepeatedlyReadFilter doFilter ok");
// log.info("RepeatedlyReadFilter doFilter ok");
}
}
......@@ -179,7 +179,7 @@ public class PddOpenController {
1,
"SENDTORECEVER".equals(queryRequest.getSegmentCode())
);
log.info("mailNo:{} weight:{}, fee:{}", packageDetailEntity.getMailNo(), currWeight, currFee);
// log.info("mailNo:{} weight:{}, fee:{}", packageDetailEntity.getMailNo(), currWeight, currFee);
weight += currWeight;
freightFee += currFee;
......@@ -200,7 +200,7 @@ public class PddOpenController {
mailDetailEntity.getHeight(),
mailDetailEntity.getWeight(),
"SENDTORECEVER".equals(queryRequest.getSegmentCode()));
log.info("mailNo:{} weight:{}, fee:{}", mailDetailEntity.getMailNo(), currWeight);
// log.info("mailNo:{} weight:{}, fee:{}", mailDetailEntity.getMailNo(), currWeight);
weight += currWeight;
}
}
......@@ -210,9 +210,7 @@ public class PddOpenController {
1,
"SENDTORECEVER".equals(queryRequest.getSegmentCode())
);
log.info("weight:{}, fee:{}", weight, freightFee);
// log.info("weight:{}, fee:{}", weight, freightFee);
}
}
......
......@@ -74,13 +74,13 @@ public class PddOverseaPriceTool {
// 判断重量是否超重
//分析重量
log.info("weight = {}, initialWeight = {}, ", weight, initialWeight);
// log.info("weight = {}, initialWeight = {}, ", weight, initialWeight);
if (weight > initialWeight) {
//计算超出重量
weight = weight - initialWeight;
excess = excessPrice * ((int) Math.ceil(1.0 * weight / excessWeight));
}
log.info("excess = {}", excess);
// log.info("excess = {}", excess);
//计算价格
if (type.equals("NORMAL")) {
......@@ -90,7 +90,7 @@ public class PddOverseaPriceTool {
} else {
price = price + sInitalPrice + excess;
}
log.info("price = {}", price);
// log.info("price = {}", price);
return price;
}
......
......@@ -86,14 +86,21 @@ public class UniPassUtil {
// UniPassPersonalClearanceCheckResult result = new UniPassPersonalClearanceCheckResult();
// result.setSuccess(false);
try {
ResponseEntity<String> resp = restTemplate.getForEntity(url, String.class);
ResponseEntity<String> resp = null;
int retry = 0;
// while (!resp.getStatusCode().is2xxSuccessful() & retry < 5) {
// retry++;
// resp = new RestTemplate().getForEntity(url, String.class);
// }
while (resp == null || ((!resp.getStatusCode().is2xxSuccessful()) && retry < 5)){
retry++;
try {
resp = restTemplate.getForEntity(url, String.class);
} catch (Exception e) {
log.error("获取unipass通关符号验证信息失败");
}
log.info("获取个人通关信息结果失败,重新获取");
}
// result.setMsg("查询验证失败!");
if (resp.getStatusCode().is2xxSuccessful()) {
log.info("查询成功");
XmlMapper xmlMapper = new XmlMapper();
String body = resp.getBody();
......
......@@ -655,8 +655,8 @@ public class CommonTest {
*/
@Test
public void destroy() {
String mailNo = "SF3298513357701";
String expressCode = "SF";
String mailNo = "46100002122388";
String expressCode = "JGWL";
String action = "destroy";
PddServiceConsoFirstBizActionNotifyRequest notifyRequest = new PddServiceConsoFirstBizActionNotifyRequest();
notifyRequest.setProviderCode(PddAPIConfig.PROVIDER_CODE);
......
This diff is collapsed.
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