public static function saveOne($provinceId, $majorJobId, $name, $createUserId) { $examTemplate = new ExamTemplate(); $examTemplate->name = $name; $examTemplate->provinceId = $provinceId; $examTemplate->majorJobId = $majorJobId; $examTemplate->createUserId = $createUserId; $examTemplate->pa1 = "0|0"; $examTemplate->pa2 = "0|0"; $examTemplate->pa3 = "0|0"; $examTemplate->pa4 = "0|0"; $examTemplate->pb1 = "0|0"; $examTemplate->pb2 = "0|0"; $examTemplate->pb3 = "0|0"; $examTemplate->pb4 = "0|0"; $examTemplate->createDate = DateFunctions::getCurrentDate(); $examTemplate->state = ExamTemplate::STATE_DISABLE; if (!$examTemplate->save()) { throw new Exception("模拟试卷模板保存错误"); } return $examTemplate->examTemplateId; }