-- 记录已按采购入库过账的让步数量,后续到货入库只收原合格数量。 CREATE TABLE IF NOT EXISTS `mes_qc_purchase_concession` ( `id` bigint NOT NULL AUTO_INCREMENT, `ncr_id` bigint NOT NULL, `iqc_id` bigint NOT NULL, `notice_id` bigint NOT NULL, `notice_line_id` bigint NOT NULL, `purchase_order_item_id` bigint NOT NULL, `receipt_id` bigint NOT NULL, `quantity` decimal(20,4) NOT NULL, `creator` varchar(64) DEFAULT '', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, `updater` varchar(64) DEFAULT '', `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `deleted` bit(1) NOT NULL DEFAULT b'0', `tenant_id` bigint NOT NULL DEFAULT 0, PRIMARY KEY (`id`), UNIQUE KEY `uk_qc_purchase_concession_ncr` (`ncr_id`), UNIQUE KEY `uk_qc_purchase_concession_iqc` (`iqc_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='来料让步采购入库关联';