|
@@ -262,17 +262,39 @@ class Outerrors extends Start_Controller{
|
|
|
],JSON_UNESCAPED_UNICODE));
|
|
],JSON_UNESCAPED_UNICODE));
|
|
|
$info = $this->logic_order->getInfo("waybill = '$waybill'");
|
|
$info = $this->logic_order->getInfo("waybill = '$waybill'");
|
|
|
$outtype = 1;
|
|
$outtype = 1;
|
|
|
- if(empty($info)){
|
|
|
|
|
- $info = $this->logic_order->getInfo("oldwaybill like '%/".$waybill."%'");
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
if(empty($info)){
|
|
if(empty($info)){
|
|
|
$outtype = 2;
|
|
$outtype = 2;
|
|
|
$info = $this->logic_order->getInfo("number = '$waybill'");
|
|
$info = $this->logic_order->getInfo("number = '$waybill'");
|
|
|
}
|
|
}
|
|
|
|
|
+ if(empty($info)){
|
|
|
|
|
+ $info = $this->logic_order->getInfo("oldwaybill like '%/".$waybill."%'");
|
|
|
|
|
+ if(!empty($info)){
|
|
|
|
|
+ $arr = [
|
|
|
|
|
+ 'number'=>$info['number'],
|
|
|
|
|
+ 'waybill'=>$waybill,//扫描单号
|
|
|
|
|
+ 'plat'=>$info['lv_platform'],
|
|
|
|
|
+ 'shop'=>$info['shop'],
|
|
|
|
|
+ 'remark'=>"无此数据",
|
|
|
|
|
+ 'scan_time'=>time(),
|
|
|
|
|
+ ];
|
|
|
|
|
+ if($this->outerrors->insert($arr)){
|
|
|
|
|
+ echo json_encode(['code'=>1,'msg'=>'扫描成功']);exit;
|
|
|
|
|
+ }else{
|
|
|
|
|
+ echo json_encode(['code'=>-1,'msg'=>'操作失败']);exit;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
if(empty($info)){
|
|
if(empty($info)){
|
|
|
echo json_encode(['code'=>-1,'msg'=>'未发现和 '.$waybill.' 关联的订单信息']);exit;
|
|
echo json_encode(['code'=>-1,'msg'=>'未发现和 '.$waybill.' 关联的订单信息']);exit;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ $info = $this->outerrors->find("waybill = '$waybill'");
|
|
|
|
|
+
|
|
|
|
|
+ if(!empty($num)){
|
|
|
|
|
+ echo json_encode(['code'=>-1,'msg'=>''.$waybill.' 的相关信息已录入,记录单号为:'.$info['number']]);exit;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
$r = $this->_outerrorinfo($info,$weight,$outtype);
|
|
$r = $this->_outerrorinfo($info,$weight,$outtype);
|
|
|
|
|
|
|
|
if($r['success']){
|
|
if($r['success']){
|