feat(pilot): 临床科研申请单新增业务类型字段
在申请单信息中增加 researchCategory(生物新技术临床科研/临床课题联合申报/生物制药研发),贯通 SQL、后端校验与 Web 表单/列表/详情;用户确认免除 Figma。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
ef3e015ff9
commit
6b1bf8a1d2
11 files changed
+157
-1
No files matched your search
@@ -28,6 +28,7 @@ class TestBasicExperimentCreateValidation(unittest.TestCase):
|
||||
db = MagicMock()
|
||||
data = {
|
||||
"bizType": "basic_experiment",
|
||||
"researchCategory": "bio_tech_clinical",
|
||||
"projectTitle": "课题A",
|
||||
"customerName": "",
|
||||
"customerContact": "张三",
|
||||
@@ -43,6 +44,25 @@ class TestBasicExperimentCreateValidation(unittest.TestCase):
|
||||
)
|
||||
self.assertIn("客户名称", str(ctx.exception))
|
||||
|
||||
def test_create_basic_experiment_requires_research_category(self):
|
||||
db = MagicMock()
|
||||
data = {
|
||||
"bizType": "basic_experiment",
|
||||
"projectTitle": "课题A",
|
||||
"customerName": "客户A",
|
||||
"customerContact": "张三",
|
||||
"customerPhone": "13800000000",
|
||||
}
|
||||
with self.assertRaises(ValueError) as ctx:
|
||||
crud.create_application(
|
||||
db,
|
||||
data=data,
|
||||
tenant_no="zkxw",
|
||||
user_id="user-1",
|
||||
dept_id="dept-1",
|
||||
)
|
||||
self.assertIn("业务类型", str(ctx.exception))
|
||||
|
||||
|
||||
class TestBasicExperimentSaleSchedules(unittest.TestCase):
|
||||
@patch("app.crud.pilot_application.create_schedule")
|
||||
|
||||
Reference in new issue
Block a user