/// <summary> /// 根据id获取审批规则 /// </summary> /// <param name="request"></param> /// <returns></returns> public GetCorpAduitConfigResponseViewModel GetCorpAduitConfigById(GetCorpAduitConfigRequestViewModel request) { GetCorpAduitConfigResponseViewModel viewModel = new GetCorpAduitConfigResponseViewModel(); if (request.ConfigId.HasValue) { CorpAduitConfigModel corpAduitConfigModel = _getCorpAduitConfigServiceBll.GetCorpAduitConfigById(request.ConfigId.Value); viewModel.AduitConfigRule = Mapper.Map <CorpAduitConfigModel, CorpAduitConfigViewModel>(corpAduitConfigModel); } viewModel.AduitONameList = new List <SortedListViewModel>(); List <CustomerModel> customerModels = _getCustomerServiceBll.GetCustomerByCorpId(request.CorpId); customerModels = customerModels.FindAll(n => n.IsCheckPerson == "T" && n.IsDel == "F" && n.IsLock == "F"); customerModels.ForEach(n => { viewModel.AduitONameList.Add(new SortedListViewModel() { Key = n.Cid, Value = n.RealName }); }); return(viewModel); }
public async Task <ResponseBaseViewModel <GetCorpAduitConfigResponseViewModel> > GetCorpAduitConfig( [FromBody] GetCorpAduitConfigRequestViewModel request) { request.Cid = this.GetCid(); GetCorpAduitConfigResponseViewModel viewModel = new GetCorpAduitConfigResponseViewModel(); await new TaskFactory().StartNew(() => { viewModel = _getCorpAduitConfigApplication.GetCorpAduitConfigById(request); }); ResponseBaseViewModel <GetCorpAduitConfigResponseViewModel> v = new ResponseBaseViewModel <GetCorpAduitConfigResponseViewModel> { Flag = new ResponseCodeViewModel() { Code = 0, MojoryToken = this.GetToken() }, Data = viewModel }; return(v); }