亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? 短信跟蹤系統服務程序建庫腳本.sql

?? 太陽神短信跟蹤服務系統
?? SQL
?? 第 1 頁 / 共 2 頁
字號:

	--取即將獲16個骨干權數的人手機號
	insert into TMsg_SendList(
	SendtoMobile,
	MobileType,
	SendTime,
	SendContent,
	SendSeason,
	FromOperator
	)
	select distinct
	Mobile,
	1,
	STUFF(getDate()+1,12,7,'10:00AM'),
	BusinessName +(case when sex='男' then '先生' when sex='女' then '女士' end) +
	(select msgContent from TMsg_msgContent where msgType='沖剌前提醒4'),
	'沖剌前提醒4',
	'system'
	from dbo.TB_BusinessInfo where TotalScore>=(@16TotalScore*@RemindPercent) and TotalScore<@16TotalScore and Mobile not in(select Sendtomobile from TMsg_SendList where SendSeason='沖剌前提醒4') and (mobile like '13%' or mobile like '013%') and (LEN(mobile)=11 or LEN(mobile)=12) 

end

--瓶頸期
if((SUBSTRING(@SendRang,3,1)='1'))
begin
	--提取半年無業績的人手機號
	insert into TMsg_SendList(
	SendtoMobile,
	MobileType,
	SendTime,
	SendContent,
	SendSeason,
	FromOperator
	)
	select distinct
	Mobile,
	1,
	STUFF(getDate()+1,12,7,'10:00AM'),
	BusinessName + (case when sex='男' then '先生' when sex='女' then '女士' end) +
	(select msgContent from TMsg_msgContent where msgType='半年無業績'),
	'半年無業績',
	'system' 
	from TB_BusinessInfo  where BusinessCode in 
	(select BusinessCode from dbo.TB_BusinessInfo_His where calcuid<=@CurrentWeek and calcuid>@CurrentWeek-26 and isAuditpass=1 and applydate<(select BeginDate from TB_CalcuID where WeekCode=@CurrentWeek-15) group by BusinessCode having sum(isnull(FactTruePayMoney,0))=0) and (Mobile like '13%' or Mobile like '013%') and (LEN(Mobile)=11 or LEN(Mobile)=12) and Mobile not in(select Sendtomobile from TMsg_SendList where SendSeason='半年無業績')

	--提取3月無業績的人手機號
	insert into TMsg_SendList(
	SendtoMobile,
	MobileType,
	SendTime,
	SendContent,
	SendSeason,
	FromOperator
	)
	select distinct
	Mobile,
	1,
	STUFF(getDate()+1,12,7,'10:00AM'),
	BusinessName = (case when sex='男' then '先生' when sex='女' then '女士' end) + 
	(select msgContent from TMsg_msgContent where msgType='3月無業績'),
	'3月無業績',
	'system' 
	from TB_BusinessInfo  where BusinessCode in 
	(select BusinessCode from dbo.TB_BusinessInfo_His where calcuid<=@CurrentWeek and calcuid>(@CurrentWeek-12) and isAuditpass=1 and applydate<(select BeginDate from TB_CalcuID where WeekCode=@CurrentWeek-11) group by BusinessCode having sum(isnull(FactTruePayMoney,0))=0) and (Mobile like '13%' or Mobile like '013%') and (LEN(Mobile)=11 or LEN(Mobile)=12) and Mobile not in(select Sendtomobile from TMsg_SendList where SendSeason='半年無業績' or SendSeason='3月無業績') 

	--提取1月無業績的人手機號
	insert into TMsg_SendList(
	SendtoMobile,
	MobileType,
	SendTime,
	SendContent,
	SendSeason,
	FromOperator
	)
	select distinct
	Mobile,
	1,
	STUFF(getDate()+1,12,7,'10:00AM'),
	BusinessName + (case when sex='男' then '先生' when sex='女' then '女士' end) +
	(select msgContent from TMsg_msgContent where msgType='1月無業績'),
	'1月無業績',
	'system' 
	from TB_BusinessInfo  where BusinessCode in 
	(select BusinessCode from dbo.TB_BusinessInfo_His where calcuid<=@CurrentWeek and calcuid>(@CurrentWeek-4) and isAuditpass=1 and applydate<(select BeginDate from TB_CalcuID where WeekCode=@CurrentWeek-3) group by BusinessCode having sum(isnull(FactTruePayMoney,0))=0) and (Mobile like '13%' or Mobile like '013%') and (LEN(Mobile)=11 or LEN(Mobile)=12) and Mobile not in(select Sendtomobile from TMsg_SendList where SendSeason='半年無業績' or SendSeason='3月無業績' or SendSeason='1月無業績') 
end


--物流短信
--if (SUBSTRING(@SendRang,4,1)='1')
--begin
--end

--提取獲骨干權數
if (SUBSTRING(@SendRang,5,1)='1')
begin
	--提取獲1個骨干權數的人手機號
	insert into TMsg_SendList(
	SendtoMobile,
	MobileType,
	SendTime,
	SendContent,
	SendSeason,
	FromOperator
	)
	select distinct
	Mobile,
	1,
	STUFF(getDate()+1,12,7,'10:00AM'),
	BusinessName +(case when sex='男' then '先生' when sex='女' then '女士' end) +
	(select msgContent from TMsg_msgContent where msgType='獲1個骨干權數'),
	'獲1個骨干權數',
	'system'
	from dbo.TB_BusinessInfo where TotalScore>=@1TotalScore and TotalScore<@4TotalScore and Mobile not in(select Sendtomobile from TMsg_SendList where SendSeason='獲1個骨干權數') and (mobile like '13%' or mobile like '013%') and (LEN(mobile)=11 or LEN(mobile)=12) 

	--提取獲4個骨干權數人的手機號
	insert into TMsg_SendList(
	SendtoMobile,
	MobileType,
	SendTime,
	SendContent,
	SendSeason,
	FromOperator
	)
	select
	Mobile,
	1,
	STUFF(getDate()+1,12,7,'10:00AM'),
	BusinessName + (case when sex='男' then '先生' when sex='女' then '女士' end) +
	(select msgContent from TMsg_msgContent where msgType='獲4個骨干權數'),
	'獲4個骨干權數',
	'system'
	from dbo.TB_BusinessInfo where TotalScore>=@4TotalScore and TotalScore<@9TotalScore and Mobile not in(select Sendtomobile from TMsg_SendList where SendSeason='獲4個骨干權數') and (mobile like '13%' or mobile like '013%') and (LEN(mobile)=11 or LEN(mobile)=12) 

	--提取獲9個骨干權數的人手機號
	insert into TMsg_SendList(
	SendtoMobile,
	MobileType,
	SendTime,
	SendContent,
	SendSeason,
	FromOperator
	)
	select distinct
	Mobile,
	1,
	STUFF(getDate()+1,12,7,'10:00AM'),
	BusinessName + (case when sex='男' then '先生' when sex='女' then '女士' end) +
	(select msgContent from TMsg_msgContent where msgType='獲9個骨干權數'),
	'獲9個骨干權數',
	'system'
	from dbo.TB_BusinessInfo where TotalScore>=@9TotalScore and TotalScore<@16TotalScore and Mobile not in(select Sendtomobile from TMsg_SendList where SendSeason='獲9個骨干權數') and (mobile like '13%' or mobile like '013%') and (LEN(mobile)=11 or LEN(mobile)=12) 

	--提取獲16個骨干權數的人手機號
	insert into TMsg_SendList(
	SendtoMobile,
	MobileType,
	SendTime,
	SendContent,
	SendSeason,
	FromOperator
	)
	select distinct
	Mobile,
	1,
	STUFF(getDate()+1,12,7,'10:00AM'),
	BusinessName + (case when sex='男' then '先生' when sex='女' then '女士' end) +
	(select msgContent from TMsg_msgContent where msgType='獲16個骨干權數'),
	'獲16個骨干權數',
	'system'
	from dbo.TB_BusinessInfo where TotalScore>=@16TotalScore and Mobile not in(select Sendtomobile from TMsg_SendList where SendSeason='獲16個骨干權數') and (mobile like '13%' or mobile like '013%') and (LEN(mobile)=11 or LEN(mobile)=12) 
end

--生日祝福
if (SUBSTRING(@SendRang,6,1)='1')
begin
	insert into TMsg_SendList(
	SendtoMobile,
	MobileType,
	SendTime,
	SendContent,
	SendSeason,
	FromOperator
	)
	select distinct
	Mobile,
	1,
	STUFF(getDate()+1,12,7,'10:00AM'),
	BusinessName + (case when sex='男' then '先生' when sex='女' then '女士' end) +
	(select msgContent from TMsg_msgContent where msgType='生日祝福'),
	'生日祝福',
	'system'
	 from TB_BusinessInfo where
	(case when len(Idcode)=15 then substring(Idcode,9,4) when len(idcode)=18 then substring(Idcode,11,4) end)=
	(case when len(LTRIM(STR(MONTH(getdate()+1))))=1 then '0'+ LTRIM(STR(MONTH(getdate()+1))) when len(LTRIM(STR(MONTH(getdate()+1))))=2 then LTRIM(STR(MONTH(getdate()+1))) end) + (case when len(LTRIM(STR(DAY(getdate()+1))))=1 then '0'+ LTRIM(STR(DAY(getdate()+1))) when len(LTRIM(STR(DAY(getdate()+1))))=2 then LTRIM(STR(DAY(getdate()+1))) end)
	and (Mobile like '13%' or Mobile like '013%') and (LEN(Mobile)=11 or LEN(Mobile)=12)
	and Mobile not in (select SendtoMobile from TMsg_SendList where SendSeason='生日祝福')
end

--節日日祝福
--if (SUBSTRING(@SendRang,7,1)='1')
--begin
--end

--考核提醒
--if (SUBSTRING(@SendRang,8,1)='1')
--begin
--end

GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲欧美国产高清| 亚洲一区二区精品视频| 中文字幕制服丝袜成人av| 亚洲成av人片| 99热这里都是精品| 久久综合一区二区| 香港成人在线视频| aa级大片欧美| 久久久久久一级片| 日本午夜一区二区| 91视频xxxx| 亚洲欧洲日韩av| 国产乱码字幕精品高清av| 91精品国产综合久久久久久| 自拍偷在线精品自拍偷无码专区| 日韩电影一二三区| 亚洲欧美日韩国产一区二区三区| 成人精品视频一区二区三区| 777亚洲妇女| 一区二区三区中文字幕| 成人午夜视频在线观看| 久久久久久9999| 蜜桃91丨九色丨蝌蚪91桃色| 欧美三级视频在线播放| 亚洲精品国久久99热| 99久久免费视频.com| 国产精品色在线观看| 高清shemale亚洲人妖| 久久久久一区二区三区四区| 精品一区二区三区影院在线午夜| 91精品国产入口| 日日噜噜夜夜狠狠视频欧美人| 色狠狠色狠狠综合| 亚洲午夜精品网| 91久久一区二区| 老司机午夜精品| 日韩美女视频一区二区在线观看| 三级欧美在线一区| 日韩三级av在线播放| 免费观看成人av| 日韩一区二区三区在线| 久久精品国产99久久6| 久久免费看少妇高潮| 国产成人8x视频一区二区| 中文字幕av一区二区三区高 | 麻豆久久久久久| 欧美一区二区三区人| 秋霞电影网一区二区| 精品99999| 成人一道本在线| 亚洲理论在线观看| 欧美丰满美乳xxx高潮www| 日本aⅴ亚洲精品中文乱码| 欧美一二三四区在线| 国产呦精品一区二区三区网站| 久久久青草青青国产亚洲免观| 国产91综合网| 一二三区精品福利视频| 欧美一区二区女人| 国产精品系列在线播放| 一区二区不卡在线播放| 91精品国产高清一区二区三区| 国产一区二区福利视频| 亚洲三级电影全部在线观看高清| 欧美日本一道本| 国产盗摄视频一区二区三区| 一区二区成人在线视频| 日韩欧美在线一区二区三区| 成人免费毛片高清视频| 午夜国产不卡在线观看视频| 久久久精品国产99久久精品芒果 | 欧美亚洲国产一区二区三区| 爽好久久久欧美精品| 久久综合九色综合97_久久久| 91丨九色丨尤物| 蜜桃一区二区三区在线观看| 亚洲同性gay激情无套| 欧美一级生活片| 97久久久精品综合88久久| 久色婷婷小香蕉久久| 亚洲综合偷拍欧美一区色| 久久综合久久综合久久综合| 日本高清不卡视频| 国产成人综合网站| 日韩精品乱码免费| 亚洲女厕所小便bbb| 久久亚洲春色中文字幕久久久| 欧美性生活影院| 国产.欧美.日韩| 久久电影网电视剧免费观看| 亚洲夂夂婷婷色拍ww47 | 欧美电影免费观看高清完整版在线| 粉嫩绯色av一区二区在线观看| 日韩国产成人精品| 亚洲激情一二三区| 日韩精品一二区| 亚洲免费毛片网站| 国产精品国产三级国产有无不卡 | 国产日产欧美一区二区三区| 欧美日韩国产小视频| 91片在线免费观看| 波多野结衣在线aⅴ中文字幕不卡| 激情久久五月天| 久久电影网电视剧免费观看| 丝袜美腿亚洲色图| 婷婷一区二区三区| 亚洲成人动漫精品| 亚洲午夜在线视频| 亚洲国产欧美在线人成| 亚洲精品日韩一| 亚洲免费av网站| 亚洲精品中文字幕在线观看| 国产精品福利影院| 亚洲色图一区二区三区| 国产精品久久毛片a| 国产欧美日本一区视频| 精品国产乱码久久久久久闺蜜| 91精品国产欧美一区二区18| 91精品午夜视频| 欧美成人性福生活免费看| 日韩精品一区二| 久久亚洲春色中文字幕久久久| 国产亚洲美州欧州综合国| 国产亚洲一区字幕| 中文字幕在线不卡一区二区三区| 国产精品午夜免费| 亚洲男人天堂av网| 亚洲bt欧美bt精品777| 日韩精彩视频在线观看| 裸体一区二区三区| 国产黄色91视频| 97久久久精品综合88久久| 在线亚洲高清视频| 3d动漫精品啪啪一区二区竹菊| 日韩欧美另类在线| 国产三级一区二区| 亚洲欧美激情小说另类| 日韩福利电影在线| 国产乱码精品一区二区三区五月婷| 国产精品12区| 色94色欧美sute亚洲线路二| 欧美日韩三级在线| 欧美成人三级电影在线| 国产精品三级电影| 亚洲bt欧美bt精品| 久久成人综合网| 不卡一卡二卡三乱码免费网站| 国产日本一区二区| 精品对白一区国产伦| 中文字幕av一区 二区| 亚洲伦理在线精品| 久草这里只有精品视频| 99久久免费视频.com| 欧美日韩你懂的| 国产日韩三级在线| 亚洲bt欧美bt精品| 国产高清成人在线| 欧美天天综合网| www成人在线观看| 亚洲制服丝袜av| 国产老妇另类xxxxx| 色综合久久天天综合网| 精品sm在线观看| 亚洲午夜一区二区三区| 国产精品99久久久久久宅男| 欧美三级一区二区| 欧美国产一区二区在线观看| 爽好久久久欧美精品| 99re这里只有精品视频首页| 欧美电影免费观看高清完整版在| 成人欧美一区二区三区黑人麻豆 | 久久久久久久久免费| 亚洲宅男天堂在线观看无病毒| 黄色日韩三级电影| 欧美日韩卡一卡二| 中文字幕亚洲欧美在线不卡| 久久成人精品无人区| 欧美午夜免费电影| 成人免费在线播放视频| 国产精品白丝jk黑袜喷水| 日韩三级精品电影久久久| 亚洲尤物在线视频观看| 99久久免费国产| 欧美韩国日本综合| 国产精品自在在线| 日韩欧美视频一区| 日本一不卡视频| 欧美猛男超大videosgay| 一区二区三区高清在线| 99国产精品国产精品毛片| 国产精品网站在线播放| 久久99国产乱子伦精品免费| 欧美一区二区在线播放| 亚洲v日本v欧美v久久精品| 欧美影视一区二区三区| 亚洲精品成人精品456| 一本色道久久综合亚洲aⅴ蜜桃| 国产精品女主播av| av爱爱亚洲一区| 亚洲三级在线免费观看|