Parcourir la source

修改班级成绩初始化漏F_SchoolId问题

怀来职教中心中职
liangkun il y a 1 an
Parent
révision
cac061721b
2 fichiers modifiés avec 37 ajouts et 17 suppressions
  1. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/WeixinApi.cs
  2. +35
    -15
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreService.cs

+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/WeixinApi.cs Voir le fichier

@@ -268,12 +268,12 @@ namespace Learun.Application.WebApi.Modules
}
else
{
return Fail("2.getticket 微信授权失败,请重试。" + weixinjsapiticketobj.errcode + weixinjsapiticketobj.errmsg);
return Fail("2.getticket 微信授权失败,请重试。" + weixinjsapiticketobj.errcode + weixinjsapiticketobj.errmsg+ ",access_tokenjson:" + responsejson);
}
}
else
{
return Fail("1.token 微信授权失败,请重试。" + weixintokenobj.errcode + weixintokenobj.errmsg);
return Fail("1.token 微信授权失败,请重试。" + weixintokenobj.errcode + weixintokenobj.errmsg+weixintokenobj.errcodeValue);
}
}
else


+ 35
- 15
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreService.cs Voir le fichier

@@ -886,6 +886,8 @@ where AcademicYearNo='" + strAcademicYear + "' and Semester='" + strSemester + "
this.BaseRepository("CollegeMIS").ExecuteBySql("delete from StuSelectLessonList where AcademicYearNo='" + academicYearNo + "' and Semester='" + semester + "' and ClassNo='" + classNo + "' ");
//清空StuScore
this.BaseRepository("CollegeMIS").ExecuteBySql("delete from StuScore where AcademicYearNo='" + academicYearNo + "' and Semester='" + semester + "' and ClassNo='" + classNo + "' and LessonSortNo='1' ");
//清空成绩单
this.BaseRepository("CollegeMIS").ExecuteBySql("delete from EmpReportCard where AcademicYearNo='" + academicYearNo + "' and Semester='" + semester + "' and ClassNo='" + classNo + "' and LessonSortNo='1' ");
//重置StuSelectLessonList
var lessonData = this.BaseRepository("CollegeMIS").FindList<LessonInfoEntity>();
var TeachClassData = this.BaseRepository("CollegeMIS").FindList<TeachClassEntity>(x => x.AcademicYearNo == academicYearNo && x.Semester == semester && x.TeachClassNo == classNo);
@@ -926,8 +928,9 @@ where AcademicYearNo='" + strAcademicYear + "' and Semester='" + strSemester + "
insertDatastuselect.IsInEffect = "1";
insertDatastuselect.EmpNo = itemteachclass.EmpNo;
insertDatastuselect.IsPitchOn = "1";
insertDatastuselect.CheckMark = "0";
insertDatastuselect.CheckMark = "1";
insertDatastuselect.InsertTime = DateTime.Now;
insertDatastuselect.F_SchoolId = itemteachclass.F_SchoolId;
if (stuSelectLessonListEntityData.Count(m => m.StuNo == insertDatastuselect.StuNo &&
m.AcademicYearNo == insertDatastuselect.AcademicYearNo &&
m.Semester == insertDatastuselect.Semester &&
@@ -936,7 +939,8 @@ where AcademicYearNo='" + strAcademicYear + "' and Semester='" + strSemester + "
m.LessonNo == insertDatastuselect.LessonNo &&
m.Grade == insertDatastuselect.Grade &&
m.OpenLessonDeptNo == insertDatastuselect.OpenLessonDeptNo &&
m.OpenLessonMajorNo == insertDatastuselect.OpenLessonMajorNo) == 0 && insertStuSelectLessonListDataList.Count(m => m.StuNo == insertDatastuselect.StuNo &&
m.OpenLessonMajorNo == insertDatastuselect.OpenLessonMajorNo&&
m.F_SchoolId == insertDatastuselect.F_SchoolId) == 0 && insertStuSelectLessonListDataList.Count(m => m.StuNo == insertDatastuselect.StuNo &&
m.AcademicYearNo == insertDatastuselect.AcademicYearNo &&
m.Semester == insertDatastuselect.Semester &&
m.DeptNo == insertDatastuselect.DeptNo &&
@@ -944,7 +948,8 @@ where AcademicYearNo='" + strAcademicYear + "' and Semester='" + strSemester + "
m.LessonNo == insertDatastuselect.LessonNo &&
m.Grade == insertDatastuselect.Grade &&
m.OpenLessonDeptNo == insertDatastuselect.OpenLessonDeptNo &&
m.OpenLessonMajorNo == insertDatastuselect.OpenLessonMajorNo) == 0)
m.OpenLessonMajorNo == insertDatastuselect.OpenLessonMajorNo&&
m.F_SchoolId == insertDatastuselect.F_SchoolId) == 0)
{
insertStuSelectLessonListDataList.Add(insertDatastuselect);
}
@@ -953,21 +958,36 @@ where AcademicYearNo='" + strAcademicYear + "' and Semester='" + strSemester + "
this.BaseRepository("CollegeMIS").Insert(insertStuSelectLessonListDataList);
}
//重置StuScore
var strSql = new StringBuilder();
strSql.Append(@"insert into stuscore(NoticeBookNo,StuNo,DeptNo,MajorNo,ClassNo,StuName,GenderNo,AcademicYearNo,Semester,OpenLessonDeptNo,OpenLessonMajorNo,LessonNo,LessonName,LessonNameEn,TeachClassNo,LessonSortNo,StuSortNo,Grade,StudyScore,TotalStudyHour,OrdinaryScore,TermInScore,TermEndScore,OtherScore,IsInEffect,Remark,ConflictLessonNo,IsPitchOn,CheckMark,TechPlanNo,EmpNo,PartCode,ScoreRecordStyleNo,TestModeNo,zysx,TestKindNo,IsEditable)
select NoticeBookNo,StuNo,DeptNo,MajorNo,ClassNo,StuName,GenderNo,AcademicYearNo,Semester,OpenLessonDeptNo,OpenLessonMajorNo,LessonNo,LessonName,LessonNameEng as LessionNameEn,TeachClassNo,LessonSortNo,StuSortNo,Grade,StudyScore,TotalStudyHour,'0','0','0','0',IsInEffect,Remark,ConflictLessonNo,IsPitchOn,CheckMark,TeachPlanNo as TechPlanNo,EmpNo,PartCode,ScoreRecordStyleNo,TestModeNo,zysx=1,TestKindNo=1,IsEditable=1 from
(
select s.NoticeBookNo,s.StuNo,s.DeptNo,s.MajorNo,s.ClassNo,s.StuName,s.GenderNo,s.AcademicYearNo,s.Semester,s.OpenLessonDeptNo,s.OpenLessonMajorNo,s.LessonNo,s.LessonName,s.LessonNameEng,s.TeachClassNo,s.LessonSortNo,s.StuSortNo,s.Grade,s.StudyScore,s.TotalStudyHour,s.IsInEffect,s.Remark,s.ConflictLessonNo,s.IsPitchOn,s.CheckMark,s.TeachPlanNo,s.EmpNo,s.PartCode,o.ScoreRecordStyleNo,cs.ScoreRecordName,bc.TestModeNo,bc.TestMode
//dyy:20190429
string sql = @"insert into stuscore(NoticeBookNo,StuNo,DeptNo,MajorNo,ClassNo,StuName,GenderNo,AcademicYearNo,Semester,OpenLessonDeptNo,OpenLessonMajorNo,LessonNo,LessonName,LessonNameEn,TeachClassNo,LessonSortNo,StuSortNo,Grade,StudyScore,TotalStudyHour,OrdinaryScore,TermInScore,TermEndScore,OtherScore,IsInEffect,Remark,ConflictLessonNo,IsPitchOn,CheckMark,TechPlanNo,EmpNo,PartCode,ScoreRecordStyleNo,TestModeNo,zysx,TestKindNo,IsEditable,F_SchoolId)
select NoticeBookNo,StuNo,DeptNo,MajorNo,ClassNo,StuName,GenderNo,AcademicYearNo,Semester,OpenLessonDeptNo,OpenLessonMajorNo,LessonNo,LessonName,LessonNameEng as LessionNameEn,TeachClassNo,LessonSortNo,StuSortNo,Grade,StudyScore,TotalStudyHour,'0','0','0','0',IsInEffect,Remark,ConflictLessonNo,IsPitchOn,0,TeachPlanNo as TechPlanNo,EmpNo,PartCode,ScoreRecordStyleNo,TestModeNo,zysx=1,TestKindNo=1,IsEditable=1,F_SchoolId from
(select s.NoticeBookNo,s.StuNo,s.DeptNo,s.MajorNo,s.ClassNo,s.StuName,s.GenderNo,s.AcademicYearNo,s.Semester,s.OpenLessonDeptNo,s.OpenLessonMajorNo,s.LessonNo,s.LessonName,s.LessonNameEng,s.TeachClassNo,s.LessonSortNo,s.StuSortNo,s.Grade,s.StudyScore,s.TotalStudyHour,s.IsInEffect,s.Remark,s.ConflictLessonNo,s.IsPitchOn,s.CheckMark,s.TeachPlanNo,s.EmpNo,s.PartCode,o.ScoreRecordStyleNo,cs.ScoreRecordName,bc.TestModeNo,bc.TestMode,s.F_SchoolId
from StuSelectLessonList s
left join OpenLessonPlan o on s.AcademicYearNo=o.AcademicYearNo and s.Semester=o.Semester and s.LessonNo=o.LessonNo
and s.PartCode=o.PartCode and s.OpenLessonMajorNo=o.MajorNo
left join OpenLessonPlan o on s.AcademicYearNo=o.AcademicYearNo and s.Semester=o.Semester and s.LessonNo=o.LessonNo and s.PartCode=o.PartCode and s.OpenLessonMajorNo=o.MajorNo and s.Grade=o.Grade
left join CdScoreRecordStyle cs on o.ScoreRecordStyleNo=cs.ScoreRecordStyleNo
left join BCdTestMode bc on o.CheckStyleNo=bc.TestModeNo
where s.AcademicYearNo='" + academicYearNo + "' and s.Semester='" + semester + "' and s.TeachClassNo='" + classNo + @"' and s.LessonSortNo='1'
left join BCdTestMode bc on o.CheckStyleNo=bc.TestModeNo
where s.CheckMark='1'
) as sl
where StuNo not in(Select StuNo from stuscore s where s.Academicyearno = sl.Academicyearno
and s.Semester = sl.Semester and s.lessonno = sl.lessonno and s.teachclassno = sl.teachclassno and s.LessonSortNo = '1') ");
this.BaseRepository("CollegeMIS").ExecuteBySql(strSql.ToString());
where StuNo not in(Select StuNo from stuscore s where s.Academicyearno=sl.Academicyearno
and s.Semester=sl.Semester and s.lessonno=sl.lessonno and s.teachclassno=sl.teachclassno and s.LessonSortNo='1'
and s.Academicyearno='" + academicYearNo + "' and s.Semester='" + semester + "') and sl.AcademicYearNo='" + academicYearNo + "' and sl.Semester='" + semester + "'";
BaseRepository("CollegeMIS").ExecuteBySql(sql);
//dyy:20190722
//初始化教师成绩单提交表
string sql3 = @"insert into EmpReportCard
(Id, LessonNo, LessonName, ClassNo, ClassName, EmpNo, EmpName, AcademicYearNo, Semester,LessonSortNo, CreateTime, ElectronicStatus, ElectronicTime, PaperStatus, PaperTime)
select NEWID(),LessonNo,LessonName,ClassNo,ClassName,EmpNo,EmpName,AcademicYearNo,Semester,LessonSortNo,GETDATE(),0,null,0,null from
(
select distinct s.LessonNo,s.LessonName,s.TeachClassNo as ClassNo,c.ClassName,s.EmpNo,e.EmpName,s.AcademicYearNo,s.Semester,s.LessonSortNo
from stuscore s
left join classinfo c on s.teachclassno=c.classno
left join empinfo e on s.empno=e.empno
where s.lessonsortno='1'
) as bb
where bb.EmpNo not in
(select a.EmpNo from EmpReportCard a where a.AcademicYearNo=bb.AcademicYearNo and a.Semester=bb.Semester and a.LessonNo=bb.LessonNo and a.ClassNo=bb.ClassNo and a.LessonSortNo=bb.LessonSortNo and a.LessonSortNo='1'
and a.Academicyearno='" + academicYearNo + "' and a.Semester='" + semester + "') and bb.AcademicYearNo='" + academicYearNo + "' and bb.Semester='" + semester + "' order by bb.EmpNo";
BaseRepository("CollegeMIS").ExecuteBySql(sql3);

}
catch (Exception ex)


Chargement…
Annuler
Enregistrer