 INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
	VALUES('EEC0D060-C15E-4D25-B015-C2B91F735DAC','车次管理','HJGL/PreDesign/TrainNumberManager.aspx',40,'1E36EA73-D536-4215-BFB9-A8771937BD89','Menu_HJGL',0,1,1)
	GO
	/*'车次管理*/
	INSERT INTO Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('75ED227C-3DB8-4F6D-8AC3-B0B3FD8D21AC','EEC0D060-C15E-4D25-B015-C2B91F735DAC','增加',1)
	INSERT INTO Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('B4295318-92C4-4072-9F30-6E50CB2E007D','EEC0D060-C15E-4D25-B015-C2B91F735DAC','修改',2)
	INSERT INTO Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('35D1601D-ED59-4C0B-8069-178B2780310E','EEC0D060-C15E-4D25-B015-C2B91F735DAC','保存',3)
	INSERT INTO Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('99A2A6C8-A679-4FAF-942C-B663BFE9B9D9','EEC0D060-C15E-4D25-B015-C2B91F735DAC','查看',4)
	INSERT INTO Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('DC684D40-EE08-4689-A2D1-73AC4EB04B60','EEC0D060-C15E-4D25-B015-C2B91F735DAC','删除',5)
	GO

    alter table dbo.HJGL_PackagingManage
        add TypeInt int
    go


    create table dbo.HJGL_PackagingManageDetail
    (
        Id                      nvarchar(50) not null
            constraint HJGL_PackagingManageDetail_pk
                primary key,
        PackagingManageId              nvarchar(50),
        PipelineId              nvarchar(50),
        PipelineComponentId     nvarchar(50),
        MaterialCode            nvarchar(50),
        Number                  decimal(9, 2),
        CreateTime              datetime,
        CreateUser              nvarchar(50),

    ) 
create table dbo.HJGL_TrainNumberManage
(
    Id   nvarchar(50) not null
        constraint PK_HJGL_TrainNumberManage
            primary key,
    TrainNumber         nvarchar(50),
    ProjectId           nvarchar(50),
    State               int,
    DriverName          nvarchar(50),
    DriverPhone         nvarchar(50),
    LicensePlateNumber  nvarchar(50),
    ContactName         nvarchar(50),
    ContactPhone        nvarchar(50),
    Remark              nvarchar(800),
)
go

exec sp_addextendedproperty 'MS_Description', N'主键', 'SCHEMA', 'dbo', 'TABLE', 'HJGL_TrainNumberManage', 'COLUMN',
     'Id'
go

exec sp_addextendedproperty 'MS_Description', N'驾驶员姓名', 'SCHEMA', 'dbo', 'TABLE', 'HJGL_TrainNumberManage', 'COLUMN',
     'DriverName'
go
exec sp_addextendedproperty 'MS_Description', N'驾驶员电话', 'SCHEMA', 'dbo', 'TABLE', 'HJGL_TrainNumberManage', 'COLUMN',
     'DriverPhone'
go
exec sp_addextendedproperty 'MS_Description', N'车牌号', 'SCHEMA', 'dbo', 'TABLE', 'HJGL_TrainNumberManage', 'COLUMN',
     'LicensePlateNumber'
go
exec sp_addextendedproperty 'MS_Description', N'联系人姓名', 'SCHEMA', 'dbo', 'TABLE', 'HJGL_TrainNumberManage', 'COLUMN',
     'ContactName'
go
exec sp_addextendedproperty 'MS_Description', N'联系人电话', 'SCHEMA', 'dbo', 'TABLE', 'HJGL_TrainNumberManage', 'COLUMN',
     'ContactPhone'
go
exec sp_addextendedproperty 'MS_Description', N'车次', 'SCHEMA', 'dbo', 'TABLE', 'HJGL_TrainNumberManage', 'COLUMN',
     'TrainNumber'
go
exec sp_addextendedproperty 'MS_Description', N'项目id', 'SCHEMA', 'dbo', 'TABLE', 'HJGL_TrainNumberManage', 'COLUMN',
     'ProjectId'
go

exec sp_addextendedproperty 'MS_Description', N'状态', 'SCHEMA', 'dbo', 'TABLE', 'HJGL_TrainNumberManage', 'COLUMN',
     'State'
go

exec sp_addextendedproperty 'MS_Description', N'备注', 'SCHEMA', 'dbo', 'TABLE', 'HJGL_TrainNumberManage', 'COLUMN',
     'Remark'
go

exec sp_addextendedproperty 'MS_Description', N'车次管理表', 'SCHEMA', 'dbo', 'TABLE', 'HJGL_TrainNumberManage'
go

alter table dbo.HJGL_PackagingManage
    add TrainNumberId varchar(50)
go
alter table dbo.HJGL_PackagingManage
    add  TypeInt        int
go
exec sp_addextendedproperty 'MS_Description', N'车次管理主键id', 'SCHEMA', 'dbo', 'TABLE', 'HJGL_PackagingManage',
     'COLUMN', 'TrainNumberId'
go
exec sp_addextendedproperty 'MS_Description', N'包装类别', 'SCHEMA', 'dbo', 'TABLE', 'HJGL_PackagingManage',
     'COLUMN', 'TypeInt'
go