feat(market): 完善临床科研与委托加工上线能力

补齐项目组负责人审批、费用信息、合作客户、生产出库菜单、申请单号 LCKY 前缀及配套 SQL 迁移,并同步相关前后端与单测。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
cykjandCursor committed 2026-11-30 18:51:37 +08:00
1 parent 7a3c58ed99
commit c22a0d1eb0
77 files changed
+8375 -1869

No files matched your search

@@ -18,9 +18,9 @@ class TestBasicExperimentApplicationNo(unittest.TestCase):
result = crud._generate_application_no(db, "zkxw", biz_type="basic_experiment")
self.assertTrue(result.startswith("JCSY"))
self.assertNotIn("JCSQ", result)
self.assertEqual(result, "JCSY202606100001")
self.assertTrue(result.startswith("LCKY"))
self.assertNotIn("JCSY", result)
self.assertEqual(result, "LCKY202606100001")
class TestBasicExperimentCreateValidation(unittest.TestCase):
@@ -65,7 +65,8 @@ class TestBasicExperimentCreateValidation(unittest.TestCase):
)
self.assertIn("业务类型", str(ctx.exception))
def test_create_basic_experiment_requires_channel(self):
def test_create_basic_experiment_allows_missing_channel(self):
"""临床科研申请单不再要求渠道;缺项目负责人时仍会失败。"""
db = MagicMock()
data = {
"bizType": "basic_experiment",
@@ -83,7 +84,7 @@ class TestBasicExperimentCreateValidation(unittest.TestCase):
user_id="user-1",
dept_id="dept-1",
)
self.assertIn("渠道", str(ctx.exception))
self.assertNotIn("渠道", str(ctx.exception))
class TestBasicExperimentSaleSchedules(unittest.TestCase):