public static FoWoSoft.Data.Model.TempTestMeet MeetInfoToTempTestMeet(FoWoSoft.Data.Model.MeetInfo meetInfot, string testMeetid) { var meetInfo = meetInfot as EduModels.MeetInfoModel; var tempTestMeet = new FoWoSoft.Data.Model.TempTestMeet { ID = Guid.Parse(testMeetid), Title = meetInfo.temp2, Date2 = Convert.ToDateTime(meetInfo.MeetTimes), college = meetInfo.MeetId, Date1 = meetInfo.Date1, test1 = meetInfo.test1, test = meetInfo.test, UserID = meetInfo.typeid, UserID_text = meetInfo.typeid, Type = meetInfo.type, Reason = meetInfo.Reason, inland = meetInfo.inland, abroad = meetInfo.abroad, DeptID = meetInfo.Phone, DeptName = meetInfo.Address }; if (meetInfo.typeid == Enum.GetName(typeof(meetType), meetType.直播会议)) { if (meetInfo.type == Enum.GetName(typeof(LivePlatform), LivePlatform.校外第三方直播平台)) { var aborads = meetInfo.abroad.Split('|'); tempTestMeet.abroad = aborads.Length > 0 ? aborads[0] : ""; tempTestMeet.test2_text = aborads.Length > 1 ? aborads[1] : ""; } else { var reasons = meetInfo.Reason.Split('|'); tempTestMeet.Reason = reasons.Length > 0 ? reasons[0] : ""; tempTestMeet.UserID_text = reasons.Length > 1 ? reasons[1] : ""; } } return(tempTestMeet); }
/// <summary> /// 每一步的会议审核 /// </summary> /// <param name="eventId"></param> /// <param name="apperot"></param> /// <returns></returns> public string SendStep(string eventId, string instanceid, FoWoSoft.Data.Model.MeetInfo meetInfo) { var meetMsg = $" 您申请的会议名称:{meetInfo.temp2};会议地址:{meetInfo.MeetName},"; var userInfoEdu = new EduWebService().GetUser(meetInfo.ApplicatId); if (userInfoEdu == null) { return(null); } var tasks = new FoWoSoft.Platform.WorkFlowTask().GetAll(); var installTasks = tasks.Where(s => s.InstanceID.ToString().Equals(instanceid, StringComparison.OrdinalIgnoreCase) && s.Status == 0); string[] remarks = new string[] { "请审核", "打开", "中间完成", "退回", "他人已处理", "他人已退回" }; var n = 0; foreach (var item in installTasks) { var task = tasks.FirstOrDefault(s => s.ID == item.PrevID); if (n == 0)//发给审请人 { if (task != null) { //申请过程:您申请的会议名称:***;会议地址:****,****(部门)申请通过。 duanxinService.Sendapplication(instanceid, string.Format(DuanxinService.DuanxinSendMsg1, meetInfo.temp2, meetInfo.MeetName, task.StepName)); } } n++; var approver = new FoWoSoft.Platform.Users().Get(item.ReceiveID).Account; var remark = (item.Status > -1 && item.Status < 6) ? remarks[item.Status] : ""; string data = JsonConvert.SerializeObject(new { approver = approver, status = "PENDING", remarks = remark }); string address = "api/booking/events/{0}/approval"; //由*** 部门,***(人名),申请的会议名称为:****会议申请,需要您审核。 FoWoSoft.Platform.Log.Add1(string.Format("各部门({0})", item.StepName + userInfoEdu.BMMC + userInfoEdu.XM + meetInfo.temp2), data, FoWoSoft.Platform.Log.Types.其它分类); //20180110短信发送 if (item.StepName == "信息办") { //由*** 部门,***(人名),申请的会议名称为:****会议申请已通过,请确认并提供相关支持。 duanxinService.Sendapplication(instanceid, string.Format(DuanxinService.DuanxinSendMsg6, userInfoEdu.BMMC, userInfoEdu.XM, meetInfo.MeetName, meetInfo.temp2, meetInfo.MeetTimes)); } else if (item.StepName.Contains("各部门")) { var prevName = tasks.FirstOrDefault(s => s.ID == item.PrevID).StepName; duanxinService.smsSend(approver, string.Format(DuanxinService.DuanxinSendMsg5, userInfoEdu.BMMC, userInfoEdu.XM, meetInfo.MeetName, meetInfo.temp2, meetInfo.MeetTimes, prevName)); } else { duanxinService.smsSend(approver, string.Format(DuanxinService.DuanxinSendMsg4, userInfoEdu.BMMC, userInfoEdu.XM, meetInfo.MeetName, meetInfo.temp2, meetInfo.MeetTimes)); } Put_Roomis(eventId, address, data); } return("1"); }