2023/10/31

This commit is contained in:
李鹏飞 2023-10-31 18:03:55 +08:00
parent 31cf6d6508
commit f93ed7c829
31 changed files with 3748 additions and 785 deletions

Binary file not shown.

View File

@ -0,0 +1,306 @@
alter table dbo.Solution_CQMSConstructSolution
add Content NVARCHAR(2000)
go
exec sp_addextendedproperty 'MS_Description', N'正文', 'SCHEMA', 'dbo', 'TABLE', 'Solution_CQMSConstructSolution',
'COLUMN', 'Content'
go
--
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
,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
,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.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.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.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.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.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.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.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.IsOnSite=1 and
Machine.NextTestDate<getdate()
ORDER BY DataTime DESC
END

View File

@ -65,6 +65,7 @@ namespace BLL
newConstructSolution.State = constructSolution.State;
newConstructSolution.Edition = constructSolution.Edition;
newConstructSolution.SpecialSchemeTypeId = constructSolution.SpecialSchemeTypeId;
newConstructSolution.Content= constructSolution.Content;
db.Solution_CQMSConstructSolution.InsertOnSubmit(newConstructSolution);
db.SubmitChanges();
}
@ -86,6 +87,7 @@ namespace BLL
newConstructSolution.State = constructSolution.State;
newConstructSolution.Edition = constructSolution.Edition;
newConstructSolution.SpecialSchemeTypeId = constructSolution.SpecialSchemeTypeId;
newConstructSolution.Content= constructSolution.Content;
db.SubmitChanges();
}

View File

@ -717,10 +717,18 @@ namespace FineUIPro.Web.AttachFile
{
this.toolBar.Hidden = false;
}
else if (this.Type == "-1")
else if (this.Type == "-1")
{
this.toolBar.Hidden = true;
}
else if (this.Type == "-2") //方案审核只保留文档编辑
{
this.toolBar.Hidden = false;
btnImageMagnify.Hidden = true;
btnSelectFiles.Hidden = true;
btnDelete.Hidden = true;
btnSave.Hidden = true;
}
else
{
if (this.CurrUser != null && this.MenuId != Const.ProjectPunishNoticeStatisticsMenuId)

View File

@ -144,6 +144,28 @@
</f:DropDownBox>--%>
</Items>
</f:FormRow>
<f:FormRow runat="server">
<Items>
<f:TabStrip ID="TabStrip1" IsFluid="true" Height="500px" ShowBorder="true" TabPosition="Top"
EnableTabCloseMenu="false" ActiveTabIndex="0" runat="server">
<Tabs>
<f:Tab Title="正文" BodyPadding="10px"
runat="server">
<Items>
<f:SimpleForm ID="SimpleForm2" ShowBorder="false"
ShowHeader="false" Title="SimpleForm1" LabelWidth="120px" runat="server">
<Items>
<f:HtmlEditor runat="server" Label=" " ID="txtDocContent" ShowLabel="false"
Editor="UMEditor" BasePath="~/res/umeditor/" ToolbarSet="Full" Height="500px" LabelAlign="Right" Text="">
</f:HtmlEditor>
</Items>
</f:SimpleForm>
</Items>
</f:Tab>
</Tabs>
</f:TabStrip>
</Items>
</f:FormRow><%--
<f:FormRow>
<Items>
<f:Panel ID="plfile" ShowHeader="false" ShowBorder="false" Layout="Column" runat="server">
@ -159,7 +181,7 @@
</Items>
</f:Panel>
</Items>
</f:FormRow>
</f:FormRow>--%>
</Rows>
</f:Form>
</f:ContentPanel>

View File

@ -1,4 +1,5 @@
using BLL;
using Model;
using System;
using System.Collections.Generic;
using System.Linq;
@ -69,6 +70,8 @@ namespace FineUIPro.Web.CQMS.Solution
{
txtEdition.Text = constructSolution.Edition.ToString();
}
txtDocContent.Text = HttpUtility.HtmlDecode(constructSolution.Content);
bindApprove();
BindZYRole();
BindZLRole();
@ -115,6 +118,8 @@ namespace FineUIPro.Web.CQMS.Solution
BLL.CQMSConstructSolutionApproveService.UpdateConstructSolutionApprove(approve);
}
}
AddAttachTab();
}
}
}
@ -354,6 +359,15 @@ namespace FineUIPro.Web.CQMS.Solution
gvApprove.DataSource = list;
gvApprove.DataBind();
}
private void AddAttachTab()
{
PageContext.RegisterStartupScript(TabStrip1.GetAddTabReference("dynamic_tab2",
String.Format("../../AttachFile/webuploader.aspx?type={0}&toKeyId={1}&path=FileUpload/Solution&menuId={2}",
-1, ConstructSolutionId, Const.CQMSConstructSolutionMenuId), "附件",
IconHelper.GetIconUrl(Icon.Attach), false));
// PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/DocManage&menuId={1}", hdDocId.Text, Const.DocManageMenuId)));
}
public string man(Object man)
{

View File

@ -7,11 +7,13 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.CQMS.Solution {
public partial class ConstructSolutionView {
namespace FineUIPro.Web.CQMS.Solution
{
public partial class ConstructSolutionView
{
/// <summary>
/// form1 控件。
/// </summary>
@ -20,7 +22,7 @@ namespace FineUIPro.Web.CQMS.Solution {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
@ -29,7 +31,7 @@ namespace FineUIPro.Web.CQMS.Solution {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// SimpleForm1 控件。
/// </summary>
@ -38,7 +40,7 @@ namespace FineUIPro.Web.CQMS.Solution {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form SimpleForm1;
/// <summary>
/// ContentPanel2 控件。
/// </summary>
@ -47,7 +49,7 @@ namespace FineUIPro.Web.CQMS.Solution {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ContentPanel ContentPanel2;
/// <summary>
/// Form2 控件。
/// </summary>
@ -56,7 +58,7 @@ namespace FineUIPro.Web.CQMS.Solution {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form Form2;
/// <summary>
/// txtProjectName 控件。
/// </summary>
@ -65,7 +67,7 @@ namespace FineUIPro.Web.CQMS.Solution {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtProjectName;
/// <summary>
/// txtCode 控件。
/// </summary>
@ -74,7 +76,7 @@ namespace FineUIPro.Web.CQMS.Solution {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtCode;
/// <summary>
/// drpUnit 控件。
/// </summary>
@ -83,7 +85,7 @@ namespace FineUIPro.Web.CQMS.Solution {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox drpUnit;
/// <summary>
/// txtSolutionName 控件。
/// </summary>
@ -92,7 +94,7 @@ namespace FineUIPro.Web.CQMS.Solution {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtSolutionName;
/// <summary>
/// drpModelType 控件。
/// </summary>
@ -101,7 +103,7 @@ namespace FineUIPro.Web.CQMS.Solution {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox drpModelType;
/// <summary>
/// txtSpecialType 控件。
/// </summary>
@ -110,7 +112,7 @@ namespace FineUIPro.Web.CQMS.Solution {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtSpecialType;
/// <summary>
/// txtCompileDate 控件。
/// </summary>
@ -119,7 +121,7 @@ namespace FineUIPro.Web.CQMS.Solution {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtCompileDate;
/// <summary>
/// txtEdition 控件。
/// </summary>
@ -128,7 +130,7 @@ namespace FineUIPro.Web.CQMS.Solution {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox txtEdition;
/// <summary>
/// txtCNProfessional 控件。
/// </summary>
@ -137,7 +139,7 @@ namespace FineUIPro.Web.CQMS.Solution {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtCNProfessional;
/// <summary>
/// txtUnitWork 控件。
/// </summary>
@ -146,25 +148,34 @@ namespace FineUIPro.Web.CQMS.Solution {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtUnitWork;
/// <summary>
/// plfile 控件。
/// TabStrip1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel plfile;
protected global::FineUIPro.TabStrip TabStrip1;
/// <summary>
/// imgBtnFile 控件。
/// SimpleForm2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button imgBtnFile;
protected global::FineUIPro.SimpleForm SimpleForm2;
/// <summary>
/// txtDocContent 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HtmlEditor txtDocContent;
/// <summary>
/// Panel2 控件。
/// </summary>
@ -173,7 +184,7 @@ namespace FineUIPro.Web.CQMS.Solution {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel2;
/// <summary>
/// Panel1 控件。
/// </summary>
@ -182,7 +193,7 @@ namespace FineUIPro.Web.CQMS.Solution {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// trOne 控件。
/// </summary>
@ -191,7 +202,7 @@ namespace FineUIPro.Web.CQMS.Solution {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Tree trOne;
/// <summary>
/// Panel3 控件。
/// </summary>
@ -200,7 +211,7 @@ namespace FineUIPro.Web.CQMS.Solution {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel3;
/// <summary>
/// trTwo 控件。
/// </summary>
@ -209,7 +220,7 @@ namespace FineUIPro.Web.CQMS.Solution {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Tree trTwo;
/// <summary>
/// Panel4 控件。
/// </summary>
@ -218,7 +229,7 @@ namespace FineUIPro.Web.CQMS.Solution {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel4;
/// <summary>
/// trThree 控件。
/// </summary>
@ -227,7 +238,7 @@ namespace FineUIPro.Web.CQMS.Solution {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Tree trThree;
/// <summary>
/// Panel5 控件。
/// </summary>
@ -236,7 +247,7 @@ namespace FineUIPro.Web.CQMS.Solution {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel5;
/// <summary>
/// trFour 控件。
/// </summary>
@ -245,7 +256,7 @@ namespace FineUIPro.Web.CQMS.Solution {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Tree trFour;
/// <summary>
/// Panel6 控件。
/// </summary>
@ -254,7 +265,7 @@ namespace FineUIPro.Web.CQMS.Solution {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel6;
/// <summary>
/// trFive 控件。
/// </summary>
@ -263,7 +274,7 @@ namespace FineUIPro.Web.CQMS.Solution {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Tree trFive;
/// <summary>
/// Panel7 控件。
/// </summary>
@ -272,7 +283,7 @@ namespace FineUIPro.Web.CQMS.Solution {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel7;
/// <summary>
/// trSixe 控件。
/// </summary>
@ -281,7 +292,7 @@ namespace FineUIPro.Web.CQMS.Solution {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Tree trSixe;
/// <summary>
/// plApprove2 控件。
/// </summary>
@ -290,7 +301,7 @@ namespace FineUIPro.Web.CQMS.Solution {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.FormRow plApprove2;
/// <summary>
/// gvApprove 控件。
/// </summary>
@ -299,7 +310,7 @@ namespace FineUIPro.Web.CQMS.Solution {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid gvApprove;
/// <summary>
/// Label1 控件。
/// </summary>
@ -308,7 +319,7 @@ namespace FineUIPro.Web.CQMS.Solution {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label1;
/// <summary>
/// Label3 控件。
/// </summary>
@ -317,7 +328,7 @@ namespace FineUIPro.Web.CQMS.Solution {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label3;
/// <summary>
/// Label2 控件。
/// </summary>
@ -326,7 +337,7 @@ namespace FineUIPro.Web.CQMS.Solution {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label2;
/// <summary>
/// WindowAtt 控件。
/// </summary>

View File

@ -1,10 +1,11 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EditConstructSolution.aspx.cs" Inherits="FineUIPro.Web.CQMS.Solution.EditConstructSolution" %>
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EditConstructSolution.aspx.cs" Inherits="FineUIPro.Web.CQMS.Solution.EditConstructSolution" ValidateRequest="false" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>施工方案</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
<style type="text/css">
.labcenter {
@ -110,7 +111,29 @@
</f:DatePicker>
</Items>
</f:FormRow>
<f:FormRow>
<f:FormRow runat="server">
<Items>
<f:TabStrip ID="TabStrip1" IsFluid="true" Height="500px" ShowBorder="true" TabPosition="Top"
EnableTabCloseMenu="false" ActiveTabIndex="0" runat="server">
<Tabs>
<f:Tab Title="正文" BodyPadding="10px"
runat="server">
<Items>
<f:SimpleForm ID="SimpleForm2" ShowBorder="false"
ShowHeader="false" Title="SimpleForm1" LabelWidth="120px" runat="server">
<Items>
<f:HtmlEditor runat="server" Label=" " ID="txtDocContent" ShowLabel="false"
Editor="UMEditor" BasePath="~/res/umeditor/" ToolbarSet="Full" Height="500px" LabelAlign="Right" Text="">
</f:HtmlEditor>
</Items>
</f:SimpleForm>
</Items>
</f:Tab>
</Tabs>
</f:TabStrip>
</Items>
</f:FormRow>
<%-- <f:FormRow Hidden="True">
<Items>
<f:Panel ShowHeader="false" ShowBorder="false" Layout="Column" runat="server">
<Items>
@ -120,13 +143,19 @@
</Items>
</f:Panel>
</Items>
</f:FormRow>
</f:FormRow>--%>
</Rows>
</f:Form>
</f:ContentPanel>
</Items>
</f:FormRow>
<f:FormRow>
<f:FormRow runat="server">
<Items>
<f:TextBox runat="server" ID="txtCopyMan" Label="总包会签人员" Readonly="True" Enabled="False"/>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:Panel ID="Panel2" IsFluid="true" CssClass="mytable blockpanel" runat="server" AutoScroll="true" ShowBorder="true"
Layout="Table" TableConfigColumns="3" ShowHeader="true" Title="总包会签">
@ -276,5 +305,17 @@
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="700px"
Height="500px">
</f:Window>
<script>
// 返回false来阻止浏览器右键菜单
function onRowContextMenu(event, rowId) {
F(menuID).show(); //showAt(event.pageX, event.pageY);
return false;
}
function ButtonClick(event) {
// 第一个参数 false 用来指定当前不是AJAX请求
__doPostBack(false, '', 'ButtonClick');
}
</script>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@ -168,13 +168,40 @@ namespace FineUIPro.Web.CQMS.Solution
protected global::FineUIPro.DatePicker txtCompileDate;
/// <summary>
/// imgBtnFile 控件。
/// TabStrip1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button imgBtnFile;
protected global::FineUIPro.TabStrip TabStrip1;
/// <summary>
/// SimpleForm2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.SimpleForm SimpleForm2;
/// <summary>
/// txtDocContent 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HtmlEditor txtDocContent;
/// <summary>
/// txtCopyMan 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtCopyMan;
/// <summary>
/// Panel2 控件。

View File

@ -158,7 +158,7 @@ namespace FineUIPro.Web.DataShow
/// <summary>
/// 总工时
/// 在用计量器具
/// </summary>
/// <param name="state"></param>
/// <returns></returns>
@ -187,7 +187,7 @@ namespace FineUIPro.Web.DataShow
}
/// <summary>
/// 损失工时
/// 校验合格
/// </summary>
/// <param name="state"></param>
/// <returns></returns>

View File

@ -0,0 +1,130 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="NCRStatisc.aspx.cs" Inherits="FineUIPro.Web.DataShowLocal.NCRStatisc" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<link href="~/res/css/common.css" rel="stylesheet" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="~/Controls/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
<title>计量器具</title>
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
ShowHeader="true" Layout="VBox" BoxConfigAlign="Stretch">
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="NCR数据" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="ProjectId" DataIDField="ProjectId" AllowSorting="true"
SortField="ProjectName" SortDirection="ASC" OnSort="Grid1_Sort" EnableColumnLines="true" AllowPaging="true"
IsDatabasePaging="true" PageSize="20" OnPageIndexChange="Grid1_PageIndexChange" ForceFit="true"
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:DropDownList ID="drpProject" runat="server" Label="项目" Width="400px" LabelWidth="80px" LabelAlign="Right"
EnableEdit="true" OnSelectedIndexChanged="TextBox_TextChanged" AutoPostBack="true">
</f:DropDownList>
<f:DatePicker ID="txtStartTime" runat="server" Label="时间" LabelAlign="Right"
AutoPostBack="true" OnTextChanged="TextBox_TextChanged" Width="200px" LabelWidth="80px">
</f:DatePicker>
<f:Label ID="Label3" runat="server" Text="至">
</f:Label>
<f:DatePicker ID="txtEndTime" runat="server" AutoPostBack="true" OnTextChanged="TextBox_TextChanged"
Width="130px">
</f:DatePicker>
<f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="btnClose" EnablePostBack="false" ToolTip="关闭" Text="关闭" runat="server" Icon="SystemClose" OnClientClick="closeNow();">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Columns>
<f:TemplateField ColumnID="tfNumber" Width="55px" HeaderText="序号" HeaderTextAlign="Center"
TextAlign="Center">
<ItemTemplate>
<asp:Label ID="labNumber" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField Width="150px" ColumnID="ProjectCode" DataField="ProjectCode" FieldType="String" HeaderText="项目号" TextAlign="Left"
HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="350px" ColumnID="ProjectName" DataField="ProjectName" FieldType="String" HeaderText="项目名称" TextAlign="Left"
HeaderTextAlign="Center">
</f:RenderField>
<f:TemplateField ColumnID="Count1" Width="120px" HeaderText="NCR总数" HeaderTextAlign="Center" TextAlign="Right">
<ItemTemplate>
<asp:Label ID="Label2" runat="server" Text='<%# Count1(Eval("ProjectId")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:TemplateField ColumnID="Count2" Width="120px" HeaderText="整改闭环项" HeaderTextAlign="Center" TextAlign="Right">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Count2(Eval("ProjectId")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:TemplateField ColumnID="Count3" Width="120px" HeaderText="未整改闭环项" HeaderTextAlign="Center" TextAlign="Right">
<ItemTemplate>
<asp:Label ID="Label4" runat="server" Text='<%# Count3(Eval("ProjectId")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:TemplateField ColumnID="Count4" Width="120px" HeaderText="整改率" HeaderTextAlign="Center" TextAlign="Right">
<ItemTemplate>
<asp:Label ID="Label5" runat="server" Text='<%# Count4(Eval("ProjectId")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
</Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
</Listeners>
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator>
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
</f:ToolbarText>
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
</f:DropDownList>
</PageItems>
</f:Grid>
</Items>
</f:Panel>
<f:Window ID="Window1" Title="详情" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close"
Width="1200px" Height="620px" Maximized="true">
</f:Window>
<f:Menu ID="Menu1" runat="server">
<Items>
<f:MenuButton ID="btnView" EnablePostBack="true" runat="server"
Text="查看" Icon="Find" OnClick="btnView_Click">
</f:MenuButton>
</Items>
</f:Menu>
</form>
<script type="text/javascript">
var menuID = '<%= Menu1.ClientID %>';
// 返回false来阻止浏览器右键菜单
function onRowContextMenu(event, rowId) {
F(menuID).show(); //showAt(event.pageX, event.pageY);
return false;
}
// 点击标题栏工具图标 - 退出
function closeNow(event) {
var bConfirmed = confirm('您确定要退出吗?');
if (bConfirmed) { closePage(); }
}
function closePage() {
if (navigator.userAgent.indexOf('Firefox') !== -1 || navigator.userAgent.indexOf('Chrome') !== -1) {
window.location.href = "about:blank";
window.close();
} else {
window.opener = null;
window.open("", "_self");
window.close();
}
}
</script>
</body>
</html>

View File

@ -0,0 +1,242 @@
using BLL;
using NPOI.SS.Formula.Functions;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Runtime.InteropServices.ComTypes;
using System.Runtime.Remoting.Metadata.W3cXsd2001;
namespace FineUIPro.Web.DataShowLocal
{
public partial class NCRStatisc : PageBase
{
#region
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
Funs.DropDownPageSize(this.ddlPageSize);
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
BLL.ProjectService.InitProjectDropDownList(this.drpProject, true);
// 绑定表格t
BindGrid();
this.Panel1.Title = "NCR数据" + BLL.UnitService.GetUnitNameByUnitId(BLL.Const.UnitId_CWCEC) + "";
}
}
/// <summary>
/// 绑定数据
/// </summary>
private void BindGrid()
{
string strSql = @"select ProjectId,ProjectCode, ProjectName from Base_Project where ProjectState =1";
List<SqlParameter> listStr = new List<SqlParameter>();
string cpara = string.Empty;
if (this.drpProject.SelectedValue != Const._Null)
{
strSql += " AND projectId = @projectId"; ///状态为已完成
listStr.Add(new SqlParameter("@projectId", this.drpProject.SelectedValue));
}
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
Grid1.RecordCount = tb.Rows.Count;
var table = this.GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table;
Grid1.DataBind();
}
#endregion
#region
/// <summary>
/// 查询
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void TextBox_TextChanged(object sender, EventArgs e)
{
this.BindGrid();
}
#endregion
#region
/// <summary>
/// 分页
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
{
BindGrid();
}
/// <summary>
/// 排序
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_Sort(object sender, GridSortEventArgs e)
{
BindGrid();
}
/// <summary>
/// 分页显示条数下拉框
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
{
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
BindGrid();
}
/// <summary>
/// 关闭弹出窗
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Window1_Close(object sender, WindowCloseEventArgs e)
{
BindGrid();
}
#endregion
#region Grid双击事件
/// <summary>
/// Grid行双击事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
{
EditData();
}
/// <summary>
///
/// </summary>
private void EditData()
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
return;
}
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("NCRStatiscItem.aspx?projectId={0}", Grid1.SelectedRowID, "查看 - ")));
}
#endregion
protected void btnView_Click(object sender, EventArgs e)
{
EditData();
}
/// <summary>
/// NCR总数
/// </summary>
/// <param name="state"></param>
/// <returns></returns>
protected int Count1(object projectId)
{
int cout1 = 0;
if (projectId != null)
{
var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text);
var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text);
var getD1 = from x in Funs.DB.Comprehensive_NCRManagement where x.ProjectId == projectId.ToString() select x;
if (datetime1.HasValue)
{
getD1 = getD1.Where(x => x.IssuedDate >= datetime1);
}
if (datetime2.HasValue)
{
getD1 = getD1.Where(x => x.IssuedDate <= datetime2);
}
cout1 = getD1.Count();
}
return cout1;
}
/// <summary>
/// 整改闭环项
/// </summary>
/// <param name="state"></param>
/// <returns></returns>
protected int Count2(object projectId)
{
int cout1 = 0;
if (projectId != null)
{
var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text);
var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text);
var getD1 = from x in Funs.DB.Comprehensive_NCRManagement where x.ProjectId == projectId.ToString() && x.Status=="3"
select x;
if (datetime1.HasValue)
{
getD1 = getD1.Where(x => x.IssuedDate >= datetime1);
}
if (datetime2.HasValue)
{
getD1 = getD1.Where(x => x.IssuedDate <= datetime2);
}
cout1 = getD1.Count();
}
return cout1;
}
protected int Count3(object projectId)
{
int cout1 = 0;
if (projectId != null)
{
var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text);
var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text);
var getD1 = from x in Funs.DB.Comprehensive_NCRManagement where x.ProjectId == projectId.ToString() && ( x.Status != "3" || x.Status == null) select x;
if (datetime1.HasValue)
{
getD1 = getD1.Where(x => x.IssuedDate >= datetime1);
}
if (datetime2.HasValue)
{
getD1 = getD1.Where(x => x.IssuedDate <= datetime2);
}
cout1 = getD1.Count();
}
return cout1;
}
protected string Count4(object projectId)
{
string result = "";
if (projectId != null)
{
if (Count1(projectId) != 0)//被除数不能为零
{
result = Math.Round((double)Count2(projectId) / (double)Count1(projectId) * 100, 2) + "%";//保留两位小数、后四舍五入
}
else
{
result = "0%";
}
}
return result;
}
}
}

View File

@ -0,0 +1,206 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.DataShowLocal
{
public partial class NCRStatisc
{
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Panel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// Grid1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// Toolbar2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar2;
/// <summary>
/// drpProject 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpProject;
/// <summary>
/// txtStartTime 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtStartTime;
/// <summary>
/// Label3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label Label3;
/// <summary>
/// txtEndTime 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtEndTime;
/// <summary>
/// btnClose 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnClose;
/// <summary>
/// labNumber 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label labNumber;
/// <summary>
/// Label2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label2;
/// <summary>
/// Label1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label1;
/// <summary>
/// Label4 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label4;
/// <summary>
/// Label5 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label5;
/// <summary>
/// ToolbarSeparator1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
/// <summary>
/// ToolbarText1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarText ToolbarText1;
/// <summary>
/// ddlPageSize 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlPageSize;
/// <summary>
/// Window1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window1;
/// <summary>
/// Menu1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Menu Menu1;
/// <summary>
/// btnView 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnView;
}
}

View File

@ -0,0 +1,88 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="NCRStatiscItem.aspx.cs" Inherits="FineUIPro.Web.DataShowLocal.NCRStatiscItem" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
<Items>
<f:Grid ID="Grid1" Title="NCR统计" IsFluid="true" CssClass="blockpanel" ShowBorder="true" ShowHeader="false" runat="server" EnableCollapse="true" SortDirection="DESC" BoxFlex="1" AllowCellEditing="true"
DataKeyNames="DesignId" EnableColumnLines="true" ClicksToEdit="2" AllowSorting="true" AllowPaging="true" IsDatabasePaging="true" PageSize="10" ForceFit="true"
AllowFilters="true" EnableTextSelection="True" >
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:DatePicker runat="server" DateFormatString="yyyy-MM-dd" Label="开始日期" ID="txtStartDate" LabelAlign="right" LabelWidth="110px">
</f:DatePicker>
<f:DatePicker runat="server" DateFormatString="yyyy-MM-dd" Label="结束日期" ID="txtEndDate" LabelAlign="right" LabelWidth="110px">
</f:DatePicker>
<f:RadioButtonList runat="server" ID="ckType" AutoPostBack="True" Width="200px"
OnSelectedIndexChanged="ckType_SelectedIndexChanged">
<f:RadioItem Value="1" Text="按接收单位"></f:RadioItem>
<f:RadioItem Value="2" Text="按专业" Selected="True"></f:RadioItem>
</f:RadioButtonList>
<f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="btnSearch" Icon="SystemSearch"
EnablePostBack="true" runat="server" OnClick="btnSearch_Click">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Columns>
<f:TemplateField ColumnID="tfPageIndex" Width="55px" HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center"
EnableLock="true" Locked="False">
<ItemTemplate>
<asp:Label ID="lblPageIndex" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField Width="130px" ColumnID="WorkName" DataField="WorkName"
FieldType="String" HeaderText="专业" TextAlign="Center"
HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="CheckNum" DataField="CheckNum"
FieldType="String" HeaderText="NCR总数" TextAlign="Center" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="110px" ColumnID="OKNum" DataField="OKNum"
FieldType="String" HeaderText="已完成" TextAlign="Center" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="80px" ColumnID="NotOKNum" DataField="NotOKNum"
FieldType="String" HeaderText="未完成" TextAlign="Center" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="80px" ColumnID="OKRate" DataField="OKRate"
FieldType="String" HeaderText="完成比例" TextAlign="Center" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="Remark" DataField="Remark"
FieldType="String" HeaderText="备注" TextAlign="Center" HeaderTextAlign="Center">
</f:RenderField>
</Columns>
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator>
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
</f:ToolbarText>
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true" OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
<f:ListItem Text="10" Value="10" />
<f:ListItem Text="15" Value="15" />
<f:ListItem Text="20" Value="20" />
<f:ListItem Text="25" Value="25" />
<f:ListItem Text="所有行" Value="100000" />
</f:DropDownList>
<f:ToolbarFill runat="server">
</f:ToolbarFill>
</PageItems>
</f:Grid>
</Items>
</f:Panel>
</form>
</body>
</html>

View File

@ -0,0 +1,166 @@
using BLL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.DataShowLocal
{
public partial class NCRStatiscItem : PageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
string projectId = Request.Params["projectId"];
Model.Base_Project project = BLL.ProjectService.GetProjectByProjectId(projectId);
this.txtStartDate.Text = "2015-01-01";
this.txtEndDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
if (project != null)
{
if (project.StartDate != null)
{
this.txtStartDate.Text = string.Format("{0:yyyy-MM-dd}", project.StartDate);
}
}
BindStatisc(projectId);
}
}
protected void btnSearch_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(this.txtStartDate.Text.Trim()) || string.IsNullOrEmpty(this.txtEndDate.Text.Trim()))
{
Alert.ShowInTop("开始和结束日期不能为空!", MessageBoxIcon.Warning);
return;
}
if (Convert.ToDateTime(this.txtStartDate.Text.Trim()) >= Convert.ToDateTime(this.txtEndDate.Text.Trim()))
{
Alert.ShowInTop("开始日期不能大于结束日期!", MessageBoxIcon.Warning);
return;
}
string projectId = Request.Params["projectId"];
BindStatisc(projectId);
}
#region GridView
/// <summary>
/// 绑定
/// </summary>
/// <param name="projectid"></param>
/// <param name="cNProfessionalId"></param>
public void BindStatisc(string projectid)
{
DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text.Trim());
DateTime endDate = Convert.ToDateTime(this.txtEndDate.Text.Trim());
//DateTime projectStartDate = Convert.ToDateTime("2015-01-01");
List<Model.NCRStatisc> StatisticsList = new List<Model.NCRStatisc>();
//Model.Base_Project project = BLL.ProjectService.getProjectByProjectId(this.CurrUser.LoginProjectId);
//if (project != null)
//{
// if (project.StartDate != null)
// {
// projectStartDate = Convert.ToDateTime(project.StartDate);
// }
//}
int i = 1;
if (this.ckType.SelectedValue == "1") //按单位
{
//所有集合
List<Model.Comprehensive_NCRManagement> totalManagementList = BLL.NCRManagementService.GetNCRManagementListByDate(projectid, startDate, endDate);
List<string> unitNames = (from x in totalManagementList select x.ReceiveUnit).Distinct().ToList();
foreach (var item in unitNames)
{
//当期集合
List<Model.Comprehensive_NCRManagement> managementList = BLL.NCRManagementService.GetNCRManagementListByUnitNameAndDate(projectid, item, startDate, endDate);
Model.NCRStatisc NCRStatisc = new Model.NCRStatisc();
NCRStatisc.Num = i;
NCRStatisc.WorkName = BLL.UnitService.getUnitNamesUnitIds(item);
NCRStatisc.CheckNum = managementList.Count();
NCRStatisc.OKNum = managementList.Count(x => x.Status == "3");
NCRStatisc.NotOKNum = managementList.Count(x => x.Status != "3");
NCRStatisc.Remark = "";
if (NCRStatisc.CheckNum != 0)//被除数不能为零
{
NCRStatisc.OKRate = Math.Round((double)NCRStatisc.OKNum / (double)NCRStatisc.CheckNum * 100, 2) + "%";//保留两位小数、后四舍五入
}
else
{
NCRStatisc.OKRate = "0%";
}
StatisticsList.Add(NCRStatisc);
i++;
}
}
else //按专业
{
var cNProfessionals = from x in Funs.DB.Base_CNProfessional where x.CNProfessionalId != Const.CNProfessionalConstructId orderby x.SortIndex select x;
foreach (var item in cNProfessionals)
{
//所有集合
List<Model.Comprehensive_NCRManagement> managementList = BLL.NCRManagementService.GetNCRManagementListByCNProfessionalIdAndDate(projectid, item.CNProfessionalId, startDate, endDate);
Model.NCRStatisc NCRStatisc = new Model.NCRStatisc();
NCRStatisc.Num = i;
NCRStatisc.WorkName = item.ProfessionalName;
NCRStatisc.CheckNum = managementList.Count();
NCRStatisc.OKNum = managementList.Count(x => x.Status == "3");
NCRStatisc.NotOKNum = managementList.Count(x => x.Status != "3");
NCRStatisc.Remark = "";
if (NCRStatisc.CheckNum != 0)//被除数不能为零
{
NCRStatisc.OKRate = Math.Round((double)NCRStatisc.OKNum / (double)NCRStatisc.CheckNum * 100, 2) + "%";//保留两位小数、后四舍五入
}
else
{
NCRStatisc.OKRate = "0%";
}
StatisticsList.Add(NCRStatisc);
i++;
}
}
if (StatisticsList.Count() > 0) //增加总计
{
Model.NCRStatisc StatisticsLast = new Model.NCRStatisc();
StatisticsLast.Num = StatisticsList.Count() + 1;
StatisticsLast.WorkName = "合计";
StatisticsLast.Remark = "";
foreach (Model.NCRStatisc item in StatisticsList)
{
StatisticsLast.CheckNum += item.CheckNum;
StatisticsLast.OKNum += item.OKNum;
StatisticsLast.NotOKNum += item.NotOKNum;
}
if (StatisticsLast.CheckNum != 0)//被除数不能为零
{
StatisticsLast.OKRate = Math.Round((double)StatisticsLast.OKNum / (double)StatisticsLast.CheckNum * 100, 2) + "%";//保留两位小数、后四舍五入
}
else
{
StatisticsLast.OKRate = "0%";
}
StatisticsList.Add(StatisticsLast);
}
this.Grid1.DataSource = StatisticsList;
this.Grid1.DataBind();
}
#endregion
protected void ckType_SelectedIndexChanged(object sender, EventArgs e)
{
if (this.ckType.SelectedValue == "1")
{
this.Grid1.Columns[1].HeaderText = "接收单位";
}
else
{
this.Grid1.Columns[1].HeaderText = "专业";
}
BindStatisc(Request.Params["projectId"]);
}
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
{
BindStatisc(Request.Params["projectId"]);
}
}
}

View File

@ -0,0 +1,134 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.DataShowLocal
{
public partial class NCRStatiscItem
{
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Panel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// Grid1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// txtStartDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtStartDate;
/// <summary>
/// txtEndDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtEndDate;
/// <summary>
/// ckType 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.RadioButtonList ckType;
/// <summary>
/// btnSearch 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSearch;
/// <summary>
/// lblPageIndex 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblPageIndex;
/// <summary>
/// ToolbarSeparator1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
/// <summary>
/// ToolbarText1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarText ToolbarText1;
/// <summary>
/// ddlPageSize 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlPageSize;
}
}

View File

@ -0,0 +1,131 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="QualityInstruments.aspx.cs"
Inherits="FineUIPro.Web.DataShowLocal.QualityInstruments" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<link href="~/res/css/common.css" rel="stylesheet" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="~/Controls/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
<title>计量器具</title>
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
ShowHeader="true" Layout="VBox" BoxConfigAlign="Stretch">
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="计量器具" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="ProjectId" DataIDField="ProjectId" AllowSorting="true"
SortField="ProjectName" SortDirection="ASC" OnSort="Grid1_Sort" EnableColumnLines="true" AllowPaging="true"
IsDatabasePaging="true" PageSize="20" OnPageIndexChange="Grid1_PageIndexChange" ForceFit="true"
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:DropDownList ID="drpProject" runat="server" Label="项目" Width="400px" LabelWidth="80px" LabelAlign="Right"
EnableEdit="true" OnSelectedIndexChanged="TextBox_TextChanged" AutoPostBack="true">
</f:DropDownList>
<f:DatePicker ID="txtStartTime" runat="server" Label="时间" LabelAlign="Right"
AutoPostBack="true" OnTextChanged="TextBox_TextChanged" Width="200px" LabelWidth="80px">
</f:DatePicker>
<f:Label ID="Label3" runat="server" Text="至">
</f:Label>
<f:DatePicker ID="txtEndTime" runat="server" AutoPostBack="true" OnTextChanged="TextBox_TextChanged"
Width="130px">
</f:DatePicker>
<f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="btnClose" EnablePostBack="false" ToolTip="关闭" Text="关闭" runat="server" Icon="SystemClose" OnClientClick="closeNow();">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Columns>
<f:TemplateField ColumnID="tfNumber" Width="55px" HeaderText="序号" HeaderTextAlign="Center"
TextAlign="Center">
<ItemTemplate>
<asp:Label ID="labNumber" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField Width="150px" ColumnID="ProjectCode" DataField="ProjectCode" FieldType="String" HeaderText="项目号" TextAlign="Left"
HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="350px" ColumnID="ProjectName" DataField="ProjectName" FieldType="String" HeaderText="项目名称" TextAlign="Left"
HeaderTextAlign="Center">
</f:RenderField>
<f:TemplateField ColumnID="Count1" Width="120px" HeaderText="在用计量器具数" HeaderTextAlign="Center" TextAlign="Right">
<ItemTemplate>
<asp:Label ID="Label2" runat="server" Text='<%# Count1(Eval("ProjectId")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:TemplateField ColumnID="Count2" Width="120px" HeaderText="校验合格数" HeaderTextAlign="Center" TextAlign="Right">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Count2(Eval("ProjectId")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:TemplateField ColumnID="Count3" Width="120px" HeaderText="资质预警" HeaderTextAlign="Center" TextAlign="Right">
<ItemTemplate>
<asp:Label ID="Label4" runat="server" Text='<%# Count3(Eval("ProjectId")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:TemplateField ColumnID="Count4" Width="120px" HeaderText="机械预警" HeaderTextAlign="Center" TextAlign="Right">
<ItemTemplate>
<asp:Label ID="Label5" runat="server" Text='<%# Count4(Eval("ProjectId")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
</Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
</Listeners>
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator>
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
</f:ToolbarText>
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
</f:DropDownList>
</PageItems>
</f:Grid>
</Items>
</f:Panel>
<f:Window ID="Window1" Title="详情" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close"
Width="1200px" Height="620px" Maximized="true">
</f:Window>
<f:Menu ID="Menu1" runat="server">
<Items>
<f:MenuButton ID="btnView" EnablePostBack="true" runat="server"
Text="查看" Icon="Find" OnClick="btnView_Click">
</f:MenuButton>
</Items>
</f:Menu>
</form>
<script type="text/javascript">
var menuID = '<%= Menu1.ClientID %>';
// 返回false来阻止浏览器右键菜单
function onRowContextMenu(event, rowId) {
F(menuID).show(); //showAt(event.pageX, event.pageY);
return false;
}
// 点击标题栏工具图标 - 退出
function closeNow(event) {
var bConfirmed = confirm('您确定要退出吗?');
if (bConfirmed) { closePage(); }
}
function closePage() {
if (navigator.userAgent.indexOf('Firefox') !== -1 || navigator.userAgent.indexOf('Chrome') !== -1) {
window.location.href = "about:blank";
window.close();
} else {
window.opener = null;
window.open("", "_self");
window.close();
}
}
</script>
</body>
</html>

View File

@ -0,0 +1,253 @@
using BLL;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
namespace FineUIPro.Web.DataShowLocal
{
public partial class QualityInstruments : PageBase
{
#region
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
Funs.DropDownPageSize(this.ddlPageSize);
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
BLL.ProjectService.InitProjectDropDownList(this.drpProject, true);
// 绑定表格t
BindGrid();
this.Panel1.Title = "计量器具数据(" + BLL.UnitService.GetUnitNameByUnitId(BLL.Const.UnitId_CWCEC) + "";
}
}
/// <summary>
/// 绑定数据
/// </summary>
private void BindGrid()
{
string strSql = @"select ProjectId,ProjectCode, ProjectName from Base_Project where ProjectState =1";
List<SqlParameter> listStr = new List<SqlParameter>();
string cpara = string.Empty;
if (this.drpProject.SelectedValue != Const._Null)
{
strSql += " AND projectId = @projectId"; ///状态为已完成
listStr.Add(new SqlParameter("@projectId", this.drpProject.SelectedValue));
}
//if (!string.IsNullOrEmpty(this.txtStartTime.Text))
//{
// strSql += " AND h.RegisterDate >=@StartTime";
// listStr.Add(new SqlParameter("@StartTime", this.txtStartTime.Text));
// cpara += " AND c.RegisterDate >=" + this.txtStartTime.Text;
//}
//if (!string.IsNullOrEmpty(this.txtEndTime.Text))
//{
// strSql += " AND h.RegisterDate <=@EndTime";
// listStr.Add(new SqlParameter("@EndTime", this.txtEndTime.Text));
// cpara += " AND c.RegisterDate <=" + this.txtEndTime.Text;
//}
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
Grid1.RecordCount = tb.Rows.Count;
var table = this.GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table;
Grid1.DataBind();
}
#endregion
#region
/// <summary>
/// 查询
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void TextBox_TextChanged(object sender, EventArgs e)
{
this.BindGrid();
}
#endregion
#region
/// <summary>
/// 分页
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
{
BindGrid();
}
/// <summary>
/// 排序
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_Sort(object sender, GridSortEventArgs e)
{
BindGrid();
}
/// <summary>
/// 分页显示条数下拉框
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
{
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
BindGrid();
}
/// <summary>
/// 关闭弹出窗
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Window1_Close(object sender, WindowCloseEventArgs e)
{
BindGrid();
}
#endregion
#region Grid双击事件
/// <summary>
/// Grid行双击事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
{
EditData();
}
/// <summary>
///
/// </summary>
private void EditData()
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
return;
}
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("QualityInstrumentsItem.aspx?projectId={0}", Grid1.SelectedRowID, "查看 - ")));
}
#endregion
protected void btnView_Click(object sender, EventArgs e)
{
EditData();
}
/// <summary>
/// 在用计量器具数
/// </summary>
/// <param name="state"></param>
/// <returns></returns>
protected int Count1(object projectId)
{
int cout1 = 0;
if (projectId != null)
{
var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text);
var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text);
var getD1 = from x in Funs.DB.Comprehensive_InspectionMachine
where x.ProjectId == projectId.ToString() && x.IsOnSite == true && x.InspectionType.Contains("计量")
select x;
if (datetime1.HasValue)
{
getD1 = getD1.Where(x => x.CompileDate >= datetime1);
}
if (datetime2.HasValue)
{
getD1 = getD1.Where(x => x.CompileDate <= datetime2);
}
cout1 = getD1.Count();
}
return cout1;
}
/// <summary>
/// 校验合格数
/// </summary>
/// <param name="state"></param>
/// <returns></returns>
protected int Count2(object projectId)
{
int cout1 = 0;
if (projectId != null)
{
var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text);
var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text);
var getD1 = from x in Funs.DB.Comprehensive_InspectionMachine
where x.ProjectId == projectId.ToString() && x.IsOnSite == true && x.InspectionType.Contains("计量") && x.IsCheckOK == true
select x;
if (datetime1.HasValue)
{
getD1 = getD1.Where(x => x.CompileDate >= datetime1);
}
if (datetime2.HasValue)
{
getD1 = getD1.Where(x => x.CompileDate <= datetime2);
}
cout1 = getD1.Count();
}
return cout1;
}
protected int Count3(object projectId)
{
int result = 0;
if (projectId != null)
{
var getPersonQualitys = from x in Funs.DB.QualityAudit_PersonQuality
join y in Funs.DB.SitePerson_Person on x.PersonId equals y.PersonId
where x.LimitDate.HasValue && x.LimitDate < DateTime.Now && y.ProjectId==projectId.ToString()
select x;
//// 预警人数
result = getPersonQualitys.Count();
}
return result;
}
protected int Count4(object projectId)
{
int result = 0;
if (projectId != null)
{
//机具报验的到期提醒和过期提醒记录数加一起
//机具报验的到期提醒数
var num1 = Funs.DB.Comprehensive_InspectionMachine.Count(x => x.IsOnSite == true && DateTime.Now < x.NextTestDate
&& ((DateTime)x.NextTestDate).AddDays(-15) < DateTime.Now && x.ProjectId == projectId.ToString());
//过期提醒记录数
var num2 = Funs.DB.Comprehensive_InspectionMachine.Count(x => x.IsOnSite == true && x.NextTestDate < DateTime.Now
&& x.ProjectId == projectId.ToString());
return result = num1 + num2;
}
return result;
}
}
}

View File

@ -0,0 +1,206 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.DataShowLocal
{
public partial class QualityInstruments
{
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Panel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// Grid1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// Toolbar2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar2;
/// <summary>
/// drpProject 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpProject;
/// <summary>
/// txtStartTime 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtStartTime;
/// <summary>
/// Label3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label Label3;
/// <summary>
/// txtEndTime 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtEndTime;
/// <summary>
/// btnClose 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnClose;
/// <summary>
/// labNumber 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label labNumber;
/// <summary>
/// Label2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label2;
/// <summary>
/// Label1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label1;
/// <summary>
/// Label4 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label4;
/// <summary>
/// Label5 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label5;
/// <summary>
/// ToolbarSeparator1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
/// <summary>
/// ToolbarText1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarText ToolbarText1;
/// <summary>
/// ddlPageSize 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlPageSize;
/// <summary>
/// Window1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window1;
/// <summary>
/// Menu1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Menu Menu1;
/// <summary>
/// btnView 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnView;
}
}

View File

@ -0,0 +1,123 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="QualityInstrumentsItem.aspx.cs"
Inherits="FineUIPro.Web.DataShowLocal.QualityInstrumentsItem" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<link href="~/res/css/common.css" rel="stylesheet" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="~/Controls/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
<title>计量器具</title>
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
ShowHeader="true" Layout="VBox" BoxConfigAlign="Stretch">
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="计量器具" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="InspectionMachineId" DataIDField="InspectionMachineId" AllowSorting="true"
SortField="InspectionDate" SortDirection="DESC" OnSort="Grid1_Sort" EnableColumnLines="true" AllowPaging="true"
IsDatabasePaging="true" PageSize="20" OnPageIndexChange="Grid1_PageIndexChange" ForceFit="true" EnableTextSelection="True">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:TextBox ID="txtProject" runat="server" Label="项目" Width="500px"
LabelWidth="80px" Readonly="true" LabelAlign="Right">
</f:TextBox>
<f:DatePicker ID="txtStartTime" runat="server" Label="时间" LabelAlign="Right"
AutoPostBack="true" OnTextChanged="TextBox_TextChanged" Width="200px" LabelWidth="80px">
</f:DatePicker>
<f:Label ID="Label3" runat="server" Text="至">
</f:Label>
<f:DatePicker ID="txtEndTime" runat="server" AutoPostBack="true" OnTextChanged="TextBox_TextChanged"
Width="130px">
</f:DatePicker>
<f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="btnClose" EnablePostBack="false" ToolTip="关闭" Text="关闭" runat="server" Icon="SystemClose">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Columns>
<f:TemplateField ColumnID="tfNumber" Width="55px" HeaderText="序号" HeaderTextAlign="Center"
TextAlign="Center">
<ItemTemplate>
<asp:Label ID="labNumber" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField ColumnID="UnitName" DataField="UnitName" FieldType="String" HeaderText="报验单位" TextAlign="Center"
HeaderTextAlign="Center" Width="220px">
</f:RenderField>
<f:RenderField ColumnID="InspectionMachineCode" DataField="InspectionMachineCode" FieldType="String" HeaderText="报验编号" TextAlign="Center"
HeaderTextAlign="Center" Width="120px">
</f:RenderField>
<f:RenderField ColumnID="InspectionMachineName" DataField="InspectionMachineName" FieldType="String" HeaderText="名称" TextAlign="Center"
HeaderTextAlign="Center" Width="120px">
</f:RenderField>
<f:RenderField ColumnID="ProfessionalName" DataField="ProfessionalName" FieldType="String" HeaderText="专业" TextAlign="Center"
HeaderTextAlign="Center" Width="120px">
</f:RenderField>
<f:RenderField ColumnID="InspectionType" DataField="InspectionType" FieldType="String" HeaderText="类型" TextAlign="Center"
HeaderTextAlign="Center" Width="120px">
</f:RenderField>
<f:RenderField ColumnID="SpecificationModel" DataField="SpecificationModel" FieldType="String" HeaderText="规格型号" TextAlign="Center"
HeaderTextAlign="Center" Width="120px">
</f:RenderField>
<f:RenderField ColumnID="NextTestDate" DataField="NextTestDate" FieldType="Date" Renderer="Date" HeaderText="下次检验日期" TextAlign="Center"
HeaderTextAlign="Center" Width="120px">
</f:RenderField>
<f:RenderField ColumnID="TestCycle" DataField="TestCycle" FieldType="String" HeaderText="检验周期" TextAlign="Center"
HeaderTextAlign="Center" Width="120px">
</f:RenderField>
<f:RenderField ColumnID="IsVerification" DataField="IsVerification" FieldType="String" HeaderText="在校验期内" TextAlign="Center"
HeaderTextAlign="Center" Width="120px">
</f:RenderField>
<f:RenderField ColumnID="IsCheckOK" DataField="IsCheckOK" FieldType="String" HeaderText="校验合格" TextAlign="Center"
HeaderTextAlign="Center" Width="100px">
</f:RenderField>
<f:RenderField ColumnID="InspectionDate" DataField="InspectionDate" FieldType="Date" Renderer="Date" HeaderText="报验日期" TextAlign="Center"
HeaderTextAlign="Center" Width="120px">
</f:RenderField>
<f:RenderField ColumnID="UnitsCount" DataField="UnitsCount" FieldType="String" HeaderText="台数" TextAlign="Center"
HeaderTextAlign="Center" Width="120px">
</f:RenderField>
<f:RenderField ColumnID="LeaveDate" DataField="LeaveDate" FieldType="Date" Renderer="Date" HeaderText="离场时间" TextAlign="Center"
HeaderTextAlign="Center" Width="120px">
</f:RenderField>
<f:TemplateField ColumnID="AttachFile" Width="150px" HeaderText="附件" HeaderTextAlign="Center" TextAlign="Left" >
<ItemTemplate>
<asp:LinkButton ID="lbtnFileUrl" runat="server" CssClass="ItemLink"
Text='<%# BLL.AttachFileService.GetBtnFileUrl(Eval("InspectionMachineId")) %>' ToolTip="附件查看"></asp:LinkButton>
</ItemTemplate>
</f:TemplateField>
</Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
</Listeners>
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator>
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
</f:ToolbarText>
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
</f:DropDownList>
</PageItems>
</f:Grid>
</Items>
</f:Panel>
<f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true"
EnableMaximize="true" Target="Parent" EnableResize="false" runat="server"
IsModal="true" Width="700px" Height="500px">
</f:Window>
</form>
<script type="text/javascript">
// 返回false来阻止浏览器右键菜单
function onRowContextMenu(event, rowId) {
// F(menuID).show(); //showAt(event.pageX, event.pageY);
return false;
}
</script>
</body>
</html>

View File

@ -0,0 +1,131 @@
using BLL;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
namespace FineUIPro.Web.DataShowLocal
{
public partial class QualityInstrumentsItem : PageBase
{
#region
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
string projectId = Request.Params["projectId"];
this.txtProject.Text=ProjectService.GetProjectNameByProjectId(projectId);
Funs.DropDownPageSize(this.ddlPageSize);
btnClose.OnClientClick = ActiveWindow.GetHideReference();
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
// 绑定表格
BindGrid();
this.Panel1.Title = "计量器具数据(" + BLL.UnitService.GetUnitNameByUnitId(BLL.Const.UnitId_CWCEC) + "";
}
}
/// <summary>
/// 绑定数据
/// </summary>
private void BindGrid()
{
string strSql = @"select InspectionMachineId, InspectionMachineCode, U.UnitName,CN.ProfessionalName ,Status,
InspectionMachineName, SpecificationModel, NextTestDate, TestCycle, C.InspectionDate,
(CASE WHEN IsVerification=1 THEN '是' WHEN IsVerification=0 THEN '否' ELSE '' END) AS IsVerification,(CASE WHEN IsCheckOK=1 THEN '是' WHEN IsCheckOK=0 THEN '否' ELSE '' END) AS IsCheckOK, InspectionType, LeaveDate, UnitsCount
from Comprehensive_InspectionMachine C
left join Base_Unit U on C.UnitId=U.UnitId
left join Base_CNProfessional CN on C.CNProfessionalId=CN.CNProfessionalId
where C.ProjectId = @ProjectId";
List<SqlParameter> listStr = new List<SqlParameter>();
strSql += " AND C.ProjectId = @ProjectId";
listStr.Add(new SqlParameter("@ProjectId", Request.Params["projectId"]));
if (!string.IsNullOrEmpty(txtStartTime.Text.Trim()))
{
strSql += " AND C.InspectionDate >= @StartTime";
listStr.Add(new SqlParameter("@StartTime", this.txtStartTime.Text.Trim()));
}
if (!string.IsNullOrEmpty(this.txtEndTime.Text.Trim()))
{
strSql += " AND C.InspectionDate <= @EndTime";
listStr.Add(new SqlParameter("@EndTime", this.txtEndTime.Text.Trim()));
}
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
Grid1.RecordCount = tb.Rows.Count;
var table = this.GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table;
Grid1.DataBind();
}
#endregion
#region
/// <summary>
/// 查询
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void TextBox_TextChanged(object sender, EventArgs e)
{
this.BindGrid();
}
#endregion
#region
/// <summary>
/// 分页
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
{
BindGrid();
}
/// <summary>
/// 排序
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_Sort(object sender, GridSortEventArgs e)
{
BindGrid();
}
/// <summary>
/// 分页显示条数下拉框
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
{
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
BindGrid();
}
#endregion
/// <summary>
/// 转换当日人工时
/// </summary>
/// <param name="workStage"></param>
/// <returns></returns>
protected string ConvertPersonWorkTimeSum(object dayReportId)
{
if (dayReportId != null)
{
return (Funs.DB.SitePerson_DayReportDetail.Where(x => x.DayReportId == dayReportId.ToString()).Sum(x => x.PersonWorkTime) ?? 0).ToString();
}
return "";
}
}
}

View File

@ -0,0 +1,161 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.DataShowLocal
{
public partial class QualityInstrumentsItem
{
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Panel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// Grid1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// Toolbar2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar2;
/// <summary>
/// txtProject 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtProject;
/// <summary>
/// txtStartTime 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtStartTime;
/// <summary>
/// Label3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label Label3;
/// <summary>
/// txtEndTime 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtEndTime;
/// <summary>
/// btnClose 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnClose;
/// <summary>
/// labNumber 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label labNumber;
/// <summary>
/// lbtnFileUrl 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton lbtnFileUrl;
/// <summary>
/// ToolbarSeparator1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
/// <summary>
/// ToolbarText1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarText ToolbarText1;
/// <summary>
/// ddlPageSize 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlPageSize;
/// <summary>
/// WindowAtt 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window WindowAtt;
}
}

View File

@ -560,6 +560,10 @@
<Content Include="CQMS\WBS\WorkPackageSet1.aspx" />
<Content Include="CQMS\WBS\WorkPackageSet2.aspx" />
<Content Include="CQMS\WBS\WorkPackageSet2In.aspx" />
<Content Include="DataShowLocal\NCRStatisc.aspx" />
<Content Include="DataShowLocal\NCRStatiscItem.aspx" />
<Content Include="DataShowLocal\QualityInstruments.aspx" />
<Content Include="DataShowLocal\QualityInstrumentsItem.aspx" />
<Content Include="DataShow\Accident.aspx" />
<Content Include="DataShow\Check.aspx" />
<Content Include="DataShow\CompanyPerson.aspx" />
@ -8106,6 +8110,34 @@
<Compile Include="CQMS\WBS\WorkPackageSet2In.aspx.designer.cs">
<DependentUpon>WorkPackageSet2In.aspx</DependentUpon>
</Compile>
<Compile Include="DataShowLocal\NCRStatisc.aspx.cs">
<DependentUpon>NCRStatisc.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="DataShowLocal\NCRStatisc.aspx.designer.cs">
<DependentUpon>NCRStatisc.aspx</DependentUpon>
</Compile>
<Compile Include="DataShowLocal\NCRStatiscItem.aspx.cs">
<DependentUpon>NCRStatiscItem.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="DataShowLocal\NCRStatiscItem.aspx.designer.cs">
<DependentUpon>NCRStatiscItem.aspx</DependentUpon>
</Compile>
<Compile Include="DataShowLocal\QualityInstruments.aspx.cs">
<DependentUpon>QualityInstruments.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="DataShowLocal\QualityInstruments.aspx.designer.cs">
<DependentUpon>QualityInstruments.aspx</DependentUpon>
</Compile>
<Compile Include="DataShowLocal\QualityInstrumentsItem.aspx.cs">
<DependentUpon>QualityInstrumentsItem.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="DataShowLocal\QualityInstrumentsItem.aspx.designer.cs">
<DependentUpon>QualityInstrumentsItem.aspx</DependentUpon>
</Compile>
<Compile Include="DataShow\Accident.aspx.cs">
<DependentUpon>Accident.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>

View File

@ -36,17 +36,17 @@
<div class="y_box_label y_image_default">安全统计</div>
<div class="y_box_main">
<div class="y_row y_rgss">
<div class="y_rgs y_column y_image_default">
<div class="y_rgs y_column y_image_default js-hover" data-type="WorkingHourData">
<p class="y_rgs_val" id="divSafeWorkTime" runat="server">0000000000</p>
<div class="y_rgs_label">累计安全人工时</label>
</div>
</div>
<div class="y_rgs y_column y_image_default">
<div class="y_rgs y_column y_image_default js-hover" data-type="WorkingHourData">
<p class="y_rgs_val" id="divSafeWorkTimeMonth" runat="server">0000000000</p>
<div class="y_rgs_label" >本月安全人工时</label>
</div>
</div>
<div class="y_rgs y_column y_image_default">
<div class="y_rgs y_column y_image_default js-hover" data-type="SafeTrainData">
<p class="y_rgs_val" id="divSafePersonNum" runat="server">0</p>
<div class="y_rgs_label">安全培训累计人员</label>
</div>
@ -57,7 +57,7 @@
<div class="y_aq_label">安全管理人员</div>
<div class="y_aq_value" id="divSafeManagePersonNum" runat="server">0</div>
</div>
<div class="y_aq_box y_image_default y_row">
<div class="y_aq_box y_image_default y_row js-hover" data-type="AccidentEventData">
<div class="y_aq_label">未遂事件</div>
<div class="y_aq_value" runat="server" id="divWS">0</div>
</div>
@ -92,15 +92,15 @@
<div class="y_box">
<div class="y_box_label y_image_default">质量概况</div>
<div class="y_box_main">
<div class="y_zlry y_row y_image_default">
<div class="y_zlry y_row y_image_default js-hover" data-type="ManagerData">
<div class="y_zlry_label">质量管理人员</div>
<div class="y_zlry_value" id="divCqmsManageNum" runat="server">0</div>
</div>
<div class="y_zlry y_row y_image_default" style="margin-top: .125rem;">
<div class="y_zlry y_row y_image_default js-hover" data-type="ManagerData" style="margin-top: .125rem;">
<div class="y_zlry_label">质量培训累计人员</div>
<div class="y_zlry_value" id="divCqmsPxNum" runat="server">0</div>
</div>
<div class="y_zlmap y_row">
<div class="y_zlmap y_row js-hover" data-type="QualityProblem">
<div class="zgmap" id="zlmap"></div>
<div class="zgmap" id="ycmap"></div>
<div class="zgmap" id="hjmap"></div>
@ -141,12 +141,12 @@
</div>
</div>
<div class="site">
<div class="y_top_boxs y_row">
<div class="y_top_boxs y_row js-hover" data-type="ProjectData">
<div class="y_top_box y_image_default y_column">
<div class="y_top_box_label" style="color: #12CDA2;">在建项目</div>
<div class="y_top_box_value" style="color: #12CDA2;" id="div_zjxmCount" runat="server"></div>
</div>
<div class="y_top_box y_image_default y_column">
<div class="y_top_box y_image_default y_column js-hover" data-type="ProjectPersonData">
<div class="y_top_box_label" style="color: #00FFFF;">参建人数</div>
<div class="y_top_box_value" style="color: #00FFFF;" id="div_cjrsCount" runat="server"></div>
</div>
@ -161,7 +161,7 @@
</div>
<div class="site y_column">
<!-- 人员信息 -->
<div class="y_box">
<div class="y_box js-hover" data-type="ProjectPersonData">
<div class="y_box_label y_image_default">人员信息 </div>
<div class="y_rys y_row">
<div class="y_ry y_row y_image_default">
@ -184,7 +184,7 @@
<div class="y_box_label y_image_default">进度情况 <span class="y_more">更多></span></div>
<div class="y_box_main" id="jdmap"></div>
</div>
<div class="y_box">
<div class="y_box" style="font-size: 15px;">
<div class="y_box_label y_image_default">
<div class="y_tabs y_row">
<span class="y_image_default y_tab-action" id="span_gdcl" onclick="clOnclick(0)" style="cursor:pointer">管道材料</span>
@ -248,6 +248,190 @@
<script type="text/javascript" src="../res/index/js/china.js"></script>
<script type="text/javascript" src="../res/index/js/world.js"></script>
<script>
$(function () {
initClick();
})
function initClick() {
// 设置iframe高度
$('.click-wrap .click-item iframe').height($('.click-wrap').height())
$(".js-hover").click(function () {
var htmlContent = GetClickHtml(this)
// $('.click-wrap').show()
// $(".hover-wrap").hide()
})
$('.click-close').click(function () {
$('.click-wrap').hide()
})
}
function GetClickHtml(obj) {
var $this = $(obj), type = $this.attr('data-type'), tabType = $this.attr('data-tabType') || '';
var title = '';
if (tabType != '') {
tabType = $this.closest('.bb-item').find('.tab-wrap .tab .active').attr('data-type')
if (tabType == null) {
tabType = $this.closest('.str-bottom').find('.tab-wrap .tab .active').attr('data-type')
}
}
console.log(type)
if (type == 'HeadOfficeNum') {
$('iframe').attr('src', '../DataShow/CompanyPerson.aspx') //企业总部
window.open("../DataShow/CompanyPerson.aspx")
}
else if (type == 'Branch') {
$('iframe').attr('src', '../DataShow/CompanyPerson.aspx') //分支机构
window.open("../DataShow/CompanyPerson.aspx")
}
else if (type == 'ProjectNum') {
$('iframe').attr('src', '../DataShow/ProjectPerson.aspx')//项目人员
window.open("../DataShow/ProjectPerson.aspx")
}
else if (type == 'SafetyInjectionEngineer') {
$('iframe').attr('src', '../DataShow/ProjectPerson.aspx')//项目人员
window.open("../DataShow/ProjectPerson.aspx")
}
else if (type == 'Certificate') {
$('iframe').attr('src', '../DataShow/ProjectPerson.aspx') //项目人员
window.open("../DataShow/ProjectPerson.aspx")
}
else if (type == 'SafetyMeetingData') {
$('iframe').attr('src', '../DataShow/Meeting.aspx') //安全会议数据
window.open("../DataShow/Meeting.aspx")
}
else if (type == 'BeUnderConstructionNum') {
$('iframe').attr('src', '../DataShow/Project.aspx') //项目信息
window.open("../DataShow/Project.aspx")
}
else if (type == 'ShutdownNum') {
$('iframe').attr('src', '../DataShow/Project.aspx') //项目信息
window.open("../DataShow/Project.aspx")
}
else if (type == 'JoinConstructionPersonNum') {
$('iframe').attr('src', '../DataShow/Project.aspx') //项目信息
window.open("../DataShow/Project.aspx")
}
else if (type == 'MajorProjectsUnderConstructionNum') {
$('iframe').attr('src', '../DataShow/Project.aspx') //项目信息
window.open("../DataShow/Project.aspx")
}
else if (type == 'WorkingHourData') {
$('iframe').attr('src', '../DataShow/WorkingHours.aspx') //工时数据
window.open("../DataShow/WorkingHours.aspx")
}
else if (type == 'SafeTrainData') {
$('iframe').attr('src', '../DataShow/EduTrain.aspx') //安全教育培训
window.open("../DataShow/EduTrain.aspx")
}
else if (type == 'EnvironmentalData') {
$('iframe').attr('src', '../DataShow/Environmental.aspx') //环保数据
window.open("../DataShow/Environmental.aspx")
}
else if (type == 'SafeCost') {
$('iframe').attr('src', '../DataShow/SecurityCost.aspx') //安全费用
window.open("../DataShow/SecurityCost.aspx")
}
else if (type == 'ConstructionEquipment') {
$('iframe').attr('src', '../DataShow/ConstructionEquipment.aspx') //施工机具设备
window.open("../DataShow/ConstructionEquipment.aspx")
}
else if (type == 'HighRiskWorkPermit') {
$('iframe').attr('src', '../DataShow/License.aspx') //高风险作业许可
window.open("../DataShow/License.aspx")
}
else if (type == 'SafetySupervisionAndInspectionData') {
$('iframe').attr('src', '../DataShow/Check.aspx') //安全监督检查
window.open("../DataShow/Check.aspx")
}
else if (type == 'AccidentEventData') {
$('iframe').attr('src', '../DataShow/Accident.aspx') //事故事件数据
window.open("../DataShow/Accident.aspx")
}
else if (type == 'SafeRiskData') {
$('iframe').attr('src', '../DataShow/SecurityRisk.aspx') //安全风险数据
window.open("../DataShow/SecurityRisk.aspx")
}
else if (type == 'yjglsj'<%-- && tabType == "qyj"--%>) {
$('iframe').attr('src', '../DataShow/Emergency.aspx')//应急管理数据-企业级
window.open("../DataShow/Emergency.aspx")
}<%--
else if (type == 'yjglsj' && tabType == "xmj") {
$('iframe').attr('src', '../DataShow/Emergency.aspx')//应急管理数据-项目级
window.open("../DataShow/Emergency.aspx")
}--%>
else if (type == 'wdgcsj'<%-- && tabType == "large"--%>) {
$('iframe').attr('src', '../DataShow/LargeEngineering.aspx')//危大工程- 危大工程
window.open("../DataShow/LargeEngineering.aspx")
}<%--
else if (type == 'wdgcsj' && tabType == "super") {
$('iframe').attr('src', '../DataShow/LargeEngineering.aspx') // 危大工程 - 超危大工程
window.open("../DataShow/LargeEngineering.aspx")
}--%>
else if (type == 'yhpc' && tabType == "yb") {
$('iframe').attr('src', '../DataShow/HiddenRectification.aspx') //隐患排查-一般隐患
window.open("../DataShow/HiddenRectification.aspx")
}
else if (type == 'yhpc' && tabType == "zd") {
$('iframe').attr('src', '../DataShow/HiddenRectification.aspx')//隐患排查-重大隐患
window.open("../DataShow/HiddenRectification.aspx")
} else if (type == 'QualityProblem') {
// $('iframe').attr('src', '../InterfacePopup/CQMS/QualityProblem.aspx') //质量问题数据
window.open("../DataShow/QualityProblem.aspx")
} else if (type == 'ManagerData') {
// $('iframe').attr('src', '../InterfacePopup/CQMS/ManagerData.aspx') //管理人员数据
window.open("../DataShow/QualityPerson.aspx")
title = '管理人员数据'
} else if (type == 'ProjectData') {
// $('iframe').attr('src', '../InterfacePopup/CQMS/ManagerData.aspx') //管理人员数据
window.open("../DataShow/Project.aspx")
title = '项目数据'
}
else if (type == 'ProjectPersonData') {
// $('iframe').attr('src', '../InterfacePopup/CQMS/ManagerData.aspx') //管理人员数据
window.open("../DataShow/ProjectPerson.aspx")
title = '项目数据'
}
/*
else if (type == 'Video') {
$('iframe').attr('src', '../InterfacePopup/HSSE/VideoView.aspx') //视频监控
}*/
else {
// $('iframe').attr('src', '../SysManage/Unit.aspx')
// window.open("../DataShow/Unit.aspx")
console.log("通用")
}
}
function clOnclick(objval) {
if (objval == 0) {
$("#span_gdcl").addClass("y_tab-action")
@ -618,11 +802,41 @@
top: fontSize(30),
bottom: fontSize(40)
},
dataZoom: [
{
type: 'slider',
// start: 0,
// end: 60
maxValueSpan: 6,
show: true,
xAxisIndex: [0],
bottom: 25, height: 10,
backgroundColor: 'rgba(0,0,0,0)',
borderColor: 'none',
brushSelect: false,
textStyle: {
color: 'rgba(0,0,0,0)'
},
selectedDataBackground: {
areaStyle: {
color: 'red',
borderWidth: 0
}
},
handleStyle: { // 缩放手柄的样式
color: "#0a1449"
},
moveHandleStyle: {
color: '#0a1449'
}
}
],
xAxis: {
type: 'category',
data: label,
axisLabel: {
interval: 0,//使x轴文字显示全
rotate: -10, // 标签倾斜的角度
color: '#3FB0FF'
},
axisLine: {
@ -694,7 +908,7 @@
type: 'category',
data: label,
axisLabel: {
interval: 0,//使x轴文字显示全
color: '#3FB0FF'
},
axisLine: {
@ -736,7 +950,6 @@
color: "#ffffff",
fontSize: fontSize(10),
formatter: (params) => {
console.log(params.value);
return params.value;
},
},
@ -813,7 +1026,7 @@
}
var project =<%=Project %>
//var projectNum = { "name": null, "type": null, "data": [31.0, 0.0, 0.0, 0.0, 2.0, 0.0, 0.0, 0.0, 2.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 5.0, 0.0, 2.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], "dataString": null, "dataObject": null }
var projectMaxNum = 5
var projectMaxNum = 5;
var myChart = null
var geoCoordMap = {
'上海': [121.48, 31.22],
@ -1351,12 +1564,14 @@
var marker = new BMapGL.Marker(pt, {
icon: myIcon
});
console.log(item);
var content = '<table>'
content = content + '<tr><td> 时间:' + item.split(',')[2] + '</td></tr>'
content = content + '<tr><td> 工期:' + item.split(',')[3] + '</td></tr>'
content = content + '<tr><td> 项目名称:' + item.split(',')[7] + '</td></tr>'
content = content + '<tr><td> 开工日期:' + item.split(',')[9] + '</td></tr>'
content = content + '<tr><td> 完工日期:' + item.split(',')[10] + '</td></tr>'
content = content + '<tr><td> 剩余天数:' + item.split(',')[11] + '</td></tr>'
content = content + '<tr><td> 进度:' + item.split(',')[4] + '</td></tr>'
content = content + '<tr><td> 合同额:(' + item.split(',')[5] + ');收款额:(' + item.split(',')[6] + ')</td></tr>'
/* content = content + '<tr><td> 合同额:(' + item.split(',')[5] + ');收款额:(' + item.split(',')[6] + ')</td></tr>'*/
content = content + '<tr><td style="width:180px;"><a style="text-decoration:underline;color:#00a2e9;text-overflow: ellipsis; white - space: nowrap;" target="_top" href="../indexProject.aspx?projectId=' + item.split(',')[8] + '&projectName=' + item.split(',')[7] + '">项目详情</a></td> </tr>'
content += '</table>'
var infowindow = new BMapGL.InfoWindow(content, { title: item.split(',')[7] })

View File

@ -27,21 +27,24 @@ namespace FineUIPro.Web.common
join y in db.Sys_Const on x.AccidentTypeId equals y.ConstValue
where y.ConstText.Contains("未遂")
select x;
this.divWS.InnerHtml = (wsAccidentList1.Count() + wsAccidentList2.Count()).ToString();
this.divWS.InnerHtml = GetNearMissNum().ToString();
//安全人工时
int wHours = db.SitePerson_PersonInOutNumber.Max(x => x.WorkHours) ?? 0;
this.divSafeWorkTime.InnerHtml = wHours.ToString();
this.divSafeWorkTime.InnerHtml = CountAqrgs().ToString().Split('.')[0];
//本月安全人工时
int wHoursMonth = 0;
DateTime? sDate = Funs.GetNewDateTime(DateTime.Now.Year.ToString() + "-" + DateTime.Now.Month.ToString());
var dayReports = getMonthReportsByCompany(sDate);
if (dayReports.Count > 0)
{
wHoursMonth = Convert.ToInt32(dayReports[0].DayWorkTime);
}
this.divSafeWorkTimeMonth.InnerHtml = wHoursMonth.ToString();
//int wHoursMonth = 0;
//DateTime? sDate = Funs.GetNewDateTime(DateTime.Now.Year.ToString() + "-" + DateTime.Now.Month.ToString());
//var dayReports = getMonthReportsByCompany(sDate);
//if (dayReports.Count > 0)
//{
// wHoursMonth = Convert.ToInt32(dayReports[0].DayWorkTime);
//}
DateTime d1 = getStartMonth();
DateTime d2 = getEndMonth();
this.divSafeWorkTimeMonth.InnerHtml = CountAqrgs(d1,d2).ToString().Split('.')[0];
//int wHoursMonth = db.SitePerson_PersonInOutNumber.Where(x => x.InOutDate > DateTime.Now.AddDays(-Convert.ToInt32(DateTime.Now.Date.Day)))
// .Max(x => x.WorkHours) ?? 0;
@ -70,7 +73,7 @@ namespace FineUIPro.Web.common
//质量培训人员
DateTime date = DateTime.Now.AddDays(-1);
int CqmsPxNum = (from x in Funs.DB.Comprehensive_InspectionPerson
where x.IsTrain == true && x.CompileDate.Value.Year == date.Year && x.CompileDate.Value.Month == date.Month && x.CompileDate.Value.Day == date.Day
where x.IsTrain == true
select x).Count();
divCqmsPxNum.InnerText = CqmsPxNum.ToString();
@ -120,6 +123,94 @@ namespace FineUIPro.Web.common
}
#region
/// <summary>
/// 获取当前月的月末日期
/// </summary>
/// <returns></returns>
public static DateTime getEndMonth()
{
int span = Convert.ToInt32(System.DateTime.Now.Day);
System.DateTime dateEnd = System.DateTime.Now.AddMonths(1).AddDays(-span);
return dateEnd;
}
/// <summary>
/// 获取当前月初日期
/// </summary>
/// <returns></returns>
public static DateTime getStartMonth()
{
int span = Convert.ToInt32(System.DateTime.Now.Day);
span = span - 1;
System.DateTime dateStart = System.DateTime.Now.AddDays(-span);
return dateStart;
}
//安全人工时(穿透)
/// <summary>
/// 安全工时数
/// </summary>
/// <param name="state"></param>
/// <returns></returns>
protected decimal CountAqrgs(DateTime? d1 = null, DateTime? d2 = null)
{
decimal cout1 = 0;
var datetime1 = d1;
var datetime2 = d2;
var getAllPersonInOutList = from x in Funs.DB.SitePerson_PersonInOutNumber
select x;
if (getAllPersonInOutList.Count() > 0)
{
if (datetime1.HasValue)
{
getAllPersonInOutList = getAllPersonInOutList.Where(x => x.InOutDate >= datetime1);
}
if (datetime2.HasValue)
{
getAllPersonInOutList = getAllPersonInOutList.Where(x => x.InOutDate <= datetime2);
}
if (getAllPersonInOutList.Count() > 0)
{
cout1 = getAllPersonInOutList.Sum(x => (long)x.WorkHours);
}
}
var getD1 = from x in Funs.DB.Accident_AccidentHandle
join y in Funs.DB.Base_Project on x.ProjectId equals y.ProjectId
where y.ProjectState == Const.ProjectState_1
select x;
var getD2 = from x in Funs.DB.Accident_AccidentReport
join y in Funs.DB.Base_Project on x.ProjectId equals y.ProjectId
where y.ProjectState == Const.ProjectState_1
select x;
if (datetime1.HasValue)
{
getD1 = getD1.Where(x => x.AccidentDate >= datetime1);
getD2 = getD2.Where(x => x.CompileDate >= datetime1);
}
if (datetime2.HasValue)
{
getD1 = getD1.Where(x => x.AccidentDate <= datetime2);
getD2 = getD2.Where(x => x.CompileDate <= datetime2);
}
if (getD1.Count() > 0)
{
cout1 = cout1 - getD1.Sum(x => x.WorkHoursLoss ?? 0);
}
if (getD2.Count() > 0)
{
cout1 = cout1 - getD2.Sum(x => x.WorkingHoursLoss ?? 0);
}
return cout1;
}
/// <summary>
/// 获取出入记录人工时-月报(项目级别)
/// </summary>
@ -343,7 +434,25 @@ namespace FineUIPro.Web.common
mapStr += money1.ToString("0.##") + ",";
mapStr += money2 + ",";
mapStr += item.ShortName + ",";
mapStr += item.ProjectId;
//修改日期 2023-10-30 10:43:57
//内容:项目名称、开工日期、完工日期、剩余天数、进度
mapStr += item.ProjectId+",";
mapStr += string.Format("{0:yyyy-MM-dd}", item.StartDate) + ",";
if (string.IsNullOrEmpty(item.EndDate.ToString()))
{
mapStr += ",";
}
else {
//获取剩余天数
var residueDay = DateDiff(DateTime.Now, Convert.ToDateTime(item.EndDate)).ToString();
mapStr += string.Format("{0:yyyy-MM-dd}", item.EndDate) + ","+residueDay;
}
loc.Add(mapStr);
}
}
@ -358,6 +467,20 @@ namespace FineUIPro.Web.common
return JsonConvert.SerializeObject(series);
}
}
/// <summary>
/// 计算时间的相差天数
/// </summary>
/// <param name="dateStart"></param>
/// <param name="dateEnd"></param>
/// <returns></returns>
private int DateDiff(DateTime dateStart, DateTime dateEnd)
{
DateTime start = Convert.ToDateTime(dateStart.ToShortDateString());
DateTime end = Convert.ToDateTime(dateEnd.ToShortDateString());
TimeSpan sp = end.Subtract(start);
return sp.Days;
}
#endregion
#region
@ -534,7 +657,7 @@ namespace FineUIPro.Web.common
protected string ProjectPersonMc;
private void getProjectSitePerson()
{
var list = Funs.DB.Base_Project.Where(x => (x.ProjectState == Const.ProjectState_1 || x.ProjectState == null) && x.Progress != null).ToList();
var list = Funs.DB.Base_Project.Where(x => (x.ProjectState == Const.ProjectState_1 || x.ProjectState == null)).ToList();
foreach (var item in list)
{
ProjectPersonMc += "'" + item.ShortName + "',";
@ -609,9 +732,9 @@ namespace FineUIPro.Web.common
#region
gdclHtml += " <div class=\"tr\">";
var pname = item.ShortName;
if (item.ShortName.Length > 4)
if (item.ShortName.Length > 3)
{
pname = item.ShortName.Substring(0, 4) + "...";
pname = item.ShortName.Substring(0, 3) + "...";
}
gdclHtml += "<span title=\"" + item.ShortName + "\">" + pname + "</span>";
@ -669,9 +792,9 @@ namespace FineUIPro.Web.common
#region
sbclHtml += " <div class=\"tr\">";
pname=item.ShortName;
if (item.ShortName.Length > 6)
if (item.ShortName.Length > 5)
{
pname = item.ShortName.Substring(0, 6) + "...";
pname = item.ShortName.Substring(0, 5) + "...";
}
sbclHtml += "<span title=\"" + item.ShortName + "\">" + pname + "</span>";
//采购量
@ -717,5 +840,18 @@ namespace FineUIPro.Web.common
}
#endregion
/// <summary>
/// 获取未遂事件数
/// </summary>
/// <returns></returns>
public static int GetNearMissNum()
{
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
select x).Count();
return result;
}
}
}

View File

@ -145,7 +145,7 @@
<div class="y_top_box_label" style="color: #FF7474;">在施危大工程</div>
<div class="y_top_box_value" style="color: #FF7474;" runat="server" id="div_wdxm">0</div>
</div>
<div class="y_top_box y_image_default y_row js-hover" data-type="WorkingHourData">
<div class="y_top_box y_image_default y_row js-hover" data-type="WorkingHourData" style="width: 4.55rem;">
<div class="y_top_box_label" style="color: #00FFFF;">安全工时</div>
<div class="y_top_box_value" style="color: #00FFFF;" runat="server" id="div_safeworktime">0</div>
</div>

View File

@ -2,6 +2,8 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Web;
using System.Web.UI;
@ -63,10 +65,21 @@ namespace FineUIPro.Web.common
select x).Count().ToString();
//注安师
div_zasrs.InnerHtml = (from x in Funs.DB.SitePerson_Person
join y in Funs.DB.Base_Certificate on x.CertificateId equals y.CertificateId
where y.IsRegisterHSSE == true && x.IsUsed == true
select x).Count().ToString();
var ZasSql = @"SELECT Person.ProjectId,Project.ProjectCode,Project.ProjectName,Unit.UnitId,Unit.UnitId,Unit.UnitName,
Person.PersonName,Person.PersonId,Person.IdentityCard,Person.Sex,Person.WorkPostId,WorkPost.WorkPostName,Person.Telephone
,(CASE WHEN Sex=2 THEN '女' WHEN Sex=1 THEN '男' ELSE '' END) AS SexStr
FROM SitePerson_Person AS Person
LEFT JOIN Base_Project AS Project ON Person.ProjectId =Project.ProjectId
LEFT JOIN Base_Unit AS Unit ON Person.UnitId =Unit.UnitId
LEFT JOIN Base_WorkPost AS WorkPost ON Person.WorkPostId =WorkPost.WorkPostId
WHERE IsUsed=1 AND InTime <=GETDATE() AND (OutTime IS NULL OR OutTime > GETDATE())
AND (SELECT COUNT(*) FROM QualityAudit_PersonQuality AS Q LEFT JOIN Base_Certificate AS Cer ON Q.CertificateId
=Cer.CertificateId WHERE Q.PersonId = Person.PersonId AND IsRegisterHSSE =1) > 0";
List<SqlParameter> listStr = new List<SqlParameter>();
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(ZasSql, parameter);
div_zasrs.InnerHtml = tb.Rows.Count.ToString();
}
#endregion
@ -81,9 +94,52 @@ namespace FineUIPro.Web.common
//在施危大工程
div_wdxm.InnerHtml = Funs.DB.Solution_LargerHazard.Where(x => x.States == Const.State_2).Count().ToString();
//安全工时数
int wHours = Funs.DB.SitePerson_PersonInOutNumber.Max(x => x.WorkHours) ?? 0;
this.div_safeworktime.InnerHtml = wHours.ToString();
//int wHours = Funs.DB.SitePerson_PersonInOutNumber.Max(x => x.WorkHours) ?? 0;
this.div_safeworktime.InnerHtml = Count3().ToString().Split('.')[0];
}
#endregion
#region 穿
/// <summary>
/// 安全工时数
/// </summary>
/// <param name="state"></param>
/// <returns></returns>
protected decimal Count3()
{
decimal cout1 = 0;
var getAllPersonInOutList = from x in Funs.DB.SitePerson_PersonInOutNumber
select x;
if (getAllPersonInOutList.Count() > 0)
{
if (getAllPersonInOutList.Count() > 0)
{
cout1 = getAllPersonInOutList.Sum(x => (long)x.WorkHours);
}
}
var getD1 = from x in Funs.DB.Accident_AccidentHandle
join y in Funs.DB.Base_Project on x.ProjectId equals y.ProjectId
where y.ProjectState == Const.ProjectState_1
select x;
var getD2 = from x in Funs.DB.Accident_AccidentReport
join y in Funs.DB.Base_Project on x.ProjectId equals y.ProjectId
where y.ProjectState == Const.ProjectState_1
select x;
if (getD1.Count() > 0)
{
cout1 = cout1 - getD1.Sum(x => x.WorkHoursLoss ?? 0);
}
if (getD2.Count() > 0)
{
cout1 = cout1 - getD2.Sum(x => x.WorkingHoursLoss ?? 0);
}
return cout1;
}
#endregion
#region

View File

@ -177,7 +177,7 @@
<div id="zlmap"></div>
</div>
</div>
<div class="y_box">
<div class="y_box js-hover" data-type="NCRData">
<div class="y_box_label y_image_default">NCR数据</div>
<div class="y_box_main">
<div class="zl-card y_row">
@ -529,7 +529,7 @@
}
else if (type == 'MeasuringInstrumentsData') {
// $('iframe').attr('src', '../InterfacePopup/CQMS/MeasuringInstrumentsData.aspx') //计量器具数据
window.open("../DataShow/QualityInstruments.aspx")
window.open("../DataShowLocal/QualityInstruments.aspx")
title = '计量器具数据'
@ -569,6 +569,11 @@
// $('iframe').attr('src', '../InterfacePopup/CQMS/DefectAnalysis.aspx') //缺陷分析
window.open("../DataShow/HJGLDefect.aspx")
}
else if (type == 'NCRData') {
// $('iframe').attr('src', '../InterfacePopup/CQMS/DefectAnalysis.aspx') //缺陷分析
window.open("../DataShowLocal/NCRStatisc.aspx")
}
else {
// $('iframe').attr('src', '../SysManage/Unit.aspx')

View File

@ -300,9 +300,18 @@ namespace FineUIPro.Web.common
/// <returns></returns>
public static int GetTotalFilmNum()
{
int result = Convert.ToInt32((from x in Funs.DB.CH_CheckItem
join y in Funs.DB.CH_Check on x.CHT_CheckID equals y.CHT_CheckID
select x.CHT_TotalFilm).ToList().Sum());
//int result = Convert.ToInt32((from x in Funs.DB.CH_CheckItem
// join y in Funs.DB.CH_Check on x.CHT_CheckID equals y.CHT_CheckID
// select x.CHT_TotalFilm).ToList().Sum());
int result = 0;
var getD2 = (from x in Funs.DB.HJGL_FL_Data
orderby x.CompileDate descending
select x).FirstOrDefault();
if (getD2 != null)
{
result = Funs.GetNewIntOrZero(getD2.OneTimeFilmAmount.Split('.')[0]);
}
return result;
}
/// <summary>
@ -311,9 +320,14 @@ namespace FineUIPro.Web.common
/// <returns></returns>
public static int GetOKFilmNum()
{
int result = Convert.ToInt32((from x in Funs.DB.CH_CheckItem
join y in Funs.DB.CH_Check on x.CHT_CheckID equals y.CHT_CheckID
select x.CHT_PassFilm).ToList().Sum());
int result = 0;
var getD2 = (from x in Funs.DB.HJGL_FL_Data
orderby x.CompileDate descending
select x).FirstOrDefault();
if (getD2 != null)
{
result = Funs.GetNewIntOrZero(getD2.OneTimeFilmQualifiedAmount.Split('.')[0]);
}
return result;
}
@ -393,8 +407,10 @@ namespace FineUIPro.Web.common
private void getNcrInfo()
{
//闭环项 有完成日期的
var num1 = Funs.DB.Comprehensive_NCRManagement.Where(x => x.CompleteDate != null).Count();
var num2 = Funs.DB.Comprehensive_NCRManagement.Where(x => x.CompleteDate == null).Count();
//var num1 = Funs.DB.Comprehensive_NCRManagement.Where(x => x.CompleteDate != null).Count();
//var num2 = Funs.DB.Comprehensive_NCRManagement.Where(x => x.CompleteDate == null).Count();
var num1 = Funs.DB.Comprehensive_NCRManagement.Where(x => x.Status=="3").Count();
var num2 = Funs.DB.Comprehensive_NCRManagement.Where(x => !x.Status.Equals('3') ||x.Status ==null).Count();
ncrZgbhx = num1.ToString();
ncrwZgbhx = num2.ToString();
if ((num1 + num2) >0)

View File

@ -59742,6 +59742,8 @@ namespace Model
private string _CheckItemSetId;
private string _ReceiveMan;
private string _ResponsibleUnit;
private string _WorkAreaId;
@ -59750,8 +59752,6 @@ namespace Model
private string _ResponsibleMan;
private string _ReceiveMan;
private EntityRef<Base_Project> _Base_Project;
private EntityRef<Technique_CheckItemSet> _Technique_CheckItemSet;
@ -59792,6 +59792,8 @@ namespace Model
partial void OnPartInPersonNamesChanged();
partial void OnCheckItemSetIdChanging(string value);
partial void OnCheckItemSetIdChanged();
partial void OnReceiveManChanging(string value);
partial void OnReceiveManChanged();
partial void OnResponsibleUnitChanging(string value);
partial void OnResponsibleUnitChanged();
partial void OnWorkAreaIdChanging(string value);
@ -59800,8 +59802,6 @@ namespace Model
partial void OnQuestionTypeChanged();
partial void OnResponsibleManChanging(string value);
partial void OnResponsibleManChanged();
partial void OnReceiveManChanging(string value);
partial void OnReceiveManChanged();
#endregion
public Check_CheckSpecial()
@ -60139,6 +60139,26 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ReceiveMan", DbType="NVarChar(2000)")]
public string ReceiveMan
{
get
{
return this._ReceiveMan;
}
set
{
if ((this._ReceiveMan != value))
{
this.OnReceiveManChanging(value);
this.SendPropertyChanging();
this._ReceiveMan = value;
this.SendPropertyChanged("ReceiveMan");
this.OnReceiveManChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResponsibleUnit", DbType="NVarChar(50)")]
public string ResponsibleUnit
{
@ -60219,26 +60239,6 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ReceiveMan", DbType="NVarChar(2000)")]
public string ReceiveMan
{
get
{
return this._ReceiveMan;
}
set
{
if ((this._ReceiveMan != value))
{
this.OnReceiveManChanging(value);
this.SendPropertyChanging();
this._ReceiveMan = value;
this.SendPropertyChanged("ReceiveMan");
this.OnReceiveManChanged();
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Check_CheckSpecial_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)]
public Base_Project Base_Project
{
@ -317910,6 +317910,8 @@ namespace Model
private string _SpecialSchemeTypeId;
private string _Content;
private EntityRef<Base_Project> _Base_Project;
private EntityRef<Base_SolutionTempleteType> _Base_SolutionTempleteType;
@ -317952,6 +317954,8 @@ namespace Model
partial void OnEditionChanged();
partial void OnSpecialSchemeTypeIdChanging(string value);
partial void OnSpecialSchemeTypeIdChanged();
partial void OnContentChanging(string value);
partial void OnContentChanged();
#endregion
public Solution_CQMSConstructSolution()
@ -318260,6 +318264,26 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Content", DbType="NVarChar(2000)")]
public string Content
{
get
{
return this._Content;
}
set
{
if ((this._Content != value))
{
this.OnContentChanging(value);
this.SendPropertyChanging();
this._Content = value;
this.SendPropertyChanged("Content");
this.OnContentChanged();
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Solution_CQMSConstructSolution_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)]
public Base_Project Base_Project
{