|
|
@@ -2346,7 +2346,7 @@ group by AcademicYearNo,Semester,DeptNo,MajorNo,LessonNo,TeachClassNo,EmpNo,Les |
|
|
|
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 "); |
|
|
|
strSql.Append("(select count(*) as courses,a.empno,a.empname from ArrangeLessonTerm a where lessondate between '" + starttime + "' and '" + endtime + "' " + notimeSql + " group by a.empno,a.empname ) a "); |
|
|
|
strSql.Append("(select count(*) as courses,a.empno,a.empname from ArrangeLessonTerm a where CheckMark=1 and lessondate between '" + starttime + "' and '" + endtime + "' " + notimeSql + " 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 + "' " + notimeSql2 + " 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 and (b.IsInActiveStatus=" + status + " or (0=" + status + " and b.IsInActiveStatus!=2)) "); |
|
|
|