2023-11-11
This commit is contained in:
@@ -1,12 +1,8 @@
|
||||
using BLL;
|
||||
using FineUIPro.Web.BaseInfo;
|
||||
using Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
using static NPOI.HSSF.Util.HSSFColor;
|
||||
|
||||
namespace FineUIPro.Web.DataShow
|
||||
{
|
||||
@@ -27,7 +23,7 @@ namespace FineUIPro.Web.DataShow
|
||||
BLL.ProjectService.InitProjectDropDownList(this.drpProject, true);
|
||||
// 绑定表格t
|
||||
BindGrid();
|
||||
this.Panel1.Title = "事故事件数据(" + BLL.UnitService.GetUnitNameByUnitId(BLL.Const.UnitId_CD) + ")";
|
||||
this.Panel1.Title = "事故事件数据(" + BLL.UnitService.GetUnitNameByUnitId(BLL.CommonService.GetThisUnitId()) + ")";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,7 +46,7 @@ namespace FineUIPro.Web.DataShow
|
||||
LEFT JOIN Base_Project AS Project ON Record.ProjectId = Project.ProjectId
|
||||
LEFT JOIN SitePerson_Person AS Person ON Person.PersonId = Record.PersonId
|
||||
LEFT JOIN Base_Unit AS Unit ON Unit.UnitId = Person.UnitId
|
||||
WHERE (Project.ProjectState2 is null or Project.ProjectState2 !=9) ";
|
||||
WHERE Record.AccidentDate>'2023-01-01' ";
|
||||
|
||||
if (rbType.SelectedValue == "0")
|
||||
{
|
||||
@@ -67,7 +63,7 @@ namespace FineUIPro.Web.DataShow
|
||||
LEFT JOIN Sys_Const AS AccidentType ON AccidentType.ConstValue = Record.AccidentTypeId AND GroupId='AccidentReportRegistration'
|
||||
LEFT JOIN Base_Project AS Project ON Record.ProjectId = Project.ProjectId
|
||||
LEFT JOIN Base_Unit AS Unit ON Unit.UnitId = Record.UnitId
|
||||
WHERE (Project.ProjectState2 is null or Project.ProjectState2 !=9) ";
|
||||
WHERE Record.AccidentDate>'2023-01-01' ";
|
||||
if (rbType.SelectedValue == "2")
|
||||
{
|
||||
strSql += " AND Record.AccidentDegree ='1'";
|
||||
|
||||
@@ -1,12 +1,8 @@
|
||||
using Aspose.Words;
|
||||
using BLL;
|
||||
using BLL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace FineUIPro.Web.DataShow
|
||||
{
|
||||
@@ -28,7 +24,7 @@ namespace FineUIPro.Web.DataShow
|
||||
BLL.ProjectService.InitProjectDropDownList(this.drpProject, true);
|
||||
// 绑定表格t
|
||||
BindGrid();
|
||||
this.Panel1.Title = "安全监督检查数据(" + BLL.UnitService.GetUnitNameByUnitId(BLL.Const.UnitId_CD) + ")";
|
||||
this.Panel1.Title = "安全监督检查数据(" + BLL.UnitService.GetUnitNameByUnitId(BLL.CommonService.GetThisUnitId()) + ")";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +39,7 @@ namespace FineUIPro.Web.DataShow
|
||||
+ @" FROM dbo.Supervise_SuperviseCheckReport AS S"
|
||||
+ @" LEFT JOIN dbo.Base_Project AS P ON P.ProjectId=S.ProjectId"
|
||||
+ @" LEFT JOIN dbo.Base_Unit AS U ON U.UnitId=S.UnitId"
|
||||
+ @" WHERE (P.ProjectState2 is null or P.ProjectState2 !=9) ";
|
||||
+ @" WHERE S.CheckDate >'2023-01-01' ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
strSql += " AND S.CheckType= @CheckType";
|
||||
listStr.Add(new SqlParameter("@CheckType", this.rbCom.SelectedValue));
|
||||
@@ -75,7 +71,7 @@ namespace FineUIPro.Web.DataShow
|
||||
,CheckTeam= STUFF((SELECT ',' + UserName FROM dbo.Sys_User where PATINDEX('%,' + RTRIM(UserId) + ',%',',' +C.LeaderIds + ',')>0 FOR XML PATH('')), 1, 1,'')
|
||||
from Check_ProjectLeaderCheck AS C
|
||||
LEFT JOIN Base_Project AS P ON C.ProjectId =P.ProjectId
|
||||
where (P.ProjectState2 is null or P.ProjectState2 !=9) ";
|
||||
where 1=1 ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
if (this.drpProject.SelectedValue != Const._Null)
|
||||
{
|
||||
@@ -109,7 +105,7 @@ namespace FineUIPro.Web.DataShow
|
||||
LEFT JOIN Base_Project AS P ON C.ProjectId =P.ProjectId
|
||||
LEFT JOIN Sys_User AS U ON C.CheckManId=U.UserId
|
||||
LEFT JOIN Base_Unit AS Ut ON C.ResponsibleUnit=Ut.UnitId
|
||||
where (P.ProjectState2 is null or P.ProjectState2 !=9) ";
|
||||
where 1=1 ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
if (this.drpProject.SelectedValue != Const._Null)
|
||||
{
|
||||
@@ -142,7 +138,7 @@ namespace FineUIPro.Web.DataShow
|
||||
,UnitName= STUFF((SELECT ',' + UnitName FROM dbo.Base_Unit where PATINDEX('%,' + RTRIM(UnitId) + ',%',',' +(C.PartInUnits) + ',')>0 FOR XML PATH('')), 1, 1,'')
|
||||
from Check_CheckSpecial AS C
|
||||
LEFT JOIN Base_Project AS P ON C.ProjectId =P.ProjectId
|
||||
where (P.ProjectState2 is null or P.ProjectState2 !=9) ";
|
||||
where 1=1 ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
if (this.drpProject.SelectedValue != Const._Null)
|
||||
{
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="企业总部人员" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="CompanyBranchPersonId" DataIDField="CompanyBranchPersonId" AllowSorting="true"
|
||||
SortField="PersonName" SortDirection="ASC" OnSort="Grid1_Sort" EnableColumnLines="true" AllowPaging="true"
|
||||
SortField="UnitName,PersonName" SortDirection="ASC" OnSort="Grid1_Sort" EnableColumnLines="true" AllowPaging="true"
|
||||
IsDatabasePaging="true" PageSize="20" OnPageIndexChange="Grid1_PageIndexChange" ForceFit="true"
|
||||
EnableTextSelection="True">
|
||||
<Toolbars>
|
||||
|
||||
@@ -3,7 +3,6 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
|
||||
namespace FineUIPro.Web.DataShow
|
||||
{
|
||||
@@ -21,9 +20,9 @@ namespace FineUIPro.Web.DataShow
|
||||
{
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
// 绑定表格t
|
||||
// 绑定表格
|
||||
BindGrid();
|
||||
this.Panel1.Title = "企业总部/分支机构安全人员(" + BLL.UnitService.GetUnitNameByUnitId(BLL.Const.UnitId_CD) + ")";
|
||||
this.Panel1.Title = "企业总部/分支机构安全人员(" + BLL.UnitService.GetUnitNameByUnitId(BLL.CommonService.GetThisUnitId()) + ")";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using BLL;
|
||||
using Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
@@ -26,7 +25,7 @@ namespace FineUIPro.Web.DataShow
|
||||
BLL.ProjectService.InitProjectDropDownList(this.drpProject, true);
|
||||
// 绑定表格t
|
||||
BindGrid();
|
||||
this.Panel1.Title = "施工机具设备(" + BLL.UnitService.GetUnitNameByUnitId(BLL.Const.UnitId_CD) + ")";
|
||||
this.Panel1.Title = "施工机具设备(" + BLL.UnitService.GetUnitNameByUnitId(BLL.CommonService.GetThisUnitId()) + ")";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,14 +44,14 @@ namespace FineUIPro.Web.DataShow
|
||||
LEFT JOIN InApproveManager_EquipmentIn AS EQ ON EQ.EquipmentInId = Item.EquipmentInId
|
||||
LEFT JOIN Base_SpecialEquipment AS SPE ON Item.SpecialEquipmentId = SPE.SpecialEquipmentId
|
||||
LEFT JOIN Base_Project AS P ON EQ.ProjectId = P.ProjectId
|
||||
LEFT JOIN Base_Unit AS Unit ON Unit.UnitId = EQ.UnitId where (P.ProjectState2 is null or P.ProjectState2 !=9)
|
||||
LEFT JOIN Base_Unit AS Unit ON Unit.UnitId = EQ.UnitId
|
||||
UNION ALL SELECT Item.GeneralEquipmentInItemId AS ID,EQ.ProjectId,P.ProjectCode,P.ProjectName,EQ.UnitId,Unit.UnitName,Item.SpecialEquipmentId
|
||||
,SPE.SpecialEquipmentName,Item.SizeModel,Item.OwnerCheck,Item.CertificateNum,Item.IsUsed,EQ.CompileDate,'一般设备' AS EQType
|
||||
FROM InApproveManager_GeneralEquipmentInItem AS Item
|
||||
LEFT JOIN InApproveManager_GeneralEquipmentIn AS EQ ON EQ.GeneralEquipmentInId = Item.GeneralEquipmentInId
|
||||
LEFT JOIN Base_SpecialEquipment AS SPE ON Item.SpecialEquipmentId = SPE.SpecialEquipmentId
|
||||
LEFT JOIN Base_Project AS P ON EQ.ProjectId = P.ProjectId
|
||||
LEFT JOIN Base_Unit AS Unit ON Unit.UnitId = EQ.UnitId where (P.ProjectState2 is null or P.ProjectState2 !=9)) V
|
||||
LEFT JOIN Base_Unit AS Unit ON Unit.UnitId = EQ.UnitId ) V
|
||||
WHERE 1=1 ";
|
||||
|
||||
strSql += " AND V.IsUsed = @IsUsed";
|
||||
|
||||
@@ -8,6 +8,21 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<script src="~/Controls/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
|
||||
<title>教育培训</title>
|
||||
<style>
|
||||
.f-grid-row-summary .f-grid-cell-UnitName .f-grid-cell-inner {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.f-grid-row-summary .f-grid-cell-inner {
|
||||
font-weight: bold;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.f-grid-row-summary:first-child .f-grid-cell-inner {
|
||||
font-weight: normal;
|
||||
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
@@ -20,7 +35,7 @@
|
||||
SortField="ProjectCode,TrainStartDate" 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">
|
||||
EnableTextSelection="True" EnableSummary="true" SummaryPosition="Bottom">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using BLL;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
@@ -23,6 +24,8 @@ namespace FineUIPro.Web.DataShow
|
||||
BLL.ProjectService.InitProjectDropDownList(this.drpProject, true);
|
||||
// 绑定表格t
|
||||
BindGrid();
|
||||
//加载合计
|
||||
OutputSummaryData();
|
||||
this.Panel1.Title = "安全教育(" + BLL.UnitService.GetUnitNameByUnitId(BLL.CommonService.GetThisUnitId()) + ")";
|
||||
}
|
||||
}
|
||||
@@ -41,7 +44,7 @@ namespace FineUIPro.Web.DataShow
|
||||
from EduTrain_TrainRecord AS TrainRecord
|
||||
LEFT JOIN Base_TrainType AS TrainType ON TrainRecord.TrainTypeId=TrainType.TrainTypeId
|
||||
LEFT JOIN Base_Project AS Project ON TrainRecord.ProjectId=Project.ProjectId
|
||||
WHERE (Project.ProjectState2 is null or Project.ProjectState2 !=9) ";
|
||||
WHERE (Project.ProjectState2 is null or Project.ProjectState2 !=9) and TrainRecord.TrainStartDate >'2023-01-01' ";
|
||||
|
||||
strSql += " AND TrainType.TrainType =@TrainType";
|
||||
listStr.Add(new SqlParameter("@TrainType", this.rbType.SelectedValue));
|
||||
@@ -67,6 +70,9 @@ namespace FineUIPro.Web.DataShow
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
|
||||
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -79,6 +85,7 @@ namespace FineUIPro.Web.DataShow
|
||||
protected void TextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.BindGrid();
|
||||
this.OutputSummaryData();
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -156,5 +163,39 @@ namespace FineUIPro.Web.DataShow
|
||||
{
|
||||
EditData();
|
||||
}
|
||||
|
||||
#region 合计
|
||||
private void OutputSummaryData()
|
||||
{
|
||||
string strSql = string.Empty;
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
|
||||
strSql = @"select TrainRecord.TrainingId,TrainRecord.TrainTitle,TrainType.TrainTypeName,Project.ProjectId,Project.ProjectCode,Project.ProjectName
|
||||
,TrainRecord.TrainStartDate,TrainRecord.TrainEndDate,TrainRecord.TrainPersonNum,TrainRecord.UnitIds
|
||||
,UnitName= STUFF((SELECT ',' + UnitName FROM dbo.Base_Unit where PATINDEX('%,' + RTRIM(UnitId) + ',%',',' +TrainRecord.UnitIds + ',')>0 FOR XML PATH('')), 1, 1,'')
|
||||
from EduTrain_TrainRecord AS TrainRecord
|
||||
LEFT JOIN Base_TrainType AS TrainType ON TrainRecord.TrainTypeId=TrainType.TrainTypeId
|
||||
LEFT JOIN Base_Project AS Project ON TrainRecord.ProjectId=Project.ProjectId
|
||||
WHERE (Project.ProjectState2 is null or Project.ProjectState2 !=9) ";
|
||||
|
||||
strSql += " AND TrainType.TrainType =@TrainType";
|
||||
listStr.Add(new SqlParameter("@TrainType", this.rbType.SelectedValue));
|
||||
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
int renshu = 0;
|
||||
foreach (DataRow row in tb.Rows)
|
||||
{
|
||||
renshu += Convert.ToInt32(row["TrainPersonNum"]);
|
||||
}
|
||||
|
||||
|
||||
JObject summary = new JObject();
|
||||
summary.Add("UnitName", "合计:");
|
||||
summary.Add("TrainPersonNum", renshu.ToString());
|
||||
|
||||
Grid1.SummaryData = summary;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,21 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<script src="~/Controls/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
|
||||
<title>应急信息</title>
|
||||
<style>
|
||||
.f-grid-row-summary .f-grid-cell-UnitNames .f-grid-cell-inner {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.f-grid-row-summary .f-grid-cell-inner {
|
||||
font-weight: bold;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.f-grid-row-summary:first-child .f-grid-cell-inner {
|
||||
font-weight: normal;
|
||||
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
@@ -107,7 +122,8 @@
|
||||
runat="server" BoxFlex="1" DataKeyNames="DrillRecordListId" DataIDField="DrillRecordListId" AllowSorting="true"
|
||||
SortField="DrillRecordDate" SortDirection="DESC" OnSort="Grid2_Sort" EnableColumnLines="true" AllowPaging="true"
|
||||
IsDatabasePaging="true" PageSize="20" OnPageIndexChange="Grid2_PageIndexChange" ForceFit="true"
|
||||
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid2_RowDoubleClick" EnableTextSelection="True">
|
||||
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid2_RowDoubleClick" EnableTextSelection="True"
|
||||
EnableSummary="true" SummaryPosition="Bottom">
|
||||
<Columns>
|
||||
<f:TemplateField ColumnID="tfNumber" Width="55px" HeaderText="序号" HeaderTextAlign="Center"
|
||||
TextAlign="Center">
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using BLL;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
@@ -67,7 +68,7 @@ namespace FineUIPro.Web.DataShow
|
||||
FROM Emergency_EmergencyList_Unit AS Em
|
||||
LEFT JOIN Base_Unit AS Unit ON Em.UnitId=Unit.UnitId
|
||||
LEFT JOIN Base_EmergencyType AS EmergencyType ON Em.EmergencyTypeId=EmergencyType.EmergencyTypeId
|
||||
LEFT JOIN Sys_User AS Users ON Em.CompileMan=Users.UserId WHERE 1=1 ";
|
||||
LEFT JOIN Sys_User AS Users ON Em.CompileMan=Users.UserId WHERE Em.CompileDate >'2023-01-01' ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
if (!string.IsNullOrEmpty(this.txtStartTime.Text))
|
||||
{
|
||||
@@ -98,7 +99,7 @@ namespace FineUIPro.Web.DataShow
|
||||
LEFT JOIN Base_Unit AS Unit ON Em.UnitId=Unit.UnitId
|
||||
LEFT JOIN Base_Project AS Project ON Em.ProjectId=Project.ProjectId
|
||||
LEFT JOIN Base_EmergencyType AS EmergencyType ON Em.EmergencyTypeId=EmergencyType.EmergencyTypeId
|
||||
LEFT JOIN Sys_User AS Users ON Em.CompileMan=Users.UserId WHERE 1=1 ";
|
||||
LEFT JOIN Sys_User AS Users ON Em.CompileMan=Users.UserId WHERE Em.CompileDate >'2023-01-01' ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
if (this.drpProject.SelectedValue != Const._Null)
|
||||
{
|
||||
@@ -246,6 +247,9 @@ namespace FineUIPro.Web.DataShow
|
||||
Grid2.DataSource = table;
|
||||
Grid2.DataBind();
|
||||
this.Grid2.Columns[1].Hidden = true;
|
||||
|
||||
//加载合计
|
||||
OutputSummaryData("A");
|
||||
}
|
||||
else if (this.rbCom.SelectedValue == "1")
|
||||
{
|
||||
@@ -283,6 +287,9 @@ namespace FineUIPro.Web.DataShow
|
||||
Grid2.DataSource = table;
|
||||
Grid2.DataBind();
|
||||
this.Grid2.Columns[1].Hidden = true;
|
||||
|
||||
//加载合计
|
||||
OutputSummaryData("B");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -354,5 +361,58 @@ namespace FineUIPro.Web.DataShow
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 合计
|
||||
private void OutputSummaryData(string type)
|
||||
{
|
||||
DataTable tb = new DataTable();
|
||||
if (type == "A")
|
||||
{
|
||||
string strSql = @"SELECT List.DrillRecordListId
|
||||
,DrillRecordType.ConstText AS DrillRecordTypeName,List.JointPersonNum,List.DrillCost
|
||||
,List.DrillRecordName,List.DrillRecordDate
|
||||
,List.UnitIds,List.UnitNames
|
||||
,List.States
|
||||
FROM Emergency_DrillRecordList_Unit AS List
|
||||
LEFT JOIN Sys_Const AS DrillRecordType ON DrillRecordType.ConstValue = List.DrillRecordType
|
||||
and DrillRecordType.GroupId='DrillRecordType'
|
||||
WHERE 1=1 ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
}
|
||||
else {
|
||||
string strSql = @"SELECT List.DrillRecordListId,List.ProjectId,Project.PostCode,Project.ProjectName
|
||||
,DrillRecordType.ConstText AS DrillRecordTypeName,List.JointPersonNum,List.DrillCost
|
||||
,List.DrillRecordName,List.DrillRecordDate
|
||||
,List.UnitIds,List.UnitNames
|
||||
,List.States
|
||||
FROM Emergency_DrillRecordList AS List
|
||||
LEFT JOIN Base_Project AS Project ON List.Projectid = Project.ProjectId
|
||||
LEFT JOIN Sys_Const AS DrillRecordType ON DrillRecordType.ConstValue = List.DrillRecordType
|
||||
and DrillRecordType.GroupId='DrillRecordType'
|
||||
WHERE 1=1 ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
|
||||
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
}
|
||||
int JointPersonNum = 0;
|
||||
double DrillCost = 0.0f;
|
||||
|
||||
foreach (DataRow row in tb.Rows)
|
||||
{
|
||||
JointPersonNum += Convert.ToInt32(row["JointPersonNum"]);
|
||||
DrillCost += Convert.ToDouble(row["DrillCost"]);
|
||||
}
|
||||
|
||||
JObject summary = new JObject();
|
||||
summary.Add("UnitNames", "合计:");
|
||||
summary.Add("JointPersonNum", JointPersonNum.ToString());
|
||||
summary.Add("DrillCost", DrillCost.ToString("F2"));
|
||||
Grid2.SummaryData = summary;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -61,7 +61,7 @@
|
||||
<f:RenderField Width="150px" ColumnID="TotalEnergyConsumption" DataField="TotalEnergyConsumption"
|
||||
FieldType="Double" HeaderText="能耗总量(万吨标准煤)" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="250px" ColumnID="IncomeComprehensiveEnergyConsumption" DataField="IncomeComprehensiveEnergyConsumption"
|
||||
<f:RenderField Width="150px" ColumnID="IncomeComprehensiveEnergyConsumption" DataField="IncomeComprehensiveEnergyConsumption"
|
||||
FieldType="Double" HeaderText="万元营业收入综合能耗(吨标准煤/万元)" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="CO2" DataField="CO2"
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
using BLL;
|
||||
using Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
|
||||
namespace FineUIPro.Web.DataShow
|
||||
{
|
||||
@@ -43,7 +41,8 @@ namespace FineUIPro.Web.DataShow
|
||||
,0 AS IncomeComprehensiveEnergyConsumption
|
||||
,(SELECT ThisYearValue FROM Environmental_ChemicalReportItem WHERE SortIndex='70'
|
||||
AND ChemicalReportId=Report.ChemicalReportId) AS CO2
|
||||
FROM Environmental_ChemicalReport AS Report";
|
||||
FROM Environmental_ChemicalReport AS Report
|
||||
WHERE Report.FillingDate >'2023-01-01' ";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -55,7 +54,7 @@ namespace FineUIPro.Web.DataShow
|
||||
,(SELECT ThisYearValue FROM Environmental_ArchitectureReportItem WHERE SortIndex='38'
|
||||
AND ArchitectureReportId=Report.ArchitectureReportId) AS CO2
|
||||
FROM Environmental_ArchitectureReport AS Report
|
||||
WHERE 1=1 ";
|
||||
WHERE Report.FillingDate >'2023-01-01' ";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtStartTime.Text))
|
||||
{
|
||||
|
||||
@@ -8,6 +8,21 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<script src="~/Controls/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
|
||||
<title>缺陷分析</title>
|
||||
<style>
|
||||
.f-grid-row-summary .f-grid-cell-Defects_Definition .f-grid-cell-inner {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.f-grid-row-summary .f-grid-cell-inner {
|
||||
font-weight: bold;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.f-grid-row-summary:first-child .f-grid-cell-inner {
|
||||
font-weight: normal;
|
||||
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
@@ -19,7 +34,8 @@
|
||||
runat="server" BoxFlex="1" DataKeyNames="ID" DataIDField="ID" AllowSorting="true"
|
||||
SortField="ProjectName" SortDirection="ASC" OnSort="Grid1_Sort" EnableColumnLines="true" AllowPaging="true"
|
||||
IsDatabasePaging="true" PageSize="20" OnPageIndexChange="Grid1_PageIndexChange" ForceFit="true"
|
||||
EnableTextSelection="True">
|
||||
EnableTextSelection="True"
|
||||
EnableSummary="true" SummaryPosition="Bottom">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
using BLL;
|
||||
using FineUIPro.Web.BaseInfo;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
|
||||
namespace FineUIPro.Web.DataShow
|
||||
{
|
||||
@@ -25,6 +24,8 @@ namespace FineUIPro.Web.DataShow
|
||||
BLL.ProjectService.InitProjectDropDownList(this.drpProject, true);
|
||||
// 绑定表格t
|
||||
BindGrid();
|
||||
//合计
|
||||
OutputSummaryData();
|
||||
this.Panel1.Title = "焊接缺陷数据(" + BLL.UnitService.GetUnitNameByUnitId(BLL.CommonService.GetThisUnitId()) + ")";
|
||||
}
|
||||
}
|
||||
@@ -36,11 +37,11 @@ namespace FineUIPro.Web.DataShow
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
string strSql = @"SELECT NEWID() AS ID,Project.ProjectId,Project.ProjectCode,Project.ProjectName,Defects_Definition,COUNT(Item.CHT_CheckItemID) AS Counts
|
||||
string strSql = @"SELECT NEWID() AS ID,Project.ProjectId,Project.ProjectName,Project.ProjectCode,Defects_Definition,COUNT(Item.CHT_CheckItemID) AS Counts
|
||||
FROM CH_CheckItem AS Item
|
||||
LEFT JOIN CH_Check AS Checks ON Item.CHT_CheckID =Checks.CHT_CheckID
|
||||
LEFT JOIN Base_Project AS Project ON Checks.ProjectId =Project.ProjectId
|
||||
WHERE (Project.ProjectState2 is null or Project.ProjectState2 !=9) ";
|
||||
WHERE (Project.ProjectState2 is null or Project.ProjectState2 !=9) and Checks.CHT_CheckDate >'2023-01-01' ";
|
||||
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
if (this.drpProject.SelectedValue != Const._Null)
|
||||
@@ -123,5 +124,31 @@ namespace FineUIPro.Web.DataShow
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 合计
|
||||
private void OutputSummaryData() {
|
||||
string strSql = @"SELECT NEWID() AS ID,Project.ProjectId,Project.ProjectName,Project.ProjectCode,Defects_Definition,COUNT(Item.CHT_CheckItemID) AS Counts
|
||||
FROM CH_CheckItem AS Item
|
||||
LEFT JOIN CH_Check AS Checks ON Item.CHT_CheckID =Checks.CHT_CheckID
|
||||
LEFT JOIN Base_Project AS Project ON Checks.ProjectId =Project.ProjectId
|
||||
WHERE (Project.ProjectState2 is null or Project.ProjectState2 !=9) ";
|
||||
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
strSql += " GROUP BY Project.ProjectId,Project.ProjectName,Project.ProjectCode,Defects_Definition";
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
|
||||
int Counts = 0;
|
||||
|
||||
foreach (DataRow row in tb.Rows)
|
||||
{
|
||||
Counts += Convert.ToInt32(row["Counts"]);
|
||||
}
|
||||
JObject summary = new JObject();
|
||||
summary.Add("Defects_Definition", "合计:");
|
||||
summary.Add("Counts", Counts.ToString());
|
||||
Grid1.SummaryData = summary;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,6 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
|
||||
namespace FineUIPro.Web.DataShow
|
||||
{
|
||||
@@ -41,7 +40,7 @@ namespace FineUIPro.Web.DataShow
|
||||
LEFT JOIN Base_Project AS Project ON Welder.ProjectId = Project.ProjectId
|
||||
LEFT JOIN Base_Unit AS Unit ON Unit.UnitId = Welder.WED_Unit
|
||||
LEFT JOIN ProjectData_TeamGroup AS TeamGroup ON TeamGroup.TeamGroupId = Welder.TeamGroupId
|
||||
WHERE (Project.ProjectState2 is null or Project.ProjectState2 !=9) and (Welder.WederType='1' OR Welder.WederType is null) AND Welder.ProjectId IS NOT NULL ";
|
||||
WHERE (Welder.WederType='1' OR Welder.WederType is null) AND Welder.ProjectId IS NOT NULL";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
if (this.drpProject.SelectedValue !=Const._Null)
|
||||
{
|
||||
|
||||
@@ -8,6 +8,21 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<script src="~/Controls/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
|
||||
<title>焊接数据</title>
|
||||
<style>
|
||||
.f-grid-row-summary .f-grid-cell-ProjectName .f-grid-cell-inner {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.f-grid-row-summary .f-grid-cell-inner {
|
||||
font-weight: bold;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.f-grid-row-summary:first-child .f-grid-cell-inner {
|
||||
font-weight: normal;
|
||||
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
@@ -19,7 +34,8 @@
|
||||
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">
|
||||
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True"
|
||||
EnableSummary="true" SummaryPosition="Bottom">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
@@ -68,7 +84,7 @@
|
||||
<asp:Label ID="Label4" runat="server" Text='<%# Count3(Eval("ProjectId")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:TemplateField ColumnID="Count3" Width="120px" HeaderText="合格片数" HeaderTextAlign="Center" TextAlign="Right">
|
||||
<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>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using BLL;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
@@ -25,6 +26,8 @@ namespace FineUIPro.Web.DataShow
|
||||
BLL.ProjectService.InitProjectDropDownList(this.drpProject, true);
|
||||
// 绑定表格t
|
||||
BindGrid();
|
||||
// 合计
|
||||
OutputSummaryData();
|
||||
this.Panel1.Title = "焊接数据(" + BLL.UnitService.GetUnitNameByUnitId(BLL.CommonService.GetThisUnitId()) + ")";
|
||||
}
|
||||
}
|
||||
@@ -35,7 +38,7 @@ namespace FineUIPro.Web.DataShow
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
string strSql = @"select ProjectId,ProjectCode, ProjectName from Base_Project where ProjectState =1 and (isDelete IS NULL OR isDelete =0) ";
|
||||
string strSql = @"select ProjectId,ProjectCode, ProjectName from Base_Project where ProjectState =1 and (ProjectState2 is null or ProjectState2 !=9) ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
string cpara = string.Empty;
|
||||
if (this.drpProject.SelectedValue != Const._Null)
|
||||
@@ -277,5 +280,39 @@ namespace FineUIPro.Web.DataShow
|
||||
}
|
||||
return cout1;
|
||||
}
|
||||
|
||||
#region 合计
|
||||
private void OutputSummaryData() {
|
||||
string strSql = @"select ProjectId,ProjectCode, ProjectName,
|
||||
isnull((select sum(JOT_Size) from PW_JointInfo as A where A.ProjectId=P.ProjectId ),0) as count1,
|
||||
isnull((select sum(JOT_DoneDin) from PW_JointInfo as B where B.ProjectId=P.ProjectId ),0) as count2,
|
||||
isnull((select sum(CHT_TotalFilm) from CH_CheckItem C left join CH_Check D on C.CHT_CheckID=D.CHT_CheckID
|
||||
WHERE D.ProjectId=P.ProjectId),0) AS count3,
|
||||
isnull((select sum(CHT_PassFilm) from CH_CheckItem E left join CH_Check F on E.CHT_CheckID=F.CHT_CheckID
|
||||
WHERE F.ProjectId=P.ProjectId),0) AS count4
|
||||
from Base_Project as P
|
||||
where ProjectState =1 and (ProjectState2 is null or ProjectState2 !=9) ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
string cpara = string.Empty;
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
|
||||
int count1 = 0, count2 = 0, count3 = 0, count4 = 0;
|
||||
foreach (DataRow row in tb.Rows)
|
||||
{
|
||||
count1 += Convert.ToInt32(row["count1"]);
|
||||
count2 += Convert.ToInt32(row["count2"]);
|
||||
count3 += Convert.ToInt32(row["count3"]);
|
||||
count4 += Convert.ToInt32(row["count4"]);
|
||||
}
|
||||
JObject summary = new JObject();
|
||||
summary.Add("ProjectName", "合计:");
|
||||
summary.Add("Count1", count1.ToString());
|
||||
summary.Add("Count2", count2.ToString());
|
||||
summary.Add("Count3", count3.ToString());
|
||||
summary.Add("Count4", count4.ToString());
|
||||
Grid1.SummaryData = summary;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,21 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<script src="~/Controls/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
|
||||
<title>隐患排查</title>
|
||||
<style>
|
||||
.f-grid-row-summary .f-grid-cell-ProjectName .f-grid-cell-inner {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.f-grid-row-summary .f-grid-cell-inner {
|
||||
font-weight: bold;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.f-grid-row-summary:first-child .f-grid-cell-inner {
|
||||
font-weight: normal;
|
||||
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
@@ -17,9 +32,10 @@
|
||||
<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">
|
||||
SortField="ProjectName" SortDirection="ASC" OnSort="Grid1_Sort" EnableColumnLines="true" AllowPaging="true"
|
||||
IsDatabasePaging="False" PageSize="20" ForceFit="true"
|
||||
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True"
|
||||
EnableSummary="true" SummaryPosition="Bottom">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
@@ -51,7 +67,7 @@
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="labNumber" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
</f:TemplateField>
|
||||
<f:RenderField Width="150px" ColumnID="ProjectCode" DataField="ProjectCode" FieldType="String" HeaderText="项目号" TextAlign="Left"
|
||||
HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using BLL;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
@@ -9,7 +10,9 @@ namespace FineUIPro.Web.DataShow
|
||||
{
|
||||
public partial class HiddenRectification : PageBase
|
||||
{
|
||||
|
||||
private int AllCount1 = 0;
|
||||
private int AllCount2 = 0;
|
||||
private int AllCount3 = 0;
|
||||
#region 加载页面
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
@@ -25,6 +28,8 @@ namespace FineUIPro.Web.DataShow
|
||||
BLL.ProjectService.InitProjectDropDownList(this.drpProject, true);
|
||||
// 绑定表格t
|
||||
BindGrid();
|
||||
//合计
|
||||
// OutputSummaryData();
|
||||
this.Panel1.Title = "隐患排查治理数据(" + BLL.UnitService.GetUnitNameByUnitId(BLL.CommonService.GetThisUnitId()) + ")";
|
||||
}
|
||||
}
|
||||
@@ -62,8 +67,9 @@ namespace FineUIPro.Web.DataShow
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataSource = tb;
|
||||
Grid1.DataBind();
|
||||
OutputSummaryData();
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -75,6 +81,9 @@ namespace FineUIPro.Web.DataShow
|
||||
/// <param name="e"></param>
|
||||
protected void TextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
AllCount1 = 0;
|
||||
AllCount2 = 0;
|
||||
AllCount3= 0;
|
||||
this.BindGrid();
|
||||
}
|
||||
#endregion
|
||||
@@ -154,7 +163,7 @@ namespace FineUIPro.Web.DataShow
|
||||
{
|
||||
EditData();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 数量
|
||||
/// </summary>
|
||||
@@ -166,8 +175,8 @@ namespace FineUIPro.Web.DataShow
|
||||
if (projectId != null)
|
||||
{
|
||||
var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text);
|
||||
var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text);
|
||||
var getT = Funs.DB.HSSE_Hazard_HazardRegister.Where(x => x.ProjectId == projectId.ToString() && x.States != "4");
|
||||
var datetime2 = Funs.GetNewDateTime(this.txtEndTime.Text);
|
||||
var getT = Funs.DB.HSSE_Hazard_HazardRegister.Where(x => x.ProjectId == projectId.ToString() && x.States != "4" && x.RegisterDate > Funs.minSysDate && x.ProblemTypes == "1");
|
||||
if (datetime1.HasValue)
|
||||
{
|
||||
getT = getT.Where(x => x.RegisterDate >= datetime1);
|
||||
@@ -186,6 +195,36 @@ namespace FineUIPro.Web.DataShow
|
||||
}
|
||||
cout1 = getT.Count();
|
||||
}
|
||||
|
||||
AllCount1 += cout1;
|
||||
return cout1;
|
||||
}
|
||||
protected int CountALL(object projectId)
|
||||
{
|
||||
int cout1 = 0;
|
||||
if (projectId != null)
|
||||
{
|
||||
var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text);
|
||||
var datetime2 = Funs.GetNewDateTime(this.txtEndTime.Text);
|
||||
var getT = Funs.DB.HSSE_Hazard_HazardRegister.Where(x => x.ProjectId == projectId.ToString() && x.States != "4" && x.RegisterDate > Funs.minSysDate && x.ProblemTypes == "1");
|
||||
if (datetime1.HasValue)
|
||||
{
|
||||
getT = getT.Where(x => x.RegisterDate >= datetime1);
|
||||
}
|
||||
if (datetime2.HasValue)
|
||||
{
|
||||
getT = getT.Where(x => x.RegisterDate <= datetime2);
|
||||
}
|
||||
if (this.rbType.SelectedValue == "0")
|
||||
{
|
||||
getT = getT.Where(x => x.Risk_Level == "重大");
|
||||
}
|
||||
else
|
||||
{
|
||||
getT = getT.Where(x => x.Risk_Level == "一般");
|
||||
}
|
||||
cout1 = getT.Count();
|
||||
}
|
||||
return cout1;
|
||||
}
|
||||
|
||||
@@ -195,8 +234,8 @@ namespace FineUIPro.Web.DataShow
|
||||
if (projectId != null)
|
||||
{
|
||||
var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text);
|
||||
var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text);
|
||||
var getT = Funs.DB.HSSE_Hazard_HazardRegister.Where(x => x.ProjectId == projectId.ToString() && x.States == "3");
|
||||
var datetime2 = Funs.GetNewDateTime(this.txtEndTime.Text);
|
||||
var getT = Funs.DB.HSSE_Hazard_HazardRegister.Where(x => x.ProjectId == projectId.ToString() && x.States == "3" && x.RegisterDate > Funs.minSysDate && x.ProblemTypes=="1");
|
||||
if (datetime1.HasValue)
|
||||
{
|
||||
getT = getT.Where(x => x.RegisterDate >= datetime1);
|
||||
@@ -215,17 +254,46 @@ namespace FineUIPro.Web.DataShow
|
||||
}
|
||||
cout1 = getT.Count();
|
||||
}
|
||||
|
||||
AllCount2 += cout1;
|
||||
return cout1;
|
||||
}
|
||||
protected int CountOk(object projectId)
|
||||
{
|
||||
int cout1 = 0;
|
||||
if (projectId != null)
|
||||
{
|
||||
var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text);
|
||||
var datetime2 = Funs.GetNewDateTime(this.txtEndTime.Text);
|
||||
var getT = Funs.DB.HSSE_Hazard_HazardRegister.Where(x => x.ProjectId == projectId.ToString() && x.States == "3" && x.RegisterDate > Funs.minSysDate && x.ProblemTypes == "1");
|
||||
if (datetime1.HasValue)
|
||||
{
|
||||
getT = getT.Where(x => x.RegisterDate >= datetime1);
|
||||
}
|
||||
if (datetime2.HasValue)
|
||||
{
|
||||
getT = getT.Where(x => x.RegisterDate <= datetime2);
|
||||
}
|
||||
if (this.rbType.SelectedValue == "0")
|
||||
{
|
||||
getT = getT.Where(x => x.Risk_Level == "重大");
|
||||
}
|
||||
else
|
||||
{
|
||||
getT = getT.Where(x => x.Risk_Level == "一般");
|
||||
}
|
||||
cout1 = getT.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 getT = Funs.DB.HSSE_Hazard_HazardRegister.Where(x => x.ProjectId == projectId.ToString() && x.States != "3" && x.States != "4");
|
||||
var datetime2 = Funs.GetNewDateTime(this.txtEndTime.Text);
|
||||
var getT = Funs.DB.HSSE_Hazard_HazardRegister.Where(x => x.ProjectId == projectId.ToString() && x.States != "3" && x.States != "4" && x.RegisterDate > Funs.minSysDate && x.ProblemTypes == "1");
|
||||
if (datetime1.HasValue)
|
||||
{
|
||||
getT = getT.Where(x => x.RegisterDate >= datetime1);
|
||||
@@ -244,6 +312,7 @@ namespace FineUIPro.Web.DataShow
|
||||
}
|
||||
cout1 = getT.Count();
|
||||
}
|
||||
AllCount3 += cout1;
|
||||
return cout1;
|
||||
}
|
||||
|
||||
@@ -252,28 +321,8 @@ namespace FineUIPro.Web.DataShow
|
||||
string rate = string.Empty;
|
||||
if (projectId != null)
|
||||
{
|
||||
var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text);
|
||||
var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text);
|
||||
var getALL = Funs.DB.HSSE_Hazard_HazardRegister.Where(x => x.ProjectId == projectId.ToString() && x.States != "4");
|
||||
if (this.rbType.SelectedValue == "0")
|
||||
{
|
||||
getALL = getALL.Where(x => x.Risk_Level == "重大");
|
||||
}
|
||||
else
|
||||
{
|
||||
getALL = getALL.Where(x => x.Risk_Level == "一般");
|
||||
}
|
||||
if (datetime1.HasValue)
|
||||
{
|
||||
getALL = getALL.Where(x => x.RegisterDate >= datetime1);
|
||||
}
|
||||
if (datetime2.HasValue)
|
||||
{
|
||||
getALL = getALL.Where(x => x.RegisterDate >= datetime1);
|
||||
}
|
||||
var getT = getALL.Where(x => x.ProjectId == projectId.ToString() && x.States == "3");
|
||||
int coutall = getALL.Count();
|
||||
int cout0 = getT.Count();
|
||||
int coutall = CountALL(projectId);
|
||||
int cout0 = CountOk(projectId);
|
||||
if (coutall > 0)
|
||||
{
|
||||
rate = Math.Round(cout0 * 1.0 / coutall * 100, 2).ToString();
|
||||
@@ -281,5 +330,40 @@ namespace FineUIPro.Web.DataShow
|
||||
}
|
||||
return rate;
|
||||
}
|
||||
|
||||
#region 合计数据(不根据条件改变)
|
||||
public void OutputSummaryData()
|
||||
{
|
||||
//string strSql = @"select ProjectId,ProjectCode, ProjectName,isnull(count1,0) as count1,isnull(count2,0) as count2,isnull(count3,0) as count3 from Base_Project f
|
||||
//left join(select count(*) as count1,ProjectId as ProjectIda from HSSE_Hazard_HazardRegister
|
||||
//where states <> 4 and Risk_Level= '" + this.rbType.SelectedItem.Text + @"' and RegisterDate > '2023-01-01'
|
||||
//group by ProjectId) a
|
||||
//on f.ProjectId = a.ProjectIda
|
||||
|
||||
//left join(select count(*) as count2,ProjectId as ProjectIdb from HSSE_Hazard_HazardRegister
|
||||
//where states = 3 and Risk_Level= '" + this.rbType.SelectedItem.Text + @"' and RegisterDate > '2023-01-01'
|
||||
//group by ProjectId) b
|
||||
//on f.ProjectId = b.ProjectIdb
|
||||
|
||||
//left join(select count(*) as count3,ProjectId as ProjectIdc from HSSE_Hazard_HazardRegister
|
||||
//where states <> 3 and states<>4 and Risk_Level= '" + this.rbType.SelectedItem.Text + @"' and RegisterDate > '2023-01-01'
|
||||
//group by ProjectId) c
|
||||
//on f.ProjectId = c.ProjectIdc
|
||||
|
||||
//where ProjectState = 1 and(isDelete IS NULL OR isDelete = 0)";
|
||||
//List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
//SqlParameter[] parameter = listStr.ToArray();
|
||||
//DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
|
||||
|
||||
JObject summary = new JObject();
|
||||
summary.Add("ProjectName", "合计:");
|
||||
summary.Add("Count1", AllCount1.ToString());
|
||||
summary.Add("Count2", AllCount2.ToString());
|
||||
summary.Add("Count3", AllCount3.ToString());
|
||||
summary.Add("Count4", (float.Parse(AllCount2.ToString()) / float.Parse(AllCount1.ToString()) *100).ToString("F2"));
|
||||
Grid1.SummaryData = summary;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,9 @@
|
||||
using Aspose.Words;
|
||||
using BLL;
|
||||
using Org.BouncyCastle.Asn1.Ocsp;
|
||||
using BLL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace FineUIPro.Web.DataShow
|
||||
{
|
||||
@@ -64,7 +60,7 @@ namespace FineUIPro.Web.DataShow
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
string strSql = "SELECT * FROM View_Hazard_HazardRegister WHERE ProblemTypes in ('1' ,'2') ";
|
||||
string strSql = "SELECT * FROM View_Hazard_HazardRegister WHERE ProblemTypes ='1' and CheckTime > '2023-01-01' ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
strSql += " AND ProjectId = @ProjectId";
|
||||
listStr.Add(new SqlParameter("@ProjectId", Request.Params["projectId"]));
|
||||
@@ -168,7 +164,7 @@ namespace FineUIPro.Web.DataShow
|
||||
var registration = BLL.HSSE_Hazard_HazardRegisterService.GetHazardRegisterByHazardRegisterId(registrationId.ToString());
|
||||
if (registration != null)
|
||||
{
|
||||
url = BLL.UploadAttachmentService.ShowImage("../", registration.ImageUrl);
|
||||
url = BLL.UploadAttachmentService.ShowImage(httpUrl, registration.ImageUrl);
|
||||
}
|
||||
}
|
||||
return url;
|
||||
@@ -194,7 +190,7 @@ namespace FineUIPro.Web.DataShow
|
||||
var registration = BLL.HSSE_Hazard_HazardRegisterService.GetHazardRegisterByHazardRegisterId(registrationId.ToString());
|
||||
if (registration != null)
|
||||
{
|
||||
url = BLL.UploadAttachmentService.ShowImage("../", registration.RectificationImageUrl);
|
||||
url = BLL.UploadAttachmentService.ShowImage(httpUrl, registration.RectificationImageUrl);
|
||||
}
|
||||
}
|
||||
return url;
|
||||
|
||||
@@ -8,6 +8,21 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<script src="~/Controls/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
|
||||
<title>危大工程</title>
|
||||
<style>
|
||||
.f-grid-row-summary .f-grid-cell-ProjectName .f-grid-cell-inner {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.f-grid-row-summary .f-grid-cell-inner {
|
||||
font-weight: bold;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.f-grid-row-summary:first-child .f-grid-cell-inner {
|
||||
font-weight: normal;
|
||||
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
@@ -19,7 +34,8 @@
|
||||
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">
|
||||
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True"
|
||||
EnableSummary="true" SummaryPosition="Bottom">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
using Aspose.Words;
|
||||
using BLL;
|
||||
using BLL;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.ServiceModel.Configuration;
|
||||
using System.Text;
|
||||
|
||||
namespace FineUIPro.Web.DataShow
|
||||
{
|
||||
@@ -28,23 +25,25 @@ namespace FineUIPro.Web.DataShow
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
BLL.ProjectService.InitProjectDropDownList(this.drpProject, true);
|
||||
LargerHazard = (from x in Funs.DB.Solution_LargerHazard
|
||||
join y in Funs.DB.Base_Project on x.ProjectId equals y.ProjectId
|
||||
where y.ProjectState == Const.ProjectState_1
|
||||
select x).ToList();
|
||||
join y in Funs.DB.Base_Project on x.ProjectId equals y.ProjectId
|
||||
where y.ProjectState == Const.ProjectState_1 && x.RecordTime > Funs.minSysDate
|
||||
select x).ToList();
|
||||
// 绑定表格t
|
||||
BindGrid();
|
||||
// 合计
|
||||
OutputSummaryData();
|
||||
this.Panel1.Title = "危大工程数据(" + BLL.UnitService.GetUnitNameByUnitId(BLL.CommonService.GetThisUnitId()) + ")";
|
||||
}
|
||||
}
|
||||
|
||||
public static List<Model.Solution_LargerHazard> LargerHazard = new List<Model.Solution_LargerHazard>();
|
||||
public static List<Model.Solution_LargerHazard> LargerHazard = new List<Model.Solution_LargerHazard>();
|
||||
|
||||
/// <summary>
|
||||
/// 绑定数据
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
string strSql = @"select ProjectId,ProjectCode, ProjectName from Base_Project where ProjectState =1 and (ProjectState2 is null or ProjectState2 !=9) ";
|
||||
string strSql = @"select ProjectId,ProjectCode, ProjectName from Base_Project where ProjectState =1 and (isDelete IS NULL OR isDelete =0) ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
string cpara = string.Empty;
|
||||
if (this.drpProject.SelectedValue != Const._Null)
|
||||
@@ -143,7 +142,7 @@ namespace FineUIPro.Web.DataShow
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("LargeEngineeringItem.aspx?projectId={0}", Grid1.SelectedRowID, "查看 - ")));
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
@@ -154,7 +153,6 @@ namespace FineUIPro.Web.DataShow
|
||||
EditData();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取危大工程数
|
||||
/// </summary>
|
||||
@@ -162,10 +160,10 @@ namespace FineUIPro.Web.DataShow
|
||||
/// <returns></returns>
|
||||
protected int Count1(object projectId)
|
||||
{
|
||||
int cout1 = 0;
|
||||
int cout1 = 0;
|
||||
if (projectId != null)
|
||||
{
|
||||
cout1 = LargerHazard.Where(x => x.ProjectId == projectId.ToString() && x.IsSuperLargerHazard == false).Count();
|
||||
cout1 = LargerHazard.Where(x => x.ProjectId == projectId.ToString() && x.IsSuperLargerHazard == false ).Count();
|
||||
}
|
||||
return cout1;
|
||||
}
|
||||
@@ -225,7 +223,7 @@ namespace FineUIPro.Web.DataShow
|
||||
int cout1 = 0;
|
||||
if (projectId != null)
|
||||
{
|
||||
cout1 = LargerHazard.Where(x => x.ProjectId == projectId.ToString()).Sum(x=>x.TrainPersonNum ?? 0);
|
||||
cout1 = LargerHazard.Where(x => x.ProjectId == projectId.ToString()).Sum(x => x.TrainPersonNum ?? 0);
|
||||
}
|
||||
return cout1;
|
||||
}
|
||||
@@ -244,5 +242,42 @@ namespace FineUIPro.Web.DataShow
|
||||
}
|
||||
return cout1;
|
||||
}
|
||||
|
||||
#region 合计
|
||||
private void OutputSummaryData()
|
||||
{
|
||||
string strSql = @"select P.ProjectId,P.ProjectCode, P.ProjectName,
|
||||
isnull((select count(*) from Solution_LargerHazard as a where a.ProjectId=P.ProjectId and a.IsSuperLargerHazard=0 ),0) as Count1,
|
||||
isnull((select count(*) from Solution_LargerHazard as b where b.ProjectId=P.ProjectId and b.IsSuperLargerHazard=1 ),0) as Count2,
|
||||
isnull((select count(*) from Solution_LargerHazard as c where c.ProjectId=P.ProjectId and c.States='2' ),0) as Count3,
|
||||
isnull((select count(*) from Solution_LargerHazard as d where d.ProjectId=P.ProjectId and d.States='1' ),0) as Count4,
|
||||
isnull((select sum(TrainPersonNum) from Solution_LargerHazard as e where e.ProjectId=P.ProjectId ),0) as Count5,
|
||||
isnull((select count(*) from Solution_LargerHazard as f where f.ProjectId=P.ProjectId and f.States='3' ),0) as Count6
|
||||
from Base_Project AS P
|
||||
where ProjectState =1 and (ProjectState2 is null or ProjectState2 !=9) ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
int Count1 = 0, Count2 = 0, Count3 = 0, Count4 = 0, Count5 = 0, Count6 = 0;
|
||||
foreach (DataRow row in tb.Rows)
|
||||
{
|
||||
Count1 += Convert.ToInt32(row["Count1"]);
|
||||
Count2 += Convert.ToInt32(row["Count2"]);
|
||||
Count3 += Convert.ToInt32(row["Count3"]);
|
||||
Count4 += Convert.ToInt32(row["Count4"]);
|
||||
Count5 += Convert.ToInt32(row["Count5"]);
|
||||
Count6 += Convert.ToInt32(row["Count6"]);
|
||||
}
|
||||
JObject summary = new JObject();
|
||||
summary.Add("ProjectName", "合计:");
|
||||
summary.Add("Count1", Count1.ToString());
|
||||
summary.Add("Count2", Count2.ToString());
|
||||
summary.Add("Count3", Count3.ToString());
|
||||
summary.Add("Count4", Count4.ToString());
|
||||
summary.Add("Count5", Count5.ToString());
|
||||
summary.Add("Count6", Count6.ToString());
|
||||
Grid1.SummaryData = summary;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,8 @@
|
||||
using Aspose.Words;
|
||||
using BLL;
|
||||
using Org.BouncyCastle.Asn1.Ocsp;
|
||||
using BLL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace FineUIPro.Web.DataShow
|
||||
{
|
||||
@@ -48,7 +43,7 @@ namespace FineUIPro.Web.DataShow
|
||||
FROM Solution_LargerHazard AS L
|
||||
LEFT JOIN Sys_User AS Users ON L.RecardMan=Users.UserId
|
||||
LEFT JOIN Sys_Const AS Const ON L.HazardType=Const.ConstValue and Const.GroupId='LargerHazardType'
|
||||
LEFT JOIN Sys_CodeRecords AS CodeRecords ON L.HazardId=CodeRecords.DataId WHERE 1=1 ";
|
||||
LEFT JOIN Sys_CodeRecords AS CodeRecords ON L.HazardId=CodeRecords.DataId WHERE L.RecordTime >'2023-01-01' ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
strSql += " AND L.ProjectId = @ProjectId";
|
||||
listStr.Add(new SqlParameter("@ProjectId", Request.Params["projectId"]));
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
using BLL;
|
||||
using Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
|
||||
namespace FineUIPro.Web.DataShow
|
||||
{
|
||||
@@ -41,7 +39,7 @@ namespace FineUIPro.Web.DataShow
|
||||
,V.WorkAreaName,V.CompileDate,V.StartDate,V.EndDate,V.WorkStatesStr,V.LicenseTypeId,V.UnitId,V.LicenseManageContents
|
||||
,V.CompileMan,V.CompileDate,V.States,V.UserName
|
||||
FROM View_License_LicenseManager AS V
|
||||
WHERE 1=1";
|
||||
WHERE V.CompileDate > '2023-01-01' ";
|
||||
if (this.rbType.SelectedValue=="2")
|
||||
{
|
||||
strSql += " AND V.WorkStates = @WorkStates";
|
||||
|
||||
@@ -1,12 +1,8 @@
|
||||
using Aspose.Words;
|
||||
using BLL;
|
||||
using BLL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace FineUIPro.Web.DataShow
|
||||
{
|
||||
@@ -44,7 +40,7 @@ namespace FineUIPro.Web.DataShow
|
||||
,MeetingHostMan AS HostMan,Meeting.AttentPersonNum,Meeting.AttentPerson
|
||||
FROM Meeting_CompanySafetyMeeting AS Meeting
|
||||
LEFT JOIN Sys_User AS Users ON Meeting.MeetingHostMan=Users.UserId
|
||||
where 1=1 ";
|
||||
where Meeting.CompanySafetyMeetingDate > '2023-01-01' ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
if (!string.IsNullOrEmpty(this.txtStartTime.Text))
|
||||
{
|
||||
@@ -72,7 +68,7 @@ namespace FineUIPro.Web.DataShow
|
||||
,MeetingHostMan AS HostMan,Meeting.AttentPersonNum,Meeting.AttentPerson
|
||||
FROM Meeting_CompanySpecialMeeting AS Meeting
|
||||
LEFT JOIN Sys_User AS Users ON Meeting.MeetingHostMan=Users.UserId
|
||||
where 1=1 ";
|
||||
where Meeting.CompanySpecialMeetingDate > '2023-01-01' ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
if (!string.IsNullOrEmpty(this.txtStartTime.Text))
|
||||
{
|
||||
@@ -100,7 +96,7 @@ namespace FineUIPro.Web.DataShow
|
||||
FROM Meeting_SafetyLeaderGroupMeeting AS Meeting
|
||||
LEFT JOIN Sys_User AS Users ON Meeting.MeetingHostMan=Users.UserId
|
||||
LEFT JOIN Base_Project AS Project ON Meeting.ProjectId=Project.ProjectId
|
||||
where (Project.ProjectState2 is null or Project.ProjectState2 !=9) ";
|
||||
where Meeting.SafetyLeaderGroupMeetingDate > '2023-01-01' ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
if (this.drpProject.SelectedValue != Const._Null)
|
||||
{
|
||||
@@ -134,14 +130,14 @@ namespace FineUIPro.Web.DataShow
|
||||
,MeetingHostMan AS HostMan,Meeting.AttentPersonNum,Meeting.AttentPerson
|
||||
FROM Meeting_MonthMeeting AS Meeting
|
||||
LEFT JOIN Sys_User AS Users ON Meeting.MeetingHostMan=Users.UserId
|
||||
LEFT JOIN Base_Project AS Project ON Meeting.ProjectId=Project.ProjectId where (Project.ProjectState2 is null or Project.ProjectState2 !=9)
|
||||
LEFT JOIN Base_Project AS Project ON Meeting.ProjectId=Project.ProjectId
|
||||
union all
|
||||
SELECT Project.ProjectId,Project.ProjectName,Meeting.WeekMeetingId AS ID,Meeting.WeekMeetingName AS MeetingName,Meeting.WeekMeetingDate AS MeetingDate,Meeting.MeetingHours
|
||||
,MeetingHostMan AS HostMan,Meeting.AttentPersonNum,Meeting.AttentPerson
|
||||
FROM Meeting_WeekMeeting AS Meeting
|
||||
LEFT JOIN Sys_User AS Users ON Meeting.MeetingHostMan=Users.UserId
|
||||
LEFT JOIN Base_Project AS Project ON Meeting.ProjectId=Project.ProjectId where (Project.ProjectState2 is null or Project.ProjectState2 !=9)) V
|
||||
where 1=1 ";
|
||||
LEFT JOIN Base_Project AS Project ON Meeting.ProjectId=Project.ProjectId ) V
|
||||
where V.MeetingDate > '2023-01-01' ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
if (this.drpProject.SelectedValue != Const._Null)
|
||||
{
|
||||
|
||||
@@ -8,6 +8,21 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<script src="~/Controls/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
|
||||
<title>工程划分</title>
|
||||
<style>
|
||||
.f-grid-row-summary .f-grid-cell-ProjectName .f-grid-cell-inner {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.f-grid-row-summary .f-grid-cell-inner {
|
||||
font-weight: bold;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.f-grid-row-summary:first-child .f-grid-cell-inner {
|
||||
font-weight: normal;
|
||||
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
@@ -19,7 +34,8 @@
|
||||
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"
|
||||
EnableTextSelection="True">
|
||||
EnableTextSelection="True"
|
||||
EnableSummary="true" SummaryPosition="Bottom">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
using BLL;
|
||||
using FineUIPro.Web.BaseInfo;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
|
||||
namespace FineUIPro.Web.DataShow
|
||||
{
|
||||
@@ -25,6 +24,9 @@ namespace FineUIPro.Web.DataShow
|
||||
BLL.ProjectService.InitProjectDropDownList(this.drpProject, true);
|
||||
// 绑定表格t
|
||||
BindGrid();
|
||||
|
||||
//合计
|
||||
OutputSummaryData();
|
||||
this.Panel1.Title = "工程划分数据(" + BLL.UnitService.GetUnitNameByUnitId(BLL.CommonService.GetThisUnitId()) + ")";
|
||||
}
|
||||
}
|
||||
@@ -124,5 +126,40 @@ namespace FineUIPro.Web.DataShow
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 合计
|
||||
private void OutputSummaryData() {
|
||||
string strSql = @"SELECT P.ProjectId,P.ProjectCode,P.ProjectName
|
||||
,(SELECT COUNT(*) FROM Project_Installation AS A WHERE A.ProjectId =P.ProjectId AND A.SuperInstallationId='0') AS count1
|
||||
,(SELECT COUNT(*) FROM WBS_UnitWork AS B WHERE B.ProjectId =P.ProjectId) AS count2
|
||||
,(SELECT COUNT(*) FROM WBS_DivisionProject AS C WHERE C.ProjectId =P.ProjectId AND C.SubItemType= '1') AS count3
|
||||
,(SELECT COUNT(*) FROM WBS_DivisionProject AS D WHERE D.ProjectId =P.ProjectId AND D.SubItemType= '3') AS count4
|
||||
,(SELECT COUNT(*) FROM WBS_BreakdownProject AS E WHERE E.ProjectId =P.ProjectId ) AS count5
|
||||
FROM Base_Project AS P
|
||||
WHERE P.ProjectState = 1 ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
|
||||
int count1 =0, count2=0, count3=0, count4=0, count5 = 0;
|
||||
|
||||
foreach (DataRow row in tb.Rows)
|
||||
{
|
||||
count1 += Convert.ToInt32(row["count1"]);
|
||||
count2 += Convert.ToInt32(row["count2"]);
|
||||
count3 += Convert.ToInt32(row["count3"]);
|
||||
count4 += Convert.ToInt32(row["count4"]);
|
||||
count5 += Convert.ToInt32(row["count5"]);
|
||||
}
|
||||
JObject summary = new JObject();
|
||||
summary.Add("ProjectName", "合计:");
|
||||
summary.Add("count1", count1.ToString());
|
||||
summary.Add("count2", count2.ToString());
|
||||
summary.Add("count3", count3.ToString());
|
||||
summary.Add("count4", count4.ToString());
|
||||
summary.Add("count5", count5.ToString());
|
||||
Grid1.SummaryData = summary;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -28,7 +28,7 @@
|
||||
EnableEdit="true" OnSelectedIndexChanged="TextBox_TextChanged" AutoPostBack="true">
|
||||
</f:DropDownList>
|
||||
<f:ToolbarSeparator runat="server"></f:ToolbarSeparator>
|
||||
<f:RadioButtonList runat="server" ID="rbType" Width="650px" Label="类型" LabelWidth="50px"
|
||||
<f:RadioButtonList runat="server" ID="rbType" Width="600px" Label="类型" LabelWidth="50px"
|
||||
AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged" AutoColumnWidth="true">
|
||||
<f:RadioItem Text="总监" Value="0" Selected="true" />
|
||||
<f:RadioItem Text="专职" Value="1" />
|
||||
|
||||
@@ -3,7 +3,6 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
|
||||
namespace FineUIPro.Web.DataShow
|
||||
{
|
||||
|
||||
@@ -8,25 +8,40 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<script src="~/Controls/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
|
||||
<title>质量验收</title>
|
||||
<style>
|
||||
.f-grid-row-summary .f-grid-cell-ProjectName .f-grid-cell-inner {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.f-grid-row-summary .f-grid-cell-inner {
|
||||
font-weight: bold;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.f-grid-row-summary:first-child .f-grid-cell-inner {
|
||||
font-weight: normal;
|
||||
|
||||
}
|
||||
</style>
|
||||
</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">
|
||||
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"
|
||||
EnableTextSelection="True">
|
||||
EnableTextSelection="True" EnableSummary="true" SummaryPosition="Bottom">
|
||||
<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:RadioButtonList runat="server" ID="rbType" Width="640px" Label="类型" LabelWidth="50px"
|
||||
<f:RadioButtonList runat="server" ID="rbType" Width="600px" Label="类型" LabelWidth="50px"
|
||||
AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged" AutoColumnWidth="true">
|
||||
<f:RadioItem Text="关键工序" Value="1" Selected="true" />
|
||||
<f:RadioItem Text="特殊过程" Value="2" />
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using BLL;
|
||||
using FineUIPro.Web.BaseInfo;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
@@ -25,7 +26,10 @@ namespace FineUIPro.Web.DataShow
|
||||
BLL.ProjectService.InitProjectDropDownList(this.drpProject, true);
|
||||
// 绑定表格t
|
||||
BindGrid();
|
||||
this.Panel1.Title = "质量验收数据(" + BLL.UnitService.GetUnitNameByUnitId(BLL.Const.UnitId_CD) + ")";
|
||||
|
||||
// 合计
|
||||
|
||||
this.Panel1.Title = "质量验收数据(" + BLL.UnitService.GetUnitNameByUnitId(BLL.CommonService.GetThisUnitId()) + ")";
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -65,6 +69,7 @@ namespace FineUIPro.Web.DataShow
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
OutputSummaryData();
|
||||
}
|
||||
|
||||
#region 查询
|
||||
@@ -128,6 +133,7 @@ namespace FineUIPro.Web.DataShow
|
||||
private static IQueryable<Model.QualityAcceptanceItem> getDataItemLists = from x in Funs.DB.ProcessControl_InspectionManagementDetail
|
||||
join y in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals y.InspectionId
|
||||
join z in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals z.BreakdownProjectId
|
||||
where x.CreateDate > Funs.minSysDate
|
||||
select new Model.QualityAcceptanceItem
|
||||
{
|
||||
InspectionDetailId = x.InspectionDetailId,
|
||||
@@ -204,5 +210,51 @@ namespace FineUIPro.Web.DataShow
|
||||
}
|
||||
return rate;
|
||||
}
|
||||
|
||||
#region 合计
|
||||
private void OutputSummaryData()
|
||||
{
|
||||
string strSql = @"select a.ProjectId,a.ProjectCode, a.ProjectName,a.UnitId,isnull(Count1,0) as Count1,
|
||||
isnull(Count2,0) as Count2
|
||||
from Base_Project a
|
||||
|
||||
left join (select count(*) as Count1,z.ProjectId From ProcessControl_InspectionManagementDetail x
|
||||
left join ProcessControl_InspectionManagement y on x.InspectionId=y.InspectionId
|
||||
left join WBS_BreakdownProject z on x.ControlPointType=z.BreakdownProjectId group by z.ProjectId) as b
|
||||
on a.ProjectId= b.ProjectId
|
||||
|
||||
left join (select count(*) as Count2,z.ProjectId,IsOnceQualified From ProcessControl_InspectionManagementDetail x
|
||||
left join ProcessControl_InspectionManagement y on x.InspectionId=y.InspectionId
|
||||
left join WBS_BreakdownProject z on x.ControlPointType=z.BreakdownProjectId
|
||||
group by z.ProjectId,y.IsOnceQualified) as c
|
||||
on a.ProjectId= c.ProjectId and IsOnceQualified=1
|
||||
|
||||
where ProjectState =1 and (ProjectState2 is null or ProjectState2 !=9) ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
int Count1 = 0, Count2 = 0;
|
||||
foreach (DataRow row in tb.Rows)
|
||||
{
|
||||
Count1 += Convert.ToInt32(row["Count1"]);
|
||||
Count2 += Convert.ToInt32(row["Count2"]);
|
||||
}
|
||||
JObject summary = new JObject();
|
||||
summary.Add("ProjectName", "合计:");
|
||||
summary.Add("Count1", Count1.ToString());
|
||||
summary.Add("Count2", Count2.ToString());
|
||||
summary.Add("Count3", (Count1- Count2).ToString());
|
||||
if (Count1 > 0)
|
||||
{
|
||||
summary.Add("Count4", Math.Round(Count2 * 1.0 / Count1 * 100, 2).ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
summary.Add("Count4", "0");
|
||||
}
|
||||
Grid1.SummaryData = summary;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,21 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<script src="~/Controls/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
|
||||
<title>质量控制点</title>
|
||||
<style>
|
||||
.f-grid-row-summary .f-grid-cell-ProjectName .f-grid-cell-inner {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.f-grid-row-summary .f-grid-cell-inner {
|
||||
font-weight: bold;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.f-grid-row-summary:first-child .f-grid-cell-inner {
|
||||
font-weight: normal;
|
||||
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
@@ -19,7 +34,7 @@
|
||||
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"
|
||||
EnableTextSelection="True">
|
||||
EnableTextSelection="True" EnableSummary="true" SummaryPosition="Bottom">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using BLL;
|
||||
using FineUIPro.Web.BaseInfo;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
@@ -25,6 +25,9 @@ namespace FineUIPro.Web.DataShow
|
||||
BLL.ProjectService.InitProjectDropDownList(this.drpProject, true);
|
||||
// 绑定表格t
|
||||
BindGrid();
|
||||
// 合计
|
||||
OutputSummaryData();
|
||||
|
||||
this.Panel1.Title = "质量控制点数据(" + BLL.UnitService.GetUnitNameByUnitId(BLL.CommonService.GetThisUnitId()) + ")";
|
||||
}
|
||||
}
|
||||
@@ -196,5 +199,35 @@ namespace FineUIPro.Web.DataShow
|
||||
return count;
|
||||
|
||||
}
|
||||
|
||||
#region 合计
|
||||
private void OutputSummaryData() {
|
||||
string strSql = @"select ProjectId,ProjectCode, ProjectName,
|
||||
isnull((select count(*) from WBS_BreakdownProject as a where a.ProjectId=P.ProjectId and a.Class LIKE'%S%'),0) as Count1,
|
||||
isnull((select count(*) from WBS_BreakdownProject as a where a.ProjectId=P.ProjectId and a.Class LIKE'%A%'),0) as Count2,
|
||||
isnull((select count(*) from WBS_BreakdownProject as a where a.ProjectId=P.ProjectId and a.Class LIKE'%B%'),0) as Count3,
|
||||
isnull((select count(*) from WBS_BreakdownProject as a where a.ProjectId=P.ProjectId and a.Class LIKE'%C%'),0) as Count4
|
||||
from Base_Project as P
|
||||
where ProjectState =1 and (ProjectState2 is null or ProjectState2 !=9) ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
int Count1 = 0, Count2 = 0, Count3 = 0, Count4 = 0;
|
||||
foreach (DataRow row in tb.Rows)
|
||||
{
|
||||
Count1 += Convert.ToInt32(row["Count1"]);
|
||||
Count2 += Convert.ToInt32(row["Count2"]);
|
||||
Count3 += Convert.ToInt32(row["Count3"]);
|
||||
Count4 += Convert.ToInt32(row["Count4"]);
|
||||
}
|
||||
JObject summary = new JObject();
|
||||
summary.Add("ProjectName", "合计:");
|
||||
summary.Add("Count1", Count1.ToString());
|
||||
summary.Add("Count2", Count2.ToString());
|
||||
summary.Add("Count3", Count3.ToString());
|
||||
summary.Add("Count4", Count4.ToString());
|
||||
Grid1.SummaryData = summary;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,21 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<script src="~/Controls/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
|
||||
<title>计量器具</title>
|
||||
<style>
|
||||
.f-grid-row-summary .f-grid-cell-ProjectName .f-grid-cell-inner {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.f-grid-row-summary .f-grid-cell-inner {
|
||||
font-weight: bold;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.f-grid-row-summary:first-child .f-grid-cell-inner {
|
||||
font-weight: normal;
|
||||
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
@@ -19,7 +34,8 @@
|
||||
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">
|
||||
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True"
|
||||
EnableSummary="true" SummaryPosition="Bottom">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using BLL;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
@@ -25,6 +26,10 @@ namespace FineUIPro.Web.DataShow
|
||||
BLL.ProjectService.InitProjectDropDownList(this.drpProject, true);
|
||||
// 绑定表格t
|
||||
BindGrid();
|
||||
|
||||
// 合计
|
||||
OutputSummaryData();
|
||||
|
||||
this.Panel1.Title = "计量器具数据(" + BLL.UnitService.GetUnitNameByUnitId(BLL.CommonService.GetThisUnitId()) + ")";
|
||||
}
|
||||
}
|
||||
@@ -170,7 +175,8 @@ namespace FineUIPro.Web.DataShow
|
||||
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("计量")
|
||||
where x.ProjectId == projectId.ToString() && x.IsOnSite == true && x.InspectionType.Contains("计量")
|
||||
// && x.CompileDate == Funs.minSysDate
|
||||
select x;
|
||||
if (datetime1.HasValue)
|
||||
{
|
||||
@@ -200,6 +206,7 @@ namespace FineUIPro.Web.DataShow
|
||||
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
|
||||
// && x.CompileDate == Funs.minSysDate
|
||||
select x;
|
||||
if (datetime1.HasValue)
|
||||
{
|
||||
@@ -214,5 +221,28 @@ namespace FineUIPro.Web.DataShow
|
||||
}
|
||||
return cout1;
|
||||
}
|
||||
|
||||
#region 合计
|
||||
private void OutputSummaryData() {
|
||||
string strSql = @"select ProjectId,ProjectCode, ProjectName ,
|
||||
isnull((select count(*) from Comprehensive_InspectionMachine as a where a.ProjectId=P.ProjectId and a.IsOnSite=1 and a.InspectionType like '%计量%' ),0) as Count1,
|
||||
isnull((select count(*) from Comprehensive_InspectionMachine as a where a.ProjectId=P.ProjectId and a.IsOnSite=1 and a.InspectionType like '%计量%' and a.IsCheckOK=1 ),0) as Count2
|
||||
from Base_Project as P where ProjectState =1 and (ProjectState2 is null or ProjectState2 !=9) ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
int Count1 = 0, Count2 = 0;
|
||||
foreach (DataRow row in tb.Rows)
|
||||
{
|
||||
Count1 += Convert.ToInt32(row["Count1"]);
|
||||
Count2 += Convert.ToInt32(row["Count2"]);
|
||||
}
|
||||
JObject summary = new JObject();
|
||||
summary.Add("ProjectName", "合计:");
|
||||
summary.Add("Count1", Count1.ToString());
|
||||
summary.Add("Count2", Count2.ToString());
|
||||
Grid1.SummaryData = summary;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -57,11 +57,11 @@ namespace FineUIPro.Web.DataShow
|
||||
}
|
||||
else
|
||||
{
|
||||
strSql = @"SELECT Person.PersonId AS ID,Unit.UnitName,Project.ProjectName,Person.PersonName,case Person.Sex when '1' then '男' else '女' end as SexStr,Person.IdentityCard,WorkPost.WorkPostName,Person.Telephone,Person.Remark
|
||||
strSql = @"SELECT Person.PersonId AS ID,Unit.UnitName,Project.ProjectName,Person.PersonName,case Person.Sex when '1' then '男' when '2' then '女' else '男' end as SexStr,Person.IdentityCard,WorkPost.WorkPostName,Person.Telephone,Person.Remark
|
||||
FROM SitePerson_Person AS Person
|
||||
LEFT JOIN Base_Project AS Project ON Project.ProjectId=Person.ProjectId
|
||||
LEFT JOIN Base_Unit AS Unit ON Unit.UnitId=Person.UnitId
|
||||
LEFT JOIN Base_WorkPost AS WorkPost ON Person.WorkPostId=WorkPost.WorkPostId WHERE WorkPost.IsCQMS=1 and (Project.ProjectState2 is null or Project.ProjectState2 !=9) ";
|
||||
LEFT JOIN Base_WorkPost AS WorkPost ON Person.WorkPostId=WorkPost.WorkPostId WHERE WorkPost.IsCQMS=1 ";
|
||||
if (this.drpProject.SelectedValue != Const._Null)
|
||||
{
|
||||
strSql += " AND Person.ProjectId = @ProjectId";
|
||||
|
||||
@@ -8,6 +8,21 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<script src="~/Controls/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
|
||||
<title>质量问题</title>
|
||||
<style>
|
||||
.f-grid-row-summary .f-grid-cell-ProjectName .f-grid-cell-inner {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.f-grid-row-summary .f-grid-cell-inner {
|
||||
font-weight: bold;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.f-grid-row-summary:first-child .f-grid-cell-inner {
|
||||
font-weight: normal;
|
||||
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
@@ -19,7 +34,8 @@
|
||||
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">
|
||||
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True"
|
||||
EnableSummary="true" SummaryPosition="Bottom">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using BLL;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
@@ -25,6 +26,10 @@ namespace FineUIPro.Web.DataShow
|
||||
BLL.ProjectService.InitProjectDropDownList(this.drpProject, true);
|
||||
// 绑定表格t
|
||||
BindGrid();
|
||||
|
||||
// 合计
|
||||
OutputSummaryData();
|
||||
|
||||
this.Panel1.Title = "质量问题治理数据(" + BLL.UnitService.GetUnitNameByUnitId(BLL.CommonService.GetThisUnitId()) + ")";
|
||||
}
|
||||
}
|
||||
@@ -167,7 +172,7 @@ namespace FineUIPro.Web.DataShow
|
||||
{
|
||||
var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text);
|
||||
var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text);
|
||||
var getT = Funs.DB.Check_CheckControl.Where(x => x.ProjectId == projectId.ToString());
|
||||
var getT = Funs.DB.Check_CheckControl.Where(x => x.ProjectId == projectId.ToString() && x.CheckDate > Funs.minSysDate );
|
||||
if (datetime1.HasValue)
|
||||
{
|
||||
getT = getT.Where(x => x.CheckDate >= datetime1);
|
||||
@@ -189,7 +194,7 @@ namespace FineUIPro.Web.DataShow
|
||||
{
|
||||
var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text);
|
||||
var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text);
|
||||
var getT = Funs.DB.Check_CheckControl.Where(x => x.ProjectId == projectId.ToString() && x.State == "7");
|
||||
var getT = Funs.DB.Check_CheckControl.Where(x => x.ProjectId == projectId.ToString() && x.State == "7" && x.CheckDate > Funs.minSysDate);
|
||||
if (datetime1.HasValue)
|
||||
{
|
||||
getT = getT.Where(x => x.CheckDate >= datetime1);
|
||||
@@ -211,7 +216,7 @@ namespace FineUIPro.Web.DataShow
|
||||
{
|
||||
var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text);
|
||||
var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text);
|
||||
var getT = Funs.DB.Check_CheckControl.Where(x => x.ProjectId == projectId.ToString() && x.State != "7");
|
||||
var getT = Funs.DB.Check_CheckControl.Where(x => x.ProjectId == projectId.ToString() && x.State != "7" && x.CheckDate > Funs.minSysDate);
|
||||
if (datetime1.HasValue)
|
||||
{
|
||||
getT = getT.Where(x => x.CheckDate >= datetime1);
|
||||
@@ -232,7 +237,7 @@ namespace FineUIPro.Web.DataShow
|
||||
{
|
||||
var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text);
|
||||
var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text);
|
||||
var getALL = Funs.DB.Check_CheckControl.Where(x => x.ProjectId == projectId.ToString());
|
||||
var getALL = Funs.DB.Check_CheckControl.Where(x => x.ProjectId == projectId.ToString() && x.CheckDate > Funs.minSysDate );
|
||||
|
||||
if (datetime1.HasValue)
|
||||
{
|
||||
@@ -252,5 +257,32 @@ namespace FineUIPro.Web.DataShow
|
||||
}
|
||||
return rate;
|
||||
}
|
||||
|
||||
#region 合计
|
||||
private void OutputSummaryData() {
|
||||
string strSql = @"select ProjectId,ProjectCode, ProjectName,
|
||||
isnull((select count(*) from Check_CheckControl as a where a.ProjectId=p.ProjectId and a.CheckDate > '2023-01-01' ),0) as Count1,
|
||||
isnull((select count(*) from Check_CheckControl as a where a.ProjectId=p.ProjectId and a.state='7' and a.CheckDate > '2023-01-01' ),0) as Count2,
|
||||
isnull((select count(*) from Check_CheckControl as a where a.ProjectId=p.ProjectId and a.state<>'7' and a.CheckDate > '2023-01-01' ),0) as Count3
|
||||
from Base_Project as P where ProjectState =1 and (ProjectState2 is null or ProjectState2 !=9) ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
int Count1 = 0, Count2 = 0, Count3 = 0;
|
||||
foreach (DataRow row in tb.Rows)
|
||||
{
|
||||
Count1 += Convert.ToInt32(row["Count1"]);
|
||||
Count2 += Convert.ToInt32(row["Count2"]);
|
||||
Count3 += Convert.ToInt32(row["Count3"]);
|
||||
}
|
||||
JObject summary = new JObject();
|
||||
summary.Add("ProjectName", "合计:");
|
||||
summary.Add("Count1", Count1.ToString());
|
||||
summary.Add("Count2", Count2.ToString());
|
||||
summary.Add("Count3", Count3.ToString());
|
||||
summary.Add("Count4", Count1 == 0 ? "0" : Math.Round(Count2 * 1.0 / Count1 * 100, 2).ToString());
|
||||
Grid1.SummaryData = summary;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,9 @@
|
||||
using Aspose.Words;
|
||||
using BLL;
|
||||
using Org.BouncyCastle.Asn1.Ocsp;
|
||||
using BLL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace FineUIPro.Web.DataShow
|
||||
{
|
||||
@@ -49,7 +45,7 @@ namespace FineUIPro.Web.DataShow
|
||||
left join Base_CNProfessional cNProfessional on cNProfessional.CNProfessionalId=chec.CNProfessionalCode
|
||||
left join WBS_UnitWork unitWork on unitWork.UnitWorkId = chec.UnitWorkId
|
||||
left join Base_QualityQuestionType QualityQuestionType on QualityQuestionType.QualityQuestionTypeId = chec.QuestionType
|
||||
WHERE 1=1 ";
|
||||
WHERE chec.CheckDate > '2023-01-01' ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
strSql += " AND chec.ProjectId = @ProjectId";
|
||||
listStr.Add(new SqlParameter("@ProjectId", Request.Params["projectId"]));
|
||||
@@ -150,7 +146,7 @@ namespace FineUIPro.Web.DataShow
|
||||
if (!string.IsNullOrEmpty(item.AttachUrl) && item.AttachUrl.ToLower().EndsWith(".jpg") || item.AttachUrl.ToLower().EndsWith(".jpeg") || item.AttachUrl.ToLower().EndsWith(".png"))
|
||||
AttachUrl += item.AttachUrl.TrimEnd(',') + ",";
|
||||
}
|
||||
url = BLL.UploadAttachmentService.ShowImage("../", AttachUrl.TrimEnd(','));
|
||||
url = BLL.UploadAttachmentService.ShowImage(httpUrl, AttachUrl.TrimEnd(','));
|
||||
}
|
||||
}
|
||||
return url;
|
||||
@@ -176,7 +172,7 @@ namespace FineUIPro.Web.DataShow
|
||||
if (!string.IsNullOrEmpty(item.AttachUrl) && item.AttachUrl.ToLower().EndsWith(".jpg") || item.AttachUrl.ToLower().EndsWith(".jpeg") || item.AttachUrl.ToLower().EndsWith(".png"))
|
||||
AttachUrl += item.AttachUrl.TrimEnd(',') + ",";
|
||||
}
|
||||
url = BLL.UploadAttachmentService.ShowImage("../", AttachUrl.TrimEnd(','));
|
||||
url = BLL.UploadAttachmentService.ShowImage(httpUrl, AttachUrl.TrimEnd(','));
|
||||
}
|
||||
}
|
||||
return url;
|
||||
|
||||
@@ -8,6 +8,21 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<script src="~/Controls/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
|
||||
<title>质量培训</title>
|
||||
<style>
|
||||
.f-grid-row-summary .f-grid-cell-ProjectName .f-grid-cell-inner {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.f-grid-row-summary .f-grid-cell-inner {
|
||||
font-weight: bold;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.f-grid-row-summary:first-child .f-grid-cell-inner {
|
||||
font-weight: normal;
|
||||
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
@@ -19,7 +34,8 @@
|
||||
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">
|
||||
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True"
|
||||
EnableSummary="true" SummaryPosition="Bottom">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using BLL;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
@@ -25,6 +26,9 @@ namespace FineUIPro.Web.DataShow
|
||||
BLL.ProjectService.InitProjectDropDownList(this.drpProject, true);
|
||||
// 绑定表格t
|
||||
BindGrid();
|
||||
|
||||
// 合计
|
||||
OutputSummaryData();
|
||||
this.Panel1.Title = "质量培训数据(" + BLL.UnitService.GetUnitNameByUnitId(BLL.CommonService.GetThisUnitId()) + ")";
|
||||
}
|
||||
}
|
||||
@@ -77,6 +81,7 @@ namespace FineUIPro.Web.DataShow
|
||||
protected void TextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.BindGrid();
|
||||
this.OutputSummaryData();
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -177,7 +182,7 @@ namespace FineUIPro.Web.DataShow
|
||||
var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text);
|
||||
if (this.rbCom.SelectedValue == "1")
|
||||
{
|
||||
var getT = Funs.DB.Comprehensive_InspectionPerson.Where(x => x.ProjectId == projectId.ToString() && x.IsTrain == true);
|
||||
var getT = Funs.DB.Comprehensive_InspectionPerson.Where(x => x.ProjectId == projectId.ToString() && x.IsTrain == true && x.CompileDate >Funs.minSysDate);
|
||||
if (datetime1.HasValue)
|
||||
{
|
||||
getT = getT.Where(x => x.CompileDate >= datetime1);
|
||||
@@ -190,7 +195,7 @@ namespace FineUIPro.Web.DataShow
|
||||
}
|
||||
else
|
||||
{
|
||||
var getT = Funs.DB.Comprehensive_DesignDetails.Where(x => x.ProjectId == projectId.ToString());
|
||||
var getT = Funs.DB.Comprehensive_DesignDetails.Where(x => x.ProjectId == projectId.ToString() && x.CompileDate > Funs.minSysDate);
|
||||
if (datetime1.HasValue)
|
||||
{
|
||||
getT = getT.Where(x => x.CompileDate >= datetime1);
|
||||
@@ -207,5 +212,37 @@ namespace FineUIPro.Web.DataShow
|
||||
}
|
||||
return cout1;
|
||||
}
|
||||
|
||||
#region 合计
|
||||
private void OutputSummaryData() {
|
||||
string strSql = "";
|
||||
if (this.rbCom.SelectedValue == "1")
|
||||
{
|
||||
strSql= @"select ProjectId,ProjectCode, ProjectName,
|
||||
isnull((select count(*) from Comprehensive_InspectionPerson as a
|
||||
where a.ProjectId=P.ProjectId and a.IsTrain=1 and a.CompileDate > '2023-01-01' ),0) as Count1
|
||||
from Base_Project as P where ProjectState =1 and (ProjectState2 is null or ProjectState2 !=9) ";
|
||||
}
|
||||
else {
|
||||
strSql = @"select ProjectId,ProjectCode, ProjectName,
|
||||
isnull((select sum(JoinPersonNum) from Comprehensive_DesignDetails as a
|
||||
where a.ProjectId=P.ProjectId and a.CompileDate > '2023-01-01' ),0) as Count1
|
||||
from Base_Project as P where ProjectState =1 and (ProjectState2 is null or ProjectState2 !=9) ";
|
||||
}
|
||||
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
int Count1 = 0;
|
||||
foreach (DataRow row in tb.Rows)
|
||||
{
|
||||
Count1 += Convert.ToInt32(row["Count1"]);
|
||||
}
|
||||
JObject summary = new JObject();
|
||||
summary.Add("ProjectName", "合计:");
|
||||
summary.Add("Count1", Count1.ToString());
|
||||
Grid1.SummaryData = summary;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,6 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
|
||||
namespace FineUIPro.Web.DataShow
|
||||
{
|
||||
@@ -44,7 +43,7 @@ namespace FineUIPro.Web.DataShow
|
||||
left join Base_Unit U on C.UnitId=U.UnitId
|
||||
left join Base_CNProfessional CN on C.CNProfessionalId=CN.CNProfessionalId
|
||||
left join Base_WorkPost P on C.PostId=P.WorkPostId
|
||||
where C.ProjectId = @ProjectId";
|
||||
where C.ProjectId = @ProjectId and C.CompileDate > '2023-01-01' ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
strSql += " AND C.ProjectId = @ProjectId";
|
||||
listStr.Add(new SqlParameter("@ProjectId", Request.Params["projectId"]));
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace FineUIPro.Web.DataShow
|
||||
UnitName, AttachUrl, CompileMan, CN.ProfessionalName
|
||||
from Comprehensive_DesignDetails C
|
||||
left join Base_CNProfessional CN on C.CNProfessionalId=CN.CNProfessionalId
|
||||
where C.ProjectId = @ProjectId";
|
||||
where C.ProjectId = @ProjectId and C.DetailsDate > '2023-01-01'";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
strSql += " AND C.ProjectId = @ProjectId";
|
||||
listStr.Add(new SqlParameter("@ProjectId", Request.Params["projectId"]));
|
||||
|
||||
@@ -8,6 +8,21 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<script src="~/Controls/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
|
||||
<title>安全费用</title>
|
||||
<style>
|
||||
.f-grid-row-summary .f-grid-cell-Months .f-grid-cell-inner {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.f-grid-row-summary .f-grid-cell-inner {
|
||||
font-weight: bold;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.f-grid-row-summary:first-child .f-grid-cell-inner {
|
||||
font-weight: normal;
|
||||
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
@@ -20,7 +35,8 @@
|
||||
SortField="Months" SortDirection="DESC" OnSort="Grid1_Sort" EnableColumnLines="true" AllowPaging="true"
|
||||
IsDatabasePaging="true" PageSize="20" OnPageIndexChange="Grid1_PageIndexChange" ForceFit="true"
|
||||
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick"
|
||||
EnableTextSelection="True">
|
||||
EnableTextSelection="True"
|
||||
EnableSummary="true" SummaryPosition="Bottom">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using BLL;
|
||||
using Model;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
@@ -25,6 +26,8 @@ namespace FineUIPro.Web.DataShow
|
||||
BLL.ProjectService.InitProjectDropDownList(this.drpProject, true);
|
||||
// 绑定表格t
|
||||
BindGrid();
|
||||
// 合计
|
||||
OutputSummaryData();
|
||||
this.Panel1.Title = "安全费用(" + BLL.UnitService.GetUnitNameByUnitId(BLL.CommonService.GetThisUnitId()) + ")";
|
||||
}
|
||||
}
|
||||
@@ -43,7 +46,7 @@ namespace FineUIPro.Web.DataShow
|
||||
FROM CostGoods_CostSmallDetail as cost
|
||||
left join Base_Project as p on cost.ProjectId =p.ProjectId
|
||||
left join Base_Unit as Unit on cost.UnitId =Unit.UnitId
|
||||
WHERE (p.ProjectState2 is null or p.ProjectState2 !=9) ";
|
||||
WHERE cost.CompileDate > '2023-01-01'and (p.ProjectState2 is null or p.ProjectState2 !=9) ";
|
||||
|
||||
if (this.drpProject.SelectedValue != Const._Null)
|
||||
{
|
||||
@@ -155,5 +158,32 @@ namespace FineUIPro.Web.DataShow
|
||||
{
|
||||
EditData();
|
||||
}
|
||||
|
||||
#region 合计
|
||||
private void OutputSummaryData() {
|
||||
string strSql = string.Empty;
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
|
||||
strSql = @"SELECT cost.CostSmallDetailId, p.ProjectId,p.ProjectCode,p.ProjectName,cost.UnitId,Unit.UnitName,cost.Months
|
||||
,(CAST((SELECT SUM(ISNULL(CostMoney,0)) FROM CostGoods_CostSmallDetailItem
|
||||
WHERE CostSmallDetailId=cost.CostSmallDetailId) *1.0 /10000 as decimal(18, 2) ))AS SUMCost
|
||||
FROM CostGoods_CostSmallDetail as cost
|
||||
left join Base_Project as p on cost.ProjectId =p.ProjectId
|
||||
left join Base_Unit as Unit on cost.UnitId =Unit.UnitId
|
||||
WHERE (p.ProjectState2 is null or p.ProjectState2 !=9) and cost.CompileDate > '2023-01-01'";
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
float SUMCost = 0.0f;
|
||||
|
||||
foreach (DataRow row in tb.Rows)
|
||||
{
|
||||
SUMCost += float.Parse(row["SUMCost"].ToString());
|
||||
}
|
||||
JObject summary = new JObject();
|
||||
summary.Add("Months", "合计:");
|
||||
summary.Add("SUMCost", SUMCost.ToString("F2"));
|
||||
Grid1.SummaryData = summary;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,21 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<script src="~/Controls/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
|
||||
<title>安全风险</title>
|
||||
<style>
|
||||
.f-grid-row-summary .f-grid-cell-ProjectName .f-grid-cell-inner {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.f-grid-row-summary .f-grid-cell-inner {
|
||||
font-weight: bold;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.f-grid-row-summary:first-child .f-grid-cell-inner {
|
||||
font-weight: normal;
|
||||
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
@@ -19,7 +34,8 @@
|
||||
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">
|
||||
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True"
|
||||
EnableSummary="true" SummaryPosition="Bottom">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using BLL;
|
||||
using FineUIPro.Web.BaseInfo;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
@@ -25,6 +26,8 @@ namespace FineUIPro.Web.DataShow
|
||||
BLL.ProjectService.InitProjectDropDownList(this.drpProject, true);
|
||||
// 绑定表格t
|
||||
BindGrid();
|
||||
// 合计
|
||||
OutputSummaryData();
|
||||
this.Panel1.Title = "安全风险数据(" + BLL.UnitService.GetUnitNameByUnitId(BLL.CommonService.GetThisUnitId()) + ")";
|
||||
}
|
||||
}
|
||||
@@ -216,17 +219,13 @@ namespace FineUIPro.Web.DataShow
|
||||
}
|
||||
return cout1;
|
||||
}
|
||||
/// <summary>
|
||||
/// 定义变量
|
||||
/// </summary>
|
||||
private static IQueryable<Model.Hazard_HazardList> getDataLists = from x in Funs.DB.Hazard_HazardList
|
||||
select x;
|
||||
|
||||
/// <summary>
|
||||
/// 定义变量
|
||||
/// </summary>
|
||||
private static IQueryable<Model.Hazard_HazardSelectedItem> getDataItemLists = from x in Funs.DB.Hazard_HazardSelectedItem
|
||||
where x.IsStart == true
|
||||
select x;
|
||||
where x.IsStart == true
|
||||
select x;
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
@@ -239,10 +238,40 @@ namespace FineUIPro.Web.DataShow
|
||||
var getlevel = Funs.DB.Base_RiskLevel.FirstOrDefault(x => x.RiskLevel == level);
|
||||
if (getlevel != null)
|
||||
{
|
||||
count = getDataItemLists.Where(x => x.ProjectId == projectId && x.HazardLevel == getlevel.RiskLevelId).Count();
|
||||
string levels = getlevel.RiskLevel.ToString();
|
||||
count = getDataItemLists.Where(x => x.ProjectId == projectId&& x.HazardLevel== levels).Count();
|
||||
}
|
||||
return count;
|
||||
|
||||
}
|
||||
|
||||
#region 合计
|
||||
private void OutputSummaryData() {
|
||||
string strSql = @"select ProjectId,ProjectCode, ProjectName ,
|
||||
isnull((select count(*) from Hazard_HazardSelectedItem as a where a.IsStart=1 and a.ProjectId=p.ProjectId and a.HazardLevel='1'),0) as Count1,
|
||||
isnull((select count(*) from Hazard_HazardSelectedItem as a where a.IsStart=1 and a.ProjectId=p.ProjectId and a.HazardLevel='2' ),0) as Count2,
|
||||
isnull((select count(*) from Hazard_HazardSelectedItem as a where a.IsStart=1 and a.ProjectId=p.ProjectId and a.HazardLevel='3'),0) as Count3,
|
||||
isnull((select count(*) from Hazard_HazardSelectedItem as a where a.IsStart=1 and a.ProjectId=p.ProjectId and a.HazardLevel='4'),0) as Count4
|
||||
from Base_Project as P where ProjectState =1 and (ProjectState2 is null or ProjectState2 !=9)";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
int Count1 = 0, Count2 = 0, Count3 = 0, Count4 = 0;
|
||||
foreach (DataRow row in tb.Rows)
|
||||
{
|
||||
Count1 += Convert.ToInt32(row["Count1"]);
|
||||
Count2 += Convert.ToInt32(row["Count2"]);
|
||||
Count3 += Convert.ToInt32(row["Count3"]);
|
||||
Count4 += Convert.ToInt32(row["Count4"]);
|
||||
}
|
||||
JObject summary = new JObject();
|
||||
summary.Add("ProjectName", "合计:");
|
||||
summary.Add("Count1", Count1.ToString());
|
||||
summary.Add("Count2", Count2.ToString());
|
||||
summary.Add("Count3", Count3.ToString());
|
||||
summary.Add("Count4", Count4.ToString());
|
||||
Grid1.SummaryData = summary;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,15 +1,8 @@
|
||||
using Aspose.Words;
|
||||
using BLL;
|
||||
using FineUIPro.Web.BaseInfo;
|
||||
using Model;
|
||||
using Org.BouncyCastle.Asn1.Ocsp;
|
||||
using BLL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace FineUIPro.Web.DataShow
|
||||
{
|
||||
@@ -44,7 +37,7 @@ namespace FineUIPro.Web.DataShow
|
||||
{
|
||||
string strSql = @"select Item.HazardSelectedItemId,Item.HazardListId,List.IdentificationDate,List.WorkAreaName,Item.WorkStage,Item.HazardListTypeId
|
||||
, Item.HazardListTypeId,Item.HazardId,Item.HazardItems,Item.DefectsType,Item.MayLeadAccidents
|
||||
,Item.HelperMethod,Item.HazardJudge_L,Item.HazardJudge_E,Item.HazardJudge_C,Item.HazardJudge_E
|
||||
,Item.HelperMethod,Item.HazardJudge_L,Item.HazardJudge_E,Item.HazardJudge_C,HazardJudge_D,Item.HazardJudge_E
|
||||
,level.RiskLevelName,Item.ControlMeasures
|
||||
from Hazard_HazardSelectedItem AS Item
|
||||
LEFT JOIN Hazard_HazardList AS List on List.HazardListId = Item.HazardListId
|
||||
|
||||
@@ -8,6 +8,21 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<script src="~/Controls/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
|
||||
<title>安全工时</title>
|
||||
<style>
|
||||
.f-grid-row-summary .f-grid-cell-ProjectName .f-grid-cell-inner {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.f-grid-row-summary .f-grid-cell-inner {
|
||||
font-weight: bold;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.f-grid-row-summary:first-child .f-grid-cell-inner {
|
||||
font-weight: normal;
|
||||
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
@@ -19,7 +34,8 @@
|
||||
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">
|
||||
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True"
|
||||
EnableSummary="true" SummaryPosition="Bottom">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using BLL;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
@@ -25,6 +26,8 @@ namespace FineUIPro.Web.DataShow
|
||||
BLL.ProjectService.InitProjectDropDownList(this.drpProject, true);
|
||||
// 绑定表格t
|
||||
BindGrid();
|
||||
// 合计
|
||||
OutputSummaryData();
|
||||
this.Panel1.Title = "工时数据(" + BLL.UnitService.GetUnitNameByUnitId(BLL.CommonService.GetThisUnitId()) + ")";
|
||||
}
|
||||
}
|
||||
@@ -171,7 +174,7 @@ namespace FineUIPro.Web.DataShow
|
||||
var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text);
|
||||
var getD1 = from x in Funs.DB.SitePerson_DayReport
|
||||
join y in Funs.DB.Base_Project on x.ProjectId equals y.ProjectId
|
||||
where y.ProjectState == Const.ProjectState_1
|
||||
where y.ProjectState == Const.ProjectState_1 && x.ProjectId == projectId.ToString() && x.CompileDate > Funs.minSysDate
|
||||
select x;
|
||||
if (datetime1.HasValue)
|
||||
{
|
||||
@@ -207,11 +210,11 @@ namespace FineUIPro.Web.DataShow
|
||||
var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text);
|
||||
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
|
||||
where y.ProjectState == Const.ProjectState_1 && x.ProjectId == projectId.ToString() && x.CompileDate > Funs.minSysDate
|
||||
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
|
||||
where y.ProjectState == Const.ProjectState_1 && x.ProjectId == projectId.ToString() && x.CompileDate > Funs.minSysDate
|
||||
select x;
|
||||
if (datetime1.HasValue)
|
||||
{
|
||||
@@ -249,16 +252,16 @@ namespace FineUIPro.Web.DataShow
|
||||
var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text);
|
||||
var getC1 = from x in Funs.DB.SitePerson_DayReport
|
||||
join y in Funs.DB.Base_Project on x.ProjectId equals y.ProjectId
|
||||
where y.ProjectState == Const.ProjectState_1
|
||||
where y.ProjectState == Const.ProjectState_1 && x.ProjectId == projectId.ToString() && x.CompileDate > Funs.minSysDate
|
||||
select x;
|
||||
|
||||
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
|
||||
where y.ProjectState == Const.ProjectState_1 && x.ProjectId == projectId.ToString() && x.CompileDate > Funs.minSysDate
|
||||
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
|
||||
where y.ProjectState == Const.ProjectState_1 && x.ProjectId == projectId.ToString() && x.CompileDate > Funs.minSysDate
|
||||
select x;
|
||||
|
||||
if (datetime1.HasValue)
|
||||
@@ -294,5 +297,38 @@ namespace FineUIPro.Web.DataShow
|
||||
return cout1;
|
||||
}
|
||||
|
||||
#region 合计
|
||||
private void OutputSummaryData()
|
||||
{
|
||||
string strSql = @" select ProjectId,ProjectCode, ProjectName,
|
||||
isnull((select sum(PersonWorkTime)
|
||||
from SitePerson_DayReport x
|
||||
left join(select PersonWorkTime,DayReportId from SitePerson_DayReportDetail) y on x.DayReportId=y.DayReportId
|
||||
where x.ProjectId=p.ProjectId and x.CompileDate >'2023-01-01'),0) as count1,
|
||||
isnull((select sum(WorkHoursLoss) from Accident_AccidentHandle a where a.ProjectId=p.ProjectId and a.AccidentDate >'2023-01-01'),0) as count2,
|
||||
isnull((select sum(WorkingHoursLoss) from Accident_AccidentReport a where a.ProjectId=p.ProjectId and a.AccidentDate >'2023-01-01'),0) as count3
|
||||
from Base_Project as P
|
||||
where ProjectState =1 and (ProjectState2 is null or ProjectState2 !=9)";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
|
||||
double Count1 = 0.0f, Count2 = 0.0f, Count3 = 0.0f;
|
||||
foreach (DataRow row in tb.Rows)
|
||||
{
|
||||
Count1 += Convert.ToDouble(row["Count1"]);
|
||||
Count2 += Convert.ToDouble(row["Count2"]);
|
||||
Count3 += Convert.ToDouble(row["Count3"]);
|
||||
}
|
||||
JObject summary = new JObject();
|
||||
summary.Add("ProjectName", "合计:");
|
||||
summary.Add("Count1", Count1.ToString("f2"));
|
||||
summary.Add("Count2", (Count2+Count3).ToString("f2"));
|
||||
summary.Add("Count3", (Count1- Count2- Count3).ToString("f2"));
|
||||
Grid1.SummaryData = summary;
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -36,7 +36,7 @@ namespace FineUIPro.Web.DataShow
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
string strSql = @"select DayReportId,CompileDate,ProjectId from SitePerson_DayReport WHERE 1=1 ";
|
||||
string strSql = @"select DayReportId,CompileDate,ProjectId from SitePerson_DayReport WHERE CompileDate > '2023-01-01' ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
strSql += " AND ProjectId = @ProjectId";
|
||||
listStr.Add(new SqlParameter("@ProjectId", Request.Params["projectId"]));
|
||||
|
||||
Reference in New Issue
Block a user