提交代码
This commit is contained in:
parent
7cdbe93dca
commit
eb17a1e45f
|
@ -44,14 +44,14 @@ namespace FineUIPro.Web.common
|
|||
DateTime d1 = getStartMonth();
|
||||
DateTime d2 = getEndMonth();
|
||||
|
||||
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)))
|
||||
// .Max(x => x.WorkHours) ?? 0;
|
||||
//this.divSafeWorkTimeMonth.InnerHtml = wHoursMonth.ToString();
|
||||
|
||||
//安全培训累计人员
|
||||
var getTrainRecord = db.EduTrain_TrainRecord.Sum(x=>x.TrainPersonNum)??0;
|
||||
var 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;
|
||||
this.divSafePersonNum.InnerHtml = (getTrainRecord + boShengCount).ToString();
|
||||
|
@ -68,15 +68,20 @@ namespace FineUIPro.Web.common
|
|||
|
||||
//质量管理人员
|
||||
int CqmsManageNum = (from x in Funs.DB.Person_CompanyBranchPerson
|
||||
where x.IsOnJob == true
|
||||
select x).Count();
|
||||
join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId
|
||||
where x.IsOnJob == true && y.IsCQMS == true
|
||||
select x).Count() +
|
||||
(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
|
||||
select x).Count();
|
||||
this.divCqmsManageNum.InnerText = CqmsManageNum.ToString();
|
||||
|
||||
//质量培训人员
|
||||
DateTime date = DateTime.Now.AddDays(-1);
|
||||
int CqmsPxNum = (from x in Funs.DB.Comprehensive_InspectionPerson
|
||||
where x.IsTrain == true
|
||||
select x).Count();
|
||||
where x.IsTrain == true
|
||||
select x).Count();
|
||||
divCqmsPxNum.InnerText = CqmsPxNum.ToString();
|
||||
|
||||
//质量问题
|
||||
|
@ -97,10 +102,10 @@ namespace FineUIPro.Web.common
|
|||
int pcount1 = 0;
|
||||
int pcount2 = 0;
|
||||
int pcount3 = 0;
|
||||
if (acount>0)
|
||||
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();
|
||||
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();
|
||||
}
|
||||
div_zjxmCount.InnerText = pcount1.ToString();
|
||||
|
@ -160,56 +165,56 @@ namespace FineUIPro.Web.common
|
|||
{
|
||||
decimal cout1 = 0;
|
||||
|
||||
var datetime1 = d1;
|
||||
var datetime2 = d2;
|
||||
var getAllPersonInOutList = from x in Funs.DB.SitePerson_PersonInOutNumber
|
||||
|
||||
select x;
|
||||
if (getAllPersonInOutList.Count() > 0)
|
||||
{
|
||||
if (datetime1.HasValue)
|
||||
{
|
||||
getAllPersonInOutList = getAllPersonInOutList.Where(x => x.InOutDate >= datetime1);
|
||||
}
|
||||
if (datetime2.HasValue)
|
||||
{
|
||||
getAllPersonInOutList = getAllPersonInOutList.Where(x => x.InOutDate <= datetime2);
|
||||
}
|
||||
if (getAllPersonInOutList.Count() > 0)
|
||||
{
|
||||
cout1 = getAllPersonInOutList.Sum(x => (long)x.WorkHours);
|
||||
}
|
||||
}
|
||||
|
||||
var getD1 = from x in Funs.DB.Accident_AccidentHandle
|
||||
join y in Funs.DB.Base_Project on x.ProjectId equals y.ProjectId
|
||||
where y.ProjectState == Const.ProjectState_1
|
||||
select x;
|
||||
var getD2 = from x in Funs.DB.Accident_AccidentReport
|
||||
join y in Funs.DB.Base_Project on x.ProjectId equals y.ProjectId
|
||||
where y.ProjectState == Const.ProjectState_1
|
||||
select x;
|
||||
var datetime1 = d1;
|
||||
var datetime2 = d2;
|
||||
var getAllPersonInOutList = from x in Funs.DB.SitePerson_PersonInOutNumber
|
||||
|
||||
select x;
|
||||
if (getAllPersonInOutList.Count() > 0)
|
||||
{
|
||||
if (datetime1.HasValue)
|
||||
{
|
||||
getD1 = getD1.Where(x => x.AccidentDate >= datetime1);
|
||||
getD2 = getD2.Where(x => x.CompileDate >= datetime1);
|
||||
getAllPersonInOutList = getAllPersonInOutList.Where(x => x.InOutDate >= datetime1);
|
||||
}
|
||||
if (datetime2.HasValue)
|
||||
{
|
||||
getD1 = getD1.Where(x => x.AccidentDate <= datetime2);
|
||||
getD2 = getD2.Where(x => x.CompileDate <= datetime2);
|
||||
getAllPersonInOutList = getAllPersonInOutList.Where(x => x.InOutDate <= datetime2);
|
||||
}
|
||||
if (getAllPersonInOutList.Count() > 0)
|
||||
{
|
||||
cout1 = getAllPersonInOutList.Sum(x => (long)x.WorkHours);
|
||||
}
|
||||
}
|
||||
|
||||
var getD1 = from x in Funs.DB.Accident_AccidentHandle
|
||||
join y in Funs.DB.Base_Project on x.ProjectId equals y.ProjectId
|
||||
where y.ProjectState == Const.ProjectState_1
|
||||
select x;
|
||||
var getD2 = from x in Funs.DB.Accident_AccidentReport
|
||||
join y in Funs.DB.Base_Project on x.ProjectId equals y.ProjectId
|
||||
where y.ProjectState == Const.ProjectState_1
|
||||
select x;
|
||||
|
||||
if (datetime1.HasValue)
|
||||
{
|
||||
getD1 = getD1.Where(x => x.AccidentDate >= datetime1);
|
||||
getD2 = getD2.Where(x => x.CompileDate >= datetime1);
|
||||
}
|
||||
if (datetime2.HasValue)
|
||||
{
|
||||
getD1 = getD1.Where(x => x.AccidentDate <= datetime2);
|
||||
getD2 = getD2.Where(x => x.CompileDate <= datetime2);
|
||||
}
|
||||
|
||||
|
||||
if (getD1.Count() > 0)
|
||||
{
|
||||
cout1 = cout1 - getD1.Sum(x => x.WorkHoursLoss ?? 0);
|
||||
}
|
||||
if (getD2.Count() > 0)
|
||||
{
|
||||
cout1 = cout1 - getD2.Sum(x => x.WorkingHoursLoss ?? 0);
|
||||
}
|
||||
if (getD1.Count() > 0)
|
||||
{
|
||||
cout1 = cout1 - getD1.Sum(x => x.WorkHoursLoss ?? 0);
|
||||
}
|
||||
if (getD2.Count() > 0)
|
||||
{
|
||||
cout1 = cout1 - getD2.Sum(x => x.WorkingHoursLoss ?? 0);
|
||||
}
|
||||
return cout1;
|
||||
}
|
||||
|
||||
|
@ -439,17 +444,18 @@ namespace FineUIPro.Web.common
|
|||
|
||||
//修改日期 2023-10-30 10:43:57
|
||||
//内容:项目名称、开工日期、完工日期、剩余天数、进度
|
||||
mapStr += item.ProjectId+",";
|
||||
mapStr += item.ProjectId + ",";
|
||||
|
||||
mapStr += string.Format("{0:yyyy-MM-dd}", item.StartDate) + ",";
|
||||
if (string.IsNullOrEmpty(item.EndDate.ToString()))
|
||||
{
|
||||
mapStr += ",";
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
//获取剩余天数
|
||||
var residueDay = DateDiff(DateTime.Now, Convert.ToDateTime(item.EndDate)).ToString();
|
||||
mapStr += string.Format("{0:yyyy-MM-dd}", item.EndDate) + ","+residueDay;
|
||||
mapStr += string.Format("{0:yyyy-MM-dd}", item.EndDate) + "," + residueDay;
|
||||
}
|
||||
|
||||
|
||||
|
@ -508,7 +514,8 @@ namespace FineUIPro.Web.common
|
|||
protected string zlzgl;
|
||||
|
||||
protected string zgzglDataValue;
|
||||
protected void getZlwt() {
|
||||
protected void getZlwt()
|
||||
{
|
||||
zlallNumber = (from x in Funs.DB.Check_CheckControl
|
||||
where x.CheckDate <= DateTime.Now
|
||||
select x).Count().ToString();
|
||||
|
@ -517,8 +524,8 @@ namespace FineUIPro.Web.common
|
|||
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();
|
||||
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();
|
||||
|
@ -532,11 +539,12 @@ namespace FineUIPro.Web.common
|
|||
protected string zlgjzgl;
|
||||
|
||||
protected string zggjzglDataValue;
|
||||
protected void getZlgj() {
|
||||
protected void getZlgj()
|
||||
{
|
||||
//Check_JointCheck
|
||||
zlgjallNumber = (from x in Funs.DB.Check_JointCheck
|
||||
where x.CheckDate <= DateTime.Now
|
||||
select x).Count().ToString();
|
||||
where x.CheckDate <= DateTime.Now
|
||||
select x).Count().ToString();
|
||||
|
||||
var num2 = (from x in Funs.DB.Check_JointCheck
|
||||
where x.CheckDate <= DateTime.Now && x.State == BLL.Const.JointCheck_Complete
|
||||
|
@ -555,11 +563,11 @@ namespace FineUIPro.Web.common
|
|||
#endregion
|
||||
|
||||
#region 焊接
|
||||
protected string hjallNumber="0";
|
||||
protected string hjfinishNumber="0";
|
||||
protected string hjzgl="0";
|
||||
protected string hjallNumber = "0";
|
||||
protected string hjfinishNumber = "0";
|
||||
protected string hjzgl = "0";
|
||||
|
||||
protected string hjDataValue="0";
|
||||
protected string hjDataValue = "0";
|
||||
protected void getHj()
|
||||
{
|
||||
Model.SingleSerie series = new Model.SingleSerie();
|
||||
|
@ -613,27 +621,28 @@ namespace FineUIPro.Web.common
|
|||
{
|
||||
//Check_JointCheck
|
||||
var znum = (from x in Funs.DB.GJSX
|
||||
select x).Count();
|
||||
select x).Count();
|
||||
divGjsxzj.InnerHtml = znum.ToString();
|
||||
|
||||
//到期应完成
|
||||
var dqnum = (from x in Funs.DB.GJSX where x.CompleteDate<=DateTime.Now
|
||||
var dqnum = (from x in Funs.DB.GJSX
|
||||
where x.CompleteDate <= DateTime.Now
|
||||
select x).Count().ToString();
|
||||
divGjsxdq.InnerHtml = dqnum;
|
||||
|
||||
//未准点完成
|
||||
var wzdnum = (from x in Funs.DB.GJSX
|
||||
where x.CompleteDate <= DateTime.Now
|
||||
&& x.State !="0"
|
||||
select x).Count().ToString();
|
||||
&& x.State != "0"
|
||||
select x).Count().ToString();
|
||||
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();
|
||||
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
|
||||
|
@ -671,7 +680,7 @@ namespace FineUIPro.Web.common
|
|||
foreach (var item in list)
|
||||
{
|
||||
ProjectPersonMc += "'" + item.ShortName + "',";
|
||||
ProjectPersonCount += "'" + APIPageDataService.getPersonNum(item.ProjectId,DateTime.Now).Count() + "',";
|
||||
ProjectPersonCount += "'" + APIPageDataService.getPersonNum(item.ProjectId, DateTime.Now).Count() + "',";
|
||||
}
|
||||
ProjectPersonMc = ProjectPersonMc.TrimEnd(',');
|
||||
ProjectPersonCount = ProjectPersonCount.TrimEnd(',');
|
||||
|
@ -681,7 +690,8 @@ namespace FineUIPro.Web.common
|
|||
#region 进度情况
|
||||
protected string ProjectJd;
|
||||
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();
|
||||
foreach (var item in list)
|
||||
{
|
||||
|
@ -694,11 +704,12 @@ namespace FineUIPro.Web.common
|
|||
#endregion
|
||||
|
||||
#region 整改数据
|
||||
protected void getZgsj() {
|
||||
protected void getZgsj()
|
||||
{
|
||||
div_zgsj.InnerHtml = (GetGeneralClosedNum() + GetGeneralNotClosedNum()).ToString();
|
||||
div_zgywc.InnerHtml = GetGeneralClosedNum().ToString();
|
||||
div_zgwwc.InnerHtml = GetGeneralNotClosedNum().ToString();
|
||||
div_zgwcl.InnerHtml= String.Format("{0:N2}", 100.0 * GetGeneralClosedNum() / (GetGeneralNotClosedNum() + GetGeneralClosedNum()))+"%";
|
||||
div_zgwcl.InnerHtml = String.Format("{0:N2}", 100.0 * GetGeneralClosedNum() / (GetGeneralNotClosedNum() + GetGeneralClosedNum())) + "%";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -731,7 +742,8 @@ namespace FineUIPro.Web.common
|
|||
|
||||
protected string gdclHead = "<span>项目</span><span>管子</span><span>管件</span><span>阀门</span><span>垫片</span><span>紧固件</span>";
|
||||
protected string sbclHead = "<span>项目</span><span>采购量</span><span>到货量</span><span>已到货百分比</span>";
|
||||
private void getCldh() {
|
||||
private void getCldh()
|
||||
{
|
||||
|
||||
//项目
|
||||
var list = Funs.DB.Base_Project.Where(x => (x.ProjectState == Const.ProjectState_1 || x.ProjectState == null)).ToList();
|
||||
|
@ -801,7 +813,7 @@ namespace FineUIPro.Web.common
|
|||
|
||||
#region 设备材料
|
||||
sbclHtml += " <div class=\"tr\">";
|
||||
pname=item.ShortName;
|
||||
pname = item.ShortName;
|
||||
if (item.ShortName.Length > 5)
|
||||
{
|
||||
pname = item.ShortName.Substring(0, 5) + "...";
|
||||
|
@ -818,8 +830,9 @@ namespace FineUIPro.Web.common
|
|||
SbcllCgl += 0;
|
||||
Sbdhs += 0;
|
||||
}
|
||||
else {
|
||||
SbcllCgl +=Convert.ToDouble(itemCgl.C7);
|
||||
else
|
||||
{
|
||||
SbcllCgl += Convert.ToDouble(itemCgl.C7);
|
||||
Sbdhs += Convert.ToDouble(itemCgl.C9);
|
||||
}
|
||||
}
|
||||
|
@ -832,7 +845,8 @@ namespace FineUIPro.Web.common
|
|||
var dhbfb = String.Format("{0:N2}", 100.0 * Sbdhs / (Sbdhs + SbcllCgl), 2) + "%";
|
||||
sbclHtml += "<span>" + dhbfb + "</span>";
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
sbclHtml += "<span>0%</span>";
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue