diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargeStuYearItem/FinaChargeStuYearItemService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargeStuYearItem/FinaChargeStuYearItemService.cs index 05904acbd..275f8dcf6 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargeStuYearItem/FinaChargeStuYearItemService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargeStuYearItem/FinaChargeStuYearItemService.cs @@ -339,10 +339,15 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement finaChargeStuYearItem.ChargeItemType = finaChargesStandardEntity.ChargeItemType; finaChargeStuYearItem.priority = finaChargesStandardEntity.priority; finaChargeStuYearItem.Standard = finaChargesStandardEntity.Standard; - finaChargeStuYearItem.FSBlance = -finaChargeStuYearItem.Standard; + finaChargeStuYearItem.NeedToPay = finaChargesStandardEntity.Standard; + finaChargeStuYearItem.FSBlance = 0; + var loginUserInfo = LoginUserInfo.Get(); + finaChargeStuYearItem.F_CreateUserId = loginUserInfo.userId; + finaChargeStuYearItem.F_CreateUserName = loginUserInfo.realName; db.Insert(finaChargeStuYearItem); finaChargeStuYear.YJAmount = finaChargeStuYearItem.Standard; - finaChargeStuYear.FSBlance = -finaChargeStuYear.YJAmount; + finaChargeStuYear.NeedToPay+= finaChargeStuYearItem.Standard; + finaChargeStuYear.FSBlance = 0; db.Insert(finaChargeStuYear); } else @@ -360,11 +365,16 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement finaChargeStuYearItem.ChargeItemType = finaChargesStandardEntity.ChargeItemType; finaChargeStuYearItem.priority = finaChargesStandardEntity.priority; finaChargeStuYearItem.Standard = finaChargesStandardEntity.Standard; - finaChargeStuYearItem.FSBlance = -finaChargeStuYearItem.Standard; + finaChargeStuYearItem.NeedToPay = finaChargeStuYearItem.Standard; db.Insert(finaChargeStuYearItem); //更新主表 oldFinaChargeStuYearEntity.YJAmount+= finaChargeStuYearItem.Standard; - oldFinaChargeStuYearEntity.FSBlance = -oldFinaChargeStuYearEntity.YJAmount; + oldFinaChargeStuYearEntity.NeedToPay += finaChargeStuYearItem.Standard; + //if (oldFinaChargeStuYearEntity.FSBlance>0) + //{ + + //} + //oldFinaChargeStuYearEntity.FSBlance -= finaChargeStuYearItem.Standard; db.Update(oldFinaChargeStuYearEntity); } else @@ -388,8 +398,8 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement } db.Commit(); //更新学生缴费总表 - BaseRepository("CollegeMIS").ExecuteBySql(@"update FinaChargeStudent set FSBlance=a.[FSBlance] - from (select isnull(sum([FSBlance]),0) as [FSBlance],StuNo from [FinaChargeStuYear] group by StuNo) a left join + BaseRepository("CollegeMIS").ExecuteBySql(@"update FinaChargeStudent set NeedToPay=a.[NeedToPay] + from (select isnull(sum([NeedToPay]),0) as [NeedToPay],StuNo from [FinaChargeStuYear] group by StuNo) a left join FinaChargeStudent b on a.stuno=b.stuno"); } return snum + "|" + fnum;