|
@@ -33,8 +33,19 @@ class Custom extends Api
|
|
|
$this->error('非法请求');
|
|
$this->error('非法请求');
|
|
|
}
|
|
}
|
|
|
$field = 'rtrim(客户编号) as 客户编号,rtrim(客户名称) as 客户名称';
|
|
$field = 'rtrim(客户编号) as 客户编号,rtrim(客户名称) as 客户名称';
|
|
|
- $list = db('产品_基本资料')->distinct(true)->field($field)->order('客户编号 asc')->select();
|
|
|
|
|
- $this->success('请求成功',$list);
|
|
|
|
|
|
|
+ $list = db('产品_基本资料')->where('客户名称','not null')->distinct(true)->field($field)->order('客户编号 asc')->select();
|
|
|
|
|
+ $Ydata = [];
|
|
|
|
|
+ $Jdata = [];
|
|
|
|
|
+ foreach ($list as $key => $value){
|
|
|
|
|
+ if (substr($value['客户编号'],0,1) == 'Y'){
|
|
|
|
|
+ array_push($Ydata,$value);
|
|
|
|
|
+ }else{
|
|
|
|
|
+ array_push($Jdata,$value);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ $data['印刷产品'] = $Ydata;
|
|
|
|
|
+ $data['糊盒产品'] = $Jdata;
|
|
|
|
|
+ $this->success('请求成功',$data);
|
|
|
}
|
|
}
|
|
|
/**
|
|
/**
|
|
|
* 客户资料管理
|
|
* 客户资料管理
|