Browse Source

【修改】课时费统计列表、查询、方法优化;

黑艺新账号
dyy 8 months ago
parent
commit
117fecd5a2
5 changed files with 34 additions and 17 deletions
  1. +3
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ArrangeLessonTermController.cs
  2. +3
    -3
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/PrintCourseStatistic.cshtml
  3. +16
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/coursestatictis.js
  4. +8
    -11
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.cs
  5. +4
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/LessonStatictisEntity.cs

+ 3
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ArrangeLessonTermController.cs View File

@@ -31,6 +31,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
private WeChatConfigIBLL weChatConfigIbll = new WeChatConfigBLL();
private WeChatTempletIBLL weChatTempletIbll = new WeChatTempletBLL();
private CdDeptIBLL cdDeptIBLL = new CdDeptBLL();
private DepartmentIBLL departmentIBLL = new DepartmentBLL();

#region 视图功能

@@ -106,10 +107,10 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
ViewBag.deptName = "";
if (!string.IsNullOrEmpty(deptNo))
{
var deptEntity = cdDeptIBLL.GetCdDeptEntityByNo(deptNo);
var deptEntity = departmentIBLL.GetEntity(deptNo);
if (deptEntity != null)
{
ViewBag.deptName = deptEntity.DeptName;
ViewBag.deptName = deptEntity.F_FullName;
}
}


+ 3
- 3
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/PrintCourseStatistic.cshtml View File

@@ -84,11 +84,11 @@
window.print()
}
var bootstrap = function ($, learun) {
function getZhiwuName(value) {
function getZhiwuName(code,value) {
var result = "";
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'JobGrade',
code: code,
callback: function (_data) {
result = _data.text;
}
@@ -99,7 +99,7 @@
for (var i = 0; i < $('#tableContainer').find('.zhiwu').length; i++) {
var item = $('#tableContainer').find('.zhiwu')[i];
if ($(item).html()) {
$(item).html(getZhiwuName($(item).html()));
$(item).html(getZhiwuName('JobGrade',$(item).html()));
}
};
}, 10);


+ 16
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/coursestatictis.js View File

@@ -22,7 +22,10 @@ var bootstrap = function ($, learun) {
text: "text",
value: "value",
})
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' });
//系部
//$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' });
//部门
$('#DeptNo').lrDataSourceSelect({ code: 'classdata', value: 'id', text: 'name' });
$('#datesearch').lrdate({
dfdata: [
{ name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
@@ -97,6 +100,18 @@ var bootstrap = function ($, learun) {
});
}
},
{
label: '教师职称', name: 'zhicheng', width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'jszc',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{
label: '部门', name: 'dept', width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {


+ 8
- 11
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.cs View File

@@ -2273,22 +2273,19 @@ group by AcademicYearNo,Semester,DeptNo,MajorNo,LessonNo,TeachClassNo,EmpNo,Les
var deptNo = queryParam["deptNo"] == null ? string.Empty : queryParam["deptNo"].ToString();
string starttime = queryParam["StartTime"].IsEmpty() ? DateTime.Now.Date.ToString() : queryParam["StartTime"].ToString();
string endtime = queryParam["EndTime"].IsEmpty() ? DateTime.Now.Date.ToString() : queryParam["EndTime"].ToString();
strSql.Append("select a.*,b.jobrank as zhiwu,b.F_DepartmentId as dept,b.feestandard,b.Weekcourses,ta.actcourses as monthactcourses,ta.actcourses-(" + weeks + "*b.Weekcourses) as zhesuan_monthactcourses, ");
strSql.Append(" case when b.jobrank in(5,6) then (ta.actcourses-" + weeks + "*b.Weekcourses)*b.feestandard ");
strSql.Append("select a.*,b.jobrank as zhiwu,b.ProfessionalTitle as zhicheng,b.F_DepartmentId as dept,b.feestandard,b.Weekcourses,ta.actcourses as monthactcourses,ta.actcourses-(" + weeks + "*b.Weekcourses) as zhesuan_monthactcourses, ");
strSql.Append(" case when ta.actcourses is null then 0 when b.jobrank in(5,6) then (ta.actcourses-" + weeks + "*b.Weekcourses)*b.feestandard ");
strSql.Append(" when b.jobrank in(1,2,3,4) then (case when ta.actcourses<=(" + weeks + "*b.weekcourses)/2 then ta.actcourses*b.feestandard else " + weeks + "*b.weekcourses*b.feestandard/2 end) ");
strSql.Append(" else 0 end as actfeestandard ");
strSql.Append("from ");
if (string.IsNullOrWhiteSpace(deptNo))
{
strSql.Append("(select count(*) as courses,a.empno,a.empname from ArrangeLessonTerm a where lessondate between '" + starttime + "' and '" + endtime + "' group by a.empno,a.empname ) a ");
}
else
{
strSql.Append("(select count(*) as courses,a.empno,a.empname from ArrangeLessonTerm a where DeptNo='" + deptNo + "' and lessondate between '" + starttime + "' and '" + endtime + "' group by a.empno,a.empname ) a ");
}
strSql.Append("(select count(*) as courses,a.empno,a.empname from ArrangeLessonTerm a where lessondate between '" + starttime + "' and '" + endtime + "' group by a.empno,a.empname ) a ");
strSql.Append("left join (select count(*) as actcourses,EmpNo from (select ff.EmpNo,ff.LessonDate,ff.LessonTime from (select aall.* from (select EmpNo,ALTId from Teach_attendance where LessonSortNo='1' and clocktime between '" + starttime + "' and '" + endtime + "' group by EmpNo,ALTId) ee left join ArrangeLessonTerm aall on aall.ALTId=ee.ALTId) ff group by ff.EmpNo,ff.LessonDate,ff.LessonTime) gg group by gg.EmpNo ) ta on ta.empno=a.empno ");
strSql.Append("left join empinfo b on a.empno=b.empno ");
strSql.Append("where a.empno is not null ");
strSql.Append("where a.empno is not null ");
if (!string.IsNullOrEmpty(deptNo))
{
strSql.Append("and b.F_DepartmentId='" + deptNo + "' ");
}
return this.BaseRepository("CollegeMIS").FindList<LessonStatictisEntity>(strSql.ToString(), pagination);

}


+ 4
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/LessonStatictisEntity.cs View File

@@ -25,6 +25,10 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// </summary>
public string zhiwu { get; set; }
/// <summary>
/// 教师职称
/// </summary>
public string zhicheng { get; set; }
/// <summary>
/// 部门
/// </summary>
public string dept { get; set; }


Loading…
Cancel
Save