This commit is contained in:
zlwu committed 2026-05-25 15:14:06 +08:00
1 parent 575e63e7e8
commit 771f010a39
165 files changed
+67359 -21698

No files matched your search

@@ -1,125 +0,0 @@
-- ============================================================
-- 渠道服务订单:多次操作流水模型迁移
-- Date: 2026-05-24
-- ============================================================
-- 1. 新增操作流水表
DROP TABLE IF EXISTS `biz_channel_service_order_txn`;
CREATE TABLE `biz_channel_service_order_txn` (
`id` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '主键ID',
`service_order_id` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '关联订单ID',
`txn_type` varchar(16) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'recharge/refund/purchase/unsubscribe',
`amount` decimal(18,2) DEFAULT NULL COMMENT '本次操作金额',
`txn_status` varchar(16) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'dsx' COMMENT 'dsx待生效 dqr待财务确认 yqr已确认 yzf已作废',
`products_json` text COLLATE utf8mb4_unicode_ci COMMENT '产品明细JSON(purchase/unsubscribe类型)',
`remark` varchar(512) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '备注',
`finance_submit_by` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '发起确认人ID',
`finance_submit_time` datetime DEFAULT NULL COMMENT '发起确认时间',
`finance_submit_remark` varchar(512) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '发起确认备注',
`finance_submit_attachments` text COLLATE utf8mb4_unicode_ci COMMENT '发起确认附件',
`finance_confirm_time` datetime DEFAULT NULL COMMENT '财务确认时间',
`finance_confirm_attachments` text COLLATE utf8mb4_unicode_ci COMMENT '财务确认附件',
`finance_remark` varchar(512) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '财务确认备注',
`balance_before` decimal(18,2) DEFAULT NULL COMMENT '操作前余额(yfk类型)',
`balance_after` decimal(18,2) DEFAULT NULL COMMENT '操作后余额(yfk类型)',
`tenant_no` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'zkxw' COMMENT '租户编号',
`order_num` int(11) DEFAULT NULL COMMENT '排序号',
`create_by` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '创建人id',
`create_dept_id` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '创建人部门ID',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_by` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '更新人id',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`del_flag` tinyint(4) NOT NULL DEFAULT '0' COMMENT '删除标记',
PRIMARY KEY (`id`),
KEY `idx_txn_order` (`service_order_id`, `del_flag`),
KEY `idx_txn_status` (`txn_status`, `tenant_no`, `del_flag`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='渠道服务订单操作流水';
-- 2. 订单主表新增汇总字段
ALTER TABLE `biz_channel_service_order`
ADD COLUMN `total_recharge_amount` decimal(18,2) NOT NULL DEFAULT 0.00 COMMENT '累计充值总额' AFTER `channel_agreement_id`,
ADD COLUMN `total_refund_amount` decimal(18,2) NOT NULL DEFAULT 0.00 COMMENT '累计退款总额' AFTER `total_recharge_amount`,
ADD COLUMN `current_balance` decimal(18,2) NOT NULL DEFAULT 0.00 COMMENT '当前余额' AFTER `total_refund_amount`;
-- 3. 产品持仓表新增字段
ALTER TABLE `biz_channel_service_order_product`
ADD COLUMN `total_buy_qty` decimal(18,4) NOT NULL DEFAULT 0.0000 COMMENT '累计购买数量' AFTER `buy_amount`,
ADD COLUMN `total_unsubscribe_qty` decimal(18,4) NOT NULL DEFAULT 0.0000 COMMENT '累计退订数量' AFTER `total_buy_qty`,
ADD COLUMN `current_qty` decimal(18,4) NOT NULL DEFAULT 0.0000 COMMENT '当前持有数量' AFTER `total_unsubscribe_qty`,
ADD COLUMN `total_unsubscribe_amount` decimal(18,2) NOT NULL DEFAULT 0.00 COMMENT '累计退订金额' AFTER `current_qty`;
-- ============================================================
-- 以下为数据迁移(可选执行,用于保留历史数据)
-- ============================================================
-- 4. 迁移现有充值记录到流水表
INSERT INTO `biz_channel_service_order_txn` (
`id`, `service_order_id`, `txn_type`, `amount`, `txn_status`,
`remark`,
`finance_submit_by`, `finance_submit_time`, `finance_submit_remark`, `finance_submit_attachments`,
`finance_confirm_time`, `finance_confirm_attachments`, `finance_remark`,
`balance_before`, `balance_after`,
`tenant_no`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`
)
SELECT
REPLACE(UUID(),'-','') AS `id`,
o.`id` AS `service_order_id`,
'recharge' AS `txn_type`,
o.`prepay_amount` AS `amount`,
CASE
WHEN o.`finance_confirm_time` IS NOT NULL THEN 'yqr'
WHEN o.`finance_submit_time` IS NOT NULL THEN 'dqr'
ELSE 'dsx'
END AS `txn_status`,
o.`remark`,
o.`finance_submit_by`, o.`finance_submit_time`, o.`finance_submit_remark`, o.`finance_submit_attachments`,
o.`finance_confirm_time`, o.`finance_confirm_attachments`, o.`finance_remark`,
o.`balance_before`, o.`balance_after`,
o.`tenant_no`, o.`create_by`, o.`create_dept_id`, o.`create_time`, o.`update_by`, o.`update_time`, o.`del_flag`
FROM `biz_channel_service_order` o
WHERE o.`order_type` = 'yfk' AND (o.`finance_submit_time` IS NOT NULL OR o.`prepay_amount` IS NOT NULL);
-- 5. 迁移退款记录到流水表
INSERT INTO `biz_channel_service_order_txn` (
`id`, `service_order_id`, `txn_type`, `amount`, `txn_status`,
`remark`,
`finance_submit_by`, `finance_submit_time`, `finance_submit_remark`, `finance_submit_attachments`,
`finance_confirm_time`, `finance_confirm_attachments`, `finance_remark`,
`tenant_no`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`
)
SELECT
REPLACE(UUID(),'-','') AS `id`,
o.`id` AS `service_order_id`,
'refund' AS `txn_type`,
o.`refund_amount` AS `amount`,
CASE
WHEN o.`refund_finance_confirm_time` IS NOT NULL THEN 'yqr'
ELSE 'dqr'
END AS `txn_status`,
o.`refund_remark` AS `remark`,
o.`refund_apply_by` AS `finance_submit_by`,
o.`refund_apply_time` AS `finance_submit_time`,
o.`refund_remark` AS `finance_submit_remark`,
o.`refund_attachments` AS `finance_submit_attachments`,
o.`refund_finance_confirm_time` AS `finance_confirm_time`,
o.`refund_finance_confirm_attachments` AS `finance_confirm_attachments`,
o.`refund_finance_remark` AS `finance_remark`,
o.`tenant_no`, o.`refund_apply_by` AS `create_by`, o.`create_dept_id`,
COALESCE(o.`refund_apply_time`, o.`update_time`) AS `create_time`,
o.`update_by`, o.`update_time`, o.`del_flag`
FROM `biz_channel_service_order` o
WHERE o.`refund_amount` IS NOT NULL AND o.`refund_amount` > 0;
-- 6. 回填主表汇总字段(yfk类型)
UPDATE `biz_channel_service_order` o
SET
`total_recharge_amount` = COALESCE(o.`prepay_amount`, 0),
`total_refund_amount` = COALESCE(o.`refund_amount`, 0),
`current_balance` = COALESCE(o.`prepay_amount`, 0) - COALESCE(o.`refund_amount`, 0)
WHERE o.`order_type` = 'yfk' AND o.`prepay_amount` IS NOT NULL;
-- 7. 回填产品持仓表的累计字段
UPDATE `biz_channel_service_order_product` p
SET
`total_buy_qty` = COALESCE(p.`buy_qty`, 0),
`current_qty` = COALESCE(p.`buy_qty`, 0);
+129 -28
View File
@@ -11,7 +11,7 @@
Target Server Version : 50736 (5.7.36)
File Encoding : 65001
Date: 24/05/2026 21:33:11
Date: 25/05/2026 12:53:10
*/
SET NAMES utf8mb4;
@@ -156,6 +156,7 @@ INSERT INTO `biz_attachment` (`id`, `business_type`, `business_id`, `original_na
INSERT INTO `biz_attachment` (`id`, `business_type`, `business_id`, `original_name`, `file_ext`, `file_url`, `file_size`, `file_type`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('54ddaaf36d694b679834db3204432a08', NULL, NULL, '0fb7a9ee09724a46bfc8b85cbaeb21c3.jpeg', 'jpeg', 'sample-reception/202605/20/2ee0758e103141ba954f35b6a5a90cc5.jpeg', 30578, 'image/jpeg', 'zkxw', NULL, NULL, 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-20 13:21:06', NULL, '2026-05-20 13:21:06', 0);
INSERT INTO `biz_attachment` (`id`, `business_type`, `business_id`, `original_name`, `file_ext`, `file_url`, `file_size`, `file_type`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('5561abcd2cb5489588c7d377334d0cf0', NULL, NULL, '0aab48e2ff412201e89667ef5a1465b1.jpeg', 'jpeg', 'channel-service-order/202605/24/353084f4e5e84c28a5869a43bcd9a6eb.jpeg', 30578, 'image/jpeg', 'zkxw', NULL, NULL, 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-24 21:24:51', NULL, '2026-05-24 21:24:51', 0);
INSERT INTO `biz_attachment` (`id`, `business_type`, `business_id`, `original_name`, `file_ext`, `file_url`, `file_size`, `file_type`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('56e73b0453ad4f8f9900b005309de14e', NULL, NULL, '0cc02a211bdcaaa15ae4b8b62dabd3dc (1).jpeg', 'jpeg', 'qc-lab/202605/20/653fcae4426e4a0c9559d22fa971e5ce.jpeg', 17985, 'image/jpeg', 'zkxw', NULL, NULL, 'd3000000000000000000000000000001', '', '2026-05-20 06:24:02', NULL, '2026-05-20 06:24:02', 0);
INSERT INTO `biz_attachment` (`id`, `business_type`, `business_id`, `original_name`, `file_ext`, `file_url`, `file_size`, `file_type`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('582554afdd9948e79b479a0f9f37de29', NULL, NULL, '0eee40147c69c50aa9701cb27fe1b73c.jpeg', 'jpeg', 'channel-service-order/202605/24/498a82d2ecd6448ca0ced7ce2bfeb4a0.jpeg', 77222, 'image/jpeg', 'zkxw', NULL, NULL, 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-24 21:47:04', NULL, '2026-05-24 21:47:04', 0);
INSERT INTO `biz_attachment` (`id`, `business_type`, `business_id`, `original_name`, `file_ext`, `file_url`, `file_size`, `file_type`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('58401177ce0f4bf0b2e50e87769f82b0', NULL, NULL, '0cc02a211bdcaaa15ae4b8b62dabd3dc.jpeg', 'jpeg', 'protocol-payment-refund/202605/17/e59fb6b0393247da990ec242e66fc951.jpeg', 17985, 'image/jpeg', 'zkxw', NULL, NULL, 'd3000000000000000000000000000001', '', '2026-05-17 11:26:11', NULL, '2026-05-17 11:26:11', 0);
INSERT INTO `biz_attachment` (`id`, `business_type`, `business_id`, `original_name`, `file_ext`, `file_url`, `file_size`, `file_type`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('588f2807738840989b9d40ca5623ba32', NULL, NULL, '0fb7a9ee09724a46bfc8b85cbaeb21c3.jpeg', 'jpeg', 'protocol-payment/202605/16/a0152723d46944fba45571f73ee080ef.jpeg', 30578, 'image/jpeg', 'zkxw', NULL, NULL, 'd3000000000000000000000000000001', '', '2026-05-16 22:51:06', NULL, '2026-05-16 22:51:06', 0);
INSERT INTO `biz_attachment` (`id`, `business_type`, `business_id`, `original_name`, `file_ext`, `file_url`, `file_size`, `file_type`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('5923df25454140659ef676b83d66f554', NULL, NULL, '0cc02a211bdcaaa15ae4b8b62dabd3dc.jpeg', 'jpeg', 'protocol/202605/16/4095ea574dca4f0584f9a613b65b10f3.jpeg', 17985, 'image/jpeg', 'zkxw', NULL, NULL, 'd3000000000000000000000000000001', '', '2026-05-16 18:31:34', NULL, '2026-05-16 18:31:34', 0);
@@ -186,6 +187,7 @@ INSERT INTO `biz_attachment` (`id`, `business_type`, `business_id`, `original_na
INSERT INTO `biz_attachment` (`id`, `business_type`, `business_id`, `original_name`, `file_ext`, `file_url`, `file_size`, `file_type`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('707894aabc6f48d3a2ad61d849d785ea', NULL, NULL, '2a02c0a818d708115ddef32296910f66.jpeg', 'jpeg', 'protocol/202605/17/504fb0d7813b455286182470d0f4a011.jpeg', 653387, 'image/jpeg', 'zkxw', NULL, NULL, 'd3000000000000000000000000000001', '', '2026-05-17 21:40:21', NULL, '2026-05-17 21:40:21', 0);
INSERT INTO `biz_attachment` (`id`, `business_type`, `business_id`, `original_name`, `file_ext`, `file_url`, `file_size`, `file_type`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('74047c81c1ab4e1abc5eb5878243f37f', NULL, NULL, '0aab48e2ff412201e89667ef5a1465b1.jpeg', 'jpeg', 'donation-consent/202605/19/fe95b91c70a945c1b5e0f6b95e75d458.jpeg', 30578, 'image/jpeg', 'zkxw', NULL, NULL, 'd3000000000000000000000000000001', '', '2026-05-19 10:27:50', NULL, '2026-05-19 10:27:50', 0);
INSERT INTO `biz_attachment` (`id`, `business_type`, `business_id`, `original_name`, `file_ext`, `file_url`, `file_size`, `file_type`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('741fd5da5dc6452ebf1193e52adaaf6c', NULL, NULL, '0aab48e2ff412201e89667ef5a1465b1.jpeg', 'jpeg', 'protocol-finance-receipt/202605/24/19e54e8554ed466987571e66ef6e919d.jpeg', 30578, 'image/jpeg', 'zkxw', NULL, NULL, 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-24 09:01:05', NULL, '2026-05-24 09:01:05', 0);
INSERT INTO `biz_attachment` (`id`, `business_type`, `business_id`, `original_name`, `file_ext`, `file_url`, `file_size`, `file_type`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('74769f518bff4d6780e088e6beb9a02a', NULL, NULL, '0cc02a211bdcaaa15ae4b8b62dabd3dc (1) (1).jpeg', 'jpeg', 'channel-service-order-finance/202605/24/face91db0bd84d4d8c2ae9982d68b8a3.jpeg', 17985, 'image/jpeg', 'zkxw', NULL, NULL, 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-24 21:47:51', NULL, '2026-05-24 21:47:51', 0);
INSERT INTO `biz_attachment` (`id`, `business_type`, `business_id`, `original_name`, `file_ext`, `file_url`, `file_size`, `file_type`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('752f52f7ae2a4c6aa9ec9018b680d9e6', NULL, NULL, '0cc02a211bdcaaa15ae4b8b62dabd3dc.jpeg', 'jpeg', 'qc-lab/202605/20/eea8f9bf23374ddd918dd98739d1a920.jpeg', 17985, 'image/jpeg', 'zkxw', NULL, NULL, 'd3000000000000000000000000000001', '', '2026-05-20 06:24:08', NULL, '2026-05-20 06:24:08', 0);
INSERT INTO `biz_attachment` (`id`, `business_type`, `business_id`, `original_name`, `file_ext`, `file_url`, `file_size`, `file_type`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('7540d15fbe594fc991b9a9a4a639e209', NULL, NULL, '4fa5d72f3507c3405b352f90ddc33b10.jpeg', 'jpeg', 'sample-reception/202605/23/a0fbe08dc4dc4d43bd52f65bb31810f3.jpeg', 75175, 'image/jpeg', 'zkxw', NULL, NULL, 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-23 15:16:38', NULL, '2026-05-23 15:16:38', 0);
INSERT INTO `biz_attachment` (`id`, `business_type`, `business_id`, `original_name`, `file_ext`, `file_url`, `file_size`, `file_type`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('769f9d5555a84671838965bab460f760', NULL, NULL, '0aab48e2ff412201e89667ef5a1465b1.jpeg', 'jpeg', 'protocol/202605/14/24031c9a311740d09be61c5a406400d3.jpeg', 30578, 'image/jpeg', 'zkxw', NULL, NULL, 'd3000000000000000000000000000001', '', '2026-05-14 21:06:18', NULL, '2026-05-14 21:06:18', 0);
@@ -210,6 +212,7 @@ INSERT INTO `biz_attachment` (`id`, `business_type`, `business_id`, `original_na
INSERT INTO `biz_attachment` (`id`, `business_type`, `business_id`, `original_name`, `file_ext`, `file_url`, `file_size`, `file_type`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('8ea9f73ac24a466c9723dd2f7a87b3b6', NULL, NULL, '0eee40147c69c50aa9701cb27fe1b73c.jpeg', 'jpeg', 'cell-product/202605/23/fc6e6baf98cc445fb9b6f04bbac01041.jpeg', 77222, 'image/jpeg', 'zkxw', NULL, NULL, 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-23 11:29:27', NULL, '2026-05-23 11:29:27', 0);
INSERT INTO `biz_attachment` (`id`, `business_type`, `business_id`, `original_name`, `file_ext`, `file_url`, `file_size`, `file_type`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('8f2c1fe0f2fb4a44ab8ad67b40b5f70c', NULL, NULL, '0cc02a211bdcaaa15ae4b8b62dabd3dc.jpeg', 'jpeg', 'protocol/202605/16/68de6647c726467a8d7fcaf3d605cac1.jpeg', 17985, 'image/jpeg', 'zkxw', NULL, NULL, 'd3000000000000000000000000000001', '', '2026-05-16 18:49:49', NULL, '2026-05-16 18:49:49', 0);
INSERT INTO `biz_attachment` (`id`, `business_type`, `business_id`, `original_name`, `file_ext`, `file_url`, `file_size`, `file_type`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('90893d1add5b4b95b2e7a2a092227d5a', NULL, NULL, '0cc02a211bdcaaa15ae4b8b62dabd3dc.jpeg', 'jpeg', 'protocol-finance-refund/202605/17/63d2e6e7e22b47668c4d9d8663f4146d.jpeg', 17985, 'image/jpeg', 'zkxw', NULL, NULL, 'd3000000000000000000000000000001', '', '2026-05-17 15:58:12', NULL, '2026-05-17 15:58:12', 0);
INSERT INTO `biz_attachment` (`id`, `business_type`, `business_id`, `original_name`, `file_ext`, `file_url`, `file_size`, `file_type`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('9166830ced8c43e0a03c9f1caade62df', NULL, NULL, '0cc02a211bdcaaa15ae4b8b62dabd3dc (1) (1).jpeg', 'jpeg', 'channel-service-order/202605/24/58292175be174b4a81115e2b497b7cb4.jpeg', 17985, 'image/jpeg', 'zkxw', NULL, NULL, 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-24 21:46:22', NULL, '2026-05-24 21:46:22', 0);
INSERT INTO `biz_attachment` (`id`, `business_type`, `business_id`, `original_name`, `file_ext`, `file_url`, `file_size`, `file_type`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('9182ea4f50a44dfd8bfabbd4200c7ce2', NULL, NULL, '0cc02a211bdcaaa15ae4b8b62dabd3dc (1) (1).jpeg', 'jpeg', 'sample-reception/202605/21/a945f693e4a042509ebc370ac51c195b.jpeg', 17985, 'image/jpeg', 'zkxw', NULL, NULL, 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-21 09:57:51', NULL, '2026-05-21 09:57:51', 0);
INSERT INTO `biz_attachment` (`id`, `business_type`, `business_id`, `original_name`, `file_ext`, `file_url`, `file_size`, `file_type`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('9231ba65b7894b50a11c0a34a8552d4c', NULL, NULL, '安庆师范.md', 'md', '202605/18/336f4cad9ed940999c5451283f0d0e28.md', 9193, 'text/markdown', 'zkxw', NULL, NULL, 'd3000000000000000000000000000001', '', '2026-05-18 16:44:54', NULL, '2026-05-18 16:44:54', 0);
INSERT INTO `biz_attachment` (`id`, `business_type`, `business_id`, `original_name`, `file_ext`, `file_url`, `file_size`, `file_type`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('939ed3e8b0de4d5f90d6cde053edeeec', NULL, NULL, '0eee40147c69c50aa9701cb27fe1b73c.jpeg', 'jpeg', 'protocol-finance-receipt/202605/19/49f105474ffb4644bfe4220dbdadd605.jpeg', 77222, 'image/jpeg', 'zkxw', NULL, NULL, 'd3000000000000000000000000000001', '', '2026-05-19 16:08:46', NULL, '2026-05-19 16:08:46', 0);
@@ -218,6 +221,7 @@ INSERT INTO `biz_attachment` (`id`, `business_type`, `business_id`, `original_na
INSERT INTO `biz_attachment` (`id`, `business_type`, `business_id`, `original_name`, `file_ext`, `file_url`, `file_size`, `file_type`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('974294e5df63467d8e3b267ca9ab9a21', NULL, NULL, '0cc02a211bdcaaa15ae4b8b62dabd3dc.jpeg', 'jpeg', 'channel-service-order-finance/202605/24/928dcf66a25d491e8e7d19625e13faa6.jpeg', 17985, 'image/jpeg', 'zkxw', NULL, NULL, 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-24 21:27:59', NULL, '2026-05-24 21:27:59', 0);
INSERT INTO `biz_attachment` (`id`, `business_type`, `business_id`, `original_name`, `file_ext`, `file_url`, `file_size`, `file_type`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('974d9eb1b2274f74b5c31e410d800500', NULL, NULL, '0aab48e2ff412201e89667ef5a1465b1.jpeg', 'jpeg', 'channel-service-order/202605/24/7601e86a429b4600bfac36f196f1e1c8.jpeg', 30578, 'image/jpeg', 'zkxw', NULL, NULL, 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-24 19:55:41', NULL, '2026-05-24 19:55:41', 0);
INSERT INTO `biz_attachment` (`id`, `business_type`, `business_id`, `original_name`, `file_ext`, `file_url`, `file_size`, `file_type`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('976188217df44a8b94fbb91d398c239a', NULL, NULL, '0f6f9e20c16004e044e94c800b0aab2d.jpg', 'jpg', 'storage-cert/202605/21/b7ff1556388a43849827c0e428def330.jpg', 394391, 'image/jpeg', 'zkxw', NULL, NULL, 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-21 09:51:37', NULL, '2026-05-21 09:51:37', 0);
INSERT INTO `biz_attachment` (`id`, `business_type`, `business_id`, `original_name`, `file_ext`, `file_url`, `file_size`, `file_type`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('981eecf713bf41b7b4eeb775f7bd0964', NULL, NULL, '0cc02a211bdcaaa15ae4b8b62dabd3dc (1).jpeg', 'jpeg', 'channel-service-order-finance/202605/24/145b5e42e6954b079a65e9fb2eaeea72.jpeg', 17985, 'image/jpeg', 'zkxw', NULL, NULL, 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-24 21:46:41', NULL, '2026-05-24 21:46:41', 0);
INSERT INTO `biz_attachment` (`id`, `business_type`, `business_id`, `original_name`, `file_ext`, `file_url`, `file_size`, `file_type`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('98c5b11ffd5a4293b4739b200c2aca0b', NULL, NULL, '0cc02a211bdcaaa15ae4b8b62dabd3dc (1).jpeg', 'jpeg', 'cell-product/202605/23/e62f2f2425c3495fb2635daa3743c3ef.jpeg', 17985, 'image/jpeg', 'zkxw', NULL, NULL, 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-23 11:11:46', NULL, '2026-05-23 11:11:46', 0);
INSERT INTO `biz_attachment` (`id`, `business_type`, `business_id`, `original_name`, `file_ext`, `file_url`, `file_size`, `file_type`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('99863c9144174b58b01868e171dcf6e3', NULL, NULL, '副本天台技师数字化校园平台采购需求V1.0.docx', 'docx', 'protocol/202605/14/689d6f1939b14e6ca02442b3e46abf51.docx', 212013, 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'zkxw', NULL, NULL, 'd3000000000000000000000000000001', '', '2026-05-14 21:06:19', NULL, '2026-05-14 21:06:19', 0);
INSERT INTO `biz_attachment` (`id`, `business_type`, `business_id`, `original_name`, `file_ext`, `file_url`, `file_size`, `file_type`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('9a361b8b14b54225ad7a665c9a7ef744', NULL, NULL, '0cc02a211bdcaaa15ae4b8b62dabd3dc (1) (1).jpeg', 'jpeg', 'cell-product/202605/23/5117aa31ea004483b80e7c9e86f80ced.jpeg', 17985, 'image/jpeg', 'zkxw', NULL, NULL, 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-23 10:53:42', NULL, '2026-05-23 10:53:42', 0);
@@ -696,7 +700,7 @@ CREATE TABLE `biz_channel_account` (
-- Records of biz_channel_account
-- ----------------------------
BEGIN;
INSERT INTO `biz_channel_account` (`id`, `channel_id`, `balance_amount`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('ACE7B72CC1A04DE1927914D993CB4FDD', '6CBE51D29EB44AAAB6DF1774A76508E7', 1000000.00, 'zkxw', 0, '', 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-24 21:25:25', 'd3000000000000000000000000000001', '2026-05-24 21:28:06', 0);
INSERT INTO `biz_channel_account` (`id`, `channel_id`, `balance_amount`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('ACE7B72CC1A04DE1927914D993CB4FDD', '6CBE51D29EB44AAAB6DF1774A76508E7', 1080000.00, 'zkxw', 0, '', 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-24 21:25:25', 'd3000000000000000000000000000001', '2026-05-24 21:47:53', 0);
COMMIT;
-- ----------------------------
@@ -914,6 +918,9 @@ CREATE TABLE `biz_channel_service_order` (
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`del_flag` tinyint(4) NOT NULL DEFAULT '0' COMMENT '删除标记:0-正常 1-已删除',
`channel_agreement_id` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '渠道协议ID(购买订单必填)',
`total_recharge_amount` decimal(18,2) NOT NULL DEFAULT '0.00' COMMENT '累计充值总额',
`total_refund_amount` decimal(18,2) NOT NULL DEFAULT '0.00' COMMENT '累计退款总额',
`current_balance` decimal(18,2) NOT NULL DEFAULT '0.00' COMMENT '当前余额',
`balance_before` decimal(18,2) DEFAULT NULL COMMENT '操作前余额快照',
`balance_after` decimal(18,2) DEFAULT NULL COMMENT '操作后余额快照',
`finance_submit_by` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '发起财务确认人ID',
@@ -939,9 +946,10 @@ CREATE TABLE `biz_channel_service_order` (
-- Records of biz_channel_service_order
-- ----------------------------
BEGIN;
INSERT INTO `biz_channel_service_order` (`id`, `channel_id`, `channel_name`, `dept_name`, `order_type`, `prepay_amount`, `purchase_total_amount`, `order_status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`, `channel_agreement_id`, `balance_before`, `balance_after`, `finance_submit_by`, `finance_confirm_time`, `finance_confirm_attachments`, `finance_remark`, `refund_apply_by`, `refund_apply_time`, `refund_amount`, `refund_remark`, `refund_attachments`, `refund_finance_confirm_time`, `refund_finance_confirm_attachments`, `refund_finance_remark`, `finance_submit_time`, `finance_submit_remark`, `finance_submit_attachments`) VALUES ('B6AD9DCEA62443EEB98B46124DDE0130', '6CBE51D29EB44AAAB6DF1774A76508E7', '安徽每年大健康有限公司', '研发部门', 'yfk', 2000000.00, NULL, 'ytf', 'zkxw', 0, '充值20万', 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-24 21:24:23', 'd3000000000000000000000000000001', '2026-05-24 21:28:06', 0, '3427658A9FF8431DB10D1E2FFCB49E54', 2000000.00, 1000000.00, 'd3000000000000000000000000000001', '2026-05-24 21:25:25', 'channel-service-order-finance/202605/24/dade1c7abd554df18dcc70a844e76486.jpeg', '到账', 'd3000000000000000000000000000001', '2026-05-24 21:27:13', 1000000.00, '退款10万', 'channel-service-order/202605/24/98b0f061f9ea43c1b3bda70d3624d9af.jpeg', '2026-05-24 21:28:06', 'channel-service-order-finance/202605/24/928dcf66a25d491e8e7d19625e13faa6.jpeg', '退款20万', '2026-05-24 21:24:52', '请确认是否到账', 'channel-service-order/202605/24/353084f4e5e84c28a5869a43bcd9a6eb.jpeg');
INSERT INTO `biz_channel_service_order` (`id`, `channel_id`, `channel_name`, `dept_name`, `order_type`, `prepay_amount`, `purchase_total_amount`, `order_status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`, `channel_agreement_id`, `balance_before`, `balance_after`, `finance_submit_by`, `finance_confirm_time`, `finance_confirm_attachments`, `finance_remark`, `refund_apply_by`, `refund_apply_time`, `refund_amount`, `refund_remark`, `refund_attachments`, `refund_finance_confirm_time`, `refund_finance_confirm_attachments`, `refund_finance_remark`, `finance_submit_time`, `finance_submit_remark`, `finance_submit_attachments`) VALUES ('E7EECBCA6DF74493BB5D433937B0B382', '6CBE51D29EB44AAAB6DF1774A76508E7', '安徽每年大健康有限公司', '测试', 'yfk', 5000000.00, NULL, 'dqr', 'zkxw', 0, '充值50万', 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-24 19:25:55', 'd3000000000000000000000000000001', '2026-05-24 19:25:55', 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `biz_channel_service_order` (`id`, `channel_id`, `channel_name`, `dept_name`, `order_type`, `prepay_amount`, `purchase_total_amount`, `order_status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`, `channel_agreement_id`, `balance_before`, `balance_after`, `finance_submit_by`, `finance_confirm_time`, `finance_confirm_attachments`, `finance_remark`, `refund_apply_by`, `refund_apply_time`, `refund_amount`, `refund_remark`, `refund_attachments`, `refund_finance_confirm_time`, `refund_finance_confirm_attachments`, `refund_finance_remark`, `finance_submit_time`, `finance_submit_remark`, `finance_submit_attachments`) VALUES ('EB42201B868C47D99D8045CA34CE40A8', '6CBE51D29EB44AAAB6DF1774A76508E7', '安徽每年大健康有限公司', '测试', 'yfk', 1000000.00, NULL, 'dsx', 'zkxw', 0, '充值100万', 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-24 19:50:11', 'd3000000000000000000000000000001', '2026-05-24 19:50:27', 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `biz_channel_service_order` (`id`, `channel_id`, `channel_name`, `dept_name`, `order_type`, `prepay_amount`, `purchase_total_amount`, `order_status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`, `channel_agreement_id`, `total_recharge_amount`, `total_refund_amount`, `current_balance`, `balance_before`, `balance_after`, `finance_submit_by`, `finance_confirm_time`, `finance_confirm_attachments`, `finance_remark`, `refund_apply_by`, `refund_apply_time`, `refund_amount`, `refund_remark`, `refund_attachments`, `refund_finance_confirm_time`, `refund_finance_confirm_attachments`, `refund_finance_remark`, `finance_submit_time`, `finance_submit_remark`, `finance_submit_attachments`) VALUES ('2C899FA98D994650876241A9C614092D', '6CBE51D29EB44AAAB6DF1774A76508E7', '安徽每年大健康有限公司', '第一次充值部门', 'yfk', 100000.00, NULL, 'ytf', 'zkxw', 0, '第一次充值部门', 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-24 21:46:01', 'd3000000000000000000000000000001', '2026-05-25 07:50:45', 0, '3427658A9FF8431DB10D1E2FFCB49E54', 100000.00, 20000.00, 80000.00, 1100000.00, 1080000.00, 'd3000000000000000000000000000001', '2026-05-24 21:46:43', 'channel-service-order-finance/202605/24/145b5e42e6954b079a65e9fb2eaeea72.jpeg', '确认收款10', 'd3000000000000000000000000000001', '2026-05-24 21:47:05', 20000.00, '退款2万', 'channel-service-order/202605/24/498a82d2ecd6448ca0ced7ce2bfeb4a0.jpeg', '2026-05-24 21:47:53', 'channel-service-order-finance/202605/24/face91db0bd84d4d8c2ae9982d68b8a3.jpeg', '退2万', '2026-05-24 21:46:24', '充值10万', 'channel-service-order/202605/24/58292175be174b4a81115e2b497b7cb4.jpeg');
INSERT INTO `biz_channel_service_order` (`id`, `channel_id`, `channel_name`, `dept_name`, `order_type`, `prepay_amount`, `purchase_total_amount`, `order_status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`, `channel_agreement_id`, `total_recharge_amount`, `total_refund_amount`, `current_balance`, `balance_before`, `balance_after`, `finance_submit_by`, `finance_confirm_time`, `finance_confirm_attachments`, `finance_remark`, `refund_apply_by`, `refund_apply_time`, `refund_amount`, `refund_remark`, `refund_attachments`, `refund_finance_confirm_time`, `refund_finance_confirm_attachments`, `refund_finance_remark`, `finance_submit_time`, `finance_submit_remark`, `finance_submit_attachments`) VALUES ('B6AD9DCEA62443EEB98B46124DDE0130', '6CBE51D29EB44AAAB6DF1774A76508E7', '安徽每年大健康有限公司', '研发部门', 'yfk', 2000000.00, NULL, 'ytf', 'zkxw', 0, '充值20万', 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-24 21:24:23', 'd3000000000000000000000000000001', '2026-05-25 07:50:45', 0, '3427658A9FF8431DB10D1E2FFCB49E54', 2000000.00, 1000000.00, 1000000.00, 2000000.00, 1000000.00, 'd3000000000000000000000000000001', '2026-05-24 21:25:25', 'channel-service-order-finance/202605/24/dade1c7abd554df18dcc70a844e76486.jpeg', '到账', 'd3000000000000000000000000000001', '2026-05-24 21:27:13', 1000000.00, '退款10万', 'channel-service-order/202605/24/98b0f061f9ea43c1b3bda70d3624d9af.jpeg', '2026-05-24 21:28:06', 'channel-service-order-finance/202605/24/928dcf66a25d491e8e7d19625e13faa6.jpeg', '退款20万', '2026-05-24 21:24:52', '请确认是否到账', 'channel-service-order/202605/24/353084f4e5e84c28a5869a43bcd9a6eb.jpeg');
INSERT INTO `biz_channel_service_order` (`id`, `channel_id`, `channel_name`, `dept_name`, `order_type`, `prepay_amount`, `purchase_total_amount`, `order_status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`, `channel_agreement_id`, `total_recharge_amount`, `total_refund_amount`, `current_balance`, `balance_before`, `balance_after`, `finance_submit_by`, `finance_confirm_time`, `finance_confirm_attachments`, `finance_remark`, `refund_apply_by`, `refund_apply_time`, `refund_amount`, `refund_remark`, `refund_attachments`, `refund_finance_confirm_time`, `refund_finance_confirm_attachments`, `refund_finance_remark`, `finance_submit_time`, `finance_submit_remark`, `finance_submit_attachments`) VALUES ('E7EECBCA6DF74493BB5D433937B0B382', '6CBE51D29EB44AAAB6DF1774A76508E7', '安徽每年大健康有限公司', '测试', 'yfk', 5000000.00, NULL, 'dqr', 'zkxw', 0, '充值50万', 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-24 19:25:55', 'd3000000000000000000000000000001', '2026-05-25 07:50:45', 0, NULL, 5000000.00, 0.00, 5000000.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `biz_channel_service_order` (`id`, `channel_id`, `channel_name`, `dept_name`, `order_type`, `prepay_amount`, `purchase_total_amount`, `order_status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`, `channel_agreement_id`, `total_recharge_amount`, `total_refund_amount`, `current_balance`, `balance_before`, `balance_after`, `finance_submit_by`, `finance_confirm_time`, `finance_confirm_attachments`, `finance_remark`, `refund_apply_by`, `refund_apply_time`, `refund_amount`, `refund_remark`, `refund_attachments`, `refund_finance_confirm_time`, `refund_finance_confirm_attachments`, `refund_finance_remark`, `finance_submit_time`, `finance_submit_remark`, `finance_submit_attachments`) VALUES ('EB42201B868C47D99D8045CA34CE40A8', '6CBE51D29EB44AAAB6DF1774A76508E7', '安徽每年大健康有限公司', '测试', 'yfk', 1000000.00, NULL, 'dsx', 'zkxw', 0, '充值100万', 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-24 19:50:11', 'd3000000000000000000000000000001', '2026-05-25 07:50:45', 0, NULL, 1000000.00, 0.00, 1000000.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
COMMIT;
-- ----------------------------
@@ -987,6 +995,10 @@ CREATE TABLE `biz_channel_service_order_product` (
`agreement_unit_price` decimal(18,2) DEFAULT NULL COMMENT '协议单价',
`buy_qty` decimal(18,4) DEFAULT NULL COMMENT '购买数量',
`buy_amount` decimal(18,2) DEFAULT NULL COMMENT '购买金额',
`total_buy_qty` decimal(18,4) NOT NULL DEFAULT '0.0000' COMMENT '累计购买数量',
`total_unsubscribe_qty` decimal(18,4) NOT NULL DEFAULT '0.0000' COMMENT '累计退订数量',
`current_qty` decimal(18,4) NOT NULL DEFAULT '0.0000' COMMENT '当前持有数量',
`total_unsubscribe_amount` decimal(18,2) NOT NULL DEFAULT '0.00' COMMENT '累计退订金额',
`tenant_no` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'zkxw' COMMENT '租户编号',
`order_num` int(11) DEFAULT NULL COMMENT '排序号',
`remark` varchar(512) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '备注',
@@ -1006,6 +1018,52 @@ CREATE TABLE `biz_channel_service_order_product` (
BEGIN;
COMMIT;
-- ----------------------------
-- Table structure for biz_channel_service_order_txn
-- ----------------------------
DROP TABLE IF EXISTS `biz_channel_service_order_txn`;
CREATE TABLE `biz_channel_service_order_txn` (
`id` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '主键ID',
`service_order_id` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '关联订单ID',
`txn_type` varchar(16) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'recharge/refund/purchase/unsubscribe',
`amount` decimal(18,2) DEFAULT NULL COMMENT '本次操作金额',
`txn_status` varchar(16) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'dsx' COMMENT 'dsx待生效 dqr待财务确认 yqr已确认 yzf已作废',
`products_json` text COLLATE utf8mb4_unicode_ci COMMENT '产品明细JSON(purchase/unsubscribe类型)',
`remark` varchar(512) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '备注',
`finance_submit_by` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '发起确认人ID',
`finance_submit_time` datetime DEFAULT NULL COMMENT '发起确认时间',
`finance_submit_remark` varchar(512) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '发起确认备注',
`finance_submit_attachments` text COLLATE utf8mb4_unicode_ci COMMENT '发起确认附件',
`finance_confirm_time` datetime DEFAULT NULL COMMENT '财务确认时间',
`finance_confirm_attachments` text COLLATE utf8mb4_unicode_ci COMMENT '财务确认附件',
`finance_remark` varchar(512) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '财务确认备注',
`balance_before` decimal(18,2) DEFAULT NULL COMMENT '操作前余额(yfk类型)',
`balance_after` decimal(18,2) DEFAULT NULL COMMENT '操作后余额(yfk类型)',
`tenant_no` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'zkxw' COMMENT '租户编号',
`order_num` int(11) DEFAULT NULL COMMENT '排序号',
`create_by` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '创建人id',
`create_dept_id` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '创建人部门ID',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_by` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '更新人id',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`del_flag` tinyint(4) NOT NULL DEFAULT '0' COMMENT '删除标记',
PRIMARY KEY (`id`),
KEY `idx_txn_order` (`service_order_id`,`del_flag`),
KEY `idx_txn_status` (`txn_status`,`tenant_no`,`del_flag`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='渠道服务订单操作流水';
-- ----------------------------
-- Records of biz_channel_service_order_txn
-- ----------------------------
BEGIN;
INSERT INTO `biz_channel_service_order_txn` (`id`, `service_order_id`, `txn_type`, `amount`, `txn_status`, `products_json`, `remark`, `finance_submit_by`, `finance_submit_time`, `finance_submit_remark`, `finance_submit_attachments`, `finance_confirm_time`, `finance_confirm_attachments`, `finance_remark`, `balance_before`, `balance_after`, `tenant_no`, `order_num`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('437cb6bf72ba793da77d98cba385c753', '2C899FA98D994650876241A9C614092D', 'recharge', 100000.00, 'yqr', NULL, '第一次充值部门', 'd3000000000000000000000000000001', '2026-05-24 21:46:24', '充值10万', 'channel-service-order/202605/24/58292175be174b4a81115e2b497b7cb4.jpeg', '2026-05-24 21:46:43', 'channel-service-order-finance/202605/24/145b5e42e6954b079a65e9fb2eaeea72.jpeg', '确认收款10', 1100000.00, 1080000.00, 'zkxw', NULL, 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-24 21:46:01', 'd3000000000000000000000000000001', '2026-05-24 21:47:53', 0);
INSERT INTO `biz_channel_service_order_txn` (`id`, `service_order_id`, `txn_type`, `amount`, `txn_status`, `products_json`, `remark`, `finance_submit_by`, `finance_submit_time`, `finance_submit_remark`, `finance_submit_attachments`, `finance_confirm_time`, `finance_confirm_attachments`, `finance_remark`, `balance_before`, `balance_after`, `tenant_no`, `order_num`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('88663422c69b700c88baed0f7fc3806d', 'B6AD9DCEA62443EEB98B46124DDE0130', 'recharge', 2000000.00, 'yqr', NULL, '充值20万', 'd3000000000000000000000000000001', '2026-05-24 21:24:52', '请确认是否到账', 'channel-service-order/202605/24/353084f4e5e84c28a5869a43bcd9a6eb.jpeg', '2026-05-24 21:25:25', 'channel-service-order-finance/202605/24/dade1c7abd554df18dcc70a844e76486.jpeg', '到账', 2000000.00, 1000000.00, 'zkxw', NULL, 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-24 21:24:23', 'd3000000000000000000000000000001', '2026-05-24 21:28:06', 0);
INSERT INTO `biz_channel_service_order_txn` (`id`, `service_order_id`, `txn_type`, `amount`, `txn_status`, `products_json`, `remark`, `finance_submit_by`, `finance_submit_time`, `finance_submit_remark`, `finance_submit_attachments`, `finance_confirm_time`, `finance_confirm_attachments`, `finance_remark`, `balance_before`, `balance_after`, `tenant_no`, `order_num`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('955897e4880e8b89c4272c7a83347d22', 'E7EECBCA6DF74493BB5D433937B0B382', 'recharge', 5000000.00, 'dsx', NULL, '充值50万', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'zkxw', NULL, 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-24 19:25:55', 'd3000000000000000000000000000001', '2026-05-24 19:25:55', 0);
INSERT INTO `biz_channel_service_order_txn` (`id`, `service_order_id`, `txn_type`, `amount`, `txn_status`, `products_json`, `remark`, `finance_submit_by`, `finance_submit_time`, `finance_submit_remark`, `finance_submit_attachments`, `finance_confirm_time`, `finance_confirm_attachments`, `finance_remark`, `balance_before`, `balance_after`, `tenant_no`, `order_num`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('a756072e585a357342b667e8eaa6cc58', 'EB42201B868C47D99D8045CA34CE40A8', 'recharge', 1000000.00, 'dsx', NULL, '充值100万', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'zkxw', NULL, 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-24 19:50:11', 'd3000000000000000000000000000001', '2026-05-24 19:50:27', 0);
INSERT INTO `biz_channel_service_order_txn` (`id`, `service_order_id`, `txn_type`, `amount`, `txn_status`, `products_json`, `remark`, `finance_submit_by`, `finance_submit_time`, `finance_submit_remark`, `finance_submit_attachments`, `finance_confirm_time`, `finance_confirm_attachments`, `finance_remark`, `balance_before`, `balance_after`, `tenant_no`, `order_num`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('e277b6a070624c025d884bac6ad8b01a', 'B6AD9DCEA62443EEB98B46124DDE0130', 'refund', 1000000.00, 'yqr', NULL, '退款10万', 'd3000000000000000000000000000001', '2026-05-24 21:27:13', '退款10万', 'channel-service-order/202605/24/98b0f061f9ea43c1b3bda70d3624d9af.jpeg', '2026-05-24 21:28:06', 'channel-service-order-finance/202605/24/928dcf66a25d491e8e7d19625e13faa6.jpeg', '退款20万', NULL, NULL, 'zkxw', NULL, 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-24 21:27:13', 'd3000000000000000000000000000001', '2026-05-24 21:28:06', 0);
INSERT INTO `biz_channel_service_order_txn` (`id`, `service_order_id`, `txn_type`, `amount`, `txn_status`, `products_json`, `remark`, `finance_submit_by`, `finance_submit_time`, `finance_submit_remark`, `finance_submit_attachments`, `finance_confirm_time`, `finance_confirm_attachments`, `finance_remark`, `balance_before`, `balance_after`, `tenant_no`, `order_num`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('f3e327ae584fa5390c811cb0adb2dce0', '2C899FA98D994650876241A9C614092D', 'refund', 20000.00, 'yqr', NULL, '退款2万', 'd3000000000000000000000000000001', '2026-05-24 21:47:05', '退款2万', 'channel-service-order/202605/24/498a82d2ecd6448ca0ced7ce2bfeb4a0.jpeg', '2026-05-24 21:47:53', 'channel-service-order-finance/202605/24/face91db0bd84d4d8c2ae9982d68b8a3.jpeg', '退2万', NULL, NULL, 'zkxw', NULL, 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-24 21:47:05', 'd3000000000000000000000000000001', '2026-05-24 21:47:53', 0);
COMMIT;
-- ----------------------------
-- Table structure for biz_checkup_institution
-- ----------------------------
@@ -2357,6 +2415,38 @@ INSERT INTO `biz_material_stock_log` (`id`, `material_id`, `material_code`, `mat
INSERT INTO `biz_material_stock_log` (`id`, `material_id`, `material_code`, `material_name`, `change_type`, `change_qty`, `stock_before`, `stock_after`, `receiver`, `purpose`, `tenant_no`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('E8E54D207DEE4A248E09AF7B656EC070', 'a1000000000000000000000000000002', 'MAT-DEMO-002', '品牌易拉宝', 'ck', 2.0000, 10.0000, 8.0000, '中科兴皖测试3', '123', 'zkxw', '123', 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-20 21:05:39', 'd3000000000000000000000000000001', '2026-05-20 21:05:39', 0);
COMMIT;
-- ----------------------------
-- Table structure for biz_outbound_release_review
-- ----------------------------
DROP TABLE IF EXISTS `biz_outbound_release_review`;
CREATE TABLE `biz_outbound_release_review` (
`id` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '主键ID',
`infusion_schedule_id` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '输注计划ID',
`production_work_order_id` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '生产工单ID',
`qc_work_order_id` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '质检工单ID',
`review_conclusion` varchar(16) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'tg通过 btg不通过',
`reviewer_user_id` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '审核人',
`review_time` datetime DEFAULT NULL COMMENT '审核时间',
`review_remark` varchar(2000) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '审核备注',
`tenant_no` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'zkxw' COMMENT '租户编号',
`order_num` int(11) DEFAULT NULL COMMENT '排序号',
`remark` varchar(512) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '备注',
`create_by` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '创建人id',
`create_dept_id` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '创建人部门ID',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_by` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '更新人id',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`del_flag` tinyint(4) NOT NULL DEFAULT '0' COMMENT '删除标记:0-正常 1-已删除',
PRIMARY KEY (`id`),
KEY `idx_orr_schedule` (`infusion_schedule_id`,`del_flag`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='出库放行审核';
-- ----------------------------
-- Records of biz_outbound_release_review
-- ----------------------------
BEGIN;
COMMIT;
-- ----------------------------
-- Table structure for biz_output_type
-- ----------------------------
@@ -2397,7 +2487,11 @@ COMMIT;
DROP TABLE IF EXISTS `biz_pilot_application`;
CREATE TABLE `biz_pilot_application` (
`id` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '主键ID',
`application_no` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '申请单号(自动生成,前缀ZSSQ)',
`application_status` varchar(16) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'dks' COMMENT 'dks待开始 jxz进行中 ywc已完成 yzf已作废',
`channel_service_order_id` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '渠道服务购买订单ID',
`channel_id` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '渠道ID(缓存自服务订单)',
`channel_name` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '渠道名称(缓存)',
`tenant_no` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'zkxw' COMMENT '租户编号',
`order_num` int(11) DEFAULT NULL COMMENT '排序号',
`remark` varchar(512) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '备注',
@@ -2408,6 +2502,7 @@ CREATE TABLE `biz_pilot_application` (
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`del_flag` tinyint(4) NOT NULL DEFAULT '0' COMMENT '删除标记:0-正常 1-已删除',
PRIMARY KEY (`id`),
UNIQUE KEY `uk_application_no` (`application_no`,`del_flag`),
KEY `idx_pilot_app_order` (`channel_service_order_id`,`del_flag`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='渠道中试服务申请单';
@@ -5364,6 +5459,7 @@ CREATE TABLE `biz_production_work_order` (
`protocol_no` varchar(64) DEFAULT NULL COMMENT '协议号快照',
`sample_code` varchar(32) DEFAULT NULL COMMENT '样本编码快照',
`reception_source` varchar(20) DEFAULT 'cell_storage',
`infusion_schedule_id` varchar(64) DEFAULT NULL COMMENT '中试输注计划ID(出库生产关联)',
`work_order_status` varchar(16) NOT NULL DEFAULT 'dpz' COMMENT '状态(dpz待配置/ywc已完成)',
`configured_time` datetime DEFAULT NULL COMMENT '配置时间',
`configured_by` varchar(64) DEFAULT NULL COMMENT '配置人',
@@ -5385,15 +5481,15 @@ CREATE TABLE `biz_production_work_order` (
-- Records of biz_production_work_order
-- ----------------------------
BEGIN;
INSERT INTO `biz_production_work_order` (`id`, `work_order_no`, `work_order_type`, `reception_id`, `protocol_sample_id`, `collection_protocol_id`, `protocol_no`, `sample_code`, `reception_source`, `work_order_status`, `configured_time`, `configured_by`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('217F265C4C98441BA7DB69144EDE43C4', 'SC202605200001', 'inbound', 'EBD08E35007D4E5E928DABD9101A336E', '078FC4C88FC84BD8AEAAB76967962EAA', '05F94756C7BD4EF4AA7C4780FBF90316', 'ZKZX34000064', 'ZKZX34000429', 'cell_storage', 'dpz', NULL, NULL, 'zkxw', NULL, NULL, 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-20 13:21:32', 'd3000000000000000000000000000001', '2026-05-20 13:21:32', 0);
INSERT INTO `biz_production_work_order` (`id`, `work_order_no`, `work_order_type`, `reception_id`, `protocol_sample_id`, `collection_protocol_id`, `protocol_no`, `sample_code`, `reception_source`, `work_order_status`, `configured_time`, `configured_by`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('4118DCDF115445DE8C3942755857F7C0', 'SC202605230002', 'inbound', '0C4C9F5614C44D39A8322B05456CC02B', 'B07965F04E1F4D0BBEDA4689E4C63B6D', '8AC03250752248CB9FA87D0DDCAB5D24', 'ZKZX34000213', 'ZKZX34000047', 'cell_storage', 'dpz', NULL, NULL, 'zkxw', NULL, NULL, 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-23 21:59:37', 'd3000000000000000000000000000001', '2026-05-23 21:59:37', 0);
INSERT INTO `biz_production_work_order` (`id`, `work_order_no`, `work_order_type`, `reception_id`, `protocol_sample_id`, `collection_protocol_id`, `protocol_no`, `sample_code`, `reception_source`, `work_order_status`, `configured_time`, `configured_by`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('470EC375EFDA4477A0BE24CF056F90A2', 'SC202605240002', 'inbound', '992510A326664ED6AEB7F27CC3F2427A', 'B4F949F7BA014110AD724FA529674C77', 'C7673FDA427A47169F75D0BF4ED32BCC', 'ZKZX34000074', 'ZKZX34000224', 'research_donation', 'dpz', NULL, NULL, 'zkxw', NULL, '123', 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-24 10:58:11', 'd3000000000000000000000000000001', '2026-05-24 17:34:45', 0);
INSERT INTO `biz_production_work_order` (`id`, `work_order_no`, `work_order_type`, `reception_id`, `protocol_sample_id`, `collection_protocol_id`, `protocol_no`, `sample_code`, `reception_source`, `work_order_status`, `configured_time`, `configured_by`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('4BE697F36078463A854E860F4D531CEF', 'LSSC202605240001', 'temporary', NULL, NULL, NULL, NULL, NULL, 'cell_storage', 'jxz', '2026-05-24 16:46:23', 'd3000000000000000000000000000001', 'zkxw', NULL, '备注123', 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-24 14:36:27', 'd3000000000000000000000000000001', '2026-05-24 17:34:52', 0);
INSERT INTO `biz_production_work_order` (`id`, `work_order_no`, `work_order_type`, `reception_id`, `protocol_sample_id`, `collection_protocol_id`, `protocol_no`, `sample_code`, `reception_source`, `work_order_status`, `configured_time`, `configured_by`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('62365CD4BB5248B5AC6EB325950CEAA5', 'SC202605240001', 'inbound', '3E2045A92A284BB4984DF4D583B9C4C6', 'DB6632DA712649899144A561F41A444C', 'DA1705BE7D974813999C00370C7DDDB0', 'ZKZX34000211', 'ZKZX34000627', 'cell_storage', 'ywc', NULL, NULL, 'zkxw', NULL, NULL, 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-24 09:12:44', 'd3000000000000000000000000000001', '2026-05-24 11:01:36', 0);
INSERT INTO `biz_production_work_order` (`id`, `work_order_no`, `work_order_type`, `reception_id`, `protocol_sample_id`, `collection_protocol_id`, `protocol_no`, `sample_code`, `reception_source`, `work_order_status`, `configured_time`, `configured_by`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('682AA2E0F0E44C7799D8543B132F7E6D', 'SC202605230001', 'inbound', '91434DB5CE8041B7BC233974217C6EC5', '986375DADE664889AB0C8782F66833BC', '71C05B7EF5D8423386772B21E7ADE7F4', 'ZKZX34000276', 'ZKZX34000201', 'cell_storage', 'dpz', NULL, NULL, 'zkxw', NULL, NULL, 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-23 15:18:55', 'd3000000000000000000000000000001', '2026-05-23 15:18:55', 0);
INSERT INTO `biz_production_work_order` (`id`, `work_order_no`, `work_order_type`, `reception_id`, `protocol_sample_id`, `collection_protocol_id`, `protocol_no`, `sample_code`, `reception_source`, `work_order_status`, `configured_time`, `configured_by`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('863A13D23DFC40BF9F47A734A032386C', 'SC202605200002', 'inbound', '8CE7CCC0F349405CAD8D81E91DC9CCAA', '989108647D434408952B9E5DE3ACB290', 'C7673FDA427A47169F75D0BF4ED32BCC', 'ZKZX34000074', 'ZKZX34000113', 'research_donation', 'jxz', NULL, NULL, 'zkxw', NULL, NULL, 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-20 13:29:13', 'd3000000000000000000000000000001', '2026-05-23 13:19:55', 0);
INSERT INTO `biz_production_work_order` (`id`, `work_order_no`, `work_order_type`, `reception_id`, `protocol_sample_id`, `collection_protocol_id`, `protocol_no`, `sample_code`, `reception_source`, `work_order_status`, `configured_time`, `configured_by`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('965FF41D3E8A4E49A5C3B171614FE4A9', 'SC202605240003', 'inbound', '', '', '', '', '', 'cell_storage', 'dpz', NULL, NULL, 'zkxw', NULL, '', 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-24 13:14:41', 'd3000000000000000000000000000001', '2026-05-24 13:31:32', 1);
INSERT INTO `biz_production_work_order` (`id`, `work_order_no`, `work_order_type`, `reception_id`, `protocol_sample_id`, `collection_protocol_id`, `protocol_no`, `sample_code`, `reception_source`, `work_order_status`, `configured_time`, `configured_by`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('9C4F9AF52EA1463791D99CA0313059E8', 'SC202605210001', 'inbound', '72BBB73267BB44ABB65CA1309FB4E993', '6CE239AE7A864187B597E2C9E4925AA0', 'A2E0B0C74C854A56BD1150B08B7AF6FA', 'ZKZX34000299', 'ZKZX34000712', 'cell_storage', 'ywc', NULL, NULL, 'zkxw', NULL, NULL, 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-21 09:57:54', 'd3000000000000000000000000000001', '2026-05-23 11:35:53', 0);
INSERT INTO `biz_production_work_order` (`id`, `work_order_no`, `work_order_type`, `reception_id`, `protocol_sample_id`, `collection_protocol_id`, `protocol_no`, `sample_code`, `reception_source`, `infusion_schedule_id`, `work_order_status`, `configured_time`, `configured_by`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('217F265C4C98441BA7DB69144EDE43C4', 'SC202605200001', 'inbound', 'EBD08E35007D4E5E928DABD9101A336E', '078FC4C88FC84BD8AEAAB76967962EAA', '05F94756C7BD4EF4AA7C4780FBF90316', 'ZKZX34000064', 'ZKZX34000429', 'cell_storage', NULL, 'dpz', NULL, NULL, 'zkxw', NULL, NULL, 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-20 13:21:32', 'd3000000000000000000000000000001', '2026-05-20 13:21:32', 0);
INSERT INTO `biz_production_work_order` (`id`, `work_order_no`, `work_order_type`, `reception_id`, `protocol_sample_id`, `collection_protocol_id`, `protocol_no`, `sample_code`, `reception_source`, `infusion_schedule_id`, `work_order_status`, `configured_time`, `configured_by`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('4118DCDF115445DE8C3942755857F7C0', 'SC202605230002', 'inbound', '0C4C9F5614C44D39A8322B05456CC02B', 'B07965F04E1F4D0BBEDA4689E4C63B6D', '8AC03250752248CB9FA87D0DDCAB5D24', 'ZKZX34000213', 'ZKZX34000047', 'cell_storage', NULL, 'dpz', NULL, NULL, 'zkxw', NULL, NULL, 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-23 21:59:37', 'd3000000000000000000000000000001', '2026-05-23 21:59:37', 0);
INSERT INTO `biz_production_work_order` (`id`, `work_order_no`, `work_order_type`, `reception_id`, `protocol_sample_id`, `collection_protocol_id`, `protocol_no`, `sample_code`, `reception_source`, `infusion_schedule_id`, `work_order_status`, `configured_time`, `configured_by`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('470EC375EFDA4477A0BE24CF056F90A2', 'SC202605240002', 'inbound', '992510A326664ED6AEB7F27CC3F2427A', 'B4F949F7BA014110AD724FA529674C77', 'C7673FDA427A47169F75D0BF4ED32BCC', 'ZKZX34000074', 'ZKZX34000224', 'research_donation', NULL, 'dpz', NULL, NULL, 'zkxw', NULL, '123', 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-24 10:58:11', 'd3000000000000000000000000000001', '2026-05-24 17:34:45', 0);
INSERT INTO `biz_production_work_order` (`id`, `work_order_no`, `work_order_type`, `reception_id`, `protocol_sample_id`, `collection_protocol_id`, `protocol_no`, `sample_code`, `reception_source`, `infusion_schedule_id`, `work_order_status`, `configured_time`, `configured_by`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('4BE697F36078463A854E860F4D531CEF', 'LSSC202605240001', 'temporary', NULL, NULL, NULL, NULL, NULL, 'cell_storage', NULL, 'jxz', '2026-05-24 16:46:23', 'd3000000000000000000000000000001', 'zkxw', NULL, '备注123', 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-24 14:36:27', 'd3000000000000000000000000000001', '2026-05-24 17:34:52', 0);
INSERT INTO `biz_production_work_order` (`id`, `work_order_no`, `work_order_type`, `reception_id`, `protocol_sample_id`, `collection_protocol_id`, `protocol_no`, `sample_code`, `reception_source`, `infusion_schedule_id`, `work_order_status`, `configured_time`, `configured_by`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('62365CD4BB5248B5AC6EB325950CEAA5', 'SC202605240001', 'inbound', '3E2045A92A284BB4984DF4D583B9C4C6', 'DB6632DA712649899144A561F41A444C', 'DA1705BE7D974813999C00370C7DDDB0', 'ZKZX34000211', 'ZKZX34000627', 'cell_storage', NULL, 'ywc', NULL, NULL, 'zkxw', NULL, NULL, 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-24 09:12:44', 'd3000000000000000000000000000001', '2026-05-24 11:01:36', 0);
INSERT INTO `biz_production_work_order` (`id`, `work_order_no`, `work_order_type`, `reception_id`, `protocol_sample_id`, `collection_protocol_id`, `protocol_no`, `sample_code`, `reception_source`, `infusion_schedule_id`, `work_order_status`, `configured_time`, `configured_by`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('682AA2E0F0E44C7799D8543B132F7E6D', 'SC202605230001', 'inbound', '91434DB5CE8041B7BC233974217C6EC5', '986375DADE664889AB0C8782F66833BC', '71C05B7EF5D8423386772B21E7ADE7F4', 'ZKZX34000276', 'ZKZX34000201', 'cell_storage', NULL, 'dpz', NULL, NULL, 'zkxw', NULL, NULL, 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-23 15:18:55', 'd3000000000000000000000000000001', '2026-05-23 15:18:55', 0);
INSERT INTO `biz_production_work_order` (`id`, `work_order_no`, `work_order_type`, `reception_id`, `protocol_sample_id`, `collection_protocol_id`, `protocol_no`, `sample_code`, `reception_source`, `infusion_schedule_id`, `work_order_status`, `configured_time`, `configured_by`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('863A13D23DFC40BF9F47A734A032386C', 'SC202605200002', 'inbound', '8CE7CCC0F349405CAD8D81E91DC9CCAA', '989108647D434408952B9E5DE3ACB290', 'C7673FDA427A47169F75D0BF4ED32BCC', 'ZKZX34000074', 'ZKZX34000113', 'research_donation', NULL, 'jxz', NULL, NULL, 'zkxw', NULL, NULL, 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-20 13:29:13', 'd3000000000000000000000000000001', '2026-05-23 13:19:55', 0);
INSERT INTO `biz_production_work_order` (`id`, `work_order_no`, `work_order_type`, `reception_id`, `protocol_sample_id`, `collection_protocol_id`, `protocol_no`, `sample_code`, `reception_source`, `infusion_schedule_id`, `work_order_status`, `configured_time`, `configured_by`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('965FF41D3E8A4E49A5C3B171614FE4A9', 'SC202605240003', 'inbound', '', '', '', '', '', 'cell_storage', NULL, 'dpz', NULL, NULL, 'zkxw', NULL, '', 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-24 13:14:41', 'd3000000000000000000000000000001', '2026-05-24 13:31:32', 1);
INSERT INTO `biz_production_work_order` (`id`, `work_order_no`, `work_order_type`, `reception_id`, `protocol_sample_id`, `collection_protocol_id`, `protocol_no`, `sample_code`, `reception_source`, `infusion_schedule_id`, `work_order_status`, `configured_time`, `configured_by`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('9C4F9AF52EA1463791D99CA0313059E8', 'SC202605210001', 'inbound', '72BBB73267BB44ABB65CA1309FB4E993', '6CE239AE7A864187B597E2C9E4925AA0', 'A2E0B0C74C854A56BD1150B08B7AF6FA', 'ZKZX34000299', 'ZKZX34000712', 'cell_storage', NULL, 'ywc', NULL, NULL, 'zkxw', NULL, NULL, 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-21 09:57:54', 'd3000000000000000000000000000001', '2026-05-23 11:35:53', 0);
COMMIT;
-- ----------------------------
@@ -6679,6 +6775,7 @@ CREATE TABLE `biz_qc_work_order` (
`protocol_no` varchar(64) DEFAULT NULL COMMENT '协议号快照',
`sample_code` varchar(32) DEFAULT NULL COMMENT '样本编码快照',
`reception_source` varchar(20) DEFAULT 'cell_storage',
`infusion_schedule_id` varchar(64) DEFAULT NULL COMMENT '中试输注计划ID(出库质检关联)',
`qc_biz_type` varchar(20) NOT NULL DEFAULT 'inbound' COMMENT '质检业务类型 inbound入库质检 outbound出库质检',
`cell_product_id` varchar(64) DEFAULT NULL COMMENT '质检对象-细胞产品ID',
`work_order_status` varchar(16) NOT NULL DEFAULT 'dpz' COMMENT 'dpz待配置 ypz已配置 ywc已完成',
@@ -6705,20 +6802,20 @@ CREATE TABLE `biz_qc_work_order` (
-- Records of biz_qc_work_order
-- ----------------------------
BEGIN;
INSERT INTO `biz_qc_work_order` (`id`, `work_order_no`, `work_order_type`, `reception_id`, `protocol_sample_id`, `collection_protocol_id`, `protocol_no`, `sample_code`, `reception_source`, `qc_biz_type`, `cell_product_id`, `work_order_status`, `has_lab`, `has_third_party`, `configured_time`, `configured_by`, `third_party_fee_total`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('0478AAE2636141FE87D4747DF00FC61C', 'ZJ202605240002', 'inbound', '992510A326664ED6AEB7F27CC3F2427A', 'B4F949F7BA014110AD724FA529674C77', 'C7673FDA427A47169F75D0BF4ED32BCC', 'ZKZX34000074', 'ZKZX34000224', 'research_donation', 'inbound', NULL, 'dpz', '0', '0', NULL, NULL, NULL, 'zkxw', NULL, '123', 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-24 10:58:11', 'd3000000000000000000000000000001', '2026-05-24 17:34:28', 0);
INSERT INTO `biz_qc_work_order` (`id`, `work_order_no`, `work_order_type`, `reception_id`, `protocol_sample_id`, `collection_protocol_id`, `protocol_no`, `sample_code`, `reception_source`, `qc_biz_type`, `cell_product_id`, `work_order_status`, `has_lab`, `has_third_party`, `configured_time`, `configured_by`, `third_party_fee_total`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('227F1B2DCF93461ABA31A62689420D08', 'ZJ202605230002', 'inbound', '0C4C9F5614C44D39A8322B05456CC02B', 'B07965F04E1F4D0BBEDA4689E4C63B6D', '8AC03250752248CB9FA87D0DDCAB5D24', 'ZKZX34000213', 'ZKZX34000047', 'cell_storage', 'inbound', NULL, 'dpz', '0', '0', NULL, NULL, NULL, 'zkxw', NULL, NULL, 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-23 21:59:37', 'd3000000000000000000000000000001', '2026-05-23 21:59:37', 0);
INSERT INTO `biz_qc_work_order` (`id`, `work_order_no`, `work_order_type`, `reception_id`, `protocol_sample_id`, `collection_protocol_id`, `protocol_no`, `sample_code`, `reception_source`, `qc_biz_type`, `cell_product_id`, `work_order_status`, `has_lab`, `has_third_party`, `configured_time`, `configured_by`, `third_party_fee_total`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('2C5557BD7AA847B7817481B804F5D53D', 'ZJ202605170002', 'inbound', '399068547D164EA9A0BCAA70FB4E2792', '405B20AD1A044E1A926AA4092BD7540D', '5BFDF94E590E4022BC1F4E84F3430F85', 'ZKZX34000074', 'ZKZX34000224', 'cell_storage', 'inbound', NULL, 'dpz', '0', '0', NULL, NULL, NULL, 'zkxw', NULL, NULL, 'd3000000000000000000000000000001', 'd1000000000000000000000000000002', '2026-05-17 22:53:05', 'd3000000000000000000000000000001', '2026-05-17 22:53:05', 0);
INSERT INTO `biz_qc_work_order` (`id`, `work_order_no`, `work_order_type`, `reception_id`, `protocol_sample_id`, `collection_protocol_id`, `protocol_no`, `sample_code`, `reception_source`, `qc_biz_type`, `cell_product_id`, `work_order_status`, `has_lab`, `has_third_party`, `configured_time`, `configured_by`, `third_party_fee_total`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('5AE0036017D749F3BBF8EBE628E2A3FA', 'LSZJ202605240001', 'temporary', NULL, NULL, NULL, NULL, NULL, 'cell_storage', 'inbound', NULL, 'ypz', '1', '1', '2026-05-24 14:38:10', 'd3000000000000000000000000000001', 6200.00, 'zkxw', NULL, '测试工单', 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-24 14:27:46', 'd3000000000000000000000000000001', '2026-05-24 16:08:10', 1);
INSERT INTO `biz_qc_work_order` (`id`, `work_order_no`, `work_order_type`, `reception_id`, `protocol_sample_id`, `collection_protocol_id`, `protocol_no`, `sample_code`, `reception_source`, `qc_biz_type`, `cell_product_id`, `work_order_status`, `has_lab`, `has_third_party`, `configured_time`, `configured_by`, `third_party_fee_total`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('6EC58ACF7BAE45EEA4494E2C69F8ECF1', 'LSZJ202605240004', 'temporary', NULL, NULL, NULL, NULL, NULL, 'cell_storage', 'temporary', '2000751CA3B14AFF92C0E67E98B19997', 'ywc', '1', '1', '2026-05-24 16:37:45', 'd3000000000000000000000000000001', 3500.00, 'zkxw', NULL, '临时抽检', 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-24 16:37:19', 'd3000000000000000000000000000001', '2026-05-24 16:42:41', 0);
INSERT INTO `biz_qc_work_order` (`id`, `work_order_no`, `work_order_type`, `reception_id`, `protocol_sample_id`, `collection_protocol_id`, `protocol_no`, `sample_code`, `reception_source`, `qc_biz_type`, `cell_product_id`, `work_order_status`, `has_lab`, `has_third_party`, `configured_time`, `configured_by`, `third_party_fee_total`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('86A50801958D432AA40DEDBFDAB64AD6', 'ZJ202605200002', 'inbound', '8CE7CCC0F349405CAD8D81E91DC9CCAA', '989108647D434408952B9E5DE3ACB290', 'C7673FDA427A47169F75D0BF4ED32BCC', 'ZKZX34000074', 'ZKZX34000113', 'research_donation', 'inbound', NULL, 'ypz', '1', '1', '2026-05-20 13:31:04', 'd3000000000000000000000000000001', 2300.00, 'zkxw', NULL, NULL, 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-20 13:29:13', 'd3000000000000000000000000000001', '2026-05-20 13:31:04', 0);
INSERT INTO `biz_qc_work_order` (`id`, `work_order_no`, `work_order_type`, `reception_id`, `protocol_sample_id`, `collection_protocol_id`, `protocol_no`, `sample_code`, `reception_source`, `qc_biz_type`, `cell_product_id`, `work_order_status`, `has_lab`, `has_third_party`, `configured_time`, `configured_by`, `third_party_fee_total`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('9E974C178CD040E58C4EB8E13767D17E', 'ZJ202605230001', 'inbound', '91434DB5CE8041B7BC233974217C6EC5', '9E5E540B9D73440ABBD8906B7F87F0F7', '71C05B7EF5D8423386772B21E7ADE7F4', 'ZKZX34000276', 'ZKZX34000201', 'cell_storage', 'inbound', NULL, 'dpz', '0', '0', NULL, NULL, NULL, 'zkxw', NULL, NULL, 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-23 15:18:54', 'd3000000000000000000000000000001', '2026-05-23 15:21:35', 0);
INSERT INTO `biz_qc_work_order` (`id`, `work_order_no`, `work_order_type`, `reception_id`, `protocol_sample_id`, `collection_protocol_id`, `protocol_no`, `sample_code`, `reception_source`, `qc_biz_type`, `cell_product_id`, `work_order_status`, `has_lab`, `has_third_party`, `configured_time`, `configured_by`, `third_party_fee_total`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('BE7B5B8C98354D26B7C3183A4944B3A9', 'ZJ202605200001', 'inbound', 'EBD08E35007D4E5E928DABD9101A336E', '078FC4C88FC84BD8AEAAB76967962EAA', '05F94756C7BD4EF4AA7C4780FBF90316', 'ZKZX34000064', 'ZKZX34000429', 'cell_storage', 'inbound', NULL, 'dpz', '0', '0', NULL, NULL, NULL, 'zkxw', NULL, NULL, 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-20 13:21:32', 'd3000000000000000000000000000001', '2026-05-20 13:21:32', 0);
INSERT INTO `biz_qc_work_order` (`id`, `work_order_no`, `work_order_type`, `reception_id`, `protocol_sample_id`, `collection_protocol_id`, `protocol_no`, `sample_code`, `reception_source`, `qc_biz_type`, `cell_product_id`, `work_order_status`, `has_lab`, `has_third_party`, `configured_time`, `configured_by`, `third_party_fee_total`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('C41B0BDA30144BC69F1A834DDEFC68B6', 'ZJ202605190001', 'inbound', '6D3DB0A8FC0349F1ADB04DA5D23069FD', '5EB1A5ECDDBE4132A99327620490A98D', '90FA870A2A764302AAB45CB5EE7B99E9', 'ZKZX34000005', 'ZKZX34000054', 'cell_storage', 'inbound', NULL, 'ypz', '1', '1', '2026-05-19 17:05:10', 'd3000000000000000000000000000001', 4400.00, 'zkxw', NULL, NULL, 'd3000000000000000000000000000001', 'd1000000000000000000000000000002', '2026-05-19 16:42:43', 'd3000000000000000000000000000001', '2026-05-19 17:05:10', 0);
INSERT INTO `biz_qc_work_order` (`id`, `work_order_no`, `work_order_type`, `reception_id`, `protocol_sample_id`, `collection_protocol_id`, `protocol_no`, `sample_code`, `reception_source`, `qc_biz_type`, `cell_product_id`, `work_order_status`, `has_lab`, `has_third_party`, `configured_time`, `configured_by`, `third_party_fee_total`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('C98A1DF541044EBC95B8D26A0E2AF897', 'LSZJ202605240003', 'temporary', NULL, NULL, NULL, NULL, NULL, 'cell_storage', 'inbound', NULL, 'ypz', '1', '1', '2026-05-24 16:25:05', 'd3000000000000000000000000000001', 4500.00, 'zkxw', NULL, '备注222', 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-24 16:24:34', 'd3000000000000000000000000000001', '2026-05-24 16:31:19', 1);
INSERT INTO `biz_qc_work_order` (`id`, `work_order_no`, `work_order_type`, `reception_id`, `protocol_sample_id`, `collection_protocol_id`, `protocol_no`, `sample_code`, `reception_source`, `qc_biz_type`, `cell_product_id`, `work_order_status`, `has_lab`, `has_third_party`, `configured_time`, `configured_by`, `third_party_fee_total`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('E05BE91A08B74116B01A7E8B41D20FC1', 'ZJ202605240001', 'inbound', '3E2045A92A284BB4984DF4D583B9C4C6', 'DB6632DA712649899144A561F41A444C', 'DA1705BE7D974813999C00370C7DDDB0', 'ZKZX34000211', 'ZKZX34000627', 'cell_storage', 'inbound', NULL, 'ywc', '1', '1', '2026-05-24 09:13:34', 'd3000000000000000000000000000001', 2000.00, 'zkxw', NULL, NULL, 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-24 09:12:43', 'd3000000000000000000000000000001', '2026-05-24 09:16:09', 0);
INSERT INTO `biz_qc_work_order` (`id`, `work_order_no`, `work_order_type`, `reception_id`, `protocol_sample_id`, `collection_protocol_id`, `protocol_no`, `sample_code`, `reception_source`, `qc_biz_type`, `cell_product_id`, `work_order_status`, `has_lab`, `has_third_party`, `configured_time`, `configured_by`, `third_party_fee_total`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('E8FFC3CE0FBF450181E922D92DFC0BA4', 'ZJ202605170001', 'inbound', 'F52757E85AC24583AB784D08E435B2CF', '77A4861598434AA3B5048832EFEDE329', '5BFDF94E590E4022BC1F4E84F3430F85', 'ZKZX34000074', 'ZKZX34000113', 'cell_storage', 'inbound', NULL, 'ypz', '1', '1', '2026-05-17 22:44:24', 'd3000000000000000000000000000001', 2800.00, 'zkxw', NULL, NULL, 'd3000000000000000000000000000001', 'd1000000000000000000000000000002', '2026-05-17 22:14:39', 'd3000000000000000000000000000001', '2026-05-17 22:44:24', 0);
INSERT INTO `biz_qc_work_order` (`id`, `work_order_no`, `work_order_type`, `reception_id`, `protocol_sample_id`, `collection_protocol_id`, `protocol_no`, `sample_code`, `reception_source`, `qc_biz_type`, `cell_product_id`, `work_order_status`, `has_lab`, `has_third_party`, `configured_time`, `configured_by`, `third_party_fee_total`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('FA414C5183364D38BE0C37C37E416B67', 'LSZJ202605240002', 'temporary', NULL, NULL, NULL, NULL, NULL, 'cell_storage', 'inbound', NULL, 'ypz', '1', '1', '2026-05-24 16:14:41', 'd3000000000000000000000000000001', 3500.00, 'zkxw', NULL, '临时任务1\n11', 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-24 16:14:17', 'd3000000000000000000000000000001', '2026-05-24 16:31:22', 1);
INSERT INTO `biz_qc_work_order` (`id`, `work_order_no`, `work_order_type`, `reception_id`, `protocol_sample_id`, `collection_protocol_id`, `protocol_no`, `sample_code`, `reception_source`, `qc_biz_type`, `cell_product_id`, `work_order_status`, `has_lab`, `has_third_party`, `configured_time`, `configured_by`, `third_party_fee_total`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('FF650EA8427D4259A7F298B9BF23935C', 'ZJ202605210001', 'inbound', '72BBB73267BB44ABB65CA1309FB4E993', '6CE239AE7A864187B597E2C9E4925AA0', 'A2E0B0C74C854A56BD1150B08B7AF6FA', 'ZKZX34000299', 'ZKZX34000712', 'cell_storage', 'inbound', NULL, 'ywc', '1', '1', '2026-05-21 10:10:48', 'd3000000000000000000000000000001', 2700.00, 'zkxw', NULL, NULL, 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-21 09:57:54', 'd3000000000000000000000000000001', '2026-05-21 10:51:09', 0);
INSERT INTO `biz_qc_work_order` (`id`, `work_order_no`, `work_order_type`, `reception_id`, `protocol_sample_id`, `collection_protocol_id`, `protocol_no`, `sample_code`, `reception_source`, `infusion_schedule_id`, `qc_biz_type`, `cell_product_id`, `work_order_status`, `has_lab`, `has_third_party`, `configured_time`, `configured_by`, `third_party_fee_total`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('0478AAE2636141FE87D4747DF00FC61C', 'ZJ202605240002', 'inbound', '992510A326664ED6AEB7F27CC3F2427A', 'B4F949F7BA014110AD724FA529674C77', 'C7673FDA427A47169F75D0BF4ED32BCC', 'ZKZX34000074', 'ZKZX34000224', 'research_donation', NULL, 'inbound', NULL, 'dpz', '0', '0', NULL, NULL, NULL, 'zkxw', NULL, '123', 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-24 10:58:11', 'd3000000000000000000000000000001', '2026-05-24 17:34:28', 0);
INSERT INTO `biz_qc_work_order` (`id`, `work_order_no`, `work_order_type`, `reception_id`, `protocol_sample_id`, `collection_protocol_id`, `protocol_no`, `sample_code`, `reception_source`, `infusion_schedule_id`, `qc_biz_type`, `cell_product_id`, `work_order_status`, `has_lab`, `has_third_party`, `configured_time`, `configured_by`, `third_party_fee_total`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('227F1B2DCF93461ABA31A62689420D08', 'ZJ202605230002', 'inbound', '0C4C9F5614C44D39A8322B05456CC02B', 'B07965F04E1F4D0BBEDA4689E4C63B6D', '8AC03250752248CB9FA87D0DDCAB5D24', 'ZKZX34000213', 'ZKZX34000047', 'cell_storage', NULL, 'inbound', NULL, 'dpz', '0', '0', NULL, NULL, NULL, 'zkxw', NULL, NULL, 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-23 21:59:37', 'd3000000000000000000000000000001', '2026-05-23 21:59:37', 0);
INSERT INTO `biz_qc_work_order` (`id`, `work_order_no`, `work_order_type`, `reception_id`, `protocol_sample_id`, `collection_protocol_id`, `protocol_no`, `sample_code`, `reception_source`, `infusion_schedule_id`, `qc_biz_type`, `cell_product_id`, `work_order_status`, `has_lab`, `has_third_party`, `configured_time`, `configured_by`, `third_party_fee_total`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('2C5557BD7AA847B7817481B804F5D53D', 'ZJ202605170002', 'inbound', '399068547D164EA9A0BCAA70FB4E2792', '405B20AD1A044E1A926AA4092BD7540D', '5BFDF94E590E4022BC1F4E84F3430F85', 'ZKZX34000074', 'ZKZX34000224', 'cell_storage', NULL, 'inbound', NULL, 'dpz', '0', '0', NULL, NULL, NULL, 'zkxw', NULL, NULL, 'd3000000000000000000000000000001', 'd1000000000000000000000000000002', '2026-05-17 22:53:05', 'd3000000000000000000000000000001', '2026-05-17 22:53:05', 0);
INSERT INTO `biz_qc_work_order` (`id`, `work_order_no`, `work_order_type`, `reception_id`, `protocol_sample_id`, `collection_protocol_id`, `protocol_no`, `sample_code`, `reception_source`, `infusion_schedule_id`, `qc_biz_type`, `cell_product_id`, `work_order_status`, `has_lab`, `has_third_party`, `configured_time`, `configured_by`, `third_party_fee_total`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('5AE0036017D749F3BBF8EBE628E2A3FA', 'LSZJ202605240001', 'temporary', NULL, NULL, NULL, NULL, NULL, 'cell_storage', NULL, 'inbound', NULL, 'ypz', '1', '1', '2026-05-24 14:38:10', 'd3000000000000000000000000000001', 6200.00, 'zkxw', NULL, '测试工单', 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-24 14:27:46', 'd3000000000000000000000000000001', '2026-05-24 16:08:10', 1);
INSERT INTO `biz_qc_work_order` (`id`, `work_order_no`, `work_order_type`, `reception_id`, `protocol_sample_id`, `collection_protocol_id`, `protocol_no`, `sample_code`, `reception_source`, `infusion_schedule_id`, `qc_biz_type`, `cell_product_id`, `work_order_status`, `has_lab`, `has_third_party`, `configured_time`, `configured_by`, `third_party_fee_total`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('6EC58ACF7BAE45EEA4494E2C69F8ECF1', 'LSZJ202605240004', 'temporary', NULL, NULL, NULL, NULL, NULL, 'cell_storage', NULL, 'temporary', '2000751CA3B14AFF92C0E67E98B19997', 'ywc', '1', '1', '2026-05-24 16:37:45', 'd3000000000000000000000000000001', 3500.00, 'zkxw', NULL, '临时抽检', 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-24 16:37:19', 'd3000000000000000000000000000001', '2026-05-24 16:42:41', 0);
INSERT INTO `biz_qc_work_order` (`id`, `work_order_no`, `work_order_type`, `reception_id`, `protocol_sample_id`, `collection_protocol_id`, `protocol_no`, `sample_code`, `reception_source`, `infusion_schedule_id`, `qc_biz_type`, `cell_product_id`, `work_order_status`, `has_lab`, `has_third_party`, `configured_time`, `configured_by`, `third_party_fee_total`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('86A50801958D432AA40DEDBFDAB64AD6', 'ZJ202605200002', 'inbound', '8CE7CCC0F349405CAD8D81E91DC9CCAA', '989108647D434408952B9E5DE3ACB290', 'C7673FDA427A47169F75D0BF4ED32BCC', 'ZKZX34000074', 'ZKZX34000113', 'research_donation', NULL, 'inbound', NULL, 'ypz', '1', '1', '2026-05-20 13:31:04', 'd3000000000000000000000000000001', 2300.00, 'zkxw', NULL, NULL, 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-20 13:29:13', 'd3000000000000000000000000000001', '2026-05-20 13:31:04', 0);
INSERT INTO `biz_qc_work_order` (`id`, `work_order_no`, `work_order_type`, `reception_id`, `protocol_sample_id`, `collection_protocol_id`, `protocol_no`, `sample_code`, `reception_source`, `infusion_schedule_id`, `qc_biz_type`, `cell_product_id`, `work_order_status`, `has_lab`, `has_third_party`, `configured_time`, `configured_by`, `third_party_fee_total`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('9E974C178CD040E58C4EB8E13767D17E', 'ZJ202605230001', 'inbound', '91434DB5CE8041B7BC233974217C6EC5', '9E5E540B9D73440ABBD8906B7F87F0F7', '71C05B7EF5D8423386772B21E7ADE7F4', 'ZKZX34000276', 'ZKZX34000201', 'cell_storage', NULL, 'inbound', NULL, 'dpz', '0', '0', NULL, NULL, NULL, 'zkxw', NULL, NULL, 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-23 15:18:54', 'd3000000000000000000000000000001', '2026-05-23 15:21:35', 0);
INSERT INTO `biz_qc_work_order` (`id`, `work_order_no`, `work_order_type`, `reception_id`, `protocol_sample_id`, `collection_protocol_id`, `protocol_no`, `sample_code`, `reception_source`, `infusion_schedule_id`, `qc_biz_type`, `cell_product_id`, `work_order_status`, `has_lab`, `has_third_party`, `configured_time`, `configured_by`, `third_party_fee_total`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('BE7B5B8C98354D26B7C3183A4944B3A9', 'ZJ202605200001', 'inbound', 'EBD08E35007D4E5E928DABD9101A336E', '078FC4C88FC84BD8AEAAB76967962EAA', '05F94756C7BD4EF4AA7C4780FBF90316', 'ZKZX34000064', 'ZKZX34000429', 'cell_storage', NULL, 'inbound', NULL, 'dpz', '0', '0', NULL, NULL, NULL, 'zkxw', NULL, NULL, 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-20 13:21:32', 'd3000000000000000000000000000001', '2026-05-20 13:21:32', 0);
INSERT INTO `biz_qc_work_order` (`id`, `work_order_no`, `work_order_type`, `reception_id`, `protocol_sample_id`, `collection_protocol_id`, `protocol_no`, `sample_code`, `reception_source`, `infusion_schedule_id`, `qc_biz_type`, `cell_product_id`, `work_order_status`, `has_lab`, `has_third_party`, `configured_time`, `configured_by`, `third_party_fee_total`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('C41B0BDA30144BC69F1A834DDEFC68B6', 'ZJ202605190001', 'inbound', '6D3DB0A8FC0349F1ADB04DA5D23069FD', '5EB1A5ECDDBE4132A99327620490A98D', '90FA870A2A764302AAB45CB5EE7B99E9', 'ZKZX34000005', 'ZKZX34000054', 'cell_storage', NULL, 'inbound', NULL, 'ypz', '1', '1', '2026-05-19 17:05:10', 'd3000000000000000000000000000001', 4400.00, 'zkxw', NULL, NULL, 'd3000000000000000000000000000001', 'd1000000000000000000000000000002', '2026-05-19 16:42:43', 'd3000000000000000000000000000001', '2026-05-19 17:05:10', 0);
INSERT INTO `biz_qc_work_order` (`id`, `work_order_no`, `work_order_type`, `reception_id`, `protocol_sample_id`, `collection_protocol_id`, `protocol_no`, `sample_code`, `reception_source`, `infusion_schedule_id`, `qc_biz_type`, `cell_product_id`, `work_order_status`, `has_lab`, `has_third_party`, `configured_time`, `configured_by`, `third_party_fee_total`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('C98A1DF541044EBC95B8D26A0E2AF897', 'LSZJ202605240003', 'temporary', NULL, NULL, NULL, NULL, NULL, 'cell_storage', NULL, 'inbound', NULL, 'ypz', '1', '1', '2026-05-24 16:25:05', 'd3000000000000000000000000000001', 4500.00, 'zkxw', NULL, '备注222', 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-24 16:24:34', 'd3000000000000000000000000000001', '2026-05-24 16:31:19', 1);
INSERT INTO `biz_qc_work_order` (`id`, `work_order_no`, `work_order_type`, `reception_id`, `protocol_sample_id`, `collection_protocol_id`, `protocol_no`, `sample_code`, `reception_source`, `infusion_schedule_id`, `qc_biz_type`, `cell_product_id`, `work_order_status`, `has_lab`, `has_third_party`, `configured_time`, `configured_by`, `third_party_fee_total`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('E05BE91A08B74116B01A7E8B41D20FC1', 'ZJ202605240001', 'inbound', '3E2045A92A284BB4984DF4D583B9C4C6', 'DB6632DA712649899144A561F41A444C', 'DA1705BE7D974813999C00370C7DDDB0', 'ZKZX34000211', 'ZKZX34000627', 'cell_storage', NULL, 'inbound', NULL, 'ywc', '1', '1', '2026-05-24 09:13:34', 'd3000000000000000000000000000001', 2000.00, 'zkxw', NULL, NULL, 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-24 09:12:43', 'd3000000000000000000000000000001', '2026-05-24 09:16:09', 0);
INSERT INTO `biz_qc_work_order` (`id`, `work_order_no`, `work_order_type`, `reception_id`, `protocol_sample_id`, `collection_protocol_id`, `protocol_no`, `sample_code`, `reception_source`, `infusion_schedule_id`, `qc_biz_type`, `cell_product_id`, `work_order_status`, `has_lab`, `has_third_party`, `configured_time`, `configured_by`, `third_party_fee_total`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('E8FFC3CE0FBF450181E922D92DFC0BA4', 'ZJ202605170001', 'inbound', 'F52757E85AC24583AB784D08E435B2CF', '77A4861598434AA3B5048832EFEDE329', '5BFDF94E590E4022BC1F4E84F3430F85', 'ZKZX34000074', 'ZKZX34000113', 'cell_storage', NULL, 'inbound', NULL, 'ypz', '1', '1', '2026-05-17 22:44:24', 'd3000000000000000000000000000001', 2800.00, 'zkxw', NULL, NULL, 'd3000000000000000000000000000001', 'd1000000000000000000000000000002', '2026-05-17 22:14:39', 'd3000000000000000000000000000001', '2026-05-17 22:44:24', 0);
INSERT INTO `biz_qc_work_order` (`id`, `work_order_no`, `work_order_type`, `reception_id`, `protocol_sample_id`, `collection_protocol_id`, `protocol_no`, `sample_code`, `reception_source`, `infusion_schedule_id`, `qc_biz_type`, `cell_product_id`, `work_order_status`, `has_lab`, `has_third_party`, `configured_time`, `configured_by`, `third_party_fee_total`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('FA414C5183364D38BE0C37C37E416B67', 'LSZJ202605240002', 'temporary', NULL, NULL, NULL, NULL, NULL, 'cell_storage', NULL, 'inbound', NULL, 'ypz', '1', '1', '2026-05-24 16:14:41', 'd3000000000000000000000000000001', 3500.00, 'zkxw', NULL, '临时任务1\n11', 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-24 16:14:17', 'd3000000000000000000000000000001', '2026-05-24 16:31:22', 1);
INSERT INTO `biz_qc_work_order` (`id`, `work_order_no`, `work_order_type`, `reception_id`, `protocol_sample_id`, `collection_protocol_id`, `protocol_no`, `sample_code`, `reception_source`, `infusion_schedule_id`, `qc_biz_type`, `cell_product_id`, `work_order_status`, `has_lab`, `has_third_party`, `configured_time`, `configured_by`, `third_party_fee_total`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('FF650EA8427D4259A7F298B9BF23935C', 'ZJ202605210001', 'inbound', '72BBB73267BB44ABB65CA1309FB4E993', '6CE239AE7A864187B597E2C9E4925AA0', 'A2E0B0C74C854A56BD1150B08B7AF6FA', 'ZKZX34000299', 'ZKZX34000712', 'cell_storage', NULL, 'inbound', NULL, 'ywc', '1', '1', '2026-05-21 10:10:48', 'd3000000000000000000000000000001', 2700.00, 'zkxw', NULL, NULL, 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-21 09:57:54', 'd3000000000000000000000000000001', '2026-05-21 10:51:09', 0);
COMMIT;
-- ----------------------------
@@ -10721,6 +10818,8 @@ INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `co
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('80000000000000000000000000000007', '体检机构及项目价格', '80000000000000000000000000000001', 'C', 'checkup-institution', '/pilot-service/checkup-institution/index', 'pilot-service:checkup-institution:list', 1, '1', '1', 'zkxw', 6, NULL, NULL, '', '2026-05-18 07:53:36', NULL, '2026-05-20 16:04:13', 0);
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('80000000000000000000000000000008', '渠道服务购买订单', '80000000000000000000000000000001', 'C', 'channel-service-order', '/pilot-service/channel-service-order/index', 'pilot-service:channel-service-order:list', 1, '1', '1', 'zkxw', 7, NULL, NULL, '', '2026-05-24 19:09:44', NULL, '2026-05-24 19:09:44', 0);
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('80000000000000000000000000000009', '渠道服务购买订单(财务确认)', '80000000000000000000000000000001', 'C', 'channel-service-order-finance', '/pilot-service/channel-service-order-finance/index', 'pilot-service:channel-service-order-finance:list', 1, '1', '1', 'zkxw', 8, NULL, NULL, '', '2026-05-24 19:09:44', NULL, '2026-05-24 19:09:44', 0);
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('80000000000000000000000000000010', '中试服务申请单', '80000000000000000000000000000001', 'C', 'pilot-application', '/pilot-service/pilot-application/index', 'pilot-service:pilot-application:list', 1, '1', '1', 'zkxw', 9, NULL, NULL, '', '2026-05-25 12:51:32', NULL, '2026-05-25 12:51:32', 0);
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('80000000000000000000000000000011', '申请单详情', '80000000000000000000000000000001', 'C', 'pilot-application/detail', '/pilot-service/pilot-application/ApplicationDetail', NULL, 1, '0', '1', 'zkxw', 99, NULL, NULL, '', '2026-05-25 12:51:32', NULL, '2026-05-25 12:51:32', 0);
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('90000000000000000000000000000001', '生产管理', '2', 'M', '/production', '/index/index', NULL, 1, '1', '1', 'zkxw', 7, NULL, NULL, '', '2026-05-18 00:00:00', NULL, '2026-05-20 16:04:14', 0);
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('90000000000000000000000000000002', '耗材管理', '90000000000000000000000000000001', 'C', 'consumable', '/production/consumable/index', 'production:consumable:list', 1, '1', '1', 'zkxw', 1, NULL, NULL, '', '2026-05-18 00:00:00', NULL, '2026-05-20 16:04:14', 0);
INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`, `is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('90000000000000000000000000000003', '试剂管理', '90000000000000000000000000000001', 'C', 'reagent', '/production/reagent/index', 'production:reagent:list', 1, '1', '1', 'zkxw', 3, NULL, NULL, '', '2026-05-18 00:00:00', NULL, '2026-05-20 16:04:14', 0);
@@ -11040,6 +11139,8 @@ INSERT INTO `sys_role_menu` (`id`, `role_id`, `menu_id`, `tenant_no`, `order_num
INSERT INTO `sys_role_menu` (`id`, `role_id`, `menu_id`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('66082AEAEE3842B4930E3F99B5A07ABD', '097bd2c6-4e72-11f1-9f47-00163e3bdd96', '105', 'zkxw', 0, NULL, 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-20 15:39:24', 'd3000000000000000000000000000001', '2026-05-20 15:39:24', 0);
INSERT INTO `sys_role_menu` (`id`, `role_id`, `menu_id`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('664DE616A20B4C9A80CFD5B89580827F', 'EBD6F9675D844979942688A4D2B7C11D', '124', 'zkxw', 0, NULL, 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-20 15:35:24', 'd3000000000000000000000000000001', '2026-05-20 15:39:13', 1);
INSERT INTO `sys_role_menu` (`id`, `role_id`, `menu_id`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('66609CB851F04E5DA3578D0A82A2E80D', 'EBD6F9675D844979942688A4D2B7C11D', '80000000000000000000000000000005', 'zkxw', 0, NULL, 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-20 15:35:24', 'd3000000000000000000000000000001', '2026-05-20 15:39:13', 1);
INSERT INTO `sys_role_menu` (`id`, `role_id`, `menu_id`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('667f475957f511f191b700163e3bdd96', '097bd2c6-4e72-11f1-9f47-00163e3bdd96', '80000000000000000000000000000010', 'zkxw', 0, NULL, 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-25 12:51:32', 'd3000000000000000000000000000001', '2026-05-25 12:51:32', 0);
INSERT INTO `sys_role_menu` (`id`, `role_id`, `menu_id`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('66826f4f57f511f191b700163e3bdd96', '097bd2c6-4e72-11f1-9f47-00163e3bdd96', '80000000000000000000000000000011', 'zkxw', 0, NULL, 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-25 12:51:32', 'd3000000000000000000000000000001', '2026-05-25 12:51:32', 0);
INSERT INTO `sys_role_menu` (`id`, `role_id`, `menu_id`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('66BE2654ADAC466388C85DE0E33C43F7', '097bd62b-4e72-11f1-9f47-00163e3bdd96', '103', 'zkxw', 0, NULL, 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-20 15:40:25', 'd3000000000000000000000000000001', '2026-05-20 15:40:25', 0);
INSERT INTO `sys_role_menu` (`id`, `role_id`, `menu_id`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('6730825900764CA79EE7B91FF2177AFC', 'EBD6F9675D844979942688A4D2B7C11D', '50000000000000000000000000000008', 'zkxw', 0, NULL, 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-20 15:35:24', 'd3000000000000000000000000000001', '2026-05-20 15:39:13', 1);
INSERT INTO `sys_role_menu` (`id`, `role_id`, `menu_id`, `tenant_no`, `order_num`, `remark`, `create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`) VALUES ('690E0A0AD5624DAE89A5070E557C76CB', '097bd2c6-4e72-11f1-9f47-00163e3bdd96', '108', 'zkxw', 0, NULL, 'd3000000000000000000000000000001', 'b13c2be2-4e71-11f1-9f47-00163e3bdd96', '2026-05-20 15:39:24', 'd3000000000000000000000000000001', '2026-05-20 15:39:24', 0);
@@ -0,0 +1,585 @@
# 中试服务申请单 Phase 1 实施计划
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
**Goal:** 实现中试服务申请单的完整 CRUD、患者信息管理、输注方案/计划管理,含后端 API + 前端列表页+详情Tab页。
**Architecture:** 独立后端模块方案(方案A)。新建 `crud/pilot_application.py` 和 `api/pilot_application.py`,在 `models.py` 中新增 4 个 Model。前端新增列表页+详情页,路由追加到 `sqxp.ts`。
**Tech Stack:** Python 3.9 / FastAPI / SQLAlchemy / Pydantic v2 / Vue 3 / TypeScript / Element Plus / Tailwind CSS 4
**Spec:** `docs/superpowers/specs/2026-05-24-pilot-application-phase1-design.md`
---
## Task 1: SQL 迁移文件 + Backend Models
**Files:**
- Create: `docs/sql/pilot-application-migration.sql`
- Modify: `backend/app/models/models.py`
- [ ] **Step 1: 创建 SQL 迁移文件**
创建 `docs/sql/pilot-application-migration.sql`,内容为 ALTER `biz_pilot_application` 增加 4 个字段 + 唯一索引:
```sql
-- 中试服务申请单 Phase 1 迁移
-- 为 biz_pilot_application 增加申请单号、状态、渠道缓存字段
ALTER TABLE biz_pilot_application
ADD COLUMN application_no VARCHAR(64) DEFAULT NULL
COMMENT '申请单号(自动生成,前缀ZSSQ)' AFTER id,
ADD COLUMN application_status VARCHAR(16) NOT NULL DEFAULT 'dks'
COMMENT 'dks待开始 jxz进行中 ywc已完成 yzf已作废' AFTER application_no,
ADD COLUMN channel_id VARCHAR(64) DEFAULT NULL
COMMENT '渠道ID(缓存自服务订单)' AFTER channel_service_order_id,
ADD COLUMN channel_name VARCHAR(200) DEFAULT NULL
COMMENT '渠道名称(缓存)' AFTER channel_id;
ALTER TABLE biz_pilot_application
ADD UNIQUE KEY uk_application_no (application_no, del_flag);
```
- [ ] **Step 2: 在 models.py 末尾(BizChannelServiceOrderTxn 之后)新增 4 个 Model**
遵循项目已有 Model 模式(参考 `BizChannelServiceOrder` 在 L1761 的写法):
- 字段顺序:id → 业务字段 → public 字段(tenant_no / order_num / remark / create_by / create_dept_id / create_time / update_by / update_time / del_flag)
- 类型映射:VARCHAR→String, INT→Integer, TINYINT→SmallInteger, DATETIME→DateTime, DECIMAL→Numeric
- 添加 `__tablename__` 和中文注释
新增的 4 个 Model:
**BizPilotApplication** → `biz_pilot_application`
- id, application_no, application_status(default='dks'), channel_service_order_id, channel_id, channel_name
- + public fields
**BizPilotPatient** → `biz_pilot_patient`
- id, pilot_application_id, customer_id, patient_name, sex, age, id_card_no, phone_no, emergency_contact, emergency_phone, clinical_diagnosis, diagnosis_attachments, need_checkup(default=1)
- + public fields
**BizPilotInfusionPlan** → `biz_pilot_infusion_plan`
- id, pilot_application_id, cell_type, spec_text, total_course_count, course_interval, infusion_route, infusion_start_date
- + public fields
**BizPilotInfusionSchedule** → `biz_pilot_infusion_schedule`
- id, infusion_plan_id, cell_type, spec_text, infusion_time, schedule_status(default=''), attachments
- + public fields
- [ ] **Step 3: 验证**
Run: `cd backend && source venv/bin/activate && python -c "from app.models.models import BizPilotApplication, BizPilotPatient, BizPilotInfusionPlan, BizPilotInfusionSchedule; print('Models imported OK')"`
Expected: `Models imported OK`
- [ ] **Step 4: 运行 LSP 诊断**
Run `lsp_diagnostics` on `backend/app/models/models.py` — expect 0 errors.
---
## Task 2: Backend CRUD
**Files:**
- Create: `backend/app/crud/pilot_application.py`
- [ ] **Step 1: 创建 CRUD 文件**
创建 `backend/app/crud/pilot_application.py`,遵循 `crud/pilot_service.py` 的模式(`_row_to_dict_*` + 分页列表 + CRUD 函数)。
**import 部分:**
```python
import uuid
import json
from datetime import datetime, date
from typing import Dict, List, Optional, Any
from sqlalchemy.orm import Session
from sqlalchemy import and_
from app.models.models import (
BizPilotApplication, BizPilotPatient, BizPilotInfusionPlan, BizPilotInfusionSchedule,
BizChannelServiceOrder, BizChannelServiceOrderProduct, BizCustomer
)
from app.core.database import get_db
```
**_row_to_dict 函数(4 个):**
1. `_row_to_dict_application(row, db=None, tenant_no=None)`:
- 基础字段:id, applicationNo, applicationStatus, channelServiceOrderId, channelId, channelName, remark, createTime, updateTime
- 扩展字段(需 db 查询):
- patientName: 从 BizPilotPatient 查询(WHERE pilot_application_id=row.id AND del_flag=0)
- infusionPlanCount: 从 BizPilotInfusionPlan COUNT(WHERE pilot_application_id=row.id AND del_flag=0)
- serviceOrderNo: 从 BizChannelServiceOrder 查询(WHERE id=row.channel_service_order_id)取其关联的订单信息
- orderType: 同上,服务订单的 order_type
2. `_row_to_dict_patient(row)`:
- id, pilotApplicationId, customerId, patientName, sex, age, idCardNo, phoneNo, emergencyContact, emergencyPhone, clinicalDiagnosis, diagnosisAttachments, needCheckup, remark, createTime, updateTime
3. `_row_to_dict_infusion_plan(row, db=None, tenant_no=None)`:
- id, pilotApplicationId, cellType, specText, totalCourseCount, courseInterval, infusionRoute, infusionStartDate, remark, createTime, updateTime
- 扩展:scheduleCount (COUNT schedules), completedCount (COUNT WHERE schedule_status='ywc')
4. `_row_to_dict_infusion_schedule(row)`:
- id, infusionPlanId, cellType, specText, infusionTime, scheduleStatus, attachments, remark, createTime, updateTime
**CRUD 函数(16 个):**
**Application(8 个):**
- `list_applications(db, tenant_no, page, page_size, channel_id=None, application_status=None, channel_service_order_id=None)` — 分页列表,按 create_time DESC 排序
- `get_application(db, app_id, tenant_no)` — 获取详情
- `create_application(db, data, tenant_no, user_id, dept_id)` — 校验服务订单存在且 status='sxz',从服务订单缓存 channel_id/channel_name,生成 application_no(ZSSQ+YYYYMMDD+4位序列)
- `update_application(db, app_id, data, tenant_no)` — 仅 dks 状态可编辑
- `soft_delete_application(db, app_id, tenant_no)` — 仅 dks 状态
- `start_application(db, app_id, tenant_no, user_id)` — dks→jxz
- `complete_application(db, app_id, tenant_no, user_id)` — jxz→ywc
- `void_application(db, app_id, tenant_no, user_id)` — dks或jxz→yzf
**Patient(2 个):**
- `get_patient_by_application(db, app_id, tenant_no)`
- `save_patient(db, app_id, data, tenant_no, user_id, dept_id)` — 如果有 customer_id 则更新 biz_customer;如果无则新建 biz_customer 并回填 customer_id。然后用 upsert 逻辑保存 biz_pilot_patient(先查再更新或新建)。
**InfusionPlan(4 个):**
- `list_infusion_plans(db, app_id, tenant_no)` — 按 order_num / create_time ASC
- `create_infusion_plan(db, app_id, data, tenant_no, user_id, dept_id)`
- `update_infusion_plan(db, plan_id, data, tenant_no)`
- `soft_delete_infusion_plan(db, plan_id, tenant_no)` — 级联软删除其下所有 schedule
**InfusionSchedule(6 个):**
- `list_schedules_by_plan(db, plan_id, tenant_no)` — 按 order_num ASC
- `auto_generate_schedules(db, plan_id, tenant_no, user_id, dept_id)` — 读取 plan.total_course_count,批量插入 N 条 schedule
- `create_schedule(db, plan_id, data, tenant_no, user_id, dept_id)` — 手动添加单条
- `update_schedule(db, schedule_id, data, tenant_no)`
- `soft_delete_schedule(db, schedule_id, tenant_no)`
- `mark_schedule_complete(db, schedule_id, tenant_no, user_id)` — schedule_status='ywc'
**application_no 生成逻辑:**
```python
def _generate_application_no(db, tenant_no):
today_str = datetime.now().strftime('%Y%m%d')
prefix = f'ZSSQ{today_str}'
# 查今天已有的最大序号
existing = db.query(BizPilotApplication.application_no).filter(
BizPilotApplication.tenant_no == tenant_no,
BizPilotApplication.application_no.like(f'{prefix}%'),
BizPilotApplication.del_flag == 0
).order_by(BizPilotApplication.application_no.desc()).first()
seq = 1
if existing and existing[0]:
seq = int(existing[0][-4:]) + 1
return f'{prefix}{seq:04d}'
```
- [ ] **Step 2: 验证导入**
Run: `cd backend && source venv/bin/activate && python -c "from app.crud.pilot_application import list_applications; print('CRUD imported OK')"`
Expected: `CRUD imported OK`
- [ ] **Step 3: 运行 LSP 诊断**
Run `lsp_diagnostics` on `backend/app/crud/pilot_application.py` — expect 0 errors.
---
## Task 3: Backend API Routes + Router Registration
**Files:**
- Create: `backend/app/api/pilot_application.py`
- Modify: `backend/app/api/__init__.py`
- Modify: `backend/app/main.py`
- [ ] **Step 1: 创建 API 路由文件**
创建 `backend/app/api/pilot_application.py`,遵循 `api/pilot_service.py` 的模式(Pydantic schemas 内联 + 路由函数)。
**import 部分:**
```python
from fastapi import APIRouter, Depends, Query, Request
from sqlalchemy.orm import Session
from pydantic import BaseModel, Field
from typing import Optional, List
from app.core.database import get_db
from app.core.menu_guard import require_admin_or_super_admin
from app.crud import pilot_application
```
**Pydantic Schemas(6 个):**
```python
class ApplicationCreateBody(BaseModel):
channel_service_order_id: str
remark: Optional[str] = None
class ApplicationUpdateBody(BaseModel):
remark: Optional[str] = None
class PatientSaveBody(BaseModel):
customer_id: Optional[str] = None
patient_name: str
sex: Optional[str] = None
age: Optional[int] = None
id_card_no: Optional[str] = None
phone_no: Optional[str] = None
emergency_contact: Optional[str] = None
emergency_phone: Optional[str] = None
clinical_diagnosis: Optional[str] = None
diagnosis_attachments: Optional[str] = None
need_checkup: int = 1
class InfusionPlanCreateBody(BaseModel):
pilot_application_id: str
cell_type: str
spec_text: Optional[str] = None
total_course_count: int
course_interval: Optional[str] = None
infusion_route: Optional[str] = None
infusion_start_date: Optional[str] = None
class InfusionPlanUpdateBody(BaseModel):
cell_type: Optional[str] = None
spec_text: Optional[str] = None
total_course_count: Optional[int] = None
course_interval: Optional[str] = None
infusion_route: Optional[str] = None
infusion_start_date: Optional[str] = None
class InfusionScheduleUpdateBody(BaseModel):
infusion_time: Optional[str] = None
remark: Optional[str] = None
attachments: Optional[str] = None
```
**Router:**
```python
router = APIRouter(prefix="/web/admin", tags=["中试服务申请单管理"])
```
**API 路由(19 个):**
| 方法 | 路径 | 函数名 | 依赖 | 说明 |
|------|------|--------|------|------|
| GET | `/pilot-application/list` | api_list_applications | require_admin | 分页列表,query params: page/page_size/channel_id/application_status/channel_service_order_id |
| GET | `/pilot-application/detail` | api_get_application | require_admin | query param: id |
| POST | `/pilot-application/create` | api_create_application | require_admin | body: ApplicationCreateBody |
| PUT | `/pilot-application/update` | api_update_application | require_admin | body: ApplicationUpdateBody + id |
| DELETE | `/pilot-application/delete` | api_delete_application | require_admin | body: {id} |
| POST | `/pilot-application/start` | api_start_application | require_admin | body: {id} |
| POST | `/pilot-application/complete` | api_complete_application | require_admin | body: {id} |
| POST | `/pilot-application/void` | api_void_application | require_admin | body: {id} |
| GET | `/pilot-patient/detail` | api_get_patient | require_admin | query param: application_id |
| POST | `/pilot-patient/save` | api_save_patient | require_admin | body: PatientSaveBody + application_id |
| GET | `/pilot-infusion-plan/list` | api_list_plans | require_admin | query param: application_id |
| POST | `/pilot-infusion-plan/create` | api_create_plan | require_admin | body: InfusionPlanCreateBody |
| PUT | `/pilot-infusion-plan/update` | api_update_plan | require_admin | body: InfusionPlanUpdateBody + id |
| DELETE | `/pilot-infusion-plan/delete` | api_delete_plan | require_admin | body: {id} |
| POST | `/pilot-infusion-schedule/auto-generate` | api_auto_generate | require_admin | body: {plan_id} |
| POST | `/pilot-infusion-schedule/create` | api_create_schedule | require_admin | body: {plan_id, infusion_time?, remark?} |
| PUT | `/pilot-infusion-schedule/update` | api_update_schedule | require_admin | body: InfusionScheduleUpdateBody + id |
| DELETE | `/pilot-infusion-schedule/delete` | api_delete_schedule | require_admin | body: {id} |
| POST | `/pilot-infusion-schedule/mark-complete` | api_mark_complete | require_admin | body: {id} |
每个路由函数结构:
```python
@router.get("/pilot-application/list")
def api_list_applications(
page: int = Query(1, ge=1),
page_size: int = Query(20, ge=1, le=100),
channel_id: Optional[str] = Query(None),
application_status: Optional[str] = Query(None),
channel_service_order_id: Optional[str] = Query(None),
_user: dict = Depends(require_admin_or_super_admin),
db: Session = Depends(get_db),
):
tenant_no = _user["tenant_no"]
result = pilot_application.list_applications(db, tenant_no, page, page_size, channel_id, application_status, channel_service_order_id)
return {"code": 0, "data": result}
```
- [ ] **Step 2: 注册路由**
在 `backend/app/api/__init__.py` 中追加:
```python
from app.api.pilot_application import router as pilot_application_router
```
并在 `routers` 列表中追加 `pilot_application_router`。
在 `backend/app/main.py` 中追加路由 include(参考已有的 `pilot_service_router` 注册方式)。
- [ ] **Step 3: 验证**
Run: `cd backend && source venv/bin/activate && python -c "from app.api.pilot_application import router; print(f'Routes: {len(router.routes)}')"`
Expected: `Routes: 19`
- [ ] **Step 4: 运行 LSP 诊断**
Run `lsp_diagnostics` on `backend/app/api/pilot_application.py`, `backend/app/api/__init__.py`, `backend/app/main.py` — expect 0 errors on all.
---
## Task 4: Frontend API 函数 + 状态标签 + 路由
**Files:**
- Modify: `web-admin/src/api/admin.ts`
- Modify: `web-admin/src/utils/status-tag-registry.ts`
- Modify: `web-admin/src/router/modules/sqxp.ts`
- [ ] **Step 1: 在 admin.ts 末尾追加 19 个 API 函数**
遵循文件中已有函数模式(参考 `fetchPilotApplicationList` 风格),追加以下函数:
```typescript
// ==================== 中试服务申请单 ====================
export function fetchPilotApplicationList(params: any) {
return request({ url: '/pilot-application/list', method: 'get', params })
}
export function fetchPilotApplicationDetail(params: any) {
return request({ url: '/pilot-application/detail', method: 'get', params })
}
export function createPilotApplication(data: any) {
return request({ url: '/pilot-application/create', method: 'post', data })
}
export function updatePilotApplication(data: any) {
return request({ url: '/pilot-application/update', method: 'put', data })
}
export function deletePilotApplication(data: any) {
return request({ url: '/pilot-application/delete', method: 'delete', data })
}
export function startPilotApplication(data: any) {
return request({ url: '/pilot-application/start', method: 'post', data })
}
export function completePilotApplication(data: any) {
return request({ url: '/pilot-application/complete', method: 'post', data })
}
export function voidPilotApplication(data: any) {
return request({ url: '/pilot-application/void', method: 'post', data })
}
// 患者信息
export function fetchPilotPatient(params: any) {
return request({ url: '/pilot-patient/detail', method: 'get', params })
}
export function savePilotPatient(data: any) {
return request({ url: '/pilot-patient/save', method: 'post', data })
}
// 输注方案
export function fetchPilotInfusionPlanList(params: any) {
return request({ url: '/pilot-infusion-plan/list', method: 'get', params })
}
export function createPilotInfusionPlan(data: any) {
return request({ url: '/pilot-infusion-plan/create', method: 'post', data })
}
export function updatePilotInfusionPlan(data: any) {
return request({ url: '/pilot-infusion-plan/update', method: 'put', data })
}
export function deletePilotInfusionPlan(data: any) {
return request({ url: '/pilot-infusion-plan/delete', method: 'delete', data })
}
// 输注计划
export function fetchPilotInfusionScheduleList(params: any) {
return request({ url: '/pilot-infusion-schedule/list', method: 'get', params })
}
export function autoGenerateSchedules(data: any) {
return request({ url: '/pilot-infusion-schedule/auto-generate', method: 'post', data })
}
export function updatePilotInfusionSchedule(data: any) {
return request({ url: '/pilot-infusion-schedule/update', method: 'put', data })
}
export function deletePilotInfusionSchedule(data: any) {
return request({ url: '/pilot-infusion-schedule/delete', method: 'delete', data })
}
export function markScheduleComplete(data: any) {
return request({ url: '/pilot-infusion-schedule/mark-complete', method: 'post', data })
}
```
- [ ] **Step 2: 在 status-tag-registry.ts 追加申请单状态标签函数**
```typescript
/** 中试申请单状态 */
export function applicationStatusLabel(status: string): string {
const map: Record<string, string> = { dks: '待开始', jxz: '进行中', ywc: '已完成', yzf: '已作废' }
return map[status] || status || '-'
}
export function applicationStatusTagType(status: string): '' | 'success' | 'warning' | 'danger' | 'info' {
const map: Record<string, '' | 'success' | 'warning' | 'danger' | 'info'> = {
dks: 'info', jxz: '', ywc: 'success', yzf: 'danger'
}
return map[status] || 'info'
}
```
- [ ] **Step 3: 在 sqxp.ts 追加 2 个路由**
在 PilotService 的 children 数组末尾追加:
```typescript
{
path: 'pilot-application',
name: 'PilotApplication',
component: () => import('@views/pilot-service/pilot-application/index.vue'),
meta: { title: '中试服务申请单', icon: 'i-ep:document' }
},
{
path: 'pilot-application/detail',
name: 'PilotApplicationDetail',
component: () => import('@views/pilot-service/pilot-application/ApplicationDetail.vue'),
meta: { title: '申请单详情', hidden: true }
},
```
注意:路由 ID 需要根据现有 PilotService 的 ID 段确定,查看 sqxp.ts 中已有的路由 ID 模式。中试服务模块 ID 段为 8000...,检查当前已使用的最大 ID 后递增。
- [ ] **Step 4: 运行 LSP 诊断**
Run `lsp_diagnostics` on all 3 modified files — expect 0 errors.
---
## Task 5: 前端列表页
**Files:**
- Create: `web-admin/src/views/pilot-service/pilot-application/index.vue`
- [ ] **Step 1: 创建列表页**
创建目录 `web-admin/src/views/pilot-service/pilot-application/` 和 `index.vue`。
**参考模板页:** `src/views/system/order/index.vue`(复杂列表页)
**页面结构:**
- 筛选区:申请单号(el-input)、渠道(el-select,数据源 fetchChannelList)、服务订单(el-select,联动渠道)、状态(el-radio-group 或 tag 按钮)
- 操作栏:新增按钮(el-button type="primary")
- 表格(el-table):列如 spec 中定义
- 分页(el-pagination)
**关键交互:**
- 新增:弹窗(el-dialog),选择渠道 → 联动加载该渠道的服务订单(调用已有的 fetchServiceOrderList,传入 channel_id 筛选)→ 选择服务订单 → 填写备注 → 提交 → 成功后 router.push 到详情页
- 状态操作:根据 applicationStatus 动态显示按钮
- dks:显示"开始"(primary) + "作废"(danger)
- jxz:显示"完成"(primary) + "作废"(danger)
- ywc/yzf:无按钮
- 编辑/删除:仅 dks 状态可操作
- 行点击:router.push({ name: 'PilotApplicationDetail', query: { id: row.id } })
- 状态列用 el-tag + applicationStatusLabel/applicationStatusTagType
**数据加载:** onMounted 调用 fetchPilotApplicationList,筛选变更时重新加载。
**样式:** 遵循项目 Fresh Mint 色系(--primary #10b981),使用已有的 SCSS 变量和 mixin。
- [ ] **Step 2: 运行 LSP 诊断**
Run `lsp_diagnostics` on `web-admin/src/views/pilot-service/pilot-application/index.vue` — expect 0 errors.
---
## Task 6: 前端详情页 — 基本信息 Tab + 输注方案 Tab
**Files:**
- Create: `web-admin/src/views/pilot-service/pilot-application/ApplicationDetail.vue`
- [ ] **Step 1: 创建详情页**
**参考模板页:** `src/views/system/product/index.vue`(含详情展示的复杂页面)
**页面结构:**
- 顶部:返回按钮 + 申请单号 + 状态标签 + 操作按钮(开始/完成/作废,根据状态显示)
- el-tabs:4 个 tab(基本信息 / 输注方案 / 体检信息-locked / 交付信息-locked)
**基本信息 Tab:**
- 上半区:el-descriptions 展示申请单信息(只读)
- 申请单号、渠道名称、关联服务订单、状态、创建时间、备注
- 下半区:患者信息面板(el-card)
- "选择客户"按钮 → el-dialog 弹窗展示客户列表(调用已有 API 获取 biz_customer 列表,支持姓名/手机搜索)
- 选中后自动填充表单字段
- 表单字段:patientName, sex, age, idCardNo, phoneNo, emergencyContact, emergencyPhone, clinicalDiagnosis, diagnosisAttachments(附件上传), needCheckup(el-switch)
- "保存患者信息"按钮
**输注方案 Tab:**
- 工具栏:"新增输注方案"按钮
- 方案列表用 el-table,每行显示方案的完整信息
- 最后一列加 expand 展开行,展开后显示该方案的输注计划列表
- 展开行内的计划列表(el-table):
- 列:序号、细胞类型、规格、输注时间(可编辑)、状态、操作
- 操作:编辑(弹窗修改时间/备注)、删除、标记完成
- "手动添加计划"按钮在展开行内
**新增/编辑输注方案弹窗(el-dialog):**
- 表单字段:cell_type(el-select,数据源从细胞产品类型 API)、spec_text、total_course_count(el-input-number)、course_interval、infusion_route、infusion_start_date(el-date-picker)
- label-position="top",遵循 .form-grid-2 两列布局
- 保存成功后 ElMessageBox.confirm("是否立即生成 N 条输注计划?"),确认则调用 autoGenerateSchedules
**数据加载:** onMounted 根据 route.query.id 调用 fetchPilotApplicationDetail 获取详情(含患者+方案),同时 fetchPilotInfusionPlanList 获取方案列表,每个方案再 fetchPilotInfusionScheduleList 获取计划。
**样式约定:**
- Dialog forms: `label-position="top"`, `.dialog-form-layout`, `.form-grid-2`
- 无 backdrop blur: `backdrop-filter: none`
- Panel heading: `.title-bar-heading` + `::before` 竖线
- 状态 Tag: el-tag + semantic colors
- [ ] **Step 2: 运行 LSP 诊断**
Run `lsp_diagnostics` on `web-admin/src/views/pilot-service/pilot-application/ApplicationDetail.vue` — expect 0 errors.
---
## Task 7: 集成验证
**Files:** 无新文件
- [ ] **Step 1: 后端启动验证**
Run: `cd backend && source venv/bin/activate && python -c "
from app.main import app
routes = [r.path for r in app.routes if hasattr(r, 'path')]
pilot_routes = [r for r in routes if 'pilot-application' in r or 'pilot-patient' in r or 'pilot-infusion' in r]
print(f'Pilot application routes: {len(pilot_routes)}')
for r in sorted(pilot_routes): print(f' {r}')
"`
Expected: 19 routes listed
- [ ] **Step 2: 前端构建验证**
Run: `cd web-admin && pnpm build`
Expected: Build succeeds with exit code 0
- [ ] **Step 3: 前端 LSP 全量诊断**
Run `lsp_diagnostics` on directory `web-admin/src/views/pilot-service/pilot-application/` — expect 0 errors.
- [ ] **Step 4: 更新知识图谱**
Run: `./scripts/update-graph.sh backend frontend`
Expected: 知识图谱更新完成
---
## 自审检查
### Spec Coverage
| Spec 需求 | 对应 Task |
|-----------|----------|
| ALTER biz_pilot_application | Task 1 |
| 4 个 Model 类 | Task 1 |
| Application CRUD 8 个函数 | Task 2 |
| Patient save/get 2 个函数 | Task 2 |
| InfusionPlan CRUD 4 个函数 | Task 2 |
| InfusionSchedule 6 个函数 | Task 2 |
| API routes 19 个 | Task 3 |
| Router registration | Task 3 |
| 19 个前端 API 函数 | Task 4 |
| 状态标签函数 | Task 4 |
| 路由追加 | Task 4 |
| 列表页 | Task 5 |
| 详情页(基本信息+输注方案) | Task 6 |
| 集成验证 | Task 7 |
### Placeholder 扫描
无 TBD/TODO/占位符。所有步骤含具体代码或明确指令。
### Type 一致性
- Model 字段名与 CRUD _row_to_dict 输出的 camelCase key 一致
- API 路径与前端 request URL 一致
- Pydantic schema 字段与 CRUD 函数参数一致
@@ -0,0 +1,503 @@
# 中试服务申请单 Phase 1 设计文档
> 日期:2026-05-24
> 模块:中试服务管理 > 中试服务申请单
> 阶段:Phase 1(核心骨架)
> 需求来源:`docs/中科兴皖需求V0.3.md` §2.3.9
## 1. 概述
实现中试服务申请单的完整 CRUD、患者信息管理、输注方案管理、输注计划管理。采用独立后端模块方案(方案A),与现有 `pilot_service.py` 分离。
### 分期规划
| 阶段 | 范围 | 状态 |
|------|------|------|
| Phase 1 | 申请单+患者+输注方案+输注计划 | 本文档 |
| Phase 2 | 体检管理+交付交接+费用扣减 | 后续 |
| Phase 3 | 出库生产/质检/放行审核联动 | 后续 |
### Phase 1 范围
- ✅ 中试申请单 CRUD + 状态流转(开始/完成/作废)
- ✅ 患者信息(关联客户管理表 biz_customer,选填+新建模式)
- ✅ 输注方案 CRUD
- ✅ 输注计划(按疗程数自动生成 + 手动增删调整 + 标记完成)
- ✅ 申请单列表页 + 详情 Tab 页
- ❌ 体检管理(Phase 2)
- ❌ 交付/交接模块(Phase 2)
- ❌ 出库生产/质检/放行联动(Phase 3)
- ❌ 费用扣减逻辑(Phase 2 交付模块中实现)
---
## 2. 数据库变更
### 2.1 ALTER biz_pilot_application
现有表仅含 `channel_service_order_id` + 公共字段,需增强:
```sql
-- 迁移文件: docs/sql/pilot-application-migration.sql
ALTER TABLE biz_pilot_application
ADD COLUMN application_no VARCHAR(64) DEFAULT NULL
COMMENT '申请单号(自动生成,前缀ZSSQ)' AFTER id,
ADD COLUMN application_status VARCHAR(16) NOT NULL DEFAULT 'dks'
COMMENT 'dks待开始 jxz进行中 ywc已完成 yzf已作废' AFTER application_no,
ADD COLUMN channel_id VARCHAR(64) DEFAULT NULL
COMMENT '渠道ID(缓存自服务订单)' AFTER channel_service_order_id,
ADD COLUMN channel_name VARCHAR(200) DEFAULT NULL
COMMENT '渠道名称(缓存)' AFTER channel_id;
ALTER TABLE biz_pilot_application
ADD UNIQUE KEY uk_application_no (application_no, del_flag);
```
### 2.2 现有表不变
以下 3 张表结构已满足 Phase 1 需求,无需变更:
| 表 | 说明 |
|---|---|
| `biz_pilot_patient` | 患者信息,含 customer_id 关联 + 完整个人字段 |
| `biz_pilot_infusion_plan` | 输注方案,含 cell_type/spec/total_course_count 等 |
| `biz_pilot_infusion_schedule` | 输注计划,含 schedule_status/infusion_time 等 |
### 2.3 输注计划状态约定(Phase 1)
`biz_pilot_infusion_schedule.schedule_status` 已有值域:dsc/ysc/yjf/yqx。
Phase 1 简化使用:
- 创建时 `schedule_status` 留空(前端显示"-")
- 用户点击"完成"按钮后更新为 `ywc`(已完成)
- Phase 3 出库联动时再启用 dsc/ysc/yjf/yqx 等详细状态
---
## 3. 后端架构
### 3.1 Model(models.py 新增)
在 `backend/app/models/models.py` 中新增 4 个 SQLAlchemy model:
| Model | 表 | 关键字段 |
|-------|---|---------|
| `BizPilotApplication` | biz_pilot_application | application_no, application_status, channel_service_order_id, channel_id, channel_name |
| `BizPilotPatient` | biz_pilot_patient | pilot_application_id, customer_id, patient_name, sex, age, id_card_no, phone_no, emergency_contact, emergency_phone, clinical_diagnosis, diagnosis_attachments, need_checkup |
| `BizPilotInfusionPlan` | biz_pilot_infusion_plan | pilot_application_id, cell_type, spec_text, total_course_count, course_interval, infusion_route, infusion_start_date |
| `BizPilotInfusionSchedule` | biz_pilot_infusion_schedule | infusion_plan_id, cell_type, spec_text, infusion_time, schedule_status, attachments |
### 3.2 CRUD(新文件:backend/app/crud/pilot_application.py)
#### _row_to_dict 函数
每个实体一个 `_row_to_dict_*` 函数,作为可读字段的单一事实来源:
- `_row_to_dict_application(row)` — 含 channel_name、patient_name(子查询)、infusion_plan_count(子查询)
- `_row_to_dict_patient(row)`
- `_row_to_dict_infusion_plan(row)` — 含 schedule_count(子查询)
- `_row_to_dict_infusion_schedule(row)`
#### CRUD 函数清单
**Application:**
| 函数 | 说明 |
|------|------|
| `list_applications(db, tenant_no, filters)` | 分页列表,支持按渠道/状态/服务订单筛选 |
| `get_application(db, app_id, tenant_no)` | 获取单个申请单详情 |
| `create_application(db, data, tenant_no, user_id)` | 创建申请单,校验服务订单存在且生效,缓存渠道信息,生成申请单号 |
| `update_application(db, app_id, data, tenant_no)` | 更新申请单(仅 dks 状态可编辑) |
| `soft_delete_application(db, app_id, tenant_no)` | 软删除(仅 dks 状态) |
| `start_application(db, app_id, tenant_no, user_id)` | 状态:dks→jxz |
| `complete_application(db, app_id, tenant_no, user_id)` | 状态:jxz→ywc |
| `void_application(db, app_id, tenant_no, user_id)` | 状态:任意→yzf |
**Patient:**
| 函数 | 说明 |
|------|------|
| `get_patient_by_application(db, app_id, tenant_no)` | 获取某申请单的患者信息 |
| `save_patient(db, app_id, data, tenant_no, user_id)` | 保存/替换患者信息,同步更新 biz_customer 表 |
**InfusionPlan:**
| 函数 | 说明 |
|------|------|
| `list_infusion_plans(db, app_id, tenant_no)` | 获取某申请单的输注方案列表 |
| `create_infusion_plan(db, app_id, data, tenant_no, user_id)` | 创建输注方案 |
| `update_infusion_plan(db, plan_id, data, tenant_no)` | 更新输注方案 |
| `soft_delete_infusion_plan(db, plan_id, tenant_no)` | 软删除输注方案(级联删除其下所有计划) |
**InfusionSchedule:**
| 函数 | 说明 |
|------|------|
| `list_schedules_by_plan(db, plan_id, tenant_no)` | 获取某方案下的输注计划列表 |
| `auto_generate_schedules(db, plan_id, tenant_no, user_id)` | 按方案的 total_course_count 批量生成计划记录 |
| `create_schedule(db, plan_id, data, tenant_no, user_id)` | 手动添加单条计划 |
| `update_schedule(db, schedule_id, data, tenant_no)` | 更新计划(时间/备注等) |
| `soft_delete_schedule(db, schedule_id, tenant_no)` | 软删除单条计划 |
| `mark_schedule_complete(db, schedule_id, tenant_no, user_id)` | 标记计划为已完成(schedule_status='ywc') |
#### 核心业务逻辑
**create_application:**
1. 查询 `channel_service_order_id` 对应的服务订单,校验存在且状态为生效中(status='sxz')
2. 从服务订单关联的渠道信息缓存 `channel_id` / `channel_name` 到申请单
3. 生成 `application_no`:前缀 ZSSQ + YYYYMMDD + 4位序列号
4. 默认 `application_status = 'dks'`
**save_patient(客户关联逻辑):**
1. 如果传入 `customer_id`,从 `biz_customer` 表读取客户信息填充到患者字段
2. 用户可修改已填充的字段
3. 保存时:如果 `customer_id` 存在则更新 `biz_customer` 对应记录;如果不存在则新建 `biz_customer` 记录并回填 `customer_id`
4. 与采集协议单的母亲信息模式一致
**auto_generate_schedules:**
1. 读取方案的 `total_course_count`
2. 批量插入 N 条 `biz_pilot_infusion_schedule` 记录
3. 每条记录继承方案的 `cell_type` / `spec_text`
4. `schedule_status` 留空,`infusion_time` 留空(用户后续手动填写)
5. `order_num` 按序号 1, 2, 3... 排列
6. 返回生成数量
### 3.3 API(新文件:backend/app/api/pilot_application.py)
**路由前缀:** `/web/admin`
**Tag:** `中试服务申请单管理`
#### Pydantic Schemas(内联定义)
```
ApplicationCreateBody:
channel_service_order_id: str
remark: Optional[str]
ApplicationUpdateBody:
remark: Optional[str]
PatientSaveBody:
customer_id: Optional[str]
patient_name: str
sex: Optional[str]
age: Optional[int]
id_card_no: Optional[str]
phone_no: Optional[str]
emergency_contact: Optional[str]
emergency_phone: Optional[str]
clinical_diagnosis: Optional[str]
diagnosis_attachments: Optional[str]
need_checkup: int = 1
InfusionPlanCreateBody:
pilot_application_id: str
cell_type: str
spec_text: Optional[str]
total_course_count: int
course_interval: Optional[str]
infusion_route: Optional[str]
infusion_start_date: Optional[str]
InfusionPlanUpdateBody:
cell_type: Optional[str]
spec_text: Optional[str]
total_course_count: Optional[int]
course_interval: Optional[str]
infusion_route: Optional[str]
infusion_start_date: Optional[str]
InfusionScheduleUpdateBody:
infusion_time: Optional[str]
remark: Optional[str]
attachments: Optional[str]
```
#### API 路由清单
| 方法 | 路径 | 说明 |
|------|------|------|
| GET | `/pilot-application/list` | 申请单分页列表 |
| GET | `/pilot-application/detail` | 申请单详情(含患者+方案+计划) |
| POST | `/pilot-application/create` | 创建申请单 |
| PUT | `/pilot-application/update` | 更新申请单 |
| DELETE | `/pilot-application/delete` | 删除申请单 |
| POST | `/pilot-application/start` | 开始(dks→jxz) |
| POST | `/pilot-application/complete` | 完成(jxz→ywc) |
| POST | `/pilot-application/void` | 作废(→yzf) |
| GET | `/pilot-patient/detail` | 获取患者信息 |
| POST | `/pilot-patient/save` | 保存患者信息 |
| GET | `/pilot-infusion-plan/list` | 输注方案列表 |
| POST | `/pilot-infusion-plan/create` | 创建输注方案 |
| PUT | `/pilot-infusion-plan/update` | 更新输注方案 |
| DELETE | `/pilot-infusion-plan/delete` | 删除输注方案 |
| POST | `/pilot-infusion-schedule/auto-generate` | 自动生成计划 |
| POST | `/pilot-infusion-schedule/create` | 手动添加计划 |
| PUT | `/pilot-infusion-schedule/update` | 更新计划 |
| DELETE | `/pilot-infusion-schedule/delete` | 删除计划 |
| POST | `/pilot-infusion-schedule/mark-complete` | 标记计划完成 |
**路由注册:** 在 `app/api/__init__.py` 和 `app/main.py` 中追加 `pilot_application` router。
**权限:** 使用 `require_admin_or_super_admin` 装饰器(与现有 pilot_service 一致)。
---
## 4. 前端架构
### 4.1 路由(sqxp.ts 追加)
```typescript
{
path: 'pilot-application',
name: 'PilotApplication',
component: () => import('@views/pilot-service/pilot-application/index.vue'),
meta: { title: '中试服务申请单', icon: '...' }
},
{
path: 'pilot-application/detail',
name: 'PilotApplicationDetail',
component: () => import('@views/pilot-service/pilot-application/ApplicationDetail.vue'),
meta: { title: '申请单详情', hidden: true }
}
```
### 4.2 页面文件
```
web-admin/src/views/pilot-service/pilot-application/
├── index.vue ← 申请单列表页
└── ApplicationDetail.vue ← 详情页(Tab布局)
```
### 4.3 列表页 index.vue
**参考模板页:** `src/views/system/order/index.vue`(复杂列表页)
**筛选条件:**
- 申请单号(文本输入)
- 渠道(下拉选择,数据源:已有渠道 API)
- 服务订单(下拉选择,联动渠道筛选)
- 状态(Tag 筛选按钮组)
**表格列:**
| 列名 | 字段 | 宽度 | 说明 |
|------|------|------|------|
| 申请单号 | application_no | 180 | |
| 渠道名称 | channel_name | 150 | |
| 关联服务订单 | service_order_no | 180 | 显示订单号 + 类型标签 |
| 患者姓名 | patient_name | 100 | |
| 输注方案数 | infusion_plan_count | 100 | |
| 状态 | application_status | 100 | el-tag:dks(info) / jxz(primary) / ywc(success) / yzf(danger) |
| 创建时间 | create_time | 160 | |
| 操作 | — | 260+ | 查看/编辑/删除 + 状态按钮 |
**操作按钮逻辑:**
- 新增:弹窗选择渠道 + 服务订单 → 创建成功后跳转详情页
- 状态按钮动态显示:
- dks(待开始):显示"开始"按钮
- jxz(进行中):显示"完成"和"作废"按钮
- ywc(已完成) / yzf(已作废):无状态按钮
- 点击行 → router.push 跳转详情页(携带 application_id 参数)
### 4.4 详情页 ApplicationDetail.vue
**参考模板页:** `src/views/system/product/index.vue`(含 ViewDialog 的详情展示)
**Tab 布局:**
| Tab | 内容 | 阶段 |
|-----|------|------|
| 基本信息 | 申请单信息 + 患者信息 | Phase 1 ✅ |
| 输注方案 | 方案列表 + 计划管理 | Phase 1 ✅ |
| 体检信息 | 占位(Phase 2 实现) | Phase 2 🔒 |
| 交付信息 | 占位(Phase 2 实现) | Phase 2 🔒 |
#### 基本信息 Tab
**上半区 — 申请单信息(只读):**
- 申请单号、渠道名称、关联服务订单、状态、备注
- 状态以 el-tag 展示
**下半区 — 患者信息面板(可编辑):**
- "选择客户"按钮 → 弹窗从客户管理表(biz_customer)选取
- 弹窗展示客户列表,支持搜索(姓名/手机号)
- 选中后自动填充:姓名、性别、年龄、身份证号、联系电话、紧急联系人、紧急联系人电话
- 已填充字段可手动修改
- "是否需要体检"开关(need_checkup)
- 临床诊断文本框 + 诊断附件上传
- "保存患者信息"按钮
- 保存时同步更新 biz_customer 表(与采集协议单母亲信息模式一致)
#### 输注方案 Tab
**方案列表(表格或卡片):**
每行显示:
- 细胞类型(cell_type)
- 规格(spec_text)
- 总疗程数(total_course_count)
- 疗程间隔(course_interval)
- 输注途径(infusion_route)
- 输注开始日期(infusion_start_date)
- 计划数 / 已完成数(如 3/5)
- 操作:编辑 / 删除
**展开行 — 输注计划列表:**
每个方案可展开显示其下的输注计划:
| 列 | 说明 |
|---|---|
| 序号 | order_num |
| 细胞类型 | cell_type |
| 规格 | spec_text |
| 输注时间 | infusion_time(可编辑) |
| 状态 | "-" 或 "已完成"(el-tag) |
| 操作 | 编辑 / 删除 / 标记完成 |
**操作流程:**
1. 点击"新增输注方案" → 弹窗填写方案信息 → 保存
2. 保存方案后**自动弹出提示**:"是否立即生成 X 条输注计划?"
3. 确认后调用 auto_generate 接口批量生成
4. 生成后可手动编辑每条计划的时间/备注
5. 可手动新增/删除计划
6. 每条计划有"标记完成"按钮
### 4.5 API 函数(admin.ts 追加)
在 `web-admin/src/api/admin.ts` 末尾追加以下函数:
```typescript
// 中试申请单
fetchPilotApplicationList(params)
fetchPilotApplicationDetail(params)
createPilotApplication(data)
updatePilotApplication(data)
deletePilotApplication(data)
startPilotApplication(data)
completePilotApplication(data)
voidPilotApplication(data)
// 患者信息
fetchPilotPatient(params)
savePilotPatient(data)
// 输注方案
fetchPilotInfusionPlanList(params)
createPilotInfusionPlan(data)
updatePilotInfusionPlan(data)
deletePilotInfusionPlan(data)
// 输注计划
fetchPilotInfusionScheduleList(params)
autoGenerateSchedules(data)
updatePilotInfusionSchedule(data)
deletePilotInfusionSchedule(data)
markScheduleComplete(data)
```
### 4.6 状态标签注册
在 `web-admin/src/utils/status-tag-registry.ts` 追加:
```typescript
// 申请单状态
applicationStatusLabel(status) → '待开始'/'进行中'/'已完成'/'已作废'
applicationStatusTagType(status) → 'info'/'primary'/'success'/'danger'
```
---
## 5. 关键交互流程
### 5.1 创建申请单流程
```
列表页 → 点击"新增"
→ 弹窗:选择渠道(下拉)→ 联动加载该渠道的服务订单(下拉)
→ 选择服务订单 → 填写备注
→ 提交 → 后端校验订单状态 → 生成申请单号 → 创建成功
→ 跳转详情页
```
### 5.2 患者信息录入流程
```
详情页基本信息Tab → 点击"选择客户"
→ 弹窗展示客户列表(姓名/手机搜索)
→ 选中客户 → 自动填充患者字段
→ 可手动修改字段
→ 填写临床诊断 + 上传诊断附件
→ 点击"保存" → 后端同步更新 biz_customer
```
### 5.3 输注方案+计划管理流程
```
详情页输注方案Tab → 点击"新增输注方案"
→ 弹窗填写:细胞类型、规格、总疗程数(N)、疗程间隔、输注途径、开始日期
→ 保存 → ElMessageBox.confirm("是否立即生成 N 条输注计划?")
→ 确认 → 调用 auto_generate → 生成 N 条计划
→ 取消 → 仅创建方案,后续手动添加
→ 展开方案 → 查看/编辑每条计划
→ 手动新增/删除/编辑计划
→ 标记计划完成
```
### 5.4 申请单状态流转
```
dks(待开始) ──开始──→ jxz(进行中) ──完成──→ ywc(已完成)
│ │
└────作废──→ yzf(已作废) ←──作废──┘
约束:
- 编辑/删除:仅 dks 状态可操作
- 开始:仅 dks → jxz
- 完成:仅 jxz → ywc
- 作废:dks 或 jxz → yzf
```
---
## 6. 文件清单
### 新增文件
| # | 文件路径 | 说明 |
|---|---------|------|
| 1 | `docs/sql/pilot-application-migration.sql` | 数据库迁移 SQL |
| 2 | `backend/app/crud/pilot_application.py` | 后端 CRUD |
| 3 | `backend/app/api/pilot_application.py` | 后端 API 路由 |
| 4 | `web-admin/src/views/pilot-service/pilot-application/index.vue` | 列表页 |
| 5 | `web-admin/src/views/pilot-service/pilot-application/ApplicationDetail.vue` | 详情页 |
### 修改文件
| # | 文件路径 | 变更 |
|---|---------|------|
| 6 | `backend/app/models/models.py` | 新增 4 个 Model 类 |
| 7 | `backend/app/api/__init__.py` | 注册新 router |
| 8 | `backend/app/main.py` | 引入新 router |
| 9 | `web-admin/src/api/admin.ts` | 追加 19 个 API 函数 |
| 10 | `web-admin/src/utils/status-tag-registry.ts` | 追加申请单状态标签函数 |
| 11 | `web-admin/src/router/modules/sqxp.ts` | 追加 2 个路由 |
---
## 7. 不在范围内
以下内容不在 Phase 1 中:
- 体检预约/报告/费用管理(biz_pilot_checkup + reserve_item + actual_item)
- 交付信息/物料清单/交付方式(biz_pilot_delivery + delivery_material + delivery_method)
- 应用确认(biz_pilot_infusion_confirm)
- 输注计划→出库生产工单自动联动
- 出库质检工单
- 出库放行审核
- 费用/份数扣减逻辑
- 工作流集成
- 数据权限(使用 require_admin_or_super_admin)