uid = $JwtAuth->getUid(); } public function selectSampleList($task_id,$pageNum,$pageSize) { $uid = $this->uid; $where=[ ['task_id', '=', $task_id], ['sample_unit', '=', $uid] ]; $result = (new Cyd())->selectSampleListByTaskIdAndUid($where, $pageNum, $pageSize); $count = (new Cyd())->countSampleListByTaskIdAndUid($where); return ['rows'=>$result,'total'=>$count]; } public function getSampleObj($task_id) { $model_id = (new Ccjc())->getTaskInfoByTaskID($task_id)['test_model_id']; $data = (new TestModel())->getProductInfo($model_id); $result=(new Arr())->Arr_columns($data, 'product_name,product_id'); return $result; } public function createSample() { ///todo 没写呢 $res=Db::name('cyd')->strict(false)->insert($data); $data['units_id']=Db::name('units_test')->strict(false)->insertGetId($data['units']); $data['product_unit']=Db::name('production')->strict(false)->insertGetId($data['production']); $data['sample_unit']=$this->request->user['unit_id']->getValue(); } }