public BaseViewModel SetVHAStatus(ContentIDandVIDModel model) { BaseViewModel result = new BaseViewModel(); result = _VHelpAreaByVService.SetVHAStatus(model.VID, model.ContentID); return(result); }
public BaseViewModel SetSignBack(ContentIDandVIDModel model) { BaseViewModel result = new BaseViewModel(); result = _VHelpAreaByVService.SetSignBack(model); return(result); }
public ActionResult <VA_HandleGetMyResModel> GetMyAHandleInfo(ContentIDandVIDModel model) { VA_HandleGetMyResModel MyResModel = new VA_HandleGetMyResModel(); MyResModel = _VolunteerActivityService.GetMyAHandleInfo(model); return(MyResModel); }
public string CheckVHA_Sign(ContentIDandVIDModel AddViewModel) { string result = String.Empty; result = _VHelpAreaService.CheckSignAdd(AddViewModel.VID, AddViewModel.ContentID); return(result); }
public BaseViewModel GetVHAStatus(ContentIDandVIDModel AddViewModel) { BaseViewModel result = new BaseViewModel(); result = _VHelpAreaService.GetVHAStatus(AddViewModel.VID, AddViewModel.ContentID); return(result); }
public BaseViewModel CancelSign(ContentIDandVIDModel AddViewModel) { BaseViewModel result = new BaseViewModel(); result = _VolunteerActivityService.CancelVASign(AddViewModel); return(result); }
public BaseViewModel GetVAStatus(ContentIDandVIDModel AddViewModel) { BaseViewModel result = new BaseViewModel(); result = _VolunteerActivityService.GetVAStatus(AddViewModel.VID, AddViewModel.ContentID); return(result); }
public string SetVHAStatusBack(ContentIDandVIDModel AddViewModel) { string result = String.Empty; result = _VHelpAreaService.SetVHAStatusBack(AddViewModel.VID, AddViewModel.ContentID); return(result); }
public BaseViewModel GetVHAByVStatus(ContentIDandVIDModel model) { BaseViewModel result = new BaseViewModel(); result = _VHelpAreaByVService.GetVHAByVStatus(model); return(result); }
public string CheckVA_Sign(ContentIDandVIDModel AddViewModel) { string result = String.Empty; result = _VolunteerActivityService.CheckSignAdd(AddViewModel.VID, AddViewModel.ContentID); return(result); }
//发布者审核 认领人上传的 处理结果信息 审核不通过,志愿者重新上传处理结果 public BaseViewModel SetSignReturn(ContentIDandVIDModel model) { BaseViewModel result = new BaseViewModel(); //该互助信息 VHelpArea area = _IVHelpAreaRepository.SearchInfoByID(model.ContentID); //获取 志愿者 上传的 处理结果的信息进行审核 List <VHA_Sign> list = _IVHA_SignRepository.GetByContentID(model.ContentID, "2"); VHA_Sign item = list.First(); item.opinion = "审核不通过,志愿者重新上传处理结果"; item.Status = "2"; item.UpdateUser = area.CreateUser; item.UpdateDate = DateTime.Now; _IVHA_SignRepository.Update(item); int a = _IVHA_SignRepository.SaveChanges(); //本次处理结果 审核信息通过 VHA_Handle modelHandle = _IVHA_HandleRepository.GetVolunteerHandle(item.bak1); modelHandle.Status = "2"; modelHandle.UpdateUser = area.CreateUser; modelHandle.UpdateDate = DateTime.Now; _IVHA_HandleRepository.Update(modelHandle); int b = _IVHA_HandleRepository.SaveChanges(); if (b > 0) { //提示信息:您认领标题为XXX互助信息,互助信息,处理审核不通过,请重新上传处理结果 Volunteer_MessageMiddle middle = new Volunteer_MessageMiddle(); middle.Contents = "您认领标题为 " + area.Title + " 互助信息,处理审核不通过,请重新上传处理结果"; Volunteer_Info volunteer_Info = _IVolunteerInfoRepository.SearchInfoByID(model.VID); middle.Name = volunteer_Info.Name; middle.VID = volunteer_Info.ID; middle.VNO = volunteer_Info.VNO; Volunteer_Message message = _IMapper.Map <Volunteer_MessageMiddle, Volunteer_Message>(middle); message.ID = Guid.NewGuid().ToString(); message.CreateDate = DateTime.Now; message.CreateUser = model.VID; message.Status = "0"; _IVolunteer_MessageRepository.Add(message); int f = _IVolunteer_MessageRepository.SaveChanges(); result.ResponseCode = 200; result.Message = "操作成功"; } else { result.ResponseCode = 400; result.Message = "操作失败"; } return(result); }
public ActionResult <VHA_HandleGetListResModel> GetHandleInfo(ContentIDandVIDModel AddViewModel) { VHA_HandleGetListResModel MyResModel = new VHA_HandleGetListResModel(); MyResModel.List = _VHelpAreaService.GetMyHandleInfo(AddViewModel.VID, AddViewModel.ContentID); MyResModel.isSuccess = true; MyResModel.TotalNum = MyResModel.List.Count(); MyResModel.baseViewModel.Message = "请求正常"; MyResModel.baseViewModel.ResponseCode = 200; return(MyResModel); }
public ActionResult <VHA_SignInfoMiddle> GetVDetail(ContentIDandVIDModel vidModel) { VHA_SignInfoMiddle model = new VHA_SignInfoMiddle(); model = _VHelpAreaByVService.GetVDetail(vidModel.VID); //查找到 最新的一条 结果记录 VHA_Sign sign = _VHelpAreaByVService.GetVHandleList(vidModel.ContentID, "1"); if (sign != null && sign.ID != null) { model.Signtime = DateTime.Parse(sign.CreateDate.ToString()); } else { model.Signtime = DateTime.Now; } return(model); }
// (小程序端接口) 认领人针对本次认领任务的所有状态 public BaseViewModel GetVHAByVStatus(ContentIDandVIDModel model) { BaseViewModel result = new BaseViewModel(); VHA_Sign res = _IVHA_SignRepository.GetNewSign(model.VID, model.ContentID); if (!String.IsNullOrEmpty(res.ID)) { if (res.flag.Equals("1")) { if (res.Status.Equals("0")) { result.ResponseCode = 1; result.Message = "选择认领人"; } else if (res.Status.Equals("1")) { result.ResponseCode = 2; result.Message = "等待志愿者上传处理结果"; } else if (res.Status.Equals("2")) { result.ResponseCode = 3; result.Message = "未被选择为认领人"; } else if (res.Status.Equals("3")) { result.ResponseCode = 4; result.Message = "认领审核通过,志愿者主动退回,该志愿者本次互助任务终止"; } } else if (res.flag.Equals("2")) { if (res.Status.Equals("0")) { result.ResponseCode = 5; result.Message = "审核处理结果"; } else if (res.Status.Equals("1")) { result.ResponseCode = 6; result.Message = "处理结果审核通过,任务完结"; } else if (res.Status.Equals("2")) { result.ResponseCode = 7; result.Message = "处理结果审核不通过,请志愿者重新上传"; } else if (res.Status.Equals("3")) { if (!String.IsNullOrEmpty(res.opinion)) { result.ResponseCode = 8; result.Message = "处理结果审核不通过,发布者退回,该志愿者本次互助任务终止"; } else { result.ResponseCode = 9; result.Message = "处理结果审核不通过,志愿者主动退回,该志愿者本次互助任务终止"; } } } } else { VHelpArea item = _IVHelpAreaRepository.SearchInfoByID(model.ContentID); if (!String.IsNullOrEmpty(item.ID)) { if (item.Status.Equals("0")) { result.ResponseCode = 11; result.Message = "未认领"; } else if (item.Status.Equals("1")) { result.ResponseCode = 12; result.Message = "已认领"; } else if (item.Status.Equals("2")) { result.ResponseCode = 13; result.Message = "已完结"; } } else { result.ResponseCode = 10; result.Message = "该互助信息有问题,请联系志愿者后台调整。"; } } return(result); }
public string checkTimeNew(ContentIDandVIDModel AddViewModel) { var SearchResult = _VolunteerActivityService.CheckSignsNew(AddViewModel.VID, AddViewModel.ContentID); return(SearchResult); }
//发布者审核 认领人上传的 处理结果信息 审核通过任务完结 public BaseViewModel SetSignPass(ContentIDandVIDModel model) { BaseViewModel result = new BaseViewModel(); var VolunteerInfo = _IVolunteerInfoRepository.SearchInfoByID(model.VID); if (VolunteerInfo == null) { result.ResponseCode = 400; result.Message = "操作失败"; return(result); } //该互助信息 更新状态为 已完结 2 VHelpArea area = _IVHelpAreaRepository.SearchInfoByID(model.ContentID); //获取 志愿者 上传的 处理结果的信息进行审核 List <VHA_Sign> list = _IVHA_SignRepository.GetByContentID(model.ContentID, "2"); VHA_Sign item = list.First(); item.opinion = "审核通过,任务完结"; item.Status = "1"; item.UpdateUser = area.CreateUser; item.UpdateDate = DateTime.Now; _IVHA_SignRepository.Update(item); int a = _IVHA_SignRepository.SaveChanges(); //本次处理结果 审核信息通过 VHA_Handle modelHandle = _IVHA_HandleRepository.GetVolunteerHandle(item.bak1); modelHandle.Status = "1"; modelHandle.UpdateUser = area.CreateUser; modelHandle.UpdateDate = DateTime.Now; _IVHA_HandleRepository.Update(modelHandle); int b = _IVHA_HandleRepository.SaveChanges(); area.Status = "2"; area.UpdateUser = area.CreateUser; area.UpdateDate = DateTime.Now; _IVHelpAreaRepository.Update(area); int c = _IVHelpAreaRepository.SaveChanges(); if (c > 0) { string id = Guid.NewGuid().ToString(); //插入积分表 Volunteer_Score score = new Volunteer_Score(); score.ID = id; score.ContentID = model.ContentID; score.tableName = "VHelpArea"; score.VID = model.VID; score.type = "done"; score.Score = double.Parse(area.Score); score.CreateUser = model.VID; score.CreateDate = DateTime.Now; _IVolunteer_ScoreRepository.Add(score); int n = _IVolunteer_ScoreRepository.SaveChanges(); if (n > 0) { //插入到 泰便利积分表 20200622 ET_points ipointMiddle = new ET_points(); ipointMiddle.ID = id; ipointMiddle.uid = VolunteerInfo.ID; ipointMiddle.points = double.Parse(area.Score); ipointMiddle.type = "VolunteerHelp"; ipointMiddle.tableName = "TedaVolunteerDB.dbo.Volunteer_Score"; ipointMiddle.CreateUser = VolunteerInfo.ID; ipointMiddle.CreateDate = DateTime.Now; eT_PointsRepository.Add(ipointMiddle); int j = eT_PointsRepository.SaveChanges(); } //提示信息:您认领标题为XXX互助信息,互助信息,处理审核通过,任务完结 Volunteer_MessageMiddle middle = new Volunteer_MessageMiddle(); middle.Contents = "您认领标题为 " + area.Title + " 互助信息,处理审核通过,任务完结"; Volunteer_Info volunteer_Info = _IVolunteerInfoRepository.SearchInfoByID(model.VID); middle.Name = volunteer_Info.Name; middle.VID = volunteer_Info.ID; middle.VNO = volunteer_Info.VNO; Volunteer_Message message = _IMapper.Map <Volunteer_MessageMiddle, Volunteer_Message>(middle); message.ID = Guid.NewGuid().ToString(); message.CreateDate = DateTime.Now; message.CreateUser = model.VID; message.Status = "0"; _IVolunteer_MessageRepository.Add(message); int f = _IVolunteer_MessageRepository.SaveChanges(); result.ResponseCode = 200; result.Message = "操作成功"; } else { result.ResponseCode = 400; result.Message = "操作失败"; } return(result); }
public async Task <string> checkTime(ContentIDandVIDModel AddViewModel) { var SearchResult = await _VolunteerActivityService.CheckSigns(AddViewModel.VID, AddViewModel.ContentID); return(SearchResult); }