排班所需表结构--排班(二)

主表:tbCustomerScheduled,排班内容

CREATE TABLE [dbo].[tbCustomerScheduled](

[id] [int] IDENTITY(1,1) NOT NULL,
[customer] [varchar](20) NULL,
[worktype] [int] NULL,
[workday] [date] NULL,
[memo] [varchar](500) NULL,
[yearmonth] [int] NULL,
[handinsert] [int] NULL,
[adddate] [datetime] NULL,
CONSTRAINT [PK_tbCustomerScheduled] PRIMARY KEY CLUSTERED
(
[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]

 

配置表:tbCustomerScheduledDutyDay,每天上班人数配置表,0表示不限制

CREATE TABLE [dbo].[tbCustomerScheduledDutyDay](

[id] [int] IDENTITY(1,1) NOT NULL,
[morningcount] [int] NULL,
[morningWwcount] [int] NULL,
[nooncount] [int] NULL,
[noonWwcount] [int] NULL,
[nightcount] [int] NULL,
[isredcount] [int] NULL,
[workdate] [date] NULL,
[yearmonth] [int] NULL,
[adddate] [datetime] NULL,
CONSTRAINT [PK_tbCustomerScheduledDutyDay] PRIMARY KEY CLUSTERED
(
[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]

 

排班所需客服表:tbCustomerScheduledWorkDay,设置每个客服该上的班次的数量(只有晚班)

CREATE TABLE [dbo].[tbCustomerScheduledWorkDay](

[id] [int] IDENTITY(1,1) NOT NULL,
[customer] [varchar](20) NULL,
[workday] [int] NULL,
[leaveday] [int] NULL,
[nightday] [int] NULL,
[isred] [int] NULL,
[yearmonth] [int] NULL,
[adddate] [datetime] NULL,
[nightdaytemp] [int] NULL,
[leavedaytemp] [int] NULL,
[isredtemp] [int] NULL,
[customertype] [int] NULL,
CONSTRAINT [PK_tbCustomerScheduledWorkDay] PRIMARY KEY CLUSTERED
(
[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]

排班时间配置表:tbCustomerScheduledRecord,设置排班的阶段,每个时间

CREATE TABLE [dbo].[tbCustomerScheduledRecord](
[id] [int] IDENTITY(1,1) NOT NULL,
[name] [varchar](20) NULL,
[des] [varchar](200) NULL,
[fromdate] [date] NULL,
[enddate] [date] NULL,
[state] [int] NULL,
[adddate] [datetime] NULL,
CONSTRAINT [PK_tbCustomerScheduledRecord] PRIMARY KEY CLUSTERED
(
[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]

 

 


支持原创:如有问题或者不同见解请联系 cheerfulhuang@yeah.net

posted @ 2017-01-10 15:46  Merger  阅读(760)  评论(0编辑  收藏  举报