Просмотр исходного кода

收费项目,收费标准

西昌缴费二期
fzp 1 год назад
Родитель
Сommit
f9def0d5da
20 измененных файлов: 473 добавлений и 206 удалений
  1. +31
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Controllers/FinaChargeItemController.cs
  2. +8
    -8
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Controllers/FinaChargesStandardController.cs
  3. +12
    -8
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FinaChargeItem/Form.cshtml
  4. +1
    -7
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FinaChargeItem/Form.js
  5. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FinaChargeItem/Index.cshtml
  6. +72
    -13
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FinaChargeItem/Index.js
  7. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FinaChargeItem/ShowIndex.cshtml
  8. +6
    -6
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FinaChargesStandard/Form.cshtml
  9. +25
    -12
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FinaChargesStandard/Form.js
  10. +6
    -5
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FinaChargesStandard/Index.cshtml
  11. +54
    -46
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FinaChargesStandard/Index.js
  12. +17
    -17
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEnroll/StuEnrollService.cs
  13. +55
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargeItem/FinaChargeItemBLL.cs
  14. +38
    -11
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargeItem/FinaChargeItemEntity.cs
  15. +3
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargeItem/FinaChargeItemIBLL.cs
  16. +82
    -5
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargeItem/FinaChargeItemService.cs
  17. +4
    -4
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargesStandard/FinaChargesStandardBLL.cs
  18. +11
    -23
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargesStandard/FinaChargesStandardEntity.cs
  19. +3
    -3
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargesStandard/FinaChargesStandardIBLL.cs
  20. +42
    -34
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargesStandard/FinaChargesStandardService.cs

+ 31
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Controllers/FinaChargeItemController.cs Просмотреть файл

@@ -119,7 +119,20 @@ namespace Learun.Application.Web.Areas.ReceiveSendFeeManagement.Controllers
#endregion

#region 提交数据

[HttpPost]
[AjaxOnly]
public ActionResult Lock(string keyValue)
{
finaChargeItemIBLL.Lock(keyValue);
return Success("启用成功!");
}
[HttpPost]
[AjaxOnly]
public ActionResult UnLock(string keyValue)
{
finaChargeItemIBLL.UnLock(keyValue);
return Success("停用成功!");
}
/// <summary>
/// 删除实体数据
/// <param name="keyValue">主键</param>
@@ -160,13 +173,29 @@ namespace Learun.Application.Web.Areas.ReceiveSendFeeManagement.Controllers
}
else
{
if (model.ChargeItemID != Convert.ToInt32(keyValue))
if (model.ChargeItemID != keyValue)
{
return Fail("收费项目名称不能重复!");
}
}
}

var modelcode= finaChargeItemIBLL.GetFinaChargeItemEntityByChargeItemCode(entity.ChargeItemCode);
if (modelcode != null)
{
if (string.IsNullOrEmpty(keyValue))
{
return Fail("收费项目代码不能重复!");
}
else
{
if (modelcode.ChargeItemID != keyValue)
{
return Fail("收费项目代码不能重复!");
}
}
}

entity.CreateDate = DateTime.Now;
entity.CreateUserId = loginUserInfo.userId;
entity.CreateUserName = loginUserInfo.realName;


+ 8
- 8
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Controllers/FinaChargesStandardController.cs Просмотреть файл

@@ -152,9 +152,9 @@ namespace Learun.Application.Web.Areas.ReceiveSendFeeManagement.Controllers
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormData(string majorNo, string academicYearNo, string semester, string grade)
public ActionResult GetFormData(string majorNo, string syear,string grade)
{
var FinaChargesStandardData = finaChargesStandardIBLL.GetFinaChargesStandardListByMajorNo(majorNo, academicYearNo, semester, grade);
var FinaChargesStandardData = finaChargesStandardIBLL.GetFinaChargesStandardListByMajorNo(majorNo, syear, grade);
var jsonData = new
{
FinaChargesStandard = FinaChargesStandardData,
@@ -187,11 +187,11 @@ namespace Learun.Application.Web.Areas.ReceiveSendFeeManagement.Controllers
/// <summary>
/// <returns></returns>
[AjaxOnly]
public ActionResult GetFinaChargesStandardListByMajorNo(string majorNo, string academicYearNo, string semester, string grade)
public ActionResult GetFinaChargesStandardListByMajorNo(string majorNo, string syear, string grade)
{
var FinaChargesStandardData = finaChargesStandardIBLL.GetFinaChargesStandardListByMajorNo(majorNo, academicYearNo, semester, grade);
var FinaChargesStandardData = finaChargesStandardIBLL.GetFinaChargesStandardListByMajorNo(majorNo, syear, grade);

var hasStandardData = FinaChargesStandardData.Where(x => x.ChargeStandardID > 0);
var hasStandardData = FinaChargesStandardData.Where(x => x.ChargeStandardID !="");
var nohasStandardData = FinaChargesStandardData.Except(hasStandardData);

var hasStandardResult = hasStandardData.Select(x => new
@@ -234,7 +234,7 @@ namespace Learun.Application.Web.Areas.ReceiveSendFeeManagement.Controllers
return Fail("收费标准不存在!");
}
//判断某专业收费标准是否已使用
var isCharge = finaChargesStandardIBLL.IsChargeByMajorNo(entity.MajorNo, entity.AcademicYearNo, entity.Semester, entity.Grade);
var isCharge = finaChargesStandardIBLL.IsChargeByMajorNo(entity.DeptNo,entity.MajorNo, entity.SYear, entity.Grade);
if (isCharge)
{
return Fail("该信息正在被系统使用,不能删除!");
@@ -250,12 +250,12 @@ namespace Learun.Application.Web.Areas.ReceiveSendFeeManagement.Controllers
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult SaveForm(string majorNo, string academicYearNo, string semester, string grade, string strEntity)
public ActionResult SaveForm(string deptno,string majorNo, string syear, string grade, string strEntity)
{
var aa = strEntity.ToObject<List<FinaChargesStandardEntity>>();
var aaa = aa.Where(x => x.Standard.HasValue && x.Standard.Value > 0).ToList();

finaChargesStandardIBLL.SaveFinaChargesStandardList(majorNo, academicYearNo, semester, grade, aaa);
finaChargesStandardIBLL.SaveFinaChargesStandardList(deptno,majorNo, syear, grade, aaa);
return Success("保存成功!");
}



+ 12
- 8
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FinaChargeItem/Form.cshtml Просмотреть файл

@@ -3,21 +3,25 @@
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap">
<div class="col-xs-12 lr-form-item" data-table="FinaChargeItem" >
<div class="col-xs-6 lr-form-item" data-table="FinaChargeItem">
<div class="lr-form-item-title">收费项目名称<font face="宋体">*</font></div>
<input id="ChargeItemName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="FinaChargeItem" >
<div class="lr-form-item-title">备注</div>
<textarea id="Remark" class="form-control" style="height:100px;" ></textarea>
<div class="col-xs-6 lr-form-item" data-table="FinaChargeItem">
<div class="lr-form-item-title">收费项目编号<font face="宋体">*</font></div>
<input id="ChargeItemCode" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="FinaChargeItem" >
<div class="lr-form-item-title">系统保留标志</div>
<div id="KeyWordMark"></div>
<div class="col-xs-6 lr-form-item" data-table="FinaChargeItem">
<div class="lr-form-item-title">收费项目类型<font face="宋体">*</font></div>
<div id="ChargeItemType"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="FinaChargeItem" >
<div class="col-xs-6 lr-form-item" data-table="FinaChargeItem">
<div class="lr-form-item-title">优先级<font face="宋体">*</font></div>
<input id="priority" type="text" class="form-control" isvalid="yes" checkexpession="Num" />
</div>
<div class="col-xs-12 lr-form-item" data-table="FinaChargeItem">
<div class="lr-form-item-title">备注</div>
<textarea id="Remark" class="form-control" style="height:100px;"></textarea>
</div>
</div>
@Html.AppendJsFile("/Areas/ReceiveSendFeeManagement/Views/FinaChargeItem/Form.js")

+ 1
- 7
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FinaChargeItem/Form.js Просмотреть файл

@@ -13,15 +13,9 @@ var bootstrap = function ($, learun) {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();

//默认:系统保留标志为否
$('#KeyWordMark').find('input').eq(1).trigger('click');
},
bind: function () {
$('#KeyWordMark').lrRadioCheckbox({
type: 'radio',
code: 'YesOrNoInt',
});
$('#ChargeItemType').lrDataItemSelect({ code:'ChargeItemType'});
},
initData: function () {
if (!!keyValue) {


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FinaChargeItem/Index.cshtml Просмотреть файл

@@ -36,6 +36,8 @@
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;录入</a>
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
<a id="lr_lock" class="btn btn-default"><i class="fa fa-lock"></i>&nbsp;启用</a>
<a id="lr_unlock" class="btn btn-default"><i class="fa fa-unlock"></i>&nbsp;停用</a>
</div>
</div>
</div>


+ 72
- 13
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FinaChargeItem/Index.js Просмотреть файл

@@ -58,10 +58,14 @@ var bootstrap = function ($, learun) {
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ChargeItemID');
if (learun.checkrow(keyValue)) {
var keyWordMark = $('#gridtable').jfGridValue('KeyWordMark');
if (keyWordMark == "1") {
learun.alert.warning("系统保留项目,不允许删除!");
return false;
if (keyValue.indexOf(',') != -1) {
learun.alert.warning("只能选择一条记录进行删除!");
return;
}
var CheckMark = $('#gridtable').jfGridValue('CheckMark');
if (CheckMark.indexOf('true') != -1) {
learun.alert.warning("删除失败,选中记录中包含已启用项目!");
return;
}
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
@@ -72,27 +76,82 @@ var bootstrap = function ($, learun) {
});
}
});
//启用
$('#lr_lock').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ChargeItemID');
if (learun.checkrow(keyValue)) {
var CheckMark = $('#gridtable').jfGridValue('CheckMark').toString();
if (CheckMark.indexOf('true') != -1) {
learun.alert.warning("选中记录中包含已启用项目!");
return;
}
//if (CheckMark === true) {
// learun.alert.warning("当前项目已启用!");
// return;
//}
learun.layerConfirm('是否确认启用该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FinaChargeItem/Lock', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
//停用
$('#lr_unlock').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ChargeItemID');
if (learun.checkrow(keyValue)) {
var CheckMark = $('#gridtable').jfGridValue('CheckMark').toString();
if (CheckMark.indexOf('false') != -1) {
learun.alert.warning("选中记录中包含已停用项目!");
return;
}
//if (CheckMark === false) {
// learun.alert.warning("当前项目还未审核不需要去审核!");
// return;
//}
learun.layerConfirm('是否确认停用该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FinaChargeItem/UnLock', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/ReceiveSendFeeManagement/FinaChargeItem/GetPageList',
headData: [
{ label: "收费项目名称", name: "ChargeItemName", width: 200, align: "left"},
{ label: "收费项目名称", name: "ChargeItemName", width: 200, align: "left" },
{ label: "收费项目编号", name: "ChargeItemCode", width: 200, align: "left" },
{
label: "收费项目类型", name: "ChargeItemType", width: 200, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'ChargeItemType',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{ label: "优先级", name: "priority", width: 100, align: "left" },
{ label: "备注", name: "Remark", width: 200, align: "left"},
{ label: "系统保留标志", name: "KeyWordMark", width: 100, align: "left",
{
label: "是否启用", name: "CheckMark", width: 100, align: "left",
formatter: function (cellvalue, rowObject) {
return cellvalue == "1" ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>";
}
},
{ label: "优先级", name: "priority", width: 100, align: "left" },
{ label: "时间", name: "CreateDate", width: 130, align: "left" },
{ label: "创建用户", name: "CreateUserName", width: 100, align: "left" },
}
],
isMultiselect: true,
mainId:'ChargeItemID',
isPage: true,
sidx: 'priority',
sord:'asc'
sidx: 'ChargeItemCode'
});
page.search();
},


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FinaChargeItem/ShowIndex.cshtml Просмотреть файл

@@ -103,7 +103,7 @@
<div class="chargeSec1Col5">
<div class="chargeSec1Box">
<input type="hidden" name="ChargeItemID" value="@item.ChargeItemID" />
<input type="hidden" name="KeyWordMark" value="@item.KeyWordMark" />
<input type="hidden" name="KeyWordMark" value="@item.CheckMark" />
<input type="hidden" name="ChargeItemCode" value="@item.ChargeItemCode" />
<input type="hidden" name="priority" value="@item.priority" />
<div class="chargeSec1Btn">


+ 6
- 6
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FinaChargesStandard/Form.cshtml Просмотреть файл

@@ -4,17 +4,17 @@
}
<div class="lr-form-wrap">
<div class="col-xs-6 lr-form-item" data-table="FinaChargesStandard">
<div class="lr-form-item-title">学年</div>
<input id="AcademicYearNo" type="text" class="form-control" readonly="readonly" />
</div>
<div class="col-xs-6 lr-form-item" data-table="FinaChargesStandard">
<div class="lr-form-item-title">学期</div>
<input id="Semester" type="text" class="form-control" readonly="readonly" />
<div class="lr-form-item-title">缴费年度</div>
<input id="SYear" type="text" class="form-control" readonly="readonly" />
</div>
<div class="col-xs-6 lr-form-item" data-table="FinaChargesStandard">
<div class="lr-form-item-title">年级</div>
<input id="Grade" type="text" class="form-control" readonly="readonly" />
</div>
<div class="col-xs-6 lr-form-item" data-table="FinaChargesStandard">
<div class="lr-form-item-title">系部编号</div>
<input id="DeptNo" type="text" class="form-control" readonly="readonly" />
</div>
<div class="col-xs-6 lr-form-item" data-table="FinaChargesStandard">
<div class="lr-form-item-title">专业编号</div>
<input id="MajorNo" type="text" class="form-control" readonly="readonly" />


+ 25
- 12
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FinaChargesStandard/Form.js Просмотреть файл

@@ -5,9 +5,9 @@
* 描 述:收费标准设置
*/
var acceptClick;
var keyValue = request('keyValue');//专业编号
var academicYearNo = request('academicYearNo');
var semester = request('semester');
var deptno = request('deptno');
var majorno = request('majorno');
var syear = request('syear');
var grade = request('grade');
var bootstrap = function ($, learun) {
"use strict";
@@ -19,16 +19,30 @@ var bootstrap = function ($, learun) {
},
bind: function () {
//绑定值
$('#AcademicYearNo').val(academicYearNo);
$('#Semester').val(semester);
$('#SYear').val(syear);
$('#Grade').val(grade);
$('#MajorNo').val(keyValue);
$('#DeptNo').val(deptno);
$('#MajorNo').val(majorno);
//收费项目下的收费标准表格
$('#FinaChargesStandard').jfGrid({
headData: [
{
label: '收费项目名称', name: 'ChargeItemName', width: 200, align: 'left'
},
{
label: '收费项目编号', name: 'ChargeItemCode', width: 200, align: 'left'
},
{
label: '收费项目类型', name: 'ChargeItemType', width: 200, align: 'left', formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'ChargeItemType',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{
label: '收费标准', name: 'Standard', width: 100, align: 'left'
, edit: {
@@ -38,13 +52,12 @@ var bootstrap = function ($, learun) {
],
isEdit: false,
height: 400,
sidx: 'ChargeItemID',
sord: 'asc'
sidx: 'ChargeItemCode'
});
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FinaChargesStandard/GetFormData?majorNo=' + keyValue + '&academicYearNo=' + academicYearNo + '&semester=' + semester + '&grade=' + grade + '', function (data) {
if (!!majorno) {
$.lrSetForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FinaChargesStandard/GetFormData?majorNo=' + majorno + '&syear=' + syear + '&grade=' + grade + '', function (data) {
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id).jfGridSet('refreshdata', data[id]);
@@ -67,7 +80,7 @@ var bootstrap = function ($, learun) {
for (var i = 0; i < data.length; i++) {
var item = data[i];
if (item.Standard != null && !isNumber(item.Standard)) {
learun.alert.warning("收费标准中存在非法字符!");
learun.alert.warning("收费标准必须是数字!");
return false;
}
}
@@ -75,7 +88,7 @@ var bootstrap = function ($, learun) {
var postData = {
strEntity: JSON.stringify(data)
};
$.lrSaveForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FinaChargesStandard/SaveForm?majorNo=' + keyValue + '&academicYearNo=' + academicYearNo + '&semester=' + semester + '&grade=' + grade + '', postData, function (res) {
$.lrSaveForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FinaChargesStandard/SaveForm?deptno=' + deptno+'&majorNo=' + majorno + '&syear=' + syear + '&grade=' + grade + '', postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();


+ 6
- 5
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FinaChargesStandard/Index.cshtml Просмотреть файл

@@ -13,10 +13,13 @@
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<div id="AcademicYearNo" type="lrselect" class="lr-select"></div>
<div id="DeptNo" type="lrselect" class="lr-select"></div>
</div>
<div class="lr-layout-tool-item">
<div id="Semester" type="lrselect" class="lr-select"></div>
<div id="MajorNo" type="lrselect" class="lr-select"></div>
</div>
<div class="lr-layout-tool-item">
<div id="SYear" type="lrselect" class="lr-select"></div>
</div>
<div class="lr-layout-tool-item">
<div id="Grade" type="lrselect" class="lr-select"></div>
@@ -30,9 +33,7 @@
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;录入</a>
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;设置费用</a>
</div>
</div>
</div>


+ 54
- 46
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/ReceiveSendFeeManagement/Views/FinaChargesStandard/Index.js Просмотреть файл

@@ -8,44 +8,16 @@ var refreshGirdData;
var selectedRow;
var bootstrap = function ($, learun) {
"use strict";
var academicYearNo;
var semester;
var grade;
var sYear,grade,deptno,majorno;
var page = {
init: function () {
//获取当前学年和学期
learun.httpAsyncGet(top.$.rootUrl + '/ReceiveSendFeeManagement/FinaChargesStandard/AcademicAndSemeter', function (res) {
if (res.code == 200) {
academicYearNo = res.data.academic;
semester = res.data.semester;
grade = res.data.grade;
$('#AcademicYearNo').lrselectSet(res.data.academic);
$('#Semester').lrselectSet(res.data.semester);
$('#Grade').lrselectSet(res.data.grade);

//todo:暂定
semester = "1";
$('#Semester').lrselectSet("1");

page.initGird();
};
});
//学年
$('#AcademicYearNo').lrselect({
placeholder: "请选择学年",
allowSearch: true,
url: top.$.rootUrl + '/ReceiveSendFeeManagement/FinaChargesStandard/GenerateNearByAcademic',
value: 'value',
text: 'text',
maxHeight: 200
});
//学期
$('#Semester').lrselect({
placeholder: "请选择学期",
url: top.$.rootUrl + '/ReceiveSendFeeManagement/FinaChargesStandard/GenerateNearBySemeter',
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' });
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' });
//缴费年度
$('#SYear').lrselect({
url: top.$.rootUrl + '/EducationalAdministration/CdMajor/GenerateNearByYear',
value: 'value',
text: 'text',
maxHeight: 200
text: 'text'
});
//年级
$('#Grade').lrselect({
@@ -55,8 +27,13 @@ var bootstrap = function ($, learun) {
text: 'text',
maxHeight: 200
});

var now = new Date();
sYear = now.getFullYear();
$('#SYear').lrselectSet(sYear);
grade = sYear.toString().substring(2);
$('#Grade').lrselectSet(grade);
page.bind();
page.initGird();

},
bind: function () {
@@ -66,9 +43,18 @@ var bootstrap = function ($, learun) {
});
// 查询
$('#lr_search').on('click', function () {
academicYearNo = $('#AcademicYearNo').lrselectGet();
semester = $('#Semester').lrselectGet();
sYear = $('#SYear').lrselectGet();
if (!sYear) {
learun.alert.warning("请选择收费年度!");
return;
}
grade = $('#Grade').lrselectGet();
if (!grade) {
learun.alert.warning("请选择年级!");
return;
}
deptno = $('#DeptNo').lrselectGet();
majorno=$('#MajorNo').lrselectGet();
page.search();
});
// 新增
@@ -83,7 +69,7 @@ var bootstrap = function ($, learun) {
learun.layerForm({
id: 'formFinaChargesStandard',
title: '新增',
url: top.$.rootUrl + '/ReceiveSendFeeManagement/FinaChargesStandard/Form?keyValue=' + selectedRow.MajorNo + '&academicYearNo=' + academicYearNo + '&semester=' + semester + '&grade=' + grade + '',
url: top.$.rootUrl + '/ReceiveSendFeeManagement/FinaChargesStandard/Form?deptno=' + selectedRow.DeptNo+'&majorno=' + selectedRow.MajorNo + '&syear=' + sYear + '&grade=' + grade + '',
width: 1000,
height: 600,
callBack: function (id) {
@@ -134,29 +120,51 @@ var bootstrap = function ($, learun) {
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/ReceiveSendFeeManagement/FinaChargesStandard/GetTreeList',
headData: [
{
label: "系部", name: "DeptNo", width: 200, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
key: value,
keyId: 'deptno',
callback: function (_data) {
callback(_data['deptname']);
}
});
} },
{ label: "专业编号", name: "MajorNo", width: 100, align: "left" },
{ label: "专业名称", name: "MajorName", width: 100, align: "left" },
{ label: "专业名称", name: "MajorName", width: 200, align: "left" },
{ label: "收费项目名称", name: "ChargeItemName", width: 200, align: "left" },
{ label: "收费项目编号", name: "ChargeItemCode", width: 100, align: "left" },
{ label: "收费标准", name: "Standard", width: 100, align: "left" },
{
label: "收费项目类型", name: "ChargeItemType", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'ChargeItemType',
callback: function (_data) {
callback(_data.text);
}
});
} },
],
isTree: true,
mainId: 'TempId',
parentId: 'ParentId',
//mainId:'ChargeStandardID',
isPage: true,
sidx: 'MajorNo',
sord: 'asc'
//sidx: 'MajorNo asc ,ChargeItemCode asc',
//sord: 'asc'
});
page.search();
},
search: function (param) {
param = param || {};
param.AcademicYearNo = academicYearNo;
param.Semester = semester;
param.SYear =sYear;
param.Grade = grade;
param.DeptNo = deptno;
param.MajorNo = majorno;
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};


+ 17
- 17
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEnroll/StuEnrollService.cs Просмотреть файл

@@ -687,7 +687,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
if (classInfo != null)
{
teacherInfo = this.BaseRepository("CollegeMIS").FindEntity<EmpInfoEntity>(a => a.EmpNo == classInfo.ClassDiredctorNo);
result = this.BaseRepository("CollegeMIS").FindList<FinaChargesStandardEntity>(a => a.Grade == classInfo.Grade && a.MajorNo == stuEnroll.MajorNo && a.AcademicYearNo == yearAndSemester.AcademicYearShort && a.Semester == yearAndSemester.Semester)
result = this.BaseRepository("CollegeMIS").FindList<FinaChargesStandardEntity>(a => a.Grade == classInfo.Grade && a.MajorNo == stuEnroll.MajorNo && a.SYear == yearAndSemester.AcademicYearShort )
.Select(a => new StuPayInfo
{
standerid = a.ChargeItemID,
@@ -699,30 +699,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
foreach (var item in result)
{
//住宿费
if (item.standerid == 12 && stuEnroll.IsCheckIn == false)
if (item.standerid == "12" && stuEnroll.IsCheckIn == false)
{
item.shouldPay = 0;
}
//学费
if (item.standerid == 14 && stuEnroll.IsSubsidize1 == true)
if (item.standerid == "14" && stuEnroll.IsSubsidize1 == true)
{
item.shouldPay = 0;
}
switch (item.standerid)
{
case 12:
case "12":
if (stuEnroll.IsCheckIn == false) item.shouldPay = 0;
break;
case 14:
case "14":
if (stuEnroll.IsSubsidize1 == true) item.shouldPay = 0;
break;
case 15:
case "15":
if (stuEnroll.IsMilitary == false) item.shouldPay = 0;
break;
case 32:
case "32":
if (stuEnroll.IsCheckIn == false) item.shouldPay = 0;
break;
case 33:
case "33":
if (stuEnroll.EnrollType == "0") item.shouldPay = 0;
break;
default:
@@ -771,7 +771,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
public class StuPayInfo
{
public int standerid { get; set; }
public string standerid { get; set; }
public decimal? shouldPay { get; set; }
public decimal? standard { get; set; }
public string standerdName { get; set; }
@@ -1765,7 +1765,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
var result = new List<StuPayInfo>();
if (classInfo != null)
{
result = this.BaseRepository("CollegeMIS").FindList<FinaChargesStandardEntity>(a => a.Grade == classInfo.Grade && a.MajorNo == stuEnroll.MajorNo && a.AcademicYearNo == yearAndSemester.AcademicYearShort && a.Semester == yearAndSemester.Semester)
result = this.BaseRepository("CollegeMIS").FindList<FinaChargesStandardEntity>(a => a.Grade == classInfo.Grade && a.MajorNo == stuEnroll.MajorNo && a.SYear == yearAndSemester.AcademicYearShort)
.Select(a => new StuPayInfo
{
standerid = a.ChargeItemID,
@@ -1777,30 +1777,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
foreach (var item in result)
{
//住宿费
if (item.standerid == 12 && stuEnroll.IsCheckIn == false)
if (item.standerid == "12" && stuEnroll.IsCheckIn == false)
{
item.shouldPay = 0;
}
//学费
if (item.standerid == 14 && stuEnroll.IsSubsidize1 == true)
if (item.standerid == "14" && stuEnroll.IsSubsidize1 == true)
{
item.shouldPay = 0;
}
switch (item.standerid)
{
case 12:
case "12":
if (stuEnroll.IsCheckIn == false) item.shouldPay = 0;
break;
case 14:
case "14":
if (stuEnroll.IsSubsidize1 == true) item.shouldPay = 0;
break;
case 15:
case "15":
if (stuEnroll.IsMilitary == false) item.shouldPay = 0;
break;
case 32:
case "32":
if (stuEnroll.IsCheckIn == false) item.shouldPay = 0;
break;
case 33:
case "33":
if (stuEnroll.EnrollType == "0") item.shouldPay = 0;
break;
default:


+ 55
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargeItem/FinaChargeItemBLL.cs Просмотреть файл

@@ -116,7 +116,42 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement
#endregion

#region 提交数据

public void Lock(string keyValue)
{
try
{
finaChargeItemService.Lock(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
public void UnLock(string keyValue)
{
try
{
finaChargeItemService.UnLock(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
/// <summary>
/// 删除实体数据
/// <param name="keyValue">主键</param>
@@ -165,6 +200,25 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement
}
}

public FinaChargeItemEntity GetFinaChargeItemEntityByChargeItemCode(string entityChargeItemName)
{
try
{
return finaChargeItemService.GetFinaChargeItemEntityByChargeItemCode(entityChargeItemName);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

}


+ 38
- 11
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargeItem/FinaChargeItemEntity.cs Просмотреть файл

@@ -17,8 +17,8 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement
/// <summary>
/// 收费项目代码
/// </summary>
[DatabaseGenerated(DatabaseGeneratedOption.Identity)] [Column("CHARGEITEMID")]
public int ChargeItemID { get; set; }
[Column("CHARGEITEMID")]
public string ChargeItemID { get; set; }
/// <summary>
/// 收费项名称
/// </summary>
@@ -30,21 +30,24 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement
[Column("REMARK")]
public string Remark { get; set; }
/// <summary>
/// 当前在用状态(0为过去的,1为现正用的)
/// 审核状态
/// </summary>
[Column("CURRENTMARK")]
public string CurrentMark { get; set; }
/// <summary>
/// 系统保留字段标志
/// </summary>
[Column("KEYWORDMARK")]
public string KeyWordMark { get; set; }
[Column("CHECKMARK")]
public bool? CheckMark { get; set; }

[Column("F_DELETEMARK")]
public bool? F_DeleteMark { get; set; }
/// <summary>
/// priority
/// </summary>
[Column("PRIORITY")]
public int? priority { get; set; }
/// <summary>
/// 收费项目类型 1固定项目,2非固定项目
/// </summary>
[Column("CHARGEITEMTYPE")]
public int? ChargeItemType { get; set; }
/// <summary>
/// CreateDate
/// </summary>
[Column("CREATEDATE")]
@@ -60,6 +63,19 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement
[Column("CREATEUSERNAME")]
public string CreateUserName { get; set; }

[Column("F_MODIFYDATE")]
public DateTime? F_ModifyDate { get; set; }
/// <summary>
/// F_ModifyUserId
/// </summary>
[Column("F_MODIFYUSERID")]
public string F_ModifyUserId { get; set; }
/// <summary>
/// F_ModifyUserName
/// </summary>
[Column("F_MODIFYUSERNAME")]
public string F_ModifyUserName { get; set; }

[Column("CHARGEITEMCODE")]
public string ChargeItemCode { get; set; }

@@ -71,6 +87,13 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement
/// </summary>
public void Create()
{
ChargeItemID = Guid.NewGuid().ToString();
CheckMark = false;
F_DeleteMark = false;
CreateDate = DateTime.Now;
UserInfo u = LoginUserInfo.Get();
CreateUserId = u.userId;
CreateUserName = u.realName;
}
/// <summary>
/// 编辑调用
@@ -78,7 +101,11 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement
/// <param name="keyValue"></param>
public void Modify(string keyValue)
{
this.ChargeItemID = Convert.ToInt32(keyValue);
this.ChargeItemID = keyValue;
F_ModifyDate = DateTime.Now;
UserInfo u = LoginUserInfo.Get();
F_ModifyUserId = u.userId;
F_ModifyUserName = u.realName;
}
#endregion
#region 扩展字段


+ 3
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargeItem/FinaChargeItemIBLL.cs Просмотреть файл

@@ -58,5 +58,8 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement
void SaveEntity(string keyValue, FinaChargeItemEntity entity);
#endregion

FinaChargeItemEntity GetFinaChargeItemEntityByChargeItemCode(string entityChargeItemName);
void Lock(string keyValue);
void UnLock(string keyValue);
}
}

+ 82
- 5
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargeItem/FinaChargeItemService.cs Просмотреть файл

@@ -31,7 +31,7 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement
var strSql = new StringBuilder();
strSql.Append("SELECT * ");
strSql.Append(" FROM FinaChargeItem t ");
strSql.Append(" WHERE 1=1 ");
strSql.Append(" WHERE 1=1 and F_DeleteMark=0 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
@@ -87,8 +87,7 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement
{
try
{
var keyvalue = Convert.ToInt32(keyValue);
return this.BaseRepository("CollegeMIS").FindEntity<FinaChargeItemEntity>(keyvalue);
return this.BaseRepository("CollegeMIS").FindEntity<FinaChargeItemEntity>(keyValue);
}
catch (Exception ex)
{
@@ -127,10 +126,87 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement
}
}

public FinaChargeItemEntity GetFinaChargeItemEntityByChargeItemCode(string chargeItemCode)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<FinaChargeItemEntity>(x => x.ChargeItemCode.Trim() == chargeItemCode.Trim());
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

#region 提交数据
public void Lock(string keyValue)
{
var db = this.BaseRepository("CollegeMIS").BeginTrans();
try
{
//单个启用
//this.BaseRepository("CollegeMIS").ExecuteBySql("update ClassInfo set CheckMark=1 where ClassId='" + keyValue + "'");

//多个启用
var keyValueArr = keyValue.Split(',');
foreach (var item in keyValueArr)
{
db.ExecuteBySql("update FinaChargeItem set CheckMark=1 where ChargeItemID='" + item + "'");
}
db.Commit();
}
catch (Exception ex)
{
db.Rollback();
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

public void UnLock(string keyValue)
{
var db = this.BaseRepository("CollegeMIS").BeginTrans();
try
{
//单个停用
//this.BaseRepository("CollegeMIS").ExecuteBySql("update ClassInfo set CheckMark=0 where ClassId='" + keyValue + "'");

//多个停用
var keyValueArr = keyValue.Split(',');
foreach (var item in keyValueArr)
{
db.ExecuteBySql("update FinaChargeItem set CheckMark=0 where ChargeItemID='" + item + "'");
}
db.Commit();
}
catch (Exception ex)
{
db.Rollback();
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
/// <summary>
/// 删除实体数据
/// <param name="keyValue">主键</param>
@@ -140,8 +216,9 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement
{
try
{
var keyvalue = Convert.ToInt32(keyValue);
this.BaseRepository("CollegeMIS").Delete<FinaChargeItemEntity>(t => t.ChargeItemID == keyvalue);
var entity = this.BaseRepository("CollegeMIS").FindEntity<FinaChargeItemEntity>(m=>m.ChargeItemID==keyValue);
entity.F_DeleteMark = true;
this.BaseRepository("CollegeMIS").Update(entity);
}
catch (Exception ex)
{


+ 4
- 4
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargesStandard/FinaChargesStandardBLL.cs Просмотреть файл

@@ -97,11 +97,11 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement
/// <param name="semester">学期</param>
/// <param name="grade">年级</param>
/// <returns></returns>
public IEnumerable<FinaChargesStandardEntity> GetFinaChargesStandardListByMajorNo(string majorNo, string academicYearNo, string semester, string grade)
public IEnumerable<FinaChargesStandardEntity> GetFinaChargesStandardListByMajorNo(string majorNo, string syear, string grade)
{
try
{
return finaChargesStandardService.GetFinaChargesStandardListByMajorNo(majorNo, academicYearNo, semester, grade);
return finaChargesStandardService.GetFinaChargesStandardListByMajorNo(majorNo, syear, grade);
}
catch (Exception ex)
{
@@ -249,11 +249,11 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement
/// <summary>
/// 保存
/// </summary>
public void SaveFinaChargesStandardList(string majorNo, string academicYearNo, string semester, string grade, List<FinaChargesStandardEntity> finaChargesStandardList)
public void SaveFinaChargesStandardList(string deptno,string majorNo, string syear, string grade, List<FinaChargesStandardEntity> finaChargesStandardList)
{
try
{
finaChargesStandardService.SaveFinaChargesStandardList(majorNo, academicYearNo, semester, grade, finaChargesStandardList);
finaChargesStandardService.SaveFinaChargesStandardList(deptno,majorNo, syear, grade, finaChargesStandardList);
}
catch (Exception ex)
{


+ 11
- 23
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargesStandard/FinaChargesStandardEntity.cs Просмотреть файл

@@ -17,13 +17,13 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement
/// <summary>
/// ChargeStandardID
/// </summary>
[DatabaseGenerated(DatabaseGeneratedOption.Identity)] [Column("CHARGESTANDARDID")]
public int ChargeStandardID { get; set; }
[Column("CHARGESTANDARDID")]
public string ChargeStandardID { get; set; }
/// <summary>
/// 收费项目代码
/// </summary>
[Column("CHARGEITEMID")]
public int ChargeItemID { get; set; }
public string ChargeItemID { get; set; }
/// <summary>
/// 年级
/// </summary>
@@ -40,35 +40,20 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement
[Column("MAJORNO")]
public string MajorNo { get; set; }
/// <summary>
/// 专业方向号(如0,1,2,3,4,5)0代表无专业方向细分
/// </summary>
[Column("MAJORDETAILNO")]
public string MajorDetailNo { get; set; }
/// <summary>
/// 专业方向名
/// </summary>
[Column("MAJORDETAILNAME")]
public string MajorDetailName { get; set; }
/// <summary>
/// 收费标准
/// </summary>
[Column("STANDARD")]
public decimal? Standard { get; set; }
/// <summary>
/// AcademicYearNo
/// SYear
/// </summary>
[Column("ACADEMICYEARNO")]
public string AcademicYearNo { get; set; }
/// <summary>
/// Semester
/// </summary>
[Column("SEMESTER")]
public string Semester { get; set; }
[Column("SYEAR")]
public string SYear { get; set; }
/// <summary>
/// CheckMark
/// </summary>
[Column("CHECKMARK")]
public string CheckMark { get; set; }
public bool? CheckMark { get; set; }
#endregion

#region 扩展操作
@@ -77,6 +62,7 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement
/// </summary>
public void Create()
{
this.ChargeStandardID = Guid.NewGuid().ToString();
}
/// <summary>
/// 编辑调用
@@ -84,7 +70,7 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement
/// <param name="keyValue"></param>
public void Modify(string keyValue)
{
this.ChargeStandardID = Convert.ToInt32(keyValue);
this.ChargeStandardID = keyValue;
}
#endregion
#region 扩展字段
@@ -95,6 +81,8 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement
public string ChargeItemName { get; set; }
[NotMapped]
public string ChargeItemCode { get; set; }
[NotMapped]
public int? ChargeItemType { get; set; }
/// <summary>
/// 已交金额
/// </summary>


+ 3
- 3
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargesStandard/FinaChargesStandardIBLL.cs Просмотреть файл

@@ -41,7 +41,7 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement
/// <param name="semester">学期</param>
/// <param name="grade">年级</param>
/// <returns></returns>
IEnumerable<FinaChargesStandardEntity> GetFinaChargesStandardListByMajorNo(string majorNo, string academicYearNo, string semester, string grade);
IEnumerable<FinaChargesStandardEntity> GetFinaChargesStandardListByMajorNo(string majorNo, string syear, string grade);
/// <summary>
/// 获取FinaChargesStandard表数据
/// <summary>
@@ -86,7 +86,7 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement
/// <summary>
/// 保存
/// </summary>
void SaveFinaChargesStandardList(string majorNo, string academicYearNo, string semester, string grade, List<FinaChargesStandardEntity> finaChargesStandardList);
void SaveFinaChargesStandardList(string deptno,string majorNo, string syear, string grade, List<FinaChargesStandardEntity> finaChargesStandardList);

/// <summary>
/// 某专业的收费标准是否已使用
@@ -96,7 +96,7 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement
/// <param name="semester"></param>
/// <param name="grade"></param>
/// <returns></returns>
bool IsChargeByMajorNo(string majorNo, string academicYearNo, string semester, string grade);
bool IsChargeByMajorNo(string deptNo, string majorNo, string sYear, string grade);
#endregion

IEnumerable<FinaChargesStandardEntity> GetFinaChargesStandardListByYongYou(string stuNo, int jiaoFeiYear);


+ 42
- 34
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ReceiveSendFeeManagement/FinaChargesStandard/FinaChargesStandardService.cs Просмотреть файл

@@ -77,46 +77,56 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement
try
{
var strSql = new StringBuilder();
strSql.Append("select CONVERT(varchar,t.ChargeStandardID)+'Temp' as TempId,t.ChargeStandardID,t.ChargeItemID,i.ChargeItemName,t.Standard,t.MajorNo,m.MajorName,t.AcademicYearNo,t.Semester,t.Grade,t.MajorNo as ParentId ");
strSql.Append("select CONVERT(varchar,t.ChargeStandardID)+'Temp' as TempId,t.ChargeStandardID,t.ChargeItemID,i.ChargeItemName,i.ChargeItemType,i.ChargeItemCode,t.Standard,'' as MajorNo,'' as MajorName,'' as DeptNo,t.SYear,t.Grade,t.MajorNo as ParentId ");
strSql.Append(" FROM [dbo].[CdMajor] m left join [dbo].[FinaChargesStandard] t on m.MajorNo=t.MajorNo left join [dbo].[FinaChargeItem] i on t.ChargeItemID=i.ChargeItemID ");
strSql.Append(" WHERE 1=1 ");
strSql.Append(" WHERE 1=1 and i.CheckMark=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["AcademicYearNo"].IsEmpty())
{
dp.Add("AcademicYearNo", queryParam["AcademicYearNo"].ToString(), DbType.String);
strSql.Append(" AND t.AcademicYearNo = @AcademicYearNo ");
}
if (!queryParam["Semester"].IsEmpty())
if (!queryParam["SYear"].IsEmpty())
{
dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String);
strSql.Append(" AND t.Semester = @Semester ");
dp.Add("SYear", queryParam["SYear"].ToString(), DbType.String);
strSql.Append(" AND t.SYear = @SYear ");
}
if (!queryParam["Grade"].IsEmpty())
{
dp.Add("Grade", queryParam["Grade"].ToString(), DbType.String);
strSql.Append(" AND t.Grade = @Grade ");
}
strSql.Append(" union ");
strSql.Append(" select m.MajorNo as TempId,0 as ChargeStandardID,0 as ChargeItemID,null as ChargeItemName, ");
strSql.Append(" (select SUM(t.Standard) from [dbo].[FinaChargesStandard] t where t.MajorNo=m.MajorNo ");
if (!queryParam["AcademicYearNo"].IsEmpty())
if (!queryParam["DeptNo"].IsEmpty())
{
strSql.Append(" AND t.AcademicYearNo = @AcademicYearNo ");
dp.Add("DeptNo", queryParam["DeptNo"].ToString(), DbType.String);
strSql.Append(" AND m.DeptNo = @DeptNo ");
}
if (!queryParam["Semester"].IsEmpty())
if (!queryParam["MajorNo"].IsEmpty())
{
strSql.Append(" AND t.Semester = @Semester ");
dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String);
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 SUM(t.Standard) from [dbo].[FinaChargesStandard] t left join [FinaChargeItem] tt on t.ChargeItemID=tt.ChargeItemID where tt.CheckMark=1 and t.MajorNo=m.MajorNo ");
if (!queryParam["SYear"].IsEmpty())
{
strSql.Append(" AND t.SYear = @SYear ");
}
if (!queryParam["Grade"].IsEmpty())
{
dp.Add("Grade", queryParam["Grade"].ToString(), DbType.String);
strSql.Append(" AND t.Grade = @Grade ");
}
strSql.Append(" ) as Standard,m.MajorNo,m.MajorName,null as AcademicYearNo,null as Semester,null as Grade,'0' as ParentId");
strSql.Append(" ) as Standard,m.MajorNo,m.MajorName,m.DeptNo,null as SYear,null as Grade,'0' as ParentId");
strSql.Append(" from [dbo].[CdMajor] m ");
strSql.Append(" WHERE 1=1 ");
if (!queryParam["DeptNo"].IsEmpty())
{
strSql.Append(" AND m.DeptNo = @DeptNo ");
}
if (!queryParam["MajorNo"].IsEmpty())
{
strSql.Append(" AND m.MajorNo = @MajorNo ");
}

strSql.Append(" order by majorno,ChargeItemCode ");
return this.BaseRepository("CollegeMIS").FindList<FinaChargesStandardEntity>(strSql.ToString(), dp);
}
catch (Exception ex)
@@ -140,8 +150,7 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement
{
try
{
var keyvalue = Convert.ToInt32(keyValue);
return this.BaseRepository("CollegeMIS").FindList<FinaChargesStandardEntity>(t => t.ChargeStandardID == keyvalue);
return this.BaseRepository("CollegeMIS").FindList<FinaChargesStandardEntity>(t => t.ChargeStandardID == keyValue);
}
catch (Exception ex)
{
@@ -164,14 +173,16 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement
/// <param name="semester">学期</param>
/// <param name="grade">年级</param>
/// <returns></returns>
public IEnumerable<FinaChargesStandardEntity> GetFinaChargesStandardListByMajorNo(string majorNo, string academicYearNo, string semester, string grade)
public IEnumerable<FinaChargesStandardEntity> GetFinaChargesStandardListByMajorNo(string majorNo, string syear,string grade)
{
try
{
var strSql = new StringBuilder();
strSql.Append("select i.ChargeItemID,REPLACE(i.ChargeItemName,'','') as ChargeItemName,t.ChargeStandardID,t.Standard as Standard");
strSql.Append("select i.ChargeItemID,i.ChargeItemName,i.ChargeItemCode,i.ChargeItemType,t.ChargeStandardID,t.Standard as Standard");
strSql.Append(" from [dbo].[FinaChargeItem] i left join [dbo].[FinaChargesStandard] t on i.ChargeItemID=t.ChargeItemID ");
strSql.Append(" and t.AcademicYearNo='" + academicYearNo + "' and t.Semester='" + semester + "' and t.Grade='" + grade + "' and t.MajorNo='" + majorNo + "' ");
strSql.Append(" and t.syear='" + syear + "' and t.Grade='" + grade + "' and t.MajorNo='" + majorNo + "' ");
strSql.Append(" where 1=1 and i.checkmark=1 order by ChargeItemCode");

return this.BaseRepository("CollegeMIS").FindList<FinaChargesStandardEntity>(strSql.ToString());
}
catch (Exception ex)
@@ -252,8 +263,7 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement
{
try
{
var aa = Convert.ToInt32(chargeItemID);
return this.BaseRepository("CollegeMIS").FindEntity<FinaChargesStandardEntity>(x => x.ChargeItemID == aa);
return this.BaseRepository("CollegeMIS").FindEntity<FinaChargesStandardEntity>(x => x.ChargeItemID == chargeItemID);
}
catch (Exception ex)
{
@@ -281,8 +291,7 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement
{
try
{
var keyvalue = Convert.ToInt32(keyValue);
this.BaseRepository("CollegeMIS").Delete<FinaChargesStandardEntity>(t => t.ChargeStandardID == keyvalue);
this.BaseRepository("CollegeMIS").Delete<FinaChargesStandardEntity>(t => t.ChargeStandardID == keyValue);
}
catch (Exception ex)
{
@@ -337,7 +346,7 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement
/// <summary>
/// 新增保存
/// </summary>
public void SaveFinaChargesStandardList(string majorNo, string academicYearNo, string semester, string grade, List<FinaChargesStandardEntity> finaChargesStandardList)
public void SaveFinaChargesStandardList(string deptNo,string majorNo, string sYear, string grade, List<FinaChargesStandardEntity> finaChargesStandardList)
{
var db = this.BaseRepository("CollegeMIS");
try
@@ -345,7 +354,7 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement
db.BeginTrans();

//删除学年学期年级某专业下的收费标准
var preResult = db.ExecuteBySql("delete from FinaChargesStandard where AcademicYearNo='" + academicYearNo + "' and Semester='" + semester + "' and Grade='" + grade + "' and MajorNo='" + majorNo + "' ");
var preResult = db.ExecuteBySql("delete from FinaChargesStandard where SYear='" + sYear + "' and Grade='" + grade + "' and MajorNo='" + majorNo + "' ");
//增加收费标准
foreach (var item in finaChargesStandardList)
{
@@ -353,12 +362,11 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement
{
ChargeItemID = item.ChargeItemID,
Grade = grade,
DeptNo = "-1",
DeptNo = deptNo,
MajorNo = majorNo,
Standard = item.Standard,
AcademicYearNo = academicYearNo,
Semester = semester,
CheckMark = "0"
SYear = sYear,
CheckMark = false
};
entity.Create();
db.Insert(entity);


Загрузка…
Отмена
Сохранить