@@ -112,18 +112,18 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers | |||
var data = meetingManagementIBLL.GetList(queryJson); | |||
return Success(data); | |||
} | |||
/// <summary> | |||
/// 获取报表数据 | |||
/// <summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetStatisticList(string queryJson) | |||
{ | |||
var data = meetingManagementIBLL.GetStatisticList(queryJson); | |||
return Success(data); | |||
} | |||
///// <summary> | |||
///// 获取报表数据 | |||
///// <summary> | |||
///// <param name="queryJson">查询参数</param> | |||
///// <returns></returns> | |||
//[HttpGet] | |||
//[AjaxOnly] | |||
//public ActionResult GetStatisticList(string queryJson) | |||
//{ | |||
// var data = meetingManagementIBLL.GetStatisticList(queryJson); | |||
// return Success(data); | |||
//} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// <summary> | |||
@@ -199,6 +199,9 @@ | |||
<Compile Include="Modules\EducationalAdministration\ArrangeExamTermApi.cs" /> | |||
<Compile Include="Modules\EducationalAdministration\ArrangeExamTermNewApi.cs" /> | |||
<Compile Include="Modules\EducationalAdministration\LoginUserBindApi.cs" /> | |||
<Compile Include="Modules\PersonnelManagement\MeetingManagementApi.cs" /> | |||
<Compile Include="Modules\PersonnelManagement\MeetingMinutesApi.cs" /> | |||
<Compile Include="Modules\PersonnelManagement\MeetingSignInRecordApi.cs" /> | |||
<Compile Include="Modules\RecruiterPeopleApi.cs" /> | |||
<Compile Include="Modules\PushMessageApi.cs" /> | |||
<Compile Include="Modules\EvalApi.cs" /> | |||
@@ -0,0 +1,123 @@ | |||
using Nancy; | |||
using Learun.Util; | |||
using System.Collections.Generic; | |||
using Learun.Application.TwoDevelopment.PersonnelManagement; | |||
using System; | |||
namespace Learun.Application.WebApi | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-02-21 10:07 | |||
/// 描 述:会议管理 | |||
/// </summary> | |||
public class MeetingManagementApi : BaseApi | |||
{ | |||
private MeetingManagementIBLL meetingManagementIBLL = new MeetingManagementBLL(); | |||
/// <summary> | |||
/// 注册接口 | |||
/// <summary> | |||
public MeetingManagementApi() | |||
: base("/learun/adms/PersonnelManagement/MeetingManagement") | |||
{ | |||
Get["/pagelist"] = GetPageList; | |||
Get["/list"] = GetList; | |||
Get["/form"] = GetForm; | |||
Post["/delete"] = DeleteForm; | |||
Post["/save"] = SaveForm; | |||
} | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表分页数据 | |||
/// <summary> | |||
/// <param name="_"></param> | |||
/// <returns></returns> | |||
public Response GetPageList(dynamic _) | |||
{ | |||
ReqPageParam parameter = this.GetReqData<ReqPageParam>(); | |||
var data = meetingManagementIBLL.GetPageList(parameter.pagination, parameter.queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = parameter.pagination.total, | |||
page = parameter.pagination.page, | |||
records = parameter.pagination.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// <summary> | |||
/// <param name="_"></param> | |||
/// <returns></returns> | |||
public Response GetList(dynamic _) | |||
{ | |||
string queryJson = this.GetReqData(); | |||
var data = meetingManagementIBLL.GetList(queryJson); | |||
return Success(data); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// <summary> | |||
/// <param name="_"></param> | |||
/// <returns></returns> | |||
public Response GetForm(dynamic _) | |||
{ | |||
string keyValue = this.GetReqData(); | |||
var MeetingManagementData = meetingManagementIBLL.GetMeetingManagementEntity(keyValue); | |||
var jsonData = new | |||
{ | |||
MeetingManagement = MeetingManagementData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// <param name="_"></param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public Response DeleteForm(dynamic _) | |||
{ | |||
string keyValue = this.GetReqData(); | |||
meetingManagementIBLL.DeleteEntity(keyValue); | |||
return Success("删除成功!"); | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// <param name="_"></param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public Response SaveForm(dynamic _) | |||
{ | |||
ReqFormEntity parameter = this.GetReqData<ReqFormEntity>(); | |||
MeetingManagementEntity entity = parameter.strEntity.ToObject<MeetingManagementEntity>(); | |||
entity.CreateUser = userInfo.userId; | |||
entity.CreateTime = DateTime.Now; | |||
entity.CheckStatus = "0"; | |||
meetingManagementIBLL.SaveEntity(this.userInfo, parameter.keyValue, entity); | |||
return Success("保存成功!"); | |||
} | |||
#endregion | |||
#region 私有类 | |||
/// <summary> | |||
/// 表单实体类 | |||
/// <summary> | |||
private class ReqFormEntity | |||
{ | |||
public string keyValue { get; set; } | |||
public string strEntity { get; set; } | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,117 @@ | |||
using Nancy; | |||
using Learun.Util; | |||
using System.Collections.Generic; | |||
using Learun.Application.TwoDevelopment.PersonnelManagement; | |||
namespace Learun.Application.WebApi | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-03-08 10:36 | |||
/// 描 述:会议纪要 | |||
/// </summary> | |||
public class MeetingMinutesApi : BaseApi | |||
{ | |||
private MeetingMinutesIBLL meetingMinutesIBLL = new MeetingMinutesBLL(); | |||
/// <summary> | |||
/// 注册接口 | |||
/// <summary> | |||
public MeetingMinutesApi() | |||
: base("/Learun/adms/PersonnelManagement/MeetingMinutes") | |||
{ | |||
Get["/pagelist"] = GetPageList; | |||
Get["/list"] = GetList; | |||
Get["/form"] = GetForm; | |||
Post["/delete"] = DeleteForm; | |||
Post["/save"] = SaveForm; | |||
} | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表分页数据 | |||
/// <summary> | |||
/// <param name="_"></param> | |||
/// <returns></returns> | |||
public Response GetPageList(dynamic _) | |||
{ | |||
ReqPageParam parameter = this.GetReqData<ReqPageParam>(); | |||
var data = meetingMinutesIBLL.GetPageList(parameter.pagination, parameter.queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = parameter.pagination.total, | |||
page = parameter.pagination.page, | |||
records = parameter.pagination.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// <summary> | |||
/// <param name="_"></param> | |||
/// <returns></returns> | |||
public Response GetList(dynamic _) | |||
{ | |||
string queryJson = this.GetReqData(); | |||
var data = meetingMinutesIBLL.GetList(queryJson); | |||
return Success(data); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// <summary> | |||
/// <param name="_"></param> | |||
/// <returns></returns> | |||
public Response GetForm(dynamic _) | |||
{ | |||
string keyValue = this.GetReqData(); | |||
var MeetingMinutesData = meetingMinutesIBLL.GetMeetingMinutesEntity( keyValue ); | |||
var jsonData = new { | |||
MeetingMinutes = MeetingMinutesData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// <param name="_"></param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public Response DeleteForm(dynamic _) | |||
{ | |||
string keyValue = this.GetReqData(); | |||
meetingMinutesIBLL.DeleteEntity(keyValue); | |||
return Success("删除成功!"); | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// <param name="_"></param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public Response SaveForm(dynamic _) | |||
{ | |||
ReqFormEntity parameter = this.GetReqData<ReqFormEntity>(); | |||
MeetingMinutesEntity entity = parameter.strEntity.ToObject<MeetingMinutesEntity>(); | |||
meetingMinutesIBLL.SaveEntity(this.userInfo,parameter.keyValue,entity); | |||
return Success("保存成功!"); | |||
} | |||
#endregion | |||
#region 私有类 | |||
/// <summary> | |||
/// 表单实体类 | |||
/// <summary> | |||
private class ReqFormEntity { | |||
public string keyValue { get; set; } | |||
public string strEntity{ get; set; } | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,135 @@ | |||
using Nancy; | |||
using Learun.Util; | |||
using System.Collections.Generic; | |||
using Learun.Application.TwoDevelopment.PersonnelManagement; | |||
namespace Learun.Application.WebApi | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-02-21 10:16 | |||
/// 描 述:会议签到记录 | |||
/// </summary> | |||
public class MeetingSignInRecordApi : BaseApi | |||
{ | |||
private MeetingSignInRecordIBLL meetingSignInRecordIBLL = new MeetingSignInRecordBLL(); | |||
/// <summary> | |||
/// 注册接口 | |||
/// <summary> | |||
public MeetingSignInRecordApi() | |||
: base("/learun/adms/PersonnelManagement/MeetingSignInRecord") | |||
{ | |||
Get["/pagelist"] = GetPageList; | |||
Get["/list"] = GetList; | |||
Get["/form"] = GetForm; | |||
Post["/delete"] = DeleteForm; | |||
Post["/save"] = SaveForm; | |||
Get["/scan"] = Scan; | |||
} | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表分页数据 | |||
/// <summary> | |||
/// <param name="_"></param> | |||
/// <returns></returns> | |||
public Response GetPageList(dynamic _) | |||
{ | |||
ReqPageParam parameter = this.GetReqData<ReqPageParam>(); | |||
var data = meetingSignInRecordIBLL.GetPageList(parameter.pagination, parameter.queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = parameter.pagination.total, | |||
page = parameter.pagination.page, | |||
records = parameter.pagination.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// <summary> | |||
/// <param name="_"></param> | |||
/// <returns></returns> | |||
public Response GetList(dynamic _) | |||
{ | |||
string queryJson = this.GetReqData(); | |||
var data = meetingSignInRecordIBLL.GetList(queryJson); | |||
return Success(data); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// <summary> | |||
/// <param name="_"></param> | |||
/// <returns></returns> | |||
public Response GetForm(dynamic _) | |||
{ | |||
string keyValue = this.GetReqData(); | |||
var MeetingSignInRecordData = meetingSignInRecordIBLL.GetMeetingSignInRecordEntity( keyValue ); | |||
var jsonData = new { | |||
MeetingSignInRecord = MeetingSignInRecordData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// <param name="_"></param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public Response DeleteForm(dynamic _) | |||
{ | |||
string keyValue = this.GetReqData(); | |||
meetingSignInRecordIBLL.DeleteEntity(keyValue); | |||
return Success("删除成功!"); | |||
} | |||
/// <summary> | |||
/// 会议扫码签到 | |||
/// <param name="_"></param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public Response Scan(dynamic _) | |||
{ | |||
ScanParam scanParam = this.GetReqData<ScanParam>(); | |||
var result= meetingSignInRecordIBLL.Scan(scanParam.userid,scanParam.meetid)?"签到成功":"签到失败"; | |||
return Success(new {result}); | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// <param name="_"></param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public Response SaveForm(dynamic _) | |||
{ | |||
ReqFormEntity parameter = this.GetReqData<ReqFormEntity>(); | |||
MeetingSignInRecordEntity entity = parameter.strEntity.ToObject<MeetingSignInRecordEntity>(); | |||
meetingSignInRecordIBLL.SaveEntity(this.userInfo,parameter.keyValue,entity); | |||
return Success("保存成功!"); | |||
} | |||
#endregion | |||
#region 私有类 | |||
/// <summary> | |||
/// 表单实体类 | |||
/// <summary> | |||
private class ReqFormEntity { | |||
public string keyValue { get; set; } | |||
public string strEntity{ get; set; } | |||
} | |||
private class ScanParam | |||
{ | |||
public string userid { get; set; } | |||
public string meetid { get; set; } | |||
} | |||
#endregion | |||
} | |||
} |
@@ -454,6 +454,10 @@ | |||
<Compile Include="PersonnelManagement\MeetingManagement\MeetingManagementEntity.cs" /> | |||
<Compile Include="PersonnelManagement\MeetingManagement\MeetingManagementIBLL.cs" /> | |||
<Compile Include="PersonnelManagement\MeetingManagement\MeetingManagementService.cs" /> | |||
<Compile Include="PersonnelManagement\MeetingMinutes\MeetingMinutesBLL.cs" /> | |||
<Compile Include="PersonnelManagement\MeetingMinutes\MeetingMinutesEntity.cs" /> | |||
<Compile Include="PersonnelManagement\MeetingMinutes\MeetingMinutesIBLL.cs" /> | |||
<Compile Include="PersonnelManagement\MeetingMinutes\MeetingMinutesService.cs" /> | |||
<Compile Include="PersonnelManagement\MeetingSignInRecord\MeetingSignInRecordBLL.cs" /> | |||
<Compile Include="PersonnelManagement\MeetingSignInRecord\MeetingSignInRecordEntity.cs" /> | |||
<Compile Include="PersonnelManagement\MeetingSignInRecord\MeetingSignInRecordIBLL.cs" /> | |||
@@ -114,31 +114,6 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取MeetingManagement表实体数据 | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public DataTable GetStatisticList(string queryJson) | |||
{ | |||
try | |||
{ | |||
return meetingManagementService.GetStatisticList(queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
@@ -40,12 +40,6 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||
/// <summary> | |||
/// <returns></returns> | |||
MeetingManagementEntity GetMeetingManagementEntityByProcessId(string processId); | |||
/// <summary> | |||
/// 获取报表数据 | |||
/// </summary> | |||
/// <param name="queryJson"></param> | |||
/// <returns></returns> | |||
DataTable GetStatisticList(string queryJson); | |||
#endregion | |||
#region 提交数据 | |||
@@ -179,55 +179,6 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||
} | |||
} | |||
/// <summary> | |||
/// 获取报表数据 | |||
/// </summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public DataTable GetStatisticList(string queryJson) | |||
{ | |||
try | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT "); | |||
strSql.Append(@" | |||
t.meetingtitle, | |||
t.begintime, | |||
t.endtime, | |||
t.正常, | |||
t.未到 | |||
"); | |||
strSql.Append(" FROM (select m.MeetingTitle,isnull(t.正常,0) 正常,isnull(t.未到,0) 未到,m.BeginTime,m.EndTime from MeetingManagement m left join (select meetid,sum(case issignin when 1 then 1 else 0 end) as 正常, sum(case issignin when 0 then 1 else 0 end) as 未到 from MeetingSignInRecord group by meetid) t on t.MeetID=m.Id)t "); | |||
strSql.Append(" WHERE 1=1 "); | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
if (!queryParam["meetingtitle"].IsEmpty()) | |||
{ | |||
dp.Add("meetingtitle", "%" + queryParam["meetingtitle"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.meetingtitle Like @meetingtitle "); | |||
} | |||
if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty()) | |||
{ | |||
dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); | |||
dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime); | |||
strSql.Append(" AND ( t.begintime >= @startTime AND t.begintime <= @endTime ) "); | |||
} | |||
return this.BaseRepository("CollegeMIS").FindTable(strSql.ToString(), dp); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
@@ -0,0 +1,149 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-03-08 10:36 | |||
/// 描 述:会议纪要 | |||
/// </summary> | |||
public class MeetingMinutesBLL : MeetingMinutesIBLL | |||
{ | |||
private MeetingMinutesService meetingMinutesService = new MeetingMinutesService(); | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表分页数据 | |||
/// <summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<MeetingMinutesEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
return meetingMinutesService.GetPageList(pagination, queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// <summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<MeetingMinutesEntity> GetList(string queryJson) | |||
{ | |||
try | |||
{ | |||
return meetingMinutesService.GetList(queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取MeetingMinutes表实体数据 | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public MeetingMinutesEntity GetMeetingMinutesEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return meetingMinutesService.GetMeetingMinutesEntity(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 | |||
{ | |||
meetingMinutesService.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(UserInfo userInfo, string keyValue, MeetingMinutesEntity entity) | |||
{ | |||
try | |||
{ | |||
meetingMinutesService.SaveEntity(userInfo, keyValue, entity); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,78 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.ComponentModel.DataAnnotations.Schema; | |||
namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-03-08 10:36 | |||
/// 描 述:会议纪要 | |||
/// </summary> | |||
public class MeetingMinutesEntity | |||
{ | |||
#region 实体成员 | |||
/// <summary> | |||
/// 编号 | |||
/// </summary> | |||
[Column("ID")] | |||
public string ID { get; set; } | |||
/// <summary> | |||
/// 会议id | |||
/// </summary> | |||
[Column("MEETID")] | |||
public string MeetID { get; set; } | |||
/// <summary> | |||
/// 纪要标题 | |||
/// </summary> | |||
[Column("TITLE")] | |||
public string Title { get; set; } | |||
/// <summary> | |||
/// 纪要内容 | |||
/// </summary> | |||
[Column("CONTENT")] | |||
public string Content { get; set; } | |||
/// <summary> | |||
/// 附件 | |||
/// </summary> | |||
[Column("FILES")] | |||
public string Files { get; set; } | |||
/// <summary> | |||
/// 创建时间 | |||
/// </summary> | |||
[Column("CREATETIME")] | |||
public DateTime? CreateTime { get; set; } | |||
/// <summary> | |||
/// 创建人 | |||
/// </summary> | |||
[Column("CREATEUSER")] | |||
public string CreateUser { get; set; } | |||
#endregion | |||
#region 扩展操作 | |||
/// <summary> | |||
/// 新增调用 | |||
/// </summary> | |||
public void Create(UserInfo userInfo) | |||
{ | |||
this.ID = Guid.NewGuid().ToString(); | |||
} | |||
/// <summary> | |||
/// 编辑调用 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
public void Modify(string keyValue, UserInfo userInfo) | |||
{ | |||
this.ID = keyValue; | |||
} | |||
#endregion | |||
#region 扩展字段 | |||
[NotMapped] | |||
public string MeetingTitle { get; set; } | |||
#endregion | |||
} | |||
} | |||
@@ -0,0 +1,56 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-03-08 10:36 | |||
/// 描 述:会议纪要 | |||
/// </summary> | |||
public interface MeetingMinutesIBLL | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表分页数据 | |||
/// <summary> | |||
/// <param name="pagination">查询参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<MeetingMinutesEntity> GetPageList(Pagination pagination, string queryJson); | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// <summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<MeetingMinutesEntity> GetList(string queryJson); | |||
/// <summary> | |||
/// 获取MeetingMinutes表实体数据 | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
MeetingMinutesEntity GetMeetingMinutesEntity(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(UserInfo userInfo, string keyValue, MeetingMinutesEntity entity); | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,198 @@ | |||
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.PersonnelManagement | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-03-08 10:36 | |||
/// 描 述:会议纪要 | |||
/// </summary> | |||
public class MeetingMinutesService : RepositoryFactory | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表分页数据 | |||
/// <summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<MeetingMinutesEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT t.*,m.MeetingTitle "); | |||
strSql.Append(" FROM MeetingMinutes t left join MeetingManagement m on t.MeetID=m.Id "); | |||
strSql.Append(" WHERE 1=1 "); | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
if (!queryParam["MeetID"].IsEmpty()) | |||
{ | |||
dp.Add("MeetID", queryParam["MeetID"].ToString(), DbType.String); | |||
strSql.Append(" AND t.MeetID = @MeetID "); | |||
} | |||
if (!queryParam["MeetingTitle"].IsEmpty()) | |||
{ | |||
dp.Add("MeetingTitle", "%" + queryParam["MeetingTitle"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND m.MeetingTitle Like @MeetingTitle "); | |||
} | |||
if (!queryParam["Title"].IsEmpty()) | |||
{ | |||
dp.Add("Title", "%" + queryParam["Title"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.Title Like @Title "); | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<MeetingMinutesEntity>(strSql.ToString(),dp, pagination); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// <summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<MeetingMinutesEntity> GetList(string queryJson) | |||
{ | |||
try | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT t.* "); | |||
strSql.Append(" FROM MeetingMinutes t "); | |||
strSql.Append(" WHERE 1=1 "); | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
if (!queryParam["MeetID"].IsEmpty()) | |||
{ | |||
dp.Add("MeetID", queryParam["MeetID"].ToString(), DbType.String); | |||
strSql.Append(" AND t.MeetID = @MeetID "); | |||
} | |||
if (!queryParam["Title"].IsEmpty()) | |||
{ | |||
dp.Add("Title", "%" + queryParam["Title"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.Title Like @Title "); | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<MeetingMinutesEntity>(strSql.ToString(),dp); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取MeetingMinutes表实体数据 | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public MeetingMinutesEntity GetMeetingMinutesEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindEntity<MeetingMinutesEntity>(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<MeetingMinutesEntity>(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( UserInfo userInfo, string keyValue, MeetingMinutesEntity entity) | |||
{ | |||
try | |||
{ | |||
if (!string.IsNullOrEmpty(keyValue)) | |||
{ | |||
entity.Modify(keyValue,userInfo); | |||
this.BaseRepository("CollegeMIS").Update(entity); | |||
} | |||
else | |||
{ | |||
entity.Create(userInfo); | |||
this.BaseRepository("CollegeMIS").Insert(entity); | |||
} | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -36,6 +36,11 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
if (!queryParam["MeetID"].IsEmpty()) | |||
{ | |||
dp.Add("MeetID", queryParam["MeetID"].ToString(), DbType.String); | |||
strSql.Append(" AND t.MeetID = @MeetID "); | |||
} | |||
if (!queryParam["MeetingTitle"].IsEmpty()) | |||
{ | |||
dp.Add("MeetingTitle", "%" + queryParam["MeetingTitle"].ToString() + "%", DbType.String); | |||
@@ -46,18 +51,6 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||
dp.Add("ParticipantName", "%" + queryParam["ParticipantName"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.ParticipantName like @ParticipantName "); | |||
} | |||
if (!queryParam["IsSignIn"].IsEmpty()) | |||
{ | |||
if (queryParam["IsSignIn"].ToString() == "true") | |||
{ | |||
strSql.Append(" AND t.IsSignIn=1 "); | |||
} | |||
else | |||
{ | |||
strSql.Append(" AND t.IsSignIn=0 "); | |||
} | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<MeetingSignInRecordEntity>(strSql.ToString(), dp, pagination); | |||
} | |||
@@ -231,13 +224,18 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||
var meetEntity = this.BaseRepository("CollegeMIS") | |||
.FindEntity<MeetingSignInRecordEntity>(a => | |||
a.MeetID == scanParamMeetid && a.ParticipantID == scanParamUserid); | |||
if (meetEntity != null) | |||
var date = DateTime.Now; | |||
var meetEntityList = this.BaseRepository("CollegeMIS") | |||
.FindEntity<MeetingManagementEntity>(x => x.Id == scanParamMeetid); | |||
var beginTime = meetEntityList.BeginTime; | |||
if (meetEntityList != null && beginTime > date) | |||
{ | |||
meetEntity.IsSignIn = true; | |||
meetEntity.SignInTime = DateTime.Now; | |||
this.BaseRepository("CollegeMIS").Update(meetEntity); | |||
result = true; | |||
} | |||
return result; | |||
} | |||