去除静态变量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 WorkHandoverApproveService
{
public static Model.SGGLDB db = Funs.DB;
/// <summary>
/// 获取分页列表
/// </summary>
/// <returns></returns>
public static IEnumerable getListData(string WorkHandoverId)
{
return from x in db.ZHGL_WorkHandoverApprove
var db1 = Funs.DB;
return from x in db1.ZHGL_WorkHandoverApprove
where x.WorkHandoverId == WorkHandoverId && x.ApproveDate != null
orderby x.ApproveDate
select new
{
x.WorkHandoverApproveId,
x.WorkHandoverId,
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,
PersonName = (from y in db.Person_Persons where y.PersonId == x.ApproveMan select y.PersonName).First(),
PersonName = (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_WorkHandoverApprove GetWorkHandoverApproveByWorkHandoverId(string constructionPlanId)
{
return db.ZHGL_WorkHandoverApprove.FirstOrDefault(x => x.WorkHandoverId == constructionPlanId && x.ApproveDate == null);
return Funs.DB.ZHGL_WorkHandoverApprove.FirstOrDefault(x => x.WorkHandoverId == constructionPlanId && x.ApproveDate == null);
}
/// <summary>
/// 修改工作交接审批信息
@@ -117,7 +117,7 @@ namespace BLL
public static Model.ZHGL_WorkHandoverApprove GetComplie(string WorkHandoverId)
{
return db.ZHGL_WorkHandoverApprove.FirstOrDefault(x => x.WorkHandoverId == WorkHandoverId && x.ApproveType == BLL.Const.WorkHandover_Compile);
return Funs.DB.ZHGL_WorkHandoverApprove.FirstOrDefault(x => x.WorkHandoverId == WorkHandoverId && x.ApproveType == BLL.Const.WorkHandover_Compile);
}
public static Model.ZHGL_WorkHandoverApprove GetWorkHandoverApproveById(string WorkHandoverApproveId)
{