123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106 |
- using Bowin.Common.Utility;
- using Bowin.Web.Controls.Mvc;
- using Bowin.Common.Data;
- using EMIS.CommonLogic.ChargeManage.ChargeSituation;
- using EMIS.ViewModel;
- using EMIS.Web.Controls;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- using System.Web.Mvc;
- using EMIS.Utility;
- namespace EMIS.Web.Controllers.StudentSystem.Charge
- {
- [Authorization]
- public class PersonalPaymentController : Controller
- {
- public IStudentChargeServices StudentChargeServices { get; set; }
- /// <summary>
- /// 缴费信息(学生平台)
- /// </summary>
- /// <returns></returns>
- public ActionResult List()
- {
- return View();
- }
- /// <summary>
- /// 缴费信息列表查询(学生平台)
- /// </summary>
- /// <param name="pararms"></param>
- /// <returns></returns>
- [HttpPost]
- public ActionResult List(QueryParamsModel pararms)
- {
- ConfiguretView configuretView = ConfiguretExtensions.GetConfiguretermsView(pararms);
- //登录用户user
- var user = EMIS.Utility.FormValidate.CustomPrincipal.Current;
- var chargeYearID = pararms.getExtraInt("ChargeYearDropDown") == DropdownList.SELECT_ALL ? null : pararms.getExtraInt("ChargeYearDropDown");
- var chargeProjectID = pararms.getExtraGuid("ChargeProjectComboGrid");
- var chargeTagID = pararms.getExtraInt("DictionaryChargeTag") == DropdownList.SELECT_ALL ? null : pararms.getExtraInt("DictionaryChargeTag");
- //欠费状态
- var isArrear = pararms.getExtraInt("IsArrearDropDown") == DropdownList.SELECT_ALL ? null : pararms.getExtraInt("IsArrearDropDown");
- return base.Json(StudentChargeServices.GetPersonalPaymentViewGrid(configuretView, user.UserID, chargeYearID,
- chargeProjectID, chargeTagID, isArrear, (int)pararms.page, (int)pararms.rows));
- }
- /// <summary>
- /// 导出Excel
- /// </summary>
- /// <returns></returns>
- [HttpPost]
- public ActionResult Excel()
- {
- NpoiExcelHelper neh = new NpoiExcelHelper();
- ConfiguretView configuretView = ConfiguretExtensions.GetConfiguretermsView(null);
- var user = EMIS.Utility.FormValidate.CustomPrincipal.Current;
- var chargeYearID = Request.Form["ChargeYearDropDown"].ParseStrTo<int>() == DropdownList.SELECT_ALL ? null : Request.Form["ChargeYearDropDown"].ParseStrTo<int>();
- var chargeProjectID = Request.Form["ChargeProjectComboGrid"].ParseStrTo<Guid>();
- var chargeTagID = Request.Form["DictionaryChargeTag"].ParseStrTo<int>() == DropdownList.SELECT_ALL ? null : Request.Form["DictionaryChargeTag"].ParseStrTo<int>();
- //欠费状态
- var isArrear = Request.Form["IsArrearDropDown"].ParseStrTo<int>() == DropdownList.SELECT_ALL ? null : Request.Form["IsArrearDropDown"].ParseStrTo<int>();
- var dt = StudentChargeServices.GetPersonalPaymentViewList(configuretView, user.UserID, chargeYearID, chargeProjectID,
- chargeTagID, isArrear)
- .Select(x => new
- {
- x.StudentNo,
- x.UserName,
- x.SexName,
- x.ClassNo,
- x.ClassName,
- x.GradeMajorCode,
- x.GradeMajoyStr,
- x.CollegeCode,
- x.CollegeStr,
- x.ChargeYear,
- x.ChargeProjectStr,
- x.ActualAmount,
- x.ChargeTagName,
- x.PaidAmount,
- x.IsArrearName,
- x.InSchoolStatusName,
- x.Remark
- }).ToTable();
- string[] liststring = { "学号", "姓名", "性别", "班级编号", "班级名称", "年级专业编号", "年级专业名称",
- RSL.Get("CollegeCode"), RSL.Get("CollegeName"), "缴费学年", "收费项目",
- "实收金额", "缴费标记", "已缴金额", "欠费状态", "在校状态", "备注"
- };
- neh.Export(dt, liststring, "缴费信息" + DateTime.Now.ToString("yyyyMMdd") + "(" + user.Name.ToString() + ")");
- return Json(new ReturnMessage()
- {
- IsSuccess = true,
- Message = "导出成功。"
- });
- }
- }
- }
|