20220304 考勤导入、接口修改
This commit is contained in:
parent
5dd16e8bf7
commit
65dfdb13a9
|
@ -0,0 +1,3 @@
|
||||||
|
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||||
|
VALUES('638B5540-73B8-4A6C-BBB7-81961CE7336B','0EEB138D-84F9-4686-8CBB-CAEAA6CF1B2A','ɾ³ý',3)
|
||||||
|
GO
|
|
@ -513,7 +513,9 @@ 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('0EEB138D-84F9-4686-8CBB-CAEAA6CF1B2A','¿¼ÊԼǼ','HSSE/EduTrain/TestRecord.aspx',70,'6A0506EB-05CE-4BB3-9BA9-866389F01E1C','Menu_HSSE',0,1,1)
|
VALUES('0EEB138D-84F9-4686-8CBB-CAEAA6CF1B2A','¿¼ÊԼǼ','HSSE/EduTrain/TestRecord.aspx',70,'6A0506EB-05CE-4BB3-9BA9-866389F01E1C','Menu_HSSE',0,1,1)
|
||||||
GO
|
GO
|
||||||
|
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||||
|
VALUES('638B5540-73B8-4A6C-BBB7-81961CE7336B','0EEB138D-84F9-4686-8CBB-CAEAA6CF1B2A','ɾ³ý',3)
|
||||||
|
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('6FF941C1-8A00-4A74-8111-C892FC30A8DA','¿¼ÊÔͳ¼Æ','HSSE/EduTrain/TestStatistics.aspx',80,'6A0506EB-05CE-4BB3-9BA9-866389F01E1C','Menu_HSSE',0,1,1)
|
VALUES('6FF941C1-8A00-4A74-8111-C892FC30A8DA','¿¼ÊÔͳ¼Æ','HSSE/EduTrain/TestStatistics.aspx',80,'6A0506EB-05CE-4BB3-9BA9-866389F01E1C','Menu_HSSE',0,1,1)
|
||||||
GO
|
GO
|
||||||
|
|
|
@ -5,6 +5,7 @@ using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Data.SqlClient;
|
using System.Data.SqlClient;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
namespace FineUIPro.Web.HSSE.EduTrain
|
namespace FineUIPro.Web.HSSE.EduTrain
|
||||||
{
|
{
|
||||||
|
@ -22,11 +23,8 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||||
{
|
{
|
||||||
Funs.DropDownPageSize(this.ddlPageSize);
|
Funs.DropDownPageSize(this.ddlPageSize);
|
||||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||||
if (this.CurrUser.UserId == BLL.Const.sysglyId)
|
////权限按钮方法
|
||||||
{
|
this.GetButtonPower();
|
||||||
this.btnMenuDelete.Hidden = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
///更新没有结束时间且超时的考试记录
|
///更新没有结束时间且超时的考试记录
|
||||||
GetDataService.UpdateTestPlanStates();
|
GetDataService.UpdateTestPlanStates();
|
||||||
// 绑定表格
|
// 绑定表格
|
||||||
|
@ -127,7 +125,6 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
||||||
{
|
{
|
||||||
Grid1.PageIndex = e.NewPageIndex;
|
|
||||||
BindGrid();
|
BindGrid();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -138,7 +135,6 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
|
|
||||||
BindGrid();
|
BindGrid();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -301,6 +297,29 @@ namespace FineUIPro.Web.HSSE.EduTrain
|
||||||
// PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("TestRecordPrint.aspx?TestRecordId={0}", Grid1.SelectedRowID, "编辑 - "), "考试试卷", 900, 650));
|
// PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("TestRecordPrint.aspx?TestRecordId={0}", Grid1.SelectedRowID, "编辑 - "), "考试试卷", 900, 650));
|
||||||
//}
|
//}
|
||||||
|
|
||||||
|
#region 获取按钮权限
|
||||||
|
/// <summary>
|
||||||
|
/// 获取按钮权限
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="button"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
private void GetButtonPower()
|
||||||
|
{
|
||||||
|
if (Request.Params["value"] == "0")
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ProjectTestRecordMenuId);
|
||||||
|
if (buttonList.Count() > 0)
|
||||||
|
{
|
||||||
|
if (buttonList.Contains(BLL.Const.BtnDelete))
|
||||||
|
{
|
||||||
|
this.btnMenuDelete.Hidden = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
protected void btnPrint_Click(object sender, EventArgs e)
|
protected void btnPrint_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||||
|
|
|
@ -185,20 +185,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||||
result += "第" + (i + 2).ToString() + "行," + "单位" + "," + "[" + col0 + "]不在单位表中!" + "|";
|
result += "第" + (i + 2).ToString() + "行," + "单位" + "," + "[" + col0 + "]不在单位表中!" + "|";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!string.IsNullOrEmpty(col1))
|
|
||||||
{
|
|
||||||
var person = sitePersons.FirstOrDefault(e => e.PersonName == col1);
|
|
||||||
if (person == null)
|
|
||||||
{
|
|
||||||
result += "第" + (i + 2).ToString() + "行," + "姓名" + "," + "[" + col1 + "]不在人员信息表中!" + "|";
|
|
||||||
}
|
|
||||||
|
|
||||||
var personOut = sitePersons.FirstOrDefault(e => e.PersonName == col1 && e.OutTime.HasValue && e.OutTime < DateTime.Now);
|
|
||||||
if (personOut != null)
|
|
||||||
{
|
|
||||||
result += "第" + (i + 2).ToString() + "行," + "姓名" + "," + "[" + col1 + "]已离岗!" + "|";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!string.IsNullOrEmpty(col2))
|
if (!string.IsNullOrEmpty(col2))
|
||||||
{
|
{
|
||||||
var person = sitePersons.FirstOrDefault(e => e.IdentityCard == col2);
|
var person = sitePersons.FirstOrDefault(e => e.IdentityCard == col2);
|
||||||
|
@ -209,8 +196,26 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
result += "第" + (i + 2).ToString() + "行," + "身份证号码" + "," + "此项为必填项!" + "|";
|
if (!string.IsNullOrEmpty(col1))
|
||||||
|
{
|
||||||
|
var person = sitePersons.FirstOrDefault(e => e.PersonName == col1);
|
||||||
|
if (person == null)
|
||||||
|
{
|
||||||
|
result += "第" + (i + 2).ToString() + "行," + "姓名" + "," + "[" + col1 + "]不在人员信息表中!" + "|";
|
||||||
|
}
|
||||||
|
|
||||||
|
var personOut = sitePersons.FirstOrDefault(e => e.PersonName == col1 && (!e.OutTime.HasValue || e.OutTime > DateTime.Now));
|
||||||
|
if (personOut == null)
|
||||||
|
{
|
||||||
|
result += "第" + (i + 2).ToString() + "行," + "姓名" + "," + "[" + col1 + "]不在岗!" + "|";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result += "第" + (i + 2).ToString() + "行," + "身份证号码/姓名" + "," + "不能都为空!" + "|";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(col3))
|
if (!string.IsNullOrEmpty(col3))
|
||||||
{
|
{
|
||||||
if (col3 != "进" && col3 != "出")
|
if (col3 != "进" && col3 != "出")
|
||||||
|
|
|
@ -239,11 +239,29 @@ namespace WebAPI.Controllers
|
||||||
{
|
{
|
||||||
string projectId = facerecord.ProjectId;
|
string projectId = facerecord.ProjectId;
|
||||||
string personName = facerecord.EmployName;
|
string personName = facerecord.EmployName;
|
||||||
var getPersonByIdCard = db.SitePerson_Person.Where(x => x.IdentityCard == facerecord.EmployNO).OrderByDescending(x => x.InTime).FirstOrDefault();
|
|
||||||
if (getPersonByIdCard != null)
|
string ProjectId_19261 = "1be62038-2b94-4ac2-9b5f-80cef85deeb2";
|
||||||
|
string ProjectId_20041 = "e9fe4b89-f62d-4b3a-a40c-57c87010aa92";
|
||||||
|
if (projectId == ProjectId_19261 || projectId == ProjectId_20041)
|
||||||
{
|
{
|
||||||
personName = getPersonByIdCard.PersonName;
|
var getPersonByIdCard = db.SitePerson_Person.FirstOrDefault(x => x.IdentityCard == facerecord.EmployNO && (x.ProjectId == ProjectId_19261 || x.ProjectId == ProjectId_20041) && !x.OutTime.HasValue);
|
||||||
projectId = getPersonByIdCard.ProjectId;
|
if (getPersonByIdCard != null)
|
||||||
|
{
|
||||||
|
personName = getPersonByIdCard.PersonName;
|
||||||
|
projectId = getPersonByIdCard.ProjectId;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
string ProjectId_20197 = "310e790e-5ede-4345-98a4-8bd0866e69ef";
|
||||||
|
string ProjectId_21126 = "a7f692aa-4bd5-4fb3-87f8-ba1ab8f94cc2";
|
||||||
|
if (projectId == ProjectId_20197 || projectId == ProjectId_21126)
|
||||||
|
{
|
||||||
|
var getPersonByIdCard = db.SitePerson_Person.FirstOrDefault(x => x.IdentityCard == facerecord.EmployNO && (x.ProjectId == ProjectId_20197 || x.ProjectId == ProjectId_21126) && !x.OutTime.HasValue);
|
||||||
|
if (getPersonByIdCard != null)
|
||||||
|
{
|
||||||
|
personName = getPersonByIdCard.PersonName;
|
||||||
|
projectId = getPersonByIdCard.ProjectId;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var getFacerecord = db.T_d_facerecord.FirstOrDefault(x => x.ID == facerecord.ID && x.ProjectId == projectId && x.RoleID == facerecord.RoleID);
|
var getFacerecord = db.T_d_facerecord.FirstOrDefault(x => x.ID == facerecord.ID && x.ProjectId == projectId && x.RoleID == facerecord.RoleID);
|
||||||
|
|
Loading…
Reference in New Issue