diff --git a/EProject/BLL/ManHours/PlanService.cs b/EProject/BLL/ManHours/PlanService.cs index dec7067..42f2dbd 100644 --- a/EProject/BLL/ManHours/PlanService.cs +++ b/EProject/BLL/ManHours/PlanService.cs @@ -72,6 +72,7 @@ namespace BLL newPlan.ManHours = plan.ManHours; newPlan.AccountDisabled = plan.AccountDisabled; newPlan.IsClose = plan.IsClose; + newPlan.Phase = plan.Phase; Funs.DB.ManHours_Plan.InsertOnSubmit(newPlan); Funs.DB.SubmitChanges(); } diff --git a/EProject/FineUIPro.Web/Global.asax.cs b/EProject/FineUIPro.Web/Global.asax.cs index 94003eb..74a9309 100644 --- a/EProject/FineUIPro.Web/Global.asax.cs +++ b/EProject/FineUIPro.Web/Global.asax.cs @@ -97,12 +97,13 @@ aTimer.Elapsed += new System.Timers.ElapsedEventHandler(MCEmial); } - //填写第二张资源时,第一张资源预留一个月的时候填写人工时 + //填写第二张资源时,第一张资源预留一个月的时候填写人工时(不用了) + //以Phase为Study/Concept Planning且PM_MA_ProjectApproval+一个月≤当前时间,人工时Disabled if (DateTime.Now.Hour == 10) { System.Timers.Timer aTimer = new System.Timers.Timer(); //1小时执行一次 - aTimer.Interval = 3600000; + aTimer.Interval = 60 * 60 * 1000; aTimer.Enabled = true; aTimer.Start(); aTimer.Elapsed += new System.Timers.ElapsedEventHandler(UpdateManHourDisabled); @@ -341,6 +342,7 @@ /// private void UpdateManHourDisabled(object sender, System.Timers.ElapsedEventArgs e) { + //有资源的人工时 var eprojects = (from x in Funs.DB.Resource_Plan select x).GroupBy(x => x.EProjectId).ToList(); if (eprojects != null) { @@ -357,8 +359,7 @@ if (planLists[0].PM_MA_ProjectApproval.HasValue && planLists[0].PM_MA_ProjectApproval.Value.AddMonths(1) <= DateTime.Now) { string resourcePlanId = planLists[0].ResourcePlanId.ToString(); - string wo = planLists[0].WO.ToString();//特殊处理的人工时无ResourcePlanId判断Account与第一个rp的Account相同做Disabled - List manHours_Plan = (from x in Funs.DB.ManHours_Plan where x.EProjectId == epr.Key && (x.ResourcePlanId == resourcePlanId || x.Account.Contains(wo)) select x).ToList(); + List manHours_Plan = (from x in Funs.DB.ManHours_Plan where x.EProjectId == epr.Key && x.ResourcePlanId == resourcePlanId select x).ToList(); foreach (var item in manHours_Plan) { item.AccountDisabled = 1; @@ -369,6 +370,21 @@ } } + //特殊处理的人工时 + var eprojectLists = (from x in Funs.DB.Editor_EProject + where (x.ProjectControl_JobType == "Projects" || x.ProjectControl_JobType == "MOC") + && x.PM_MA_ProjectApproval.HasValue && x.PM_MA_ProjectApproval.Value.AddMonths(1) <= DateTime.Now + select x).ToList(); + foreach (var pro in eprojectLists) + { + List manHours_Plan = (from x in Funs.DB.ManHours_Plan where x.EProjectId == pro.EProjectId && x.Phase == "Study/Concept Planning" select x).ToList(); + foreach (var item in manHours_Plan) + { + item.AccountDisabled = 1; + Funs.DB.SubmitChanges(); + } + } + var epList = from x in Funs.DB.Editor_EProject where (x.ProjectControl_PC_CancelDate.HasValue && x.ProjectControl_PC_CancelDate.Value.AddMonths(1) <= DateTime.Now && x.ProjectControl_PC_CancelDate.Value.AddMonths(2) >= DateTime.Now) || (x.Job_Hold.HasValue && x.Job_Hold.Value.AddMonths(1) <= DateTime.Now && x.Job_Hold.Value.AddMonths(2) >= DateTime.Now) diff --git a/EProject/FineUIPro.Web/ManHours/AccountDisabled.aspx b/EProject/FineUIPro.Web/ManHours/AccountDisabled.aspx index 45b95eb..b909a0f 100644 --- a/EProject/FineUIPro.Web/ManHours/AccountDisabled.aspx +++ b/EProject/FineUIPro.Web/ManHours/AccountDisabled.aspx @@ -46,9 +46,9 @@ - - + + diff --git a/EProject/FineUIPro.Web/ManHours/AccountDisabled.aspx.designer.cs b/EProject/FineUIPro.Web/ManHours/AccountDisabled.aspx.designer.cs index bc17ee3..c999560 100644 --- a/EProject/FineUIPro.Web/ManHours/AccountDisabled.aspx.designer.cs +++ b/EProject/FineUIPro.Web/ManHours/AccountDisabled.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.ManHours { - - - public partial class AccountDisabled { - +namespace FineUIPro.Web.ManHours +{ + + + public partial class AccountDisabled + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.ManHours { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.ManHours { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// SimpleForm1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.ManHours { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form SimpleForm1; - + /// /// txtJobNo 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.ManHours { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtJobNo; - + /// /// drpDiscipline 控件。 /// @@ -56,7 +58,7 @@ namespace FineUIPro.Web.ManHours { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpDiscipline; - + /// /// txtAccount 控件。 /// @@ -65,7 +67,7 @@ namespace FineUIPro.Web.ManHours { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtAccount; - + /// /// txtEngineerName 控件。 /// @@ -74,7 +76,7 @@ namespace FineUIPro.Web.ManHours { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtEngineerName; - + /// /// txtManHours 控件。 /// @@ -83,7 +85,16 @@ namespace FineUIPro.Web.ManHours { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtManHours; - + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label1; + /// /// cbNotApplicable1 控件。 /// @@ -92,7 +103,7 @@ namespace FineUIPro.Web.ManHours { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.CheckBox cbNotApplicable1; - + /// /// Toolbar1 控件。 /// @@ -101,7 +112,7 @@ namespace FineUIPro.Web.ManHours { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar1; - + /// /// btnSave 控件。 /// @@ -110,7 +121,7 @@ namespace FineUIPro.Web.ManHours { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSave; - + /// /// btnClose 控件。 /// diff --git a/EProject/FineUIPro.Web/ManHours/AddManHours.aspx b/EProject/FineUIPro.Web/ManHours/AddManHours.aspx index 1ede53b..d766431 100644 --- a/EProject/FineUIPro.Web/ManHours/AddManHours.aspx +++ b/EProject/FineUIPro.Web/ManHours/AddManHours.aspx @@ -46,9 +46,22 @@ - + + + + + + + + + + + + + + @@ -67,5 +80,15 @@ + diff --git a/EProject/FineUIPro.Web/ManHours/AddManHours.aspx.cs b/EProject/FineUIPro.Web/ManHours/AddManHours.aspx.cs index 37b1262..b4612c3 100644 --- a/EProject/FineUIPro.Web/ManHours/AddManHours.aspx.cs +++ b/EProject/FineUIPro.Web/ManHours/AddManHours.aspx.cs @@ -146,6 +146,11 @@ namespace FineUIPro.Web.ManHours pm.AccountDisabled =0; pm.IsClose = 0; } + + if (checkPhase.SelectedValueArray != null) + { + pm.Phase = checkPhase.SelectedValueArray[0]; + } BLL.PlanService.AddPlan(pm); // 把设计专业回写到PM_Editor diff --git a/EProject/FineUIPro.Web/ManHours/AddManHours.aspx.designer.cs b/EProject/FineUIPro.Web/ManHours/AddManHours.aspx.designer.cs index bd07288..320a598 100644 --- a/EProject/FineUIPro.Web/ManHours/AddManHours.aspx.designer.cs +++ b/EProject/FineUIPro.Web/ManHours/AddManHours.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.ManHours { - - - public partial class AddManHours { - +namespace FineUIPro.Web.ManHours +{ + + + public partial class AddManHours + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.ManHours { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.ManHours { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// SimpleForm1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.ManHours { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form SimpleForm1; - + /// /// txtJobNo 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.ManHours { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtJobNo; - + /// /// drpJobNo 控件。 /// @@ -56,7 +58,7 @@ namespace FineUIPro.Web.ManHours { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpJobNo; - + /// /// drpDiscipline 控件。 /// @@ -65,7 +67,7 @@ namespace FineUIPro.Web.ManHours { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpDiscipline; - + /// /// txtAccount 控件。 /// @@ -74,7 +76,7 @@ namespace FineUIPro.Web.ManHours { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtAccount; - + /// /// drpEngineer 控件。 /// @@ -83,7 +85,7 @@ namespace FineUIPro.Web.ManHours { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpEngineer; - + /// /// txtManHours 控件。 /// @@ -92,7 +94,25 @@ namespace FineUIPro.Web.ManHours { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtManHours; - + + /// + /// checkPhase 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.CheckBoxList checkPhase; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label1; + /// /// cbNotApplicable1 控件。 /// @@ -101,7 +121,7 @@ namespace FineUIPro.Web.ManHours { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.CheckBox cbNotApplicable1; - + /// /// Toolbar1 控件。 /// @@ -110,7 +130,7 @@ namespace FineUIPro.Web.ManHours { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar1; - + /// /// btnSave 控件。 /// @@ -119,7 +139,7 @@ namespace FineUIPro.Web.ManHours { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSave; - + /// /// btnClose 控件。 /// diff --git a/EProject/FineUIPro.Web/ManHours/ManHours.aspx b/EProject/FineUIPro.Web/ManHours/ManHours.aspx index e11a9b8..1330785 100644 --- a/EProject/FineUIPro.Web/ManHours/ManHours.aspx +++ b/EProject/FineUIPro.Web/ManHours/ManHours.aspx @@ -129,7 +129,7 @@ _IsClose; + private string _Phase; + private EntityRef _Editor_EProject; private EntityRef _Resource_Plan; @@ -16004,6 +16009,8 @@ namespace Model partial void OnAccountDisabledChanged(); partial void OnIsCloseChanging(System.Nullable value); partial void OnIsCloseChanged(); + partial void OnPhaseChanging(string value); + partial void OnPhaseChanged(); #endregion public ManHours_Plan() @@ -16267,6 +16274,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Phase", DbType="NVarChar(50)")] + public string Phase + { + get + { + return this._Phase; + } + set + { + if ((this._Phase != value)) + { + this.OnPhaseChanging(value); + this.SendPropertyChanging(); + this._Phase = value; + this.SendPropertyChanged("Phase"); + this.OnPhaseChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_ManHours_Plan_Editor_EProject", Storage="_Editor_EProject", ThisKey="EProjectId", OtherKey="EProjectId", IsForeignKey=true)] public Editor_EProject Editor_EProject { @@ -18834,28 +18861,79 @@ namespace Model } [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.SyncDataUserLogs")] - public partial class SyncDataUserLogs + public partial class SyncDataUserLogs : INotifyPropertyChanging, INotifyPropertyChanged { + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private int _Id; + private string _BatchNo; - private System.Nullable _CreatedTime; - - private System.Nullable _DataType; + private int _DataType; private string _DepatId; private string _UserId; + private System.Nullable _CreatedTime; + private System.Nullable _IsSuccess; private string _Remark; + private string _Josn; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnIdChanging(int value); + partial void OnIdChanged(); + partial void OnBatchNoChanging(string value); + partial void OnBatchNoChanged(); + partial void OnDataTypeChanging(int value); + partial void OnDataTypeChanged(); + partial void OnDepatIdChanging(string value); + partial void OnDepatIdChanged(); + partial void OnUserIdChanging(string value); + partial void OnUserIdChanged(); + partial void OnCreatedTimeChanging(System.Nullable value); + partial void OnCreatedTimeChanged(); + partial void OnIsSuccessChanging(System.Nullable value); + partial void OnIsSuccessChanged(); + partial void OnRemarkChanging(string value); + partial void OnRemarkChanged(); + partial void OnJosnChanging(string value); + partial void OnJosnChanged(); + #endregion + public SyncDataUserLogs() { + OnCreated(); } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BatchNo", DbType="NVarChar(50)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Name="id", Storage="_Id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)] + public int Id + { + get + { + return this._Id; + } + set + { + if ((this._Id != value)) + { + this.OnIdChanging(value); + this.SendPropertyChanging(); + this._Id = value; + this.SendPropertyChanged("Id"); + this.OnIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Name="batchNo", Storage="_BatchNo", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] public string BatchNo { get @@ -18866,29 +18944,17 @@ namespace Model { if ((this._BatchNo != value)) { + this.OnBatchNoChanging(value); + this.SendPropertyChanging(); this._BatchNo = value; + this.SendPropertyChanged("BatchNo"); + this.OnBatchNoChanged(); } } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CreatedTime", DbType="DateTime")] - public System.Nullable CreatedTime - { - get - { - return this._CreatedTime; - } - set - { - if ((this._CreatedTime != value)) - { - this._CreatedTime = value; - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DataType", DbType="Int")] - public System.Nullable DataType + [global::System.Data.Linq.Mapping.ColumnAttribute(Name="dataType", Storage="_DataType", DbType="Int NOT NULL")] + public int DataType { get { @@ -18898,12 +18964,16 @@ namespace Model { if ((this._DataType != value)) { + this.OnDataTypeChanging(value); + this.SendPropertyChanging(); this._DataType = value; + this.SendPropertyChanged("DataType"); + this.OnDataTypeChanged(); } } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DepatId", DbType="NVarChar(50)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Name="depatId", Storage="_DepatId", DbType="NVarChar(50)")] public string DepatId { get @@ -18914,12 +18984,16 @@ namespace Model { if ((this._DepatId != value)) { + this.OnDepatIdChanging(value); + this.SendPropertyChanging(); this._DepatId = value; + this.SendPropertyChanged("DepatId"); + this.OnDepatIdChanged(); } } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserId", DbType="NVarChar(50)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Name="userId", Storage="_UserId", DbType="NVarChar(50)")] public string UserId { get @@ -18930,7 +19004,31 @@ namespace Model { if ((this._UserId != value)) { + this.OnUserIdChanging(value); + this.SendPropertyChanging(); this._UserId = value; + this.SendPropertyChanged("UserId"); + this.OnUserIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Name="createdTime", Storage="_CreatedTime", DbType="DateTime")] + public System.Nullable CreatedTime + { + get + { + return this._CreatedTime; + } + set + { + if ((this._CreatedTime != value)) + { + this.OnCreatedTimeChanging(value); + this.SendPropertyChanging(); + this._CreatedTime = value; + this.SendPropertyChanged("CreatedTime"); + this.OnCreatedTimeChanged(); } } } @@ -18946,12 +19044,16 @@ namespace Model { if ((this._IsSuccess != value)) { + this.OnIsSuccessChanging(value); + this.SendPropertyChanging(); this._IsSuccess = value; + this.SendPropertyChanged("IsSuccess"); + this.OnIsSuccessChanged(); } } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Remark", DbType="NVarChar(500)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Remark", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)] public string Remark { get @@ -18962,10 +19064,54 @@ namespace Model { if ((this._Remark != value)) { + this.OnRemarkChanging(value); + this.SendPropertyChanging(); this._Remark = value; + this.SendPropertyChanged("Remark"); + this.OnRemarkChanged(); } } } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Josn", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)] + public string Josn + { + get + { + return this._Josn; + } + set + { + if ((this._Josn != value)) + { + this.OnJosnChanging(value); + this.SendPropertyChanging(); + this._Josn = value; + this.SendPropertyChanged("Josn"); + this.OnJosnChanged(); + } + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } } [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Sys_ActualManHourMonthSet")] diff --git a/EProjectPackFile_2025-09-02-01.zip b/EProjectPackFile_2025-09-02-01.zip deleted file mode 100644 index 97cd7b1..0000000 Binary files a/EProjectPackFile_2025-09-02-01.zip and /dev/null differ diff --git a/EProjectPackFile_2025-09-02-01/PackFile/bin/FineUIPro.Web.dll b/EProjectPackFile_2025-09-02-01/PackFile/bin/FineUIPro.Web.dll deleted file mode 100644 index 21a695f..0000000 Binary files a/EProjectPackFile_2025-09-02-01/PackFile/bin/FineUIPro.Web.dll and /dev/null differ