📄 function0.asp
字号:
<!--#include file ="DoComMsg.asp"-->
<!--#include file ="DoExecute.asp"-->
<!--#include file ="CheckNode.asp"-->
<!--#include file ="StimulateNode.asp"-->
<!--#include file ="IsNodeEnd.asp"-->
<!--#include file ="SendMessage.asp"-->
<!--#include file ="CreateDefineFlow.asp"-->
<!--#include file ="GetFlowString.asp"-->
<%
Dim conn
Set conn=Server.CreateObject("ADODB.Connection")
OpenDBH( conn )
'拷贝FlowID指定的工作留信息到T_CRM_Stock_Application_Record及T_CRM_Stock_Application_Record_Des
Sub CopyFlow(ObjDB,ComMsgID,FlowID)
Dim ObjRS,IntComMsgID,IntFlowID
Dim StrSQL,ObjRS1,ObjRS2
Dim ExecuteIDs,i
Dim ArrID,IntCreatorID
Dim IntNodeID
Const FirstNodeName = "起始点"
const NodeType4WorkFlow = 3
if session("AccountID")="" then
%>
<script language=javascript>
alert("因登录时间过长,会话失效,请退出重新登陆!")
</script>
<%
Response.End
end if
IntNodeID = 0
IntComMsgID = ComMsgID
IntFlowID = FlowID
StrSQL = "Select AppAccountID from t_Hrms_JobApplications_DepRequirement where ID =" & IntComMsgID
Set ObjRS = conn.execute (StrSQL)
IntCreatorID = ObjRS("AppAccountID")
StrSQL = "Select * from t_OA_Work_Flow_Node where FlowID = " & IntFlowID
Set ObjRS = Server.CreateObject ("ADODB.RecordSet")
ObjRS.Open StrSQL,ObjDB,1,3
StrSQL = "Select * from t_OA_Work_ComMessage_Record where ComMsgID = 1"
Set ObjRS1 = Server.CreateObject ("ADODB.RecordSet")
ObjRS1.Open StrSQL,ObjDB,1,2
Set ObjRS2 = Server.CreateObject ("ADODB.RecordSet")
StrSQL = "Select * from t_OA_Work_ComMessage_Record_Des where ID = 1"
ObjRS2.Open StrSQL,ObjDB,1,2
ObjRS1.AddNew
ObjRS1("NodeName") = FirstNodeName
ObjRS1("ComMsgID") = IntComMsgID
ObjRS1("ExecuteID") = IntCreatorID
ObjRS1("PassType") = 0
ObjRS1.Update
IntNodeID = ObjRS1("ID")
ObjRS2.AddNew
ObjRS2("NodeID") = IntNodeID
ObjRS2("ExecuteID") = IntCreatorID
ObjRS2("IsCreator") = 1
ObjRS2.Update
IntNodeID = ObjRS1("ID")
DO While not ObjRS.EOF
ObjRS1.AddNew
ObjRS1("NodeName") = ObjRS("NodeName")
ObjRS1("ComMsgID") = IntComMsgID
ObjRS1("IsNeed") = ObjRS("IsNeed")
ObjRS1("ExecuteID") = ObjRS("ExecuteID")
ObjRS1("ParentID") = IntNodeID
ObjRS1("PassType") = ObjRS("PassType")
ObjRS1("IsEnd") = ObjRS("IsEnd")
ObjRS1("IsAllPass") = ObjRS("IsAllPass")
ObjRS1.Update
ExecuteIDs = ObjRS("ExecuteID")
IntNodeID = ObjRS1("ID")
ArrID = Split(ExecuteIDs,",")
For i = LBound(ArrID) To UBound(ArrID)
ObjRS2.AddNew
ObjRS2("NodeID") = IntNodeID
ObjRS2("ExecuteID") = ArrID(i)
ObjRS2("IsCreator") = 0
ObjRS2.Update
Next
ObjRS.MoveNext
Loop
ObjRS.Close
Set ObjRS = Nothing
ObjRS1.Close
Set ObjRS1 = Nothing
ObjRS2.Close
Set ObjRS2 = Nothing
End Sub
Sub NewSingleFlow(ObjDB,ComMsgID,ToIDs)
Dim ObjRS,IntComMsgID,IntToIDs
Dim StrSQL,IntNodeID,ObjRS1
DIm ArrIDs,i,IntCreatorID
Const FirstNodeName = "起始点"
i = 0
IntComMsgID = ComMsgID
IntToIDs = ToIDs
StrSQL = "Select AccountID from t_Hrms_JobApplications_DepRequirement where ID =" & IntComMsgID
Set ObjRS = conn.execute (StrSQL)
IntCreatorID = ObjRS("AccountID")
ObjRS.close
Set ObjRS = Server.CreateObject("ADODB.RecordSet")
StrSQL = "Select * from t_OA_Work_ComMessage_Record"
ObjRS.Open StrSQL,ObjDB,1,3
Set ObjRS1 = Server.CreateObject("ADODB.RecordSet")
StrSQL = "Select * from t_OA_Work_ComMessage_Record_Des"
ObjRS1.Open StrSQL,ObjDB,1,3
ObjRS.Addnew
ObjRS("NodeName") = FirstNodeName
ObjRS("ComMsgID") = IntComMsgID
ObjRS("ExecuteID") = Session("AccountID")
ObjRS("PassType") = 0
ObjRS.Update
IntNodeID = ObjRS("ID")
ObjRS1.Addnew
ObjRS1("NodeID") = IntNodeID
ObjRS1("IsCreator") = 1
ObjRS1("ExecuteID") = IntCreatorID
ObjRS1.Update
ObjRS.Addnew
ObjRS("NodeName") = "普通公文"
ObjRS("ComMsgID") = IntComMsgID
ObjRS("ParentID") = IntNodeID
ObjRS("PassType") = 0
ObjRS("IsEnd") = 1
ObjRS("ExecuteID") = IntToIDs
ObjRS.Update
IntNodeID = ObjRS("ID")
ArrIDs = Split(IntToIDs,",")
For i = LBound(ArrIDs) to UBound(ArrIDs)
ObjRS1.Addnew
ObjRS1("NodeID") = IntNodeID
ObjRS1("ExecuteID") = ArrIDs(i)
ObjRS1.Update
Next
ObjRS.Close
Set ObjRS = Nothing
ObjRS1.Close
Set ObjRS1 = Nothing
End Sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -