20210720
This commit is contained in:
parent
b3d23a52d9
commit
7700a66999
|
@ -0,0 +1,45 @@
|
||||||
|
ALTER VIEW [dbo].[View_SitePerson_Checking]
|
||||||
|
AS
|
||||||
|
/*ÈËÔ±¿¼ÇÚÊÓͼ*/
|
||||||
|
SELECT ch.CheckingId,person.CardNo,ch.ProjectId,person.IdentityCard,ch.WorkAreaId,ch.IntoOutTime,ch.IntoOut,
|
||||||
|
ch.[Address],ch.WorkAreaName,person.PersonName,person.UnitId,unit.UnitName,ch.States
|
||||||
|
from dbo.SitePerson_Checking ch
|
||||||
|
left join dbo.SitePerson_Person person on ch.PersonId=person.PersonId
|
||||||
|
left join dbo.Base_Unit unit on person.UnitId=unit.UnitId
|
||||||
|
|
||||||
|
|
||||||
|
GO
|
||||||
|
|
||||||
|
UPDATE SitePerson_Checking SET IntoOut=0 WHERE IntoOut !=1
|
||||||
|
GO
|
||||||
|
/****** Object: Index [NonClusteredIndex-20210720-112756] Script Date: 2021/7/20 11:31:47 ******/
|
||||||
|
CREATE NONCLUSTERED INDEX [NonClusteredIndex-20210720-112756] ON [dbo].[t_d_facerecord]
|
||||||
|
(
|
||||||
|
[ProjectId] ASC,
|
||||||
|
[EmployNO] ASC,
|
||||||
|
[RoleID] ASC,
|
||||||
|
[DateTimeRecord] ASC
|
||||||
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||||
|
GO
|
||||||
|
|
||||||
|
/****** Object: Index [NonClusteredIndex-20210720-113607] Script Date: 2021/7/20 11:36:59 ******/
|
||||||
|
CREATE NONCLUSTERED INDEX [NonClusteredIndex-20210720-113607] ON [dbo].[t_d_EmployInOutRecord]
|
||||||
|
(
|
||||||
|
[ProjectId] ASC,
|
||||||
|
[RecordDate] ASC,
|
||||||
|
[IDCardNo] ASC
|
||||||
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||||
|
GO
|
||||||
|
|
||||||
|
/****** Object: Index [SitePerson_PersonInOut_PersonIdChangeTime] Script Date: 2021/7/20 11:38:07 ******/
|
||||||
|
DROP INDEX [SitePerson_PersonInOut_PersonIdChangeTime] ON [dbo].[SitePerson_PersonInOut]
|
||||||
|
GO
|
||||||
|
|
||||||
|
/****** Object: Index [SitePerson_PersonInOut_PersonIdChangeTime] Script Date: 2021/7/20 11:38:07 ******/
|
||||||
|
CREATE NONCLUSTERED INDEX [SitePerson_PersonInOut_PersonIdChangeTime] ON [dbo].[SitePerson_PersonInOut]
|
||||||
|
(
|
||||||
|
[ProjectId] ASC,
|
||||||
|
[PersonId] ASC,
|
||||||
|
[ChangeTime] ASC
|
||||||
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||||
|
GO
|
|
@ -380,7 +380,7 @@ GO
|
||||||
GO
|
GO
|
||||||
|
|
||||||
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
||||||
VALUES('12F7123B-C2ED-4011-9859-83260AC91F09','现场人员考勤管理','HSSE/SitePerson/PersonInfo.aspx',50,'EE260447-028F-46AF-8864-9A5DC9DAA5BD','Menu_HSSE',0,1,1)
|
VALUES('12F7123B-C2ED-4011-9859-83260AC91F09','现场人员手动考勤','HSSE/SitePerson/PersonInfo.aspx',50,'EE260447-028F-46AF-8864-9A5DC9DAA5BD','Menu_HSSE',0,1,1)
|
||||||
GO
|
GO
|
||||||
--现场人员考勤管理按钮
|
--现场人员考勤管理按钮
|
||||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||||
|
|
|
@ -0,0 +1,68 @@
|
||||||
|
using EmitMapper;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
namespace BLL
|
||||||
|
{
|
||||||
|
public static class APIDoorServerService
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 保存 出入记录
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="projectId">项目ID</param>
|
||||||
|
/// <param name="idCard">身份证号码</param>
|
||||||
|
/// <param name="isIn">1进0出</param>
|
||||||
|
/// <param name="changeTime">进出时间</param>
|
||||||
|
/// <param name="changeTime">进出方式</param>
|
||||||
|
public static void SaveDoorInOutRecord(string projectId, string idCard, int isIn, DateTime changeTime, string Intype)
|
||||||
|
{
|
||||||
|
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||||
|
{
|
||||||
|
int maxId = 0;
|
||||||
|
var getmax = db.T_d_facerecord.Where(x => x.ProjectId == projectId && x.RoleID == Intype).Select(x => x.ID);
|
||||||
|
if (getmax.Count() > 0)
|
||||||
|
{
|
||||||
|
maxId = getmax.Max() + 1;
|
||||||
|
}
|
||||||
|
string name = string.Empty;
|
||||||
|
var getPerson = db.SitePerson_Person.FirstOrDefault(x => x.IdentityCard == idCard && x.ProjectId ==projectId);
|
||||||
|
if (getPerson != null)
|
||||||
|
{
|
||||||
|
name = getPerson.PersonName;
|
||||||
|
}
|
||||||
|
|
||||||
|
Model.T_d_facerecord newFacerecord = new Model.T_d_facerecord()
|
||||||
|
{
|
||||||
|
NewID = SQLHelper.GetNewID(),
|
||||||
|
ProjectId = projectId,
|
||||||
|
ID = maxId + 1,
|
||||||
|
EmployName = name,
|
||||||
|
EmployNO = idCard,
|
||||||
|
RoleID = Intype,
|
||||||
|
DateTimeRecord = changeTime,
|
||||||
|
RecordDes = Intype,
|
||||||
|
InOrOut = (isIn == 1 ? "进门" : "出门"),
|
||||||
|
};
|
||||||
|
|
||||||
|
db.T_d_facerecord.InsertOnSubmit(newFacerecord);
|
||||||
|
db.SubmitChanges();
|
||||||
|
///// 根据出入记录 写入考勤记录
|
||||||
|
Model.t_d_facerecordItem facerecord = new Model.t_d_facerecordItem
|
||||||
|
{
|
||||||
|
ID = maxId + 1,
|
||||||
|
EmployName = name,
|
||||||
|
IDCardNo = idCard,
|
||||||
|
EmployNO = idCard,
|
||||||
|
ProjectId = projectId,
|
||||||
|
RoleID = Intype,
|
||||||
|
DateTimeRecord = changeTime,
|
||||||
|
RecordDes = Intype,
|
||||||
|
InOrOut = (isIn == 1 ? "进门" : "出门"),
|
||||||
|
};
|
||||||
|
DoorServerService.InsertEmployInOutRecord(facerecord);
|
||||||
|
}
|
||||||
|
APIPersonService.getPersonInOut(projectId, idCard, isIn, changeTime);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -91,6 +91,7 @@
|
||||||
<Compile Include="API\APIProjectService.cs" />
|
<Compile Include="API\APIProjectService.cs" />
|
||||||
<Compile Include="API\APIUnitService.cs" />
|
<Compile Include="API\APIUnitService.cs" />
|
||||||
<Compile Include="API\APIUpLoadFileService.cs" />
|
<Compile Include="API\APIUpLoadFileService.cs" />
|
||||||
|
<Compile Include="API\APIDoorServerService.cs" />
|
||||||
<Compile Include="API\APIUserService.cs" />
|
<Compile Include="API\APIUserService.cs" />
|
||||||
<Compile Include="API\HJGL\APIHotProcessHardService.cs" />
|
<Compile Include="API\HJGL\APIHotProcessHardService.cs" />
|
||||||
<Compile Include="API\HJGL\APINDETrustService.cs" />
|
<Compile Include="API\HJGL\APINDETrustService.cs" />
|
||||||
|
|
|
@ -27,7 +27,7 @@ namespace BLL
|
||||||
private static IQueryable<Model.T_d_facerecord> qq = from x in db.T_d_facerecord
|
private static IQueryable<Model.T_d_facerecord> qq = from x in db.T_d_facerecord
|
||||||
orderby x.DateTimeRecord descending
|
orderby x.DateTimeRecord descending
|
||||||
select x;
|
select x;
|
||||||
private static IQueryable<Model.T_d_validcardevent> qq1= from x in db.T_d_validcardevent
|
private static IQueryable<Model.T_d_validcardevent> qq1 = from x in db.T_d_validcardevent
|
||||||
orderby x.RecordDateTime descending
|
orderby x.RecordDateTime descending
|
||||||
select x;
|
select x;
|
||||||
|
|
||||||
|
@ -75,14 +75,14 @@ namespace BLL
|
||||||
x.ProjectId,
|
x.ProjectId,
|
||||||
x.EmployName,
|
x.EmployName,
|
||||||
x.DepartmentID,
|
x.DepartmentID,
|
||||||
DepartName=x.DepartmentName,
|
DepartName = x.DepartmentName,
|
||||||
x.AreaID,
|
x.AreaID,
|
||||||
x.AreaName,
|
x.AreaName,
|
||||||
x.EmployNO,
|
x.EmployNO,
|
||||||
CardID=x.CardNO,
|
CardID = x.CardNO,
|
||||||
DateTimeRecord=x.RecordDateTime,
|
DateTimeRecord = x.RecordDateTime,
|
||||||
RecordDes=x.RecordAll,
|
RecordDes = x.RecordAll,
|
||||||
InOrOut=(x.InOrOut ==2? "出门" : "进门"),
|
InOrOut = (x.InOrOut == 2 ? "出门" : "进门"),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -92,9 +92,13 @@ namespace BLL
|
||||||
{
|
{
|
||||||
q = q.Where(e => e.RoleID == "微信端");
|
q = q.Where(e => e.RoleID == "微信端");
|
||||||
}
|
}
|
||||||
|
else if (type == "3")
|
||||||
|
{
|
||||||
|
q = q.Where(e => e.RoleID == "手动");
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
q = q.Where(e => e.RoleID != "微信端");
|
q = q.Where(e => e.RoleID == "白名单");
|
||||||
}
|
}
|
||||||
if (!string.IsNullOrEmpty(startDate))
|
if (!string.IsNullOrEmpty(startDate))
|
||||||
{
|
{
|
||||||
|
|
|
@ -44,6 +44,12 @@ namespace BLL
|
||||||
|
|
||||||
db.SitePerson_Checking.InsertOnSubmit(newPersonInfo);
|
db.SitePerson_Checking.InsertOnSubmit(newPersonInfo);
|
||||||
db.SubmitChanges();
|
db.SubmitChanges();
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(personInfo.ProjectId) && !string.IsNullOrEmpty(personInfo.IdentityCard) && personInfo.IntoOutTime.HasValue)
|
||||||
|
{
|
||||||
|
int inOut = personInfo.IntoOut == "1" ? 1 : 0;
|
||||||
|
APIDoorServerService.SaveDoorInOutRecord(personInfo.ProjectId, personInfo.IdentityCard, inOut, personInfo.IntoOutTime.Value, "手动");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -53,7 +59,9 @@ namespace BLL
|
||||||
public static void UpdatePersonInfo(Model.SitePerson_Checking personInfo)
|
public static void UpdatePersonInfo(Model.SitePerson_Checking personInfo)
|
||||||
{
|
{
|
||||||
Model.SGGLDB db = Funs.DB;
|
Model.SGGLDB db = Funs.DB;
|
||||||
Model.SitePerson_Checking newPersonInfo = db.SitePerson_Checking.First(e => e.CheckingId == personInfo.CheckingId);
|
Model.SitePerson_Checking newPersonInfo = db.SitePerson_Checking.FirstOrDefault(e => e.CheckingId == personInfo.CheckingId);
|
||||||
|
if (newPersonInfo != null)
|
||||||
|
{
|
||||||
newPersonInfo.CardNo = personInfo.CardNo;
|
newPersonInfo.CardNo = personInfo.CardNo;
|
||||||
newPersonInfo.PersonId = personInfo.PersonId;
|
newPersonInfo.PersonId = personInfo.PersonId;
|
||||||
newPersonInfo.ProjectId = personInfo.ProjectId;
|
newPersonInfo.ProjectId = personInfo.ProjectId;
|
||||||
|
@ -66,6 +74,7 @@ namespace BLL
|
||||||
|
|
||||||
db.SubmitChanges();
|
db.SubmitChanges();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 根据卡号和时间查询人员考勤信息
|
/// 根据卡号和时间查询人员考勤信息
|
||||||
|
|
|
@ -49,11 +49,12 @@
|
||||||
</f:Toolbar>
|
</f:Toolbar>
|
||||||
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
|
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
|
||||||
<Items>
|
<Items>
|
||||||
<f:RadioButtonList runat="server" ID="rbCheckType" Width="210px" LabelWidth="0px"
|
<f:RadioButtonList runat="server" ID="rbCheckType" Width="300px" LabelWidth="0px"
|
||||||
AutoPostBack="true" OnSelectedIndexChanged="btnSearch_Click">
|
AutoPostBack="true" OnSelectedIndexChanged="btnSearch_Click">
|
||||||
<f:RadioItem Value="0" Text="人脸" Selected="true" />
|
<f:RadioItem Value="0" Text="人脸" Selected="true" />
|
||||||
<f:RadioItem Value="1" Text="刷卡" />
|
<f:RadioItem Value="1" Text="刷卡" />
|
||||||
<f:RadioItem Value="2" Text="微信端" />
|
<f:RadioItem Value="2" Text="微信端" />
|
||||||
|
<f:RadioItem Value="3" Text="手动" />
|
||||||
</f:RadioButtonList>
|
</f:RadioButtonList>
|
||||||
</Items>
|
</Items>
|
||||||
</f:Toolbar>
|
</f:Toolbar>
|
||||||
|
|
|
@ -77,7 +77,7 @@
|
||||||
SortField="EmployName" FieldType="String" HeaderText="姓名" HeaderTextAlign="Center"
|
SortField="EmployName" FieldType="String" HeaderText="姓名" HeaderTextAlign="Center"
|
||||||
TextAlign="Left">
|
TextAlign="Left">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:RenderField Width="150px" ColumnID="IDCardNo" DataField="IDCardNo"
|
<f:RenderField Width="170px" ColumnID="IDCardNo" DataField="IDCardNo"
|
||||||
SortField="IDCardNo" FieldType="String" HeaderText="身份证" HeaderTextAlign="Center"
|
SortField="IDCardNo" FieldType="String" HeaderText="身份证" HeaderTextAlign="Center"
|
||||||
TextAlign="Left">
|
TextAlign="Left">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 38 KiB |
Binary file not shown.
After Width: | Height: | Size: 8.4 KiB |
Binary file not shown.
After Width: | Height: | Size: 37 KiB |
|
@ -64,7 +64,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||||
this.drpUnit.Enabled = false;
|
this.drpUnit.Enabled = false;
|
||||||
}
|
}
|
||||||
this.txtStartDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now.AddMonths(-1));
|
this.txtStartDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now.AddMonths(-1));
|
||||||
this.txtEndDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
|
this.txtEndDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now.AddDays(1));
|
||||||
// 绑定表格
|
// 绑定表格
|
||||||
BindGrid();
|
BindGrid();
|
||||||
}
|
}
|
||||||
|
@ -307,17 +307,13 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||||
{
|
{
|
||||||
if (intoOut != null)
|
if (intoOut != null)
|
||||||
{
|
{
|
||||||
if (intoOut.ToString() == "True")
|
if (intoOut.ToString() == "1")
|
||||||
{
|
{
|
||||||
return "进场";
|
return "进场";
|
||||||
}
|
}
|
||||||
else if (intoOut.ToString() == "False")
|
|
||||||
{
|
|
||||||
return "出场";
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return "";
|
return "出场";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
|
|
|
@ -70,12 +70,12 @@
|
||||||
</f:Grid>
|
</f:Grid>
|
||||||
</PopPanel>
|
</PopPanel>
|
||||||
</f:DropDownBox>
|
</f:DropDownBox>
|
||||||
|
<f:TextBox ID="txtIdCard" Label="身份证号码" Readonly="true" runat="server" ></f:TextBox>
|
||||||
</Items>
|
</Items>
|
||||||
</f:FormRow>
|
</f:FormRow>
|
||||||
<f:FormRow ColumnWidths="40% 25% 35%">
|
<f:FormRow ColumnWidths="40% 25% 35%">
|
||||||
<Items>
|
<Items>
|
||||||
<f:TextBox ID="txtWorkArea" runat="server" Label="单位工程" MaxLength="100" ShowRedStar="true"
|
<f:TextBox ID="txtWorkArea" runat="server" Label="单位工程" MaxLength="100" LabelAlign="Right">
|
||||||
Required="true" LabelAlign="Right">
|
|
||||||
</f:TextBox>
|
</f:TextBox>
|
||||||
<f:DropDownList ID="drpWorkArea" runat="server" AutoPostBack="true" OnSelectedIndexChanged="drpWorkArea_SelectedIndexChanged">
|
<f:DropDownList ID="drpWorkArea" runat="server" AutoPostBack="true" OnSelectedIndexChanged="drpWorkArea_SelectedIndexChanged">
|
||||||
</f:DropDownList>
|
</f:DropDownList>
|
||||||
|
@ -95,7 +95,7 @@
|
||||||
</f:Label>--%>
|
</f:Label>--%>
|
||||||
<f:DropDownList ID="drpType" runat="server" Label="进出时间">
|
<f:DropDownList ID="drpType" runat="server" Label="进出时间">
|
||||||
<f:ListItem Value="1" Text="入场时间" />
|
<f:ListItem Value="1" Text="入场时间" />
|
||||||
<f:ListItem Value="2" Text="出场时间" />
|
<f:ListItem Value="0" Text="出场时间" />
|
||||||
</f:DropDownList>
|
</f:DropDownList>
|
||||||
<f:DatePicker ID="txtTime" runat="server" >
|
<f:DatePicker ID="txtTime" runat="server" >
|
||||||
</f:DatePicker>
|
</f:DatePicker>
|
||||||
|
|
|
@ -102,6 +102,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||||
var person = BLL.PersonService.GetPersonById(this.drpPersonId.Value);
|
var person = BLL.PersonService.GetPersonById(this.drpPersonId.Value);
|
||||||
if (person != null)
|
if (person != null)
|
||||||
{
|
{
|
||||||
|
this.txtIdCard.Text = person.IdentityCard;
|
||||||
if (!string.IsNullOrEmpty(person.WorkAreaId))
|
if (!string.IsNullOrEmpty(person.WorkAreaId))
|
||||||
{
|
{
|
||||||
this.drpWorkArea.SelectedValue = person.WorkAreaId;
|
this.drpWorkArea.SelectedValue = person.WorkAreaId;
|
||||||
|
@ -198,6 +199,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||||
Model.SitePerson_Checking personInfo = new Model.SitePerson_Checking
|
Model.SitePerson_Checking personInfo = new Model.SitePerson_Checking
|
||||||
{
|
{
|
||||||
PersonId = this.drpPersonId.Value,
|
PersonId = this.drpPersonId.Value,
|
||||||
|
IdentityCard = this.txtIdCard.Text,
|
||||||
ProjectId = this.ProjectId,
|
ProjectId = this.ProjectId,
|
||||||
WorkAreaName = this.txtWorkArea.Text.Trim(),
|
WorkAreaName = this.txtWorkArea.Text.Trim(),
|
||||||
Address = this.txtAddress.Text.Trim()
|
Address = this.txtAddress.Text.Trim()
|
||||||
|
@ -215,8 +217,8 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
string newKeyID = SQLHelper.GetNewID(typeof(Model.SitePerson_Checking));
|
this.CheckingId = SQLHelper.GetNewID();
|
||||||
personInfo.CheckingId = newKeyID;
|
personInfo.CheckingId = this.CheckingId;
|
||||||
BLL.SitePerson_CheckingService.AddPersonInfo(personInfo);
|
BLL.SitePerson_CheckingService.AddPersonInfo(personInfo);
|
||||||
BLL.LogService.AddSys_Log(this.CurrUser, personInfo.CardNo, personInfo.CheckingId, BLL.Const.PersonalInfoMenuId, BLL.Const.BtnDelete);
|
BLL.LogService.AddSys_Log(this.CurrUser, personInfo.CardNo, personInfo.CheckingId, BLL.Const.PersonalInfoMenuId, BLL.Const.BtnDelete);
|
||||||
}
|
}
|
||||||
|
|
|
@ -120,6 +120,15 @@ namespace FineUIPro.Web.HSSE.SitePerson {
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.TextBox txtIdentityCard;
|
protected global::FineUIPro.TextBox txtIdentityCard;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtIdCard 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.TextBox txtIdCard;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// txtWorkArea 控件。
|
/// txtWorkArea 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -756,54 +756,7 @@ namespace WebAPI.Controllers
|
||||||
var responeData = new Model.ResponeData();
|
var responeData = new Model.ResponeData();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
APIDoorServerService.SaveDoorInOutRecord(projectId, idCard, isIn, changeTime, "白名单");
|
||||||
{
|
|
||||||
int maxId = 0;
|
|
||||||
var getmax = db.T_d_facerecord.Where(x => x.ProjectId == projectId && x.RoleID == "白名单").Select(x => x.ID);
|
|
||||||
if (getmax.Count() > 0)
|
|
||||||
{
|
|
||||||
maxId = getmax.Max() + 1;
|
|
||||||
}
|
|
||||||
string name = string.Empty;
|
|
||||||
string cardNo = string.Empty;
|
|
||||||
var getPerson = db.SitePerson_Person.FirstOrDefault(x => x.IdentityCard == idCard);
|
|
||||||
if (getPerson != null)
|
|
||||||
{
|
|
||||||
name = getPerson.PersonName;
|
|
||||||
cardNo = getPerson.CardNo;
|
|
||||||
}
|
|
||||||
|
|
||||||
Model.T_d_facerecord newFacerecord = new Model.T_d_facerecord()
|
|
||||||
{
|
|
||||||
NewID = SQLHelper.GetNewID(),
|
|
||||||
ProjectId = projectId,
|
|
||||||
ID = maxId + 1,
|
|
||||||
EmployName = name,
|
|
||||||
EmployNO = idCard,
|
|
||||||
RoleID = "白名单",
|
|
||||||
DateTimeRecord = changeTime,
|
|
||||||
RecordDes = "白名单:允许通行",
|
|
||||||
InOrOut = (isIn == 1 ? "进门" : "出门"),
|
|
||||||
};
|
|
||||||
|
|
||||||
db.T_d_facerecord.InsertOnSubmit(newFacerecord);
|
|
||||||
db.SubmitChanges();
|
|
||||||
///// 根据出入记录 写入考勤记录
|
|
||||||
Model.t_d_facerecordItem facerecord = new Model.t_d_facerecordItem
|
|
||||||
{
|
|
||||||
ID = maxId + 1,
|
|
||||||
EmployName = name,
|
|
||||||
IDCardNo = idCard,
|
|
||||||
EmployNO = idCard,
|
|
||||||
ProjectId = projectId,
|
|
||||||
RoleID = "白名单",
|
|
||||||
DateTimeRecord = changeTime,
|
|
||||||
RecordDes = "白名单:允许通行",
|
|
||||||
InOrOut = (isIn == 1 ? "进门" : "出门"),
|
|
||||||
};
|
|
||||||
DoorServerService.InsertEmployInOutRecord(facerecord);
|
|
||||||
}
|
|
||||||
APIPersonService.getPersonInOut(projectId, idCard, isIn, changeTime);
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue