public ActionResult Index(string code) { U_WeChatUserID userInfo = new U_WeChatUserID(); string accessToken = Common.WeChatPush.WeChatTools.GetAccessoken(); string userInfoStr = Common.WeChatPush.WeChatTools.GetUserInfoByCode(accessToken, code); userInfo = Common.JsonHelper.JsonToModel <U_WeChatUserID>(userInfoStr);//用户ID //userInfo.UserId = "18936495119"; Business_Personnel_Information personInfoModel = _logic.GetUserInfo(userInfo.UserId); Personnel_Info Personnel = getPersonnelInfo(personInfoModel); Master_Organization organizationDetail = new Master_Organization(); organizationDetail = _ol.GetOrganizationDetail(personInfoModel.OwnedFleet.ToString()); Business_HomecomingSurvey bhs = _hsl.GetHomecomingSurvey(userInfo.UserId, DateTime.Now.Year.ToString()); if (bhs == null) { bhs = new Business_HomecomingSurvey(); bhs.Name = personInfoModel != null ? personInfoModel.Name : ""; bhs.Year = DateTime.Now.Year.ToString(); bhs.CreatedUser = userInfo.UserId; } bhs.OrganizationName = organizationDetail.OrganizationName; if (Personnel != null) { bhs.Fleet = Personnel.MotorcadeName; bhs.LicensePlate = Personnel.CabLicense; } return(View(bhs)); }
/// <summary> /// 获取人员详细信息 /// </summary> /// <param name="userID"></param> /// <returns></returns> public Business_Personnel_Information GetUserInfo(string userID) { Business_Personnel_Information personModel = new Business_Personnel_Information(); personModel = _logic.GetUserInfo(userID); return(personModel); }
public ActionResult Index(string code) { U_WeChatUserID userInfo = new U_WeChatUserID(); string accessToken = Common.WeChatPush.WeChatTools.GetAccessoken(); string userInfoStr = Common.WeChatPush.WeChatTools.GetUserInfoByCode(accessToken, code); userInfo = Common.JsonHelper.JsonToModel <U_WeChatUserID>(userInfoStr);//用户ID //userInfo.UserId = "13524338060"; DateTime currentDate = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd")); Business_Personnel_Information personInfoModel = _logic.GetUserInfo(userInfo.UserId); //Business_VehicleRepairComplaints vrc = _bvrc.GetVehicleRepairComplaint(userInfo.UserId, currentDate); Business_VehicleRepairComplaints vrc = null; if (vrc == null) { vrc = new Business_VehicleRepairComplaints(); vrc.ReflectJobNumber = personInfoModel.JobNumber; //vrc.CarNumber = personInfoModel.LicensePlate; vrc.ContactNumber = personInfoModel.PhoneNumber; vrc.ReflectName = personInfoModel != null ? personInfoModel.Name : ""; vrc.ReflectDate = currentDate; vrc.CreateUser = userInfo.UserId; } return(View(vrc)); }
public ActionResult Index(string code) { U_WeChatUserID userInfo = new U_WeChatUserID(); string accessToken = Common.WeChatPush.WeChatTools.GetAccessoken(); string userInfoStr = Common.WeChatPush.WeChatTools.GetUserInfoByCode(accessToken, code); userInfo = Common.JsonHelper.JsonToModel <U_WeChatUserID>(userInfoStr);//用户ID //userInfo.UserId = "18936495119"; Business_Personnel_Information personInfoModel = _logic.GetUserInfo(userInfo.UserId); Personnel_Info Personnel = getPersonnelInfo(personInfoModel); Master_Organization organizationDetail = new Master_Organization(); organizationDetail = _ol.GetOrganizationDetail(personInfoModel.OwnedFleet.ToString()); Business_SurveyVaccination bsv = GetSurveyVaccination(userInfo.UserId); if (bsv == null) { bsv = new Business_SurveyVaccination(); bsv.Name = personInfoModel != null ? personInfoModel.Name : ""; bsv.UserID = userInfo.UserId; } //if (Personnel != null) //{ // bhs.Fleet = Personnel.MotorcadeName; // bhs.LicensePlate = Personnel.CabLicense; //} return(View(bsv)); }