@ -6,6 +6,7 @@ using BP.Port;
using BP.DA ;
using BP.DA ;
using BP.WF.Template ;
using BP.WF.Template ;
using System.Data ;
using System.Data ;
using static iTextSharp . text . pdf . AcroFields ;
namespace BP.WF
namespace BP.WF
{
{
@ -108,22 +109,25 @@ namespace BP.WF
item . ItIsRead = false ;
item . ItIsRead = false ;
item . SDT = sdt ;
item . SDT = sdt ;
item . Insert ( ) ; //执行插入.
item . Insert ( ) ; //执行插入.
//移交后写入最新待办,被移交人@BKGY
sql = "" ;
sql = "INSERT INTO WEB_SOCKET (ID,USER_NO,EmpWorksNums,Flag,WorkID) " ;
sql + = "VALUES(S_WEB_SOCKET.NEXTVAL,'" + item . EmpNo + "','" + BP . WF . Dev2Interface . EmpWorksNums ( item . EmpNo ) + "','0'," + workID + ")" ;
DBAccess . RunSQL ( sql ) ;
break ;
break ;
}
}
}
}
#endregion 判断是否是,admin的移交.
#endregion 判断是否是,admin的移交.
//移交后写入最新待办,被移交人@BKGY
sql = "" ;
sql = "INSERT INTO WEB_SOCKET (ID,USER_NO,EmpWorksNums,Flag,WorkID) " ;
sql + = "VALUES(S_WEB_SOCKET.NEXTVAL,'" + emp . No + "','" + BP . WF . Dev2Interface . EmpWorksNums ( emp . UserID ) + "','0'," + workID + ")" ;
DBAccess . RunSQL ( sql ) ;
//移交后写入最新待办,移交人@BKGY
//移交后写入最新待办,移交人@BKGY
sql = "" ;
sql = "" ;
sql = "INSERT INTO WEB_SOCKET (ID,USER_NO,EmpWorksNums,Flag,WorkID) " ;
sql = "INSERT INTO WEB_SOCKET (ID,USER_NO,EmpWorksNums,Flag,WorkID) " ;
sql + = "VALUES(S_WEB_SOCKET.NEXTVAL,'" + WebUser . No + "','" + BP . WF . Dev2Interface . Todolist_EmpWorks + "','0'," + workID + ")" ;
sql + = "VALUES(S_WEB_SOCKET.NEXTVAL,'" + WebUser . No + "','" + BP . WF . Dev2Interface . Todolist_EmpWorks + "','0'," + workID + ")" ;
DBAccess . RunSQL ( sql ) ;
DBAccess . RunSQL ( sql ) ;
//记录日志.
//记录日志.
Glo . AddToTrack ( ActionType . Shift , nd . FlowNo , workID , gwf . FID , nd . NodeID , nd . Name ,
Glo . AddToTrack ( ActionType . Shift , nd . FlowNo , workID , gwf . FID , nd . NodeID , nd . Name ,
@ -149,11 +153,22 @@ namespace BP.WF
//非协作模式.
//非协作模式.
gwl = new GenerWorkerList ( ) ;
gwl = new GenerWorkerList ( ) ;
i = gwl . Retrieve ( GenerWorkerListAttr . FK_Node , gwf . NodeID , GenerWorkerListAttr . WorkID , gwf . WorkID ) ;
i = gwl . Retrieve ( GenerWorkerListAttr . FK_Node , gwf . NodeID , GenerWorkerListAttr . WorkID , gwf . WorkID ) ;
string sql2 = "" ;
if ( i = = 1 ) {
if ( i = = 1 ) {
string sql = "UPDATE WF_GenerWorkerlist SET IsRead=0, FK_Emp='" + emp . UserID + "', EmpName='" + emp . Name + "' WHERE FK_Emp='" + gwl . EmpNo + "' AND FK_Node=" + gwf . NodeID + " AND WorkID=" + workID ;
string sql = "UPDATE WF_GenerWorkerlist SET IsRead=0, FK_Emp='" + emp . UserID + "', EmpName='" + emp . Name + "' WHERE FK_Emp='" + gwl . EmpNo + "' AND FK_Node=" + gwf . NodeID + " AND WorkID=" + workID ;
DBAccess . RunSQL ( sql ) ;
DBAccess . RunSQL ( sql ) ;
//移交后写入最新待办,被移交人@BKGY
sql2 = "INSERT INTO WEB_SOCKET (ID,USER_NO,EmpWorksNums,Flag,WorkID) " ;
sql2 + = "VALUES(S_WEB_SOCKET.NEXTVAL,'" + gwl . GetValStrByKey ( "FK_Emp" ) + "','" + BP . WF . Dev2Interface . EmpWorksNums ( gwl . GetValStrByKey ( "FK_Emp" ) ) + "','0'," + workID + ")" ;
DBAccess . RunSQL ( sql2 ) ;
} else {
} else {
gwl . Delete ( GenerWorkerListAttr . WorkID , gwf . WorkID , GenerWorkerListAttr . FK_Node , gwf . NodeID ) ;
gwl . Delete ( GenerWorkerListAttr . WorkID , gwf . WorkID , GenerWorkerListAttr . FK_Node , gwf . NodeID ) ;
//移交后写入最新待办,被移交人@BKGY
sql2 = "INSERT INTO WEB_SOCKET (ID,USER_NO,EmpWorksNums,Flag,WorkID) " ;
sql2 + = "VALUES(S_WEB_SOCKET.NEXTVAL,'" + gwl . GetValStrByKey ( "FK_Emp" ) + "','" + BP . WF . Dev2Interface . EmpWorksNums ( gwl . GetValStrByKey ( "FK_Emp" ) ) + "','0'," + workID + ")" ;
DBAccess . RunSQL ( sql2 ) ;
gwl . EmpNo = emp . UserID ;
gwl . EmpNo = emp . UserID ;
gwl . EmpName = emp . Name ;
gwl . EmpName = emp . Name ;
gwl . ItIsEnable = true ;
gwl . ItIsEnable = true ;
@ -165,6 +180,10 @@ namespace BP.WF
gwf . TodoEmpsNum = 1 ;
gwf . TodoEmpsNum = 1 ;
gwf . TodoEmps = gwf . TodoEmps . Replace ( WebUser . No + "," + WebUser . Name + ";" , "" ) + emp . UserID + "," + emp . Name + ";" ;
gwf . TodoEmps = gwf . TodoEmps . Replace ( WebUser . No + "," + WebUser . Name + ";" , "" ) + emp . UserID + "," + emp . Name + ";" ;
gwf . Update ( ) ;
gwf . Update ( ) ;
//移交后写入最新待办,被移交人@BKGY
sql2 = "INSERT INTO WEB_SOCKET (ID,USER_NO,EmpWorksNums,Flag,WorkID) " ;
sql2 + = "VALUES(S_WEB_SOCKET.NEXTVAL,'" + WebUser . No + "','" + BP . WF . Dev2Interface . EmpWorksNums ( WebUser . No ) + "','0'," + workID + ")" ;
DBAccess . RunSQL ( sql2 ) ;
//记录日志.
//记录日志.
Glo . AddToTrack ( ActionType . Shift , nd . FlowNo , workID , gwf . FID , nd . NodeID , nd . Name ,
Glo . AddToTrack ( ActionType . Shift , nd . FlowNo , workID , gwf . FID , nd . NodeID , nd . Name ,
@ -279,10 +298,10 @@ namespace BP.WF
info + = "@" + ExecEvent . DoNode ( EventListNode . ShitAfter , nd , work , null , atPara1 ) ;
info + = "@" + ExecEvent . DoNode ( EventListNode . ShitAfter , nd , work , null , atPara1 ) ;
//移交后写入最新待办 被移交人@BKGY
//移交后写入最新待办 被移交人@BKGY
string sql 2 = "" ;
string sql 3 = "" ;
sql 2 = "INSERT INTO WEB_SOCKET (ID,USER_NO,EmpWorksNums,Flag,WorkID) " ;
sql 3 = "INSERT INTO WEB_SOCKET (ID,USER_NO,EmpWorksNums,Flag,WorkID) " ;
sql 2 + = "VALUES(S_WEB_SOCKET.NEXTVAL,'" + emp . UserID + "','" + BP . WF . Dev2Interface . EmpWorksNums ( emp . UserID ) + "','0'," + workID + ")" ;
sql 3 + = "VALUES(S_WEB_SOCKET.NEXTVAL,'" + emp . UserID + "','" + BP . WF . Dev2Interface . EmpWorksNums ( emp . UserID ) + "','0'," + workID + ")" ;
DBAccess . RunSQL ( sql 2 ) ;
DBAccess . RunSQL ( sql 3 ) ;
//处理移交后发送的消息事件,发送消息.
//处理移交后发送的消息事件,发送消息.
PushMsgs pms1 = new PushMsgs ( ) ;
PushMsgs pms1 = new PushMsgs ( ) ;
@ -302,6 +321,12 @@ namespace BP.WF
gwl . PassInt = 0 ;
gwl . PassInt = 0 ;
gwl . SDT = sdt ;
gwl . SDT = sdt ;
gwl . Insert ( ) ;
gwl . Insert ( ) ;
//移交后写入最新待办 被移交人@BKGY
string sql2 = "" ;
sql2 = "INSERT INTO WEB_SOCKET (ID,USER_NO,EmpWorksNums,Flag,WorkID) " ;
sql2 + = "VALUES(S_WEB_SOCKET.NEXTVAL,'" + emp . UserID + "','" + BP . WF . Dev2Interface . EmpWorksNums ( emp . UserID ) + "','0'," + workID + ")" ;
DBAccess . RunSQL ( sql2 ) ;
}
}
//重新查询.
//重新查询.