|
|
@@ -32,23 +32,25 @@ class Model_itsxb extends Lin_Model {
|
|
|
|
|
|
$url = $this->useUrl."createOrder";
|
|
|
$params = $this->set_params($data);
|
|
|
- echo "<pre>";
|
|
|
- print_r($params);
|
|
|
- die;
|
|
|
- if(strlen($params['consignee']['consigneeProvince']) != 2){
|
|
|
- $g =array('x'=>'0','Description'=>"州省信息异常");
|
|
|
- return $g;
|
|
|
- }
|
|
|
- //如果是11位的且首位是1的就把1去掉
|
|
|
- if(strlen($params['consignee']['consigneePhone']) == 11){
|
|
|
- $sw_str = substr($params['consignee']['consigneePhone'], 0, 1);
|
|
|
-
|
|
|
- if($sw_str != 1){
|
|
|
- $g =array('x'=>'0','Description'=>"收件人电话异常");
|
|
|
+ if($data['printcode'] == '3PE_NONBOX' || $data['printcode'] == '3PE_XB'){
|
|
|
+ if(strlen($params['consignee']['consigneeProvince']) != 2){
|
|
|
+ $g =array('x'=>'0','Description'=>"州省信息异常");
|
|
|
return $g;
|
|
|
}
|
|
|
- $params['consignee']['consigneePhone'] = substr($params['consignee']['consigneePhone'], 1);
|
|
|
+ //如果是11位的且首位是1的就把1去掉
|
|
|
+ if(strlen($params['consignee']['consigneePhone']) == 11){
|
|
|
+ $sw_str = substr($params['consignee']['consigneePhone'], 0, 1);
|
|
|
+
|
|
|
+ if($sw_str != 1){
|
|
|
+ $g =array('x'=>'0','Description'=>"收件人电话异常");
|
|
|
+ return $g;
|
|
|
+ }
|
|
|
+ $params['consignee']['consigneePhone'] = substr($params['consignee']['consigneePhone'], 1);
|
|
|
+ }
|
|
|
}
|
|
|
+ echo "<pre>";
|
|
|
+ print_r($params);
|
|
|
+ die;
|
|
|
//consigneePhone
|
|
|
$this->logic_ding->sendToDing("3PE发货单请求的报文"."【".$data['number']."】".json_encode($params,JSON_UNESCAPED_SLASHES));
|
|
|
$start_time = time();
|