Example #1
0
        public object GetWorkFlowCaseByCaseId(string caseId, string actid)
        {
            List<FX_AttachMent> listAttachment = new List<FX_AttachMent>();
            List<B_OA_Supervision> listSupervision = new List<B_OA_Supervision>();
            DataTable ngbm = new DataTable();

            IDbTransaction tran = Utility.Database.BeginDbTransaction();
            try
            {
                //工作流信息
                StringBuilder strSql = new StringBuilder();
                strSql.AppendFormat(@"
            select * from FX_WorkFlowBusAct where CaseID = '{0}' and SendDate is not null ORDER BY SendDate DESC", caseId);
                var ds = Utility.Database.ExcuteDataSet(strSql.ToString(), tran);

                List<FX_WorkFlowBusAct> listWork =
                     JsonConvert.DeserializeObject<List<FX_WorkFlowBusAct>>(JsonConvert.SerializeObject(ds.Tables[0]));

                //附件信息
                FX_AttachMent attachment = new FX_AttachMent();
                attachment.Condition.Add("CaseID = " + caseId);
                listAttachment = Utility.Database.QueryList<FX_AttachMent>(attachment, tran);
                //督办信息
                B_OA_Supervision supervision = new B_OA_Supervision();
                supervision.Condition.Add("caseId = " + caseId);
                supervision.OrderInfo = "createDate desc";
                listSupervision = Utility.Database.QueryList<B_OA_Supervision>(supervision, tran);
                //获取附件路径
                string dir = IWorkFlow.Host.Utility.config.get("FileDir");
                dir = dir.Replace("\\", "/");
                //拟稿人和拟稿部门
                if (!string.IsNullOrEmpty(actid))
                {
                    ngbm = GetUserNameAndDepartNameByActId(caseId, actid, tran);
                }
                //关闭连接池
                Utility.Database.Commit(tran);
                return new
                {
                    listAttachment = listAttachment,
                    listWork = listWork,
                    listSupervision = listSupervision,
                    dir = dir,
                    ngbm = ngbm
                };
            }
            catch (Exception ex)
            {
                ComBase.Logger(ex);
                throw (new Exception("获取数据失败!", ex));
            }
        }
Example #2
0
 public B_OA_Supervision GetSupervisionInforByCaseId(string caseid, IDbTransaction tran)
 {
     B_OA_Supervision supervision = new B_OA_Supervision();
     supervision.Condition.Add("caseId = " + caseid);
     supervision = Utility.Database.QueryObject<B_OA_Supervision>(supervision, tran);
     return supervision;
 }
Example #3
0
        public object GetData(string userid, string caseId, string baid)
        {
            //只有待办箱才有设置为已读
            if (!String.IsNullOrEmpty(baid)) engineAPI.SetIsReaded(caseId, baid, userid);
            GetDataModel data = new GetDataModel();
            B_OA_Supervision en = new B_OA_Supervision();
            en.Condition.Add("caseId=" + caseId);
            data.supervisionBaseInfo = Utility.Database.QueryObject<B_OA_Supervision>(en);

            B_OA_Supervision_Bill supervisionBill = new B_OA_Supervision_Bill();
            supervisionBill.Condition.Add("caseid =" + caseId);
            data.supervisionBill = Utility.Database.QueryObject<B_OA_Supervision_Bill>(supervisionBill);

            if (data.supervisionBaseInfo == null)
            {
                var baseInfo = new B_OA_Supervision();
                baseInfo.createDate = DateTime.Now.ToString();
                baseInfo.supervisionManId = userid;
                baseInfo.status = "1";//未读取的督办
                baseInfo.supervisionManName = ComClass.GetUserInfo(userid).CnName;
                data.supervisionBaseInfo = baseInfo;

                //督办通知单据
                B_OA_Supervision_Bill supervisionBill_ad = new B_OA_Supervision_Bill();
                supervisionBill_ad.content = GetSupervisionBill("notice");
                supervisionBill_ad.year = DateTime.Now.Year.ToString();
                supervisionBill_ad.createDate = DateTime.Now.ToString("yyyy年MM月dd日");
                data.supervisionBill = supervisionBill_ad;
            }

            return data;
        }
Example #4
0
 public List<B_OA_Supervision> GetSupervisionList(string caseid, IDbTransaction tran)
 {
     List<B_OA_Supervision> listSupervision = new List<B_OA_Supervision>();
     B_OA_Supervision supervision = new B_OA_Supervision();
     supervision.Condition.Add("relationCaseId =" + caseid);
     listSupervision = Utility.Database.QueryList(supervision, tran);
     return listSupervision;
 }