This commit is contained in:
2026-06-03 10:33:39 +08:00
parent ed38ad5e46
commit 09d703a8d0
3 changed files with 58 additions and 5 deletions
+38 -5
View File
@@ -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>
/// 获取发卡人员