public object GetData(string userid, string caseId, string baid, string actid)
        {
            try
            {
                if (!String.IsNullOrEmpty(actid))
                {
                    //只有待办箱才有设置为已读
                    if (!String.IsNullOrEmpty(baid)) engineAPI.SetIsReaded(caseId, baid, userid);
                }

                var data = new GetDataModel();
                // 一个会议有多个议程
                #region 会议信息
                B_OA_ConferenceMain en = new B_OA_ConferenceMain();
                en.Condition.Add("workflowcaseid = " + caseId);
                data.baseInfo = Utility.Database.QueryObject<B_OA_ConferenceMain>(en);

                //新建
                if (data.baseInfo == null)
                {
                    var baseInfo = new B_OA_ConferenceMain();
                    //var userInfo = ComClass.GetUserInfo(userid);
                    data.baseInfo = baseInfo;
                }
                #endregion

                #region 议程信息列表
                if (data.baseInfo != null)
                {
                    B_OA_Conf_Agenda agendaEnt = new B_OA_Conf_Agenda();
                    agendaEnt.Condition.Add("workflowcaseid=" + data.baseInfo.workflowcaseid);
                    data.agendaList = Utility.Database.QueryList<B_OA_Conf_Agenda>(agendaEnt);
                }
                #endregion

                #region 编辑行议程信息
                if (data.baseInfo != null)
                {
                    data.agendaListDetail = new B_OA_Conf_Agenda();
                    data.agendaListDetail.workflowcaseid = data.baseInfo.workflowcaseid;
                }
                #endregion

               return data;
            }
            catch (Exception ex)
            {
                ComBase.Logger(ex);
                throw (new Exception("获取数据失败!", ex));
            }
        }
Exemple #2
0
        /// <summary>
        /// 创建一个Word数据
        /// </summary>
        /// <param name="caseid"></param>
        /// <returns></returns>
        private Dictionary<string, Object> CreateWordConferenceMainData(string caseid)
        {
            B_OA_ConferenceMain boacm = new B_OA_ConferenceMain();
            boacm.Condition.Add("workflowcaseid=" + caseid);//设置查询条件
            boacm = Utility.Database.QueryObject<B_OA_ConferenceMain>(boacm);

            List<B_OA_Conf_Agenda> boacaList = new List<B_OA_Conf_Agenda>();
            B_OA_Conf_Agenda ent = new B_OA_Conf_Agenda();
            ent.Condition.Add("workflowcaseid=" + caseid);//设置查询条件
            boacaList = Utility.Database.QueryList<B_OA_Conf_Agenda>(ent);

            // 发文s
            Dictionary<string, Object> dict = new Dictionary<string, Object>();
            dict.Add("sqr", boacm.sqr);//申请人
            dict.Add("hysid", boacm.hysid);//申请场地 会议室ID
            dict.Add("sqrq", boacm.sqrq);//申请日期
            dict.Add("xsysb", boacm.xsysb);//申请设备
            dict.Add("zksj", boacm.zksj);//召开时间
            dict.Add("zcr", boacm.zcr);//主持人
            dict.Add("cyry", boacm.cyry);//参加人员
            dict.Add("hyzt", boacm.hyzt);//会议主题

            for (int i = 0; i < boacaList.Count; i++)
            {
                dict.Add("kssj" + i.ToString(), (boacaList[i] == null) ? "" : Convert.ToDateTime(boacaList[i].kssj).ToString("yyyy-MM-dd HH:mm"));
                dict.Add("jssj" + i.ToString(), (boacaList[i] == null) ? "" : Convert.ToDateTime(boacaList[i].jssj).ToString("yyyy-MM-dd HH:mm"));
                dict.Add("fyr" + i.ToString(), (boacaList[i] == null) ? "" : boacaList[i].fyr);
                dict.Add("ycnr" + i.ToString(), (boacaList[i] == null) ? "" : boacaList[i].ycnr);
            }

            //for (int i = 0; i < wfbaList.Count; i++)
            //{
            //    switch (wfbaList[i].BAID.ToString())
            //    {
            //        case "BA001":
            //            dict.Add("Remark" + wfbaList[i].BAID.ToString(), (wfbaList[i] == null) ? "" : wfbaList[i].Remark);// 意见
            //            break;
            //        case "BA002":
            //            dict.Add("Remark" + wfbaList[i].BAID.ToString(), (wfbaList[i] == null) ? "" : wfbaList[i].Remark);// 意见
            //            break;
            //        case "BA003":
            //            dict.Add("Remark" + wfbaList[i].BAID.ToString(), (wfbaList[i] == null) ? "" : wfbaList[i].Remark);// 意见
            //            break;
            //        case "BA004":
            //            dict.Add("Remark" + wfbaList[i].BAID.ToString(), (wfbaList[i] == null) ? "" : wfbaList[i].Remark);// 意见
            //            break;
            //        case "BA005":
            //            dict.Add("Remark" + wfbaList[i].BAID.ToString(), (wfbaList[i] == null) ? "" : wfbaList[i].Remark);// 意见
            //            break;
            //        case "BA006":
            //            dict.Add("Remark" + wfbaList[i].BAID.ToString(), (wfbaList[i] == null) ? "" : wfbaList[i].Remark);// 意见
            //            break;
            //        case "BA007":
            //            dict.Add("Remark" + wfbaList[i].BAID.ToString(), (wfbaList[i] == null) ? "" : wfbaList[i].Remark);// 意见
            //            break;
            //        case "BA008":
            //            dict.Add("Remark" + wfbaList[i].BAID.ToString(), (wfbaList[i] == null) ? "" : wfbaList[i].Remark);// 意见
            //            break;
            //        case "BA009":
            //            dict.Add("Remark" + wfbaList[i].BAID.ToString(), (wfbaList[i] == null) ? "" : wfbaList[i].Remark);// 意见
            //            break;
            //        case "BA010":
            //            dict.Add("Remark" + wfbaList[i].BAID.ToString(), (wfbaList[i] == null) ? "" : wfbaList[i].Remark);// 意见
            //            break;
            //    }

            //}
            return dict;
        }