Browse Source

我的会议-app签到提醒优化

应县
ndbs 1 year ago
parent
commit
a61e0773e1
4 changed files with 33 additions and 22 deletions
  1. +11
    -9
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/PersonnelManagement/MeetingSignInRecordApi.cs
  2. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingSignInRecord/MeetingSignInRecordBLL.cs
  3. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingSignInRecord/MeetingSignInRecordIBLL.cs
  4. +20
    -11
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingSignInRecord/MeetingSignInRecordService.cs

+ 11
- 9
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/PersonnelManagement/MeetingSignInRecordApi.cs View File

@@ -67,8 +67,9 @@ namespace Learun.Application.WebApi
public Response GetForm(dynamic _)
{
string keyValue = this.GetReqData();
var MeetingSignInRecordData = meetingSignInRecordIBLL.GetMeetingSignInRecordEntity( keyValue );
var jsonData = new {
var MeetingSignInRecordData = meetingSignInRecordIBLL.GetMeetingSignInRecordEntity(keyValue);
var jsonData = new
{
MeetingSignInRecord = MeetingSignInRecordData,
};
return Success(jsonData);
@@ -87,8 +88,8 @@ namespace Learun.Application.WebApi
string keyValue = this.GetReqData();
meetingSignInRecordIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}
}
/// <summary>
/// 会议扫码签到
/// <param name="_"></param>
@@ -97,8 +98,8 @@ namespace Learun.Application.WebApi
public Response Scan(dynamic _)
{
ScanParam scanParam = this.GetReqData<ScanParam>();
var result= meetingSignInRecordIBLL.Scan(scanParam.userid,scanParam.meetid)?"签到成功":"签到失败";
return Success(new {result});
var result = meetingSignInRecordIBLL.Scan(scanParam.userid, scanParam.meetid);
return Success(new { result });
}
/// <summary>
/// 保存实体数据(新增、修改)
@@ -109,7 +110,7 @@ namespace Learun.Application.WebApi
{
ReqFormEntity parameter = this.GetReqData<ReqFormEntity>();
MeetingSignInRecordEntity entity = parameter.strEntity.ToObject<MeetingSignInRecordEntity>();
meetingSignInRecordIBLL.SaveEntity(this.userInfo,parameter.keyValue,entity);
meetingSignInRecordIBLL.SaveEntity(this.userInfo, parameter.keyValue, entity);
return Success("保存成功!");
}
#endregion
@@ -119,9 +120,10 @@ namespace Learun.Application.WebApi
/// <summary>
/// 表单实体类
/// <summary>
private class ReqFormEntity {
private class ReqFormEntity
{
public string keyValue { get; set; }
public string strEntity{ get; set; }
public string strEntity { get; set; }
}

private class ScanParam


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingSignInRecord/MeetingSignInRecordBLL.cs View File

@@ -167,7 +167,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
}
}

public bool Scan(string scanParamUserid, string scanParamMeetid)
public string Scan(string scanParamUserid, string scanParamMeetid)
{
try
{


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingSignInRecord/MeetingSignInRecordIBLL.cs View File

@@ -59,6 +59,6 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
void DoSignIn(string keyValue, bool isSignIn);
#endregion

bool Scan(string scanParamUserid, string scanParamMeetid);
string Scan(string scanParamUserid, string scanParamMeetid);
}
}

+ 20
- 11
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingSignInRecord/MeetingSignInRecordService.cs View File

@@ -216,26 +216,35 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement

#endregion

public bool Scan(string scanParamUserid, string scanParamMeetid)
public string Scan(string scanParamUserid, string scanParamMeetid)
{
try
{
var result = false;
var meetEntity = this.BaseRepository("CollegeMIS")
.FindEntity<MeetingSignInRecordEntity>(a =>
a.MeetID == scanParamMeetid && a.ParticipantID == scanParamUserid);
var result = "";
var meetEntity = this.BaseRepository("CollegeMIS").FindEntity<MeetingSignInRecordEntity>(a => a.MeetID == scanParamMeetid && a.ParticipantID == scanParamUserid);
var date = DateTime.Now;
var meetEntityList = this.BaseRepository("CollegeMIS")
.FindEntity<MeetingManagementEntity>(x => x.Id == scanParamMeetid);
var beginTime = meetEntityList.BeginTime;
if (meetEntityList != null && beginTime > date)
if (meetEntityList != null)
{
meetEntity.IsSignIn = true;
meetEntity.SignInTime = DateTime.Now;
this.BaseRepository("CollegeMIS").Update(meetEntity);
result = true;
}
if (beginTime > date)
{
meetEntity.IsSignIn = true;
meetEntity.SignInTime = DateTime.Now;
this.BaseRepository("CollegeMIS").Update(meetEntity);
result = "签到成功";
}
else
{
result = "签到失败!!!会议已开始";
}

}
else
{
result = "签到失败";
}
return result;

}


Loading…
Cancel
Save