|
|
@@ -29,13 +29,17 @@ class ProductionLot extends Api
|
|
|
$this->error('请求错误');
|
|
|
}
|
|
|
$param = $this->request->param();
|
|
|
- if (empty($param) || isset($param['search']) === false){
|
|
|
- $this->error('参数错误');
|
|
|
+ $where = [
|
|
|
+ 'gd_statu' => '1-已完工',
|
|
|
+ ];
|
|
|
+ if (isset($param['search'])){
|
|
|
+ $where['Gd_gdbh|Gd_客户代号|成品名称'] = ['like','%'.$param['search'].'%'];
|
|
|
+ }else{
|
|
|
+ $where['Mod_rq'] = ['between',[date('Y-m-d 00:00:00',time()-1209600),date('Y-m-d H:i:s',time())]];
|
|
|
}
|
|
|
$list = \db('工单_基本资料')
|
|
|
->field('Gd_gdbh,Gd_cpmc,行号')
|
|
|
- ->where('Gd_gdbh|Gd_客户代号|成品名称','like','%'.$param['search'].'%')
|
|
|
- ->where('gd_statu','1-已完工')
|
|
|
+ ->where($where)
|
|
|
->group('行号')
|
|
|
->select();
|
|
|
if (empty($list)){
|