/// <summary> /// 计算两个时间点. /// </summary> /// <param name="sa"></param> /// <param name="nd"></param> private void InitDT(SelectAccper sa, Node nd) { //计算上一个时间的发送点. if (this.LastTimeDot == null) { Paras ps = new Paras(); ps.SQL = "SELECT SDT FROM WF_GenerWorkerlist WHERE WorkID=" + ps.DBStr + "WorkID AND FK_Node=" + ps.DBStr + "FK_Node"; ps.Add("WorkID", this.HisCurrWorkNode.WorkID); ps.Add("FK_Node", nd.NodeID); DataTable dt = DBAccess.RunSQLReturnTable(ps); foreach (DataRow dr in dt.Rows) { this.LastTimeDot = dr[0].ToString(); break; } } //上一个节点的发送时间点或者 到期的时间点,就是当前节点的接受任务的时间。 sa.PlanADT = this.LastTimeDot; //计算当前节点的应该完成日期。 DateTime dtOfShould = Glo.AddDayHoursSpan(this.LastTimeDot, nd.TimeLimit, nd.TimeLimitHH, nd.TimeLimitMM, nd.TWay); sa.PlanSDT = dtOfShould.ToString(DataType.SysDatatimeFormatCN); //给最后的时间点复制. this.LastTimeDot = sa.PlanSDT; }
/// <summary> /// 检查MD5值是否通过 /// </summary> /// <returns>true/false</returns> public bool IsPassCheckMD5() { string md51 = this.GetValStringByKey(WorkAttr.MD5); string md52 = Glo.GenerMD5(this); if (md51 != md52) { return(false); } return(true); }