diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/MeetingManagementController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/MeetingManagementController.cs index 04e2bc2b4..8223d5bde 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/MeetingManagementController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/MeetingManagementController.cs @@ -112,18 +112,18 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers var data = meetingManagementIBLL.GetList(queryJson); return Success(data); } - /// - /// 获取报表数据 - /// - /// 查询参数 - /// - [HttpGet] - [AjaxOnly] - public ActionResult GetStatisticList(string queryJson) - { - var data = meetingManagementIBLL.GetStatisticList(queryJson); - return Success(data); - } + ///// + ///// 获取报表数据 + ///// + ///// 查询参数 + ///// + //[HttpGet] + //[AjaxOnly] + //public ActionResult GetStatisticList(string queryJson) + //{ + // var data = meetingManagementIBLL.GetStatisticList(queryJson); + // return Success(data); + //} /// /// 获取表单数据 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index cabd1724b..86664cb0b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj @@ -1224,6 +1224,7 @@ + @@ -1234,6 +1235,7 @@ + @@ -7536,6 +7538,8 @@ + + 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/AnnexesApiWx.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/AnnexesApiWx.cs index 4795d3d47..3f345891b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/AnnexesApiWx.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/AnnexesApiWx.cs @@ -7,136 +7,192 @@ using System.IO; namespace Learun.Application.WebApi.Modules { - public class AnnexesApiWx : BaseApi - { - public AnnexesApiWx() - : base("/learun/adms/annexes") + public class AnnexesApiWx : BaseApi { - Get["/wxlist"] = WxGetList; - Get["/wxdown"] = WxDownload; - Get["/wxfileinfo"] = WxFileInfo; - Post["/wxupload"] = WxUpload; - Post["/wxdelete"] = WxDeleteFile; + public AnnexesApiWx() + : base("/learun/adms/annexes") + { + Get["/wxlist"] = WxGetList; + Get["/wxdown"] = WxDownload; + Get["/wxfileinfo"] = WxFileInfo; + Post["/wxupload"] = WxUpload; + Post["/wxdelete"] = WxDeleteFile; + Post["/wxuploadinsingle"] = WxUploadInSingle; + } + private AnnexesFileIBLL annexesFileIBLL = new AnnexesFileBLL(); + + /// + /// 获取附件列表 + /// + /// + /// + public Response WxGetList(dynamic _) + { + var keyValue = this.GetReqData(); + var list = annexesFileIBLL.GetList(keyValue); + + return Success(list); + } + + /// + /// 上传附件图片文件 + /// + /// + public Response WxUpload(dynamic _) + { + var files = (List)this.Context.Request.Files; + string folderId = Request.Form["folderId"]; + string filePath = Config.GetValue("AnnexesFile"); + string uploadDate = DateTime.Now.ToString("yyyyMMdd"); + string fileEextension = Path.GetExtension(files[0].Name); + string fileType = fileEextension.Replace(".", ""); + string fileGuid = Guid.NewGuid().ToString(); + + string virtualPath = string.Format("{0}/{1}/{2}/{3}{4}", filePath, userInfo.userId, uploadDate, fileGuid, fileEextension); + + //创建文件夹 + string path = Path.GetDirectoryName(virtualPath); + Directory.CreateDirectory(path); + AnnexesFileEntity fileAnnexesEntity = new AnnexesFileEntity(); + if (!System.IO.File.Exists(virtualPath)) + { + byte[] bytes = new byte[files[0].Value.Length]; + files[0].Value.Read(bytes, 0, bytes.Length); + FileInfo file = new FileInfo(virtualPath); + FileStream fs = file.Create(); + fs.Write(bytes, 0, bytes.Length); + fs.Close(); + + //文件信息写入数据库 + fileAnnexesEntity.F_Id = fileGuid; + fileAnnexesEntity.F_FileName = files[0].Name; + fileAnnexesEntity.F_FilePath = virtualPath; + fileAnnexesEntity.F_FileSize = files[0].Value.Length.ToString(); + fileAnnexesEntity.F_FileExtensions = fileEextension; + fileAnnexesEntity.F_FileType = fileType; + fileAnnexesEntity.F_CreateUserId = userInfo.userId; + fileAnnexesEntity.F_CreateUserName = userInfo.realName; + + annexesFileIBLL.SaveEntity(folderId, fileAnnexesEntity); + } + + return SuccessString(folderId); + } + + /// + /// 上传附件图片文件【移动端app2.0,单独页面中的附件图片上传使用方法】 + /// + /// + public Response WxUploadInSingle(dynamic _) + { + var files = (List)this.Context.Request.Files; + var folderId = this.GetReq().folderId; + var name = this.GetReq().name; + + string filePath = Config.GetValue("AnnexesFile"); + string uploadDate = DateTime.Now.ToString("yyyyMMdd"); + string FileEextension = Path.GetExtension(name); + string fileGuid = Guid.NewGuid().ToString(); + + string virtualPath = string.Format("{0}/{1}/{2}/{3}{4}", filePath, userInfo.userId, uploadDate, fileGuid, FileEextension); + + //创建文件夹 + string path = Path.GetDirectoryName(virtualPath); + Directory.CreateDirectory(path); + AnnexesFileEntity fileAnnexesEntity = new AnnexesFileEntity(); + if (!System.IO.File.Exists(virtualPath)) + { + byte[] bytes = new byte[files[0].Value.Length]; + files[0].Value.Read(bytes, 0, bytes.Length); + FileInfo file = new FileInfo(virtualPath); + FileStream fs = file.Create(); + fs.Write(bytes, 0, bytes.Length); + fs.Close(); + + //文件信息写入数据库 + fileAnnexesEntity.F_Id = fileGuid; + fileAnnexesEntity.F_FolderId = folderId; + fileAnnexesEntity.F_FileName = name; + fileAnnexesEntity.F_FilePath = virtualPath; + fileAnnexesEntity.F_FileSize = files[0].Value.Length.ToString(); + fileAnnexesEntity.F_FileExtensions = FileEextension; + fileAnnexesEntity.F_FileType = FileEextension.Replace(".", ""); + fileAnnexesEntity.F_CreateUserId = userInfo.userId; + fileAnnexesEntity.F_CreateUserName = userInfo.realName; + + annexesFileIBLL.SaveEntity(folderId, fileAnnexesEntity); + } + return SuccessString(folderId); + } + + /// + /// 获取文件信息 + /// + /// + /// + public Response WxFileInfo(dynamic _) + { + var fileId = this.GetReqData(); + var fileEntity = annexesFileIBLL.GetEntity(fileId); + + return Success(fileEntity); + } + + /// + /// 删除文件 + /// + /// + /// + public Response WxDeleteFile(dynamic _) + { + var fileId = this.GetReqData(); + AnnexesFileEntity fileInfoEntity = annexesFileIBLL.GetEntity(fileId); + if (fileInfoEntity != null) + { + annexesFileIBLL.DeleteEntity(fileId); + //删除文件 + if (System.IO.File.Exists(fileInfoEntity.F_FilePath)) + { + System.IO.File.Delete(fileInfoEntity.F_FilePath); + } + } + + return Success("删除成功"); + } + + /// + /// 下载文件,微信小程序用 + /// + /// 微信小程序可以预览图片、文档 + /// 支持的图片格式:.jpg .png .webp .gif + /// 支持的文档格式:.doc(x) .xls(x) .ppt(x) .pdf + /// + /// 对于其他格式的文件,微信小程序官方未提供打开或预览的 API,文件对用户来说不可访问 + /// + /// + /// + public Response WxDownload(dynamic _) + { + string name = this.GetReqData(); + string fileId = name.Split('.')[0]; + var fileEntity = annexesFileIBLL.GetEntity(fileId); + string filepath = fileEntity.F_FilePath; + + if (!FileDownHelper.FileExists(filepath)) + { + return 404; + } + + FileDownHelper.DownLoadWx(filepath, fileEntity.F_FileType); + + return Success(""); + } + + public class FileModel + { + public string folderId { get; set; } + public string name { get; set; } + public string id { get; set; } + } } - private AnnexesFileIBLL annexesFileIBLL = new AnnexesFileBLL(); - - /// - /// 获取附件列表 - /// - /// - /// - public Response WxGetList(dynamic _) - { - var keyValue = this.GetReqData(); - var list = annexesFileIBLL.GetList(keyValue); - - return Success(list); - } - - /// - /// 上传附件图片文件 - /// - /// - public Response WxUpload(dynamic _) - { - var files = (List)this.Context.Request.Files; - var folderId = this.GetReqData(); - - string filePath = Config.GetValue("AnnexesFile"); - string uploadDate = DateTime.Now.ToString("yyyyMMdd"); - string fileEextension = Path.GetExtension(files[0].Name); - string fileType = fileEextension.Replace(".", ""); - string fileGuid = Guid.NewGuid().ToString(); - - string virtualPath = string.Format("{0}/{1}/{2}/{3}{4}", filePath, userInfo.userId, uploadDate, fileGuid, fileEextension); - - //创建文件夹 - string path = Path.GetDirectoryName(virtualPath); - Directory.CreateDirectory(path); - AnnexesFileEntity fileAnnexesEntity = new AnnexesFileEntity(); - if (!System.IO.File.Exists(virtualPath)) - { - byte[] bytes = new byte[files[0].Value.Length]; - files[0].Value.Read(bytes, 0, bytes.Length); - FileInfo file = new FileInfo(virtualPath); - FileStream fs = file.Create(); - fs.Write(bytes, 0, bytes.Length); - fs.Close(); - - //文件信息写入数据库 - fileAnnexesEntity.F_Id = fileGuid; - fileAnnexesEntity.F_FileName = files[0].Name; - fileAnnexesEntity.F_FilePath = virtualPath; - fileAnnexesEntity.F_FileSize = files[0].Value.Length.ToString(); - fileAnnexesEntity.F_FileExtensions = fileEextension; - fileAnnexesEntity.F_FileType = fileType; - fileAnnexesEntity.F_CreateUserId = userInfo.userId; - fileAnnexesEntity.F_CreateUserName = userInfo.realName; - - annexesFileIBLL.SaveEntity(folderId, fileAnnexesEntity); - } - - return SuccessString(fileGuid); - } - - /// - /// 获取文件信息 - /// - /// - /// - public Response WxFileInfo(dynamic _) - { - var fileId = this.GetReqData(); - var fileEntity = annexesFileIBLL.GetEntity(fileId); - - return Success(fileEntity); - } - - /// - /// 删除文件 - /// - /// - /// - public Response WxDeleteFile(dynamic _) - { - var fileId = this.GetReqData(); - AnnexesFileEntity fileInfoEntity = annexesFileIBLL.GetEntity(fileId); - annexesFileIBLL.DeleteEntity(fileId); - //删除文件 - if (System.IO.File.Exists(fileInfoEntity.F_FilePath)) - { - System.IO.File.Delete(fileInfoEntity.F_FilePath); - } - - return Success("删除成功"); - } - - /// - /// 下载文件,微信小程序用 - /// - /// 微信小程序可以预览图片、文档 - /// 支持的图片格式:.jpg .png .webp .gif - /// 支持的文档格式:.doc(x) .xls(x) .ppt(x) .pdf - /// - /// 对于其他格式的文件,微信小程序官方未提供打开或预览的 API,文件对用户来说不可访问 - /// - /// - /// - public Response WxDownload(dynamic _) - { - string name = this.GetReqData(); - string fileId = name.Split('.')[0]; - var fileEntity = annexesFileIBLL.GetEntity(fileId); - string filepath = fileEntity.F_FilePath; - - if (!FileDownHelper.FileExists(filepath)) - { - return 404; - } - - FileDownHelper.DownLoadWx(filepath, fileEntity.F_FileType); - - return Success(""); - } - } } \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/FormApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/FormApi.cs index a574ac806..647d310a1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/FormApi.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/FormApi.cs @@ -11,7 +11,7 @@ namespace Learun.Application.WebApi.Modules /// 日 期:2018.01.03 /// 描 述:自定义表单处理接口 /// - public class FormApi: BaseApi + public class FormApi : BaseApi { /// /// 注册接口 @@ -21,6 +21,7 @@ namespace Learun.Application.WebApi.Modules { Get["/scheme"] = GetScheme; Get["/data"] = GetData; + Get["/folderkey"] = GetFolderkey; Post["/save"] = Save; Post["/delete"] = DeleteForm; @@ -35,12 +36,15 @@ namespace Learun.Application.WebApi.Modules private Response GetScheme(dynamic _) { List req = this.GetReqData>();// 获取模板请求数据 - Dictionary schemeList = new Dictionary(); - foreach (var item in req) { + Dictionary schemeList = new Dictionary(); + foreach (var item in req) + { FormSchemeInfoEntity schemeInfoEntity = formSchemeIBLL.GetSchemeInfoEntity(item.id); - if (schemeInfoEntity != null) { + if (schemeInfoEntity != null) + { FormSchemeEntity schemeEntity = formSchemeIBLL.GetSchemeEntity(schemeInfoEntity.F_SchemeId); - if (schemeEntity != null) { + if (schemeEntity != null) + { if (schemeInfoEntity.F_SchemeId != item.ver) { schemeList.Add(item.id, schemeEntity); @@ -75,7 +79,25 @@ namespace Learun.Application.WebApi.Modules return Success(dic); } - + /// + /// 上传文件夹ID + /// + /// + /// + private Response GetFolderkey(dynamic _) + { + List req = this.GetReqData>();// 获取模板请求数据 + Dictionary dic = new Dictionary(); + foreach (var item in req) + { + if (!string.IsNullOrEmpty(item.processIdName)) + { + var data = formSchemeIBLL.GetFolderKey(item.schemeInfoId, item.processIdName, item.keyValue);// + dic = data; + } + } + return Success(dic); + } /// /// 保存表单数据 @@ -104,7 +126,36 @@ namespace Learun.Application.WebApi.Modules } #region 请求参数 - private class SchemeReq { + + private class FolderKeyReq + { + /// + /// 表单请求Id + /// + public string id { get; set; } + /// + /// 当前自定义表单版本号 + /// + public string ver { get; set; } + /// + /// 流程模板id + /// + public string schemeInfoId { get; set; } + /// + /// 关联字段名称 + /// + public string processIdName { get; set; } + /// + /// 数据主键值 + /// + public string keyValue { get; set; } + /// + /// 表单数据 + /// + public string formData { get; set; } + } + private class SchemeReq + { /// /// 表单请求Id /// @@ -141,8 +192,8 @@ namespace Learun.Application.WebApi.Modules #endregion } - - + + } \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/PersonnelManagement/MeetingManagementApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/PersonnelManagement/MeetingManagementApi.cs new file mode 100644 index 000000000..219d75a2d --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/PersonnelManagement/MeetingManagementApi.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 +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-02-21 10:07 + /// 描 述:会议管理 + /// + public class MeetingManagementApi : BaseApi + { + private MeetingManagementIBLL meetingManagementIBLL = new MeetingManagementBLL(); + + /// + /// 注册接口 + /// + public MeetingManagementApi() + : base("/learun/adms/PersonnelManagement/MeetingManagement") + { + Get["/pagelist"] = GetPageList; + Get["/list"] = GetList; + Get["/form"] = GetForm; + Post["/delete"] = DeleteForm; + Post["/save"] = SaveForm; + } + #region 获取数据 + + /// + /// 获取页面显示列表分页数据 + /// + /// + /// + public Response GetPageList(dynamic _) + { + ReqPageParam parameter = this.GetReqData(); + 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); + } + /// + /// 获取页面显示列表数据 + /// + /// + /// + public Response GetList(dynamic _) + { + string queryJson = this.GetReqData(); + var data = meetingManagementIBLL.GetList(queryJson); + return Success(data); + } + /// + /// 获取表单数据 + /// + /// + /// + public Response GetForm(dynamic _) + { + string keyValue = this.GetReqData(); + var MeetingManagementData = meetingManagementIBLL.GetMeetingManagementEntity(keyValue); + var jsonData = new + { + MeetingManagement = MeetingManagementData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// + /// + public Response DeleteForm(dynamic _) + { + string keyValue = this.GetReqData(); + meetingManagementIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// + /// + public Response SaveForm(dynamic _) + { + ReqFormEntity parameter = this.GetReqData(); + MeetingManagementEntity entity = parameter.strEntity.ToObject(); + entity.CreateUser = userInfo.userId; + entity.CreateTime = DateTime.Now; + entity.CheckStatus = "0"; + meetingManagementIBLL.SaveEntity(this.userInfo, parameter.keyValue, entity); + return Success("保存成功!"); + } + #endregion + + #region 私有类 + + /// + /// 表单实体类 + /// + private class ReqFormEntity + { + public string keyValue { get; set; } + public string strEntity { get; set; } + } + #endregion + + } +} 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 new file mode 100644 index 000000000..ca8a9ee4f --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/PersonnelManagement/MeetingMinutesApi.cs @@ -0,0 +1,117 @@ +using Nancy; +using Learun.Util; +using System.Collections.Generic; +using Learun.Application.TwoDevelopment.PersonnelManagement; + +namespace Learun.Application.WebApi +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-03-08 10:36 + /// 描 述:会议纪要 + /// + public class MeetingMinutesApi : BaseApi + { + private MeetingMinutesIBLL meetingMinutesIBLL = new MeetingMinutesBLL(); + + /// + /// 注册接口 + /// + public MeetingMinutesApi() + : base("/Learun/adms/PersonnelManagement/MeetingMinutes") + { + Get["/pagelist"] = GetPageList; + Get["/list"] = GetList; + Get["/form"] = GetForm; + Post["/delete"] = DeleteForm; + Post["/save"] = SaveForm; + } + #region 获取数据 + + /// + /// 获取页面显示列表分页数据 + /// + /// + /// + public Response GetPageList(dynamic _) + { + ReqPageParam parameter = this.GetReqData(); + 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); + } + /// + /// 获取页面显示列表数据 + /// + /// + /// + public Response GetList(dynamic _) + { + string queryJson = this.GetReqData(); + var data = meetingMinutesIBLL.GetList(queryJson); + return Success(data); + } + /// + /// 获取表单数据 + /// + /// + /// + public Response GetForm(dynamic _) + { + string keyValue = this.GetReqData(); + var MeetingMinutesData = meetingMinutesIBLL.GetMeetingMinutesEntity( keyValue ); + var jsonData = new { + MeetingMinutes = MeetingMinutesData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// + /// + public Response DeleteForm(dynamic _) + { + string keyValue = this.GetReqData(); + meetingMinutesIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// + /// + public Response SaveForm(dynamic _) + { + ReqFormEntity parameter = this.GetReqData(); + MeetingMinutesEntity entity = parameter.strEntity.ToObject(); + meetingMinutesIBLL.SaveEntity(this.userInfo,parameter.keyValue,entity); + return Success("保存成功!"); + } + #endregion + + #region 私有类 + + /// + /// 表单实体类 + /// + private class ReqFormEntity { + public string keyValue { get; set; } + public string strEntity{ get; set; } + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/PersonnelManagement/MeetingSignInRecordApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/PersonnelManagement/MeetingSignInRecordApi.cs new file mode 100644 index 000000000..6d37ff6b2 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/PersonnelManagement/MeetingSignInRecordApi.cs @@ -0,0 +1,135 @@ +using Nancy; +using Learun.Util; +using System.Collections.Generic; +using Learun.Application.TwoDevelopment.PersonnelManagement; +namespace Learun.Application.WebApi +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-02-21 10:16 + /// 描 述:会议签到记录 + /// + public class MeetingSignInRecordApi : BaseApi + { + private MeetingSignInRecordIBLL meetingSignInRecordIBLL = new MeetingSignInRecordBLL(); + + /// + /// 注册接口 + /// + 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 获取数据 + + /// + /// 获取页面显示列表分页数据 + /// + /// + /// + public Response GetPageList(dynamic _) + { + ReqPageParam parameter = this.GetReqData(); + 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); + } + /// + /// 获取页面显示列表数据 + /// + /// + /// + public Response GetList(dynamic _) + { + string queryJson = this.GetReqData(); + var data = meetingSignInRecordIBLL.GetList(queryJson); + return Success(data); + } + /// + /// 获取表单数据 + /// + /// + /// + public Response GetForm(dynamic _) + { + string keyValue = this.GetReqData(); + var MeetingSignInRecordData = meetingSignInRecordIBLL.GetMeetingSignInRecordEntity( keyValue ); + var jsonData = new { + MeetingSignInRecord = MeetingSignInRecordData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// + /// + public Response DeleteForm(dynamic _) + { + string keyValue = this.GetReqData(); + meetingSignInRecordIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + + /// + /// 会议扫码签到 + /// + /// + /// + public Response Scan(dynamic _) + { + ScanParam scanParam = this.GetReqData(); + var result= meetingSignInRecordIBLL.Scan(scanParam.userid,scanParam.meetid)?"签到成功":"签到失败"; + return Success(new {result}); + } + /// + /// 保存实体数据(新增、修改) + /// + /// + /// + public Response SaveForm(dynamic _) + { + ReqFormEntity parameter = this.GetReqData(); + MeetingSignInRecordEntity entity = parameter.strEntity.ToObject(); + meetingSignInRecordIBLL.SaveEntity(this.userInfo,parameter.keyValue,entity); + return Success("保存成功!"); + } + #endregion + + #region 私有类 + + /// + /// 表单实体类 + /// + 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 + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Form/Scheme/FormSchemeIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Form/Scheme/FormSchemeIBLL.cs index 571d48c9d..72444597a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Form/Scheme/FormSchemeIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Form/Scheme/FormSchemeIBLL.cs @@ -137,5 +137,7 @@ namespace Learun.Application.Form /// 数据主键值 void DeleteInstanceForm(string schemeInfoId, string keyValue); #endregion + + Dictionary GetFolderKey(string itemSchemeInfoId, string itemProcessIdName, string itemKeyValue); } } 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; }