/// <summary> /// 页面参数值 /// </summary> protected override void InitVariables() { Bundle bundle = Intent.Extras; if (bundle != null) { var renewJsonStr = bundle.GetString("renewJsonStr"); currRenewInfo = JsonSerializer.ToObject <Statistics_ClassRenewSummary>(renewJsonStr); } picasso = Picasso.With(CurrContext); }
/// <summary> /// /// </summary> /// <param name="schoolId"></param> /// <param name="schoolId">学校Id</param> /// <param name="year">财年,例如:2018</param> /// <param name="quarter">季度,例如:Q1即写1</param> /// <param name="grade">年级(多选用,分隔),例如:初一,初二,高二</param> /// <param name="district">区域,例如:东南区</param> /// <param name="teacherCode">教师编号</param> /// <param name="needTotal">是否需要总计行,0-否;1-是</param> /// <param name="sortType">排序列:原班人数倒序(默认);1-原班人数升序;2-原班人数倒序;3-续班人数升序;4-续班人数倒序;5-平均续班率升序;6-平均续班率倒序。</param> /// <param name="classStatus">班级开课状态:0-开课中(默认),3-全部</param> /// <returns></returns> public static ResultData_RenewInfoInClass GetRenewInfoInClassByTeacher(int schoolId, int year, int quarter, string grade, string district, string teacherCode, int needTotal = 1, int sortType = 6, int?classStatus = 0) { if (sortType == 0) { sortType = 6; } if (district == "全部区域") { district = ""; } var beginDate = ""; var endDate = ""; if (classStatus == 1) { var tupleDate = GetSeasonDateSpan(year, quarter); beginDate = tupleDate.Item1; endDate = tupleDate.Item2; } var tuple = GetYearSeason(year, quarter); year = tuple.Item1; quarter = tuple.Item2; var data = new ResultData_RenewInfoInClass(); try { var apiUrl = Config.RenewApiUrl; var method = "GetRenewInfoInClassByTeacher"; var dict = new Dictionary <string, string>(); dict.Add("method", method); dict.Add("schoolId", schoolId.ToString()); dict.Add("Year", year.ToString()); dict.Add("Quarter", quarter.ToString()); dict.Add("Grade", grade); dict.Add("District", district); dict.Add("TeacherCode", teacherCode); dict.Add("NeedTotal", needTotal.ToString()); dict.Add("SortType", sortType.ToString()); dict.Add("BeginDate", beginDate); dict.Add("EndDate", endDate); var sign = Helper.GetSign(dict); dict.Add("sign", sign); var result = Helper.DoPost(apiUrl, dict); //提交post请求 result = result.Replace("\r\n", "").Replace("\\", ""); var resultData = Helper.FromJsonTo <Result <ResultData_RenewInfoInClass> >(result); if (resultData.State == 1 && resultData.Data != null) { data = resultData.Data; var renewInfoList = data.RenewInfo; if (renewInfoList == null) { renewInfoList = new List <Statistics_ClassRenewSummary>(); } var renewInfo = new Statistics_ClassRenewSummary(); renewInfo.ClassName = "总计"; renewInfo.TotalStudentNum = data.TotalNum; renewInfo.RenewStudentNum = data.RenewNum; renewInfo.RenewRate = data.RenewRate; renewInfoList.Add(renewInfo); data.RenewInfo = renewInfoList; return(data); } return(data); } catch (Exception ex) { return(data); } }