Ejemplo n.º 1
0
        /// <summary>
        /// 调用方需要调用 得到List
        /// </summary>
        /// <returns></returns>
        public List <M_ProgramFile.LeaderSign> UCGetHQList()
        {
            UCHQList = new List <M_ProgramFile.LeaderSign>();
            M_ProgramFile.LeaderSign info = new M_ProgramFile.LeaderSign();

            for (int i = 0; i < PlaceHolder1.Controls.Count; i++)
            {
                info = new M_ProgramFile.LeaderSign();
                if ((this.PlaceHolder1.Controls[i].FindControl("drpUser") as DropDownList).SelectedValue != "")
                {
                    info.TBID = (this.PlaceHolder1.Controls[i].FindControl("lblTBID") as Label).Text;                               //主键ID
                    info.ID   = (this.PlaceHolder1.Controls[i].FindControl("drpUser") as DropDownList).SelectedValue;               //会签人帐号
                    info.Name = (this.PlaceHolder1.Controls[i].FindControl("drpUser") as DropDownList).SelectedItem.Text;           //会签人

                    info.IsAgree = (this.PlaceHolder1.Controls[i].FindControl("lblTongYi") as Label).Text;                          //是否同意
                    info.Date    = SysConvert.ToDateTime((this.PlaceHolder1.Controls[i].FindControl("lblDate1") as Label).ToolTip); //会签日期

                    info.Comment = (this.PlaceHolder1.Controls[i].FindControl("lblYiJian") as Label).ToolTip;                       //意见
                    //info.DealCondition = (this.PlaceHolder1.Controls[i].FindControl("lblDealCondition") as Label).Text; //落实情况
                    info.DealDate = SysConvert.ToDateTime((this.PlaceHolder1.Controls[i].FindControl("lblDate2") as Label).Text);   //落实日期

                    Repeater rptDetialInfo = this.PlaceHolder1.Controls[i].FindControl("rptCurrentList") as Repeater;               //主键ID

                    List <B_PF.DetailInfo> detailInfoList = new List <M_ProgramFile.DetailInfo>();

                    foreach (RepeaterItem itm in rptDetialInfo.Items)
                    {
                        B_PF.DetailInfo detailInfo       = new B_PF.DetailInfo();
                        Label           lblDealCondition = itm.FindControl("lblDealCondition") as Label;
                        Label           lblContent       = itm.FindControl("lblContent") as Label;
                        detailInfo.Comment       = lblContent.Text;
                        detailInfo.DealCondition = lblDealCondition.Text;
                        detailInfoList.Add(detailInfo);
                    }

                    info.DetailInfoList = detailInfoList;//意见落实情况

                    UCHQList.Add(info);
                }
            }
            return(UCHQList);
        }
        /// <summary>
        /// 调用方需要调用 得到List
        /// </summary>
        /// <returns></returns>
        public List<M_ProgramFile.DeptSign> UCGetHQList()
        {
            UCHQList = new List<M_ProgramFile.DeptSign>();
            M_ProgramFile.DeptSign info = new M_ProgramFile.DeptSign();

            for (int i = 0; i < PlaceHolder1.Controls.Count; i++)
            {
                info = new M_ProgramFile.DeptSign();
                if ((this.PlaceHolder1.Controls[i].FindControl("drpDept") as DropDownList).SelectedValue != "")
                {
                    info.TBID = (this.PlaceHolder1.Controls[i].FindControl("lblTBID") as Label).Text;//主键ID
                    info.DeptID = (this.PlaceHolder1.Controls[i].FindControl("drpDept") as DropDownList).SelectedValue; //部门ID
                    info.DeptName = (this.PlaceHolder1.Controls[i].FindControl("drpDept") as DropDownList).SelectedItem.Text;//部门名称
                    info.ID = (this.PlaceHolder1.Controls[i].FindControl("lblUserID") as Label).Text; //会签人帐号
                    info.Name = (this.PlaceHolder1.Controls[i].FindControl("lblUserName") as Label).Text;  //会签人姓名
                    info.IsAgree = (this.PlaceHolder1.Controls[i].FindControl("lblTongYi") as Label).Text;  //是否同意
                    info.SubmitDate = SysConvert.ToDateTime((this.PlaceHolder1.Controls[i].FindControl("lblDate1") as Label).ToolTip); //会签日期
                    info.Comment = (this.PlaceHolder1.Controls[i].FindControl("lblYiJian") as Label).ToolTip; //意见
                    info.DealDate = SysConvert.ToDateTime((this.PlaceHolder1.Controls[i].FindControl("lblDate2") as Label).Text); //落实日期
                    info.IsExclude = (this.PlaceHolder1.Controls[i].FindControl("cb") as FSCheckBox).Checked ? true : false;//是否进行会签

                    Repeater rptDetialInfo = this.PlaceHolder1.Controls[i].FindControl("rptCurrentList") as Repeater;//主键ID

                    List<M_ProgramFile.DetailInfo> detailInfoList = new List<M_ProgramFile.DetailInfo>();

                    foreach (RepeaterItem itm in rptDetialInfo.Items)
                    {
                        B_PF.DetailInfo detailInfo = new B_PF.DetailInfo();
                        Label lblDealCondition = itm.FindControl("lblDealCondition") as Label;
                        Label lblContent = itm.FindControl("lblContent") as Label;
                        detailInfo.Comment = lblContent.Text;
                        detailInfo.DealCondition = lblDealCondition.Text;
                        detailInfoList.Add(detailInfo);
                    }

                    info.DetailInfoList = detailInfoList;//意见落实情况

                    UCHQList.Add(info);
                }
            }
            return UCHQList;
        }
        /// <summary>
        /// 实体赋值
        /// </summary>
        /// <param name="IsSave"></param>
        /// <returns></returns>
        protected override EntityBase ControlToEntity(bool IsSave)
        {
            B_PF entity = base.EntityData != null ? base.EntityData as B_PF : new B_PF();
            entity.IsProgramCompanCheck = this.cbIsPrint.Checked;

            entity.SendDeptID = wfChiefDept.Text;//主办部门ID
            entity.DocumentTitle = txtName.Text;//程序文件名称-DocumentTitle
            entity.DocumentNo = txtCode.Text;//程序编码
            entity.ProgramCode = txtCode.Text;//程序编码
            entity.Edition = txtEdition.Text;//程序版次
            entity.TextPageSum = txtPages.Text.Trim();//总页数
            entity.ApplyStyle = lblApplyStyle.Text;//申请类型
            entity.WriteExplain = SysString.InputText(txtWriteExplain.Text);//编制修订说明

            entity.Drafter = wfDrafter.Text;//程序发起人
            entity.DrafterID = wfDrafterID.Text;//程序发起人ID

            //编制
            entity.WriteID = wfWriteID.Text.ToString();//ddlWrite.SelectedValue.ToString();
            entity.WriteName = lblWrite.Text.ToString();
            if (base.StepName == ProcessConstString.StepName.ProgramFile.STEP_WRITE)
            {
                if (base.SubAction != ProcessConstString.SubmitAction.ACTION_SAVE_DRAFT)
                {
                    entity.DraftDate = entity.DraftDate == DateTime.MinValue ? DateTime.Now : entity.DraftDate;//程序发起时间
                    entity.FirstDraftDate = entity.FirstDraftDate == DateTime.MinValue ? entity.DraftDate : entity.FirstDraftDate;
                    //将会签退回标识初始化(置为“False”)
                    entity.IsSignReject = ConstString.Miscellaneous.STATUS_FALSE;
                    entity.WriteDate = lblWriteDate.Text == string.Empty ? DateTime.Now : Convert.ToDateTime(lblWriteDate.ToolTip);
                }
                //编写节点处理落实情况
                if (wfSort.Text == ConstString.ProgramFile.PROGRAM_SORT_WORK)
                {
                    if (rdolstSignStyle.SelectedIndex == 0)
                    {
                        entity.DeptSignList = rptDept.Items.Count > 0 ? B_PF.GetDeptSignList(rptDept, ucBuMenHuiQian.UCGetHQList()) : ucBuMenHuiQian.UCGetHQList();//选择部门会签
                        entity.LeaderSignList.Clear();
                    }//选择部门会签
                    else
                    {
                        entity.DeptSignList.Clear();
                        entity.LeaderSignList = rptLeader.Items.Count > 0 ? B_PF.GetLeaderSignList(rptLeader, ucLDHuiQian.UCGetHQList()) : ucLDHuiQian.UCGetHQList(); ;//选择领导会签
                    }//选择领导会签
                }//工作程序
                else
                {
                    entity.DeptSignList = rptDept.Items.Count > 0 ? B_PF.GetDeptSignList(rptDept, ucBuMenHuiQian.UCGetHQList()) : ucBuMenHuiQian.UCGetHQList();//部门会签
                    entity.LeaderSignList = rptLeader.Items.Count > 0 ? B_PF.GetLeaderSignList(rptLeader, ucLDHuiQian.UCGetHQList()) : ucLDHuiQian.UCGetHQList();//领导会签
                    entity.QualityCheckList = B_PF.GetQualityCheckList(rptQG);//质保审查
                } //(部门级)管理程序
                entity.PiZhunList = B_PF.GetPiZhunList(rptPiZhun);
            }

            //校核
            entity.CheckID = this.wfCheckID.Text;
            entity.CheckName = this.txtCheckName.Text;
            //校核时间  任金权 改  使用第一次时间
            if (base.StepName == ProcessConstString.StepName.ProgramFile.STEP_CHECK)
            {
                if (base.SubAction != ProcessConstString.SubmitAction.ACTION_SAVE_DRAFT)
                {
                    entity.CheckDate = DateTime.Now; //string.IsNullOrEmpty(this.lblCheckDate.Text) ? DateTime.Now : Convert.ToDateTime(lblCheckDate.Text.ToString());
                    entity.CheckerIsAgree = base.SubAction == ProcessConstString.SubmitAction.ACTION_DENY ? ConstString.ProgramFile.PROGRAM_REJECT : ConstString.ProgramFile.PROGRAM_AGREE;
                }//提交
                else
                {
                    //entity.CheckDate = DateTime.MinValue;
                    entity.CheckerIsAgree = string.Empty;
                }//保存
                entity.CheckComment = SysString.InputText(txtInfo.Text.Trim());
            }

            //审核
            entity.AuditID = ddlAudit.SelectedValue.ToString();
            entity.AuditName = ddlAudit.SelectedItem.Text.ToString();
            if (base.StepName == ProcessConstString.StepName.ProgramFile.STEP_AUDIT)
            {
                if (base.SubAction != ProcessConstString.SubmitAction.ACTION_SAVE_DRAFT)
                {
                    entity.AuditDate = DateTime.Now; //string.IsNullOrEmpty(this.lblAuditDate.Text) ? DateTime.Now : Convert.ToDateTime(lblAuditDate.Text);
                    entity.AuditorIsAgree = base.SubAction == ProcessConstString.SubmitAction.ACTION_DENY ? ConstString.ProgramFile.PROGRAM_REJECT : ConstString.ProgramFile.PROGRAM_AGREE;
                }//提交
                else
                {
                    //entity.AuditDate = DateTime.MinValue;
                    entity.AuditorIsAgree = string.Empty;
                }//保存
                entity.AuditComment = SysString.InputText(txtInfo.Text.Trim());
            }

            //部门会签
            if (base.StepName == ProcessConstString.StepName.ProgramFile.STEP_DEPTSIGN && base.SubAction != ProcessConstString.SubmitAction.ProgramFile.ACTION_ASSIGN)
            {
                M_ProgramFile.DeptSign deptSign = new M_ProgramFile.DeptSign();
                string strAgreeOld = "";
                if (OAConfig.GetConfig(ConstString.Config.Section.Start_WORKFLOW_AGENT, ConstString.Config.Key.IS_START) == "1" && wfReceiveUserID.Text != CurrentUserInfo.UserName)
                {
                    foreach (M_ProgramFile.DeptSign signer in ucBuMenHuiQian.UCGetHQList())
                    {
                        if (signer.ID == wfReceiveUserID.Text && signer.IsExclude == false)
                        {
                            deptSign = signer;
                            strAgreeOld = deptSign.IsAgree;//记录上次的意见  任金权
                            break;
                        }
                    }
                }
                else
                {
                    foreach (M_ProgramFile.DeptSign signer in ucBuMenHuiQian.UCGetHQList())
                    {
                        if (signer.ID == CurrentUserInfo.UserName && signer.IsExclude == false)
                        {
                            deptSign = signer;
                            strAgreeOld = deptSign.IsAgree;//记录上次的意见  任金权
                            break;
                        }
                    }
                }

                //非保存操作
                if (base.SubAction != ProcessConstString.SubmitAction.ACTION_SAVE_DRAFT)//任金权修改会签时间
                {
                    deptSign.IsAgree = YiJianInfoList.Count == 0 ? ConstString.ProgramFile.PROGRAM_AGREE : ConstString.ProgramFile.PROGRAM_REJECT;
                    if (deptSign.IsAgree == ConstString.ProgramFile.PROGRAM_REJECT || deptSign.SubmitDate == DateTime.MinValue || strAgreeOld == ConstString.ProgramFile.PROGRAM_REJECT)
                    {
                        deptSign.SubmitDate = DateTime.Now;
                    }
                    //判断是否会签退回(如果为同意,则需判断当前会签结果状态,否则为拒绝)
                    entity.IsSignReject = entity.IsSignReject == ConstString.Miscellaneous.STATUS_FALSE ? deptSign.IsAgree == ConstString.ProgramFile.PROGRAM_AGREE ?
                                            ConstString.Miscellaneous.STATUS_FALSE : ConstString.Miscellaneous.STATUS_TRUE : ConstString.Miscellaneous.STATUS_TRUE;

                    //    //修改标识:M_201004013
                    //    //修 改 者:黄琦
                    //    //修改描述:兼容老版本,IsSignReject为空的问题
                    //    if (entity.IsSignReject == ConstString.Miscellaneous.STATUS_FALSE)
                    //    {
                    //        if (deptSign.IsAgree == ConstString.ProgramFile.PROGRAM_AGREE)
                    //        {
                    //            entity.IsSignReject = ConstString.Miscellaneous.STATUS_FALSE;
                    //        }
                    //        else
                    //        {
                    //            entity.IsSignReject = ConstString.Miscellaneous.STATUS_TRUE;
                    //        }
                    //    }
                    //    else if (entity.IsSignReject == ConstString.Miscellaneous.STATUS_TRUE)
                    //    {
                    //        entity.IsSignReject = ConstString.Miscellaneous.STATUS_TRUE;
                    //    }
                    //    else
                    //    {
                    //        entity.IsSignReject = ConstString.Miscellaneous.STATUS_FALSE;
                    //        foreach (M_ProgramFile.DeptSign item in entity.DeptSignList)
                    //        {
                    //            if (item.IsAgree == ConstString.ProgramFile.PROGRAM_REJECT)
                    //            {
                    //                entity.IsSignReject = ConstString.Miscellaneous.STATUS_TRUE;
                    //                break;
                    //            }
                    //        }
                    //    }
                }

                List<M_ProgramFile.DetailInfo> detailInfoList = new List<M_ProgramFile.DetailInfo>();
                string strComment = string.Empty;//单条会签意见,用于表单列表显示

                foreach (RepeaterItem item in this.rptComment.Items)
                {
                    M_ProgramFile.DetailInfo detailInfo = new M_ProgramFile.DetailInfo();
                    Label lblContent = item.FindControl("lblContent") as Label;
                    detailInfo.Comment = lblContent.Text;

                    strComment = lblContent.Text;
                    detailInfoList.Add(detailInfo);
                }

                deptSign.DealCondition = string.Empty;//清空处理情况
                deptSign.DealDate = DateTime.MinValue;//清空处理日期
                deptSign.TBID = base.IdentityID.ToString();
                deptSign.Comment = SysString.InputText(strComment);
                deptSign.DetailInfoList = detailInfoList;//会签信息集合

                entity.DeptSignList = B_PF.SetDeptSignList(deptSign, ucBuMenHuiQian.UCGetHQList());
            }
            //领导会签
            if (base.StepName == ProcessConstString.StepName.ProgramFile.STEP_LEADERSIGN)
            {
                M_ProgramFile.LeaderSign leaderSign = new M_ProgramFile.LeaderSign();
                string strAgreeOld = "";//记录上次的意见  任金权
                if (OAConfig.GetConfig(ConstString.Config.Section.Start_WORKFLOW_AGENT, ConstString.Config.Key.IS_START) == "1" && wfReceiveUserID.Text != CurrentUserInfo.UserName)
                {
                    foreach (M_ProgramFile.LeaderSign signer in ucLDHuiQian.UCGetHQList())
                    {
                        if (signer.ID == wfReceiveUserID.Text)
                        {
                            leaderSign = signer;
                            strAgreeOld = leaderSign.IsAgree;
                            break;
                        }
                    }
                }
                else
                {
                    foreach (M_ProgramFile.LeaderSign signer in ucLDHuiQian.UCGetHQList())
                    {
                        if (signer.ID == CurrentUserInfo.UserName)
                        {
                            leaderSign = signer;
                            strAgreeOld = leaderSign.IsAgree;
                            break;
                        }
                    }
                }
                //非保存操作
                if (base.SubAction != ProcessConstString.SubmitAction.ACTION_SAVE_DRAFT)//任金权修改会签时间
                {
                    leaderSign.IsAgree = YiJianInfoList.Count == 0 ? ConstString.ProgramFile.PROGRAM_AGREE : ConstString.ProgramFile.PROGRAM_REJECT;
                    if (leaderSign.IsAgree == ConstString.ProgramFile.PROGRAM_REJECT || leaderSign.Date == DateTime.MinValue || strAgreeOld == ConstString.ProgramFile.PROGRAM_REJECT)
                    {
                        leaderSign.Date = DateTime.Now;
                    }//过滤多次连续同意(取第一次同意时提交的时间)
                    //判断是否会签退回(如果为同意,则需判断当前会签结果状态,否则为拒绝)
                    entity.IsSignReject = entity.IsSignReject == ConstString.Miscellaneous.STATUS_FALSE ? leaderSign.IsAgree == ConstString.ProgramFile.PROGRAM_AGREE ?
                                                ConstString.Miscellaneous.STATUS_FALSE : ConstString.Miscellaneous.STATUS_TRUE : ConstString.Miscellaneous.STATUS_TRUE;
                }

                List<M_ProgramFile.DetailInfo> detailInfoList = new List<M_ProgramFile.DetailInfo>();
                string strComment = string.Empty;//单条会签意见,用于表单列表显示

                foreach (RepeaterItem item in this.rptComment.Items)
                {
                    B_PF.DetailInfo detailInfo = new B_PF.DetailInfo();
                    Label lblContent = item.FindControl("lblContent") as Label;
                    detailInfo.Comment = lblContent.Text;

                    strComment = lblContent.Text;
                    detailInfoList.Add(detailInfo);
                }

                leaderSign.DealCondition = string.Empty;//清空处理情况
                leaderSign.DealDate = DateTime.MinValue;//清空处理日期
                leaderSign.TBID = base.IdentityID.ToString();
                leaderSign.Comment = SysString.InputText(strComment);
                leaderSign.DetailInfoList = detailInfoList;//会签信息

                entity.LeaderSignList = B_PF.SetLeaderSignList(leaderSign, ucLDHuiQian.UCGetHQList());
            }

            //批准
            entity.ApproverID = ddlApprove.SelectedValue.ToString();
            entity.ApproveName = ddlApprove.SelectedItem.Text.ToString();
            if (base.StepName == ProcessConstString.StepName.ProgramFile.STEP_APPROVE)
            {
                if (base.SubAction != ProcessConstString.SubmitAction.ACTION_SAVE_DRAFT)
                {
                    entity.ApproverIsAgree = YiJianInfoList.Count == 0 ? ConstString.ProgramFile.PROGRAM_AGREE : ConstString.ProgramFile.PROGRAM_REJECT;
                    entity.ApproveDate = DateTime.Now; //string.IsNullOrEmpty(lblApproveDate.Text) ? DateTime.Now : Convert.ToDateTime(lblApproveDate.Text.ToString());
                    string[] sendMember = OAUser.GetUserByRoleName(ConstString.RoleName.PROGRAM_ADMIN);
                    entity.SenderIDs = sendMember[0].ToString();//分发人(公办)
                    entity.Senders = sendMember[1].ToString();
                }
                else
                {
                    entity.ApproverIsAgree = string.Empty;
                }
                //批准

                entity.PiZhunList.Clear();
                foreach (CYiJian objYiJian in YiJianInfoList)
                {
                    M_ProgramFile.PiZhun approveInfo = new M_ProgramFile.PiZhun();
                    approveInfo.TBID = objYiJian.ID;
                    approveInfo.Name = objYiJian.UserName;
                    approveInfo.Comment = objYiJian.Content;
                    approveInfo.DealCondition = objYiJian.DealCondition;
                    approveInfo.SubmitDate = DateTime.Now;
                    entity.PiZhunList.Add(approveInfo);
                }
                //表单显示的批准意见信息
                if (YiJianInfoList.Count == 0)
                {
                    entity.ApproveComment = string.Empty;
                }
                else
                {
                    entity.ApproveComment = YiJianInfoList[YiJianInfoList.Count - 1].Content;
                }
            }
            //分发节点
            if (base.StepName == ProcessConstString.StepName.ProgramFile.STEP_SEND)
            {
                entity.SendDate = DateTime.Now; //wfSendDate.Text == string.Empty ? DateTime.MinValue : Convert.ToDateTime(wfSendDate.Text);
            }

            entity.ProgramSort = wfSort.Text;//程序分类
            entity.ProgramFileID = wfProgramID.Text;//程序文件ID
            entity.SerialID = wfSerialID.Text;//流水号
            entity.Year = wfYear.Text;//年份

            //质保审查
            entity.QualityIDs = wfQualityIDs.Text;//质保审查人ID
            entity.QualityNames = lblQG.ToolTip;//质保审查人
            //entity.QualityDate = lblQGDate.Text == string.Empty ? DateTime.MinValue : Convert.ToDateTime(lblQGDate.ToolTip.ToString());
            //entity.QualityComment = lblQGComment.ToolTip;
            //发起传阅时间
            entity.CirculateDate = wfCirculateDate.Text == string.Empty ? DateTime.MinValue : Convert.ToDateTime(wfCirculateDate.Text);
            if (base.StepName == ProcessConstString.StepName.ProgramFile.STEP_QG)
            {
                if (base.SubAction != ProcessConstString.SubmitAction.ACTION_SAVE_DRAFT)
                {
                    entity.QualityIsAgree = YiJianInfoList.Count == 0 ? ConstString.ProgramFile.PROGRAM_AGREE : ConstString.ProgramFile.PROGRAM_REJECT;
                    entity.QualityDate = lblQGDate.ToolTip == string.Empty ? DateTime.Now : Convert.ToDateTime(lblQGDate.ToolTip.ToString());
                    string[] sendMember = OAUser.GetUserByRoleName(ConstString.RoleName.PROGRAM_ADMIN);
                    entity.SenderIDs = sendMember[0].ToString();//分发人(公办)
                    entity.Senders = sendMember[1].ToString();
                }
                else
                {
                    entity.QualityIsAgree = string.Empty;
                }
                //表单显示的质保意见信息
                if (YiJianInfoList.Count == 0)
                {
                    entity.QualityComment = string.Empty;
                }
                else
                {
                    entity.QualityComment = YiJianInfoList[YiJianInfoList.Count - 1].Content;
                }
                entity.QualityCheckList.Clear();
                if (OAConfig.GetConfig(ConstString.Config.Section.Start_WORKFLOW_AGENT, ConstString.Config.Key.IS_START) == "1" && wfReceiveUserID.Text != CurrentUserInfo.UserName)
                {
                    foreach (CYiJian yiJian in YiJianInfoList)
                    {
                        B_PF.QualityCheck qg = new B_PF.QualityCheck();
                        //Label lblContent = itm.FindControl("lblContent") as Label;
                        qg.Name = wfReceiveUserName.Text;
                        qg.TBID = base.IdentityID.ToString();
                        qg.Comment = yiJian.Content;
                        entity.QualityCheckList.Add(qg);
                    }
                }
                else
                {
                    foreach (CYiJian yiJian in YiJianInfoList)
                    {
                        B_PF.QualityCheck qg = new B_PF.QualityCheck();
                        //Label lblContent = itm.FindControl("lblContent") as Label;
                        qg.Name = CurrentUserInfo.DisplayName;
                        qg.TBID = base.IdentityID.ToString();
                        qg.Comment = yiJian.Content;
                        entity.QualityCheckList.Add(qg);
                    }
                }
                entity.PiZhunList = B_PF.GetPiZhunList(rptPiZhun);

                entity.DeptSignList = ucBuMenHuiQian.UCGetHQList();//部门会签
                entity.LeaderSignList = ucLDHuiQian.UCGetHQList();//领导会签
            }

            //传阅
            entity.CirculateSignUserID = hfCirculateUserID.Value;//被传阅人ID
            entity.CirculateSignUserName = txtCirculateUserName.Text;//被传阅人姓名
            entity.CirculateSignDept = txtCirculateDeptName.Text;//被传阅部门
            entity.CirculateSignDeptID = hfCirculateDeptID.Value;//被传阅部门ID

            //分发
            entity.CirculateDeptID = hfSendDeptID.Value;
            entity.CirculateID = hfSendUserID.Value;
            entity.CirculateDeptName = txtSendDeptName.Text;
            entity.CirculateName = txtSendUserName.Text;
            entity.CirculateComment = txtSendComemnt.Text;

            if (base.SubAction != ProcessConstString.SubmitAction.ACTION_SAVE_DRAFT)
            {
                if (base.StepName == ProcessConstString.StepName.ProgramFile.STEP_QG ||
                    base.StepName == ProcessConstString.StepName.ProgramFile.STEP_DEPTSIGN ||
                    base.StepName == ProcessConstString.StepName.ProgramFile.STEP_LEADERSIGN ||
                    base.StepName == ProcessConstString.StepName.ProgramFile.STEP_APPROVE)
                {
                    entity.CommentList.Clear();
                    foreach (CYiJian objYj in YiJianInfoList)
                    {
                        objYj.FinishTime = DateTime.Now.ToString();
                    }
                    entity.CommentList = YiJianInfoList;
                }
                else if (base.StepName == ProcessConstString.StepName.ProgramFile.STEP_CHECK ||
                         base.StepName == ProcessConstString.StepName.ProgramFile.STEP_AUDIT)
                {
                    //意见保存
                    CYiJian objYj = new CYiJian();
                    objYj.ID = base.IdentityID.ToString();
                    if (OAConfig.GetConfig(ConstString.Config.Section.Start_WORKFLOW_AGENT, ConstString.Config.Key.IS_START) == "1" && wfReceiveUserID.Text != CurrentUserInfo.UserName)
                    {
                        objYj.UserID = wfReceiveUserID.Text;
                        objYj.UserName = wfReceiveUserName.Text;
                    }
                    else
                    {
                        objYj.UserID = CurrentUserInfo.UserName;
                        objYj.UserName = CurrentUserInfo.DisplayName;
                    }
                    objYj.ViewName = base.StepName;//视图名称(当前流程步骤)
                    objYj.FinishTime = DateTime.Now.ToString();
                    objYj.Content = SysString.InputText(txtInfo.Text.Trim());
                    entity.CommentList.Clear();
                    entity.CommentList.Add(objYj);
                }//校核、审核
            }//非保存操作

            //交办相关
            entity.ParentTBID = wfParentTBID.Text;
            if (base.StepName == ProcessConstString.StepName.ProgramFile.STEP_ASSIST_SIGN)
            {
                entity.AssistContent = txtAssistInfo.Text;
            }//协助部门会签步骤
            if (base.SubAction == ProcessConstString.SubmitAction.ProgramFile.ACTION_ASSIGN)
            {
                entity.AssistContent = string.Empty;
            }

            if (base.StepName == ProcessConstString.StepName.ProgramFile.STEP_WRITE ||
             base.StepName == ProcessConstString.StepName.ProgramFile.STEP_QG ||
             base.StepName == ProcessConstString.StepName.ProgramFile.STEP_APPROVE)
            {
                entity.AssistContent = string.Empty;
                entity.AssignedUserID = string.Empty;
                entity.AssignedUserName = string.Empty;
            }
            else
            {
                entity.AssignedUserName = string.IsNullOrEmpty(txtAssignMember.Text) ? wfAssignUserName.Text : txtAssignMember.Text;
                entity.AssignedUserID = wfAssignUserID.Text;
            }
            entity.ChildProcessID = wfChildProcessID.Text;
            if (base.SubAction != ProcessConstString.SubmitAction.ACTION_SAVE_DRAFT &&
                (base.StepName == ProcessConstString.StepName.ProgramFile.STEP_WRITE ||
                 base.StepName == ProcessConstString.StepName.ProgramFile.STEP_AUDIT ||
                 base.StepName == ProcessConstString.StepName.ProgramFile.STEP_QG ||
                 base.StepName == ProcessConstString.StepName.ProgramFile.STEP_APPROVE))
            {
                entity.TimesFlag = (int.Parse(string.IsNullOrEmpty(this.wfTimesFlag.Text) ? "1" : this.wfTimesFlag.Text) + 1).ToString();//次数标示
            }
            else
            {
                entity.TimesFlag = wfTimesFlag.Text;//次数标示
            }
            entity.FileList = ucFileControl.UCDataList;//附件信息

            return entity;
        }