|
@@ -442,11 +442,11 @@ public class KuaiDi100 {
|
|
|
* @param code
|
|
|
* @return
|
|
|
*/
|
|
|
- public JSONObject selectCourierCompany2(String code,String num) {
|
|
|
+ public JSONObject selectCourierCompany2(LogisticsInfo logisticsInfo,String num) {
|
|
|
// 调用百度的接口
|
|
|
try {
|
|
|
- String temp = logisticsConversions(code.toLowerCase());
|
|
|
- String baiduURL = "https://sp0.baidu.com/9_Q4sjW91Qh3otqbppnN2DJv/pae/channel/data/asyncqury?cb=cb&appid=4001&nu="+num+"&com="+temp;
|
|
|
+ /*String temp = logisticsConversions(code.toLowerCase());*/
|
|
|
+ String baiduURL = "https://sp0.baidu.com/9_Q4sjW91Qh3otqbppnN2DJv/pae/channel/data/asyncqury?cb=cb&appid=4001&nu="+num+"&com="+logisticsInfo.getLogisticsOnehundredCode();
|
|
|
String result = HttpClient431Util.doGet2(null, baiduURL,"BAIDUID=E157C876272626E1F7F498C10A6A3F00:FG=1");
|
|
|
String content = result.substring(7, result.length());
|
|
|
content = content.substring(0, content.length()-1);
|
|
@@ -460,7 +460,7 @@ public class KuaiDi100 {
|
|
|
}
|
|
|
// 调用快递鸟的接口
|
|
|
try {
|
|
|
- String result = selectCourierSF(code, num);
|
|
|
+ String result = selectCourierSF(logisticsInfo.getLogisticsRstCode(), num);
|
|
|
JSONObject jn = JSONObject.fromObject(result);
|
|
|
if (result != null && jn.getInt("State") != 0) {
|
|
|
SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
@@ -496,10 +496,10 @@ public class KuaiDi100 {
|
|
|
* @param code
|
|
|
* @return
|
|
|
*/
|
|
|
- public Date selectCourierSignTime(String code, String num){
|
|
|
+ public Date selectCourierSignTime(LogisticsInfo logisticsInfo, String num){
|
|
|
JSONObject json = null;
|
|
|
for(int i = 0; i < 3; i++){
|
|
|
- json = selectCourierCompany2(code,num);
|
|
|
+ json = selectCourierCompany2(logisticsInfo,num);
|
|
|
if(json.getString("status").equals("0")){
|
|
|
break;
|
|
|
}
|
|
@@ -526,14 +526,14 @@ public class KuaiDi100 {
|
|
|
/**
|
|
|
* 百度快递查询签收时间 - 查询揽件时间
|
|
|
* 根据物流单号查询快递信息 state 0在途,1揽收,2疑难,3签收,4退签,5派件,6退回
|
|
|
- * @param code
|
|
|
+ * @param
|
|
|
* @return
|
|
|
*/
|
|
|
- public Date selectCourierSignCaseTime(String code, String num){
|
|
|
+ public Date selectCourierSignCaseTime(LogisticsInfo logisticsInfo, String num){
|
|
|
JSONObject json = null;
|
|
|
boolean flag = false;
|
|
|
for(int i = 0; i < 3; i++){
|
|
|
- json = selectCourierCompany2(code,num);
|
|
|
+ json = selectCourierCompany2(logisticsInfo,num);
|
|
|
if (json == null) {
|
|
|
break;
|
|
|
}
|