Merge branch 'master' of https://gitee.com/frane-yang/SGGL_CWCEC
This commit is contained in:
@@ -36,17 +36,17 @@
|
||||
<div class="y_box_label y_image_default">安全统计</div>
|
||||
<div class="y_box_main">
|
||||
<div class="y_row y_rgss">
|
||||
<div class="y_rgs y_column y_image_default">
|
||||
<div class="y_rgs y_column y_image_default js-hover" data-type="WorkingHourData">
|
||||
<p class="y_rgs_val" id="divSafeWorkTime" runat="server">0000000000</p>
|
||||
<div class="y_rgs_label">累计安全人工时</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="y_rgs y_column y_image_default">
|
||||
<div class="y_rgs y_column y_image_default js-hover" data-type="WorkingHourData">
|
||||
<p class="y_rgs_val" id="divSafeWorkTimeMonth" runat="server">0000000000</p>
|
||||
<div class="y_rgs_label" >本月安全人工时</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="y_rgs y_column y_image_default">
|
||||
<div class="y_rgs y_column y_image_default js-hover" data-type="SafeTrainData">
|
||||
<p class="y_rgs_val" id="divSafePersonNum" runat="server">0</p>
|
||||
<div class="y_rgs_label">安全培训累计人员</label>
|
||||
</div>
|
||||
@@ -57,7 +57,7 @@
|
||||
<div class="y_aq_label">安全管理人员</div>
|
||||
<div class="y_aq_value" id="divSafeManagePersonNum" runat="server">0</div>
|
||||
</div>
|
||||
<div class="y_aq_box y_image_default y_row">
|
||||
<div class="y_aq_box y_image_default y_row js-hover" data-type="AccidentEventData">
|
||||
<div class="y_aq_label">未遂事件</div>
|
||||
<div class="y_aq_value" runat="server" id="divWS">0</div>
|
||||
</div>
|
||||
@@ -92,15 +92,15 @@
|
||||
<div class="y_box">
|
||||
<div class="y_box_label y_image_default">质量概况</div>
|
||||
<div class="y_box_main">
|
||||
<div class="y_zlry y_row y_image_default">
|
||||
<div class="y_zlry y_row y_image_default js-hover" data-type="ManagerData">
|
||||
<div class="y_zlry_label">质量管理人员</div>
|
||||
<div class="y_zlry_value" id="divCqmsManageNum" runat="server">0</div>
|
||||
</div>
|
||||
<div class="y_zlry y_row y_image_default" style="margin-top: .125rem;">
|
||||
<div class="y_zlry y_row y_image_default js-hover" data-type="ManagerData" style="margin-top: .125rem;">
|
||||
<div class="y_zlry_label">质量培训累计人员</div>
|
||||
<div class="y_zlry_value" id="divCqmsPxNum" runat="server">0</div>
|
||||
</div>
|
||||
<div class="y_zlmap y_row">
|
||||
<div class="y_zlmap y_row js-hover" data-type="QualityProblem">
|
||||
<div class="zgmap" id="zlmap"></div>
|
||||
<div class="zgmap" id="ycmap"></div>
|
||||
<div class="zgmap" id="hjmap"></div>
|
||||
@@ -141,12 +141,12 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="site">
|
||||
<div class="y_top_boxs y_row">
|
||||
<div class="y_top_boxs y_row js-hover" data-type="ProjectData">
|
||||
<div class="y_top_box y_image_default y_column">
|
||||
<div class="y_top_box_label" style="color: #12CDA2;">在建项目</div>
|
||||
<div class="y_top_box_value" style="color: #12CDA2;" id="div_zjxmCount" runat="server"></div>
|
||||
</div>
|
||||
<div class="y_top_box y_image_default y_column">
|
||||
<div class="y_top_box y_image_default y_column js-hover" data-type="ProjectPersonData">
|
||||
<div class="y_top_box_label" style="color: #00FFFF;">参建人数</div>
|
||||
<div class="y_top_box_value" style="color: #00FFFF;" id="div_cjrsCount" runat="server"></div>
|
||||
</div>
|
||||
@@ -161,7 +161,7 @@
|
||||
</div>
|
||||
<div class="site y_column">
|
||||
<!-- 人员信息 -->
|
||||
<div class="y_box">
|
||||
<div class="y_box js-hover" data-type="ProjectPersonData">
|
||||
<div class="y_box_label y_image_default">人员信息 </div>
|
||||
<div class="y_rys y_row">
|
||||
<div class="y_ry y_row y_image_default">
|
||||
@@ -184,7 +184,7 @@
|
||||
<div class="y_box_label y_image_default">进度情况 <span class="y_more">更多></span></div>
|
||||
<div class="y_box_main" id="jdmap"></div>
|
||||
</div>
|
||||
<div class="y_box">
|
||||
<div class="y_box" style="font-size: 15px;">
|
||||
<div class="y_box_label y_image_default">
|
||||
<div class="y_tabs y_row">
|
||||
<span class="y_image_default y_tab-action" id="span_gdcl" onclick="clOnclick(0)" style="cursor:pointer">管道材料</span>
|
||||
@@ -248,6 +248,190 @@
|
||||
<script type="text/javascript" src="../res/index/js/china.js"></script>
|
||||
<script type="text/javascript" src="../res/index/js/world.js"></script>
|
||||
<script>
|
||||
$(function () {
|
||||
initClick();
|
||||
})
|
||||
|
||||
function initClick() {
|
||||
// 设置iframe高度
|
||||
$('.click-wrap .click-item iframe').height($('.click-wrap').height())
|
||||
$(".js-hover").click(function () {
|
||||
var htmlContent = GetClickHtml(this)
|
||||
// $('.click-wrap').show()
|
||||
// $(".hover-wrap").hide()
|
||||
})
|
||||
$('.click-close').click(function () {
|
||||
$('.click-wrap').hide()
|
||||
})
|
||||
}
|
||||
|
||||
function GetClickHtml(obj) {
|
||||
var $this = $(obj), type = $this.attr('data-type'), tabType = $this.attr('data-tabType') || '';
|
||||
var title = '';
|
||||
if (tabType != '') {
|
||||
tabType = $this.closest('.bb-item').find('.tab-wrap .tab .active').attr('data-type')
|
||||
if (tabType == null) {
|
||||
tabType = $this.closest('.str-bottom').find('.tab-wrap .tab .active').attr('data-type')
|
||||
}
|
||||
}
|
||||
console.log(type)
|
||||
if (type == 'HeadOfficeNum') {
|
||||
$('iframe').attr('src', '../DataShow/CompanyPerson.aspx') //企业总部
|
||||
window.open("../DataShow/CompanyPerson.aspx")
|
||||
}
|
||||
else if (type == 'Branch') {
|
||||
$('iframe').attr('src', '../DataShow/CompanyPerson.aspx') //分支机构
|
||||
window.open("../DataShow/CompanyPerson.aspx")
|
||||
}
|
||||
else if (type == 'ProjectNum') {
|
||||
$('iframe').attr('src', '../DataShow/ProjectPerson.aspx')//项目人员
|
||||
window.open("../DataShow/ProjectPerson.aspx")
|
||||
|
||||
}
|
||||
else if (type == 'SafetyInjectionEngineer') {
|
||||
$('iframe').attr('src', '../DataShow/ProjectPerson.aspx')//项目人员
|
||||
window.open("../DataShow/ProjectPerson.aspx")
|
||||
|
||||
}
|
||||
else if (type == 'Certificate') {
|
||||
$('iframe').attr('src', '../DataShow/ProjectPerson.aspx') //项目人员
|
||||
window.open("../DataShow/ProjectPerson.aspx")
|
||||
|
||||
}
|
||||
else if (type == 'SafetyMeetingData') {
|
||||
$('iframe').attr('src', '../DataShow/Meeting.aspx') //安全会议数据
|
||||
window.open("../DataShow/Meeting.aspx")
|
||||
|
||||
}
|
||||
else if (type == 'BeUnderConstructionNum') {
|
||||
$('iframe').attr('src', '../DataShow/Project.aspx') //项目信息
|
||||
window.open("../DataShow/Project.aspx")
|
||||
|
||||
}
|
||||
else if (type == 'ShutdownNum') {
|
||||
$('iframe').attr('src', '../DataShow/Project.aspx') //项目信息
|
||||
window.open("../DataShow/Project.aspx")
|
||||
|
||||
}
|
||||
else if (type == 'JoinConstructionPersonNum') {
|
||||
$('iframe').attr('src', '../DataShow/Project.aspx') //项目信息
|
||||
window.open("../DataShow/Project.aspx")
|
||||
|
||||
}
|
||||
else if (type == 'MajorProjectsUnderConstructionNum') {
|
||||
$('iframe').attr('src', '../DataShow/Project.aspx') //项目信息
|
||||
window.open("../DataShow/Project.aspx")
|
||||
|
||||
}
|
||||
else if (type == 'WorkingHourData') {
|
||||
$('iframe').attr('src', '../DataShow/WorkingHours.aspx') //工时数据
|
||||
window.open("../DataShow/WorkingHours.aspx")
|
||||
|
||||
}
|
||||
else if (type == 'SafeTrainData') {
|
||||
$('iframe').attr('src', '../DataShow/EduTrain.aspx') //安全教育培训
|
||||
window.open("../DataShow/EduTrain.aspx")
|
||||
|
||||
}
|
||||
else if (type == 'EnvironmentalData') {
|
||||
$('iframe').attr('src', '../DataShow/Environmental.aspx') //环保数据
|
||||
window.open("../DataShow/Environmental.aspx")
|
||||
|
||||
}
|
||||
else if (type == 'SafeCost') {
|
||||
$('iframe').attr('src', '../DataShow/SecurityCost.aspx') //安全费用
|
||||
window.open("../DataShow/SecurityCost.aspx")
|
||||
|
||||
}
|
||||
else if (type == 'ConstructionEquipment') {
|
||||
$('iframe').attr('src', '../DataShow/ConstructionEquipment.aspx') //施工机具设备
|
||||
window.open("../DataShow/ConstructionEquipment.aspx")
|
||||
|
||||
|
||||
}
|
||||
else if (type == 'HighRiskWorkPermit') {
|
||||
$('iframe').attr('src', '../DataShow/License.aspx') //高风险作业许可
|
||||
window.open("../DataShow/License.aspx")
|
||||
|
||||
}
|
||||
else if (type == 'SafetySupervisionAndInspectionData') {
|
||||
$('iframe').attr('src', '../DataShow/Check.aspx') //安全监督检查
|
||||
window.open("../DataShow/Check.aspx")
|
||||
|
||||
}
|
||||
else if (type == 'AccidentEventData') {
|
||||
$('iframe').attr('src', '../DataShow/Accident.aspx') //事故事件数据
|
||||
window.open("../DataShow/Accident.aspx")
|
||||
|
||||
}
|
||||
else if (type == 'SafeRiskData') {
|
||||
$('iframe').attr('src', '../DataShow/SecurityRisk.aspx') //安全风险数据
|
||||
window.open("../DataShow/SecurityRisk.aspx")
|
||||
|
||||
}
|
||||
else if (type == 'yjglsj'<%-- && tabType == "qyj"--%>) {
|
||||
$('iframe').attr('src', '../DataShow/Emergency.aspx')//应急管理数据-企业级
|
||||
window.open("../DataShow/Emergency.aspx")
|
||||
|
||||
}<%--
|
||||
else if (type == 'yjglsj' && tabType == "xmj") {
|
||||
$('iframe').attr('src', '../DataShow/Emergency.aspx')//应急管理数据-项目级
|
||||
window.open("../DataShow/Emergency.aspx")
|
||||
|
||||
}--%>
|
||||
else if (type == 'wdgcsj'<%-- && tabType == "large"--%>) {
|
||||
$('iframe').attr('src', '../DataShow/LargeEngineering.aspx')//危大工程- 危大工程
|
||||
window.open("../DataShow/LargeEngineering.aspx")
|
||||
|
||||
}<%--
|
||||
else if (type == 'wdgcsj' && tabType == "super") {
|
||||
$('iframe').attr('src', '../DataShow/LargeEngineering.aspx') // 危大工程 - 超危大工程
|
||||
window.open("../DataShow/LargeEngineering.aspx")
|
||||
|
||||
|
||||
}--%>
|
||||
else if (type == 'yhpc' && tabType == "yb") {
|
||||
$('iframe').attr('src', '../DataShow/HiddenRectification.aspx') //隐患排查-一般隐患
|
||||
window.open("../DataShow/HiddenRectification.aspx")
|
||||
|
||||
}
|
||||
else if (type == 'yhpc' && tabType == "zd") {
|
||||
$('iframe').attr('src', '../DataShow/HiddenRectification.aspx')//隐患排查-重大隐患
|
||||
window.open("../DataShow/HiddenRectification.aspx")
|
||||
|
||||
} else if (type == 'QualityProblem') {
|
||||
// $('iframe').attr('src', '../InterfacePopup/CQMS/QualityProblem.aspx') //质量问题数据
|
||||
window.open("../DataShow/QualityProblem.aspx")
|
||||
|
||||
} else if (type == 'ManagerData') {
|
||||
// $('iframe').attr('src', '../InterfacePopup/CQMS/ManagerData.aspx') //管理人员数据
|
||||
window.open("../DataShow/QualityPerson.aspx")
|
||||
|
||||
title = '管理人员数据'
|
||||
} else if (type == 'ProjectData') {
|
||||
// $('iframe').attr('src', '../InterfacePopup/CQMS/ManagerData.aspx') //管理人员数据
|
||||
window.open("../DataShow/Project.aspx")
|
||||
|
||||
title = '项目数据'
|
||||
}
|
||||
else if (type == 'ProjectPersonData') {
|
||||
// $('iframe').attr('src', '../InterfacePopup/CQMS/ManagerData.aspx') //管理人员数据
|
||||
window.open("../DataShow/ProjectPerson.aspx")
|
||||
|
||||
title = '项目数据'
|
||||
}
|
||||
|
||||
/*
|
||||
else if (type == 'Video') {
|
||||
$('iframe').attr('src', '../InterfacePopup/HSSE/VideoView.aspx') //视频监控
|
||||
}*/
|
||||
else {
|
||||
// $('iframe').attr('src', '../SysManage/Unit.aspx')
|
||||
// window.open("../DataShow/Unit.aspx")
|
||||
console.log("通用")
|
||||
}
|
||||
}
|
||||
|
||||
function clOnclick(objval) {
|
||||
if (objval == 0) {
|
||||
$("#span_gdcl").addClass("y_tab-action")
|
||||
@@ -618,11 +802,41 @@
|
||||
top: fontSize(30),
|
||||
bottom: fontSize(40)
|
||||
},
|
||||
dataZoom: [
|
||||
{
|
||||
type: 'slider',
|
||||
// start: 0,
|
||||
// end: 60
|
||||
maxValueSpan: 6,
|
||||
show: true,
|
||||
xAxisIndex: [0],
|
||||
bottom: 25, height: 10,
|
||||
backgroundColor: 'rgba(0,0,0,0)',
|
||||
borderColor: 'none',
|
||||
brushSelect: false,
|
||||
textStyle: {
|
||||
color: 'rgba(0,0,0,0)'
|
||||
},
|
||||
selectedDataBackground: {
|
||||
areaStyle: {
|
||||
color: 'red',
|
||||
borderWidth: 0
|
||||
}
|
||||
},
|
||||
handleStyle: { // 缩放手柄的样式
|
||||
color: "#0a1449"
|
||||
},
|
||||
moveHandleStyle: {
|
||||
color: '#0a1449'
|
||||
}
|
||||
}
|
||||
],
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: label,
|
||||
axisLabel: {
|
||||
|
||||
interval: 0,//使x轴文字显示全
|
||||
rotate: -10, // 标签倾斜的角度
|
||||
color: '#3FB0FF'
|
||||
},
|
||||
axisLine: {
|
||||
@@ -694,7 +908,7 @@
|
||||
type: 'category',
|
||||
data: label,
|
||||
axisLabel: {
|
||||
|
||||
interval: 0,//使x轴文字显示全
|
||||
color: '#3FB0FF'
|
||||
},
|
||||
axisLine: {
|
||||
@@ -736,7 +950,6 @@
|
||||
color: "#ffffff",
|
||||
fontSize: fontSize(10),
|
||||
formatter: (params) => {
|
||||
console.log(params.value);
|
||||
return params.value;
|
||||
},
|
||||
},
|
||||
@@ -813,7 +1026,7 @@
|
||||
}
|
||||
var project =<%=Project %>
|
||||
//var projectNum = { "name": null, "type": null, "data": [31.0, 0.0, 0.0, 0.0, 2.0, 0.0, 0.0, 0.0, 2.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 5.0, 0.0, 2.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], "dataString": null, "dataObject": null }
|
||||
var projectMaxNum = 5
|
||||
var projectMaxNum = 5;
|
||||
var myChart = null
|
||||
var geoCoordMap = {
|
||||
'上海': [121.48, 31.22],
|
||||
@@ -1351,12 +1564,14 @@
|
||||
var marker = new BMapGL.Marker(pt, {
|
||||
icon: myIcon
|
||||
});
|
||||
|
||||
console.log(item);
|
||||
var content = '<table>'
|
||||
content = content + '<tr><td> 时间:' + item.split(',')[2] + '</td></tr>'
|
||||
content = content + '<tr><td> 工期:' + item.split(',')[3] + '</td></tr>'
|
||||
content = content + '<tr><td> 项目名称:' + item.split(',')[7] + '</td></tr>'
|
||||
content = content + '<tr><td> 开工日期:' + item.split(',')[9] + '</td></tr>'
|
||||
content = content + '<tr><td> 完工日期:' + item.split(',')[10] + '</td></tr>'
|
||||
content = content + '<tr><td> 剩余天数:' + item.split(',')[11] + '</td></tr>'
|
||||
content = content + '<tr><td> 进度:' + item.split(',')[4] + '</td></tr>'
|
||||
content = content + '<tr><td> 合同额:(' + item.split(',')[5] + ');收款额:(' + item.split(',')[6] + ')</td></tr>'
|
||||
/* content = content + '<tr><td> 合同额:(' + item.split(',')[5] + ');收款额:(' + item.split(',')[6] + ')</td></tr>'*/
|
||||
content = content + '<tr><td style="width:180px;"><a style="text-decoration:underline;color:#00a2e9;text-overflow: ellipsis; white - space: nowrap;" target="_top" href="../indexProject.aspx?projectId=' + item.split(',')[8] + '&projectName=' + item.split(',')[7] + '">项目详情</a></td> </tr>'
|
||||
content += '</table>'
|
||||
var infowindow = new BMapGL.InfoWindow(content, { title: item.split(',')[7] })
|
||||
|
||||
@@ -27,21 +27,24 @@ namespace FineUIPro.Web.common
|
||||
join y in db.Sys_Const on x.AccidentTypeId equals y.ConstValue
|
||||
where y.ConstText.Contains("未遂")
|
||||
select x;
|
||||
this.divWS.InnerHtml = (wsAccidentList1.Count() + wsAccidentList2.Count()).ToString();
|
||||
this.divWS.InnerHtml = GetNearMissNum().ToString();
|
||||
|
||||
//安全人工时
|
||||
int wHours = db.SitePerson_PersonInOutNumber.Max(x => x.WorkHours) ?? 0;
|
||||
this.divSafeWorkTime.InnerHtml = wHours.ToString();
|
||||
this.divSafeWorkTime.InnerHtml = CountAqrgs().ToString().Split('.')[0];
|
||||
|
||||
//本月安全人工时
|
||||
int wHoursMonth = 0;
|
||||
DateTime? sDate = Funs.GetNewDateTime(DateTime.Now.Year.ToString() + "-" + DateTime.Now.Month.ToString());
|
||||
var dayReports = getMonthReportsByCompany(sDate);
|
||||
if (dayReports.Count > 0)
|
||||
{
|
||||
wHoursMonth = Convert.ToInt32(dayReports[0].DayWorkTime);
|
||||
}
|
||||
this.divSafeWorkTimeMonth.InnerHtml = wHoursMonth.ToString();
|
||||
//int wHoursMonth = 0;
|
||||
//DateTime? sDate = Funs.GetNewDateTime(DateTime.Now.Year.ToString() + "-" + DateTime.Now.Month.ToString());
|
||||
//var dayReports = getMonthReportsByCompany(sDate);
|
||||
//if (dayReports.Count > 0)
|
||||
//{
|
||||
// wHoursMonth = Convert.ToInt32(dayReports[0].DayWorkTime);
|
||||
//}
|
||||
DateTime d1 = getStartMonth();
|
||||
DateTime d2 = getEndMonth();
|
||||
|
||||
this.divSafeWorkTimeMonth.InnerHtml = CountAqrgs(d1,d2).ToString().Split('.')[0];
|
||||
|
||||
//int wHoursMonth = db.SitePerson_PersonInOutNumber.Where(x => x.InOutDate > DateTime.Now.AddDays(-Convert.ToInt32(DateTime.Now.Date.Day)))
|
||||
// .Max(x => x.WorkHours) ?? 0;
|
||||
@@ -70,7 +73,7 @@ namespace FineUIPro.Web.common
|
||||
//质量培训人员
|
||||
DateTime date = DateTime.Now.AddDays(-1);
|
||||
int CqmsPxNum = (from x in Funs.DB.Comprehensive_InspectionPerson
|
||||
where x.IsTrain == true && x.CompileDate.Value.Year == date.Year && x.CompileDate.Value.Month == date.Month && x.CompileDate.Value.Day == date.Day
|
||||
where x.IsTrain == true
|
||||
select x).Count();
|
||||
divCqmsPxNum.InnerText = CqmsPxNum.ToString();
|
||||
|
||||
@@ -120,6 +123,94 @@ namespace FineUIPro.Web.common
|
||||
}
|
||||
|
||||
#region 当月人工时
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取当前月的月末日期
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static DateTime getEndMonth()
|
||||
{
|
||||
|
||||
int span = Convert.ToInt32(System.DateTime.Now.Day);
|
||||
System.DateTime dateEnd = System.DateTime.Now.AddMonths(1).AddDays(-span);
|
||||
return dateEnd;
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取当前月初日期
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static DateTime getStartMonth()
|
||||
{
|
||||
int span = Convert.ToInt32(System.DateTime.Now.Day);
|
||||
span = span - 1;
|
||||
System.DateTime dateStart = System.DateTime.Now.AddDays(-span);
|
||||
return dateStart;
|
||||
}
|
||||
|
||||
//安全人工时(穿透)
|
||||
/// <summary>
|
||||
/// 安全工时数
|
||||
/// </summary>
|
||||
/// <param name="state"></param>
|
||||
/// <returns></returns>
|
||||
protected decimal CountAqrgs(DateTime? d1 = null, DateTime? d2 = null)
|
||||
{
|
||||
decimal cout1 = 0;
|
||||
|
||||
var datetime1 = d1;
|
||||
var datetime2 = d2;
|
||||
var getAllPersonInOutList = from x in Funs.DB.SitePerson_PersonInOutNumber
|
||||
|
||||
select x;
|
||||
if (getAllPersonInOutList.Count() > 0)
|
||||
{
|
||||
if (datetime1.HasValue)
|
||||
{
|
||||
getAllPersonInOutList = getAllPersonInOutList.Where(x => x.InOutDate >= datetime1);
|
||||
}
|
||||
if (datetime2.HasValue)
|
||||
{
|
||||
getAllPersonInOutList = getAllPersonInOutList.Where(x => x.InOutDate <= datetime2);
|
||||
}
|
||||
if (getAllPersonInOutList.Count() > 0)
|
||||
{
|
||||
cout1 = getAllPersonInOutList.Sum(x => (long)x.WorkHours);
|
||||
}
|
||||
}
|
||||
|
||||
var getD1 = from x in Funs.DB.Accident_AccidentHandle
|
||||
join y in Funs.DB.Base_Project on x.ProjectId equals y.ProjectId
|
||||
where y.ProjectState == Const.ProjectState_1
|
||||
select x;
|
||||
var getD2 = from x in Funs.DB.Accident_AccidentReport
|
||||
join y in Funs.DB.Base_Project on x.ProjectId equals y.ProjectId
|
||||
where y.ProjectState == Const.ProjectState_1
|
||||
select x;
|
||||
|
||||
if (datetime1.HasValue)
|
||||
{
|
||||
getD1 = getD1.Where(x => x.AccidentDate >= datetime1);
|
||||
getD2 = getD2.Where(x => x.CompileDate >= datetime1);
|
||||
}
|
||||
if (datetime2.HasValue)
|
||||
{
|
||||
getD1 = getD1.Where(x => x.AccidentDate <= datetime2);
|
||||
getD2 = getD2.Where(x => x.CompileDate <= datetime2);
|
||||
}
|
||||
|
||||
|
||||
if (getD1.Count() > 0)
|
||||
{
|
||||
cout1 = cout1 - getD1.Sum(x => x.WorkHoursLoss ?? 0);
|
||||
}
|
||||
if (getD2.Count() > 0)
|
||||
{
|
||||
cout1 = cout1 - getD2.Sum(x => x.WorkingHoursLoss ?? 0);
|
||||
}
|
||||
return cout1;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取出入记录人工时-月报(项目级别)
|
||||
/// </summary>
|
||||
@@ -343,7 +434,25 @@ namespace FineUIPro.Web.common
|
||||
mapStr += money1.ToString("0.##") + ",";
|
||||
mapStr += money2 + ",";
|
||||
mapStr += item.ShortName + ",";
|
||||
mapStr += item.ProjectId;
|
||||
|
||||
//修改日期 2023-10-30 10:43:57
|
||||
//内容:项目名称、开工日期、完工日期、剩余天数、进度
|
||||
mapStr += item.ProjectId+",";
|
||||
|
||||
mapStr += string.Format("{0:yyyy-MM-dd}", item.StartDate) + ",";
|
||||
if (string.IsNullOrEmpty(item.EndDate.ToString()))
|
||||
{
|
||||
mapStr += ",";
|
||||
}
|
||||
else {
|
||||
//获取剩余天数
|
||||
var residueDay = DateDiff(DateTime.Now, Convert.ToDateTime(item.EndDate)).ToString();
|
||||
mapStr += string.Format("{0:yyyy-MM-dd}", item.EndDate) + ","+residueDay;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
loc.Add(mapStr);
|
||||
}
|
||||
}
|
||||
@@ -358,6 +467,20 @@ namespace FineUIPro.Web.common
|
||||
return JsonConvert.SerializeObject(series);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 计算时间的相差天数
|
||||
/// </summary>
|
||||
/// <param name="dateStart"></param>
|
||||
/// <param name="dateEnd"></param>
|
||||
/// <returns></returns>
|
||||
private int DateDiff(DateTime dateStart, DateTime dateEnd)
|
||||
{
|
||||
DateTime start = Convert.ToDateTime(dateStart.ToShortDateString());
|
||||
DateTime end = Convert.ToDateTime(dateEnd.ToShortDateString());
|
||||
TimeSpan sp = end.Subtract(start);
|
||||
return sp.Days;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 在施危大工程数量
|
||||
@@ -534,7 +657,7 @@ namespace FineUIPro.Web.common
|
||||
protected string ProjectPersonMc;
|
||||
private void getProjectSitePerson()
|
||||
{
|
||||
var list = Funs.DB.Base_Project.Where(x => (x.ProjectState == Const.ProjectState_1 || x.ProjectState == null) && x.Progress != null).ToList();
|
||||
var list = Funs.DB.Base_Project.Where(x => (x.ProjectState == Const.ProjectState_1 || x.ProjectState == null)).ToList();
|
||||
foreach (var item in list)
|
||||
{
|
||||
ProjectPersonMc += "'" + item.ShortName + "',";
|
||||
@@ -609,9 +732,9 @@ namespace FineUIPro.Web.common
|
||||
#region 管道材料
|
||||
gdclHtml += " <div class=\"tr\">";
|
||||
var pname = item.ShortName;
|
||||
if (item.ShortName.Length > 4)
|
||||
if (item.ShortName.Length > 3)
|
||||
{
|
||||
pname = item.ShortName.Substring(0, 4) + "...";
|
||||
pname = item.ShortName.Substring(0, 3) + "...";
|
||||
}
|
||||
|
||||
gdclHtml += "<span title=\"" + item.ShortName + "\">" + pname + "</span>";
|
||||
@@ -669,9 +792,9 @@ namespace FineUIPro.Web.common
|
||||
#region 设备材料
|
||||
sbclHtml += " <div class=\"tr\">";
|
||||
pname=item.ShortName;
|
||||
if (item.ShortName.Length > 6)
|
||||
if (item.ShortName.Length > 5)
|
||||
{
|
||||
pname = item.ShortName.Substring(0, 6) + "...";
|
||||
pname = item.ShortName.Substring(0, 5) + "...";
|
||||
}
|
||||
sbclHtml += "<span title=\"" + item.ShortName + "\">" + pname + "</span>";
|
||||
//采购量
|
||||
@@ -717,5 +840,18 @@ namespace FineUIPro.Web.common
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 获取未遂事件数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int GetNearMissNum()
|
||||
{
|
||||
var result = (from x in Funs.DB.Accident_AccidentPersonRecord
|
||||
join y in Funs.DB.Base_AccidentType on x.AccidentTypeId equals y.AccidentTypeId
|
||||
where x.IsAttempt == "1" && x.CompileDate > Const.DtmarkTime
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -145,7 +145,7 @@
|
||||
<div class="y_top_box_label" style="color: #FF7474;">在施危大工程</div>
|
||||
<div class="y_top_box_value" style="color: #FF7474;" runat="server" id="div_wdxm">0</div>
|
||||
</div>
|
||||
<div class="y_top_box y_image_default y_row js-hover" data-type="WorkingHourData">
|
||||
<div class="y_top_box y_image_default y_row js-hover" data-type="WorkingHourData" style="width: 4.55rem;">
|
||||
<div class="y_top_box_label" style="color: #00FFFF;">安全工时</div>
|
||||
<div class="y_top_box_value" style="color: #00FFFF;" runat="server" id="div_safeworktime">0</div>
|
||||
</div>
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
@@ -63,10 +65,21 @@ namespace FineUIPro.Web.common
|
||||
select x).Count().ToString();
|
||||
|
||||
//注安师
|
||||
div_zasrs.InnerHtml = (from x in Funs.DB.SitePerson_Person
|
||||
join y in Funs.DB.Base_Certificate on x.CertificateId equals y.CertificateId
|
||||
where y.IsRegisterHSSE == true && x.IsUsed == true
|
||||
select x).Count().ToString();
|
||||
var ZasSql = @"SELECT Person.ProjectId,Project.ProjectCode,Project.ProjectName,Unit.UnitId,Unit.UnitId,Unit.UnitName,
|
||||
Person.PersonName,Person.PersonId,Person.IdentityCard,Person.Sex,Person.WorkPostId,WorkPost.WorkPostName,Person.Telephone
|
||||
,(CASE WHEN Sex=2 THEN '女' WHEN Sex=1 THEN '男' ELSE '' END) AS SexStr
|
||||
FROM SitePerson_Person AS Person
|
||||
LEFT JOIN Base_Project AS Project ON Person.ProjectId =Project.ProjectId
|
||||
LEFT JOIN Base_Unit AS Unit ON Person.UnitId =Unit.UnitId
|
||||
LEFT JOIN Base_WorkPost AS WorkPost ON Person.WorkPostId =WorkPost.WorkPostId
|
||||
WHERE IsUsed=1 AND InTime <=GETDATE() AND (OutTime IS NULL OR OutTime > GETDATE())
|
||||
AND (SELECT COUNT(*) FROM QualityAudit_PersonQuality AS Q LEFT JOIN Base_Certificate AS Cer ON Q.CertificateId
|
||||
=Cer.CertificateId WHERE Q.PersonId = Person.PersonId AND IsRegisterHSSE =1) > 0";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(ZasSql, parameter);
|
||||
|
||||
div_zasrs.InnerHtml = tb.Rows.Count.ToString();
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -81,9 +94,52 @@ namespace FineUIPro.Web.common
|
||||
//在施危大工程
|
||||
div_wdxm.InnerHtml = Funs.DB.Solution_LargerHazard.Where(x => x.States == Const.State_2).Count().ToString();
|
||||
//安全工时数
|
||||
int wHours = Funs.DB.SitePerson_PersonInOutNumber.Max(x => x.WorkHours) ?? 0;
|
||||
this.div_safeworktime.InnerHtml = wHours.ToString();
|
||||
//int wHours = Funs.DB.SitePerson_PersonInOutNumber.Max(x => x.WorkHours) ?? 0;
|
||||
this.div_safeworktime.InnerHtml = Count3().ToString().Split('.')[0];
|
||||
}
|
||||
#endregion
|
||||
#region 安全人工时穿透数据
|
||||
/// <summary>
|
||||
/// 安全工时数
|
||||
/// </summary>
|
||||
/// <param name="state"></param>
|
||||
/// <returns></returns>
|
||||
protected decimal Count3()
|
||||
{
|
||||
decimal cout1 = 0;
|
||||
var getAllPersonInOutList = from x in Funs.DB.SitePerson_PersonInOutNumber
|
||||
select x;
|
||||
if (getAllPersonInOutList.Count() > 0)
|
||||
{
|
||||
if (getAllPersonInOutList.Count() > 0)
|
||||
{
|
||||
cout1 = getAllPersonInOutList.Sum(x => (long)x.WorkHours);
|
||||
}
|
||||
}
|
||||
|
||||
var getD1 = from x in Funs.DB.Accident_AccidentHandle
|
||||
join y in Funs.DB.Base_Project on x.ProjectId equals y.ProjectId
|
||||
where y.ProjectState == Const.ProjectState_1
|
||||
select x;
|
||||
var getD2 = from x in Funs.DB.Accident_AccidentReport
|
||||
join y in Funs.DB.Base_Project on x.ProjectId equals y.ProjectId
|
||||
where y.ProjectState == Const.ProjectState_1
|
||||
select x;
|
||||
|
||||
|
||||
|
||||
|
||||
if (getD1.Count() > 0)
|
||||
{
|
||||
cout1 = cout1 - getD1.Sum(x => x.WorkHoursLoss ?? 0);
|
||||
}
|
||||
if (getD2.Count() > 0)
|
||||
{
|
||||
cout1 = cout1 - getD2.Sum(x => x.WorkingHoursLoss ?? 0);
|
||||
}
|
||||
return cout1;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 加载项目全部和待整改的
|
||||
|
||||
@@ -177,7 +177,7 @@
|
||||
<div id="zlmap"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="y_box">
|
||||
<div class="y_box js-hover" data-type="NCRData">
|
||||
<div class="y_box_label y_image_default">NCR数据</div>
|
||||
<div class="y_box_main">
|
||||
<div class="zl-card y_row">
|
||||
@@ -529,7 +529,7 @@
|
||||
}
|
||||
else if (type == 'MeasuringInstrumentsData') {
|
||||
// $('iframe').attr('src', '../InterfacePopup/CQMS/MeasuringInstrumentsData.aspx') //计量器具数据
|
||||
window.open("../DataShow/QualityInstruments.aspx")
|
||||
window.open("../DataShowLocal/QualityInstruments.aspx")
|
||||
|
||||
|
||||
title = '计量器具数据'
|
||||
@@ -569,6 +569,11 @@
|
||||
// $('iframe').attr('src', '../InterfacePopup/CQMS/DefectAnalysis.aspx') //缺陷分析
|
||||
window.open("../DataShow/HJGLDefect.aspx")
|
||||
|
||||
}
|
||||
else if (type == 'NCRData') {
|
||||
// $('iframe').attr('src', '../InterfacePopup/CQMS/DefectAnalysis.aspx') //缺陷分析
|
||||
window.open("../DataShowLocal/NCRStatisc.aspx")
|
||||
|
||||
}
|
||||
else {
|
||||
// $('iframe').attr('src', '../SysManage/Unit.aspx')
|
||||
|
||||
@@ -300,9 +300,18 @@ namespace FineUIPro.Web.common
|
||||
/// <returns></returns>
|
||||
public static int GetTotalFilmNum()
|
||||
{
|
||||
int result = Convert.ToInt32((from x in Funs.DB.CH_CheckItem
|
||||
join y in Funs.DB.CH_Check on x.CHT_CheckID equals y.CHT_CheckID
|
||||
select x.CHT_TotalFilm).ToList().Sum());
|
||||
//int result = Convert.ToInt32((from x in Funs.DB.CH_CheckItem
|
||||
// join y in Funs.DB.CH_Check on x.CHT_CheckID equals y.CHT_CheckID
|
||||
// select x.CHT_TotalFilm).ToList().Sum());
|
||||
int result = 0;
|
||||
|
||||
var getD2 = (from x in Funs.DB.HJGL_FL_Data
|
||||
orderby x.CompileDate descending
|
||||
select x).FirstOrDefault();
|
||||
if (getD2 != null)
|
||||
{
|
||||
result = Funs.GetNewIntOrZero(getD2.OneTimeFilmAmount.Split('.')[0]);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
/// <summary>
|
||||
@@ -311,9 +320,14 @@ namespace FineUIPro.Web.common
|
||||
/// <returns></returns>
|
||||
public static int GetOKFilmNum()
|
||||
{
|
||||
int result = Convert.ToInt32((from x in Funs.DB.CH_CheckItem
|
||||
join y in Funs.DB.CH_Check on x.CHT_CheckID equals y.CHT_CheckID
|
||||
select x.CHT_PassFilm).ToList().Sum());
|
||||
int result = 0;
|
||||
var getD2 = (from x in Funs.DB.HJGL_FL_Data
|
||||
orderby x.CompileDate descending
|
||||
select x).FirstOrDefault();
|
||||
if (getD2 != null)
|
||||
{
|
||||
result = Funs.GetNewIntOrZero(getD2.OneTimeFilmQualifiedAmount.Split('.')[0]);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -393,8 +407,10 @@ namespace FineUIPro.Web.common
|
||||
private void getNcrInfo()
|
||||
{
|
||||
//闭环项 有完成日期的
|
||||
var num1 = Funs.DB.Comprehensive_NCRManagement.Where(x => x.CompleteDate != null).Count();
|
||||
var num2 = Funs.DB.Comprehensive_NCRManagement.Where(x => x.CompleteDate == null).Count();
|
||||
//var num1 = Funs.DB.Comprehensive_NCRManagement.Where(x => x.CompleteDate != null).Count();
|
||||
//var num2 = Funs.DB.Comprehensive_NCRManagement.Where(x => x.CompleteDate == null).Count();
|
||||
var num1 = Funs.DB.Comprehensive_NCRManagement.Where(x => x.Status=="3").Count();
|
||||
var num2 = Funs.DB.Comprehensive_NCRManagement.Where(x => !x.Status.Equals('3') ||x.Status ==null).Count();
|
||||
ncrZgbhx = num1.ToString();
|
||||
ncrwZgbhx = num2.ToString();
|
||||
if ((num1 + num2) >0)
|
||||
|
||||
Reference in New Issue
Block a user