This commit is contained in:
commit
59ec064cd6
|
@ -0,0 +1,6 @@
|
|||
ALTER TABLE Manager_Month_InjuryAccidentC
|
||||
add LossCount int null;
|
||||
|
||||
ALTER TABLE Manager_Month_InjuryAccidentC
|
||||
add DeathCount int null;
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
Create PROCEDURE [dbo].[SpGetHsseKq]
|
||||
@ProjectId nvarchar(50),/*表名*/
|
||||
@startTime nvarchar(50),/*开始时间*/
|
||||
@endTime nvarchar(50),/*结束时间*/
|
||||
@UnitId nvarchar(50),/*0没有单位 1分包商 2五环*/
|
||||
@returnVal int output
|
||||
AS
|
||||
/*获取安全月报考勤数据*/
|
||||
declare @sql nvarchar(500),
|
||||
@kqcount int;
|
||||
|
||||
IF(@UnitId='0')
|
||||
BEGIN
|
||||
select @returnVal=count(*) from ( select IdentityCard FROM SitePerson_Checking WHERE PROJECTID=''+@ProjectId+'' AND IntoOut='1'
|
||||
AND IntoOutTime>=''+@startTime+'' AND IntoOutTime<=''+@endTime+'' Group by IdentityCard,CONVERT(varchar(100), IntoOutTime, 23)
|
||||
)f;
|
||||
|
||||
--select @sql= N' SELECT @kqcount= count(*) from (select IdentityCard FROM SitePerson_Checking WHERE PROJECTID='''+@ProjectId+''' AND IntoOut=''1''
|
||||
-- AND IntoOutTime>='''+@startTime+''' AND IntoOutTime<='''+@endTime+''' Group by IdentityCard,CONVERT(varchar(100), IntoOutTime, 23))f
|
||||
--';
|
||||
--EXEC sp_executesql @sql, N'@kqcount int OUTPUT', @kqcount OUTPUT ;
|
||||
--set @returnVal=@kqcount;
|
||||
|
||||
|
||||
END
|
||||
else
|
||||
begin
|
||||
if(@UnitId='1')
|
||||
begin
|
||||
select @returnVal=count(*) from ( select IdentityCard FROM SitePerson_Checking WHERE PROJECTID=''+@ProjectId+'' AND IntoOut='1'
|
||||
AND IntoOutTime>=''+@startTime+'' AND IntoOutTime<=''+@endTime+''
|
||||
and UnitId<>'6d29ed79-e20a-4c19-bb91-d280ea2e442e'
|
||||
Group by IdentityCard,CONVERT(varchar(100), IntoOutTime, 23)
|
||||
)f;
|
||||
|
||||
end
|
||||
else
|
||||
begin
|
||||
select @returnVal=count(*) from ( select IdentityCard FROM SitePerson_Checking WHERE PROJECTID=''+@ProjectId+'' AND IntoOut='1'
|
||||
AND IntoOutTime>=''+@startTime+'' AND IntoOutTime<=''+@endTime+''
|
||||
and UnitId='6d29ed79-e20a-4c19-bb91-d280ea2e442e'
|
||||
Group by IdentityCard,CONVERT(varchar(100), IntoOutTime, 23)
|
||||
)f;
|
||||
|
||||
end
|
||||
|
||||
|
||||
end
|
|
@ -0,0 +1,21 @@
|
|||
--修改试车菜单
|
||||
update sys_menu set SortIndex=0 where menuid='BC860C85-B224-48A6-B207-D7042BB71088';
|
||||
|
||||
update sys_menu set menuname='系统资产导入' where MenuId='F0E06491-B1DA-4510-ABCA-D09F4B24EE50';
|
||||
|
||||
update sys_menu set menuname='试车记录管理' where MenuId='29F80818-17A5-4BC0-8C38-A17415B0AC83';
|
||||
|
||||
update sys_menu set menuname='投料试车记录管理' where MenuId='B62482DA-9A12-45AC-9427-D0CF8A78EE2C';
|
||||
|
||||
update sys_menu set menuname='开车工程师项目工作总结' where MenuId='9EBA628D-E725-4A0B-B765-171F405D0821';
|
||||
|
||||
--增加索引,执行速度会有点慢
|
||||
CREATE INDEX ProjectId_Index ON SitePerson_Checking (ProjectId);
|
||||
CREATE INDEX IdentityCard_Index ON SitePerson_Checking (IdentityCard);
|
||||
CREATE INDEX IntoOutTime_Index ON SitePerson_Checking (IntoOutTime);
|
||||
CREATE INDEX IntoOut_Index ON SitePerson_Checking (IntoOut);
|
||||
CREATE INDEX UnitId ON SitePerson_Checking (UnitId);
|
||||
|
||||
CREATE NONCLUSTERED INDEX [SitePerson_Checking_ProjectId_IntoOut_IntoOutTime_Index]
|
||||
ON [dbo].[SitePerson_Checking] ([ProjectId],[IntoOut],[IntoOutTime])
|
||||
INCLUDE ([IdentityCard]);
|
|
@ -0,0 +1,9 @@
|
|||
insert into Sys_Const(ID,ConstValue,ConstText,SortIndex,GroupId) values
|
||||
(NEWID(),'ÆäËûÉ˺¦','ÆäËûÉ˺¦',14,'Hiddendangertype')
|
||||
GO
|
||||
insert into Sys_Const(ID,ConstValue,ConstText,SortIndex,GroupId) values
|
||||
(NEWID(),'ÆäËû±¬Õ¨','ÆäËû±¬Õ¨',15,'Hiddendangertype')
|
||||
GO
|
||||
insert into Sys_Const(ID,ConstValue,ConstText,SortIndex,GroupId) values
|
||||
(NEWID(),'͸ˮ','͸ˮ',16,'Hiddendangertype')
|
||||
GO
|
|
@ -86,6 +86,14 @@ namespace BLL
|
|||
BLL.CommonService.DeleteAttachFileById(EmergencyTeamAndTrain.FileId);
|
||||
////删除流程表
|
||||
BLL.CommonService.DeleteFlowOperateByID(EmergencyTeamAndTrain.FileId);
|
||||
|
||||
//删除子表
|
||||
var list = db.Emergency_EmergencyTeamItem.Where(x => x.FileId == FileId).ToList();
|
||||
if (list.Count>0)
|
||||
{
|
||||
db.Emergency_EmergencyTeamItem.DeleteAllOnSubmit(list);
|
||||
}
|
||||
|
||||
db.Emergency_EmergencyTeamAndTrain.DeleteOnSubmit(EmergencyTeamAndTrain);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
|
|
@ -36,9 +36,11 @@ namespace BLL
|
|||
FirstAidDressing = injuryAccident.FirstAidDressing,
|
||||
MedicalTreatment = injuryAccident.MedicalTreatment,
|
||||
WorkLimitation = injuryAccident.WorkLimitation,
|
||||
LossCount = injuryAccident.LossCount,
|
||||
LossPerson = injuryAccident.LossPerson,
|
||||
LossWorkTime = injuryAccident.LossWorkTime,
|
||||
LossEconomy = injuryAccident.LossEconomy,
|
||||
DeathCount=injuryAccident.DeathCount,
|
||||
DeathPerson = injuryAccident.DeathPerson,
|
||||
DeathWorkTime = injuryAccident.DeathWorkTime,
|
||||
DeathEconomy = injuryAccident.DeathEconomy
|
||||
|
|
|
@ -369,5 +369,6 @@ namespace BLL
|
|||
db.SubmitChanges();
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -972,5 +972,44 @@ namespace BLL
|
|||
maxId = GetIntValue(str);
|
||||
return maxId;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ͨ¹ý´æ´¢¹ý³Ì»ñÈ¡Êý¾Ý
|
||||
/// </summary>
|
||||
/// <param name="storedProcName"></param>
|
||||
/// <returns></returns>
|
||||
public static int RunProcGetHsseKq(string ProjectId,DateTime startTime,DateTime endTime,string UnitId)
|
||||
{
|
||||
string str = "";
|
||||
using (SqlConnection Connection = new SqlConnection(connectionString))
|
||||
{
|
||||
try
|
||||
{
|
||||
Connection.Open();
|
||||
SqlCommand command = new SqlCommand("SpGetHsseKq", Connection)
|
||||
{
|
||||
CommandTimeout = 0,
|
||||
CommandType = CommandType.StoredProcedure
|
||||
};
|
||||
SqlParameter[] values = new SqlParameter[]
|
||||
{
|
||||
new SqlParameter("@ProjectId", ProjectId),
|
||||
new SqlParameter("@startTime", startTime.ToString()),
|
||||
new SqlParameter("@endTime", endTime.ToString()),
|
||||
new SqlParameter("@UnitId", UnitId),
|
||||
new SqlParameter("@returnVal", SqlDbType.Int)
|
||||
};
|
||||
command.Parameters.AddRange(values);
|
||||
command.Parameters["@returnVal"].Direction = ParameterDirection.Output;
|
||||
command.ExecuteNonQuery();
|
||||
str = command.Parameters["@returnVal"].Value.ToString();
|
||||
}
|
||||
finally
|
||||
{
|
||||
Connection.Close();
|
||||
}
|
||||
return Convert.ToInt32(str);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -222,6 +222,8 @@ namespace FineUIPro.Web.HSSE.Emergency
|
|||
var EmergencyTeamAndTrain = BLL.EmergencyTeamAndTrainService.GetEmergencyTeamAndTrainById(rowID);
|
||||
if (EmergencyTeamAndTrain != null)
|
||||
{
|
||||
|
||||
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, EmergencyTeamAndTrain.FileCode, EmergencyTeamAndTrain.FileId, BLL.Const.ProjectEmergencyTeamAndTrainMenuId, BLL.Const.BtnDelete);
|
||||
BLL.EmergencyTeamAndTrainService.DeleteEmergencyTeamAndTrainById(rowID);
|
||||
}
|
||||
|
|
|
@ -10,6 +10,19 @@
|
|||
<script type="text/javascript" src="../../res/index/js/jquery-3.4.1.min.js"></script>
|
||||
|
||||
<script src="../../Controls/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
|
||||
<style>
|
||||
.grid-empty-text {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 500px;
|
||||
margin-left: -250px;
|
||||
margin-top: -15px;
|
||||
|
||||
font-size: 24px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.Toolbar2 {
|
||||
position: absolute;
|
||||
|
@ -41,6 +54,7 @@
|
|||
|
||||
.photo {
|
||||
height: 300px;
|
||||
|
||||
line-height: 300px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
@ -48,6 +62,7 @@
|
|||
.photo img {
|
||||
height: 300px;
|
||||
vertical-align: middle;
|
||||
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
@ -85,7 +100,7 @@
|
|||
bordercolor="#bcd2e7" bordercolordark="#bcd2e7" bordercolorlight="#bcd2e7">
|
||||
<tr>
|
||||
<td align="center" style="width: 24%;" rowspan="2">
|
||||
<img alt="" src="../../Images/Logo.jpg" />
|
||||
<img alt="" src="../../Images/Logo1.jpg" />
|
||||
</td>
|
||||
<td align="center" style="width: 46%; height: 30px; vertical-align: middle; font-size: 12pt;">
|
||||
<asp:Label ID="lblProjectName" runat="server"></asp:Label>
|
||||
|
@ -202,7 +217,7 @@
|
|||
</f:RenderField>
|
||||
</Columns>
|
||||
</f:GroupField>
|
||||
<f:RenderField Width="160px" ColumnID="HSEPersonNum" DataField="HSEPersonNum" FieldType="Int"
|
||||
<f:RenderField Width="170px" ColumnID="HSEPersonNum" DataField="HSEPersonNum" FieldType="Int"
|
||||
HeaderText="专职HSE管理人员数量" HeaderTextAlign="Center" TextAlign="Left">
|
||||
<Editor>
|
||||
<f:NumberBox ID="nbHSEPersonNum" NoDecimal="true" NoNegative="true" MinValue="0"
|
||||
|
@ -925,6 +940,13 @@
|
|||
<Columns>
|
||||
<f:GroupField EnableLock="true" HeaderText="损工事故" TextAlign="Center">
|
||||
<Columns>
|
||||
<f:RenderField Width="90px" ColumnID="LossCount" DataField="LossCount" FieldType="Int"
|
||||
HeaderText="起数" HeaderTextAlign="Center" TextAlign="Left">
|
||||
<Editor>
|
||||
<f:NumberBox ID="NumberBox27" runat="server" NoDecimal="true" NoNegative="true"></f:NumberBox>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
|
||||
<f:RenderField Width="90px" ColumnID="LossPerson" DataField="LossPerson" FieldType="Int"
|
||||
HeaderText="人数" HeaderTextAlign="Center" TextAlign="Left">
|
||||
<Editor>
|
||||
|
@ -947,6 +969,13 @@
|
|||
</f:GroupField>
|
||||
<f:GroupField EnableLock="true" HeaderText="死亡事故" TextAlign="Center">
|
||||
<Columns>
|
||||
<f:RenderField Width="90px" ColumnID="DeathCount" DataField="DeathCount" FieldType="Int"
|
||||
HeaderText="起数" HeaderTextAlign="Center" TextAlign="Left">
|
||||
<Editor>
|
||||
<f:NumberBox ID="NumberBox28" runat="server" NoDecimal="true" NoNegative="true"></f:NumberBox>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
|
||||
<f:RenderField Width="90px" ColumnID="DeathPerson" DataField="DeathPerson" FieldType="Int"
|
||||
HeaderText="人数" HeaderTextAlign="Center" TextAlign="Left">
|
||||
<Editor>
|
||||
|
|
|
@ -188,6 +188,7 @@ namespace FineUIPro.Web.HSSE.Manager
|
|||
if (model.Months != null)
|
||||
{
|
||||
txtReportMonths.Text = string.Format("{0:yyyy-MM}", model.Months);
|
||||
months = Convert.ToDateTime(model.Months);
|
||||
}
|
||||
if (model.StartDate != null)
|
||||
{
|
||||
|
@ -263,7 +264,7 @@ namespace FineUIPro.Web.HSSE.Manager
|
|||
{
|
||||
nbFireWorkCount.Text = PModel.FireWorkCount.ToString();
|
||||
nbBreakGroundCount.Text = PModel.BreakGroundCount.ToString();
|
||||
nbLimitedSpaceCount.Text = PModel.FireWorkCount.ToString();
|
||||
nbLimitedSpaceCount.Text = PModel.LimitedSpaceCount.ToString();
|
||||
nbElectricityCount.Text = PModel.ElectricityCount.ToString();
|
||||
nbHeightWorkCount.Text = PModel.HeightWorkCount.ToString();
|
||||
nbRadialWork.Text = PModel.RadialWork.ToString();
|
||||
|
@ -321,6 +322,9 @@ namespace FineUIPro.Web.HSSE.Manager
|
|||
DrillRecordListGrid.DataSource = drillRecordList;
|
||||
DrillRecordListGrid.DataBind();
|
||||
}
|
||||
else {
|
||||
DrillRecordListGrid.EmptyText = "<raw><div class=\"grid-empty-text\">暂无数据</div></raw>";
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 4.6.3其他应急管理工作描述
|
||||
|
@ -474,7 +478,7 @@ namespace FineUIPro.Web.HSSE.Manager
|
|||
startTime = Convert.ToDateTime(txtStartDate.Text);
|
||||
endTime = Convert.ToDateTime(txtEndDate.Text);
|
||||
|
||||
yearStartTime = Convert.ToDateTime(months.ToString("yyyy-01-01"));
|
||||
yearStartTime = Convert.ToDateTime(startTime.ToString("yyyy-01-01"));
|
||||
|
||||
if (project.StartDate != null)
|
||||
{
|
||||
|
@ -600,7 +604,7 @@ namespace FineUIPro.Web.HSSE.Manager
|
|||
monthReport.MonthReportId = MonthReportId;
|
||||
monthReport.ProjectId = this.CurrUser.LoginProjectId;
|
||||
monthReport.MonthReportCode = txtPeriod.Text;
|
||||
monthReport.Months = Funs.GetNewDateTime(Request.Params["months"]);
|
||||
monthReport.Months = months;
|
||||
monthReport.ReportMan = this.CurrUser.UserId;
|
||||
monthReport.MonthReportDate = DateTime.Now;
|
||||
|
||||
|
@ -1066,10 +1070,12 @@ namespace FineUIPro.Web.HSSE.Manager
|
|||
FirstAidDressing = Funs.GetNewInt(values.Value<string>("FirstAidDressing").ToString()),
|
||||
MedicalTreatment = Funs.GetNewInt(values.Value<string>("MedicalTreatment").ToString()),
|
||||
WorkLimitation = Funs.GetNewInt(values.Value<string>("WorkLimitation").ToString()),
|
||||
LossCount = Funs.GetNewInt(values.Value<string>("LossCount").ToString()),
|
||||
LossPerson = Funs.GetNewInt(values.Value<string>("LossPerson").ToString()),
|
||||
LossWorkTime = Funs.GetNewDecimal(values.Value<string>("LossWorkTime").ToString()),
|
||||
LossEconomy = Funs.GetNewDecimal(values.Value<string>("LossEconomy").ToString()),
|
||||
DeathPerson = Funs.GetNewInt(values.Value<string>("DeathPerson").ToString()),
|
||||
DeathCount = Funs.GetNewInt(values.Value<string>("DeathCount").ToString()),
|
||||
DeathWorkTime = Funs.GetNewDecimal(values.Value<string>("DeathWorkTime").ToString()),
|
||||
DeathEconomy = Funs.GetNewDecimal(values.Value<string>("DeathEconomy").ToString()),
|
||||
};
|
||||
|
@ -1769,6 +1775,8 @@ namespace FineUIPro.Web.HSSE.Manager
|
|||
int totalSumPersonNum = 0;//总部
|
||||
int totalSumOutPersonNum = 0;//外聘
|
||||
int totalHSEPersonNum = 0;
|
||||
var spckList = db.SitePerson_Checking.Where(x => x.IntoOutTime >= startTime
|
||||
&& x.IntoOutTime <= endTime && x.ProjectId == ProjectId && x.IntoOut == "1");
|
||||
if (units.Count() > 0)
|
||||
{
|
||||
foreach (Model.Project_ProjectUnit u in units)
|
||||
|
@ -1777,13 +1785,33 @@ namespace FineUIPro.Web.HSSE.Manager
|
|||
{
|
||||
PersonSortId = Guid.NewGuid().ToString(),
|
||||
UnitId = u.UnitId,
|
||||
SumPersonNum = BLL.PersonService.GetPersonCountByUnitId(u.UnitId, ProjectId, Convert.ToDateTime(txtEndDate.Text), false),//本部
|
||||
SumOutPersonNum = BLL.PersonService.GetPersonCountByUnitId(u.UnitId, ProjectId, Convert.ToDateTime(txtEndDate.Text), true),//外聘
|
||||
HSEPersonNum = BLL.PersonService.GetHSEPersonCountByUnitId(u.UnitId, ProjectId, Convert.ToDateTime(txtEndDate.Text)),
|
||||
HSEPersonNum = 0,
|
||||
ContractRange = u.ContractRange
|
||||
};
|
||||
//本部本月人数,本年考勤人数除当前月份,取平均数
|
||||
//年度
|
||||
var yearList = spckList.Where(x => x.UnitId == u.UnitId).ToList().Select(x => new hseDayItem()
|
||||
{
|
||||
IdentityCard = x.IdentityCard,
|
||||
IntoOutTime = getShortTime(x.IntoOutTime)
|
||||
}).GroupBy(x => new { x.IdentityCard})
|
||||
.ToList();
|
||||
|
||||
personSort.SumPersonNum = yearList.Count();
|
||||
|
||||
//五环
|
||||
if (u.UnitId == Const.UnitId_CWCEC)
|
||||
{
|
||||
personSort.SumOutPersonNum = 0;
|
||||
}
|
||||
else {
|
||||
personSort.SumOutPersonNum = 0;
|
||||
}
|
||||
////本部人员
|
||||
//SumPersonNum = BLL.PersonService.GetPersonCountByUnitId(u.UnitId, ProjectId, Convert.ToDateTime(txtEndDate.Text), false),//本部
|
||||
// SumOutPersonNum = 0,//外聘
|
||||
personSorts.Add(personSort);
|
||||
totalSumPersonNum += Convert.ToInt32(personSort.SumPersonNum);
|
||||
totalSumPersonNum += Convert.ToInt32(personSort.SumPersonNum)+ Convert.ToInt32(personSort.SumOutPersonNum);
|
||||
totalSumOutPersonNum += Convert.ToInt32(personSort.SumOutPersonNum);
|
||||
totalHSEPersonNum += Convert.ToInt32(personSort.HSEPersonNum);
|
||||
}
|
||||
|
@ -1795,7 +1823,7 @@ namespace FineUIPro.Web.HSSE.Manager
|
|||
JObject summary = new JObject();
|
||||
summary.Add("UnitId", "合计:");
|
||||
summary.Add("SumPersonNum", totalSumPersonNum);
|
||||
summary.Add("SumOutPersonNum", totalSumOutPersonNum);
|
||||
//summary.Add("SumOutPersonNum", totalSumOutPersonNum);
|
||||
summary.Add("HSEPersonNum", totalHSEPersonNum);
|
||||
this.gvPersonSort.SummaryData = summary;
|
||||
}
|
||||
|
@ -1836,8 +1864,8 @@ namespace FineUIPro.Web.HSSE.Manager
|
|||
{
|
||||
JObject summary = new JObject();
|
||||
summary.Add("UnitId", "合计:");
|
||||
summary.Add("SumPersonNum", (from x in personSorts select x.SumPersonNum ?? 0).Sum());
|
||||
summary.Add("SumOutPersonNum", (from x in personSorts select x.SumOutPersonNum ?? 0).Sum());
|
||||
summary.Add("SumPersonNum", (from x in personSorts select x.SumPersonNum ?? 0).Sum()+ (from x in personSorts select x.SumOutPersonNum ?? 0).Sum());
|
||||
//summary.Add("SumOutPersonNum", (from x in personSorts select x.SumOutPersonNum ?? 0).Sum());
|
||||
summary.Add("HSEPersonNum", (from x in personSorts select x.HSEPersonNum ?? 0).Sum());
|
||||
this.gvPersonSort.SummaryData = summary;
|
||||
}
|
||||
|
@ -1854,169 +1882,104 @@ namespace FineUIPro.Web.HSSE.Manager
|
|||
#endregion
|
||||
|
||||
#region 3.本月项目现场HSE人工日统计
|
||||
public class hseDayItem {
|
||||
public string IdentityCard { get; set; }
|
||||
|
||||
public string IntoOutTime { get; set; }
|
||||
|
||||
public string UnitId { get; set; }
|
||||
}
|
||||
|
||||
public string getShortTime(DateTime? a) {
|
||||
return Convert.ToDateTime(a).ToString("yyyy-MM-dd");
|
||||
}
|
||||
|
||||
private void getMonthReportCHSEDay()
|
||||
{
|
||||
//数据了太大,查起来有点问题。
|
||||
|
||||
//var spckList = db.SitePerson_Checking.Where(x => x.ProjectId == ProjectId && x.IntoOut == "1").Select(x=>new {
|
||||
// IntoOutTime=x.IntoOutTime,
|
||||
// IdentityCard=x.IdentityCard,
|
||||
// UnitId=x.UnitId
|
||||
//});
|
||||
//本月项目现场HSE人工日统计
|
||||
Model.MonthReportCHSEDay hseDay = new Model.MonthReportCHSEDay
|
||||
{
|
||||
MonthHSEDay = (endTime - startTime).Days + 1
|
||||
};
|
||||
Model.Manager_MonthReportC mr = BLL.MonthReportCService.GetLastMonthReportByDate(endTime, this.ProjectId);
|
||||
if (mr != null)
|
||||
{
|
||||
if (mr.SumHSEDay != 0)
|
||||
{
|
||||
hseDay.SumHSEDay = (mr.SumHSEDay ?? 0) + hseDay.MonthHSEDay;
|
||||
}
|
||||
else
|
||||
{
|
||||
hseDay.SumHSEDay = hseDay.MonthHSEDay;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
hseDay.SumHSEDay = hseDay.MonthHSEDay;
|
||||
}
|
||||
//累计安全工作天数(当前日期-项目开始日期)
|
||||
hseDay.SumHSEDay = (endTime - projectStartTime).Days;
|
||||
|
||||
int? monthHSEWorkDay = 0;
|
||||
int? yearHSEWorkDay = 0;
|
||||
int? sumHSEWorkDay = 0;
|
||||
decimal? hSEManhours = 0;
|
||||
decimal? sumHseManhours = 0;
|
||||
decimal? SubcontractManHours = 0;
|
||||
////本月HSE人工日、年度累计HSE人工日、总累计HSE人工日,考勤中取
|
||||
////本月
|
||||
//var list = spckList.Where(x => x.IntoOutTime >= startTime
|
||||
//&& x.IntoOutTime <= endTime).ToList().Select(x => new hseDayItem()
|
||||
//{
|
||||
// IdentityCard = x.IdentityCard,
|
||||
// IntoOutTime = getShortTime(x.IntoOutTime)
|
||||
//}).GroupBy(x => new { x.IdentityCard, x.IntoOutTime })
|
||||
// .ToList();
|
||||
|
||||
decimal? YearHSEWorkDay = 0;
|
||||
//年度安全人工时
|
||||
var getProjectMonthReport = from x in db.SitePerson_MonthReport where x.ProjectId == ProjectId select x;
|
||||
if (getProjectMonthReport.Count() > 0)
|
||||
{
|
||||
////人工时月报明细
|
||||
var getMonthReportDetail = from x in db.SitePerson_MonthReportDetail
|
||||
join y in getProjectMonthReport on x.MonthReportId equals y.MonthReportId
|
||||
select x;
|
||||
var yearMonthReport = from x in getProjectMonthReport
|
||||
where x.CompileDate.Value.Year == months.Year
|
||||
select x;
|
||||
if (yearMonthReport.Count() > 0)
|
||||
{
|
||||
foreach (var item in yearMonthReport)
|
||||
{
|
||||
////年度累计安全人工时
|
||||
YearHSEWorkDay += getMonthReportDetail.Where(x => x.MonthReportId ==
|
||||
item.MonthReportId).Sum(x => x.PersonWorkTime) ?? 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
YearHSEWorkDay = 0;
|
||||
}
|
||||
hseDay.YearHSEWorkDay = Convert.ToInt32(YearHSEWorkDay);
|
||||
var monthReport = BLL.Funs.DB.SitePerson_MonthReport.FirstOrDefault(x => x.CompileDate == months && x.ProjectId == ProjectId); //当月人工时月报
|
||||
if (monthReport != null)
|
||||
{
|
||||
monthHSEWorkDay = Convert.ToInt32((from x in Funs.DB.SitePerson_MonthReportDetail
|
||||
where x.MonthReportId == monthReport.MonthReportId
|
||||
select x.RealPersonNum ?? 0).Sum());
|
||||
hSEManhours = (from x in Funs.DB.SitePerson_MonthReportDetail
|
||||
join z in Funs.DB.Project_ProjectUnit
|
||||
on x.UnitId equals z.UnitId
|
||||
where z.UnitType == "1" && z.ProjectId == this.CurrUser.LoginProjectId && x.MonthReportId == monthReport.MonthReportId //总包
|
||||
select x.PersonWorkTime ?? 0).Sum();
|
||||
var q = (from x in Funs.DB.SitePerson_MonthReportDetail
|
||||
join z in Funs.DB.Project_ProjectUnit
|
||||
on x.UnitId equals z.UnitId
|
||||
where z.UnitType == "2" && z.ProjectId == this.CurrUser.LoginProjectId && x.MonthReportId == monthReport.MonthReportId //分包
|
||||
select x);
|
||||
foreach (var item in q)
|
||||
{
|
||||
SubcontractManHours += item.PersonWorkTime ?? 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
monthHSEWorkDay = 0;
|
||||
hSEManhours = 0;
|
||||
SubcontractManHours = 0;
|
||||
}
|
||||
//年度人工日
|
||||
if (months.Month == 1)
|
||||
{
|
||||
yearHSEWorkDay = monthHSEWorkDay;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (mr != null)
|
||||
{
|
||||
if (mr.YearHSEWorkDay != null)
|
||||
{
|
||||
yearHSEWorkDay = (mr.YearHSEWorkDay ?? 0) + monthHSEWorkDay;
|
||||
}
|
||||
else
|
||||
{
|
||||
yearHSEWorkDay = monthHSEWorkDay;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
yearHSEWorkDay = monthHSEWorkDay;
|
||||
}
|
||||
}
|
||||
if (mr != null)
|
||||
{
|
||||
if (mr.SumHSEWorkDay != 0)
|
||||
{
|
||||
sumHSEWorkDay = (mr.SumHSEWorkDay ?? 0) + monthHSEWorkDay;
|
||||
}
|
||||
else
|
||||
{
|
||||
sumHSEWorkDay = monthHSEWorkDay;
|
||||
}
|
||||
if (mr.TotalHseManhours != 0)
|
||||
{
|
||||
sumHseManhours = (mr.TotalHseManhours ?? 0) + hSEManhours + SubcontractManHours;
|
||||
}
|
||||
else
|
||||
{
|
||||
sumHseManhours = hSEManhours + SubcontractManHours;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sumHSEWorkDay = monthHSEWorkDay;
|
||||
sumHseManhours = hSEManhours + SubcontractManHours;
|
||||
}
|
||||
hseDay.MonthHSEWorkDay = monthHSEWorkDay ?? 0;
|
||||
hseDay.YearHSEWorkDay = yearHSEWorkDay ?? 0;
|
||||
hseDay.SumHSEWorkDay = sumHSEWorkDay ?? 0;
|
||||
if (hSEManhours.ToString().Contains("."))
|
||||
{
|
||||
hseDay.HseManhours = int.Parse(hSEManhours.ToString().Substring(0, hSEManhours.ToString().LastIndexOf(".")));
|
||||
}
|
||||
else
|
||||
{
|
||||
hseDay.HseManhours = int.Parse(hSEManhours.ToString());
|
||||
}
|
||||
if (SubcontractManHours.ToString().Contains("."))
|
||||
{
|
||||
hseDay.SubcontractManHours = int.Parse(SubcontractManHours.ToString().Substring(0, SubcontractManHours.ToString().LastIndexOf(".")));
|
||||
}
|
||||
else
|
||||
{
|
||||
hseDay.SubcontractManHours = int.Parse(SubcontractManHours.ToString());
|
||||
}
|
||||
if (sumHseManhours.ToString().Contains("."))
|
||||
{
|
||||
hseDay.TotalHseManhours = int.Parse(sumHseManhours.ToString().Substring(0, sumHseManhours.ToString().LastIndexOf(".")));
|
||||
}
|
||||
else
|
||||
{
|
||||
hseDay.TotalHseManhours = int.Parse(sumHseManhours.ToString());
|
||||
}
|
||||
List<Model.MonthReportCHSEDay> list = new List<Model.MonthReportCHSEDay>();
|
||||
list.Add(hseDay);
|
||||
this.gvHSEDay.DataSource = list;
|
||||
//本月HSE人工日
|
||||
hseDay.MonthHSEWorkDay = SQLHelper.RunProcGetHsseKq(ProjectId, startTime, endTime, "0");
|
||||
|
||||
//list.Count();
|
||||
//本月安全人工时(五环)
|
||||
//hseDay.HseManhours = spckList.Where(x => x.IntoOutTime >= startTime
|
||||
//&& x.IntoOutTime <= endTime && x.UnitId == Const.UnitId_CWCEC).ToList().Select(x => new hseDayItem()
|
||||
//{
|
||||
// IdentityCard = x.IdentityCard,
|
||||
// IntoOutTime = getShortTime(x.IntoOutTime)
|
||||
//}).GroupBy(x => new { x.IdentityCard, x.IntoOutTime })
|
||||
// .ToList().Count() * 8;
|
||||
hseDay.HseManhours = SQLHelper.RunProcGetHsseKq(ProjectId, startTime, endTime, "3");
|
||||
//本月安全人工时(分包商)
|
||||
hseDay.SubcontractManHours = SQLHelper.RunProcGetHsseKq(ProjectId, startTime, endTime, "1");
|
||||
|
||||
// spckList.Where(x => x.IntoOutTime >= startTime
|
||||
//&& x.IntoOutTime <= endTime && x.UnitId != Const.UnitId_CWCEC).ToList().Select(x => new hseDayItem()
|
||||
//{
|
||||
// IdentityCard = x.IdentityCard,
|
||||
// IntoOutTime = getShortTime(x.IntoOutTime)
|
||||
//}).GroupBy(x => new { x.IdentityCard, x.IntoOutTime })
|
||||
// .ToList().Count() * 8;
|
||||
|
||||
//年度
|
||||
//var yearList = spckList.Where(x => x.IntoOutTime >= yearStartTime
|
||||
// && x.IntoOutTime <= endTime).ToList().Select(x => new hseDayItem()
|
||||
// {
|
||||
// IdentityCard = x.IdentityCard,
|
||||
// IntoOutTime = getShortTime(x.IntoOutTime)
|
||||
// }).GroupBy(x => new { x.IdentityCard, x.IntoOutTime })
|
||||
// .ToList();
|
||||
|
||||
|
||||
//年度累计人工日
|
||||
hseDay.YearHSEWorkDay = SQLHelper.RunProcGetHsseKq(ProjectId, yearStartTime, endTime, "0"); ;
|
||||
//yearList.Count;
|
||||
//年度累计HSE人工时
|
||||
hseDay.TotalHseManhoursYear = hseDay.YearHSEWorkDay*8;
|
||||
//yearList.Count * 8;
|
||||
|
||||
// // //项目累计
|
||||
// var pList = spckList.Where(x => x.IntoOutTime >= projectStartTime
|
||||
//&& x.IntoOutTime <= endTime).ToList().Select(x => new hseDayItem()
|
||||
//{
|
||||
// IdentityCard = x.IdentityCard,
|
||||
// IntoOutTime = getShortTime(x.IntoOutTime)
|
||||
//}).GroupBy(x => new { x.IdentityCard, x.IntoOutTime })
|
||||
// .ToList();
|
||||
|
||||
hseDay.SumHSEWorkDay = SQLHelper.RunProcGetHsseKq(ProjectId, projectStartTime, endTime, "0");
|
||||
//pList.Count;
|
||||
|
||||
hseDay.TotalHseManhours = hseDay.SumHSEWorkDay*8;
|
||||
//pList.Count * 8;
|
||||
|
||||
List<Model.MonthReportCHSEDay> listCHSEDay = new List<Model.MonthReportCHSEDay>();
|
||||
listCHSEDay.Add(hseDay);
|
||||
this.gvHSEDay.DataSource = listCHSEDay;
|
||||
this.gvHSEDay.DataBind();
|
||||
}
|
||||
#endregion
|
||||
|
@ -2029,9 +1992,12 @@ namespace FineUIPro.Web.HSSE.Manager
|
|||
{
|
||||
trainSorts.Clear();
|
||||
var TotalPersonNum = 0;
|
||||
var list = db.Base_TrainType.ToList();
|
||||
var list = db.Base_TrainType.ToList().OrderBy(x=>x.TrainTypeCode);
|
||||
var listTrain = BLL.EduTrain_TrainRecordService.GetTrainingsByTrainDate(startTime, endTime, this.ProjectId);
|
||||
var listAllTrain = BLL.EduTrain_TrainRecordService.GetTrainingsByTrainDate(endTime, this.ProjectId);
|
||||
|
||||
var listBosheng = db.Bo_Sheng_Train.Where(x => x.ProjectId == ProjectId && x.TrainStartDate >= startTime && x.TrainStartDate <= endTime).ToList();
|
||||
var listAllBosheng = db.Bo_Sheng_Train.Where(x => x.ProjectId == ProjectId && x.TrainStartDate <= endTime).ToList();
|
||||
foreach (var item in list)
|
||||
{
|
||||
int i = 0;
|
||||
|
@ -2051,6 +2017,34 @@ namespace FineUIPro.Web.HSSE.Manager
|
|||
trainSort.TeachHour = 0;
|
||||
trainSort.PersonNum = 0;
|
||||
}
|
||||
|
||||
if (listBosheng.Count> 0)
|
||||
{
|
||||
//入场
|
||||
if (item.TrainTypeId == "dfb6a37e-4412-4ba9-ad59-3bc505bc21f7")
|
||||
{
|
||||
trainSort.PersonNum += listBosheng.Where(x => x.TrainType.Contains("入场")).Sum(x=>x.PersonCount);
|
||||
Func<string, decimal, decimal> funDelegate = CustomCount;
|
||||
decimal numSum = 0;
|
||||
trainSort.TeachHour += listBosheng.Where(x => x.TrainType.Contains("入场")).Sum(x => funDelegate(x.TrainPeriod, numSum));
|
||||
}
|
||||
else if (item.TrainTypeId == "c1a513bb-a547-45b0-944d-b0dd88f06f82")
|
||||
{
|
||||
//其他
|
||||
trainSort.PersonNum += listBosheng.Where(x => x.TrainType.Contains("其他")).Sum(x => x.PersonCount);
|
||||
Func<string, decimal, decimal> funDelegate = CustomCount;
|
||||
decimal numSum = 0;
|
||||
trainSort.TeachHour += listBosheng.Where(x => x.TrainType.Contains("其他")).Sum(x => funDelegate(x.TrainPeriod, numSum));
|
||||
}
|
||||
else {
|
||||
//专项
|
||||
trainSort.PersonNum += listBosheng.Where(x => x.TrainType.Contains("专项")).Sum(x => x.PersonCount);
|
||||
Func<string, decimal, decimal> funDelegate = CustomCount;
|
||||
decimal numSum = 0;
|
||||
trainSort.TeachHour += listBosheng.Where(x => x.TrainType.Contains("专项")).Sum(x => funDelegate(x.TrainPeriod, numSum));
|
||||
}
|
||||
}
|
||||
|
||||
if (listAllTrain.Count > 0)
|
||||
{
|
||||
trainSort.TotalPersonNum = listAllTrain.Where(x => x.TrainTypeId == item.TrainTypeId).Sum(x => x.TrainPersonNum);
|
||||
|
@ -2060,6 +2054,31 @@ namespace FineUIPro.Web.HSSE.Manager
|
|||
{
|
||||
trainSort.TotalPersonNum = 0;
|
||||
}
|
||||
if (listAllBosheng.Count>0)
|
||||
{
|
||||
//入场
|
||||
if (item.TrainTypeId == "dfb6a37e-4412-4ba9-ad59-3bc505bc21f7")
|
||||
{
|
||||
trainSort.TotalPersonNum += listAllBosheng.Where(x => x.TrainType.Contains("入场")).Sum(x => x.PersonCount);
|
||||
TotalPersonNum+= Convert.ToInt32(trainSort.TotalPersonNum);
|
||||
}
|
||||
else if (item.TrainTypeId == "c1a513bb-a547-45b0-944d-b0dd88f06f82")
|
||||
{
|
||||
//其他
|
||||
trainSort.TotalPersonNum += listAllBosheng.Where(x => x.TrainType.Contains("其他")).Sum(x => x.PersonCount);
|
||||
TotalPersonNum += Convert.ToInt32(trainSort.TotalPersonNum);
|
||||
}
|
||||
else
|
||||
{
|
||||
//专项
|
||||
trainSort.TotalPersonNum += listAllBosheng.Where(x => x.TrainType.Contains("专项")).Sum(x => x.PersonCount);
|
||||
TotalPersonNum += Convert.ToInt32(trainSort.TotalPersonNum);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//博晟工具箱中的数据
|
||||
|
||||
i++;
|
||||
trainSorts.Add(trainSort);
|
||||
}
|
||||
|
@ -2079,9 +2098,16 @@ namespace FineUIPro.Web.HSSE.Manager
|
|||
}
|
||||
#endregion
|
||||
|
||||
public static decimal CustomCount(string strNum, decimal Sum)
|
||||
{
|
||||
Sum += Convert.ToDecimal(strNum);
|
||||
return Sum;
|
||||
}
|
||||
|
||||
#region 4.2现场HSE会议及检查统计
|
||||
private void GetCheckSort()
|
||||
{
|
||||
var hselogList = db.Manager_HSSELog.Where(x => x.ProjectId == ProjectId).ToList();
|
||||
int i = 0;
|
||||
|
||||
#region HSE会议 本月开展次数
|
||||
|
@ -2131,14 +2157,15 @@ namespace FineUIPro.Web.HSSE.Manager
|
|||
};
|
||||
checkSorts.Add(checkSort2);
|
||||
i++;
|
||||
//日巡检取HSE日志检查次数
|
||||
Model.Manager_CheckSortC checkSort3 = new Model.Manager_CheckSortC
|
||||
{
|
||||
CheckSortId = SQLHelper.GetNewID(typeof(Model.Manager_CheckSortC)),
|
||||
SortIndex = i,
|
||||
CheckType = "日巡检",
|
||||
CheckNumber = BLL.Check_CheckDayService.GetCountByCheckTime(startTime, endTime, this.ProjectId),
|
||||
YearCheckNum = BLL.Check_CheckDayService.GetCountByCheckTime(yearStartTime, endTime, this.ProjectId),
|
||||
TotalCheckNum = BLL.Check_CheckDayService.GetCountByCheckTime(projectStartTime, endTime, this.ProjectId)
|
||||
CheckNumber = hselogList.Where(x=>x.CompileDate>=startTime && x.CompileDate<=endTime).Sum(x=>x.Num21),
|
||||
YearCheckNum = hselogList.Where(x => x.CompileDate >= yearStartTime && x.CompileDate <= endTime).Sum(x => x.Num21),
|
||||
TotalCheckNum = hselogList.Where(x => x.CompileDate >= projectStartTime && x.CompileDate <= endTime).Sum(x => x.Num21)
|
||||
};
|
||||
checkSorts.Add(checkSort3);
|
||||
i++;
|
||||
|
@ -2293,7 +2320,7 @@ namespace FineUIPro.Web.HSSE.Manager
|
|||
var YhzgdList = from x in db.Check_RectifyNoticesItem
|
||||
join y in db.Check_RectifyNotices on x.RectifyNoticesId equals y.RectifyNoticesId
|
||||
where y.ProjectId == ProjectId && y.CheckedDate >= startTime && y.CheckedDate <= endTime
|
||||
select new { y.UnitId, x.HiddenHazardType, y.States };
|
||||
select new { y.UnitId, x.HiddenHazardType, y.States,y.CompleteDate,x.LimitTime };
|
||||
|
||||
int yhMonthSum = 0, yhYearSum = 0;
|
||||
var list = new List<Model.Manager_HiddenDanger>();
|
||||
|
@ -2310,32 +2337,41 @@ namespace FineUIPro.Web.HSSE.Manager
|
|||
};
|
||||
//HSE巡检(一般和重大)
|
||||
//所有数据
|
||||
var Commonly1 = HseList.Where(x => x.ResponsibleUnit == u.UnitId && x.Type == 0 && x.Risk_Level == "一般" && x.States == "2").Count();
|
||||
var MajorNum1 = HseList.Where(x => x.ResponsibleUnit == u.UnitId && x.Type == 0 && x.Risk_Level == "重大" && x.States == "2").Count();
|
||||
//总数,已整改
|
||||
var Commonly1 = HseList.Where(x => x.ResponsibleUnit == u.UnitId && x.Type == 0 && (x.Risk_Level == "一般" || x.Risk_Level==null || x.Risk_Level == "") && x.States == "3").Count();
|
||||
var MajorNum1 = HseList.Where(x => x.ResponsibleUnit == u.UnitId && x.Type == 0 && x.Risk_Level == "重大" && x.States == "3").Count();
|
||||
|
||||
//总数
|
||||
var Sum1 = HseList.Where(x => x.ResponsibleUnit == u.UnitId && x.Type == 0).Count();
|
||||
var Yzg1 = HseList.Where(x => x.ResponsibleUnit == u.UnitId && x.Type == 0 && x.States == "2").Count();
|
||||
//已关闭并且在期限内的
|
||||
var Yzg1 = HseList.Where(x => x.ResponsibleUnit == u.UnitId && x.Type == 0 && x.States == "2"
|
||||
&& x.RectificationTime<= x.RectificationPeriod ).Count();
|
||||
|
||||
//专项检查(一般和重大)
|
||||
var Commonly2 = CheckSpecialList.Where(x => x.UnitId == u.UnitId && x.HiddenHazardType == "1" && x.CompleteStatus == true).Count();
|
||||
var Commonly2 = CheckSpecialList.Where(x => x.UnitId == u.UnitId && (x.HiddenHazardType == "1"|| x.HiddenHazardType==null || x.HiddenHazardType == "") && x.CompleteStatus == true).Count();
|
||||
var MajorNum2 = CheckSpecialList.Where(x => x.UnitId == u.UnitId && x.HiddenHazardType == "3" && x.CompleteStatus == true).Count();
|
||||
//总数,已整改
|
||||
var Sum2 = CheckSpecialList.Where(x => x.UnitId == u.UnitId).Count();
|
||||
var Yzg2 = CheckSpecialList.Where(x => x.UnitId == u.UnitId && x.CompleteStatus == true).Count();
|
||||
//已整改,在期限内的
|
||||
var Yzg2 = CheckSpecialList.Where(x => x.UnitId == u.UnitId && x.CompleteStatus == true
|
||||
&& x.CompletedDate<=x.Rectification_Date).Count();
|
||||
|
||||
//综合检查(一般和重大)
|
||||
var Commonly3 = CheckColligationList.Where(x => x.UnitId == u.UnitId && x.HiddenHazardType == "一般" && x.CompleteStatus == true).Count();
|
||||
var Commonly3 = CheckColligationList.Where(x => x.UnitId == u.UnitId && (x.HiddenHazardType == "一般" || x.HiddenHazardType==null || x.HiddenHazardType == "") && x.CompleteStatus == true).Count();
|
||||
var MajorNum3 = CheckColligationList.Where(x => x.UnitId == u.UnitId && x.HiddenHazardType == "重大" && x.CompleteStatus == true).Count();
|
||||
//总数,已整改
|
||||
var Sum3 = CheckColligationList.Where(x => x.UnitId == u.UnitId).Count();
|
||||
var Yzg3 = CheckColligationList.Where(x => x.UnitId == u.UnitId && x.CompleteStatus == true).Count();
|
||||
//已整改
|
||||
var Yzg3 = CheckColligationList.Where(x => x.UnitId == u.UnitId && x.CompleteStatus == true && x.HandleStep=="5"
|
||||
&& x.CompletedDate<= x.LimitedDate).Count();
|
||||
|
||||
//隐患整改(一般和重大)
|
||||
var Commonly4 = YhzgdList.Where(x => x.UnitId == u.UnitId && x.HiddenHazardType == "一般" && x.States == "5").Count();
|
||||
var Commonly4 = YhzgdList.Where(x => x.UnitId == u.UnitId && (x.HiddenHazardType == "一般"
|
||||
|| x.HiddenHazardType == null || x.HiddenHazardType == "") && x.States == "5").Count();
|
||||
var MajorNum4 = YhzgdList.Where(x => x.UnitId == u.UnitId && x.HiddenHazardType == "重大" && x.States == "5").Count();
|
||||
//总数,已整改
|
||||
var Sum4 = YhzgdList.Where(x => x.UnitId == u.UnitId).Count();
|
||||
var Yzg4 = YhzgdList.Where(x => x.UnitId == u.UnitId && x.States == "5").Count();
|
||||
var Yzg4 = YhzgdList.Where(x => x.UnitId == u.UnitId && x.States == "5"
|
||||
&& x.CompleteDate<= x.LimitTime).Count();
|
||||
|
||||
|
||||
model.CommonlyNum = Commonly1 + Commonly2 + Commonly3 + Commonly4;
|
||||
|
@ -2350,7 +2386,7 @@ namespace FineUIPro.Web.HSSE.Manager
|
|||
{
|
||||
model.ReRate = "0";
|
||||
}
|
||||
yhMonthSum += Sum1 + Sum2 + Sum3 + Sum4;
|
||||
yhMonthSum += Convert.ToInt32(model.CommonlyNum) + Convert.ToInt32(model.MajorNum);
|
||||
|
||||
list.Add(model);
|
||||
i++;
|
||||
|
@ -2364,21 +2400,25 @@ namespace FineUIPro.Web.HSSE.Manager
|
|||
//安全巡检list
|
||||
var HseListYear = (from x in Funs.DB.View_Hazard_HazardRegister
|
||||
where x.ProblemTypes == "1" && x.ProjectId == ProjectId && x.CheckTime >= yearStartTime && x.CheckTime <= endTime
|
||||
&& x.States == "3"
|
||||
select x).ToList().Count;
|
||||
//专项检查
|
||||
var CheckSpecialListYear = (from x in db.Check_CheckSpecialDetail
|
||||
join y in db.Check_CheckSpecial on x.CheckSpecialId equals y.CheckSpecialId
|
||||
where y.ProjectId == ProjectId && y.CheckTime >= yearStartTime && y.CheckTime <= endTime
|
||||
&& x.CompleteStatus == true
|
||||
select x).ToList().Count;
|
||||
//综合检查
|
||||
var CheckColligationListYear = (from x in db.Check_CheckColligationDetail
|
||||
join y in db.Check_CheckColligation on x.CheckColligationId equals y.CheckColligationId
|
||||
where y.ProjectId == ProjectId && y.CheckTime >= yearStartTime && y.CheckTime <= endTime
|
||||
&& x.CompleteStatus == true
|
||||
select x).ToList().Count;
|
||||
//隐患整改单
|
||||
var YhzgdListYear = (from x in db.Check_RectifyNoticesItem
|
||||
join y in db.Check_RectifyNotices on x.RectifyNoticesId equals y.RectifyNoticesId
|
||||
where y.ProjectId == ProjectId && y.CheckedDate >= yearStartTime && y.CheckedDate <= endTime
|
||||
&& y.States == "5"
|
||||
select new { y.UnitId, x.HiddenHazardType, y.States }).ToList().Count;
|
||||
txtYearHdangerCount.Text = (HseListYear + CheckSpecialListYear + CheckColligationListYear + YhzgdListYear).ToString();
|
||||
#endregion
|
||||
|
@ -2572,9 +2612,15 @@ namespace FineUIPro.Web.HSSE.Manager
|
|||
};
|
||||
drillRecordList.Add(model);
|
||||
}
|
||||
if (drillRecordList.Count == 0)
|
||||
{
|
||||
DrillRecordListGrid.EmptyText = "<raw><div class=\"grid-empty-text\">暂无数据</div></raw>";
|
||||
}
|
||||
else {
|
||||
this.DrillRecordListGrid.DataSource = drillRecordList;
|
||||
this.DrillRecordListGrid.DataBind();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 4.7 HSE奖励与处罚
|
||||
|
@ -2981,9 +3027,11 @@ namespace FineUIPro.Web.HSSE.Manager
|
|||
FirstAidDressing = 0, //
|
||||
MedicalTreatment = 0,//
|
||||
WorkLimitation = 0,//
|
||||
LossCount=0,
|
||||
LossPerson = (from x in reports where x.UnitId == Const.UnitId_CWCEC select x.PeopleNum).Sum(),
|
||||
LossWorkTime = (from x in reports where x.UnitId == Const.UnitId_CWCEC select x.WorkingHoursLoss).Sum(),
|
||||
LossEconomy = (from x in reports where x.UnitId == Const.UnitId_CWCEC select x.EconomicLoss).Sum() + (from x in reports where x.UnitId == Const.UnitId_CWCEC select x.EconomicOtherLoss).Sum(),
|
||||
DeathCount=0,
|
||||
DeathPerson = (from x in deathReports where x.UnitId == Const.UnitId_CWCEC select x.PeopleNum).Sum(),
|
||||
DeathWorkTime = (from x in deathReports where x.UnitId == Const.UnitId_CWCEC select x.WorkingHoursLoss).Sum(),
|
||||
DeathEconomy = (from x in deathReports where x.UnitId == Const.UnitId_CWCEC select x.EconomicLoss).Sum() + (from x in deathReports where x.UnitId == Const.UnitId_CWCEC select x.EconomicOtherLoss).Sum(),
|
||||
|
@ -2997,6 +3045,8 @@ namespace FineUIPro.Web.HSSE.Manager
|
|||
FirstAidDressing = 0, //
|
||||
MedicalTreatment = 0,//
|
||||
WorkLimitation = 0,//
|
||||
LossCount = 0,
|
||||
DeathCount = 0,
|
||||
LossPerson = (from x in reports
|
||||
join y in Funs.DB.Project_ProjectUnit on x.UnitId equals y.UnitId
|
||||
where y.UnitType == Const.ProjectUnitType_2
|
||||
|
@ -3044,7 +3094,7 @@ namespace FineUIPro.Web.HSSE.Manager
|
|||
JObject summary = new JObject();
|
||||
|
||||
int TotalAttemptedIncidents = 0, TotalFirstAidDressing = 0, TotalMedicalTreatment = 0, TotalWorkLimitation = 0, TotalLossPerson = 0, TotalDeathPerson = 0;
|
||||
decimal TotalLossWorkTime = 0, TotalLossEconomy = 0, TotalDeathWorkTime = 0, TotalDeathEconomy = 0;
|
||||
decimal TotalLossWorkTime = 0, TotalLossEconomy = 0, TotalDeathWorkTime = 0, TotalDeathEconomy = 0 ,TotalLossCount=0,TotalDeathCount=0;
|
||||
foreach (JObject mergedRow in gvInjuryAccident.GetMergedData())
|
||||
{
|
||||
JObject values = mergedRow.Value<JObject>("values");
|
||||
|
@ -3084,15 +3134,25 @@ namespace FineUIPro.Web.HSSE.Manager
|
|||
{
|
||||
TotalDeathEconomy += values.Value<decimal>("DeathEconomy");
|
||||
}
|
||||
if (!string.IsNullOrEmpty(values["LossCount"].ToString()))
|
||||
{
|
||||
TotalLossCount += values.Value<decimal>("LossCount");
|
||||
}
|
||||
if (!string.IsNullOrEmpty(values["DeathCount"].ToString()))
|
||||
{
|
||||
TotalDeathCount += values.Value<decimal>("DeathCount");
|
||||
}
|
||||
}
|
||||
summary.Add("UnitName", "项目合计");
|
||||
summary.Add("AttemptedIncidents", TotalAttemptedIncidents.ToString("F2"));
|
||||
summary.Add("FirstAidDressing", TotalFirstAidDressing.ToString("F2"));
|
||||
summary.Add("MedicalTreatment", TotalMedicalTreatment.ToString("F2"));
|
||||
summary.Add("WorkLimitation", TotalWorkLimitation.ToString("F2"));
|
||||
summary.Add("LossCount", TotalLossCount.ToString("F2"));
|
||||
summary.Add("LossPerson", TotalLossPerson.ToString("F2"));
|
||||
summary.Add("LossWorkTime", TotalLossWorkTime.ToString("F2"));
|
||||
summary.Add("LossEconomy", TotalLossEconomy.ToString("F2"));
|
||||
summary.Add("DeathCount", TotalDeathCount.ToString("F2"));
|
||||
summary.Add("DeathPerson", TotalDeathPerson.ToString("F2"));
|
||||
summary.Add("DeathWorkTime", TotalDeathWorkTime.ToString("F2"));
|
||||
summary.Add("DeathEconomy", TotalDeathEconomy.ToString("F2"));
|
||||
|
|
|
@ -1292,6 +1292,15 @@ namespace FineUIPro.Web.HSSE.Manager
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox NumberBox20;
|
||||
|
||||
/// <summary>
|
||||
/// NumberBox27 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox NumberBox27;
|
||||
|
||||
/// <summary>
|
||||
/// NumberBox21 控件。
|
||||
/// </summary>
|
||||
|
@ -1319,6 +1328,15 @@ namespace FineUIPro.Web.HSSE.Manager
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox NumberBox23;
|
||||
|
||||
/// <summary>
|
||||
/// NumberBox28 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox NumberBox28;
|
||||
|
||||
/// <summary>
|
||||
/// NumberBox24 控件。
|
||||
/// </summary>
|
||||
|
|
|
@ -580,7 +580,7 @@ namespace FineUIPro.Web.HSSE.Manager
|
|||
bkmark = doc.Range.Bookmarks["createdate"];
|
||||
if (bkmark != null)
|
||||
{
|
||||
//bkmark.Text = weekModel.CreateDate.ToString().Split(' ')[0].Replace('/', '.');
|
||||
bkmark.Text = model.EndDate.ToString().Split(' ')[0].Replace('/', '.');
|
||||
}
|
||||
|
||||
bkmark = doc.Range.Bookmarks["projectname"];
|
||||
|
@ -616,10 +616,10 @@ namespace FineUIPro.Web.HSSE.Manager
|
|||
}
|
||||
|
||||
bkmark = doc.Range.Bookmarks["fromcode"];
|
||||
//fromcode,项目号-RM-PQM-顺序号
|
||||
//fromcode,项目号-RM-HSE-顺序号
|
||||
if (bkmark != null)
|
||||
{
|
||||
bkmark.Text = pModel.ProjectCode + "-RM-PQM-" + model.MonthReportCode;
|
||||
bkmark.Text = pModel.ProjectCode + "-RM-HSE-" + model.MonthReportCode;
|
||||
}
|
||||
#endregion
|
||||
#region 1.项目概况
|
||||
|
@ -720,8 +720,15 @@ namespace FineUIPro.Web.HSSE.Manager
|
|||
//创建行
|
||||
Row row = new Row(doc);
|
||||
row.Cells.Add(CreateCell(ConvertUnitName(item.UnitId), doc, table.Rows[1].Cells[0].CellFormat.Width, "", "", "unit"));
|
||||
if (item.UnitId == Const.UnitId_CWCEC)
|
||||
{
|
||||
row.Cells.Add(CreateCell(item.SumPersonNum.ToString(), doc, table.Rows[1].Cells[1].CellFormat.Width));
|
||||
row.Cells.Add(CreateCell(item.SumOutPersonNum.ToString(), doc, table.Rows[1].Cells[2].CellFormat.Width));
|
||||
}
|
||||
else {
|
||||
row.Cells.Add(CreateCell(item.SumPersonNum.ToString(), doc, table.Rows[1].Cells[1].CellFormat.Width+ table.Rows[1].Cells[2].CellFormat.Width));
|
||||
}
|
||||
|
||||
row.Cells.Add(CreateCell(item.HSEPersonNum.ToString(), doc, table.Rows[1].Cells[3].CellFormat.Width));
|
||||
row.Cells.Add(CreateCell(item.ContractRange.ToString(), doc, table.Rows[1].Cells[4].CellFormat.Width));
|
||||
row.Cells.Add(CreateCell(item.Remark.ToString(), doc, table.Rows[1].Cells[5].CellFormat.Width));
|
||||
|
@ -735,8 +742,10 @@ namespace FineUIPro.Web.HSSE.Manager
|
|||
//创建合计
|
||||
Row rowhj = new Row(doc);
|
||||
rowhj.Cells.Add(CreateCell("合计", doc, table.Rows[1].Cells[0].CellFormat.Width, "", "", "unit"));
|
||||
rowhj.Cells.Add(CreateCell((from x in sorts select x.SumPersonNum ?? 0).Sum().ToString(), doc, table.Rows[1].Cells[1].CellFormat.Width));
|
||||
rowhj.Cells.Add(CreateCell((from x in sorts select x.SumOutPersonNum ?? 0).Sum().ToString(), doc, table.Rows[1].Cells[2].CellFormat.Width));
|
||||
rowhj.Cells.Add(CreateCell(((from x in sorts select x.SumPersonNum ?? 0).Sum()
|
||||
+ (from x in sorts select x.SumOutPersonNum ?? 0).Sum()).ToString(), doc, table.Rows[1].Cells[1].CellFormat.Width
|
||||
+table.Rows[1].Cells[2].CellFormat.Width));
|
||||
|
||||
rowhj.Cells.Add(CreateCell((from x in sorts select x.HSEPersonNum ?? 0).Sum().ToString(), doc, table.Rows[1].Cells[3].CellFormat.Width));
|
||||
rowhj.Cells.Add(CreateCell("", doc, table.Rows[1].Cells[4].CellFormat.Width));
|
||||
rowhj.Cells.Add(CreateCell("", doc, table.Rows[1].Cells[5].CellFormat.Width));
|
||||
|
@ -907,6 +916,9 @@ namespace FineUIPro.Web.HSSE.Manager
|
|||
//自动设置表格样式
|
||||
table.AutoFit(AutoFitBehavior.FixedColumnWidths);
|
||||
}
|
||||
else {
|
||||
whileIndex += 1;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 4.3 本月隐患整改情况
|
||||
|
@ -962,10 +974,911 @@ namespace FineUIPro.Web.HSSE.Manager
|
|||
table.AutoFit(AutoFitBehavior.FixedColumnWidths);
|
||||
|
||||
}
|
||||
else {
|
||||
whileIndex += 1;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 4.4项目作业许可管理数据
|
||||
var mpModel = db.Manager_ProjectAssignment.FirstOrDefault(x => x.MonthReportId == Id);
|
||||
whileIndex += 1;
|
||||
if (mpModel!=null)
|
||||
{
|
||||
bkmark = doc.Range.Bookmarks["nbFireWorkCount"];
|
||||
if (bkmark != null)
|
||||
{
|
||||
bkmark.Text = mpModel.FireWorkCount.ToString();
|
||||
}
|
||||
|
||||
bkmark = doc.Range.Bookmarks["nbBreakGroundCount"];
|
||||
if (bkmark != null)
|
||||
{
|
||||
bkmark.Text = mpModel.BreakGroundCount.ToString();
|
||||
}
|
||||
|
||||
bkmark = doc.Range.Bookmarks["nbLimitedSpaceCount"];
|
||||
if (bkmark != null)
|
||||
{
|
||||
bkmark.Text = mpModel.LimitedSpaceCount.ToString();
|
||||
}
|
||||
|
||||
bkmark = doc.Range.Bookmarks["nbElectricityCount"];
|
||||
if (bkmark != null)
|
||||
{
|
||||
bkmark.Text = mpModel.ElectricityCount.ToString();
|
||||
}
|
||||
|
||||
bkmark = doc.Range.Bookmarks["nbHeightWorkCount"];
|
||||
if (bkmark != null)
|
||||
{
|
||||
bkmark.Text = mpModel.HeightWorkCount.ToString();
|
||||
}
|
||||
|
||||
bkmark = doc.Range.Bookmarks["nbRadialWork"];
|
||||
if (bkmark != null)
|
||||
{
|
||||
bkmark.Text = mpModel.RadialWork.ToString();
|
||||
}
|
||||
|
||||
bkmark = doc.Range.Bookmarks["nbLiftingWorkCount"];
|
||||
if (bkmark != null)
|
||||
{
|
||||
bkmark.Text = mpModel.LiftingWorkCount.ToString();
|
||||
}
|
||||
|
||||
bkmark = doc.Range.Bookmarks["nbNightWork"];
|
||||
if (bkmark != null)
|
||||
{
|
||||
bkmark.Text = mpModel.NightWork.ToString();
|
||||
}
|
||||
|
||||
bkmark = doc.Range.Bookmarks["nbMonthCount"];
|
||||
if (bkmark != null)
|
||||
{
|
||||
bkmark.Text = mpModel.MonthCount.ToString();
|
||||
}
|
||||
|
||||
bkmark = doc.Range.Bookmarks["nbYearCount"];
|
||||
if (bkmark != null)
|
||||
{
|
||||
bkmark.Text = mpModel.YearCount.ToString();
|
||||
}
|
||||
|
||||
bkmark = doc.Range.Bookmarks["nbProCount"];
|
||||
if (bkmark != null)
|
||||
{
|
||||
bkmark.Text = mpModel.ProCount.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region 4.5项目本月危大工程管理数据
|
||||
bkmark = doc.Range.Bookmarks["MonthExpertNoCount"];
|
||||
if (bkmark != null)
|
||||
{
|
||||
bkmark.Text =model.MonthExpertNoCount.ToString();
|
||||
}
|
||||
|
||||
bkmark = doc.Range.Bookmarks["MonthExpertCount"];
|
||||
if (bkmark != null)
|
||||
{
|
||||
bkmark.Text = model.MonthExpertCount.ToString();
|
||||
}
|
||||
|
||||
whileIndex += 1;
|
||||
#endregion
|
||||
|
||||
#region 4.6.1 应急预案发布情况
|
||||
var emergencyPlanList = db.Manager_EmergencyPlan.Where(x => x.MonthReportId == Id).OrderBy(x => x.SortIndex).ToList();
|
||||
if (emergencyPlanList.Count > 0)
|
||||
{
|
||||
isYm = true;
|
||||
whileIndex += 1;
|
||||
table = (Aspose.Words.Tables.Table)doc.GetChild(NodeType.Table, whileIndex, true);
|
||||
//跳过页眉的表头
|
||||
while (isYm)
|
||||
{
|
||||
if (table.Range.Text.Substring(0, 2) != "序号")
|
||||
{
|
||||
whileIndex += 1;
|
||||
table = (Aspose.Words.Tables.Table)doc.GetChild(NodeType.Table, whileIndex, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
isYm = false;
|
||||
}
|
||||
}
|
||||
numberIndex = 1;
|
||||
foreach (var item in emergencyPlanList)
|
||||
{
|
||||
Row row = new Row(doc);
|
||||
row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.FirstRow.Cells[0].CellFormat.Width));
|
||||
row.Cells.Add(CreateCell(item.CaType, doc, table.FirstRow.Cells[1].CellFormat.Width));
|
||||
row.Cells.Add(CreateCell(item.MonthCount.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
|
||||
row.Cells.Add(CreateCell(item.YearCount.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
|
||||
row.Cells.Add(CreateCell(item.ProCount.ToString(), doc, table.FirstRow.Cells[4].CellFormat.Width));
|
||||
table.Rows.Insert(numberIndex, row);
|
||||
numberIndex++;
|
||||
}
|
||||
//自动设置表格样式
|
||||
table.AutoFit(AutoFitBehavior.FixedColumnWidths);
|
||||
}
|
||||
else {
|
||||
whileIndex += 1;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 4.6.2 应急演练工作情况说明
|
||||
var drillRecordList = db.Manager_DrillRecordList.Where(x => x.MonthReportId == Id).OrderBy(x => x.Ddate).ToList();
|
||||
isYm = true;
|
||||
whileIndex += 1;
|
||||
table = (Aspose.Words.Tables.Table)doc.GetChild(NodeType.Table, whileIndex, true);
|
||||
//跳过页眉的表头
|
||||
while (isYm)
|
||||
{
|
||||
if (table.Range.Text.Substring(0, 2) != "序号")
|
||||
{
|
||||
whileIndex += 1;
|
||||
table = (Aspose.Words.Tables.Table)doc.GetChild(NodeType.Table, whileIndex, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
isYm = false;
|
||||
}
|
||||
}
|
||||
if (drillRecordList.Count > 0)
|
||||
{
|
||||
|
||||
numberIndex = 1;
|
||||
foreach (var item in drillRecordList)
|
||||
{
|
||||
Row row = new Row(doc);
|
||||
row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.FirstRow.Cells[0].CellFormat.Width));
|
||||
row.Cells.Add(CreateCell(item.Dname, doc, table.FirstRow.Cells[1].CellFormat.Width));
|
||||
row.Cells.Add(CreateCell(Convert.ToDateTime(item.Ddate).ToString("yyyy-MM-dd"), doc, table.FirstRow.Cells[2].CellFormat.Width));
|
||||
row.Cells.Add(CreateCell(item.DrillRecordTypeName.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
|
||||
row.Cells.Add(CreateCell(item.PersonNum.ToString(), doc, table.FirstRow.Cells[4].CellFormat.Width));
|
||||
row.Cells.Add(CreateCell(item.DrillCost.ToString(), doc, table.FirstRow.Cells[5].CellFormat.Width));
|
||||
table.Rows.Insert(numberIndex, row);
|
||||
numberIndex++;
|
||||
}
|
||||
//自动设置表格样式
|
||||
table.AutoFit(AutoFitBehavior.FixedColumnWidths);
|
||||
}
|
||||
else {
|
||||
numberIndex = 1;
|
||||
Row row = new Row(doc);
|
||||
row.Cells.Add(CreateCell("暂无数据", doc, table.FirstRow.Cells[0].CellFormat.Width
|
||||
+ table.FirstRow.Cells[1].CellFormat.Width+ table.FirstRow.Cells[2].CellFormat.Width
|
||||
+ table.FirstRow.Cells[3].CellFormat.Width
|
||||
+ table.FirstRow.Cells[4].CellFormat.Width
|
||||
+ table.FirstRow.Cells[5].CellFormat.Width));
|
||||
table.Rows.Insert(numberIndex, row);
|
||||
table.AutoFit(AutoFitBehavior.FixedColumnWidths);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 4.6.3其他应急管理工作描述
|
||||
bkmark = doc.Range.Bookmarks["EmergencyManagementWorkDef"];
|
||||
if (bkmark != null)
|
||||
{
|
||||
bkmark.Text = model.EmergencyManagementWorkDef.ToString();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 4.7 HSE奖励与处罚
|
||||
whileIndex += 1;
|
||||
var rewardAndPunishSortCs = db.Manager_RewardAndPunishSortC.FirstOrDefault(x=>x.MonthReportId==Id);
|
||||
if (rewardAndPunishSortCs!=null)
|
||||
{
|
||||
bkmark = doc.Range.Bookmarks["RewardNum"];
|
||||
if (bkmark != null)
|
||||
{
|
||||
bkmark.Text = rewardAndPunishSortCs.RewardNum.ToString();
|
||||
}
|
||||
bkmark = doc.Range.Bookmarks["RewardMoney"];
|
||||
if (bkmark != null)
|
||||
{
|
||||
bkmark.Text = rewardAndPunishSortCs.RewardMoney.ToString();
|
||||
}
|
||||
bkmark = doc.Range.Bookmarks["ProjectRewardMoney"];
|
||||
if (bkmark != null)
|
||||
{
|
||||
bkmark.Text = rewardAndPunishSortCs.ProjectRewardMoney.ToString();
|
||||
}
|
||||
bkmark = doc.Range.Bookmarks["PunishNum"];
|
||||
if (bkmark != null)
|
||||
{
|
||||
bkmark.Text = rewardAndPunishSortCs.PunishNum.ToString();
|
||||
}
|
||||
bkmark = doc.Range.Bookmarks["PunishMoney"];
|
||||
if (bkmark != null)
|
||||
{
|
||||
bkmark.Text = rewardAndPunishSortCs.PunishMoney.ToString();
|
||||
}
|
||||
bkmark = doc.Range.Bookmarks["ProjectPunishMoney"];
|
||||
if (bkmark != null)
|
||||
{
|
||||
bkmark.Text = rewardAndPunishSortCs.ProjectPunishMoney.ToString();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 4.8HSE现场其他管理情况
|
||||
var otherManagements = BLL.OtherManagementCService.GetOtherManagementByMonthReportId(Id);
|
||||
isYm = true;
|
||||
whileIndex += 1;
|
||||
table = (Aspose.Words.Tables.Table)doc.GetChild(NodeType.Table, whileIndex, true);
|
||||
//跳过页眉的表头
|
||||
while (isYm)
|
||||
{
|
||||
if (table.Range.Text.Substring(0, 2) != "序号")
|
||||
{
|
||||
whileIndex += 1;
|
||||
table = (Aspose.Words.Tables.Table)doc.GetChild(NodeType.Table, whileIndex, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
isYm = false;
|
||||
}
|
||||
}
|
||||
if (otherManagements.Count > 0)
|
||||
{
|
||||
|
||||
numberIndex = 1;
|
||||
foreach (var item in otherManagements)
|
||||
{
|
||||
Row row = new Row(doc);
|
||||
row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.FirstRow.Cells[0].CellFormat.Width));
|
||||
row.Cells.Add(CreateCell(item.ManagementDes, doc, table.FirstRow.Cells[1].CellFormat.Width));
|
||||
table.Rows.Insert(numberIndex, row);
|
||||
numberIndex++;
|
||||
}
|
||||
//自动设置表格样式
|
||||
table.AutoFit(AutoFitBehavior.FixedColumnWidths);
|
||||
}
|
||||
else {
|
||||
numberIndex = 1;
|
||||
Row row = new Row(doc);
|
||||
row.Cells.Add(CreateCell("暂无数据", doc, table.FirstRow.Cells[0].CellFormat.Width
|
||||
+ table.FirstRow.Cells[1].CellFormat.Width));
|
||||
table.Rows.Insert(numberIndex, row);
|
||||
table.AutoFit(AutoFitBehavior.FixedColumnWidths);
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 5.1 本月项目HSE费用投入统计
|
||||
var fiveExpenses = BLL.FiveExpenseCService.GetFiveExpenseByMonthReportId(Id);
|
||||
if (fiveExpenses.Count > 0)
|
||||
{
|
||||
isYm = true;
|
||||
whileIndex += 1;
|
||||
table = (Aspose.Words.Tables.Table)doc.GetChild(NodeType.Table, whileIndex, true);
|
||||
//跳过页眉的表头
|
||||
while (isYm)
|
||||
{
|
||||
if (table.Range.Text.Substring(0, 2) != "序号")
|
||||
{
|
||||
whileIndex += 1;
|
||||
table = (Aspose.Words.Tables.Table)doc.GetChild(NodeType.Table, whileIndex, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
isYm = false;
|
||||
}
|
||||
}
|
||||
numberIndex = 2;
|
||||
foreach (var item in fiveExpenses)
|
||||
{
|
||||
Row row = new Row(doc);
|
||||
row.Cells.Add(CreateCell((numberIndex - 1).ToString(), doc, table.Rows[1].Cells[0].CellFormat.Width));
|
||||
row.Cells.Add(CreateCell(item.InvestmentProject, doc, table.Rows[1].Cells[1].CellFormat.Width, "", "", "unit"));
|
||||
row.Cells.Add(CreateCell(item.PlanCostMonth.ToString(), doc, table.Rows[1].Cells[2].CellFormat.Width));
|
||||
row.Cells.Add(CreateCell(item.PlanCostYear.ToString(), doc, table.Rows[1].Cells[3].CellFormat.Width));
|
||||
row.Cells.Add(CreateCell(item.ActualCostMonth.ToString(), doc, table.Rows[1].Cells[4].CellFormat.Width));
|
||||
row.Cells.Add(CreateCell(item.ActualCostYear.ToString(), doc, table.Rows[1].Cells[5].CellFormat.Width));
|
||||
table.Rows.Insert(numberIndex, row);
|
||||
numberIndex++;
|
||||
}
|
||||
//自动设置表格样式
|
||||
table.AutoFit(AutoFitBehavior.FixedColumnWidths);
|
||||
|
||||
//求和
|
||||
//创建合计
|
||||
rowhj = new Row(doc);
|
||||
rowhj.Cells.Add(CreateCell("合计", doc, (table.Rows[1].Cells[0].CellFormat.Width + table.Rows[1].Cells[1].CellFormat.Width)));
|
||||
rowhj.Cells.Add(CreateCell((from x in fiveExpenses select x.PlanCostMonth ?? 0).Sum().ToString(), doc, table.Rows[1].Cells[2].CellFormat.Width));
|
||||
rowhj.Cells.Add(CreateCell((from x in fiveExpenses select x.PlanCostYear ?? 0).Sum().ToString(), doc, table.Rows[1].Cells[3].CellFormat.Width));
|
||||
rowhj.Cells.Add(CreateCell((from x in fiveExpenses select x.ActualCostMonth ?? 0).Sum().ToString(), doc, table.Rows[1].Cells[4].CellFormat.Width));
|
||||
rowhj.Cells.Add(CreateCell((from x in fiveExpenses select x.ActualCostYear ?? 0).Sum().ToString(), doc, table.Rows[1].Cells[5].CellFormat.Width));
|
||||
table.Rows.Insert(numberIndex, rowhj);
|
||||
|
||||
//自动设置表格样式
|
||||
table.AutoFit(AutoFitBehavior.FixedColumnWidths);
|
||||
}
|
||||
else {
|
||||
whileIndex += 1;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 6.1(1) HSE责任事故/事件管理绩效数据统计
|
||||
var attemptedModel = db.Manager_Attempted.FirstOrDefault(x => x.MonthReportId == Id);
|
||||
if (attemptedModel != null)
|
||||
{
|
||||
bkmark = doc.Range.Bookmarks["WhMonthNum"];
|
||||
if (bkmark != null)
|
||||
{
|
||||
bkmark.Text = attemptedModel.WhMonthNum.ToString();
|
||||
}
|
||||
bkmark = doc.Range.Bookmarks["WhYearNum"];
|
||||
if (bkmark != null)
|
||||
{
|
||||
bkmark.Text = attemptedModel.WhYearNum.ToString();
|
||||
}
|
||||
bkmark = doc.Range.Bookmarks["FbsMonthNum"];
|
||||
if (bkmark != null)
|
||||
{
|
||||
bkmark.Text = attemptedModel.FbsMonthNum.ToString();
|
||||
}
|
||||
bkmark = doc.Range.Bookmarks["FbsYearNum"];
|
||||
if (bkmark != null)
|
||||
{
|
||||
bkmark.Text = attemptedModel.FbsYearNum.ToString();
|
||||
}
|
||||
bkmark = doc.Range.Bookmarks["ProNum"];
|
||||
if (bkmark != null)
|
||||
{
|
||||
bkmark.Text = attemptedModel.ProNum.ToString();
|
||||
}
|
||||
whileIndex += 1;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 6.1(2)本月伤害事故统计
|
||||
var injuryAccidents = BLL.InjuryAccidentCService.GetInjuryAccidentCByMonthReportId(Id);
|
||||
if (injuryAccidents.Count > 0)
|
||||
{
|
||||
isYm = true;
|
||||
whileIndex += 1;
|
||||
table = (Aspose.Words.Tables.Table)doc.GetChild(NodeType.Table, whileIndex, true);
|
||||
//跳过页眉的表头
|
||||
while (isYm)
|
||||
{
|
||||
if (table.Range.Text.Substring(0, 4) != " 事故")
|
||||
{
|
||||
whileIndex += 1;
|
||||
table = (Aspose.Words.Tables.Table)doc.GetChild(NodeType.Table, whileIndex, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
isYm = false;
|
||||
}
|
||||
}
|
||||
numberIndex = 4;
|
||||
foreach (var item in injuryAccidents)
|
||||
{
|
||||
Row row = new Row(doc);
|
||||
row.Cells.Add(CreateCell(item.UnitName, doc, table.Rows[3].Cells[0].CellFormat.Width));
|
||||
row.Cells.Add(CreateCell(item.FirstAidDressing.ToString(), doc, table.Rows[3].Cells[1].CellFormat.Width));
|
||||
row.Cells.Add(CreateCell(item.MedicalTreatment.ToString(), doc, table.Rows[3].Cells[2].CellFormat.Width));
|
||||
row.Cells.Add(CreateCell(item.WorkLimitation.ToString(), doc, table.Rows[3].Cells[3].CellFormat.Width));
|
||||
row.Cells.Add(CreateCell(item.LossCount.ToString(), doc, table.Rows[3].Cells[4].CellFormat.Width));
|
||||
row.Cells.Add(CreateCell(item.LossPerson.ToString(), doc, table.Rows[3].Cells[5].CellFormat.Width));
|
||||
row.Cells.Add(CreateCell(item.LossWorkTime.ToString(), doc, table.Rows[3].Cells[6].CellFormat.Width));
|
||||
row.Cells.Add(CreateCell(item.LossEconomy.ToString(), doc, table.Rows[3].Cells[7].CellFormat.Width));
|
||||
row.Cells.Add(CreateCell(item.DeathCount.ToString(), doc, table.Rows[3].Cells[8].CellFormat.Width));
|
||||
row.Cells.Add(CreateCell(item.DeathPerson.ToString(), doc, table.Rows[3].Cells[9].CellFormat.Width));
|
||||
row.Cells.Add(CreateCell(item.DeathWorkTime.ToString(), doc, table.Rows[3].Cells[10].CellFormat.Width));
|
||||
row.Cells.Add(CreateCell(item.DeathEconomy.ToString(), doc, table.Rows[3].Cells[11].CellFormat.Width));
|
||||
|
||||
table.Rows.Insert(numberIndex, row);
|
||||
numberIndex++;
|
||||
}
|
||||
//自动设置表格样式
|
||||
table.AutoFit(AutoFitBehavior.FixedColumnWidths);
|
||||
|
||||
//求和
|
||||
//创建合计
|
||||
rowhj = new Row(doc);
|
||||
rowhj.Cells.Add(CreateCell("项目合计", doc, (table.Rows[4].Cells[0].CellFormat.Width)));
|
||||
rowhj.Cells.Add(CreateCell((from x in injuryAccidents select x.FirstAidDressing ?? 0).Sum().ToString(), doc,
|
||||
table.Rows[4].Cells[1].CellFormat.Width));
|
||||
rowhj.Cells.Add(CreateCell((from x in injuryAccidents select x.MedicalTreatment ?? 0).Sum().ToString(), doc, table.Rows[3].Cells[2].CellFormat.Width));
|
||||
rowhj.Cells.Add(CreateCell((from x in injuryAccidents select x.WorkLimitation ?? 0).Sum().ToString(), doc, table.Rows[3].Cells[3].CellFormat.Width));
|
||||
rowhj.Cells.Add(CreateCell((from x in injuryAccidents select x.LossCount ?? 0).Sum().ToString(), doc, table.Rows[3].Cells[4].CellFormat.Width));
|
||||
rowhj.Cells.Add(CreateCell((from x in injuryAccidents select x.LossPerson ?? 0).Sum().ToString(), doc, table.Rows[3].Cells[5].CellFormat.Width));
|
||||
rowhj.Cells.Add(CreateCell((from x in injuryAccidents select x.LossWorkTime ?? 0).Sum().ToString(), doc, table.Rows[3].Cells[6].CellFormat.Width));
|
||||
rowhj.Cells.Add(CreateCell((from x in injuryAccidents select x.LossEconomy ?? 0).Sum().ToString(), doc, table.Rows[3].Cells[7].CellFormat.Width));
|
||||
rowhj.Cells.Add(CreateCell((from x in injuryAccidents select x.DeathCount ?? 0).Sum().ToString(), doc, table.Rows[3].Cells[8].CellFormat.Width));
|
||||
rowhj.Cells.Add(CreateCell((from x in injuryAccidents select x.DeathPerson ?? 0).Sum().ToString(), doc, table.Rows[3].Cells[9].CellFormat.Width));
|
||||
rowhj.Cells.Add(CreateCell((from x in injuryAccidents select x.DeathWorkTime ?? 0).Sum().ToString(), doc, table.Rows[3].Cells[10].CellFormat.Width));
|
||||
rowhj.Cells.Add(CreateCell((from x in injuryAccidents select x.DeathEconomy ?? 0).Sum().ToString(), doc, table.Rows[3].Cells[11].CellFormat.Width));
|
||||
|
||||
table.Rows.Insert(numberIndex, rowhj);
|
||||
|
||||
//自动设置表格样式
|
||||
table.AutoFit(AutoFitBehavior.FixedColumnWidths);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 6.2 HSE责任事故/事件描述
|
||||
bkmark = doc.Range.Bookmarks["Def"];
|
||||
if (bkmark != null)
|
||||
{
|
||||
bkmark.Text = model.AccidentDef.ToString();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 6.3 HSE目标实现情况
|
||||
bkmark = doc.Range.Bookmarks["Goalach1"];
|
||||
if (bkmark != null)
|
||||
{
|
||||
bkmark.Text = model.Goalach1.ToString();
|
||||
}
|
||||
bkmark = doc.Range.Bookmarks["Goalach2"];
|
||||
if (bkmark != null)
|
||||
{
|
||||
bkmark.Text = model.Goalach2.ToString();
|
||||
}
|
||||
bkmark = doc.Range.Bookmarks["Goalach3"];
|
||||
if (bkmark != null)
|
||||
{
|
||||
bkmark.Text = model.Goalach3.ToString();
|
||||
}
|
||||
whileIndex += 1;
|
||||
#endregion
|
||||
|
||||
#region 7.1 HSE工作计划
|
||||
var otherWorkPlanCs = BLL.OtherWorkPlanCService.GetOtherWorkPlanByMonthReportId(Id);
|
||||
isYm = true;
|
||||
whileIndex += 1;
|
||||
table = (Aspose.Words.Tables.Table)doc.GetChild(NodeType.Table, whileIndex, true);
|
||||
//跳过页眉的表头
|
||||
while (isYm)
|
||||
{
|
||||
if (table.Range.Text.Substring(0, 2) != "序号")
|
||||
{
|
||||
whileIndex += 1;
|
||||
table = (Aspose.Words.Tables.Table)doc.GetChild(NodeType.Table, whileIndex, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
isYm = false;
|
||||
}
|
||||
}
|
||||
if (otherWorkPlanCs.Count > 0)
|
||||
{
|
||||
|
||||
numberIndex = 1;
|
||||
foreach (var item in otherWorkPlanCs)
|
||||
{
|
||||
Row row = new Row(doc);
|
||||
row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.FirstRow.Cells[0].CellFormat.Width));
|
||||
row.Cells.Add(CreateCell(item.WorkContent, doc, table.FirstRow.Cells[1].CellFormat.Width));
|
||||
table.Rows.Insert(numberIndex, row);
|
||||
numberIndex++;
|
||||
}
|
||||
//自动设置表格样式
|
||||
table.AutoFit(AutoFitBehavior.FixedColumnWidths);
|
||||
}
|
||||
else {
|
||||
numberIndex = 1;
|
||||
Row row = new Row(doc);
|
||||
row.Cells.Add(CreateCell("暂无数据", doc, table.FirstRow.Cells[0].CellFormat.Width
|
||||
+ table.FirstRow.Cells[1].CellFormat.Width));
|
||||
table.Rows.Insert(numberIndex, row);
|
||||
table.AutoFit(AutoFitBehavior.FixedColumnWidths);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 8 HSE合规义务识别与评价
|
||||
var complianceObligationsCs = (from x in Funs.DB.Manager_Month_ComplianceObligationsC where x.MonthReportId == Id select x).ToList();
|
||||
isYm = true;
|
||||
whileIndex += 1;
|
||||
table = (Aspose.Words.Tables.Table)doc.GetChild(NodeType.Table, whileIndex, true);
|
||||
//跳过页眉的表头
|
||||
while (isYm)
|
||||
{
|
||||
if (table.Range.Text.Substring(0, 2) != "序号")
|
||||
{
|
||||
whileIndex += 1;
|
||||
table = (Aspose.Words.Tables.Table)doc.GetChild(NodeType.Table, whileIndex, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
isYm = false;
|
||||
}
|
||||
}
|
||||
if (complianceObligationsCs.Count > 0)
|
||||
{
|
||||
|
||||
numberIndex = 1;
|
||||
foreach (var item in complianceObligationsCs)
|
||||
{
|
||||
Row row = new Row(doc);
|
||||
row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.FirstRow.Cells[0].CellFormat.Width));
|
||||
row.Cells.Add(CreateCell(item.InformationContent, doc, table.FirstRow.Cells[1].CellFormat.Width));
|
||||
row.Cells.Add(CreateCell(item.ResponseMeasures, doc, table.FirstRow.Cells[2].CellFormat.Width));
|
||||
row.Cells.Add(CreateCell(item.ImplementationStatus, doc, table.FirstRow.Cells[3].CellFormat.Width));
|
||||
row.Cells.Add(CreateCell(item.EvaluationConclusion, doc, table.FirstRow.Cells[4].CellFormat.Width));
|
||||
table.Rows.Insert(numberIndex, row);
|
||||
numberIndex++;
|
||||
}
|
||||
//自动设置表格样式
|
||||
table.AutoFit(AutoFitBehavior.FixedColumnWidths);
|
||||
}
|
||||
else {
|
||||
numberIndex = 1;
|
||||
Row row = new Row(doc);
|
||||
row.Cells.Add(CreateCell("暂无数据", doc, table.FirstRow.Cells[0].CellFormat.Width
|
||||
+ table.FirstRow.Cells[1].CellFormat.Width + table.FirstRow.Cells[2].CellFormat.Width
|
||||
+ table.FirstRow.Cells[3].CellFormat.Width
|
||||
+ table.FirstRow.Cells[4].CellFormat.Width));
|
||||
table.Rows.Insert(numberIndex, row);
|
||||
table.AutoFit(AutoFitBehavior.FixedColumnWidths);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 9 需协调解决的主要问题
|
||||
bkmark = doc.Range.Bookmarks["Question"];
|
||||
if (bkmark != null)
|
||||
{
|
||||
bkmark.Text = model.Question.ToString();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 10 项目现场HSE影像照片
|
||||
var txtReportList = Funs.DB.Report_TextBoxContent.Where(x => x.ReportId == Id).ToList();
|
||||
string imageUrl = "res/images/R-C.png";
|
||||
var imageUrl1 = txtReportList.FirstOrDefault(x => x.ContentType == "10-1").ImageUrl;
|
||||
if (!string.IsNullOrWhiteSpace(imageUrl1) && imageUrl1 != imageUrl)
|
||||
{
|
||||
string rootPathUrl = rootPath.Replace("\\", "/");
|
||||
string url = rootPathUrl + imageUrl1;
|
||||
builder.MoveToBookmark("ImageUrl1");
|
||||
if (!string.IsNullOrEmpty(url))
|
||||
{
|
||||
System.Drawing.Size JpgSize;
|
||||
float Wpx;
|
||||
float Hpx;
|
||||
UploadAttachmentService.getJpgSize(rootPathUrl + imageUrl1, out JpgSize, out Wpx, out Hpx);
|
||||
if (File.Exists(url))
|
||||
{
|
||||
builder.InsertImage(url, 200, 150);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var imageUrl2 = txtReportList.FirstOrDefault(x => x.ContentType == "10-2").ImageUrl;
|
||||
if (!string.IsNullOrWhiteSpace(imageUrl2) && imageUrl2 != imageUrl)
|
||||
{
|
||||
string rootPathUrl = rootPath.Replace("\\", "/");
|
||||
string url = rootPathUrl + imageUrl2;
|
||||
//DocumentBuilder builder = new DocumentBuilder(doc);
|
||||
builder.MoveToBookmark("ImageUrl2");
|
||||
if (!string.IsNullOrEmpty(url))
|
||||
{
|
||||
System.Drawing.Size JpgSize;
|
||||
float Wpx;
|
||||
float Hpx;
|
||||
UploadAttachmentService.getJpgSize(rootPathUrl + imageUrl2, out JpgSize, out Wpx, out Hpx);
|
||||
//double w = 1;
|
||||
//w = JpgSize.Width / 50.0;
|
||||
if (File.Exists(url))
|
||||
{
|
||||
//builder.InsertImage(url, JpgSize.Width / w, JpgSize.Height / w);
|
||||
builder.InsertImage(url, 200, 150);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var imageUrl3 = txtReportList.FirstOrDefault(x => x.ContentType == "10-3").ImageUrl;
|
||||
if (!string.IsNullOrWhiteSpace(imageUrl3) && imageUrl3 != imageUrl)
|
||||
{
|
||||
string rootPathUrl = rootPath.Replace("\\", "/");
|
||||
string url = rootPathUrl + imageUrl3;
|
||||
//DocumentBuilder builder = new DocumentBuilder(doc);
|
||||
builder.MoveToBookmark("ImageUrl3");
|
||||
if (!string.IsNullOrEmpty(url))
|
||||
{
|
||||
System.Drawing.Size JpgSize;
|
||||
float Wpx;
|
||||
float Hpx;
|
||||
UploadAttachmentService.getJpgSize(rootPathUrl + imageUrl3, out JpgSize, out Wpx, out Hpx);
|
||||
//double w = 1;
|
||||
//w = JpgSize.Width / 50.0;
|
||||
if (File.Exists(url))
|
||||
{
|
||||
//builder.InsertImage(url, JpgSize.Width / w, JpgSize.Height / w);
|
||||
builder.InsertImage(url, 200, 150);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var imageUrl4 = txtReportList.FirstOrDefault(x => x.ContentType == "10-4").ImageUrl;
|
||||
if (!string.IsNullOrWhiteSpace(imageUrl4) && imageUrl4 != imageUrl)
|
||||
{
|
||||
string rootPathUrl = rootPath.Replace("\\", "/");
|
||||
string url = rootPathUrl + imageUrl4;
|
||||
//DocumentBuilder builder = new DocumentBuilder(doc);
|
||||
builder.MoveToBookmark("ImageUrl4");
|
||||
if (!string.IsNullOrEmpty(url))
|
||||
{
|
||||
System.Drawing.Size JpgSize;
|
||||
float Wpx;
|
||||
float Hpx;
|
||||
UploadAttachmentService.getJpgSize(rootPathUrl + imageUrl4, out JpgSize, out Wpx, out Hpx);
|
||||
//double w = 1;
|
||||
//w = JpgSize.Width / 50.0;
|
||||
if (File.Exists(url))
|
||||
{
|
||||
//builder.InsertImage(url, JpgSize.Width / w, JpgSize.Height / w);
|
||||
builder.InsertImage(url, 200, 150);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var imageUrl5 = txtReportList.FirstOrDefault(x => x.ContentType == "10-5").ImageUrl;
|
||||
if (!string.IsNullOrWhiteSpace(imageUrl5) && imageUrl5 != imageUrl)
|
||||
{
|
||||
string rootPathUrl = rootPath.Replace("\\", "/");
|
||||
string url = rootPathUrl + imageUrl5;
|
||||
//DocumentBuilder builder = new DocumentBuilder(doc);
|
||||
builder.MoveToBookmark("ImageUrl5");
|
||||
if (!string.IsNullOrEmpty(url))
|
||||
{
|
||||
System.Drawing.Size JpgSize;
|
||||
float Wpx;
|
||||
float Hpx;
|
||||
UploadAttachmentService.getJpgSize(rootPathUrl + imageUrl5, out JpgSize, out Wpx, out Hpx);
|
||||
//double w = 1;
|
||||
//w = JpgSize.Width / 50.0;
|
||||
if (File.Exists(url))
|
||||
{
|
||||
//builder.InsertImage(url, JpgSize.Width / w, JpgSize.Height / w);
|
||||
builder.InsertImage(url, 200, 150);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var imageUrl6 = txtReportList.FirstOrDefault(x => x.ContentType == "10-6").ImageUrl;
|
||||
if (!string.IsNullOrWhiteSpace(imageUrl6) && imageUrl6 != imageUrl)
|
||||
{
|
||||
string rootPathUrl = rootPath.Replace("\\", "/");
|
||||
string url = rootPathUrl + imageUrl6;
|
||||
//DocumentBuilder builder = new DocumentBuilder(doc);
|
||||
builder.MoveToBookmark("ImageUrl6");
|
||||
if (!string.IsNullOrEmpty(url))
|
||||
{
|
||||
System.Drawing.Size JpgSize;
|
||||
float Wpx;
|
||||
float Hpx;
|
||||
UploadAttachmentService.getJpgSize(rootPathUrl + imageUrl6, out JpgSize, out Wpx, out Hpx);
|
||||
//double w = 1;
|
||||
//w = JpgSize.Width / 50.0;
|
||||
if (File.Exists(url))
|
||||
{
|
||||
//builder.InsertImage(url, JpgSize.Width / w, JpgSize.Height / w);
|
||||
builder.InsertImage(url, 200, 150);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var imageUrl7 = txtReportList.FirstOrDefault(x => x.ContentType == "10-7").ImageUrl;
|
||||
if (!string.IsNullOrWhiteSpace(imageUrl7) && imageUrl7 != imageUrl)
|
||||
{
|
||||
string rootPathUrl = rootPath.Replace("\\", "/");
|
||||
string url = rootPathUrl + imageUrl7;
|
||||
//DocumentBuilder builder = new DocumentBuilder(doc);
|
||||
builder.MoveToBookmark("ImageUrl7");
|
||||
if (!string.IsNullOrEmpty(url))
|
||||
{
|
||||
System.Drawing.Size JpgSize;
|
||||
float Wpx;
|
||||
float Hpx;
|
||||
UploadAttachmentService.getJpgSize(rootPathUrl + imageUrl7, out JpgSize, out Wpx, out Hpx);
|
||||
//double w = 1;
|
||||
//w = JpgSize.Width / 50.0;
|
||||
if (File.Exists(url))
|
||||
{
|
||||
//builder.InsertImage(url, JpgSize.Width / w, JpgSize.Height / w);
|
||||
builder.InsertImage(url, 200, 150);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var imageUrl8 = txtReportList.FirstOrDefault(x => x.ContentType == "10-8").ImageUrl;
|
||||
if (!string.IsNullOrWhiteSpace(imageUrl8) && imageUrl8 != imageUrl)
|
||||
{
|
||||
string rootPathUrl = rootPath.Replace("\\", "/");
|
||||
string url = rootPathUrl + imageUrl8;
|
||||
//DocumentBuilder builder = new DocumentBuilder(doc);
|
||||
builder.MoveToBookmark("ImageUrl8");
|
||||
if (!string.IsNullOrEmpty(url))
|
||||
{
|
||||
System.Drawing.Size JpgSize;
|
||||
float Wpx;
|
||||
float Hpx;
|
||||
UploadAttachmentService.getJpgSize(rootPathUrl + imageUrl8, out JpgSize, out Wpx, out Hpx);
|
||||
//double w = 1;
|
||||
//w = JpgSize.Width / 50.0;
|
||||
if (File.Exists(url))
|
||||
{
|
||||
//builder.InsertImage(url, JpgSize.Width / w, JpgSize.Height / w);
|
||||
builder.InsertImage(url, 200, 150);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var imageUrl9 = txtReportList.FirstOrDefault(x => x.ContentType == "10-9").ImageUrl;
|
||||
if (!string.IsNullOrWhiteSpace(imageUrl9) && imageUrl9 != imageUrl)
|
||||
{
|
||||
string rootPathUrl = rootPath.Replace("\\", "/");
|
||||
string url = rootPathUrl + imageUrl9;
|
||||
//DocumentBuilder builder = new DocumentBuilder(doc);
|
||||
builder.MoveToBookmark("ImageUrl9");
|
||||
if (!string.IsNullOrEmpty(url))
|
||||
{
|
||||
System.Drawing.Size JpgSize;
|
||||
float Wpx;
|
||||
float Hpx;
|
||||
UploadAttachmentService.getJpgSize(rootPathUrl + imageUrl9, out JpgSize, out Wpx, out Hpx);
|
||||
//double w = 1;
|
||||
//w = JpgSize.Width / 50.0;
|
||||
if (File.Exists(url))
|
||||
{
|
||||
//builder.InsertImage(url, JpgSize.Width / w, JpgSize.Height / w);
|
||||
builder.InsertImage(url, 200, 150);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var imageUrl10 = txtReportList.FirstOrDefault(x => x.ContentType == "10-10").ImageUrl;
|
||||
if (!string.IsNullOrWhiteSpace(imageUrl10) && imageUrl10 != imageUrl)
|
||||
{
|
||||
string rootPathUrl = rootPath.Replace("\\", "/");
|
||||
string url = rootPathUrl + imageUrl10;
|
||||
//DocumentBuilder builder = new DocumentBuilder(doc);
|
||||
builder.MoveToBookmark("ImageUrl10");
|
||||
if (!string.IsNullOrEmpty(url))
|
||||
{
|
||||
System.Drawing.Size JpgSize;
|
||||
float Wpx;
|
||||
float Hpx;
|
||||
UploadAttachmentService.getJpgSize(rootPathUrl + imageUrl10, out JpgSize, out Wpx, out Hpx);
|
||||
//double w = 1;
|
||||
//w = JpgSize.Width / 50.0;
|
||||
if (File.Exists(url))
|
||||
{
|
||||
//builder.InsertImage(url, JpgSize.Width / w, JpgSize.Height / w);
|
||||
builder.InsertImage(url, 200, 150);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var imageUrl11 = txtReportList.FirstOrDefault(x => x.ContentType == "10-11").ImageUrl;
|
||||
if (!string.IsNullOrWhiteSpace(imageUrl11) && imageUrl11 != imageUrl)
|
||||
{
|
||||
string rootPathUrl = rootPath.Replace("\\", "/");
|
||||
string url = rootPathUrl + imageUrl11;
|
||||
//DocumentBuilder builder = new DocumentBuilder(doc);
|
||||
builder.MoveToBookmark("ImageUrl11");
|
||||
if (!string.IsNullOrEmpty(url))
|
||||
{
|
||||
System.Drawing.Size JpgSize;
|
||||
float Wpx;
|
||||
float Hpx;
|
||||
UploadAttachmentService.getJpgSize(rootPathUrl + imageUrl11, out JpgSize, out Wpx, out Hpx);
|
||||
//double w = 1;
|
||||
//w = JpgSize.Width / 50.0;
|
||||
if (File.Exists(url))
|
||||
{
|
||||
//builder.InsertImage(url, JpgSize.Width / w, JpgSize.Height / w);
|
||||
builder.InsertImage(url, 200, 150);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var imageUrl12 = txtReportList.FirstOrDefault(x => x.ContentType == "10-12").ImageUrl;
|
||||
if (!string.IsNullOrWhiteSpace(imageUrl12) && imageUrl12 != imageUrl)
|
||||
{
|
||||
string rootPathUrl = rootPath.Replace("\\", "/");
|
||||
string url = rootPathUrl + imageUrl12;
|
||||
//DocumentBuilder builder = new DocumentBuilder(doc);
|
||||
builder.MoveToBookmark("ImageUrl12");
|
||||
if (!string.IsNullOrEmpty(url))
|
||||
{
|
||||
System.Drawing.Size JpgSize;
|
||||
float Wpx;
|
||||
float Hpx;
|
||||
UploadAttachmentService.getJpgSize(rootPathUrl + imageUrl12, out JpgSize, out Wpx, out Hpx);
|
||||
//double w = 1;
|
||||
//w = JpgSize.Width / 50.0;
|
||||
if (File.Exists(url))
|
||||
{
|
||||
//builder.InsertImage(url, JpgSize.Width / w, JpgSize.Height / w);
|
||||
builder.InsertImage(url, 200, 150);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#region 图片文字备注
|
||||
bkmark = doc.Range.Bookmarks["ImageContent1"];
|
||||
if (bkmark != null)
|
||||
{
|
||||
bkmark.Text = txtReportList.FirstOrDefault(x => x.ContentType == "10-1").ContentText;
|
||||
}
|
||||
|
||||
bkmark = doc.Range.Bookmarks["ImageContent2"];
|
||||
if (bkmark != null)
|
||||
{
|
||||
bkmark.Text = txtReportList.FirstOrDefault(x => x.ContentType == "10-2").ContentText;
|
||||
}
|
||||
|
||||
bkmark = doc.Range.Bookmarks["ImageContent3"];
|
||||
if (bkmark != null)
|
||||
{
|
||||
bkmark.Text = txtReportList.FirstOrDefault(x => x.ContentType == "10-3").ContentText;
|
||||
}
|
||||
|
||||
bkmark = doc.Range.Bookmarks["ImageContent4"];
|
||||
if (bkmark != null)
|
||||
{
|
||||
bkmark.Text = txtReportList.FirstOrDefault(x => x.ContentType == "10-4").ContentText;
|
||||
}
|
||||
|
||||
bkmark = doc.Range.Bookmarks["ImageContent5"];
|
||||
if (bkmark != null)
|
||||
{
|
||||
bkmark.Text = txtReportList.FirstOrDefault(x => x.ContentType == "10-5").ContentText;
|
||||
}
|
||||
|
||||
bkmark = doc.Range.Bookmarks["ImageContent6"];
|
||||
if (bkmark != null)
|
||||
{
|
||||
bkmark.Text = txtReportList.FirstOrDefault(x => x.ContentType == "10-6").ContentText;
|
||||
}
|
||||
|
||||
bkmark = doc.Range.Bookmarks["ImageContent7"];
|
||||
if (bkmark != null)
|
||||
{
|
||||
bkmark.Text = txtReportList.FirstOrDefault(x => x.ContentType == "10-7").ContentText;
|
||||
}
|
||||
|
||||
bkmark = doc.Range.Bookmarks["ImageContent8"];
|
||||
if (bkmark != null)
|
||||
{
|
||||
bkmark.Text = txtReportList.FirstOrDefault(x => x.ContentType == "10-8").ContentText;
|
||||
}
|
||||
|
||||
bkmark = doc.Range.Bookmarks["ImageContent9"];
|
||||
if (bkmark != null)
|
||||
{
|
||||
bkmark.Text = txtReportList.FirstOrDefault(x => x.ContentType == "10-9").ContentText;
|
||||
}
|
||||
|
||||
bkmark = doc.Range.Bookmarks["ImageContent10"];
|
||||
if (bkmark != null)
|
||||
{
|
||||
bkmark.Text = txtReportList.FirstOrDefault(x => x.ContentType == "10-10").ContentText;
|
||||
}
|
||||
|
||||
bkmark = doc.Range.Bookmarks["ImageContent11"];
|
||||
if (bkmark != null)
|
||||
{
|
||||
bkmark.Text = txtReportList.FirstOrDefault(x => x.ContentType == "10-11").ContentText;
|
||||
}
|
||||
|
||||
bkmark = doc.Range.Bookmarks["ImageContent12"];
|
||||
if (bkmark != null)
|
||||
{
|
||||
bkmark.Text = txtReportList.FirstOrDefault(x => x.ContentType == "10-12").ContentText;
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region 设置页眉上的数据
|
||||
|
@ -982,7 +1895,7 @@ namespace FineUIPro.Web.HSSE.Manager
|
|||
|
||||
//项目名称
|
||||
table.Rows[1].Cells[2].FirstParagraph.Runs[0].Text = pModel.ProjectName;
|
||||
table.Rows[1].Cells[3].FirstParagraph.Runs[0].Text = pModel.ProjectCode + "-RM-PQM-" + model.MonthReportCode;
|
||||
table.Rows[1].Cells[3].FirstParagraph.Runs[0].Text = pModel.ProjectCode + "-RM-HSE-" + model.MonthReportCode;
|
||||
|
||||
//总页数
|
||||
table.Rows[2].Cells[7].FirstParagraph.Runs[0].Text = doc.PageCount.ToString();
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 138 KiB |
|
@ -12,7 +12,7 @@
|
|||
<appSettings>
|
||||
<!--连接字符串-->
|
||||
<!--<add key="ConnectionString" value="Server=.;Database=SGGLDB_WH;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Connect Timeout=1200"/>-->
|
||||
<add key="ConnectionString" value="Server=.\SQL2012;Database=SGGLDB_WH;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Connect Timeout=1200"/>
|
||||
<add key="ConnectionString" value="Server=.;Database=SGGLDB_WH;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Connect Timeout=1200"/>
|
||||
<!--系统名称-->
|
||||
<add key="SystemName" value="智慧施工管理信息系统V1.0"/>
|
||||
<add key="ChartImageHandler" value="storage=file;timeout=20;url=~/Images/;"/>
|
||||
|
|
|
@ -131,22 +131,22 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
Grid1.Rows[0].CellCssClasses[5] = "f-grid-cell-uneditable";
|
||||
Grid1.Rows[14].CellCssClasses[4] = "f-grid-cell-uneditable";
|
||||
Grid1.Rows[14].CellCssClasses[5] = "f-grid-cell-uneditable";
|
||||
//Grid1.Rows[16].CellCssClasses[4] = "f-grid-cell-uneditable";
|
||||
//Grid1.Rows[16].CellCssClasses[5] = "f-grid-cell-uneditable";
|
||||
Grid1.Rows[16].CellCssClasses[4] = "f-grid-cell-uneditable";
|
||||
Grid1.Rows[16].CellCssClasses[5] = "f-grid-cell-uneditable";
|
||||
//Grid1.Rows[17].CellCssClasses[4] = "f-grid-cell-uneditable";
|
||||
//Grid1.Rows[17].CellCssClasses[5] = "f-grid-cell-uneditable";
|
||||
Grid1.Rows[18].CellCssClasses[4] = "f-grid-cell-uneditable";
|
||||
Grid1.Rows[18].CellCssClasses[5] = "f-grid-cell-uneditable";
|
||||
//Grid1.Rows[20].CellCssClasses[4] = "f-grid-cell-uneditable";
|
||||
//Grid1.Rows[20].CellCssClasses[5] = "f-grid-cell-uneditable";
|
||||
Grid1.Rows[20].CellCssClasses[4] = "f-grid-cell-uneditable";
|
||||
Grid1.Rows[20].CellCssClasses[5] = "f-grid-cell-uneditable";
|
||||
//Grid1.Rows[21].CellCssClasses[4] = "f-grid-cell-uneditable";
|
||||
//Grid1.Rows[21].CellCssClasses[5] = "f-grid-cell-uneditable";
|
||||
//Grid1.Rows[22].CellCssClasses[4] = "f-grid-cell-uneditable";
|
||||
//Grid1.Rows[22].CellCssClasses[5] = "f-grid-cell-uneditable";
|
||||
Grid1.Rows[22].CellCssClasses[4] = "f-grid-cell-uneditable";
|
||||
Grid1.Rows[22].CellCssClasses[5] = "f-grid-cell-uneditable";
|
||||
//Grid1.Rows[24].CellCssClasses[4] = "f-grid-cell-uneditable";
|
||||
//Grid1.Rows[24].CellCssClasses[5] = "f-grid-cell-uneditable";
|
||||
//Grid1.Rows[36].CellCssClasses[4] = "f-grid-cell-uneditable";
|
||||
//Grid1.Rows[36].CellCssClasses[5] = "f-grid-cell-uneditable";
|
||||
Grid1.Rows[36].CellCssClasses[4] = "f-grid-cell-uneditable";
|
||||
Grid1.Rows[36].CellCssClasses[5] = "f-grid-cell-uneditable";
|
||||
Grid1.Rows[58].CellCssClasses[4] = "f-grid-cell-uneditable";
|
||||
Grid1.Rows[58].CellCssClasses[5] = "f-grid-cell-uneditable";
|
||||
}
|
||||
|
@ -542,8 +542,8 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
private void GetData()
|
||||
{
|
||||
decimal E6 = 0, F6 = 0, E7 = 0, F7 = 0, E8, F8, E9 = 0, F9 = 0, E10 = 0, F10 = 0, E11 = 0, F11 = 0, E12 = 0, F12 = 0, E13 = 0, F13 = 0, E14 = 0, F14 = 0, E15 = 0, F15 = 0, E16 = 0, F16 = 0, E17 = 0, F17 = 0, E18 = 0, F18 = 0, E20 = 0, F20 = 0, E21 = 0, F21 = 0, E22 = 0, F22 = 0,
|
||||
E24 = 0, F24 = 0, E25 = 0, F25 = 0, E26 = 0, F26 = 0, E27 = 0, F27 = 0, E28, F28, E29 = 0, F29 = 0, E30, F30, E31, F31, E32, F32, E33, F33, E34, F34, E35, F35, E36, F36, E37, F37, E38, F38, E39, F39, E40, F40, E41 = 0, F41 = 0,
|
||||
E42, F42, E43, F43, E44, F44, E45, F45, E46, F46, E47, F47, E48, F48, E49, F49, E50, F50, E51, F51, E52, F52, E53, F53, E54, F54, E55, F55,
|
||||
E24 = 0, F24 = 0, E25 = 0, F25 = 0, E26 = 0, F26 = 0, E27 = 0, F27 = 0, E28 = 0, F28 = 0, E29 = 0, F29 = 0, E30, F30, E31, F31, E32, F32, E33, F33, E34, F34, E35, F35, E36, F36, E37, F37, E38, F38, E39, F39, E40, F40, E41 = 0, F41 = 0,
|
||||
E42 = 0, F42 = 0, E43, F43, E44, F44, E45, F45, E46, F46, E47, F47, E48, F48, E49, F49, E50, F50, E51, F51, E52, F52, E53, F53, E54, F54, E55, F55,
|
||||
E56, F56, E57, F57, E58, F58, E59, F59, E60, F60, E61, F61, E62, F62, E64 = 0, F64 = 0, E65 = 0, F65 = 0;
|
||||
JArray mergedData = Grid1.GetMergedData();
|
||||
foreach (JObject mergedRow in mergedData)
|
||||
|
@ -1105,6 +1105,18 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
{
|
||||
this.Grid1.Rows[14].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[14].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[14].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[14].Values[4].ToString()), 2).ToString() + "%";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[4].ToString()) && E22 > 0)
|
||||
{
|
||||
this.Grid1.Rows[16].Values[4] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[4].ToString()) * 10000 / E22, 4);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[5].ToString()) && F22 > 0)
|
||||
{
|
||||
this.Grid1.Rows[16].Values[5] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[5].ToString()) * 10000 / F22, 4);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.Grid1.Rows[16].Values[4].ToString()) && this.Grid1.Rows[16].Values[4].ToString() != "0" && !string.IsNullOrEmpty(this.Grid1.Rows[16].Values[5].ToString()))
|
||||
{
|
||||
this.Grid1.Rows[16].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[16].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[16].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[16].Values[4].ToString()), 2).ToString() + "%";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[4].ToString()) && E24 > 0)
|
||||
{
|
||||
this.Grid1.Rows[18].Values[4] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[4].ToString()) * 10000 / E24, 4);
|
||||
|
@ -1117,6 +1129,42 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
{
|
||||
this.Grid1.Rows[18].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[18].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[18].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[18].Values[4].ToString()), 2).ToString() + "%";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[4].ToString()) && E26 > 0)
|
||||
{
|
||||
this.Grid1.Rows[20].Values[4] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[4].ToString()) * 10000 / E26, 4);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[5].ToString()) && F26 > 0)
|
||||
{
|
||||
this.Grid1.Rows[20].Values[5] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[5].ToString()) * 10000 / F26, 4);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.Grid1.Rows[20].Values[4].ToString()) && this.Grid1.Rows[20].Values[4].ToString() != "0" && !string.IsNullOrEmpty(this.Grid1.Rows[20].Values[5].ToString()))
|
||||
{
|
||||
this.Grid1.Rows[20].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[20].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[20].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[20].Values[4].ToString()), 2).ToString() + "%";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[4].ToString()) && E28 > 0)
|
||||
{
|
||||
this.Grid1.Rows[22].Values[4] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[4].ToString()) * 10000 / E28, 4);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[5].ToString()) && F28 > 0)
|
||||
{
|
||||
this.Grid1.Rows[22].Values[5] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[5].ToString()) * 10000 / F28, 4);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.Grid1.Rows[22].Values[4].ToString()) && this.Grid1.Rows[22].Values[4].ToString() != "0" && !string.IsNullOrEmpty(this.Grid1.Rows[22].Values[5].ToString()))
|
||||
{
|
||||
this.Grid1.Rows[22].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[22].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[22].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[22].Values[4].ToString()), 2).ToString() + "%";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[4].ToString()) && E42 > 0)
|
||||
{
|
||||
this.Grid1.Rows[36].Values[4] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[4].ToString()) * 10000 / E42, 4);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[5].ToString()) && F42 > 0)
|
||||
{
|
||||
this.Grid1.Rows[36].Values[5] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[5].ToString()) * 10000 / F42, 4);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.Grid1.Rows[36].Values[4].ToString()) && this.Grid1.Rows[36].Values[4].ToString() != "0" && !string.IsNullOrEmpty(this.Grid1.Rows[36].Values[5].ToString()))
|
||||
{
|
||||
this.Grid1.Rows[36].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[36].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[36].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[36].Values[4].ToString()), 2).ToString() + "%";
|
||||
}
|
||||
if (E64 > 0 && E65 > 0 && E20 > 0)
|
||||
{
|
||||
this.Grid1.Rows[58].Values[4] = decimal.Round((E64 + E65) / E20, 4);
|
||||
|
@ -1232,6 +1280,26 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
bool isEmpty = false;
|
||||
foreach (JObject mergedRow in Grid1.GetMergedData())
|
||||
{
|
||||
JObject values = mergedRow.Value<JObject>("values");
|
||||
int rowIndex = mergedRow.Value<int>("index");
|
||||
string sortIndex = values.Value<string>("SortIndex");
|
||||
if (sortIndex == "18" || sortIndex == "37" || sortIndex == "38")
|
||||
{
|
||||
if (Funs.GetNewDecimalOrZero(System.Web.HttpUtility.HtmlDecode(values.Value<string>("ThisYearValue"))) == 0)
|
||||
{
|
||||
isEmpty = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isEmpty)
|
||||
{
|
||||
ShowNotify("营业收入(可比价)、万元收入二氧化碳排放(可比价)和二氧化碳排放量不能为空,必须填报数据!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
Save("add");
|
||||
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
|
@ -1239,11 +1307,51 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
|
||||
protected void btnUpdata_Click(object sender, EventArgs e)
|
||||
{
|
||||
bool isEmpty = false;
|
||||
foreach (JObject mergedRow in Grid1.GetMergedData())
|
||||
{
|
||||
JObject values = mergedRow.Value<JObject>("values");
|
||||
int rowIndex = mergedRow.Value<int>("index");
|
||||
string sortIndex = values.Value<string>("SortIndex");
|
||||
if (sortIndex == "18" || sortIndex == "37" || sortIndex == "38")
|
||||
{
|
||||
if (Funs.GetNewDecimalOrZero(System.Web.HttpUtility.HtmlDecode(values.Value<string>("ThisYearValue"))) == 0)
|
||||
{
|
||||
isEmpty = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isEmpty)
|
||||
{
|
||||
ShowNotify("营业收入(可比价)、万元收入二氧化碳排放(可比价)和二氧化碳排放量不能为空,必须填报数据!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
Save("updata");
|
||||
}
|
||||
|
||||
protected void btnSubmit_Click(object sender, EventArgs e)
|
||||
{
|
||||
bool isEmpty = false;
|
||||
foreach (JObject mergedRow in Grid1.GetMergedData())
|
||||
{
|
||||
JObject values = mergedRow.Value<JObject>("values");
|
||||
int rowIndex = mergedRow.Value<int>("index");
|
||||
string sortIndex = values.Value<string>("SortIndex");
|
||||
if (sortIndex == "18" || sortIndex == "37" || sortIndex == "38")
|
||||
{
|
||||
if (Funs.GetNewDecimalOrZero(System.Web.HttpUtility.HtmlDecode(values.Value<string>("ThisYearValue"))) == 0)
|
||||
{
|
||||
isEmpty = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isEmpty)
|
||||
{
|
||||
ShowNotify("营业收入(可比价)、万元收入二氧化碳排放(可比价)和二氧化碳排放量不能为空,必须填报数据!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
Save("submit");
|
||||
}
|
||||
#endregion
|
||||
|
|
|
@ -124,8 +124,16 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
Grid1.Rows[0].CellCssClasses[5] = "f-grid-cell-uneditable";
|
||||
Grid1.Rows[15].CellCssClasses[4] = "f-grid-cell-uneditable";
|
||||
Grid1.Rows[15].CellCssClasses[5] = "f-grid-cell-uneditable";
|
||||
Grid1.Rows[17].CellCssClasses[4] = "f-grid-cell-uneditable";
|
||||
Grid1.Rows[17].CellCssClasses[5] = "f-grid-cell-uneditable";
|
||||
Grid1.Rows[19].CellCssClasses[4] = "f-grid-cell-uneditable";
|
||||
Grid1.Rows[19].CellCssClasses[5] = "f-grid-cell-uneditable";
|
||||
Grid1.Rows[21].CellCssClasses[4] = "f-grid-cell-uneditable";
|
||||
Grid1.Rows[21].CellCssClasses[5] = "f-grid-cell-uneditable";
|
||||
Grid1.Rows[23].CellCssClasses[4] = "f-grid-cell-uneditable";
|
||||
Grid1.Rows[23].CellCssClasses[5] = "f-grid-cell-uneditable";
|
||||
Grid1.Rows[68].CellCssClasses[4] = "f-grid-cell-uneditable";
|
||||
Grid1.Rows[68].CellCssClasses[5] = "f-grid-cell-uneditable";
|
||||
Grid1.Rows[96].CellCssClasses[4] = "f-grid-cell-uneditable";
|
||||
Grid1.Rows[96].CellCssClasses[5] = "f-grid-cell-uneditable";
|
||||
}
|
||||
|
@ -140,20 +148,22 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
Grid1.Rows[0].CellCssClasses[5] = "f-grid-cell-uneditable";
|
||||
Grid1.Rows[15].CellCssClasses[4] = "f-grid-cell-uneditable";
|
||||
Grid1.Rows[15].CellCssClasses[5] = "f-grid-cell-uneditable";
|
||||
//Grid1.Rows[17].CellCssClasses[4] = "f-grid-cell-uneditable";
|
||||
//Grid1.Rows[17].CellCssClasses[5] = "f-grid-cell-uneditable";
|
||||
Grid1.Rows[17].CellCssClasses[4] = "f-grid-cell-uneditable";
|
||||
Grid1.Rows[17].CellCssClasses[5] = "f-grid-cell-uneditable";
|
||||
//Grid1.Rows[18].CellCssClasses[4] = "f-grid-cell-uneditable";
|
||||
//Grid1.Rows[18].CellCssClasses[5] = "f-grid-cell-uneditable";
|
||||
Grid1.Rows[19].CellCssClasses[4] = "f-grid-cell-uneditable";
|
||||
Grid1.Rows[19].CellCssClasses[5] = "f-grid-cell-uneditable";
|
||||
//Grid1.Rows[21].CellCssClasses[4] = "f-grid-cell-uneditable";
|
||||
//Grid1.Rows[21].CellCssClasses[5] = "f-grid-cell-uneditable";
|
||||
Grid1.Rows[21].CellCssClasses[4] = "f-grid-cell-uneditable";
|
||||
Grid1.Rows[21].CellCssClasses[5] = "f-grid-cell-uneditable";
|
||||
//Grid1.Rows[22].CellCssClasses[4] = "f-grid-cell-uneditable";
|
||||
//Grid1.Rows[22].CellCssClasses[5] = "f-grid-cell-uneditable";
|
||||
//Grid1.Rows[23].CellCssClasses[4] = "f-grid-cell-uneditable";
|
||||
//Grid1.Rows[23].CellCssClasses[5] = "f-grid-cell-uneditable";
|
||||
Grid1.Rows[23].CellCssClasses[4] = "f-grid-cell-uneditable";
|
||||
Grid1.Rows[23].CellCssClasses[5] = "f-grid-cell-uneditable";
|
||||
//Grid1.Rows[33].CellCssClasses[4] = "f-grid-cell-uneditable";
|
||||
//Grid1.Rows[33].CellCssClasses[5] = "f-grid-cell-uneditable";
|
||||
Grid1.Rows[68].CellCssClasses[4] = "f-grid-cell-uneditable";
|
||||
Grid1.Rows[68].CellCssClasses[5] = "f-grid-cell-uneditable";
|
||||
Grid1.Rows[96].CellCssClasses[4] = "f-grid-cell-uneditable";
|
||||
Grid1.Rows[96].CellCssClasses[5] = "f-grid-cell-uneditable";
|
||||
}
|
||||
|
@ -792,10 +802,10 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
private void GetData()
|
||||
{
|
||||
decimal E6 = 0, F6 = 0, E7 = 0, F7 = 0, E8, F8, E9, F9, E10 = 0, F10 = 0, E11 = 0, F11 = 0, E12 = 0, F12 = 0, E13 = 0, F13 = 0, E14 = 0, F14 = 0, E15 = 0, F15 = 0, E16 = 0, F16 = 0, E17 = 0, F17 = 0, E18 = 0, F18 = 0, E19 = 0, F19 = 0,
|
||||
E21 = 0, F21 = 0, E22 = 0, F22 = 0, E23 = 0, F23 = 0, E25 = 0, F25 = 0, E26 = 0, F26 = 0, E27 = 0, F27 = 0, E28 = 0, F28 = 0, E29, F29, E30, F30, E31, F31, E32, F32, E33, F33, E34, F34, E35, F35, E36, F36, E37, F37, E38, F38, E39, F39, E40, F40, E41, F41,
|
||||
E21 = 0, F21 = 0, E22 = 0, F22 = 0, E23 = 0, F23 = 0, E25 = 0, F25 = 0, E26 = 0, F26 = 0, E27 = 0, F27 = 0, E28 = 0, F28 = 0, E29 = 0, F29 = 0, E30, F30, E31, F31, E32, F32, E33, F33, E34, F34, E35, F35, E36, F36, E37, F37, E38, F38, E39, F39, E40, F40, E41, F41,
|
||||
E42, F42, E43, F43, E44, F44, E45, F45, E46, F46, E47, F47, E48, F48, E49, F49, E50, F50, E51, F51, E52, F52, E53, F53, E54, F54, E55, F55,
|
||||
E56, F56, E57, F57, E58, F58, E59, F59, E60, F60, E61, F61, E62, F62, E63, F63, E64, F64, E65, F65, E66, F66, E67, F67, E68, F68, E69, F69,
|
||||
E70, F70, E71, F71, E72, F72, E73, F73, E74, F74, E75, F75, E76, F76, E77, F77, E78, F78, E79, F79, E80, F80, E81, F81, E82, F82, E83, F83,
|
||||
E70, F70, E71, F71, E72, F72, E73, F73, E74 = 0, F74 = 0, E75, F75, E76, F76, E77, F77, E78, F78, E79, F79, E80, F80, E81, F81, E82, F82, E83, F83,
|
||||
E84, F84, E85, F85, E86, F86, E87, F87, E88, F88, E89, F89, E90, F90, E91, F91, E92, F92, E93, F93, E94, F94, E95, F95, E96, F96, E97, F97,
|
||||
E98, F98, E99, F99, E100, F100, E102 = 0, F102 = 0, E103 = 0, F103 = 0;
|
||||
JArray mergedData = Grid1.GetMergedData();
|
||||
|
@ -1700,6 +1710,18 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
{
|
||||
this.Grid1.Rows[15].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[15].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[15].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[15].Values[4].ToString()), 2).ToString() + "%";
|
||||
}
|
||||
if (E6 > 0 && E23 > 0)
|
||||
{
|
||||
this.Grid1.Rows[17].Values[4] = decimal.Round(E6 * 10000 / E23, 4);
|
||||
}
|
||||
if (F6 > 0 && F23 > 0)
|
||||
{
|
||||
this.Grid1.Rows[17].Values[5] = decimal.Round(F6 * 10000 / F23, 4);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.Grid1.Rows[17].Values[4].ToString()) && this.Grid1.Rows[17].Values[4].ToString() != "0" && !string.IsNullOrEmpty(this.Grid1.Rows[17].Values[5].ToString()))
|
||||
{
|
||||
this.Grid1.Rows[17].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[17].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[17].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[17].Values[4].ToString()), 2).ToString() + "%";
|
||||
}
|
||||
if (E6 > 0 && E25 > 0)
|
||||
{
|
||||
this.Grid1.Rows[19].Values[4] = decimal.Round(E6 * 10000 / E25, 4);
|
||||
|
@ -1712,6 +1734,42 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
{
|
||||
this.Grid1.Rows[19].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[19].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[19].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[19].Values[4].ToString()), 2).ToString() + "%";
|
||||
}
|
||||
if (E6 > 0 && E27 > 0)
|
||||
{
|
||||
this.Grid1.Rows[21].Values[4] = decimal.Round(E6 * 10000 / E27, 4);
|
||||
}
|
||||
if (F6 > 0 && F27 > 0)
|
||||
{
|
||||
this.Grid1.Rows[21].Values[5] = decimal.Round(F6 * 10000 / F27, 4);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.Grid1.Rows[21].Values[4].ToString()) && this.Grid1.Rows[21].Values[4].ToString() != "0" && !string.IsNullOrEmpty(this.Grid1.Rows[21].Values[5].ToString()))
|
||||
{
|
||||
this.Grid1.Rows[21].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[21].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[21].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[21].Values[4].ToString()), 2).ToString() + "%";
|
||||
}
|
||||
if (E6 > 0 && E29 > 0)
|
||||
{
|
||||
this.Grid1.Rows[23].Values[4] = decimal.Round(E6 * 10000 / E29, 4);
|
||||
}
|
||||
if (F6 > 0 && F29 > 0)
|
||||
{
|
||||
this.Grid1.Rows[23].Values[5] = decimal.Round(F6 * 10000 / F29, 4);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.Grid1.Rows[23].Values[4].ToString()) && this.Grid1.Rows[23].Values[4].ToString() != "0" && !string.IsNullOrEmpty(this.Grid1.Rows[23].Values[5].ToString()))
|
||||
{
|
||||
this.Grid1.Rows[23].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[23].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[23].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[23].Values[4].ToString()), 2).ToString() + "%";
|
||||
}
|
||||
if (E6 > 0 && E74 > 0)
|
||||
{
|
||||
this.Grid1.Rows[68].Values[4] = decimal.Round(E6 * 10000 / E74, 4);
|
||||
}
|
||||
if (F6 > 0 && F74 > 0)
|
||||
{
|
||||
this.Grid1.Rows[68].Values[5] = decimal.Round(F6 * 10000 / F74, 4);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.Grid1.Rows[68].Values[4].ToString()) && this.Grid1.Rows[68].Values[4].ToString() != "0" && !string.IsNullOrEmpty(this.Grid1.Rows[68].Values[5].ToString()))
|
||||
{
|
||||
this.Grid1.Rows[68].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[68].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[68].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[68].Values[4].ToString()), 2).ToString() + "%";
|
||||
}
|
||||
if (E102 > 0 && E103 > 0 && E21 > 0)
|
||||
{
|
||||
this.Grid1.Rows[96].Values[4] = decimal.Round((E102 + E103) / E21, 4);
|
||||
|
@ -1844,6 +1902,26 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
bool isEmpty = false;
|
||||
foreach (JObject mergedRow in Grid1.GetMergedData())
|
||||
{
|
||||
JObject values = mergedRow.Value<JObject>("values");
|
||||
int rowIndex = mergedRow.Value<int>("index");
|
||||
string sortIndex = values.Value<string>("SortIndex");
|
||||
if (sortIndex == "19" || sortIndex == "69" || sortIndex == "70")
|
||||
{
|
||||
if (Funs.GetNewDecimalOrZero(System.Web.HttpUtility.HtmlDecode(values.Value<string>("ThisYearValue"))) == 0)
|
||||
{
|
||||
isEmpty = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isEmpty)
|
||||
{
|
||||
ShowNotify("工业总产值(可比价)、万元产值二氧化碳排放(可比价)和二氧化碳排放量不能为空,必须填报数据!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
Save("add");
|
||||
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
|
@ -1851,11 +1929,51 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
|
||||
protected void btnUpdata_Click(object sender, EventArgs e)
|
||||
{
|
||||
bool isEmpty = false;
|
||||
foreach (JObject mergedRow in Grid1.GetMergedData())
|
||||
{
|
||||
JObject values = mergedRow.Value<JObject>("values");
|
||||
int rowIndex = mergedRow.Value<int>("index");
|
||||
string sortIndex = values.Value<string>("SortIndex");
|
||||
if (sortIndex == "19" || sortIndex == "69" || sortIndex == "70")
|
||||
{
|
||||
if (Funs.GetNewDecimalOrZero(System.Web.HttpUtility.HtmlDecode(values.Value<string>("ThisYearValue"))) == 0)
|
||||
{
|
||||
isEmpty = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isEmpty)
|
||||
{
|
||||
ShowNotify("工业总产值(可比价)、万元产值二氧化碳排放(可比价)和二氧化碳排放量不能为空,必须填报数据!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
Save("updata");
|
||||
}
|
||||
|
||||
protected void btnSubmit_Click(object sender, EventArgs e)
|
||||
{
|
||||
bool isEmpty = false;
|
||||
foreach (JObject mergedRow in Grid1.GetMergedData())
|
||||
{
|
||||
JObject values = mergedRow.Value<JObject>("values");
|
||||
int rowIndex = mergedRow.Value<int>("index");
|
||||
string sortIndex = values.Value<string>("SortIndex");
|
||||
if (sortIndex == "19" || sortIndex == "69" || sortIndex == "70")
|
||||
{
|
||||
if (Funs.GetNewDecimalOrZero(System.Web.HttpUtility.HtmlDecode(values.Value<string>("ThisYearValue"))) == 0)
|
||||
{
|
||||
isEmpty = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isEmpty)
|
||||
{
|
||||
ShowNotify("工业总产值(可比价)、万元产值二氧化碳排放(可比价)和二氧化碳排放量不能为空,必须填报数据!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
Save("submit");
|
||||
}
|
||||
#endregion
|
||||
|
|
|
@ -544,6 +544,10 @@ namespace FineUIPro.Web.common
|
|||
public static int GetCompanyComprehensivePlanNum()
|
||||
{
|
||||
var result = (from x in Funs.DB.Emergency_EmergencyList_Unit
|
||||
join y in Funs.DB.Base_EmergencyType on x.EmergencyTypeId equals y.EmergencyTypeId
|
||||
where y.EmergencyTypeName.Contains("综合") && x.CompileDate > Const.DtmarkTime
|
||||
select x).Count() +
|
||||
(from x in Funs.DB.Emergency_EmergencyList
|
||||
join y in Funs.DB.Base_EmergencyType on x.EmergencyTypeId equals y.EmergencyTypeId
|
||||
where y.EmergencyTypeName.Contains("综合") && x.CompileDate > Const.DtmarkTime
|
||||
select x).Count();
|
||||
|
@ -557,6 +561,10 @@ namespace FineUIPro.Web.common
|
|||
public static int GetCompanySpecialPlanNum()
|
||||
{
|
||||
var result = (from x in Funs.DB.Emergency_EmergencyList_Unit
|
||||
join y in Funs.DB.Base_EmergencyType on x.EmergencyTypeId equals y.EmergencyTypeId
|
||||
where y.EmergencyTypeName.Contains("专项") && x.CompileDate > Const.DtmarkTime
|
||||
select x).Count() +
|
||||
(from x in Funs.DB.Emergency_EmergencyList
|
||||
join y in Funs.DB.Base_EmergencyType on x.EmergencyTypeId equals y.EmergencyTypeId
|
||||
where y.EmergencyTypeName.Contains("专项") && x.CompileDate > Const.DtmarkTime
|
||||
select x).Count();
|
||||
|
@ -570,6 +578,10 @@ namespace FineUIPro.Web.common
|
|||
public static int GetCompanyOnSiteDisposalPlan()
|
||||
{
|
||||
var result = (from x in Funs.DB.Emergency_EmergencyList_Unit
|
||||
join y in Funs.DB.Base_EmergencyType on x.EmergencyTypeId equals y.EmergencyTypeId
|
||||
where y.EmergencyTypeName.Contains("现场处置") && x.CompileDate > Const.DtmarkTime
|
||||
select x).Count() +
|
||||
(from x in Funs.DB.Emergency_EmergencyList
|
||||
join y in Funs.DB.Base_EmergencyType on x.EmergencyTypeId equals y.EmergencyTypeId
|
||||
where y.EmergencyTypeName.Contains("现场处置") && x.CompileDate > Const.DtmarkTime
|
||||
select x).Count();
|
||||
|
@ -583,6 +595,9 @@ namespace FineUIPro.Web.common
|
|||
public static int GetCompanyDrillNum()
|
||||
{
|
||||
var result = (from x in Funs.DB.Emergency_DrillRecordList_Unit
|
||||
where x.CompileDate > Const.DtmarkTime
|
||||
select x).Count() +
|
||||
(from x in Funs.DB.Emergency_DrillRecordList
|
||||
where x.CompileDate > Const.DtmarkTime
|
||||
select x).Count();
|
||||
return result;
|
||||
|
@ -596,9 +611,10 @@ namespace FineUIPro.Web.common
|
|||
/// <returns></returns>
|
||||
public static int GetSafeTrainNum()
|
||||
{
|
||||
var result = (from x in Funs.DB.EduTrain_TrainRecord
|
||||
join y in Funs.DB.Base_TrainType on x.TrainTypeId equals y.TrainTypeId
|
||||
where y.TrainType == "1" && x.TrainStartDate > Const.DtmarkTime
|
||||
var result = (from x in Funs.DB.EduTrain_TrainRecordDetail
|
||||
join z in Funs.DB.EduTrain_TrainRecord on x.TrainingId equals z.TrainingId
|
||||
join y in Funs.DB.Base_TrainType on z.TrainTypeId equals y.TrainTypeId
|
||||
where y.TrainType == "1"
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
|
@ -609,9 +625,10 @@ namespace FineUIPro.Web.common
|
|||
/// <returns></returns>
|
||||
public static int GetSpecialTrainNum()
|
||||
{
|
||||
var result = (from x in Funs.DB.EduTrain_TrainRecord
|
||||
join y in Funs.DB.Base_TrainType on x.TrainTypeId equals y.TrainTypeId
|
||||
where y.TrainType == "2" && x.TrainStartDate > Const.DtmarkTime
|
||||
var result = (from x in Funs.DB.EduTrain_TrainRecordDetail
|
||||
join z in Funs.DB.EduTrain_TrainRecord on x.TrainingId equals z.TrainingId
|
||||
join y in Funs.DB.Base_TrainType on z.TrainTypeId equals y.TrainTypeId
|
||||
where y.TrainType == "2"
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
|
@ -622,9 +639,10 @@ namespace FineUIPro.Web.common
|
|||
/// <returns></returns>
|
||||
public static int GetSpecialOperationTrainNum()
|
||||
{
|
||||
var result = (from x in Funs.DB.EduTrain_TrainRecord
|
||||
join y in Funs.DB.Base_TrainType on x.TrainTypeId equals y.TrainTypeId
|
||||
where y.TrainType == "3" && x.TrainStartDate > Const.DtmarkTime
|
||||
var result = (from x in Funs.DB.EduTrain_TrainRecordDetail
|
||||
join z in Funs.DB.EduTrain_TrainRecord on x.TrainingId equals z.TrainingId
|
||||
join y in Funs.DB.Base_TrainType on z.TrainTypeId equals y.TrainTypeId
|
||||
where y.TrainType == "3"
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -241516,6 +241516,10 @@ namespace Model
|
|||
|
||||
private System.Nullable<decimal> _DeathEconomy;
|
||||
|
||||
private System.Nullable<int> _LossCount;
|
||||
|
||||
private System.Nullable<int> _DeathCount;
|
||||
|
||||
private EntityRef<Manager_MonthReportC> _Manager_MonthReportC;
|
||||
|
||||
#region 可扩展性方法定义
|
||||
|
@ -241548,6 +241552,10 @@ namespace Model
|
|||
partial void OnDeathWorkTimeChanged();
|
||||
partial void OnDeathEconomyChanging(System.Nullable<decimal> value);
|
||||
partial void OnDeathEconomyChanged();
|
||||
partial void OnLossCountChanging(System.Nullable<int> value);
|
||||
partial void OnLossCountChanged();
|
||||
partial void OnDeathCountChanging(System.Nullable<int> value);
|
||||
partial void OnDeathCountChanged();
|
||||
#endregion
|
||||
|
||||
public Manager_Month_InjuryAccidentC()
|
||||
|
@ -241820,6 +241828,46 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LossCount", DbType="Int")]
|
||||
public System.Nullable<int> LossCount
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._LossCount;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._LossCount != value))
|
||||
{
|
||||
this.OnLossCountChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._LossCount = value;
|
||||
this.SendPropertyChanged("LossCount");
|
||||
this.OnLossCountChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DeathCount", DbType="Int")]
|
||||
public System.Nullable<int> DeathCount
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._DeathCount;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._DeathCount != value))
|
||||
{
|
||||
this.OnDeathCountChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._DeathCount = value;
|
||||
this.SendPropertyChanged("DeathCount");
|
||||
this.OnDeathCountChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Manager_Month_InjuryAccidentC_Manager_MonthReportC", Storage="_Manager_MonthReportC", ThisKey="MonthReportId", OtherKey="MonthReportId", IsForeignKey=true)]
|
||||
public Manager_MonthReportC Manager_MonthReportC
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue