diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Controllers/FinaChargeRefundController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Controllers/FinaChargeRefundController.cs index b4be119fb..16d710fcc 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Controllers/FinaChargeRefundController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Controllers/FinaChargeRefundController.cs @@ -85,6 +85,18 @@ namespace Learun.Application.Web.Areas.ReceiveSendFeeManagement.Controllers }; return Success(jsonData); } + + [HttpGet] + [AjaxOnly] + public ActionResult GetFormDataById(string keyValue) + { + var FinaChargeRefund = FinaChargeRefundIBLL.GetFinaChargeRefundEntityByFSYIId(keyValue); + var jsonData = new + { + FinaChargeRefund = FinaChargeRefund, + }; + return Success(jsonData); + } #endregion #region 提交数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FinaChargeRefund/FormView.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FinaChargeRefund/FormView.cshtml index 0dc74b5b8..feab65141 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FinaChargeRefund/FormView.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FinaChargeRefund/FormView.cshtml @@ -5,31 +5,31 @@
缴费项目编号
- +
缴费项目名称
- +
退费方式
-
+
退费金额
- +
操作时间
- +
操作人
- +
备注
- +
@Html.AppendJsFile("/Areas/ReceiveSendFeeManagement/Views/FinaChargeRefund/FormView.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FinaChargeRefund/FormView.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FinaChargeRefund/FormView.js index 7a5ada0ee..6aa56b5d6 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FinaChargeRefund/FormView.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FinaChargeRefund/FormView.js @@ -19,7 +19,7 @@ var bootstrap = function ($, learun) { }, initData: function () { if (!!keyValue) { - $.lrSetForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FinaChargeRefund/GetFormData?keyValue=' + keyValue, function (data) { + $.lrSetForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FinaChargeRefund/GetFormDataById?keyValue=' + keyValue, function (data) { for (var id in data) { if (!!data[id].length && data[id].length > 0) { $('#' + id ).jfGridSet('refreshdata', data[id]); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FinaChargeStuOrder/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FinaChargeStuOrder/Index.js index 6caa405a6..5ac465b3f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FinaChargeStuOrder/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FinaChargeStuOrder/Index.js @@ -180,7 +180,8 @@ var bootstrap = function ($, learun) { { label: "银行订单号", name: "BankOrder", width: 100, align: "left"}, ], mainId:'Id', - isPage: true + isPage: true, + sidx:'PayTime desc' }); }, search: function (param) { diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargeRefund/FinaChargeRefundBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargeRefund/FinaChargeRefundBLL.cs index 24eaac3ea..2dfa31ac0 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargeRefund/FinaChargeRefundBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargeRefund/FinaChargeRefundBLL.cs @@ -119,6 +119,25 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement } } + public FinaChargeRefundEntity GetFinaChargeRefundEntityByFSYIId(string keyValue) + { + try + { + return FinaChargeRefundService.GetFinaChargeRefundEntityByFSYIId(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargeRefund/FinaChargeRefundIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargeRefund/FinaChargeRefundIBLL.cs index ccf173723..911c207ee 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargeRefund/FinaChargeRefundIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargeRefund/FinaChargeRefundIBLL.cs @@ -44,5 +44,6 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement void SaveEntity(List list, FinaChargeRefundEntity entity); #endregion + FinaChargeRefundEntity GetFinaChargeRefundEntityByFSYIId(string keyValue); } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargeRefund/FinaChargeRefundService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargeRefund/FinaChargeRefundService.cs index 514e83ec4..48566cffc 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargeRefund/FinaChargeRefundService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargeRefund/FinaChargeRefundService.cs @@ -173,7 +173,7 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement finaChargeStuBalance.PaymentAmount =0; finaChargeStuBalance.QJAmount = 0; finaChargeStuBalance.OldBalance = finaChargeRefundEntity.Amount; - finaChargeStuBalance.ChangeAmount = finaChargeRefundEntity.Amount; + finaChargeStuBalance.ChangeAmount =- finaChargeRefundEntity.Amount; finaChargeStuBalance.NowBalance = 0; finaChargeStuBalance.ChangeDate = DateTime.Now; finaChargeStuBalance.ChangeType = 4; @@ -209,5 +209,23 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement #endregion + public FinaChargeRefundEntity GetFinaChargeRefundEntityByFSYIId(string keyValue) + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity(m=>m.FSYIId== keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargeStuOrder/FinaChargeStuOrderService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargeStuOrder/FinaChargeStuOrderService.cs index 59f603081..59d73c6df 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargeStuOrder/FinaChargeStuOrderService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargeStuOrder/FinaChargeStuOrderService.cs @@ -257,15 +257,16 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement var oldOrderList = BaseRepository("CollegeMIS").FindList("select * from FinaChargeStuOrder where OrderType='2' "); //缴费方式字典 var dataitemlist = datarItemService.GetDetailList("PayTypeOffLine"); - //获取已有年度学生缴费记录 - var oldFinaChargeStuYearList = BaseRepository("CollegeMIS").FindList(); - //获取已有年度学生缴费明细记录 - var oldFinaChargeStuYearItemList = BaseRepository("CollegeMIS").FindList("select a.*,b.StuNo,c.StuName from FinaChargeStuYearItem a left join FinaChargeStuYear b on a.FSYId=b.FSYId left join FinaChargeStudent c on b.StuNo=c.StuNo where ChargeItemType=1 and F_DeleteMark=0 and RefundStatus=0"); + foreach (DataRow dr in dt.Rows) { var db = this.BaseRepository("CollegeMIS").BeginTrans(); try { + //获取已有年度学生缴费记录 + var oldFinaChargeStuYearList = db.FindList(); + //获取已有年度学生缴费明细记录 + var oldFinaChargeStuYearItemList = db.FindList("select a.*,b.StuNo,c.StuName from FinaChargeStuYearItem a left join FinaChargeStuYear b on a.FSYId=b.FSYId left join FinaChargeStudent c on b.StuNo=c.StuNo where ChargeItemType=1 and F_DeleteMark=0 and RefundStatus=0"); IEnumerable finaChargeStuYearItemList = null; FinaChargeStuYearItemEntity finaChargeStuYearItemEntity = null; FinaChargeStuYearEntity finaChargeStuYearEntity = null; @@ -284,7 +285,7 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement } //首先校验金额是否为数字 decimal dresult = 0; - bool parseresult = decimal.TryParse(dr[5].ToString(), out dresult); + bool parseresult = decimal.TryParse(dr[3].ToString(), out dresult); if (!parseresult) { throw new Exception("【金额】转换失败,必须为数字!"); @@ -336,11 +337,12 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement Random ran = new Random(); orderEntity.orderid = DateTime.Now.ToString("yyyyMMddhhmmss") + ran.Next(0, 100000); orderEntity.PlaceOrderTime = DateTime.Now; + orderEntity.PayTime = orderEntity.PlaceOrderTime; orderEntity.Status = 1; orderEntity.OrderType = 2; orderEntity.BankOrder = dr[5].ToString(); //历史固定项目未缴费和部分缴费的数据 - var oldnotpaylist = oldFinaChargeStuYearItemList.Where(m => m.PayFeeStatus != 1).OrderBy(m => m.priority).ToList(); + var oldnotpaylist = finaChargeStuYearItemList.Where(m => m.PayFeeStatus != 1).OrderBy(m => m.priority).ToList(); finaChargeStuYearItemEntity = oldnotpaylist.FirstOrDefault(); //订单明细 写入优先级最高的一条为暂存位置 FinaChargeStuOrderDetailEntity detail = new FinaChargeStuOrderDetailEntity(); @@ -391,7 +393,7 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement finaChargeStuBalanceEntity.PaymentAmount = dresult; finaChargeStuBalanceEntity.QJAmount = finaChargeStuYearItemEntity.NeedToPay - dresult > 0 ? finaChargeStuYearItemEntity.NeedToPay - dresult : 0; finaChargeStuBalanceEntity.OldBalance = finaChargeStuYearItemEntity.FSBlance; - if (detail.NowBlance > 0) + if (finaChargeStuYearItemEntity.NeedToPay-dresult<0) { finaChargeStuBalanceEntity.ChangeAmount = dresult - finaChargeStuBalanceEntity.DJAmount; finaChargeStuBalanceEntity.NowBalance = finaChargeStuBalanceEntity.ChangeAmount; @@ -406,22 +408,23 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement db.Insert(finaChargeStuBalanceEntity); //FinaChargeStuYearItem表 finaChargeStuYearItemEntity.SJAmount = finaChargeStuYearItemEntity.SJAmount + dresult; - if (detail.NowBlance > 0) + if (finaChargeStuYearItemEntity.NeedToPay - dresult < 0) { - finaChargeStuYearItemEntity.FSBlance = detail.NowBlance; + finaChargeStuYearItemEntity.FSBlance = Math.Abs(finaChargeStuYearItemEntity.NeedToPay.Value - dresult); finaChargeStuYearItemEntity.NeedToPay = 0; } else { - finaChargeStuYearItemEntity.NeedToPay = finaChargeStuYearItemEntity.Standard - dresult; + finaChargeStuYearItemEntity.NeedToPay = finaChargeStuYearItemEntity.NeedToPay - dresult; } - finaChargeStuYearItemEntity.PayFeeStatus = finaChargeStuYearItemEntity.FSBlance > 0 ? 1 : 4; + finaChargeStuYearItemEntity.PayFeeStatus = finaChargeStuYearItemEntity.NeedToPay > 0 ? 4 : 1; db.Update(finaChargeStuYearItemEntity); //FinaChargeStuYear表 - db.ExecuteBySql("update FinaChargeStuYear set SJAmount=SJAmount+" + dresult + ",NeedToPay=(case when(NeedToPay-"+ dresult + ")>0 then (NeedToPay-" + dresult + ") else 0 end),FSBlance=(case when(NeedToPay-" + dresult + ")>=0 then 0 else abs(NeedToPay-" + dresult + ") end),PayFeeStatus=(case when(NeedToPay-" + dresult + ">=0) then 1 else 4 end) where FSYId='" + finaChargeStuYearItemEntity.FSYId + "'"); + db.ExecuteBySql("update FinaChargeStuYear set SJAmount=SJAmount+" + dresult + ",NeedToPay=(case when(NeedToPay-"+ dresult + ")>0 then (NeedToPay-" + dresult + ") else 0 end),FSBlance=(case when(NeedToPay-" + dresult + ")>=0 then 0 else abs(NeedToPay-" + dresult + ") end),PayFeeStatus=(case when(NeedToPay-" + dresult + ">=0) then 4 else 1 end) where FSYId='" + finaChargeStuYearItemEntity.FSYId + "'"); //FinaChargeStudent表 db.ExecuteBySql("update FinaChargeStudent set NeedToPay=(case when(NeedToPay-"+ dresult + ")>0 then (NeedToPay-" + dresult + ") else 0 end),FSBlance=(case when(NeedToPay-" + dresult + ")>=0 then 0 else abs(NeedToPay-" + dresult + ") end) where StuNo='" + finaChargeStuYearItemEntity.StuNo + "'"); db.Commit(); + snum++; } catch (Exception ex) { @@ -472,7 +475,7 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement { if (hasBalanceItem.FSBlance > 0) { - foreach (var QJItem in FinaChargeStuYearItemHasDJ) + foreach (var QJItem in FinaChargeStuYearItemHasDJ.Where(m=>m.StuNo== hasBalanceItem.StuNo)) { var db = BaseRepository("CollegeMIS").BeginTrans(); if (QJItem.NeedToPay >0 && hasBalanceItem.FSBlance > 0) 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 6950ceec6..3272f2046 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 @@ -349,6 +349,7 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement finaChargeStuYear.NeedToPay+= finaChargeStuYearItem.Standard; finaChargeStuYear.FSBlance = 0; db.Insert(finaChargeStuYear); + snum++; } else { @@ -374,6 +375,7 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement oldFinaChargeStuYearEntity.YJAmount+= finaChargeStuYearItem.Standard; oldFinaChargeStuYearEntity.NeedToPay += finaChargeStuYearItem.Standard; db.Update(oldFinaChargeStuYearEntity); + snum++; } else { diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargesStandard/FinaChargesStandardService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargesStandard/FinaChargesStandardService.cs index 9ac193a26..24ac17782 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargesStandard/FinaChargesStandardService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargesStandard/FinaChargesStandardService.cs @@ -104,7 +104,7 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement strSql.Append(" AND m.MajorNo = @MajorNo "); } strSql.Append(" union "); - strSql.Append(" select m.MajorNo as TempId,'' as ChargeStandardID,0 as ChargeItemID,null as ChargeItemName,null as ChargeItemType, null as ChargeItemCode,"); + strSql.Append(" select m.MajorNo as TempId,'' as ChargeStandardID,'0' as ChargeItemID,null as ChargeItemName,null as ChargeItemType, null as ChargeItemCode,"); strSql.Append(" (select SUM(t.Standard) from [dbo].[FinaChargesStandard] t left join [FinaChargeItem] tt on t.ChargeItemID=tt.ChargeItemID where tt.CheckMark=1 and tt.F_DeleteMark=0 and t.MajorNo=m.MajorNo and t.CheckMark=1 and t.F_DeleteMark=0 "); if (!queryParam["SYear"].IsEmpty()) { diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js index fa1181bb7..1d2487021 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js @@ -7,11 +7,11 @@ export default { "enableSignUp": true, //请求数据的接口地址;可以配置多个,开发环境下登录页会出现选择菜单供您选择 "apiHost": [ - "http://localhost:31173/" + "http://112.45.152.8:8011/" // "http://123.57.209.16:31173/" // "http://112.45.152.8:8083/" ], - "webHost":"http://localhost:20472/", + "webHost":"http://112.45.152.8:8010/", // "webHost":"http://112.45.152.8:8000/", // 开发环境下自动填充登录账号密码,与接口地址一一对应,只在开发环境下显示 "devAccount": [