|
@@ -412,7 +412,7 @@ class Manufacture extends Api
|
|
|
'Gy0_gxh' => $data['processCode']
|
|
'Gy0_gxh' => $data['processCode']
|
|
|
];
|
|
];
|
|
|
$result = \db('工单_工艺资料')->where($where)->field('rtrim(Gy0_sj1) as sj1')->find();
|
|
$result = \db('工单_工艺资料')->where($where)->field('rtrim(Gy0_sj1) as sj1')->find();
|
|
|
- if ($result['sj1']>'1900-01-01 00:00:00'){
|
|
|
|
|
|
|
+ if ($result['sj1'] != '1900-01-01 00:00:00'){
|
|
|
$this->error('该工单已经是制程中');
|
|
$this->error('该工单已经是制程中');
|
|
|
}
|
|
}
|
|
|
$lastTime = \db('工单_工艺资料')
|
|
$lastTime = \db('工单_工艺资料')
|
|
@@ -748,6 +748,13 @@ class Manufacture extends Api
|
|
|
if (empty($param)){
|
|
if (empty($param)){
|
|
|
$this->error('参数错误');
|
|
$this->error('参数错误');
|
|
|
}
|
|
}
|
|
|
|
|
+ $where = '';
|
|
|
|
|
+ if (isset($param['search'])){
|
|
|
|
|
+ $where = "
|
|
|
|
|
+ a.Gd_gdbh LIKE '%{$param['search']}%'
|
|
|
|
|
+ OR a.`成品名称` LIKE '%{$param['search']}%'
|
|
|
|
|
+ ";
|
|
|
|
|
+ }
|
|
|
$list = \db('工单_基本资料')
|
|
$list = \db('工单_基本资料')
|
|
|
->alias('a')
|
|
->alias('a')
|
|
|
->field([
|
|
->field([
|
|
@@ -790,6 +797,7 @@ class Manufacture extends Api
|
|
|
'b.Gy0_sbbh' => ['LIKE','%'.$param['machine'].'%'],
|
|
'b.Gy0_sbbh' => ['LIKE','%'.$param['machine'].'%'],
|
|
|
'b.PD_WG' => '1900-01-01 00:00:00'
|
|
'b.PD_WG' => '1900-01-01 00:00:00'
|
|
|
])
|
|
])
|
|
|
|
|
+ ->where($where)
|
|
|
->group('a.Gd_gdbh')
|
|
->group('a.Gd_gdbh')
|
|
|
->select();
|
|
->select();
|
|
|
if (empty($list)){
|
|
if (empty($list)){
|