全局处理问题:public static Model.SGGLDB db = Funs.DB;

This commit is contained in:
2026-04-23 11:36:49 +08:00
parent 5a38880a14
commit 746cb57619
315 changed files with 641 additions and 449 deletions
@@ -9,7 +9,7 @@ namespace BLL
{
public class JointCheckApproveService
{
public static Model.SGGLDB db = Funs.DB;
/// <summary>
/// 根据质量共检编号删除对应的所有质量共检审批信息
/// </summary>
@@ -29,6 +29,7 @@ namespace BLL
/// <returns></returns>
public static IEnumerable getListData(string JointCheckId)
{
Model.SGGLDB db = Funs.DB;
var approves = (from x in Funs.DB.Check_JointCheckApprove where x.JointCheckId == JointCheckId && x.ApproveDate != null && x.ApproveType != "S" orderby x.ApproveDate select x).ToList();
var approves2 = (from x in Funs.DB.Check_JointCheckApprove where x.JointCheckId == JointCheckId && x.ApproveDate != null && x.ApproveType != "S" orderby x.ApproveDate select x).ToList();
string approveType = string.Empty;
@@ -73,6 +74,7 @@ namespace BLL
/// <returns></returns>
public static IEnumerable listData(string JointCheckId)
{
Model.SGGLDB db = Funs.DB;
var approves = (from x in Funs.DB.Check_JointCheckApprove where x.JointCheckId == JointCheckId && x.ApproveDate != null && x.ApproveType != "S" orderby x.ApproveDate select x).ToList();
var approves2 = (from x in Funs.DB.Check_JointCheckApprove where x.JointCheckId == JointCheckId && x.ApproveDate != null && x.ApproveType != "S" orderby x.ApproveDate select x).ToList();
string approveType = string.Empty;
@@ -178,6 +180,7 @@ namespace BLL
}
public static Model.Check_JointCheckApprove GetSee(string JointCheckId, string userId)
{
Model.SGGLDB db = Funs.DB;
return 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)
@@ -229,6 +232,7 @@ namespace BLL
/// <returns></returns>
public static Model.Check_JointCheckApprove GetAudit1(string JointCheckId, string jointCheckDetailId)
{
Model.SGGLDB db = Funs.DB;
return db.Check_JointCheckApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.JointCheckId == JointCheckId && x.ApproveType == BLL.Const.JointCheck_Audit1 && x.JointCheckDetailId == jointCheckDetailId);
}
@@ -239,6 +243,7 @@ namespace BLL
/// <returns></returns>
public static Model.Check_JointCheckApprove GetAudit2(string JointCheckId, string jointCheckDetailId)
{
Model.SGGLDB db = Funs.DB;
return db.Check_JointCheckApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.JointCheckId == JointCheckId && x.ApproveType == BLL.Const.JointCheck_Audit2 && x.JointCheckDetailId == jointCheckDetailId);
}
@@ -249,6 +254,7 @@ namespace BLL
/// <returns></returns>
public static Model.Check_JointCheckApprove GetAudit3(string JointCheckId, string jointCheckDetailId)
{
Model.SGGLDB db = Funs.DB;
return db.Check_JointCheckApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.JointCheckId == JointCheckId && x.ApproveType == BLL.Const.JointCheck_Audit3 && x.JointCheckDetailId == jointCheckDetailId);
}
@@ -259,6 +265,7 @@ namespace BLL
/// <returns></returns>
public static Model.Check_JointCheckApprove GetAudit4(string JointCheckId, string jointCheckDetailId)
{
Model.SGGLDB db = Funs.DB;
return 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)