专项检查

This commit is contained in:
2025-04-15 20:48:53 +08:00
parent 80ea8ec450
commit 1c6dca4612
36 changed files with 29955 additions and 932 deletions
-1
View File
@@ -4,7 +4,6 @@
<TreeNode id="2FC8AA2A-F421-4174-A05E-2711167AF141" Text="日常巡检记录" EnText="日常巡检记录" NavigateUrl="HSSE/HiddenInspection/HiddenRectificationList.aspx">
</TreeNode>
<TreeNode id="C7481FEE-EA92-44B8-99F6-C5CA6BBDCFF5" Text="专项检查记录" EnText="专项检查记录" NavigateUrl="HSSE/Check/CheckSpecialRecord.aspx"></TreeNode>
<TreeNode id="0DAAF731-D058-41E9-9C8A-0647DF82E0D0" Text="安全专检" EnText="安全专检" NavigateUrl="OfficeCheck/Inspect/ProjectSafetyInspection.aspx"></TreeNode>
</TreeNode>
<TreeNode id="5309E7E0-395E-4F11-8F5E-D52E11526A2A" Text="安全会议" EnText="安全会议" NavigateUrl=""><TreeNode id="F8ADCDBC-AAAD-4884-9935-2B63562E4779" Text="班前会" EnText="班前会" NavigateUrl="HSSE/Meeting/ClassMeeting.aspx"></TreeNode>
<TreeNode id="5236B1D9-8B57-495E-8644-231DF5D066CE" Text="安全周例会" EnText="安全周例会" NavigateUrl="HSSE/Meeting/WeekMeeting.aspx"></TreeNode>
@@ -6,6 +6,5 @@
<TreeNode id="C9C95D5A-4A15-4F4B-B091-EB5BECC254A4" Text="整体及分类汇总表" EnText="整体及分类汇总表" NavigateUrl="CQMS/QuantityManagement/WorkTeamStatistics.aspx"></TreeNode>
<TreeNode id="CE235B20-C6BB-4A34-A11C-70F90921B803" Text="项目内容汇总表" EnText="项目内容汇总表" NavigateUrl="CQMS/QuantityManagement/ProjectContentStatistics.aspx"></TreeNode>
</TreeNode>
<TreeNode id="CAAD533A-D199-4CFB-BCC1-980FBE1085EC" Text="安全专检" EnText="安全专检" NavigateUrl="OfficeCheck/Inspect/SafetyInspection.aspx"></TreeNode>
<TreeNode id="BDCCE638-E9EF-421D-B09B-699F02A4462C" Text="质量专检" EnText="质量专检" NavigateUrl="OfficeCheck/Inspect/QualityInspection.aspx"></TreeNode>
</Tree>
@@ -43,7 +43,6 @@
<TreeNode id="3EC2676A-70EB-400E-BE17-EEBBA0B7E9D7" Text="安全巡检类型定义" EnText="安全巡检类型定义" NavigateUrl="BaseInfo/HazardRegisterTypes.aspx"></TreeNode>
<TreeNode id="CCF9E615-78C9-4085-BCFE-0F9907D3FA0A" Text="物资类别" EnText="物资类别" NavigateUrl="BaseInfo/GoodsCategory.aspx"></TreeNode>
<TreeNode id="E4B526CC-805E-4131-8E18-2FFA6871507E" Text="风险等级" EnText="风险等级" NavigateUrl="BaseInfo/RiskLevel.aspx"></TreeNode>
<TreeNode id="6E2A2D85-30A0-DA45-D1C4-A4661A8AEDF0 " Text="问题类别" EnText="问题类别" NavigateUrl="BaseInfo/ProblemTypes.aspx"></TreeNode>
</TreeNode>
<TreeNode id="85DFE1D3-9E68-46B5-87E5-A525698F2F5F" Text="焊接设置" EnText="焊接设置" NavigateUrl=""><TreeNode id="8IDKGJE2-09B1-4607-BC6D-865CE48F0004" Text="焊接耗材定义" EnText="焊接耗材定义" NavigateUrl="HJGL/BaseInfo/Consumables.aspx"></TreeNode>
<TreeNode id="4C41FC4C-659E-495E-8BD3-0702F35F534E" Text="管道级别定义" EnText="管道级别定义" NavigateUrl="HJGL/BaseInfo/PipingClass.aspx"></TreeNode>
+92 -32
View File
@@ -9,16 +9,17 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>智慧施工管理信息系统</title>
<script src="lib/flex.js"></script>
<link href="../res/css/mainindex.css?v1" rel="stylesheet" />
<link href="../res/css/mainindex.css?v2" rel="stylesheet" />
<link href="../res/indexv2/assets/css/swiper-bundle.min.css" rel="stylesheet" />
</head>
<style type="text/css">
input[type="date"] {
input[type="date"] {
background-color: rgba(0,0,0,0);
color: #ffffff;
font-size: .175rem;
}
img {
width: 100%;
height: 100%;
@@ -97,14 +98,15 @@
right: 4px;
}
input[type="date"] {
input[type="date"] {
background-color: rgba(0,0,0,0);
color: #ffffff;
font-size: .175rem;
}
input[type="date"]::-webkit-calendar-picker-indicator {
filter: invert(1);
}
input[type="date"]::-webkit-calendar-picker-indicator {
filter: invert(1);
}
</style>
<script src="../res/indexv2/assets/js/swiper-bundle.min.js"></script>
<body class="t-main1">
@@ -114,24 +116,27 @@
<div class="t-side-tit">
<asp:Literal runat="server" Text="劳务数据" />
<div class="z-date">
<input id="labour" type="date" value="" />
<%-- <input id="labour" type="date" value="" />--%>
<input id="labour_start" type="date" value="" />
<span style="font-size: 10px; padding: 0 6px;">至</span>
<input id="labour_end" type="date" value="" />
</div>
</div>
<div class="t-xmtj flex-row">
<div class="t-xmtj-box flex-column flex-item-center">
<div class="t-xmtj-box-val " ><span class="color1" id="allperson"></span><span style="font-size:.25rem;color:#d7d7d7;">人</span></div>
<div class="t-xmtj-box-val "><span class="color1" id="allperson"></span><span style="font-size: .25rem; color: #d7d7d7;">人</span></div>
<div class="t-xmtj-box-lab">
<asp:Literal runat="server" Text="现场人数" />
</div>
</div>
<div class="t-xmtj-box flex-column flex-item-center">
<div class="t-xmtj-box-val" ><span class="color2" id="managePerson"></span><span style="font-size:.25rem;color:#d7d7d7;">人</span></div>
<div class="t-xmtj-box-val"><span class="color2" id="managePerson"></span><span style="font-size: .25rem; color: #d7d7d7;">人</span></div>
<div class="t-xmtj-box-lab">
<asp:Literal runat="server" Text="管理人员" />
</div>
</div>
<div class="t-xmtj-box flex-column flex-item-center">
<div class="t-xmtj-box-val " ><span class="color3" id="workerPerson"></span><span style="font-size:.25rem;color:#d7d7d7;">人</span></div>
<div class="t-xmtj-box-val "><span class="color3" id="workerPerson"></span><span style="font-size: .25rem; color: #d7d7d7;">人</span></div>
<div class="t-xmtj-box-lab">
<asp:Literal runat="server" Text="作业人员" />
</div>
@@ -171,8 +176,8 @@
<div class="lw-item-val color4" runat="server" id="undone">0</div>
</div>
</div>
<div class="t-aqtj" >
<div id="aqtj" style="height:100%;width:100%;"></div>
<div class="t-aqtj">
<div id="aqtj" style="height: 100%; width: 100%;"></div>
</div>
<div class="t-side-tit">
<asp:Literal runat="server" Text="<%$ Resources:Lan,LiveVideo%>" />
@@ -214,6 +219,11 @@
<div class="t-side">
<div class="t-side-tit">
<asp:Literal runat="server" Text="<%$ Resources:Lan,Quality_problem_statistics%>" />
<div class="z-date">
<input id="labour_start" type="date" value="" />
<span style="font-size: 10px; padding: 0 6px;">至</span>
<input id="labour_end" type="date" value="" />
</div>
</div>
<div class="t-zltj">
<div class="zl-box-tit flex-row flex-between flex-item-center">
@@ -300,21 +310,40 @@
let AQWTChart = null; // 安全问题统计柱状图的实体
// 5分钟刷新一次数据
setInterval(function () {
// 问题类型统计
// 问题类型统计
problemTypeStatistics($('#safe_start').val(), $('#safe_end').val())
// 劳务数据统计
serviceData($("#labour").val())
serviceData()
}, 300000)
$(document).ready(function () {
// 初始化劳务数据
$("#labour").val(nowDate())
serviceData(nowDate())
$("#labour_start").val(nowDate())
$("#labour_end").val(nowDate())
serviceData()
// 切换日期时请求数据
$('#labour').on("change", function (e) {
serviceData($("#labour").val())
$('#labour_start').on('change', function () {
let labour_start = $('#labour_start').val()
let labour_end = $('#labour_end').val()
if (new Date(labour_start).getTime() > new Date(labour_end)) {
alert("请选择小于" + labour_end + "日期")
$('#labour_start').val(labour_end)
}
serviceData()
})
$('#labour_end').on('change', function () {
let labour_start = $('#labour_start').val()
let labour_end = $('#labour_end').val()
if (new Date(labour_start).getTime() > new Date(labour_end)) {
$('#labour_start').val(nowDate())
alert("请选择大于" + labour_start + "日期")
}
serviceData()
})
// 给安全问题统计赋值
@@ -333,9 +362,8 @@
if (new Date(safe_start).getTime() > new Date(safe_end)) {
alert("请选择小于" + safe_end + "日期")
$('#safe_start').val(safe_end)
} else {
problemTypeStatistics($('#safe_start').val(), $('#safe_end').val())
}
problemTypeStatistics($('#safe_start').val(), $('#safe_end').val())
})
$('#safe_end').on('change', function () {
@@ -344,13 +372,41 @@
if (new Date(safe_start).getTime() > new Date(safe_end)) {
$('#safe_start').val(nowDate())
alert("请选择大于" + safe_start + "日期")
} else {
problemTypeStatistics($('#safe_start').val(), $('#safe_end').val())
}
problemTypeStatistics($('#safe_start').val(), $('#safe_end').val())
})
createChinaMap()
})
// 质量问题统计
function getQualityProblemStatistics() {
$.ajax({
url: "main3.aspx/GetQualityProblemStatistics",
type: "POST",
contentType: "application/json; charset=utf-8",
dataType: "json",
data: JSON.stringify({
startdate: startdate,
enddate: enddate
}),
success: function (data) {
console.log(data)
let d = data.d
$("#all").text(d.AllCount)
$("#done").text(d.DoneCount)
$("#undone").text(d.UnDoneCount)
let tits = []
let vals = []
d.CheckList.map(e => {
tits.push(e.type)
vals.push(e.count)
})
initAQWTap('aqtj', tits, vals)
}
})
}
// 安全问题统计
function problemTypeStatistics(startdate, enddate) {
$.ajax({
@@ -375,21 +431,24 @@
tits.push(e.type)
vals.push(e.count)
})
initAQWTap('aqtj', tits, vals)
}
})
}
// 请求劳务数据
function serviceData(date) {
function serviceData() {
let labour_start = $('#labour_start').val()
let labour_end = $('#labour_end').val()
$.ajax({
url: "main3.aspx/GetServiceData",
type: "POST",
contentType: "application/json; charset=utf-8",
dataType: "json",
data: JSON.stringify({
date: date
startdate: labour_start,
enddate: labour_end
}),
success: function (data) {
console.log(data)
@@ -423,8 +482,9 @@
var option = {
grid: {
containLabel: true,
top: 30,
left: 0,
bottom: resetSize(10),
height: 180,
},
xAxis: {
@@ -435,8 +495,8 @@
rotate: -25,
interval: 0,
textStyle: {
fontSize: 14,
color: '#84D7FE'
fontSize: 12,
color: '#FFFFFF'
}
}
},
@@ -480,7 +540,7 @@
right: '0',
bottom: 0,
start: 0,//滚动条的起始位置
end: 50, //滚动条的截止位置(按比例分割你的柱状图x轴长度)
end: 8/tit.length*100, //滚动条的截止位置(按比例分割你的柱状图x轴长度)
fillerColor: '#6B7388', //滑块的颜色
backgroundColor: '#2B3755',  // 滑块轨道的颜色
borderColor: 'transparent', // 滑块轨道边框的颜色
@@ -523,9 +583,9 @@
$(".swiper-button-next").on("click", function () {
mySwiper.slideNext()
})
function initZLMap(el, val, tit = "") {
const gaugeData = [
@@ -629,7 +689,7 @@
var myChart = echarts.init(chartDom);
option && myChart.setOption(option);
}
function createChinaMap() {
var chinaData = JSON.parse('<%=ProjectInfo %>')
// 地图 点
+21 -11
View File
@@ -82,12 +82,13 @@ namespace FineUIPro.Web.common
#region
[WebMethod]
public static Object GetServiceData(string date)
public static Object GetServiceData(string startdate, string enddate)
{
DateTime mdate = Funs.GetNewDateTimeOrNow(date);
DateTime startd = Funs.GetNewDateTimeOrNow(string.Format("{0} {1}", startdate, "00:00:00"));
DateTime endd = Funs.GetNewDateTimeOrNow(string.Format("{0} {1}", enddate, "23:59:59"));
int m_count = Funs.DB.Project_ProjectUser.Count();
int job_count = (from x in Funs.DB.Meeting_ClassMeeting
where x.ClassMeetingDate.Value.Year == mdate.Year && x.ClassMeetingDate.Value.Month == mdate.Month && x.ClassMeetingDate.Value.Day == mdate.Day
where x.ClassMeetingDate >= startd && x.ClassMeetingDate <= endd
select new Model.MeetingItem
{
AttentPersonNum = x.AttentPersonNum ?? 0,
@@ -103,8 +104,23 @@ namespace FineUIPro.Web.common
}
#endregion
#region
[WebMethod]
public static Object GetQualityProblemStatistics(string startdate, string enddate)
{
DateTime startd = Funs.GetNewDateTimeOrNow(string.Format("{0} {1}", startdate, "00:00:00"));
DateTime endd = Funs.GetNewDateTimeOrNow(string.Format("{0} {1}", enddate, "23:59:59"));
List<Model.Inspect_InspectionItem> list = (from x in Funs.DB.Inspect_InspectionItem
join i in Funs.DB.Inspect_Inspection on x.InspectionId equals i.InspectionId
where i.InspectType == "1" && x.CompileTime > startd && x.CompileTime < endd
select new Model.Inspect_InspectionItem()
).ToList();
#region
return null;
}
#endregion
#region
[WebMethod]
public static Object GetSafetyProblemStatistics( string startdate, string enddate)
{
@@ -135,16 +151,10 @@ namespace FineUIPro.Web.common
).Concat(
from i in Funs.DB.Inspect_Inspection
join itm in Funs.DB.Inspect_InspectionItem on i.InspectionId equals itm.InspectionId
where i.ProblemTypeName != null && i.CreateTime > startd && i.CreateTime < endd
where i.ProblemTypeName != null && i.CreateTime > startd && i.CreateTime < endd && i.InspectType == "1"
group i by i.ProblemTypeName into g2
select new { type = g2.Key, count = g2.Count() }
).Concat(
from ins in Funs.DB.Inspect_Inspection
join itm in Funs.DB.Inspect_InspectionItem on ins.InspectionId equals itm.InspectionId
where ins.Place != null && ins.CreateTime > startd && ins.CreateTime < endd
group ins by ins.Place into g3
select new { type = g3.Key, count = g3.Count() }
)
.GroupBy(x => x.type)
.Select(g => new { type = g.Key, count = g.Sum(x => x.count) });
+52 -43
View File
@@ -178,7 +178,9 @@
<div class="side-tit image-full">
<asp:Literal runat="server" Text="劳务数据" />
<div class="z-date">
<input id="labour" type="date" value="" />
<input id="labour_start" type="date" value="" />
<span style="font-size: 10px; padding: 0 6px;">至</span>
<input id="labour_end" type="date" value="" />
</div>
</div>
<div class="anq-box">
@@ -186,8 +188,8 @@
<div class="anq-lab">
<asp:Literal runat="server" Text="现场人数" />
</div>
<div class="anq-val" ><span id="all_count"></span> <span style="font-size: 14px;">人</span></div>
<div class="anq-val"><span id="all_count"></span><span style="font-size: 14px;">人</span></div>
</div>
<div class="anq-inner flex-row flex-center">
<div class="anq-inner-b flex-column flex-center">
@@ -246,8 +248,7 @@
</div>
</div>
<div class="lw-map">
<div id="lw-map"></div>
<p style="text-align:center;margin-top: 10%;color:#ffffff;">暂无数据</p>`
<div id="lw-map"></div>`
</div>
<%--<div class="side-tit image-full tit1">视频监控</div>
@@ -573,28 +574,46 @@
// 问题类型统计
problemTypeStatistics($('#safe_start').val(), $('#safe_end').val())
// 劳务数据统计
serviceData($("#labour").val())
serviceData()
}, 300000)
$(document).ready(function () {
let ProjectId = "<%= ProjectId%>"
// 劳务数据日期选择框赋当天日期
$('#labour').val(nowDate());
serviceData(nowDate())
// 初始化劳务数据
$("#labour_start").val(nowDate())
$("#labour_end").val(nowDate())
serviceData()
// 切换日期时请求数据
$('#labour').on("change", function (e) {
serviceData($(this).val())
$('#labour_start').on('change', function () {
let labour_start = $('#labour_start').val()
let labour_end = $('#labour_end').val()
if (new Date(labour_start).getTime() > new Date(labour_end)) {
alert("请选择小于" + labour_end + "日期")
$('#labour_start').val(labour_end)
}
serviceData()
})
$('#labour_end').on('change', function () {
let labour_start = $('#labour_start').val()
let labour_end = $('#labour_end').val()
if (new Date(labour_start).getTime() > new Date(labour_end)) {
$('#labour_start').val(nowDate())
alert("请选择大于" + labour_start + "日期")
}
serviceData()
})
// 给安全问题统计赋值
let date = new Date()
let year = date.getFullYear()
let month = date.getMonth() + 1
$('#safe_start').val(`${year}-${month.toString().padStart(2, '0') }-01`);
$('#safe_end').val(`${year}-${month.toString().padStart(2, '0')}-${new Date(year, month, 0).getDate() }`);
$('#safe_start').val(`${year}-${month.toString().padStart(2, '0')}-01`);
$('#safe_end').val(`${year}-${month.toString().padStart(2, '0')}-${new Date(year, month, 0).getDate()}`);
problemTypeStatistics($('#safe_start').val(), $('#safe_end').val())
$('#safe_start').on('change', function () {
let safe_start = $('#safe_start').val()
let safe_end = $('#safe_end').val()
@@ -604,7 +623,7 @@
} else {
problemTypeStatistics($('#safe_start').val(), $('#safe_end').val())
}
})
$('#safe_end').on('change', function () {
let safe_start = $('#safe_start').val()
@@ -638,8 +657,7 @@
data: JSON.stringify({
ProjectId: ProjectId,
startdate: startdate,
enddate: enddate,
enddate: enddate
}),
success: function (data) {
console.log(data)
@@ -654,31 +672,22 @@
vals.push(e.count)
})
initAQWTap('lw-map', tits, vals)
//if (d.CheckList.length > 0) {
// d.CheckList.map(e => {
// tits.push(e.type)
// vals.push(e.count)
// })
// $("#lw-map").show()
// $(".lw-map>p").hide()
// initAQWTap('lw-map', tits, vals)
//} else {
// $("#lw-map").hide()
// $(".lw-map>p").show()
//}
}
})
}
// 请求劳务数据
function serviceData(date) {
function serviceData() {
let labour_start = $('#labour_start').val()
let labour_end = $('#labour_end').val()
$.ajax({
url: "mainProject.aspx/GetServiceData",
type: "POST",
contentType: "application/json; charset=utf-8",
dataType: "json",
data: JSON.stringify({
date: date,
startdate: labour_start,
enddate: labour_end,
ProjectId: ProjectId,
}),
success: function (data) {
@@ -702,9 +711,9 @@
var option = {
grid: {
containLabel: true,
top: 30,
left: 0,
bottom: resetSize(10),
height: 220,
},
xAxis: {
type: 'category',
@@ -714,8 +723,8 @@
rotate: -25,
interval: 0,
textStyle: {
fontSize: 14,
color: '#84D7FE'
fontSize: 12,
color: '#FFFFFF'
}
}
},
@@ -735,7 +744,7 @@
},
series: [
{
barWidth: resetSize(20),
barWidth: 20,
data: val,
type: 'bar',
label: {
@@ -759,7 +768,7 @@
right: '0',
bottom: 0,
start: 0,//滚动条的起始位置
end: 50, //滚动条的截止位置(按比例分割你的柱状图x轴长度)
end: 8 / tit.length * 100, //滚动条的截止位置(按比例分割你的柱状图x轴长度)
fillerColor: '#6B7388', //滑块的颜色
backgroundColor: '#2B3755',  // 滑块轨道的颜色
borderColor: 'transparent', // 滑块轨道边框的颜色
@@ -974,7 +983,7 @@
}
function resetSize(size, initWidth = 1920) {
let clientWidth = document.body.clientWidth
@@ -1021,8 +1030,8 @@
}, 'json');
}
initVideo();
runShowVideo();
//initVideo();
//runShowVideo();
var videoURL = '<%= VideoHost %>';
let more = document.getElementById('more')
@@ -1033,7 +1042,7 @@
//var password = $('#SimpleForm1_hfMonitorPW-inputEl').val();
console.log(videoURL);
debugger
window.open(videoURL + "#/screen?username=" + '<%= VideoUserName %>' + "&password=" + '<%= VideoPassWord %>', '_blank');
////////window.open(videoURL + "#/screen?username=" + '<%= VideoUserName %>' + "&password=" + '<%= VideoPassWord %>', '_blank');
}
else {
alert("您没有权限!");
+86 -79
View File
@@ -12,6 +12,7 @@ using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.ComTypes;
using System.Web.Services;
namespace FineUIPro.Web.common
@@ -50,7 +51,7 @@ namespace FineUIPro.Web.common
this.ProjectId = this.CurrUser.LoginProjectId;
}
/// 获取安全人工时
getPersonWorkTime();
//getPersonWorkTime();
///劳务统计
getSitePerson();
///项目概况
@@ -81,13 +82,14 @@ namespace FineUIPro.Web.common
#region
[WebMethod]
public static Object GetServiceData(string ProjectId, string date)
public static Object GetServiceData(string ProjectId, string startdate, string enddate)
{
DateTime mdate = Funs.GetNewDateTimeOrNow(date);
DateTime startd = Funs.GetNewDateTimeOrNow(string.Format("{0} {1}", startdate, "00:00:00"));
DateTime endd = Funs.GetNewDateTimeOrNow(string.Format("{0} {1}", enddate, "23:59:59"));
int m_count = Funs.DB.Project_ProjectUser.Count(x => x.ProjectId == ProjectId);
int job_count = (from x in Funs.DB.Meeting_ClassMeeting
where x.ProjectId == ProjectId
&& x.ClassMeetingDate.Value.Year == mdate.Year && x.ClassMeetingDate.Value.Month == mdate.Month && x.ClassMeetingDate.Value.Day == mdate.Day
where x.ProjectId == ProjectId && x.ClassMeetingDate >= startd && x.ClassMeetingDate <= endd
select new Model.MeetingItem
{
AttentPersonNum = x.AttentPersonNum ?? 0,
@@ -130,12 +132,12 @@ namespace FineUIPro.Web.common
group hsse by hsse.RectifyName into g1
select new { type = g1.Key, count = g1.Count() }).Union((from i in Funs.DB.Inspect_Inspection
join itm in Funs.DB.Inspect_InspectionItem on i.InspectionId equals itm.InspectionId
where i.ProblemTypeName != null && i.ProjectId == ProjectId && i.CreateTime > startd && i.CreateTime < endd
where i.ProblemTypeName != null && i.ProjectId == ProjectId && i.CreateTime > startd && i.CreateTime < endd && i.InspectType == "1"
group i by i.ProblemTypeName into g2
select new { type = g2.Key, count = g2.Count() })
.Union(from ins in Funs.DB.Inspect_Inspection
join itm in Funs.DB.Inspect_InspectionItem on ins.InspectionId equals itm.InspectionId
where ins.Place != null && ins.ProjectId == ProjectId && ins.CreateTime > startd && ins.CreateTime < endd
where ins.Place != null && ins.ProjectId == ProjectId && ins.CreateTime > startd && ins.CreateTime < endd && ins.InspectType == "1"
group ins by ins.Place into g3
select new { type = g3.Key, count = g3.Count() })).ToList();
@@ -173,7 +175,6 @@ namespace FineUIPro.Web.common
/// </summary>
private void getPersonWorkTime()
{
//this.divSafeWorkTime.InnerHtml = "0000000000";
var monthReportB = from y in Funs.DB.Manager_MonthReportB
where y.ProjectId == this.CurrUser.LoginProjectId
orderby y.Months descending
@@ -245,90 +246,96 @@ namespace FineUIPro.Web.common
/// </summary>
private void getSitePerson()
{
int AllCount = 0;
int MCount = 0;
//var getallin = APIPageDataService.getPersonInOutNum(this.ProjectId, DateTime.Now.AddDays(-1));
DateTime dateValue = DateTime.Now.AddDays(-1);
List<Model.PageDataPersonInOutItem> getallin = new List<Model.PageDataPersonInOutItem>();
var getInMaxs = from x in Funs.DB.SitePerson_Person
join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId
where x.ProjectId == this.CurrUser.LoginProjectId && x.IsUsed == true
select new Model.PageDataPersonInOutItem
{
PersonId = x.PersonId,
PostType = y.PostType,
WorkPostId = x.WorkPostId,
IdentityCard = x.IdentityCard
};
if (getInMaxs.Count() > 0)
{
getallin = getInMaxs.Distinct().ToList();
}
var AllInOut = (from x in Funs.DB.T_d_EmployInOutRecord
join y in Funs.DB.SitePerson_Person on new { ss1 = x.ProjectId, ss = x.IDCardNo } equals new { ss1 = y.ProjectId, ss = y.IdentityCard }
where y.ProjectId == this.CurrUser.LoginProjectId && y.IsUsed == true && x.ProjectId == this.CurrUser.LoginProjectId && x.RecordDate.Value == DateTime.Now.Date
select x.IDCardNo).Distinct();
AllCount = AllInOut.Count();
if (AllCount > 0)
try
{
int AllCount = 0;
int MCount = 0;
//var getallin = APIPageDataService.getPersonInOutNum(this.ProjectId, DateTime.Now.AddDays(-1));
DateTime dateValue = DateTime.Now.AddDays(-1);
List<Model.PageDataPersonInOutItem> getallin = new List<Model.PageDataPersonInOutItem>();
var getInMaxs = from x in Funs.DB.SitePerson_Person
join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId
where x.ProjectId == this.CurrUser.LoginProjectId && x.IsUsed == true
select new Model.PageDataPersonInOutItem
{
PersonId = x.PersonId,
PostType = y.PostType,
WorkPostId = x.WorkPostId,
IdentityCard = x.IdentityCard
HashSet<string> idCardNoSet = new HashSet<string>();
foreach (string idCardNo in AllInOut)
};
if (getInMaxs.Count() > 0)
{
idCardNoSet.Add(idCardNo);
getallin = getInMaxs.Distinct().ToList();
}
foreach (var i in getallin)
var AllInOut = (from x in Funs.DB.T_d_EmployInOutRecord
join y in Funs.DB.SitePerson_Person on new { ss1 = x.ProjectId, ss = x.IDCardNo } equals new { ss1 = y.ProjectId, ss = y.IdentityCard }
where y.ProjectId == this.CurrUser.LoginProjectId && y.IsUsed == true && x.ProjectId == this.CurrUser.LoginProjectId && x.RecordDate.Value == DateTime.Now.Date
select x.IDCardNo).Distinct();
AllCount = AllInOut.Count();
if (AllCount > 0)
{
if (i.PostType == Const.PostType_1 && idCardNoSet.Contains(i.IdentityCard))
HashSet<string> idCardNoSet = new HashSet<string>();
foreach (string idCardNo in AllInOut)
{
MCount++;
idCardNoSet.Add(idCardNo);
}
}
}
WorkPostS = "[]";
InPostCounts = "[]";
InDutyCounts = "[]";
List<int> InPostCountList = new List<int>();
List<int> InDutyCountList = new List<int>();
List<string> worksList = new List<string>();
//if (this.CurrUser.UserId != Const.hfnbdId)
//{
var getPersons = Funs.DB.SitePerson_Person.Where(x => x.ProjectId == this.ProjectId && x.IsUsed == true && x.InTime <= DateTime.Now
&& !x.OutTime.HasValue);
if (getPersons.Count() > 0)
{
var getWorkIds = getPersons.Where(x => x.WorkPostId != null).Select(x => x.WorkPostId).Distinct();
if (getWorkIds.Count() > 0)
{
foreach (var item in getWorkIds)
foreach (var i in getallin)
{
worksList.Add(WorkPostService.getWorkPostNameById(item));
int isPost = getPersons.Where(x => x.WorkPostId == item).Count();
InPostCountList.Add(isPost);
int inDuty = 0;
if (getallin.Count() > 0)
if (i.PostType == Const.PostType_1 && idCardNoSet.Contains(i.IdentityCard))
{
inDuty = getallin.Where(x => x.WorkPostId == item).Count();
MCount++;
}
}
}
WorkPostS = "[]";
InPostCounts = "[]";
InDutyCounts = "[]";
List<int> InPostCountList = new List<int>();
List<int> InDutyCountList = new List<int>();
List<string> worksList = new List<string>();
//if (this.CurrUser.UserId != Const.hfnbdId)
//{
var getPersons = Funs.DB.SitePerson_Person.Where(x => x.ProjectId == this.ProjectId && x.IsUsed == true && x.InTime <= DateTime.Now
&& !x.OutTime.HasValue);
if (getPersons.Count() > 0)
{
var getWorkIds = getPersons.Where(x => x.WorkPostId != null).Select(x => x.WorkPostId).Distinct();
if (getWorkIds.Count() > 0)
{
foreach (var item in getWorkIds)
{
worksList.Add(WorkPostService.getWorkPostNameById(item));
int isPost = getPersons.Where(x => x.WorkPostId == item).Count();
InPostCountList.Add(isPost);
int inDuty = 0;
if (getallin.Count() > 0)
{
inDuty = getallin.Where(x => x.WorkPostId == item).Count();
}
InDutyCountList.Add(inDuty);
}
InDutyCountList.Add(inDuty);
}
}
}
else
{
worksList.Add(" ");
InPostCountList.Add(0);
InDutyCountList.Add(0);
}
//}
else
{
worksList.Add(" ");
InPostCountList.Add(0);
InDutyCountList.Add(0);
}
//}
WorkPostS = JsonConvert.SerializeObject(worksList);
InPostCounts = JsonConvert.SerializeObject(InPostCountList);
InDutyCounts = JsonConvert.SerializeObject(InDutyCountList);
WorkPostS = JsonConvert.SerializeObject(worksList);
InPostCounts = JsonConvert.SerializeObject(InPostCountList);
InDutyCounts = JsonConvert.SerializeObject(InDutyCountList);
} catch (Exception ex)
{
}
}
#endregion