20220728近三个月人工时校正方法优化。
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
||||
ALTER TABLE SitePerson_Person ADD RawPassword NVARCHAR(100) NULL
|
||||
GO
|
||||
ALTER TABLE Sys_user ADD RawPassword NVARCHAR(100) NULL
|
||||
GO
|
||||
GO
|
||||
@@ -272,12 +272,14 @@ namespace BLL
|
||||
{
|
||||
try
|
||||
{
|
||||
DateTime dateS = DateTime.Now.AddMonths(-3);
|
||||
dateS = Funs.GetNewDateTimeOrNow(DateTime.Now.AddMonths(-3).Year + "-" + DateTime.Now.AddMonths(-3).Month + "-01");
|
||||
var getNums = from x in db.SitePerson_PersonInOutNumber
|
||||
where x.ProjectId == projectId && x.InOutDate.AddMonths(3) >= DateTime.Now
|
||||
where x.ProjectId == projectId && x.InOutDate >= dateS
|
||||
orderby x.InOutDate
|
||||
select x;
|
||||
var getInouts = from x in db.SitePerson_PersonInOut
|
||||
where x.ProjectId == projectId && x.ChangeTime.Value.AddMonths(3) >= DateTime.Now
|
||||
where x.ProjectId == projectId && x.ChangeTime.Value >= dateS
|
||||
select x;
|
||||
int SafeHours = 0;
|
||||
foreach (var itemNum in getNums)
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,4 +1,5 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PersonIn.aspx.cs" Inherits="FineUIPro.Web.HSSE.SitePerson.PersonIn" %>
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PersonIn.aspx.cs"
|
||||
Inherits="FineUIPro.Web.HSSE.SitePerson.PersonIn" ValidateRequest="false" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PersonList.aspx.cs" Inherits="FineUIPro.Web.HSSE.SitePerson.PersonList" %>
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PersonList.aspx.cs"
|
||||
Inherits="FineUIPro.Web.HSSE.SitePerson.PersonList" ValidateRequest="false" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
@@ -159,11 +160,11 @@
|
||||
</f:Panel>
|
||||
<f:Window ID="Window1" Title="编辑人员信息" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" OnClose="Window1_Close" IsModal="true"
|
||||
Width="1000px" Height="660px">
|
||||
Width="1200px" Height="660px">
|
||||
</f:Window>
|
||||
<f:Window ID="Window2" Title="导入人员信息" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" OnClose="Window2_Close" IsModal="false"
|
||||
CloseAction="HidePostBack" Width="1200px" Height="600px">
|
||||
CloseAction="HidePostBack" Width="1200px" Height="650px">
|
||||
</f:Window>
|
||||
<f:Window ID="Window3" Title="编辑人员信息" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" OnClose="Window3_Close" IsModal="true"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PersonListEdit.aspx.cs" Inherits="FineUIPro.Web.HSSE.SitePerson.PersonListEdit" %>
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PersonListEdit.aspx.cs"
|
||||
Inherits="FineUIPro.Web.HSSE.SitePerson.PersonListEdit" ValidateRequest="false" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
|
||||
@@ -885,21 +885,45 @@ namespace WebAPI.Controllers
|
||||
}
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
ErrLogInfo.WriteLog(ex, "WX接口-更新人员数据交换时间", "PersonController.getUpdatePersonExchangeTime");
|
||||
}
|
||||
return responeData;
|
||||
}
|
||||
|
||||
var getPersonb = db.SitePerson_Person.FirstOrDefault(e => e.PersonId == personId);
|
||||
if (getPersonb != null && !string.IsNullOrEmpty(type))
|
||||
/// <summary>
|
||||
/// 更新人员数据交换时间
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <param name="idCard"></param>
|
||||
/// <param name="type"></param>
|
||||
/// <returns></returns>
|
||||
public Model.ResponeData getUpdatePersonExchangeTime(string projectId, string idCard, string type)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var getPerson = db.SitePerson_Person.FirstOrDefault(e => e.ProjectId == projectId && e.IdentityCard ==idCard);
|
||||
if (getPerson != null && !string.IsNullOrEmpty(type))
|
||||
{
|
||||
if (type == "1")
|
||||
{
|
||||
getPersonb.ExchangeTime2 = DateTime.Now;
|
||||
if (!getPersonb.ExchangeTime.HasValue)
|
||||
getPerson.ExchangeTime2 = DateTime.Now;
|
||||
if (!getPerson.ExchangeTime.HasValue)
|
||||
{
|
||||
getPersonb.ExchangeTime = DateTime.Now;
|
||||
getPerson.ExchangeTime = DateTime.Now;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
getPersonb.ExchangeTime = DateTime.Now;
|
||||
getPerson.ExchangeTime = DateTime.Now;
|
||||
}
|
||||
db.SubmitChanges();
|
||||
}
|
||||
@@ -909,7 +933,7 @@ namespace WebAPI.Controllers
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
ErrLogInfo.WriteLog(ex, "WX接口-更新人员数据交换时间", "PersonController.getUpdatePersonExchangeTime");
|
||||
ErrLogInfo.WriteLog(ex, "WX接口-更新人员数据交换时间", "PersonController.getUpdatePersonExchangeTime");
|
||||
}
|
||||
return responeData;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user