公司级增加项目筛选,开车看板修改
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;
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -251,13 +251,24 @@
|
|||
/// 获取项目下拉选项
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Model.Base_Project> GetAllProjectDropDownList()
|
||||
public static List<Model.Base_Project> GetAllProjectDropDownList(string[] pids = null)
|
||||
{
|
||||
if (pids == null)
|
||||
{
|
||||
var list = (from x in Funs.DB.Base_Project
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
|
@ -669,5 +680,27 @@
|
|||
|
||||
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,37 +686,68 @@ namespace BLL
|
|||
/// 获取企业负责人带班检查次数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int GetCompanyLeadShiftCheckNum()
|
||||
public static int GetCompanyLeadShiftCheckNum(string[] pids=null)
|
||||
{
|
||||
if (pids == null)
|
||||
{
|
||||
var result = (from x in Funs.DB.Supervise_SuperviseCheckReport
|
||||
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>
|
||||
/// <returns></returns>
|
||||
public static int GetCompanyComprehensiveCheckNum()
|
||||
public static int GetCompanyComprehensiveCheckNum(string[] pids = null)
|
||||
{
|
||||
if (pids == null) {
|
||||
var result = (from x in Funs.DB.Supervise_SuperviseCheckReport
|
||||
where x.CheckType == "2" && x.CheckDate > Const.DtmarkTime
|
||||
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>
|
||||
/// <returns></returns>
|
||||
public static int GetCompanySpecialCheckNum()
|
||||
public static int GetCompanySpecialCheckNum(string[] pids = null)
|
||||
{
|
||||
if (pids == null)
|
||||
{
|
||||
var result = (from x in Funs.DB.Supervise_SuperviseCheckReport
|
||||
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>
|
||||
/// 获取企业级综合预案数
|
||||
|
|
|
@ -68,6 +68,11 @@
|
|||
.tab .t-item {
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.bw-item-content {
|
||||
overflow: hidden;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
@ -116,11 +121,11 @@
|
|||
</div>
|
||||
<div class="tab-wrap">
|
||||
<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="t-item" style="background-color: #DD226D">投料中</div>
|
||||
<div class="t-item" style="background-color: #57C43C">投料中</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 class="bw-item-content">
|
||||
|
@ -487,7 +492,7 @@
|
|||
var threeData = JSON.parse(fourDecisionStr);
|
||||
var threewidth = Math.floor(100 / threeData.length);
|
||||
$.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
|
||||
|
@ -495,7 +500,7 @@
|
|||
var fourData = JSON.parse(fourStr);
|
||||
var fourwidth = Math.floor(100 / (fourData.length / 2));
|
||||
$.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
|
||||
|
@ -503,7 +508,7 @@
|
|||
var fiveData = JSON.parse(fiveStr);
|
||||
var fivewidth = Math.floor(100 / (fiveData.length / 2));
|
||||
$.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
|
||||
|
@ -816,19 +821,26 @@
|
|||
//if (item.RunType == 3) {
|
||||
// colorData = ["#CCCC33", "#8FCC33", "#57C43C", "#22DD48"];
|
||||
//}
|
||||
var colorData = ["#7A7AA7", "#5656CC", "#3939E9", "#2222FF"];
|
||||
var colorData = ["#DD226D", "#DD226D", "#DD226D", "#DD226D"];
|
||||
if (item.RunType == 2) {
|
||||
colorData = ["#DD226D", "#DD226D", "#E95B39", "#DD226D"];
|
||||
colorData = ["#57C43C", "#57C43C", "#57C43C", "#57C43C"];
|
||||
}
|
||||
if (item.RunType == 3) {
|
||||
colorData = ["#3fbb6a", "#3fbb6a", "#3fbb6a", "#3fbb6a"];
|
||||
colorData = ["#B3764D", "#B3764D", "#B3764D", "#B3764D"];
|
||||
}
|
||||
var chart = echarts.init(document.getElementById('four' + index));
|
||||
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 = {
|
||||
backgroundColor: '000',
|
||||
title: {
|
||||
text: `` + item.SystemName,
|
||||
text: `` + sname,
|
||||
subtext: item.RunType == 1 ? "未投料" : item.RunType == 2 ? "投料中" : "投料完成",
|
||||
left: 'center',
|
||||
top: '45%', //top待调整
|
||||
|
@ -926,10 +938,17 @@
|
|||
}
|
||||
var chart = echarts.init(document.getElementById('five' + index));
|
||||
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 = {
|
||||
backgroundColor: '000',
|
||||
title: {
|
||||
text: `` + item.SystemName,
|
||||
text: sname,
|
||||
subtext: item.RunType == 1 ? "未运行" : item.RunType == 2 ? "运行中" : "停车检修",
|
||||
left: 'center',
|
||||
top: '45%', //top待调整
|
||||
|
|
|
@ -39,6 +39,11 @@
|
|||
.cl-tab {
|
||||
padding: 0.025rem 0 !important;
|
||||
}
|
||||
|
||||
.c-site>.num-box>.num {
|
||||
font-size: .215rem;
|
||||
color: #21FFAF;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
@ -2346,7 +2351,8 @@
|
|||
dataZoom: [
|
||||
{
|
||||
// 设置滚动条的隐藏或显示
|
||||
show: value.length > 10,
|
||||
/* show: value.length > 10,*/
|
||||
show: true,
|
||||
// 设置类型
|
||||
type: "slider",
|
||||
// 设置背景颜色
|
||||
|
|
|
@ -13,11 +13,19 @@ namespace FineUIPro.Web.common
|
|||
{
|
||||
List<Model.Base_Project> allProjects;
|
||||
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)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
if (!string.IsNullOrEmpty(CurrUser.CompanyProjectId))
|
||||
{
|
||||
pids = CurrUser.CompanyProjectId.Split(',');
|
||||
}
|
||||
|
||||
|
||||
//未遂事故
|
||||
var wsAccidentList1 = from x in db.Accident_AccidentPersonRecord
|
||||
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;
|
||||
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;
|
||||
|
@ -43,32 +70,88 @@ namespace FineUIPro.Web.common
|
|||
//}
|
||||
DateTime d1 = getStartMonth();
|
||||
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];
|
||||
}
|
||||
|
||||
|
||||
|
||||
//int wHoursMonth = db.SitePerson_PersonInOutNumber.Where(x => x.InOutDate > DateTime.Now.AddDays(-Convert.ToInt32(DateTime.Now.Date.Day)))
|
||||
// .Max(x => x.WorkHours) ?? 0;
|
||||
//this.divSafeWorkTimeMonth.InnerHtml = wHoursMonth.ToString();
|
||||
|
||||
//安全培训累计人员
|
||||
var getTrainRecord = db.EduTrain_TrainRecord.Sum(x => x.TrainPersonNum) ?? 0;
|
||||
var getTrainRecord = 0;
|
||||
var boShengCount = 0;
|
||||
if (pids == null)
|
||||
{
|
||||
getTrainRecord = db.EduTrain_TrainRecord.Sum(x => x.TrainPersonNum) ?? 0;
|
||||
//修改:增加博晟教育中的人数
|
||||
var boShengCount = db.Bo_Sheng_TrainPerson.Where(x => (x.DeleteTag == "False" || x.DeleteTag == null)).ToList().Count;
|
||||
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();
|
||||
}
|
||||
|
||||
|
||||
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;
|
||||
|
||||
//质量管理人员
|
||||
int CqmsManageNum = (from x in Funs.DB.Person_CompanyBranchPerson
|
||||
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
|
||||
where x.IsOnJob == true && y.IsCQMS == true
|
||||
select x).Count() +
|
||||
|
@ -78,15 +161,34 @@ namespace FineUIPro.Web.common
|
|||
select x).Count();
|
||||
this.divCqmsManageNum.InnerText = CqmsManageNum.ToString();
|
||||
|
||||
//质量培训人员
|
||||
DateTime date = DateTime.Now.AddDays(-1);
|
||||
int CqmsPxNum = (from x in Funs.DB.Comprehensive_InspectionPerson
|
||||
CqmsPxNum = (from x in Funs.DB.Comprehensive_InspectionPerson
|
||||
where x.IsTrain == true
|
||||
select x).Count();
|
||||
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
|
||||
|
||||
//在建项目
|
||||
if (pids == null)
|
||||
{
|
||||
allProjects = ProjectService.GetAllProjectDropDownList();
|
||||
}
|
||||
else {
|
||||
allProjects = ProjectService.GetAllProjectDropDownList(pids);
|
||||
}
|
||||
|
||||
int acount = allProjects.Count();
|
||||
int pcount1 = 0;
|
||||
int pcount2 = 0;
|
||||
|
@ -94,8 +196,15 @@ namespace FineUIPro.Web.common
|
|||
if (acount > 0)
|
||||
{
|
||||
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();
|
||||
pcount3 = Count3();
|
||||
var pidzjsg = string.Join(",", allProjects.Where(x => x.ProjectState == Const.ProjectState_1 || x.ProjectState == null).Select(x => x.ProjectId)).Split(',');
|
||||
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_cjrsCount.InnerHtml = pcount2.ToString() + "<div class=\"th\">人</div>";
|
||||
|
@ -162,7 +271,7 @@ namespace FineUIPro.Web.common
|
|||
/// </summary>
|
||||
/// <param name="state"></param>
|
||||
/// <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;
|
||||
|
||||
|
@ -171,6 +280,11 @@ namespace FineUIPro.Web.common
|
|||
var getAllPersonInOutList = from x in Funs.DB.SitePerson_PersonInOutNumber
|
||||
|
||||
select x;
|
||||
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)
|
||||
|
@ -196,6 +310,18 @@ namespace FineUIPro.Web.common
|
|||
where y.ProjectState == Const.ProjectState_1
|
||||
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)
|
||||
{
|
||||
getD1 = getD1.Where(x => x.AccidentDate >= datetime1);
|
||||
|
@ -542,10 +668,10 @@ namespace FineUIPro.Web.common
|
|||
/// </summary>
|
||||
/// <param name="state"></param>
|
||||
/// <returns></returns>
|
||||
protected int Count3()
|
||||
protected int Count3(string[] pids)
|
||||
{
|
||||
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;
|
||||
}
|
||||
#endregion
|
||||
|
@ -560,22 +686,50 @@ namespace FineUIPro.Web.common
|
|||
|
||||
protected string zgzglDataValue;
|
||||
protected void getZlwt()
|
||||
{
|
||||
if (pids == null)
|
||||
{
|
||||
zlallNumber = (from x in Funs.DB.Check_CheckControl
|
||||
where x.CheckDate <= DateTime.Now
|
||||
select x).Count().ToString();
|
||||
|
||||
var num2 = (from x in Funs.DB.Check_CheckControl
|
||||
where x.CheckDate <= DateTime.Now && x.State == "7"
|
||||
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();
|
||||
}
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 质量共检
|
||||
|
@ -585,6 +739,8 @@ namespace FineUIPro.Web.common
|
|||
|
||||
protected string zggjzglDataValue;
|
||||
protected void getZlgj()
|
||||
{
|
||||
if (pids == null)
|
||||
{
|
||||
var num1 = (from x in Funs.DB.ProcessControl_InspectionManagement
|
||||
select x).Count();
|
||||
|
@ -600,6 +756,24 @@ namespace FineUIPro.Web.common
|
|||
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();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
@ -617,6 +791,10 @@ namespace FineUIPro.Web.common
|
|||
double result = 0;
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
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;
|
||||
if (ndtLists.Count() > 0)
|
||||
{
|
||||
|
@ -672,6 +850,8 @@ namespace FineUIPro.Web.common
|
|||
//准点率
|
||||
protected string gjsxZdl = "0";
|
||||
protected void getGjsx()
|
||||
{
|
||||
if (pids == null)
|
||||
{
|
||||
//Check_JointCheck
|
||||
var znum = (from x in Funs.DB.GJSX
|
||||
|
@ -698,6 +878,35 @@ namespace FineUIPro.Web.common
|
|||
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();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
@ -706,7 +915,14 @@ namespace FineUIPro.Web.common
|
|||
{
|
||||
int AllCount = 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();
|
||||
if (AllCount > 0)
|
||||
{
|
||||
|
@ -727,7 +943,16 @@ namespace FineUIPro.Web.common
|
|||
protected string ProjectPersonMc;
|
||||
private void getProjectSitePerson()
|
||||
{
|
||||
var list = Funs.DB.Base_Project.Where(x => (x.ProjectState == Const.ProjectState_1 || x.ProjectState == null)).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)
|
||||
{
|
||||
ProjectPersonMc += "'" + item.ShortName + "',";
|
||||
|
@ -743,7 +968,16 @@ namespace FineUIPro.Web.common
|
|||
protected string ProjectMc;
|
||||
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>();
|
||||
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();
|
||||
}
|
||||
if (list.Count>0)
|
||||
{
|
||||
foreach (var item in list)
|
||||
{
|
||||
ProjectJd += "'" + item.Progress.Value.ToString("0.##") + "',";
|
||||
|
@ -752,6 +986,8 @@ namespace FineUIPro.Web.common
|
|||
ProjectJd = ProjectJd.TrimEnd(',');
|
||||
ProjectMc = ProjectMc.TrimEnd(',');
|
||||
}
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 整改数据
|
||||
|
@ -767,22 +1003,42 @@ namespace FineUIPro.Web.common
|
|||
/// 获取隐患整改闭环项
|
||||
/// </summary>
|
||||
/// <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"
|
||||
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;
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取隐患未整改完成项
|
||||
/// </summary>
|
||||
/// <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"
|
||||
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;
|
||||
}
|
||||
#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 SbclList = Funs.DB.CLGL_ContractListSum.Where(x => x.C1 == "设备");
|
||||
foreach (var item in list)
|
||||
|
@ -920,7 +1184,9 @@ namespace FineUIPro.Web.common
|
|||
/// 获取未遂事件数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int GetNearMissNum()
|
||||
private int GetNearMissNum()
|
||||
{
|
||||
if (pids == null)
|
||||
{
|
||||
var result = (from x in Funs.DB.Accident_AccidentPersonRecord
|
||||
join y in Funs.DB.Base_AccidentType on x.AccidentTypeId equals y.AccidentTypeId
|
||||
|
@ -928,5 +1194,15 @@ namespace FineUIPro.Web.common
|
|||
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 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_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" data-type="zd" style="cursor:pointer" onclick="yjClick(1)" id="zdyh_span">重大隐患</span>
|
||||
</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-item">
|
||||
<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 hjfinishNumber = "0";
|
||||
protected string hjzgl = "0";
|
||||
|
||||
/// <summary>
|
||||
/// 公司级项目筛选
|
||||
/// </summary>
|
||||
public string[] pids { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 页面加载
|
||||
/// </summary>
|
||||
|
@ -27,6 +33,10 @@ namespace FineUIPro.Web.common
|
|||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(CurrUser.CompanyProjectId))
|
||||
{
|
||||
pids = CurrUser.CompanyProjectId.Split(',');
|
||||
}
|
||||
ProjectService.InitProjectShortNameByStateDropDownList(this.drpProject, this.CurrUser.UserId, BLL.Const.ProjectState_1, false);
|
||||
if (this.drpProject.Items.Count > 0)
|
||||
{
|
||||
|
@ -121,7 +131,9 @@ namespace FineUIPro.Web.common
|
|||
/// 获取项目部人数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int GetProjectPersonNum()
|
||||
public int GetProjectPersonNum()
|
||||
{
|
||||
if (pids == null)
|
||||
{
|
||||
int result = (from x in Funs.DB.SitePerson_Person
|
||||
join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId
|
||||
|
@ -129,35 +141,65 @@ namespace FineUIPro.Web.common
|
|||
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>
|
||||
/// <returns></returns>
|
||||
public static int GetUseNum()
|
||||
public int GetUseNum()
|
||||
{
|
||||
if (pids == null)
|
||||
{
|
||||
int result = (from x in Funs.DB.Comprehensive_InspectionMachine
|
||||
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>
|
||||
/// <returns></returns>
|
||||
public static int GetOKNum()
|
||||
public int GetOKNum()
|
||||
{
|
||||
if (pids == null)
|
||||
{
|
||||
int result = (from x in Funs.DB.Comprehensive_InspectionMachine
|
||||
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>
|
||||
/// <returns></returns>
|
||||
public static int GetJxyjNum()
|
||||
public int GetJxyjNum()
|
||||
{
|
||||
if (pids == null)
|
||||
{
|
||||
int result = 0;
|
||||
//机具报验的到期提醒和过期提醒记录数加一起
|
||||
|
@ -170,35 +212,66 @@ namespace FineUIPro.Web.common
|
|||
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>
|
||||
/// <returns></returns>
|
||||
public static int GetTrainPersonNum()
|
||||
public int GetTrainPersonNum()
|
||||
{
|
||||
if (pids == null)
|
||||
{
|
||||
int result = (from x in Funs.DB.Comprehensive_InspectionPerson
|
||||
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>
|
||||
/// <returns></returns>
|
||||
public static int GetTechnicalDisclosePersonNum()
|
||||
public int GetTechnicalDisclosePersonNum()
|
||||
{
|
||||
if (pids == null)
|
||||
{
|
||||
var result = (from x in Funs.DB.Comprehensive_DesignDetails
|
||||
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>
|
||||
private void getEarlyWarningCounts()
|
||||
{
|
||||
if (pids == null)
|
||||
{
|
||||
int allCount = 0;
|
||||
var getPersonQualitys = from x in Funs.DB.Comprehensive_InspectionPerson
|
||||
|
@ -207,6 +280,17 @@ namespace FineUIPro.Web.common
|
|||
//// 预警人数
|
||||
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 质量验收数据
|
||||
|
@ -214,10 +298,11 @@ namespace FineUIPro.Web.common
|
|||
/// 共检总数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int getAllInspectionManagement()
|
||||
public int getAllInspectionManagement()
|
||||
{
|
||||
if (pids == null)
|
||||
{
|
||||
int result = 0;
|
||||
;
|
||||
//统计所给时间段的全部数量
|
||||
//List<Model.View_CQMS_InspectionManagementDetail> managementListSunNumber =
|
||||
// BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(
|
||||
|
@ -230,11 +315,23 @@ namespace FineUIPro.Web.common
|
|||
// 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>
|
||||
/// <returns></returns>
|
||||
public static int getIsOnceInspectionManagement()
|
||||
public int getIsOnceInspectionManagement()
|
||||
{
|
||||
if (pids == null)
|
||||
{
|
||||
int result = 0;
|
||||
//统计所给时间段的合格数量
|
||||
|
@ -251,11 +348,23 @@ namespace FineUIPro.Web.common
|
|||
// select x).Count();
|
||||
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>
|
||||
/// <returns></returns>
|
||||
public static string GetInspectionManagementZgl()
|
||||
public string GetInspectionManagementZgl()
|
||||
{
|
||||
string zgl = String.Format("{0:N2}", 100.0 * getIsOnceInspectionManagement() / getAllInspectionManagement());
|
||||
return zgl + "%";
|
||||
|
@ -269,30 +378,48 @@ namespace FineUIPro.Web.common
|
|||
/// 获取整改完成数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int GetProblemCompletedNum()
|
||||
public int GetProblemCompletedNum()
|
||||
{
|
||||
if (pids == null)
|
||||
{
|
||||
int result = (from x in Funs.DB.Check_CheckControl
|
||||
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>
|
||||
/// <returns></returns>
|
||||
public static int GetProblemNotCompletedNum()
|
||||
public int GetProblemNotCompletedNum()
|
||||
{
|
||||
if (pids == null)
|
||||
{
|
||||
int result = (from x in Funs.DB.Check_CheckControl
|
||||
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>
|
||||
/// <returns></returns>
|
||||
public static string GetProblemZgl()
|
||||
public string GetProblemZgl()
|
||||
{
|
||||
string zgl = String.Format("{0:N2}", 100.0 * GetProblemCompletedNum() / (GetProblemCompletedNum() + GetProblemNotCompletedNum()));
|
||||
return zgl + "%";
|
||||
|
@ -316,31 +443,52 @@ namespace FineUIPro.Web.common
|
|||
/// 获取问题个数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int GetProblemNum()
|
||||
public int GetProblemNum()
|
||||
{
|
||||
if (pids == null)
|
||||
{
|
||||
int result = (from x in Funs.DB.Check_CheckControl
|
||||
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
|
||||
|
||||
/// <summary>
|
||||
/// 获取焊工总数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int GetWelderNum()
|
||||
public int GetWelderNum()
|
||||
{
|
||||
if (pids == null)
|
||||
{
|
||||
int result = (from x in Funs.DB.BS_Welder
|
||||
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>
|
||||
/// <returns></returns>
|
||||
public static int GetTotalDineNum()
|
||||
public int GetTotalDineNum()
|
||||
{
|
||||
if (pids == null)
|
||||
{
|
||||
int result = 0;
|
||||
var getD1 = from x in Funs.DB.HJGL_FL_TotalQuantity
|
||||
|
@ -364,11 +512,40 @@ namespace FineUIPro.Web.common
|
|||
}
|
||||
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.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;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取完成达因数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int GetCompleteDineNum()
|
||||
public int GetCompleteDineNum()
|
||||
{
|
||||
if (pids == null)
|
||||
{
|
||||
int result = 0;
|
||||
|
||||
|
@ -395,11 +572,41 @@ namespace FineUIPro.Web.common
|
|||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取总片数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int GetTotalFilmNum()
|
||||
public int GetTotalFilmNum()
|
||||
{
|
||||
if (pids == null)
|
||||
{
|
||||
//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
|
||||
|
@ -415,11 +622,28 @@ namespace FineUIPro.Web.common
|
|||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取合格片数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int GetOKFilmNum()
|
||||
public int GetOKFilmNum()
|
||||
{
|
||||
if (pids == null)
|
||||
{
|
||||
int result = 0;
|
||||
var getD2 = (from x in Funs.DB.HJGL_FL_Data
|
||||
|
@ -431,12 +655,26 @@ namespace FineUIPro.Web.common
|
|||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 一次拍片合格率
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static string GetOKFilmHgl()
|
||||
public string GetOKFilmHgl()
|
||||
{
|
||||
string zgl = "0";
|
||||
if (GetOKFilmNum() > 0)
|
||||
|
@ -460,6 +698,9 @@ namespace FineUIPro.Web.common
|
|||
{
|
||||
|
||||
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)
|
||||
{
|
||||
//获取专业
|
||||
|
@ -469,9 +710,27 @@ namespace FineUIPro.Web.common
|
|||
// join y in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals y.InspectionId
|
||||
// where y.CNProfessionalId == item.CNProfessionalId
|
||||
// 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
|
||||
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 + "',";
|
||||
|
||||
//根据专业获取合格数
|
||||
|
@ -479,9 +738,7 @@ namespace FineUIPro.Web.common
|
|||
// join y in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals y.InspectionId
|
||||
// where y.CNProfessionalId == item.CNProfessionalId && y.IsOnceQualified==true
|
||||
// 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 + "',";
|
||||
|
||||
//一次验收合格率
|
||||
|
@ -513,6 +770,8 @@ namespace FineUIPro.Web.common
|
|||
protected string ncrZy;
|
||||
protected string ncrCount;
|
||||
private void getNcrInfo()
|
||||
{
|
||||
if (pids==null)
|
||||
{
|
||||
//闭环项 有完成日期的
|
||||
//var num1 = Funs.DB.Comprehensive_NCRManagement.Where(x => x.CompleteDate != null).Count();
|
||||
|
@ -537,6 +796,31 @@ namespace FineUIPro.Web.common
|
|||
}
|
||||
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(',');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
|
|
@ -43,13 +43,7 @@
|
|||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
.projcet-select {
|
||||
float: left;
|
||||
height: 40px;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
|
||||
.bgbtn {
|
||||
/*background-image: url(../res/images/login.png) !important;*/
|
||||
|
@ -176,14 +170,124 @@
|
|||
border: none !important;
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.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);
|
||||
|
||||
}
|
||||
.projcet-select input::placeholder {
|
||||
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>
|
||||
</head>
|
||||
<body class="wrap">
|
||||
<form id="form1" runat="server">
|
||||
|
@ -196,18 +300,22 @@
|
|||
<div class="header">
|
||||
<div class="nav-left">
|
||||
<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"
|
||||
EnablePostBack="true" EnableDefaultState="true" EnableDefaultCorner="false" ID="btn_xmgk"
|
||||
OnClientClick="parent.removeActiveTab();">
|
||||
</f:Button></div>
|
||||
<div class="t-btn" id="div_aqsc" onclick="changeHead(1)" style="cursor:pointer">安全生产
|
||||
</f:Button>
|
||||
</div>
|
||||
<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">质量管理
|
||||
<div class="t-btn" id="div_zlgl" onclick="changeHead(2)" style="cursor: pointer">
|
||||
质量管理
|
||||
<f:Button runat="server" CssClass="bgbtntop" OnClick="btnZlgl_Click" Hidden="true"
|
||||
EnablePostBack="true" EnableDefaultState="true" EnableDefaultCorner="false" ID="btn_zlgl"
|
||||
OnClientClick="parent.removeActiveTab();">
|
||||
|
@ -218,45 +326,104 @@
|
|||
<div class="n-btn-l">
|
||||
<f:Button runat="server" Text="项目清单" ID="btnProject" OnClick="btnProject_Click"
|
||||
EnablePostBack="true" EnableDefaultState="true" EnableDefaultCorner="false" OnClientClick="parent.removeActiveTab();">
|
||||
</f:Button></div>
|
||||
</f:Button>
|
||||
</div>
|
||||
<div class="n-btn-l">
|
||||
<f:Button runat="server" Text="大数据中心" ID="btnDigData" OnClick="btnDigData_Click"
|
||||
EnablePostBack="true" EnableDefaultState="true" EnableDefaultCorner="false" OnClientClick="parent.removeActiveTab();">
|
||||
</f:Button></div>
|
||||
</f:Button>
|
||||
</div>
|
||||
<div class="n-btn-l">
|
||||
<f:Button runat="server" Text="总部检查" ID="btnServer" OnClick="btnServer_Click"
|
||||
EnablePostBack="true" EnableDefaultState="true" EnableDefaultCorner="false" OnClientClick="parent.removeActiveTab();">
|
||||
</f:Button></div>
|
||||
</f:Button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="nav-center">
|
||||
</div>
|
||||
<div class="nav-center" style="position: relative;">
|
||||
<h1>中国五环工程有限公司智慧施工管理信息系统(公司级)<f:Button runat="server" CssClass="bgbtn_head" EnablePostBack="true" OnClick="btnHome_Click"
|
||||
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 class="nav-right">
|
||||
<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"
|
||||
EnablePostBack="true" EnableDefaultState="true" EnableDefaultCorner="false" ID="btnPersonal" OnClientClick="parent.removeActiveTab();">
|
||||
</f:Button>
|
||||
</span></div>
|
||||
<div class="t-btn1 iconfont icon-shezhi" onclick="btnSysSetFunction()" style="cursor:pointer"><span>设置
|
||||
</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"
|
||||
EnablePostBack="true" EnableDefaultState="true" EnableDefaultCorner="false" ID="btnSysSet" OnClientClick="parent.removeActiveTab();">
|
||||
</f:Button>
|
||||
</span></div>
|
||||
<div class="t-btn1 iconfont icon-tuichu" onclick="SignOutFunction()" style="cursor:pointer"><span>退出
|
||||
</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"
|
||||
EnablePostBack="false" EnableDefaultState="true" EnableDefaultCorner="false" ID="Button18">
|
||||
<Listeners>
|
||||
<f:Listener Event="click" Handler="onToolSignOutClick" />
|
||||
</Listeners>
|
||||
</f:Button>
|
||||
</span></div>
|
||||
<div class="t-btn1 iconfont icon-quanping_o ab" style="cursor:pointer"><span>全屏
|
||||
</span>
|
||||
</div>
|
||||
<div class="t-btn1 iconfont icon-quanping_o ab" style="cursor: pointer">
|
||||
<span>全屏
|
||||
|
||||
</span></div>
|
||||
</span>
|
||||
</div>
|
||||
<div>
|
||||
<f:Button runat="server" CssClass="bgbtntop" Text="" ToolTip="刷新菜单" OnClick="btnRetweet_Click"
|
||||
EnablePostBack="true" EnableDefaultState="true" EnableDefaultCorner="false" ID="btnRetweet" OnClientClick="parent.removeActiveTab();">
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
using BLL;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Xml;
|
||||
|
@ -299,6 +300,9 @@ namespace FineUIPro.Web
|
|||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
//选择项目为空
|
||||
CurrUser.CompanyProjectId = "";
|
||||
|
||||
this.MenuSwitchMethod(Request.Params["menuType"]);
|
||||
this.InitMenuStyleButton();
|
||||
this.InitMenuModeButton();
|
||||
|
@ -319,6 +323,8 @@ namespace FineUIPro.Web
|
|||
this.Tab1.IFrameUrl = "~/common/main2.aspx";
|
||||
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";
|
||||
}
|
||||
|
||||
#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>
|
||||
/// form1 控件。
|
||||
|
@ -120,6 +122,60 @@ namespace FineUIPro.Web {
|
|||
/// </remarks>
|
||||
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>
|
||||
/// btnPersonal 控件。
|
||||
/// </summary>
|
||||
|
|
|
@ -356772,6 +356772,8 @@ namespace Model
|
|||
|
||||
private string _HomePageType;
|
||||
|
||||
private string _CompanyProjectId;
|
||||
|
||||
private EntitySet<Comprehensive_NCRManagement> _Comprehensive_NCRManagement;
|
||||
|
||||
private EntitySet<Comprehensive_PressurePipe> _Comprehensive_PressurePipe;
|
||||
|
@ -357584,6 +357586,8 @@ namespace Model
|
|||
partial void OnRawPasswordChanged();
|
||||
partial void OnHomePageTypeChanging(string value);
|
||||
partial void OnHomePageTypeChanged();
|
||||
partial void OnCompanyProjectIdChanging(string value);
|
||||
partial void OnCompanyProjectIdChanged();
|
||||
#endregion
|
||||
|
||||
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")]
|
||||
public EntitySet<Comprehensive_NCRManagement> Comprehensive_NCRManagement
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue