This commit is contained in:
毕文静 2025-02-17 17:01:45 +08:00
commit a7add2b3da
28 changed files with 657 additions and 460 deletions

View File

@ -0,0 +1,326 @@
--
ALTER PROCEDURE [dbo].[Sp_Project_GetToDoItems]
@projectId NVARCHAR(50)=NULL,
@userId NVARCHAR(200)=NULL
AS
/*获取当前人待办事项*/
BEGIN
SELECT HazardRegisterId AS DataId
,'B6BE5FE0-CB84-47FF-A6C3-5AD9E1CCE079' AS MenuId
,'安全巡检待整改' AS MenuName
,register.RegisterDef AS Content
,UserId
,users.UserName
,register.RegisterDate AS DataTime
,CONVERT(varchar(100),register.RegisterDate, 23) AS DataTimeStr
,'../HSSE/HiddenInspection/HiddenRectificationRectify.aspx?HazardRegisterId='+register.HazardRegisterId AS PCUrl
FROM HSSE_Hazard_HazardRegister AS register
LEFT JOIN Sys_User AS users ON users.UserId =@userId
WHERE register.ProjectId=@projectId AND
((register.states = '1' AND (register.ResponsibleMan =@userId OR register.CCManIds LIKE ('%'+@userId+'%') ))
)
UNION ALL
SELECT HazardRegisterId AS DataId
,'B6BE5FE0-CB84-47FF-A6C3-5AD9E1CCE079' AS MenuId
,'安全巡检待确认' AS MenuName
,register.RegisterDef AS Content
,UserId
,users.UserName
,register.RegisterDate AS DataTime
,CONVERT(varchar(100),register.RegisterDate, 23) AS DataTimeStr
,'../HSSE/HiddenInspection/HiddenRectificationConfirm.aspx?HazardRegisterId='+register.HazardRegisterId AS PCUrl
FROM HSSE_Hazard_HazardRegister AS register
LEFT JOIN Sys_User AS users ON users.UserId =@userId
WHERE register.ProjectId=@projectId AND
register.states = '2' AND register.CheckManId =@userId
UNION ALL
SELECT CheckControlCode AS DataId
,'B3E99BD9-FDC7-4F15-8C3C-A7821AC9E306' AS MenuId
,'质量巡检待处理' AS MenuName
,checkControl.QuestionDef AS Content
,UserId
,users.UserName
,checkControl.CheckDate AS DataTime
,CONVERT(varchar(100),checkControl.CheckDate, 23) AS DataTimeStr
,'../CQMS/Check/ChecklistEdit.aspx?ToDo=ToDo&CheckControlCode='+checkControl.CheckControlCode AS PCUrl
FROM Check_CheckControl AS checkControl
LEFT JOIN Sys_User AS users ON users.UserId =@userId
WHERE checkControl.ProjectId=@projectId AND
checkControl.State != '7' AND checkControl.CheckControlCode in (select CheckControlCode from Check_CheckControlApprove approve where approve.ApproveType!='S' and approve.ApproveMan=@userId and approve.ApproveDate is null )
UNION ALL
SELECT GJSXID AS DataId
,'0BEA2126-7A48-40EB-8E21-99148E91A22B' AS MenuId
,'关键事项待处理' AS MenuName
,GJSX.Detail AS Content
,users.UserId
,users.UserName
,GJSX.CreateDate AS DataTime
,CONVERT(varchar(100),GJSX.CreateDate, 23) AS DataTimeStr
,'../PZHGL/GJSX/GJSXListEdit.aspx?ToDo=ToDo&EditType=Edit&ID='+GJSXID AS PCUrl
FROM GJSX
LEFT JOIN Sys_User AS users ON users.UserId =@userId
WHERE GJSX.ProjectId=@projectId AND
GJSX.State != 0 AND (((select count(*) from GJSX_detail detail where detail.Progress_user=@userId and detail.GJSXID=GJSX.GJSXID)=0
and (select count(*) from GJSX_Process process where process.UserId=@userId and process.GJSXID=GJSX.GJSXID)>0)
or (GJSX.User_Acceptance like '%'+@userId+'%' and (select count(*) from GJSX_detail detail where detail.GJSXID=GJSX.GJSXID)=(select count(*) from GJSX_Process process where process.GJSXID=GJSX.GJSXID))
)
--UNION ALL
--SELECT InspectionEquipmentId AS DataId
-- ,'6c2c1e5e-1812-4e1c-a683-7125518e28c7' AS MenuId
-- ,'设备材料报验待确认' AS MenuName
-- ,Equipment.InspectionName AS Content
-- ,UserId
-- ,users.UserName
-- ,Equipment.InspectionDate AS DataTime
-- ,CONVERT(varchar(100),Equipment.InspectionDate, 23) AS DataTimeStr
-- ,'../CQMS/Comprehensive/InspectionEquipmentEdit.aspx?ToDo=ToDo&InspectionEquipmentId='+Equipment.InspectionEquipmentId AS PCUrl
--FROM Comprehensive_InspectionEquipment AS Equipment
--LEFT JOIN Sys_User AS users ON users.UserId =@userId
--WHERE Equipment.ProjectId=@projectId and
--Equipment.Status!='3' AND Equipment.InspectionEquipmentId in (select InspectionEquipmentId from Comprehensive_InspectionEquipmentApprove approve where approve.ApproveType!='S' and approve.ApproveMan=@userId and approve.ApproveDate is null )
--UNION ALL
--SELECT InspectionPersonId AS DataId
-- ,'8ed133de-5899-4687-878a-20b1f5280f18' AS MenuId
-- ,'人员报验待确认' AS MenuName
-- ,Person.PersonName AS Content
-- ,UserId
-- ,users.UserName
-- ,Person.CompileDate AS DataTime
-- ,CONVERT(varchar(100),Person.CompileDate, 23) AS DataTimeStr
-- ,'../CQMS/Comprehensive/InspectionPersonEdit.aspx?ToDo=ToDo&InspectionPersonId='+Person.InspectionPersonId AS PCUrl
--FROM Comprehensive_InspectionPerson AS Person
--LEFT JOIN Sys_User AS users ON users.UserId =@userId
--WHERE Person.ProjectId=@projectId and
--Person.Status!='3' AND Person.InspectionPersonId in (select InspectionPersonId from Comprehensive_InspectionPersonApprove approve where approve.ApproveType!='S' and approve.ApproveMan=@userId and approve.ApproveDate is null )
--UNION ALL
--SELECT InspectionMachineId AS DataId
-- ,'aa55fad1-6c51-43f5-8c99-3c6aaae79118' AS MenuId
-- ,'机具报验待确认' AS MenuName
-- ,Machine.InspectionMachineName AS Content
-- ,UserId
-- ,users.UserName
-- ,Machine.CompileDate AS DataTime
-- ,CONVERT(varchar(100),Machine.CompileDate, 23) AS DataTimeStr
-- ,'../CQMS/Comprehensive/InspectionMachineEdit.aspx?ToDo=ToDo&InspectionMachineId='+Machine.InspectionMachineId AS PCUrl
--FROM Comprehensive_InspectionMachine AS Machine
--LEFT JOIN Sys_User AS users ON users.UserId =@userId
--WHERE Machine.ProjectId=@projectId and
--Machine.Status!='3' AND Machine.InspectionMachineId in (select InspectionMachineId from Comprehensive_InspectionMachineApprove approve where approve.ApproveType!='S' and approve.ApproveMan=@userId and approve.ApproveDate is null )
UNION ALL
SELECT ConstructSolutionId AS DataId
,'91C4BFDB-0A51-4992-99CC-EB4EC185593D' AS MenuId
,'施工方案待处理' AS MenuName
,Solution.SolutionName AS Content
,UserId
,users.UserName
,Solution.CompileDate AS DataTime
,CONVERT(varchar(100),Solution.CompileDate, 23) AS DataTimeStr
,'../CQMS/Solution/EditConstructSolution.aspx?ToDo=ToDo&ConstructSolutionId='+Solution.ConstructSolutionId AS PCUrl
FROM Solution_CQMSConstructSolution AS Solution
LEFT JOIN Sys_User AS users ON users.UserId =@userId
WHERE Solution.ProjectId=@projectId and
Solution.State!='3'
AND Solution.ConstructSolutionId in
(select top 1 ConstructSolutionId from (
SELECT Solution_CQMSConstructSolutionApprove.*
FROM Solution_CQMSConstructSolutionApprove,
(SELECT MIN([order]) AS [order],ConstructSolutionId FROM Solution_CQMSConstructSolutionApprove where ApproveType!='S' and ApproveDate is null GROUP BY ConstructSolutionId )b
WHERE Solution_CQMSConstructSolutionApprove.[order] = b.[order] and Solution_CQMSConstructSolutionApprove.ConstructSolutionId = b.ConstructSolutionId
) approve
where approve.ApproveMan=@userId )
UNION ALL
SELECT InspectionId AS DataId
,'4781f467-35bf-4cf2-aaa4-7960a175eb61' AS MenuId
,'共检通知单待处理' AS MenuName
,InspectionManagement.AcceptanceSite AS Content
,UserId
,users.UserName
,InspectionManagement.CompileDate AS DataTime
,CONVERT(varchar(100),InspectionManagement.CompileDate, 23) AS DataTimeStr
,'../CQMS/ProcessControl/InspectionNoticeEdit.aspx?View=View&InspectionId='+InspectionManagement.InspectionId AS PCUrl
FROM ProcessControl_InspectionManagement AS InspectionManagement
LEFT JOIN Sys_User AS users ON users.UserId =@userId
WHERE InspectionManagement.ProjectId=@projectId and
dateadd(day,3,InspectionManagement.CompileDate)>getdate() and InspectionManagement.AcceptanceCheckMan like '%'+@userId+'%'
UNION ALL
SELECT CheckSpecialId AS DataId
,'1B08048F-93ED-4E84-AE65-DB7917EA2DFB' AS MenuId
,'专项检查' AS MenuName
,CheckItemSet.CheckItemName AS Content
,UserId
,users.UserName
,CheckSpecial.CheckTime AS DataTime
,CONVERT(varchar(100),CheckSpecial.CheckTime, 23) AS DataTimeStr
,'../HSSE/Check/CheckSpecialView.aspx?CheckSpecialId='+CheckSpecial.CheckSpecialId AS PCUrl
FROM Check_CheckSpecial AS CheckSpecial
LEFT JOIN Sys_User AS users ON users.UserId =@userId
LEFT JOIN Technique_CheckItemSet AS CheckItemSet ON CheckItemSet.CheckItemSetId =CheckSpecial.CheckItemSetId
WHERE CheckSpecial.ProjectId=@projectId and
dateadd(day,3,CheckSpecial.CheckTime)>getdate() and CheckSpecial.PartInPersonIds like '%'+@userId+'%'
UNION ALL
SELECT CheckColligationId AS DataId
,'C198EBA8-9E23-4654-92E1-09C61105C522' AS MenuId
,'综合检查待处理' AS MenuName
,case CheckType when '0' then '周检' when '1' then '月检' else '其它' end AS Content
,users.UserId
,users.UserName
,CheckColligation.CheckTime AS DataTime
,CONVERT(varchar(100),CheckColligation.CheckTime, 23) AS DataTimeStr
,'../HSSE/Check/CheckColligationEdit.aspx?CheckColligationId='+CheckColligation.CheckColligationId AS PCUrl
FROM Check_CheckColligation AS CheckColligation
LEFT JOIN Sys_User AS users ON users.UserId =@userId
LEFT JOIN Sys_FlowOperate AS FlowOperate ON CheckColligation.CheckColligationId=FlowOperate.DataId
LEFT JOIN Sys_User AS OperateUser ON FlowOperate.OperaterId=OperateUser.UserId
WHERE CheckColligation.ProjectId=@projectId and FlowOperate.IsClosed <> 1 and FlowOperate.OperaterId=@userId
UNION ALL
SELECT PatrolPlanId AS DataId
,'D256E5C8-DC76-4F4D-BABE-A253418823F4' AS MenuId
,'风险巡检待处理' AS MenuName
,HazardListItem.HazardItems AS Content
,UserId
,users.UserName
,PatrolPlan.LimitCheckDate AS DataTime
,CONVERT(varchar(100),PatrolPlan.LimitCheckDate, 23) AS DataTimeStr
,'../HSSE/Hazard/RoutingInspectionEdit.aspx?PatrolPlanId='+PatrolPlan.PatrolPlanId AS PCUrl
FROM Hazard_PatrolPlan AS PatrolPlan
LEFT JOIN Sys_User AS users ON users.UserId =@userId
LEFT JOIN Hazard_HazardSelectedItem AS HazardListItem on HazardListItem.HazardSelectedItemId=PatrolPlan.HazardSelectedItemId
WHERE HazardListItem.ProjectId=@projectId and
dateadd(day,-3,PatrolPlan.LimitCheckDate)<getdate() and PatrolPlan.DutyPerson=@userId
and (select COUNT(*) from Hazard_RoutingInspection ri where ri.PatrolPlanId=PatrolPlan.PatrolPlanId)=0
UNION ALL
SELECT PersonQuality.PersonId AS DataId
,'EBEA762D-1F46-47C5-9EAD-759E13D9B41C' AS MenuId
,'特种作业人员资质还有'+convert(nvarchar(6),DATEDIFF(day,getdate(),PersonQuality.LimitDate))+'天过期' AS MenuName
,Person.PersonName AS Content
,users.UserId
,users.UserName
,PersonQuality.LimitDate AS DataTime
,CONVERT(varchar(100),PersonQuality.LimitDate, 23) AS DataTimeStr
,'../HSSE/QualityAudit/PersonQualityEdit.aspx?PersonId='+PersonQuality.PersonId AS PCUrl
FROM QualityAudit_PersonQuality AS PersonQuality
LEFT JOIN Sys_User AS users ON users.UserId =@userId
LEFT JOIN SitePerson_Person AS Person on Person.PersonId=PersonQuality.PersonId
WHERE Person.ProjectId=@projectId and Person.IsUsed=1 and Person.InTime<getdate() and (Person.OutTime is null or Person.OutTime >getdate() ) and
dateadd(day,-15,PersonQuality.LimitDate)<getdate() and getdate()<PersonQuality.LimitDate
UNION ALL
SELECT PersonQuality.PersonId AS DataId
,'EBEA762D-1F46-47C5-9EAD-759E13D9B41C' AS MenuId
,'特种作业人员资质已过期'+convert(nvarchar(6),DATEDIFF(day,PersonQuality.LimitDate,getdate()))+'' AS MenuName
,Person.PersonName AS Content
,users.UserId
,users.UserName
,PersonQuality.LimitDate AS DataTime
,CONVERT(varchar(100),PersonQuality.LimitDate, 23) AS DataTimeStr
,'../HSSE/QualityAudit/PersonQualityEdit.aspx?PersonId='+PersonQuality.PersonId AS PCUrl
FROM QualityAudit_PersonQuality AS PersonQuality
LEFT JOIN Sys_User AS users ON users.UserId =@userId
LEFT JOIN SitePerson_Person AS Person on Person.PersonId=PersonQuality.PersonId
WHERE Person.ProjectId=@projectId and Person.IsUsed=1 and Person.InTime<getdate() and (Person.OutTime is null or Person.OutTime >getdate() ) and
PersonQuality.LimitDate<getdate()
UNION ALL
SELECT InspectionPersonId AS DataId
,'8ed133de-5899-4687-878a-20b1f5280f18' AS MenuId
,'人员报验还有'+convert(nvarchar(6),DATEDIFF(day,getdate(),Person.ValidityDate))+'天过期' AS MenuName
,Person.PersonName AS Content
,UserId
,users.UserName
,Person.ValidityDate AS DataTime
,CONVERT(varchar(100),Person.CompileDate, 23) AS DataTimeStr
,'../CQMS/Comprehensive/InspectionPersonEdit.aspx?ToDo=ToDo&InspectionPersonId='+Person.InspectionPersonId AS PCUrl
FROM Comprehensive_InspectionPerson AS Person
LEFT JOIN Sys_User AS users ON users.UserId =@userId
WHERE Person.ProjectId=@projectId and Person.IsOnSite=1 and
dateadd(day,-15,Person.ValidityDate)<getdate() and getdate()<Person.ValidityDate
UNION ALL
SELECT InspectionPersonId AS DataId
,'8ed133de-5899-4687-878a-20b1f5280f18' AS MenuId
,'人员报验已过期'+convert(nvarchar(6),DATEDIFF(day,Person.ValidityDate,getdate()))+'' AS MenuName
,Person.PersonName AS Content
,UserId
,users.UserName
,Person.ValidityDate AS DataTime
,CONVERT(varchar(100),Person.CompileDate, 23) AS DataTimeStr
,'../CQMS/Comprehensive/InspectionPersonEdit.aspx?ToDo=ToDo&InspectionPersonId='+Person.InspectionPersonId AS PCUrl
FROM Comprehensive_InspectionPerson AS Person
LEFT JOIN Sys_User AS users ON users.UserId =@userId
WHERE Person.ProjectId=@projectId and Person.IsOnSite=1 and
Person.ValidityDate<getdate()
UNION ALL
SELECT InspectionMachineId AS DataId
,'aa55fad1-6c51-43f5-8c99-3c6aaae79118' AS MenuId
,'机具报验还有'+convert(nvarchar(6),DATEDIFF(day,getdate(),Machine.NextTestDate))+'天过期' AS MenuName
,Machine.InspectionMachineName AS Content
,UserId
,users.UserName
,Machine.NextTestDate AS DataTime
,CONVERT(varchar(100),Machine.CompileDate, 23) AS DataTimeStr
,'../CQMS/Comprehensive/InspectionMachineEdit.aspx?ToDo=ToDo&InspectionMachineId='+Machine.InspectionMachineId AS PCUrl
FROM Comprehensive_InspectionMachine AS Machine
LEFT JOIN Sys_User AS users ON users.UserId =@userId
WHERE Machine.ProjectId=@projectId and Machine.IsOnSite=1 and
dateadd(day,-15,Machine.NextTestDate)<getdate() and getdate()<Machine.NextTestDate
UNION ALL
SELECT InspectionMachineId AS DataId
,'aa55fad1-6c51-43f5-8c99-3c6aaae79118' AS MenuId
,'机具报验已过期'+convert(nvarchar(6),DATEDIFF(day,Machine.NextTestDate,getdate()))+'' AS MenuName
,Machine.InspectionMachineName AS Content
,UserId
,users.UserName
,Machine.NextTestDate AS DataTime
,CONVERT(varchar(100),Machine.CompileDate, 23) AS DataTimeStr
,'../CQMS/Comprehensive/InspectionMachineEdit.aspx?ToDo=ToDo&InspectionMachineId='+Machine.InspectionMachineId AS PCUrl
FROM Comprehensive_InspectionMachine AS Machine
LEFT JOIN Sys_User AS users ON users.UserId =@userId
WHERE Machine.ProjectId=@projectId and Machine.IsOnSite=1 and
Machine.NextTestDate<getdate()
UNION ALL
SELECT Project.ProjectId AS DataId
,'2AE9D982-A499-497F-8F54-ADDA5856887E' AS MenuId
,'本月工程量完成情况尚未填报' AS MenuName
,'' AS Content
,users.UserId
,users.UserName
,GETDATE() AS DataTime
,CONVERT(varchar(100),GETDATE(), 23) AS DataTimeStr
,'../JDGL/Check/QuantityCompletion.aspx?ToDo=ToDo' AS PCUrl
FROM Base_Project AS Project
LEFT JOIN Sys_User AS users ON users.UserId =@userId
LEFT JOIN Project_ProjectUser as pu on pu.UserId=@userId
WHERE Project.ProjectId=@projectId
and (pu.RoleId like '%22F78A47-F59C-4FE8-9C43-2DD304CB2108%' or pu.RoleId like '%GCB64EF3-AB0A-40BC-824D-CC314598D5DC%') and ((DATENAME(DAY,GETDATE())>=20 and (select COUNT(*) from JDGL_QuantityCompletion WHERE ProjectId=@projectId and DATENAME(year,GETDATE())=DATENAME(year,EndDate) and DATENAME(MONTH,GETDATE())=DATENAME(MONTH,EndDate))=0)
--or (DATEADD(day,60,(select top 1 EndDate from JDGL_QuantityCompletion WHERE ProjectId=@projectId order by EndDate desc))<GETDATE())
)
UNION ALL
SELECT MonthPlan.MonthPlanId AS DataId
,'94287B92-7E96-4B90-BC6F-DAF30AE3B314' AS MenuId
,'月度计划尚未完成' AS MenuName
,'' AS Content
,users.UserId
,users.UserName
,GETDATE() AS DataTime
,CONVERT(varchar(100),GETDATE(), 23) AS DataTimeStr
,'../JDGL/Check/MonthPlanEdit.aspx?ToDo=ToDo' AS PCUrl
FROM JDGL_MonthPlan AS MonthPlan
LEFT JOIN Sys_User AS users ON users.UserId =@userId
LEFT JOIN Project_ProjectUser as pu on pu.UserId=@userId
WHERE MonthPlan.ProjectId=@projectId
and MonthPlan.DutyPerson=@userId and MonthPlan.RealDate is null and DATENAME(DAY,GETDATE())>=22 and
DATENAME(year,GETDATE())=DATENAME(year,MonthPlan.PlanDate) and DATENAME(MONTH,GETDATE())=DATENAME(MONTH,MonthPlan.PlanDate)
ORDER BY DataTime DESC
END
GO

View File

@ -0,0 +1,2 @@
update Sys_Menu set MenuName='工作包及检测点' where MenuId='858E83E9-ADE5-452E-BD65-82D8DFF872C0'
GO

View File

@ -610,6 +610,8 @@
<Compile Include="JDGL\WBS\CostControlService.cs" />
<Compile Include="JDGL\WBS\EquipmentMaterialBigTypeService.cs" />
<Compile Include="JDGL\WBS\EquipmentMaterialTypeService.cs" />
<Compile Include="JDGL\WBS\JDGLWBSDetailService.cs" />
<Compile Include="JDGL\WBS\JDGLWBSService.cs" />
<Compile Include="JDGL\WBS\MilePostService.cs" />
<Compile Include="JDGL\WBS\UnitProjectInitService.cs" />
<Compile Include="JDGL\WBS\UnitProjectService.cs" />

View File

@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BLL
{
public static class JDGLWBSDetailService
{
public static List<Model.JDGL_WBSDetail> GetWBSDetailsByWorkPackageId(string workPackageId)
{
return (from x in Funs.DB.JDGL_WBSDetail where x.WorkPackageId == workPackageId select x).ToList();
}
}
}

View File

@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BLL
{
public static class JDGLWBSService
{
public static List<Model.JDGL_WBS> GetWBSsByProjectId(string projectId,string parentId)
{
return (from x in Funs.DB.JDGL_WBS where x.ParentId == parentId && x.ProjectId == projectId orderby x.PathCode select x).ToList();
}
}
}

View File

@ -2230,7 +2230,8 @@ namespace BLL
}
finally
{
getPipelineWeldingQuantities.Interval = 1000 * 3600 * 24;
//getPipelineWeldingQuantities.Interval = 1000 * 3600 * 24;
getPipelineWeldingQuantities.Interval = 1000 * 3600 * 12;
getPipelineWeldingQuantities.Start();
}
}

View File

@ -19374,7 +19374,7 @@
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v17.0\WebApplications\Microsoft.WebApplication.targets" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v15.0\WebApplications\Microsoft.WebApplication.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">

View File

@ -45,7 +45,7 @@
<f:Panel ID="Panel1" CssClass="blockpanel" Margin="20px" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
<Items>
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true" RegionSplitWidth="3px" EnableCollapse="true"
Width="300px" Title="分部、工作项及费用清单设置" ShowBorder="true" ShowHeader="true" BodyPadding="10px" Layout="Fit">
Width="300px" Title="工作包及检测点" ShowBorder="true" ShowHeader="true" BodyPadding="10px" Layout="Fit">
<Items>
<f:Tree ID="trWBS" Width="290" EnableCollapse="true" ShowHeader="true" OnNodeCommand="trWBS_NodeCommand"
OnNodeExpand="trWBS_NodeExpand" OnNodeCheck="trWBS_NodeCheck" EnableCheckBox="true"
@ -64,13 +64,17 @@
Title="中间面板" ShowBorder="true" ShowHeader="false" BodyPadding="10px">
<Items>
<f:Grid ID="Grid1" Width="870px" ShowBorder="true" ShowHeader="false" EnableCollapse="true" ForceFit="true"
runat="server" BoxFlex="1" DataKeyNames="CostControlId" AllowSorting="true" EnableColumnLines="true" EnableCheckBoxSelect="true"
SortField="CostControlCode,CostControlName" SortDirection="ASC" AllowCellEditing="true" ClicksToEdit="1" ShowSelectedCell="true"
DataIDField="CostControlId" AllowPaging="true" IsDatabasePaging="true" PageSize="100" OnPageIndexChange="Grid1_PageIndexChange"
runat="server" BoxFlex="1" DataKeyNames="Id" AllowSorting="true" EnableColumnLines="true"
SortField="Id" SortDirection="ASC" AllowCellEditing="true" ClicksToEdit="1" ShowSelectedCell="true"
DataIDField="Id" AllowPaging="true" IsDatabasePaging="true" PageSize="100" OnPageIndexChange="Grid1_PageIndexChange"
OnRowDataBound="Grid1_RowDataBound" AllowFilters="true" OnFilterChange="Grid1_FilterChange">
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Right">
<Items>
<f:Button ID="btnMenuDown" Icon="ArrowDown" runat="server" Text="抽取" ToolTip="抽取" Hidden="true"
OnClick="btnMenuDown_Click">
</f:Button>
<f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="btnAdd" Icon="Add" runat="server" ToolTip="增加" Hidden="true"
OnClick="btnAdd_Click">
</f:Button>
@ -80,43 +84,10 @@
</f:Toolbar>
</Toolbars>
<Columns>
<f:RenderField Width="100px" ColumnID="CostControlCode" DataField="CostControlCode" FieldType="String"
HeaderText="费用清单编号" HeaderTextAlign="Center" TextAlign="Left">
<f:RenderField Width="400px" ColumnID="Name" DataField="Name" FieldType="String"
HeaderText="检测点" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="400px" ColumnID="CostControlName" DataField="CostControlName" FieldType="String"
HeaderText="内容" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="EquipmentMaterialTypeName" DataField="EquipmentMaterialTypeName" FieldType="String"
HeaderText="设备材料分类" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="70px" ColumnID="Unit" DataField="Unit" FieldType="String"
HeaderText="单位" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<%--<f:RenderField Width="130px" ColumnID="TotalNum" DataField="TotalNum" FieldType="Double"
HeaderText="合同工作量" HeaderTextAlign="Center" TextAlign="Left">
<Editor>
<f:NumberBox ID="nbTotalNum" NoDecimal="false" NoNegative="true" MinValue="0"
runat="server">
</f:NumberBox>
</Editor>
</f:RenderField>
<f:RenderField Width="100px" ColumnID="RealPrice" DataField="RealPrice" FieldType="Double"
HeaderText="实际单价" HeaderTextAlign="Center" TextAlign="Left">
<Editor>
<f:NumberBox ID="nbRealPrice" NoDecimal="false" NoNegative="true" MinValue="0"
runat="server">
</f:NumberBox>
</Editor>
</f:RenderField>
<f:RenderField Width="100px" ColumnID="PlanPrice" DataField="PlanPrice" FieldType="Double"
HeaderText="预算单价" HeaderTextAlign="Center" TextAlign="Left">
<Editor>
<f:NumberBox ID="nbPlanPrice" NoDecimal="false" NoNegative="true" MinValue="0"
runat="server">
</f:NumberBox>
</Editor>
</f:RenderField>--%>
<f:RenderField Width="70px" ColumnID="CostControlId" DataField="CostControlId" FieldType="String"
<f:RenderField Width="70px" ColumnID="Id" DataField="Id" FieldType="String"
HeaderText="主键" HeaderTextAlign="Center" TextAlign="Left" Hidden="true">
</f:RenderField>
</Columns>

View File

@ -37,31 +37,13 @@ namespace FineUIPro.Web.JDGL.WBS
this.trWBS.EnableIcons = true;
this.trWBS.AutoScroll = true;
this.trWBS.EnableSingleClickExpand = true;
//var project = BLL.ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId);
//if (project != null)
//{
// TreeNode rootNode = new TreeNode();
// rootNode.Text = project.ProjectName;
// rootNode.NodeID = project.ProjectId;
// rootNode.CommandName = "project";
// rootNode.EnableExpandEvent = true;
// rootNode.EnableCheckBox = false;
// this.trWBS.Nodes.Add(rootNode);
// if (BLL.Project_InstallationService.IsExitProjectInstallation(project.ProjectId))
// {
// TreeNode emptyNode = new TreeNode();
// emptyNode.Text = "";
// emptyNode.NodeID = "";
// rootNode.Nodes.Add(emptyNode);
// }
//}
Model.Project_Installation installation = BLL.Project_InstallationService.GetProjectInstallationByProjectId(this.CurrUser.LoginProjectId);
if (installation != null)
List<Model.JDGL_WBS> wbss = BLL.JDGLWBSService.GetWBSsByProjectId(this.CurrUser.LoginProjectId, "0");
foreach (var w in wbss)
{
TreeNode newNode = new TreeNode();
newNode.Text = "[" + installation.InstallationCode + "]" + installation.InstallationName;
newNode.NodeID = installation.InstallationId;
newNode.CommandName = "installation";
newNode.Text = w.ItemName;
newNode.NodeID = w.Id;
newNode.CommandName = "WBS";
newNode.EnableExpandEvent = true;
newNode.EnableClickEvent = true;
newNode.EnableCheckBox = false;
@ -84,255 +66,27 @@ namespace FineUIPro.Web.JDGL.WBS
protected void trWBS_NodeExpand(object sender, TreeNodeEventArgs e)
{
e.Node.Nodes.Clear();
bool needAddTempNode = false; //是否需要增加空节点
if (e.Node.CommandName == "project") //展开项目节点
if (e.Node.CommandName == "WBS") //展开项目节点
{
var installations = from x in Funs.DB.Project_Installation
where x.ProjectId == e.Node.NodeID && x.SuperInstallationId == "0"
orderby x.InstallationCode
select x;
foreach (var installation in installations)
var wbss = BLL.JDGLWBSService.GetWBSsByProjectId(this.CurrUser.LoginProjectId, e.Node.NodeID);
foreach (var w in wbss)
{
TreeNode newNode = new TreeNode();
newNode.Text = "[" + installation.InstallationCode + "]" + installation.InstallationName;
newNode.NodeID = installation.InstallationId;
newNode.CommandName = "installation";
newNode.Text = w.ItemName;
newNode.NodeID = w.Id;
newNode.CommandName = "WBS";
newNode.EnableExpandEvent = true;
newNode.EnableClickEvent = true;
newNode.EnableCheckBox = false;
e.Node.Nodes.Add(newNode);
TreeNode emptyNode = new TreeNode();
emptyNode.Text = "";
emptyNode.NodeID = "";
newNode.Nodes.Add(emptyNode);
}
}
else if (e.Node.CommandName == "installation") //展开装置/单元节点
{
var installations = from x in Funs.DB.Project_Installation
where x.SuperInstallationId == e.Node.NodeID
orderby x.InstallationCode
select x;
if (installations.Count() > 0)
{
foreach (var installation in installations)
{
TreeNode newNode = new TreeNode();
newNode.Text = "[" + installation.InstallationCode + "]" + installation.InstallationName;
newNode.NodeID = installation.InstallationId;
newNode.CommandName = "installation";
newNode.EnableExpandEvent = true;
newNode.EnableClickEvent = true;
newNode.EnableCheckBox = false;
e.Node.Nodes.Add(newNode);
TreeNode emptyNode = new TreeNode();
emptyNode.Text = "";
emptyNode.NodeID = "";
newNode.Nodes.Add(emptyNode);
}
}
else
{
var cnProfessions = from x in Funs.DB.WBS_CnProfession where x.InstallationId == e.Node.NodeID orderby x.OldId select x;
if (cnProfessions.Count() > 0) //普通装置主项
{
foreach (var cnProfession in cnProfessions)
{
TreeNode newNode = new TreeNode();
newNode.Text = cnProfession.CnProfessionName;
newNode.NodeID = cnProfession.CnProfessionId;
newNode.CommandName = "cnProfession";
newNode.EnableExpandEvent = true;
newNode.EnableClickEvent = true;
newNode.EnableCheckBox = false;
e.Node.Nodes.Add(newNode);
TreeNode emptyNode = new TreeNode();
emptyNode.Text = "";
emptyNode.NodeID = "";
newNode.Nodes.Add(emptyNode);
}
}
else //总图
{
var unitProjects = from x in Funs.DB.Wbs_UnitProject where x.InstallationId == e.Node.NodeID && x.SuperUnitProjectId == null orderby x.SortIndex, x.UnitProjectCode select x;
foreach (var unitProject in unitProjects)
{
TreeNode newNode = new TreeNode();
newNode.Text = unitProject.UnitProjectName;
newNode.NodeID = unitProject.UnitProjectId;
newNode.CommandName = "unitProject";
newNode.EnableExpandEvent = true;
newNode.EnableCheckBox = false;
if (unitProject.IsSelected == true && unitProject.IsApprove == null)
{
unitProject.IsApprove = true;
BLL.UnitProjectService.UpdateUnitProject(unitProject);
}
if (unitProject.IsApprove == true)
{
newNode.Checked = true;
}
else
{
newNode.Checked = false;
}
newNode.EnableClickEvent = true;
e.Node.Nodes.Add(newNode);
TreeNode emptyNode = new TreeNode();
emptyNode.Text = "";
emptyNode.NodeID = "";
newNode.Nodes.Add(emptyNode);
}
}
}
}
else if (e.Node.CommandName == "cnProfession") //展开专业节点
{
var unitProjects = from x in Funs.DB.Wbs_UnitProject where x.CnProfessionId == e.Node.NodeID && x.SuperUnitProjectId == null orderby x.SortIndex, x.UnitProjectCode select x;
foreach (var unitProject in unitProjects)
{
TreeNode newNode = new TreeNode();
newNode.Text = unitProject.UnitProjectName;
newNode.NodeID = unitProject.UnitProjectId;
newNode.CommandName = "unitProject";
newNode.EnableExpandEvent = true;
newNode.EnableCheckBox = true;
newNode.EnableCheckEvent = true;
if (unitProject.IsSelected == true && unitProject.IsApprove == null)
{
unitProject.IsApprove = true;
BLL.UnitProjectService.UpdateUnitProject(unitProject);
}
if (unitProject.IsApprove == true)
{
newNode.Checked = true;
}
else
{
newNode.Checked = false;
}
newNode.EnableClickEvent = true;
e.Node.Nodes.Add(newNode);
TreeNode emptyNode = new TreeNode();
emptyNode.Text = "";
emptyNode.NodeID = "";
newNode.Nodes.Add(emptyNode);
}
}
else if (e.Node.CommandName == "unitProject") //展开单位工程节点
{
var wbsSet1s = from x in Funs.DB.Wbs_WbsSet where x.UnitProjectId == e.Node.NodeID && x.SuperWbsSetId == null orderby x.WbsSetCode select x;
if (wbsSet1s.Count() > 0)
{
foreach (var wbsSet1 in wbsSet1s)
{
TreeNode newNode = new TreeNode();
newNode.Text = wbsSet1.WbsSetName;
newNode.NodeID = wbsSet1.WbsSetId;
newNode.CommandName = "wbsSet";
newNode.EnableExpandEvent = true;
newNode.EnableCheckBox = true;
newNode.EnableCheckEvent = true;
if (wbsSet1.IsSelected == true && wbsSet1.IsApprove == null)
{
wbsSet1.IsApprove = true;
BLL.WbsSetService.UpdateWbsSet(wbsSet1);
}
if (wbsSet1.IsApprove == true)
{
newNode.Checked = true;
}
else
{
newNode.Checked = false;
}
newNode.EnableClickEvent = true;
e.Node.Nodes.Add(newNode);
var wbsSets = BLL.WbsSetService.GetWbsSetsBySuperWbsSetId(wbsSet1.WbsSetId);
if (wbsSets.Count > 0)
{
TreeNode emptyNode = new TreeNode();
emptyNode.Text = "";
emptyNode.NodeID = "";
newNode.Nodes.Add(emptyNode);
}
//needAddTempNode = false;
//var wbsSets = BLL.WbsSetService.GetWbsSetsBySuperWbsSetId(wbsSet1.WbsSetId);
//foreach (var wbsSet in wbsSets)
//{
// var childWbsSets = from x in Funs.DB.Wbs_WbsSet where x.SuperWbsSetId == wbsSet.WbsSetId select x;
// if (childWbsSets.Count() > 0)
// {
// needAddTempNode = true;
// break;
// }
//}
//if (needAddTempNode)
//{
// TreeNode emptyNode = new TreeNode();
// emptyNode.Text = "";
// emptyNode.NodeID = "";
// newNode.Nodes.Add(emptyNode);
//}
}
}
}
else if (e.Node.CommandName == "wbsSet") //展开分部/子分部/分项/子分项工程节点
{
var childWbsSets = BLL.WbsSetService.GetWbsSetsBySuperWbsSetId(e.Node.NodeID);
foreach (var wbsSet in childWbsSets)
{
TreeNode newNode = new TreeNode();
newNode.Text = wbsSet.WbsSetName;
newNode.NodeID = wbsSet.WbsSetId;
newNode.CommandName = "wbsSet";
newNode.EnableExpandEvent = true;
newNode.EnableCheckBox = true;
newNode.EnableCheckEvent = true;
if (wbsSet.IsSelected == true && wbsSet.IsApprove == null)
{
wbsSet.IsApprove = true;
BLL.WbsSetService.UpdateWbsSet(wbsSet);
}
if (wbsSet.IsApprove == true)
{
newNode.Checked = true;
}
else
{
newNode.Checked = false;
}
newNode.EnableClickEvent = true;
e.Node.Nodes.Add(newNode);
var wbsSets = BLL.WbsSetService.GetWbsSetsBySuperWbsSetId(wbsSet.WbsSetId);
if (wbsSets.Count > 0)
var wbs2s = BLL.JDGLWBSService.GetWBSsByProjectId(this.CurrUser.LoginProjectId, w.Id);
if (wbs2s.Count > 0)
{
TreeNode emptyNode = new TreeNode();
emptyNode.Text = "";
emptyNode.NodeID = "";
newNode.Nodes.Add(emptyNode);
}
//needAddTempNode = false;
//var wbsSets = BLL.WbsSetService.GetWbsSetsBySuperWbsSetId(wbsSet.WbsSetId);
//foreach (var wbsSetc in wbsSets)
//{
// var childWbsSets1 = from x in Funs.DB.Wbs_WbsSet where x.SuperWbsSetId == wbsSetc.WbsSetId select x;
// if (childWbsSets1.Count() > 0)
// {
// needAddTempNode = true;
// break;
// }
//}
//if (needAddTempNode)
//{
// TreeNode emptyNode = new TreeNode();
// emptyNode.Text = "";
// emptyNode.NodeID = "";
// newNode.Nodes.Add(emptyNode);
//}
}
}
}
@ -1743,19 +1497,12 @@ namespace FineUIPro.Web.JDGL.WBS
/// </summary>
private void BindGrid()
{
var codeList = BLL.WbsSetMatchCostControlService.GetWbsSetMatchCostControls(this.trWBS.SelectedNodeID);
Model.Wbs_WbsSet wbeSet = BLL.WbsSetService.GetWbsSetByWbsSetId(this.trWBS.SelectedNodeID);
if (codeList.Count > 0) //存在费控对应关系项
var list = BLL.JDGLWBSDetailService.GetWBSDetailsByWorkPackageId(this.trWBS.SelectedNodeID);
if (list.Count > 0)
{
string codes = string.Empty;
foreach (var item in codeList)
{
codes += item.CostControlCode + ",";
}
string strSql = "SELECT c.*,e.EquipmentMaterialTypeName FROM WBS_CostControl c left join WBS_EquipmentMaterialType e on c.EquipmentMaterialTypeId=e.EquipmentMaterialTypeId where @CostControlCodes like '%'+CostControlCode+'%' and WbsSetId=@WbsSetId";
string strSql = "SELECT * FROM JDGL_WBSDetail where WorkPackageId=@WorkPackageId";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@CostControlCodes", codes));
listStr.Add(new SqlParameter("@WbsSetId", this.trWBS.SelectedNodeID));
listStr.Add(new SqlParameter("@WorkPackageId", this.trWBS.SelectedNodeID));
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
@ -1764,12 +1511,6 @@ namespace FineUIPro.Web.JDGL.WBS
Grid1.DataSource = table;
Grid1.DataBind();
var costControls = BLL.CostControlService.GetSelectedCostControlsByWbsSetId(this.trWBS.SelectedNodeID);
if (costControls.Count > 0)
{
var selectIds = costControls.Select(x => x.CostControlId).ToArray();
this.Grid1.SelectedRowIDArray = selectIds;
}
}
else
{
@ -2713,33 +2454,115 @@ namespace FineUIPro.Web.JDGL.WBS
{
if (buttonList.Contains(BLL.Const.BtnAdd))
{
this.btnMenuAdd.Hidden = false;
this.btnAdd.Hidden = false;
this.btnMenuCopy.Hidden = false;
//this.btnMenuDetail.Hidden = false;
//this.btnMenuWeekDetail.Hidden = false;
//this.btnMenuCopy2.Hidden = false;
//this.btnMenuAdd.Hidden = false;
//this.btnAdd.Hidden = false;
//this.btnMenuCopy.Hidden = false;
this.btnMenuDown.Hidden = false;
}
if (buttonList.Contains(BLL.Const.BtnModify))
{
this.btnMenuEdit.Hidden = false;
this.btnMenuModify.Hidden = false;
//this.btnMenuEdit.Hidden = false;
//this.btnMenuModify.Hidden = false;
}
if (buttonList.Contains(BLL.Const.BtnSave))
{
this.btnSave.Hidden = false;
//this.btnSave.Hidden = false;
}
if (buttonList.Contains(BLL.Const.BtnDelete))
{
this.btnMenuDelete.Hidden = false;
this.btnMenuDel.Hidden = false;
//this.btnMenuDelete.Hidden = false;
//this.btnMenuDel.Hidden = false;
}
//if (buttonList.Contains(BLL.Const.BtnAuditing))
//{
// this.btnMenuAudit.Hidden = false;
//}
}
}
#endregion
/// <summary>
/// 抽取
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnMenuDown_Click(object sender, EventArgs e)
{
Model.SGGLDB db = Funs.DB;
Model.JDGL_WBS wbs1 = db.JDGL_WBS.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId);
if (wbs1 != null)
{
ShowNotify("项目已存在数据,无法抽取!", MessageBoxIcon.Warning);
return;
}
Model.Base_Project project = BLL.ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId);
string contenttype = "application/json;charset=utf-8";
var returndata0 = BLL.APIGetHttpService.ControlHttp(Funs.ControlApiUrl + "/project/api/hcoud-wuhuan/projectwbsconstruct/constructionTree?wuId=" + project.KZProjectCode, "GET", contenttype, null, null);
var returndata1 = BLL.APIGetHttpService.ControlHttp(Funs.ControlApiUrl + "/project/api/hcoud-wuhuan/projectwbsconstruct/checkPointList?wuId=" + project.KZProjectCode, "GET", contenttype, null, null);
List<Model.JDGL_WBS> wbss = new List<Model.JDGL_WBS>();
List<Model.JDGL_WBSDetail> wbsDetails = new List<Model.JDGL_WBSDetail>();
if (!string.IsNullOrEmpty(returndata0))
{
JObject obj0 = JObject.Parse(returndata0);
if (obj0["code"].ToString() == "200")
{
JArray arr0 = JArray.Parse(obj0["data"].ToString());
string proId = string.Empty;
List<string> list = new List<string>();
foreach (var item in arr0)
{
Model.JDGL_WBS wBS = new Model.JDGL_WBS();
wBS.Id = item["id"].ToString();
wBS.ProjectId = this.CurrUser.LoginProjectId;
wBS.ParentId = item["parentId"].ToString();
wBS.Leave = Funs.GetNewInt(item["leave"].ToString());
wBS.PathCode = item["pathCode"].ToString();
wBS.ItemName = item["itemName"].ToString();
wBS.PlanQuantities = Funs.GetNewDecimal(item["planQuantities"].ToString());
wBS.PlanEnd = Funs.GetNewDateTime(item["planEnd"].ToString());
wBS.RealityEnd = Funs.GetNewDateTime(item["realityEnd"].ToString());
wBS.RealityPrice = Funs.GetNewDecimal(item["realityPrice"].ToString());
wBS.Total = Funs.GetNewDecimal(item["total"].ToString());
wBS.Num = Funs.GetNewDecimal(item["num"].ToString());
wBS.Cycle = item["cycle"].ToString();
wBS.PlanPrice = Funs.GetNewDecimal(item["planPrice"].ToString());
if (!list.Contains(wBS.Id))
{
wbss.Add(wBS);
list.Add(wBS.Id);
}
}
//InitTreeMenu();
}
}
if (!string.IsNullOrEmpty(returndata1))
{
JObject obj0 = JObject.Parse(returndata1);
if (obj0["code"].ToString() == "200")
{
JArray arr0 = JArray.Parse(obj0["data"].ToString());
string proId = string.Empty;
List<string> list = new List<string>();
foreach (var item in arr0)
{
Model.JDGL_WBSDetail wBSDetail = new Model.JDGL_WBSDetail();
wBSDetail.Id = item["id"].ToString();
wBSDetail.ProjectId = this.CurrUser.LoginProjectId;
wBSDetail.CompletionTime = Funs.GetNewDateTime(item["completionTime"].ToString());
wBSDetail.WorkPackageId = item["workPackageId"].ToString();
wBSDetail.Name = item["name"].ToString();
wBSDetail.RealityCompletePercent = Funs.GetNewDecimal(item["realityCompletePercent"].ToString());
if (!list.Contains(wBSDetail.Id))
{
wbsDetails.Add(wBSDetail);
list.Add(wBSDetail.Id);
}
}
//InitTreeMenu();
}
}
db.JDGL_WBS.InsertAllOnSubmit(wbss);
db.JDGL_WBSDetail.InsertAllOnSubmit(wbsDetails);
db.SubmitChanges();
ShowNotify("抽取成功!", MessageBoxIcon.Success);
}
}
}

View File

@ -102,6 +102,15 @@ namespace FineUIPro.Web.JDGL.WBS {
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// btnMenuDown 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnMenuDown;
/// <summary>
/// btnAdd 控件。
/// </summary>

View File

@ -47,7 +47,7 @@ namespace FineUIPro.Web.ProjectData
{
if (buttonList.Contains(BLL.Const.BtnAdd))
{
this.btnMenuDown.Hidden = false;
//this.btnMenuDown.Hidden = false;
this.btnMenuAdd.Hidden = false;
}
if (buttonList.Contains(BLL.Const.BtnModify))
@ -307,16 +307,17 @@ namespace FineUIPro.Web.ProjectData
wBSDetail.WorkPackageId = item["workPackageId"].ToString();
wBSDetail.Name = item["name"].ToString();
wBSDetail.RealityCompletePercent = Funs.GetNewDecimal(item["realityCompletePercent"].ToString());
//if (!list.Contains(wBS.Id))
//{
// wbss.Add(wBS);
// list.Add(wBS.Id);
//}
if (!list.Contains(wBSDetail.Id))
{
wbsDetails.Add(wBSDetail);
list.Add(wBSDetail.Id);
}
}
//InitTreeMenu();
}
}
db.JDGL_WBS.InsertAllOnSubmit(wbss);
db.JDGL_WBSDetail.InsertAllOnSubmit(wbsDetails);
db.SubmitChanges();
ShowNotify("抽取成功!", MessageBoxIcon.Success);
}

View File

@ -363,16 +363,16 @@ namespace FineUIPro.Web.Transfer
continue;
}
//如果全是NA或Not Start 就是 Not Start
if (listObj.Where(x => x == "NA" || x == "Not Start").ToList().Count == 2)
//如果全是NA或Not Start、空 就是 Not Start
if (listObj.Where(x => string.IsNullOrWhiteSpace(x) || x == "NA" || x == "Not Start").ToList().Count == 2)
{
model.FINAL_Status = "Not Start";
list.Add(model);
continue;
}
//如果其中有一项是In progress 或Not Start 是 In progress
if (listObj.Where(x => x == "In progress" || x == "Not Start").ToList().Count >= 1)
//如果其中有一项是In progress 或Not Start、空 是 In progress
if (listObj.Where(x => string.IsNullOrWhiteSpace(x) || x == "In progress" || x == "Not Start").ToList().Count >= 1)
{
model.FINAL_Status = "In progress";
list.Add(model);

View File

@ -119,14 +119,14 @@ namespace FineUIPro.Web.Transfer
{
model.FINAL_Status = "Completed";
}
//如果全是NA或Not Start 就是 Not Start
else if (listObj.Where(x => x == "NA" || x == "Not Start").ToList().Count == 2)
//如果全是NA或Not Start、空 就是 Not Start
else if (listObj.Where(x => string.IsNullOrWhiteSpace(x) || x == "NA" || x == "Not Start").ToList().Count == 2)
{
model.FINAL_Status = "Not Start";
}
//如果其中有一项是In progress 或Not Start 是 In progress
else if (listObj.Where(x => x == "In progress" || x == "Not Start").ToList().Count >= 1)
//如果其中有一项是In progress 或Not Start、空 是 In progress
else if (listObj.Where(x => string.IsNullOrWhiteSpace(x) || x == "In progress" || x == "Not Start").ToList().Count >= 1)
{
model.FINAL_Status = "In progress";
}

View File

@ -359,16 +359,16 @@ namespace FineUIPro.Web.Transfer
continue;
}
//如果全是NA或Not Start 就是 Not Start
if (listObj.Where(x => x == "NA" || x == "Not Start").ToList().Count == 4)
//如果全是NA或Not Start、空 就是 Not Start
if (listObj.Where(x => string.IsNullOrWhiteSpace(x) || x == "NA" || x == "Not Start").ToList().Count == 4)
{
model.FINAL_Status = "Not Start";
list.Add(model);
continue;
}
//如果其中有一项是In progress 或Not Start 是 In progress
if (listObj.Where(x => x == "In progress" || x == "Not Start").ToList().Count >= 1)
//如果其中有一项是In progress 或Not Start、空 是 In progress
if (listObj.Where(x => string.IsNullOrWhiteSpace(x) || x == "In progress" || x == "Not Start").ToList().Count >= 1)
{
model.FINAL_Status = "In progress";
list.Add(model);

View File

@ -105,14 +105,14 @@ namespace FineUIPro.Web.Transfer
{
model.FINAL_Status = "Completed";
}
//如果全是NA或Not Start 就是 Not Start
else if (listObj.Where(x => x == "NA" || x == "Not Start").ToList().Count == 4)
//如果全是NA或Not Start、空 就是 Not Start
else if (listObj.Where(x => string.IsNullOrWhiteSpace(x) || x == "NA" || x == "Not Start").ToList().Count == 4)
{
model.FINAL_Status = "Not Start";
}
//如果其中有一项是In progress 或Not Start 是 In progress
else if (listObj.Where(x => x == "In progress" || x == "Not Start").ToList().Count >= 1)
//如果其中有一项是In progress 或Not Start、空 是 In progress
else if (listObj.Where(x => string.IsNullOrWhiteSpace(x) || x == "In progress" || x == "Not Start").ToList().Count >= 1)
{
model.FINAL_Status = "In progress";
}

View File

@ -316,7 +316,8 @@ namespace FineUIPro.Web.Transfer
{
Sn = 1000;
}
else {
else
{
Sn = snModel.SN;
}
for (int i = 1; i < ir; i++)
@ -329,7 +330,7 @@ namespace FineUIPro.Web.Transfer
//if (modelOnly == null)
//{
Model.Transfer_Instrumentation model = new Model.Transfer_Instrumentation();
model.Descriptions= pds.Rows[i][1].ToString().Trim();
model.Descriptions = pds.Rows[i][1].ToString().Trim();
model.Id = Guid.NewGuid().ToString();
model.ProjectId = CurrUser.LoginProjectId;
@ -337,7 +338,7 @@ namespace FineUIPro.Web.Transfer
model.SN = Sn;
model.INSTRUMENTATION = pds.Rows[i][0].ToString().Trim();
model.SystemName = pds.Rows[i][1+1].ToString().Trim();
model.SystemName = pds.Rows[i][1 + 1].ToString().Trim();
model.Subsystem = pds.Rows[i][2 + 1].ToString().Trim();
model.Test_Package = pds.Rows[i][3 + 1].ToString().Trim();
@ -370,16 +371,16 @@ namespace FineUIPro.Web.Transfer
continue;
}
//如果全是NA或Not Start 就是 Not Start
if (listObj.Where(x => x == "NA" || x == "Not Start").ToList().Count == 3)
//如果全是NA或Not Start、空 就是 Not Start
if (listObj.Where(x => string.IsNullOrWhiteSpace(x) || x == "NA" || x == "Not Start").ToList().Count == 3)
{
model.FINAL_Status = "Not Start";
list.Add(model);
continue;
}
//如果其中有一项是In progress 或Not Start 是 In progress
if (listObj.Where(x => x == "In progress" || x == "Not Start").ToList().Count >= 1)
//如果其中有一项是In progress 或Not Start、空 是 In progress
if (listObj.Where(x => string.IsNullOrWhiteSpace(x) || x == "In progress" || x == "Not Start").ToList().Count >= 1)
{
model.FINAL_Status = "In progress";
list.Add(model);

View File

@ -111,14 +111,14 @@ namespace FineUIPro.Web.Transfer
{
model.FINAL_Status = "Completed";
}
//如果全是NA或Not Start 就是 Not Start
else if (listObj.Where(x => x == "NA" || x == "Not Start").ToList().Count == 3)
//如果全是NA或Not Start、空 就是 Not Start
else if (listObj.Where(x => string.IsNullOrWhiteSpace(x) || x == "NA" || x == "Not Start").ToList().Count == 3)
{
model.FINAL_Status = "Not Start";
}
//如果其中有一项是In progress 或Not Start 是 In progress
else if (listObj.Where(x => x == "In progress" || x == "Not Start").ToList().Count >= 1)
//如果其中有一项是In progress 或Not Start、空 是 In progress
else if (listObj.Where(x => string.IsNullOrWhiteSpace(x) || x == "In progress" || x == "Not Start").ToList().Count >= 1)
{
model.FINAL_Status = "In progress";
}

View File

@ -414,16 +414,16 @@ namespace FineUIPro.Web.Transfer
continue;
}
//如果全是NA或Not Start 就是 Not Start
if (listObj.Where(x => x == "NA" || x == "Not Start").ToList().Count == 3)
//如果全是NA或Not Start、空 就是 Not Start
if (listObj.Where(x => string.IsNullOrWhiteSpace(x) || x == "NA" || x == "Not Start").ToList().Count == 3)
{
model.FINALStatus = "Not Start";
list.Add(model);
continue;
}
//如果其中有一项是In progress 或Not Start 是 In progress
if (listObj.Where(x => x == "In progress" || x == "Not Start").ToList().Count >= 1)
//如果其中有一项是In progress 或Not Start、空 是 In progress
if (listObj.Where(x => string.IsNullOrWhiteSpace(x) || x == "In progress" || x == "Not Start").ToList().Count >= 1)
{
model.FINALStatus = "In progress";
list.Add(model);

View File

@ -147,14 +147,14 @@ namespace FineUIPro.Web.Transfer
model.FINALStatus = "Completed";
}
//如果全是NA或Not Start 就是 Not Start
else if (listObj.Where(x => x == "NA" || x == "Not Start").ToList().Count == 3)
//如果全是NA或Not Start、空 就是 Not Start
else if (listObj.Where(x => string.IsNullOrWhiteSpace(x) || x == "NA" || x == "Not Start").ToList().Count == 3)
{
model.FINALStatus = "Not Start";
}
//如果其中有一项是In progress 或Not Start 是 In progress
else if (listObj.Where(x => x == "In progress" || x == "Not Start").ToList().Count >= 1)
//如果其中有一项是In progress 或Not Start、空 是 In progress
else if (listObj.Where(x => string.IsNullOrWhiteSpace(x) || x == "In progress" || x == "Not Start").ToList().Count >= 1)
{
model.FINALStatus = "In progress";
}

View File

@ -355,16 +355,16 @@ namespace FineUIPro.Web.Transfer
continue;
}
//如果全是NA或Not Start 就是 Not Start
if (listObj.Where(x => x == "NA" || x == "Not Start").ToList().Count == 4)
//如果全是NA或Not Start、空 就是 Not Start
if (listObj.Where(x => string.IsNullOrWhiteSpace(x) || x == "NA" || x == "Not Start").ToList().Count == 4)
{
model.MechanicalFINALStatus = "Not Start";
list.Add(model);
continue;
}
//如果其中有一项是In progress 或Not Start 是 In progress
if (listObj.Where(x => x == "In progress" || x == "Not Start").ToList().Count >= 1)
//如果其中有一项是In progress 或Not Start、空 是 In progress
if (listObj.Where(x => string.IsNullOrWhiteSpace(x) || x == "In progress" || x == "Not Start").ToList().Count >= 1)
{
model.MechanicalFINALStatus = "In progress";
list.Add(model);

View File

@ -103,14 +103,14 @@ namespace FineUIPro.Web.Transfer
{
model.MechanicalFINALStatus = "Completed";
}
//如果全是NA或Not Start 就是 Not Start
else if (listObj.Where(x => x == "NA" || x == "Not Start").ToList().Count == 4)
//如果全是NA或Not Start、空 就是 Not Start
else if (listObj.Where(x => string.IsNullOrWhiteSpace(x) || x == "NA" || x == "Not Start").ToList().Count == 4)
{
model.MechanicalFINALStatus = "Not Start";
}
//如果其中有一项是In progress 或Not Start 是 In progress
else if (listObj.Where(x => x == "In progress" || x == "Not Start").ToList().Count >= 1)
//如果其中有一项是In progress 或Not Start、空 是 In progress
else if (listObj.Where(x => string.IsNullOrWhiteSpace(x) || x == "In progress" || x == "Not Start").ToList().Count >= 1)
{
model.MechanicalFINALStatus = "In progress";
}

View File

@ -353,16 +353,16 @@ namespace FineUIPro.Web.Transfer
continue;
}
//如果全是NA或Not Start 就是 Not Start
if (listObj.Where(x => x == "NA" || x == "Not Start").ToList().Count == 3)
//如果全是NA或Not Start、空 就是 Not Start
if (listObj.Where(x => string.IsNullOrWhiteSpace(x) || x == "NA" || x == "Not Start").ToList().Count == 3)
{
model.MechanicalFINALStatus = "Not Start";
list.Add(model);
continue;
}
//如果其中有一项是In progress 或Not Start 是 In progress
if (listObj.Where(x => x == "In progress" || x == "Not Start").ToList().Count >= 1)
//如果其中有一项是In progress 或Not Start、空 是 In progress
if (listObj.Where(x => string.IsNullOrWhiteSpace(x) || x == "In progress" || x == "Not Start").ToList().Count >= 1)
{
model.MechanicalFINALStatus = "In progress";
list.Add(model);

View File

@ -101,14 +101,14 @@ namespace FineUIPro.Web.Transfer
{
model.MechanicalFINALStatus = "Completed";
}
//如果全是NA或Not Start 就是 Not Start
else if (listObj.Where(x => x == "NA" || x == "Not Start").ToList().Count == 3)
//如果全是NA或Not Start、空 就是 Not Start
else if (listObj.Where(x => string.IsNullOrWhiteSpace(x) || x == "NA" || x == "Not Start").ToList().Count == 3)
{
model.MechanicalFINALStatus = "Not Start";
}
//如果其中有一项是In progress 或Not Start 是 In progress
else if (listObj.Where(x => x == "In progress" || x == "Not Start").ToList().Count >= 1)
//如果其中有一项是In progress 或Not Start、空 是 In progress
else if (listObj.Where(x => string.IsNullOrWhiteSpace(x) || x == "In progress" || x == "Not Start").ToList().Count >= 1)
{
model.MechanicalFINALStatus = "In progress";
}

View File

@ -359,16 +359,16 @@ namespace FineUIPro.Web.Transfer
continue;
}
//如果全是NA或Not Start 就是 Not Start
if (listObj.Where(x => x == "NA" || x == "Not Start").ToList().Count == 4)
//如果全是NA或Not Start、空 就是 Not Start
if (listObj.Where(x => string.IsNullOrWhiteSpace(x) || x == "NA" || x == "Not Start").ToList().Count == 4)
{
model.FINAL_Status = "Not Start";
list.Add(model);
continue;
}
//如果其中有一项是In progress 或Not Start 是 In progress
if (listObj.Where(x => x == "In progress" || x == "Not Start").ToList().Count >= 1)
//如果其中有一项是In progress、空 或Not Start 是 In progress
if (listObj.Where(x => string.IsNullOrWhiteSpace(x) || x == "In progress" || x == "Not Start").ToList().Count >= 1)
{
model.FINAL_Status = "In progress";
list.Add(model);

View File

@ -103,13 +103,13 @@ namespace FineUIPro.Web.Transfer
{
model.FINAL_Status = "Completed";
}
//如果全是NA或Not Start 就是 Not Start
else if (listObj.Where(x => x == "NA" || x == "Not Start").ToList().Count == 4)
//如果全是NA或Not Start、空 就是 Not Start
else if (listObj.Where(x => string.IsNullOrWhiteSpace(x) || x == "NA" || x == "Not Start").ToList().Count == 4)
{
model.FINAL_Status = "Not Start";
}
//如果其中有一项是In progress 或Not Start 是 In progress
else if (listObj.Where(x => x == "In progress" || x == "Not Start").ToList().Count >= 1)
//如果其中有一项是In progress 或Not Start、空 是 In progress
else if (listObj.Where(x => string.IsNullOrWhiteSpace(x) || x == "In progress" || x == "Not Start").ToList().Count >= 1)
{
model.FINAL_Status = "In progress";
}

View File

@ -11,7 +11,7 @@
<FineUIPro DebugMode="true" Theme="Cupertino"/>
<appSettings>
<!--连接字符串-->
<add key="ConnectionString" value="Server=.\SQL2012;Database=SGGLDB_WH;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Connect Timeout=1200"/>
<add key="ConnectionString" value="Server=.;Database=SGGLDB_WH;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Connect Timeout=1200"/>
<!--<add key="ConnectionString" value="Server=.\MSSQLSERVER01;Database=SGGLDB_WH;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Connect Timeout=1200"/>-->
<!--系统名称-->
<add key="SystemName" value="智慧施工管理信息系统V1.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="true" targetFramework="4.6.1"/>
<compilation debug="false" 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="/"/>

View File

@ -441,7 +441,7 @@ namespace FineUIPro.Web.common
/// <returns></returns>
protected int GetCompletedNum()
{
var result = Project_HSSEData_HSSEService.GetCompletedNum(ProjectId);
var result = Project_HSSEData_HSSEService.GetFinishedNum(ProjectId);
return result;
}
@ -481,7 +481,7 @@ namespace FineUIPro.Web.common
/// <returns></returns>
protected int GetSuperCompletedNum()
{
var result = Project_HSSEData_HSSEService.GetSuperCompletedNum(ProjectId);
var result = Project_HSSEData_HSSEService.GetSuperFinishedNum(ProjectId);
return result;
}

View File

@ -24,10 +24,11 @@ namespace FineUIPro.Web.common
{
pids = CurrUser.CompanyProjectId.Split(',');
}
else {
else
{
//加载所有在建项目的数据
var pidArray = Funs.DB.Base_Project.Where(x => x.ProjectState == "1").Select(x=>x.ProjectId).ToArray();
if (pidArray.Length>0)
var pidArray = Funs.DB.Base_Project.Where(x => x.ProjectState == "1").Select(x => x.ProjectId).ToArray();
if (pidArray.Length > 0)
{
pids = pidArray;
}
@ -52,8 +53,9 @@ namespace FineUIPro.Web.common
{
countAqrgsSum = CountAqrgs();
}
else {
countAqrgsSum = CountAqrgs(null,null,pids);
else
{
countAqrgsSum = CountAqrgs(null, null, pids);
}
if (countAqrgsSum > 10000)
@ -62,7 +64,8 @@ namespace FineUIPro.Web.common
this.divSafeWorkTime.InnerHtml = Math.Round(countAqrgsSum, 2).ToString() + "万";
}
else {
else
{
this.divSafeWorkTime.InnerHtml = countAqrgsSum.ToString().Split('.')[0];
}
@ -85,7 +88,7 @@ namespace FineUIPro.Web.common
}
else
{
countMonthAqrgs = CountAqrgs(d1, d2,pids);
countMonthAqrgs = CountAqrgs(d1, d2, pids);
}
if (countMonthAqrgs > 10000)
{
@ -93,7 +96,8 @@ namespace FineUIPro.Web.common
this.divSafeWorkTimeMonth.InnerHtml = Math.Round(countMonthAqrgs, 2).ToString() + "万";
}
else {
else
{
this.divSafeWorkTimeMonth.InnerHtml = CountAqrgs(d1, d2).ToString().Split('.')[0];
}
@ -113,11 +117,12 @@ namespace FineUIPro.Web.common
boShengCount = db.Bo_Sheng_TrainPerson.Where(x => (x.DeleteTag == "False" || x.DeleteTag == null)).ToList().Count;
this.divSafePersonNum.InnerHtml = (getTrainRecord + boShengCount).ToString();
}
else {
getTrainRecord = db.EduTrain_TrainRecord.Where(x=>pids.Contains(x.ProjectId)).Sum(x => x.TrainPersonNum) ?? 0;
else
{
getTrainRecord = db.EduTrain_TrainRecord.Where(x => pids.Contains(x.ProjectId)).Sum(x => x.TrainPersonNum) ?? 0;
//修改:增加博晟教育中的人数
boShengCount = db.Bo_Sheng_TrainPerson.Where(x => (x.DeleteTag == "False" || x.DeleteTag == null)
&& pids.Contains(x.ProjectId) ).ToList().Count;
&& pids.Contains(x.ProjectId)).ToList().Count;
this.divSafePersonNum.InnerHtml = (getTrainRecord + boShengCount).ToString();
}
@ -137,7 +142,8 @@ namespace FineUIPro.Web.common
select x;
this.divSafeManagePersonNum.InnerText = glAllPerson.Count().ToString();
}
else {
else
{
//安全管理人员
var allSum = from x in Funs.DB.SitePerson_Person
where x.IsUsed == true && x.InTime < DateTime.Now && (x.OutTime == null || x.OutTime > DateTime.Now)
@ -174,11 +180,12 @@ namespace FineUIPro.Web.common
select x).Count();
divCqmsPxNum.InnerText = CqmsPxNum.ToString();
}
else {
else
{
CqmsManageNum = (from x in Funs.DB.SitePerson_Person
join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId
where x.IsUsed == true && y.IsCQMS == true && pids.Contains(x.ProjectId)
select x).Count();
join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId
where x.IsUsed == true && y.IsCQMS == true && pids.Contains(x.ProjectId)
select x).Count();
this.divCqmsManageNum.InnerText = CqmsManageNum.ToString();
CqmsPxNum = (from x in Funs.DB.Comprehensive_InspectionPerson
@ -193,7 +200,8 @@ namespace FineUIPro.Web.common
{
allProjects = ProjectService.GetAllProjectDropDownList();
}
else {
else
{
allProjects = ProjectService.GetAllProjectDropDownList(pids);
}
@ -205,10 +213,12 @@ namespace FineUIPro.Web.common
{
pcount1 = allProjects.Where(x => x.ProjectState == Const.ProjectState_1 || x.ProjectState == null).Count();
var pidzjsg = string.Join(",", allProjects.Where(x => x.ProjectState == Const.ProjectState_1 || x.ProjectState == null).Select(x => x.ProjectId)).Split(',');
if (pids == null) {
if (pids == null)
{
pcount2 = (from x in Funs.DB.SitePerson_Person where x.IsUsed == true && pidzjsg.Contains(x.ProjectId) select x).Count();
}
else {
else
{
pidzjsg = pids;
pcount2 = (from x in Funs.DB.SitePerson_Person where x.IsUsed == true && pids.Contains(x.ProjectId) select x).Count();
}
@ -279,7 +289,7 @@ namespace FineUIPro.Web.common
/// </summary>
/// <param name="state"></param>
/// <returns></returns>
protected decimal CountAqrgs(DateTime? d1 = null, DateTime? d2 = null,string[] pids =null)
protected decimal CountAqrgs(DateTime? d1 = null, DateTime? d2 = null, string[] pids = null)
{
decimal cout1 = 0;
@ -288,12 +298,13 @@ namespace FineUIPro.Web.common
var getAllPersonInOutList = from x in Funs.DB.SitePerson_PersonInOutNumber
select x;
if (pids != null) {
if (pids != null)
{
getAllPersonInOutList = from x in Funs.DB.SitePerson_PersonInOutNumber
where pids.Contains(x.ProjectId)
select x;
}
if (getAllPersonInOutList.Count() > 0)
if (getAllPersonInOutList.Count() > 0)
{
if (datetime1.HasValue)
{
@ -305,7 +316,16 @@ namespace FineUIPro.Web.common
}
if (getAllPersonInOutList.Count() > 0)
{
cout1 = getAllPersonInOutList.Sum(x => (long)x.WorkHours);
//cout1 = getAllPersonInOutList.Sum(x => (long)x.WorkHours);
foreach (var pid in pids)
{
var q1 = getAllPersonInOutList.Where(x => x.ProjectId == pid).OrderByDescending(x => x.InOutDate);
var q2 = getAllPersonInOutList.Where(x => x.ProjectId == pid).OrderBy(x => x.InOutDate);
if (q1.Count() > 0)
{
cout1 += (q1.First().WorkHours ?? 0) - (q2.First().WorkHours ?? 0);
}
}
}
}
@ -318,15 +338,15 @@ namespace FineUIPro.Web.common
where y.ProjectState == Const.ProjectState_1
select x;
if (pids!=null)
if (pids != null)
{
getD1 = from x in Funs.DB.Accident_AccidentHandle
join y in Funs.DB.Base_Project on x.ProjectId equals y.ProjectId
where pids.Contains(x.ProjectId)
where pids.Contains(x.ProjectId)
select x;
getD2 = from x in Funs.DB.Accident_AccidentReport
join y in Funs.DB.Base_Project on x.ProjectId equals y.ProjectId
where pids.Contains(x.ProjectId)
where pids.Contains(x.ProjectId)
select x;
}
@ -716,7 +736,8 @@ namespace FineUIPro.Web.common
zgzglDataValue = (100 - (100.0 * num2 / (num2 + num3))).ToString();
}
else {
else
{
zlallNumber = (from x in Funs.DB.Check_CheckControl
where x.CheckDate <= DateTime.Now && pids.Contains(x.ProjectId)
select x).Count().ToString();
@ -764,7 +785,8 @@ namespace FineUIPro.Web.common
zlgjzgl = zgl.ToString();
zggjzglDataValue = (100 - (100.0 * num2 / num1)).ToString();
}
else {
else
{
var num1 = (from x in Funs.DB.ProcessControl_InspectionManagement
where pids.Contains(x.ProjectId)
select x).Count();
@ -799,7 +821,7 @@ namespace FineUIPro.Web.common
double result = 0;
Model.SGGLDB db = Funs.DB;
var ndtLists = from x in db.ProcessControl_NondestructiveTest_New where x.ProfessionalName == "工艺管道" select x;
if (pids!=null)
if (pids != null)
{
ndtLists = from x in db.ProcessControl_NondestructiveTest_New where x.ProfessionalName == "工艺管道" && pids.Contains(x.ProjectId) select x;
}
@ -886,7 +908,8 @@ namespace FineUIPro.Web.common
select x).Count();
gjsxZdl = Math.Round((100.0 * ywcnum / znum), 2).ToString();
}
else {
else
{
//Check_JointCheck
var znum = (from x in Funs.DB.GJSX
where pids.Contains(x.ProjectId)
@ -928,8 +951,9 @@ namespace FineUIPro.Web.common
{
getallin = APIPageDataService.getPersonNumByCompany(DateTime.Now);
}
else {
getallin = APIPageDataService.getPersonNumByCompany(DateTime.Now,pids);
else
{
getallin = APIPageDataService.getPersonNumByCompany(DateTime.Now, pids);
}
AllCount = getallin.Count();
if (AllCount > 0)
@ -954,9 +978,10 @@ namespace FineUIPro.Web.common
var list = new List<Model.Base_Project>();
if (pids == null)
{
list= Funs.DB.Base_Project.Where(x => (x.ProjectState == Const.ProjectState_1 || x.ProjectState == null)).ToList();
list = Funs.DB.Base_Project.Where(x => (x.ProjectState == Const.ProjectState_1 || x.ProjectState == null)).ToList();
}
else {
else
{
list = Funs.DB.Base_Project.Where(x => pids.Contains(x.ProjectId)).ToList();
}
@ -981,10 +1006,11 @@ namespace FineUIPro.Web.common
{
list = Funs.DB.Base_Project.Where(x => (x.ProjectState == Const.ProjectState_1 || x.ProjectState == null) && x.Progress != null).ToList();
}
else {
else
{
list = Funs.DB.Base_Project.Where(x => pids.Contains(x.ProjectId) && x.Progress != null).ToList();
}
if (list.Count>0)
if (list.Count > 0)
{
foreach (var item in list)
{
@ -1011,16 +1037,17 @@ namespace FineUIPro.Web.common
/// 获取隐患整改闭环项
/// </summary>
/// <returns></returns>
public int GetGeneralClosedNum()
public int GetGeneralClosedNum()
{
int result = 0;
if (pids==null)
if (pids == null)
{
result = (from x in Funs.DB.HSSE_Hazard_HazardRegister
where x.States == "3"
select x).Count();
}
else {
else
{
result = (from x in Funs.DB.HSSE_Hazard_HazardRegister
where x.States == "3" && pids.Contains(x.ProjectId)
select x).Count();
@ -1032,7 +1059,7 @@ namespace FineUIPro.Web.common
/// 获取隐患未整改完成项
/// </summary>
/// <returns></returns>
public int GetGeneralNotClosedNum()
public int GetGeneralNotClosedNum()
{
int result = 0;
if (pids == null)
@ -1041,7 +1068,8 @@ namespace FineUIPro.Web.common
where x.States != "3"
select x).Count();
}
else {
else
{
result = (from x in Funs.DB.HSSE_Hazard_HazardRegister
where x.States != "3" && pids.Contains(x.ProjectId)
select x).Count();
@ -1192,7 +1220,7 @@ namespace FineUIPro.Web.common
/// 获取未遂事件数
/// </summary>
/// <returns></returns>
private int GetNearMissNum()
private int GetNearMissNum()
{
if (pids == null)
{
@ -1202,7 +1230,8 @@ namespace FineUIPro.Web.common
select x).Count();
return result;
}
else {
else
{
var result = (from x in Funs.DB.Accident_AccidentPersonRecord
join y in Funs.DB.Base_AccidentType on x.AccidentTypeId equals y.AccidentTypeId
where x.IsAttempt == "1" && x.CompileDate > Const.DtmarkTime