@@ -1,8 +1,19 @@ | |||||
using Learun.Util; | |||||
using System; | |||||
using Learun.Util; | |||||
using System.Data; | using System.Data; | ||||
using Learun.Application.TwoDevelopment.EducationalAdministration; | using Learun.Application.TwoDevelopment.EducationalAdministration; | ||||
using System.Web.Mvc; | using System.Web.Mvc; | ||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System.Drawing; | |||||
using System.IO; | |||||
using System.Linq; | |||||
using System.Security.Cryptography; | |||||
using System.Text; | |||||
using System.Web; | |||||
using Learun.Application.Base.SystemModule; | |||||
using Learun.Application.TwoDevelopment.ReceiveSendFeeManagement; | |||||
using Newtonsoft.Json; | |||||
using ThoughtWorks.QRCode.Codec; | |||||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | ||||
{ | { | ||||
@@ -16,6 +27,9 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
public class StuInfoBasic_PayFeeController : MvcControllerBase | public class StuInfoBasic_PayFeeController : MvcControllerBase | ||||
{ | { | ||||
private StuInfoBasic_PayFeeIBLL stuInfoBasic_PayFeeIBLL = new StuInfoBasic_PayFeeBLL(); | private StuInfoBasic_PayFeeIBLL stuInfoBasic_PayFeeIBLL = new StuInfoBasic_PayFeeBLL(); | ||||
private StuInfoBasicIBLL stuInfoBasicIbll = new StuInfoBasicBLL(); | |||||
private StuInfoFreshIBLL stuInfoFreshIBLL = new StuInfoFreshBLL(); | |||||
private FinaChargesStandardIBLL finaChargesStandardIBLL = new FinaChargesStandardBLL(); | |||||
#region 视图功能 | #region 视图功能 | ||||
@@ -34,6 +48,12 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
{ | { | ||||
return View(); | return View(); | ||||
} | } | ||||
[HttpGet] | |||||
public ActionResult PayFeeForm() | |||||
{ | |||||
return View(); | |||||
} | |||||
/// <summary> | /// <summary> | ||||
/// 表单页 | /// 表单页 | ||||
/// <summary> | /// <summary> | ||||
@@ -83,6 +103,153 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
}; | }; | ||||
return Success(jsonData); | return Success(jsonData); | ||||
} | } | ||||
/// <summary> | |||||
/// 获取新生缴费明细 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetPayFeeDetail(string keyValue) | |||||
{ | |||||
var stuInfoBasic_PayFeeEntity = stuInfoBasic_PayFeeIBLL.GetStuInfoBasic_PayFeeEntity(keyValue); | |||||
var StuInfoFreshData = stuInfoBasicIbll.GetStuInfoBasicEntityByStuNo(stuInfoBasic_PayFeeEntity.StuNo); | |||||
//当前年度缴费记录 | |||||
var FeeOrderList = stuInfoFreshIBLL.GetFeeOrderList(StuInfoFreshData.StuNo, stuInfoBasic_PayFeeEntity.PayYear.Value); | |||||
var FinaChargesStandardList = new List<FinaChargesStandardEntity>(); | |||||
FinaChargesStandardList = finaChargesStandardIBLL.GetFinaChargesStandardListByYongYou(StuInfoFreshData.StuNo, stuInfoBasic_PayFeeEntity.PayYear.Value).ToList(); | |||||
var PayFeeTotal = FinaChargesStandardList.Select(x => x.SJAmount).Sum(); | |||||
var jsonData = new | |||||
{ | |||||
StuInfoFreshData = StuInfoFreshData, | |||||
FinaChargesStandardList = FinaChargesStandardList, | |||||
PayFeeTotal = PayFeeTotal, | |||||
YJAmount = FinaChargesStandardList.Sum(x => x.PayedMoney) | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
/// <summary> | |||||
/// 生成缴费二维码 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult PayFeeQRCode(string keyValue, string strEntity, string detailList) | |||||
{ | |||||
StuInfoFreshEntity entity = strEntity.ToObject<StuInfoFreshEntity>(); | |||||
List<StuEnrollFeeOrderDetailEntity> list = detailList.ToObject<List<StuEnrollFeeOrderDetailEntity>>(); | |||||
var model = stuInfoBasic_PayFeeIBLL.GetStuInfoBasic_PayFeeEntity(keyValue); | |||||
var imgUrl = ""; | |||||
Random ran = new Random(); | |||||
string merchantid = "105000082201406";//商户号 | |||||
string posid = "043724806";//商户柜台代码 | |||||
string branchid = "510000000";//分行代码 | |||||
string orderid = DateTime.Now.ToString("yyyyMMddhhmmss") + ran.Next(0, 100000); | |||||
string payment = entity.PayMoney.ToString(); | |||||
string curcode = "01"; | |||||
string txcode = "530550"; | |||||
string remark1 = model.StuNo; | |||||
string remark2 = model.PayYear.ToString(); | |||||
string returntype = "3"; | |||||
string timeout = DateTime.Now.AddMinutes(10).ToString("yyyyMMddHHmmss"); | |||||
string pub32tr2 = "40d987faa793a0a27e7a86ef020111"; | |||||
string bankURL = "https://ibsbjstar.ccb.com.cn/CCBIS/ccbMain?CCB_IBSVersion=V6"; | |||||
string tmp = "MERCHANTID=" + merchantid + "&POSID=" + posid + "&BRANCHID=" + branchid + "&ORDERID=" + orderid; | |||||
tmp += "&PAYMENT=" + payment + "&CURCODE=" + curcode + "&TXCODE=" + txcode + "&REMARK1=" + remark1; | |||||
tmp += "&REMARK2=" + remark2 + "&RETURNTYPE=" + returntype + "&TIMEOUT=" + timeout; | |||||
MD5 md5 = MD5.Create(); | |||||
string tmp1 = tmp; | |||||
tmp += "&PUB=" + pub32tr2; | |||||
byte[] buffer = Encoding.Default.GetBytes(tmp); | |||||
byte[] md5Buffer = md5.ComputeHash(buffer); | |||||
string strMd5 = ""; | |||||
//hdnOrderId.Value = orderid; | |||||
foreach (byte item in md5Buffer) | |||||
{ | |||||
strMd5 += item.ToString("x2"); | |||||
} | |||||
String url = bankURL + "&" + tmp1 + "&MAC=" + strMd5; | |||||
string reJson = HttpMethods.Post(url); | |||||
LogEntity logEntity = new LogEntity(); | |||||
logEntity.F_CategoryId = 121; | |||||
logEntity.F_ExecuteResultJson = reJson; | |||||
logEntity.WriteLog(); | |||||
//HttpConnect conn = new HttpConnect(); | |||||
//string reJson = conn.Post(url, ""); | |||||
JsonBean MemberInfoList = JsonConvert.DeserializeObject<JsonBean>(reJson); | |||||
if (MemberInfoList.SUCCESS.Equals("true")) | |||||
{ | |||||
string imgCode = HttpMethods.Post(MemberInfoList.PAYURL); | |||||
logEntity.F_CategoryId = 121; | |||||
logEntity.F_ExecuteResultJson = imgCode; | |||||
logEntity.WriteLog(); | |||||
MemberInfoList = JsonConvert.DeserializeObject<JsonBean>(imgCode); | |||||
if (MemberInfoList.SUCCESS.Equals("true")) | |||||
{ | |||||
imgUrl = CreateQRImg(MemberInfoList.QRURL, orderid); | |||||
} | |||||
} | |||||
if (!string.IsNullOrEmpty(imgUrl)) | |||||
{ | |||||
model.orderid = orderid; | |||||
stuInfoFreshIBLL.SaveFeeData(keyValue, model, list); | |||||
} | |||||
return Success(imgUrl); | |||||
} | |||||
public class JsonBean | |||||
{ | |||||
/// <summary> | |||||
/// | |||||
/// </summary> | |||||
public string SUCCESS { get; set; } | |||||
public string PAYURL { get; set; } | |||||
public string QRURL { get; set; } | |||||
} | |||||
/// <summary> | |||||
/// 生成并保存二维码图片的方法 | |||||
/// </summary> | |||||
/// <param name="str">输入的内容</param> | |||||
public string CreateQRImg(string str, string orderId) | |||||
{ | |||||
Random ran = new Random(); | |||||
Bitmap bt; | |||||
str = HttpUtility.UrlDecode(str); | |||||
string enCodeString = str; | |||||
//生成设置编码实例 | |||||
QRCodeEncoder qrCodeEncoder = new QRCodeEncoder(); | |||||
//设置二维码的规模,默认4 | |||||
qrCodeEncoder.QRCodeScale = 3; | |||||
//设置二维码的版本,默认7 | |||||
qrCodeEncoder.QRCodeVersion = 7; | |||||
//设置错误校验级别,默认中等 | |||||
qrCodeEncoder.QRCodeErrorCorrect = QRCodeEncoder.ERROR_CORRECTION.M; | |||||
//生成二维码图片 | |||||
bt = qrCodeEncoder.Encode(enCodeString, Encoding.UTF8); | |||||
//二维码图片的名称 | |||||
string filename = orderId; | |||||
if (!Directory.Exists(Server.MapPath("~/Content/images/QRCode/"))) | |||||
{ | |||||
Directory.CreateDirectory(Server.MapPath("~/Content/images/QRCode/")); | |||||
} | |||||
var path = Server.MapPath("~/Content/images/QRCode/") + filename + ".jpg"; | |||||
//保存二维码图片在photos路径下 | |||||
try | |||||
{ | |||||
bt.Save(path); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
return ""; | |||||
} | |||||
//图片控件要显示的二维码图片路径 | |||||
return "/Content/images/QRCode/" + filename + ".jpg"; | |||||
} | |||||
#endregion | #endregion | ||||
#region 提交数据 | #region 提交数据 | ||||
@@ -108,14 +275,11 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
[HttpPost] | [HttpPost] | ||||
[ValidateAntiForgeryToken] | [ValidateAntiForgeryToken] | ||||
[AjaxOnly] | [AjaxOnly] | ||||
public ActionResult SaveForm(string keyValue, string strEntity) | |||||
public ActionResult SaveForm(string strEntity) | |||||
{ | { | ||||
StuInfoBasic_PayFeeEntity entity = strEntity.ToObject<StuInfoBasic_PayFeeEntity>(); | StuInfoBasic_PayFeeEntity entity = strEntity.ToObject<StuInfoBasic_PayFeeEntity>(); | ||||
stuInfoBasic_PayFeeIBLL.SaveEntity(keyValue,entity); | |||||
if (string.IsNullOrEmpty(keyValue)) | |||||
{ | |||||
} | |||||
return Success("保存成功!"); | |||||
stuInfoBasic_PayFeeIBLL.SaveEntity("",entity); | |||||
return Success("初始化成功!"); | |||||
} | } | ||||
#endregion | #endregion | ||||
@@ -37,7 +37,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
private AccommodationIBLL accommodationIBLL = new AccommodationBLL(); | private AccommodationIBLL accommodationIBLL = new AccommodationBLL(); | ||||
private CdMajorIBLL cdMajorIBLL = new CdMajorBLL(); | private CdMajorIBLL cdMajorIBLL = new CdMajorBLL(); | ||||
private CdDeptIBLL cdDeptIBLL = new CdDeptBLL(); | private CdDeptIBLL cdDeptIBLL = new CdDeptBLL(); | ||||
#region 视图功能 | #region 视图功能 | ||||
@@ -629,9 +629,9 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
/// <returns></returns> | /// <returns></returns> | ||||
[HttpGet] | [HttpGet] | ||||
[AjaxOnly] | [AjaxOnly] | ||||
public ActionResult GetPayFeeDetail(string keyValue,int jiaoFeiYear=0) | |||||
public ActionResult GetPayFeeDetail(string keyValue, int jiaoFeiYear = 0) | |||||
{ | { | ||||
if (jiaoFeiYear==0) | |||||
if (jiaoFeiYear == 0) | |||||
{ | { | ||||
jiaoFeiYear = DateTime.Now.Year; | jiaoFeiYear = DateTime.Now.Year; | ||||
} | } | ||||
@@ -640,21 +640,13 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
//当前年度缴费记录 | //当前年度缴费记录 | ||||
var FeeOrderList = stuInfoFreshIBLL.GetFeeOrderList(StuInfoFreshData.StuNo, jiaoFeiYear); | var FeeOrderList = stuInfoFreshIBLL.GetFeeOrderList(StuInfoFreshData.StuNo, jiaoFeiYear); | ||||
var FinaChargesStandardList = new List<FinaChargesStandardEntity>(); | var FinaChargesStandardList = new List<FinaChargesStandardEntity>(); | ||||
if (!string.IsNullOrEmpty(StuInfoFreshData.ClassNo) && !string.IsNullOrEmpty(StuInfoFreshData.MajorNo)) | |||||
{ | |||||
var ClassInfoEntity = classInfoIBLL.GetClassInfoEntityByClassNo(StuInfoFreshData.ClassNo); | |||||
if (ClassInfoEntity != null) | |||||
{ | |||||
var academicAndYear = Common.GetSemesterAndYear(); | |||||
FinaChargesStandardList = finaChargesStandardIBLL.GetFinaChargesStandardListByYongYou(StuInfoFreshData.StuNo, jiaoFeiYear).ToList(); | |||||
} | |||||
} | |||||
FinaChargesStandardList = finaChargesStandardIBLL.GetFinaChargesStandardListByYongYou(StuInfoFreshData.StuNo, jiaoFeiYear).ToList(); | |||||
var PayFeeTotal = FinaChargesStandardList.Select(x => x.Standard).Sum(); | var PayFeeTotal = FinaChargesStandardList.Select(x => x.Standard).Sum(); | ||||
var jsonData = new | var jsonData = new | ||||
{ | { | ||||
StuInfoFreshData = StuInfoFreshData, | StuInfoFreshData = StuInfoFreshData, | ||||
FinaChargesStandardList = FinaChargesStandardList, | FinaChargesStandardList = FinaChargesStandardList, | ||||
StuInfoFreshFamilyList= stuInfoFreshFamily, | |||||
StuInfoFreshFamilyList = stuInfoFreshFamily, | |||||
PayFeeTotal = PayFeeTotal, | PayFeeTotal = PayFeeTotal, | ||||
YJAmount = FeeOrderList.Sum(x => x.SJAmount) | YJAmount = FeeOrderList.Sum(x => x.SJAmount) | ||||
}; | }; | ||||
@@ -1269,7 +1261,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
string curcode = "01"; | string curcode = "01"; | ||||
string txcode = "530550"; | string txcode = "530550"; | ||||
string remark1 = model.StuNo; | string remark1 = model.StuNo; | ||||
string remark2 = ""; | |||||
string remark2 = "20"+model.Grade; | |||||
string returntype = "3"; | string returntype = "3"; | ||||
string timeout = DateTime.Now.AddMinutes(10).ToString("yyyyMMddHHmmss"); | string timeout = DateTime.Now.AddMinutes(10).ToString("yyyyMMddHHmmss"); | ||||
string pub32tr2 = "40d987faa793a0a27e7a86ef020111"; | string pub32tr2 = "40d987faa793a0a27e7a86ef020111"; | ||||
@@ -1290,7 +1282,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
} | } | ||||
String url = bankURL + "&" + tmp1 + "&MAC=" + strMd5; | String url = bankURL + "&" + tmp1 + "&MAC=" + strMd5; | ||||
string reJson = HttpMethods.Post(url); | string reJson = HttpMethods.Post(url); | ||||
LogEntity logEntity=new LogEntity(); | |||||
LogEntity logEntity = new LogEntity(); | |||||
logEntity.F_CategoryId = 121; | logEntity.F_CategoryId = 121; | ||||
logEntity.F_ExecuteResultJson = reJson; | logEntity.F_ExecuteResultJson = reJson; | ||||
logEntity.WriteLog(); | logEntity.WriteLog(); | ||||
@@ -4,20 +4,8 @@ | |||||
} | } | ||||
<div class="lr-form-wrap" id="form"> | <div class="lr-form-wrap" id="form"> | ||||
<div class="col-xs-12 lr-form-item" data-table="StuInfoBasic_PayFee" > | <div class="col-xs-12 lr-form-item" data-table="StuInfoBasic_PayFee" > | ||||
<div class="lr-form-item-title">学号</div> | |||||
<input id="StuNo" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="StuInfoBasic_PayFee" > | |||||
<div class="lr-form-item-title">缴费状态</div> | |||||
<input id="PayStatus" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="StuInfoBasic_PayFee" > | |||||
<div class="lr-form-item-title">开票状态</div> | |||||
<input id="InvoiceStatus" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="StuInfoBasic_PayFee" > | |||||
<div class="lr-form-item-title">缴费年度</div> | |||||
<input id="PayYear" type="text" class="form-control" /> | |||||
<div class="lr-form-item-title">缴费年度<font face="宋体">*</font></div> | |||||
<div id="PayYear" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuInfoBasic_PayFee/Form.js") | @Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuInfoBasic_PayFee/Form.js") |
@@ -12,23 +12,15 @@ var bootstrap = function ($, learun) { | |||||
init: function () { | init: function () { | ||||
$('.lr-form-wrap').lrscroll(); | $('.lr-form-wrap').lrscroll(); | ||||
page.bind(); | page.bind(); | ||||
page.initData(); | |||||
}, | }, | ||||
bind: function () { | bind: function () { | ||||
}, | |||||
initData: function () { | |||||
if (!!keyValue) { | |||||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasic_PayFee/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]); | |||||
} | |||||
} | |||||
}); | |||||
} | |||||
$('#PayYear').lrselect({ | |||||
url: top.$.rootUrl + '/EducationalAdministration/CdMajor/GenerateNearByYear', | |||||
value: 'value', | |||||
text: 'text' | |||||
}); | |||||
var now = new Date(); | |||||
$('#PayYear').lrselectSet(now.getFullYear()); | |||||
} | } | ||||
}; | }; | ||||
// 保存数据 | // 保存数据 | ||||
@@ -39,7 +31,7 @@ var bootstrap = function ($, learun) { | |||||
var postData = { | var postData = { | ||||
strEntity: JSON.stringify($('body').lrGetFormData()) | strEntity: JSON.stringify($('body').lrGetFormData()) | ||||
}; | }; | ||||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasic_PayFee/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasic_PayFee/SaveForm', postData, function (res) { | |||||
// 保存成功后才回调 | // 保存成功后才回调 | ||||
if (!!callBack) { | if (!!callBack) { | ||||
callBack(); | callBack(); | ||||
@@ -0,0 +1,46 @@ | |||||
@{ | |||||
ViewBag.Title = "新生缴费管理"; | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | |||||
} | |||||
<style> | |||||
.title { | |||||
text-align: center; | |||||
font-size: 16px; | |||||
margin-bottom: 10px; | |||||
} | |||||
#form { | |||||
padding: 10px 20px; | |||||
} | |||||
#btnBox { | |||||
text-align: center; | |||||
} | |||||
#btnBox > div { | |||||
margin-right: 50px; | |||||
margin-top: 20px; | |||||
} | |||||
.table { | |||||
text-align: center; | |||||
margin: auto; | |||||
} | |||||
.tableLeft { | |||||
width: 20%; | |||||
font-weight: bold; | |||||
} | |||||
.tableCenter { | |||||
width: 55%; | |||||
} | |||||
</style> | |||||
<div class="lr-form-wrap" id="form"> | |||||
<div class="title">费用明细</div> | |||||
<table class="table table-bordered" id="PayFeeDetail"></table> | |||||
<div id="btnBox"> | |||||
<div id="confirmPayFee" class="btn btn-primary">支付</div> | |||||
<div id="cancelPayFee" class="btn btn-default">取消</div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuInfoBasic_PayFee/PayFeeForm.js") |
@@ -0,0 +1,151 @@ | |||||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2019-08-08 17:21 | |||||
* 描 述:老生缴费管理 | |||||
*/ | |||||
var acceptClick; | |||||
var keyValue = request('keyValue'); | |||||
var PayFeeTotal = 0;//应交费用 | |||||
var YJAmount = 0;//已交费用 | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var page = { | |||||
init: function () { | |||||
$('.lr-form-wrap').lrscroll(); | |||||
page.bind(); | |||||
page.initData(); | |||||
}, | |||||
bind: function () { | |||||
//获取缴费二维码 | |||||
$('#confirmPayFee').click(function () { | |||||
if (parseFloat($('#PayMoney').html()) > PayFeeTotal) { | |||||
return learun.alert.warning("所交费用超出应交费用!"); | |||||
} | |||||
if (YJAmount > 0) { | |||||
learun.layerConfirm('当前年度已存在缴费记录,是否继续缴费!', | |||||
function (res) { | |||||
if (!res) { | |||||
return false; | |||||
} else { | |||||
page.getQRCode(); | |||||
} | |||||
}); | |||||
} else { | |||||
page.getQRCode(); | |||||
} | |||||
}); | |||||
//取消缴费 | |||||
$('#cancelPayFee').click(function () { | |||||
learun.layerClose(window.name); | |||||
}); | |||||
//计算实交金额 | |||||
$('table').on('change', | |||||
'.paydetail', | |||||
function () { | |||||
var num = 0; | |||||
num = parseFloat(num); | |||||
$(".paydetail").each(function (i, item) { | |||||
var val = 0; | |||||
if (!!$(this).val()) { | |||||
val = parseFloat($(this).val()).toFixed(2); | |||||
} | |||||
num += parseFloat(val); | |||||
}); | |||||
$('#PayMoney').html(parseFloat(num).toFixed(2)); | |||||
}); | |||||
}, | |||||
initData: function () { | |||||
if (!!keyValue) { | |||||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasic_PayFee/GetPayFeeDetail?keyValue=' + keyValue, function (data) { | |||||
if (data['FinaChargesStandardList'].length == 0) { | |||||
learun.alert.warning("未查询到该学生收费标准!请先维护收费标准。"); | |||||
learun.layerClose(window.name); | |||||
return; | |||||
} | |||||
var StuInfoFresh = data['StuInfoFreshData']; | |||||
var className = ""; | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', | |||||
key: StuInfoFresh.ClassNo, | |||||
keyId: 'classno', | |||||
callback: function (_data) { | |||||
className = _data['classname']; | |||||
if (!className) { | |||||
className = "未知"; | |||||
} | |||||
} | |||||
}); | |||||
var deptName = ""; | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', | |||||
key: StuInfoFresh.DeptNo, | |||||
keyId: 'deptno', | |||||
callback: function (_data) { | |||||
deptName = _data['deptname']; | |||||
if (!deptName) { | |||||
deptName = "未知"; | |||||
} | |||||
} | |||||
}); | |||||
PayFeeTotal = parseFloat(data['PayFeeTotal']); | |||||
YJAmount = parseFloat(data['YJAmount']); | |||||
var html = "<tr><td class=\"tableLeft\">学号</td><td class=\"tableCenter\">" + StuInfoFresh.StuNo + "</td><td class=\"tableRight qrcode\" rowspan=\"4\"><img id='qrcodeImg'/></td></tr>"; | |||||
html += "<tr><td class=\"tableLeft\">姓名</td> <td>" + StuInfoFresh.StuName + "</td></tr>"; | |||||
html += "<tr><td class=\"tableLeft\">班级</td><td>" + className + "</td></tr>"; | |||||
html += "<tr><td class=\"tableLeft\">系别</td><td>" + deptName + "</td></tr>"; | |||||
html += '<tr style="border-top: 10px solid blue;"><td class=\"tableLeft\">缴费项目</td><td class=\"tableLeft\">收费标准</td><td class=\"tableLeft\">本次实缴</td></tr>'; | |||||
$.each(data['FinaChargesStandardList'], function (i, item) { | |||||
html += '<tr><td class=\"tableLeft\">' + item.ChargeItemName + '</td><td>' + item.Standard + '元</td><td><input id="' + item.ChargeItemCode + '" data-amount="' + item.Standard + '" data-name="' + item.ChargeItemName + '" type="number" class="form-control paydetail" value="' + item.SJAmount+'" /></td></tr>'; | |||||
}); | |||||
html += '<tr><td class=\"tableLeft\">应缴合计</td><td>' + data['PayFeeTotal'] + '元</td><td><span id="PayMoney"></span></td></tr>'; | |||||
html += '<tr><td class=\"tableLeft\"> </td><td colspan="2"> </td></tr>'; | |||||
html += '<tr><td class=\"tableLeft\">已缴金额</td><td colspan="2">' + YJAmount + '</td></tr>'; | |||||
$('#PayFeeDetail').html(html); | |||||
}); | |||||
} | |||||
}, | |||||
getQRCode: function () { | |||||
var list = []; | |||||
var detail = ""; | |||||
var ifisnull = false; | |||||
$('.paydetail').each(function (i, item) { | |||||
var value = 0; | |||||
if (!!$(this).val()) { | |||||
value = parseFloat($(this).val()); | |||||
} else { | |||||
ifisnull = true; | |||||
} | |||||
detail += $(this).attr('id') + "!" + value + '&'; | |||||
var entity = { | |||||
Id: learun.newGuid(), | |||||
ChargeItemName: ($(this).attr('data-name')).replace(/^\s*|\s*$/g, ""), | |||||
ChargeItemID: $(this).attr('id'), | |||||
YJAmount: $(this).attr('data-amount'), | |||||
SJAmount: value | |||||
}; | |||||
list.push(entity); | |||||
}); | |||||
if (ifisnull) { | |||||
learun.alert.warning("收费项目金额不能为空!请检查并填写。"); | |||||
return; | |||||
} | |||||
detail = detail.substring(0, detail.length - 1); | |||||
var param = {}; | |||||
//param.LoanMoney = $('#LoanMoney').val(); | |||||
param.PayFeeDetail = detail; | |||||
param.PayMoney = $('#PayMoney').html(); | |||||
learun.loading(true, '正在生成付款信息请稍等...'); | |||||
$("#confirmPayFee").hide(); | |||||
learun.httpAsyncPost(top.$.rootUrl + '/EducationalAdministration/StuInfoBasic_PayFee/PayFeeQRCode?keyValue=' + keyValue, { strEntity: JSON.stringify(param), detailList: JSON.stringify(list) }, function (res) { | |||||
learun.loading(false); | |||||
$('#qrcodeImg').attr('src', res.info); | |||||
}); | |||||
} | |||||
}; | |||||
page.init(); | |||||
} |
@@ -32,11 +32,11 @@ | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item"> | <div class="col-xs-12 lr-form-item"> | ||||
<div class="lr-form-item-title">缴费年度</div> | <div class="lr-form-item-title">缴费年度</div> | ||||
<div id="PayFeeYear"></div> | |||||
<div id="PayYear"></div> | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item"> | <div class="col-xs-12 lr-form-item"> | ||||
<div class="lr-form-item-title">缴费状态</div> | <div class="lr-form-item-title">缴费状态</div> | ||||
<div id="PayFeeStatus"></div> | |||||
<div id="PayStatus"></div> | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item"> | <div class="col-xs-12 lr-form-item"> | ||||
<div class="lr-form-item-title">开票状态</div> | <div class="lr-form-item-title">开票状态</div> | ||||
@@ -51,6 +51,7 @@ | |||||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | <a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | ||||
</div> | </div> | ||||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | <div class=" btn-group btn-group-sm" learun-authorize="yes"> | ||||
<a id="lr_generate" class="btn btn-default"><i class="fa fa-plus"></i> 初始化缴费数据</a> | |||||
<a id="lr_payCode" class="btn btn-default"><i class="fa fa-plus"></i> 二维码缴费</a> | <a id="lr_payCode" class="btn btn-default"><i class="fa fa-plus"></i> 二维码缴费</a> | ||||
<a id="lr_viewinvoice" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 查看发票</a> | <a id="lr_viewinvoice" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 查看发票</a> | ||||
</div> | </div> | ||||
@@ -1,51 +1,56 @@ | |||||
var refreshGirdData; | var refreshGirdData; | ||||
var StuId; | |||||
var StuId, selectedRow; | |||||
var bootstrap = function ($, learun) { | var bootstrap = function ($, learun) { | ||||
"use strict"; | "use strict"; | ||||
var page = { | var page = { | ||||
init: function () { | init: function () { | ||||
page.initGird(); | |||||
page.bind(); | page.bind(); | ||||
page.initGird(); | |||||
}, | }, | ||||
bind: function () { | bind: function () { | ||||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | ||||
page.search(queryJson); | page.search(queryJson); | ||||
}, 220, 400); | |||||
}, 320, 400); | |||||
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); | $('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); | ||||
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); | $('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); | ||||
$('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); | $('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); | ||||
$('#PayFeeStatus').lrDataItemSelect({ code: 'PayStatus' }); | |||||
$('#PayStatus').lrDataItemSelect({ code: 'PayStatus' }); | |||||
$('#InvoiceStatus').lrDataItemSelect({ code: 'InvoiceStatus' }); | $('#InvoiceStatus').lrDataItemSelect({ code: 'InvoiceStatus' }); | ||||
$('#PayFeeYear').lrselect({ | |||||
$('#PayYear').lrselect({ | |||||
url: top.$.rootUrl + '/EducationalAdministration/CdMajor/GenerateNearByYear', | url: top.$.rootUrl + '/EducationalAdministration/CdMajor/GenerateNearByYear', | ||||
value: 'value', | value: 'value', | ||||
text: 'text' | text: 'text' | ||||
}); | }); | ||||
var now = new Date(); | |||||
$('#PayFeeYear').lrselectSet(now.getFullYear()); | |||||
// 刷新 | // 刷新 | ||||
$('#lr_refresh').on('click', function () { | $('#lr_refresh').on('click', function () { | ||||
location.reload(); | location.reload(); | ||||
}); | }); | ||||
$("#lr_photo").on('click', function () { | |||||
StuId = $("#gridtable").jfGridValue('StuId'); | |||||
if (learun.checkrow(StuId)) { | |||||
takeImg(); | |||||
} | |||||
$("#lr_generate").on('click', function () { | |||||
learun.layerForm({ | |||||
id: 'form_generate', | |||||
title: '初始化缴费数据', | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic_PayFee/Form', | |||||
width: 350, | |||||
height: 250, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
}); | }); | ||||
//二维码缴费 | //二维码缴费 | ||||
$('#lr_payCode').on('click', function () { | $('#lr_payCode').on('click', function () { | ||||
var keyValue = $('#gridtable').jfGridValue('StuId'); | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | selectedRow = $('#gridtable').jfGridGet('rowdata'); | ||||
if (learun.checkrow(keyValue)) { | if (learun.checkrow(keyValue)) { | ||||
if (selectedRow.PayFeeStatus == "1") { | |||||
learun.alert.warning("当前新生已缴费!"); | |||||
if (selectedRow.PayStatus == "1") { | |||||
learun.alert.warning("当前学生已缴费!"); | |||||
return; | return; | ||||
} | } | ||||
learun.layerForm({ | learun.layerForm({ | ||||
id: 'form_payCode', | id: 'form_payCode', | ||||
title: '二维码缴费', | title: '二维码缴费', | ||||
url: top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/PayFeeForm?keyValue=' + keyValue, | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic_PayFee/PayFeeForm?keyValue=' + keyValue, | |||||
width: 800, | width: 800, | ||||
height: 600, | height: 600, | ||||
btn: null | btn: null | ||||
@@ -60,7 +65,7 @@ var bootstrap = function ($, learun) { | |||||
if (selectedRow.PayFeeStatus == "1") { | if (selectedRow.PayFeeStatus == "1") { | ||||
//查询发票链接 | //查询发票链接 | ||||
learun.httpAsyncGet( | learun.httpAsyncGet( | ||||
top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/InvoiceForm?keyValue=' + keyValue, function (res) { | |||||
top.$.rootUrl + '/EducationalAdministration/StuInfoBasic_PayFee/InvoiceForm?keyValue=' + keyValue, function (res) { | |||||
if (!!res.data && !!res.data.billUrl) { | if (!!res.data && !!res.data.billUrl) { | ||||
learun.layerForm({ | learun.layerForm({ | ||||
id: 'form_invoice', | id: 'form_invoice', | ||||
@@ -85,7 +90,7 @@ var bootstrap = function ($, learun) { | |||||
// 初始化列表 | // 初始化列表 | ||||
initGird: function () { | initGird: function () { | ||||
$('#gridtable').lrAuthorizeJfGrid({ | $('#gridtable').lrAuthorizeJfGrid({ | ||||
url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic_PayFeeController/GetPageList', | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic_PayFee/GetPageList', | |||||
headData: [ | headData: [ | ||||
{ label: "学号", name: "StuNo", width: 100, align: "left" }, | { label: "学号", name: "StuNo", width: 100, align: "left" }, | ||||
{ label: "学籍号", name: "StuCode", width: 100, align: "left" }, | { label: "学籍号", name: "StuCode", width: 100, align: "left" }, | ||||
@@ -96,9 +101,9 @@ var bootstrap = function ($, learun) { | |||||
return cellvalue == true ? "男" : "女"; | return cellvalue == true ? "男" : "女"; | ||||
} | } | ||||
}, | }, | ||||
{ label: "身份证号", name: "IdentityCardNo", width: 100, align: "left" }, | |||||
{ label: "身份证号", name: "IdentityCardNo", width: 150, align: "left" }, | |||||
{ | { | ||||
label: "缴费状态", name: "PayFeeStatus", width: 80, align: "center", | |||||
label: "缴费状态", name: "PayStatus", width: 80, align: "center", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | formatterAsync: function (callback, value, row, op, $cell) { | ||||
learun.clientdata.getAsync('dataItem', { | learun.clientdata.getAsync('dataItem', { | ||||
key: value, | key: value, | ||||
@@ -157,14 +162,20 @@ var bootstrap = function ($, learun) { | |||||
}, | }, | ||||
{ label: "年级", name: "Grade", width: 100, align: "left" } | { label: "年级", name: "Grade", width: 100, align: "left" } | ||||
], | ], | ||||
mainId: 'StuId', | |||||
isPage: true | |||||
mainId: 'Id', | |||||
isPage: true, | |||||
sidx:'DeptNo' | |||||
}); | }); | ||||
page.search(); | page.search(); | ||||
}, | }, | ||||
search: function (param) { | search: function (param) { | ||||
param = param || {}; | param = param || {}; | ||||
if (!param.PayYear) { | |||||
var now = new Date(); | |||||
$('#PayYear').lrselectSet(now.getFullYear()); | |||||
param.PayYear = now.getFullYear(); | |||||
} | |||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | ||||
} | } | ||||
}; | }; | ||||
@@ -40,7 +40,6 @@ | |||||
<table class="table table-bordered" id="PayFeeDetail"></table> | <table class="table table-bordered" id="PayFeeDetail"></table> | ||||
<div id="btnBox"> | <div id="btnBox"> | ||||
<div id="confirmPayFee" class="btn btn-primary">支付</div> | <div id="confirmPayFee" class="btn btn-primary">支付</div> | ||||
<div id="searchPayFee" class="btn btn-success">查询</div> | |||||
<div id="cancelPayFee" class="btn btn-default">取消</div> | <div id="cancelPayFee" class="btn btn-default">取消</div> | ||||
</div> | </div> | ||||
</div> | </div> |
@@ -17,9 +17,6 @@ var bootstrap = function ($, learun) { | |||||
page.initData(); | page.initData(); | ||||
}, | }, | ||||
bind: function () { | bind: function () { | ||||
$('#searchPayFee').click(function() { | |||||
}); | |||||
//获取缴费二维码 | //获取缴费二维码 | ||||
$('#confirmPayFee').click(function () { | $('#confirmPayFee').click(function () { | ||||
if (parseFloat($('#PayMoney').html()) > PayFeeTotal) { | if (parseFloat($('#PayMoney').html()) > PayFeeTotal) { | ||||
@@ -52,14 +49,15 @@ var bootstrap = function ($, learun) { | |||||
'.paydetail', | '.paydetail', | ||||
function () { | function () { | ||||
var num = 0; | var num = 0; | ||||
num = parseFloat(num); | |||||
$(".paydetail").each(function (i, item) { | $(".paydetail").each(function (i, item) { | ||||
var val = 0; | var val = 0; | ||||
if (!!$(this).val()) { | if (!!$(this).val()) { | ||||
val = parseFloat($(this).val()); | |||||
val = parseFloat($(this).val()).toFixed(2); | |||||
} | } | ||||
num += val; | |||||
num += parseFloat(val); | |||||
}); | }); | ||||
$('#PayMoney').html(num); | |||||
$('#PayMoney').html(parseFloat(num).toFixed(2)); | |||||
}); | }); | ||||
}, | }, | ||||
initData: function () { | initData: function () { | ||||
@@ -100,13 +98,13 @@ var bootstrap = function ($, learun) { | |||||
html += "<tr><td class=\"tableLeft\">姓名</td> <td>" + StuInfoFresh.StuName + "</td></tr>"; | html += "<tr><td class=\"tableLeft\">姓名</td> <td>" + StuInfoFresh.StuName + "</td></tr>"; | ||||
html += "<tr><td class=\"tableLeft\">班级</td><td>" + className + "</td></tr>"; | html += "<tr><td class=\"tableLeft\">班级</td><td>" + className + "</td></tr>"; | ||||
html += "<tr><td class=\"tableLeft\">系别</td><td>" + deptName + "</td></tr>"; | html += "<tr><td class=\"tableLeft\">系别</td><td>" + deptName + "</td></tr>"; | ||||
html += '<tr style="border-top: 10px solid blue;"><td class=\"tableLeft\">缴费项目</td><td class=\"tableLeft\">应缴费用</td><td class=\"tableLeft\">已缴费用</td><td class=\"tableLeft\">本次实缴</td></tr>'; | |||||
html += '<tr style="border-top: 10px solid blue;"><td class=\"tableLeft\">缴费项目</td><td class=\"tableLeft\">收费标准</td><td class=\"tableLeft\">本次实缴</td></tr>'; | |||||
$.each(data['FinaChargesStandardList'], function (i, item) { | $.each(data['FinaChargesStandardList'], function (i, item) { | ||||
html += '<tr><td class=\"tableLeft\">' + item.ChargeItemName + '</td><td>' + item.Standard + '元</td><td class=\"tableLeft\">' + item.PayedMoney+'</td><td><input id="' + item.ChargeItemCode + '" data-amount="' + item.Standard + '" data-name="' + item.ChargeItemName + '" type="number" class="form-control paydetail" /></td></tr>'; | |||||
html += '<tr><td class=\"tableLeft\">' + item.ChargeItemName + '</td><td>' + item.Standard + '元</td><td><input id="' + item.ChargeItemCode + '" data-amount="' + item.Standard + '" data-name="' + item.ChargeItemName + '" type="number" class="form-control paydetail" value="' + item.SJAmount + '" /></td></tr>'; | |||||
}); | }); | ||||
html += '<tr><td class=\"tableLeft\">合计</td><td>' + data['PayFeeTotal'] + '元</td><td><span id="PayMoney"></span></td></tr>'; | |||||
html += '<tr><td class=\"tableLeft\">贷款金额</td><td colspan="2"><input id="LoanMoney" type="number" class="form-control" value="' + StuInfoFresh.LoanMoney + '" /></td></tr>'; | |||||
html += '<tr><td class=\"tableLeft\">已交金额</td><td colspan="2">' + YJAmount + '</td></tr>'; | |||||
html += '<tr><td class=\"tableLeft\">应缴合计</td><td>' + data['PayFeeTotal'] + '元</td><td><span id="PayMoney"></span></td></tr>'; | |||||
html += '<tr><td class=\"tableLeft\"> </td><td colspan="2"> </td></tr>'; | |||||
html += '<tr><td class=\"tableLeft\">已缴金额</td><td colspan="2">' + YJAmount + '</td></tr>'; | |||||
$('#PayFeeDetail').html(html); | $('#PayFeeDetail').html(html); | ||||
}); | }); | ||||
} | } | ||||
@@ -138,14 +136,13 @@ var bootstrap = function ($, learun) { | |||||
} | } | ||||
detail = detail.substring(0, detail.length - 1); | detail = detail.substring(0, detail.length - 1); | ||||
var param = {}; | var param = {}; | ||||
param.LoanMoney = $('#LoanMoney').val(); | |||||
//param.LoanMoney = $('#LoanMoney').val(); | |||||
param.PayFeeDetail = detail; | param.PayFeeDetail = detail; | ||||
param.PayMoney = $('#PayMoney').html(); | param.PayMoney = $('#PayMoney').html(); | ||||
learun.loading(true, '正在生成付款信息请稍等...'); | learun.loading(true, '正在生成付款信息请稍等...'); | ||||
$("#confirmPayFee").hide(); | $("#confirmPayFee").hide(); | ||||
learun.httpAsyncPost(top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/PayFeeQRCode?keyValue=' + keyValue, { strEntity: JSON.stringify(param), detailList: JSON.stringify(list) }, function (res) { | learun.httpAsyncPost(top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/PayFeeQRCode?keyValue=' + keyValue, { strEntity: JSON.stringify(param), detailList: JSON.stringify(list) }, function (res) { | ||||
learun.loading(false); | learun.loading(false); | ||||
//console.log(res); | |||||
$('#qrcodeImg').attr('src', res.info); | $('#qrcodeImg').attr('src', res.info); | ||||
}); | }); | ||||
} | } | ||||
@@ -1097,6 +1097,7 @@ | |||||
<Content Include="Areas\EducationalAdministration\Views\StuInfoBasic\IndexOfDC.js" /> | <Content Include="Areas\EducationalAdministration\Views\StuInfoBasic\IndexOfDC.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuInfoBasic\IndexInClass.js" /> | <Content Include="Areas\EducationalAdministration\Views\StuInfoBasic\IndexInClass.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuInfoBasic\MyClass.js" /> | <Content Include="Areas\EducationalAdministration\Views\StuInfoBasic\MyClass.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuInfoBasic_PayFee\PayFeeForm.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\StuInfoBasic_PayFee\PayFeeIndex.js" /> | <Content Include="Areas\EducationalAdministration\Views\StuInfoBasic_PayFee\PayFeeIndex.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuInfoBasic\Print.css" /> | <Content Include="Areas\EducationalAdministration\Views\StuInfoBasic\Print.css" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuInfoFresh\AllocationClassDC.js" /> | <Content Include="Areas\EducationalAdministration\Views\StuInfoFresh\AllocationClassDC.js" /> | ||||
@@ -7740,6 +7741,7 @@ | |||||
<Content Include="Areas\EducationalAdministration\Views\OpenLessonPlanOfElective\IndexElective.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\OpenLessonPlanOfElective\IndexElective.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuInfoFresh\InvoiceForm.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\StuInfoFresh\InvoiceForm.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuInfoBasic_PayFee\PayFeeIndex.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\StuInfoBasic_PayFee\PayFeeIndex.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuInfoBasic_PayFee\PayFeeForm.cshtml" /> | |||||
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | <None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | ||||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | <None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | ||||
<Content Include="Views\Login\Default-beifen.cshtml" /> | <Content Include="Views\Login\Default-beifen.cshtml" /> | ||||
@@ -59,6 +59,19 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
#endregion | #endregion | ||||
#region 扩展字段 | #region 扩展字段 | ||||
[NotMapped] public string StuCode { get; set; } | |||||
[NotMapped] public string StuName { get; set; } | |||||
[NotMapped] public string GenderNo { get; set; } | |||||
[NotMapped] public string IdentityCardNo { get; set; } | |||||
[NotMapped] public string DeptNo { get; set; } | |||||
[NotMapped] public string MajorNo { get; set; } | |||||
[NotMapped] public string ClassNo { get; set; } | |||||
[NotMapped] public string Grade { get; set; } | |||||
[NotMapped] public string orderid { get; set; } | |||||
#endregion | #endregion | ||||
} | } | ||||
} | } | ||||
@@ -30,7 +30,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
try | try | ||||
{ | { | ||||
var strSql = new StringBuilder(); | var strSql = new StringBuilder(); | ||||
strSql.Append("SELECT a.*,t.PayStatus,t.InvoiceStatus,t.PayYear "); | |||||
strSql.Append("SELECT a.*,isnull(t.PayStatus,0) PayStatus ,t.InvoiceStatus,t.PayYear,t.Id "); | |||||
strSql.Append(" FROM StuInfoBasic a left join StuInfoBasic_PayFee t on a.StuNo=t.StuNo"); | strSql.Append(" FROM StuInfoBasic a left join StuInfoBasic_PayFee t on a.StuNo=t.StuNo"); | ||||
strSql.Append(" WHERE 1=1 "); | strSql.Append(" WHERE 1=1 "); | ||||
var queryParam = queryJson.ToJObject(); | var queryParam = queryJson.ToJObject(); | ||||
@@ -58,7 +58,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
if (!queryParam["InvoiceStatus"].IsEmpty()) | if (!queryParam["InvoiceStatus"].IsEmpty()) | ||||
{ | { | ||||
dp.Add("InvoiceStatus", "" + queryParam["InvoiceStatus"].ToString() + "", DbType.String); | |||||
dp.Add("InvoiceStatus", "" + queryParam["InvoiceStatus"].ToBool() + "", DbType.String); | |||||
strSql.Append(" AND t.InvoiceStatus =@InvoiceStatus "); | strSql.Append(" AND t.InvoiceStatus =@InvoiceStatus "); | ||||
} | } | ||||
if (!queryParam["DeptNo"].IsEmpty()) | if (!queryParam["DeptNo"].IsEmpty()) | ||||
@@ -76,7 +76,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
dp.Add("ClassNo", "" + queryParam["ClassNo"].ToString() + "", DbType.String); | dp.Add("ClassNo", "" + queryParam["ClassNo"].ToString() + "", DbType.String); | ||||
strSql.Append(" AND a.ClassNo =@ClassNo "); | strSql.Append(" AND a.ClassNo =@ClassNo "); | ||||
} | } | ||||
return this.BaseRepository("CollegeMIS").FindList<StuInfoBasic_PayFeeEntity>(strSql.ToString(),dp, pagination); | |||||
return this.BaseRepository("CollegeMIS").FindList<StuInfoBasic_PayFeeEntity>(strSql.ToString(), dp, pagination); | |||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
{ | { | ||||
@@ -127,7 +127,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | { | ||||
try | try | ||||
{ | { | ||||
this.BaseRepository("CollegeMIS").Delete<StuInfoBasic_PayFeeEntity>(t=>t.Id == keyValue); | |||||
this.BaseRepository("CollegeMIS").Delete<StuInfoBasic_PayFeeEntity>(t => t.Id == keyValue); | |||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
{ | { | ||||
@@ -151,15 +151,10 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | { | ||||
try | try | ||||
{ | { | ||||
if (!string.IsNullOrEmpty(keyValue)) | |||||
if (entity.PayYear != 0) | |||||
{ | { | ||||
entity.Modify(keyValue); | |||||
this.BaseRepository("CollegeMIS").Update(entity); | |||||
} | |||||
else | |||||
{ | |||||
entity.Create(); | |||||
this.BaseRepository("CollegeMIS").Insert(entity); | |||||
this.BaseRepository("CollegeMIS").ExecuteBySql(@"insert into StuInfoBasic_PayFee(Id, StuNo, PayStatus, InvoiceStatus, PayYear) | |||||
select newid(), stuno, 0, 0, "+entity.PayYear+ " from StuInfoBasic where checkmark = 1 and stuno not in(select stuno from StuInfoBasic_PayFee where PayYear="+ entity.PayYear + ")"); | |||||
} | } | ||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
@@ -539,6 +539,25 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
} | } | ||||
public void SaveFeeData(string keyValue, StuInfoBasic_PayFeeEntity entity, List<StuEnrollFeeOrderDetailEntity> list) | |||||
{ | |||||
try | |||||
{ | |||||
stuInfoFreshService.SaveFeeData(keyValue, entity, list); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | #endregion | ||||
#region 扩展数据 | #region 扩展数据 | ||||
@@ -136,6 +136,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// <returns></returns> | /// <returns></returns> | ||||
void SaveEntity(string keyValue, StuInfoFreshEntity entity); | void SaveEntity(string keyValue, StuInfoFreshEntity entity); | ||||
void SaveFeeData(string keyValue, StuInfoFreshEntity entity, List<StuEnrollFeeOrderDetailEntity> list); | void SaveFeeData(string keyValue, StuInfoFreshEntity entity, List<StuEnrollFeeOrderDetailEntity> list); | ||||
void SaveFeeData(string keyValue, StuInfoBasic_PayFeeEntity entity, List<StuEnrollFeeOrderDetailEntity> list); | |||||
#endregion | #endregion | ||||
#region 扩展数据 | #region 扩展数据 | ||||
@@ -1131,6 +1131,54 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 老生缴费保存 | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
/// <param name="entity"></param> | |||||
/// <param name="list"></param> | |||||
public void SaveFeeData(string keyValue, StuInfoBasic_PayFeeEntity entity, List<StuEnrollFeeOrderDetailEntity> list) | |||||
{ | |||||
var db = this.BaseRepository("CollegeMIS"); | |||||
try | |||||
{ | |||||
db.BeginTrans(); | |||||
if (!string.IsNullOrEmpty(keyValue)) | |||||
{ | |||||
//保存缴费数据 | |||||
var order = new StuEnrollFeeOrderEntity(); | |||||
order.Create(); | |||||
order.YearNo = DateTime.Now.Year; | |||||
order.StuNo = entity.StuNo; | |||||
order.orderid = entity.orderid; | |||||
order.YJAmount = list.Sum(x => x.YJAmount); | |||||
order.SJAmount = list.Sum(x => x.SJAmount); | |||||
order.PlaceOrderTime = DateTime.Now; | |||||
order.Status = 0; | |||||
order.billStatus = false; | |||||
db.Insert(order); | |||||
foreach (var detail in list) | |||||
{ | |||||
detail.OrderId = order.Id; | |||||
db.Insert(detail); | |||||
} | |||||
} | |||||
db.Commit(); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
db.Rollback(); | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | #endregion | ||||
#region 扩展数据 | #region 扩展数据 | ||||
@@ -99,7 +99,12 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement | |||||
/// 已交金额 | /// 已交金额 | ||||
/// </summary> | /// </summary> | ||||
[NotMapped] | [NotMapped] | ||||
public string PayedMoney { get; set; } | |||||
public decimal? PayedMoney { get; set; } | |||||
/// <summary> | |||||
/// 实缴金额 | |||||
/// </summary> | |||||
[NotMapped] | |||||
public decimal? SJAmount { get; set; } | |||||
//专业名称 | //专业名称 | ||||
[NotMapped] | [NotMapped] | ||||
public string MajorName { get; set; } | public string MajorName { get; set; } | ||||
@@ -424,7 +424,7 @@ namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement | |||||
{ | { | ||||
try | try | ||||
{ | { | ||||
IEnumerable<FinaChargesStandardEntity> yylist = BaseRepository("YongyouDb").FindList<FinaChargesStandardEntity>("select ISNULL(A.YJJE,0) as YJJE,s.*,s1.SFND,ISNULL(s1.YSJE,0) AS YSJE,ISNULL(s1.SFXMDM,'') AS ChargeItemCode,sf.SFXMMC as ChargeItemName,s2.SFXMDM DAI,ISNULL(s2.JE,0) as PayedMoney,(isnull(s1.ysje,0)- isnull(s2.je,0)) as Standard " + | |||||
IEnumerable<FinaChargesStandardEntity> yylist = BaseRepository("YongyouDb").FindList<FinaChargesStandardEntity>("select ISNULL(A.YJJE,0) as YJJE,s.*,s1.SFND,ISNULL(s1.YSJE,0) AS Standard,ISNULL(s1.SFXMDM,'') AS ChargeItemCode,sf.SFXMMC as ChargeItemName,s2.SFXMDM DAI,isnull(s2.je,0) as PayedMoney,(isnull(s1.ysje,0)- isnull(s2.je,0)) as SJAmount " + | |||||
"from SCS_XSXX s left join SCS_YSK s1 on s.XSID=s1.XSID and s1.SFND in (" + jiaoFeiYear + " ) " + | "from SCS_XSXX s left join SCS_YSK s1 on s.XSID=s1.XSID and s1.SFND in (" + jiaoFeiYear + " ) " + | ||||
"left join SCS_SFXM sf on sf.SFXMDM=s1.SFXMDM and sf.KJND=" + DateTime.Now.Year + " and sf.SFXMMC is not null " + | "left join SCS_SFXM sf on sf.SFXMDM=s1.SFXMDM and sf.KJND=" + DateTime.Now.Year + " and sf.SFXMMC is not null " + | ||||
"left join (select O.XSID,O1.SFXMDM,sum(O1.JE) as JE from SCS_ORDER o inner join SCS_ORDEL o1 on o1.OR_ID=o.OR_ID AND o.KJND=" + DateTime.Now.Year + " group by O.XSID,O1.SFXMDM) as s2 on s2.XSID=s1.XSID AND S1.SFXMDM=S2.SFXMDM " + | "left join (select O.XSID,O1.SFXMDM,sum(O1.JE) as JE from SCS_ORDER o inner join SCS_ORDEL o1 on o1.OR_ID=o.OR_ID AND o.KJND=" + DateTime.Now.Year + " group by O.XSID,O1.SFXMDM) as s2 on s2.XSID=s1.XSID AND S1.SFXMDM=S2.SFXMDM " + | ||||