diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ScholarshipxjController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ScholarshipxjController.cs index 6db7feb2f..d2287d337 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ScholarshipxjController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ScholarshipxjController.cs @@ -1,4 +1,5 @@ -using Learun.Util; +using System; +using Learun.Util; using System.Data; using Learun.Application.TwoDevelopment.EducationalAdministration; using System.Web.Mvc; @@ -26,7 +27,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers [HttpGet] public ActionResult Index() { - return View(); + return View(); } /// /// 表单页 @@ -35,8 +36,45 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers [HttpGet] public ActionResult Form() { - return View(); + return View(); } + /// + /// 助学金 + /// + /// + [HttpGet] + public ActionResult Indexzxj() + { + return View(); + } + /// + /// 助学金 + /// + /// + [HttpGet] + public ActionResult Formzxj() + { + return View(); + } + /// + /// 审核 + /// + /// + [HttpGet] + public ActionResult IndexAudit() + { + return View(); + } + /// + /// 审核 + /// + /// + [HttpGet] + public ActionResult FormAudit() + { + return View(); + } + #endregion #region 获取数据 @@ -71,9 +109,10 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers [AjaxOnly] public ActionResult GetFormData(string keyValue) { - var ScholarshipxjData = scholarshipxjIBLL.GetScholarshipxjEntity( keyValue ); - var jsonData = new { - ScholarshipAxj = ScholarshipxjData, + var ScholarshipxjData = scholarshipxjIBLL.GetScholarshipxjEntity(keyValue); + var jsonData = new + { + Scholarshipxj = ScholarshipxjData, }; return Success(jsonData); } @@ -93,6 +132,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers scholarshipxjIBLL.DeleteEntity(keyValue); return Success("删除成功!"); } + /// /// 保存实体数据(新增、修改) /// @@ -104,14 +144,34 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers [AjaxOnly] public ActionResult SaveForm(string keyValue, string strEntity) { + var LogUserinfo = LoginUserInfo.Get(); ScholarshipxjEntity entity = strEntity.ToObject(); - scholarshipxjIBLL.SaveEntity(keyValue,entity); + if (entity.State != "0") + { + entity.AuditPeople = LogUserinfo.userId; + entity.AuditTime = DateTime.Today; + } + scholarshipxjIBLL.SaveEntity(keyValue, entity); if (string.IsNullOrEmpty(keyValue)) { } return Success("保存成功!"); } #endregion - + #region 扩展数据 + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult AduitForm(string keyValue) + { + var logUser = LoginUserInfo.Get(); + scholarshipxjIBLL.AuditEntity(keyValue, logUser.userId); + return Success("审核成功!"); + } + #endregion } } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/AwardIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/AwardIndex.js index 23571b051..e8d801245 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/AwardIndex.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/AwardIndex.js @@ -52,9 +52,6 @@ var bootstrap = function ($, learun) { $("#NatureType").val(item.awardname); $("#shuxing").val(item.naturetype); $("#awardtype").val(item.awardtype); - console.log($("#NatureType").val()) - console.log($("#shuxing").val()) - console.log($("#awardtype").val()) } }); $('#RewardObjects').lrGirdSelect({ diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/Form.js index cf7158b6a..7a7069aa8 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/AwardPunishInfo/Form.js @@ -17,7 +17,7 @@ var bootstrap = function ($, learun) { $('#NatureType').lrDataSourceSelect({ code: 'PunishmentSource', value: 'id', text: 'awardname', }); - $('#AttachmentName').lrUploader(); + //$('#AttachmentName').lrUploader(); $('#StuName').lrGirdSelect({ url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=StuInfoBasic', selectWord: 'stuno', diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarshipxj/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarshipxj/Form.cshtml index e18b10d31..e4fd9b462 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarshipxj/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarshipxj/Form.cshtml @@ -4,17 +4,15 @@ }
-
助学金类型*
+
奖学金类型*
-
学生
- +
学生*
+
+ +
- @*
-
申请材料
-
-
*@
获得时间*
@@ -23,14 +21,14 @@
描述
- @*
-
录入人
- -
-
-
录入时间
- -
*@ + +
[Column("REMARK")] public string Remark { get; set; } + /// + /// 不同意原因 + /// + [Column("DEMO")] + public string Demo { get; set; } #endregion #region 扩展操作 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarshipzxj/ScholarshipxjIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarshipzxj/ScholarshipxjIBLL.cs index f17b22656..ab0a9ae73 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarshipzxj/ScholarshipxjIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarshipzxj/ScholarshipxjIBLL.cs @@ -44,5 +44,14 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration void SaveEntity(string keyValue, ScholarshipxjEntity entity); #endregion + #region + /// + /// 审核数据 + /// + /// 主键 + /// 审核人ID + void AuditEntity(string keyValue,string UserId); + + #endregion } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarshipzxj/ScholarshipxjService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarshipzxj/ScholarshipxjService.cs index 34f6acfeb..82a1e13d3 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarshipzxj/ScholarshipxjService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Scholarshipzxj/ScholarshipxjService.cs @@ -31,24 +31,33 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { var strSql = new StringBuilder(); strSql.Append("SELECT "); - strSql.Append(@" - t.Id, - t.SchoolType, - t.StuName, - t.AttachmentName, - t.GetTime, - t.Remark, - t.LrPeople, - t.LrTime, - t.IsType, - t.State - "); + strSql.Append(@" * "); strSql.Append(" FROM ScholarshipAudit t "); strSql.Append(" WHERE 1=1 "); var queryParam = queryJson.ToJObject(); // 虚拟参数 var dp = new DynamicParameters(new { }); - return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(),dp, pagination); + if (!queryParam["SchoolType"].IsEmpty()) + { + dp.Add("SchoolType", queryParam["SchoolType"].ToString(), DbType.String); + strSql.Append(" AND t.SchoolType = @SchoolType "); + } + if (!queryParam["StuName"].IsEmpty()) + { + dp.Add("StuName", "%" + queryParam["StuName"].ToString() + "%", DbType.String); + strSql.Append(" AND t.StuName Like @StuName "); + } + if (!queryParam["IsType"].IsEmpty()) + { + dp.Add("IsType", queryParam["IsType"].ToString(), DbType.String); + strSql.Append(" AND t.IsType = @IsType "); + } + if (!queryParam["State"].IsEmpty()) + { + dp.Add("State", queryParam["State"].ToString(), DbType.String); + strSql.Append(" AND t.State = @State "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); } catch (Exception ex) { @@ -97,9 +106,16 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// 主键 public void DeleteEntity(string keyValue) { + var db = this.BaseRepository("CollegeMIS").BeginTrans(); try { - this.BaseRepository("CollegeMIS").Delete(t=>t.Id == keyValue); + //多个删除 + var keyValueArr = keyValue.Split(','); + foreach (var item in keyValueArr) + { + db.Delete(t => t.Id == item && t.State != "1"); + } + db.Commit(); } catch (Exception ex) { @@ -149,5 +165,44 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration #endregion + #region 审核数据 + /// + /// 审核数据 + /// + /// 主键 + public void AuditEntity(string keyValue, string UserId) + { + var db = this.BaseRepository("CollegeMIS").BeginTrans(); + try + { + //多个审核 + var IdList = keyValue.Split(','); + foreach (var item in IdList) + { + var List = db.FindEntity(x => x.Id == item && x.State == "0"); + if (List != null) + { + List.State = "1"; + List.AuditTime = DateTime.Now; + List.AuditPeople = UserId; + db.Update(List); + } + } + db.Commit(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion } }