Merge branch 'master' of https://gitee.com/frane-yang/SGGL_CWCEC
This commit is contained in:
commit
717afaed5a
|
@ -65,12 +65,12 @@ namespace FineUIPro.Web.common
|
|||
|
||||
//安全管理人员
|
||||
var allSum = from x in Funs.DB.SitePerson_Person
|
||||
where x.ProjectId == ProjectId && x.IsUsed == true && x.InTime <= DateTime.Now && (!x.OutTime.HasValue || x.OutTime.Value > DateTime.Now)
|
||||
where x.ProjectId == ProjectId && x.IsUsed == true && x.InTime <= DateTime.Now && (!x.OutTime.HasValue || x.OutTime.Value > 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.IsHsse==true && x.ProjectId == ProjectId //安管人员
|
||||
where y.IsHsse == true && x.ProjectId == ProjectId //安管人员
|
||||
select x;
|
||||
this.divSafeManagePersonNum.InnerHtml = glAllPerson.Count().ToString();
|
||||
|
||||
|
@ -179,7 +179,7 @@ namespace FineUIPro.Web.common
|
|||
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())).Replace("NaN","0") + "%";
|
||||
div_zgwcl.InnerHtml = String.Format("{0:N2}", 100.0 * GetGeneralClosedNum() / (GetGeneralNotClosedNum() + GetGeneralClosedNum())).Replace("NaN", "0") + "%";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -299,7 +299,7 @@ namespace FineUIPro.Web.common
|
|||
}
|
||||
var allowExtensions = new List<string>
|
||||
{
|
||||
|
||||
|
||||
"jpg", "jpeg", "png", "bmp", "gif", // 图片文件类型
|
||||
|
||||
};
|
||||
|
@ -318,15 +318,15 @@ namespace FineUIPro.Web.common
|
|||
|
||||
if (File.Exists(atturl) && allowExtensions.Contains(fileType))
|
||||
{
|
||||
isHiddDefaultImg=true;
|
||||
divProjectImg += string.Format(" <div class=\"swiper-slide\"><img src=\"{0}\"></div>", atturl.Replace(Funs.RootPath,"/"));
|
||||
isHiddDefaultImg = true;
|
||||
divProjectImg += string.Format(" <div class=\"swiper-slide\"><img src=\"{0}\"></div>", atturl.Replace(Funs.RootPath, "/"));
|
||||
|
||||
//this.divProjectImgs.Src = divProjectImg;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
divProjectImg= divProjectImg.Replace("<div class=\"swiper-slide\"><img src=\"./imags/16.png\"></div>", "");
|
||||
divProjectImg = divProjectImg.Replace("<div class=\"swiper-slide\"><img src=\"./imags/16.png\"></div>", "");
|
||||
/*string firtstUrl = Funs.GetStrListByStr(url, ',').FirstOrDefault();
|
||||
if (!string.IsNullOrEmpty(firtstUrl))
|
||||
{
|
||||
|
@ -500,7 +500,7 @@ namespace FineUIPro.Web.common
|
|||
}
|
||||
protected int getAllCount()
|
||||
{
|
||||
var result = Funs.DB.View_License_LicenseManager.Where(x => x.ProjectId == ProjectId ).ToList().Count;
|
||||
var result = Funs.DB.View_License_LicenseManager.Where(x => x.ProjectId == ProjectId).ToList().Count;
|
||||
return result;
|
||||
}
|
||||
/// <summary>
|
||||
|
@ -509,12 +509,12 @@ namespace FineUIPro.Web.common
|
|||
/// <returns></returns>
|
||||
protected int getWrokCount0()
|
||||
{
|
||||
var result = Funs.DB.View_License_LicenseManager.Where(x => x.ProjectId == ProjectId && x.LicenseTypeName == "动火作业许可证" &&x.WorkStatesStr=="作业中").ToList().Count;
|
||||
var result = Funs.DB.View_License_LicenseManager.Where(x => x.ProjectId == ProjectId && x.LicenseTypeName == "动火作业许可证" && x.WorkStatesStr == "作业中").ToList().Count;
|
||||
return result;
|
||||
}
|
||||
protected int getALLWrokCount0()
|
||||
{
|
||||
var result = Funs.DB.View_License_LicenseManager.Where(x => x.ProjectId == ProjectId && x.LicenseTypeName == "动火作业许可证" ).ToList().Count;
|
||||
var result = Funs.DB.View_License_LicenseManager.Where(x => x.ProjectId == ProjectId && x.LicenseTypeName == "动火作业许可证").ToList().Count;
|
||||
return result;
|
||||
}
|
||||
protected int getWrokCount1()
|
||||
|
@ -524,7 +524,7 @@ namespace FineUIPro.Web.common
|
|||
}
|
||||
protected int getALLWrokCount1()
|
||||
{
|
||||
var result = Funs.DB.View_License_LicenseManager.Where(x => x.ProjectId == ProjectId && x.LicenseTypeName == "高处作业许可证" ).ToList().Count;
|
||||
var result = Funs.DB.View_License_LicenseManager.Where(x => x.ProjectId == ProjectId && x.LicenseTypeName == "高处作业许可证").ToList().Count;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -548,7 +548,7 @@ namespace FineUIPro.Web.common
|
|||
protected int getALLWrokCount3()
|
||||
{
|
||||
var result = Funs.DB.View_License_LicenseManager.Where(x => x.ProjectId == ProjectId
|
||||
&& x.LicenseTypeName != "动火作业许可证" && x.LicenseTypeName != "高处作业许可证" && x.LicenseTypeName != "吊装作业许可证" ).ToList().Count;
|
||||
&& x.LicenseTypeName != "动火作业许可证" && x.LicenseTypeName != "高处作业许可证" && x.LicenseTypeName != "吊装作业许可证").ToList().Count;
|
||||
return result;
|
||||
}
|
||||
#endregion
|
||||
|
@ -576,7 +576,7 @@ namespace FineUIPro.Web.common
|
|||
select x).Count();
|
||||
|
||||
var zgl = String.Format("{0:N2}", 100.0 * num2 / (num2 + num3));
|
||||
zlzgl = zgl.ToString().Replace("NaN", "0") ;
|
||||
zlzgl = zgl.ToString().Replace("NaN", "0");
|
||||
zgzglDataValue = (100 - (100.0 * num2 / (num2 + num3))).ToString();
|
||||
}
|
||||
#endregion
|
||||
|
@ -633,35 +633,59 @@ namespace FineUIPro.Web.common
|
|||
List<double> listdata = new List<double>();
|
||||
double result = 0;
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
//一次检测合格焊口数
|
||||
int oneCheckJotNum = (from x in db.HJGL_Batch_NDEItem
|
||||
join y in db.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals y.TrustBatchItemId
|
||||
join z in db.HJGL_Batch_PointBatchItem on y.PointBatchItemId equals z.PointBatchItemId
|
||||
join a in db.HJGL_Batch_NDE on x.NDEID equals a.NDEID
|
||||
where z.PointDate != null && z.PointState == "1" && y.RepairRecordId == null
|
||||
&& a.ProjectId == ProjectId
|
||||
select x.NDEItemID).Count();
|
||||
//一次检测返修焊口数
|
||||
int oneCheckRepairJotNum = (from x in db.HJGL_Batch_NDEItem
|
||||
join y in db.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals y.TrustBatchItemId
|
||||
join z in db.HJGL_Batch_PointBatchItem on y.PointBatchItemId equals z.PointBatchItemId
|
||||
join a in db.HJGL_Batch_NDE on x.NDEID equals a.NDEID
|
||||
where z.PointDate != null && z.PointState == "1" && y.RepairRecordId == null && x.CheckResult == "2"
|
||||
&& a.ProjectId == ProjectId
|
||||
select x.NDEItemID).Count();
|
||||
if (oneCheckJotNum > 0)
|
||||
var ndtLists = from x in db.HJGL_FL_NdtList where x.ProjectId == ProjectId select x;
|
||||
////一次检测合格焊口数
|
||||
//int oneCheckJotNum = (from x in db.HJGL_Batch_NDEItem
|
||||
// join y in db.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals y.TrustBatchItemId
|
||||
// join z in db.HJGL_Batch_PointBatchItem on y.PointBatchItemId equals z.PointBatchItemId
|
||||
// join a in db.HJGL_Batch_NDE on x.NDEID equals a.NDEID
|
||||
// where z.PointDate != null && z.PointState == "1" && y.RepairRecordId == null
|
||||
// && a.ProjectId == ProjectId
|
||||
// select x.NDEItemID).Count();
|
||||
////一次检测返修焊口数
|
||||
//int oneCheckRepairJotNum = (from x in db.HJGL_Batch_NDEItem
|
||||
// join y in db.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals y.TrustBatchItemId
|
||||
// join z in db.HJGL_Batch_PointBatchItem on y.PointBatchItemId equals z.PointBatchItemId
|
||||
// join a in db.HJGL_Batch_NDE on x.NDEID equals a.NDEID
|
||||
// where z.PointDate != null && z.PointState == "1" && y.RepairRecordId == null && x.CheckResult == "2"
|
||||
// && a.ProjectId == ProjectId
|
||||
// select x.NDEItemID).Count();
|
||||
if (ndtLists.Count() > 0)
|
||||
{
|
||||
var a = Convert.ToDouble(oneCheckJotNum - oneCheckRepairJotNum);
|
||||
var b = Convert.ToDouble(oneCheckJotNum);
|
||||
result = Convert.ToDouble(decimal.Round(decimal.Parse((a / b * 100).ToString()), 0));
|
||||
decimal a = 0, b = 0;
|
||||
foreach (var item in ndtLists)
|
||||
{
|
||||
a += Funs.GetNewDecimalOrZero(item.OneTimeFilmQualifiedAmount);
|
||||
b += Funs.GetNewDecimalOrZero(item.OneTimeFilmAmount);
|
||||
}
|
||||
if (b > 0)
|
||||
{
|
||||
result = Convert.ToDouble(decimal.Round(decimal.Parse((a / b * 100).ToString()), 2));
|
||||
|
||||
hjallNumber = b.ToString();
|
||||
hjfinishNumber = a.ToString();
|
||||
hjzgl = result.ToString();
|
||||
hjDataValue = (100 - result).ToString();
|
||||
hjallNumber = b.ToString();
|
||||
hjfinishNumber = a.ToString();
|
||||
hjzgl = result.ToString();
|
||||
hjDataValue = (100 - result).ToString();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var data = (from x in db.HJGL_FL_Data where x.ProjectId == ProjectId orderby x.CompileDate descending select x).FirstOrDefault();
|
||||
if(data!=null)
|
||||
{
|
||||
decimal a = Funs.GetNewDecimalOrZero(data.OneTimeFilmQualifiedAmount);
|
||||
decimal b = Funs.GetNewDecimalOrZero(data.OneTimeFilmAmount);
|
||||
if (b > 0)
|
||||
{
|
||||
result = Convert.ToDouble(decimal.Round(decimal.Parse((a / b * 100).ToString()), 2));
|
||||
|
||||
|
||||
hjallNumber = b.ToString();
|
||||
hjfinishNumber = a.ToString();
|
||||
hjzgl = result.ToString();
|
||||
hjDataValue = (100 - result).ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
@ -682,16 +706,16 @@ namespace FineUIPro.Web.common
|
|||
{
|
||||
index++;
|
||||
swgclHtml += "<div class=\"tr1\">";
|
||||
swgclHtml += string.Format("<div class=\"th r-line\" style=\"width: .625rem;\"><p>{0}</p></div>",index);
|
||||
swgclHtml += string.Format("<div class=\"th r-line\" style=\"width: 1rem;\"><p>{0}</p> </div>",item.Name);
|
||||
swgclHtml += string.Format("<div class=\"th r-line\" style=\"width: .8375rem;\"><p>{0}</p> </div>",item.Unit);
|
||||
swgclHtml += string.Format(" <div class=\"th r-line\" style=\"width: .8375rem;\"><p>{0}</p> </div>",item.DesignNum);
|
||||
swgclHtml += string.Format("<div class=\"th r-line\" style=\"width: 2.325rem;\"><p><span class=\"r-line s1\">{0}</span><span class=\"r-line s1\">{1}</span><span class=\"r-line s1\" style=\"border: none;\">{2}</span></p> </div>",item.PlanNum,item.RealNum,item.Rate);
|
||||
swgclHtml += string.Format(" <div class=\"th r-line \" style=\"width: 2.325rem;\"><p><span class=\"r-line s1\">{0}</span><span class=\"r-line s1\">{1}</span><span class=\"r-line s1\" style=\"border: none;\">{2}</span></p> </div>",item.TotalPlanNum,item.TotalRealNum,item.TotalRate);
|
||||
swgclHtml += string.Format("<div class=\"th r-line\" style=\"width: .8375rem;\"><p>{0}</p> </div>",item.SumRate);
|
||||
swgclHtml += string.Format("<div class=\"th r-line\" style=\"width: .625rem;\"><p>{0}</p></div>", index);
|
||||
swgclHtml += string.Format("<div class=\"th r-line\" style=\"width: 1rem;\"><p>{0}</p> </div>", item.Name);
|
||||
swgclHtml += string.Format("<div class=\"th r-line\" style=\"width: .8375rem;\"><p>{0}</p> </div>", item.Unit);
|
||||
swgclHtml += string.Format(" <div class=\"th r-line\" style=\"width: .8375rem;\"><p>{0}</p> </div>", item.DesignNum);
|
||||
swgclHtml += string.Format("<div class=\"th r-line\" style=\"width: 2.325rem;\"><p><span class=\"r-line s1\">{0}</span><span class=\"r-line s1\">{1}</span><span class=\"r-line s1\" style=\"border: none;\">{2}</span></p> </div>", item.PlanNum, item.RealNum, item.Rate);
|
||||
swgclHtml += string.Format(" <div class=\"th r-line \" style=\"width: 2.325rem;\"><p><span class=\"r-line s1\">{0}</span><span class=\"r-line s1\">{1}</span><span class=\"r-line s1\" style=\"border: none;\">{2}</span></p> </div>", item.TotalPlanNum, item.TotalRealNum, item.TotalRate);
|
||||
swgclHtml += string.Format("<div class=\"th r-line\" style=\"width: .8375rem;\"><p>{0}</p> </div>", item.SumRate);
|
||||
swgclHtml += " </div>";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
protected string Two
|
||||
{
|
||||
|
@ -963,14 +987,15 @@ namespace FineUIPro.Web.common
|
|||
item.DataTime.ToString().Replace('/', '-').Split(' ')[0] + "</span></div>";
|
||||
}
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
returnDbHtml = "<div></div>";
|
||||
}
|
||||
this.div_dbsxlist.InnerHtml = returnDbHtml;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 加载关键事项
|
||||
/// </summary>
|
||||
|
@ -1018,20 +1043,20 @@ namespace FineUIPro.Web.common
|
|||
|
||||
List<SqlParameter> listStaticListStr = new List<SqlParameter>();
|
||||
|
||||
listStaticListStr.Add(new SqlParameter("@UserID", null));
|
||||
listStaticListStr.Add(new SqlParameter("@unit", null));
|
||||
listStaticListStr.Add(new SqlParameter("@projectid", this.CurrUser.LoginProjectId));
|
||||
listStaticListStr.Add(new SqlParameter("@CNProfessional_ID", null));
|
||||
listStaticListStr.Add(new SqlParameter("@questionType", null));
|
||||
listStaticListStr.Add(new SqlParameter("@processMan", null)); listStaticListStr.Add(new SqlParameter("@User_Acceptance", null));
|
||||
listStaticListStr.Add(new SqlParameter("@UserID", null));
|
||||
listStaticListStr.Add(new SqlParameter("@unit", null));
|
||||
listStaticListStr.Add(new SqlParameter("@projectid", this.CurrUser.LoginProjectId));
|
||||
listStaticListStr.Add(new SqlParameter("@CNProfessional_ID", null));
|
||||
listStaticListStr.Add(new SqlParameter("@questionType", null));
|
||||
listStaticListStr.Add(new SqlParameter("@processMan", null)); listStaticListStr.Add(new SqlParameter("@User_Acceptance", null));
|
||||
|
||||
|
||||
SqlParameter[] Staticparameter = listStaticListStr.ToArray();
|
||||
DataTable statcitbDataTable = SQLHelper.GetDataTableRunProc("Sp_GJSXStatistic", Staticparameter);
|
||||
var allcount = Funs.GetNewIntOrZero(statcitbDataTable.Rows[0]["allcount"].ToString()) ;
|
||||
var closecount = Funs.GetNewIntOrZero(statcitbDataTable.Rows[0]["closecount"].ToString());
|
||||
var allcount = Funs.GetNewIntOrZero(statcitbDataTable.Rows[0]["allcount"].ToString());
|
||||
var closecount = Funs.GetNewIntOrZero(statcitbDataTable.Rows[0]["closecount"].ToString());
|
||||
gjsxRate = String.Format("{0:N2}", 100.0 * closecount / allcount);
|
||||
gjsxRate = gjsxRate.ToString().Replace("NaN", "0")+"%";
|
||||
gjsxRate = gjsxRate.ToString().Replace("NaN", "0") + "%";
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
|
|
@ -565,30 +565,38 @@ namespace FineUIPro.Web.common
|
|||
List<double> listdata = new List<double>();
|
||||
double result = 0;
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
//一次检测合格焊口数
|
||||
int oneCheckJotNum = (from x in db.HJGL_Batch_NDEItem
|
||||
join y in db.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals y.TrustBatchItemId
|
||||
join z in db.HJGL_Batch_PointBatchItem on y.PointBatchItemId equals z.PointBatchItemId
|
||||
join a in db.HJGL_Batch_NDE on x.NDEID equals a.NDEID
|
||||
where z.PointDate != null && z.PointState == "1" && y.RepairRecordId == null
|
||||
select x.NDEItemID).Count();
|
||||
//一次检测返修焊口数
|
||||
int oneCheckRepairJotNum = (from x in db.HJGL_Batch_NDEItem
|
||||
join y in db.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals y.TrustBatchItemId
|
||||
join z in db.HJGL_Batch_PointBatchItem on y.PointBatchItemId equals z.PointBatchItemId
|
||||
join a in db.HJGL_Batch_NDE on x.NDEID equals a.NDEID
|
||||
where z.PointDate != null && z.PointState == "1" && y.RepairRecordId == null && x.CheckResult == "2"
|
||||
select x.NDEItemID).Count();
|
||||
if (oneCheckJotNum > 0)
|
||||
var ndtLists = from x in db.HJGL_FL_NdtList select x;
|
||||
////一次检测合格焊口数
|
||||
//int oneCheckJotNum = (from x in db.HJGL_Batch_NDEItem
|
||||
// join y in db.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals y.TrustBatchItemId
|
||||
// join z in db.HJGL_Batch_PointBatchItem on y.PointBatchItemId equals z.PointBatchItemId
|
||||
// join a in db.HJGL_Batch_NDE on x.NDEID equals a.NDEID
|
||||
// where z.PointDate != null && z.PointState == "1" && y.RepairRecordId == null
|
||||
// select x.NDEItemID).Count();
|
||||
////一次检测返修焊口数
|
||||
//int oneCheckRepairJotNum = (from x in db.HJGL_Batch_NDEItem
|
||||
// join y in db.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals y.TrustBatchItemId
|
||||
// join z in db.HJGL_Batch_PointBatchItem on y.PointBatchItemId equals z.PointBatchItemId
|
||||
// join a in db.HJGL_Batch_NDE on x.NDEID equals a.NDEID
|
||||
// where z.PointDate != null && z.PointState == "1" && y.RepairRecordId == null && x.CheckResult == "2"
|
||||
// select x.NDEItemID).Count();
|
||||
if (ndtLists.Count() > 0)
|
||||
{
|
||||
var a = Convert.ToDouble(oneCheckJotNum - oneCheckRepairJotNum);
|
||||
var b = Convert.ToDouble(oneCheckJotNum);
|
||||
result = Convert.ToDouble(decimal.Round(decimal.Parse((a / b * 100).ToString()), 0));
|
||||
decimal a = 0, b = 0;
|
||||
foreach (var item in ndtLists)
|
||||
{
|
||||
a += Funs.GetNewDecimalOrZero(item.OneTimeFilmQualifiedAmount);
|
||||
b += Funs.GetNewDecimalOrZero(item.OneTimeFilmAmount);
|
||||
}
|
||||
if (b > 0)
|
||||
{
|
||||
result = Convert.ToDouble(decimal.Round(decimal.Parse((a / b * 100).ToString()), 2));
|
||||
|
||||
hjallNumber = b.ToString();
|
||||
hjfinishNumber = a.ToString();
|
||||
hjzgl = result.ToString();
|
||||
hjDataValue = (100 - result).ToString();
|
||||
hjallNumber = b.ToString();
|
||||
hjfinishNumber = a.ToString();
|
||||
hjzgl = result.ToString();
|
||||
hjDataValue = (100 - result).ToString();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue