去除静态变量Funs.DB
This commit is contained in:
@@ -2,12 +2,12 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Model;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public class JointCheckApproveService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
/// <summary>
|
||||
/// 根据质量共检编号删除对应的所有质量共检审批信息
|
||||
/// </summary>
|
||||
@@ -55,7 +55,7 @@ namespace BLL
|
||||
{
|
||||
x.JointCheckApproveId,
|
||||
x.JointCheckId,
|
||||
ApproveMan = x.ApproveMan == null ? "" : (from y in db.Person_Persons where y.PersonId == x.ApproveMan select y.PersonName).First(),
|
||||
ApproveMan = x.ApproveMan == null ? "" : (from y in Funs.DB.Person_Persons where y.PersonId == x.ApproveMan select y.PersonName).First(),
|
||||
x.ApproveDate,
|
||||
x.IsAgree,
|
||||
x.ApproveIdea,
|
||||
@@ -99,7 +99,7 @@ namespace BLL
|
||||
{
|
||||
x.JointCheckApproveId,
|
||||
x.JointCheckId,
|
||||
ApproveMan = (from y in db.Person_Persons where y.PersonId == x.ApproveMan select y.PersonName).First(),
|
||||
ApproveMan = (from y in Funs.DB.Person_Persons where y.PersonId == x.ApproveMan select y.PersonName).First(),
|
||||
x.ApproveDate,
|
||||
x.IsAgree,
|
||||
x.ApproveIdea,
|
||||
@@ -176,7 +176,7 @@ namespace BLL
|
||||
}
|
||||
public static Model.Check_JointCheckApprove GetSee(string JointCheckId, string userId)
|
||||
{
|
||||
return db.Check_JointCheckApprove.FirstOrDefault(x => x.JointCheckId == JointCheckId && x.ApproveType == "S" && x.ApproveMan == userId && x.ApproveDate == null);
|
||||
return Funs.DB.Check_JointCheckApprove.FirstOrDefault(x => x.JointCheckId == JointCheckId && x.ApproveType == "S" && x.ApproveMan == userId && x.ApproveDate == null);
|
||||
}
|
||||
public static void See(string JointCheckId, string userId)
|
||||
{
|
||||
@@ -227,7 +227,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static Model.Check_JointCheckApprove GetAudit1(string JointCheckId, string jointCheckDetailId)
|
||||
{
|
||||
return db.Check_JointCheckApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.JointCheckId == JointCheckId && x.ApproveType == BLL.Const.JointCheck_Audit1 && x.JointCheckDetailId == jointCheckDetailId);
|
||||
return Funs.DB.Check_JointCheckApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.JointCheckId == JointCheckId && x.ApproveType == BLL.Const.JointCheck_Audit1 && x.JointCheckDetailId == jointCheckDetailId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -237,7 +237,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static Model.Check_JointCheckApprove GetAudit2(string JointCheckId, string jointCheckDetailId)
|
||||
{
|
||||
return db.Check_JointCheckApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.JointCheckId == JointCheckId && x.ApproveType == BLL.Const.JointCheck_Audit2 && x.JointCheckDetailId == jointCheckDetailId);
|
||||
return Funs.DB.Check_JointCheckApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.JointCheckId == JointCheckId && x.ApproveType == BLL.Const.JointCheck_Audit2 && x.JointCheckDetailId == jointCheckDetailId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -247,7 +247,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static Model.Check_JointCheckApprove GetAudit3(string JointCheckId, string jointCheckDetailId)
|
||||
{
|
||||
return db.Check_JointCheckApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.JointCheckId == JointCheckId && x.ApproveType == BLL.Const.JointCheck_Audit3 && x.JointCheckDetailId == jointCheckDetailId);
|
||||
return Funs.DB.Check_JointCheckApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.JointCheckId == JointCheckId && x.ApproveType == BLL.Const.JointCheck_Audit3 && x.JointCheckDetailId == jointCheckDetailId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -257,7 +257,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static Model.Check_JointCheckApprove GetAudit4(string JointCheckId, string jointCheckDetailId)
|
||||
{
|
||||
return db.Check_JointCheckApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.JointCheckId == JointCheckId && x.ApproveType == BLL.Const.JointCheck_Audit4 && x.JointCheckDetailId == jointCheckDetailId);
|
||||
return Funs.DB.Check_JointCheckApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.JointCheckId == JointCheckId && x.ApproveType == BLL.Const.JointCheck_Audit4 && x.JointCheckDetailId == jointCheckDetailId);
|
||||
}
|
||||
public static List<Model.Check_JointCheckApprove> getListDataByJcidForApi(string JointCheckId, string JointCheckDetailId)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user