From c7e4ced035ea4750b0f02bc87ef975514b0eecab Mon Sep 17 00:00:00 2001 From: zhaoqing <1670883518@qq.com> Date: Thu, 4 Jun 2026 16:03:31 +0800 Subject: [PATCH] sql --- sql/wms_update_20260414_zq.sql | 46 ++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/sql/wms_update_20260414_zq.sql b/sql/wms_update_20260414_zq.sql index ca1d80779..92144719f 100644 --- a/sql/wms_update_20260414_zq.sql +++ b/sql/wms_update_20260414_zq.sql @@ -55,3 +55,49 @@ alter table NGWL_TEST_WMS.MATERIAL_BASE_INFO comment on column NGWL_TEST_WMS.MATERIAL_BASE_INFO.COPY_CODE is '是否抄码: 1-是 2-否'; + + +USE NGWL_TEST_WMS; + + +CREATE TABLE customs_declaration_detail ( + id BIGINT IDENTITY(1,1) PRIMARY KEY, + organization_id BIGINT, + organization_name VARCHAR(64), + top_organization_id BIGINT, + document_number VARCHAR(64), + material_base_info_id BIGINT, + material_code VARCHAR(64), + material_name VARCHAR(255), + bond_invt_no VARCHAR(64), + invt_row INT, + create_time DATETIME, + create_by BIGINT, + create_by_name VARCHAR(64), + update_time DATETIME, + update_by BIGINT, + update_by_name VARCHAR(64), + del_flag INT DEFAULT 1 +); + +COMMENT ON TABLE customs_declaration_detail IS '报关明细表'; + COMMENT ON COLUMN customs_declaration_detail.id IS '主键'; + COMMENT ON COLUMN customs_declaration_detail.organization_id IS '组织表ID'; + COMMENT ON COLUMN customs_declaration_detail.organization_name IS '组织名称'; + COMMENT ON COLUMN customs_declaration_detail.top_organization_id IS '一级组织表ID'; + COMMENT ON COLUMN customs_declaration_detail.document_number IS '单据编号'; + COMMENT ON COLUMN customs_declaration_detail.material_base_info_id IS '物料基础信息ID'; + COMMENT ON COLUMN customs_declaration_detail.material_code IS '物料编码'; + COMMENT ON COLUMN customs_declaration_detail.material_name IS '物料名称'; + COMMENT ON COLUMN customs_declaration_detail.bond_invt_no IS '进口核注清单号'; + COMMENT ON COLUMN customs_declaration_detail.invt_row IS '行号'; + COMMENT ON COLUMN customs_declaration_detail.create_time IS '创建时间'; + COMMENT ON COLUMN customs_declaration_detail.create_by IS '创建人'; + COMMENT ON COLUMN customs_declaration_detail.create_by_name IS '创建人姓名'; + COMMENT ON COLUMN customs_declaration_detail.update_time IS '修改时间'; + COMMENT ON COLUMN customs_declaration_detail.update_by IS '修改人'; + COMMENT ON COLUMN customs_declaration_detail.update_by_name IS '修改人姓名'; + COMMENT ON COLUMN customs_declaration_detail.del_flag IS '删除标志 1-正常 2-删除'; + +CREATE INDEX idx_cdd_document_number ON customs_declaration_detail(document_number); +CREATE INDEX idx_cdd_bond_invt_no ON customs_declaration_detail(bond_invt_no); \ No newline at end of file