去除静态变量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
@@ -1,32 +1,32 @@
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using Model;
namespace BLL
{
public class ConstructionPlanApproveService
{
public static Model.SGGLDB db = Funs.DB;
/// <summary>
/// 获取分页列表
/// </summary>
/// <returns></returns>
public static IEnumerable getListData(string ConstructionPlanId)
{
return from x in db.ZHGL_ConstructionPlanApprove
var db1 = Funs.DB;
return from x in db1.ZHGL_ConstructionPlanApprove
where x.ConstructionPlanId == ConstructionPlanId && x.ApproveDate != null
orderby x.ApproveDate
select new
{
x.ConstructionPlanApproveId,
x.ConstructionPlanId,
ApproveMan = (from y in db.Person_Persons where y.PersonId == x.ApproveMan select y.PersonName).First(),
ApproveMan = (from y in db1.Person_Persons where y.PersonId == x.ApproveMan select y.PersonName).First(),
x.ApproveDate,
x.ApproveIdea,
x.IsAgree,
x.ApproveType,
UserName = (from y in db.Person_Persons where y.PersonId == x.ApproveMan select y.PersonName).First(),
UserName = (from y in db1.Person_Persons where y.PersonId == x.ApproveMan select y.PersonName).First(),
IsAgreeName = x.IsAgree == true ? "同意" : "不同意"
};
}
@@ -95,7 +95,7 @@ namespace BLL
/// <returns>一个总承包商施工计划审批实体</returns>
public static Model.ZHGL_ConstructionPlanApprove GetConstructionPlanApproveByConstructionPlanId(string constructionPlanId)
{
return db.ZHGL_ConstructionPlanApprove.FirstOrDefault(x => x.ConstructionPlanId == constructionPlanId && x.ApproveDate == null);
return Funs.DB.ZHGL_ConstructionPlanApprove.FirstOrDefault(x => x.ConstructionPlanId == constructionPlanId && x.ApproveDate == null);
}
/// <summary>
/// 修改总承包商施工计划审批信息
@@ -117,7 +117,7 @@ namespace BLL
public static Model.ZHGL_ConstructionPlanApprove GetComplie(string ConstructionPlanId)
{
return db.ZHGL_ConstructionPlanApprove.FirstOrDefault(x => x.ConstructionPlanId == ConstructionPlanId && x.ApproveType == BLL.Const.ConstructionPlan_Compile);
return Funs.DB.ZHGL_ConstructionPlanApprove.FirstOrDefault(x => x.ConstructionPlanId == ConstructionPlanId && x.ApproveType == BLL.Const.ConstructionPlan_Compile);
}
public static Model.ZHGL_ConstructionPlanApprove GetConstructionPlanApproveById(string ConstructionPlanApproveId)
{