|
@@ -170,7 +170,7 @@ class Manufacture extends Api
|
|
|
$this->error('参数错误');
|
|
$this->error('参数错误');
|
|
|
}
|
|
}
|
|
|
$where = '';
|
|
$where = '';
|
|
|
- if (isset($param['search'])){
|
|
|
|
|
|
|
+ if (!empty($param['search'])){
|
|
|
$where = "
|
|
$where = "
|
|
|
a.Gd_gdbh LIKE '%{$param['search']}%'
|
|
a.Gd_gdbh LIKE '%{$param['search']}%'
|
|
|
OR a.`成品名称` LIKE '%{$param['search']}%'
|
|
OR a.`成品名称` LIKE '%{$param['search']}%'
|
|
@@ -197,14 +197,14 @@ class Manufacture extends Api
|
|
|
->where([
|
|
->where([
|
|
|
'a.gd_statu' => '2-生产中',
|
|
'a.gd_statu' => '2-生产中',
|
|
|
'a.行号' => '1',
|
|
'a.行号' => '1',
|
|
|
- 'b.PD_WG' => '1900-01-01 00:00:00',
|
|
|
|
|
- 'b.Gy0_sj1' => '1900-01-01 00:00:00',
|
|
|
|
|
'c.状态' => '',
|
|
'c.状态' => '',
|
|
|
])
|
|
])
|
|
|
- ->where("
|
|
|
|
|
- b.Gy0_sj1 <> '1900-01-01 00:00:00'
|
|
|
|
|
- ")
|
|
|
|
|
->where($where)
|
|
->where($where)
|
|
|
|
|
+ ->whereNotExists(function ($query) {
|
|
|
|
|
+ $query->table('工单_工艺资料')->alias('b2')
|
|
|
|
|
+ ->where('b2.Gy0_gdbh = a.Gd_gdbh')
|
|
|
|
|
+ ->where('b2.Gy0_sj1 <> "1900-01-01 00:00:00"');
|
|
|
|
|
+ })
|
|
|
->group('a.Gd_gdbh')
|
|
->group('a.Gd_gdbh')
|
|
|
->select();
|
|
->select();
|
|
|
}else{
|
|
}else{
|