public FinaChargeStuYearEntity entity { get; set; }
public IEnumerable<FinaChargeStuYearEntity> oldFinaChargeStuYearList { get; set; }
public IEnumerable<FinaChargeStuYearItemEntity> oldFinaChargeStuYearItemList { get; set; }
public IEnumerable<FinaChargesStandardEntity> finaChargesStandardList { get; set; }
public IEnumerable<FinaChargesStandardEntity> finaChargesStandardListGroup { get; set; }
public FinaChargeStudentEntity stuitem { get; set; }
}
public void SaveGenerateByCondition(FinaChargeStuYearEntity entity)
{
var db = BaseRepository("CollegeMIS").BeginTrans();
try
{
//获取缴费学生
var stulist = db.FindList<FinaChargeStudentEntity>(m => m.F_CheckMark == true);
var stulist = BaseRepository("CollegeMIS").FindList<FinaChargeStudentEntity>(m => m.F_CheckMark == true);
//获取已有年度学生缴费记录
var oldFinaChargeStuYearList = db.FindList<FinaChargeStuYearEntity>(m => m.FSYear == entity.FSYear);
var oldFinaChargeStuYearList = BaseRepository("CollegeMIS").FindList<FinaChargeStuYearEntity>(m => m.FSYear == entity.FSYear);
//获取已有年度学生缴费明细记录
var oldFinaChargeStuYearItemList = db.FindList<FinaChargeStuYearItemEntity>(m => m.FSYear == entity.FSYear);
var oldFinaChargeStuYearItemList = BaseRepository("CollegeMIS").FindList<FinaChargeStuYearItemEntity>(m => m.FSYear == entity.FSYear);
//获取收费标准
var finaChargesStandardList = db.FindList<FinaChargesStandardEntity>("select a.Grade,a.DeptNo,a.MajorNo,a.Standard,a.SYear,b.ChargeItemName,b.ChargeItemCode,b.ChargeItemType,b.priority from [dbo].[FinaChargesStandard] a left join [dbo].[FinaChargeItem] b on a.ChargeItemID=b.[ChargeItemID] where b.ChargeItemType=1 and a.SYear='" + entity.FSYear + "' and a.F_DeleteMark=0 and a.CheckMark=1 and b.CheckMark=1 and b.F_DeleteMark=0");
var finaChargesStandardListGroup = db.FindList<FinaChargesStandardEntity>(@"select a.Grade,a.DeptNo,a.MajorNo,sum(isnull(a.Standard,0)) as YJAmount,a.SYear
var finaChargesStandardList = BaseRepository("CollegeMIS").FindList<FinaChargesStandardEntity>("select a.Grade,a.DeptNo,a.MajorNo,a.Standard,a.SYear,b.ChargeItemName,b.ChargeItemCode,b.ChargeItemType,b.priority from [dbo].[FinaChargesStandard] a left join [dbo].[FinaChargeItem] b on a.ChargeItemID=b.[ChargeItemID] where b.ChargeItemType=1 and a.SYear='" + entity.FSYear + "' and a.F_DeleteMark=0 and a.CheckMark=1 and b.CheckMark=1 and b.F_DeleteMark=0");
var finaChargesStandardListGroup = BaseRepository("CollegeMIS").FindList<FinaChargesStandardEntity>(@"select a.Grade,a.DeptNo,a.MajorNo,sum(isnull(a.Standard,0)) as YJAmount,a.SYear
from[dbo].[FinaChargesStandard] a left join[dbo].[FinaChargeItem] b on a.ChargeItemID = b.[ChargeItemID] where b.ChargeItemType=1 and a.SYear='" + entity.FSYear + "' and a.F_DeleteMark=0 and a.CheckMark=1 and b.CheckMark=1 and b.F_DeleteMark=0 group by a.Grade, a.DeptNo, a.MajorNo, a.SYear");
select newid(), stuno, stuname, genderno, identitycardno, deptno, majorno, classno,grade, mobile, 0, 1 from StuInfoBasic a where a.checkmark = 1 and stuno not in(select stuno from FinaChargeStudent)");
select newid(), stuno, stuname, genderno, identitycardno, deptno, majorno, classno,grade, mobile, 0,0, 1 from StuInfoBasic a where a.checkmark = 1 and stuno not in(select stuno from FinaChargeStudent)");