去除静态变量Funs.DB

This commit is contained in:
2025-01-07 19:00:48 +08:00
parent 188974fadc
commit 2c1a328bc1
290 changed files with 1205 additions and 1242 deletions
@@ -4,13 +4,12 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections;
using Model;
namespace BLL
{
public class CQMS_TestPlanDetailService
{
public static Model.SGGLDB db = Funs.DB;
/// <summary>
/// 获取焊工考试计划明细列表
/// </summary>
@@ -19,8 +18,9 @@ namespace BLL
/// <returns></returns>
public static IEnumerable getListData(string TestPlanId)
{
return from x in db.Welder_TestPlanDetail
join z in db.Welder_TestPlan on x.TestPlanId equals z.TestPlanId
var db1 = Funs.DB;
return from x in db1.Welder_TestPlanDetail
join z in db1.Welder_TestPlan on x.TestPlanId equals z.TestPlanId
where x.TestPlanId == TestPlanId
select new
{
@@ -32,11 +32,11 @@ namespace BLL
x.IsAppearanceOK,
IsAppearanceOKStr = x.IsAppearanceOK == null ? "" : (x.IsAppearanceOK == true ? "是" : "否"),
x.CheckMan,
CheckManStr = (from y in db.SitePerson_Person where y.ProjectId == z.ProjectId && y.PersonId == x.CheckMan select y.PersonName).First(),
CheckManStr = (from y in db1.SitePerson_Person where y.ProjectId == z.ProjectId && y.PersonId == x.CheckMan select y.PersonName).First(),
x.NDTResult,
NDTResultStr = x.NDTResult == null ? "" : (x.NDTResult == true ? "合格" : "不合格"),
x.CheckUnit,
CheckUnitStr = (from y in db.Base_Unit where y.UnitId == x.CheckUnit select y.UnitName).First(),
CheckUnitStr = (from y in db1.Base_Unit where y.UnitId == x.CheckUnit select y.UnitName).First(),
x.State,
StateStr = x.State == null ? "" : (x.State == true ? "合格" : "不合格"),
};
@@ -50,7 +50,7 @@ namespace BLL
/// <returns></returns>
public static List<string> getPersonIdList(string TestPlanId)
{
return (from x in db.Welder_TestPlanDetail
return (from x in Funs.DB.Welder_TestPlanDetail
where x.TestPlanId == TestPlanId
select x.PersonId).ToList();
}