------------------------2018/12/3------------------------
ALTER TABLE TN_WM_B_TRAY_ITEM_DTL ADD CN_S_VENDOR_NO VARCHAR(32) NULL
ALTER TABLE TN_WM_B_TRAY_ITEM_DTL ADD CN_S_VENDOR_NAME VARCHAR(64) NULL
ALTER TABLE TN_WM_B_TRAY_ITEM_MST DROP COLUMN CN_S_VENDOR_NO
ALTER TABLE TN_WM_B_TRAY_ITEM_MST DROP COLUMN CN_S_VENDOR_NAME

------------------------2018/12/4------------------------
alter table tn_wm_b_location_ext add  CN_S_COL char(4),  CN_S_FLOOR char(4)

------------------------2018/12/5------------------------
 --ÍÐÅÌÎïÁÏÊýÁ¿±í·ÖÅäÁ¿ÉèÎª²»¿ÉÎª¿Õ
 ALTER TABLE TN_WM_B_TRAY_ITEM_MST ALTER COLUMN CN_F_ALLOC_QTY DECIMAL(18,4) NOT NULL
 --ÍÐÅÌÎïÁÏÊýÁ¿±í·ÖÅäÁ¿Ä¬ÈÏÖµÉèÎª0
 ALTER TABLE TN_WM_B_TRAY_ITEM_MST ADD DEFAULT (0) FOR CN_F_ALLOC_QTY WITH VALUES

 ------------------------2018/12/5------------------------
alter table tn_wm_tray_info
  drop COLUMN  CN_S_FROM,CN_GUID,CN_S_CREATE_TYPE,CN_S_DEPARTMENT,CN_S_STATUS

------------------------2018/12/6------------------------
alter table tn_wm_operation_type
  drop COLUMN  CN_S_FROM,CN_GUID,CN_S_CREATE_TYPE,CN_S_DEPARTMENT,CN_S_STATUS

  
------------------------2018/12/8------------------------
  create table TN_WM_PRINT_TEMPLET
(CN_S_STOCK_CODE varchar(32),
CN_S_TEMPLET_TYPE varchar(16),
CN_S_TEMPLET_NAME varchar(32),
CN_S_PRINTER varchar(32),
CN_S_IP varchar(16)
)

create table TN_WM_PRINT_TASK
(
CN_S_TEMPLET_TYPE varchar(16),
CN_S_TEMPLET_NAME varchar(32),
CN_S_PRINTER varchar(32),
CN_S_IP varchar(16),
CN_S_CONTENT varchar(256),
CN_T_CREATE datetime
)

  
------------------------2018/12/8------------------------
  alter table TN_WM_PRINT_TEMPLET add CN_S_MAC varchar(36)

  alter table TN_WM_PRINT_TASK add CN_S_MAC varchar(36)

  
------------------------2018/12/12------------------------
    alter table TN_WM_PRINT_TASK  add   
	CN_GUID char(36),
  CN_C_IS_PRINTED char(36)
  
------------------------2018/12/13------------------------
--²ßÂÔ±íÐÂÔöÓ¢ÎÄ±êÊ¶×Ö¶Î¡­¡­
ALTER TABLE TN_WM_B_STRATEGY ADD CN_S_CODE VARCHAR(64)

--¸ü¸ÄÔö¼Ó¿â´æÒµÎñ×Ó±íµÄ´òÂëÊýÁ¿×Ö¶ÎÃû³Æ
exec sp_rename 'TN_WM_INCREASE_INVENTORY_DTL.CN_N_PRINTING_QTY','CN_F_PRINTING_QTY'
--¸ü¸Äµ½»õµ¥×Ó±íµÄ´òÂëÊýÁ¿×Ö¶ÎÃû³Æ
exec sp_rename 'TN_WM_ARRIVAL_DTL.CN_N_PRINTING_QTY','CN_F_PRINTING_QTY'

------------------------2018/12/14------------------------
alter table TN_WM_PRINT_TEMPLET
add CN_GUID varchar(36)

------------------------2018/12/14------------------------
--ÐÞ¸Ä¿Í»§Ãû³Æ³¤¶È
alter table tn_wm_out_mst alter column [CN_S_CUSTOMER_NAME] varchar(128) 
--ÐÞ¸ÄÊÖ»úºÅÂë³¤¶È
alter table tn_wm_out_mst alter column [CN_S_PHONE] varchar(32)

--Èë¿âµ¥ÐÂÔöÀÛ¼ÆÒÑÂëÅÌÊýÁ¿
alter table dbo.TN_WM_INCREASE_INVENTORY_DTL add CN_F_ADD_ONTRAY_QTY DECIMAL(18,4) default(0) not null

------------------------2018/12/15------------------------
alter table TN_WM_CHECK_LIST
add CN_S_PACKING_UNIT varchar(8),
CN_F_PACKING_QTY decimal(18,4),
CN_S_PRODUCTION_BATCH varchar(32)

------------------------2018/12/18------------------------
--ÍÐÅÌÎïÁÏÃ÷Ï¸±íÐÂÔöGUID×Ö¶Î
ALTER TABLE TN_WM_B_TRAY_ITEM_DTL  ADD CN_GUID VARCHAR(36) NOT NULL  
--·Ö¼ð½á¹û±íÔö¼Ó¼ÆÁ¿µ¥Î»×Ö¶Î
ALTER TABLE TN_WM_SORTING_RESULT  ADD [CN_S_MEASURE_UNIT] VARCHAR(8)


------------------------2018/12/19------------------------
CREATE TABLE [dbo].[TN_WM_B_OWNER](
	[CN_GUID] [varchar](36) NOT NULL,
	[CN_S_OWNER] [varchar](32) NOT NULL,
	[CN_B_DEFAULT] [bit] NOT NULL,
	[CN_S_REMARK] [varchar](1024) NULL,
 CONSTRAINT [PK_TN_WM_B_OWNER] PRIMARY KEY CLUSTERED 
(
	[CN_GUID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[TN_WM_B_OWNER] ADD  CONSTRAINT [DF_TN_WM_B_OWNER_CN_B_DEFAULT]  DEFAULT ((0)) FOR [CN_B_DEFAULT]
GO


------------------------2018/12/20------------------------
ALTER TABLE TN_WM_PRINT_TEMPLET
ADD CN_C_IS_TOOL_PRINT char(1)
,CN_C_IS_UPLOADED char(1)
------------------------2018/12/22------------------------
--²ßÂÔ±íÐÂÔöÐÐÊý¾Ý
INSERT INTO [tn_wm_b_strategy_def]([CN_S_GROUP],[CN_S_CODE],[CN_S_NAME],[CN_S_VALUE_TYPE],[CN_N_MIN_VALUE],[CN_N_MAX_VALUE],[CN_S_DIC_NAME],[CN_N_USE],[CN_S_REMARK],[CN_S_CREATOR],[CN_S_CREATOR_BY],[CN_T_CREATE],[CN_S_MODIFY],[CN_S_MODIFY_BY],[CN_T_MODFIY])
     VALUES('ÏµÍ³²ßÂÔ','IsUseK3','ÊÇ·ñÆôÓÃK3¶Ô½Ó','bool',null,null,null,'Y',null,'hh','hh','2018-01-01 00:00:00.000','hh','hh','2018-01-01 00:00:00.000')
	 
------------------------2018/12/24------------------------
alter table TN_WM_SORTING_LOCATION
add CN_S_AREA_CODE varchar(32)


------------------------2018/12/25------------------------
alter table TN_WM_B_MOVE_RESULT
add 
CN_S_PRODUCTION_BATCH varchar(32),
CN_S_CREATOR	char(16)	,
CN_S_CREATOR_BY	varchar(32)	,
CN_T_CREATE	datetime	,
CN_S_MODIFY	varchar(30)	,
CN_S_MODIFY_BY	varchar(30)	,
CN_T_MODIFY	datetime

alter table TN_WM_MOVE_DTL
add 
CN_S_PRODUCTION_BATCH varchar(32)

--·Ö¼ð½á¹û°ü×°µ¥Î»
ALTER TABLE TN_WM_SORTING_RESULT
ADD CN_S_PACKING_UNIT VARCHAR(8)
--°ü×°ÊýÁ¿
ALTER TABLE TN_WM_SORTING_RESULT
ADD CN_F_PACKING_QTY DECIMAL(18,4)


------------------------2018/12/26------------------------
create table TN_WM_OP_STORE_REL
(
	CN_S_STOCK_CODE varchar(8),
	CN_S_AREA_CODE varchar(8),
	CN_S_AREA_TYPE varchar(8),
	CN_S_OPERATION_CODE varchar(8),
	CN_C_IS_USE char(1),
	CN_S_MODIFY char(16),
	CN_S_MODIFY_BY varchar(16),
	CN_T_MODIFY datetime
)

------------------------2018/12/28------------------------
--¶©µ¥¼ð»õ¹ØÁª°ü×°µ¥Î»
ALTER TABLE TN_WM_ORDER_SORTING_REL
ADD CN_S_PACKING_UNIT VARCHAR(8)
--¶©µ¥¼ð»õ¹ØÁª°ü×°ÊýÁ¿
ALTER TABLE TN_WM_ORDER_SORTING_REL
ADD CN_F_PACKING_QTY DECIMAL(18,4)
--ÎïÁ÷¹«Ë¾ÐÂÔöGUID
ALTER TABLE TN_WM_LOGISTICS_COMPANY
ADD CN_GUID VARCHAR(36)
UPDATE TN_WM_LOGISTICS_COMPANY SET CN_GUID=NEWID() 
--»õÖ÷ÐÂÔö²Ù×÷ÐÅÏ¢
ALTER TABLE TN_WM_B_OWNER
ADD [CN_S_CREATOR] VARCHAR(32)
ALTER TABLE TN_WM_B_OWNER
ADD [CN_S_CREATOR_BY] VARCHAR(32)
ALTER TABLE TN_WM_B_OWNER
ADD [CN_T_CREATE] DATETIME
ALTER TABLE TN_WM_B_OWNER
ADD [CN_S_MODIFY] VARCHAR(32)
ALTER TABLE TN_WM_B_OWNER
ADD [CN_S_MODIFY_BY] VARCHAR(32)
ALTER TABLE TN_WM_B_OWNER
ADD [CN_T_MODIFY] DATETIME

------------------------2018/12/29------------------------
alter table tn_wm_check_list add CN_S_CREATOR varchar(30) NOT NULL;
alter table tn_wm_check_list add CN_S_CREATOR_BY varchar(30) NOT NULL;
alter table tn_wm_check_list add CN_T_CREATE DATETIME NOT NULL;

alter table tn_wm_check_list add CN_S_MODIFY varchar(30)  NULL;
alter table tn_wm_check_list add CN_S_MODIFY_BY varchar(30) NULL;
alter table tn_wm_check_list add CN_T_MODIFY DATETIME  NULL;


------------------------2019/1/2------------------------
--¶©µ¥¼ð»õ¹ØÁªÎ¨Ò»Âë
ALTER TABLE TN_WM_ORDER_SORTING_REL
ADD CN_S_UNIQUE_CODE VARCHAR(32)

------------------------2019/1/7------------------------
--Èë¿âµÄÉè±¸¾ùºâ¡¢ÏïµÀ¾ùºâ¡¢ÓÉ½ü¼°Ô¶¿ÉÅäÖÃ
INSERT INTO [dbo].[tn_wm_b_strategy]
           ([CN_GUID]
           ,[CN_S_CODE]
           ,[CN_S_NAME]
           ,[CN_S_TYPE]
           ,[CN_C_IS_USE]
           ,[CN_S_WHERE]
           ,[CN_S_NOTE])
     VALUES
           ('b175e1b1-63e8-5c95-a183-9550c98ca92d','EquipmentBalance','Éè±¸¾ùºâ','Èë¿â ','Y','1','')

GO
INSERT INTO [dbo].[tn_wm_b_strategy]
           ([CN_GUID]
           ,[CN_S_CODE]
           ,[CN_S_NAME]
           ,[CN_S_TYPE]
           ,[CN_C_IS_USE]
           ,[CN_S_WHERE]
           ,[CN_S_NOTE])
     VALUES
           ('b175e1b1-63e8-6c95-a183-9550c98ca92d','EquipmentBalance','ÏïµÀ¾ùºâ','Èë¿â ','Y','1','')

GO
INSERT INTO [dbo].[tn_wm_b_strategy]
           ([CN_GUID]
           ,[CN_S_CODE]
           ,[CN_S_NAME]
           ,[CN_S_TYPE]
           ,[CN_C_IS_USE]
           ,[CN_S_WHERE]
           ,[CN_S_NOTE])
     VALUES
           ('b175e1b1-63e8-7c95-a183-9550c98ca92d','EquipmentBalance','ÓÉ½ü¼°Ô¶','Èë¿â ','Y','1','')

 INSERT INTO [dbo].[tn_wm_b_strategy]
           ([CN_GUID]
           ,[CN_S_CODE]
           ,[CN_S_NAME]
           ,[CN_S_TYPE]
           ,[CN_C_IS_USE]
           ,[CN_S_WHERE]
           ,[CN_S_NOTE])
     VALUES
           ('b175e1b1-63e8-7c95-a183-9650c98ca92d','NoDivideFirstOut','²»²ð°üÓÅÏÈ','³ö¿â ','Y','1','')

GO


------------------------2019/1/7------------------------
alter table TN_WM_CHECK_MST
add CN_S_OPERATOER varchar(16),
CN_S_OPERATOER_NAME varchar(32)



CREATE TABLE [dbo].[TN_WM_LOGISTICS_TEMPLET_REL](
	[CN_GUID] [varchar](36) NULL,
	[CN_S_LOGISTICS_FLAG] [varchar](16) NULL,
	[CN_S_TEMPLET_NAME] [varchar](32) NOT NULL,
	[CN_S_TEMPLET_GUID] [varchar](36) NULL,
	[CN_N_IS_DEFAULT] [bit] NULL,
	[CN_S_CREATOR] [varchar](30) NOT NULL,
	[CN_S_CREATOR_BY] [varchar](30) NOT NULL,
	[CN_T_CREATE] [datetime] NOT NULL,
	[CN_S_MODIFY] [varchar](30) NULL,
	[CN_S_MODIFY_BY] [varchar](30) NULL,
	[CN_T_MODIFY] [datetime] NULL
) 


------------------------2019/1/9------------------------
alter table TN_WM_ORDER_SORTING_REL
add CN_S_MEASURE_UNIT varchar(8) 

------------------------2019/1/10------------------------
alter table TN_WM_UP_HISTORY
add CN_S_OP_FROM varchar(32),
CN_S_FROM_NO varchar(32),
CN_S_STOCK_CODE varchar(16),
CN_S_STOCK_AREA varchar(16)


CREATE TABLE TN_WM_UP_HISTORY(
	[CN_GUID] [char](36) NOT NULL,
	[CN_S_LOCATION_CODE] [varchar](32) NULL,
	[CN_S_TRAY_CODE] [varchar](32) NOT NULL,
	[CN_S_TRAY_GRID] [varchar](8) NOT NULL,
	[CN_S_OWNER] [varchar](64) NOT NULL,
	[CN_S_ITEM_CODE] [varchar](32) NOT NULL,
	[CN_S_ITEM_NAME] [varchar](64) NULL,
	[CN_S_FIGURE_NO] [varchar](64) NULL,
	[CN_S_MODEL] [varchar](64) NULL,
	[CN_S_ITEM_STATE] [varchar](8) NOT NULL,
	[CN_F_QUANTITY] [decimal](18, 4) NOT NULL,
	[CN_S_MEASURE_UNIT] [varchar](8) NOT NULL,
	[CN_S_LOT_NO] [varchar](20) NOT NULL,
	[CN_S_PACKING_UNIT] [varchar](8) NULL,
	[CN_F_PACKING_QTY] [decimal](18, 4) NULL,
	[CN_S_PRODUCTION_BATCH] [varchar](32) NULL,
	[CN_S_CREATOR] [varchar](16) NOT NULL,
	[CN_S_CREATOR_BY] [varchar](32) NOT NULL,
	[CN_T_CREATE] [datetime] NOT NULL,
	[CN_S_MODIFY] [varchar](16) NOT NULL,
	[CN_S_MODIFY_BY] [varchar](32) NOT NULL,
	[CN_T_MODIFY] [datetime] NOT NULL,
	[CN_S_OP_FROM] [varchar](32) NULL,
	[CN_S_FROM_NO] [varchar](32) NULL
)

--·Ö¼ðÃ÷Ï¸°ü×°µ¥Î»
ALTER TABLE TN_WM_SORTING_LOCATION
ADD CN_S_PACKING_UNIT VARCHAR(8)
--°ü×°ÊýÁ¿
ALTER TABLE TN_WM_SORTING_LOCATION
ADD CN_F_PACKING_QTY DECIMAL(18,4)


------------------------2019/1/23------------------------
--AutoBom¿âÐèÒªÐÂÔö´¥·¢Æ÷----¿Í»§µØÖ·±í

CREATE TRIGGER  TR_AB_B_ADDRESS_INFO
ON TN_AB_B_ADDRESS_INFO
AFTER INSERT,UPDATE,DELETE 
AS  
BEGIN
	--ÐÂÔö
	if exists(SELECT 1 FROM inserted) and not exists(SELECT 1 FROM deleted)
	BEGIN
		--ÏÈÉ¾³ý
		DELETE TN_AB_B_SYNCH_LOG FROM TN_AB_B_SYNCH_LOG A INNER JOIN inserted B 
		ON A.CN_S_GUID=B.CN_GUID AND A.CN_S_TABLE_NAME='TN_AB_B_ADDRESS_INFO' and A.CN_N_OP_FLAG=1
		--ÔÚÐÂÔö
		INSERT INTO TN_AB_B_SYNCH_LOG(CN_S_GUID,CN_S_TABLE_NAME,CN_N_OP_FLAG,CN_T_CREATE)
		SELECT CN_GUID,'TN_AB_B_ADDRESS_INFO',1,GETDATE() FROM inserted		
	END	
	--ÐÞ¸Ä
	if exists(SELECT 1 FROM inserted) and exists(SELECT 1 FROM deleted)
	BEGIN
		--ÏÈÉ¾³ý
		DELETE TN_AB_B_SYNCH_LOG FROM TN_AB_B_SYNCH_LOG A INNER JOIN inserted B 
		ON A.CN_S_GUID=B.CN_GUID AND A.CN_S_TABLE_NAME='TN_AB_B_ADDRESS_INFO' and A.CN_N_OP_FLAG=2
		--ÔÚÐÂÔö
		INSERT INTO TN_AB_B_SYNCH_LOG(CN_S_GUID,CN_S_TABLE_NAME,CN_N_OP_FLAG,CN_T_CREATE)
		SELECT CN_GUID,'TN_AB_B_ADDRESS_INFO',2,GETDATE() FROM inserted
	END
	--É¾³ý
	if not exists(SELECT 1 FROM inserted) and exists(SELECT 1 FROM deleted)
	BEGIN
		--ÏÈÉ¾³ý
		DELETE TN_AB_B_SYNCH_LOG FROM TN_AB_B_SYNCH_LOG A INNER JOIN deleted B 
		ON A.CN_S_GUID=B.CN_GUID AND A.CN_S_TABLE_NAME='TN_AB_B_ADDRESS_INFO' and A.CN_N_OP_FLAG=4
		--ÔÚÐÂÔö
		INSERT INTO TN_AB_B_SYNCH_LOG(CN_S_GUID,CN_S_TABLE_NAME,CN_N_OP_FLAG,CN_T_CREATE)
		SELECT CN_GUID,'TN_AB_B_ADDRESS_INFO',4,GETDATE() FROM deleted
	END
END
	
	--AutoBom¿âÐèÒªÐÂÔö´¥·¢Æ÷----¸¨Öúµ¥Î»±í

CREATE TRIGGER  TR_AB_B_AUXILIARY_UNIT
ON TN_AB_B_AUXILIARY_UNIT
AFTER INSERT,UPDATE,DELETE 
AS  
BEGIN
	--ÐÂÔö
	if exists(SELECT 1 FROM inserted) and not exists(SELECT 1 FROM deleted)
	BEGIN
		--ÏÈÉ¾³ý
		DELETE TN_AB_B_SYNCH_LOG FROM TN_AB_B_SYNCH_LOG A INNER JOIN inserted B 
		ON A.CN_S_GUID=B.CN_GUID AND A.CN_S_TABLE_NAME='TN_AB_B_AUXILIARY_UNIT' and A.CN_N_OP_FLAG=1
		--ÔÚÐÂÔö
		INSERT INTO TN_AB_B_SYNCH_LOG(CN_S_GUID,CN_S_TABLE_NAME,CN_N_OP_FLAG,CN_T_CREATE)
		SELECT CN_GUID,'TN_AB_B_AUXILIARY_UNIT',1,GETDATE() FROM inserted		
	END	
	--ÐÞ¸Ä
	if exists(SELECT 1 FROM inserted) and exists(SELECT 1 FROM deleted)
	BEGIN
		--ÏÈÉ¾³ý
		DELETE TN_AB_B_SYNCH_LOG FROM TN_AB_B_SYNCH_LOG A INNER JOIN inserted B 
		ON A.CN_S_GUID=B.CN_GUID AND A.CN_S_TABLE_NAME='TN_AB_B_AUXILIARY_UNIT' and A.CN_N_OP_FLAG=2
		--ÔÚÐÂÔö
		INSERT INTO TN_AB_B_SYNCH_LOG(CN_S_GUID,CN_S_TABLE_NAME,CN_N_OP_FLAG,CN_T_CREATE)
		SELECT CN_GUID,'TN_AB_B_AUXILIARY_UNIT',2,GETDATE() FROM inserted
	END
	--É¾³ý
	if not exists(SELECT 1 FROM inserted) and exists(SELECT 1 FROM deleted)
	BEGIN
		--ÏÈÉ¾³ý
		DELETE TN_AB_B_SYNCH_LOG FROM TN_AB_B_SYNCH_LOG A INNER JOIN deleted B 
		ON A.CN_S_GUID=B.CN_GUID AND A.CN_S_TABLE_NAME='TN_AB_B_AUXILIARY_UNIT' and A.CN_N_OP_FLAG=4
		--ÔÚÐÂÔö
		INSERT INTO TN_AB_B_SYNCH_LOG(CN_S_GUID,CN_S_TABLE_NAME,CN_N_OP_FLAG,CN_T_CREATE)
		SELECT CN_GUID,'TN_AB_B_AUXILIARY_UNIT',4,GETDATE() FROM deleted
	END
END
	

	
------------------------2019/1/24------------------------
ALTER TABLE dbo.TN_WM_SORTING_LOCATION ALTER COLUMN CN_F_QUANTITY DECIMAL(18,4)

------------------------2019/1/27------------------------
alter table tn_wm_check_dtl alter column CN_S_MODEL varchar(64) 

------------------------2019/1/28------------------------
ALTER TABLE TN_WM_SORTING_LIST
ALTER COLUMN CN_T_OPERATE VARCHAR(32)

ALTER TABLE dbo.tn_wm_check_list ALTER COLUMN CN_S_MEASURE_UNIT varchar(8) NULL

ALTER TABLE TN_WM_ORDER_SORTING_REL
ALTER COLUMN CN_F_QUANTITY DECIMAL(18,4) NOT NULL

ALTER TABLE TN_WM_ORDER_SORTING_REL
ALTER COLUMN CN_F_RECHECK DECIMAL(18,4)

ALTER TABLE TN_WM_B_BOX_DTL
ALTER COLUMN CN_F_QUANTITY DECIMAL(18,4)


CREATE TABLE [dbo].[TN_WM_VERSION_LOG](
	[CN_GUID] [varchar](36) NOT NULL,
	[CN_S_VERSION] [varchar](16) NULL,
	[CN_T_UPDATE] [datetime] NULL,
	[CN_S_CONTENT] [varchar](1024) NULL,
	[CN_N_ORDER] [int] NULL,
	[CN_S_REMARK] [varchar](256) NULL,
 CONSTRAINT [PK_TN_WM_UPDATERECORD] PRIMARY KEY CLUSTERED 
(
	[CN_GUID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]


INSERT [dbo].[TN_WM_VERSION_LOG] ([CN_GUID], [CN_S_VERSION], [CN_T_UPDATE], [CN_S_CONTENT], [CN_N_ORDER], [CN_S_REMARK]) VALUES (N'1', N'V2.1.1', CAST(0x0000A9E300000000 AS DateTime), N'Ôö¼ÓÎïÁ÷±¨±í', 1, NULL)
INSERT [dbo].[TN_WM_VERSION_LOG] ([CN_GUID], [CN_S_VERSION], [CN_T_UPDATE], [CN_S_CONTENT], [CN_N_ORDER], [CN_S_REMARK]) VALUES (N'10', N'V2.1.1', CAST(0x0000A9E300000000 AS DateTime), N'ÐÞ¸´ìøµÀbug', 5, NULL)
INSERT [dbo].[TN_WM_VERSION_LOG] ([CN_GUID], [CN_S_VERSION], [CN_T_UPDATE], [CN_S_CONTENT], [CN_N_ORDER], [CN_S_REMARK]) VALUES (N'11', N'V2.1.0', CAST(0x0000A9DE00000000 AS DateTime), N'ÐÞ¸´ìøµÀbug', 6, N'')
INSERT [dbo].[TN_WM_VERSION_LOG] ([CN_GUID], [CN_S_VERSION], [CN_T_UPDATE], [CN_S_CONTENT], [CN_N_ORDER], [CN_S_REMARK]) VALUES (N'2', N'V2.1.1', CAST(0x0000A9E300000000 AS DateTime), N'Ôö¼ÓÐÞ¸ÄÃÜÂë', 2, NULL)
INSERT [dbo].[TN_WM_VERSION_LOG] ([CN_GUID], [CN_S_VERSION], [CN_T_UPDATE], [CN_S_CONTENT], [CN_N_ORDER], [CN_S_REMARK]) VALUES (N'3', N'V2.1.1', CAST(0x0000A9E300000000 AS DateTime), N'µ½»õµ¥Ö§³Ö¶àÑ¡ÉóºË', 3, NULL)
INSERT [dbo].[TN_WM_VERSION_LOG] ([CN_GUID], [CN_S_VERSION], [CN_T_UPDATE], [CN_S_CONTENT], [CN_N_ORDER], [CN_S_REMARK]) VALUES (N'4', N'V2.1.1', CAST(0x0000A9E300000000 AS DateTime), N'µ½»õµ¥Ö§³Ö¶àÑ¡ÉóºË', 4, NULL)
INSERT [dbo].[TN_WM_VERSION_LOG] ([CN_GUID], [CN_S_VERSION], [CN_T_UPDATE], [CN_S_CONTENT], [CN_N_ORDER], [CN_S_REMARK]) VALUES (N'5', N'V2.1.0', CAST(0x0000A9DE00000000 AS DateTime), N'Ôö¼ÓÈë¿âµ¥¡¢µ½»õµ¥µ¼³ö¡¢³ö¿âµ¥µ¼³ö', 1, N'')
INSERT [dbo].[TN_WM_VERSION_LOG] ([CN_GUID], [CN_S_VERSION], [CN_T_UPDATE], [CN_S_CONTENT], [CN_N_ORDER], [CN_S_REMARK]) VALUES (N'6', N'V2.1.0', CAST(0x0000A9DE00000000 AS DateTime), N'Èë¿âµ¥ÅúÁ¿ÉóºË', 2, N'')
INSERT [dbo].[TN_WM_VERSION_LOG] ([CN_GUID], [CN_S_VERSION], [CN_T_UPDATE], [CN_S_CONTENT], [CN_N_ORDER], [CN_S_REMARK]) VALUES (N'7', N'V2.1.0', CAST(0x0000A9DE00000000 AS DateTime), N'Xmlµ¼³öÎÄ¼þÃû×Ô¶¯´ø³ö', 3, N'')
INSERT [dbo].[TN_WM_VERSION_LOG] ([CN_GUID], [CN_S_VERSION], [CN_T_UPDATE], [CN_S_CONTENT], [CN_N_ORDER], [CN_S_REMARK]) VALUES (N'8', N'V2.1.0', CAST(0x0000A9DE00000000 AS DateTime), N'³ö¿âÈÎÎñµç×Ó¿´°å', 4, N'')
INSERT [dbo].[TN_WM_VERSION_LOG] ([CN_GUID], [CN_S_VERSION], [CN_T_UPDATE], [CN_S_CONTENT], [CN_N_ORDER], [CN_S_REMARK]) VALUES (N'9', N'V2.1.0', CAST(0x0000A9DE00000000 AS DateTime), N'Ö§³ÖÒ»¸ö¿Í»§¶à¸öµØÖ·', 5, N'')


------------------------2019/2/18------------------------
drop TABLE [dbo].[TN_WM_INTERFACE_DEF]
CREATE TABLE [dbo].[TN_WM_INTERFACE_DEF](
	[CN_S_INTF_CODE] [varchar](16) NULL,
	[CN_S_INTF_NAME] [varchar](16) NULL,
	[CN_S_TYPE] [varchar](16) NULL,
	[CN_S_URL] [varchar](128) NULL,
	[CN_S_PROTOCOL] [varchar](32) NULL,
	[CN_S_MODE] [varchar](8) NULL,
	[CN_S_DB_TYPE] [varchar](8) NULL,
	[CN_S_CENTER_TABLE] [varchar](32) NULL,
	[CN_S_METHOD] [varchar](16) NULL,
	[CN_C_IS_ENABLE] [char](1) NULL,
	[CN_S_CREATOR] [varchar](16) NULL,
	[CN_S_CREATOR_BY] [varchar](16) NULL,
	[CN_T_CREATE] [datetime] NULL,
	[CN_S_MODIFY] [varchar](16) NULL,
	[CN_S_MODIFY_BY] [varchar](16) NULL,
	[CN_T_MODIFY] [datetime] NULL
) ON [PRIMARY]


CREATE TABLE [dbo].[TN_WM_INTERFACE_PARAM](
	[CN_S_OTHER_SYS] [varchar](8) NULL,
	[CN_S_INTF_CODE] [varchar](16) NULL,
	[CN_S_WMS_PARAM_NAME] [varchar](32) NULL,
	[CN_S_OTHER_PARAM_NAME] [varchar](32) NULL,
	[CN_S_FIXED_PARAM_NAME] [varchar](32) NULL,
	[CN_S_FIXED_PARAM_VALUE] [varchar](32) NULL,
	[CN_S_FIXED_PARAM_TYPE] [varchar](8) NULL,
	[CN_C_IS_ENABLE] [char](1) NULL,
	[CN_S_CREATOR] [varchar](16) NULL,
	[CN_S_CREATOR_BY] [varchar](16) NULL,
	[CN_T_CREATE] [datetime] NULL,
	[CN_S_MODIFY] [varchar](16) NULL,
	[CN_S_MODIFY_BY] [varchar](16) NULL,
	[CN_T_MODIFY] [datetime] NULL
) ON [PRIMARY]

------------------------2019/2/19------------------------
--Ö÷±í
CREATE TABLE [dbo].[TN_WM_POWER_ENABLED_MST](
	[CN_GUID] [varchar](36) NOT NULL,
	[CN_S_TYPE] [varchar](32) NULL,
	[CN_S_POWER] [varchar](64) NULL,
	[CN_B_READONLY] [bit] NOT NULL,
	[CN_S_REMARK] [varchar](1024) NULL,
 CONSTRAINT [PK_TN_WM_POWER_ENABLED_MST] PRIMARY KEY CLUSTERED 
(
	[CN_GUID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[TN_WM_POWER_ENABLED_MST] ADD  CONSTRAINT [DF_TN_WM_POWER_ENABLED_MST_CN_B_READONLY]  DEFAULT ((0)) FOR [CN_B_READONLY]

--×Ó±í
CREATE TABLE [dbo].[TN_WM_POWER_ENABLED_DTL](
	[CN_GUID] [varchar](36) NOT NULL,
	[CN_S_PARENTID] [varchar](36) NULL,
	[CN_S_POWER_CODE] [varchar](32) NOT NULL,
	[CN_S_POWER_NAME] [varchar](32) NULL,
	[CN_B_ENABLED] [bit] NOT NULL,
	[CN_F_WIDTH] [decimal](18, 0) NULL,
	[CN_S_ALIGN] [varchar](16) NULL,
	[CN_S_METHOD_NAME] [varchar](32) NULL,
	[CN_S_REMARK] [varchar](256) NULL,
	[CN_N_ORDER] [int] NOT NULL,
 CONSTRAINT [PK_TN_WM_POWER_ENABLED] PRIMARY KEY CLUSTERED 
(
	[CN_GUID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[TN_WM_POWER_ENABLED_DTL] ADD  CONSTRAINT [DF_TN_WM_POWER_ENABLED_CN_B_ENABLED]  DEFAULT ((0)) FOR [CN_B_ENABLED]
GO

ALTER TABLE [dbo].[TN_WM_POWER_ENABLED_DTL] ADD  CONSTRAINT [DF_TN_WM_POWER_ENABLED_DTL_CN_N_ORDER]  DEFAULT ((0)) FOR [CN_N_ORDER]
GO


------------------------2019/2/20------------------------
alter table TN_WM_INTERFACE_PARAM add CN_GUID varchar(36)

------------------------2019/2/25------------------------
alter table TN_WM_SYS_CONFIG add 
CN_S_TYPE	varchar(16)	,
CN_S_MODIFY	varchar(16),
CN_S_MODIFY_BY	varchar(32)	,
CN_T_MODIFY	datetime


------------------------2019/2/28------------------------
ALTER TABLE TN_WM_OUT_MST
ADD [CN_S_SPLIT_FROM] VARCHAR(32)

ALTER TABLE TN_WM_OUT_MST
ADD [CN_B_CANCEL] BIT

ALTER TABLE [DBO].[TN_WM_OUT_MST] ADD  CONSTRAINT [DF_TN_WM_OUT_MST_CN_B_CANCEL]  DEFAULT ((0)) FOR [CN_B_CANCEL]


------------------------2019/3/5------------------------
drop table tn_wm_in_task
drop table tn_wm_out_task
drop table TN_WM_TRANSPORT_TASK
CREATE TABLE [dbo].[TN_WM_TASK](
	[CN_S_TASK_NO] [varchar](32) NOT NULL,
	[CN_S_TASK_TYPE] [varchar](8) NULL,
	[CN_S_FROM_OP] [varchar](16) NULL,
	[CN_S_FROM_NO] [varchar](32) NULL,
	[CN_S_TRAY_CODE] [varchar](128) NOT NULL,
	[CN_S_STOCK_CODE] [varchar](32) NULL,
	[CN_S_START_AREA] [varchar](32) NULL,
	[CN_S_START_BIT] [varchar](32) NOT NULL,
	[CN_S_END_AREA] [varchar](32) NULL,
	[CN_S_END_BIT] [varchar](32) NOT NULL,
	[CN_S_STATE] [varchar](8) NOT NULL,
	[CN_T_START] [datetime] NULL,
	[CN_T_END] [datetime] NULL,
	[CN_S_BF_TASK_NO] [varchar](32) NULL,
	[CN_S_AF_TASK_NO] [varchar](32) NULL,
	[CN_N_PRIORITY] [int] NULL,
	[CN_S_REMARK] [nvarchar](64) NULL,
	[CN_S_CREATOR] [varchar](16) NULL,
	[CN_S_CREATOR_BY] [varchar](32) NULL,
	[CN_T_CREATE] [datetime] NULL,
	[CN_S_MODIFY] [varchar](16) NULL,
	[CN_S_MODIFY_BY] [varchar](32) NULL,
	[CN_T_MODIFY] [datetime] NULL,
 CONSTRAINT [PK__tn_wm_in__93E3EBC91DBB5747] PRIMARY KEY CLUSTERED 
(
	[CN_S_TASK_NO] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

------------------------2019/3/6------------------------
  alter table TN_WM_PRINT_TEMPLET 
  add CN_C_IS_FIRST char(1),
  [CN_C_IS_UPLOADED] char(1),
  [CN_T_UPLOAD_TIME] datetime,
  [CN_S_UPLOADOR] varchar(16)

  alter table tn_wm_b_stock_qty
add CN_S_FIGURE_NO	varchar(128),
CN_S_MODEL	varchar(64)	,
CN_S_MEASURE_UNIT	varchar(8)

alter table tn_wm_b_area_qty
add CN_S_FIGURE_NO	varchar(128),
CN_S_MODEL	varchar(64)	,
CN_S_MEASURE_UNIT	varchar(8)


------------------------2019/3/7------------------------
drop TABLE TN_WM_B_TRAY_ALLOC
CREATE TABLE [dbo].[TN_WM_TRAY_ALLOC](
	[CN_GUID] [varchar](36) NOT NULL,
	[CN_S_TRAY_CODE] [varchar](32) NOT NULL,
	[CN_S_TRAY_GRID] [varchar](4) NULL,
	[CN_S_SERIAL_NO] [varchar](64) NULL,
	[CN_S_ITEM_CODE] [varchar](32) NOT NULL,
	[CN_S_ITEM_NAME] [varchar](64) NULL,
	[CN_S_ITEM_STATE] [varchar](8) NOT NULL,
	[CN_S_MODEL] [varchar](32) NULL,
	[CN_S_FIGURE_NO] [varchar](32) NULL,
	[CN_F_QUANTITY] [decimal](18, 4) NULL,
	[CN_S_CREATOR] [varchar](16) NOT NULL,
	[CN_S_CREATOR_BY] [varchar](32) NOT NULL,
	[CN_T_CREATE] [datetime] NOT NULL,
	[CN_S_MODIFY] [varchar](16) NULL,
	[CN_S_MODIFY_BY] [varchar](32) NULL,
	[CN_T_MODIFY] [datetime] NULL,
 CONSTRAINT [PK__tn_wm_b___444F97604D94879B] PRIMARY KEY CLUSTERED 
(
	[CN_GUID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]


CREATE TABLE [dbo].[TN_WM_WORK_AREA_PRO](
	[CN_GUID] [varchar](36) NOT NULL,
	[CN_S_TYPE] [varchar](16) NOT NULL,
	[CN_S_START_AREA_CODE] [varchar](32) NOT NULL,
	[CN_S_END_AREA_CODE] [varchar](32) NOT NULL,
	[CN_S_START_AREA_NAME] [varchar](32) NOT NULL,
	[CN_S_END_AREA_NAME] [varchar](32) NOT NULL,
	[CN_B_IS_USE] [bit] NOT NULL,
	[CN_S_CREATOR] [varchar](16) NOT NULL,
	[CN_S_CREATOR_BY] [varchar](32) NOT NULL,
	[CN_T_CREATE] [datetime] NOT NULL,
	[CN_S_MODIFY] [varchar](16) NULL,
	[CN_S_MODIFY_BY] [varchar](32) NULL,
	[CN_T_MODIFY] [datetime] NULL,
	[CN_C_IS_AUTO] [char](1) NULL,
	[CN_N_PRIORITY] [int] NULL,
	[CN_S_EXPRESS] [varchar](128) NULL,
 CONSTRAINT [PK__TN_WM_WO__444F976031A25463] PRIMARY KEY CLUSTERED 
(
	[CN_GUID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[TN_WM_WORK_AREA_PRO] ADD  CONSTRAINT [DF_TN_WM_WORK_AREA_PRO_CN_B_IS_USE]  DEFAULT ((0)) FOR [CN_B_IS_USE]
GO

------------------------2019/3/8------------------------
ALTER TABLE TN_WM_OUT_DTL
ADD CN_S_EXT1 VARCHAR(32)
ALTER TABLE TN_WM_OUT_DTL
ADD CN_S_EXT2 VARCHAR(32)
ALTER TABLE TN_WM_OUT_DTL
ADD CN_S_EXT3 VARCHAR(32)
ALTER TABLE TN_WM_OUT_DTL
ADD CN_S_EXT4 VARCHAR(32)
ALTER TABLE TN_WM_OUT_DTL
ADD CN_S_EXT5 VARCHAR(32)

alter table TN_WM_TRAY_ALLOC
add CN_S_SORTING_PLATFROM varchar(32)

------------------------2019/3/12------------------------
--·Ö¼ðÃ÷Ï¸±íÒÑ¼ðÊý
ALTER TABLE TN_WM_SORTING_LOCATION
ADD CN_F_PICKED_QTY DECIMAL(18,4)


------------------------2019/3/18------------------------
drop TABLE TN_WM_B_OBJ_LOCATION
drop TABLE [dbo].[tn_wm_check_list]
CREATE TABLE [dbo].[tn_wm_check_list](
	[CN_GUID] [varchar](36) NOT NULL,
	[CN_S_OP_NO] [varchar](32) NULL,
	[CN_S_DTL_ROW] [int] NULL,
	[CN_S_STOCK_CODE] [varchar](32) NULL,
	[CN_S_STOCK_AREA] [varchar](32) NULL,
	[CN_S_LOCATION_CODE] [varchar](32) NULL,
	[CN_S_TRAY_CODE] [varchar](32) NULL,
	[CN_S_TRAY_GRID] [varchar](8) NULL,
	[CN_S_ITEM_CODE] [varchar](32) NULL,
	[CN_S_ITEM_NAME] [varchar](64) NULL,
	[CN_S_ITEM_STATE] [varchar](8) NULL,
	[CN_S_OWNER] [varchar](32) NULL,
	[CN_S_LOT_NO] [varchar](16) NULL,
	[CN_S_MODEL] [varchar](32) NULL,
	[CN_S_FIGURE_NO] [varchar](32) NULL,
	[CN_F_QUANTITY] [decimal](18, 4) NOT NULL,
	[CN_F_CHECK_QTY] [decimal](18, 4) NOT NULL,
	[CN_S_MEASURE_UNIT] [varchar](8) NULL,
	[CN_S_NOTE] [varchar](1024) NULL,
	[CN_S_ISCHECK] [char](1) NULL,
	[CN_S_ISWIN] [char](1) NULL,
	[CN_S_OPERATOR] [varchar](8) NULL,
	[CN_T_OPERATE] [datetime] NULL,
	[CN_S_PACK_CODE] [varchar](32) NULL,
	[CN_S_PACKING_UNIT] [varchar](8) NULL,
	[CN_F_PACKING_QTY] [decimal](18, 4) NULL,
	[CN_S_PRODUCTION_BATCH] [varchar](32) NULL,
	[CN_S_CREATOR] [varchar](30) NOT NULL,
	[CN_S_CREATOR_BY] [varchar](30) NOT NULL,
	[CN_T_CREATE] [datetime] NOT NULL,
	[CN_S_MODIFY] [varchar](30) NULL,
	[CN_S_MODIFY_BY] [varchar](30) NULL,
	[CN_T_MODIFY] [datetime] NULL,
 CONSTRAINT [PK_tn_wm_check_list] PRIMARY KEY CLUSTERED 
(
	[CN_GUID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]


--ÎïÁÏ»ì·ÅÉÏÏÞ
ALTER TABLE  TN_WM_TRAY_INFO ADD CN_N_GOODUPLINE INT 
update TN_WM_TRAY_INFO set CN_N_GOODUPLINE=3


------------------------2019/3/28------------------------
ALTER TABLE TN_WM_OUT_MST
ADD CN_S_OUT_TYPE VARCHAR(32)

ALTER TABLE TN_WM_OUT_MST
ADD [CN_S_LOT_CODE] VARCHAR(20)

------------------------2019/4/1------------------------
ALTER TABLE TN_WM_OUT_MST
ADD CN_S_EXT1 VARCHAR(32)
ALTER TABLE TN_WM_OUT_MST
ADD CN_S_EXT2 VARCHAR(32)
ALTER TABLE TN_WM_OUT_MST
ADD CN_S_EXT3 VARCHAR(32)
ALTER TABLE TN_WM_OUT_MST
ADD CN_S_EXT4 VARCHAR(32)
ALTER TABLE TN_WM_OUT_MST
ADD CN_S_EXT5 VARCHAR(32)

ALTER TABLE TN_WM_TASK
ADD CN_B_SENDAMS BIT DEFAULT 0


CREATE TABLE [dbo].[TN_WM_DOWN_HISTORY](
	[CN_GUID] [char](36) NOT NULL,
	[CN_S_LOCATION_CODE] [varchar](32) NULL,
	[CN_S_TRAY_CODE] [varchar](32) NOT NULL,
	[CN_S_TRAY_GRID] [varchar](8) NOT NULL,
	[CN_S_OWNER] [varchar](64) NOT NULL,
	[CN_S_ITEM_CODE] [varchar](32) NOT NULL,
	[CN_S_ITEM_NAME] [varchar](64) NULL,
	[CN_S_FIGURE_NO] [varchar](64) NULL,
	[CN_S_MODEL] [varchar](64) NULL,
	[CN_S_ITEM_STATE] [varchar](8) NOT NULL,
	[CN_F_QUANTITY] [decimal](18, 4) NOT NULL,
	[CN_S_MEASURE_UNIT] [varchar](8) NOT NULL,
	[CN_S_LOT_NO] [varchar](20) NULL,
	[CN_S_PACKING_UINIT] [varchar](8) NULL,
	[CN_F_PACKING_QTY] [decimal](18, 4) NULL,
	[CN_S_PRODUCTION_BATCH] [varchar](32) NULL,
	[CN_S_CREATOR] [varchar](16) NOT NULL,
	[CN_S_CREATOR_BY] [varchar](32) NOT NULL,
	[CN_T_CREATE] [datetime] NOT NULL,
	[CN_S_MODIFY] [varchar](16) NOT NULL,
	[CN_S_MODIFY_BY] [varchar](32) NOT NULL,
	[CN_T_MODIFY] [datetime] NOT NULL,
	[CN_S_OP_FROM] [varchar](32) NULL,
	[CN_S_FROM_NO] [varchar](32) NULL,
	[CN_S_STOCK_CODE] [varchar](16) NULL,
	[CN_S_STOCK_AREA] [varchar](16) NULL,
	[CN_S_PACKING_UNIT] [varchar](8) NULL
) ON [PRIMARY]


------------------------2019/4/2------------------------
alter table TN_WM_PRINT_TASK alter column CN_S_CONTENT varchar(8000)

------------------------2019/4/3------------------------
alter table tn_wm_b_location_ext alter column CN_S_STOCK_CODE varchar(32)
alter table tn_wm_b_location_ext alter column CN_S_ROW varchar(10)
alter table tn_wm_b_location_ext alter column CN_S_LOCATION_CODE varchar(32)
alter table tn_wm_b_location_ext alter column CN_S_LOCATION_STATE varchar(16)
alter table tn_wm_b_location_ext alter column CN_S_USE_STATE varchar(10)
alter table tn_wm_b_location_ext alter column CN_S_BEF_FAULT_STATE varchar(10)
alter table tn_wm_b_location_ext alter column CN_S_ROADWAY varchar(10)
alter table tn_wm_b_location_ext alter column CN_S_COL varchar(8)
alter table tn_wm_b_location_ext alter column CN_S_FLOOR varchar(8)

------------------------2019/4/4------------------------
CREATE TABLE [dbo].[TN_REQ_INF_LOG](
	[CN_GUID] [char](36) NULL,
	[CN_S_INTERFACE] [varchar](32) NULL,
	[CN_S_INTERFACE_NAME] [varchar](32) NULL,
	[CN_S_REQUEST] [varchar](1024) NULL,
	[CN_S_RESPONSE] [varchar](1024) NULL,
	[CN_T_CREATE] [datetime] NULL
) ON [PRIMARY]


------------------------2019/4/10------------------------
alter table  TN_WM_B_TRAY_ITEM_MST alter column CN_S_TIMESTAMP char(32) null

ALTER TABLE TN_WM_B_TRAY_ITEM_MST ADD PRIMARY KEY (CN_GUID)

drop table [SS_WMS].[dbo].[TN_WMS_REQ_LOG]
CREATE TABLE [dbo].[TN_WMS_REQ_LOG](
	[CN_GUID] [char](36) NULL,
	[CN_S_INTERFACE] [varchar](32) NULL,
	[CN_S_INTERFACE_NAME] [varchar](32) NULL,
	[CN_S_REQUEST] [varchar](1024) NULL,
	[CN_S_RESPONSE] [varchar](1024) NULL,
	[CN_T_CREATE] [datetime] NULL
) ON [PRIMARY]


------------------------2019/4/11------------------------
INSERT INTO [dbo].[tn_wm_b_strategy_def]
           ([CN_S_GROUP]
           ,[CN_S_CODE]
           ,[CN_S_NAME]
           ,[CN_S_VALUE_TYPE]
           ,[CN_N_MIN_VALUE]
           ,[CN_N_MAX_VALUE]
           ,[CN_S_DIC_NAME]
           ,[CN_N_USE]
           ,[CN_S_REMARK]
           ,[CN_S_CREATOR]
           ,[CN_S_CREATOR_BY]
           ,[CN_T_CREATE]
           ,[CN_S_MODIFY]
           ,[CN_S_MODIFY_BY]
           ,[CN_T_MODFIY])
     VALUES
           ('Èë¿â²ßÂÔ'
           ,'UpshelfWithIncrease'
           ,'Èë¿âÖ±½ÓÉú³ÉÈë¿âµ¥'
           ,'bool'
           ,NULL
           ,NULL
           ,NULL
           ,'1'
           ,NULL
           ,'hh'
           ,'ºººÍÐÅÏ¢'
           ,'2019-03-27 17:08:10.750'
           ,'hh'
           ,'ºººÍÐÅÏ¢'
           ,'2019-03-27 17:08:10.750')
GO