|
|
@@ -148,14 +148,12 @@ class Facility extends Api
|
|
|
'设备编号' => $machine,
|
|
|
'开工时间' => ['between',[date('Y-m-d 08:00:00',strtotime($date)),date('Y-m-d 08:00:00',strtotime($date)+86400)]],
|
|
|
'类别' => ['in',['IPQC检验','机台检验']],
|
|
|
- 'sys_rq' => ['>',date('Y-m-d 08:30:00',strtotime($date))]
|
|
|
];
|
|
|
$field = 'rtrim(工单编号) as 工单编号,rtrim(印件号) as 印件号,rtrim(工序名称) as 工序名称,提交时间,rtrim(检验项目) as 检验项目';
|
|
|
$list = \db('制程检验_记录')
|
|
|
->where($where)
|
|
|
->field($field)
|
|
|
->cache(true,86400)
|
|
|
-// ->order('提交时间 desc')
|
|
|
->select();
|
|
|
if (empty($list)){
|
|
|
$this->success('未找到检验记录');
|
|
|
@@ -344,17 +342,13 @@ class Facility extends Api
|
|
|
if (empty($workOrder)){
|
|
|
$this->error('参数错误');
|
|
|
}
|
|
|
-// $lastUniqid = \db('设备_产量计酬')->field('UniqId')->order('UniqId desc')->find();
|
|
|
-// $startUniqid = $lastUniqid['UniqId']-100000;
|
|
|
//右边工艺及完成数量
|
|
|
$Process = \db('设备_产量计酬')->where('sczl_gdbh',$workOrder)
|
|
|
-// ->where('UniqId','>',$startUniqid)
|
|
|
->distinct(true)->order('sczl_gxh')
|
|
|
->column('sczl_gxh');
|
|
|
$data = [];
|
|
|
foreach ($Process as $k=>$v){
|
|
|
$res= \db('设备_产量计酬')->where('sczl_gdbh',$workOrder)
|
|
|
-// ->where('UniqId','>',$startUniqid)
|
|
|
->where('sczl_gxh',$v)
|
|
|
->field('rtrim(sczl_yjno) as sczl_yjno,rtrim(sczl_gxmc) as sczl_gxmc')
|
|
|
->find();
|
|
|
@@ -1132,6 +1126,9 @@ class Facility extends Api
|
|
|
array_push($data['IPQC'],$value['提交时间']);
|
|
|
}
|
|
|
}
|
|
|
+ $data['首件'] = array_values(array_unique($data['首件']));
|
|
|
+ $data['自检'] = array_values(array_unique($data['自检']));
|
|
|
+ $data['IPQC'] = array_values(array_unique($data['IPQC']));
|
|
|
$this->success('成功',$data);
|
|
|
}
|
|
|
}
|