公司级增加项目筛选,开车看板修改
This commit is contained in:
parent
d8567707cd
commit
bedf5d3bdf
|
@ -0,0 +1,2 @@
|
||||||
|
alter table Sys_User
|
||||||
|
add CompanyProjectId nvarchar(2000) null;
|
|
@ -167,6 +167,37 @@ namespace BLL
|
||||||
return getSiteInOutList;
|
return getSiteInOutList;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static List<Model.PageDataPersonInOutItem> getPersonNumByCompany(DateTime dateValue,string[] pids)
|
||||||
|
{
|
||||||
|
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||||
|
{
|
||||||
|
List<Model.PageDataPersonInOutItem> getSiteInOutList = new List<Model.PageDataPersonInOutItem>();
|
||||||
|
var getDayAll = from x in db.SitePerson_PersonInOutNow
|
||||||
|
join y in db.SitePerson_Person on x.PersonId equals y.PersonId
|
||||||
|
join z in db.Base_WorkPost on y.WorkPostId equals z.WorkPostId
|
||||||
|
where x.ChangeTime.Value.Year == dateValue.Year && x.ChangeTime.Value.Month == dateValue.Month
|
||||||
|
&& x.ChangeTime.Value.Day == dateValue.Day && pids.Contains(x.ProjectId)
|
||||||
|
select new { x.PersonId, x.ChangeTime, x.IsIn, z.PostType };
|
||||||
|
if (getDayAll.Count() > 0)
|
||||||
|
{
|
||||||
|
var getInMaxs = from x in getDayAll
|
||||||
|
group x by x.PersonId into g
|
||||||
|
select new Model.PageDataPersonInOutItem
|
||||||
|
{
|
||||||
|
PersonId = g.First().PersonId,
|
||||||
|
ChangeTime = g.Max(x => x.ChangeTime),
|
||||||
|
IsIn = g.First().IsIn,
|
||||||
|
PostType = g.First().PostType
|
||||||
|
};
|
||||||
|
if (getInMaxs.Count() > 0)
|
||||||
|
{
|
||||||
|
getSiteInOutList = getInMaxs.Where(x => x.IsIn == true).ToList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return getSiteInOutList;
|
||||||
|
}
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -251,12 +251,23 @@
|
||||||
/// 获取项目下拉选项
|
/// 获取项目下拉选项
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static List<Model.Base_Project> GetAllProjectDropDownList()
|
public static List<Model.Base_Project> GetAllProjectDropDownList(string[] pids = null)
|
||||||
{
|
{
|
||||||
var list = (from x in Funs.DB.Base_Project
|
if (pids == null)
|
||||||
orderby x.ProjectCode descending
|
{
|
||||||
select x).ToList();
|
var list = (from x in Funs.DB.Base_Project
|
||||||
return list;
|
orderby x.ProjectCode descending
|
||||||
|
select x).ToList();
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
var list = (from x in Funs.DB.Base_Project
|
||||||
|
where pids.Contains(x.ProjectId)
|
||||||
|
orderby x.ProjectCode descending
|
||||||
|
select x).ToList();
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -669,5 +680,27 @@
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#region 加载公司级别项目
|
||||||
|
public static List<Model.Base_Project> GetUnEndProjectByUserIdDropDownList(string projectState,
|
||||||
|
string projectName = null, string projectCode = null) {
|
||||||
|
IQueryable<Model.Base_Project> projects = (from x in Funs.DB.Base_Project
|
||||||
|
where x.ProjectState == projectState
|
||||||
|
orderby x.ProjectCode descending
|
||||||
|
select x);
|
||||||
|
if (!string.IsNullOrEmpty(projectName))
|
||||||
|
{
|
||||||
|
projects = from x in projects where x.ProjectName.Contains(projectName) select x;
|
||||||
|
}
|
||||||
|
if (!string.IsNullOrEmpty(projectCode))
|
||||||
|
{
|
||||||
|
projects = from x in projects where x.ProjectCode.Contains(projectCode) select x;
|
||||||
|
}
|
||||||
|
return (from x in projects
|
||||||
|
join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId
|
||||||
|
select x).Distinct().ToList();
|
||||||
|
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -686,36 +686,67 @@ namespace BLL
|
||||||
/// 获取企业负责人带班检查次数
|
/// 获取企业负责人带班检查次数
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static int GetCompanyLeadShiftCheckNum()
|
public static int GetCompanyLeadShiftCheckNum(string[] pids=null)
|
||||||
{
|
{
|
||||||
var result = (from x in Funs.DB.Supervise_SuperviseCheckReport
|
if (pids == null)
|
||||||
where x.CheckType == "1" && x.CheckDate > Const.DtmarkTime
|
{
|
||||||
select x).Count();
|
var result = (from x in Funs.DB.Supervise_SuperviseCheckReport
|
||||||
return result;
|
where x.CheckType == "1" && x.CheckDate > Const.DtmarkTime
|
||||||
|
select x).Count();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
var result = (from x in Funs.DB.Supervise_SuperviseCheckReport
|
||||||
|
where x.CheckType == "1" && x.CheckDate > Const.DtmarkTime
|
||||||
|
&& pids.Contains(x.ProjectId)
|
||||||
|
select x).Count();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取企业综合检查次数
|
/// 获取企业综合检查次数
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static int GetCompanyComprehensiveCheckNum()
|
public static int GetCompanyComprehensiveCheckNum(string[] pids = null)
|
||||||
{
|
{
|
||||||
var result = (from x in Funs.DB.Supervise_SuperviseCheckReport
|
if (pids == null) {
|
||||||
where x.CheckType == "2" && x.CheckDate > Const.DtmarkTime
|
var result = (from x in Funs.DB.Supervise_SuperviseCheckReport
|
||||||
select x).Count();
|
where x.CheckType == "2" && x.CheckDate > Const.DtmarkTime
|
||||||
return result;
|
select x).Count();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
var result = (from x in Funs.DB.Supervise_SuperviseCheckReport
|
||||||
|
where x.CheckType == "2" && x.CheckDate > Const.DtmarkTime
|
||||||
|
&& pids.Contains(x.ProjectId)
|
||||||
|
select x).Count();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取企业专项检查次数
|
/// 获取企业专项检查次数
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static int GetCompanySpecialCheckNum()
|
public static int GetCompanySpecialCheckNum(string[] pids = null)
|
||||||
{
|
{
|
||||||
var result = (from x in Funs.DB.Supervise_SuperviseCheckReport
|
if (pids == null)
|
||||||
where x.CheckType == "3" && x.CheckDate > Const.DtmarkTime
|
{
|
||||||
select x).Count();
|
var result = (from x in Funs.DB.Supervise_SuperviseCheckReport
|
||||||
return result;
|
where x.CheckType == "3" && x.CheckDate > Const.DtmarkTime
|
||||||
|
select x).Count();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
var result = (from x in Funs.DB.Supervise_SuperviseCheckReport
|
||||||
|
where x.CheckType == "3" && x.CheckDate > Const.DtmarkTime
|
||||||
|
&& pids.Contains(x.ProjectId)
|
||||||
|
select x).Count();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -68,6 +68,11 @@
|
||||||
.tab .t-item {
|
.tab .t-item {
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.bw-item-content {
|
||||||
|
overflow: hidden;
|
||||||
|
overflow-y: scroll;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
@ -116,11 +121,11 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="tab-wrap">
|
<div class="tab-wrap">
|
||||||
<div class="tab" data-value="1">
|
<div class="tab" data-value="1">
|
||||||
<div class="t-item" style="background-color: #B3764D">未投料</div>
|
<div class="t-item" style="background-color: #DD226D">未投料</div>
|
||||||
<div class="spline"></div>
|
<div class="spline"></div>
|
||||||
<div class="t-item" style="background-color: #DD226D">投料中</div>
|
<div class="t-item" style="background-color: #57C43C">投料中</div>
|
||||||
<div class="spline"></div>
|
<div class="spline"></div>
|
||||||
<div class="t-item" style="background-color: #57C43C">投料完成</div>
|
<div class="t-item" style="background-color: #B3764D">投料完成</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="bw-item-content">
|
<div class="bw-item-content">
|
||||||
|
@ -487,7 +492,7 @@
|
||||||
var threeData = JSON.parse(fourDecisionStr);
|
var threeData = JSON.parse(fourDecisionStr);
|
||||||
var threewidth = Math.floor(100 / threeData.length);
|
var threewidth = Math.floor(100 / threeData.length);
|
||||||
$.each(threeData, function (index, item) {
|
$.each(threeData, function (index, item) {
|
||||||
$("#three").append("<div id='three" + index + "' style='width:" + threewidth + "%; height:100%; display:inline-block'></div>");
|
$("#three").append("<div id='three" + index + "' style='width:129px; height:148px; display:inline-block'></div>");
|
||||||
});
|
});
|
||||||
|
|
||||||
//图4
|
//图4
|
||||||
|
@ -495,7 +500,7 @@
|
||||||
var fourData = JSON.parse(fourStr);
|
var fourData = JSON.parse(fourStr);
|
||||||
var fourwidth = Math.floor(100 / (fourData.length / 2));
|
var fourwidth = Math.floor(100 / (fourData.length / 2));
|
||||||
$.each(fourData, function (index, item) {
|
$.each(fourData, function (index, item) {
|
||||||
$("#four").append("<div id='four" + index + "' style='width:" + fourwidth + "%; height:50%; display:inline-block'></div>");
|
$("#four").append("<div id='four" + index + "' style='width:129px; height:148px; display:inline-block'></div>");
|
||||||
});
|
});
|
||||||
|
|
||||||
//图5
|
//图5
|
||||||
|
@ -503,7 +508,7 @@
|
||||||
var fiveData = JSON.parse(fiveStr);
|
var fiveData = JSON.parse(fiveStr);
|
||||||
var fivewidth = Math.floor(100 / (fiveData.length / 2));
|
var fivewidth = Math.floor(100 / (fiveData.length / 2));
|
||||||
$.each(fourData, function (index, item) {
|
$.each(fourData, function (index, item) {
|
||||||
$("#five").append("<div id='five" + index + "' style='width:" + fivewidth + "%; height:50%; display:inline-block'></div>");
|
$("#five").append("<div id='five" + index + "' style='width:129px; height:148px; display:inline-block'></div>");
|
||||||
});
|
});
|
||||||
|
|
||||||
//图6
|
//图6
|
||||||
|
@ -816,19 +821,26 @@
|
||||||
//if (item.RunType == 3) {
|
//if (item.RunType == 3) {
|
||||||
// colorData = ["#CCCC33", "#8FCC33", "#57C43C", "#22DD48"];
|
// colorData = ["#CCCC33", "#8FCC33", "#57C43C", "#22DD48"];
|
||||||
//}
|
//}
|
||||||
var colorData = ["#7A7AA7", "#5656CC", "#3939E9", "#2222FF"];
|
var colorData = ["#DD226D", "#DD226D", "#DD226D", "#DD226D"];
|
||||||
if (item.RunType == 2) {
|
if (item.RunType == 2) {
|
||||||
colorData = ["#DD226D", "#DD226D", "#E95B39", "#DD226D"];
|
colorData = ["#57C43C", "#57C43C", "#57C43C", "#57C43C"];
|
||||||
}
|
}
|
||||||
if (item.RunType == 3) {
|
if (item.RunType == 3) {
|
||||||
colorData = ["#3fbb6a", "#3fbb6a", "#3fbb6a", "#3fbb6a"];
|
colorData = ["#B3764D", "#B3764D", "#B3764D", "#B3764D"];
|
||||||
}
|
}
|
||||||
var chart = echarts.init(document.getElementById('four' + index));
|
var chart = echarts.init(document.getElementById('four' + index));
|
||||||
var value = 100;
|
var value = 100;
|
||||||
|
|
||||||
|
//名称
|
||||||
|
var sname = item.SystemName;
|
||||||
|
var index = sname.indexOf(" ")
|
||||||
|
if (index!=-1) {
|
||||||
|
sname = sname.substring(0, index) + "\n" + sname.substring(index + 1, sname.length);
|
||||||
|
}
|
||||||
option = {
|
option = {
|
||||||
backgroundColor: '000',
|
backgroundColor: '000',
|
||||||
title: {
|
title: {
|
||||||
text: `` + item.SystemName,
|
text: `` + sname,
|
||||||
subtext: item.RunType == 1 ? "未投料" : item.RunType == 2 ? "投料中" : "投料完成",
|
subtext: item.RunType == 1 ? "未投料" : item.RunType == 2 ? "投料中" : "投料完成",
|
||||||
left: 'center',
|
left: 'center',
|
||||||
top: '45%', //top待调整
|
top: '45%', //top待调整
|
||||||
|
@ -926,10 +938,17 @@
|
||||||
}
|
}
|
||||||
var chart = echarts.init(document.getElementById('five' + index));
|
var chart = echarts.init(document.getElementById('five' + index));
|
||||||
var value = 100;
|
var value = 100;
|
||||||
|
//名称
|
||||||
|
var sname = item.SystemName;
|
||||||
|
var index = sname.indexOf(" ")
|
||||||
|
if (index != -1) {
|
||||||
|
sname = sname.substring(0, index) + "\n" + sname.substring(index + 1, sname.length);
|
||||||
|
}
|
||||||
|
|
||||||
option = {
|
option = {
|
||||||
backgroundColor: '000',
|
backgroundColor: '000',
|
||||||
title: {
|
title: {
|
||||||
text: `` + item.SystemName,
|
text: sname,
|
||||||
subtext: item.RunType == 1 ? "未运行" : item.RunType == 2 ? "运行中" : "停车检修",
|
subtext: item.RunType == 1 ? "未运行" : item.RunType == 2 ? "运行中" : "停车检修",
|
||||||
left: 'center',
|
left: 'center',
|
||||||
top: '45%', //top待调整
|
top: '45%', //top待调整
|
||||||
|
|
|
@ -39,6 +39,11 @@
|
||||||
.cl-tab {
|
.cl-tab {
|
||||||
padding: 0.025rem 0 !important;
|
padding: 0.025rem 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.c-site>.num-box>.num {
|
||||||
|
font-size: .215rem;
|
||||||
|
color: #21FFAF;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
@ -2346,7 +2351,8 @@
|
||||||
dataZoom: [
|
dataZoom: [
|
||||||
{
|
{
|
||||||
// 设置滚动条的隐藏或显示
|
// 设置滚动条的隐藏或显示
|
||||||
show: value.length > 10,
|
/* show: value.length > 10,*/
|
||||||
|
show: true,
|
||||||
// 设置类型
|
// 设置类型
|
||||||
type: "slider",
|
type: "slider",
|
||||||
// 设置背景颜色
|
// 设置背景颜色
|
||||||
|
|
|
@ -13,11 +13,19 @@ namespace FineUIPro.Web.common
|
||||||
{
|
{
|
||||||
List<Model.Base_Project> allProjects;
|
List<Model.Base_Project> allProjects;
|
||||||
public static List<Model.Solution_LargerHazard> LargerHazard = new List<Model.Solution_LargerHazard>();
|
public static List<Model.Solution_LargerHazard> LargerHazard = new List<Model.Solution_LargerHazard>();
|
||||||
|
|
||||||
|
public string[] pids { get; set; }
|
||||||
protected void Page_Load(object sender, EventArgs e)
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (!IsPostBack)
|
if (!IsPostBack)
|
||||||
{
|
{
|
||||||
Model.SGGLDB db = Funs.DB;
|
Model.SGGLDB db = Funs.DB;
|
||||||
|
if (!string.IsNullOrEmpty(CurrUser.CompanyProjectId))
|
||||||
|
{
|
||||||
|
pids = CurrUser.CompanyProjectId.Split(',');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//未遂事故
|
//未遂事故
|
||||||
var wsAccidentList1 = from x in db.Accident_AccidentPersonRecord
|
var wsAccidentList1 = from x in db.Accident_AccidentPersonRecord
|
||||||
join y in db.Base_AccidentType on x.AccidentTypeId equals y.AccidentTypeId
|
join y in db.Base_AccidentType on x.AccidentTypeId equals y.AccidentTypeId
|
||||||
|
@ -31,7 +39,26 @@ namespace FineUIPro.Web.common
|
||||||
|
|
||||||
//安全人工时
|
//安全人工时
|
||||||
int wHours = db.SitePerson_PersonInOutNumber.Max(x => x.WorkHours) ?? 0;
|
int wHours = db.SitePerson_PersonInOutNumber.Max(x => x.WorkHours) ?? 0;
|
||||||
this.divSafeWorkTime.InnerHtml = CountAqrgs().ToString().Split('.')[0];
|
var countAqrgsSum = Convert.ToDecimal(0);
|
||||||
|
if (pids == null)
|
||||||
|
{
|
||||||
|
countAqrgsSum = CountAqrgs();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
countAqrgsSum = CountAqrgs(null,null,pids);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (countAqrgsSum > 10000)
|
||||||
|
{
|
||||||
|
countAqrgsSum = countAqrgsSum / Convert.ToDecimal(10000.00);
|
||||||
|
|
||||||
|
this.divSafeWorkTime.InnerHtml = Math.Round(countAqrgsSum, 2).ToString() + "万";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.divSafeWorkTime.InnerHtml = countAqrgsSum.ToString().Split('.')[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//本月安全人工时
|
//本月安全人工时
|
||||||
//int wHoursMonth = 0;
|
//int wHoursMonth = 0;
|
||||||
|
@ -43,50 +70,125 @@ namespace FineUIPro.Web.common
|
||||||
//}
|
//}
|
||||||
DateTime d1 = getStartMonth();
|
DateTime d1 = getStartMonth();
|
||||||
DateTime d2 = getEndMonth();
|
DateTime d2 = getEndMonth();
|
||||||
|
var countMonthAqrgs = Convert.ToDecimal(0);
|
||||||
|
if (pids == null)
|
||||||
|
{
|
||||||
|
countMonthAqrgs = CountAqrgs(d1, d2);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
countMonthAqrgs = CountAqrgs(d1, d2,pids);
|
||||||
|
}
|
||||||
|
if (countMonthAqrgs > 10000)
|
||||||
|
{
|
||||||
|
countMonthAqrgs = countMonthAqrgs / Convert.ToDecimal(10000.00);
|
||||||
|
|
||||||
|
this.divSafeWorkTimeMonth.InnerHtml = Math.Round(countMonthAqrgs, 2).ToString() + "万";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.divSafeWorkTimeMonth.InnerHtml = CountAqrgs(d1, d2).ToString().Split('.')[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
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)))
|
//int wHoursMonth = db.SitePerson_PersonInOutNumber.Where(x => x.InOutDate > DateTime.Now.AddDays(-Convert.ToInt32(DateTime.Now.Date.Day)))
|
||||||
// .Max(x => x.WorkHours) ?? 0;
|
// .Max(x => x.WorkHours) ?? 0;
|
||||||
//this.divSafeWorkTimeMonth.InnerHtml = wHoursMonth.ToString();
|
//this.divSafeWorkTimeMonth.InnerHtml = wHoursMonth.ToString();
|
||||||
|
|
||||||
//安全培训累计人员
|
//安全培训累计人员
|
||||||
var getTrainRecord = db.EduTrain_TrainRecord.Sum(x => x.TrainPersonNum) ?? 0;
|
var getTrainRecord = 0;
|
||||||
//修改:增加博晟教育中的人数
|
var boShengCount = 0;
|
||||||
var boShengCount = db.Bo_Sheng_TrainPerson.Where(x => (x.DeleteTag == "False" || x.DeleteTag == null)).ToList().Count;
|
if (pids == null)
|
||||||
this.divSafePersonNum.InnerHtml = (getTrainRecord + boShengCount).ToString();
|
{
|
||||||
|
getTrainRecord = db.EduTrain_TrainRecord.Sum(x => x.TrainPersonNum) ?? 0;
|
||||||
|
//修改:增加博晟教育中的人数
|
||||||
|
boShengCount = db.Bo_Sheng_TrainPerson.Where(x => (x.DeleteTag == "False" || x.DeleteTag == null)).ToList().Count;
|
||||||
|
this.divSafePersonNum.InnerHtml = (getTrainRecord + boShengCount).ToString();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
getTrainRecord = db.EduTrain_TrainRecord.Where(x=>pids.Contains(x.ProjectId)).Sum(x => x.TrainPersonNum) ?? 0;
|
||||||
|
//修改:增加博晟教育中的人数
|
||||||
|
boShengCount = db.Bo_Sheng_TrainPerson.Where(x => (x.DeleteTag == "False" || x.DeleteTag == null)
|
||||||
|
&& pids.Contains(x.ProjectId) ).ToList().Count;
|
||||||
|
|
||||||
//安全管理人员
|
this.divSafePersonNum.InnerHtml = (getTrainRecord + boShengCount).ToString();
|
||||||
var allSum = from x in Funs.DB.SitePerson_Person
|
}
|
||||||
where x.IsUsed == true && x.InTime < DateTime.Now && (x.OutTime == null || x.OutTime > DateTime.Now)
|
|
||||||
select x;
|
|
||||||
var glAllPerson = from x in allSum
|
|
||||||
join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId
|
|
||||||
//where (y.PostType == "1" || y.PostType == "4") //一般管理岗位和特种管理人员
|
|
||||||
where y.IsHsse == true
|
|
||||||
select x;
|
|
||||||
this.divSafeManagePersonNum.InnerText = glAllPerson.Count().ToString();
|
|
||||||
|
|
||||||
//质量管理人员
|
|
||||||
int CqmsManageNum = (from x in Funs.DB.Person_CompanyBranchPerson
|
if (pids == null)
|
||||||
|
{
|
||||||
|
//安全管理人员
|
||||||
|
var allSum = from x in Funs.DB.SitePerson_Person
|
||||||
|
where x.IsUsed == true && x.InTime < DateTime.Now && (x.OutTime == null || x.OutTime > DateTime.Now)
|
||||||
|
select x;
|
||||||
|
|
||||||
|
var glAllPerson = from x in allSum
|
||||||
|
join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId
|
||||||
|
//where (y.PostType == "1" || y.PostType == "4") //一般管理岗位和特种管理人员
|
||||||
|
where y.IsHsse == true
|
||||||
|
select x;
|
||||||
|
this.divSafeManagePersonNum.InnerText = glAllPerson.Count().ToString();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
//安全管理人员
|
||||||
|
var allSum = from x in Funs.DB.SitePerson_Person
|
||||||
|
where x.IsUsed == true && x.InTime < DateTime.Now && (x.OutTime == null || x.OutTime > DateTime.Now)
|
||||||
|
&& pids.Contains(x.ProjectId)
|
||||||
|
select x;
|
||||||
|
|
||||||
|
var glAllPerson = from x in allSum
|
||||||
|
join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId
|
||||||
|
//where (y.PostType == "1" || y.PostType == "4") //一般管理岗位和特种管理人员
|
||||||
|
where y.IsHsse == true
|
||||||
|
select x;
|
||||||
|
this.divSafeManagePersonNum.InnerText = glAllPerson.Count().ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
#region 质量管理人员,质量培训人员 增加公司级
|
||||||
|
int CqmsManageNum = 0;
|
||||||
|
int CqmsPxNum = 0;
|
||||||
|
//质量培训人员
|
||||||
|
DateTime date = DateTime.Now.AddDays(-1);
|
||||||
|
if (pids == null)
|
||||||
|
{
|
||||||
|
CqmsManageNum = (from x in Funs.DB.Person_CompanyBranchPerson
|
||||||
join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId
|
join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId
|
||||||
where x.IsOnJob == true && y.IsCQMS == true
|
where x.IsOnJob == true && y.IsCQMS == true
|
||||||
select x).Count() +
|
select x).Count() +
|
||||||
(from x in Funs.DB.SitePerson_Person
|
(from x in Funs.DB.SitePerson_Person
|
||||||
join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId
|
join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId
|
||||||
where x.IsUsed == true && y.IsCQMS == true
|
where x.IsUsed == true && y.IsCQMS == true
|
||||||
select x).Count();
|
select x).Count();
|
||||||
this.divCqmsManageNum.InnerText = CqmsManageNum.ToString();
|
this.divCqmsManageNum.InnerText = CqmsManageNum.ToString();
|
||||||
|
|
||||||
//质量培训人员
|
CqmsPxNum = (from x in Funs.DB.Comprehensive_InspectionPerson
|
||||||
DateTime date = DateTime.Now.AddDays(-1);
|
|
||||||
int CqmsPxNum = (from x in Funs.DB.Comprehensive_InspectionPerson
|
|
||||||
where x.IsTrain == true
|
where x.IsTrain == true
|
||||||
select x).Count();
|
select x).Count();
|
||||||
divCqmsPxNum.InnerText = CqmsPxNum.ToString();
|
divCqmsPxNum.InnerText = CqmsPxNum.ToString();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
CqmsManageNum = (from x in Funs.DB.SitePerson_Person
|
||||||
|
join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId
|
||||||
|
where x.IsUsed == true && y.IsCQMS == true && pids.Contains(x.ProjectId)
|
||||||
|
select x).Count();
|
||||||
|
this.divCqmsManageNum.InnerText = CqmsManageNum.ToString();
|
||||||
|
|
||||||
|
CqmsPxNum = (from x in Funs.DB.Comprehensive_InspectionPerson
|
||||||
|
where x.IsTrain == true && pids.Contains(x.ProjectId)
|
||||||
|
select x).Count();
|
||||||
|
divCqmsPxNum.InnerText = CqmsPxNum.ToString();
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
//在建项目
|
//在建项目
|
||||||
allProjects = ProjectService.GetAllProjectDropDownList();
|
if (pids == null)
|
||||||
|
{
|
||||||
|
allProjects = ProjectService.GetAllProjectDropDownList();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
allProjects = ProjectService.GetAllProjectDropDownList(pids);
|
||||||
|
}
|
||||||
|
|
||||||
int acount = allProjects.Count();
|
int acount = allProjects.Count();
|
||||||
int pcount1 = 0;
|
int pcount1 = 0;
|
||||||
int pcount2 = 0;
|
int pcount2 = 0;
|
||||||
|
@ -94,8 +196,15 @@ namespace FineUIPro.Web.common
|
||||||
if (acount > 0)
|
if (acount > 0)
|
||||||
{
|
{
|
||||||
pcount1 = allProjects.Where(x => x.ProjectState == Const.ProjectState_1 || x.ProjectState == null).Count();
|
pcount1 = allProjects.Where(x => x.ProjectState == Const.ProjectState_1 || x.ProjectState == null).Count();
|
||||||
pcount2 = (from x in Funs.DB.SitePerson_Person where x.IsUsed == true select x).Count();
|
var pidzjsg = string.Join(",", allProjects.Where(x => x.ProjectState == Const.ProjectState_1 || x.ProjectState == null).Select(x => x.ProjectId)).Split(',');
|
||||||
pcount3 = Count3();
|
if (pids == null) {
|
||||||
|
pcount2 = (from x in Funs.DB.SitePerson_Person where x.IsUsed == true && pidzjsg.Contains(x.ProjectId) select x).Count();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
pidzjsg = pids;
|
||||||
|
pcount2 = (from x in Funs.DB.SitePerson_Person where x.IsUsed == true && pids.Contains(x.ProjectId) select x).Count();
|
||||||
|
}
|
||||||
|
pcount3 = Count3(pidzjsg);
|
||||||
}
|
}
|
||||||
div_zjxmCount.InnerHtml = pcount1.ToString() + "<div class=\"th\">个</div>";
|
div_zjxmCount.InnerHtml = pcount1.ToString() + "<div class=\"th\">个</div>";
|
||||||
div_cjrsCount.InnerHtml = pcount2.ToString() + "<div class=\"th\">人</div>";
|
div_cjrsCount.InnerHtml = pcount2.ToString() + "<div class=\"th\">人</div>";
|
||||||
|
@ -162,7 +271,7 @@ namespace FineUIPro.Web.common
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="state"></param>
|
/// <param name="state"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
protected decimal CountAqrgs(DateTime? d1 = null, DateTime? d2 = null)
|
protected decimal CountAqrgs(DateTime? d1 = null, DateTime? d2 = null,string[] pids =null)
|
||||||
{
|
{
|
||||||
decimal cout1 = 0;
|
decimal cout1 = 0;
|
||||||
|
|
||||||
|
@ -171,7 +280,12 @@ namespace FineUIPro.Web.common
|
||||||
var getAllPersonInOutList = from x in Funs.DB.SitePerson_PersonInOutNumber
|
var getAllPersonInOutList = from x in Funs.DB.SitePerson_PersonInOutNumber
|
||||||
|
|
||||||
select x;
|
select x;
|
||||||
if (getAllPersonInOutList.Count() > 0)
|
if (pids != null) {
|
||||||
|
getAllPersonInOutList = from x in Funs.DB.SitePerson_PersonInOutNumber
|
||||||
|
where pids.Contains(x.ProjectId)
|
||||||
|
select x;
|
||||||
|
}
|
||||||
|
if (getAllPersonInOutList.Count() > 0)
|
||||||
{
|
{
|
||||||
if (datetime1.HasValue)
|
if (datetime1.HasValue)
|
||||||
{
|
{
|
||||||
|
@ -196,6 +310,18 @@ namespace FineUIPro.Web.common
|
||||||
where y.ProjectState == Const.ProjectState_1
|
where y.ProjectState == Const.ProjectState_1
|
||||||
select x;
|
select x;
|
||||||
|
|
||||||
|
if (pids!=null)
|
||||||
|
{
|
||||||
|
getD1 = from x in Funs.DB.Accident_AccidentHandle
|
||||||
|
join y in Funs.DB.Base_Project on x.ProjectId equals y.ProjectId
|
||||||
|
where pids.Contains(x.ProjectId)
|
||||||
|
select x;
|
||||||
|
getD2 = from x in Funs.DB.Accident_AccidentReport
|
||||||
|
join y in Funs.DB.Base_Project on x.ProjectId equals y.ProjectId
|
||||||
|
where pids.Contains(x.ProjectId)
|
||||||
|
select x;
|
||||||
|
}
|
||||||
|
|
||||||
if (datetime1.HasValue)
|
if (datetime1.HasValue)
|
||||||
{
|
{
|
||||||
getD1 = getD1.Where(x => x.AccidentDate >= datetime1);
|
getD1 = getD1.Where(x => x.AccidentDate >= datetime1);
|
||||||
|
@ -542,10 +668,10 @@ namespace FineUIPro.Web.common
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="state"></param>
|
/// <param name="state"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
protected int Count3()
|
protected int Count3(string[] pids)
|
||||||
{
|
{
|
||||||
int cout1 = 0;
|
int cout1 = 0;
|
||||||
cout1 = Funs.DB.Solution_LargerHazard.Where(x => x.States == Const.State_2).Count();
|
cout1 = Funs.DB.Solution_LargerHazard.Where(x => x.States == Const.State_2 && pids.Contains(x.ProjectId)).Count();
|
||||||
return cout1;
|
return cout1;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -561,20 +687,48 @@ namespace FineUIPro.Web.common
|
||||||
protected string zgzglDataValue;
|
protected string zgzglDataValue;
|
||||||
protected void getZlwt()
|
protected void getZlwt()
|
||||||
{
|
{
|
||||||
zlallNumber = (from x in Funs.DB.Check_CheckControl
|
if (pids == null)
|
||||||
where x.CheckDate <= DateTime.Now
|
{
|
||||||
select x).Count().ToString();
|
zlallNumber = (from x in Funs.DB.Check_CheckControl
|
||||||
var num2 = (from x in Funs.DB.Check_CheckControl
|
where x.CheckDate <= DateTime.Now
|
||||||
where x.CheckDate <= DateTime.Now && x.State == "7"
|
select x).Count().ToString();
|
||||||
select x).Count();
|
|
||||||
zlfinishNumber = num2.ToString();
|
var num2 = (from x in Funs.DB.Check_CheckControl
|
||||||
var num3 = (from x in Funs.DB.Check_CheckControl
|
where x.CheckDate <= DateTime.Now && x.State == "7"
|
||||||
where x.CheckDate <= DateTime.Now && x.State != "7"
|
select x).Count();
|
||||||
select x).Count();
|
|
||||||
|
zlfinishNumber = num2.ToString();
|
||||||
|
var num3 = (from x in Funs.DB.Check_CheckControl
|
||||||
|
where x.CheckDate <= DateTime.Now && x.State != "7"
|
||||||
|
select x).Count();
|
||||||
|
|
||||||
|
var zgl = String.Format("{0:N2}", 100.0 * num2 / (num2 + num3));
|
||||||
|
|
||||||
|
zlzgl = zgl.ToString();
|
||||||
|
|
||||||
|
zgzglDataValue = (100 - (100.0 * num2 / (num2 + num3))).ToString();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
zlallNumber = (from x in Funs.DB.Check_CheckControl
|
||||||
|
where x.CheckDate <= DateTime.Now && pids.Contains(x.ProjectId)
|
||||||
|
select x).Count().ToString();
|
||||||
|
|
||||||
|
var num2 = (from x in Funs.DB.Check_CheckControl
|
||||||
|
where x.CheckDate <= DateTime.Now && x.State == "7" && pids.Contains(x.ProjectId)
|
||||||
|
select x).Count();
|
||||||
|
|
||||||
|
zlfinishNumber = num2.ToString();
|
||||||
|
var num3 = (from x in Funs.DB.Check_CheckControl
|
||||||
|
where x.CheckDate <= DateTime.Now && x.State != "7" && pids.Contains(x.ProjectId)
|
||||||
|
select x).Count();
|
||||||
|
|
||||||
|
var zgl = String.Format("{0:N2}", 100.0 * num2 / (num2 + num3));
|
||||||
|
|
||||||
|
zlzgl = zgl.ToString();
|
||||||
|
|
||||||
|
zgzglDataValue = (100 - (100.0 * num2 / (num2 + num3))).ToString();
|
||||||
|
}
|
||||||
|
|
||||||
var zgl = String.Format("{0:N2}", 100.0 * num2 / (num2 + num3));
|
|
||||||
zlzgl = zgl.ToString();
|
|
||||||
zgzglDataValue = (100 - (100.0 * num2 / (num2 + num3))).ToString();
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -586,19 +740,39 @@ namespace FineUIPro.Web.common
|
||||||
protected string zggjzglDataValue;
|
protected string zggjzglDataValue;
|
||||||
protected void getZlgj()
|
protected void getZlgj()
|
||||||
{
|
{
|
||||||
var num1 = (from x in Funs.DB.ProcessControl_InspectionManagement
|
if (pids == null)
|
||||||
select x).Count();
|
{
|
||||||
//Check_JointCheck
|
var num1 = (from x in Funs.DB.ProcessControl_InspectionManagement
|
||||||
zlgjallNumber = num1.ToString();
|
select x).Count();
|
||||||
|
//Check_JointCheck
|
||||||
|
zlgjallNumber = num1.ToString();
|
||||||
|
|
||||||
var num2 = (from x in Funs.DB.ProcessControl_InspectionManagement
|
var num2 = (from x in Funs.DB.ProcessControl_InspectionManagement
|
||||||
where x.IsOnceQualified == true
|
where x.IsOnceQualified == true
|
||||||
select x).Count();
|
select x).Count();
|
||||||
zlgjfinishNumber = num2.ToString();
|
zlgjfinishNumber = num2.ToString();
|
||||||
|
|
||||||
|
var zgl = String.Format("{0:N2}", 100.0 * num2 / num1);
|
||||||
|
zlgjzgl = zgl.ToString();
|
||||||
|
zggjzglDataValue = (100 - (100.0 * num2 / num1)).ToString();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
var num1 = (from x in Funs.DB.ProcessControl_InspectionManagement
|
||||||
|
where pids.Contains(x.ProjectId)
|
||||||
|
select x).Count();
|
||||||
|
//Check_JointCheck
|
||||||
|
zlgjallNumber = num1.ToString();
|
||||||
|
|
||||||
|
var num2 = (from x in Funs.DB.ProcessControl_InspectionManagement
|
||||||
|
where x.IsOnceQualified == true && pids.Contains(x.ProjectId)
|
||||||
|
select x).Count();
|
||||||
|
zlgjfinishNumber = num2.ToString();
|
||||||
|
|
||||||
|
var zgl = String.Format("{0:N2}", 100.0 * num2 / num1);
|
||||||
|
zlgjzgl = zgl.ToString();
|
||||||
|
zggjzglDataValue = (100 - (100.0 * num2 / num1)).ToString();
|
||||||
|
}
|
||||||
|
|
||||||
var zgl = String.Format("{0:N2}", 100.0 * num2 / num1);
|
|
||||||
zlgjzgl = zgl.ToString();
|
|
||||||
zggjzglDataValue = (100 - (100.0 * num2 / num1)).ToString();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -617,6 +791,10 @@ namespace FineUIPro.Web.common
|
||||||
double result = 0;
|
double result = 0;
|
||||||
Model.SGGLDB db = Funs.DB;
|
Model.SGGLDB db = Funs.DB;
|
||||||
var ndtLists = from x in db.ProcessControl_NondestructiveTest_New where x.ProfessionalName == "工艺管道" select x;
|
var ndtLists = from x in db.ProcessControl_NondestructiveTest_New where x.ProfessionalName == "工艺管道" select x;
|
||||||
|
if (pids!=null)
|
||||||
|
{
|
||||||
|
ndtLists = from x in db.ProcessControl_NondestructiveTest_New where x.ProfessionalName == "工艺管道" && pids.Contains(x.ProjectId) select x;
|
||||||
|
}
|
||||||
decimal a = 0, b = 0;
|
decimal a = 0, b = 0;
|
||||||
if (ndtLists.Count() > 0)
|
if (ndtLists.Count() > 0)
|
||||||
{
|
{
|
||||||
|
@ -673,30 +851,61 @@ namespace FineUIPro.Web.common
|
||||||
protected string gjsxZdl = "0";
|
protected string gjsxZdl = "0";
|
||||||
protected void getGjsx()
|
protected void getGjsx()
|
||||||
{
|
{
|
||||||
//Check_JointCheck
|
if (pids == null)
|
||||||
var znum = (from x in Funs.DB.GJSX
|
{
|
||||||
select x).Count();
|
//Check_JointCheck
|
||||||
divGjsxzj.InnerHtml = znum.ToString();
|
var znum = (from x in Funs.DB.GJSX
|
||||||
|
select x).Count();
|
||||||
|
divGjsxzj.InnerHtml = znum.ToString();
|
||||||
|
|
||||||
//到期应完成
|
//到期应完成
|
||||||
var dqnum = (from x in Funs.DB.GJSX
|
var dqnum = (from x in Funs.DB.GJSX
|
||||||
where x.CompleteDate <= DateTime.Now
|
where x.CompleteDate <= DateTime.Now
|
||||||
select x).Count().ToString();
|
select x).Count().ToString();
|
||||||
divGjsxdq.InnerHtml = dqnum;
|
divGjsxdq.InnerHtml = dqnum;
|
||||||
|
|
||||||
//未准点完成
|
//未准点完成
|
||||||
var wzdnum = (from x in Funs.DB.GJSX
|
var wzdnum = (from x in Funs.DB.GJSX
|
||||||
where x.CompleteDate <= DateTime.Now
|
where x.CompleteDate <= DateTime.Now
|
||||||
&& x.State != "0"
|
&& x.State != "0"
|
||||||
select x).Count().ToString();
|
select x).Count().ToString();
|
||||||
divGjsxwzd.InnerHtml = wzdnum;
|
divGjsxwzd.InnerHtml = wzdnum;
|
||||||
|
|
||||||
|
//准点率,已完成/总数*100
|
||||||
|
var ywcnum = (from x in Funs.DB.GJSX
|
||||||
|
where x.CompleteDate <= DateTime.Now
|
||||||
|
&& x.State == "0"
|
||||||
|
select x).Count();
|
||||||
|
gjsxZdl = Math.Round((100.0 * ywcnum / znum), 2).ToString();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
//Check_JointCheck
|
||||||
|
var znum = (from x in Funs.DB.GJSX
|
||||||
|
where pids.Contains(x.ProjectId)
|
||||||
|
select x).Count();
|
||||||
|
divGjsxzj.InnerHtml = znum.ToString();
|
||||||
|
|
||||||
|
//到期应完成
|
||||||
|
var dqnum = (from x in Funs.DB.GJSX
|
||||||
|
where x.CompleteDate <= DateTime.Now && pids.Contains(x.ProjectId)
|
||||||
|
select x).Count().ToString();
|
||||||
|
divGjsxdq.InnerHtml = dqnum;
|
||||||
|
|
||||||
|
//未准点完成
|
||||||
|
var wzdnum = (from x in Funs.DB.GJSX
|
||||||
|
where x.CompleteDate <= DateTime.Now
|
||||||
|
&& x.State != "0" && pids.Contains(x.ProjectId)
|
||||||
|
select x).Count().ToString();
|
||||||
|
divGjsxwzd.InnerHtml = wzdnum;
|
||||||
|
|
||||||
|
//准点率,已完成/总数*100
|
||||||
|
var ywcnum = (from x in Funs.DB.GJSX
|
||||||
|
where x.CompleteDate <= DateTime.Now
|
||||||
|
&& x.State == "0" && pids.Contains(x.ProjectId)
|
||||||
|
select x).Count();
|
||||||
|
gjsxZdl = Math.Round((100.0 * ywcnum / znum), 2).ToString();
|
||||||
|
}
|
||||||
|
|
||||||
//准点率,已完成/总数*100
|
|
||||||
var ywcnum = (from x in Funs.DB.GJSX
|
|
||||||
where x.CompleteDate <= DateTime.Now
|
|
||||||
&& x.State == "0"
|
|
||||||
select x).Count();
|
|
||||||
gjsxZdl = Math.Round((100.0 * ywcnum / znum), 2).ToString();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -706,7 +915,14 @@ namespace FineUIPro.Web.common
|
||||||
{
|
{
|
||||||
int AllCount = 0;
|
int AllCount = 0;
|
||||||
int MCount = 0;
|
int MCount = 0;
|
||||||
var getallin = APIPageDataService.getPersonNumByCompany(DateTime.Now);
|
var getallin = new List<Model.PageDataPersonInOutItem>();
|
||||||
|
if (pids == null)
|
||||||
|
{
|
||||||
|
getallin = APIPageDataService.getPersonNumByCompany(DateTime.Now);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
getallin = APIPageDataService.getPersonNumByCompany(DateTime.Now,pids);
|
||||||
|
}
|
||||||
AllCount = getallin.Count();
|
AllCount = getallin.Count();
|
||||||
if (AllCount > 0)
|
if (AllCount > 0)
|
||||||
{
|
{
|
||||||
|
@ -727,7 +943,16 @@ namespace FineUIPro.Web.common
|
||||||
protected string ProjectPersonMc;
|
protected string ProjectPersonMc;
|
||||||
private void getProjectSitePerson()
|
private void getProjectSitePerson()
|
||||||
{
|
{
|
||||||
var list = Funs.DB.Base_Project.Where(x => (x.ProjectState == Const.ProjectState_1 || x.ProjectState == null)).ToList();
|
var list = new List<Model.Base_Project>();
|
||||||
|
if (pids == null)
|
||||||
|
{
|
||||||
|
list= Funs.DB.Base_Project.Where(x => (x.ProjectState == Const.ProjectState_1 || x.ProjectState == null)).ToList();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
list = Funs.DB.Base_Project.Where(x => pids.Contains(x.ProjectId)).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
foreach (var item in list)
|
foreach (var item in list)
|
||||||
{
|
{
|
||||||
ProjectPersonMc += "'" + item.ShortName + "',";
|
ProjectPersonMc += "'" + item.ShortName + "',";
|
||||||
|
@ -743,14 +968,25 @@ namespace FineUIPro.Web.common
|
||||||
protected string ProjectMc;
|
protected string ProjectMc;
|
||||||
protected void getJd()
|
protected void getJd()
|
||||||
{
|
{
|
||||||
var list = Funs.DB.Base_Project.Where(x => (x.ProjectState == Const.ProjectState_1 || x.ProjectState == null) && x.Progress != null).ToList();
|
var list = new List<Model.Base_Project>();
|
||||||
foreach (var item in list)
|
if (pids == null)
|
||||||
{
|
{
|
||||||
ProjectJd += "'" + item.Progress.Value.ToString("0.##") + "',";
|
list = Funs.DB.Base_Project.Where(x => (x.ProjectState == Const.ProjectState_1 || x.ProjectState == null) && x.Progress != null).ToList();
|
||||||
ProjectMc += "'" + item.ShortName + "',";
|
|
||||||
}
|
}
|
||||||
ProjectJd = ProjectJd.TrimEnd(',');
|
else {
|
||||||
ProjectMc = ProjectMc.TrimEnd(',');
|
list = Funs.DB.Base_Project.Where(x => pids.Contains(x.ProjectId) && x.Progress != null).ToList();
|
||||||
|
}
|
||||||
|
if (list.Count>0)
|
||||||
|
{
|
||||||
|
foreach (var item in list)
|
||||||
|
{
|
||||||
|
ProjectJd += "'" + item.Progress.Value.ToString("0.##") + "',";
|
||||||
|
ProjectMc += "'" + item.ShortName + "',";
|
||||||
|
}
|
||||||
|
ProjectJd = ProjectJd.TrimEnd(',');
|
||||||
|
ProjectMc = ProjectMc.TrimEnd(',');
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -767,22 +1003,42 @@ namespace FineUIPro.Web.common
|
||||||
/// 获取隐患整改闭环项
|
/// 获取隐患整改闭环项
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static int GetGeneralClosedNum()
|
public int GetGeneralClosedNum()
|
||||||
{
|
{
|
||||||
int result = (from x in Funs.DB.HSSE_Hazard_HazardRegister
|
int result = 0;
|
||||||
|
if (pids==null)
|
||||||
|
{
|
||||||
|
result = (from x in Funs.DB.HSSE_Hazard_HazardRegister
|
||||||
where x.States == "3"
|
where x.States == "3"
|
||||||
select x).Count();
|
select x).Count();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
result = (from x in Funs.DB.HSSE_Hazard_HazardRegister
|
||||||
|
where x.States == "3" && pids.Contains(x.ProjectId)
|
||||||
|
select x).Count();
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取隐患未整改完成项
|
/// 获取隐患未整改完成项
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static int GetGeneralNotClosedNum()
|
public int GetGeneralNotClosedNum()
|
||||||
{
|
{
|
||||||
int result = (from x in Funs.DB.HSSE_Hazard_HazardRegister
|
int result = 0;
|
||||||
|
if (pids == null)
|
||||||
|
{
|
||||||
|
result = (from x in Funs.DB.HSSE_Hazard_HazardRegister
|
||||||
where x.States != "3"
|
where x.States != "3"
|
||||||
select x).Count();
|
select x).Count();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
result = (from x in Funs.DB.HSSE_Hazard_HazardRegister
|
||||||
|
where x.States != "3" && pids.Contains(x.ProjectId)
|
||||||
|
select x).Count();
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -797,7 +1053,15 @@ namespace FineUIPro.Web.common
|
||||||
{
|
{
|
||||||
|
|
||||||
//项目
|
//项目
|
||||||
var list = Funs.DB.Base_Project.Where(x => (x.ProjectState == Const.ProjectState_1 || x.ProjectState == null)).ToList();
|
var list = new List<Model.Base_Project>();
|
||||||
|
if (pids == null)
|
||||||
|
{
|
||||||
|
list = Funs.DB.Base_Project.Where(x => (x.ProjectState == Const.ProjectState_1 || x.ProjectState == null) && x.Progress != null).ToList();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
list = Funs.DB.Base_Project.Where(x => pids.Contains(x.ProjectId) && x.Progress != null).ToList();
|
||||||
|
}
|
||||||
var PipelinList = Funs.DB.CLGL_PipelineMaterialSumList.Where(x => x.Type == "M");
|
var PipelinList = Funs.DB.CLGL_PipelineMaterialSumList.Where(x => x.Type == "M");
|
||||||
var SbclList = Funs.DB.CLGL_ContractListSum.Where(x => x.C1 == "设备");
|
var SbclList = Funs.DB.CLGL_ContractListSum.Where(x => x.C1 == "设备");
|
||||||
foreach (var item in list)
|
foreach (var item in list)
|
||||||
|
@ -920,13 +1184,25 @@ namespace FineUIPro.Web.common
|
||||||
/// 获取未遂事件数
|
/// 获取未遂事件数
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static int GetNearMissNum()
|
private int GetNearMissNum()
|
||||||
{
|
{
|
||||||
var result = (from x in Funs.DB.Accident_AccidentPersonRecord
|
if (pids == null)
|
||||||
join y in Funs.DB.Base_AccidentType on x.AccidentTypeId equals y.AccidentTypeId
|
{
|
||||||
where x.IsAttempt == "1" && x.CompileDate > Const.DtmarkTime
|
var result = (from x in Funs.DB.Accident_AccidentPersonRecord
|
||||||
select x).Count();
|
join y in Funs.DB.Base_AccidentType on x.AccidentTypeId equals y.AccidentTypeId
|
||||||
return result;
|
where x.IsAttempt == "1" && x.CompileDate > Const.DtmarkTime
|
||||||
|
select x).Count();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
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
|
||||||
|
&& pids.Contains(x.ProjectId)
|
||||||
|
select x).Count();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -217,14 +217,14 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="y_box js-hover" data-type="yhpc" style="width: 6rem;height: 5.0875rem;">
|
<div class="y_box js-hover" style="width: 6rem;height: 5.0875rem;">
|
||||||
<div class="y_box_label y_image_default tab-wrap">隐患排查治理数据
|
<div class="y_box_label y_image_default tab-wrap">隐患排查治理数据
|
||||||
<div class="y_tabs y_row">
|
<div class="y_tabs y_row">
|
||||||
<span class="y_image_default y_tab-action active" data-type="yb" style="cursor:pointer" onclick="yjClick(0)" id="ybyh_span">一般隐患</span>
|
<span class="y_image_default y_tab-action active" data-type="yb" style="cursor:pointer" onclick="yjClick(0)" id="ybyh_span">一般隐患</span>
|
||||||
<span class="y_image_default" data-type="zd" style="cursor:pointer" onclick="yjClick(1)" id="zdyh_span">重大隐患</span>
|
<span class="y_image_default" data-type="zd" style="cursor:pointer" onclick="yjClick(1)" id="zdyh_span">重大隐患</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="y_box_main">
|
<div class="y_box_main" data-type="yhpc" >
|
||||||
<div class="pc_box y_row " style="padding-top: .25rem;">
|
<div class="pc_box y_row " style="padding-top: .25rem;">
|
||||||
<div class="pc-item">
|
<div class="pc-item">
|
||||||
<div class="pc-item-card y_column y_image_default">
|
<div class="pc-item-card y_column y_image_default">
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -18,6 +18,12 @@ namespace FineUIPro.Web.common
|
||||||
protected string hjallNumber = "0";
|
protected string hjallNumber = "0";
|
||||||
protected string hjfinishNumber = "0";
|
protected string hjfinishNumber = "0";
|
||||||
protected string hjzgl = "0";
|
protected string hjzgl = "0";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 公司级项目筛选
|
||||||
|
/// </summary>
|
||||||
|
public string[] pids { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 页面加载
|
/// 页面加载
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -27,6 +33,10 @@ namespace FineUIPro.Web.common
|
||||||
{
|
{
|
||||||
if (!IsPostBack)
|
if (!IsPostBack)
|
||||||
{
|
{
|
||||||
|
if (!string.IsNullOrEmpty(CurrUser.CompanyProjectId))
|
||||||
|
{
|
||||||
|
pids = CurrUser.CompanyProjectId.Split(',');
|
||||||
|
}
|
||||||
ProjectService.InitProjectShortNameByStateDropDownList(this.drpProject, this.CurrUser.UserId, BLL.Const.ProjectState_1, false);
|
ProjectService.InitProjectShortNameByStateDropDownList(this.drpProject, this.CurrUser.UserId, BLL.Const.ProjectState_1, false);
|
||||||
if (this.drpProject.Items.Count > 0)
|
if (this.drpProject.Items.Count > 0)
|
||||||
{
|
{
|
||||||
|
@ -121,78 +131,139 @@ namespace FineUIPro.Web.common
|
||||||
/// 获取项目部人数
|
/// 获取项目部人数
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static int GetProjectPersonNum()
|
public int GetProjectPersonNum()
|
||||||
{
|
{
|
||||||
int result = (from x in Funs.DB.SitePerson_Person
|
if (pids == null)
|
||||||
join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId
|
{
|
||||||
where y.IsCQMS == true && x.IsUsed == true
|
int result = (from x in Funs.DB.SitePerson_Person
|
||||||
select x).Count();
|
join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId
|
||||||
return result;
|
where y.IsCQMS == true && x.IsUsed == true
|
||||||
|
select x).Count();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
int result = (from x in Funs.DB.SitePerson_Person
|
||||||
|
join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId
|
||||||
|
where y.IsCQMS == true && x.IsUsed == true && pids.Contains(x.ProjectId)
|
||||||
|
select x).Count();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取在用计量器具数
|
/// 获取在用计量器具数
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static int GetUseNum()
|
public int GetUseNum()
|
||||||
{
|
{
|
||||||
int result = (from x in Funs.DB.Comprehensive_InspectionMachine
|
if (pids == null)
|
||||||
where x.IsOnSite == true && x.InspectionType.Contains("计量")
|
{
|
||||||
select x).Count();
|
int result = (from x in Funs.DB.Comprehensive_InspectionMachine
|
||||||
return result;
|
where x.IsOnSite == true && x.InspectionType.Contains("计量")
|
||||||
|
select x).Count();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
int result = (from x in Funs.DB.Comprehensive_InspectionMachine
|
||||||
|
where x.IsOnSite == true && x.InspectionType.Contains("计量") && pids.Contains(x.ProjectId)
|
||||||
|
select x).Count();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取校准合格数
|
/// 获取校准合格数
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static int GetOKNum()
|
public int GetOKNum()
|
||||||
{
|
{
|
||||||
int result = (from x in Funs.DB.Comprehensive_InspectionMachine
|
if (pids == null)
|
||||||
where x.IsOnSite == true && x.InspectionType.Contains("计量") && x.IsCheckOK == true
|
{
|
||||||
select x).Count();
|
int result = (from x in Funs.DB.Comprehensive_InspectionMachine
|
||||||
return result;
|
where x.IsOnSite == true && x.InspectionType.Contains("计量") && x.IsCheckOK == true
|
||||||
|
select x).Count();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
int result = (from x in Funs.DB.Comprehensive_InspectionMachine
|
||||||
|
where x.IsOnSite == true && x.InspectionType.Contains("计量") && x.IsCheckOK == true && pids.Contains(x.ProjectId)
|
||||||
|
select x).Count();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 机械预警
|
/// 机械预警
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static int GetJxyjNum()
|
public int GetJxyjNum()
|
||||||
{
|
{
|
||||||
int result = 0;
|
if (pids == null)
|
||||||
//机具报验的到期提醒和过期提醒记录数加一起
|
{
|
||||||
//机具报验的到期提醒数
|
int result = 0;
|
||||||
//var num1 = Funs.DB.Comprehensive_InspectionMachine.Where(x => x.IsOnSite == true && DateTime.Now < x.NextTestDate
|
//机具报验的到期提醒和过期提醒记录数加一起
|
||||||
// && ((DateTime)x.NextTestDate).AddDays(-15) < DateTime.Now).Count();
|
//机具报验的到期提醒数
|
||||||
//过期提醒记录数
|
//var num1 = Funs.DB.Comprehensive_InspectionMachine.Where(x => x.IsOnSite == true && DateTime.Now < x.NextTestDate
|
||||||
var num2 = Funs.DB.Comprehensive_InspectionMachine.Where(x => x.IsOnSite == true && x.NextTestDate < DateTime.Now).Count();
|
// && ((DateTime)x.NextTestDate).AddDays(-15) < DateTime.Now).Count();
|
||||||
//result = num1 + num2;
|
//过期提醒记录数
|
||||||
result = num2;
|
var num2 = Funs.DB.Comprehensive_InspectionMachine.Where(x => x.IsOnSite == true && x.NextTestDate < DateTime.Now).Count();
|
||||||
return result;
|
//result = num1 + num2;
|
||||||
|
result = num2;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
int result = 0;
|
||||||
|
//过期提醒记录数
|
||||||
|
var num2 = Funs.DB.Comprehensive_InspectionMachine.Where(x => x.IsOnSite == true && x.NextTestDate < DateTime.Now
|
||||||
|
&& pids.Contains(x.ProjectId)).Count();
|
||||||
|
//result = num1 + num2;
|
||||||
|
result = num2;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取质量培训人次数
|
/// 获取质量培训人次数
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static int GetTrainPersonNum()
|
public int GetTrainPersonNum()
|
||||||
{
|
{
|
||||||
int result = (from x in Funs.DB.Comprehensive_InspectionPerson
|
if (pids == null)
|
||||||
where x.IsTrain == true
|
{
|
||||||
select x).Count();
|
int result = (from x in Funs.DB.Comprehensive_InspectionPerson
|
||||||
return result;
|
where x.IsTrain == true
|
||||||
|
select x).Count();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
int result = (from x in Funs.DB.Comprehensive_InspectionPerson
|
||||||
|
where x.IsTrain == true && pids.Contains(x.ProjectId)
|
||||||
|
select x).Count();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取技术交底人次数
|
/// 获取技术交底人次数
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static int GetTechnicalDisclosePersonNum()
|
public int GetTechnicalDisclosePersonNum()
|
||||||
{
|
{
|
||||||
var result = (from x in Funs.DB.Comprehensive_DesignDetails
|
if (pids == null)
|
||||||
select x.JoinPersonNum ?? 0).ToList().Sum();
|
{
|
||||||
var q = Funs.GetNewIntOrZero(result.ToString());
|
var result = (from x in Funs.DB.Comprehensive_DesignDetails
|
||||||
return q;
|
select x.JoinPersonNum ?? 0).ToList().Sum();
|
||||||
|
var q = Funs.GetNewIntOrZero(result.ToString());
|
||||||
|
return q;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
var result = (from x in Funs.DB.Comprehensive_DesignDetails
|
||||||
|
where pids.Contains(x.ProjectId)
|
||||||
|
select x.JoinPersonNum ?? 0).ToList().Sum();
|
||||||
|
var q = Funs.GetNewIntOrZero(result.ToString());
|
||||||
|
return q;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -200,13 +271,26 @@ namespace FineUIPro.Web.common
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void getEarlyWarningCounts()
|
private void getEarlyWarningCounts()
|
||||||
{
|
{
|
||||||
int allCount = 0;
|
if (pids == null)
|
||||||
var getPersonQualitys = from x in Funs.DB.Comprehensive_InspectionPerson
|
{
|
||||||
where x.ValidityDate.HasValue && x.ValidityDate < DateTime.Now && x.IsOnSite == true
|
int allCount = 0;
|
||||||
select x;
|
var getPersonQualitys = from x in Funs.DB.Comprehensive_InspectionPerson
|
||||||
//// 预警人数
|
where x.ValidityDate.HasValue && x.ValidityDate < DateTime.Now && x.IsOnSite == true
|
||||||
allCount = getPersonQualitys.Count();
|
select x;
|
||||||
this.spanQualityChartAnalysis.InnerHtml = allCount.ToString();
|
//// 预警人数
|
||||||
|
allCount = getPersonQualitys.Count();
|
||||||
|
this.spanQualityChartAnalysis.InnerHtml = allCount.ToString();
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
int allCount = 0;
|
||||||
|
var getPersonQualitys = from x in Funs.DB.Comprehensive_InspectionPerson
|
||||||
|
where x.ValidityDate.HasValue && x.ValidityDate < DateTime.Now && x.IsOnSite == true && pids.Contains(x.ProjectId)
|
||||||
|
select x;
|
||||||
|
//// 预警人数
|
||||||
|
allCount = getPersonQualitys.Count();
|
||||||
|
this.spanQualityChartAnalysis.InnerHtml = allCount.ToString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#region 质量验收数据
|
#region 质量验收数据
|
||||||
|
@ -214,48 +298,73 @@ namespace FineUIPro.Web.common
|
||||||
/// 共检总数
|
/// 共检总数
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static int getAllInspectionManagement()
|
public int getAllInspectionManagement()
|
||||||
{
|
{
|
||||||
int result = 0;
|
if (pids == null)
|
||||||
;
|
{
|
||||||
//统计所给时间段的全部数量
|
int result = 0;
|
||||||
//List<Model.View_CQMS_InspectionManagementDetail> managementListSunNumber =
|
//统计所给时间段的全部数量
|
||||||
// BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(
|
//List<Model.View_CQMS_InspectionManagementDetail> managementListSunNumber =
|
||||||
// null, null, DateTime.Parse("2001-01-01"), DateTime.Now, false);
|
// BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(
|
||||||
var num1 = (from x in Funs.DB.ProcessControl_InspectionManagement
|
// null, null, DateTime.Parse("2001-01-01"), DateTime.Now, false);
|
||||||
select x).Count();
|
var num1 = (from x in Funs.DB.ProcessControl_InspectionManagement
|
||||||
result = num1;
|
select x).Count();
|
||||||
//int result = (from x in Funs.DB.Check_CheckControl
|
result = num1;
|
||||||
// where x.CheckDate <= DateTime.Now && x.State == "7"
|
//int result = (from x in Funs.DB.Check_CheckControl
|
||||||
// select x).Count();
|
// where x.CheckDate <= DateTime.Now && x.State == "7"
|
||||||
return result;
|
// select x).Count();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
int result = 0;
|
||||||
|
var num1 = (from x in Funs.DB.ProcessControl_InspectionManagement
|
||||||
|
where pids.Contains(x.ProjectId)
|
||||||
|
select x).Count();
|
||||||
|
result = num1;
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 次合格数量
|
/// 次合格数量
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static int getIsOnceInspectionManagement()
|
public int getIsOnceInspectionManagement()
|
||||||
{
|
{
|
||||||
int result = 0;
|
if (pids == null)
|
||||||
//统计所给时间段的合格数量
|
{
|
||||||
//List<Model.View_CQMS_InspectionManagementDetail> managementListOneNumber =
|
int result = 0;
|
||||||
// BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(
|
//统计所给时间段的合格数量
|
||||||
// null, null, DateTime.Parse("2001-01-01"), DateTime.Now, true);
|
//List<Model.View_CQMS_InspectionManagementDetail> managementListOneNumber =
|
||||||
var num2 = (from x in Funs.DB.ProcessControl_InspectionManagement
|
// BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(
|
||||||
where x.IsOnceQualified == true
|
// null, null, DateTime.Parse("2001-01-01"), DateTime.Now, true);
|
||||||
select x).Count();
|
var num2 = (from x in Funs.DB.ProcessControl_InspectionManagement
|
||||||
result = num2;
|
where x.IsOnceQualified == true
|
||||||
|
select x).Count();
|
||||||
|
result = num2;
|
||||||
|
|
||||||
//int result = (from x in Funs.DB.Check_CheckControl
|
//int result = (from x in Funs.DB.Check_CheckControl
|
||||||
// where x.CheckDate <= DateTime.Now && x.State != "7"
|
// where x.CheckDate <= DateTime.Now && x.State != "7"
|
||||||
// select x).Count();
|
// select x).Count();
|
||||||
return result;
|
return result;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
int result = 0;
|
||||||
|
|
||||||
|
var num2 = (from x in Funs.DB.ProcessControl_InspectionManagement
|
||||||
|
where x.IsOnceQualified == true && pids.Contains(x.ProjectId)
|
||||||
|
select x).Count();
|
||||||
|
result = num2;
|
||||||
|
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 整改率
|
/// 整改率
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static string GetInspectionManagementZgl()
|
public string GetInspectionManagementZgl()
|
||||||
{
|
{
|
||||||
string zgl = String.Format("{0:N2}", 100.0 * getIsOnceInspectionManagement() / getAllInspectionManagement());
|
string zgl = String.Format("{0:N2}", 100.0 * getIsOnceInspectionManagement() / getAllInspectionManagement());
|
||||||
return zgl + "%";
|
return zgl + "%";
|
||||||
|
@ -269,30 +378,48 @@ namespace FineUIPro.Web.common
|
||||||
/// 获取整改完成数
|
/// 获取整改完成数
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static int GetProblemCompletedNum()
|
public int GetProblemCompletedNum()
|
||||||
{
|
{
|
||||||
int result = (from x in Funs.DB.Check_CheckControl
|
if (pids == null)
|
||||||
where x.CheckDate <= DateTime.Now && x.State == "7"
|
{
|
||||||
select x).Count();
|
int result = (from x in Funs.DB.Check_CheckControl
|
||||||
return result;
|
where x.CheckDate <= DateTime.Now && x.State == "7"
|
||||||
|
select x).Count();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
int result = (from x in Funs.DB.Check_CheckControl
|
||||||
|
where x.CheckDate <= DateTime.Now && x.State == "7" && pids.Contains(x.ProjectId)
|
||||||
|
select x).Count();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取未整改数
|
/// 获取未整改数
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static int GetProblemNotCompletedNum()
|
public int GetProblemNotCompletedNum()
|
||||||
{
|
{
|
||||||
int result = (from x in Funs.DB.Check_CheckControl
|
if (pids == null)
|
||||||
where x.CheckDate <= DateTime.Now && x.State != "7"
|
{
|
||||||
select x).Count();
|
int result = (from x in Funs.DB.Check_CheckControl
|
||||||
return result;
|
where x.CheckDate <= DateTime.Now && x.State != "7"
|
||||||
|
select x).Count();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
int result = (from x in Funs.DB.Check_CheckControl
|
||||||
|
where x.CheckDate <= DateTime.Now && x.State != "7" && pids.Contains(x.ProjectId)
|
||||||
|
select x).Count();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 整改率
|
/// 整改率
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static string GetProblemZgl()
|
public string GetProblemZgl()
|
||||||
{
|
{
|
||||||
string zgl = String.Format("{0:N2}", 100.0 * GetProblemCompletedNum() / (GetProblemCompletedNum() + GetProblemNotCompletedNum()));
|
string zgl = String.Format("{0:N2}", 100.0 * GetProblemCompletedNum() / (GetProblemCompletedNum() + GetProblemNotCompletedNum()));
|
||||||
return zgl + "%";
|
return zgl + "%";
|
||||||
|
@ -316,12 +443,21 @@ namespace FineUIPro.Web.common
|
||||||
/// 获取问题个数
|
/// 获取问题个数
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static int GetProblemNum()
|
public int GetProblemNum()
|
||||||
{
|
{
|
||||||
int result = (from x in Funs.DB.Check_CheckControl
|
if (pids == null)
|
||||||
where x.CheckDate <= DateTime.Now
|
{
|
||||||
select x).Count();
|
int result = (from x in Funs.DB.Check_CheckControl
|
||||||
return result;
|
where x.CheckDate <= DateTime.Now
|
||||||
|
select x).Count();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
int result = (from x in Funs.DB.Check_CheckControl
|
||||||
|
where x.CheckDate <= DateTime.Now && pids.Contains(x.ProjectId)
|
||||||
|
select x).Count();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -329,114 +465,216 @@ namespace FineUIPro.Web.common
|
||||||
/// 获取焊工总数
|
/// 获取焊工总数
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static int GetWelderNum()
|
public int GetWelderNum()
|
||||||
{
|
{
|
||||||
int result = (from x in Funs.DB.BS_Welder
|
if (pids == null)
|
||||||
where x.WED_IfOnGuard == true
|
{
|
||||||
select x).Count();
|
int result = (from x in Funs.DB.BS_Welder
|
||||||
return result;
|
where x.WED_IfOnGuard == true
|
||||||
|
select x).Count();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int result = (from x in Funs.DB.BS_Welder
|
||||||
|
where x.WED_IfOnGuard == true && pids.Contains(x.ProjectId)
|
||||||
|
select x).Count();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取总达因数
|
/// 获取总达因数
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static int GetTotalDineNum()
|
public int GetTotalDineNum()
|
||||||
{
|
{
|
||||||
int result = 0;
|
if (pids == null)
|
||||||
var getD1 = from x in Funs.DB.HJGL_FL_TotalQuantity
|
|
||||||
select x;
|
|
||||||
if (getD1.Count() > 0)
|
|
||||||
{
|
{
|
||||||
foreach (var item in getD1)
|
int result = 0;
|
||||||
|
var getD1 = from x in Funs.DB.HJGL_FL_TotalQuantity
|
||||||
|
select x;
|
||||||
|
if (getD1.Count() > 0)
|
||||||
{
|
{
|
||||||
result += Funs.GetNewIntOrZero(item.TotalWeldQuantity.Split('.')[0]);
|
foreach (var item in getD1)
|
||||||
|
{
|
||||||
|
result += Funs.GetNewIntOrZero(item.TotalWeldQuantity.Split('.')[0]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var getD2 = (from x in Funs.DB.HJGL_FL_Data
|
||||||
|
orderby x.CompileDate descending
|
||||||
|
select x).FirstOrDefault();
|
||||||
|
if (getD2 != null)
|
||||||
|
{
|
||||||
|
result = Funs.GetNewIntOrZero(getD2.TotalWeldQuantity.Split('.')[0]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var getD2 = (from x in Funs.DB.HJGL_FL_Data
|
int result = 0;
|
||||||
orderby x.CompileDate descending
|
var getD1 = from x in Funs.DB.HJGL_FL_TotalQuantity
|
||||||
select x).FirstOrDefault();
|
where pids.Contains(x.ProjectId)
|
||||||
if (getD2 != null)
|
select x;
|
||||||
|
if (getD1.Count() > 0)
|
||||||
{
|
{
|
||||||
result = Funs.GetNewIntOrZero(getD2.TotalWeldQuantity.Split('.')[0]);
|
foreach (var item in getD1)
|
||||||
|
{
|
||||||
|
result += Funs.GetNewIntOrZero(item.TotalWeldQuantity.Split('.')[0]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var getD2 = (from x in Funs.DB.HJGL_FL_Data
|
||||||
|
where pids.Contains(x.ProjectId)
|
||||||
|
orderby x.CompileDate descending
|
||||||
|
select x).FirstOrDefault();
|
||||||
|
if (getD2 != null)
|
||||||
|
{
|
||||||
|
result = Funs.GetNewIntOrZero(getD2.TotalWeldQuantity.Split('.')[0]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取完成达因数
|
/// 获取完成达因数
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static int GetCompleteDineNum()
|
public int GetCompleteDineNum()
|
||||||
{
|
{
|
||||||
int result = 0;
|
if (pids == null)
|
||||||
|
|
||||||
var getD1 = from x in Funs.DB.HJGL_FL_TotalQuantity
|
|
||||||
|
|
||||||
select x;
|
|
||||||
if (getD1.Count() > 0)
|
|
||||||
{
|
{
|
||||||
foreach (var item in getD1)
|
int result = 0;
|
||||||
{
|
|
||||||
result += Funs.GetNewIntOrZero(item.TotalCompleted.Split('.')[0]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var getD2 = (from x in Funs.DB.HJGL_FL_Data
|
|
||||||
orderby x.CompileDate descending
|
|
||||||
select x).FirstOrDefault();
|
|
||||||
if (getD2 != null)
|
|
||||||
{
|
|
||||||
result = Funs.GetNewIntOrZero(getD2.TotalCompleted.Split('.')[0]);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
var getD1 = from x in Funs.DB.HJGL_FL_TotalQuantity
|
||||||
|
|
||||||
|
select x;
|
||||||
|
if (getD1.Count() > 0)
|
||||||
|
{
|
||||||
|
foreach (var item in getD1)
|
||||||
|
{
|
||||||
|
result += Funs.GetNewIntOrZero(item.TotalCompleted.Split('.')[0]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var getD2 = (from x in Funs.DB.HJGL_FL_Data
|
||||||
|
orderby x.CompileDate descending
|
||||||
|
select x).FirstOrDefault();
|
||||||
|
if (getD2 != null)
|
||||||
|
{
|
||||||
|
result = Funs.GetNewIntOrZero(getD2.TotalCompleted.Split('.')[0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
int result = 0;
|
||||||
|
|
||||||
|
var getD1 = from x in Funs.DB.HJGL_FL_TotalQuantity
|
||||||
|
where pids.Contains(x.ProjectId)
|
||||||
|
select x;
|
||||||
|
if (getD1.Count() > 0)
|
||||||
|
{
|
||||||
|
foreach (var item in getD1)
|
||||||
|
{
|
||||||
|
result += Funs.GetNewIntOrZero(item.TotalCompleted.Split('.')[0]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var getD2 = (from x in Funs.DB.HJGL_FL_Data
|
||||||
|
where pids.Contains(x.ProjectId)
|
||||||
|
orderby x.CompileDate descending
|
||||||
|
select x).FirstOrDefault();
|
||||||
|
if (getD2 != null)
|
||||||
|
{
|
||||||
|
result = Funs.GetNewIntOrZero(getD2.TotalCompleted.Split('.')[0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取总片数
|
/// 获取总片数
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static int GetTotalFilmNum()
|
public int GetTotalFilmNum()
|
||||||
{
|
{
|
||||||
//int result = Convert.ToInt32((from x in Funs.DB.CH_CheckItem
|
if (pids == null)
|
||||||
// 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]);
|
//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;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int result = 0;
|
||||||
|
|
||||||
|
var getD2 = (from x in Funs.DB.HJGL_FL_Data
|
||||||
|
where pids.Contains(x.ProjectId)
|
||||||
|
orderby x.CompileDate descending
|
||||||
|
select x).FirstOrDefault();
|
||||||
|
if (getD2 != null)
|
||||||
|
{
|
||||||
|
result = Funs.GetNewIntOrZero(getD2.OneTimeFilmAmount.Split('.')[0]);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取合格片数
|
/// 获取合格片数
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static int GetOKFilmNum()
|
public int GetOKFilmNum()
|
||||||
{
|
{
|
||||||
int result = 0;
|
if (pids == null)
|
||||||
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]);
|
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;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int result = 0;
|
||||||
|
var getD2 = (from x in Funs.DB.HJGL_FL_Data
|
||||||
|
where pids.Contains(x.ProjectId)
|
||||||
|
orderby x.CompileDate descending
|
||||||
|
select x).FirstOrDefault();
|
||||||
|
if (getD2 != null)
|
||||||
|
{
|
||||||
|
result = Funs.GetNewIntOrZero(getD2.OneTimeFilmQualifiedAmount.Split('.')[0]);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 一次拍片合格率
|
/// 一次拍片合格率
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static string GetOKFilmHgl()
|
public string GetOKFilmHgl()
|
||||||
{
|
{
|
||||||
string zgl = "0";
|
string zgl = "0";
|
||||||
if (GetOKFilmNum() > 0)
|
if (GetOKFilmNum() > 0)
|
||||||
|
@ -459,7 +697,10 @@ namespace FineUIPro.Web.common
|
||||||
private void getInspectionManagementInfo()
|
private void getInspectionManagementInfo()
|
||||||
{
|
{
|
||||||
|
|
||||||
var q = (from x in Funs.DB.Base_CNProfessional where x.CNProfessionalId != BLL.Const.CNProfessionalConstructId && x.CNProfessionalId != BLL.Const.CNProfessionalHSEId orderby x.SortIndex select x).ToList();
|
var q=(from x in Funs.DB.Base_CNProfessional where x.CNProfessionalId != BLL.Const.CNProfessionalConstructId && x.CNProfessionalId != BLL.Const.CNProfessionalHSEId orderby x.SortIndex select x).ToList();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
foreach (var item in q)
|
foreach (var item in q)
|
||||||
{
|
{
|
||||||
//获取专业
|
//获取专业
|
||||||
|
@ -469,9 +710,27 @@ namespace FineUIPro.Web.common
|
||||||
// join y in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals y.InspectionId
|
// join y in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals y.InspectionId
|
||||||
// where y.CNProfessionalId == item.CNProfessionalId
|
// where y.CNProfessionalId == item.CNProfessionalId
|
||||||
// select x).ToList().Count;
|
// select x).ToList().Count;
|
||||||
var num1 = (from x in Funs.DB.ProcessControl_InspectionManagement
|
var num1 = 0;
|
||||||
|
var num2 = 0;
|
||||||
|
if (pids == null)
|
||||||
|
{
|
||||||
|
num1 = (from x in Funs.DB.ProcessControl_InspectionManagement
|
||||||
where x.CNProfessionalId == item.CNProfessionalId
|
where x.CNProfessionalId == item.CNProfessionalId
|
||||||
select x).Count();
|
select x).Count();
|
||||||
|
num2 = (from x in Funs.DB.ProcessControl_InspectionManagement
|
||||||
|
where x.CNProfessionalId == item.CNProfessionalId && x.IsOnceQualified == true
|
||||||
|
select x).Count();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
num1 = (from x in Funs.DB.ProcessControl_InspectionManagement
|
||||||
|
where x.CNProfessionalId == item.CNProfessionalId && pids.Contains(x.ProjectId)
|
||||||
|
select x).Count();
|
||||||
|
num2 = (from x in Funs.DB.ProcessControl_InspectionManagement
|
||||||
|
where x.CNProfessionalId == item.CNProfessionalId && x.IsOnceQualified == true && pids.Contains(x.ProjectId)
|
||||||
|
select x).Count();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
InspectionManagementSumCount += "'" + num1 + "',";
|
InspectionManagementSumCount += "'" + num1 + "',";
|
||||||
|
|
||||||
//根据专业获取合格数
|
//根据专业获取合格数
|
||||||
|
@ -479,9 +738,7 @@ namespace FineUIPro.Web.common
|
||||||
// join y in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals y.InspectionId
|
// join y in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals y.InspectionId
|
||||||
// where y.CNProfessionalId == item.CNProfessionalId && y.IsOnceQualified==true
|
// where y.CNProfessionalId == item.CNProfessionalId && y.IsOnceQualified==true
|
||||||
// select x).ToList().Count;
|
// select x).ToList().Count;
|
||||||
var num2 = (from x in Funs.DB.ProcessControl_InspectionManagement
|
|
||||||
where x.CNProfessionalId == item.CNProfessionalId && x.IsOnceQualified == true
|
|
||||||
select x).Count();
|
|
||||||
InspectionManagementOkCount += "'" + num2 + "',";
|
InspectionManagementOkCount += "'" + num2 + "',";
|
||||||
|
|
||||||
//一次验收合格率
|
//一次验收合格率
|
||||||
|
@ -514,29 +771,56 @@ namespace FineUIPro.Web.common
|
||||||
protected string ncrCount;
|
protected string ncrCount;
|
||||||
private void getNcrInfo()
|
private void getNcrInfo()
|
||||||
{
|
{
|
||||||
//闭环项 有完成日期的
|
if (pids==null)
|
||||||
//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.ImplementationFrontState == "已闭合").Count();
|
|
||||||
var num2 = Funs.DB.Comprehensive_NCRManagement.Where(x => x.ImplementationFrontState == "整改中").Count();
|
|
||||||
ncrZgbhx = num1.ToString();
|
|
||||||
ncrwZgbhx = num2.ToString();
|
|
||||||
if ((num1 + num2) > 0)
|
|
||||||
{
|
{
|
||||||
ncrZgl = String.Format("{0:N2}", 100.0 * num1 / (num1 + num2)) + "%";
|
//闭环项 有完成日期的
|
||||||
|
//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.ImplementationFrontState == "已闭合").Count();
|
||||||
|
var num2 = Funs.DB.Comprehensive_NCRManagement.Where(x => x.ImplementationFrontState == "整改中").Count();
|
||||||
|
ncrZgbhx = num1.ToString();
|
||||||
|
ncrwZgbhx = num2.ToString();
|
||||||
|
if ((num1 + num2) > 0)
|
||||||
|
{
|
||||||
|
ncrZgl = String.Format("{0:N2}", 100.0 * num1 / (num1 + num2)) + "%";
|
||||||
|
}
|
||||||
|
|
||||||
|
//加载专业
|
||||||
|
var list = (from x in Funs.DB.Base_CNProfessional where x.CNProfessionalId != BLL.Const.CNProfessionalConstructId && x.CNProfessionalId != BLL.Const.CNProfessionalHSEId orderby x.SortIndex select x).ToList();
|
||||||
|
foreach (var item in list)
|
||||||
|
{
|
||||||
|
ncrZy += "'" + item.ProfessionalName + "',";
|
||||||
|
//根据专业加载数据量
|
||||||
|
var num3 = Funs.DB.Comprehensive_NCRManagement.Where(x => x.CNProfessionalId == item.CNProfessionalId).Count();
|
||||||
|
ncrCount += "'" + num3 + "',";
|
||||||
|
}
|
||||||
|
ncrZy = ncrZy.TrimEnd(',');
|
||||||
|
ncrCount = ncrCount.TrimEnd(',');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var num1 = Funs.DB.Comprehensive_NCRManagement.Where(x => x.ImplementationFrontState == "已闭合" && pids.Contains(x.ProjectId)).Count();
|
||||||
|
var num2 = Funs.DB.Comprehensive_NCRManagement.Where(x => x.ImplementationFrontState == "整改中" && pids.Contains(x.ProjectId)).Count();
|
||||||
|
ncrZgbhx = num1.ToString();
|
||||||
|
ncrwZgbhx = num2.ToString();
|
||||||
|
if ((num1 + num2) > 0)
|
||||||
|
{
|
||||||
|
ncrZgl = String.Format("{0:N2}", 100.0 * num1 / (num1 + num2)) + "%";
|
||||||
|
}
|
||||||
|
|
||||||
|
//加载专业
|
||||||
|
var list = (from x in Funs.DB.Base_CNProfessional where x.CNProfessionalId != BLL.Const.CNProfessionalConstructId && x.CNProfessionalId != BLL.Const.CNProfessionalHSEId orderby x.SortIndex select x).ToList();
|
||||||
|
foreach (var item in list)
|
||||||
|
{
|
||||||
|
ncrZy += "'" + item.ProfessionalName + "',";
|
||||||
|
//根据专业加载数据量
|
||||||
|
var num3 = Funs.DB.Comprehensive_NCRManagement.Where(x => x.CNProfessionalId == item.CNProfessionalId && pids.Contains(x.ProjectId)).Count();
|
||||||
|
ncrCount += "'" + num3 + "',";
|
||||||
|
}
|
||||||
|
ncrZy = ncrZy.TrimEnd(',');
|
||||||
|
ncrCount = ncrCount.TrimEnd(',');
|
||||||
}
|
}
|
||||||
|
|
||||||
//加载专业
|
|
||||||
var list = (from x in Funs.DB.Base_CNProfessional where x.CNProfessionalId != BLL.Const.CNProfessionalConstructId && x.CNProfessionalId!=BLL.Const.CNProfessionalHSEId orderby x.SortIndex select x).ToList();
|
|
||||||
foreach (var item in list)
|
|
||||||
{
|
|
||||||
ncrZy += "'" + item.ProfessionalName + "',";
|
|
||||||
//根据专业加载数据量
|
|
||||||
var num3 = Funs.DB.Comprehensive_NCRManagement.Where(x => x.CNProfessionalId == item.CNProfessionalId).Count();
|
|
||||||
ncrCount += "'" + num3 + "',";
|
|
||||||
}
|
|
||||||
ncrZy = ncrZy.TrimEnd(',');
|
|
||||||
ncrCount = ncrCount.TrimEnd(',');
|
|
||||||
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
@ -43,13 +43,7 @@
|
||||||
background-color: transparent !important;
|
background-color: transparent !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.projcet-select {
|
|
||||||
float: left;
|
|
||||||
height: 40px;
|
|
||||||
flex: 1;
|
|
||||||
display: flex;
|
|
||||||
justify-content: flex-end;
|
|
||||||
}
|
|
||||||
|
|
||||||
.bgbtn {
|
.bgbtn {
|
||||||
/*background-image: url(../res/images/login.png) !important;*/
|
/*background-image: url(../res/images/login.png) !important;*/
|
||||||
|
@ -176,12 +170,122 @@
|
||||||
border: none !important;
|
border: none !important;
|
||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
}
|
}
|
||||||
.f-btn .f-btn-text{
|
|
||||||
color: #fff;
|
.f-btn .f-btn-text {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.n-btns-r .n-btn-l-act {
|
||||||
|
background-image: url(./res/images/03.png) !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<style>
|
||||||
|
.projcet-select {
|
||||||
|
position: absolute;
|
||||||
|
bottom: -13%;
|
||||||
|
left: 50%;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
}
|
||||||
|
|
||||||
|
.projcet-select input {
|
||||||
|
padding-right: 23px;
|
||||||
|
font-size: 14px;
|
||||||
|
padding: 0;
|
||||||
|
border:none;
|
||||||
|
color:#ffffff;
|
||||||
|
padding-left: 10px;
|
||||||
|
background: rgba(0,0,0,0);
|
||||||
|
|
||||||
}
|
}
|
||||||
.n-btns-r .n-btn-l-act{
|
.projcet-select input::placeholder {
|
||||||
background-image: url(./res/images/03.png) !important;
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
.projcet-select .f-field-triggerbox-icons {
|
||||||
|
font-size: 16px;
|
||||||
|
position: absolute;
|
||||||
|
bottom: 3%;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
.projcet-select .f-field-triggerbox-icons i{
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.projcet-select .f-state-hover, .f-widget-content .f-state-hover, .f-widget-header .f-state-hover, .f-state-focus, .f-widget-content .f-state-focus, .f-widget-header .f-state-focus{
|
||||||
|
background: rgba(0,0,0,0);
|
||||||
|
border:none
|
||||||
|
}
|
||||||
|
.projcet-select .f-panel.f-panel-noheader.f-panel-noborder, .f-panel.f-panel-noheader.f-panel-noborder>.f-panel-bodyct>.f-panel-body{
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.f-field-body-cell-inner{
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
.grid1_class .f-field-body-cell-inner input{
|
||||||
|
padding: 2px 10px;
|
||||||
|
}
|
||||||
|
.grid1_class .f-state-hover {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
.grid1_toolbar {
|
||||||
|
background:#000231
|
||||||
|
}
|
||||||
|
|
||||||
|
.grid1_class thead{
|
||||||
|
background: #d7ebf9;
|
||||||
|
color: #18A6F1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.grid1_toolbar input {
|
||||||
|
background:#000231
|
||||||
|
}
|
||||||
|
.grid1_toolbar .f-corner-all {
|
||||||
|
background:#000231
|
||||||
|
}
|
||||||
|
|
||||||
|
/*表格第一行颜色*/
|
||||||
|
.f-grid-row-selected{
|
||||||
|
background-color:#E4F2FF !important;
|
||||||
|
color:black;
|
||||||
|
|
||||||
|
}
|
||||||
|
/*表格单行颜色*/
|
||||||
|
.f-grid-row{
|
||||||
|
background-color:#E4F2FF;
|
||||||
|
color:black;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*各行颜色*/
|
||||||
|
.f-grid-row-alt {
|
||||||
|
background-color: #ffffff !important;
|
||||||
|
color:black;
|
||||||
|
}
|
||||||
|
|
||||||
|
.f-state-active, .f-widget-content .f-state-active, .f-widget-header .f-state-active {
|
||||||
|
|
||||||
|
color:black;
|
||||||
|
}
|
||||||
|
|
||||||
|
.f-state-active .f-icon {
|
||||||
|
color: darkcyan;
|
||||||
|
}
|
||||||
|
|
||||||
|
.grid1_class .f-state-hover {
|
||||||
|
color:black;
|
||||||
|
background: #99e7ff !important;
|
||||||
|
background: none;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.grid1_class .f-grid-bodyct {
|
||||||
|
|
||||||
|
background:#000231 !important
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
@ -196,88 +300,151 @@
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<div class="nav-left">
|
<div class="nav-left">
|
||||||
<div class="nav-btn t-btns">
|
<div class="nav-btn t-btns">
|
||||||
<div class="t-btn t-btn-act" id="div_xmgk" onclick="changeHead(0)" style="cursor:pointer">项目概况
|
<div class="t-btn t-btn-act" id="div_xmgk" onclick="changeHead(0)" style="cursor: pointer">
|
||||||
|
项目概况
|
||||||
<f:Button runat="server" CssClass="bgbtntop" OnClick="btnXmgk_Click" Hidden="true"
|
<f:Button runat="server" CssClass="bgbtntop" OnClick="btnXmgk_Click" Hidden="true"
|
||||||
EnablePostBack="true" EnableDefaultState="true" EnableDefaultCorner="false" ID="btn_xmgk"
|
EnablePostBack="true" EnableDefaultState="true" EnableDefaultCorner="false" ID="btn_xmgk"
|
||||||
OnClientClick="parent.removeActiveTab();">
|
OnClientClick="parent.removeActiveTab();">
|
||||||
</f:Button></div>
|
</f:Button>
|
||||||
<div class="t-btn" id="div_aqsc" onclick="changeHead(1)" style="cursor:pointer">安全生产
|
|
||||||
<f:Button runat="server" CssClass="bgbtntop" OnClick="btnAqsc_Click" Hidden="true"
|
|
||||||
EnablePostBack="true" EnableDefaultState="true" EnableDefaultCorner="false" ID="btn_aqsc"
|
|
||||||
OnClientClick="parent.removeActiveTab();">
|
|
||||||
</f:Button>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="t-btn" id="div_zlgl" onclick="changeHead(2)" style="cursor:pointer">质量管理
|
<div class="t-btn" id="div_aqsc" onclick="changeHead(1)" style="cursor: pointer">
|
||||||
|
安全生产
|
||||||
|
<f:Button runat="server" CssClass="bgbtntop" OnClick="btnAqsc_Click" Hidden="true"
|
||||||
|
EnablePostBack="true" EnableDefaultState="true" EnableDefaultCorner="false" ID="btn_aqsc"
|
||||||
|
OnClientClick="parent.removeActiveTab();">
|
||||||
|
</f:Button>
|
||||||
|
</div>
|
||||||
|
<div class="t-btn" id="div_zlgl" onclick="changeHead(2)" style="cursor: pointer">
|
||||||
|
质量管理
|
||||||
<f:Button runat="server" CssClass="bgbtntop" OnClick="btnZlgl_Click" Hidden="true"
|
<f:Button runat="server" CssClass="bgbtntop" OnClick="btnZlgl_Click" Hidden="true"
|
||||||
EnablePostBack="true" EnableDefaultState="true" EnableDefaultCorner="false" ID="btn_zlgl"
|
EnablePostBack="true" EnableDefaultState="true" EnableDefaultCorner="false" ID="btn_zlgl"
|
||||||
OnClientClick="parent.removeActiveTab();">
|
OnClientClick="parent.removeActiveTab();">
|
||||||
</f:Button>
|
</f:Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="nav-btn n-btns-l">
|
<div class="nav-btn n-btns-l">
|
||||||
<div class="n-btn-l" >
|
<div class="n-btn-l">
|
||||||
<f:Button runat="server" Text="项目清单" ID="btnProject" OnClick="btnProject_Click"
|
<f:Button runat="server" Text="项目清单" ID="btnProject" OnClick="btnProject_Click"
|
||||||
EnablePostBack="true" EnableDefaultState="true" EnableDefaultCorner="false" OnClientClick="parent.removeActiveTab();">
|
EnablePostBack="true" EnableDefaultState="true" EnableDefaultCorner="false" OnClientClick="parent.removeActiveTab();">
|
||||||
</f:Button></div>
|
</f:Button>
|
||||||
<div class="n-btn-l" >
|
</div>
|
||||||
|
<div class="n-btn-l">
|
||||||
<f:Button runat="server" Text="大数据中心" ID="btnDigData" OnClick="btnDigData_Click"
|
<f:Button runat="server" Text="大数据中心" ID="btnDigData" OnClick="btnDigData_Click"
|
||||||
EnablePostBack="true" EnableDefaultState="true" EnableDefaultCorner="false" OnClientClick="parent.removeActiveTab();">
|
EnablePostBack="true" EnableDefaultState="true" EnableDefaultCorner="false" OnClientClick="parent.removeActiveTab();">
|
||||||
</f:Button></div>
|
</f:Button>
|
||||||
<div class="n-btn-l" >
|
</div>
|
||||||
|
<div class="n-btn-l">
|
||||||
<f:Button runat="server" Text="总部检查" ID="btnServer" OnClick="btnServer_Click"
|
<f:Button runat="server" Text="总部检查" ID="btnServer" OnClick="btnServer_Click"
|
||||||
EnablePostBack="true" EnableDefaultState="true" EnableDefaultCorner="false" OnClientClick="parent.removeActiveTab();">
|
EnablePostBack="true" EnableDefaultState="true" EnableDefaultCorner="false" OnClientClick="parent.removeActiveTab();">
|
||||||
</f:Button></div>
|
</f:Button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="nav-center">
|
<div class="nav-center" style="position: relative;">
|
||||||
<h1>中国五环工程有限公司智慧施工管理信息系统(公司级)<f:Button runat="server" CssClass="bgbtn_head" EnablePostBack="true" OnClick="btnHome_Click"
|
<h1>中国五环工程有限公司智慧施工管理信息系统(公司级)<f:Button runat="server" CssClass="bgbtn_head" EnablePostBack="true" OnClick="btnHome_Click"
|
||||||
EnableDefaultState="true" EnableDefaultCorner="false" ID="btnHome" OnClientClick="parent.removeActiveTab();">
|
EnableDefaultState="true" EnableDefaultCorner="false" ID="btnHome" OnClientClick="parent.removeActiveTab();">
|
||||||
</f:Button></h1>
|
</f:Button>
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<div class="projcet-select">
|
||||||
|
<f:DropDownBox runat="server" ID="drpProject" Label="" EmptyText="如要筛选项目请点击此处选择" MatchFieldWidth="false" LabelAlign="Left"
|
||||||
|
AutoPostBack="true" OnTextChanged="drpProject_SelectedIndexChanged" Width="500px"
|
||||||
|
EnableMultiSelect="true">
|
||||||
|
<PopPanel>
|
||||||
|
<f:Grid ID="Grid1" ShowBorder="false" ShowHeader="false" runat="server" DataIDField="ProjectId" DataTextField="ProjectName"
|
||||||
|
DataKeyNames="ProjectId" AllowSorting="true" SortField="ProjectCode" SortDirection="ASC" CssClass="grid1_class"
|
||||||
|
Hidden="true" Width="900px" Height="400px" PageSize="300" EnableCheckBoxSelect="true" EnableMultiSelect="true">
|
||||||
|
<Toolbars>
|
||||||
|
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" CssClass="grid1_toolbar">
|
||||||
|
<Items>
|
||||||
|
<f:TextBox runat="server" ID="txtProjectName" EmptyText="按名称查询" FocusOnPageLoad="true"
|
||||||
|
AutoPostBack="true" OnTextChanged="TextBox_TextChanged" Width="100px" CssClass="txtSearch">
|
||||||
|
</f:TextBox>
|
||||||
|
<f:TextBox runat="server" ID="txtProjectCode" EmptyText="按编号查询" FocusOnPageLoad="true"
|
||||||
|
AutoPostBack="true" OnTextChanged="TextBox_TextChanged" Width="100px" CssClass="txtSearch">
|
||||||
|
</f:TextBox>
|
||||||
|
<f:RadioButtonList runat="server" ID="ckState" Width="450px"
|
||||||
|
AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged">
|
||||||
|
<f:RadioItem Text="在建" Value="1" Selected="true" />
|
||||||
|
<f:RadioItem Text="停工" Value="2" />
|
||||||
|
<f:RadioItem Text="竣工" Value="3" />
|
||||||
|
</f:RadioButtonList>
|
||||||
|
</Items>
|
||||||
|
</f:Toolbar>
|
||||||
|
</Toolbars>
|
||||||
|
<Columns>
|
||||||
|
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="50px" HeaderTextAlign="Center" TextAlign="Center" />
|
||||||
|
|
||||||
|
<f:RenderField Width="200px" ColumnID="ProjectCode" DataField="ProjectCode" EnableFilter="true"
|
||||||
|
FieldType="String" HeaderText="项目编号" HeaderTextAlign="Center" SortField="ProjectCode"
|
||||||
|
TextAlign="Left">
|
||||||
|
</f:RenderField>
|
||||||
|
<f:RenderField Width="620px" ColumnID="ProjectName" DataField="ProjectName" EnableFilter="true"
|
||||||
|
FieldType="String" HeaderText="项目名称" HeaderTextAlign="Center"
|
||||||
|
TextAlign="Left">
|
||||||
|
</f:RenderField>
|
||||||
|
</Columns>
|
||||||
|
</f:Grid>
|
||||||
|
</PopPanel>
|
||||||
|
</f:DropDownBox>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="nav-right">
|
<div class="nav-right">
|
||||||
<div class="btns t-btns t-btn-r">
|
<div class="btns t-btns t-btn-r">
|
||||||
<div class=" t-btn1 iconfont icon-yonghu" onclick="PersonalFunction()" style="cursor:pointer"><span>我的
|
<div class=" t-btn1 iconfont icon-yonghu" onclick="PersonalFunction()" style="cursor: pointer">
|
||||||
|
<span>我的
|
||||||
<f:Button runat="server" CssClass="bgbtntop" IconFont="User" OnClick="btnPersonal_Click" Hidden="true"
|
<f:Button runat="server" CssClass="bgbtntop" IconFont="User" OnClick="btnPersonal_Click" Hidden="true"
|
||||||
EnablePostBack="true" EnableDefaultState="true" EnableDefaultCorner="false" ID="btnPersonal" OnClientClick="parent.removeActiveTab();">
|
EnablePostBack="true" EnableDefaultState="true" EnableDefaultCorner="false" ID="btnPersonal" OnClientClick="parent.removeActiveTab();">
|
||||||
</f:Button>
|
</f:Button>
|
||||||
</span></div>
|
</span>
|
||||||
<div class="t-btn1 iconfont icon-shezhi" onclick="btnSysSetFunction()" style="cursor:pointer"><span>设置
|
</div>
|
||||||
|
<div class="t-btn1 iconfont icon-shezhi" onclick="btnSysSetFunction()" style="cursor: pointer">
|
||||||
|
<span>设置
|
||||||
<f:Button runat="server" CssClass="bgbtntop" IconFont="Gear" OnClick="btnSysSet_Click" Hidden="true"
|
<f:Button runat="server" CssClass="bgbtntop" IconFont="Gear" OnClick="btnSysSet_Click" Hidden="true"
|
||||||
EnablePostBack="true" EnableDefaultState="true" EnableDefaultCorner="false" ID="btnSysSet" OnClientClick="parent.removeActiveTab();">
|
EnablePostBack="true" EnableDefaultState="true" EnableDefaultCorner="false" ID="btnSysSet" OnClientClick="parent.removeActiveTab();">
|
||||||
</f:Button>
|
</f:Button>
|
||||||
</span></div>
|
</span>
|
||||||
<div class="t-btn1 iconfont icon-tuichu" onclick="SignOutFunction()" style="cursor:pointer"><span>退出
|
</div>
|
||||||
|
<div class="t-btn1 iconfont icon-tuichu" onclick="SignOutFunction()" style="cursor: pointer">
|
||||||
|
<span>退出
|
||||||
<f:Button runat="server" CssClass="bgbtntop" IconFont="PowerOff" Hidden="true"
|
<f:Button runat="server" CssClass="bgbtntop" IconFont="PowerOff" Hidden="true"
|
||||||
EnablePostBack="false" EnableDefaultState="true" EnableDefaultCorner="false" ID="Button18">
|
EnablePostBack="false" EnableDefaultState="true" EnableDefaultCorner="false" ID="Button18">
|
||||||
<Listeners>
|
<Listeners>
|
||||||
<f:Listener Event="click" Handler="onToolSignOutClick" />
|
<f:Listener Event="click" Handler="onToolSignOutClick" />
|
||||||
</Listeners>
|
</Listeners>
|
||||||
</f:Button>
|
</f:Button>
|
||||||
</span></div>
|
</span>
|
||||||
<div class="t-btn1 iconfont icon-quanping_o ab" style="cursor:pointer"><span>全屏
|
</div>
|
||||||
|
<div class="t-btn1 iconfont icon-quanping_o ab" style="cursor: pointer">
|
||||||
|
<span>全屏
|
||||||
|
|
||||||
</span></div>
|
</span>
|
||||||
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<f:Button runat="server" CssClass="bgbtntop" Text="" ToolTip="刷新菜单" OnClick="btnRetweet_Click"
|
<f:Button runat="server" CssClass="bgbtntop" Text="" ToolTip="刷新菜单" OnClick="btnRetweet_Click"
|
||||||
EnablePostBack="true" EnableDefaultState="true" EnableDefaultCorner="false" ID="btnRetweet" OnClientClick="parent.removeActiveTab();">
|
EnablePostBack="true" EnableDefaultState="true" EnableDefaultCorner="false" ID="btnRetweet" OnClientClick="parent.removeActiveTab();">
|
||||||
</f:Button>
|
</f:Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="nav-btn n-btns-r">
|
<div class="nav-btn n-btns-r">
|
||||||
<div class="n-btn-r" >
|
<div class="n-btn-r">
|
||||||
<f:Button runat="server" Text="通知管理" ID="btnNotice" OnClick="btnNotice_Click"
|
<f:Button runat="server" Text="通知管理" ID="btnNotice" OnClick="btnNotice_Click"
|
||||||
EnablePostBack="true" EnableDefaultState="true" EnableDefaultCorner="false" OnClientClick="parent.removeActiveTab();">
|
EnablePostBack="true" EnableDefaultState="true" EnableDefaultCorner="false" OnClientClick="parent.removeActiveTab();">
|
||||||
</f:Button>
|
</f:Button>
|
||||||
</div>
|
</div>
|
||||||
<div class="n-btn-r" >
|
<div class="n-btn-r">
|
||||||
<f:Button runat="server" Text="员工管理" ID="btnPerson" OnClick="btnPerson_Click"
|
<f:Button runat="server" Text="员工管理" ID="btnPerson" OnClick="btnPerson_Click"
|
||||||
EnablePostBack="true" EnableDefaultState="true" EnableDefaultCorner="false" OnClientClick="parent.removeActiveTab();">
|
EnablePostBack="true" EnableDefaultState="true" EnableDefaultCorner="false" OnClientClick="parent.removeActiveTab();">
|
||||||
</f:Button>
|
</f:Button>
|
||||||
</div>
|
</div>
|
||||||
<div class="n-btn-r" >
|
<div class="n-btn-r">
|
||||||
<f:Button runat="server" Text="综合管理" ID="btnZHGL" OnClick="btnZHGL_Click"
|
<f:Button runat="server" Text="综合管理" ID="btnZHGL" OnClick="btnZHGL_Click"
|
||||||
EnablePostBack="true" EnableDefaultState="true" EnableDefaultCorner="false" OnClientClick="parent.removeActiveTab();">
|
EnablePostBack="true" EnableDefaultState="true" EnableDefaultCorner="false" OnClientClick="parent.removeActiveTab();">
|
||||||
</f:Button>
|
</f:Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
using BLL;
|
using BLL;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Linq;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
using System.Web.UI.WebControls;
|
using System.Web.UI.WebControls;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
|
@ -299,6 +300,9 @@ namespace FineUIPro.Web
|
||||||
{
|
{
|
||||||
if (!IsPostBack)
|
if (!IsPostBack)
|
||||||
{
|
{
|
||||||
|
//选择项目为空
|
||||||
|
CurrUser.CompanyProjectId = "";
|
||||||
|
|
||||||
this.MenuSwitchMethod(Request.Params["menuType"]);
|
this.MenuSwitchMethod(Request.Params["menuType"]);
|
||||||
this.InitMenuStyleButton();
|
this.InitMenuStyleButton();
|
||||||
this.InitMenuModeButton();
|
this.InitMenuModeButton();
|
||||||
|
@ -319,6 +323,8 @@ namespace FineUIPro.Web
|
||||||
this.Tab1.IFrameUrl = "~/common/main2.aspx";
|
this.Tab1.IFrameUrl = "~/common/main2.aspx";
|
||||||
this.hdHomePage.Text = "2";
|
this.hdHomePage.Text = "2";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BindGrid(this.ckState.SelectedValue, this.txtProjectName.Text.Trim(), txtProjectCode.Text.Trim());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -545,5 +551,55 @@ namespace FineUIPro.Web
|
||||||
{
|
{
|
||||||
this.Tab1.IFrameUrl = "~/common/main_new1.aspx";
|
this.Tab1.IFrameUrl = "~/common/main_new1.aspx";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#region 公司级新增项目筛选
|
||||||
|
/// <summary>
|
||||||
|
/// 项目切换
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void drpProject_SelectedIndexChanged(object sender, EventArgs e) {
|
||||||
|
CurrUser.CompanyProjectId = string.Join(",", drpProject.Values);
|
||||||
|
this.Tab1.RefreshIFrame();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 查询
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void TextBox_TextChanged(object sender, EventArgs e) {
|
||||||
|
BindGrid(this.ckState.SelectedValue, this.txtProjectName.Text.Trim(), txtProjectCode.Text.Trim());
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 加载项目
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="userId"></param>
|
||||||
|
/// <param name="projectId"></param>
|
||||||
|
/// <param name="ProjectAttribute"></param>
|
||||||
|
/// <param name="projectState"></param>
|
||||||
|
/// <param name="projectName"></param>
|
||||||
|
/// <param name="unitId"></param>
|
||||||
|
/// <param name="ProjectCode"></param>
|
||||||
|
private void BindGrid(string projectState, string projectName,string ProjectCode = "")
|
||||||
|
{
|
||||||
|
var projectlist = BLL.ProjectService.GetUnEndProjectByUserIdDropDownList(projectState, projectName, ProjectCode);
|
||||||
|
foreach (var item in projectlist)
|
||||||
|
{
|
||||||
|
item.ProjectType = BLL.UnitService.GetUnitCodeByUnitId(item.UnitId);
|
||||||
|
item.UnitId = BLL.UnitService.GetUnitNameByUnitId(item.UnitId);
|
||||||
|
|
||||||
|
}
|
||||||
|
//第一级按分公司编号顺序排序第二级排序为项目编号倒序排列。
|
||||||
|
projectlist = projectlist.OrderBy(x => x.ProjectType).ThenByDescending(x => x.ProjectCode).ToList();
|
||||||
|
|
||||||
|
Grid1.RecordCount = projectlist.Count;
|
||||||
|
var table = this.GetPagedDataTable(Grid1, projectlist);
|
||||||
|
Grid1.DataSource = projectlist;
|
||||||
|
Grid1.DataBind();
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,10 +7,12 @@
|
||||||
// </自动生成>
|
// </自动生成>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
namespace FineUIPro.Web {
|
namespace FineUIPro.Web
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
public partial class index {
|
public partial class index
|
||||||
|
{
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// form1 控件。
|
/// form1 控件。
|
||||||
|
@ -120,6 +122,60 @@ namespace FineUIPro.Web {
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Button btnHome;
|
protected global::FineUIPro.Button btnHome;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// drpProject 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.DropDownBox drpProject;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Grid1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Grid Grid1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Toolbar2 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Toolbar Toolbar2;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtProjectName 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.TextBox txtProjectName;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtProjectCode 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.TextBox txtProjectCode;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ckState 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.RadioButtonList ckState;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// btnPersonal 控件。
|
/// btnPersonal 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -356772,6 +356772,8 @@ namespace Model
|
||||||
|
|
||||||
private string _HomePageType;
|
private string _HomePageType;
|
||||||
|
|
||||||
|
private string _CompanyProjectId;
|
||||||
|
|
||||||
private EntitySet<Comprehensive_NCRManagement> _Comprehensive_NCRManagement;
|
private EntitySet<Comprehensive_NCRManagement> _Comprehensive_NCRManagement;
|
||||||
|
|
||||||
private EntitySet<Comprehensive_PressurePipe> _Comprehensive_PressurePipe;
|
private EntitySet<Comprehensive_PressurePipe> _Comprehensive_PressurePipe;
|
||||||
|
@ -357584,6 +357586,8 @@ namespace Model
|
||||||
partial void OnRawPasswordChanged();
|
partial void OnRawPasswordChanged();
|
||||||
partial void OnHomePageTypeChanging(string value);
|
partial void OnHomePageTypeChanging(string value);
|
||||||
partial void OnHomePageTypeChanged();
|
partial void OnHomePageTypeChanged();
|
||||||
|
partial void OnCompanyProjectIdChanging(string value);
|
||||||
|
partial void OnCompanyProjectIdChanged();
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public Sys_User()
|
public Sys_User()
|
||||||
|
@ -358980,6 +358984,26 @@ namespace Model
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompanyProjectId", DbType="NVarChar(2000)")]
|
||||||
|
public string CompanyProjectId
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this._CompanyProjectId;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if ((this._CompanyProjectId != value))
|
||||||
|
{
|
||||||
|
this.OnCompanyProjectIdChanging(value);
|
||||||
|
this.SendPropertyChanging();
|
||||||
|
this._CompanyProjectId = value;
|
||||||
|
this.SendPropertyChanged("CompanyProjectId");
|
||||||
|
this.OnCompanyProjectIdChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Comprehensive_NCRManagement_Sys_User", Storage="_Comprehensive_NCRManagement", ThisKey="UserId", OtherKey="CompileMan", DeleteRule="NO ACTION")]
|
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Comprehensive_NCRManagement_Sys_User", Storage="_Comprehensive_NCRManagement", ThisKey="UserId", OtherKey="CompileMan", DeleteRule="NO ACTION")]
|
||||||
public EntitySet<Comprehensive_NCRManagement> Comprehensive_NCRManagement
|
public EntitySet<Comprehensive_NCRManagement> Comprehensive_NCRManagement
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue