⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 summary.inc

📁 物业管理和办公自动化系统
💻 INC
字号:
<%

'-----------------------------------------------------------------------
' 常用页面日程、工作日志、任务、会议链接
'-----------------------------------------------------------------------
Function FastLink()
	FastLink = _
		"<img border=0 height=5><br>" & vbLF & _
		"<img src=""../images/bg/ar-y.gif"" width=""10"" height=""10""> <b style=""vertical-align:middle"">日程和报告</b><br>" & vbLF & _
		"<img border=0 height=5><br>" & vbLF & _
		"<img src=""../images/bg/ar-g.gif"" width=""8"" height=""8""> <a href=""../task/tasktodo.asp"">今日日程安排</a><br>" & vbLF & _
		"<img src=""../images/bg/ar-g.gif"" width=""8"" height=""8""> <a href=""../workmgr/diarydetail.asp"">填写工作日志</a><br>" & vbLF & _
		"<img src=""../images/bg/ar-g.gif"" width=""8"" height=""8""> <a href=""../task/task_a.asp"">安排任务</a><br>" & vbLF & _
		"<img src=""../images/bg/ar-g.gif"" width=""8"" height=""8""> <a href=""../meeting/applymeeting.asp"">填写会议申请</a>" & vbLF
End Function


'-----------------------------------------------------------------------
' 新邮件、新消息、今日会议、今日审批事项、今日待办事宜统计
'-----------------------------------------------------------------------
Function StatisticLink()
	dim iEmpSerial	: iEmpSerial = GetEmpSerial
	dim sql1, sql2, sql3, sql4
	dim oCn, cn

	dim iMsgs, iMeetings, iSigns, iTasks
	dim sMsg, sMeeting, sSign, sTask

	set oCn = New CDBConnection
	oCn.Connect(dbLocal)
	set cn = oCn.m_DBConn

	'' 我的新消息
	sql1 = "select count(*) from t_msg where emp_serial = " & iEmpSerial & " and status in (" & MSG_UNINFORMED & "," & MSG_INFORMED & ")"
	iMsgs = cn.execute(sql1).Fields(0).Value
	if iMsgs = 0 then sMsg = "您没有新消息" else sMsg = "您有<font color=""red""><b>" & iMsgs & "</b></font>条新消息"


	'' 我今天要参加的会议
	'' attendee清除任何位置的空格,然后在首尾各加一个逗号分隔符","(因为attendee是以逗号分隔个参会人员的),最后与操作员自己的序列号进行匹配
	'sql2 = "select count(*) from t_meetingprepare where start_time >= " & ToSQL(date,"Text")
	'' meeting_status=3为等候召开的会议
	sql2 = "	select count(*) from t_meetingprepare" & _
			" where start_time >= " & ToSQL(date,"Text") & _
			" and stop_time <= " & ToSQL(DateAdd("d", 1, date), "Text") & _
			" and meeting_status = 3" & _
			" and PATINDEX('%," & iEmpSerial & ",%', ',' + replace(attendee,' ','') + ',') > 0"
	''response.write sql2 & "<br>"
	iMeetings = cn.Execute(sql2).fields(0).value
	if iMeetings = 0 then sMeeting = "您今天没有会议或会议已结束" else sMeeting = "您今天还要参加<font color=""red""><b>" & iMeetings & "</b></font>个会议"

	'' 我今天的审批事项
	dim time1, time2
	sql3 = "select count(*)" & _
				" from t_flow_step t1" & _
				" join t_cur_step t2 on t2.cur_step = t1.step_no and t2.flow_id = t1.flow_id" & _
				" join t_flow t3 on t3.flow_stat = 1 and t3.flow_id = t1.flow_id" & _
				" where step_op_person = " & iEmpSerial
	iSigns = cn.Execute(sql3).fields(0).value
	if iSigns = 0 then sSign = "您今天没有审批事项" else sSign = "您今天有<font color=""red""><b>" & iSigns & "</b></font>项审批事项"
	
	'' 今日待办事项,除了真正是今天的任务,还要包括所有过期未完成任务
	time1 = date
	time2 = DateAdd("n", -1, DateAdd("d", 1, date))
	'sql4 = "select count(*) from t_personaltask where emp_serial = " & iEmpSerial & " and isnull(progress_percent,0) < 100 and task_serial in (select task_serial from t_task where dofrom >= " & ToSQL(date,"Text") & " and doend <= " & ToSQL(DateAdd("d", 1, date),"Text") & ")"

	sql4 = "select count(*) from t_personaltask where emp_serial = " & iEmpSerial & " and isnull(progress_percent,0) < 100 and task_serial in (select task_serial from t_task where (" & _
						"(dofrom<=" & ToSQL(time1,"Text") & " and doend>=" & ToSQL(time1,"Text") & ")" & _
						" or (dofrom<=" & ToSQL(time2,"Text") & " and doend>" & ToSQL(time2,"Text") & ")" & _
						" or (dofrom>=" & ToSQL(time1,"Text") & " and doend<=" & ToSQL(time2,"Text") & ")" & _
						" or ((progress_percent < 100 or progress_percent is null) and doend <= " & ToSQL(now, "Text") & ")" & _
					"))"

	'response.write sql4 & "<br>" : response.end
	iTasks = cn.Execute(sql4).fields(0).value
	if iTasks = 0 then sTask = "您今天没有待办事宜" else sTask = "您今天有<font color=""red""><b>" & iTasks & "</b></font>项待办事项"
	
	StatisticLink = _
		"<img border=0 height=5><br>" & vbLF & _
		"<img src=""../images/bg/ar-y.gif"" width=10 height=10> <b>今日更新</b><br>" & vbLF & _ 
		"<img border=0 height=5><br>" & vbLF & _
		"<img src=""../images/bg/ar-g.gif"" width=8 height=8> <a href=""../message/msg.asp"">" & sMsg & "</a><br>" & vbLF & _
		"<img src=""../images/bg/ar-g.gif"" width=8 height=8> <a href=""../meeting/list_historymeeting.asp"">" & sMeeting & "</a><br>" & vbLF & _
		"<img src=""../images/bg/ar-g.gif"" width=8 height=8> <a href=""../flowmgr/sign.asp"">" & sSign & "</a><br>" & vbLF & _
		"<img src=""../images/bg/ar-g.gif"" width=8 height=8> <a href=""../task/tasktodo.asp?day1=" & date & "&day2=" & date & "&"">" & sTask & "</a>" & vbLF
End Function

Function Summary()
	Summary = _
	"<table width=340 border=0 cellspacing=0 cellpadding=0 style=""table-layout:fixed"">" & vbLF & _
	"<tr><td width=130></td><td width=""*""></td></tr>" & vbLF & _
	"<tr height=5><td colspan=2 background=""../images/bg/bttmtx.gif""></td></tr>" & vbLF & _
	"<tr valign=""top"">" & vbLF & _
			"<td style=""letter-spacing:0.2mm;"">" & FastLink & "</td>" & vbLF & _
			"<td style=""letter-spacing:0.2mm;"">" & StatisticLink & "</td>" & vbLF & _
	"</tr>" & vbLF & _
	"<tr valign=""middle"" height=10>" & vbLF & _
			"<td colspan=2><img src=""../images/bg/line.gif"" width=300 height=3></td>" & vbLF & _
	"</tr>" & vbLF & _
	"</table>" & vbLF
End Function
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -