|
|
@@ -87,7 +87,7 @@ class Facility extends Api
|
|
|
$date = input('date');
|
|
|
$where = [
|
|
|
'sczl_jtbh' => $machine,
|
|
|
- 'sczl_rq' => date('Y-m-d H:i:s',strtotime($date.' 00:00:00')),
|
|
|
+ '开工时间' => date('Y-m-d H:i:s',strtotime($date.' 00:00:00')),
|
|
|
];
|
|
|
$field = 'rtrim(sczl_gdbh) as 工单编号,rtrim(sczl_dedh) as dedh,rtrim(sczl_yjno) as yjno,rtrim(sczl_gxh) as gxh,rtrim(sczl_gxmc) as gxmc,rtrim(sczl_num) as num,rtrim(sczl_sj1) as sj1,
|
|
|
rtrim(sczl_sj2) as sj2,rtrim(sczl_cl) as 产量,rtrim(sczl_bzdh) as bzdh,rtrim(sczl_zcfp) as 制程废品,rtrim(sczl_zccp) as 制程次品,rtrim(sczl_前工序废) as 前工序废,rtrim(sczl_来料少数) as 来料异常,
|
|
|
@@ -255,11 +255,11 @@ class Facility extends Api
|
|
|
$this->success('未找到生产订单');
|
|
|
}
|
|
|
$endTime = \db('工单_工艺资料')
|
|
|
- ->where('Gy0_gdbh',$data['工单编号'])
|
|
|
- ->where('Gy0_yjno',$data['印件号'])
|
|
|
- ->where('Gy0_gxh',$data['工序号'])
|
|
|
- ->where('Gy0_sbbh','like','%'.$machine.'%')
|
|
|
+ ->where('UniqId',$data['任务ID'])
|
|
|
->find();
|
|
|
+ if (empty($endTime)){
|
|
|
+ $this->error('未找到');
|
|
|
+ }
|
|
|
$list = [];
|
|
|
if ($endTime['PD_WG'] === '1900-01-01 00:00:00'){
|
|
|
$list['工单编号'] = $data['工单编号'];
|