Commit 15a4ed15 authored by AllenChen's avatar AllenChen

commit

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