public ServiceTaskController() { _user = new UserInfoService(); _event = new UserEventBLL(); _apply = new DoctorControlBll(); _service = new ServiceTraceInfoService(); _repository = new CancerUserInfoRepository(); _member = new MemberBLL(); }
/// <summary> /// 发送用户待办通知 /// </summary> private void SendEvent(string uid, string loginname) { string _appleID = Guid.NewGuid().ToString(); DoctorControlBll dcbll = new DoctorControlBll(); UserApply userApply = new UserApply(); userApply.ID = Guid.NewGuid().ToString(); userApply.APPLYID = _appleID; userApply.USERID = uid; userApply.GUIDELINEID = "1"; userApply.STATUS = "1"; userApply.CREATEDATETIME = DateTime.Now; userApply.ISDELETED = false; dcbll.Add(userApply); UserEvent userEvent = new UserEvent(); userEvent.FromUser = ""; userEvent.UserApplyId = userApply.ID; userEvent.ActionType = ((int)ActionType.待办事项).ToString(); userEvent.ActionInfo = "您已注册成功,请上传您的病历资料"; userEvent.ReceiptTime = DateTime.Now; userEvent.ActionStatus = ((int)ActionStatus.Progress).ToString(); userEvent.ToUser = uid; userEvent.CreateTime = DateTime.Now; userEvent.LinkUrl = "ViewUpload"; UserEventBLL userEventBLL = new UserEventBLL(); userEventBLL.Add(userEvent); CancerUserInfoRepository cancerUserRepository = new CancerUserInfoRepository(); HR_CNR_USER cnr_User = new HR_CNR_USER(); cnr_User.CREATTIME = DateTime.Now; cnr_User.USERID = uid; cnr_User.NAME = loginname; cancerUserRepository.Insert(cnr_User); }
private ExtUserEvent GetExtData(UserEvent userEvent) { ExtUserEvent extUserEvent = new ExtUserEvent(); extUserEvent.EventID = userEvent.EventID; extUserEvent.ActionStatus = userEvent.ActionStatus; extUserEvent.Remarks = userEvent.Remarks; List <UserEvent> tracks = bll.GetList(p => p.USERAPPLYID.Equals(userEvent.UserApplyId)).OrderBy(p => p.CreateTime).ToList(); UserInfoService userService = new UserInfoService(); UserRoleBLL userRoleBLL = new UserRoleBLL(); RoleBLL roleBLL = new RoleBLL(); for (int i = 0; i < tracks.Count; i++) { string _userID = tracks[i].ToUser; UserInfo userInfo = userService.GetUserInfoByID(_userID); if (userInfo == null) { tracks[i].ToUser = ""; } else { tracks[i].ToUser = userInfo.LoginName; } UserRole userrole = userRoleBLL.GetOne(p => p.USERID.Equals(_userID)); if (userrole == null) { tracks[i].Remarks = ""; } else { Role role = roleBLL.Get(userrole.RoleID); tracks[i].Remarks = role == null ? "" : role.RoleName; } } //todo:20160119演示用,临时去了客服的代办信息 extUserEvent.Tracks = tracks.Where(p => !p.Remarks.Contains("客服")).ToList(); //extUserEvent.Tracks = tracks; DoctorControlBll dcBLL = new DoctorControlBll(); UserApply userApply = dcBLL.GetModelUserApply(userEvent.UserApplyId); if (userApply != null) { extUserEvent.DoctorSuggest = userApply.DOCTORSUGGEST; GuideLineBLL gdBLL = new GuideLineBLL(); GuideLine guidline = gdBLL.GetSimpleModel(userApply.CURRENTNODE); if (guidline != null) { extUserEvent.CurrentNodeName = guidline.Name; extUserEvent.RecommendProcess = guidline.RecommendProcess; } } EventProductBLL epdBLL = new EventProductBLL(); extUserEvent.Products = epdBLL.GetList(p => p.EVENTID.Equals(userEvent.EventID)).ToList(); return(extUserEvent); }