|
@@ -35,7 +35,7 @@ class SampleBus
|
|
|
return ['rows'=>$result,'total'=>$count];
|
|
|
}
|
|
|
|
|
|
- public function getSampleObj($task_id)
|
|
|
+ public function getSampleObj($task_id,$under_task_id)
|
|
|
{
|
|
|
$model_id = (new Ccjc())->getTaskInfoByTaskID($task_id)['test_model_id'];
|
|
|
$data = (new TestModel())->getProductInfo($model_id);
|
|
@@ -44,6 +44,22 @@ class SampleBus
|
|
|
|
|
|
}
|
|
|
|
|
|
+ public function createSampleId($task_id)
|
|
|
+ {
|
|
|
+ $task_class = (new Ccjc())->getTaskInfoByTaskID($task_id)['task_class'];
|
|
|
+ $count = (new Cyd())->countSampleCreateID();
|
|
|
+
|
|
|
+ if ($task_class=="例行监测") {
|
|
|
+ $id['id'] = 'LXJC' . date('Y') . date('m') . date('d') . date('H') . date('m') . str_pad(($count + 1), 4, 0, STR_PAD_LEFT);
|
|
|
+ }
|
|
|
+ if ($task_class=='专项监测'){
|
|
|
+ $id['id'] = 'ZXJC'.date('Y').date('m').date('d').date('H').date('m').str_pad(($count+1),4,0,STR_PAD_LEFT);
|
|
|
+ }
|
|
|
+ return $id;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public function createSample()
|
|
|
{
|
|
|
|