@@ -1,4 +1,5 @@
using Dapper;
using Learun.Application.Organization;
using Learun.DataBase.Repository;
using Learun.Util;
using System;
@@ -369,9 +370,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
db.ExecuteBySql(updSql);
string addSql = @"insert into StuInfoBasic (
Stuid,StuNo,StuCode,ClassNo,StuName,GenderNo,DeptNo,MajorNo,IdentityCardNo,ExamScore,ProvinceCode,AdmissionNo
Stuid,StuNo,StuCode,ClassNo,StuName,GenderNo,DeptNo,MajorNo,IdentityCardNo,ExamScore,ProvinceCode,AdmissionNo,F_SchoolId,Grade
)
select newid(),StuNo,'G'+CardNo,ClassNo,StuName,Sex,DeptNo,MajorNo,CardNo,StuScore,ProvinceCode,ExamNo
select newid(),StuNo,'G'+CardNo,ClassNo,StuName,Sex,DeptNo,MajorNo,CardNo,StuScore,ProvinceCode,ExamNo,F_SchoolId,Grade
from StuVolunteer t where t.ClassStatus=1
and t.StuNo not in (select b.StuNo from StuInfoBasic b where b.StuNo=t.StuNo) ";
db.ExecuteBySql(addSql);
@@ -518,6 +519,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <param name="keyValue">主键</param>
public void EnrollEntity(string keyValue)
{
var dbMISName = this.BaseRepository("BaseDb").FindList<CompanyEntity>().FirstOrDefault();
var db = this.BaseRepository("CollegeMIS").BeginTrans();
try
{
@@ -526,6 +528,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
var entity = db.FindEntity<StuVolunteerEntity>(x => x.ID == item);
entity.IsEnroll = true;
entity.F_SchoolId = dbMISName.F_CompanyId;
db.Update(entity);
}