add dummy test

This commit is contained in:
mahdahar 2025-11-18 09:14:02 +07:00
parent 6a4cc3a0d6
commit 04b8c79911

View File

@ -126,17 +126,37 @@ class DummySeeder extends Seeder {
$this->db->table('workstation')->insertBatch($data);
// Test
$data = [
[ "TestSiteCode" => "QTNUM", "TestSiteName" => "Dummy Test Numeric", "Type" => $vs[27]['TNum'], "Description" => "Dum Dum Numeric", "SeqScr" => "1", "SeqRpt" => "1", "IndentLeft" => "0",
"VisibleScr" => $vs[2][1], "VisibleRpt" => $vs[2][1], "CountStat" => $vs[2][1], "CreateDate" => "$now" ],
[ "TestSiteCode" => "QTHRS", "TestSiteName" => "Dummy Test Threshold", "Type" => $vs[27]['TThrs'], "Description" => "Dum Dum Threshold", "SeqScr" => "2", "SeqRpt" => "2", "IndentLeft" => "0",
"VisibleScr" => $vs[2][1], "VisibleRpt" => $vs[2][1], "CountStat" => $vs[2][1], "CreateDate" => "$now" ],
[ "TestSiteCode" => "QPNUM1", "TestSiteName" => "Dummy Test Param1", "Type" => $vs[27]['PNum'], "Description" => "Dum Dum Param1", "SeqScr" => "3", "SeqRpt" => "3", "IndentLeft" => "0",
"VisibleScr" => $vs[2][1], "VisibleRpt" => $vs[2][1], "CountStat" => $vs[2][1], "CreateDate" => "$now" ],
[ "TestSiteCode" => "QPNUM2", "TestSiteName" => "Dummy Test Param2", "Type" => $vs[27]['PNum'], "Description" => "Dum Dum Param2", "SeqScr" => "4", "SeqRpt" => "4", "IndentLeft" => "0",
"VisibleScr" => $vs[2][1], "VisibleRpt" => $vs[2][1], "CountStat" => $vs[2][1], "CreateDate" => "$now" ],
];
$this->db->table('testdefsite')->insertBatch($data);
// TNUM
$data = [ "TestSiteCode" => "QTNUM1", "TestSiteName" => "Dummy Test Numeric", "Type" => $vs[27]['TNum'], "Description" => "Dum Dum Numeric", "SeqScr" => "10", "SeqRpt" => "10", "IndentLeft" => "0",
"VisibleScr" => $vs[2][1], "VisibleRpt" => $vs[2][1], "CountStat" => $vs[2][1], "CreateDate" => "$now" ];
$id = $this->db->table('testdefsite')->insert($data);
$data = [ "DisciplineID" => 1, "DepartmentID" => 1, "VSet"=>'', "SpcType" => $vs[15]["BLD"], "ReqQty"=>"5", "ReqQtyUnit"=>$vs[16]['mL'], "Unit1"=>$vs[28]["mg/L"],
"Decimal"=>2, "Method"=>"DIY", "ExpectedTAT"=>"200Y", "CreateDate"=> "$now" ];
$data['TestSiteID']= $id;
$id = $this->db->table('testdeftech')->insert($data);
$data = [ "TestSiteCode" => "QTNUM2", "TestSiteName" => "Dummy Test Numeric", "Type" => $vs[27]['TNum'], "Description" => "Dum Dum Numeric", "SeqScr" => "20", "SeqRpt" => "20", "IndentLeft" => "0",
"VisibleScr" => $vs[2][1], "VisibleRpt" => $vs[2][1], "CountStat" => $vs[2][1], "CreateDate" => "$now" ];
$id = $this->db->table('testdefsite')->insert($data);
$data = [ "DisciplineID" => 1, "DepartmentID" => 1, "VSet"=>'', "SpcType" => $vs[15]["BLD"], "ReqQty"=>"50", "ReqQtyUnit"=>$vs[16]['mL'], "Unit1"=>$vs[28]["g/L"],
"Decimal"=>1, "Method"=>"YOLO", "ExpectedTAT"=>"1000Y", "CreateDate"=> "$now" ];
$data['TestSiteID']= $id;
$id = $this->db->table('testdeftech')->insert($data);
// PNum
$data = [ "TestSiteCode" => "QPNUM1", "TestSiteName" => "Dummy Test Param", "Type" => $vs[27]['PNum'], "Description" => "Dum Dum Param", "SeqScr" => "40", "SeqRpt" => "40", "IndentLeft" => "0",
"VisibleScr" => $vs[2][1], "VisibleRpt" => $vs[2][1], "CountStat" => $vs[2][1], "CreateDate" => "$now" ];
$id = $this->db->table('testdefsite')->insert($data);
$data = [ "DisciplineID" => 1, "DepartmentID" => 1, "Decimal"=>2, "CreateDate"=> "$now" ];
$data['TestSiteID']= $id;
$id = $this->db->table('testdeftech')->insert($data);
$data = [ "TestSiteCode" => "QPNUM2", "TestSiteName" => "Dummy Test Param", "Type" => $vs[27]['PNum'], "Description" => "Dum Dum Param", "SeqScr" => "50", "SeqRpt" => "50", "IndentLeft" => "0",
"VisibleScr" => $vs[2][1], "VisibleRpt" => $vs[2][1], "CountStat" => $vs[2][1], "CreateDate" => "$now" ];
$id = $this->db->table('testdefsite')->insert($data);
$data = [ "DisciplineID" => 1, "DepartmentID" => 1, "Decimal"=>3, "CreateDate"=> "$now" ];
$data['TestSiteID']= $id;
$id = $this->db->table('testdeftech')->insert($data);
}
}