提交代码
This commit is contained in:
parent
e3286e45d8
commit
1cb6714d67
|
@ -1,6 +1,6 @@
|
|||
--最大级别
|
||||
alter table Control_PointCropping add MaxLevel int null;
|
||||
|
||||
GO
|
||||
truncate table Control_PointCropping
|
||||
INSERT [dbo].[Control_PointCropping] ([ControlId], [ProjectId], [ParentId], [ControlCode], [ControlLevel], [PlanId], [PlanTypeId], [SubItemsId], [DetectionItems], [BasedCriterion], [QualityRecordName], [RecordNumber], [Partition], [Subcontractors], [FiveRings], [Supervision], [Owner], [Remark], [AddUser], [OperateTime], [States], [Sort], [MaxLevel]) VALUES (N'0098CE85-B091-4985-8570-CEEC6D73B10F', N'', N'E9AC9563-E338-48B7-867D-488222AD0557', N'3', 2, N'E9AC9563-E338-48B7-867D-488222AD0557', N'0098CE85-B091-4985-8570-CEEC6D73B10F', N'', N'建筑装饰装修', N'GB50210-2018', NULL, NULL, NULL, NULL, NULL, NULL, NULL, N'C', N'C4A62EC0-E5D3-4EBF-A5FA-E56AA89633C0', CAST(N'2024-07-10T23:33:28.320' AS DateTime), 0, 410, 5)
|
||||
INSERT [dbo].[Control_PointCropping] ([ControlId], [ProjectId], [ParentId], [ControlCode], [ControlLevel], [PlanId], [PlanTypeId], [SubItemsId], [DetectionItems], [BasedCriterion], [QualityRecordName], [RecordNumber], [Partition], [Subcontractors], [FiveRings], [Supervision], [Owner], [Remark], [AddUser], [OperateTime], [States], [Sort], [MaxLevel]) VALUES (N'00B24696-64E9-49F2-BDF8-16B73BD05748', N'', N'B32DAB39-7FD3-40F5-B455-0EEEF3BE0B19', N'7.2.2', 4, N'E9AC9563-E338-48B7-867D-488222AD0557', N'B32DAB39-7FD3-40F5-B455-0EEEF3BE0B19', N'00B24696-64E9-49F2-BDF8-16B73BD05748', N'支(吊、托)架及法兰垫料检查', NULL, NULL, NULL, N'C', NULL, NULL, NULL, NULL, N'GGG2', N'C4A62EC0-E5D3-4EBF-A5FA-E56AA89633C0', CAST(N'2024-07-10T23:33:28.320' AS DateTime), 0, 569, 5)
|
||||
|
|
|
@ -42,6 +42,28 @@ namespace BLL
|
|||
}
|
||||
}
|
||||
|
||||
public static void StartUpdateSitePerson()
|
||||
{
|
||||
//var getSynchroSet = Funs.DB.RealName_SynchroSet.FirstOrDefault();
|
||||
//if (getSynchroSet != null && getSynchroSet.Intervaltime.HasValue)
|
||||
//{
|
||||
// adTimeJ = getSynchroSet.Intervaltime.Value;
|
||||
//}
|
||||
if (messageTimer != null)
|
||||
{
|
||||
messageTimer.Stop();
|
||||
messageTimer.Dispose();
|
||||
messageTimer = null;
|
||||
}
|
||||
messageTimer = new Timer
|
||||
{
|
||||
AutoReset = true
|
||||
};
|
||||
messageTimer.Elapsed += new ElapsedEventHandler(UpdateSitePerson);
|
||||
messageTimer.Interval = 1000 * 60 * 60 * 24;// 60分钟 60000 * adTimeJ;
|
||||
messageTimer.Start();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 流程确认 定时执行 系统启动5分钟
|
||||
/// </summary>
|
||||
|
@ -75,6 +97,49 @@ namespace BLL
|
|||
ErrLogInfo.WriteLog(ex, "数据接口定时器", "RealNameMonitorService.AdUserInProcess");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 流程确认 定时执行 系统启动5分钟
|
||||
/// </summary>
|
||||
/// <param name="sender">Timer组件</param>
|
||||
/// <param name="e">事件参数</param>
|
||||
private static void UpdateSitePerson(object sender, ElapsedEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var persons = from x in db.SitePerson_Person
|
||||
join y in db.Base_Project on x.ProjectId equals y.ProjectId
|
||||
join z in db.RealName_Project on y.JTProjectCode equals z.ProCode
|
||||
join p in db.Project_ProjectUnit on new { x.UnitId, x.ProjectId } equals new { p.UnitId, p.ProjectId }
|
||||
join v in db.ProjectData_TeamGroup on x.TeamGroupId equals v.TeamGroupId
|
||||
join w in db.Base_WorkPost on x.WorkPostId equals w.WorkPostId
|
||||
where z.JTproCode != null && x.IsCardNoOK == true && v.TeamId.HasValue && !x.OutTime.HasValue
|
||||
&& p.IsSynchro == true
|
||||
select x;
|
||||
var personInOutNows = from x in db.RealName_PersonInOutNow select x;
|
||||
foreach (var person in persons)
|
||||
{
|
||||
var personInOutNow = personInOutNows.OrderByDescending(x => x.ChangeTime).FirstOrDefault();
|
||||
if (personInOutNow == null)
|
||||
{
|
||||
person.OutTime = DateTime.Now;
|
||||
}
|
||||
else if (personInOutNow.ChangeTime < DateTime.Now.AddDays(-3))
|
||||
{
|
||||
person.OutTime = personInOutNow.ChangeTime;
|
||||
}
|
||||
}
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
StartMonitor();
|
||||
ErrLogInfo.WriteLog(ex, "数据接口定时器", "RealNameMonitorService.AdUserInProcess");
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 启动监视器 系统启动5分钟-实名制出入记录去重
|
||||
|
@ -159,7 +224,7 @@ namespace BLL
|
|||
}
|
||||
|
||||
if (delCount >= 10000)
|
||||
{
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -185,7 +250,7 @@ namespace BLL
|
|||
/// </summary>
|
||||
public static void StartMonitorDeletePushLog()
|
||||
{
|
||||
int adTimeJ = 60 * 4;
|
||||
int adTimeJ = 60 * 4;
|
||||
if (messageTimer1 != null)
|
||||
{
|
||||
messageTimer1.Stop();
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
|
||||
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
|
||||
<UseIISExpress>true</UseIISExpress>
|
||||
<Use64BitIISExpress>false</Use64BitIISExpress>
|
||||
<IISExpressSSLPort />
|
||||
|
|
|
@ -69,6 +69,17 @@
|
|||
{
|
||||
ErrLogInfo.WriteLog("实名制同步定时器启动失败!", ex);
|
||||
}
|
||||
////根据考勤记录修改人员状态定时器
|
||||
try
|
||||
{
|
||||
BLL.RealNameMonitorService.StartUpdateSitePerson();
|
||||
// BLL.RealNameMonitorService.StartMonitorProject();
|
||||
SynchroSetService.InsertRealNamePushLog(null, null, "根据考勤记录修改人员状态定时器开始启动", "sucess", "200", null, "成功", null);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ErrLogInfo.WriteLog("根据考勤记录修改人员状态定时器启动失败!", ex);
|
||||
}
|
||||
///实名制出入记录去重
|
||||
try
|
||||
{
|
||||
|
|
|
@ -220,11 +220,10 @@ left join Sys_User us on us.UserId=mp.DutyPerson where mp.ProjectId=@ProjectId a
|
|||
// 第二步:创建新数据行
|
||||
NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
|
||||
int i = 1;
|
||||
int sum = 0;
|
||||
foreach (var item in lists)
|
||||
{
|
||||
// 第二步:创建新数据行
|
||||
NPOI.SS.UserModel.IRow row = sheet.GetRow(i);
|
||||
NPOI.SS.UserModel.IRow row = sheet.CreateRow(i);
|
||||
NPOI.SS.UserModel.ICell cell;
|
||||
// 添加数据
|
||||
cell = row.CreateCell(0);
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
<add verb="GET" path="res.axd" type="FineUIPro.ResourceHandler, FineUIPro" validate="false"/>
|
||||
<add path="ChartImg.axd" verb="GET,POST,HEAD" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
|
||||
</httpHandlers>
|
||||
<compilation debug="false" targetFramework="4.6.1"/>
|
||||
<compilation debug="true" targetFramework="4.6.1"/>
|
||||
<httpRuntime requestValidationMode="2.0" maxRequestLength="2147483647" executionTimeout="36000"/>
|
||||
<authentication mode="Forms">
|
||||
<forms loginUrl="Login.aspx" name="PUBLISHERCOOKIE" protection="All" timeout="1440" path="/"/>
|
||||
|
|
|
@ -61968,6 +61968,8 @@ namespace Model
|
|||
|
||||
private EntityRef<Base_Project> _Base_Project;
|
||||
|
||||
private EntityRef<Technique_CheckItemSet> _Technique_CheckItemSet;
|
||||
|
||||
#region 可扩展性方法定义
|
||||
partial void OnLoaded();
|
||||
partial void OnValidate(System.Data.Linq.ChangeAction action);
|
||||
|
@ -62019,6 +62021,7 @@ namespace Model
|
|||
public Check_CheckSpecial()
|
||||
{
|
||||
this._Base_Project = default(EntityRef<Base_Project>);
|
||||
this._Technique_CheckItemSet = default(EntityRef<Technique_CheckItemSet>);
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
|
@ -62337,6 +62340,10 @@ namespace Model
|
|||
{
|
||||
if ((this._CheckItemSetId != value))
|
||||
{
|
||||
if (this._Technique_CheckItemSet.HasLoadedOrAssignedValue)
|
||||
{
|
||||
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
|
||||
}
|
||||
this.OnCheckItemSetIdChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._CheckItemSetId = value;
|
||||
|
@ -62480,6 +62487,40 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Check_CheckSpecial_Technique_CheckItemSet", Storage="_Technique_CheckItemSet", ThisKey="CheckItemSetId", OtherKey="CheckItemSetId", IsForeignKey=true)]
|
||||
public Technique_CheckItemSet Technique_CheckItemSet
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._Technique_CheckItemSet.Entity;
|
||||
}
|
||||
set
|
||||
{
|
||||
Technique_CheckItemSet previousValue = this._Technique_CheckItemSet.Entity;
|
||||
if (((previousValue != value)
|
||||
|| (this._Technique_CheckItemSet.HasLoadedOrAssignedValue == false)))
|
||||
{
|
||||
this.SendPropertyChanging();
|
||||
if ((previousValue != null))
|
||||
{
|
||||
this._Technique_CheckItemSet.Entity = null;
|
||||
previousValue.Check_CheckSpecial.Remove(this);
|
||||
}
|
||||
this._Technique_CheckItemSet.Entity = value;
|
||||
if ((value != null))
|
||||
{
|
||||
value.Check_CheckSpecial.Add(this);
|
||||
this._CheckItemSetId = value.CheckItemSetId;
|
||||
}
|
||||
else
|
||||
{
|
||||
this._CheckItemSetId = default(string);
|
||||
}
|
||||
this.SendPropertyChanged("Technique_CheckItemSet");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public event PropertyChangingEventHandler PropertyChanging;
|
||||
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
@ -103492,6 +103533,8 @@ namespace Model
|
|||
|
||||
private System.Nullable<int> _States;
|
||||
|
||||
private System.Nullable<int> _MaxLevel;
|
||||
|
||||
#region 可扩展性方法定义
|
||||
partial void OnLoaded();
|
||||
partial void OnValidate(System.Data.Linq.ChangeAction action);
|
||||
|
@ -103540,6 +103583,8 @@ namespace Model
|
|||
partial void OnSortChanged();
|
||||
partial void OnStatesChanging(System.Nullable<int> value);
|
||||
partial void OnStatesChanged();
|
||||
partial void OnMaxLevelChanging(System.Nullable<int> value);
|
||||
partial void OnMaxLevelChanged();
|
||||
#endregion
|
||||
|
||||
public Control_PointCropping()
|
||||
|
@ -103987,6 +104032,26 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaxLevel", DbType="Int")]
|
||||
public System.Nullable<int> MaxLevel
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._MaxLevel;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._MaxLevel != value))
|
||||
{
|
||||
this.OnMaxLevelChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._MaxLevel = value;
|
||||
this.SendPropertyChanged("MaxLevel");
|
||||
this.OnMaxLevelChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public event PropertyChangingEventHandler PropertyChanging;
|
||||
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
@ -370320,6 +370385,8 @@ namespace Model
|
|||
|
||||
private System.Nullable<bool> _IsBuiltIn;
|
||||
|
||||
private EntitySet<Check_CheckSpecial> _Check_CheckSpecial;
|
||||
|
||||
private EntitySet<Technique_CheckItemDetail> _Technique_CheckItemDetail;
|
||||
|
||||
#region 可扩展性方法定义
|
||||
|
@ -370346,6 +370413,7 @@ namespace Model
|
|||
|
||||
public Technique_CheckItemSet()
|
||||
{
|
||||
this._Check_CheckSpecial = new EntitySet<Check_CheckSpecial>(new Action<Check_CheckSpecial>(this.attach_Check_CheckSpecial), new Action<Check_CheckSpecial>(this.detach_Check_CheckSpecial));
|
||||
this._Technique_CheckItemDetail = new EntitySet<Technique_CheckItemDetail>(new Action<Technique_CheckItemDetail>(this.attach_Technique_CheckItemDetail), new Action<Technique_CheckItemDetail>(this.detach_Technique_CheckItemDetail));
|
||||
OnCreated();
|
||||
}
|
||||
|
@ -370510,6 +370578,19 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Check_CheckSpecial_Technique_CheckItemSet", Storage="_Check_CheckSpecial", ThisKey="CheckItemSetId", OtherKey="CheckItemSetId", DeleteRule="NO ACTION")]
|
||||
public EntitySet<Check_CheckSpecial> Check_CheckSpecial
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._Check_CheckSpecial;
|
||||
}
|
||||
set
|
||||
{
|
||||
this._Check_CheckSpecial.Assign(value);
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Technique_CheckItemDetail_Technique_CheckItemSet", Storage="_Technique_CheckItemDetail", ThisKey="CheckItemSetId", OtherKey="CheckItemSetId", DeleteRule="NO ACTION")]
|
||||
public EntitySet<Technique_CheckItemDetail> Technique_CheckItemDetail
|
||||
{
|
||||
|
@ -370543,6 +370624,18 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
private void attach_Check_CheckSpecial(Check_CheckSpecial entity)
|
||||
{
|
||||
this.SendPropertyChanging();
|
||||
entity.Technique_CheckItemSet = this;
|
||||
}
|
||||
|
||||
private void detach_Check_CheckSpecial(Check_CheckSpecial entity)
|
||||
{
|
||||
this.SendPropertyChanging();
|
||||
entity.Technique_CheckItemSet = null;
|
||||
}
|
||||
|
||||
private void attach_Technique_CheckItemDetail(Technique_CheckItemDetail entity)
|
||||
{
|
||||
this.SendPropertyChanging();
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
|
||||
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
|
||||
<UseIISExpress>true</UseIISExpress>
|
||||
<Use64BitIISExpress />
|
||||
<IISExpressSSLPort />
|
||||
|
|
Loading…
Reference in New Issue