USE [CallCenter_XinXiangXLX]
GO

IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__T_Wo_Work__IsEff__058EC7FB]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[T_Wo_WorkOrder] DROP CONSTRAINT [DF__T_Wo_Work__IsEff__058EC7FB]
END

GO

IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__T_Wo_WorkO__WjID__1F4E99FE]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[T_Wo_WorkOrder] DROP CONSTRAINT [DF__T_Wo_WorkO__WjID__1F4E99FE]
END

GO

USE [CallCenter_XinXiangXLX]
GO

/****** Object:  Table [dbo].[T_Wo_WorkOrder]    Script Date: 06/10/2019 14:47:09 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[T_Wo_WorkOrder]') AND type in (N'U'))
DROP TABLE [dbo].[T_Wo_WorkOrder]
GO

USE [CallCenter_XinXiangXLX]
GO

/****** Object:  Table [dbo].[T_Wo_WorkOrder]    Script Date: 06/10/2019 14:47:09 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[T_Wo_WorkOrder](
	[F_ID] [int] IDENTITY(1,1) NOT NULL,
	[F_WorkOrderCode] [varchar](50) NULL,--工单编号

	[F_CallID] [varchar](50) NULL,--通话记录ID
	
	[F_Source] [nvarchar](200) NULL,--工单来源 电话、微信业务员、微信客户、官网
	[F_Type] [nvarchar](200) NULL,--工单类型 咨询及需求、投诉、抽检 其他
	[F_IncidentProvince] [nvarchar](200) NULL,--事发地-省
	[F_IncidentCity] [nvarchar](200) NULL,--事发地-市
	[F_IncidentCountry] [nvarchar](200) NULL,--事发地-县
	[F_IncidentTownship] [nvarchar](200) NULL,--事发地-乡
	[F_IncidentDetailed] [nvarchar](200) NULL,--事发地-详细
	[F_SalesBase] [nvarchar](200) NULL,--销售基地 新乡、新疆、九江、东北、其他
	[F_Description] [ntext] NULL,--问题描述	
	[F_Files] [nvarchar](max) NULL,--附件上传ids
	[F_DealType] [nvarchar](200) NULL,--处理方式 当即办理、电话转接、网络转办
	
	[F_CusPhone] [nvarchar](200) NULL,--来电号码
	[F_CusName] [nvarchar](200) NULL,--客户姓名
	[F_CompanyName] [nvarchar](200) NULL,--公司名称
	[F_CustomerID] [int] NULL,--客户id
	[F_MaterialID] [nvarchar](200) NULL,--物料id
	[F_QuestionType] [nvarchar](200) NULL,--问题类别

	[F_BatchNumber] [nvarchar](200) NULL,--生产批次号
	
	[F_TS_Formula] [ntext] NULL,--投诉-配方
	[F_TS_Category] [nvarchar](200) NULL,--投诉-产品种类：化肥、化工、其他
	[F_TS_Quantity] [nvarchar](200) NULL,--投诉-问题数量（吨）	
	[F_TS_Level] [nvarchar](200) NULL,--投诉-重要级别：轻微、一般、较大、重大

	[F_ZX_ProName] [nvarchar](200) NULL,--咨询-产品名称：三聚氰胺、甲醇、液氨、二甲醚、糠醇、其他
	[F_ZX_Quantity] [nvarchar](200) NULL,--咨询-问题数量	
	[F_ZX_Area] [nvarchar](200) NULL,--咨询-大区	
	[F_ZX_Branch] [nvarchar](200) NULL,--咨询-分公司	

	[F_CJ_Time] [datetime] NULL,--抽检-抽检时间	
	[F_CJ_Level] [nvarchar](200) NULL,--抽检-抽检级别：乡镇级、县级、市级、省级及以上、个人送检
	[F_CJ_Unit] [nvarchar](200) NULL,--抽检-抽检单位：市场监督、农业部、土肥站、工商、联合执法、其他
	[F_CJ_TestUnit] [nvarchar](200) NULL,--抽检-化验单位	
	[F_CJ_Tonnage] [nvarchar](200) NULL,--抽检-抽检吨数	
	[F_CJ_BagNo] [nvarchar](200) NULL,--抽检-抽检袋数	
	[F_CJ_Outlay] [nvarchar](200) NULL,--抽检-公关费用金额：单位元
	
	[F_State] [int] NULL,
	
	--市场管理科
	[F_SC_ProductBase] [nvarchar](200) NULL,--生产基地（新乡、新疆、九江、东北、贴牌、无法确定）
	[F_SC_PreliminaryOpinion][nvarchar](max) NULL,--初审意见:退货、换货、补偿、自行处理
	[F_SC_QualityMonth] [nvarchar](200) NULL,--超出质保期限（算法：工单创建日期-生产日期，生产日期根据生产批次号获取，单位：月）
	[F_SC_CJ_SpotResult] [nvarchar](200) NULL,--抽检-抽检结果（视同合格、合格、不合格、复检后合格、未送检）
	[F_SC_CJ_SelfResult] [nvarchar](200) NULL,--抽检-自检结果
	[F_SC_CJ_ApprovalNo] [nvarchar](200) NULL,--抽检-对应审批工作流单号
	[F_SC_CJ_ReturnAccount] [nvarchar](200) NULL,--抽检-确认返账金额（元）
	--市场管理科
	
	--质量管理科
	[F_ZL_QualityEventLevel] [nvarchar](200) NULL,--质量事件等级（未遂、一般、较大、重大）
	[F_ZL_ClaimAmount] [nvarchar](200) NULL,--索赔金额（单位元，对应责任单位）
	[F_ZL_ResponsibleUnit] [nvarchar](max) NULL,--责任单位（需列出，可选多个）
	[F_ZL_ApprovalOpinions] [nvarchar](200) NULL,--审批意见（同意、不同意，若选择不同意，增加输入框输入补充内容）
	[F_ZL_ApprovalDisagree] [nvarchar](max) NULL,--审批不同意意见
	[F_ZL_CompensationMethod] [nvarchar](200) NULL,--补偿方式（实物、钱款【单位元】，若选择钱款，增加输入框输入补充内容）
	[F_ZL_CompensationMoney] [nvarchar](200) NULL,--补偿钱款
	[F_ZL_CResponsibleUnits] [nvarchar](max) NULL,--对应责任单位（生产、研发、农化、物流、质量管理科，销售内勤）
	[F_ZL_Fquantity] [nvarchar](200) NULL,--确认实收数量（吨）
	[F_ZL_ImprovementRequirements] [nvarchar](max) NULL,--改进要求
	[F_ZL_CApprovalNo] [nvarchar](200) NULL,--对应审批工作流单号
	[F_ZL_CJ_IsRecord] [nvarchar](200) NULL,--抽检-未备案、已备案
	--质量管理科
	
	[F_IsAudit] [int] NULL,	--是否审核
	[F_AuditState] [int] NULL,--审核状态
	[F_AuditBy] [varchar](50) NULL,--审核人
	[F_AuditOn] [datetime] NULL,--审核时间
	[F_AuditCont] [ntext] NULL,--审核内容
		
	[F_IsOver] [int] NULL,--是否超时
	[F_DealBy] [varchar](50) NULL,--处理人
	[F_DealTime] [datetime] NULL,--处理时间
	[F_DealContent] [ntext] NULL,--处理内容
	[F_DealResult][nvarchar](200) NULL,--处理结果:已处理，未处理
	[F_DealReasons][nvarchar](max) NULL,--未处理原因：资金、技术、人员、其他（若选其他，则手输）
	
	[F_IsVisit] [int] NULL,--是否建议回访（是，否）此项若选是，则流转到客服-待回访工单，若选否，则流转至客服待完结工单
	[F_VisitOn] [datetime] NULL,--回访时间
	[F_VisitBy] [varchar](50) NULL,--回访人
	[F_VisitResult] [varchar](50) NULL,--回访结果：非常满意、满意、一般、不满意
	[F_VisitReason] [ntext] NULL,--回访不满意原因	
	
	[F_CreateBy] [varchar](50) NULL,
	[F_CreateOn] [datetime] NULL,
	[F_UpdateCount] [int] NULL,
	[F_UpdateBy] [varchar](50) NULL,
	[F_UpdateOn] [datetime] NULL,
	[F_IsDelete] [int] NULL,
	[F_DeleteBy] [varchar](50) NULL,
	[F_DeleteOn] [datetime] NULL,
	
 CONSTRAINT [PK__T_Wo_Wor__3214EC276C040022] PRIMARY KEY CLUSTERED 
(
	[F_ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO



SET ANSI_PADDING OFF
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'工单ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_ID'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'工单编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_WorkOrderCode'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'通话记录ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_CallID'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'工单来源:电话、微信业务员、微信客户、官网' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_Source'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'工单类型:咨询及需求、投诉、抽检、其他' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_Type'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'事发地-省' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_IncidentProvince'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'事发地-市' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_IncidentCity'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'事发地-县' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_IncidentCountry'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'事发地-乡' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_IncidentTownship'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'事发地-详细' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_IncidentDetailed'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'销售基地:新乡、新疆、九江、东北、其他' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_SalesBase'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'问题描述' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_Description'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'附件上传ids' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_Files'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'处理方式:当即办理、电话转接、网络转办' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_DealType'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'来电号码' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_CusPhone'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'客户姓名' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_CusName'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'公司名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_CompanyName'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'客户id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_CustomerID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'物料id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_MaterialID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'问题类别' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_QuestionType'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'生产批次号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_BatchNumber'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'投诉-配方' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_TS_Formula'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'投诉-产品种类：化肥、化工、其他' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_TS_Category'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'投诉-问题数量（吨）' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_TS_Quantity'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'投诉-重要级别：轻微、一般、较大、重大' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_TS_Level'
GO	
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'咨询-产品名称：三聚氰胺、甲醇、液氨、二甲醚、糠醇、其他' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_ZX_ProName'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'咨询-问题数量' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_ZX_Quantity'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'咨询-大区' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_ZX_Area'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'咨询-分公司' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_ZX_Branch'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'抽检-抽检时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_CJ_Time'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'抽检-抽检级别：乡镇级、县级、市级、省级及以上、个人送检' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_CJ_Level'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'抽检-抽检单位：市场监督、农业部、土肥站、工商、联合执法、其他' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_CJ_Unit'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'抽检-化验单位' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_CJ_TestUnit'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'抽检-抽检吨数' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_CJ_Tonnage'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'抽检-抽检袋数' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_CJ_BagNo'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'抽检-公关费用金额：单位元' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_CJ_Outlay'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'工单状态' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_State'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'市场管理科-生产基地（新乡、新疆、九江、东北、贴牌、无法确定）' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_SC_ProductBase'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'市场管理科-初审意见:退货、换货、补偿、自行处理' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_SC_PreliminaryOpinion'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'市场管理科-超出质保期限（算法：工单创建日期-生产日期，生产日期根据生产批次号获取，单位：月）' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_SC_QualityMonth'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'市场管理科-抽检-抽检结果（视同合格、合格、不合格、复检后合格、未送检）' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_SC_CJ_SpotResult'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'市场管理科-抽检-自检结果' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_SC_CJ_SelfResult'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'市场管理科-抽检-对应审批工作流单号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_SC_CJ_ApprovalNo'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'市场管理科-抽检-确认返账金额（元）' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_SC_CJ_ReturnAccount'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'质量管理科-质量事件等级（未遂、一般、较大、重大）' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_ZL_QualityEventLevel'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'质量管理科-索赔金额（单位元，对应责任单位）' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_ZL_ClaimAmount'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'质量管理科-责任单位（需列出，可选多个）' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_ZL_ResponsibleUnit'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'质量管理科-审批意见（同意、不同意，若选择不同意，增加输入框输入补充内容）' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_ZL_ApprovalOpinions'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'质量管理科-审批不同意意见' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_ZL_ApprovalDisagree'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'质量管理科-补偿方式（实物、钱款【单位元】，若选择钱款，增加输入框输入补充内容）' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_ZL_CompensationMethod'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'质量管理科-补偿钱款' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_ZL_CompensationMoney'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'质量管理科-对应责任单位（生产、研发、农化、物流、质量管理科，销售内勤）' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_ZL_CResponsibleUnits'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'质量管理科-确认实收数量（吨）' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_ZL_Fquantity'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'质量管理科-改进要求' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_ZL_ImprovementRequirements'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'质量管理科-对应审批工作流单号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_ZL_CApprovalNo'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'质量管理科-抽检-未备案、已备案' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_ZL_CJ_IsRecord'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否审核' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_IsAudit'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'审核状态' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_AuditState'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'审核人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_AuditBy'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'审核时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_AuditOn'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'审核内容' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_AuditCont'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否超时' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_IsOver'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'处理人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_DealBy'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'处理时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_DealTime'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'处理内容' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_DealContent'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'处理结果:已处理，未处理' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_DealResult'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'未处理原因：资金、技术、人员、其他（若选其他，则手输）' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_DealReasons'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否建议回访（是，否）此项若选是，则流转到客服-待回访工单，若选否，则流转至客服待完结工单' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_IsVisit'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'回访时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_VisitOn'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'回访人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_VisitBy'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'回访结果：非常满意、满意、一般、不满意' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_VisitResult'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'回访不满意原因' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_VisitReason'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'添加人工号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_CreateBy'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'添加时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_CreateOn'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'修改次数' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_UpdateCount'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'修改人工号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_UpdateBy'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'修改时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_UpdateOn'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否删除:0否，1是' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_IsDelete'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'删除人工号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_DeleteBy'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'删除时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder', @level2type=N'COLUMN',@level2name=N'F_DeleteOn'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'工单管理表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'T_Wo_WorkOrder'
GO