protected string getStudentStatus(int type) { string str = ""; switch (type) { case 0: str = "你还未缴费报名,请尽快报名!"; break; case 1: str = "你处在初试阶段,未进入复试。"; break; case 2: str = "你处在初试阶段,未进入复试。"; break; case 3: str = "你处在复试阶段,未进入文考。"; break; case 4: str = "你处在复试阶段,未录取。"; break; case 5: str = "<b style='color:red;'>恭喜你,你已被我院正式录取!!</b>"; break; default: str = ""; break; } var _model = new BLL.CCOM.Transcript().GetModel(" Period_id=" + period_id + " AND User_id=" + user_id); if (_model != null) { string txt = ""; txt += " 你的成绩如下:<br/><br/>"; txt += "<table width='100%' border='0' cellspacing='0' cellpadding='0' class='table table-striped table-bordered table-hover'><tbody>"; string th = "<tr><th>名称</th><th>成绩/序</th></tr>"; string td = ""; td += "<tr><td>专业成绩</td><td>" + ((decimal)_model.Transcript_AEE_score).ToString("F2") + "</td></tr>"; td += "<tr><td>专业平均序</td><td>" + ((decimal)_model.Transcript_AEE_sequence).ToString("F2") + "</td></tr>"; td += "<tr><td>专业排名</td><td>" + ((decimal)_model.Transcript_AEE_ranking).ToString("F2") + "</td></tr>"; if (_model.Transcript_CEE_score != null) { td += "<tr><td>高考成绩</td><td>" + ((decimal)_model.Transcript_CEE_score).ToString("F2") + "</td></tr>"; td += "<tr><td>高考折合分(百分制)</td><td>" + ((decimal)_model.Transcript_CEE_convert_score).ToString("F2") + "</td></tr>"; td += "<tr><td>高考成绩是否过线</td><td>" + (_model.Transcript_passline == true ? "是" : "否") + "</td></tr>"; td += "<tr><td>最终成绩</td><td>" + ((decimal)_model.Transcript_score).ToString("F2") + "</td></tr>"; } else { td += "<tr><td>高考成绩</td><td></td></tr>"; td += "<tr><td>高考折合分(百分制)</td><td></td></tr>"; td += "<tr><td>高考成绩是否过线</td><td></td></tr>"; td += "<tr><td>最终成绩</td><td></td></tr>"; } txt += th + td; txt += "</tbody></table>"; str += txt; } return(str); }
public string getIntoCEE(string _up_calculation_status, string _user_id) { int num = Convert.ToInt32(_up_calculation_status); if (num > 3) { string str = " User_id=" + _user_id + " AND Period_id=" + period_id; var model1 = new BLL.CCOM.Transcript().GetModel(str); if (model1 != null) { int t = model1.Transcript_type; if (t == 1) { return("备取"); } else if (t == 2) { return("合格"); } else if (t == 3) { return("正取"); } } return("不取"); } else { if (this.hasCEE == true) { return(""); } else { return("不取"); } } }
protected void btnSelectCEE_Click(object sender, EventArgs e) { string order = "Epss_score DESC, Epss_sequence DESC ,UP_CCOM_number asc"; string strWhere = CombSqlTxt(this.keywords); try { //var bll = new BLL.CCOM.View_Preliminary_Score(); //List<Model.CCOM.View_Preliminary_Score> modelList = bll.GetModelList(strWhere + " order by " + order); var bll = new BLL.CCOM.Transcript(); var bll1 = new BLL.CCOM.Examination_AEE_score(); var bll2 = new BLL.CCOM.User_property(); //增加只导出选择部分学生的功能 string name = ""; for (int i = 0; i < rptList.Items.Count; i++) { HiddenField hf = (HiddenField)rptList.Items[i].FindControl("hidChkId"); string _user_id = hf.Value; DropDownList dd = (DropDownList)rptList.Items[i].FindControl("ddlType"); string type = dd.SelectedValue; if (type.Equals("0")) { var model = bll.GetModel(" User_id=" + _user_id + " AND Period_id=" + period_id); if (model != null) { bll.Delete(model.Transcript_id); } var usermodel = bll2.GetModel(" User_id=" + _user_id + " AND Period_id=" + period_id); usermodel.UP_calculation_status = 3; bll2.Update(usermodel); } else { var AEEmodel = bll1.GetModel(" User_id=" + _user_id + " AND Period_id=" + period_id); var model = bll.GetModel(" User_id=" + _user_id + " AND Period_id=" + period_id); var _model = new Model.CCOM.Transcript(); if (model != null) { model.Transcript_AEE_score = AEEmodel.AEE_score; model.Transcript_AEE_ranking = AEEmodel.AEE_ranking; model.Transcript_AEE_sequence = AEEmodel.AEE_sequence; model.Transcript_type = Convert.ToInt16(type); bll.Update(model); } else { _model.Transcript_type = Convert.ToInt16(type); _model.Transcript_AEE_score = AEEmodel.AEE_score; _model.Transcript_AEE_ranking = AEEmodel.AEE_ranking; _model.Transcript_AEE_sequence = AEEmodel.AEE_sequence; _model.Period_id = period_id; _model.User_id = (long)AEEmodel.User_id; bll.Add(_model); } var usermodel = bll2.GetModel(" User_id=" + _user_id + " AND Period_id=" + period_id); usermodel.UP_calculation_status = 4; bll2.Update(usermodel); } } JscriptMsg("已添加进入文考名单", "SelectToCEE.aspx?fun_id=" + DESEncrypt.Encrypt(this.fun_id) + "&keywords=" + this.txtKeywords.Text + "&major_id=" + DESEncrypt.Encrypt(this.major_id), "Success"); } catch { JscriptMsg("添加进入文考名单出错", "", "Error"); } }
/// <summary> /// 计算成绩,计算这个App_CCOM_TestScores表中 ShiJian是当前年份的记录 /// 要求该表中以下字段不为空:UserID、SchoolUserID、WenLi、ZongFen、ZhuanYeMingCheng、ZhuanYeFenShu、ShiJian,SchoolUser_HomeProvince /// 最终计算的出WenKaoGuoXian、WenKeFenShu、以及ZuiZhongFenShu /// 计算规则:先判断其文考成绩是否过线(根据各省分数线以及不同专业的那个要求);而后将理科考生的成绩按照公式转化为文科成绩,文科考生不做处理; /// 紧接着将文科成绩按照公式转化为百分制;最后文科成绩和艺术专业成绩按照各50%计算出最终成绩。 /// </summary> /// <returns></returns> public bool Calculate(string major_id) { //calculateFenShuXian(); try { BLL.CCOM.View_TotalScore bll = new BLL.CCOM.View_TotalScore(); var userList = bll.GetModelList(" Period_id=" + period_id + " AND Agency_id=" + major_id); //本年度的学生 foreach (var user in userList) { var userInfo = new BLL.CCOM.User_property().GetModel(" User_id=" + user.User_id); var userCEE = new BLL.CCOM.Examination_CEE_score().GetModel(" User_id=" + user.User_id + " AND Period_id=" + period_id); var model = new BLL.CCOM.Transcript().GetModel(" User_id=" + user.User_id + " AND Period_id=" + period_id); if (userInfo != null) { var fenshuxian = new BLL.CCOM.Fractional_line().GetModelList("Fl_Province = " + userInfo.UP_province + " and Period_id = " + period_id); if (fenshuxian == null || fenshuxian.Count == 0) { continue; } int WenLi = (int)(userCEE.CEE_type); ///判断是否过线 string zhuanye = new BLL.CCOM.Agency().GetModel("Agency_id=" + major_id).Agency_name; var guoxianfen = guoxianFen(zhuanye, WenLi, fenshuxian[0]); if (guoxianfen == 0) { continue; } bool passline = false; if (guoxianfen <= Convert.ToDecimal(userCEE.CEE_score)) { passline = true; } else { passline = false; } decimal wenkaofenshu = (decimal)userCEE.CEE_score; if (WenLi == 2) //理科 { wenkaofenshu = wenkaofenshu / (decimal)fenshuxian[0].LiKeSanBen * (decimal)fenshuxian[0].WenKeSanBen; } wenkaofenshu = wenkaofenshu / (decimal)fenshuxian[0].WenKeZongFen * 100; //转换为百分制 user.Transcript_CEE_convert_score = wenkaofenshu; user.Transcript_CEE_score = userCEE.CEE_score; decimal score = 0; if (zhuanye == "音乐学" || zhuanye == "音乐艺术管理" || zhuanye == "音乐治疗" || zhuanye == "音乐教育" || zhuanye == "音乐教育(协作计划)") { score = wenkaofenshu * (decimal)0.5 + (decimal)user.Transcript_AEE_score * (decimal)0.5; } else { score = (decimal)user.Transcript_AEE_score; } model.Transcript_CEE_score = userCEE.CEE_score; model.Transcript_CEE_convert_score = wenkaofenshu; model.Transcript_passline = passline; model.Transcript_score = score; } new BLL.CCOM.Transcript().Update(model); } } catch { } return(true); }