提交代码
This commit is contained in:
@@ -50,7 +50,7 @@ namespace FineUIPro.Web.common
|
||||
int wHours = 0;
|
||||
DateTime? sDate = Funs.GetNewDateTime(DateTime.Now.Year.ToString() + "-" + DateTime.Now.Month.ToString());
|
||||
wHours = (from x in db.T_d_EmployInOutRecord where x.ProjectId == ProjectId select x.ManHours ?? 0).ToList().Sum();
|
||||
//this.divSafeWorkTime.InnerHtml = wHours.ToString();
|
||||
this.divSafeWorkTime.InnerHtml = wHours.ToString();
|
||||
|
||||
//本月安全人工时
|
||||
int wHoursMonth = 0;
|
||||
@@ -59,14 +59,14 @@ namespace FineUIPro.Web.common
|
||||
{
|
||||
wHoursMonth = Convert.ToInt32(dayReports[0].DayWorkTime);
|
||||
}
|
||||
//this.divSafeWorkTimeMonth.InnerHtml = wHoursMonth.ToString();
|
||||
this.divSafeWorkTimeMonth.InnerHtml = wHoursMonth.ToString();
|
||||
|
||||
//安全培训累计人员
|
||||
var getTrainRecord = db.EduTrain_TrainRecord.Where(x => x.ProjectId == ProjectId).Sum(x => x.TrainPersonNum) ?? 0;
|
||||
//修改:增加博晟教育中的人数
|
||||
var boShengCount = db.Bo_Sheng_TrainPerson.Where(x => x.ProjectId == ProjectId && (x.DeleteTag == "False" || x.DeleteTag == null)).ToList().Count;
|
||||
|
||||
//this.divSafePersonNum.InnerHtml = (getTrainRecord + boShengCount).ToString();
|
||||
this.divSafePersonNum.InnerHtml = (getTrainRecord + boShengCount).ToString();
|
||||
|
||||
//安全管理人员
|
||||
var allSum = from x in Funs.DB.SitePerson_Person
|
||||
@@ -77,7 +77,7 @@ namespace FineUIPro.Web.common
|
||||
join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId
|
||||
where y.IsHsse == true && x.ProjectId == ProjectId //安管人员
|
||||
select x;
|
||||
//this.divSafeManagePersonNum.InnerHtml = glAllPerson.Count().ToString();
|
||||
this.divSafeManagePersonNum.InnerHtml = glAllPerson.Count().ToString();
|
||||
|
||||
//未遂事故
|
||||
var wsAccidentList1 = from x in db.Accident_AccidentPersonRecord
|
||||
@@ -88,7 +88,7 @@ namespace FineUIPro.Web.common
|
||||
join y in db.Sys_Const on x.AccidentTypeId equals y.ConstValue
|
||||
where y.ConstText.Contains("未遂") && x.ProjectId == ProjectId
|
||||
select x;
|
||||
//this.divWS.InnerHtml = (wsAccidentList1.Count() + wsAccidentList2.Count()).ToString();
|
||||
this.divWS.InnerHtml = (wsAccidentList1.Count() + wsAccidentList2.Count()).ToString();
|
||||
|
||||
//整改数据
|
||||
getZgsj();
|
||||
@@ -104,12 +104,12 @@ namespace FineUIPro.Web.common
|
||||
int CqmsPxNum = (from x in Funs.DB.Comprehensive_InspectionPerson
|
||||
where x.IsTrain == true && x.ProjectId == ProjectId
|
||||
select x).Count();
|
||||
//divCqmsPxNum.InnerHtml = CqmsPxNum.ToString();
|
||||
divCqmsPxNum.InnerHtml = CqmsPxNum.ToString();
|
||||
|
||||
//施工审批量
|
||||
int sgspl = Funs.DB.Comprehensive_GeneralPlanApproval.Where(x => x.ProjectId == ProjectId && x.AuditMan != null && x.AuditMan != "" && x.ApprovalMan != null && x.ApprovalMan != "").Count()
|
||||
+ Funs.DB.Comprehensive_MajorPlanApproval.Where(x => x.ProjectId == ProjectId && x.AuditMan != null && x.AuditMan != "" && x.ApprovalMan != null && x.ApprovalMan != "").Count();
|
||||
//div_sgfaSpl.InnerHtml = sgspl.ToString();
|
||||
div_sgfaSpl.InnerHtml = sgspl.ToString();
|
||||
GetJD();
|
||||
//质量共检
|
||||
getZlgj();
|
||||
@@ -150,11 +150,11 @@ namespace FineUIPro.Web.common
|
||||
if (AllCount > 0)
|
||||
{
|
||||
////当前现场总人数
|
||||
//div_xcrs.InnerHtml = AllCount.ToString();
|
||||
div_xcrs.InnerHtml = AllCount.ToString();
|
||||
//作业人数
|
||||
//div_zyxcrs.InnerHtml = (AllCount - MCount).ToString();
|
||||
div_zyxcrs.InnerHtml = (AllCount - MCount).ToString();
|
||||
//管理人数
|
||||
//div_glxcrs.InnerHtml = MCount.ToString();
|
||||
div_glxcrs.InnerHtml = MCount.ToString();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -182,10 +182,10 @@ namespace FineUIPro.Web.common
|
||||
#region 整改数据
|
||||
protected void getZgsj()
|
||||
{
|
||||
//div_zgsj.InnerHtml = (GetGeneralClosedNum() + GetGeneralNotClosedNum()).ToString();
|
||||
//div_zgywc.InnerHtml = GetGeneralClosedNum().ToString();
|
||||
//div_zgwwc.InnerHtml = GetGeneralNotClosedNum().ToString();
|
||||
//div_zgwcl.InnerHtml = String.Format("{0:N2}", 100.0 * GetGeneralClosedNum() / (GetGeneralNotClosedNum() + GetGeneralClosedNum())).Replace("NaN", "0") + "%";
|
||||
div_zgsj.InnerHtml = (GetGeneralClosedNum() + GetGeneralNotClosedNum()).ToString();
|
||||
div_zgywc.InnerHtml = GetGeneralClosedNum().ToString();
|
||||
div_zgwwc.InnerHtml = GetGeneralNotClosedNum().ToString();
|
||||
div_zgwcl.InnerHtml = String.Format("{0:N2}", 100.0 * GetGeneralClosedNum() / (GetGeneralNotClosedNum() + GetGeneralClosedNum())).Replace("NaN", "0") + "%";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -238,7 +238,7 @@ namespace FineUIPro.Web.common
|
||||
divOwnUnitTitle = "";
|
||||
divSGUnitTitle = "";
|
||||
divJLUnitTitle = "";
|
||||
divProjectImg = "<div class=\"swiper-slide\"><img src=\"./imags/16.png\"></div>";
|
||||
divProjectImg = "<div class=\"swiper-slide\"><img src=\"../res/images/16.png\"></div>";
|
||||
var project = ProjectService.GetProjectByProjectId(this.ProjectId);
|
||||
if (project != null)
|
||||
{
|
||||
@@ -288,18 +288,18 @@ namespace FineUIPro.Web.common
|
||||
//this.divProjectMoney.InnerHtml = divProjectMoneyTitle = project.ProjectMoney.ToString() + "万元";
|
||||
if (project.EndDate.HasValue)
|
||||
{
|
||||
//this.divEndDate.InnerHtml = string.Format("{0:yyyy-MM-dd}", project.EndDate);
|
||||
this.divEndDate.InnerHtml = string.Format("{0:yyyy-MM-dd}", project.EndDate);
|
||||
int endDays = (project.EndDate.Value - DateTime.Now).Days;
|
||||
if (endDays >= 0)
|
||||
{
|
||||
//this.divRemainingDays.InnerHtml = endDays.ToString() + "<span>天</span>";
|
||||
this.divRemainingDays.InnerHtml = endDays.ToString() + "<span>天</span>";
|
||||
}
|
||||
if (project.StartDate.HasValue)
|
||||
{
|
||||
int pdays = (project.EndDate.Value - project.StartDate.Value).Days;
|
||||
if (pdays >= 0)
|
||||
{
|
||||
//this.divProjectDays.InnerHtml = pdays.ToString() + "<span>天</span>";
|
||||
this.divProjectDays.InnerHtml = pdays.ToString() + "<span>天</span>";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -332,7 +332,7 @@ namespace FineUIPro.Web.common
|
||||
}
|
||||
}
|
||||
|
||||
divProjectImg = divProjectImg.Replace("<div class=\"swiper-slide\"><img src=\"./imags/16.png\"></div>", "");
|
||||
divProjectImg = divProjectImg.Replace("<div class=\"swiper-slide\"><img src=\"../res/images/16.png\"></div>", "");
|
||||
/*string firtstUrl = Funs.GetStrListByStr(url, ',').FirstOrDefault();
|
||||
if (!string.IsNullOrEmpty(firtstUrl))
|
||||
{
|
||||
@@ -364,6 +364,7 @@ namespace FineUIPro.Web.common
|
||||
protected string riskData2;
|
||||
protected string riskData3;
|
||||
protected string riskData4;
|
||||
protected string riskDataRate;
|
||||
/// <summary>
|
||||
/// 获取风险管控
|
||||
/// </summary>
|
||||
@@ -382,6 +383,14 @@ namespace FineUIPro.Web.common
|
||||
riskData2 = getHazards.Count(x => x.RiskLevel == 2).ToString();
|
||||
riskData3 = getHazards.Count(x => x.RiskLevel == 3).ToString();
|
||||
riskData4 = getHazards.Count(x => x.RiskLevel == 4).ToString();
|
||||
if (getHazards.Count() > 0)
|
||||
{
|
||||
riskDataRate = (100.0 * getHazards.Count(x => x.RiskLevel == 4) / getHazards.Count()).ToString("0.##");
|
||||
}
|
||||
else
|
||||
{
|
||||
riskDataRate = "0";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -946,7 +955,12 @@ namespace FineUIPro.Web.common
|
||||
{
|
||||
gfx = "非高风险";
|
||||
}
|
||||
var shortUnitname = Funs.DB.Base_Unit.Where(x => x.UnitId == item.UnitId).FirstOrDefault().ShortUnitName;
|
||||
string shortUnitname = string.Empty;
|
||||
var unit = Funs.DB.Base_Unit.Where(x => x.UnitId == item.UnitId).FirstOrDefault();
|
||||
if (unit != null)
|
||||
{
|
||||
shortUnitname = unit.ShortUnitName;
|
||||
}
|
||||
returnHtml += "<div class=\"li\">" + item.LicenseManagerCode + "-" + shortUnitname + "-" + item.WorkAreaName + "-" + gfx + "-" + item.LicenseTypeName
|
||||
+ "</div>";
|
||||
}
|
||||
@@ -987,12 +1001,12 @@ namespace FineUIPro.Web.common
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
var Gjsxcount = tb.Rows.Count;
|
||||
//div_gjsx.InnerHtml = Gjsxcount.ToString();
|
||||
div_gjsx.InnerHtml = Gjsxcount.ToString();
|
||||
|
||||
var getDataList = Funs.DB.Sp_Project_GetToDoItems(this.CurrUser.LoginProjectId, this.CurrUser.UserId).ToList();
|
||||
//待办事项、个人流程
|
||||
//div_dbsx.InnerHtml = getDataList.Count().ToString();
|
||||
//div_grlc.InnerHtml = getDataList.Count().ToString();
|
||||
div_dbsx.InnerHtml = getDataList.Count().ToString();
|
||||
div_grlc.InnerHtml = getDataList.Count().ToString();
|
||||
foreach (var item in getDataList)
|
||||
{
|
||||
returnDbHtml += "<div class=\"li\" style=\"cursor:pointer\" onclick=\"returnWindows('" + item.PCUrl + "')\"><span>" + item.MenuName + "</span><span>" + item.Content + "</span><span>" +
|
||||
@@ -1003,7 +1017,7 @@ namespace FineUIPro.Web.common
|
||||
{
|
||||
returnDbHtml = "<div></div>";
|
||||
}
|
||||
//this.div_dbsxlist.InnerHtml = returnDbHtml;
|
||||
this.div_dbsxlist.InnerHtml = returnDbHtml;
|
||||
|
||||
|
||||
}
|
||||
@@ -1051,7 +1065,7 @@ namespace FineUIPro.Web.common
|
||||
{
|
||||
returnDbHtml = "<div></div>";
|
||||
}
|
||||
//this.div_gjsxlist.InnerHtml = returnDbHtml;
|
||||
this.div_gjsxlist.InnerHtml = returnDbHtml;
|
||||
|
||||
List<SqlParameter> listStaticListStr = new List<SqlParameter>();
|
||||
|
||||
@@ -1099,12 +1113,12 @@ namespace FineUIPro.Web.common
|
||||
protected string gdclHtml;
|
||||
protected string sbclHtml;
|
||||
|
||||
protected string gdclHead = "<div class=\"trth\" style=\"background: rgba(33, 55, 113, .4);\"><div class=\"th r-line\" style=\"width: .7875rem;\"><p>材料类别</p></div><div class=\"th r-line\" style=\"width: .8375rem;\"><p>设计量</p></div><div class=\"th r-line\" style=\"width: 1.575rem;\"><p class=\"b-line\">采购量</p><p><span class=\"r-line\">采购量</span><span class=\"r-line\">百分比</span></p></div><div class=\"th r-line\" style=\"width: 1.575rem;\"><p class=\"b-line\">到货量</p><p><span class=\"r-line\">已到货</span><span class=\"r-line\">百分比</span></p></div><div class=\"th\" style=\"width: 1.575rem;\"><p class=\"b-line\">领料量</p><p><span class=\"r-line\">已领料</span><span>百分比</span></p></div></div>";
|
||||
protected string sbclHead = "<div class=\"trth\" style=\"background: rgba(33, 55, 113, .4);\"><div class=\"th r-line\" style=\"width: 2.9875rem;\"><p>合同号</p></div>" +
|
||||
"<div class=\"th r-line\" style=\"width: .7875rem;\"><p>采购总量</p></div>" +
|
||||
"<div class=\"th r-line\" style=\"width: .7875rem;\"><p>发货总量</p></div>" +
|
||||
"<div class=\"th r-line\" style=\"width: .7875rem;\"><p>到货总量</p></div>" +
|
||||
"<div class=\"th r-line\" style=\"width: .9875rem;\"><p>到货百分比</p></div>";
|
||||
protected string gdclHead = "<div class=\"th-p\">材料类别</div><div class=\"th-p\">设计量</div><div class=\"th-p\"><p>采购量</p><p><span>采购量</span><span>百分比</span></p></div><div class=\"th-p\"><p>到货量</p><p><span>已到货</span><span>百分比</span></p></div><div class=\"th-p\"><p>领料量</p><p><span>已领料</span><span>百分比</span></p></div>";
|
||||
protected string sbclHead = "<div class=\"th-p\">合同号</div>" +
|
||||
"<div class=\"th-p\" >采购总量</div>" +
|
||||
"<div class=\"th-p\" >发货总量</div>" +
|
||||
"<div class=\"th-p\" >到货总量</div>" +
|
||||
"<div class=\"th-p\" >到货百分比</div>";
|
||||
private void getCldh()
|
||||
{
|
||||
//管道材料
|
||||
@@ -1112,15 +1126,12 @@ namespace FineUIPro.Web.common
|
||||
var list = Funs.DB.CLGL_PipelineMaterialSumList.Where(x => x.Type == "M" && x.ProjectId == pid);
|
||||
foreach (var item in list)
|
||||
{
|
||||
gdclHtml += "<div class=\"tr\">";
|
||||
gdclHtml += "<span class=\"r-line\" style=\"width: .7875rem; \">" + item.C1 + "</span>";
|
||||
gdclHtml += "<span class=\"r-line\" style=\"width: .8375rem; \">" + (string.IsNullOrEmpty(item.C2) ? "0" : item.C2) + "</span>";
|
||||
gdclHtml += "<span class=\"r-line\" style=\"width: .7875rem; \">" + (string.IsNullOrEmpty(item.C4) ? "0" : item.C4) + "</span>";
|
||||
gdclHtml += "<span class=\"r-line\" style=\"width: .7875rem; \">" + (string.IsNullOrEmpty(item.C5) ? "0%" : item.C5) + "</span>";
|
||||
gdclHtml += "<span class=\"r-line\" style=\"width: .7875rem; \">" + (string.IsNullOrEmpty(item.C6) ? "0" : item.C6) + "</span>";
|
||||
gdclHtml += "<span class=\"r-line\" style=\"width: .7875rem; \">" + (string.IsNullOrEmpty(item.C7) ? "0%" : item.C7) + "</span>";
|
||||
gdclHtml += "<span class=\"r-line\" style=\"width: .7875rem; \">" + (string.IsNullOrEmpty(item.C8) ? "0" : item.C8) + "</span>";
|
||||
gdclHtml += "<span class=\"r-line\" style=\"width: .7875rem; \">" + (string.IsNullOrEmpty(item.C9) ? "0%" : item.C9) + "</span>";
|
||||
gdclHtml += "<div class=\"row\">";
|
||||
gdclHtml += "<div class=\"tr\" >" + item.C1 + "</div>";
|
||||
gdclHtml += "<div class=\"tr\" >" + (string.IsNullOrEmpty(item.C2) ? "0" : item.C2) + "</div>";
|
||||
gdclHtml += "<div class=\"tr\" ><p><span>" + (string.IsNullOrEmpty(item.C4) ? "0" : item.C4) + "</span><span>" + (string.IsNullOrEmpty(item.C5) ? "0%" : item.C5) + "</span></p></div>";
|
||||
gdclHtml += "<div class=\"tr\" ><p><span>" + (string.IsNullOrEmpty(item.C6) ? "0" : item.C6) + "</span><span>" + (string.IsNullOrEmpty(item.C7) ? "0%" : item.C7) + "</span></p></div>";
|
||||
gdclHtml += "<div class=\"tr\" ><p><span>" + (string.IsNullOrEmpty(item.C8) ? "0" : item.C8) + "</span><span>" + (string.IsNullOrEmpty(item.C9) ? "0%" : item.C9) + "</span></p></div>";
|
||||
gdclHtml += "</div>";
|
||||
}
|
||||
|
||||
@@ -1128,7 +1139,7 @@ namespace FineUIPro.Web.common
|
||||
var SbclList = Funs.DB.CLGL_ContractListSum.Where(x => x.C1 == "设备" && x.ProjectId == pid);
|
||||
foreach (var item in SbclList)
|
||||
{
|
||||
sbclHtml += "<div class=\"tr\">";
|
||||
sbclHtml += "<div class=\"row\">";
|
||||
double SbcllCgl = 0.0;
|
||||
double Sbdhs = 0.0;
|
||||
if (string.IsNullOrEmpty(item.C7))
|
||||
@@ -1141,10 +1152,10 @@ namespace FineUIPro.Web.common
|
||||
SbcllCgl += Convert.ToDouble(item.C7);
|
||||
Sbdhs += Convert.ToDouble(item.C9);
|
||||
}
|
||||
sbclHtml += "<span class=\"r-line\" style=\"width: 2.9875rem; \">" + item.C2 + "</span>";
|
||||
sbclHtml += "<span class=\"r-line\" style=\"width: .7875rem; \">" + SbcllCgl + "</span>";
|
||||
sbclHtml += "<span class=\"r-line\" style=\"width: .7875rem; \">" + item.C7 + "</span>";
|
||||
sbclHtml += "<span class=\"r-line\" style=\"width: .7875rem; \">" + Sbdhs + "</span>";
|
||||
sbclHtml += "<div class=\"tr\" >" + item.C2 + "</div>";
|
||||
sbclHtml += "<div class=\"tr\" >" + SbcllCgl + "</div>";
|
||||
sbclHtml += "<div class=\"tr\" >" + item.C7 + "</div>";
|
||||
sbclHtml += "<div class=\"tr\" >" + Sbdhs + "</div>";
|
||||
//百分比
|
||||
var dhbfb = "0%";
|
||||
if (SbcllCgl + Sbdhs != 0)
|
||||
@@ -1152,7 +1163,7 @@ namespace FineUIPro.Web.common
|
||||
dhbfb = String.Format("{0:N2}", 100.0 * Sbdhs / (Sbdhs + SbcllCgl), 2) + "%";
|
||||
|
||||
}
|
||||
sbclHtml += "<span class=\"r-line\" style=\"width: .9875rem; \">" + dhbfb + "</span>";
|
||||
sbclHtml += "<div class=\"tr\" >" + dhbfb + "</div>";
|
||||
sbclHtml += "</div>";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user