@@ -28,6 +28,12 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
return View(); | |||
} | |||
[HttpGet] | |||
public ActionResult FinaCharge() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
@@ -0,0 +1,24 @@ | |||
@{ | |||
ViewBag.Title = "教师注册功能开关控制"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout "> | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 修改</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TeachSwitch/FinaCharge.js") |
@@ -0,0 +1,80 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2019-07-08 17:19 | |||
* 描 述:教师注册功能开关控制 | |||
*/ | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/EducationalAdministration/TeachSwitch/Form?keyValue=' + keyValue, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/TeachSwitch/GetPageList', | |||
headData: [ | |||
{ | |||
label: "缴费开关", name: "type", width: 300, align: "left", | |||
formatter: function (val) { | |||
if (val == 'jf') { | |||
return '缴费开关'; | |||
} | |||
} | |||
}, | |||
{ | |||
label: "是否开启", name: "status", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', { | |||
key: value, | |||
code: 'YesOrNoInt', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
} | |||
}, | |||
], | |||
mainId: 'ID', | |||
isPage: true | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.JF = 1; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
page.search(); | |||
}; | |||
page.init(); | |||
} |
@@ -39,6 +39,12 @@ namespace Learun.Application.Web.Areas.ReceiveSendFeeManagement.Controllers | |||
{ | |||
return View(); | |||
} | |||
[HttpGet] | |||
public ActionResult FormView() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
@@ -28,7 +28,8 @@ namespace Learun.Application.Web.Areas.ReceiveSendFeeManagement.Controllers | |||
{ | |||
private FinaChargeStuYearIBLL finaChargeStuYearIBLL = new FinaChargeStuYearBLL(); | |||
private FinaChargeStuOrderIBLL finaChargeStuOrderIbll = new FinaChargeStuOrderBLL(); | |||
private EADateArrangeIBLL eaDateArrangeIbll = new EADateArrangeBLL(); | |||
private TeachSwitchIBLL teachSwitchIbll = new TeachSwitchBLL(); | |||
private ClassInfoIBLL classInfoIbll = new ClassInfoBLL(); | |||
#region 视图功能 | |||
@@ -88,12 +89,8 @@ namespace Learun.Application.Web.Areas.ReceiveSendFeeManagement.Controllers | |||
[AjaxOnly] | |||
public ActionResult IfCanPay() | |||
{ | |||
var nowyearsemester = Common.GetSemesterAndYear(); | |||
var eastatus = eaDateArrangeIbll.GetEADateArrangeEntity("17"); | |||
if (eastatus != null && eastatus.CheckMark == "1" && | |||
eastatus.AcademicYearNo == nowyearsemester.AcademicYearShort | |||
&& eastatus.Semester == nowyearsemester.Semester && eastatus.MakeDate < DateTime.Now && | |||
eastatus.EndDate > DateTime.Now) | |||
var eastatus = teachSwitchIbll.GetFirst("jf"); | |||
if (eastatus != null && eastatus.status == "1") | |||
{ | |||
return Success(new { success = "1" }); | |||
} | |||
@@ -108,6 +105,28 @@ namespace Learun.Application.Web.Areas.ReceiveSendFeeManagement.Controllers | |||
var data = finaChargeStuYearIBLL.GetTree(); | |||
return Success(data); | |||
} | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetClassByEmpNo() | |||
{ | |||
var data = classInfoIbll.GetClassByEmpNo(LoginUserInfo.Get().account); | |||
return Success(data); | |||
} | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetDeptByEmpNo() | |||
{ | |||
var data = classInfoIbll.GetDeptByEmpNo(LoginUserInfo.Get().account); | |||
return Success(data); | |||
} | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetMajorByEmpNo() | |||
{ | |||
var data = classInfoIbll.GetMajorByEmpNo(LoginUserInfo.Get().account); | |||
return Success(data); | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
@@ -0,0 +1,35 @@ | |||
@{ | |||
ViewBag.Title = "FinaChargeRefund"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-6 lr-form-item" data-table="FinaChargeRefund"> | |||
<div class="lr-form-item-title">缴费项目编号</div> | |||
<input id="ChargeItemCode" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="FinaChargeRefund"> | |||
<div class="lr-form-item-title">缴费项目名称</div> | |||
<input id="ChargeItemName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="FinaChargeRefund"> | |||
<div class="lr-form-item-title">退费方式</div> | |||
<div id="RType"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="FinaChargeRefund"> | |||
<div class="lr-form-item-title">退费金额</div> | |||
<input id="Amount" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="FinaChargeRefund"> | |||
<div class="lr-form-item-title">操作时间</div> | |||
<input id="F_CreateDate" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="FinaChargeRefund"> | |||
<div class="lr-form-item-title">操作人</div> | |||
<input id="F_CreateUserName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="FinaChargeRefund"> | |||
<div class="lr-form-item-title">备注</div> | |||
<textarea id="Remark" class="form-control" style="height: 100px;"></textarea> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/ReceiveSendFeeManagement/Views/FinaChargeRefund/FormView.js") |
@@ -0,0 +1,37 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2023-08-18 18:07 | |||
* 描 述:FinaChargeRefund | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$('#RType').lrDataItemSelect({ code: 'RType' }); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FinaChargeRefund/GetFormData?keyValue=' + keyValue, function (data) { | |||
for (var id in data) { | |||
if (!!data[id].length && data[id].length > 0) { | |||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
} | |||
}; | |||
page.init(); | |||
} |
@@ -62,12 +62,12 @@ var bootstrap = function ($, learun) { | |||
{ label: "收费项目编号", name: "ChargeItemCode", width: 100, align: "left" }, | |||
{ label: "收费项目名称", name: "ChargeItemName", width: 100, align: "left" }, | |||
{ label: "收费标准", name: "Standard", width: 100, align: "left" }, | |||
{ label: "本次待缴金额", name: "DJAmount", width: 100, align: "left" }, | |||
{ label: "变动金额", name: "PaymentAmount", width: 100, align: "left" }, | |||
{ label: "剩余待缴金额", name: "QJAmount", width: 100, align: "left" }, | |||
{ label: "当前余额", name: "OldBalance", width: 100, align: "left" }, | |||
{ label: "本次应缴余额", name: "DJAmount", width: 100, align: "left" }, | |||
{ label: "缴费金额", name: "PaymentAmount", width: 100, align: "left" }, | |||
{ label: "剩余应缴余额", name: "QJAmount", width: 100, align: "left" }, | |||
{ label: "当前超出应收额", name: "OldBalance", width: 100, align: "left" }, | |||
{ label: "本次变动金额", name: "ChangeAmount", width: 100, align: "left" }, | |||
{ label: "本次余额", name: "NowBalance", width: 100, align: "left" }, | |||
{ label: "超出应收额", name: "NowBalance", width: 100, align: "left" }, | |||
{ label: "变动时间", name: "ChangeDate", width: 150, align: "left" }, | |||
{ | |||
label: "变动原因", name: "ChangeType", width: 100, align: "left", formatter: function (cellvalue, row) { | |||
@@ -143,9 +143,10 @@ var bootstrap = function ($, learun) { | |||
}, | |||
{ label: "年级", name: "Grade", width: 100, align: "left" }, | |||
{ label: "缴费年度", name: "FSYear", width: 100, align: "left" }, | |||
{ label: "应缴金额", name: "YJAmount", width: 100, align: "left" }, | |||
{ label: "实缴金额", name: "SJAmount", width: 100, align: "left" }, | |||
{ label: "缴费年度余额", name: "FSBlance", width: 100, align: "left" }, | |||
{ label: "收费标准", name: "YJAmount", width: 80, align: "left" }, | |||
{ label: "缴费金额", name: "SJAmount", width: 80, align: "left" }, | |||
{ label: "应缴余额", name: "NeedToPay", width: 80, align: "left" }, | |||
{ label: "超出应收额", name: "FSBlance", width: 80, align: "left" }, | |||
{ | |||
label: "缴费状态", name: "PayFeeStatus", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
@@ -25,9 +25,21 @@ var bootstrap = function ($, learun) { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 250, 400); | |||
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); | |||
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); | |||
$('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); | |||
$('#DeptNo').lrselect({ | |||
url: "/ReceiveSendFeeManagement/FinaChargeStuYear/GetDeptByEmpNo", | |||
value: "DeptNo", | |||
text: "DeptName" | |||
}); | |||
$('#MajorNo').lrselect({ | |||
url: "/ReceiveSendFeeManagement/FinaChargeStuYear/GetMajorByEmpNo", | |||
value: "MajorNo", | |||
text: "MajorName" | |||
}); | |||
$('#ClassNo').lrselect({ | |||
url:"/ReceiveSendFeeManagement/FinaChargeStuYear/GetClassByEmpNo", | |||
value: "ClassNo", | |||
text: "ClassName" | |||
}); | |||
$('#PayFeeStatus').lrDataItemSelect({ code: 'PayStatus' }); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
@@ -106,9 +118,10 @@ var bootstrap = function ($, learun) { | |||
}, | |||
{ label: "年级", name: "Grade", width: 80, align: "left" }, | |||
{ label: "缴费年度", name: "FSYear", width: 100, align: "left" }, | |||
{ label: "应缴金额", name: "YJAmount", width: 100, align: "left" }, | |||
{ label: "实缴金额", name: "SJAmount", width: 100, align: "left" }, | |||
{ label: "缴费年度余额(负数代表欠缴)", name: "FSBlance", width: 180, align: "left" }, | |||
{ label: "收费标准", name: "YJAmount", width: 80, align: "left" }, | |||
{ label: "缴费金额", name: "SJAmount", width: 80, align: "left" }, | |||
{ label: "应缴余额", name: "NeedToPay", width: 80, align: "left" }, | |||
{ label: "超出应收额", name: "FSBlance", width: 80, align: "left" }, | |||
{ | |||
label: "缴费状态", name: "PayFeeStatus", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
@@ -143,8 +143,9 @@ var bootstrap = function ($, learun) { | |||
} | |||
}, | |||
{ label: "收费标准", name: "Standard", width: 100, align: "left" }, | |||
{ label: "实缴金额", name: "SJAmount", width: 100, align: "left" }, | |||
{ label: "缴费余额", name: "FSBlance", width: 100, align: "left" }, | |||
{ label: "缴费金额", name: "SJAmount", width: 100, align: "left" }, | |||
{ label: "应缴余额", name: "NeedToPay", width: 100, align: "left" }, | |||
{ label: "超出应收额", name: "FSBlance", width: 100, align: "left" }, | |||
{ | |||
label: "缴费状态", name: "PayFeeStatus", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
@@ -56,6 +56,7 @@ | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_refund" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 退费</a> | |||
<a id="lr_view" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 查看</a> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -58,6 +58,29 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}); | |||
//查看 | |||
$('#lr_view').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('FSYIId'); | |||
var RefundStatus = $('#gridtable').jfGridValue('RefundStatus'); | |||
if (learun.checkrow(keyValue)) { | |||
if (keyValue.indexOf(',') != -1) { | |||
learun.alert.error("查看操作只支持单条记录"); | |||
return; | |||
} | |||
if (RefundStatus==false) { | |||
learun.alert.error("未进行退费操作,请核对。"); | |||
return; | |||
} | |||
learun.layerForm({ | |||
id: 'formview', | |||
title: '查看', | |||
url: top.$.rootUrl + '/ReceiveSendFeeManagement/FinaChargeRefund/FormView?keyValue=' + keyValue, | |||
width: 600, | |||
height: 400, | |||
btn:null | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
@@ -108,8 +131,9 @@ var bootstrap = function ($, learun) { | |||
} | |||
}, | |||
{ label: "收费标准", name: "Standard", width: 100, align: "left" }, | |||
{ label: "实缴金额", name: "SJAmount", width: 100, align: "left" }, | |||
{ label: "缴费余额", name: "FSBlance", width: 100, align: "left" }, | |||
{ label: "缴费金额", name: "SJAmount", width: 100, align: "left" }, | |||
{ label: "应缴余额", name: "NeedToPay", width: 100, align: "left" }, | |||
{ label: "超出应收额", name: "FSBlance", width: 100, align: "left" }, | |||
{ | |||
label: "缴费状态", name: "PayFeeStatus", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
@@ -88,8 +88,9 @@ var bootstrap = function ($, learun) { | |||
} | |||
}, | |||
{ label: "收费标准", name: "Standard", width: 100, align: "left" }, | |||
{ label: "实缴金额", name: "SJAmount", width: 100, align: "left" }, | |||
{ label: "缴费余额", name: "FSBlance", width: 100, align: "left" }, | |||
{ label: "缴费金额", name: "SJAmount", width: 100, align: "left" }, | |||
{ label: "应缴余额", name: "NeedToPay", width: 100, align: "left" }, | |||
{ label: "超出应收额", name: "FSBlance", width: 100, align: "left" }, | |||
{ | |||
label: "缴费状态", name: "PayFeeStatus", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
@@ -1202,6 +1202,7 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_SendFile\ReadListParty.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_SendFile\ReadListDocument.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\ClassPlanTeach\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\TeachSwitch\FinaCharge.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\TextBookIndentDetail\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\TextBookIndent\Form.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\TextBookIndent\FormDetail.js" /> | |||
@@ -1632,6 +1633,7 @@ | |||
<Content Include="Areas\PersonnelManagement\Views\WorkStudyPositionApply\Form.js" /> | |||
<Content Include="Areas\PersonnelManagement\Views\WorkStudyPositionApply\FormView.js" /> | |||
<Content Include="Areas\PersonnelManagement\Views\WorkStudyPositionApply\Index.js" /> | |||
<Content Include="Areas\ReceiveSendFeeManagement\Views\FinaChargeRefund\FormView.js" /> | |||
<Content Include="Areas\ReceiveSendFeeManagement\Views\FinaChargeStuOrder\Import.js" /> | |||
<Content Include="Areas\ReceiveSendFeeManagement\Views\FinaChargeStuYearItem\Import.js" /> | |||
<Content Include="Areas\ReceiveSendFeeManagement\Views\FinaChargeStuYearItem\IndexForRefund.js" /> | |||
@@ -7995,6 +7997,8 @@ | |||
<Content Include="Areas\ReceiveSendFeeManagement\Views\FinaChargeStuYearItem\IndexForRefund.cshtml" /> | |||
<Content Include="Content\excel\线下缴费记录.xls" /> | |||
<Content Include="Areas\ReceiveSendFeeManagement\Views\FinaChargeStuOrder\Import.cshtml" /> | |||
<Content Include="Areas\ReceiveSendFeeManagement\Views\FinaChargeRefund\FormView.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\TeachSwitch\FinaCharge.cshtml" /> | |||
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | |||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | |||
<Content Include="Views\Login\Default-beifen.cshtml" /> | |||
@@ -31,7 +31,7 @@ namespace Learun.Application.WebApi.Modules | |||
{ | |||
private FinaChargeStuYearIBLL finaChargeStuYearIBLL = new FinaChargeStuYearBLL(); | |||
private FinaChargeStuOrderIBLL finaChargeStuOrderIbll = new FinaChargeStuOrderBLL(); | |||
private EADateArrangeIBLL eaDateArrangeIbll = new EADateArrangeBLL(); | |||
private TeachSwitchIBLL teachSwitchIbll = new TeachSwitchBLL(); | |||
public FinaChargeStuYearApi() | |||
: base("/ReceiveSendFeeManagement/FinaChargeStuYearApi") | |||
@@ -51,12 +51,8 @@ namespace Learun.Application.WebApi.Modules | |||
public Response GetPayfeeList(dynamic _) | |||
{ | |||
var nowyearsemester = Common.GetSemesterAndYear(); | |||
var eastatus = eaDateArrangeIbll.GetEADateArrangeEntity("17"); | |||
if (eastatus != null && eastatus.CheckMark == "1" && | |||
eastatus.AcademicYearNo == nowyearsemester.AcademicYearShort | |||
&& eastatus.Semester == nowyearsemester.Semester && eastatus.MakeDate < DateTime.Now && | |||
eastatus.EndDate > DateTime.Now) | |||
var eastatus = teachSwitchIbll.GetFirst("jf"); | |||
if (eastatus != null && eastatus.status == "1") | |||
{ | |||
ReqPageParam parameter = this.GetReqData<ReqPageParam>(); | |||
var data = finaChargeStuYearIBLL.GetPageList(parameter.pagination, parameter.queryJson); | |||
@@ -73,7 +69,7 @@ namespace Learun.Application.WebApi.Modules | |||
{ | |||
return Fail("当前不在缴费时间范围"); | |||
} | |||
} | |||
public Response GetPayfeeInfo(dynamic _) | |||
@@ -206,7 +202,7 @@ namespace Learun.Application.WebApi.Modules | |||
bt = qrCodeEncoder.Encode(enCodeString, Encoding.UTF8); | |||
//二维码图片的名称 | |||
string filename = orderId; | |||
if (!DirFileHelper.IsExistFile(QRCodeFile+"/Content/images/QRCode/")) | |||
if (!DirFileHelper.IsExistFile(QRCodeFile + "/Content/images/QRCode/")) | |||
{ | |||
Directory.CreateDirectory(QRCodeFile + "/Content/images/QRCode/"); | |||
} | |||
@@ -256,6 +256,61 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
public IEnumerable<ClassInfoEntity> GetClassByEmpNo(string EmpNo) | |||
{ | |||
try | |||
{ | |||
return classInfoService.GetClassByEmpNo(EmpNo); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
public IEnumerable<CdDeptEntity> GetDeptByEmpNo(string EmpNo) | |||
{ | |||
try | |||
{ | |||
return classInfoService.GetDeptByEmpNo(EmpNo); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
public IEnumerable<CdMajorEntity> GetMajorByEmpNo(string EmpNo) | |||
{ | |||
try | |||
{ | |||
return classInfoService.GetMajorByEmpNo(EmpNo); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
@@ -62,5 +62,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
IEnumerable<ClassInfoEntity> GetAllClass(); | |||
IEnumerable<ClassInfoEntity> GetClassByMajorNo(string majorNo); | |||
IEnumerable<ClassInfoEntity> GetClassByEmpNo(string EmpNo); | |||
IEnumerable<CdDeptEntity> GetDeptByEmpNo(string EmpNo); | |||
IEnumerable<CdMajorEntity> GetMajorByEmpNo(string EmpNo); | |||
} | |||
} |
@@ -348,5 +348,61 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
} | |||
public IEnumerable<ClassInfoEntity> GetClassByEmpNo(string EmpNo) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindList<ClassInfoEntity>(m => m.CheckMark == true && m.ClassDiredctorNo == EmpNo); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
public IEnumerable<CdDeptEntity> GetDeptByEmpNo(string EmpNo) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindList<CdDeptEntity>("select b.* from ClassInfo a left join cddept b on a.deptno=b.deptno where a.ClassDiredctorNo='"+EmpNo+ "' and a.CheckMark=1"); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
public IEnumerable<CdMajorEntity> GetMajorByEmpNo(string EmpNo) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindList<CdMajorEntity>("select b.* from ClassInfo a left join cdmajor b on a.majorno=b.majorno where a.ClassDiredctorNo='" + EmpNo + "' and a.checkmark=1 and b.checkmark=1"); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
} | |||
} |
@@ -84,6 +84,10 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
if (!queryParam["JF"].IsEmpty()) | |||
{ | |||
strSql.Append(" AND t.type ='jf' "); | |||
} | |||
return this.BaseRepository().FindList<TeachSwitchEntity>(strSql.ToString(), dp, pagination); | |||
} | |||
catch (Exception ex) | |||
@@ -155,11 +155,9 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement | |||
//退费状态修改,余额归零 | |||
finaChargeStuYearItemEntity.RefundStatus = true; | |||
finaChargeStuYearItemEntity.FSBlance = 0; | |||
//退费后实缴值也要更新 | |||
finaChargeStuYearItemEntity.SJAmount = finaChargeStuYearItemEntity.SJAmount- finaChargeRefundEntity.Amount; | |||
db.Update(finaChargeStuYearItemEntity); | |||
//FinaChargeStuYear年度余额计算 | |||
db.ExecuteBySql("update FinaChargeStuYear set SJAmount=SJAmount-"+ finaChargeRefundEntity.Amount + ",FSBlance=FSBlance-" + finaChargeRefundEntity.Amount + " where FSYId='" + finaChargeStuYearItemEntity.FSYId + "'"); | |||
db.ExecuteBySql("update FinaChargeStuYear set FSBlance=FSBlance-" + finaChargeRefundEntity.Amount + " where FSYId='" + finaChargeStuYearItemEntity.FSYId + "'"); | |||
//学生余额扣减 | |||
db.ExecuteBySql("update FinaChargeStudent set FSBlance=FSBlance-" + finaChargeRefundEntity.Amount + " where StuNo='" + finaChargeStuYearItemEntity.StuNo + "'"); | |||
//交易流水记录 | |||
@@ -172,10 +170,10 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement | |||
finaChargeStuBalance.ChargeItemName = finaChargeRefundEntity.ChargeItemName; | |||
finaChargeStuBalance.Standard = finaChargeStuYearItemEntity.Standard; | |||
finaChargeStuBalance.DJAmount = 0; | |||
finaChargeStuBalance.PaymentAmount = -finaChargeRefundEntity.Amount; | |||
finaChargeStuBalance.PaymentAmount =0; | |||
finaChargeStuBalance.QJAmount = 0; | |||
finaChargeStuBalance.OldBalance = finaChargeRefundEntity.Amount; | |||
finaChargeStuBalance.ChangeAmount = finaChargeStuBalance.PaymentAmount; | |||
finaChargeStuBalance.ChangeAmount = finaChargeRefundEntity.Amount; | |||
finaChargeStuBalance.NowBalance = 0; | |||
finaChargeStuBalance.ChangeDate = DateTime.Now; | |||
finaChargeStuBalance.ChangeType = 4; | |||
@@ -269,6 +269,8 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement | |||
{ | |||
failDt.Columns.Add(dc.ColumnName, dc.DataType); | |||
} | |||
//导入订单 | |||
var oldOrderList = BaseRepository("CollegeMIS").FindList<FinaChargeStuOrderEntity>("select * from FinaChargeStuOrder where OrderType='2' "); | |||
//缴费方式字典 | |||
var dataitemlist = datarItemService.GetDetailList("PayTypeOffLine"); | |||
//获取已有年度学生缴费记录 | |||
@@ -285,7 +287,7 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement | |||
FinaChargeStuYearEntity finaChargeStuYearEntity = null; | |||
int ChangeType = 0; | |||
//检测是否有空值 | |||
if (dr[0].ToString() == "" || dr[1].ToString() == "" || dr[2].ToString() == "" || dr[3].ToString() == "" || dr[4].ToString() == "" || dr[5].ToString() == "" || dr[6].ToString() == "") | |||
if (dr[0].ToString() == "" || dr[1].ToString() == "" || dr[2].ToString() == "" || dr[3].ToString() == "" || dr[4].ToString() == "" || dr[5].ToString() == "") | |||
{ | |||
throw new Exception("行内数据有空值,不能为空!"); | |||
} | |||
@@ -311,7 +313,7 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement | |||
//筛选不在收费学生表内的数据 | |||
finaChargeStuYearEntity = oldFinaChargeStuYearList.FirstOrDefault(m => m.StuNo == dr[0].ToString() && m.FSYear == payyearresult); | |||
finaChargeStuYearItemList = oldFinaChargeStuYearItemList.Where(m => m.StuNo == dr[0].ToString() && m.StuName == dr[1].ToString() && m.FSYear == payyearresult); | |||
if (finaChargeStuYearEntity == null || finaChargeStuYearItemList.Count()==0) | |||
if (finaChargeStuYearEntity == null || finaChargeStuYearItemList.Count() == 0) | |||
{ | |||
throw new Exception("【年度收费学生】不存在,请核对!"); | |||
} | |||
@@ -324,52 +326,39 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement | |||
} | |||
} | |||
//缴费方式判断 | |||
var itemcodeentity = dataitemlist.FirstOrDefault(m=>m.F_ItemName==dr[6].ToString()); | |||
if (itemcodeentity==null) | |||
var itemcodeentity = dataitemlist.FirstOrDefault(m => m.F_ItemName == dr[4].ToString()); | |||
if (itemcodeentity == null) | |||
{ | |||
throw new Exception("【缴费方式】只能为现金或贷款,请核对!"); | |||
} | |||
int itemcodeint = 0; | |||
if (!int.TryParse(itemcodeentity.F_ItemCode,out itemcodeint)) | |||
if (!int.TryParse(itemcodeentity.F_ItemCode, out itemcodeint)) | |||
{ | |||
throw new Exception("【线下缴费方式字典(PayTypeOffLine)】值code只能为整数,请核对!"); | |||
} | |||
//缴费明细判断 | |||
finaChargeStuYearItemEntity =finaChargeStuYearItemList.FirstOrDefault(m=>m.ChargeItemCode==dr[3].ToString()); | |||
if (finaChargeStuYearItemEntity==null) | |||
//线下订单去重 | |||
if (oldOrderList.Count(m => m.BankOrder == dr[5].ToString()) > 0) | |||
{ | |||
throw new Exception("【年度学生收费明细】不存在,请核对!"); | |||
} | |||
else | |||
{ | |||
//筛选已缴费的学生 | |||
if (finaChargeStuYearItemEntity.PayFeeStatus == 1) | |||
{ | |||
throw new Exception("【年度学生收费明细】已缴费,请核对!"); | |||
} | |||
throw new Exception("【线下缴费编号】已存在,请核对!"); | |||
} | |||
//开始导入 | |||
//生成订单 | |||
FinaChargeStuOrderEntity orderEntity=new FinaChargeStuOrderEntity(); | |||
FinaChargeStuOrderEntity orderEntity = new FinaChargeStuOrderEntity(); | |||
orderEntity.Create(); | |||
orderEntity.FSYId = finaChargeStuYearItemEntity.FSYId; | |||
orderEntity.YearNo = finaChargeStuYearItemEntity.FSYear; | |||
orderEntity.StuNo = finaChargeStuYearItemEntity.StuNo; | |||
orderEntity.FSYId = finaChargeStuYearEntity.FSYId; | |||
orderEntity.YearNo = finaChargeStuYearEntity.FSYear; | |||
orderEntity.StuNo = finaChargeStuYearEntity.StuNo; | |||
Random ran = new Random(); | |||
orderEntity.orderid = DateTime.Now.ToString("yyyyMMddhhmmss") + ran.Next(0, 100000); | |||
orderEntity.YJAmount = finaChargeStuYearItemEntity.Standard; | |||
orderEntity.SJAmount = dresult; | |||
orderEntity.DJAmount = orderEntity.YJAmount-orderEntity.SJAmount; | |||
if (orderEntity.DJAmount < 0)//有结余 | |||
{ | |||
orderEntity.NowBlance = Math.Abs(orderEntity.DJAmount.Value); | |||
orderEntity.DJAmount = 0; | |||
} | |||
orderEntity.PlaceOrderTime = DateTime.Now; | |||
orderEntity.Status = 1; | |||
orderEntity.OrderType = 2; | |||
db.Insert(orderEntity); | |||
//订单明细 | |||
orderEntity.BankOrder = dr[5].ToString(); | |||
//历史固定项目未缴费和部分缴费的数据 | |||
var oldnotpaylist = oldFinaChargeStuYearItemList.Where(m => m.PayFeeStatus != 1).OrderBy(m => m.priority).ToList(); | |||
finaChargeStuYearItemEntity = oldnotpaylist.FirstOrDefault(); | |||
//订单明细 写入优先级最高的一条为暂存位置 | |||
FinaChargeStuOrderDetailEntity detail = new FinaChargeStuOrderDetailEntity(); | |||
detail.Create(); | |||
detail.FCSOId = orderEntity.Id; | |||
@@ -383,21 +372,27 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement | |||
detail.NowBlance = Math.Abs(detail.DJAmount.Value); | |||
detail.DJAmount = 0; | |||
} | |||
//主表金额根据子表计算 | |||
orderEntity.YJAmount = detail.YJAmount; | |||
orderEntity.SJAmount = dresult; | |||
orderEntity.DJAmount = detail.DJAmount; | |||
orderEntity.NowBlance = detail.NowBlance; | |||
db.Insert(orderEntity); | |||
db.Insert(detail); | |||
//判断实缴金额是否缴清费用 | |||
decimal sjcount = Convert.ToDecimal(db.FindObject("select isnull(sum(SJAmount),0) from FinaChargeStuOrder where StuNo='" + orderEntity.StuNo + "' and Status=1 and YearNo='" + orderEntity.YearNo + "' ")); | |||
//增加本次缴费金额 | |||
sjcount = sjcount + orderEntity.SJAmount.Value; | |||
decimal yjcount = orderEntity.YJAmount.Value; | |||
decimal yjcount = finaChargeStuYearEntity.YJAmount.Value; | |||
if (sjcount >= yjcount) | |||
{ | |||
//更新缴费状态 | |||
db.ExecuteBySql("update FinaChargeStuYear set PayFeeStatus='1' where FSYId='" + finaChargeStuYearItemEntity.FSYId + "'"); | |||
db.ExecuteBySql("update FinaChargeStuYear set PayFeeStatus='1' where FSYId='" + finaChargeStuYearEntity.FSYId + "'"); | |||
} | |||
else//更新部分缴费状态 | |||
{ | |||
//更新缴费状态 | |||
db.ExecuteBySql("update FinaChargeStuYear set PayFeeStatus='4' where FSYId='" + finaChargeStuYearItemEntity.FSYId + "'"); | |||
db.ExecuteBySql("update FinaChargeStuYear set PayFeeStatus='4' where FSYId='" + finaChargeStuYearEntity.FSYId + "'"); | |||
} | |||
//费用变更明细 | |||
FinaChargeStuBalanceEntity finaChargeStuBalanceEntity = new FinaChargeStuBalanceEntity(); | |||
@@ -408,24 +403,40 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement | |||
finaChargeStuBalanceEntity.ChargeItemCode = detail.ChargeItemCode; | |||
finaChargeStuBalanceEntity.ChargeItemName = detail.ChargeItemName; | |||
finaChargeStuBalanceEntity.Standard = finaChargeStuYearItemEntity.Standard; | |||
finaChargeStuBalanceEntity.DJAmount = finaChargeStuYearItemEntity.FSBlance < 0 ? Math.Abs(finaChargeStuYearItemEntity.FSBlance.Value) : 0; | |||
finaChargeStuBalanceEntity.DJAmount = finaChargeStuYearItemEntity.NeedToPay; | |||
finaChargeStuBalanceEntity.PaymentAmount = dresult; | |||
finaChargeStuBalanceEntity.QJAmount = finaChargeStuYearItemEntity.Standard - dresult>0?finaChargeStuYearItemEntity.Standard - dresult:0; | |||
finaChargeStuBalanceEntity.OldBalance = finaChargeStuYearItemEntity.FSBlance <= 0? 0: finaChargeStuYearItemEntity.FSBlance; | |||
finaChargeStuBalanceEntity.ChangeAmount = dresult; | |||
finaChargeStuBalanceEntity.NowBalance = finaChargeStuYearItemEntity.FSBlance + dresult > 0? finaChargeStuYearItemEntity.FSBlance + dresult: 0; | |||
finaChargeStuBalanceEntity.QJAmount = finaChargeStuYearItemEntity.NeedToPay - dresult > 0 ? finaChargeStuYearItemEntity.NeedToPay - dresult : 0; | |||
finaChargeStuBalanceEntity.OldBalance = finaChargeStuYearItemEntity.FSBlance; | |||
if (detail.NowBlance > 0) | |||
{ | |||
finaChargeStuBalanceEntity.ChangeAmount = dresult - finaChargeStuBalanceEntity.DJAmount; | |||
finaChargeStuBalanceEntity.NowBalance = finaChargeStuBalanceEntity.ChangeAmount; | |||
} | |||
else | |||
{ | |||
finaChargeStuBalanceEntity.ChangeAmount = 0; | |||
finaChargeStuBalanceEntity.NowBalance = 0; | |||
} | |||
finaChargeStuBalanceEntity.ChangeDate = DateTime.Now; | |||
finaChargeStuBalanceEntity.ChangeType = itemcodeint; | |||
db.Insert(finaChargeStuBalanceEntity); | |||
//FinaChargeStuYearItem表 | |||
finaChargeStuYearItemEntity.SJAmount = finaChargeStuYearItemEntity.SJAmount+ dresult; | |||
finaChargeStuYearItemEntity.FSBlance = finaChargeStuYearItemEntity.FSBlance+ dresult; | |||
finaChargeStuYearItemEntity.PayFeeStatus = finaChargeStuYearItemEntity.FSBlance>0?1:4; | |||
finaChargeStuYearItemEntity.SJAmount = finaChargeStuYearItemEntity.SJAmount + dresult; | |||
if (detail.NowBlance > 0) | |||
{ | |||
finaChargeStuYearItemEntity.FSBlance = detail.NowBlance; | |||
finaChargeStuYearItemEntity.NeedToPay = 0; | |||
} | |||
else | |||
{ | |||
finaChargeStuYearItemEntity.NeedToPay = finaChargeStuYearItemEntity.Standard - dresult; | |||
} | |||
finaChargeStuYearItemEntity.PayFeeStatus = finaChargeStuYearItemEntity.FSBlance > 0 ? 1 : 4; | |||
db.Update(finaChargeStuYearItemEntity); | |||
//FinaChargeStuYear表 | |||
db.ExecuteBySql("update FinaChargeStuYear set SJAmount=SJAmount+"+ dresult + ",FSBlance=FSBlance+"+dresult+ ",PayFeeStatus=(case when(FSBlance+"+ 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 1 else 4 end) where FSYId='" + finaChargeStuYearItemEntity.FSYId + "'"); | |||
//FinaChargeStudent表 | |||
db.ExecuteBySql("update FinaChargeStudent set FSBlance=FSBlance+"+ dresult + " where StuNo='" + finaChargeStuYearItemEntity.StuNo+ "'"); | |||
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(); | |||
} | |||
catch (Exception ex) | |||
@@ -459,12 +470,12 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 自动分配固定项目缴费多余金额 | |||
/// </summary> | |||
/// <param name="YearNo"></param> | |||
public void AutoCharge(int YearNo=0) | |||
public void AutoCharge(int YearNo = 0) | |||
{ | |||
try | |||
{ | |||
@@ -472,20 +483,18 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement | |||
//获取有缴费余额的固定项目,按照优先级倒排,即优先级低的,先拿出多出余额去分配给高的项目 | |||
var FinaChargeStuYearItemHasBalance = BaseRepository("CollegeMIS").FindList<FinaChargeStuYearItemEntity>("select a.*,b.StuNo from FinaChargeStuYearItem a left join FinaChargeStuYear b on a.FSYId=b.FSYId where ChargeItemType=1 and F_DeleteMark=0 and a.FSBlance>0 order by priority desc "); | |||
//获取欠费的固定项目,按照优先级排序,优先级高的首先会分配到多出的余额 | |||
var FinaChargeStuYearItemHasDJ = BaseRepository("CollegeMIS").FindList<FinaChargeStuYearItemEntity>("select a.*,b.StuNo from FinaChargeStuYearItem a left join FinaChargeStuYear b on a.FSYId=b.FSYId where ChargeItemType=1 and F_DeleteMark=0 and a.FSBlance<0 order by priority "); | |||
var FinaChargeStuYearItemHasDJ = BaseRepository("CollegeMIS").FindList<FinaChargeStuYearItemEntity>("select a.*,b.StuNo from FinaChargeStuYearItem a left join FinaChargeStuYear b on a.FSYId=b.FSYId where ChargeItemType=1 and F_DeleteMark=0 and a.NeedToPay>0 order by priority "); | |||
foreach (var hasBalanceItem in FinaChargeStuYearItemHasBalance) | |||
{ | |||
if (hasBalanceItem.FSBlance > 0) | |||
{ | |||
//可分配余额 | |||
decimal balance = hasBalanceItem.FSBlance.Value; | |||
foreach (var QJItem in FinaChargeStuYearItemHasDJ) | |||
{ | |||
var db = BaseRepository("CollegeMIS").BeginTrans(); | |||
if (QJItem.FSBlance<0 && hasBalanceItem.FSBlance>0) | |||
if (QJItem.NeedToPay >0 && hasBalanceItem.FSBlance > 0) | |||
{ | |||
//费用变更表 | |||
//含余额表扣减 | |||
//超出应收额表余额扣减 | |||
FinaChargeStuBalanceEntity finaChargeStuBalanceMinus = new FinaChargeStuBalanceEntity(); | |||
finaChargeStuBalanceMinus.Create(); | |||
finaChargeStuBalanceMinus.StuNo = hasBalanceItem.StuNo; | |||
@@ -496,6 +505,7 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement | |||
finaChargeStuBalanceMinus.Standard = hasBalanceItem.Standard; | |||
finaChargeStuBalanceMinus.DJAmount = 0; | |||
finaChargeStuBalanceMinus.QJAmount = 0; | |||
finaChargeStuBalanceMinus.PaymentAmount = 0; | |||
finaChargeStuBalanceMinus.OldBalance = hasBalanceItem.FSBlance; | |||
finaChargeStuBalanceMinus.ChangeDate = DateTime.Now; | |||
finaChargeStuBalanceMinus.ChangeType = 5; | |||
@@ -508,26 +518,26 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement | |||
finaChargeStuBalanceAdd.ChargeItemCode = QJItem.ChargeItemCode; | |||
finaChargeStuBalanceAdd.ChargeItemName = QJItem.ChargeItemName; | |||
finaChargeStuBalanceAdd.Standard = QJItem.Standard; | |||
finaChargeStuBalanceAdd.DJAmount = Math.Abs(QJItem.FSBlance.Value); | |||
finaChargeStuBalanceMinus.ChangeDate = DateTime.Now; | |||
finaChargeStuBalanceMinus.ChangeType = 6; | |||
finaChargeStuBalanceAdd.DJAmount =QJItem.NeedToPay; | |||
finaChargeStuBalanceAdd.ChangeDate = DateTime.Now; | |||
finaChargeStuBalanceAdd.ChangeType = 6; | |||
//余额分配还有剩余 | |||
if (balance + QJItem.FSBlance >= 0) | |||
if (hasBalanceItem.FSBlance - QJItem.NeedToPay >= 0) | |||
{ | |||
QJItem.SJAmount = QJItem.Standard; | |||
QJItem.FSBlance = 0; | |||
QJItem.PayFeeStatus = 1; | |||
hasBalanceItem.FSBlance = hasBalanceItem.FSBlance + QJItem.FSBlance; | |||
finaChargeStuBalanceMinus.PaymentAmount = QJItem.FSBlance; | |||
finaChargeStuBalanceMinus.ChangeAmount = QJItem.FSBlance; | |||
hasBalanceItem.FSBlance = hasBalanceItem.FSBlance - QJItem.NeedToPay; | |||
finaChargeStuBalanceMinus.ChangeAmount = -QJItem.NeedToPay; | |||
finaChargeStuBalanceMinus.NowBalance = hasBalanceItem.FSBlance; | |||
db.Insert(finaChargeStuBalanceMinus); | |||
//欠费变更 | |||
finaChargeStuBalanceAdd.PaymentAmount = Math.Abs(QJItem.FSBlance.Value); | |||
//欠费变更记录 | |||
finaChargeStuBalanceAdd.PaymentAmount = QJItem.NeedToPay; | |||
finaChargeStuBalanceAdd.QJAmount = 0; | |||
finaChargeStuBalanceAdd.OldBalance = 0; | |||
finaChargeStuBalanceAdd.ChangeAmount = Math.Abs(QJItem.FSBlance.Value); | |||
finaChargeStuBalanceAdd.ChangeAmount = 0; | |||
finaChargeStuBalanceAdd.NowBalance = 0; | |||
QJItem.NeedToPay = 0; | |||
db.Insert(finaChargeStuBalanceAdd); | |||
db.Update(hasBalanceItem); | |||
db.Update(QJItem); | |||
@@ -537,19 +547,18 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement | |||
else | |||
{ | |||
QJItem.SJAmount = QJItem.SJAmount + hasBalanceItem.FSBlance; | |||
QJItem.FSBlance = QJItem.FSBlance + hasBalanceItem.FSBlance; | |||
QJItem.PayFeeStatus = 4; | |||
hasBalanceItem.FSBlance = 0; | |||
finaChargeStuBalanceMinus.PaymentAmount = -hasBalanceItem.FSBlance; | |||
finaChargeStuBalanceMinus.ChangeAmount = -hasBalanceItem.FSBlance; | |||
finaChargeStuBalanceMinus.NowBalance = 0; | |||
db.Insert(finaChargeStuBalanceMinus); | |||
//欠费变更 | |||
finaChargeStuBalanceAdd.PaymentAmount = hasBalanceItem.FSBlance; | |||
finaChargeStuBalanceAdd.QJAmount = QJItem.FSBlance+ hasBalanceItem.FSBlance; | |||
finaChargeStuBalanceAdd.QJAmount = QJItem.NeedToPay - hasBalanceItem.FSBlance; | |||
finaChargeStuBalanceAdd.OldBalance = 0; | |||
finaChargeStuBalanceAdd.ChangeAmount = hasBalanceItem.FSBlance; | |||
finaChargeStuBalanceAdd.ChangeAmount = 0; | |||
finaChargeStuBalanceAdd.NowBalance = 0; | |||
QJItem.NeedToPay = QJItem.NeedToPay - hasBalanceItem.FSBlance; | |||
hasBalanceItem.FSBlance = 0; | |||
db.Insert(finaChargeStuBalanceAdd); | |||
db.Update(hasBalanceItem); | |||
db.Update(QJItem); | |||
@@ -370,11 +370,6 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement | |||
//更新主表 | |||
oldFinaChargeStuYearEntity.YJAmount+= finaChargeStuYearItem.Standard; | |||
oldFinaChargeStuYearEntity.NeedToPay += finaChargeStuYearItem.Standard; | |||
//if (oldFinaChargeStuYearEntity.FSBlance>0) | |||
//{ | |||
//} | |||
//oldFinaChargeStuYearEntity.FSBlance -= finaChargeStuYearItem.Standard; | |||
db.Update(oldFinaChargeStuYearEntity); | |||
} | |||
else | |||