20230607新增月报费用取值,上报集团报表(月报)默认自动取值功能新增

This commit is contained in:
2023-06-07 18:01:30 +08:00
parent e4871bc690
commit c7994e1a5c
21 changed files with 914 additions and 723 deletions
+1 -1
View File
@@ -689,7 +689,7 @@ namespace BLL
//RoleIds = Funs.GetStringByArray(this.drpProjectRole.SelectedValueArray), //RoleIds = Funs.GetStringByArray(this.drpProjectRole.SelectedValueArray),
PhotoUrl = person.PhotoUrl, PhotoUrl = person.PhotoUrl,
IDCardUrl = person.AttachUrl1, IDCardUrl = person.AttachUrl1,
QRCodeAttachUrl = person.AttachUrl5, //QRCodeAttachUrl = person.AttachUrl5,
IDCardBackUrl = person.AttachUrl5, IDCardBackUrl = person.AttachUrl5,
}; };
string rootUrl = ConfigurationManager.AppSettings["localRoot"]; string rootUrl = ConfigurationManager.AppSettings["localRoot"];
+89 -25
View File
@@ -1,4 +1,5 @@
using System; using Model;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
@@ -451,31 +452,94 @@ namespace BLL
/// <returns></returns> /// <returns></returns>
public static Model.SeDinMonthReport6Item getSeDinMonthReportNullPage6(string projectId, string month, string startDate, string endDate) public static Model.SeDinMonthReport6Item getSeDinMonthReportNullPage6(string projectId, string month, string startDate, string endDate)
{ {
var startDateD = Funs.GetNewDateTime(startDate); using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
var endDateD = Funs.GetNewDateTime(endDate);
var getLists = new Model.SeDinMonthReport6Item
{ {
SafetyMonth = 0, var startDateD = Funs.GetNewDateTime(startDate);
SafetyYear = 0, var endDateD = Funs.GetNewDateTime(endDate);
SafetyTotal = 0, DateTime monthD = Funs.GetNewDateTimeOrNow(month);
LaborMonth = 0, var getLists = new Model.SeDinMonthReport6Item();
LaborYear = 0, ///当月费用
LaborTotal = 0, var getCostManage = from x in db.CostGoods_CostManageItem
ProgressMonth = 0, join y in db.CostGoods_CostManage on x.CostManageId equals y.CostManageId
ProgressYear = 0, where y.ProjectId ==projectId && y.CostManageDate >= startDateD && y.CostManageDate < endDateD.Value.AddDays(1)
ProgressTotal = 0, && y.States == Const.State_2
EducationMonth = 0, select x;
EducationYear = 0, if (getCostManage.Count() > 0)
EducationTotal = 0, {
SumMonth = 0, var getData1 = getCostManage.Where(x => x.SupSortIndex == 1);
SumYear = 0, if (getData1.Count() > 0)
SumTotal = 0, {
ContractMonth = 0, getLists.SafetyMonth = getLists.SafetyYear = getLists.SafetyTotal = getData1.Sum(x => x.PriceMoney ?? 0);
ContractYear = 0, }
ContractTotal = 0, var getData2 = getCostManage.Where(x => x.SupSortIndex == 2);
ConstructionCost = 0, if (getData2.Count() > 0)
}; {
return getLists; getLists.LaborMonth = getLists.LaborYear = getLists.LaborTotal = getData2.Sum(x => x.PriceMoney ?? 0);
}
var getData3 = getCostManage.Where(x => x.SupSortIndex == 3);
if (getData3.Count() > 0)
{
getLists.ProgressMonth = getLists.ProgressYear = getLists.ProgressTotal = getData3.Sum(x => x.PriceMoney ?? 0);
}
var getData4 = getCostManage.Where(x => x.SupSortIndex == 4);
if (getData4.Count() > 0)
{
getLists.EducationMonth = getLists.EducationYear = getLists.EducationTotal = getData4.Sum(x => x.PriceMoney ?? 0);
}
getLists.SumMonth = getLists.SumYear = getLists.SumTotal = getLists.SafetyMonth + getLists.LaborMonth + getLists.ProgressMonth + getLists.EducationMonth;
}
///上月费用
var getMonthReport = db.SeDin_MonthReport.FirstOrDefault(x => x.ProjectId == projectId && x.ReporMonth == monthD.AddMonths(-1));
if (getMonthReport != null)
{
var getLastMonthReport6 = db.SeDin_MonthReport6.FirstOrDefault(x => x.MonthReportId == getMonthReport.MonthReportId);
if (getLastMonthReport6 != null)
{
if (getMonthReport.ReporMonth.Value.Year == monthD.Year)
{
if (monthD >= Funs.GetNewDateTime("2023-07-01"))
{
getLists.SafetyYear += getLastMonthReport6.SafetyYear;
getLists.SafetyTotal += getLastMonthReport6.SafetyTotal;
getLists.ProgressYear += getLastMonthReport6.ProgressYear;
getLists.ProgressTotal += getLastMonthReport6.ProgressTotal;
getLists.EducationYear += getLastMonthReport6.EducationYear;
getLists.EducationTotal += getLastMonthReport6.EducationTotal;
}
else
{
getLists.SafetyYear += (getLastMonthReport6.SafetyYear + getLastMonthReport6.ProgressYear + getLastMonthReport6.EducationYear);
getLists.SafetyTotal += (getLastMonthReport6.SafetyTotal + getLastMonthReport6.ProgressTotal + getLastMonthReport6.EducationTotal);
}
getLists.LaborYear += getLastMonthReport6.LaborYear;
getLists.LaborTotal += getLastMonthReport6.LaborTotal;
getLists.SumYear += getLastMonthReport6.SumYear;
getLists.SumTotal += getLastMonthReport6.SumTotal;
}
else
{
if (monthD >= Funs.GetNewDateTime("2023-07-01"))
{
getLists.SafetyTotal += getLastMonthReport6.SafetyTotal;
getLists.ProgressTotal += getLastMonthReport6.ProgressTotal;
getLists.EducationTotal += getLastMonthReport6.EducationTotal;
}
else
{
getLists.SafetyTotal += (getLastMonthReport6.SafetyTotal + getLastMonthReport6.ProgressTotal + getLastMonthReport6.EducationTotal);
}
getLists.LaborTotal += getLastMonthReport6.LaborTotal;
getLists.SumTotal += getLastMonthReport6.SumTotal;
}
}
}
return getLists;
}
} }
#endregion #endregion
#region --7HSE培训统计 #region --7HSE培训统计
+1 -1
View File
@@ -1035,7 +1035,7 @@ namespace BLL
// newPerson.JobNum = person.JobNum; // newPerson.JobNum = person.JobNum;
newPerson.PersonName = person.PersonName; newPerson.PersonName = person.PersonName;
newPerson.Account = person.Account; newPerson.Account = person.Account;
newPerson.IsOffice = person.IsOffice; //newPerson.IsOffice = person.IsOffice;
// newPerson.RoleIds = person.RoleIds; // newPerson.RoleIds = person.RoleIds;
//if (newPerson.IdentityCard != person.IdentityCard) //if (newPerson.IdentityCard != person.IdentityCard)
//{ //{
@@ -6,7 +6,6 @@
<head runat="server"> <head runat="server">
<link href="~/res/css/common.css" rel="stylesheet" type="text/css" /> <link href="~/res/css/common.css" rel="stylesheet" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="~/Controls/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
<title>安全风险</title> <title>安全风险</title>
</head> </head>
<body> <body>
@@ -25,8 +24,8 @@
<Items> <Items>
<f:DropDownList ID="drpProject" runat="server" Label="项目" Width="400px" LabelWidth="80px" LabelAlign="Right" <f:DropDownList ID="drpProject" runat="server" Label="项目" Width="400px" LabelWidth="80px" LabelAlign="Right"
EnableEdit="true" OnSelectedIndexChanged="TextBox_TextChanged" AutoPostBack="true"> EnableEdit="true" OnSelectedIndexChanged="TextBox_TextChanged" AutoPostBack="true">
</f:DropDownList> </f:DropDownList>
<%-- <f:DatePicker ID="txtStartTime" runat="server" Label="时间" LabelAlign="Right" <%-- <f:DatePicker ID="txtStartTime" runat="server" Label="时间" LabelAlign="Right"
AutoPostBack="true" OnTextChanged="TextBox_TextChanged" Width="200px" LabelWidth="80px"> AutoPostBack="true" OnTextChanged="TextBox_TextChanged" Width="200px" LabelWidth="80px">
</f:DatePicker> </f:DatePicker>
<f:Label ID="Label3" runat="server" Text="至"> <f:Label ID="Label3" runat="server" Text="至">
@@ -34,7 +33,7 @@
<f:DatePicker ID="txtEndTime" runat="server" AutoPostBack="true" OnTextChanged="TextBox_TextChanged" <f:DatePicker ID="txtEndTime" runat="server" AutoPostBack="true" OnTextChanged="TextBox_TextChanged"
Width="130px"> Width="130px">
</f:DatePicker>--%> </f:DatePicker>--%>
<f:ToolbarFill runat="server"></f:ToolbarFill> <f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="btnClose" EnablePostBack="false" ToolTip="关闭" Text="关闭" runat="server" Icon="SystemClose" OnClientClick="closeNow();"> <f:Button ID="btnClose" EnablePostBack="false" ToolTip="关闭" Text="关闭" runat="server" Icon="SystemClose" OnClientClick="closeNow();">
</f:Button> </f:Button>
</Items> </Items>
@@ -53,22 +52,22 @@
<f:RenderField Width="350px" ColumnID="ProjectName" DataField="ProjectName" FieldType="String" HeaderText="项目名称" TextAlign="Left" <f:RenderField Width="350px" ColumnID="ProjectName" DataField="ProjectName" FieldType="String" HeaderText="项目名称" TextAlign="Left"
HeaderTextAlign="Center"> HeaderTextAlign="Center">
</f:RenderField> </f:RenderField>
<f:TemplateField ColumnID="Count1" Width="120px" HeaderText="低风险" HeaderTextAlign="Center" TextAlign="Right"> <f:TemplateField ColumnID="Count1" Width="120px" HeaderText="低风险" HeaderTextAlign="Center" TextAlign="Right">
<ItemTemplate> <ItemTemplate>
<asp:Label ID="Label2" runat="server" Text='<%# Count1(Eval("ProjectId")) %>'></asp:Label> <asp:Label ID="Label2" runat="server" Text='<%# Count1(Eval("ProjectId")) %>'></asp:Label>
</ItemTemplate> </ItemTemplate>
</f:TemplateField> </f:TemplateField>
<f:TemplateField ColumnID="Count2" Width="120px" HeaderText="一般风险" HeaderTextAlign="Center" TextAlign="Right"> <f:TemplateField ColumnID="Count2" Width="120px" HeaderText="一般风险" HeaderTextAlign="Center" TextAlign="Right">
<ItemTemplate> <ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Count2(Eval("ProjectId")) %>'></asp:Label> <asp:Label ID="Label1" runat="server" Text='<%# Count2(Eval("ProjectId")) %>'></asp:Label>
</ItemTemplate> </ItemTemplate>
</f:TemplateField> </f:TemplateField>
<f:TemplateField ColumnID="Count3" Width="120px" HeaderText="较大风险" HeaderTextAlign="Center" TextAlign="Right"> <f:TemplateField ColumnID="Count3" Width="120px" HeaderText="较大风险" HeaderTextAlign="Center" TextAlign="Right">
<ItemTemplate> <ItemTemplate>
<asp:Label ID="Label4" runat="server" Text='<%# Count3(Eval("ProjectId")) %>'></asp:Label> <asp:Label ID="Label4" runat="server" Text='<%# Count3(Eval("ProjectId")) %>'></asp:Label>
</ItemTemplate> </ItemTemplate>
</f:TemplateField> </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> <ItemTemplate>
<asp:Label ID="Label5" runat="server" Text='<%# Count4(Eval("ProjectId")) %>'></asp:Label> <asp:Label ID="Label5" runat="server" Text='<%# Count4(Eval("ProjectId")) %>'></asp:Label>
</ItemTemplate> </ItemTemplate>
@@ -91,7 +90,7 @@
</f:Panel> </f:Panel>
<f:Window ID="Window1" Title="详情" Hidden="true" EnableIFrame="true" EnableMaximize="true" <f:Window ID="Window1" Title="详情" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close" Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close"
Width="1200px" Height="620px" Maximized="true"> Width="1200px" Height="620px" Maximized="true">
</f:Window> </f:Window>
<f:Menu ID="Menu1" runat="server"> <f:Menu ID="Menu1" runat="server">
<Items> <Items>
@@ -1,4 +1,5 @@
using BLL; using BLL;
using NPOI.SS.Formula.Functions;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Data; using System.Data;
@@ -39,7 +40,7 @@ namespace FineUIPro.Web.DataShow
string cpara = string.Empty; string cpara = string.Empty;
if (this.drpProject.SelectedValue != Const._Null) if (this.drpProject.SelectedValue != Const._Null)
{ {
strSql += " AND projectId = @projectId"; ///状态为已完成 strSql += " AND projectId = @projectId";
listStr.Add(new SqlParameter("@projectId", this.drpProject.SelectedValue)); listStr.Add(new SqlParameter("@projectId", this.drpProject.SelectedValue));
} }
@@ -165,7 +166,7 @@ namespace FineUIPro.Web.DataShow
/// </summary> /// </summary>
/// <param name="state"></param> /// <param name="state"></param>
/// <returns></returns> /// <returns></returns>
protected int Count1(object projectId) public int Count1(object projectId)
{ {
int cout1 = 0; int cout1 = 0;
if (projectId != null) if (projectId != null)
@@ -180,14 +181,14 @@ namespace FineUIPro.Web.DataShow
/// </summary> /// </summary>
/// <param name="state"></param> /// <param name="state"></param>
/// <returns></returns> /// <returns></returns>
protected int Count2(object projectId) public int Count2(object projectId)
{ {
int cout1 = 0; int cout4 = 0;
if (projectId != null) if (projectId != null)
{ {
cout1 = getcount(projectId.ToString(),2); cout4 = getcount(projectId.ToString(),2);
} }
return cout1; return cout4;
} }
/// <summary> /// <summary>
@@ -195,36 +196,26 @@ namespace FineUIPro.Web.DataShow
/// </summary> /// </summary>
/// <param name="state"></param> /// <param name="state"></param>
/// <returns></returns> /// <returns></returns>
protected int Count3(object projectId) public int Count3(object projectId)
{ {
int cout1 = 0; int cout3 = 0;
if (projectId != null) if (projectId != null)
{ {
cout1= getcount(projectId.ToString(), 3); cout3 = getcount(projectId.ToString(), 3);
} }
return cout1; return cout3;
} }
protected int Count4(object projectId) public int Count4(object projectId)
{ {
int cout1 = 0; int cout4 = 0;
if (projectId != null) if (projectId != null)
{ {
cout1 = getcount(projectId.ToString(), 4); cout4 = getcount(projectId.ToString(), 4);
} }
return cout1; return cout4;
} }
/// <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;
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
@@ -237,7 +228,18 @@ namespace FineUIPro.Web.DataShow
var getlevel = Funs.DB.Base_RiskLevel.FirstOrDefault(x => x.RiskLevel == level); var getlevel = Funs.DB.Base_RiskLevel.FirstOrDefault(x => x.RiskLevel == level);
if (getlevel != null) if (getlevel != null)
{ {
count = getDataItemLists.Where(x => x.ProjectId == projectId && x.HazardLevel == getlevel.RiskLevelId).Count(); count = (from x in Funs.DB.Hazard_HazardSelectedItem
join y in Funs.DB.Hazard_HazardList on x.HazardListId equals y.HazardListId
where y.ProjectId == projectId && (x.HazardLevel == getlevel.RiskLevelId || x.HazardLevel == level.ToString()) && y.States == Const.State_2
select x).Count();
}
else
{
count = (from x in Funs.DB.Hazard_HazardSelectedItem
join y in Funs.DB.Hazard_HazardList on x.HazardListId equals y.HazardListId
where y.ProjectId == projectId && x.HazardLevel == level.ToString() && y.States == Const.State_2
select x).Count();
} }
return count; return count;
@@ -88,23 +88,23 @@
<f:RenderField Width="100px" ColumnID="HelperMethod" DataField="HelperMethod" FieldType="String" <f:RenderField Width="100px" ColumnID="HelperMethod" DataField="HelperMethod" FieldType="String"
HeaderText="辅助方法" HeaderTextAlign="Center" TextAlign="Left" EnableColumnEdit="true"> HeaderText="辅助方法" HeaderTextAlign="Center" TextAlign="Left" EnableColumnEdit="true">
</f:RenderField> </f:RenderField>
<f:RenderField Width="100px" ColumnID="L" DataField="HazardJudge_L" FieldType="String" <f:RenderField Width="60px" ColumnID="L" DataField="HazardJudge_L" FieldType="String"
HeaderText="危险评价(L)" HeaderTextAlign="Center" TextAlign="Left" EnableColumnEdit="true"> HeaderText="(L)" HeaderTextAlign="Center" TextAlign="Left" EnableColumnEdit="true">
</f:RenderField> </f:RenderField>
<f:RenderField Width="100px" ColumnID="E" DataField="HazardJudge_E" FieldType="String" <f:RenderField Width="60px" ColumnID="E" DataField="HazardJudge_E" FieldType="String"
HeaderText="危险评价(E)" HeaderTextAlign="Center" TextAlign="Left" EnableColumnEdit="true"> HeaderText="(E)" HeaderTextAlign="Center" TextAlign="Left" EnableColumnEdit="true">
</f:RenderField> </f:RenderField>
<f:RenderField Width="100px" ColumnID="C" DataField="HazardJudge_C" FieldType="String" <f:RenderField Width="60px" ColumnID="C" DataField="HazardJudge_C" FieldType="String"
HeaderText="危险评价(C)" HeaderTextAlign="Center" TextAlign="Left" EnableColumnEdit="true"> HeaderText="(C)" HeaderTextAlign="Center" TextAlign="Left" EnableColumnEdit="true">
</f:RenderField> </f:RenderField>
<f:RenderField Width="100px" ColumnID="D" DataField="HazardJudge_D" FieldType="Double" <f:RenderField Width="60px" ColumnID="D" DataField="HazardJudge_D" FieldType="Double"
HeaderText="危险评价(D)" HeaderTextAlign="Center" TextAlign="Left"> HeaderText="(D)" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField> </f:RenderField>
<f:RenderField Width="90px" ColumnID="G" DataField="RiskLevelName" FieldType="String" <f:RenderField Width="100px" ColumnID="G" DataField="RiskLevelName" FieldType="String"
HeaderText="危险级别" HeaderTextAlign="Center" TextAlign="Left"> HeaderText="危险级别" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField> </f:RenderField>
<f:RenderField Width="180px" ColumnID="ControlMeasures" DataField="ControlMeasures" <f:RenderField Width="180px" ColumnID="ControlMeasures" DataField="ControlMeasures"
FieldType="String" HeaderText="控制措施" HeaderTextAlign="Center" TextAlign="Center"> FieldType="String" HeaderText="控制措施" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField> </f:RenderField>
</Columns> </Columns>
<Listeners> <Listeners>
@@ -34,10 +34,10 @@ namespace FineUIPro.Web.DataShow
/// </summary> /// </summary>
private void BindGrid() private void BindGrid()
{ {
string strSql = @"select Item.HazardId AS HazardSelectedItemId,Item.HazardListId,List.IdentificationDate,List.WorkAreaName,Item.WorkStage,Item.HazardListTypeId string strSql = @"select (Item.HazardId+'-'+ Item.HazardListId) as HazardSelectedItemId,Item.HazardListId,List.IdentificationDate,List.WorkAreaName,Item.WorkStage,Item.HazardListTypeId
, Item.HazardListTypeId,Item.HazardId,Item.HazardItems,Item.DefectsType,Item.MayLeadAccidents , 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,Item.HazardJudge_E,Item.HazardJudge_D,Item.ControlMeasures
,level.RiskLevelName,Item.ControlMeasures ,(CASE WHEN level.RiskLevelName IS NULL THEN Item.HazardLevel ELSE level.RiskLevelName END) AS RiskLevelName
from Hazard_HazardSelectedItem AS Item from Hazard_HazardSelectedItem AS Item
LEFT JOIN Hazard_HazardList AS List on List.HazardListId = Item.HazardListId LEFT JOIN Hazard_HazardList AS List on List.HazardListId = Item.HazardListId
LEFT JOIN Base_RiskLevel as level on level.RiskLevelId = Item.HazardLevel LEFT JOIN Base_RiskLevel as level on level.RiskLevelId = Item.HazardLevel
+2 -1
View File
@@ -9104,6 +9104,7 @@
</Compile> </Compile>
<Compile Include="HSSE\ActionPlan\ProjectManageRuleView.aspx.cs"> <Compile Include="HSSE\ActionPlan\ProjectManageRuleView.aspx.cs">
<DependentUpon>ProjectManageRuleView.aspx</DependentUpon> <DependentUpon>ProjectManageRuleView.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile> </Compile>
<Compile Include="HSSE\ActionPlan\ProjectManageRuleView.aspx.designer.cs"> <Compile Include="HSSE\ActionPlan\ProjectManageRuleView.aspx.designer.cs">
<DependentUpon>ProjectManageRuleView.aspx</DependentUpon> <DependentUpon>ProjectManageRuleView.aspx</DependentUpon>
@@ -13869,7 +13870,7 @@
<AutoAssignPort>True</AutoAssignPort> <AutoAssignPort>True</AutoAssignPort>
<DevelopmentServerPort>0</DevelopmentServerPort> <DevelopmentServerPort>0</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath> <DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>http://localhost:14646/</IISUrl> <IISUrl>http://localhost:1541/</IISUrl>
<NTLMAuthentication>False</NTLMAuthentication> <NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>False</UseCustomServer> <UseCustomServer>False</UseCustomServer>
<CustomServerUrl> <CustomServerUrl>
@@ -640,10 +640,10 @@
<table class="table"> <table class="table">
<tr> <tr>
<td></td> <td></td>
<td>安全防护投入</td> <td runat="server" id="txtCost1">安全施工(元)</td>
<td>劳动保护及职业健康投入</td> <td runat="server" id="txtCost2">职业健康(元)</td>
<td>安全技术进步投入</td> <td runat="server" id="txtCost3">环境保护(元)</td>
<td>安全教育培训投入</td> <td runat="server" id="txtCost4">文明施工(元)</td>
<td>合计</td> <td>合计</td>
<td>完成合同额</td> <td>完成合同额</td>
</tr> </tr>
@@ -90,6 +90,21 @@ namespace FineUIPro.Web.HSSE.Manager
var getMont = Funs.DB.SeDin_MonthReport.FirstOrDefault(x => x.MonthReportId == this.MonthReportId); var getMont = Funs.DB.SeDin_MonthReport.FirstOrDefault(x => x.MonthReportId == this.MonthReportId);
if (getMont != null) if (getMont != null)
{ {
if (getMont.ReporMonth < Funs.GetNewDateTime("2023-06-01"))
{
this.txtCost1.InnerText = "安全防护投入(元)";
this.txtCost2.InnerText = "劳动保护及职业健康投入(元)";
this.txtCost3.InnerText = "安全技术进步投入(元)";
this.txtCost4.InnerText = "安全教育培训投入(元)";
}
else
{
this.txtCost1.InnerText = "安全施工(元)";
this.txtCost2.InnerText = "职业健康(元)";
this.txtCost3.InnerText = "环境保护(元)";
this.txtCost4.InnerText = "文明施工(元)";
}
this.CompileManId.SelectedValue = getMont.CompileManId; this.CompileManId.SelectedValue = getMont.CompileManId;
this.AuditManId.SelectedValue = getMont.AuditManId; this.AuditManId.SelectedValue = getMont.AuditManId;
this.ApprovalManId.SelectedValue = getMont.ApprovalManId; this.ApprovalManId.SelectedValue = getMont.ApprovalManId;
@@ -7,10 +7,12 @@
// </自动生成> // </自动生成>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace FineUIPro.Web.HSSE.Manager { namespace FineUIPro.Web.HSSE.Manager
{
public partial class ManagerMonth_SeDinEdit { public partial class ManagerMonth_SeDinEdit
{
/// <summary> /// <summary>
/// form1 控件。 /// form1 控件。
@@ -1398,6 +1400,42 @@ namespace FineUIPro.Web.HSSE.Manager {
/// </remarks> /// </remarks>
protected global::FineUIPro.ContentPanel ContentPanel5; protected global::FineUIPro.ContentPanel ContentPanel5;
/// <summary>
/// txtCost1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableCell txtCost1;
/// <summary>
/// txtCost2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableCell txtCost2;
/// <summary>
/// txtCost3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableCell txtCost3;
/// <summary>
/// txtCost4 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableCell txtCost4;
/// <summary> /// <summary>
/// SafetyMonth 控件。 /// SafetyMonth 控件。
/// </summary> /// </summary>
+2 -1
View File
@@ -89,12 +89,13 @@
</f:DropDownList> </f:DropDownList>
</Items> </Items>
</f:FormRow> </f:FormRow>
<f:FormRow> <f:FormRow ColumnWidths="50% 35% 15%">
<Items> <Items>
<f:DropDownList ID="drpWorkPost" runat="server" Label="岗位" EnableEdit="true"> <f:DropDownList ID="drpWorkPost" runat="server" Label="岗位" EnableEdit="true">
</f:DropDownList> </f:DropDownList>
<f:RadioButtonList ID="rbPersonType" runat="server" Label="员工类别"> <f:RadioButtonList ID="rbPersonType" runat="server" Label="员工类别">
</f:RadioButtonList> </f:RadioButtonList>
<f:CheckBox runat="server" ID="ckIsOffice" Label="本部"></f:CheckBox>
</Items> </Items>
</f:FormRow> </f:FormRow>
<f:FormRow> <f:FormRow>
+6 -8
View File
@@ -110,6 +110,11 @@ namespace FineUIPro.Web.Person
{ {
this.ckIsForeign.Checked = person.IsForeign.Value; this.ckIsForeign.Checked = person.IsForeign.Value;
} }
if (person.IsOffice.HasValue)
{
this.ckIsOffice.Checked = person.IsOffice.Value;
}
this.rbPersonType.SelectedValue = person.PersonType; this.rbPersonType.SelectedValue = person.PersonType;
if (!string.IsNullOrEmpty(person.IdcardType)) if (!string.IsNullOrEmpty(person.IdcardType))
{ {
@@ -534,17 +539,10 @@ namespace FineUIPro.Web.Person
SignatureUrl = this.SignatureUrl, SignatureUrl = this.SignatureUrl,
IsPost = this.ckIsPost.Checked, IsPost = this.ckIsPost.Checked,
MultiProject=this.ckIsMultiProject.Checked, MultiProject=this.ckIsMultiProject.Checked,
IsOffice = this.ckIsOffice.Checked,
}; };
newPerson.HomePageType = this.rblHomePageType.SelectedValue; newPerson.HomePageType = this.rblHomePageType.SelectedValue;
newPerson.RoleIds = Funs.GetStringByArray(this.drpRole.SelectedValueArray); newPerson.RoleIds = Funs.GetStringByArray(this.drpRole.SelectedValueArray);
if (!string.IsNullOrEmpty(newPerson.RoleIds))
{
newPerson.IsOffice = true;
}
else
{
newPerson.IsOffice = false;
}
if (!string.IsNullOrEmpty(imgPhoto.ImageUrl) && imgPhoto.ImageUrl != "~/res/images/blank.png") if (!string.IsNullOrEmpty(imgPhoto.ImageUrl) && imgPhoto.ImageUrl != "~/res/images/blank.png")
{ {
newPerson.PhotoUrl = imgPhoto.ImageUrl.Replace("~/", ""); newPerson.PhotoUrl = imgPhoto.ImageUrl.Replace("~/", "");
+13 -2
View File
@@ -7,10 +7,12 @@
// </自动生成> // </自动生成>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace FineUIPro.Web.Person { namespace FineUIPro.Web.Person
{
public partial class PersonEdit { public partial class PersonEdit
{
/// <summary> /// <summary>
/// _form1 控件。 /// _form1 控件。
@@ -165,6 +167,15 @@ namespace FineUIPro.Web.Person {
/// </remarks> /// </remarks>
protected global::FineUIPro.RadioButtonList rbPersonType; protected global::FineUIPro.RadioButtonList rbPersonType;
/// <summary>
/// ckIsOffice 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBox ckIsOffice;
/// <summary> /// <summary>
/// drpIdcardType 控件。 /// drpIdcardType 控件。
/// </summary> /// </summary>
+2 -1
View File
@@ -72,11 +72,12 @@
</f:DropDownList> </f:DropDownList>
</Items> </Items>
</f:FormRow> </f:FormRow>
<f:FormRow> <f:FormRow ColumnWidths="50% 35% 15%">
<Items> <Items>
<f:DropDownList ID="drpWorkPost" runat="server" Readonly="true" Label="岗位" EnableEdit="true"> <f:DropDownList ID="drpWorkPost" runat="server" Readonly="true" Label="岗位" EnableEdit="true">
</f:DropDownList> </f:DropDownList>
<f:TextBox runat="server" Readonly="true" ID="txtPersonType" Label="类型"></f:TextBox> <f:TextBox runat="server" Readonly="true" ID="txtPersonType" Label="类型"></f:TextBox>
<f:CheckBox runat="server" ID="ckIsOffice" Label="本部" Readonly="true"></f:CheckBox>
</Items> </Items>
</f:FormRow> </f:FormRow>
<f:FormRow> <f:FormRow>
@@ -60,6 +60,10 @@ namespace FineUIPro.Web.Person
{ {
this.ckIsForeign.Checked = person.IsForeign.Value; this.ckIsForeign.Checked = person.IsForeign.Value;
} }
if (person.IsOffice.HasValue)
{
this.ckIsOffice.Checked = person.IsOffice.Value;
}
this.txtPersonType.Text = DropListService.getPersonTypeNameByValue(person.PersonType); this.txtPersonType.Text = DropListService.getPersonTypeNameByValue(person.PersonType);
if (!string.IsNullOrEmpty(person.IdcardType)) if (!string.IsNullOrEmpty(person.IdcardType))
{ {
+9
View File
@@ -131,6 +131,15 @@ namespace FineUIPro.Web.Person
/// </remarks> /// </remarks>
protected global::FineUIPro.TextBox txtPersonType; protected global::FineUIPro.TextBox txtPersonType;
/// <summary>
/// ckIsOffice 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBox ckIsOffice;
/// <summary> /// <summary>
/// drpIdcardType 控件。 /// drpIdcardType 控件。
/// </summary> /// </summary>
@@ -357,7 +357,7 @@
</f:RegionPanel> </f:RegionPanel>
<f:Window ID="Window1" runat="server" Hidden="true" <f:Window ID="Window1" runat="server" Hidden="true"
IsModal="false" Target="Parent" EnableMaximize="true" EnableResize="true" OnClose="Window1_Close" IsModal="false" Target="Parent" EnableMaximize="true" EnableResize="true" OnClose="Window1_Close"
Title="编辑企业安全数据统计月报" CloseAction="HidePostBack" EnableIFrame="true" Height="650px" Title="编辑企业安全数据统计月报" CloseAction="HidePostBack" EnableIFrame="true" Height="650px" Maximized="true"
Width="1200px"> Width="1200px">
</f:Window> </f:Window>
<f:Window ID="Window2" runat="server" Hidden="true" <f:Window ID="Window2" runat="server" Hidden="true"
@@ -172,7 +172,6 @@
<Rows> <Rows>
<f:FormRow> <f:FormRow>
<Items> <Items>
<f:NumberBox ID="txtCommissionerNum" runat="server" Label="总监(人)" LabelAlign="Right" NoDecimal="true" <f:NumberBox ID="txtCommissionerNum" runat="server" Label="总监(人)" LabelAlign="Right" NoDecimal="true"
NoNegative="true" EmptyText="0"> NoNegative="true" EmptyText="0">
</f:NumberBox> </f:NumberBox>
@@ -1,4 +1,6 @@
using BLL; using BLL;
using FineUIPro.Web.BaseInfo;
using FineUIPro.Web.InformationProject;
using Model; using Model;
using Newtonsoft.Json.Linq; using Newtonsoft.Json.Linq;
using System; using System;
@@ -58,124 +60,10 @@ namespace FineUIPro.Web.ZHGL.Information
MillionsMonthlyReportId = Request.QueryString["MillionsMonthlyReportId"]; MillionsMonthlyReportId = Request.QueryString["MillionsMonthlyReportId"];
if (!String.IsNullOrEmpty(MillionsMonthlyReportId)) if (!String.IsNullOrEmpty(MillionsMonthlyReportId))
{ {
items = BLL.MillionsMonthlyReportItemService.GetItemsNoSum(MillionsMonthlyReportId);
this.Grid1.DataSource = items;
this.Grid1.DataBind();
var report = BLL.MillionsMonthlyReportService.GetMillionsMonthlyReportByMillionsMonthlyReportId(MillionsMonthlyReportId); var report = BLL.MillionsMonthlyReportService.GetMillionsMonthlyReportByMillionsMonthlyReportId(MillionsMonthlyReportId);
if (report != null) if (report != null)
{ {
this.btnSave.Hidden = true; setPageInfo(report);
this.btnSubmit.Hidden = true;
this.btnCopy.Hidden = true;
if (report.HandleState == BLL.Const.HandleState_4)
{
this.btnUpdata.Hidden = false;
}
else
{
if (report.HandleMan == this.CurrUser.PersonId || this.CurrUser.PersonId == BLL.Const.sysglyId)
{
this.btnSave.Hidden = false;
this.btnSubmit.Hidden = false;
}
}
if (report.UpState == BLL.Const.UpState_3)
{
this.btnSave.Hidden = true;
this.btnUpdata.Hidden = true;
}
drpMonth.SelectedValue = report.Month.ToString();
drpYear.SelectedValue = report.Year.ToString();
drpUnit.SelectedValue = report.UnitId;
if (report.FillingDate != null)
{
txtFillingDate.Text = string.Format("{0:yyyy-MM-dd}", report.FillingDate);
}
txtDutyPerson.Text = report.DutyPerson;
if (report.RecordableIncidentRate != null)
{
txtRecordableIncidentRate.Text = report.RecordableIncidentRate.ToString();
}
if (report.LostTimeRate != null)
{
txtLostTimeRate.Text = report.LostTimeRate.ToString();
}
if (report.LostTimeInjuryRate != null)
{
txtLostTimeInjuryRate.Text = report.LostTimeInjuryRate.ToString();
}
if (report.DeathAccidentFrequency != null)
{
txtDeathAccidentFrequency.Text = report.DeathAccidentFrequency.ToString();
}
if (report.AccidentMortality != null)
{
txtAccidentMortality.Text = report.AccidentMortality.ToString();
}
if (report.InputCosts != null)
{
this.txtInputCosts.Text = Convert.ToString(report.InputCosts);
}
if (report.TrainNum != null)
{
this.txtTrainNum.Text = Convert.ToString(report.TrainNum);
}
if (report.GeneralHazardNum != null)
{
this.txtGeneralHazardNum.Text = Convert.ToString(report.GeneralHazardNum);
}
if (report.MajorHazardNum != null)
{
this.txtMajorHazardNum.Text = Convert.ToString(report.MajorHazardNum);
}
if (report.NotProofLargeProjectNum != null)
{
this.txtNotProofLargeProjectNum.Text = Convert.ToString(report.NotProofLargeProjectNum);
}
if (report.ProofLargeProjectNum != null)
{
this.txtProofLargeProjectNum.Text = Convert.ToString(report.ProofLargeProjectNum);
}
if (report.FireLicenseNum != null)
{
this.txtFireLicenseNum.Text = Convert.ToString(report.FireLicenseNum);
}
if (report.LimitLicenseNum != null)
{
this.txtLimitLicenseNum.Text = Convert.ToString(report.LimitLicenseNum);
}
if (report.HighLicenseNum != null)
{
this.txtHighLicenseNum.Text = Convert.ToString(report.HighLicenseNum);
}
if (report.HoistingLicenseNum != null)
{
this.txtHoistingLicenseNum.Text = Convert.ToString(report.HoistingLicenseNum);
}
if (report.BreakGroundLicenseNum != null)
{
this.txtBreakGroundLicenseNum.Text = Convert.ToString(report.BreakGroundLicenseNum);
}
if (report.ElectricityLicenseNum != null)
{
this.txtElectricityLicenseNum.Text = Convert.ToString(report.ElectricityLicenseNum);
}
if (report.RTLicenseNum != null)
{
this.txtRTLicenseNum.Text = Convert.ToString(report.RTLicenseNum);
}
if (report.NightLicenseNum != null)
{
this.txtNightLicenseNum.Text = Convert.ToString(report.NightLicenseNum);
}
if (report.CommissionerNum != null)
{
this.txtCommissionerNum.Text = Convert.ToString(report.CommissionerNum);
}
if (report.SoleDutyNum != null)
{
this.txtSoleDutyNum.Text = Convert.ToString(report.SoleDutyNum);
}
} }
} }
else else
@@ -187,8 +75,6 @@ namespace FineUIPro.Web.ZHGL.Information
txtDutyPerson.Text = this.CurrUser.PersonName; txtDutyPerson.Text = this.CurrUser.PersonName;
//增加明细集合 //增加明细集合
GetNewItems(year, months); GetNewItems(year, months);
this.Grid1.DataSource = items;
this.Grid1.DataBind();
this.txtRecordableIncidentRate.Text = "0"; this.txtRecordableIncidentRate.Text = "0";
this.txtLostTimeRate.Text = "0"; this.txtLostTimeRate.Text = "0";
this.txtLostTimeInjuryRate.Text = "0"; this.txtLostTimeInjuryRate.Text = "0";
@@ -197,6 +83,133 @@ namespace FineUIPro.Web.ZHGL.Information
} }
} }
} }
#region
/// <summary>
///
/// </summary>
/// <param name="report"></param>
private void setPageInfo(Model.Information_MillionsMonthlyReport report)
{
this.btnSave.Hidden = true;
this.btnSubmit.Hidden = true;
this.btnCopy.Hidden = true;
if (report.HandleState == BLL.Const.HandleState_4)
{
this.btnUpdata.Hidden = false;
}
else
{
if (report.HandleMan == this.CurrUser.PersonId || this.CurrUser.PersonId == BLL.Const.sysglyId)
{
this.btnSave.Hidden = false;
this.btnSubmit.Hidden = false;
}
}
if (report.UpState == BLL.Const.UpState_3)
{
this.btnSave.Hidden = true;
this.btnUpdata.Hidden = true;
}
drpMonth.SelectedValue = report.Month.ToString();
drpYear.SelectedValue = report.Year.ToString();
drpUnit.SelectedValue = report.UnitId;
if (report.FillingDate != null)
{
txtFillingDate.Text = string.Format("{0:yyyy-MM-dd}", report.FillingDate);
}
txtDutyPerson.Text = report.DutyPerson;
if (report.RecordableIncidentRate != null)
{
txtRecordableIncidentRate.Text = report.RecordableIncidentRate.ToString();
}
if (report.LostTimeRate != null)
{
txtLostTimeRate.Text = report.LostTimeRate.ToString();
}
if (report.LostTimeInjuryRate != null)
{
txtLostTimeInjuryRate.Text = report.LostTimeInjuryRate.ToString();
}
if (report.DeathAccidentFrequency != null)
{
txtDeathAccidentFrequency.Text = report.DeathAccidentFrequency.ToString();
}
if (report.AccidentMortality != null)
{
txtAccidentMortality.Text = report.AccidentMortality.ToString();
}
if (report.InputCosts != null)
{
this.txtInputCosts.Text = Convert.ToString(report.InputCosts);
}
if (report.TrainNum != null)
{
this.txtTrainNum.Text = Convert.ToString(report.TrainNum);
}
if (report.GeneralHazardNum != null)
{
this.txtGeneralHazardNum.Text = Convert.ToString(report.GeneralHazardNum);
}
if (report.MajorHazardNum != null)
{
this.txtMajorHazardNum.Text = Convert.ToString(report.MajorHazardNum);
}
if (report.NotProofLargeProjectNum != null)
{
this.txtNotProofLargeProjectNum.Text = Convert.ToString(report.NotProofLargeProjectNum);
}
if (report.ProofLargeProjectNum != null)
{
this.txtProofLargeProjectNum.Text = Convert.ToString(report.ProofLargeProjectNum);
}
if (report.FireLicenseNum != null)
{
this.txtFireLicenseNum.Text = Convert.ToString(report.FireLicenseNum);
}
if (report.LimitLicenseNum != null)
{
this.txtLimitLicenseNum.Text = Convert.ToString(report.LimitLicenseNum);
}
if (report.HighLicenseNum != null)
{
this.txtHighLicenseNum.Text = Convert.ToString(report.HighLicenseNum);
}
if (report.HoistingLicenseNum != null)
{
this.txtHoistingLicenseNum.Text = Convert.ToString(report.HoistingLicenseNum);
}
if (report.BreakGroundLicenseNum != null)
{
this.txtBreakGroundLicenseNum.Text = Convert.ToString(report.BreakGroundLicenseNum);
}
if (report.ElectricityLicenseNum != null)
{
this.txtElectricityLicenseNum.Text = Convert.ToString(report.ElectricityLicenseNum);
}
if (report.RTLicenseNum != null)
{
this.txtRTLicenseNum.Text = Convert.ToString(report.RTLicenseNum);
}
if (report.NightLicenseNum != null)
{
this.txtNightLicenseNum.Text = Convert.ToString(report.NightLicenseNum);
}
if (report.CommissionerNum != null)
{
this.txtCommissionerNum.Text = Convert.ToString(report.CommissionerNum);
}
if (report.SoleDutyNum != null)
{
this.txtSoleDutyNum.Text = Convert.ToString(report.SoleDutyNum);
}
items = BLL.MillionsMonthlyReportItemService.GetItemsNoSum(MillionsMonthlyReportId);
this.Grid1.DataSource = items;
this.Grid1.DataBind();
}
#endregion
#endregion #endregion
#region #region
@@ -721,29 +734,95 @@ namespace FineUIPro.Web.ZHGL.Information
#region #region
private void GetNewItems(string year, string months) private void GetNewItems(string year, string months)
{ {
//获取项目集合 var getCosts = from x in Funs.DB.CostGoods_CostManageItem
List<Model.InformationProject_MillionsMonthlyReport> millionsMonthlyReports = (from x in Funs.DB.InformationProject_MillionsMonthlyReport where x.Year.ToString() == year && x.Month.ToString() == months && x.States == BLL.Const.State_2 select x).ToList(); join y in Funs.DB.CostGoods_CostManage on x.CostManageId equals y.CostManageId
this.txtInputCosts.Text = Convert.ToString(millionsMonthlyReports.Sum(x => x.InputCosts ?? 0)); where y.CostManageDate.Value.Year.ToString() == year && y.CostManageDate.Value.Month.ToString() == months
this.txtTrainNum.Text = Convert.ToString(millionsMonthlyReports.Sum(x => x.TrainNum ?? 0)); select x;
this.txtGeneralHazardNum.Text = Convert.ToString(millionsMonthlyReports.Sum(x => x.GeneralHazardNum ?? 0)); if (getCosts.Count() > 0)
this.txtMajorHazardNum.Text = Convert.ToString(millionsMonthlyReports.Sum(x => x.MajorHazardNum ?? 0)); {
this.txtNotProofLargeProjectNum.Text = Convert.ToString(millionsMonthlyReports.Sum(x => x.NotProofLargeProjectNum ?? 0)); this.txtInputCosts.Text = getCosts.Sum(x => x.PriceMoney ?? 0).ToString();
this.txtProofLargeProjectNum.Text = Convert.ToString(millionsMonthlyReports.Sum(x => x.ProofLargeProjectNum ?? 0)); }
this.txtFireLicenseNum.Text = Convert.ToString(millionsMonthlyReports.Sum(x => x.FireLicenseNum ?? 0)); this.txtTrainNum.Text = Funs.DB.EduTrain_TrainRecord.Where(x => x.TrainStartDate.Value.Year.ToString() == year && x.TrainStartDate.Value.Month.ToString() == months).Count().ToString();
this.txtLimitLicenseNum.Text = Convert.ToString(millionsMonthlyReports.Sum(x => x.LimitLicenseNum ?? 0));
this.txtHighLicenseNum.Text = Convert.ToString(millionsMonthlyReports.Sum(x => x.HighLicenseNum ?? 0)); int HazardAll = 0, RectifyAll = 0;
this.txtHoistingLicenseNum.Text = Convert.ToString(millionsMonthlyReports.Sum(x => x.HoistingLicenseNum ?? 0)); int HazardMajor = 0, RectifyMajor = 0;
this.txtBreakGroundLicenseNum.Text = Convert.ToString(millionsMonthlyReports.Sum(x => x.BreakGroundLicenseNum ?? 0)); var getHazardRegister = Funs.DB.HSSE_Hazard_HazardRegister.Where(x => x.RegisterDate.Value.Year.ToString() == year && x.RegisterDate.Value.Month.ToString() == months && x.States == Const.State_3);
this.txtElectricityLicenseNum.Text = Convert.ToString(millionsMonthlyReports.Sum(x => x.ElectricityLicenseNum ?? 0)); HazardAll = getHazardRegister.Count();
this.txtRTLicenseNum.Text = Convert.ToString(millionsMonthlyReports.Sum(x => x.RTLicenseNum ?? 0)); if (HazardAll > 0)
this.txtNightLicenseNum.Text = Convert.ToString(millionsMonthlyReports.Sum(x => x.NightLicenseNum ?? 0)); {
this.txtCommissionerNum.Text = Convert.ToString(millionsMonthlyReports.Sum(x => x.CommissionerNum ?? 0)); HazardMajor = getHazardRegister.Where(x => x.HazardValue == "2").Count();
this.txtSoleDutyNum.Text = Convert.ToString(millionsMonthlyReports.Sum(x => x.SoleDutyNum ?? 0)); }
List<string> projectIds = millionsMonthlyReports.Select(x => x.ProjectId).ToList();
var getRectifyNotices = Funs.DB.Check_RectifyNotices.Where(x => x.CheckedDate.Value.Year.ToString() == year && x.CheckedDate.Value.Month.ToString() == months && x.States == Const.State_5);
RectifyAll = getRectifyNotices.Count();
if (RectifyAll > 0)
{
RectifyMajor = getRectifyNotices.Where(x => x.HiddenHazardType == "3").Count();
}
this.txtGeneralHazardNum.Text = ((HazardAll - HazardMajor) + (RectifyAll - RectifyMajor)).ToString();
this.txtMajorHazardNum.Text = (HazardMajor + RectifyMajor).ToString();
var getLarger = from x in Funs.DB.Solution_LargerHazardListItem
join y in Funs.DB.Solution_LargerHazardList on x.LargerHazardListId equals y.LargerHazardListId
where y.States == Const.State_1 && y.RecordTime.Value.Year.ToString() == year && y.RecordTime.Value.Month.ToString() == months
select x;
if (getLarger.Count() > 0)
{
this.txtNotProofLargeProjectNum.Text = Convert.ToString(getLarger.Where(x => x.IsArgument == false).Count());
this.txtProofLargeProjectNum.Text = Convert.ToString(getLarger.Where(x => x.IsArgument == true).Count());
}
var getLicense = from x in Funs.DB.License_LicenseManager
join y in Funs.DB.Base_LicenseType on x.LicenseTypeId equals y.LicenseTypeId
where x.States != Const.State_R && x.StartDate.Value.Year.ToString() == year && x.StartDate.Value.Month.ToString() == months
select new { x.LicenseManagerId,x.StartDate,x.EndDate,x.States,y.LicenseTypeId,y.LicenseTypeCode,y.LicenseTypeName};
int fire1 = Funs.DB.License_FireWork.Where(x => x.ApplyDate.Value.Year.ToString() == year && x.ApplyDate.Value.Month.ToString() == months && (x.States == Const.State_2 || x.States == Const.State_3)).Count();
int fire2 = getLicense.Where(x => x.LicenseTypeName.Contains("动火")).Count();
this.txtFireLicenseNum.Text =(fire1+ fire2) .ToString();
int limit1 = Funs.DB.License_LimitedSpace.Where(x => x.ApplyDate.Value.Year.ToString() == year && x.ApplyDate.Value.Month.ToString() == months && (x.States == Const.State_2 || x.States == Const.State_3)).Count();
int limit2 = getLicense.Where(x => x.LicenseTypeName.Contains("受限空间")).Count();
this.txtLimitLicenseNum.Text = (limit1+ limit2).ToString();
int High1 = Funs.DB.License_HeightWork.Where(x => x.ApplyDate.Value.Year.ToString() == year && x.ApplyDate.Value.Month.ToString() == months && (x.States == Const.State_2 || x.States == Const.State_3)).Count();
int High2 = getLicense.Where(x => x.LicenseTypeName.Contains("登高")).Count();
this.txtHighLicenseNum.Text =(High1+ High2).ToString();
int Hoisting1 = Funs.DB.License_LiftingWork.Where(x => x.ApplyDate.Value.Year.ToString() == year && x.ApplyDate.Value.Month.ToString() == months && (x.States == Const.State_2 || x.States == Const.State_3)).Count();
int Hoisting2 = getLicense.Where(x => x.LicenseTypeName.Contains("吊装")).Count();
this.txtHoistingLicenseNum.Text =(Hoisting1+ Hoisting2).ToString();
int Break1 = Funs.DB.License_BreakGround.Where(x => x.ApplyDate.Value.Year.ToString() == year && x.ApplyDate.Value.Month.ToString() == months && (x.States == Const.State_2 || x.States == Const.State_3)).Count();
int Break2 = getLicense.Where(x => x.LicenseTypeName.Contains("动土")).Count();
this.txtBreakGroundLicenseNum.Text = (Break1+ Break2).ToString();
this.txtElectricityLicenseNum.Text = getLicense.Where(x=>x.LicenseTypeName.Contains("临电")).Count().ToString();
int rt1 = Funs.DB.License_RadialWork.Where(x => x.ApplyDate.Value.Year.ToString() == year && x.ApplyDate.Value.Month.ToString() == months && (x.States == Const.State_2 || x.States == Const.State_3)).Count();
int rt2 = getLicense.Where(x => x.LicenseTypeName.Contains("射线")).Count();
this.txtRTLicenseNum.Text =(rt1+ rt2).ToString();
int night1 = Funs.DB.License_NightWork.Where(x => x.ApplyDate.Value.Year.ToString() == year && x.ApplyDate.Value.Month.ToString() == months && (x.States == Const.State_2 || x.States == Const.State_3)).Count();
int night2 = getLicense.Where(x => x.LicenseTypeName.Contains("夜间")).Count();
this.txtNightLicenseNum.Text =(night1+ night2).ToString();
var getPersons = from x in Funs.DB.SitePerson_Person
join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId
where x.States == Const.ProjectPersonStates_1 && y.IsHsse == true
select new { x.ProjectId,y.WorkPostName} ;
int isHsse = getPersons.Count();
if (isHsse > 0)
{
this.txtCommissionerNum.Text = Convert.ToString(getPersons.Where(x => x.WorkPostName.Contains("安全总监")).Count());
}
this.txtSoleDutyNum.Text = isHsse.ToString();
//增加明细集合 //增加明细集合
Model.Information_MillionsMonthlyReportItem item1 = new Information_MillionsMonthlyReportItem Model.Information_MillionsMonthlyReportItem item1 = new Information_MillionsMonthlyReportItem
{ {
MillionsMonthlyReportItemId = SQLHelper.GetNewID(typeof(Model.Information_MillionsMonthlyReportItem)), MillionsMonthlyReportItemId = SQLHelper.GetNewID(),
Affiliation = "机关后勤服务", Affiliation = "机关后勤服务",
Name = "总部", Name = "总部",
SortIndex = 10, SortIndex = 10,
@@ -779,7 +858,7 @@ namespace FineUIPro.Web.ZHGL.Information
items.Add(item1); items.Add(item1);
Model.Information_MillionsMonthlyReportItem item2 = new Information_MillionsMonthlyReportItem Model.Information_MillionsMonthlyReportItem item2 = new Information_MillionsMonthlyReportItem
{ {
MillionsMonthlyReportItemId = SQLHelper.GetNewID(typeof(Model.Information_MillionsMonthlyReportItem)), MillionsMonthlyReportItemId = SQLHelper.GetNewID(),
Affiliation = "机关后勤服务", Affiliation = "机关后勤服务",
Name = "二级单位", Name = "二级单位",
SortIndex = 20, SortIndex = 20,
@@ -812,21 +891,16 @@ namespace FineUIPro.Web.ZHGL.Information
LossDayNum = 0, LossDayNum = 0,
}; };
items.Add(item2); items.Add(item2);
var projects = (from x in Funs.DB.Base_Project
where projectIds.Contains(x.ProjectId)
select x).ToList();
if (this.CurrUser.UnitId == Const.UnitId_SEDIN)
{ var projects = BLL.ProjectService.GetProjectWorkList();
projects = BLL.ProjectService.GetProjectWorkList();
}
int i = 20; int i = 20;
foreach (var p in projects) foreach (var p in projects)
{ {
i += 10; i += 10;
Model.Information_MillionsMonthlyReportItem item = new Information_MillionsMonthlyReportItem Model.Information_MillionsMonthlyReportItem item = new Information_MillionsMonthlyReportItem
{ {
MillionsMonthlyReportItemId = SQLHelper.GetNewID(typeof(Model.Information_MillionsMonthlyReportItem)), MillionsMonthlyReportItemId = SQLHelper.GetNewID(),
Affiliation = "项目现场", Affiliation = "项目现场",
Name = p.ProjectName, Name = p.ProjectName,
SortIndex = i SortIndex = i
@@ -841,70 +915,45 @@ namespace FineUIPro.Web.ZHGL.Information
item.Name = "[" + p.ProjectCode + "]" + p.ProjectName; item.Name = "[" + p.ProjectCode + "]" + p.ProjectName;
} }
} }
var getSitePersons = Funs.DB.SitePerson_Person.Where(x => x.ProjectId == p.ProjectId && x.States == Const.ProjectPersonStates_1);
//var getZSOerson = from x in getSitePersons
// join y in Funs.DB.Person_Persons on x.PersonId equals y.PersonId
// where y.PersonType == "1" && x.UnitId == Const.UnitId_SEDIN
// select x;
var getAllSedinPerson= getSitePersons.Where(x => x.UnitId == Const.UnitId_SEDIN).Count();
Model.InformationProject_MillionsMonthlyReport report = millionsMonthlyReports.FirstOrDefault(x => x.ProjectId == p.ProjectId); item.PostPersonNum = getAllSedinPerson;
if (report != null) item.SnapPersonNum = 0;
{ item.ContractorNum = getSitePersons.Where(x => x.UnitId != Const.UnitId_SEDIN).Count();
item.PostPersonNum = report.PostPersonNum; item.SumPersonNum = getSitePersons.Count();
item.SnapPersonNum = report.SnapPersonNum; item.TotalWorkNum = 0;
item.ContractorNum = report.ContractorNum; item.SeriousInjuriesNum = 0;
item.SumPersonNum = report.SumPersonNum; item.SeriousInjuriesPersonNum = 0;
item.TotalWorkNum = report.TotalWorkNum; item.SeriousInjuriesLossHour = 0;
item.SeriousInjuriesNum = report.SeriousInjuriesNum; item.MinorAccidentNum = 0;
item.SeriousInjuriesPersonNum = report.SeriousInjuriesPersonNum; item.MinorAccidentPersonNum = 0;
item.SeriousInjuriesLossHour = report.SeriousInjuriesLossHour; item.MinorAccidentLossHour = 0;
item.MinorAccidentNum = report.MinorAccidentNum; item.DeathAccidentNum = 0;
item.MinorAccidentPersonNum = report.MinorAccidentPersonNum; item.DeathAccidentPersonNum = 0;
item.MinorAccidentLossHour = report.MinorAccidentLossHour; item.DeathAccidentLossHour = 0;
item.DeathAccidentNum = report.DeathAccidentNum; item.RestrictedWorkPersonNum = 0;
item.DeathAccidentPersonNum = report.DeathAccidentPersonNum; item.RestrictedWorkLossHour = 0;
item.DeathAccidentLossHour = report.DeathAccidentLossHour; item.MedicalTreatmentPersonNum = 0;
item.RestrictedWorkPersonNum = report.RestrictedWorkPersonNum; item.MedicalTreatmentLossHour = 0;
item.RestrictedWorkLossHour = report.RestrictedWorkLossHour; item.FireNum = 0;
item.MedicalTreatmentPersonNum = report.MedicalTreatmentPersonNum; item.EnvironmenNum = 0;
item.MedicalTreatmentLossHour = report.MedicalTreatmentLossHour; item.TrafficNum = 0;
item.FireNum = report.FireNum; item.EquipmentNum = 0;
item.EnvironmenNum = report.EnvironmenNum; item.QualityNum = 0;
item.TrafficNum = report.TrafficNum; item.OtherNum = 0;
item.EquipmentNum = report.EquipmentNum; item.FirstAidDressingsNum = 0;
item.QualityNum = report.QualityNum; item.AttemptedEventNum = 0;
item.OtherNum = report.OtherNum; item.LossDayNum = 0;
item.FirstAidDressingsNum = report.FirstAidDressingsNum;
item.AttemptedEventNum = report.AttemptedEventNum;
item.LossDayNum = report.LossDayNum;
}
else
{
item.PostPersonNum = 0;
item.SnapPersonNum = 0;
item.ContractorNum = 0;
item.SumPersonNum = 0;
item.TotalWorkNum = 0;
item.SeriousInjuriesNum = 0;
item.SeriousInjuriesPersonNum = 0;
item.SeriousInjuriesLossHour = 0;
item.MinorAccidentNum = 0;
item.MinorAccidentPersonNum = 0;
item.MinorAccidentLossHour = 0;
item.DeathAccidentNum = 0;
item.DeathAccidentPersonNum = 0;
item.DeathAccidentLossHour = 0;
item.RestrictedWorkPersonNum = 0;
item.RestrictedWorkLossHour = 0;
item.MedicalTreatmentPersonNum = 0;
item.MedicalTreatmentLossHour = 0;
item.FireNum = 0;
item.EnvironmenNum = 0;
item.TrafficNum = 0;
item.EquipmentNum = 0;
item.QualityNum = 0;
item.OtherNum = 0;
item.FirstAidDressingsNum = 0;
item.AttemptedEventNum = 0;
item.LossDayNum = 0;
}
items.Add(item); items.Add(item);
} }
this.Grid1.DataSource = items;
this.Grid1.DataBind();
} }
#endregion #endregion
@@ -28,7 +28,7 @@
{ {
get; get;
set; set;
} } = 0;
/// <summary> /// <summary>
/// 安全防护投入-年 /// 安全防护投入-年
/// </summary> /// </summary>
@@ -36,7 +36,7 @@
{ {
get; get;
set; set;
} } = 0;
/// <summary> /// <summary>
/// 安全防护投入-总 /// 安全防护投入-总
/// </summary> /// </summary>
@@ -44,7 +44,7 @@
{ {
get; get;
set; set;
} } = 0;
/// <summary> /// <summary>
/// 劳动保护及职业健康投入-月 /// 劳动保护及职业健康投入-月
/// </summary> /// </summary>
@@ -52,7 +52,7 @@
{ {
get; get;
set; set;
} } = 0;
/// <summary> /// <summary>
/// 劳动保护及职业健康投入-年 /// 劳动保护及职业健康投入-年
/// </summary> /// </summary>
@@ -60,7 +60,7 @@
{ {
get; get;
set; set;
} } = 0;
/// <summary> /// <summary>
/// 劳动保护及职业健康投入-总 /// 劳动保护及职业健康投入-总
/// </summary> /// </summary>
@@ -68,7 +68,7 @@
{ {
get; get;
set; set;
} } = 0;
/// <summary> /// <summary>
/// 安全技术进步投入-月 /// 安全技术进步投入-月
/// </summary> /// </summary>
@@ -76,7 +76,7 @@
{ {
get; get;
set; set;
} } = 0;
/// <summary> /// <summary>
/// 安全技术进步投入-年 /// 安全技术进步投入-年
/// </summary> /// </summary>
@@ -84,7 +84,7 @@
{ {
get; get;
set; set;
} } = 0;
/// <summary> /// <summary>
/// 安全技术进步投入-总 /// 安全技术进步投入-总
/// </summary> /// </summary>
@@ -92,7 +92,7 @@
{ {
get; get;
set; set;
} } = 0;
/// <summary> /// <summary>
/// 安全教育培训投入-月 /// 安全教育培训投入-月
/// </summary> /// </summary>
@@ -100,7 +100,7 @@
{ {
get; get;
set; set;
} } = 0;
/// <summary> /// <summary>
/// 安全教育培训投入-年 /// 安全教育培训投入-年
/// </summary> /// </summary>
@@ -108,7 +108,7 @@
{ {
get; get;
set; set;
} } = 0;
/// <summary> /// <summary>
/// 安全教育培训投入-总 /// 安全教育培训投入-总
/// </summary> /// </summary>
@@ -116,7 +116,7 @@
{ {
get; get;
set; set;
} } = 0;
/// <summary> /// <summary>
/// 合计-月 /// 合计-月
/// </summary> /// </summary>
@@ -124,7 +124,7 @@
{ {
get; get;
set; set;
} } = 0;
/// <summary> /// <summary>
/// 合计-年 /// 合计-年
/// </summary> /// </summary>
@@ -132,7 +132,7 @@
{ {
get; get;
set; set;
} } = 0;
/// <summary> /// <summary>
/// 合计-总 /// 合计-总
/// </summary> /// </summary>
@@ -140,7 +140,7 @@
{ {
get; get;
set; set;
} } = 0;
/// <summary> /// <summary>
/// 完成合同额-月 /// 完成合同额-月
/// </summary> /// </summary>
@@ -148,7 +148,7 @@
{ {
get; get;
set; set;
} } = 0;
/// <summary> /// <summary>
/// 完成合同额-年度 /// 完成合同额-年度
/// </summary> /// </summary>
@@ -156,7 +156,7 @@
{ {
get; get;
set; set;
} } = 0;
/// <summary> /// <summary>
/// 完成合同额-累计 /// 完成合同额-累计
/// </summary> /// </summary>
@@ -164,7 +164,7 @@
{ {
get; get;
set; set;
} } = 0;
/// <summary> /// <summary>
/// 工程造价占比 /// 工程造价占比
/// </summary> /// </summary>
@@ -172,6 +172,6 @@
{ {
get; get;
set; set;
} } = 0;
} }
} }