2023-10-12

This commit is contained in:
2023-10-12 19:33:22 +08:00
parent 7d87e48818
commit d1c7977da2
24 changed files with 688 additions and 237 deletions
+55 -8
View File
@@ -1,4 +1,8 @@
using BLL;
using FineUIPro.Web.BaseInfo;
using FineUIPro.Web.DataShow;
using FineUIPro.Web.SysManage;
using Model;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
@@ -99,7 +103,7 @@ namespace FineUIPro.Web.common
//施工审批量
int sgspl = Funs.DB.Solution_CQMSConstructSolution.Where(x => x.ProjectId == ProjectId && x.State == "1").Count();
div_sgfaSpl.InnerHtml = sgspl.ToString();
GetJD();
//质量共检
getZlgj();
@@ -303,6 +307,7 @@ namespace FineUIPro.Web.common
{
string url = getImag.AttachUrl.Replace('\\', '/');
var UrlList = Funs.GetStrListByStr(url, ',');
bool isHiddDefaultImg = false;
foreach (var item in UrlList)
{
if (!string.IsNullOrEmpty(item))
@@ -312,13 +317,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,"/"));
//this.divProjectImgs.Src = divProjectImg;
}
}
}
divProjectImg= divProjectImg.Replace("<div class=\"swiper-slide\"><img src=\"./imags/16.png\"></div>", "");
/*string firtstUrl = Funs.GetStrListByStr(url, ',').FirstOrDefault();
if (!string.IsNullOrEmpty(firtstUrl))
{
@@ -487,7 +494,7 @@ namespace FineUIPro.Web.common
#region
protected int getTodayCount()
{
var result = Funs.DB.View_License_LicenseManager.Where(x => x.ProjectId == ProjectId && x.CompileDate.Value.Date == DateTime.Now.Date).ToList().Count;
var result = Funs.DB.View_License_LicenseManager.Where(x => x.ProjectId == ProjectId && x.WorkStatesStr == "作业中").ToList().Count;
return result;
}
protected int getAllCount()
@@ -501,26 +508,26 @@ namespace FineUIPro.Web.common
/// <returns></returns>
protected int getWrokCount0()
{
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 == "动火作业许可证" &&x.WorkStatesStr=="作业中").ToList().Count;
return result;
}
protected int getWrokCount1()
{
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 == "高处作业许可证" && x.WorkStatesStr == "作业中").ToList().Count;
return result;
}
protected int getWrokCount2()
{
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 == "吊装作业许可证" && x.WorkStatesStr == "作业中").ToList().Count;
return result;
}
protected int getWrokCount3()
{
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 != "吊装作业许可证" && x.WorkStatesStr == "作业中").ToList().Count;
return result;
}
#endregion
@@ -548,7 +555,7 @@ namespace FineUIPro.Web.common
select x).Count();
var zgl = String.Format("{0:N2}", 100.0 * num2 / (num2 + num3));
zlzgl = zgl.ToString();
zlzgl = zgl.ToString().Replace("NaN", "0") ;
zgzglDataValue = (100 - (100.0 * num2 / (num2 + num3))).ToString();
}
#endregion
@@ -639,6 +646,31 @@ namespace FineUIPro.Web.common
#endregion
#region 线
protected string swgclHtml;
protected void GetJD()
{
int index = 0;
var result = Funs.DB.View_JDGL_QuantityCompletion
.Where(qc => qc.ProjectId == this.CurrUser.LoginProjectId)
.OrderBy(qc => qc.SortIndex)
.ThenBy(qc => qc.Name)
.ToList();
foreach (var item in result)
{
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 += " </div>";
}
}
protected string Two
{
get
@@ -866,6 +898,7 @@ namespace FineUIPro.Web.common
#region
protected string gjsxRate = "0";
protected void getGztm()
{
//div_dbsxlist.InnerHtml = "";
@@ -961,8 +994,22 @@ namespace FineUIPro.Web.common
}
this.div_gjsxlist.InnerHtml = returnDbHtml;
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));
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());
gjsxRate = String.Format("{0:N2}", 100.0 * closecount / allcount);
gjsxRate = gjsxRate.ToString().Replace("NaN", "0")+"%";
}
#endregion