20241112 人工时disable

This commit is contained in:
毕文静 2024-11-12 11:37:25 +08:00
parent 773a9b184e
commit 6387cf58bc
5 changed files with 15 additions and 28 deletions

View File

@ -40,7 +40,7 @@
<OutputPath>bin\</OutputPath> <OutputPath>bin\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>5</WarningLevel> <WarningLevel>4</WarningLevel>
<LangVersion>7.3</LangVersion> <LangVersion>7.3</LangVersion>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
@ -50,7 +50,7 @@
<OutputPath>bin\</OutputPath> <OutputPath>bin\</OutputPath>
<DefineConstants>TRACE</DefineConstants> <DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>1</WarningLevel>
<LangVersion>7.2</LangVersion> <LangVersion>7.2</LangVersion>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
@ -138,6 +138,7 @@
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> <Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath> <HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.ComponentModel.DataAnnotations" /> <Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Data.DataSetExtensions" /> <Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Data.Linq" /> <Reference Include="System.Data.Linq" />

View File

@ -2,7 +2,7 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<ProjectView>ProjectFiles</ProjectView> <ProjectView>ProjectFiles</ProjectView>
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig> <LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
<UseIISExpress>true</UseIISExpress> <UseIISExpress>true</UseIISExpress>
<Use64BitIISExpress>true</Use64BitIISExpress> <Use64BitIISExpress>true</Use64BitIISExpress>
<IISExpressSSLPort /> <IISExpressSSLPort />

View File

@ -314,7 +314,7 @@
{ {
for (int a = 0; a < manHours_Plans.Count; a++) for (int a = 0; a < manHours_Plans.Count; a++)
{ {
var manHours_Plan = Funs.DB.ManHours_Plan.FirstOrDefault(x => x.ManHoursPlanId == manHours_Plans[i].ManHoursPlanId); var manHours_Plan = Funs.DB.ManHours_Plan.FirstOrDefault(x => x.ManHoursPlanId == manHours_Plans[a].ManHoursPlanId);
if (manHours_Plan != null) if (manHours_Plan != null)
{ {
manHours_Plan.AccountDisabled = 1; manHours_Plan.AccountDisabled = 1;
@ -346,24 +346,16 @@
where x.EProjectId == epr.Key && (y.ProjectControl_JobType == "Projects" || y.ProjectControl_JobType == "MOC") where x.EProjectId == epr.Key && (y.ProjectControl_JobType == "Projects" || y.ProjectControl_JobType == "MOC")
orderby x.CreateDate ascending orderby x.CreateDate ascending
select new { x.ResourcePlanId, y.PM_MA_ProjectApproval }).ToList(); select new { x.ResourcePlanId, y.PM_MA_ProjectApproval }).ToList();
if (planLists.Count() == 2) if (planLists.Count == 2)
{ {
if (planLists[0].PM_MA_ProjectApproval.HasValue && planLists[0].PM_MA_ProjectApproval.Value.AddMonths(1) <= DateTime.Now) if (planLists[0].PM_MA_ProjectApproval.HasValue && planLists[0].PM_MA_ProjectApproval.Value.AddMonths(1) <= DateTime.Now)
{ {
//var manHours_Plan = Funs.DB.ManHours_Plan.FirstOrDefault(x => x.ResourcePlanId == planLists[0].ResourcePlanId); string resourcePlanId = planLists[0].ResourcePlanId.ToString();
//if (manHours_Plan != null) List<ManHours_Plan> manHours_Plan = (from x in Funs.DB.ManHours_Plan where x.ResourcePlanId == resourcePlanId && x.AccountDisabled != 1 select x).ToList();
//{ foreach (var item in manHours_Plan)
// manHours_Plan.AccountDisabled = 1;
// Funs.DB.SubmitChanges();
//}
var manHours_Plan = (from x in Funs.DB.ManHours_Plan where x.ResourcePlanId == planLists[0].ResourcePlanId select x).ToList();
if (manHours_Plan.Count() > 0)
{ {
foreach (var item in manHours_Plan) item.AccountDisabled = 1;
{ Funs.DB.SubmitChanges();
item.AccountDisabled = 1;
Funs.DB.SubmitChanges();
}
} }
} }
} }
@ -376,14 +368,8 @@
select x; select x;
foreach (var ep in epList) foreach (var ep in epList)
{ {
//var manHours_Plan = Funs.DB.ManHours_Plan.FirstOrDefault(x => x.EProjectId == ep.EProjectId); var manHours_Plan = (from x in Funs.DB.ManHours_Plan where x.EProjectId == ep.EProjectId && x.AccountDisabled != 1 select x).ToList();
//if (manHours_Plan != null) if (manHours_Plan.Count > 0)
//{
// manHours_Plan.AccountDisabled = 1;
// Funs.DB.SubmitChanges();
//}
var manHours_Plan = (from x in Funs.DB.ManHours_Plan where x.EProjectId == ep.EProjectId select x).ToList();
if (manHours_Plan.Count() > 0)
{ {
foreach (var item in manHours_Plan) foreach (var item in manHours_Plan)
{ {

View File

@ -53,7 +53,7 @@
<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"/> <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"/>
<add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91" validate="false"/> <add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91" validate="false"/>
</httpHandlers> </httpHandlers>
<compilation debug="true" targetFramework="4.8"> <compilation debug="false" targetFramework="4.8">
<assemblies> <assemblies>
<!--<add assembly="Microsoft.Build.Framework, Version=14.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" /> <!--<add assembly="Microsoft.Build.Framework, Version=14.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<add assembly="System.Management, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />--> <add assembly="System.Management, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />-->

View File

@ -8,7 +8,7 @@
<IISExpressWindowsAuthentication /> <IISExpressWindowsAuthentication />
<IISExpressUseClassicPipelineMode /> <IISExpressUseClassicPipelineMode />
<UseGlobalApplicationHostFile /> <UseGlobalApplicationHostFile />
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig> <LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
</PropertyGroup> </PropertyGroup>
<ProjectExtensions> <ProjectExtensions>
<VisualStudio> <VisualStudio>