public ActionResult Add(string businType = "Question", long projectId = 0, long BusinessId = 0, string componentIds = "[]") { ViewBag.Title = "新增问题"; ViewBag.BusinessType = typeof(BusinessType).AsSelectList(true, businType); ViewBag.BusinessId = BusinessId; ViewBag.ComponentIds = componentIds; if (projectId == 0) { ViewBag.ProjectId = Session[ConstString.COOKIEPROJECTID]; ViewBag.ProjectName = Session[ConstString.COOKIEPROJECTNAME]; } else { using (ClientSiteClientProxy proxy = new ClientSiteClientProxy(ProxyEx(Request))) { var project = proxy.GetProjectModel(projectId).Data; ViewBag.ProjectId = project.Id.ToString(); ViewBag.ProjectName = project.Name; } } ViewBag.UserName = CurrentUser.UserName; ViewBag.CompanyName = CurrentUser.CompanyName; GetProblemType(); return View(); }
public ActionResult UploadRectifyResultZL(Epm_MonitorRectifRecord model) { ResultView <int> view = new ResultView <int>(); string statu = Request.Form["State"]; model.State = int.Parse(statu.ToEnum <RectificationState>().GetValue().ToString()); List <Base_Files> fileListFile = new List <Base_Files>(); string fileDataJson = Request.Form["fileDataJson"];//获取上传图片json字符串 if (!string.IsNullOrEmpty(fileDataJson)) { fileListFile = JsonConvert.DeserializeObject <List <Base_Files> >(fileDataJson);//将文件信息json字符 } //表单校验 if (string.IsNullOrEmpty(model.Content)) { view.Flag = false; view.Message = "整改内容不能为空"; return(Json(view)); } Result <int> result = new Result <int>(); using (ClientSiteClientProxy proxy = new ClientSiteClientProxy(ProxyEx(Request))) { //result = proxy.AddMonitorRectifRecord(model, fileListFile); } return(Json(result.ToResultView())); }
// GET: AttendanceReport 考勤报表 /// <summary> /// 分公司列表 /// </summary> /// <returns></returns> public ActionResult FilialeIndex(string companyId, string startTime, string endTime, int pageIndex = 1, int pageSize = 10) { ViewBag.startTime = startTime; ViewBag.endTime = endTime; ViewBag.pageIndex = pageIndex; Result <List <AttendanceBranchCountView> > result = new Result <List <AttendanceBranchCountView> >(); using (ClientSiteClientProxy proxy = new ClientSiteClientProxy(ProxyEx(Request))) { companyId = GetComPanyId(); var compamyList = proxy.GetAreaCompanyList(); if (!string.IsNullOrEmpty(companyId)) { long id = Convert.ToInt64(companyId); compamyList.Data = compamyList.Data.Where(t => t.Id == id).ToList(); } //地市公司 ViewBag.companyId = compamyList.Data.ToSelectList("Name", "Id", true); result = proxy.GetBranchCount(companyId, startTime, endTime, pageIndex, pageSize); ViewBag.Total = result.AllRowsCount; } return(View(result.Data)); }
public ActionResult EditCrossingsAndTimeManage(Epm_TimeLimitAndProcedure model) { if (model.ProjectId == 0) { ResultView <int> view = new ResultView <int>(); view.Flag = false; view.Message = "项目id不能为空"; return(Json(view)); } #region 工期和手续提交 //上传附件 List <Epm_TzAttachs> attachs = new List <Epm_TzAttachs>(); string fileDataJson = Request.Form["fileDataJson"];//获取上传文件json字符串--注意附件类型,手续没有类型,给一个默认的类型SHOUXU if (!string.IsNullOrEmpty(fileDataJson)) { var attach = JsonConvert.DeserializeObject <List <Epm_TzAttachs> >(fileDataJson);//将文件信息json字符 attachs.AddRange(attach); model.TzAttachs = attach; } Result <int> result = new Result <int>(); using (ClientSiteClientProxy proxy = new ClientSiteClientProxy(ProxyEx(Request))) { result = proxy.UpdateTimeLimitAndCrossings(model); } #endregion return(Json(result.ToResultView())); }
public ActionResult UpdateState(string ids, string state) { ResultView <int> view = new ResultView <int>(); if (string.IsNullOrEmpty(ids)) { view.Flag = false; view.Message = "请选择要操作的数据"; return(Json(view)); } if (string.IsNullOrEmpty(state)) { view.Flag = false; view.Message = "状态不能为空"; return(Json(view)); } List <long> idList = ids.SplitString(",").ToLongList(); Result <int> result = new Result <int>(); using (ClientSiteClientProxy proxy = new ClientSiteClientProxy(ProxyEx(Request))) { result = proxy.UpdateTzProjectStartApplyState(idList, state); } return(Json(result.ToResultView())); }
public ActionResult UpdateState(long id, string state) { ResultView <int> view = new ResultView <int>(); if (string.IsNullOrEmpty(state)) { view.Flag = false; view.Message = "状态不能为空"; return(Json(view)); } //判断权限 //if ((ApprovalState)Enum.Parse(typeof(ApprovalState), state) == ApprovalState.ApprSuccess) // Helper.IsCheck(HttpContext, WebModule.Change.ToString(), SystemRight.Check.ToString(), true); //else if ((ApprovalState)Enum.Parse(typeof(ApprovalState), state) == ApprovalState.ApprFailure) // Helper.IsCheck(HttpContext, WebModule.Change.ToString(), SystemRight.UnCheck.ToString(), true); //else if ((ApprovalState)Enum.Parse(typeof(ApprovalState), state) == ApprovalState.Discarded) // Helper.IsCheck(HttpContext, WebModule.Change.ToString(), SystemRight.Invalid.ToString(), true); Result <int> result = new Result <int>(); using (ClientSiteClientProxy proxy = new ClientSiteClientProxy(ProxyEx(Request))) { result = proxy.UpdateChangeState(id, state); } return(Json(result.ToResultView())); }
public ActionResult Add(long projectId) { using (ClientSiteClientProxy proxy = new ClientSiteClientProxy(ProxyEx(Request))) { //根据字典类型集合获取字典数据 List <DictionaryType> subjectsList = new List <DictionaryType>() { DictionaryType.NatureLand, DictionaryType.LandUse, DictionaryType.ApprovalInfoFileType, DictionaryType.LandPaymentType, DictionaryType.ProjectType }; var subjects = proxy.GetTypeListByTypes(subjectsList).Data; var result = proxy.GetTzProjectApprovalInfoModel(projectId); // 土地性质 ViewBag.LandStatusCode = subjects[DictionaryType.NatureLand].ToSelectList("Name", "No", true, result.Data.TzProjectApprovalInfo.LandStatusCode ?? ""); // 土地用途 ViewBag.LandUseCode = subjects[DictionaryType.LandUse].ToSelectList("Name", "No", true, result.Data.TzProjectApprovalInfo.LandUseCode ?? ""); // 项目类型 ViewBag.ProjectType = subjects[DictionaryType.ProjectType].ToSelectList("Name", "No", true, result.Data.TzProjectApprovalInfo.ProjectType ?? ""); //附件类型 ViewBag.AnnexType = subjects[DictionaryType.ApprovalInfoFileType].ToList().ToSelectList("Name", "No", true); //土地费用支付类型 ViewBag.LandPaymentType = subjects[DictionaryType.LandPaymentType].ToList(); if (result.Flag == EResultFlag.Success && result.Data != null) { return(View(result.Data)); } return(View()); } }
public ActionResult Edit(Epm_TzProjectPolit model) { ResultView <int> view = new ResultView <int>(); string fileDataJson = Request.Form["fileDataJsonFile"];//获取上传图片json字符串 Result <int> result = new Result <int>(); using (ClientSiteClientProxy proxy = new ClientSiteClientProxy(ProxyEx(Request))) { List <DictionaryType> subjectsList = new List <DictionaryType>() { DictionaryType.PolitFileType }; var subjects = proxy.GetTypeListByTypes(subjectsList).Data; //附件类型 ViewBag.PolitFileType = subjects[DictionaryType.PolitFileType].ToList().ToSelectList("Name", "No", true); if (!string.IsNullOrEmpty(fileDataJson)) { model.TzAttachs = JsonConvert.DeserializeObject <List <Epm_TzAttachs> >(fileDataJson);//将文件信息json字符 } result = proxy.UpdateTzProjectPolit(model); } return(Json(result.ToResultView())); }
/// <summary> /// 供应商管理编辑 /// </summary> /// <returns></returns> public ActionResult SupplierEdit(long id) { using (ClientSiteClientProxy proxy = new ClientSiteClientProxy(ProxyEx(Request))) { //加载数据字典 List <DictionaryType> subjectsList = new List <DictionaryType>() { DictionaryType.SupplierFileType, DictionaryType.ConclusionCode, DictionaryType.SSGLType, DictionaryType.LevelType }; var subjects = proxy.GetTypeListByTypes(subjectsList).Data; var result = proxy.GetCompanyModel(id);//获取详情 //供应商类型 ViewBag.CompanyType = subjects[DictionaryType.SSGLType].ToList().ToSelectList("Name", "No", true, result.Data.CompanyType); //供应商级别 ViewBag.CompanyRank = subjects[DictionaryType.LevelType].ToList().ToSelectList("Name", "No", true, result.Data.CompanyRank); ViewBag.threeBusType = subjects[DictionaryType.SupplierFileType].ToList().ToSelectList("Name", "No", true); if (result.Flag == EResultFlag.Success && result.Data != null) { return(View(result.Data)); } return(View()); } }
public object ValidateToken(string token, int type) { string tempToken = ""; DateTime expiryTime = DateTime.MinValue; Result <Base_User> login = new Result <Base_User>(); using (ClientSiteClientProxy proxy = new ClientSiteClientProxy(ProxyEx(token))) { login = proxy.GetBaseUserByToken(token, type); if (login.Flag == 0) { var data = login.Data; tempToken = type == 1 ? data.AndroidToken : data.IosToken; //模拟用户数据库中的token expiryTime = type == 1 ? data.AndroidTokenTime.Value : data.IosTokenTime.Value; //模拟用户数据库中的token过期时间 } } //没有根据token查到用户 if (token == tempToken && DateTime.Now <= expiryTime) { return(APIResult.GetSuccessResult(new { token })); } return(APIResult.GetErrorResult(MsgCode.InvalidToken)); }
public ActionResult Add(long projectId) { using (ClientSiteClientProxy proxy = new ClientSiteClientProxy(ProxyEx(Request))) { //根据字典类型集合获取字典数据 List <DictionaryType> subjectsList = new List <DictionaryType>() { DictionaryType.OtherInfo, DictionaryType.ReveiewsFileType, DictionaryType.ConclusionCode }; var subjects = proxy.GetTypeListByTypes(subjectsList).Data; var result = proxy.GetTzProjectReveiewsModel(projectId); //附件类型 ViewBag.AnnexType = subjects[DictionaryType.ReveiewsFileType].ToList().ToSelectList("Name", "No", true); //评审结论 ViewBag.ConclusionCode = subjects[DictionaryType.ConclusionCode].ToList(); //其他信息 ViewBag.OtherInfo = subjects[DictionaryType.OtherInfo].ToList(); if (result.Flag == EResultFlag.Success && result.Data != null) { return(View(result.Data)); } return(View()); } }
public ActionResult Add(long projectId) { Result <Epm_Project> result = new Result <Epm_Project>(); using (ClientSiteClientProxy proxy = new ClientSiteClientProxy(ProxyEx(Request))) { result = proxy.GetProjectModel(projectId); var itemResult = proxy.GetCompletionItem(projectId); List <CompletionAcceptanceItemView> list = new List <CompletionAcceptanceItemView>(); if (itemResult.Flag == EResultFlag.Success && itemResult.Data != null) { list = itemResult.Data; } ViewBag.CompletionAcceptanceItemList = list; ViewBag.isAdd = true; } //ViewBag.AcceptanceResult = Enum<EnumState>.AsEnumerable().Where(i => i == EnumState.Must || i == EnumState.UnMust).ToDictionary(i => i.ToString(), j => j.GetText()).ToList().ToSelectList("Value", "Key", true); ViewBag.UserID = CurrentUser.UserId; ViewBag.UserName = CurrentUser.RealName; ViewBag.CompanyId = CurrentUser.CompanyId; ViewBag.CompanyName = CurrentUser.CompanyName; //项目数据 ViewBag.ProjectData = result.Data; return(View()); }
public ActionResult Edit(long id) { Result <CompletionAcceptanceView> result = new Result <CompletionAcceptanceView>(); using (ClientSiteClientProxy proxy = new ClientSiteClientProxy(ProxyEx(Request))) { result = proxy.GetCompletionAcceptanceModelNew(id); var project = proxy.GetProjectModelByTzId(result.Data.CompletionAcceptance.ProjectId.Value); //项目数据 ViewBag.project = project.Data; ViewBag.UserID = CurrentUser.UserId; ViewBag.UserName = CurrentUser.RealName; ViewBag.CompanyId = CurrentUser.CompanyId; ViewBag.CompanyName = CurrentUser.CompanyName; var itemResult = proxy.GetCompletionItem(result.Data.CompletionAcceptance.ProjectId.Value); List <CompletionAcceptanceItemView> list = new List <CompletionAcceptanceItemView>(); if (itemResult.Flag == EResultFlag.Success && itemResult.Data != null) { list = itemResult.Data; } ViewBag.CompletionAcceptanceItemList = list; ViewBag.isAdd = false; } return(View(result.Data)); }
public ActionResult Reply(Epm_QuestionTrack model) { string errorMsg = ""; if (model.QuestionId <= 0) { errorMsg = "请选择要回复的问题!"; } if (string.IsNullOrWhiteSpace(model.Content)) { errorMsg = "请填写回复内容!"; } if (!string.IsNullOrWhiteSpace(errorMsg)) { return Json(new ResultView<bool>() { Flag = false, Data = false, Message = errorMsg }); } using (ClientSiteClientProxy proxy = new ClientSiteClientProxy(ProxyEx(Request))) { var result = proxy.ReplyQuestion(model); return Json(result.ToResultView()); } }
/// <summary> /// 获取用户权限 /// </summary> /// <param name="roleType">用户角色</param> /// <param name="userId">用户 ID</param> private void LoadUserRight(string roleType, long userId) { using (ClientSiteClientProxy proxy = new ClientSiteClientProxy(ProxyEx(Request))) { Result <List <Base_Right> > result = proxy.LoadRightList(roleType, userId); if (result.Flag == EResultFlag.Success) { var list = result.Data.Where(i => i.ParentId == 0 && i.IsMenu).ToList(); List <WebRightNode> rightNodesList = list.Select(p => new WebRightNode() { Id = p.Id, Name = p.DisplayName, Url = p.URL, Target = p.Target, //Sort = p.Sort, Remark = p.Remark, }).ToList(); foreach (var rightNode in rightNodesList) { rightNode.ChildNode = GetChildNode(rightNode.Id, result.Data); } Session[ConstStr_Session.CurrUserRight] = rightNodesList; } } }
public ActionResult ProjectPost(string time = "", int pageIndex = 1, int type = 1, int state = 1, int pageSize = 10) { string stime = ""; if (string.IsNullOrEmpty(time)) { stime = DateTime.Now.ToString("yyyy-MM-dd") + "~" + DateTime.Now.ToString("yyyy-MM-dd"); stime = stime.Split('~')[1]; } else { stime = time.Split('~')[1]; } ViewBag.time = time; ViewBag.pageIndex = pageIndex; using (ClientSiteClientProxy proxy = new ClientSiteClientProxy(ProxyEx(Request))) { //改造项目汇总表 //var projectCount = proxy.GetProjectCount(3, stime); //改造项目汇总 var projectSum = proxy.GetProjectSum(type, stime, state, pageIndex, pageSize); ViewBag.Total = projectSum.AllRowsCount; ViewBag.TotalPage = Math.Ceiling((decimal)projectSum.AllRowsCount / pageSize); return(Json(projectSum.Data)); } }
public ActionResult Edit(ChangeView model) { ResultView <int> view = new ResultView <int>(); //表单校验 if (string.IsNullOrEmpty(model.ChangeName)) { view.Flag = false; view.Message = "名称不能为空"; return(Json(view)); } List <Base_Files> fileList = new List <Base_Files>(); string fileDataJson = Request.Form["fileDataJsonFile"];//获取上传文件json字符串 if (!string.IsNullOrEmpty(fileDataJson)) { fileList = JsonConvert.DeserializeObject <List <Base_Files> >(fileDataJson);//将文件信息json字符 } string dataChangeCompany = Request.Form["CompanyIds"]; if (!string.IsNullOrEmpty(dataChangeCompany)) { model.Epm_ChangeCompany = JsonConvert.DeserializeObject <List <Epm_ChangeCompany> >(dataChangeCompany); } Result <int> result = new Result <int>(); using (ClientSiteClientProxy proxy = new ClientSiteClientProxy(ProxyEx(Request))) { result = proxy.UpdateChange(model, fileList); } return(Json(result.ToResultView())); }
public ActionResult Edit(long id) { Result <Epm_TzTenderingApply> result = new Result <Epm_TzTenderingApply>(); using (ClientSiteClientProxy proxy = new ClientSiteClientProxy(ProxyEx(Request))) { //根据字典类型集合获取字典数据 List <DictionaryType> subjectsList = new List <DictionaryType>() { DictionaryType.TenderingFileType, DictionaryType.BiddingMethod, DictionaryType.TenderingType }; var subjects = proxy.GetTypeListByTypes(subjectsList).Data; //附件类型 ViewBag.AnnexType = subjects[DictionaryType.TenderingFileType].ToList().ToSelectList("Name", "No", true); result = proxy.GetTzTenderingApplyModel(id); //招标方式 ViewBag.BidType = subjects[DictionaryType.BiddingMethod].ToList().ToSelectList("Name", "No", true, result.Data.BidType); //招标类型 ViewBag.TenderingType = subjects[DictionaryType.TenderingType].ToList().ToSelectList("Name", "No", true, result.Data.TenderingType); if (result.Flag == EResultFlag.Success && result.Data != null) { return(View(result.Data)); } return(View()); } }
public ActionResult Delete(long id) { //ResultView<int> view = new ResultView<int>(); //if (string.IsNullOrEmpty(state)) //{ // view.Flag = false; // view.Message = "状态不能为空"; // return Json(view); //} //ApprovalState app; //if (!Enum.TryParse(state, out app)) //{ // view.Flag = false; // view.Message = "状态值不正确"; // return Json(view); //} //if (app != ApprovalState.Enabled || app != ApprovalState.Discarded) //{ // view.Flag = false; // view.Message = "草稿,已废弃状态下,才可删除"; // return Json(view); //} Result <int> result = new Result <int>(); using (ClientSiteClientProxy proxy = new ClientSiteClientProxy(ProxyEx(Request))) { result = proxy.DeleteChangeByIds(new List <long> { id }); } return(Json(result.ToResultView())); }
public ActionResult Detail(long id) { Result <CompletionAcceptanceResUploadView> result = new Result <CompletionAcceptanceResUploadView>(); using (ClientSiteClientProxy proxy = new ClientSiteClientProxy(ProxyEx(Request))) { result = proxy.GetCompletionAcceptanceResUploadModel(id); var project = proxy.GetProjectModelByTzId(result.Data.CompletionAcceptanceResUpload.ProjectId.Value); //项目数据 ViewBag.project = project.Data; var itemResult = proxy.GetCompletionItem(result.Data.CompletionAcceptanceResUpload.ProjectId.Value); List <CompletionAcceptanceItemView> list = new List <CompletionAcceptanceItemView>(); if (itemResult.Flag == EResultFlag.Success && itemResult.Data != null) { list = itemResult.Data; } ViewBag.CompletionAcceptanceItemList = list; ViewBag.isAdd = false; } return(View(result.Data)); }
public ActionResult Edit(long id) { using (ClientSiteClientProxy proxy = new ClientSiteClientProxy(ProxyEx(Request))) { //根据字典类型集合获取字典数据(standardType-示范/标准类别,EnclosureType-附件类型) List <DictionaryType> subjectsList = new List <DictionaryType>() { DictionaryType.StandardType, DictionaryType.EnclosureType }; var subjects = proxy.GetTypeListByTypes(subjectsList).Data; //示范/标准类别 ViewBag.standType = subjects[DictionaryType.StandardType].ToList().ToSelectList("Name", "No", true); //附件类型 ViewBag.enclosureType = subjects[DictionaryType.EnclosureType].ToList().ToSelectList("Name", "No", true); var result = proxy.GetTzDesignSchemeModel(id); if (result.Flag == EResultFlag.Success && result.Data != null) { return(View(result.Data)); } return(View()); } }
public ActionResult Add() { using (ClientSiteClientProxy proxy = new ClientSiteClientProxy(ProxyEx(Request))) { //根据字典类型集合获取字典数据 List <DictionaryType> subjectsList = new List <DictionaryType>() { DictionaryType.ProjectNature, DictionaryType.StationReformType, DictionaryType.StationReformFileType, DictionaryType.CapitalSource, DictionaryType.Limit }; var subjects = proxy.GetTypeListByTypes(subjectsList).Data; //库站改造改造类型 ViewBag.StationReformType = subjects[DictionaryType.StationReformType].ToList().ToSelectList("Name", "No", false); //附件类型 ViewBag.StationReformFileType = subjects[DictionaryType.StationReformFileType].ToList().ToSelectList("Name", "No", true); //资金来源 ViewBag.CapitalSource = subjects[DictionaryType.CapitalSource].ToList(); //上限下限 ViewBag.Limit = subjects[DictionaryType.Limit].ToList(); //地市公司 ViewBag.CompanyName = CurrentUser.CompanyName; ViewBag.CompanyId = CurrentUser.CompanyId; } return(View()); }
public ActionResult Detail(long id) { //Result<Epm_TzProjectStartApply> result = new Result<Epm_TzProjectStartApply>(); //using (ClientSiteClientProxy proxy = new ClientSiteClientProxy(ProxyEx(Request))) //{ // result = proxy.GetTzProjectStartApplyModel(id); // if (result.Flag == EResultFlag.Success && result.Data != null) // { // return View(result.Data); // } // return View(); //} Result <TzStartTenderingAndSupplyView> result = new Result <TzStartTenderingAndSupplyView>(); ResultView <int> view = new ResultView <int>(); using (ClientSiteClientProxy proxy = new ClientSiteClientProxy(ProxyEx(Request))) { //根据字典类型集合获取字典数据 List <DictionaryType> subjectsList = new List <DictionaryType>() { DictionaryType.CapitalSource, DictionaryType.TimeAndCrossingsType }; var subjects = proxy.GetTypeListByTypes(subjectsList).Data; result = proxy.GetTzProjectStartApplyModelAndOther(id); //资金来源 ViewBag.FundsSourceType = subjects[DictionaryType.CapitalSource].ToList().ToSelectList("Name", "No", false, result.Data == null ? "" : result.Data.TzProjectStartApply.FundsSourceType); ViewBag.timeAndCrossingsType = subjects[DictionaryType.TimeAndCrossingsType].ToList().ToSelectList("Name", "No", true);//附件类型 } return(View(result.Data)); }
public ActionResult Detail(long id) { using (ClientSiteClientProxy proxy = new ClientSiteClientProxy(ProxyEx(Request))) { //根据字典类型集合获取字典数据 List <DictionaryType> subjectsList = new List <DictionaryType>() { DictionaryType.StationReformFileType, DictionaryType.StationReformType, DictionaryType.CapitalSource, DictionaryType.Limit }; var subjects = proxy.GetTypeListByTypes(subjectsList).Data; //库站改造改造类型 ViewBag.StationReformType = subjects[DictionaryType.StationReformType].ToList().ToSelectList("Name", "No", true); //附件类型 ViewBag.StationReformFileType = subjects[DictionaryType.StationReformFileType].ToList().ToSelectList("Name", "No", true); //资金来源 ViewBag.CapitalSource = subjects[DictionaryType.CapitalSource].ToList(); //上限下限 ViewBag.Limit = subjects[DictionaryType.Limit].ToList(); var result = proxy.GetReformRecordEntity(id); if (result.Flag == EResultFlag.Success && result.Data != null) { return(View(result.Data)); } return(View()); } }
public ActionResult Add(long projectId) { using (ClientSiteClientProxy proxy = new ClientSiteClientProxy(ProxyEx(Request))) { //根据字典类型集合获取字典数据 List <DictionaryType> subjectsList = new List <DictionaryType>() { DictionaryType.NegotiateResult, DictionaryType.NegotiationFileType }; var subjects = proxy.GetTypeListByTypes(subjectsList).Data; var result = proxy.GetTzLandNegotiationModel(projectId); // 谈判结果 ViewBag.LandNatureCode = subjects[DictionaryType.NegotiateResult].ToSelectList("Name", "No", false, result.Data.TzLandNegotiation.TalkResultType ?? ""); //附件类型 ViewBag.AnnexType = subjects[DictionaryType.NegotiationFileType].ToList().ToSelectList("Name", "No", false); if (result.Flag == EResultFlag.Success && result.Data != null) { return(View(result.Data)); } return(View()); } }
//[AuthCheck(Module = WebModule.Bim, Right = SystemRight.Modify)] public ActionResult Edit(Epm_Bim model) { ResultView <int> view = new ResultView <int>(); //上传模型 string fileDataJson = Request.Form["fileDataJsonFile"]; //获取上传图片json字符串 List <Base_Files> fileListFile = JsonConvert.DeserializeObject <List <Base_Files> >(fileDataJson); //将文件信息json字符 //表单校验 //if (string.IsNullOrEmpty(model.Name)) //{ // view.Flag = false; // view.Message = "名称不能为空"; // return Json(view); //} //if (string.IsNullOrEmpty(model.VersionOrder)) //{ // view.Flag = false; // view.Message = "版本号不能为空"; // return Json(view); //} if (fileListFile != null) { model.BIMState = BIMModelState.BIMLightWeight.ToString(); } Result <int> result = new Result <int>(); using (ClientSiteClientProxy proxy = new ClientSiteClientProxy(ProxyEx(Request))) { result = proxy.UpdateBim(model, fileListFile); } return(Json(result.ToResultView())); }
public object FaceRegistration() { try { var user = CurrentUserView; if (user == null) { throw new Exception("获取用户信息失败!"); } var http = HttpContext.Current; var form = http.Request.Form; string image = form["image"]; string source = RoleType.Supplier.ToString(); using (ClientSiteClientProxy proxy = new ClientSiteClientProxy(ProxyEx(user))) { var userFaceResult = proxy.AddAIUserFaceInfo(user.UserId, image, source); if (userFaceResult.Flag == EResultFlag.Success && userFaceResult.Data == 1) { return(APIResult.GetSuccessResult(MsgCode.Success, "操作成功!")); } else { return(APIResult.GetErrorResult(MsgCode.CommonError, "操作失败!")); } } } catch { return(APIResult.GetErrorResult(MsgCode.UserInfoError, "获取用户信息错误!")); } }
public ActionResult BimModel(long id) { Result <Epm_Bim> result = new Result <Epm_Bim>(); List <Epm_QuestionBIM> list = new List <Epm_QuestionBIM>(); using (ClientSiteClientProxy proxy = new ClientSiteClientProxy(ProxyEx(Request))) { result = proxy.GetBimModel(id); var qbList = proxy.GetComponentListByBimId(id).Data; if (qbList != null) { Epm_QuestionBIM qm = null; foreach (var item in qbList) { qm = new Epm_QuestionBIM(); qm.ComponentId = item.ComponentId; //"1036857218118586368_317829"; qm.ComponentPosition = item.ComponentPosition; // "3157.9013671875,-47.87890625,-298.1455078125,0.7853981633974483,0,0.7853981633974483,-14252.572887584003,-5468.046301073756,-5862.356906876444"; list.Add(qm); } } } ViewBag.ProjectId = result.Data.ProjectId; ViewBag.ProjectName = result.Data.ProjectName; ViewBag.UserName = CurrentUser.RealName; ViewBag.ComponentJson = JsonConvert.SerializeObject(list); return(View(result.Data)); }
/// <summary> /// 根据项目名称查询批次号下拉列表 /// </summary> /// <param name="projectName"></param> /// <returns></returns> public ActionResult GetBatchNoList(string projectName) { Result <List <Epm_Plan> > result = new Result <List <Epm_Plan> >(); QueryCondition qc = new QueryCondition(); if (!string.IsNullOrWhiteSpace(projectName)) { qc.ConditionList.Add(new ConditionExpression() { ExpName = "ProjectName", ExpValue = "%" + projectName + "%", ExpLogical = eLogicalOperator.And, ExpOperater = eConditionOperator.Like }); } qc.PageInfo.isAllowPage = false; using (ClientSiteClientProxy proxy = new ClientSiteClientProxy(ProxyEx(Request))) { result = proxy.GetPlanList(qc); } var list = result.Data.GroupBy(p => new { p.BatchNo }).Select(p => p.First()).ToList(); if (list.Count == 0) { list = new List <Epm_Plan>(); } //获取批次号下拉数据 var BatchNoList = list.ToSelectList("BatchNo", "Id", true); return(Json(BatchNoList)); }
public ActionResult Detail(long id, int type = 1) { ViewBag.detail = type; Result <Epm_DangerousWork> result = new Result <Epm_DangerousWork>(); using (ClientSiteClientProxy proxy = new ClientSiteClientProxy(ProxyEx(Request))) { List <DictionaryType> list = new List <DictionaryType>() { DictionaryType.WorkType }; var dic = proxy.GetTypeListByTypes(list).Data; ViewBag.WorkType = dic[DictionaryType.WorkType].ToSelectList("Name", "No", true); result = proxy.GetDangerousWorkModel(id); QueryCondition qc = new QueryCondition(); qc.PageInfo.isAllowPage = false; qc.ConditionList.Add(new ConditionExpression() { ExpName = "WorkId", ExpValue = id, ExpLogical = eLogicalOperator.And, ExpOperater = eConditionOperator.Equal }); ViewBag.RealSceneList = proxy.GetWorkRealSceneList(qc).Data; } return(View(result.Data)); }