var oldFinaChargeStuYearItemList = db.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 from [dbo].[FinaChargesStandard] a left join [dbo].[FinaChargeItem] b on a.ChargeItemID=b.[ChargeItemID] where b.ChargeItemType=1");
var finaChargesStandardList = db.FindList<FinaChargesStandardEntity>("select a.Grade,a.DeptNo,a.MajorNo,a.Standard,a.SYear,b.ChargeItemName,b.ChargeItemCode,b.ChargeItemType from [dbo].[FinaChargesStandard] a left join [dbo].[FinaChargeItem] b on a.ChargeItemID=b.[ChargeItemID] where b.ChargeItemType=1 and a.SYear='"+entity.FSYear+"'");
var finaChargesStandardListGroup = db.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
group by a.Grade, a.DeptNo, a.MajorNo, 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 + "' group by a.Grade, a.DeptNo, a.MajorNo, a.SYear");
db.ExecuteBySql("update FinaChargeStudent set FSBlance=(select sum(isnull([FSBlance],0)) from [dbo].[FinaChargeStuYear] where StuNo='" + stuitem.StuNo + "')");
db.ExecuteBySql("update FinaChargeStudent set FSBlance=(select sum(isnull([FSBlance],0)) from [dbo].[FinaChargeStuYear] where StuNo='" + stuitem.StuNo + "') where StuNo='" + stuitem.StuNo + "'");