123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- using System.Web.Mvc;
- using EMIS.CommonLogic.PaymentManage;
- using EMIS.ViewModel;
- using EMIS.Web.Controls;
- using Bowin.Common.Data;
- using Bowin.Web.Controls.Mvc;
- using Bowin.Common.Utility;
- using EMIS.Utility;
- namespace EMIS.Web.Controllers.PaymentManage
- {
- [Authorization]
- public class PaymentController : Controller
- {
- public IPaymentServices PaymentServices { get; set; }
- public ActionResult List()
- {
- return View();
- }
- public ActionResult CollegeTeacherReport()
- {
- return View();
- }
- public ActionResult CollegeTeacherMonthReport()
- {
- return View();
- }
- public ActionResult MonthlyReport()
- {
- return View();
- }
- public ActionResult GradeyearReport()
- {
- return View();
- }
- public ActionResult WorktimeTotalReport()
- {
- return View();
- }
- [HttpPost]
- public ActionResult List(QueryParamsModel pararms)
- {
- ConfiguretView configuretView = ConfiguretExtensions.GetConfiguretermsView(pararms);
- var schoolyearID = pararms.getExtraGuid("ddlSchoolYear");
- var collegeID = pararms.getExtraGuid("cbgCollege");
- var titleID = pararms.getExtraInt("ddlTitle") == DropdownList.SELECT_ALL ? null : pararms.getExtraInt("ddlTitle");
- var list = PaymentServices.GetPaymentDetailViewList(configuretView, schoolyearID, collegeID, titleID, pararms.page.Value, pararms.rows.Value);
- return Json(list);
- }
- /// <summary>
- /// 导出Excel
- /// </summary>
- /// <returns></returns>
- [HttpPost]
- public ActionResult Excel()
- {
- NpoiExcelHelper neh = new NpoiExcelHelper();
- ConfiguretView configuretView = ConfiguretExtensions.GetConfiguretermsView(null);
- var schoolyearID = Request.Form["ddlSchoolYear"].ParseStrTo<Guid>();
- var collegeID = Request.Form["cbgCollege"].ParseStrTo<Guid>();
- var titleID = Request.Form["ddlTitle"].ParseStrTo<int>() == DropdownList.SELECT_ALL ? null : Request.Form["ddlTitle"].ParseStrTo<int>();
- var dt = PaymentServices.GetPaymentDetailViewList(configuretView, schoolyearID, collegeID, titleID).Select(x => new
- {
- x.SchoolyearCode,
- x.CollegeName,
- x.UserName,
- x.TeacherTypeDesc,
- x.TitleDesc,
- PaymentStandard = string.Format("{0:#0.00}", x.PaymentStandard),
- x.EducationDesc,
- x.LearningformDesc,
- x.LearningformRate,
- StudentCount = (x.StudentCount ?? 0).ToString(),
- ExemptionCount = (x.ExemptionCount ?? 0).ToString(),
- ActualStudentCount = (x.ActualStudentCount ?? 0).ToString(),
- StudentCountRate = (x.StudentCountRate ?? 0).ToString(),
- RetakeStudentCount = (x.RetakeStudentCount ?? 0).ToString(),
- ScheduleDayCount = (x.ScheduleDayCount ?? 0).ToString(),
- ActualScheduleHours = (x.ActualScheduleHours ?? 0).ToString(),
- HoursPayment = string.Format("{0:#0.00}", x.HoursPayment),
- PracticeHours = (x.PracticeHours ?? 0).ToString(),
- PracticeRate = string.Format("{0:#0.00}", x.PracticeRate),
- PracticePayment = string.Format("{0:#0.00}", x.PracticePayment),
- TotalPayment = string.Format("{0:#0.00}", x.TotalPayment),
- x.ClasamajorName,
- x.CoursematerialName,
- PlanTotalHours = (x.PlanTotalHours ?? 0).ToString(),
- x.TimeSegmentDesc,
- x.ExaminationModeDesc
- }).ToTable();
- string[] liststring = { "学年学期", RSL.Get("College"), "任课老师", "教师类型", "职称", "标准课酬", RSL.Get("EducationID"), "学习形式", "形式系数", "班级人数",
- "免考人数", "实际人数", "人数系数", "重修人数", "排课天数", "实际学时", "课时课酬", "实践学时", "实践系数", "实践课酬",
- "总课酬", "班级名称", "课程名称", "计划学时", "课时类别", "考核方式" };
- neh.Export(dt, liststring, "教师课酬列表");
- return RedirectToAction("MsgShow", "Common", new
- {
- msg = "导出成功!",
- url = Url.Action("List").AddMenuParameter()
- });
- }
- /// <summary>
- /// 导出Excel
- /// </summary>
- /// <returns></returns>
- [HttpPost]
- public ActionResult ExcelTotal()
- {
- NpoiExcelHelper neh = new NpoiExcelHelper();
- ConfiguretView configuretView = ConfiguretExtensions.GetConfiguretermsView(null);
- var schoolyearID = Request.Form["ddlSchoolYear"].ParseStrTo<Guid>();
- var collegeID = Request.Form["cbgCollege"].ParseStrTo<Guid>();
- var titleID = Request.Form["ddlTitle"].ParseStrTo<int>() == DropdownList.SELECT_ALL ? null : Request.Form["ddlTitle"].ParseStrTo<int>();
- var dt = PaymentServices.GetPaymentTotalViewList(configuretView, schoolyearID, collegeID, titleID).Select(x => new
- {
- x.CollegeName,
- x.UserName,
- x.Account,
- TotalPayment = string.Format("{0:#0.00}", x.TotalPayment ?? 0)
- }).ToTable();
- string[] liststring = { RSL.Get("College"), "任课老师", "工商银行账号", "总课酬(元)" };
- neh.Export(dt, liststring, "教师课酬汇总表");
- return RedirectToAction("MsgShow", "Common", new
- {
- msg = "导出成功!",
- url = Url.Action("List").AddMenuParameter()
- });
- }
- }
- }
|