|
@@ -435,16 +435,41 @@ class Model_express_tt extends Lin_Model {
|
|
|
* 创建CBT发货单和运单标签
|
|
* 创建CBT发货单和运单标签
|
|
|
*/
|
|
*/
|
|
|
public function doCreateCBTLabel($info,$shop_info){
|
|
public function doCreateCBTLabel($info,$shop_info){
|
|
|
- //获取快递服务信息
|
|
|
|
|
- $res = $this->getExpressCompany($info,$shop_info);
|
|
|
|
|
- if($res['x'] == 0){
|
|
|
|
|
- return $res;
|
|
|
|
|
- }
|
|
|
|
|
- $res1 = $this->createExpressLabel($res['data'],$shop_info);
|
|
|
|
|
- if($res1['x'] == 0){
|
|
|
|
|
- return $res1;
|
|
|
|
|
- }
|
|
|
|
|
- return $res1;
|
|
|
|
|
|
|
+ if($info['merge'] == $info['id']){
|
|
|
|
|
+ $extra_text = json_decode($info['extra_text'],true);
|
|
|
|
|
+ if(is_string($extra_text)){
|
|
|
|
|
+ $extra_text = json_decode($extra_text,true);
|
|
|
|
|
+ }
|
|
|
|
|
+ if(empty($extra_text['label_info'])){
|
|
|
|
|
+ $res = $this->getDetail($info,$shop_info[0]);
|
|
|
|
|
+ if($res['x'] == 0){
|
|
|
|
|
+ return $res;
|
|
|
|
|
+ }
|
|
|
|
|
+ return [
|
|
|
|
|
+ 'x'=>1,
|
|
|
|
|
+ 'msg'=>"OK",
|
|
|
|
|
+ 'data'=>$res['data']
|
|
|
|
|
+ ];
|
|
|
|
|
+ }else{
|
|
|
|
|
+ return [
|
|
|
|
|
+ 'x'=>1,
|
|
|
|
|
+ 'msg'=>"OK",
|
|
|
|
|
+ 'data'=>$info
|
|
|
|
|
+ ];
|
|
|
|
|
+ }
|
|
|
|
|
+ }else{
|
|
|
|
|
+ //获取快递服务信息
|
|
|
|
|
+ $res = $this->getExpressCompany($info,$shop_info);
|
|
|
|
|
+ if($res['x'] == 0){
|
|
|
|
|
+ return $res;
|
|
|
|
|
+ }
|
|
|
|
|
+ $res1 = $this->createExpressLabel($res['data'],$shop_info);
|
|
|
|
|
+ if($res1['x'] == 0){
|
|
|
|
|
+ return $res1;
|
|
|
|
|
+ }
|
|
|
|
|
+ return $res1;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
/**
|
|
/**
|
|
|
* 获取快递承运商
|
|
* 获取快递承运商
|