ソースを参照

学籍异动-查看心里健康档案

新疆警官学校中职
ndbs 1年前
コミット
4e15472089
11個のファイルの変更785行の追加0行の削除
  1. +95
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/QueryAPStuHealthIndex.cshtml
  2. +117
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/QueryAPStuHealthIndex.js
  3. +111
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/APStuHealthRecordsTranController.cs
  4. +3
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  5. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
  6. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/APStuHealthRecordsTranMap.cs
  7. +4
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj
  8. +124
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/APStuHealthRecordsTran/APStuHealthRecordsTranBLL.cs
  9. +83
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/APStuHealthRecordsTran/APStuHealthRecordsTranEntity.cs
  10. +49
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/APStuHealthRecordsTran/APStuHealthRecordsTranIBLL.cs
  11. +169
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/APStuHealthRecordsTran/APStuHealthRecordsTranService.cs

+ 95
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/QueryAPStuHealthIndex.cshtml ファイルの表示

@@ -0,0 +1,95 @@
@{
ViewBag.Title = "学籍异动列表";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout ">
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle">
<div class="lr-layout-tool">
@*<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<div id="multiple_condition_query">
<div class="lr-query-formcontent">
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">异动类型</div>
<div id="AnomalousType"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">姓名</div>
<input id="StuName" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">班级</div>
<div id="ClassNo"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">申请人</div>
<div id="CreateUserId"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">审核人</div>
<div id="CheckUserId"></div>
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">审核状态</div>
<div id="NationalityNo"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">保留学籍</div>
<div id="StuStatus"></div>
</div>
</div>
</div>
</div>

<div class="lr-layout-tool-item">
<div id="changeMajor" class="lr-query-wrap" style="width:150px;">
<div class="lr-query-btn">
添加转专业(班级)异动
</div>
</div>
</div>

<div class="lr-layout-tool-item">
<div id="changeRestAgain" class="lr-query-wrap" style="width:110px;">
<div class="lr-query-btn">
添加休学复学异动
</div>
</div>
</div>

<div class="lr-layout-tool-item">
<div id="changeDrop" class="lr-query-wrap" style="width:80px;">
<div class="lr-query-btn">
添加退学异动
</div>
</div>
</div>

<div class="lr-layout-tool-item">
<div id="changeIndexAnd" class="lr-query-wrap" style="width:110px;">
<div class="lr-query-btn">
添加转入转出异动
</div>
</div>
</div>

<div class="lr-layout-tool-item">
<div id="changeCheck" class="lr-query-wrap" style="width:110px;">
<div class="lr-query-btn">
学籍异动审核
</div>
</div>
</div>
</div>*@
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuTransferInfo/QueryAPStuHealthIndex.js")

+ 117
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/QueryAPStuHealthIndex.js ファイルの表示

@@ -0,0 +1,117 @@
var refreshGirdData;
var StuId = request('keyValue');
var StuNo = request('StuNo');
var tempdatra = new Array();
var list = [];
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
page.initGird();;
page.bind();
},
bind: function () {
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGridLei({
url: top.$.rootUrl + '/LogisticsManagement/APStuHealthRecordsTran/GetPageList',
headData: [
{
label: "申请人", name: "PStuNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'StuInfoBasic',
key: value,
keyId: 'stuno',
callback: function (_data) {
callback(_data['stuname']);
}
});
}
},
{
label: "系", name: "PDeptNo", width: 100, 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: "PMajorNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo',
key: value,
keyId: 'majorno',
callback: function (_data) {
callback(_data['majorname']);
}
});
}
},
{
label: "班级", name: "PClassNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
key: value,
keyId: 'classno',
callback: function (_data) {
callback(_data['classname']);
}
});
}
},
{ label: "预约时间", name: "PTime", width: 100, align: "left" },
{
label: "预约老师", name: "PEmpNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Psychology',
key: value,
keyId: 'f_account',
callback: function (_data) {
callback(_data['f_realname']);
}
});
}
},
{
label: "预约成功", name: "PAgreee", width: 100, align: "left",
formatter(val) {
if (val === 'true') {
return '成功';
} else {
return '待处理';
}
}
},
{ label: "备注", name: "Remark", width: 100, align: "left" },
],
mainId: 'ID',
isPage: true
});
page.search();
},
search: function (param) {
param = param || {};
param.StuNo = StuNo;
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
page.search();
};
page.init();
}

+ 111
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/APStuHealthRecordsTranController.cs ファイルの表示

@@ -0,0 +1,111 @@
using Learun.Util;
using System.Data;
using Learun.Application.TwoDevelopment.LogisticsManagement;
using System.Web.Mvc;
using System.Collections.Generic;

namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
/// Copyright (c) 2013-2018 北京泉江科技有限公司
/// 创 建:超级管理员
/// 日 期:2020-05-19 11:44
/// 描 述:学生心理健康档案
/// </summary>
public class APStuHealthRecordsTranController : MvcControllerBase
{
private APStuHealthRecordsTranIBLL aPStuHealthRecordsTranIBLL = new APStuHealthRecordsTranBLL();

#region 视图功能

/// <summary>
/// 主页面
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Index()
{
return View();
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Form()
{
return View();
}
#endregion

#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// <summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageList(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = aPStuHealthRecordsTranIBLL.GetPageList(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// <summary>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var APStuHealthRecordsData = aPStuHealthRecordsTranIBLL.GetAPStuHealthRecordsTranEntity( keyValue );
var jsonData = new {
APStuHealthRecords = APStuHealthRecordsData,
};
return Success(jsonData);
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
aPStuHealthRecordsTranIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveForm(string keyValue, string strEntity)
{
APStuHealthRecordsTranEntity entity = strEntity.ToObject<APStuHealthRecordsTranEntity>();
aPStuHealthRecordsTranIBLL.SaveEntity(keyValue,entity);
return Success("保存成功!");
}
#endregion

}
}

+ 3
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj ファイルの表示

@@ -395,6 +395,7 @@
<Compile Include="Areas\LogisticsManagement\Controllers\Acc_DailyAssessController.cs" />
<Compile Include="Areas\LogisticsManagement\Controllers\Acc_StuDayRoutineController.cs" />
<Compile Include="Areas\LogisticsManagement\Controllers\APAppointmentPsychologistController.cs" />
<Compile Include="Areas\LogisticsManagement\Controllers\APStuHealthRecordsTranController.cs" />
<Compile Include="Areas\LogisticsManagement\Controllers\CompanyNewsController.cs" />
<Compile Include="Areas\LogisticsManagement\Controllers\MSRIntentionManagementTranController.cs" />
<Compile Include="Areas\LogisticsManagement\Controllers\MSRMilitaryRecordTranController.cs" />
@@ -1369,6 +1370,7 @@
<Content Include="Areas\EducationalAdministration\Views\StuScore\ScoreQueryAllIndexTeacher.js" />
<Content Include="Areas\EducationalAdministration\Views\StuScore\ScoreQueryAllIndex.js" />
<Content Include="Areas\EducationalAdministration\Views\StuTransferInfo\CheckIndex.js" />
<Content Include="Areas\EducationalAdministration\Views\StuTransferInfo\QueryAPStuHealthIndex.js" />
<Content Include="Areas\EducationalAdministration\Views\StuTransferInfo\QueryMSRMilitaryIndex.js" />
<Content Include="Areas\EducationalAdministration\Views\StuTransferInfo\QueryScholarshipIndex.js" />
<Content Include="Areas\EducationalAdministration\Views\StuTransferInfo\QueryBasicInfo.js" />
@@ -8086,6 +8088,7 @@
<Content Include="Areas\EducationalAdministration\Views\StuTransferInfo\QueryBasicInfo.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuTransferInfo\QueryScholarshipIndex.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuTransferInfo\QueryMSRMilitaryIndex.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuTransferInfo\QueryAPStuHealthIndex.cshtml" />
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" />
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" />
<Content Include="Views\Login\Default-beifen.cshtml" />


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj ファイルの表示

@@ -140,6 +140,7 @@
<Compile Include="LogisticsManagement\Acc_PublicAreaHealthMap.cs" />
<Compile Include="LogisticsManagement\Acc_DailyAssessMap.cs" />
<Compile Include="LogisticsManagement\Acc_StuDayRoutineMap.cs" />
<Compile Include="LogisticsManagement\APStuHealthRecordsTranMap.cs" />
<Compile Include="LogisticsManagement\MSRIntentionManagementTranMap.cs" />
<Compile Include="LogisticsManagement\MSRMilitaryRecordTranMap.cs" />
<Compile Include="LogisticsManagement\MSRMilitaryServiceRegistrationTranMap.cs" />


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LogisticsManagement/APStuHealthRecordsTranMap.cs ファイルの表示

@@ -0,0 +1,29 @@
using Learun.Application.TwoDevelopment.LogisticsManagement;
using System.Data.Entity.ModelConfiguration;

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
/// Copyright (c) 2013-2018 北京泉江科技有限公司
/// 创 建:超级管理员
/// 日 期:2020-05-19 11:44
/// 描 述:学生心理健康档案
/// </summary>
public class APStuHealthRecordsTranMap : EntityTypeConfiguration<APStuHealthRecordsTranEntity>
{
public APStuHealthRecordsTranMap()
{
#region 表、主键
//表
this.ToTable("APSTUHEALTHRECORDSTRAN");
//主键
this.HasKey(t => t.ID);
#endregion

#region 配置关系
#endregion
}
}
}


+ 4
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj ファイルの表示

@@ -423,6 +423,10 @@
<Compile Include="LogisticsManagement\Acc_StuDayRoutine\Acc_StuDayRoutineIBLL.cs" />
<Compile Include="LogisticsManagement\Acc_StuDayRoutine\Acc_StuDayRoutineService.cs" />
<Compile Include="LogisticsManagement\APAppointmentPsychologist\APAppointmentPsychologistEntity.cs" />
<Compile Include="LogisticsManagement\APStuHealthRecordsTran\APStuHealthRecordsTranBLL.cs" />
<Compile Include="LogisticsManagement\APStuHealthRecordsTran\APStuHealthRecordsTranEntity.cs" />
<Compile Include="LogisticsManagement\APStuHealthRecordsTran\APStuHealthRecordsTranIBLL.cs" />
<Compile Include="LogisticsManagement\APStuHealthRecordsTran\APStuHealthRecordsTranService.cs" />
<Compile Include="LogisticsManagement\CompanyNews\CompanyNewsEntity.cs" />
<Compile Include="LogisticsManagement\MSRIntentionManagementTran\MSRIntentionManagementTranBLL.cs" />
<Compile Include="LogisticsManagement\MSRIntentionManagementTran\MSRIntentionManagementTranEntity.cs" />


+ 124
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/APStuHealthRecordsTran/APStuHealthRecordsTranBLL.cs ファイルの表示

@@ -0,0 +1,124 @@
using Learun.Util;
using System;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.LogisticsManagement
{
/// <summary>
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
/// Copyright (c) 2013-2018 北京泉江科技有限公司
/// 创 建:超级管理员
/// 日 期:2020-05-19 11:44
/// 描 述:学生心理健康档案
/// </summary>
public class APStuHealthRecordsTranBLL : APStuHealthRecordsTranIBLL
{
private APStuHealthRecordsTranService aPStuHealthRecordsTranService = new APStuHealthRecordsTranService();

#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// <summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<APStuHealthRecordsTranEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
return aPStuHealthRecordsTranService.GetPageList(pagination, queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取APStuHealthRecords表实体数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public APStuHealthRecordsTranEntity GetAPStuHealthRecordsTranEntity(string keyValue)
{
try
{
return aPStuHealthRecordsTranService.GetAPStuHealthRecordsTranEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public void DeleteEntity(string keyValue)
{
try
{
aPStuHealthRecordsTranService.DeleteEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public void SaveEntity(string keyValue, APStuHealthRecordsTranEntity entity)
{
try
{
aPStuHealthRecordsTranService.SaveEntity(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

}
}

+ 83
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/APStuHealthRecordsTran/APStuHealthRecordsTranEntity.cs ファイルの表示

@@ -0,0 +1,83 @@
using Learun.Util;
using System;
using System.ComponentModel.DataAnnotations.Schema;

namespace Learun.Application.TwoDevelopment.LogisticsManagement
{
/// <summary>
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
/// Copyright (c) 2013-2018 北京泉江科技有限公司
/// 创 建:超级管理员
/// 日 期:2020-05-19 11:44
/// 描 述:学生心理健康档案
/// </summary>
public class APStuHealthRecordsTranEntity
{
#region 实体成员
/// <summary>
/// 编号
/// </summary>
[Column("ID")]
public string ID { get; set; }
/// <summary>
/// 系
/// </summary>
[Column("DEPTNO")]
public string DeptNo { get; set; }
/// <summary>
/// 专业
/// </summary>
[Column("MAJORNO")]
public string MajorNo { get; set; }
/// <summary>
/// 班级
/// </summary>
[Column("CLASSNO")]
public string ClassNo { get; set; }
/// <summary>
/// 学生
/// </summary>
[Column("STUNO")]
public string Stuno { get; set; }
/// <summary>
/// 备注
/// </summary>
[Column("REMARK")]
public string Remark { get; set; }
/// <summary>
/// 添加时间
/// </summary>
[Column("F_CREATEDATE")]
public DateTime? F_CreateDate { get; set; }
/// <summary>
/// 添加人
/// </summary>
[Column("F_CREATEUSERID")]
public string F_CreateUserId { get; set; }
#endregion

#region 扩展操作
/// <summary>
/// 新增调用
/// </summary>
public void Create()
{
this.ID = Guid.NewGuid().ToString();
this.F_CreateDate = DateTime.Now;
UserInfo userInfo = LoginUserInfo.Get();
this.F_CreateUserId = userInfo.userId;
}
/// <summary>
/// 编辑调用
/// </summary>
/// <param name="keyValue"></param>
public void Modify(string keyValue)
{
this.ID = keyValue;
}
#endregion
#region 扩展字段
#endregion
}
}


+ 49
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/APStuHealthRecordsTran/APStuHealthRecordsTranIBLL.cs ファイルの表示

@@ -0,0 +1,49 @@
using Learun.Util;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.LogisticsManagement
{
/// <summary>
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
/// Copyright (c) 2013-2018 北京泉江科技有限公司
/// 创 建:超级管理员
/// 日 期:2020-05-19 11:44
/// 描 述:学生心理健康档案
/// </summary>
public interface APStuHealthRecordsTranIBLL
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// <summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<APStuHealthRecordsTranEntity> GetPageList(Pagination pagination, string queryJson);
/// <summary>
/// 获取APStuHealthRecords表实体数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
APStuHealthRecordsTranEntity GetAPStuHealthRecordsTranEntity(string keyValue);
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
void DeleteEntity(string keyValue);
/// <summary>
/// 保存实体数据(新增、修改)
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
void SaveEntity(string keyValue, APStuHealthRecordsTranEntity entity);
#endregion

}
}

+ 169
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/APStuHealthRecordsTran/APStuHealthRecordsTranService.cs ファイルの表示

@@ -0,0 +1,169 @@
using Dapper;
using Learun.DataBase.Repository;
using Learun.Util;
using System;
using System.Collections.Generic;
using System.Data;
using System.Text;

namespace Learun.Application.TwoDevelopment.LogisticsManagement
{
/// <summary>
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
/// Copyright (c) 2013-2018 北京泉江科技有限公司
/// 创 建:超级管理员
/// 日 期:2020-05-19 11:44
/// 描 述:学生心理健康档案
/// </summary>
public class APStuHealthRecordsTranService : RepositoryFactory
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// <summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<APStuHealthRecordsTranEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@"
t.ID,
t.DeptNo,
t.MajorNo,
t.ClassNo,
t.Stuno,
t.Remark
");
strSql.Append(" FROM APStuHealthRecords t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["DeptNo"].IsEmpty())
{
dp.Add("DeptNo", queryParam["DeptNo"].ToString(), DbType.String);
strSql.Append(" AND t.DeptNo = @DeptNo ");
}
if (!queryParam["MajorNo"].IsEmpty())
{
dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String);
strSql.Append(" AND t.MajorNo = @MajorNo ");
}
if (!queryParam["ClassNo"].IsEmpty())
{
dp.Add("ClassNo", queryParam["ClassNo"].ToString(), DbType.String);
strSql.Append(" AND t.ClassNo = @ClassNo ");
}
if (!queryParam["Stuno"].IsEmpty())
{
dp.Add("Stuno", queryParam["Stuno"].ToString(), DbType.String);
strSql.Append(" AND t.Stuno = @Stuno ");
}
return this.BaseRepository("CollegeMIS").FindList<APStuHealthRecordsTranEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取APStuHealthRecords表实体数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public APStuHealthRecordsTranEntity GetAPStuHealthRecordsTranEntity(string keyValue)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<APStuHealthRecordsTranEntity>(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public void DeleteEntity(string keyValue)
{
try
{
this.BaseRepository("CollegeMIS").Delete<APStuHealthRecordsTranEntity>(t => t.ID == keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public void SaveEntity(string keyValue, APStuHealthRecordsTranEntity entity)
{
try
{
if (!string.IsNullOrEmpty(keyValue))
{
entity.Modify(keyValue);
this.BaseRepository("CollegeMIS").Update(entity);
}
else
{
entity.Create();
this.BaseRepository("CollegeMIS").Insert(entity);
}
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

}
}

読み込み中…
キャンセル
保存