From 2d8251f14c10c1f070f5884be696615876b0bcce Mon Sep 17 00:00:00 2001 From: ndbs Date: Mon, 31 Oct 2022 15:12:14 +0800 Subject: [PATCH] =?UTF-8?q?=20app2.0=20=E6=89=8B=E6=9C=BA=E7=AB=AF?= =?UTF-8?q?=E6=88=91=E7=9A=84=E4=BC=9A=E8=AE=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Learun.Application.WebApi.csproj | 3 + .../PersonnelManagement/MeetingMinutesApi.cs | 1 + .../Learun.Application.TwoDevelopment.csproj | 4 + .../MeetingManagement/MeetingManagementBLL.cs | 25 --- .../MeetingManagementIBLL.cs | 6 - .../MeetingManagementService.cs | 49 ----- .../MeetingMinutes/MeetingMinutesBLL.cs | 149 +++++++++++++ .../MeetingMinutes/MeetingMinutesEntity.cs | 78 +++++++ .../MeetingMinutes/MeetingMinutesIBLL.cs | 56 +++++ .../MeetingMinutes/MeetingMinutesService.cs | 198 ++++++++++++++++++ .../MeetingSignInRecordService.cs | 26 ++- 11 files changed, 501 insertions(+), 94 deletions(-) create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingMinutes/MeetingMinutesBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingMinutes/MeetingMinutesEntity.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingMinutes/MeetingMinutesIBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingMinutes/MeetingMinutesService.cs diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj index fe28abe2a..cdef6de8f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj @@ -199,6 +199,9 @@ + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/PersonnelManagement/MeetingMinutesApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/PersonnelManagement/MeetingMinutesApi.cs index 38893dd70..ca8a9ee4f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/PersonnelManagement/MeetingMinutesApi.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/PersonnelManagement/MeetingMinutesApi.cs @@ -2,6 +2,7 @@ using Learun.Util; using System.Collections.Generic; using Learun.Application.TwoDevelopment.PersonnelManagement; + namespace Learun.Application.WebApi { /// diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj index e5286b12c..e79babc17 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj @@ -454,6 +454,10 @@ + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementBLL.cs index 1691871cf..125bcef3d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementBLL.cs @@ -114,31 +114,6 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement } } } - - /// - /// 获取MeetingManagement表实体数据 - /// 主键 - /// - /// - 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 提交数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementIBLL.cs index f5b40cf1c..ef3282473 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementIBLL.cs @@ -40,12 +40,6 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement /// /// MeetingManagementEntity GetMeetingManagementEntityByProcessId(string processId); - /// - /// 获取报表数据 - /// - /// - /// - DataTable GetStatisticList(string queryJson); #endregion #region 提交数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementService.cs index 01906403d..284ef5188 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementService.cs @@ -179,55 +179,6 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement } } - /// - /// 获取报表数据 - /// - /// 查询参数 - /// - 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 提交数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingMinutes/MeetingMinutesBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingMinutes/MeetingMinutesBLL.cs new file mode 100644 index 000000000..91bbba6ec --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingMinutes/MeetingMinutesBLL.cs @@ -0,0 +1,149 @@ +using Learun.Util; +using System; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.PersonnelManagement +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-03-08 10:36 + /// 描 述:会议纪要 + /// + public class MeetingMinutesBLL : MeetingMinutesIBLL + { + private MeetingMinutesService meetingMinutesService = new MeetingMinutesService(); + + #region 获取数据 + + /// + /// 获取页面显示列表分页数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return meetingMinutesService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetList(string queryJson) + { + try + { + return meetingMinutesService.GetList(queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取MeetingMinutes表实体数据 + /// 主键 + /// + /// + 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 提交数据 + + /// + /// 删除实体数据 + /// 主键 + /// + /// + public void DeleteEntity(string keyValue) + { + try + { + meetingMinutesService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + 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 + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingMinutes/MeetingMinutesEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingMinutes/MeetingMinutesEntity.cs new file mode 100644 index 000000000..2b5e62a69 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingMinutes/MeetingMinutesEntity.cs @@ -0,0 +1,78 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Learun.Application.TwoDevelopment.PersonnelManagement +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-03-08 10:36 + /// 描 述:会议纪要 + /// + public class MeetingMinutesEntity + { + #region 实体成员 + /// + /// 编号 + /// + [Column("ID")] + public string ID { get; set; } + /// + /// 会议id + /// + [Column("MEETID")] + public string MeetID { get; set; } + /// + /// 纪要标题 + /// + [Column("TITLE")] + public string Title { get; set; } + /// + /// 纪要内容 + /// + [Column("CONTENT")] + public string Content { get; set; } + /// + /// 附件 + /// + [Column("FILES")] + public string Files { get; set; } + /// + /// 创建时间 + /// + [Column("CREATETIME")] + public DateTime? CreateTime { get; set; } + /// + /// 创建人 + /// + [Column("CREATEUSER")] + public string CreateUser { get; set; } + + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create(UserInfo userInfo) + { + this.ID = Guid.NewGuid().ToString(); + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue, UserInfo userInfo) + { + this.ID = keyValue; + } + #endregion + #region 扩展字段 + [NotMapped] + public string MeetingTitle { get; set; } + #endregion + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingMinutes/MeetingMinutesIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingMinutes/MeetingMinutesIBLL.cs new file mode 100644 index 000000000..5ddfa91ac --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingMinutes/MeetingMinutesIBLL.cs @@ -0,0 +1,56 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.PersonnelManagement +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-03-08 10:36 + /// 描 述:会议纪要 + /// + public interface MeetingMinutesIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表分页数据 + /// + /// 查询参数 + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetList(string queryJson); + /// + /// 获取MeetingMinutes表实体数据 + /// 主键 + /// + /// + MeetingMinutesEntity GetMeetingMinutesEntity(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// 主键 + /// + /// + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + void SaveEntity(UserInfo userInfo, string keyValue, MeetingMinutesEntity entity); + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingMinutes/MeetingMinutesService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingMinutes/MeetingMinutesService.cs new file mode 100644 index 000000000..97e8a7250 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingMinutes/MeetingMinutesService.cs @@ -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 +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-03-08 10:36 + /// 描 述:会议纪要 + /// + public class MeetingMinutesService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表分页数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable 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(strSql.ToString(),dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + public IEnumerable 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(strSql.ToString(),dp); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取MeetingMinutes表实体数据 + /// 主键 + /// + /// + public MeetingMinutesEntity GetMeetingMinutesEntity(string keyValue) + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// 主键 + /// + /// + public void DeleteEntity(string keyValue) + { + try + { + this.BaseRepository("CollegeMIS").Delete(t=>t.ID == keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + 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 + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingSignInRecord/MeetingSignInRecordService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingSignInRecord/MeetingSignInRecordService.cs index 557dbdef8..4252362ac 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingSignInRecord/MeetingSignInRecordService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingSignInRecord/MeetingSignInRecordService.cs @@ -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(strSql.ToString(), dp, pagination); } @@ -231,13 +224,18 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement var meetEntity = this.BaseRepository("CollegeMIS") .FindEntity(a => a.MeetID == scanParamMeetid && a.ParticipantID == scanParamUserid); - if (meetEntity != null) + var date = DateTime.Now; + var meetEntityList = this.BaseRepository("CollegeMIS") + .FindEntity(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; }