diff --git a/CCFlow/.vs/CCFlowCloud/v17/.suo b/CCFlow/.vs/CCFlowCloud/v17/.suo index 907bd43d..b03f7c58 100644 Binary files a/CCFlow/.vs/CCFlowCloud/v17/.suo and b/CCFlow/.vs/CCFlowCloud/v17/.suo differ diff --git a/CCFlow/CCFlow/WF/CCForm/Ath.js b/CCFlow/CCFlow/WF/CCForm/Ath.js index b808b618..a8ec93ef 100644 --- a/CCFlow/CCFlow/WF/CCForm/Ath.js +++ b/CCFlow/CCFlow/WF/CCForm/Ath.js @@ -884,6 +884,10 @@ function AthView(mypk, filePath) { var host = window.location.protocol + "//" + window.location.host; var url = host + filePath; + //pdf文件 + if (filePath.endsWith('.pdf')) { + window.open(url); + } //url = 'http://localhost:2296/DataUser/UploadFile/ND18201/838/6456dd46-04ec-4843-a057-31351053cd42.混合 - 副本.docx'; url = encodeURIComponent(base64Encode(url)); //debugger; @@ -900,7 +904,7 @@ function AthView(mypk, filePath) { return; } - window.open(fileServerHost + 'preview/onlinePreview?url=' + url); + window.open(fileServerHost + '/onlinePreview?url=' + url); return; } diff --git a/CCFlow/Components/BP.WF/Dev2Interface.cs b/CCFlow/Components/BP.WF/Dev2Interface.cs index 624e115d..8e79b7e4 100644 --- a/CCFlow/Components/BP.WF/Dev2Interface.cs +++ b/CCFlow/Components/BP.WF/Dev2Interface.cs @@ -6811,19 +6811,26 @@ namespace BP.WF string sql3 = "select WorkID,FK_Emp from WF_GenerWorkerlist where WorkID = '"+ workid + "' AND FK_Node = '"+ gwf.NodeID + "'"; DataTable dtNum = DBAccess.RunSQLReturnTable(sql3); string sql2 = ""; + //foreach (DataRow dr in dtNum.Rows) + //{ + // //流程调整前写入最新待办 调整节点@BKGY + // sql2 = "INSERT INTO WEB_SOCKET (ID,USER_NO,EmpWorksNums,Flag,WorkID) "; + // sql2 += "VALUES(S_WEB_SOCKET.NEXTVAL,'" + dr[1] + "','" + BP.WF.Dev2Interface.EmpWorksNums(dr[1].ToString()) + "','0',"+workid+")"; + // DBAccess.RunSQL(sql2); + //} + + //删除当前节点的d待办. + gwl.Delete(GenerWorkerListAttr.WorkID, workid, GenerWorkerListAttr.FK_Node, gwf.NodeID); + //删除要调整到的节点数据. + gwl.Delete(GenerWorkerListAttr.WorkID, workid, GenerWorkerListAttr.FK_Node, toNodeID); foreach (DataRow dr in dtNum.Rows) { //流程调整前写入最新待办 调整节点@BKGY sql2 = "INSERT INTO WEB_SOCKET (ID,USER_NO,EmpWorksNums,Flag,WorkID) "; - sql2 += "VALUES(S_WEB_SOCKET.NEXTVAL,'" + dr[1] + "','" + BP.WF.Dev2Interface.EmpWorksNums(dr[1].ToString()) + "','0',"+workid+")"; + sql2 += "VALUES(S_WEB_SOCKET.NEXTVAL,'" + dr[1] + "','" + BP.WF.Dev2Interface.EmpWorksNums(dr[1].ToString()) + "','0'," + workid + ")"; DBAccess.RunSQL(sql2); } - //删除当前节点的d待办. - gwl.Delete(GenerWorkerListAttr.WorkID, workid, GenerWorkerListAttr.FK_Node, gwf.NodeID); - //删除要调整到的节点数据. - gwl.Delete(GenerWorkerListAttr.WorkID, workid, GenerWorkerListAttr.FK_Node, toNodeID); - //调整流程强制结束. GenerWorkFlows gwfs = new GenerWorkFlows(); diff --git a/CCFlow/Components/BP.WF/WF/ShiftWork.cs b/CCFlow/Components/BP.WF/WF/ShiftWork.cs index f02feca7..43f83a33 100644 --- a/CCFlow/Components/BP.WF/WF/ShiftWork.cs +++ b/CCFlow/Components/BP.WF/WF/ShiftWork.cs @@ -6,6 +6,7 @@ using BP.Port; using BP.DA; using BP.WF.Template; using System.Data; +using static iTextSharp.text.pdf.AcroFields; namespace BP.WF { @@ -108,22 +109,25 @@ namespace BP.WF item.ItIsRead = false; item.SDT = sdt; 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; } } #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 sql = ""; 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); //记录日志. Glo.AddToTrack(ActionType.Shift, nd.FlowNo, workID, gwf.FID, nd.NodeID, nd.Name, @@ -149,11 +153,22 @@ namespace BP.WF //非协作模式. gwl = new GenerWorkerList(); i = gwl.Retrieve(GenerWorkerListAttr.FK_Node, gwf.NodeID, GenerWorkerListAttr.WorkID, gwf.WorkID); + string sql2 = ""; 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; 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 { 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.EmpName = emp.Name; gwl.ItIsEnable = true; @@ -165,6 +180,10 @@ namespace BP.WF gwf.TodoEmpsNum = 1; gwf.TodoEmps = gwf.TodoEmps.Replace(WebUser.No + "," + WebUser.Name + ";", "") + emp.UserID + "," + emp.Name + ";"; 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, @@ -279,10 +298,10 @@ namespace BP.WF info += "@" + ExecEvent.DoNode(EventListNode.ShitAfter, nd, work, null, atPara1); //移交后写入最新待办 被移交人@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); + string sql3 = ""; + sql3 = "INSERT INTO WEB_SOCKET (ID,USER_NO,EmpWorksNums,Flag,WorkID) "; + sql3 += "VALUES(S_WEB_SOCKET.NEXTVAL,'" + emp.UserID + "','" + BP.WF.Dev2Interface.EmpWorksNums(emp.UserID) + "','0',"+ workID + ")"; + DBAccess.RunSQL(sql3); //处理移交后发送的消息事件,发送消息. PushMsgs pms1 = new PushMsgs(); @@ -302,6 +321,12 @@ namespace BP.WF gwl.PassInt = 0; gwl.SDT = sdt; 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); } //重新查询.