Переглянути джерело

Merge branch '娄底高职分支' of http://123.57.209.16:3000/bjquanjiang/DigitalScholl into 娄底高职分支

娄底高职分支
杨晓琪 2 роки тому
джерело
коміт
5e9557f00c
18 змінених файлів з 1139 додано та 245 видалено
  1. +12
    -12
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/MeetingManagementController.cs
  2. +4
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  3. +3
    -0
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj
  4. +186
    -130
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/AnnexesApiWx.cs
  5. +60
    -9
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/FormApi.cs
  6. +123
    -0
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/PersonnelManagement/MeetingManagementApi.cs
  7. +117
    -0
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/PersonnelManagement/MeetingMinutesApi.cs
  8. +135
    -0
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/PersonnelManagement/MeetingSignInRecordApi.cs
  9. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Form/Scheme/FormSchemeIBLL.cs
  10. +4
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj
  11. +0
    -25
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementBLL.cs
  12. +0
    -6
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementIBLL.cs
  13. +0
    -49
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementService.cs
  14. +149
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingMinutes/MeetingMinutesBLL.cs
  15. +78
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingMinutes/MeetingMinutesEntity.cs
  16. +56
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingMinutes/MeetingMinutesIBLL.cs
  17. +198
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingMinutes/MeetingMinutesService.cs
  18. +12
    -14
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingSignInRecord/MeetingSignInRecordService.cs

+ 12
- 12
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);
}
/// <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>


+ 4
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj Переглянути файл

@@ -1224,6 +1224,7 @@
<Content Include="Areas\EducationalAdministration\Views\TeachPlan\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\TeachSwitch\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\TeachSwitch\Index.js" />
<Content Include="Areas\LogisticsManagement\Views\Accommodation\ClearForm.js" />
<Content Include="Areas\LogisticsManagement\Views\Accommodation\FormClassify.js" />
<Content Include="Areas\LogisticsManagement\Views\Accommodation\FormBed.js" />
<Content Include="Areas\LogisticsManagement\Views\Accommodation\FormRoom.js" />
@@ -1234,6 +1235,7 @@
<Content Include="Areas\LogisticsManagement\Views\Accommodation\IndexClassify.js" />
<Content Include="Areas\LogisticsManagement\Views\Accommodation\IndexBed.js" />
<Content Include="Areas\LogisticsManagement\Views\Accommodation\IndexDistribution.js" />
<Content Include="Areas\LogisticsManagement\Views\Accommodation\IndexImport.js" />
<Content Include="Areas\LogisticsManagement\Views\ADR_Record\AttendanceReportByWeek.js" />
<Content Include="Areas\LogisticsManagement\Views\ADR_Record\StatisticDetailIndex.js" />
<Content Include="Areas\LogisticsManagement\Views\ADR_Record\StatisticIndex.js" />
@@ -7536,6 +7538,8 @@
<Content Include="Areas\LR_Desktop\Views\EnrollTemplate\IndexPersonnel.cshtml" />
<Content Include="Areas\LR_Desktop\Views\EnrollData\IndexPersonnel.cshtml" />
<Content Include="Content\excel\AccommodationImport.xls" />
<Content Include="Areas\LogisticsManagement\Views\Accommodation\IndexImport.cshtml" />
<Content Include="Areas\LogisticsManagement\Views\Accommodation\ClearForm.cshtml" />
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" />
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" />
<Content Include="Views\Login\Default-beifen.cshtml" />


+ 3
- 0
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj Переглянути файл

@@ -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" />


+ 186
- 130
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();

/// <summary>
/// 获取附件列表
/// </summary>
/// <param name="_"></param>
/// <returns></returns>
public Response WxGetList(dynamic _)
{
var keyValue = this.GetReqData();
var list = annexesFileIBLL.GetList(keyValue);

return Success(list);
}

/// <summary>
/// 上传附件图片文件
/// <summary>
/// <returns></returns>
public Response WxUpload(dynamic _)
{
var files = (List<HttpFile>)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);
}

/// <summary>
/// 上传附件图片文件【移动端app2.0,单独页面中的附件图片上传使用方法】
/// <summary>
/// <returns></returns>
public Response WxUploadInSingle(dynamic _)
{
var files = (List<HttpFile>)this.Context.Request.Files;
var folderId = this.GetReq<FileModel>().folderId;
var name = this.GetReq<FileModel>().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);
}

/// <summary>
/// 获取文件信息
/// </summary>
/// <param name="_"></param>
/// <returns></returns>
public Response WxFileInfo(dynamic _)
{
var fileId = this.GetReqData();
var fileEntity = annexesFileIBLL.GetEntity(fileId);

return Success(fileEntity);
}

/// <summary>
/// 删除文件
/// </summary>
/// <param name="_"></param>
/// <returns></returns>
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("删除成功");
}

/// <summary>
/// 下载文件,微信小程序用
///
/// 微信小程序可以预览图片、文档
/// 支持的图片格式:.jpg .png .webp .gif
/// 支持的文档格式:.doc(x) .xls(x) .ppt(x) .pdf
///
/// 对于其他格式的文件,微信小程序官方未提供打开或预览的 API,文件对用户来说不可访问
/// </summary>
/// <param name="_"></param>
/// <returns></returns>
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();

/// <summary>
/// 获取附件列表
/// </summary>
/// <param name="_"></param>
/// <returns></returns>
public Response WxGetList(dynamic _)
{
var keyValue = this.GetReqData();
var list = annexesFileIBLL.GetList(keyValue);

return Success(list);
}

/// <summary>
/// 上传附件图片文件
/// <summary>
/// <returns></returns>
public Response WxUpload(dynamic _)
{
var files = (List<HttpFile>)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);
}

/// <summary>
/// 获取文件信息
/// </summary>
/// <param name="_"></param>
/// <returns></returns>
public Response WxFileInfo(dynamic _)
{
var fileId = this.GetReqData();
var fileEntity = annexesFileIBLL.GetEntity(fileId);

return Success(fileEntity);
}

/// <summary>
/// 删除文件
/// </summary>
/// <param name="_"></param>
/// <returns></returns>
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("删除成功");
}

/// <summary>
/// 下载文件,微信小程序用
///
/// 微信小程序可以预览图片、文档
/// 支持的图片格式:.jpg .png .webp .gif
/// 支持的文档格式:.doc(x) .xls(x) .ppt(x) .pdf
///
/// 对于其他格式的文件,微信小程序官方未提供打开或预览的 API,文件对用户来说不可访问
/// </summary>
/// <param name="_"></param>
/// <returns></returns>
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("");
}
}
}

+ 60
- 9
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/FormApi.cs Переглянути файл

@@ -11,7 +11,7 @@ namespace Learun.Application.WebApi.Modules
/// 日 期:2018.01.03
/// 描 述:自定义表单处理接口
/// </summary>
public class FormApi: BaseApi
public class FormApi : BaseApi
{
/// <summary>
/// 注册接口
@@ -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<SchemeReq> req = this.GetReqData<List<SchemeReq>>();// 获取模板请求数据
Dictionary<string,FormSchemeEntity> schemeList = new Dictionary<string,FormSchemeEntity>();
foreach (var item in req) {
Dictionary<string, FormSchemeEntity> schemeList = new Dictionary<string, FormSchemeEntity>();
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);

}

/// <summary>
/// 上传文件夹ID
/// </summary>
/// <param name="_"></param>
/// <returns></returns>
private Response GetFolderkey(dynamic _)
{
List<FolderKeyReq> req = this.GetReqData<List<FolderKeyReq>>();// 获取模板请求数据
Dictionary<string, string> dic = new Dictionary<string, string>();
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);
}

/// <summary>
/// 保存表单数据
@@ -104,7 +126,36 @@ namespace Learun.Application.WebApi.Modules
}

#region 请求参数
private class SchemeReq {

private class FolderKeyReq
{
/// <summary>
/// 表单请求Id
/// </summary>
public string id { get; set; }
/// <summary>
/// 当前自定义表单版本号
/// </summary>
public string ver { get; set; }
/// <summary>
/// 流程模板id
/// </summary>
public string schemeInfoId { get; set; }
/// <summary>
/// 关联字段名称
/// </summary>
public string processIdName { get; set; }
/// <summary>
/// 数据主键值
/// </summary>
public string keyValue { get; set; }
/// <summary>
/// 表单数据
/// </summary>
public string formData { get; set; }
}
private class SchemeReq
{
/// <summary>
/// 表单请求Id
/// </summary>
@@ -141,8 +192,8 @@ namespace Learun.Application.WebApi.Modules
#endregion
}





}

+ 123
- 0
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
{
/// <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

}
}

+ 117
- 0
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
{
/// <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

}
}

+ 135
- 0
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
{
/// <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

}
}

+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Form/Scheme/FormSchemeIBLL.cs Переглянути файл

@@ -137,5 +137,7 @@ namespace Learun.Application.Form
/// <param name="keyValue">数据主键值</param>
void DeleteInstanceForm(string schemeInfoId, string keyValue);
#endregion

Dictionary<string, string> GetFolderKey(string itemSchemeInfoId, string itemProcessIdName, string itemKeyValue);
}
}

+ 4
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj Переглянути файл

@@ -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" />


+ 0
- 25
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
}
}
}

/// <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 提交数据


+ 0
- 6
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
/// <summary>
/// <returns></returns>
MeetingManagementEntity GetMeetingManagementEntityByProcessId(string processId);
/// <summary>
/// 获取报表数据
/// </summary>
/// <param name="queryJson"></param>
/// <returns></returns>
DataTable GetStatisticList(string queryJson);
#endregion

#region 提交数据


+ 0
- 49
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
}
}

/// <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 提交数据


+ 149
- 0
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
{
/// <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

}
}

+ 78
- 0
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
{
/// <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
}
}


+ 56
- 0
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
{
/// <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

}
}

+ 198
- 0
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
{
/// <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

}
}

+ 12
- 14
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<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;

}


Завантаження…
Відмінити
Зберегти