代码无效引用清理,试压包资料界面看板修改

This commit is contained in:
2025-10-10 14:33:21 +08:00
parent 87fb529521
commit 55b798135c
933 changed files with 5897 additions and 7541 deletions
+7 -8
View File
@@ -2,7 +2,6 @@
using System;
using System.Collections;
using System.Linq;
using Model;
namespace BLL
{
@@ -36,7 +35,7 @@ namespace BLL
/// <param name="endTime"></param>
/// <param name="Grid1"></param>
/// <returns></returns>
public static IEnumerable getDataDWList( string projectId, DateTime? startTime, DateTime? endTime, Grid Grid1)
public static IEnumerable getDataDWList(string projectId, DateTime? startTime, DateTime? endTime, Grid Grid1)
{
IQueryable<Model.Base_Project> getDataList = getDataLists;
if (!string.IsNullOrEmpty(projectId) && projectId != Const._Null)
@@ -82,7 +81,7 @@ namespace BLL
int onesOKCount = getSpotCheckDetail.Where(x => x.IsOnesOK == true).Count(); //一次合格
// this.lbSpotCheck2.Text= okCount.ToString();
return all > 0 ? Math.Round(onesOKCount * 100.0 / (all * 1.0)).ToString() + "%" : "0%";
return all > 0 ? Math.Round(onesOKCount * 100.0 / (all * 1.0)).ToString() + "%" : "0%";
}
/// <summary>
@@ -90,17 +89,17 @@ namespace BLL
/// </summary>
/// <param name="projectId"></param>
/// <returns></returns>
public static string getSpotCheckDataRate(string projectId)
public static string getSpotCheckDataRate(string projectId)
{
var getSpotCheckDetail = from x in Funs.DB.Check_SpotCheckDetail
join y in Funs.DB.Check_SpotCheck on x.SpotCheckCode equals y.SpotCheckCode
where (y.ProjectId == projectId || projectId == null) && y.State == "8"
where (y.ProjectId == projectId || projectId == null) && y.State == "8"
select x;
/// 资料验收合格项目
var getOKSpotCheckDetail = getSpotCheckDetail.Where(x => x.IsOK == true);
int okYSCount = getOKSpotCheckDetail.Count(); //验收合格
int okDateCount = getSpotCheckDetail.Where(x => x.IsDataOK == "1").Count(); //资料合格
return okYSCount > 0 ? Math.Round(okDateCount * 100.0 / (okYSCount * 1.0)).ToString() + "%" : "0%";
return okYSCount > 0 ? Math.Round(okDateCount * 100.0 / (okYSCount * 1.0)).ToString() + "%" : "0%";
}
/// <summary>
@@ -110,7 +109,7 @@ namespace BLL
/// <returns></returns>
public static string getCheckControlStates(string projectId)
{
var getCheck_CheckControl = from x in Funs.DB.Check_CheckControl
var getCheck_CheckControl = from x in Funs.DB.Check_CheckControl
where (x.ProjectId == projectId || projectId == null)
select x;
int allCheckControlCount = getCheck_CheckControl.Count();
@@ -136,7 +135,7 @@ namespace BLL
int allHJCount = getJots.Count();
var getOk = getJots.Where(x => x.CheckResult == "1");
int okHJCount = getOk.Count();
return allHJCount > 0 ? Math.Round(okHJCount * 100.0 / (allHJCount * 1.0)).ToString() + "%" : "0%";
return allHJCount > 0 ? Math.Round(okHJCount * 100.0 / (allHJCount * 1.0)).ToString() + "%" : "0%";
}
}
}
+4 -5
View File
@@ -2,7 +2,6 @@
using System;
using System.Collections;
using System.Linq;
using Model;
namespace BLL
{
@@ -36,7 +35,7 @@ namespace BLL
/// <param name="endTime"></param>
/// <param name="Grid1"></param>
/// <returns></returns>
public static IEnumerable getDataDWList( string projectId, DateTime? startTime, DateTime? endTime, Grid Grid1)
public static IEnumerable getDataDWList(string projectId, DateTime? startTime, DateTime? endTime, Grid Grid1)
{
IQueryable<Model.Base_Project> getDataList = getDataLists;
if (!string.IsNullOrEmpty(projectId) && projectId != Const._Null)
@@ -57,9 +56,9 @@ namespace BLL
x.ProjectId,
x.ProjectName,
x.ProjectCode,
Count1=db1.SitePerson_Person.Where(p=>p.ProjectId == x.ProjectId && p.States == Const.ProjectPersonStates_1).Count(), //人员数量
Count1 = db1.SitePerson_Person.Where(p => p.ProjectId == x.ProjectId && p.States == Const.ProjectPersonStates_1).Count(), //人员数量
Count2 = getProjecctSafeHours(x.ProjectId), //安全人工时
Count3 =db1.EduTrain_TrainRecord.Where(p => p.ProjectId == x.ProjectId && p.States == BLL.Const.State_2).Count(), //安全培训次数
Count3 = db1.EduTrain_TrainRecord.Where(p => p.ProjectId == x.ProjectId && p.States == BLL.Const.State_2).Count(), //安全培训次数
ProblemRate = getProblemRate(x.ProjectId), //安全巡检整改率
};
}
@@ -79,7 +78,7 @@ namespace BLL
if (getPersonInOutNumber != null)
{
count = getPersonInOutNumber.WorkHours ?? 0;
}
}
return count;
}
+6 -7
View File
@@ -2,7 +2,6 @@
using System;
using System.Collections;
using System.Linq;
using Model;
namespace BLL
{
@@ -25,7 +24,7 @@ namespace BLL
/// 定义变量
/// </summary>
private static IQueryable<Model.Base_Project> getDataLists = from x in Funs.DB.Base_Project
select x;
select x;
/// <summary>
/// 合同管理数据仓库
@@ -35,7 +34,7 @@ namespace BLL
/// <param name="endTime"></param>
/// <param name="Grid1"></param>
/// <returns></returns>
public static IEnumerable getDataDWList( string projectId, Grid Grid1)
public static IEnumerable getDataDWList(string projectId, Grid Grid1)
{
var getDataList = from x in Funs.DB.Base_Project select x;
if (!string.IsNullOrEmpty(projectId) && projectId != Const._Null)
@@ -55,7 +54,7 @@ namespace BLL
x.ProjectId,
x.ProjectName,
x.ProjectCode,
Count1= getTotalProfit(x.ProjectId),
Count1 = getTotalProfit(x.ProjectId),
};
}
#endregion
@@ -67,16 +66,16 @@ namespace BLL
if (getContract.Count() > 0)
{
contractAmount = getContract.Sum(x => x.ContractAmount ?? 0);
}
}
decimal estimatedAmount = 0;
var getContractTrack = Funs.DB.PHTGL_ContractTrack.Where(x => x.ProjectId == projectId);
if (getContractTrack.Count() > 0)
{
estimatedAmount = getContractTrack.Sum(x => x.EstimatedAmount ?? 0);
}
}
return estimatedAmount > 0 ? Math.Round(contractAmount / estimatedAmount).ToString() + "%" : "0%";
return estimatedAmount > 0 ? Math.Round(contractAmount / estimatedAmount).ToString() + "%" : "0%";
}
}
-1
View File
@@ -2,7 +2,6 @@
using System;
using System.Collections;
using System.Linq;
using Model;
namespace BLL
{
@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Model;
namespace BLL
{
@@ -1,11 +1,7 @@
using FineUIPro;
using NPOI.SS.Formula.Functions;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Web.Util;
using Model;
namespace BLL
{
@@ -112,7 +108,7 @@ namespace BLL
{
x.WorkPackageId,
x.PackageContent,
Count1 = WBSAnalysisService.getWBSExpertArgumentCount(projectId,x.WorkPackageId),
Count1 = WBSAnalysisService.getWBSExpertArgumentCount(projectId, x.WorkPackageId),
Count2 = WBSAnalysisService.getWBSAccidentCount(projectId, x.WorkPackageId),
Count3 = WBSAnalysisService.getWBSHSEProblemCount(projectId, x.WorkPackageId),
Count4 = WBSAnalysisService.getWBSSpotCheckRate(projectId, x.WorkPackageId),
+16 -19
View File
@@ -1,11 +1,8 @@
using FineUIPro;
using NPOI.SS.Formula.Functions;
using Org.BouncyCastle.Crypto.Tls;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using Model;
namespace BLL
{
@@ -28,7 +25,7 @@ namespace BLL
/// 定义变量
/// </summary>
private static IQueryable<Model.WBS_WorkPackageInit> getDataLists = from x in Funs.DB.WBS_WorkPackageInit
select x;
select x;
/// <summary>
/// 合同管理数据仓库
@@ -39,9 +36,9 @@ namespace BLL
/// <param name="Grid1"></param>
/// <returns></returns>
public static IEnumerable getDataDWList(string workPackageId, Grid Grid1)
{
{
var getDataList = getDataLists;
if (string.IsNullOrEmpty(workPackageId) )
if (string.IsNullOrEmpty(workPackageId))
{
List<Model.WBS_WorkPackageInit> listWork = new List<Model.WBS_WorkPackageInit>();
Model.WBS_WorkPackageInit work1 = new Model.WBS_WorkPackageInit
@@ -85,9 +82,9 @@ namespace BLL
{
x.WorkPackageCode,
x.PackageContent,
Count1= getWBSExpertArgumentCount(null, x.WorkPackageCode),
Count2 = getWBSAccidentCount(null,x.WorkPackageCode),
Count3 = getWBSHSEProblemCount(null, x.WorkPackageCode),
Count1 = getWBSExpertArgumentCount(null, x.WorkPackageCode),
Count2 = getWBSAccidentCount(null, x.WorkPackageCode),
Count3 = getWBSHSEProblemCount(null, x.WorkPackageCode),
Count4 = getWBSSpotCheckRate(null, x.WorkPackageCode),
Count5 = getWBSSpotCheckDataRate(null, x.WorkPackageCode),
Count6 = getWBSCheckControlCount(null, x.WorkPackageCode),
@@ -100,13 +97,13 @@ namespace BLL
/// </summary>
/// <param name="projectId"></param>
/// <returns></returns>
public static int getWBSExpertArgumentCount(string projectId,string workPackageId)
public static int getWBSExpertArgumentCount(string projectId, string workPackageId)
{
var getLargerHazardListItem = from x in Funs.DB.Solution_LargerHazardListItem
join y in Funs.DB.Solution_LargerHazardList on x.LargerHazardListId equals y.LargerHazardListId
where x.WorkPackageId.Contains(workPackageId)
where x.WorkPackageId.Contains(workPackageId)
&& y.States == Const.State_1
select new {x.LargerHazardListItemId,y.LargerHazardListId,y.ProjectId,x.WorkPackageId };
select new { x.LargerHazardListItemId, y.LargerHazardListId, y.ProjectId, x.WorkPackageId };
if (!string.IsNullOrEmpty(projectId))
{
getLargerHazardListItem = getLargerHazardListItem.Where(x => x.ProjectId == projectId);
@@ -121,7 +118,7 @@ namespace BLL
/// <param name="projectId"></param>
/// <returns></returns>
public static int getWBSAccidentCount(string projectId, string workPackageId)
{
{
var getAccidentPersonRecord = from x in Funs.DB.Accident_AccidentPersonRecord
where x.WorkPackageId.Contains(workPackageId)
&& x.States == Const.State_2
@@ -142,7 +139,7 @@ namespace BLL
public static int getWBSHSEProblemCount(string projectId, string workPackageId)
{
var getHazardRegister = from x in Funs.DB.HSSE_Hazard_HazardRegister
where x.States != "4" && x.States != "0"
where x.States != "4" && x.States != "0"
&& x.WorkPackageId.Contains(workPackageId)
select x;
if (!string.IsNullOrEmpty(projectId))
@@ -162,9 +159,9 @@ namespace BLL
{
var getSpotCheckDetail = from x in Funs.DB.Check_SpotCheckDetail
join y in Funs.DB.Check_SpotCheck on x.SpotCheckCode equals y.SpotCheckCode
where x.WorkPackageId.Contains(workPackageId) && (projectId ==null || y.ProjectId == projectId)
where x.WorkPackageId.Contains(workPackageId) && (projectId == null || y.ProjectId == projectId)
&& y.State == "8"
select new { x.SpotCheckCode ,y.ProjectId,x.IsDataOK,x.IsOnesOK};
select new { x.SpotCheckCode, y.ProjectId, x.IsDataOK, x.IsOnesOK };
if (!string.IsNullOrEmpty(projectId))
{
getSpotCheckDetail = getSpotCheckDetail.Where(x => x.ProjectId == projectId);
@@ -186,9 +183,9 @@ namespace BLL
//// 实体验收 资料验收
var getSpotCheckDetail = from x in Funs.DB.Check_SpotCheckDetail
join y in Funs.DB.Check_SpotCheck on x.SpotCheckCode equals y.SpotCheckCode
where x.WorkPackageId.Contains(workPackageId)
where x.WorkPackageId.Contains(workPackageId)
&& y.State == "8"
select new { x.SpotCheckCode, y.ProjectId, x.IsDataOK, x.IsOnesOK,x.IsOK };
select new { x.SpotCheckCode, y.ProjectId, x.IsDataOK, x.IsOnesOK, x.IsOK };
if (!string.IsNullOrEmpty(projectId))
{
getSpotCheckDetail = getSpotCheckDetail.Where(x => x.ProjectId == projectId);
@@ -209,7 +206,7 @@ namespace BLL
public static int getWBSCheckControlCount(string projectId, string workPackageId)
{
var getCheck_CheckControl = from x in Funs.DB.Check_CheckControl
where x.WorkPackageId.Contains(workPackageId)
where x.WorkPackageId.Contains(workPackageId)
select x;
if (!string.IsNullOrEmpty(projectId))
{