diff --git a/CCFlow/Components/BP.WF/Dev2Interface.cs b/CCFlow/Components/BP.WF/Dev2Interface.cs index 72ed966e..01ba8293 100644 --- a/CCFlow/Components/BP.WF/Dev2Interface.cs +++ b/CCFlow/Components/BP.WF/Dev2Interface.cs @@ -1260,7 +1260,7 @@ namespace BP.WF DataTable dt = DBAccess.RunSQLReturnTable(ps); //添加oracle的处理 - if (BP.Difference.SystemConfig.AppCenterDBFieldCaseModel == FieldCaseModel.Lowercase) + if (BP.Difference.SystemConfig.AppCenterDBFieldCaseModel == FieldCaseModel.UpperCase) { dt.Columns["WORKID"].ColumnName = "WorkID"; dt.Columns["STARTERNAME"].ColumnName = "StarterName"; diff --git a/CCFlow/Components/BP.WF/HttpHandler/WF.cs b/CCFlow/Components/BP.WF/HttpHandler/WF.cs index d4c03698..81f1db84 100644 --- a/CCFlow/Components/BP.WF/HttpHandler/WF.cs +++ b/CCFlow/Components/BP.WF/HttpHandler/WF.cs @@ -2749,6 +2749,12 @@ namespace BP.WF.HttpHandler { return "url@CC.htm?Token=" + token + "&o2=1&FK_Flow=" + this.FlowNo; } + + //我的关注 + if (this.DoWhat.Equals(DoWhatList.Focus) == true) + { + return "url@Focus.htm?Token=" + token + "&o2=1&FK_Flow=" + this.FlowNo; + } //流程设计器 if (this.DoWhat.Equals(DoWhatList.Flows) == true) return "url@Portal/FlowTree.htm?Token=" + token + "&UserNo=" + BP.Web.WebUser.No; diff --git a/CCFlow/Components/BP.WF/HttpHandler/WF_CCForm.cs b/CCFlow/Components/BP.WF/HttpHandler/WF_CCForm.cs index b9d5f7d6..fd48ed4c 100644 --- a/CCFlow/Components/BP.WF/HttpHandler/WF_CCForm.cs +++ b/CCFlow/Components/BP.WF/HttpHandler/WF_CCForm.cs @@ -5805,6 +5805,16 @@ namespace BP.WF.HttpHandler return this.GetRequestVal("FK_FrmAttachment"); } } + /// + /// 附件文件ID. + /// + public string Ids + { + get + { + return this.GetRequestVal("Ids"); + } + } public BP.Sys.FrmAttachment GenerAthDescOfFoolTruck() { FoolTruckNodeFrm sln = new FoolTruckNodeFrm(); @@ -6038,6 +6048,9 @@ namespace BP.WF.HttpHandler { string copyToPath = tempFilePath; + if (this.Ids.Length > 0 && this.Ids.Contains(db.MyPK) == false) { + continue; + } //求出文件路径. string fileTempPath = db.GenerTempFile(athDesc.AthSaveWay); string fileTempDecryPath = fileTempPath; diff --git a/CCFlow/Components/BP.WF/HttpHandler/WF_MyView.cs b/CCFlow/Components/BP.WF/HttpHandler/WF_MyView.cs index b0bed75e..be408cc4 100644 --- a/CCFlow/Components/BP.WF/HttpHandler/WF_MyView.cs +++ b/CCFlow/Components/BP.WF/HttpHandler/WF_MyView.cs @@ -329,6 +329,19 @@ namespace BP.WF.HttpHandler dt.Rows.Add(dr); } + /* 关注 */ + if (btnLab.FocusEnable == true) + { + dr = dt.NewRow(); + dr["No"] = "Focus"; + if (HisGenerWorkFlow.Paras_Focus == true) + dr["Name"] = "取消关注"; + else + dr["Name"] = btnLab.FocusLab; + dr["Oper"] = "FocusBtn(this,'" + this.WorkID + "');"; + dt.Rows.Add(dr); + } + break; default: break; diff --git a/CCFlow/Components/BP.WF/HttpHandler/WF_WorkOpt.cs b/CCFlow/Components/BP.WF/HttpHandler/WF_WorkOpt.cs index 89217727..283b11ce 100644 --- a/CCFlow/Components/BP.WF/HttpHandler/WF_WorkOpt.cs +++ b/CCFlow/Components/BP.WF/HttpHandler/WF_WorkOpt.cs @@ -4359,6 +4359,7 @@ namespace BP.WF.HttpHandler string SeachType = this.GetRequestVal("SeachType"); string SearchKey = this.GetRequestVal("SearchKey"); string SQL = ""; + string SQL1 = ""; //模板数据获取 if (SeachType == "2") @@ -4373,34 +4374,51 @@ namespace BP.WF.HttpHandler if (SQL.Substring(SQL.Length - 2, 2) == "OR") SQL = SQL.Remove(SQL.Length - 2, 2); - SQL += " )AND WFState = 3 AND ATPARA LIKE '%@DBTemplate=1%'"; + SQL += " )AND WFState = 3 "; } if (SeachType == "1") { - SQL = "SELECT WorkID,Title,AtPara FROM WF_GenerWorkFlow WHERE FK_Flow=" + SystemConfig.AppCenterDBVarStr + "FK_Flow AND Title like '%" + SearchKey + "%' AND WFState=3 AND ATPARA LIKE '%@DBTemplate=1%'"; + SQL = "SELECT WorkID,Title,AtPara FROM WF_GenerWorkFlow WHERE FK_Flow=" + SystemConfig.AppCenterDBVarStr + "FK_Flow AND Title like '%" + SearchKey + "%' AND WFState=3 "; } - else if (SeachType == "0") + if (SeachType !="0") { + ps.SQL = SQL; + ps.Add("FK_Flow", this.FlowNo); + //ps.Add("Starter", WebUser.No); + DataTable dtSeach = DBAccess.RunSQLReturnTable(ps); + dtSeach.TableName = "DBSeach"; + if (SystemConfig.AppCenterDBFieldCaseModel != FieldCaseModel.None) + { + dtSeach.Columns[0].ColumnName = "WorkID"; + dtSeach.Columns[1].ColumnName = "Title"; + } + ds.Tables.Add(dtSeach); + } + + SQL1 = "SELECT WorkID,Title,AtPara FROM WF_GenerWorkFlow WHERE FK_Flow=" + SystemConfig.AppCenterDBVarStr + "FK_Flow AND WFState=3 AND ATPARA LIKE '%DBTemplate=1%'"; + + + if (SeachType == "0") { - SQL = "SELECT WorkID,Title,AtPara FROM WF_GenerWorkFlow WHERE FK_Flow=" + SystemConfig.AppCenterDBVarStr + "FK_Flow AND WFState=3 AND ATPARA LIKE '%@DBTemplate=1%' "; + SQL1 = "SELECT WorkID,Title,AtPara FROM WF_GenerWorkFlow WHERE FK_Flow=" + SystemConfig.AppCenterDBVarStr + "FK_Flow AND WFState=3 AND ATPARA LIKE '%DBTemplate=1%' "; } if (SystemConfig.AppCenterDBType == DBType.Oracle || SystemConfig.AppCenterDBType == DBType.KingBaseR3 || SystemConfig.AppCenterDBType == DBType.KingBaseR6) { - SQL += " AND rownum<=15 ORDER BY RDT"; + SQL1 += " AND rownum<=15 ORDER BY RDT"; } if (SystemConfig.AppCenterDBType == DBType.MySQL || SystemConfig.AppCenterDBType == DBType.PostgreSQL || BP.Difference.SystemConfig.AppCenterDBType == DBType.HGDB || SystemConfig.AppCenterDBType == DBType.UX) { - SQL += " ORDER BY RDT LIMIT 15"; + SQL1 += " ORDER BY RDT LIMIT 15"; } if (SystemConfig.AppCenterDBType == DBType.MSSQL) { SQL.Replace("SELECT ", " "); - SQL = "SELECT TOP 15 " + SQL; + SQL = "SELECT TOP 15 " + SQL1; } - ps.SQL = SQL; + ps.SQL = SQL1; ps.Add("FK_Flow", this.FlowNo); //ps.Add("Starter", WebUser.No); DataTable dtTemplate = DBAccess.RunSQLReturnTable(ps); @@ -4423,6 +4441,7 @@ namespace BP.WF.HttpHandler ds.Tables.Add(dtTemplate); + // 获取历史发起数据. ps = new Paras(); if (SystemConfig.AppCenterDBType == DBType.MSSQL) diff --git a/CCFlow/Components/BP.WF/WF.cs b/CCFlow/Components/BP.WF/WF.cs index 86583bfe..43289520 100644 --- a/CCFlow/Components/BP.WF/WF.cs +++ b/CCFlow/Components/BP.WF/WF.cs @@ -79,7 +79,8 @@ namespace BP.WF public const string EmpWorks = "EmpWorks"; public const string MyFlow = "MyFlow"; public const string MyCC = "MyCC"; - public const string CC = "CC"; + public const string CC = "CC"; + public const string Focus = "Focus"; public const string Auths = "Auths"; public const string FlowFX = "FlowFX"; public const string DealWork = "DealWork"; diff --git a/CCFlow/Components/BP.WF/WF/WorkNode.cs b/CCFlow/Components/BP.WF/WF/WorkNode.cs index b6986ce2..de1bb11d 100644 --- a/CCFlow/Components/BP.WF/WF/WorkNode.cs +++ b/CCFlow/Components/BP.WF/WF/WorkNode.cs @@ -5417,7 +5417,63 @@ namespace BP.WF //把当前的待办设置已办,并且提示未处理的人。 foreach (GenerWorkerList gwl in gwls) { - if (gwl.EmpNo.Equals(WebUser.No) == false) + //获得授权信息.@BKGY + Auths aths = new Auths(); + aths.Retrieve(AuthAttr.AutherToEmpNo, WebUser.No); + string whereSQL = " "; + string sql = " "; + string userNo = " "; + + if (aths.Count !=0 ) { + + if (BP.WF.Glo.IsEnableTaskPool == true) + sql = "SELECT A.*, null as Auther FROM WF_EmpWorks A WHERE WFState >1 AND TaskSta=0 AND A.FK_Emp='" + WebUser.No + "' " + whereSQL + ""; + else + sql = "SELECT A.*, null as Auther FROM WF_EmpWorks A WHERE A.FK_Emp='" + WebUser.No + "' " + whereSQL + ""; + + foreach (Auth ath in aths) + { + + string todata = ath.TakeBackDT.Replace("-", ""); + if (DataType.IsNullOrEmpty(ath.TakeBackDT) == false) + { + int mydt = int.Parse(todata); + int nodt = int.Parse(DateTime.Now.ToString("yyyyMMdd")); + if (mydt < nodt) + continue; + sql += " UNION "; + + if (ath.AuthType == AuthorWay.SpecFlows) + sql += "SELECT A.*,'" + ath.Auther + "' as Auther FROM WF_EmpWorks A WHERE FK_Emp='" + ath.Auther + "' AND FK_Flow='" + ath.FlowNo + "' " + whereSQL + ""; + else + sql += "SELECT A.*,'" + ath.Auther + "' as Auther FROM WF_EmpWorks A WHERE FK_Emp='" + ath.Auther + "' " + whereSQL + ""; + + + } + } + DataTable dt = null; + try + { + //获得待办. + dt = DBAccess.RunSQLReturnTable(sql); + } + catch (Exception ex) + { + BP.WF.Glo.ReCreateView(); + } + foreach (DataRow dr in dt.Rows) + { + if (gwl.WorkID.ToString() == dr[1].ToString() && dr["Auther"].ToString() != null && dr["Auther"].ToString() != "") + { + userNo = dr["Auther"].ToString(); + break; + } + + } + + } + + if ((userNo == null && userNo == "" )|| (gwl.EmpNo.Equals(WebUser.No) == false)) continue; //设置当前不可以用.