fix:项目级
This commit is contained in:
@@ -477,7 +477,7 @@ namespace FineUIPro.Web.common
|
||||
{
|
||||
return await Task.Run(() =>
|
||||
{
|
||||
var result = Project_HSSEData_HSSEService.GetFinishedNum(ProjectId);
|
||||
var result = Project_HSSEData_HSSEService.GetCompletedNum(ProjectId);
|
||||
return result;
|
||||
});
|
||||
}
|
||||
@@ -555,7 +555,7 @@ namespace FineUIPro.Web.common
|
||||
{
|
||||
return await Task.Run(() =>
|
||||
{
|
||||
var result = Project_HSSEData_HSSEService.GetSuperFinishedNum(ProjectId);
|
||||
var result = Project_HSSEData_HSSEService.GetSuperCompletedNum(ProjectId);
|
||||
return result;
|
||||
});
|
||||
}
|
||||
@@ -903,25 +903,62 @@ namespace FineUIPro.Web.common
|
||||
List<double> listdata = new List<double>();
|
||||
double result = 0;
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
// var ndtList =
|
||||
// (from x in db.ProcessControl_NondestructiveTest_New
|
||||
// where x.ProfessionalName == "工艺管道" && x.ProjectId == ProjectId
|
||||
// orderby x.CreateDate descending
|
||||
// select x).FirstOrDefault();
|
||||
// decimal a = 0, b = 0;
|
||||
// if (ndtList != null)
|
||||
// {
|
||||
// if (ndtList.TotalQuantity.HasValue)
|
||||
// {
|
||||
// a += Math.Floor(ndtList.TotalQuantity.Value * Funs.GetNewDecimalOrZero(ndtList.TotalRate) /
|
||||
// 100);
|
||||
// b += ndtList.TotalQuantity.Value;
|
||||
// }
|
||||
//
|
||||
// if (!string.IsNullOrEmpty(ndtList.TotalRate))
|
||||
// {
|
||||
// result = Convert.ToDouble(ndtList.TotalRate);
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// var hjglData =
|
||||
// (from x in db.HJGL_FL_Data
|
||||
// where x.ProjectId == ProjectId
|
||||
// orderby x.CompileDate descending
|
||||
// select x).FirstOrDefault();
|
||||
// if (hjglData != null)
|
||||
// {
|
||||
// a = Funs.GetNewDecimalOrZero(hjglData.OneTimeFilmQualifiedAmount);
|
||||
// b = Funs.GetNewDecimalOrZero(hjglData.OneTimeFilmAmount);
|
||||
// if (a > 0 && b > 0)
|
||||
// {
|
||||
// result = Convert.ToDouble(Convert.ToDecimal(100.0) * b / a);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
var ndtList =
|
||||
(from x in db.ProcessControl_NondestructiveTest_New
|
||||
where x.ProfessionalName == "工艺管道" && x.ProjectId == ProjectId
|
||||
orderby x.CreateDate descending
|
||||
select x).FirstOrDefault();
|
||||
where x.ProjectId == ProjectId
|
||||
select x).ToList();
|
||||
decimal a = 0, b = 0;
|
||||
if (ndtList != null)
|
||||
if (ndtList.Count > 0)
|
||||
{
|
||||
if (ndtList.TotalQuantity.HasValue)
|
||||
foreach (var item in ndtList)
|
||||
{
|
||||
a += Math.Floor(ndtList.TotalQuantity.Value * Funs.GetNewDecimalOrZero(ndtList.TotalRate) /
|
||||
100);
|
||||
b += ndtList.TotalQuantity.Value;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(ndtList.TotalRate))
|
||||
{
|
||||
result = Convert.ToDouble(ndtList.TotalRate);
|
||||
if (item.TotalQuantity.HasValue)
|
||||
{
|
||||
a += Math.Floor(item.TotalQuantity.Value * Funs.GetNewDecimalOrZero(item.TotalRate) /
|
||||
100);
|
||||
b += item.TotalQuantity.Value;
|
||||
}
|
||||
|
||||
}
|
||||
result = Convert.ToDouble(Convert.ToDecimal(100.0) * b / a);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -940,7 +977,8 @@ namespace FineUIPro.Web.common
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (b > 0)
|
||||
{
|
||||
hjallNumber = b.ToString();
|
||||
@@ -1619,7 +1657,7 @@ where qc.QuantityCompletionId=(select top 1 QuantityCompletionId from[JDGL_Quant
|
||||
|
||||
SqlParameter[] Staticparameter = listStaticListStr.ToArray();
|
||||
DataTable statcitbDataTable = SQLHelper.GetDataTableRunProc("Sp_GJSXStatistic", Staticparameter);
|
||||
var list = from x in Funs.DB.GJSX where x.ProjectId == this.CurrUser.LoginProjectId select x;
|
||||
var list = from x in Funs.DB.GJSX where x.ProjectId == this.CurrUser.LoginProjectId && x.State!="1" select x;
|
||||
var allcount = list.Count(x => x.State == "0") + list.Count(x => x.State != "0" && x.CompleteDate < DateTime.Now);
|
||||
var closecount = list.Count(x => x.State == "0");
|
||||
gjsxRate = String.Format("{0:N2}", 100.0 * closecount / allcount);
|
||||
@@ -1709,7 +1747,7 @@ where qc.QuantityCompletionId=(select top 1 QuantityCompletionId from[JDGL_Quant
|
||||
}
|
||||
|
||||
//设备材料
|
||||
var SbclList = Funs.DB.CLGL_ContractListSum.Where(x => x.C1 == "设备" && x.ProjectId == pid);
|
||||
var SbclList = Funs.DB.CLGL_ContractListSum.Where(x => x.C1 == "管道" && x.ProjectId == pid);
|
||||
foreach (var item in SbclList)
|
||||
{
|
||||
sbclHtml += "<div class=\"row\">";
|
||||
|
||||
Reference in New Issue
Block a user