From b940fde272cb3cb065469ad30a468126b6e08ceb Mon Sep 17 00:00:00 2001 From: fzp <645608524@qq.com> Date: Tue, 22 Aug 2023 18:26:55 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=BE=85=E7=BC=B4=E9=87=91?= =?UTF-8?q?=E9=A2=9D=E5=AF=BC=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FinaChargeStuYearItemService.cs | 22 ++++++++++++++----- 1 file changed, 16 insertions(+), 6 deletions(-) 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;