|
|
@@ -3113,4 +3113,39 @@ class Facility extends Api
|
|
|
$this->error('未找到相关数据');
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 检验记录
|
|
|
+ * @ApiMethod (GET)
|
|
|
+ * @param string $machine 机台编号
|
|
|
+ * @param string $workOrder 工单编号
|
|
|
+ * @param string $team 班次
|
|
|
+ * @return void
|
|
|
+ * @throws \think\db\exception\DataNotFoundException
|
|
|
+ * @throws \think\db\exception\ModelNotFoundException
|
|
|
+ * @throws \think\exception\DbException
|
|
|
+ */
|
|
|
+ public function ProcessInspectionRecord()
|
|
|
+ {
|
|
|
+ if ($this->request->isGet() === false){
|
|
|
+ $this->error('请求失败');
|
|
|
+ }
|
|
|
+ $machine = input('machine');
|
|
|
+ $date = input('date');
|
|
|
+ $team = input('team');
|
|
|
+ if (empty($machine) || empty($team) || empty($date)){
|
|
|
+ $this->success('');
|
|
|
+ }
|
|
|
+ $where = [
|
|
|
+ '设备编号' => $machine,
|
|
|
+ '班组编号' => ['like',$team.'%'],
|
|
|
+ '开工时间' => ['like',$date.'%'],
|
|
|
+ '类别' => ['in',['IPQC检验','机台检验','首件与过程确认']],
|
|
|
+ ];
|
|
|
+ //检测记录详情
|
|
|
+ $field = 'rtrim(工单编号) as 工单编号,rtrim(印件号) as 印件号,rtrim(工序名称) as 工序名称,rtrim(类别) as 类别,rtrim(流程单号) as 流程单号,
|
|
|
+ rtrim(检验项目) as 检验项目,rtrim(检验结果) as 检验结果,rtrim(量测仪器) as 量测仪器,rtrim(提交时间) as 提交时间';
|
|
|
+ $data = \db('制程检验_记录')->where($where)->field($field)->select();
|
|
|
+ $this->success('成功',$data);
|
|
|
+ }
|
|
|
}
|