|
@@ -178,6 +178,37 @@ class Model_logic_u9action extends Lin_Model {
|
|
|
return $this->logic_tools->ret_arr(-1,"销售单创建失败");
|
|
return $this->logic_tools->ret_arr(-1,"销售单创建失败");
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ //方便测试
|
|
|
|
|
+ public function createXsdGC($info){
|
|
|
|
|
+ $order_info = $this->logic_order->getInfo('number = "'.$info['order_no'].'"',"number,shop,shouldmoney");
|
|
|
|
|
+ if(empty($order_info)){
|
|
|
|
|
+ return [];
|
|
|
|
|
+ }
|
|
|
|
|
+ $shop = $this->shop->read($order_info['shop']);
|
|
|
|
|
+ $tren_info = $this->systemtransfer->read($info['child_order_no']);
|
|
|
|
|
+ $token = $this->getToken('120');
|
|
|
|
|
+ $params = [
|
|
|
|
|
+ 'yyid'=>$shop['yyid'],
|
|
|
|
|
+ 'number'=>$info['order_no'],
|
|
|
|
|
+ 'time'=>time(),
|
|
|
|
|
+ 'list'=>[
|
|
|
|
|
+ [
|
|
|
|
|
+ 'jm'=>$tren_info['jm'],
|
|
|
|
|
+ 'dcsl'=>1,
|
|
|
|
|
+ 'final_price'=>1,
|
|
|
|
|
+ ]
|
|
|
|
|
+ ]
|
|
|
|
|
+ ];
|
|
|
|
|
+ //由于工厂自己的销售单 比外贸的多一些设置 所以又启用了一些新的方法
|
|
|
|
|
+ $res = $this->apiyyv1->gcxsdWaiXiaoCreate($params,$token);
|
|
|
|
|
+ if($res[0]['Data'][0]['m_isSucess'] != 1){
|
|
|
|
|
+ $this->editData($info['id'],['xs_status'=>-1,'update_time'=>time()],$info['order_no'],2,1,'xs',$res[1],$res[0]);
|
|
|
|
|
+ return $this->logic_tools->ret_arr(1,"销售单创建成功");
|
|
|
|
|
+ }else{
|
|
|
|
|
+ $this->editData($info['id'],['xs_no'=>$res[0]['Data'][0]['m_code'],'xs_status'=>1,'update_time'=>time()],$info['order_no'],2,1,'xs',$res[1],$res[0]);
|
|
|
|
|
+ return $this->logic_tools->ret_arr(-1,"销售单创建失败");
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
//
|
|
//
|
|
|
public function checkXsd($info){
|
|
public function checkXsd($info){
|
|
|
|
|
|