焊接达因数、完成达因数汇总逻辑优化
This commit is contained in:
@@ -259,7 +259,8 @@ namespace BLL
|
||||
{
|
||||
var db = Funs.DB;
|
||||
|
||||
var projectids = ProjectService.GetProjectWorkList().Select(x => x.ProjectId).ToList();
|
||||
var projectids = HJGLData_HJGLService.BeUnderConstructionList;
|
||||
//var projectids = ProjectService.GetProjectWorkList().Select(x => x.ProjectId).ToList();
|
||||
var thisUnitId = string.Empty;
|
||||
var thisUnit = CommonService.GetIsThisUnit();
|
||||
if (thisUnit != null) thisUnitId = thisUnit.UnitId;
|
||||
|
||||
@@ -411,21 +411,6 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static int GetTotalFilmNum(string projectid)
|
||||
{
|
||||
//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
|
||||
// where y.ProjectId == projectid
|
||||
// select x.CHT_TotalFilm).ToList().Sum());
|
||||
|
||||
//int result = 0;
|
||||
//var getD2 = (from x in Funs.DB.HJGL_FL_Data
|
||||
// where x.ProjectId == projectid
|
||||
// orderby x.CompileDate descending
|
||||
// select x).FirstOrDefault();
|
||||
//if (getD2 != null)
|
||||
//{
|
||||
// result = Funs.GetNewIntOrZero(getD2.OneTimeFilmAmount.Split('.')[0]);
|
||||
//}
|
||||
|
||||
int result = Convert.ToInt32((from x in Funs.DB.ProcessControl_NondestructiveTest_New
|
||||
where x.ProjectId == projectid && x.ProfessionalName == "工艺管道"
|
||||
orderby x.CreateDate descending
|
||||
@@ -439,20 +424,6 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static int GetOKFilmNum(string projectid)
|
||||
{
|
||||
//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
|
||||
// where
|
||||
// select x.CHT_PassFilm).ToList().Sum());
|
||||
//int result = 0;
|
||||
//var getD2 = (from x in Funs.DB.HJGL_FL_Data
|
||||
// where x.ProjectId == projectid
|
||||
// orderby x.CompileDate descending
|
||||
// select x).FirstOrDefault();
|
||||
//if (getD2 != null)
|
||||
//{
|
||||
// result = Funs.GetNewIntOrZero(getD2.OneTimeFilmQualifiedAmount.Split('.')[0]);
|
||||
//}
|
||||
|
||||
int result = 0;
|
||||
var ndt = (from x in db.ProcessControl_NondestructiveTest_New where x.ProjectId == projectid && x.ProfessionalName == "工艺管道" orderby x.CreateDate descending select x).FirstOrDefault();
|
||||
if (ndt != null)
|
||||
|
||||
Reference in New Issue
Block a user