去除静态变量Funs.DB
This commit is contained in:
@@ -2,12 +2,12 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using Model;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public class CheckControlApproveService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
/// <summary>
|
||||
/// 获取质量巡检模板列表
|
||||
/// </summary>
|
||||
@@ -16,14 +16,15 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static DataTable getListData(string CheckControlCode)
|
||||
{
|
||||
var res = from x in db.Check_CheckControlApprove
|
||||
var db1 = Funs.DB;
|
||||
var res = from x in db1.Check_CheckControlApprove
|
||||
where x.CheckControlCode == CheckControlCode && x.ApproveDate != null && x.ApproveType != "S"
|
||||
orderby x.ApproveDate
|
||||
select new
|
||||
{
|
||||
x.CheckControlApproveId,
|
||||
x.CheckControlCode,
|
||||
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.IsAgree,
|
||||
x.ApproveIdea,
|
||||
@@ -77,7 +78,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static Model.Check_CheckControlApprove GetSee(string CheckControlCode, string userId)
|
||||
{
|
||||
return db.Check_CheckControlApprove.FirstOrDefault(x => x.CheckControlCode == CheckControlCode && x.ApproveType == "S" && x.ApproveMan == userId && x.ApproveDate == null);
|
||||
return Funs.DB.Check_CheckControlApprove.FirstOrDefault(x => x.CheckControlCode == CheckControlCode && x.ApproveType == "S" && x.ApproveMan == userId && x.ApproveDate == null);
|
||||
}
|
||||
public static void See(string CheckControlCode, string userId)
|
||||
{
|
||||
@@ -98,7 +99,7 @@ namespace BLL
|
||||
/// <returns>一个质量巡检审批实体</returns>
|
||||
public static Model.Check_CheckControlApprove GetCheckControlApproveByCheckControlId(string CheckControlCode)
|
||||
{
|
||||
return db.Check_CheckControlApprove.FirstOrDefault(x => x.CheckControlCode == CheckControlCode && x.ApproveType != "S" && x.ApproveDate == null);
|
||||
return Funs.DB.Check_CheckControlApprove.FirstOrDefault(x => x.CheckControlCode == CheckControlCode && x.ApproveType != "S" && x.ApproveDate == null);
|
||||
}
|
||||
/// <summary>
|
||||
/// 修改质量巡检审批信息
|
||||
@@ -163,7 +164,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static Model.Check_CheckControlApprove GetAudit1(string CheckControlCode)
|
||||
{
|
||||
return db.Check_CheckControlApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.CheckControlCode == CheckControlCode && x.ApproveType == BLL.Const.CheckControl_Audit1);
|
||||
return Funs.DB.Check_CheckControlApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.CheckControlCode == CheckControlCode && x.ApproveType == BLL.Const.CheckControl_Audit1);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -173,7 +174,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static Model.Check_CheckControlApprove GetAudit2(string CheckControlCode)
|
||||
{
|
||||
return db.Check_CheckControlApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.CheckControlCode == CheckControlCode && x.ApproveType == BLL.Const.CheckControl_Audit2);
|
||||
return Funs.DB.Check_CheckControlApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.CheckControlCode == CheckControlCode && x.ApproveType == BLL.Const.CheckControl_Audit2);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -183,7 +184,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static Model.Check_CheckControlApprove GetAudit3(string CheckControlCode)
|
||||
{
|
||||
return db.Check_CheckControlApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.CheckControlCode == CheckControlCode && x.ApproveType == BLL.Const.CheckControl_Audit3);
|
||||
return Funs.DB.Check_CheckControlApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.CheckControlCode == CheckControlCode && x.ApproveType == BLL.Const.CheckControl_Audit3);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -193,7 +194,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static Model.Check_CheckControlApprove GetAudit4(string CheckControlCode)
|
||||
{
|
||||
return db.Check_CheckControlApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.CheckControlCode == CheckControlCode && x.ApproveType == BLL.Const.CheckControl_Audit4);
|
||||
return Funs.DB.Check_CheckControlApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.CheckControlCode == CheckControlCode && x.ApproveType == BLL.Const.CheckControl_Audit4);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -203,12 +204,12 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static Model.Check_CheckControlApprove GetAudit5(string CheckControlCode)
|
||||
{
|
||||
return db.Check_CheckControlApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.CheckControlCode == CheckControlCode && x.ApproveType == BLL.Const.CheckControl_Audit5);
|
||||
return Funs.DB.Check_CheckControlApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.CheckControlCode == CheckControlCode && x.ApproveType == BLL.Const.CheckControl_Audit5);
|
||||
}
|
||||
|
||||
public static Model.Check_CheckControlApprove GetComplie(string CheckControlCode)
|
||||
{
|
||||
return db.Check_CheckControlApprove.FirstOrDefault(x => x.CheckControlCode == CheckControlCode && x.ApproveType == BLL.Const.CheckControl_Compile);
|
||||
return Funs.DB.Check_CheckControlApprove.FirstOrDefault(x => x.CheckControlCode == CheckControlCode && x.ApproveType == BLL.Const.CheckControl_Compile);
|
||||
}
|
||||
public static List<Model.Check_CheckControlApprove> GetListDataByCodeForApi(string code)
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace BLL
|
||||
{
|
||||
public class CheckControlService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据质量检查与控制Id删除一个质量检查与控制信息
|
||||
/// </summary>
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Model;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public class CheckEquipmentApproveService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 获取设计变更模板列表
|
||||
/// </summary>
|
||||
@@ -16,14 +15,15 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static IEnumerable getListData(string CheckEquipmentId)
|
||||
{
|
||||
return from x in db.Check_CheckEquipmentApprove
|
||||
var db1 = Funs.DB;
|
||||
return from x in db1.Check_CheckEquipmentApprove
|
||||
where x.CheckEquipmentId == CheckEquipmentId && x.ApproveDate != null
|
||||
orderby x.ApproveDate
|
||||
select new
|
||||
{
|
||||
x.CheckEquipmentApproveId,
|
||||
x.CheckEquipmentId,
|
||||
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.IsAgree,
|
||||
x.ApproveIdea,
|
||||
@@ -38,7 +38,7 @@ namespace BLL
|
||||
/// <returns>一个设计变更审批实体</returns>
|
||||
public static Model.Check_CheckEquipmentApprove GetCheckEquipmentApproveByCheckEquipmentId(string CheckEquipmentId)
|
||||
{
|
||||
return db.Check_CheckEquipmentApprove.FirstOrDefault(x => x.CheckEquipmentId == CheckEquipmentId && x.ApproveDate == null);
|
||||
return Funs.DB.Check_CheckEquipmentApprove.FirstOrDefault(x => x.CheckEquipmentId == CheckEquipmentId && x.ApproveDate == null);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -48,17 +48,17 @@ namespace BLL
|
||||
/// <returns>一个设计变更审批实体</returns>
|
||||
public static Model.Check_CheckEquipmentApprove GetCheckEquipmentApproveByApproveId(string approveId)
|
||||
{
|
||||
return db.Check_CheckEquipmentApprove.FirstOrDefault(x => x.CheckEquipmentApproveId == approveId);
|
||||
return Funs.DB.Check_CheckEquipmentApprove.FirstOrDefault(x => x.CheckEquipmentApproveId == approveId);
|
||||
}
|
||||
|
||||
public static Model.Check_CheckEquipmentApprove GetComplie(string CheckEquipmentId)
|
||||
{
|
||||
return db.Check_CheckEquipmentApprove.FirstOrDefault(x => x.CheckEquipmentId == CheckEquipmentId && x.ApproveType == BLL.Const.CheckEquipment_Compile);
|
||||
return Funs.DB.Check_CheckEquipmentApprove.FirstOrDefault(x => x.CheckEquipmentId == CheckEquipmentId && x.ApproveType == BLL.Const.CheckEquipment_Compile);
|
||||
}
|
||||
|
||||
public static Model.Check_CheckEquipmentApprove GetApprove(string CheckEquipmentId)
|
||||
{
|
||||
return db.Check_CheckEquipmentApprove.FirstOrDefault(x => x.CheckEquipmentId == CheckEquipmentId && x.ApproveType == BLL.Const.CheckEquipment_Approve);
|
||||
return Funs.DB.Check_CheckEquipmentApprove.FirstOrDefault(x => x.CheckEquipmentId == CheckEquipmentId && x.ApproveType == BLL.Const.CheckEquipment_Approve);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -68,7 +68,7 @@ namespace BLL
|
||||
/// <returns>设计变更审批集合</returns>
|
||||
public static List<Model.Check_CheckEquipmentApprove> GetCheckEquipmentApprovesByCheckEquipmentId(string CheckEquipmentId)
|
||||
{
|
||||
return (from x in db.Check_CheckEquipmentApprove where x.CheckEquipmentId == CheckEquipmentId select x).ToList();
|
||||
return (from x in Funs.DB.Check_CheckEquipmentApprove where x.CheckEquipmentId == CheckEquipmentId select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -187,14 +187,15 @@ namespace BLL
|
||||
}
|
||||
public static List<Model.Check_CheckEquipmentApprove> getListDataByEid(string CheckEquipmentId)
|
||||
{
|
||||
var q = from x in db.Check_CheckEquipmentApprove
|
||||
var db1 = Funs.DB;
|
||||
var q = from x in db1.Check_CheckEquipmentApprove
|
||||
where x.CheckEquipmentId == CheckEquipmentId && x.ApproveDate != null && x.ApproveType != "S"
|
||||
orderby x.ApproveDate
|
||||
select new
|
||||
{
|
||||
x.CheckEquipmentApproveId,
|
||||
x.CheckEquipmentId,
|
||||
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.IsAgree,
|
||||
x.ApproveIdea,
|
||||
|
||||
@@ -3,13 +3,12 @@ using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web.UI.WebControls;
|
||||
using Model;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public class CheckEquipmentService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 记录数
|
||||
/// </summary>
|
||||
@@ -22,7 +21,7 @@ namespace BLL
|
||||
/// <summary>
|
||||
/// 定义变量
|
||||
/// </summary>
|
||||
private static IQueryable<Model.Check_CheckEquipment> qq = from x in db.Check_CheckEquipment orderby x.CompileDate descending select x;
|
||||
private static IQueryable<Model.Check_CheckEquipment> qq = from x in Funs.DB.Check_CheckEquipment orderby x.CompileDate descending select x;
|
||||
|
||||
/// <summary>
|
||||
/// 获取分页列表
|
||||
@@ -60,12 +59,13 @@ namespace BLL
|
||||
return new object[] { "" };
|
||||
}
|
||||
|
||||
var db1 = Funs.DB;
|
||||
return from x in q.Skip(startRowIndex).Take(maximumRows)
|
||||
select new
|
||||
{
|
||||
x.CheckEquipmentId,
|
||||
x.ProjectId,
|
||||
UserUnit = (from y in db.Base_Unit where y.UnitId == x.UserUnitId select y.UnitName).First(),
|
||||
UserUnit = (from y in db1.Base_Unit where y.UnitId == x.UserUnitId select y.UnitName).First(),
|
||||
x.EquipmentName,
|
||||
x.Format,
|
||||
x.SetAccuracyGrade,
|
||||
@@ -75,7 +75,7 @@ namespace BLL
|
||||
IsIdentification = x.IsIdentification == true ? "有" : "没有",
|
||||
IsCheckCertificate = x.IsCheckCertificate == true ? "有" : "没有",
|
||||
x.AttachUrl,
|
||||
CompileMan = (from y in db.Person_Persons where y.PersonId == x.CompileMan select y.PersonName).First(),
|
||||
CompileMan = (from y in db1.Person_Persons where y.PersonId == x.CompileMan select y.PersonName).First(),
|
||||
x.CompileDate,
|
||||
x.State,
|
||||
};
|
||||
|
||||
@@ -4,6 +4,7 @@ using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Model;
|
||||
|
||||
|
||||
namespace BLL
|
||||
@@ -11,9 +12,6 @@ namespace BLL
|
||||
|
||||
public static class CheckMaterialacceptanceService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
|
||||
#region 获取列表
|
||||
/// <summary>
|
||||
/// 记录数
|
||||
@@ -25,7 +23,7 @@ namespace BLL
|
||||
}
|
||||
public static List<Model.Check_MaterialAcceptance> GetCheck_MaterialAcceptanceByModle(Model.Check_MaterialAcceptance table)
|
||||
{
|
||||
var q = from x in db.Check_MaterialAcceptance
|
||||
var q = from x in Funs.DB.Check_MaterialAcceptance
|
||||
where
|
||||
(string.IsNullOrEmpty(table.MaterialAcceptanceId) || x.MaterialAcceptanceId.Contains(table.MaterialAcceptanceId)) &&
|
||||
(string.IsNullOrEmpty(table.ProjectId) || x.ProjectId.Contains(table.ProjectId)) &&
|
||||
@@ -73,7 +71,7 @@ namespace BLL
|
||||
|
||||
public static Model.Check_MaterialAcceptance GetCheck_MaterialAcceptanceById(string MaterialAcceptanceId)
|
||||
{
|
||||
return db.Check_MaterialAcceptance.FirstOrDefault(x => x.MaterialAcceptanceId == MaterialAcceptanceId);
|
||||
return Funs.DB.Check_MaterialAcceptance.FirstOrDefault(x => x.MaterialAcceptanceId == MaterialAcceptanceId);
|
||||
}
|
||||
|
||||
|
||||
@@ -91,22 +89,23 @@ namespace BLL
|
||||
State = newtable.State,
|
||||
FilePath = newtable.FilePath,
|
||||
};
|
||||
db.Check_MaterialAcceptance.InsertOnSubmit(table);
|
||||
db.SubmitChanges();
|
||||
var db1 = Funs.DB;
|
||||
db1.Check_MaterialAcceptance.InsertOnSubmit(table);
|
||||
db1.SubmitChanges();
|
||||
}
|
||||
|
||||
public static void AddBulkCheck_MaterialAcceptance(List<Model.Check_MaterialAcceptance> newtables)
|
||||
{
|
||||
|
||||
db.Check_MaterialAcceptance.InsertAllOnSubmit(newtables);
|
||||
db.SubmitChanges();
|
||||
var db1 = Funs.DB;
|
||||
db1.Check_MaterialAcceptance.InsertAllOnSubmit(newtables);
|
||||
db1.SubmitChanges();
|
||||
}
|
||||
|
||||
|
||||
public static void UpdateCheck_MaterialAcceptance(Model.Check_MaterialAcceptance newtable)
|
||||
{
|
||||
|
||||
Model.Check_MaterialAcceptance table = db.Check_MaterialAcceptance.FirstOrDefault(x => x.MaterialAcceptanceId == newtable.MaterialAcceptanceId);
|
||||
var db1 = Funs.DB;
|
||||
Model.Check_MaterialAcceptance table = db1.Check_MaterialAcceptance.FirstOrDefault(x => x.MaterialAcceptanceId == newtable.MaterialAcceptanceId);
|
||||
if (table != null)
|
||||
{
|
||||
table.MaterialAcceptanceId = newtable.MaterialAcceptanceId;
|
||||
@@ -117,28 +116,29 @@ namespace BLL
|
||||
table.CompileDate = newtable.CompileDate;
|
||||
table.State = newtable.State;
|
||||
table.FilePath = newtable.FilePath;
|
||||
db.SubmitChanges();
|
||||
db1.SubmitChanges();
|
||||
}
|
||||
|
||||
}
|
||||
public static void DeleteCheck_MaterialAcceptanceById(string MaterialAcceptanceId)
|
||||
{
|
||||
|
||||
Model.Check_MaterialAcceptance table = db.Check_MaterialAcceptance.FirstOrDefault(x => x.MaterialAcceptanceId == MaterialAcceptanceId);
|
||||
var db1 = Funs.DB;
|
||||
Model.Check_MaterialAcceptance table = db1.Check_MaterialAcceptance.FirstOrDefault(x => x.MaterialAcceptanceId == MaterialAcceptanceId);
|
||||
if (table != null)
|
||||
{
|
||||
db.Check_MaterialAcceptance.DeleteOnSubmit(table);
|
||||
db.SubmitChanges();
|
||||
db1.Check_MaterialAcceptance.DeleteOnSubmit(table);
|
||||
db1.SubmitChanges();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void DeleteALLCheck_MaterialAcceptance()
|
||||
{
|
||||
if (db.Check_MaterialAcceptance != null)
|
||||
var db1 = Funs.DB;
|
||||
if (db1.Check_MaterialAcceptance != null)
|
||||
{
|
||||
db.Check_MaterialAcceptance.DeleteAllOnSubmit(db.Check_MaterialAcceptance);
|
||||
db.SubmitChanges();
|
||||
db1.Check_MaterialAcceptance.DeleteAllOnSubmit(db1.Check_MaterialAcceptance);
|
||||
db1.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Linq;
|
||||
using Model;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public class CheckMonthService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 记录数
|
||||
/// </summary>
|
||||
@@ -20,7 +19,7 @@ namespace BLL
|
||||
/// <summary>
|
||||
/// 定义变量
|
||||
/// </summary>
|
||||
public static IQueryable<Model.Check_CheckMonth> qq = from x in db.Check_CheckMonth orderby x.Months descending select x;
|
||||
public static IQueryable<Model.Check_CheckMonth> qq = from x in Funs.DB.Check_CheckMonth orderby x.Months descending select x;
|
||||
|
||||
/// <summary>
|
||||
/// 获取分页列表
|
||||
@@ -55,7 +54,7 @@ namespace BLL
|
||||
x.TotalSpotCheckNum,
|
||||
x.TotalCompletedRate,
|
||||
x.OnesOKRate,
|
||||
CompileMan = (from y in db.Person_Persons where y.PersonId == x.CompileMan select y.PersonName).First(),
|
||||
CompileMan = (from y in Funs.DB.Person_Persons where y.PersonId == x.CompileMan select y.PersonName).First(),
|
||||
x.CompileDate,
|
||||
Months = Convert.ToDateTime(x.Months).Year.ToString() + "-" + Convert.ToDateTime(x.Months).Month.ToString(),
|
||||
};
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Model;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public class DesignApproveService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 获取设计变更模板列表
|
||||
/// </summary>
|
||||
@@ -16,14 +15,15 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static IEnumerable getListData(string DesignId)
|
||||
{
|
||||
return from x in db.Check_DesignApprove
|
||||
var db1 = Funs.DB;
|
||||
return from x in db1.Check_DesignApprove
|
||||
where x.DesignId == DesignId && x.ApproveDate != null
|
||||
orderby x.ApproveDate
|
||||
select new
|
||||
{
|
||||
x.DesignApproveId,
|
||||
x.DesignId,
|
||||
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.IsAgree,
|
||||
x.ApproveIdea,
|
||||
@@ -38,7 +38,7 @@ namespace BLL
|
||||
/// <returns>一个设计变更审批实体</returns>
|
||||
public static Model.Check_DesignApprove GetDesignApproveByDesignId(string DesignId)
|
||||
{
|
||||
return db.Check_DesignApprove.FirstOrDefault(x => x.DesignId == DesignId && x.ApproveDate == null);
|
||||
return Funs.DB.Check_DesignApprove.FirstOrDefault(x => x.DesignId == DesignId && x.ApproveDate == null);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -48,22 +48,22 @@ namespace BLL
|
||||
/// <returns>一个设计变更审批实体</returns>
|
||||
public static Model.Check_DesignApprove GetDesignApproveByApproveId(string approveId)
|
||||
{
|
||||
return db.Check_DesignApprove.FirstOrDefault(x => x.DesignApproveId == approveId);
|
||||
return Funs.DB.Check_DesignApprove.FirstOrDefault(x => x.DesignApproveId == approveId);
|
||||
}
|
||||
|
||||
public static Model.Check_DesignApprove GetComplie(string DesignId)
|
||||
{
|
||||
return db.Check_DesignApprove.FirstOrDefault(x => x.DesignId == DesignId && x.ApproveType == BLL.Const.Design_Compile);
|
||||
return Funs.DB.Check_DesignApprove.FirstOrDefault(x => x.DesignId == DesignId && x.ApproveType == BLL.Const.Design_Compile);
|
||||
}
|
||||
|
||||
public static Model.Check_DesignApprove GetAuditMan(string DesignId, string state)
|
||||
{
|
||||
return db.Check_DesignApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.DesignId == DesignId && x.ApproveType == state);
|
||||
return Funs.DB.Check_DesignApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.DesignId == DesignId && x.ApproveType == state);
|
||||
}
|
||||
|
||||
public static Model.Check_DesignApprove GetAudit2(string DesignId)
|
||||
{
|
||||
return db.Check_DesignApprove.FirstOrDefault(x => x.DesignId == DesignId && x.ApproveType == BLL.Const.Design_Audit2);
|
||||
return Funs.DB.Check_DesignApprove.FirstOrDefault(x => x.DesignId == DesignId && x.ApproveType == BLL.Const.Design_Audit2);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -73,7 +73,7 @@ namespace BLL
|
||||
/// <returns>设计变更审批集合</returns>
|
||||
public static List<Model.Check_DesignApprove> GetDesignApprovesByDesignId(string DesignId)
|
||||
{
|
||||
return (from x in db.Check_DesignApprove where x.DesignId == DesignId select x).ToList();
|
||||
return (from x in Funs.DB.Check_DesignApprove where x.DesignId == DesignId select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -4,13 +4,12 @@ using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Web.UI.WebControls;
|
||||
using Model;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public class DesignService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 记录数
|
||||
/// </summary>
|
||||
@@ -23,7 +22,7 @@ namespace BLL
|
||||
/// <summary>
|
||||
/// 定义变量
|
||||
/// </summary>
|
||||
private static IQueryable<Model.Check_Design> qq = from x in db.Check_Design orderby x.DesignDate descending select x;
|
||||
private static IQueryable<Model.Check_Design> qq = from x in Funs.DB.Check_Design orderby x.DesignDate descending select x;
|
||||
|
||||
|
||||
public static string CovBool(bool? b)
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Model;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public class FileCabinetService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
/// <summary>
|
||||
/// 增加信息
|
||||
/// </summary>
|
||||
@@ -23,8 +23,9 @@ namespace BLL
|
||||
CreateManId = addFileCabinet.CreateManId,
|
||||
FileUrl = addFileCabinet.FileUrl
|
||||
};
|
||||
db.Project_FileCabinet.InsertOnSubmit(newFileCabinet);
|
||||
db.SubmitChanges();
|
||||
var db1 = Funs.DB;
|
||||
db1.Project_FileCabinet.InsertOnSubmit(newFileCabinet);
|
||||
db1.SubmitChanges();
|
||||
}
|
||||
/// <summary>
|
||||
/// 记录数
|
||||
@@ -55,7 +56,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static Model.Project_FileCabinet getInfo(string fileCabinetId)
|
||||
{
|
||||
return db.Project_FileCabinet.FirstOrDefault(e => e.FileCabinetId == fileCabinetId);
|
||||
return Funs.DB.Project_FileCabinet.FirstOrDefault(e => e.FileCabinetId == fileCabinetId);
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取重要文件
|
||||
@@ -104,7 +105,8 @@ namespace BLL
|
||||
/// <param name="updateFileCabinet">实体</param>
|
||||
public static void UpdateFileCabinet(Model.Project_FileCabinet updateFileCabinet)
|
||||
{
|
||||
Model.Project_FileCabinet getFileCabinet = db.Project_FileCabinet.FirstOrDefault(e => e.FileCabinetId == updateFileCabinet.FileCabinetId);
|
||||
var db1 = Funs.DB;
|
||||
Model.Project_FileCabinet getFileCabinet = db1.Project_FileCabinet.FirstOrDefault(e => e.FileCabinetId == updateFileCabinet.FileCabinetId);
|
||||
if (getFileCabinet != null)
|
||||
{
|
||||
getFileCabinet.FileCode = updateFileCabinet.FileCode;
|
||||
@@ -112,7 +114,7 @@ namespace BLL
|
||||
getFileCabinet.FileDate = updateFileCabinet.FileDate;
|
||||
getFileCabinet.CreateManId = updateFileCabinet.CreateManId;
|
||||
getFileCabinet.FileUrl = updateFileCabinet.FileUrl;
|
||||
db.SubmitChanges();
|
||||
db1.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Model;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public class MonthDesignService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 获取月报设计变更情况列表
|
||||
/// </summary>
|
||||
@@ -15,7 +14,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static List<Model.Check_MonthDesign> getListData(string CheckMonthId)
|
||||
{
|
||||
return (from x in db.Check_MonthDesign
|
||||
return (from x in Funs.DB.Check_MonthDesign
|
||||
where x.CheckMonthId == CheckMonthId
|
||||
select x).ToList();
|
||||
}
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Model;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public class MonthNDTCheckService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 获取月报无损检测情况模板列表
|
||||
/// </summary>
|
||||
@@ -15,7 +14,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static List<Model.Check_MonthNDTCheck> getListData(string CheckMonthId)
|
||||
{
|
||||
return (from x in db.Check_MonthNDTCheck
|
||||
return (from x in Funs.DB.Check_MonthNDTCheck
|
||||
where x.CheckMonthId == CheckMonthId
|
||||
select x).ToList();
|
||||
}
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Model;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public class MonthRectifyService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 获取月报质量巡检情况模板列表
|
||||
/// </summary>
|
||||
@@ -15,7 +14,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static List<Model.Check_MonthRectify> getListData(string CheckMonthId)
|
||||
{
|
||||
return (from x in db.Check_MonthRectify
|
||||
return (from x in Funs.DB.Check_MonthRectify
|
||||
where x.CheckMonthId == CheckMonthId
|
||||
select x).ToList();
|
||||
}
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Model;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public class MonthSpotCheckDetailService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 获取月报质量验收情况模板列表
|
||||
/// </summary>
|
||||
@@ -15,7 +14,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static List<Model.Check_MonthSpotCheckDetail> getListData(string CheckMonthId)
|
||||
{
|
||||
return (from x in db.Check_MonthSpotCheckDetail
|
||||
return (from x in Funs.DB.Check_MonthSpotCheckDetail
|
||||
where x.CheckMonthId == CheckMonthId
|
||||
select x).ToList();
|
||||
}
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Model;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public class MonthWelderService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 获取月报焊工资格评定情况模板列表
|
||||
/// </summary>
|
||||
@@ -15,7 +14,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static List<Model.Check_MonthWelder> getListData(string CheckMonthId)
|
||||
{
|
||||
return (from x in db.Check_MonthWelder
|
||||
return (from x in Funs.DB.Check_MonthWelder
|
||||
where x.CheckMonthId == CheckMonthId
|
||||
select x).ToList();
|
||||
}
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Model;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public class SpecialEquipmentDetailService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 获取月报特种设备信息模板列表
|
||||
/// </summary>
|
||||
@@ -16,7 +15,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static IEnumerable getListData(string CheckMonthId)
|
||||
{
|
||||
return from x in db.Check_SpecialEquipmentDetail
|
||||
return from x in Funs.DB.Check_SpecialEquipmentDetail
|
||||
where x.CheckMonthId == CheckMonthId
|
||||
select new
|
||||
{
|
||||
|
||||
@@ -2,13 +2,12 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Model;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public class SpotCheckApproveService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
public static Model.Check_SpotCheckApprove GetSpotApproveBySpotCheckDetailId(string spotCheckDetailId)
|
||||
{
|
||||
return (from x in Funs.DB.Check_SpotCheckApprove where x.SpotCheckDetailId == spotCheckDetailId && x.ApproveType != "S" && x.Sign == "2" && x.ApproveDate == null select x).FirstOrDefault();
|
||||
@@ -34,14 +33,15 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static IEnumerable getListData(string SpotCheckCode)
|
||||
{
|
||||
return from x in db.Check_SpotCheckApprove
|
||||
var db1 = Funs.DB;
|
||||
return from x in db1.Check_SpotCheckApprove
|
||||
where x.SpotCheckCode == SpotCheckCode && x.ApproveDate != null && x.ApproveType != "S" && x.Sign == "1"
|
||||
orderby x.ApproveDate
|
||||
select new
|
||||
{
|
||||
x.SpotCheckApproveId,
|
||||
x.SpotCheckCode,
|
||||
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.IsAgree,
|
||||
x.ApproveIdea,
|
||||
@@ -57,14 +57,15 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static IEnumerable getList(string SpotCheckCode)
|
||||
{
|
||||
return from x in db.Check_SpotCheckApprove
|
||||
var db1 = Funs.DB;
|
||||
return from x in db1.Check_SpotCheckApprove
|
||||
where x.SpotCheckCode == SpotCheckCode && x.ApproveDate != null && x.ApproveType != "S" && x.Sign == "2"
|
||||
orderby x.ApproveDate
|
||||
select new
|
||||
{
|
||||
x.SpotCheckApproveId,
|
||||
x.SpotCheckCode,
|
||||
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.IsAgree,
|
||||
x.ApproveIdea,
|
||||
@@ -89,12 +90,12 @@ namespace BLL
|
||||
/// <returns>一个实体验收审批实体</returns>
|
||||
public static Model.Check_SpotCheckApprove GetSpotCheckApproveByApproveId(string approveId)
|
||||
{
|
||||
return db.Check_SpotCheckApprove.FirstOrDefault(x => x.SpotCheckApproveId == approveId);
|
||||
return Funs.DB.Check_SpotCheckApprove.FirstOrDefault(x => x.SpotCheckApproveId == approveId);
|
||||
}
|
||||
|
||||
public static Model.Check_SpotCheckApprove GetComplie(string SpotCheckCode)
|
||||
{
|
||||
return db.Check_SpotCheckApprove.FirstOrDefault(x => x.SpotCheckCode == SpotCheckCode && x.ApproveType == BLL.Const.SpotCheck_Compile);
|
||||
return Funs.DB.Check_SpotCheckApprove.FirstOrDefault(x => x.SpotCheckCode == SpotCheckCode && x.ApproveType == BLL.Const.SpotCheck_Compile);
|
||||
}
|
||||
public static Model.Check_SpotCheckApprove GetComplieForApi(string SpotCheckCode)
|
||||
{
|
||||
@@ -106,7 +107,7 @@ namespace BLL
|
||||
|
||||
public static Model.Check_SpotCheckApprove GetSee(string SpotCheckCode, string userId)
|
||||
{
|
||||
return db.Check_SpotCheckApprove.FirstOrDefault(x => x.SpotCheckCode == SpotCheckCode && x.ApproveType == "S" && x.ApproveMan == userId && x.ApproveDate == null);
|
||||
return Funs.DB.Check_SpotCheckApprove.FirstOrDefault(x => x.SpotCheckCode == SpotCheckCode && x.ApproveType == "S" && x.ApproveMan == userId && x.ApproveDate == null);
|
||||
}
|
||||
public static void See(string SpotCheckCode, string userId)
|
||||
{
|
||||
@@ -122,12 +123,12 @@ namespace BLL
|
||||
}
|
||||
public static Model.Check_SpotCheckApprove GetAudit2(string SpotCheckCode)
|
||||
{
|
||||
return db.Check_SpotCheckApprove.FirstOrDefault(x => x.SpotCheckCode == SpotCheckCode && x.ApproveType == BLL.Const.SpotCheck_Audit2);
|
||||
return Funs.DB.Check_SpotCheckApprove.FirstOrDefault(x => x.SpotCheckCode == SpotCheckCode && x.ApproveType == BLL.Const.SpotCheck_Audit2);
|
||||
}
|
||||
|
||||
public static Model.Check_SpotCheckApprove GetReCompile(string SpotCheckCode)
|
||||
{
|
||||
return db.Check_SpotCheckApprove.FirstOrDefault(x => x.SpotCheckCode == SpotCheckCode && x.ApproveType == BLL.Const.SpotCheck_ReCompile);
|
||||
return Funs.DB.Check_SpotCheckApprove.FirstOrDefault(x => x.SpotCheckCode == SpotCheckCode && x.ApproveType == BLL.Const.SpotCheck_ReCompile);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -137,7 +138,7 @@ namespace BLL
|
||||
/// <returns>实体验收审批集合</returns>
|
||||
public static List<Model.Check_SpotCheckApprove> GetSpotCheckApprovesBySpotCheckCode(string SpotCheckCode)
|
||||
{
|
||||
return (from x in db.Check_SpotCheckApprove where x.SpotCheckCode == SpotCheckCode select x).ToList();
|
||||
return (from x in Funs.DB.Check_SpotCheckApprove where x.SpotCheckCode == SpotCheckCode select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -233,14 +234,15 @@ namespace BLL
|
||||
}
|
||||
public static List<Model.Check_SpotCheckApprove> getListDataBySpotCheckCodeForApi(string SpotCheckCode)
|
||||
{
|
||||
var q = from x in db.Check_SpotCheckApprove
|
||||
var db1 = Funs.DB;
|
||||
var q = from x in db1.Check_SpotCheckApprove
|
||||
where x.SpotCheckCode == SpotCheckCode && x.ApproveDate != null && x.ApproveType != "S" && x.Sign == "1"
|
||||
orderby x.ApproveDate
|
||||
select new
|
||||
{
|
||||
x.SpotCheckApproveId,
|
||||
x.SpotCheckCode,
|
||||
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.IsAgree,
|
||||
x.ApproveIdea,
|
||||
|
||||
@@ -2,13 +2,12 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Model;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public class SpotCheckDetailService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 获取实体验收记录明细
|
||||
/// </summary>
|
||||
@@ -17,7 +16,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static IEnumerable getListData(string SpotCheckCode)
|
||||
{
|
||||
return from x in db.Check_SpotCheckDetail
|
||||
return from x in Funs.DB.Check_SpotCheckDetail
|
||||
where x.SpotCheckCode == SpotCheckCode
|
||||
select new
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace BLL
|
||||
{
|
||||
public class SpotCheckService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 添加实体验收记录
|
||||
|
||||
@@ -2,15 +2,15 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Model;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public class TechnicalContactListApproveService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.Check_TechnicalContactListApprove GetSee(string TechnicalContactListId, string userId)
|
||||
{
|
||||
return db.Check_TechnicalContactListApprove.FirstOrDefault(x => x.TechnicalContactListId == TechnicalContactListId && x.ApproveType == "S" && x.ApproveMan == userId && x.ApproveDate == null);
|
||||
return Funs.DB.Check_TechnicalContactListApprove.FirstOrDefault(x => x.TechnicalContactListId == TechnicalContactListId && x.ApproveType == "S" && x.ApproveMan == userId && x.ApproveDate == null);
|
||||
}
|
||||
public static void See(string TechnicalContactListId, string userId)
|
||||
{
|
||||
@@ -56,7 +56,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static Model.Check_TechnicalContactListApprove GetApprove(string TechnicalContactListId)
|
||||
{
|
||||
return db.Check_TechnicalContactListApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.TechnicalContactListId == TechnicalContactListId && x.ApproveType == BLL.Const.TechnicalContactList_Audit1);
|
||||
return Funs.DB.Check_TechnicalContactListApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.TechnicalContactListId == TechnicalContactListId && x.ApproveType == BLL.Const.TechnicalContactList_Audit1);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -125,7 +125,7 @@ namespace BLL
|
||||
/// <returns>一个工程联络单审批实体</returns>
|
||||
public static Model.Check_TechnicalContactListApprove GetTechnicalContactListApproveByTechnicalContactListId(string TechnicalContactListId)
|
||||
{
|
||||
return db.Check_TechnicalContactListApprove.FirstOrDefault(x => x.TechnicalContactListId == TechnicalContactListId && x.ApproveDate == null && x.ApproveType != "S");
|
||||
return Funs.DB.Check_TechnicalContactListApprove.FirstOrDefault(x => x.TechnicalContactListId == TechnicalContactListId && x.ApproveDate == null && x.ApproveType != "S");
|
||||
}
|
||||
/// <summary>
|
||||
/// 根据工程联络单审批编号获取一个工程联络单审批信息
|
||||
@@ -134,7 +134,7 @@ namespace BLL
|
||||
/// <returns>一个工程联络单审批实体</returns>
|
||||
public static Model.Check_TechnicalContactListApprove GetTechnicalContactListApproveByApproveId(string approveId)
|
||||
{
|
||||
return db.Check_TechnicalContactListApprove.FirstOrDefault(x => x.TechnicalContactListApproveId == approveId);
|
||||
return Funs.DB.Check_TechnicalContactListApprove.FirstOrDefault(x => x.TechnicalContactListApproveId == approveId);
|
||||
}
|
||||
public static Model.Check_TechnicalContactListApprove GetTechnicalContactListApproveByApproveIdForApi(string approveId)
|
||||
{
|
||||
@@ -145,7 +145,7 @@ namespace BLL
|
||||
}
|
||||
public static Model.Check_TechnicalContactListApprove GetComplie(string TechnicalContactListId)
|
||||
{
|
||||
return db.Check_TechnicalContactListApprove.FirstOrDefault(x => x.TechnicalContactListId == TechnicalContactListId && x.ApproveType == BLL.Const.TechnicalContactList_Compile);
|
||||
return Funs.DB.Check_TechnicalContactListApprove.FirstOrDefault(x => x.TechnicalContactListId == TechnicalContactListId && x.ApproveType == BLL.Const.TechnicalContactList_Compile);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -155,7 +155,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static Model.Check_TechnicalContactListApprove GetApprove2(string TechnicalContactListId)
|
||||
{
|
||||
return db.Check_TechnicalContactListApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.TechnicalContactListId == TechnicalContactListId && x.ApproveType == BLL.Const.TechnicalContactList_Audit3);
|
||||
return Funs.DB.Check_TechnicalContactListApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.TechnicalContactListId == TechnicalContactListId && x.ApproveType == BLL.Const.TechnicalContactList_Audit3);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -165,7 +165,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static Model.Check_TechnicalContactListApprove GetApprove3(string TechnicalContactListId)
|
||||
{
|
||||
return db.Check_TechnicalContactListApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.TechnicalContactListId == TechnicalContactListId && (x.ApproveType == BLL.Const.TechnicalContactList_Audit2 || x.ApproveType == BLL.Const.TechnicalContactList_Audit2H));
|
||||
return Funs.DB.Check_TechnicalContactListApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.TechnicalContactListId == TechnicalContactListId && (x.ApproveType == BLL.Const.TechnicalContactList_Audit2 || x.ApproveType == BLL.Const.TechnicalContactList_Audit2H));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -175,7 +175,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static Model.Check_TechnicalContactListApprove GetApprove5(string TechnicalContactListId)
|
||||
{
|
||||
return db.Check_TechnicalContactListApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.TechnicalContactListId == TechnicalContactListId && (x.ApproveType == BLL.Const.TechnicalContactList_Audit4 || x.ApproveType == BLL.Const.TechnicalContactList_Audit4R));
|
||||
return Funs.DB.Check_TechnicalContactListApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.TechnicalContactListId == TechnicalContactListId && (x.ApproveType == BLL.Const.TechnicalContactList_Audit4 || x.ApproveType == BLL.Const.TechnicalContactList_Audit4R));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -185,7 +185,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static Model.Check_TechnicalContactListApprove GetApprove4(string TechnicalContactListId)
|
||||
{
|
||||
return db.Check_TechnicalContactListApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.TechnicalContactListId == TechnicalContactListId && x.ApproveType == BLL.Const.TechnicalContactList_Audit6);
|
||||
return Funs.DB.Check_TechnicalContactListApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.TechnicalContactListId == TechnicalContactListId && x.ApproveType == BLL.Const.TechnicalContactList_Audit6);
|
||||
}
|
||||
public static List<Model.Check_TechnicalContactListApprove> GetListDataByIdForApi(string TechnicalContactListId)
|
||||
{
|
||||
|
||||
@@ -4,13 +4,12 @@ using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Web.UI.WebControls;
|
||||
using Model;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public class TechnicalContactListService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据工程联络单信息Id删除一个工程联络单信息信息
|
||||
/// </summary>
|
||||
@@ -401,7 +400,7 @@ namespace BLL
|
||||
/// <summary>
|
||||
/// 定义变量
|
||||
/// </summary>
|
||||
private static IQueryable<Model.Check_TechnicalContactList> qq = from x in db.Check_TechnicalContactList orderby x.CompileDate descending select x;
|
||||
private static IQueryable<Model.Check_TechnicalContactList> qq = from x in Funs.DB.Check_TechnicalContactList orderby x.CompileDate descending select x;
|
||||
|
||||
/// <summary>
|
||||
/// 获取分页列表
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using Model;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public class CQMS_InspectionApproveService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
/// <summary>
|
||||
/// 获取报验管理模板列表
|
||||
/// </summary>
|
||||
@@ -16,14 +16,15 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static DataTable getListData(string InspectionId)
|
||||
{
|
||||
var res = from x in db.Material_InspectionApprove
|
||||
var db1 = Funs.DB;
|
||||
var res = from x in db1.Material_InspectionApprove
|
||||
where x.InspectionId == InspectionId && x.ApproveDate != null && x.ApproveType != "S"
|
||||
orderby x.ApproveDate
|
||||
select new
|
||||
{
|
||||
x.InspectionApproveId,
|
||||
x.InspectionId,
|
||||
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.IsAgree,
|
||||
x.ApproveIdea,
|
||||
@@ -77,7 +78,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static Model.Material_InspectionApprove GetSee(string InspectionId, string userId)
|
||||
{
|
||||
return db.Material_InspectionApprove.FirstOrDefault(x => x.InspectionId == InspectionId && x.ApproveType == "S" && x.ApproveMan == userId && x.ApproveDate == null);
|
||||
return Funs.DB.Material_InspectionApprove.FirstOrDefault(x => x.InspectionId == InspectionId && x.ApproveType == "S" && x.ApproveMan == userId && x.ApproveDate == null);
|
||||
}
|
||||
public static void See(string InspectionId, string userId)
|
||||
{
|
||||
@@ -98,11 +99,11 @@ namespace BLL
|
||||
/// <returns>一个报验管理审批实体</returns>
|
||||
public static Model.Material_InspectionApprove GetInspectionApproveByInspectionId(string InspectionId)
|
||||
{
|
||||
return db.Material_InspectionApprove.FirstOrDefault(x => x.InspectionId == InspectionId && x.ApproveType != "S" && x.ApproveDate == null);
|
||||
return Funs.DB.Material_InspectionApprove.FirstOrDefault(x => x.InspectionId == InspectionId && x.ApproveType != "S" && x.ApproveDate == null);
|
||||
}
|
||||
public static Model.Material_InspectionApprove GetAuditMan(string InspectionId, string state)
|
||||
{
|
||||
return db.Material_InspectionApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.InspectionId == InspectionId && x.ApproveType == state);
|
||||
return Funs.DB.Material_InspectionApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.InspectionId == InspectionId && x.ApproveType == state);
|
||||
}
|
||||
/// <summary>
|
||||
/// 修改报验管理审批信息
|
||||
@@ -148,7 +149,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static Model.Material_InspectionApprove GetAudit1(string InspectionId)
|
||||
{
|
||||
return db.Material_InspectionApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.InspectionId == InspectionId && x.ApproveType == BLL.Const.Inspection_Audit1);
|
||||
return Funs.DB.Material_InspectionApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.InspectionId == InspectionId && x.ApproveType == BLL.Const.Inspection_Audit1);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -158,12 +159,12 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static Model.Material_InspectionApprove GetAudit2(string InspectionId)
|
||||
{
|
||||
return db.Material_InspectionApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.InspectionId == InspectionId && x.ApproveType == BLL.Const.Inspection_Audit2);
|
||||
return Funs.DB.Material_InspectionApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.InspectionId == InspectionId && x.ApproveType == BLL.Const.Inspection_Audit2);
|
||||
}
|
||||
|
||||
public static Model.Material_InspectionApprove GetComplie(string InspectionId)
|
||||
{
|
||||
return db.Material_InspectionApprove.FirstOrDefault(x => x.InspectionId == InspectionId && x.ApproveType == BLL.Const.Inspection_Compile);
|
||||
return Funs.DB.Material_InspectionApprove.FirstOrDefault(x => x.InspectionId == InspectionId && x.ApproveType == BLL.Const.Inspection_Compile);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using Model;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public class CQMS_MeetingApproveService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
/// <summary>
|
||||
/// 获取质量会议模板列表
|
||||
/// </summary>
|
||||
@@ -16,14 +16,15 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static DataTable getListData(string MeetingId)
|
||||
{
|
||||
var res = from x in db.Meeting_CQMSMeetingApprove
|
||||
var db1 = Funs.DB;
|
||||
var res = from x in db1.Meeting_CQMSMeetingApprove
|
||||
where x.MeetingId == MeetingId && x.ApproveDate != null && x.ApproveType != "S"
|
||||
orderby x.ApproveDate
|
||||
select new
|
||||
{
|
||||
x.MeetingApproveId,
|
||||
x.MeetingId,
|
||||
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.IsAgree,
|
||||
x.ApproveIdea,
|
||||
@@ -77,7 +78,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static Model.Meeting_CQMSMeetingApprove GetSee(string MeetingId, string userId)
|
||||
{
|
||||
return db.Meeting_CQMSMeetingApprove.FirstOrDefault(x => x.MeetingId == MeetingId && x.ApproveType == "S" && x.ApproveMan == userId && x.ApproveDate == null);
|
||||
return Funs.DB.Meeting_CQMSMeetingApprove.FirstOrDefault(x => x.MeetingId == MeetingId && x.ApproveType == "S" && x.ApproveMan == userId && x.ApproveDate == null);
|
||||
}
|
||||
public static void See(string MeetingId, string userId)
|
||||
{
|
||||
@@ -110,11 +111,11 @@ namespace BLL
|
||||
/// <returns>一个质量会议审批实体</returns>
|
||||
public static Model.Meeting_CQMSMeetingApprove GetCQMSMeetingApproveByMeetingId(string MeetingId)
|
||||
{
|
||||
return db.Meeting_CQMSMeetingApprove.FirstOrDefault(x => x.MeetingId == MeetingId && x.ApproveType != "S" && x.ApproveDate == null);
|
||||
return Funs.DB.Meeting_CQMSMeetingApprove.FirstOrDefault(x => x.MeetingId == MeetingId && x.ApproveType != "S" && x.ApproveDate == null);
|
||||
}
|
||||
public static Model.Meeting_CQMSMeetingApprove GetAuditMan(string MeetingId, string state)
|
||||
{
|
||||
return db.Meeting_CQMSMeetingApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.MeetingId == MeetingId && x.ApproveType == state);
|
||||
return Funs.DB.Meeting_CQMSMeetingApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.MeetingId == MeetingId && x.ApproveType == state);
|
||||
}
|
||||
/// <summary>
|
||||
/// 修改质量会议审批信息
|
||||
@@ -160,12 +161,12 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static Model.Meeting_CQMSMeetingApprove GetAudit(string MeetingId)
|
||||
{
|
||||
return db.Meeting_CQMSMeetingApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.MeetingId == MeetingId && x.ApproveType == BLL.Const.CQMSMeeting_Audit);
|
||||
return Funs.DB.Meeting_CQMSMeetingApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.MeetingId == MeetingId && x.ApproveType == BLL.Const.CQMSMeeting_Audit);
|
||||
}
|
||||
|
||||
public static Model.Meeting_CQMSMeetingApprove GetComplie(string MeetingId)
|
||||
{
|
||||
return db.Meeting_CQMSMeetingApprove.FirstOrDefault(x => x.MeetingId == MeetingId && x.ApproveType == BLL.Const.CQMSMeeting_Compile);
|
||||
return Funs.DB.Meeting_CQMSMeetingApprove.FirstOrDefault(x => x.MeetingId == MeetingId && x.ApproveType == BLL.Const.CQMSMeeting_Compile);
|
||||
}
|
||||
|
||||
public static List<Model.Meeting_CQMSMeetingApprove> GetListDataByIdForApi(string id)
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class CQMS_MeetingService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取质量会议
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using Model;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public class CQMS_MainPlanApproveService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
/// <summary>
|
||||
/// 获取总包施工计划模板列表
|
||||
/// </summary>
|
||||
@@ -16,14 +16,15 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static DataTable getListData(string MainPlanId)
|
||||
{
|
||||
var res = from x in db.Plan_MainPlanApprove
|
||||
var db1 = Funs.DB;
|
||||
var res = from x in db1.Plan_MainPlanApprove
|
||||
where x.MainPlanId == MainPlanId && x.ApproveDate != null && x.ApproveType != "S"
|
||||
orderby x.ApproveDate
|
||||
select new
|
||||
{
|
||||
x.MainPlanApproveId,
|
||||
x.MainPlanId,
|
||||
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.IsAgree,
|
||||
x.ApproveIdea,
|
||||
@@ -77,7 +78,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static Model.Plan_MainPlanApprove GetSee(string MainPlanId, string userId)
|
||||
{
|
||||
return db.Plan_MainPlanApprove.FirstOrDefault(x => x.MainPlanId == MainPlanId && x.ApproveType == "S" && x.ApproveMan == userId && x.ApproveDate == null);
|
||||
return Funs.DB.Plan_MainPlanApprove.FirstOrDefault(x => x.MainPlanId == MainPlanId && x.ApproveType == "S" && x.ApproveMan == userId && x.ApproveDate == null);
|
||||
}
|
||||
public static void See(string MainPlanId, string userId)
|
||||
{
|
||||
@@ -98,7 +99,7 @@ namespace BLL
|
||||
/// <returns>一个总包施工计划审批实体</returns>
|
||||
public static Model.Plan_MainPlanApprove GetMainPlanApproveByMainPlanId(string MainPlanId)
|
||||
{
|
||||
return db.Plan_MainPlanApprove.FirstOrDefault(x => x.MainPlanId == MainPlanId && x.ApproveType != "S" && x.ApproveDate == null);
|
||||
return Funs.DB.Plan_MainPlanApprove.FirstOrDefault(x => x.MainPlanId == MainPlanId && x.ApproveType != "S" && x.ApproveDate == null);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -108,12 +109,12 @@ namespace BLL
|
||||
/// <returns>总包施工计划审批集合</returns>
|
||||
public static List<Model.Plan_MainPlanApprove> GetMainPlanApprovesByMainPlanId(string MainPlanId)
|
||||
{
|
||||
return (from x in db.Plan_MainPlanApprove where x.MainPlanId == MainPlanId && x.ApproveType != "S" && x.ApproveDate == null select x).ToList();
|
||||
return (from x in Funs.DB.Plan_MainPlanApprove where x.MainPlanId == MainPlanId && x.ApproveType != "S" && x.ApproveDate == null select x).ToList();
|
||||
}
|
||||
|
||||
public static Model.Plan_MainPlanApprove GetAuditMan(string MainPlanId, string state)
|
||||
{
|
||||
return db.Plan_MainPlanApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.MainPlanId == MainPlanId && x.ApproveType == state);
|
||||
return Funs.DB.Plan_MainPlanApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.MainPlanId == MainPlanId && x.ApproveType == state);
|
||||
}
|
||||
public static string GetHandleManName(string MainPlanId)
|
||||
{
|
||||
@@ -169,7 +170,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static Model.Plan_MainPlanApprove GetAudit1(string MainPlanId)
|
||||
{
|
||||
return db.Plan_MainPlanApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.MainPlanId == MainPlanId && x.ApproveType == BLL.Const.MainPlan_Audit1);
|
||||
return Funs.DB.Plan_MainPlanApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.MainPlanId == MainPlanId && x.ApproveType == BLL.Const.MainPlan_Audit1);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -200,7 +201,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static Model.Plan_MainPlanApprove GetAudit3(string MainPlanId, string userId)
|
||||
{
|
||||
return db.Plan_MainPlanApprove.FirstOrDefault(x => x.MainPlanId == MainPlanId && x.ApproveMan == userId && x.ApproveDate == null);
|
||||
return Funs.DB.Plan_MainPlanApprove.FirstOrDefault(x => x.MainPlanId == MainPlanId && x.ApproveMan == userId && x.ApproveDate == null);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -210,12 +211,12 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static List<string> GetAudit3PersonIds(string MainPlanId)
|
||||
{
|
||||
return (from x in db.Plan_MainPlanApprove where x.MainPlanId == MainPlanId && x.ApproveType == BLL.Const.MainPlan_Audit3 select x.ApproveMan).ToList();
|
||||
return (from x in Funs.DB.Plan_MainPlanApprove where x.MainPlanId == MainPlanId && x.ApproveType == BLL.Const.MainPlan_Audit3 select x.ApproveMan).ToList();
|
||||
}
|
||||
|
||||
public static Model.Plan_MainPlanApprove GetComplie(string MainPlanId)
|
||||
{
|
||||
return db.Plan_MainPlanApprove.FirstOrDefault(x => x.MainPlanId == MainPlanId && x.ApproveType == BLL.Const.MainPlan_Compile);
|
||||
return Funs.DB.Plan_MainPlanApprove.FirstOrDefault(x => x.MainPlanId == MainPlanId && x.ApproveType == BLL.Const.MainPlan_Compile);
|
||||
}
|
||||
|
||||
public static List<Model.Plan_MainPlanApprove> getApproveListDataByIdForApi(string MainPlanId)
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using Model;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public class RewardAndPunishApproveService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
/// <summary>
|
||||
/// 获取质量奖罚模板列表
|
||||
/// </summary>
|
||||
@@ -16,14 +16,15 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static DataTable getListData(string RewardAndPunishId)
|
||||
{
|
||||
var res = from x in db.RewardAndPunish_RewardAndPunishApprove
|
||||
var db1 = Funs.DB;
|
||||
var res = from x in db1.RewardAndPunish_RewardAndPunishApprove
|
||||
where x.RewardAndPunishId == RewardAndPunishId && x.ApproveDate != null && x.ApproveType != "S"
|
||||
orderby x.ApproveDate
|
||||
select new
|
||||
{
|
||||
x.RewardAndPunishApproveId,
|
||||
x.RewardAndPunishId,
|
||||
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.IsAgree,
|
||||
x.ApproveIdea,
|
||||
@@ -77,7 +78,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static Model.RewardAndPunish_RewardAndPunishApprove GetSee(string RewardAndPunishId, string userId)
|
||||
{
|
||||
return db.RewardAndPunish_RewardAndPunishApprove.FirstOrDefault(x => x.RewardAndPunishId == RewardAndPunishId && x.ApproveType == "S" && x.ApproveMan == userId && x.ApproveDate == null);
|
||||
return Funs.DB.RewardAndPunish_RewardAndPunishApprove.FirstOrDefault(x => x.RewardAndPunishId == RewardAndPunishId && x.ApproveType == "S" && x.ApproveMan == userId && x.ApproveDate == null);
|
||||
}
|
||||
public static void See(string RewardAndPunishId, string userId)
|
||||
{
|
||||
@@ -98,11 +99,11 @@ namespace BLL
|
||||
/// <returns>一个质量奖罚审批实体</returns>
|
||||
public static Model.RewardAndPunish_RewardAndPunishApprove GetRewardAndPunishApproveByRewardAndPunishId(string RewardAndPunishId)
|
||||
{
|
||||
return db.RewardAndPunish_RewardAndPunishApprove.FirstOrDefault(x => x.RewardAndPunishId == RewardAndPunishId && x.ApproveType != "S" && x.ApproveDate == null);
|
||||
return Funs.DB.RewardAndPunish_RewardAndPunishApprove.FirstOrDefault(x => x.RewardAndPunishId == RewardAndPunishId && x.ApproveType != "S" && x.ApproveDate == null);
|
||||
}
|
||||
public static Model.RewardAndPunish_RewardAndPunishApprove GetAuditMan(string RewardAndPunishId, string state)
|
||||
{
|
||||
return db.RewardAndPunish_RewardAndPunishApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.RewardAndPunishId == RewardAndPunishId && x.ApproveType == state);
|
||||
return Funs.DB.RewardAndPunish_RewardAndPunishApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.RewardAndPunishId == RewardAndPunishId && x.ApproveType == state);
|
||||
}
|
||||
/// <summary>
|
||||
/// 修改质量奖罚审批信息
|
||||
@@ -193,12 +194,12 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static Model.RewardAndPunish_RewardAndPunishApprove GetAudit1(string RewardAndPunishId)
|
||||
{
|
||||
return db.RewardAndPunish_RewardAndPunishApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.RewardAndPunishId == RewardAndPunishId && x.ApproveType == BLL.Const.RewardAndPunish_Audit1);
|
||||
return Funs.DB.RewardAndPunish_RewardAndPunishApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.RewardAndPunishId == RewardAndPunishId && x.ApproveType == BLL.Const.RewardAndPunish_Audit1);
|
||||
}
|
||||
|
||||
public static Model.RewardAndPunish_RewardAndPunishApprove GetComplie(string RewardAndPunishId)
|
||||
{
|
||||
return db.RewardAndPunish_RewardAndPunishApprove.FirstOrDefault(x => x.RewardAndPunishId == RewardAndPunishId && x.ApproveType == BLL.Const.RewardAndPunish_Compile);
|
||||
return Funs.DB.RewardAndPunish_RewardAndPunishApprove.FirstOrDefault(x => x.RewardAndPunishId == RewardAndPunishId && x.ApproveType == BLL.Const.RewardAndPunish_Compile);
|
||||
}
|
||||
|
||||
public static string GetHandleManName(string RewardAndPunishId)
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class RewardAndPunishService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取质量奖罚
|
||||
|
||||
@@ -2,32 +2,32 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Model;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public class WorkContactApproveService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 获取分页列表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static IEnumerable getListData(string workContactId)
|
||||
{
|
||||
return from x in db.Unqualified_WorkContactApprove
|
||||
var db1 = Funs.DB;
|
||||
return from x in db1.Unqualified_WorkContactApprove
|
||||
where x.WorkContactId == workContactId && x.ApproveDate != null && x.ApproveType != "S"
|
||||
orderby x.ApproveDate
|
||||
select new
|
||||
{
|
||||
x.WorkContactApproveId,
|
||||
x.WorkContactId,
|
||||
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 ? "同意" : "不同意"
|
||||
};
|
||||
}
|
||||
@@ -90,7 +90,7 @@ namespace BLL
|
||||
}
|
||||
public static Model.Unqualified_WorkContactApprove GetSee(string WorkContactId, string userId)
|
||||
{
|
||||
return db.Unqualified_WorkContactApprove.FirstOrDefault(x => x.WorkContactId == WorkContactId && x.ApproveType == "S" && x.ApproveMan == userId && x.ApproveDate == null);
|
||||
return Funs.DB.Unqualified_WorkContactApprove.FirstOrDefault(x => x.WorkContactId == WorkContactId && x.ApproveType == "S" && x.ApproveMan == userId && x.ApproveDate == null);
|
||||
}
|
||||
public static void See(string WorkContactId, string userId)
|
||||
{
|
||||
@@ -111,7 +111,7 @@ namespace BLL
|
||||
/// <returns>一个工作联系单审批实体</returns>
|
||||
public static Model.Unqualified_WorkContactApprove GetWorkContactApproveByWorkContactId(string noticeId)
|
||||
{
|
||||
return db.Unqualified_WorkContactApprove.FirstOrDefault(x => x.WorkContactId == noticeId && x.ApproveDate == null && x.ApproveType != "S");
|
||||
return Funs.DB.Unqualified_WorkContactApprove.FirstOrDefault(x => x.WorkContactId == noticeId && x.ApproveDate == null && x.ApproveType != "S");
|
||||
}
|
||||
/// <summary>
|
||||
/// 修改工作联系单审批信息
|
||||
@@ -138,7 +138,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static Model.Unqualified_WorkContactApprove GetAudit1(string workContactId)
|
||||
{
|
||||
return db.Unqualified_WorkContactApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.WorkContactId == workContactId && x.ApproveType == BLL.Const.WorkContact_Audit1);
|
||||
return Funs.DB.Unqualified_WorkContactApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.WorkContactId == workContactId && x.ApproveType == BLL.Const.WorkContact_Audit1);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -148,7 +148,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static Model.Unqualified_WorkContactApprove GetAudit2(string workContactId)
|
||||
{
|
||||
return db.Unqualified_WorkContactApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.WorkContactId == workContactId && (x.ApproveType == BLL.Const.WorkContact_Audit2 || x.ApproveType == BLL.Const.WorkContact_Audit2R));
|
||||
return Funs.DB.Unqualified_WorkContactApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.WorkContactId == workContactId && (x.ApproveType == BLL.Const.WorkContact_Audit2 || x.ApproveType == BLL.Const.WorkContact_Audit2R));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -158,7 +158,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static Model.Unqualified_WorkContactApprove GetAudit3(string workContactId)
|
||||
{
|
||||
return db.Unqualified_WorkContactApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.WorkContactId == workContactId && x.ApproveType == BLL.Const.WorkContact_Audit3);
|
||||
return Funs.DB.Unqualified_WorkContactApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.WorkContactId == workContactId && x.ApproveType == BLL.Const.WorkContact_Audit3);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -168,12 +168,12 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static Model.Unqualified_WorkContactApprove GetAudit4(string workContactId)
|
||||
{
|
||||
return db.Unqualified_WorkContactApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.WorkContactId == workContactId && (x.ApproveType == BLL.Const.WorkContact_Audit4 || x.ApproveType == BLL.Const.WorkContact_Audit1R));
|
||||
return Funs.DB.Unqualified_WorkContactApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.WorkContactId == workContactId && (x.ApproveType == BLL.Const.WorkContact_Audit4 || x.ApproveType == BLL.Const.WorkContact_Audit1R));
|
||||
}
|
||||
|
||||
public static Model.Unqualified_WorkContactApprove GetComplie(string workContactId)
|
||||
{
|
||||
return db.Unqualified_WorkContactApprove.FirstOrDefault(x => x.WorkContactId == workContactId && x.ApproveType == BLL.Const.WorkContact_Compile);
|
||||
return Funs.DB.Unqualified_WorkContactApprove.FirstOrDefault(x => x.WorkContactId == workContactId && x.ApproveType == BLL.Const.WorkContact_Compile);
|
||||
}
|
||||
public static Model.Unqualified_WorkContactApprove GetWorkContactApproveById(string WorkContactApproveId)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user