11
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
using BLL;
|
||||
using Model;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using SgManager.AI;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web.Http;
|
||||
using SgManager.AI;
|
||||
using System.Configuration;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Newtonsoft.Json;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web.Http;
|
||||
|
||||
namespace WebAPI.Controllers
|
||||
{
|
||||
@@ -778,8 +780,39 @@ namespace WebAPI.Controllers
|
||||
}
|
||||
return responeData;
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public Model.ResponeData getPersonInOut([FromBody] List<Model.APIItem.PersonInOutItem> personInOutItem)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
if (personInOutItem.Count > 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
foreach (var item in personInOutItem)
|
||||
{
|
||||
Task task = Task.Run(() =>
|
||||
{
|
||||
APIDoorServerService.SaveDoorInOutRecord(item.projectId, item.idCard, item.isIn, item.changeTime, "白名单");
|
||||
Task.Delay(1000).Wait(); // 模拟异步操作
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
}
|
||||
return responeData;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
#region 获取发卡人员
|
||||
/// <summary>
|
||||
/// 获取发卡人员
|
||||
|
||||
Reference in New Issue
Block a user