This commit is contained in:
2026-04-08 14:03:39 +08:00
parent 7ecbc2ebc0
commit 4a1b636ce0
353 changed files with 1378 additions and 500 deletions
@@ -10,7 +10,7 @@ namespace BLL
{
public class CheckControlApproveService
{
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 获取质量巡检模板列表
/// </summary>
@@ -19,6 +19,7 @@ namespace BLL
/// <returns></returns>
public static DataTable getListData(string CheckControlCode)
{
Model.CNPCDB db = Funs.DB;
var res = from x in db.Check_CheckControlApprove
where x.CheckControlCode == CheckControlCode && x.ApproveDate != null && x.ApproveType != "S"
orderby x.ApproveDate
@@ -80,6 +81,7 @@ namespace BLL
/// <returns></returns>
public static Model.Check_CheckControlApprove GetSee(string CheckControlCode, string userId)
{
Model.CNPCDB db = Funs.DB;
return 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)
@@ -101,6 +103,7 @@ namespace BLL
/// <returns>一个质量巡检审批实体</returns>
public static Model.Check_CheckControlApprove GetCheckControlApproveByCheckControlId(string CheckControlCode)
{
Model.CNPCDB db = Funs.DB;
return db.Check_CheckControlApprove.FirstOrDefault(x => x.CheckControlCode == CheckControlCode && x.ApproveType != "S" && x.ApproveDate == null);
}
/// <summary>
@@ -166,6 +169,7 @@ namespace BLL
/// <returns></returns>
public static Model.Check_CheckControlApprove GetAudit1(string CheckControlCode)
{
Model.CNPCDB db = Funs.DB;
return db.Check_CheckControlApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.CheckControlCode == CheckControlCode && x.ApproveType == BLL.Const.CheckControl_Audit1);
}
@@ -176,6 +180,7 @@ namespace BLL
/// <returns></returns>
public static Model.Check_CheckControlApprove GetAudit2(string CheckControlCode)
{
Model.CNPCDB db = Funs.DB;
return db.Check_CheckControlApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.CheckControlCode == CheckControlCode && x.ApproveType == BLL.Const.CheckControl_Audit2);
}
@@ -186,6 +191,7 @@ namespace BLL
/// <returns></returns>
public static Model.Check_CheckControlApprove GetAudit3(string CheckControlCode)
{
Model.CNPCDB db = Funs.DB;
return db.Check_CheckControlApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.CheckControlCode == CheckControlCode && x.ApproveType == BLL.Const.CheckControl_Audit3);
}
@@ -196,6 +202,7 @@ namespace BLL
/// <returns></returns>
public static Model.Check_CheckControlApprove GetAudit4(string CheckControlCode)
{
Model.CNPCDB db = Funs.DB;
return db.Check_CheckControlApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.CheckControlCode == CheckControlCode && x.ApproveType == BLL.Const.CheckControl_Audit4);
}
@@ -206,11 +213,13 @@ namespace BLL
/// <returns></returns>
public static Model.Check_CheckControlApprove GetAudit5(string CheckControlCode)
{
Model.CNPCDB db = Funs.DB;
return 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)
{
Model.CNPCDB db = Funs.DB;
return db.Check_CheckControlApprove.FirstOrDefault(x => x.CheckControlCode == CheckControlCode && x.ApproveType == BLL.Const.CheckControl_Compile);
}
public static List<Model.Check_CheckControlApprove> GetListDataByCodeForApi(string code)
+1 -1
View File
@@ -12,7 +12,7 @@ namespace BLL
{
public class CheckControlService
{
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 根据质量检查与控制Id删除一个质量检查与控制信息
/// </summary>
@@ -9,7 +9,7 @@ namespace BLL
{
public class CheckEquipmentApproveService
{
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 获取设计变更模板列表
@@ -19,6 +19,7 @@ namespace BLL
/// <returns></returns>
public static IEnumerable getListData(string CheckEquipmentId)
{
Model.CNPCDB db = Funs.DB;
return from x in db.Check_CheckEquipmentApprove
where x.CheckEquipmentId == CheckEquipmentId && x.ApproveDate != null
orderby x.ApproveDate
@@ -41,6 +42,7 @@ namespace BLL
/// <returns>一个设计变更审批实体</returns>
public static Model.Check_CheckEquipmentApprove GetCheckEquipmentApproveByCheckEquipmentId(string CheckEquipmentId)
{
Model.CNPCDB db = Funs.DB;
return db.Check_CheckEquipmentApprove.FirstOrDefault(x => x.CheckEquipmentId == CheckEquipmentId && x.ApproveDate == null);
}
@@ -51,16 +53,19 @@ namespace BLL
/// <returns>一个设计变更审批实体</returns>
public static Model.Check_CheckEquipmentApprove GetCheckEquipmentApproveByApproveId(string approveId)
{
Model.CNPCDB db = Funs.DB;
return db.Check_CheckEquipmentApprove.FirstOrDefault(x => x.CheckEquipmentApproveId == approveId);
}
public static Model.Check_CheckEquipmentApprove GetComplie(string CheckEquipmentId)
{
Model.CNPCDB db = Funs.DB;
return db.Check_CheckEquipmentApprove.FirstOrDefault(x => x.CheckEquipmentId == CheckEquipmentId && x.ApproveType == BLL.Const.CheckEquipment_Compile);
}
public static Model.Check_CheckEquipmentApprove GetApprove(string CheckEquipmentId)
{
Model.CNPCDB db = Funs.DB;
return db.Check_CheckEquipmentApprove.FirstOrDefault(x => x.CheckEquipmentId == CheckEquipmentId && x.ApproveType == BLL.Const.CheckEquipment_Approve);
}
@@ -71,6 +76,7 @@ namespace BLL
/// <returns>设计变更审批集合</returns>
public static List<Model.Check_CheckEquipmentApprove> GetCheckEquipmentApprovesByCheckEquipmentId(string CheckEquipmentId)
{
Model.CNPCDB db = Funs.DB;
return (from x in db.Check_CheckEquipmentApprove where x.CheckEquipmentId == CheckEquipmentId select x).ToList();
}
@@ -190,6 +196,7 @@ namespace BLL
}
public static List<Model.Check_CheckEquipmentApprove> getListDataByEid(string CheckEquipmentId)
{
Model.CNPCDB db = Funs.DB;
var q = from x in db.Check_CheckEquipmentApprove
where x.CheckEquipmentId == CheckEquipmentId && x.ApproveDate != null && x.ApproveType != "S"
orderby x.ApproveDate
+3 -2
View File
@@ -10,7 +10,7 @@ namespace BLL
{
public class CheckEquipmentService
{
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 记录数
@@ -24,7 +24,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>
/// 获取分页列表
@@ -34,6 +34,7 @@ namespace BLL
/// <returns></returns>
public static IEnumerable getListData(string projectId, string userId, string roleId, int startRowIndex, int maximumRows)
{
Model.CNPCDB db = Funs.DB;
IQueryable<Model.Check_CheckEquipment> q = qq;
if (!string.IsNullOrEmpty(projectId))
{
+1 -1
View File
@@ -12,7 +12,7 @@ namespace BLL
{
public class CheckFineService
{
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 根据质量检查与控制Id删除一个质量检查与控制信息
/// </summary>
+3 -2
View File
@@ -9,7 +9,7 @@ namespace BLL
{
public class CheckMonthService
{
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 记录数
@@ -23,7 +23,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>
/// 获取分页列表
@@ -35,6 +35,7 @@ namespace BLL
/// <returns></returns>
public static IEnumerable GetListData(string projectId, int startRowIndex, int maximumRows)
{
Model.CNPCDB db = Funs.DB;
IQueryable<Model.Check_CheckMonth> q = qq;
if (!string.IsNullOrEmpty(projectId))
{
+8 -1
View File
@@ -9,7 +9,7 @@ namespace BLL
{
public class DesignApproveService
{
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 获取设计变更模板列表
@@ -19,6 +19,7 @@ namespace BLL
/// <returns></returns>
public static IEnumerable getListData(string DesignId)
{
Model.CNPCDB db = Funs.DB;
return from x in db.Check_DesignApprove
where x.DesignId == DesignId && x.ApproveDate != null
orderby x.ApproveDate
@@ -41,6 +42,7 @@ namespace BLL
/// <returns>一个设计变更审批实体</returns>
public static Model.Check_DesignApprove GetDesignApproveByDesignId(string DesignId)
{
Model.CNPCDB db = Funs.DB;
return db.Check_DesignApprove.FirstOrDefault(x => x.DesignId == DesignId && x.ApproveDate == null);
}
@@ -51,21 +53,25 @@ namespace BLL
/// <returns>一个设计变更审批实体</returns>
public static Model.Check_DesignApprove GetDesignApproveByApproveId(string approveId)
{
Model.CNPCDB db = Funs.DB;
return db.Check_DesignApprove.FirstOrDefault(x => x.DesignApproveId == approveId);
}
public static Model.Check_DesignApprove GetComplie(string DesignId)
{
Model.CNPCDB db = Funs.DB;
return db.Check_DesignApprove.FirstOrDefault(x => x.DesignId == DesignId && x.ApproveType == BLL.Const.Design_Compile);
}
public static Model.Check_DesignApprove GetAuditMan(string DesignId, string state)
{
Model.CNPCDB db = Funs.DB;
return db.Check_DesignApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.DesignId == DesignId && x.ApproveType == state);
}
public static Model.Check_DesignApprove GetAudit2(string DesignId)
{
Model.CNPCDB db = Funs.DB;
return db.Check_DesignApprove.FirstOrDefault(x => x.DesignId == DesignId && x.ApproveType == BLL.Const.Design_Audit2);
}
@@ -76,6 +82,7 @@ namespace BLL
/// <returns>设计变更审批集合</returns>
public static List<Model.Check_DesignApprove> GetDesignApprovesByDesignId(string DesignId)
{
Model.CNPCDB db = Funs.DB;
return (from x in db.Check_DesignApprove where x.DesignId == DesignId select x).ToList();
}
+2 -2
View File
@@ -11,7 +11,7 @@ namespace BLL
{
public class DesignService
{
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 记录数
@@ -25,7 +25,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)
+4 -1
View File
@@ -9,13 +9,14 @@ namespace BLL
{
public class FileCabinetService
{
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 增加信息
/// </summary>
/// <param name="addFileCabinet">实体</param>
public static void AddFileCabinet(Model.Project_FileCabinet addFileCabinet)
{
Model.CNPCDB db = Funs.DB;
Model.Project_FileCabinet newFileCabinet = new Model.Project_FileCabinet
{
FileCabinetId = addFileCabinet.FileCabinetId,
@@ -59,6 +60,7 @@ namespace BLL
/// <returns></returns>
public static Model.Project_FileCabinet getInfo(string fileCabinetId)
{
Model.CNPCDB db = Funs.DB;
return db.Project_FileCabinet.FirstOrDefault(e => e.FileCabinetId == fileCabinetId);
}
/// <summary>
@@ -108,6 +110,7 @@ namespace BLL
/// <param name="updateFileCabinet">实体</param>
public static void UpdateFileCabinet(Model.Project_FileCabinet updateFileCabinet)
{
Model.CNPCDB db = Funs.DB;
Model.Project_FileCabinet getFileCabinet = db.Project_FileCabinet.FirstOrDefault(e => e.FileCabinetId == updateFileCabinet.FileCabinetId);
if (getFileCabinet != null)
{
@@ -9,7 +9,7 @@ namespace BLL
{
public class JointCheckApproveService
{
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 根据质量共检编号删除对应的所有质量共检审批信息
/// </summary>
@@ -29,6 +29,7 @@ namespace BLL
/// <returns></returns>
public static IEnumerable getListData(string JointCheckId)
{
Model.CNPCDB 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.CNPCDB 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.CNPCDB 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.CNPCDB 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.CNPCDB 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.CNPCDB 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.CNPCDB 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)
@@ -8,7 +8,7 @@ namespace BLL
{
public class MonthSpotCheckDetailService
{
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 获取月报质量验收情况模板列表
@@ -18,6 +18,7 @@ namespace BLL
/// <returns></returns>
public static IEnumerable getListData(string CheckMonthId)
{
Model.CNPCDB db = Funs.DB;
return from x in db.Check_MonthSpotCheckDetail
where x.CheckMonthId == CheckMonthId
select new
@@ -9,7 +9,7 @@ namespace BLL
{
public class SpecialEquipmentDetailService
{
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 获取月报特种设备信息模板列表
@@ -19,6 +19,7 @@ namespace BLL
/// <returns></returns>
public static IEnumerable getListData(string CheckMonthId)
{
Model.CNPCDB db = Funs.DB;
return from x in db.Check_SpecialEquipmentDetail
where x.CheckMonthId == CheckMonthId
select new
+11 -1
View File
@@ -8,7 +8,7 @@ namespace BLL
{
public class SpotCheckApproveService
{
public static Model.CNPCDB db = Funs.DB;
public static Model.Check_SpotCheckApprove GetSpotApproveBySpotCheckDetailId(string spotCheckDetailId)
{
@@ -35,6 +35,7 @@ namespace BLL
/// <returns></returns>
public static IEnumerable getListData(string SpotCheckCode)
{
Model.CNPCDB db = Funs.DB;
return from x in db.Check_SpotCheckApprove
where x.SpotCheckCode == SpotCheckCode && x.ApproveDate != null && x.ApproveType != "S" && x.Sign == "1"
orderby x.ApproveDate
@@ -58,6 +59,7 @@ namespace BLL
/// <returns></returns>
public static IEnumerable getList(string SpotCheckCode)
{
Model.CNPCDB db = Funs.DB;
return from x in db.Check_SpotCheckApprove
where x.SpotCheckCode == SpotCheckCode && x.ApproveDate != null && x.ApproveType != "S" && x.Sign == "2"
orderby x.ApproveDate
@@ -80,6 +82,7 @@ namespace BLL
/// <returns>一个实体验收审批实体</returns>
public static Model.Check_SpotCheckApprove GetSpotCheckApproveBySpotCheckCode(string SpotCheckCode)
{
Model.CNPCDB db = Funs.DB;
return db.Check_SpotCheckApprove.FirstOrDefault(x => x.SpotCheckCode == SpotCheckCode && x.ApproveDate == null && x.Sign == "1" && x.ApproveType != "S");
}
@@ -90,11 +93,13 @@ namespace BLL
/// <returns>一个实体验收审批实体</returns>
public static Model.Check_SpotCheckApprove GetSpotCheckApproveByApproveId(string approveId)
{
Model.CNPCDB db = Funs.DB;
return db.Check_SpotCheckApprove.FirstOrDefault(x => x.SpotCheckApproveId == approveId);
}
public static Model.Check_SpotCheckApprove GetComplie(string SpotCheckCode)
{
Model.CNPCDB db = Funs.DB;
return db.Check_SpotCheckApprove.FirstOrDefault(x => x.SpotCheckCode == SpotCheckCode && x.ApproveType == BLL.Const.SpotCheck_Compile);
}
public static Model.Check_SpotCheckApprove GetComplieForApi(string SpotCheckCode)
@@ -107,6 +112,7 @@ namespace BLL
public static Model.Check_SpotCheckApprove GetSee(string SpotCheckCode, string userId)
{
Model.CNPCDB db = Funs.DB;
return 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)
@@ -123,11 +129,13 @@ namespace BLL
}
public static Model.Check_SpotCheckApprove GetAudit2(string SpotCheckCode)
{
Model.CNPCDB db = Funs.DB;
return db.Check_SpotCheckApprove.FirstOrDefault(x => x.SpotCheckCode == SpotCheckCode && x.ApproveType == BLL.Const.SpotCheck_Audit2);
}
public static Model.Check_SpotCheckApprove GetReCompile(string SpotCheckCode)
{
Model.CNPCDB db = Funs.DB;
return db.Check_SpotCheckApprove.FirstOrDefault(x => x.SpotCheckCode == SpotCheckCode && x.ApproveType == BLL.Const.SpotCheck_ReCompile);
}
@@ -138,6 +146,7 @@ namespace BLL
/// <returns>实体验收审批集合</returns>
public static List<Model.Check_SpotCheckApprove> GetSpotCheckApprovesBySpotCheckCode(string SpotCheckCode)
{
Model.CNPCDB db = Funs.DB;
return (from x in db.Check_SpotCheckApprove where x.SpotCheckCode == SpotCheckCode select x).ToList();
}
@@ -226,6 +235,7 @@ namespace BLL
}
public static List<Model.Check_SpotCheckApprove> getListDataBySpotCheckCodeForApi(string SpotCheckCode)
{
Model.CNPCDB db = Funs.DB;
var q = from x in db.Check_SpotCheckApprove
where x.SpotCheckCode == SpotCheckCode && x.ApproveDate != null && x.ApproveType != "S" && x.Sign == "1"
orderby x.ApproveDate
@@ -9,7 +9,7 @@ namespace BLL
{
public class SpotCheckDetailService
{
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 获取实体验收记录明细
@@ -19,6 +19,7 @@ namespace BLL
/// <returns></returns>
public static IEnumerable getListData(string SpotCheckCode)
{
Model.CNPCDB db = Funs.DB;
return from x in db.Check_SpotCheckDetail
where x.SpotCheckCode == SpotCheckCode
select new
+1 -1
View File
@@ -11,7 +11,7 @@ namespace BLL
{
public class SpotCheckService
{
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 添加实体验收记录
@@ -9,9 +9,10 @@ namespace BLL
{
public class TechnicalContactListApproveService
{
public static Model.CNPCDB db = Funs.DB;
public static Model.Check_TechnicalContactListApprove GetSee(string TechnicalContactListId, string userId)
{
Model.CNPCDB db = Funs.DB;
return 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)
@@ -58,6 +59,7 @@ namespace BLL
/// <returns></returns>
public static Model.Check_TechnicalContactListApprove GetApprove(string TechnicalContactListId)
{
Model.CNPCDB db = Funs.DB;
return db.Check_TechnicalContactListApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.TechnicalContactListId == TechnicalContactListId && x.ApproveType == BLL.Const.TechnicalContactList_Audit1);
}
@@ -127,6 +129,7 @@ namespace BLL
/// <returns>一个工程联络单审批实体</returns>
public static Model.Check_TechnicalContactListApprove GetTechnicalContactListApproveByTechnicalContactListId(string TechnicalContactListId)
{
Model.CNPCDB db = Funs.DB;
return db.Check_TechnicalContactListApprove.FirstOrDefault(x => x.TechnicalContactListId == TechnicalContactListId && x.ApproveDate == null && x.ApproveType != "S");
}
/// <summary>
@@ -136,6 +139,7 @@ namespace BLL
/// <returns>一个工程联络单审批实体</returns>
public static Model.Check_TechnicalContactListApprove GetTechnicalContactListApproveByApproveId(string approveId)
{
Model.CNPCDB db = Funs.DB;
return db.Check_TechnicalContactListApprove.FirstOrDefault(x => x.TechnicalContactListApproveId == approveId);
}
public static Model.Check_TechnicalContactListApprove GetTechnicalContactListApproveByApproveIdForApi(string approveId)
@@ -147,6 +151,7 @@ namespace BLL
}
public static Model.Check_TechnicalContactListApprove GetComplie(string TechnicalContactListId)
{
Model.CNPCDB db = Funs.DB;
return db.Check_TechnicalContactListApprove.FirstOrDefault(x => x.TechnicalContactListId == TechnicalContactListId && x.ApproveType == BLL.Const.TechnicalContactList_Compile);
}
@@ -157,6 +162,7 @@ namespace BLL
/// <returns></returns>
public static Model.Check_TechnicalContactListApprove GetApprove2(string TechnicalContactListId)
{
Model.CNPCDB db = Funs.DB;
return db.Check_TechnicalContactListApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.TechnicalContactListId == TechnicalContactListId && x.ApproveType == BLL.Const.TechnicalContactList_Audit3);
}
@@ -167,6 +173,7 @@ namespace BLL
/// <returns></returns>
public static Model.Check_TechnicalContactListApprove GetApprove3(string TechnicalContactListId)
{
Model.CNPCDB db = Funs.DB;
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));
}
@@ -177,6 +184,7 @@ namespace BLL
/// <returns></returns>
public static Model.Check_TechnicalContactListApprove GetApprove5(string TechnicalContactListId)
{
Model.CNPCDB db = Funs.DB;
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));
}
@@ -187,6 +195,7 @@ namespace BLL
/// <returns></returns>
public static Model.Check_TechnicalContactListApprove GetApprove4(string TechnicalContactListId)
{
Model.CNPCDB db = Funs.DB;
return 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)
@@ -11,7 +11,7 @@ namespace BLL
{
public class TechnicalContactListService
{
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 根据工程联络单信息Id删除一个工程联络单信息信息
@@ -402,7 +402,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>
/// 获取分页列表
@@ -12,7 +12,7 @@ namespace BLL
/// </summary>
public static class DataDistributionService
{
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 记录数
@@ -35,6 +35,7 @@ namespace BLL
/// <returns></returns>
public static IEnumerable GetListData(string projectId, string startDate, string endDate, string fileCode, string fileName, string cNProfessionalId, int startRowIndex, int maximumRows)
{
Model.CNPCDB db = Funs.DB;
IQueryable<Model.Comprehensive_DataDistribution> q = from x in db.Comprehensive_DataDistribution
where x.ProjectId == projectId
orderby x.SendDate descending
@@ -11,7 +11,7 @@ namespace BLL
/// </summary>
public static class DataReceivingService
{
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 记录数
@@ -34,6 +34,7 @@ namespace BLL
/// <returns></returns>
public static IEnumerable GetListData(string projectId, string startDate, string endDate, string fileCode, string fileName, int startRowIndex, int maximumRows)
{
Model.CNPCDB db = Funs.DB;
IQueryable<Model.Comprehensive_DataReceiving> q = from x in db.Comprehensive_DataReceiving
where x.ProjectId == projectId
orderby x.DataReceivingDate descending
@@ -11,7 +11,7 @@ namespace BLL
/// </summary>
public static class DesignChangeOrderService
{
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 记录数
@@ -34,6 +34,7 @@ namespace BLL
/// <returns></returns>
public static IEnumerable GetListData(string projectId, string cNProfessionalId, string contents, string startDate, string endDate, int startRowIndex, int maximumRows)
{
Model.CNPCDB db = Funs.DB;
IQueryable<Model.Comprehensive_DesignChangeOrder> q = from x in db.Comprehensive_DesignChangeOrder
where x.ProjectId == projectId
orderby x.ChangeOrderCode descending
@@ -88,6 +89,7 @@ namespace BLL
}
public static IEnumerable GetListDataForDataType(string installtionId,string projectId, string cNProfessionalId, string contents, string startDate, string endDate, int startRowIndex, int maximumRows)
{
Model.CNPCDB db = Funs.DB;
IQueryable<Model.Comprehensive_DesignChangeOrder> q = from x in db.Comprehensive_DesignChangeOrder
where x.ProjectId == projectId
orderby x.ChangeOrderCode descending
@@ -11,7 +11,7 @@ namespace BLL
/// </summary>
public static class DesignDetailsService
{
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 记录数
@@ -32,6 +32,7 @@ namespace BLL
/// <returns></returns>
public static IEnumerable GetListData(string projectId, string cNProfessionalId, int startRowIndex, int maximumRows)
{
Model.CNPCDB db = Funs.DB;
IQueryable<Model.Comprehensive_DesignDetails> q = from x in db.Comprehensive_DesignDetails
where x.ProjectId == projectId
orderby x.DetailsDate descending
@@ -62,6 +63,7 @@ namespace BLL
public static IEnumerable GetListDataForDataType(string UnitWorkId, string projectId, string cNProfessionalId, int startRowIndex, int maximumRows)
{
Model.CNPCDB db = Funs.DB;
IQueryable<Model.Comprehensive_DesignDetails> q = from x in db.Comprehensive_DesignDetails
where x.ProjectId == projectId
orderby x.DetailsDate descending
@@ -11,7 +11,7 @@ namespace BLL
/// </summary>
public static class DesignDrawingsService
{
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 记录数
@@ -31,6 +31,7 @@ namespace BLL
/// <returns></returns>
public static IEnumerable GetListData(string projectId, string cnProfessionalId, string startDate, string endDate, string sendstartDate, string sendendDate, int startRowIndex, int maximumRows)
{
Model.CNPCDB db = Funs.DB;
IQueryable<Model.Comprehensive_DesignDrawings> q = from x in db.Comprehensive_DesignDrawings
where x.ProjectId == projectId
orderby x.RemarkCode
@@ -12,7 +12,7 @@ namespace BLL
/// </summary>
public static class FinalFileService
{
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 记录数
@@ -11,7 +11,7 @@ namespace BLL
/// </summary>
public static class GeneralPlanApprovalItemService
{
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 记录数
@@ -31,6 +31,7 @@ namespace BLL
/// <returns></returns>
public static IEnumerable GetListData(string generalPlanApprovalId, int startRowIndex, int maximumRows)
{
Model.CNPCDB db = Funs.DB;
IQueryable<Model.Comprehensive_GeneralPlanApprovalItem> q = from x in db.Comprehensive_GeneralPlanApprovalItem
where x.GeneralPlanApprovalId == generalPlanApprovalId
orderby x.SubmitDate descending
@@ -11,7 +11,7 @@ namespace BLL
/// </summary>
public static class GeneralPlanApprovalService
{
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 记录数
@@ -33,6 +33,7 @@ namespace BLL
/// <returns></returns>
public static IEnumerable GetListData(string projectId, string unitId, string cNProfessionalId,string UnitWorkId, int startRowIndex, int maximumRows)
{
Model.CNPCDB db = Funs.DB;
IQueryable<Model.Comprehensive_GeneralPlanApproval> q = from x in db.Comprehensive_GeneralPlanApproval
where x.ProjectId == projectId
orderby x.ApprovalDate descending
@@ -12,7 +12,7 @@ namespace BLL
/// </summary>
public class InspectionEquipmentService
{
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 记录数
@@ -36,6 +36,7 @@ namespace BLL
/// <returns></returns>
public static IEnumerable GetListData(string projectId, string unitId, string inspectionName, string startDate, string endDate, int startRowIndex, int maximumRows)
{
Model.CNPCDB db = Funs.DB;
IQueryable<Model.Comprehensive_InspectionEquipment> q = from x in db.Comprehensive_InspectionEquipment
where x.ProjectId == projectId
orderby x.RemarkCode
@@ -11,7 +11,7 @@ namespace BLL
/// </summary>
public static class InspectionMachineService
{
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 记录数
@@ -32,6 +32,7 @@ namespace BLL
/// <returns></returns>
public static IEnumerable GetListData(string projectId, string unitId, string cnProfessionalId, string inspectionType, int startRowIndex, int maximumRows)
{
Model.CNPCDB db = Funs.DB;
IQueryable<Model.Comprehensive_InspectionMachine> q = from x in db.Comprehensive_InspectionMachine
where x.ProjectId == projectId
orderby x.InspectionMachineCode descending
@@ -12,7 +12,7 @@ namespace BLL
/// </summary>
public static class InspectionPersonService
{
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 记录数
@@ -11,7 +11,7 @@ namespace BLL
/// </summary>
public static class MajorPlanApprovalItemService
{
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 记录数
@@ -31,6 +31,7 @@ namespace BLL
/// <returns></returns>
public static IEnumerable GetListData(string majorPlanApprovalId, int startRowIndex, int maximumRows)
{
Model.CNPCDB db = Funs.DB;
IQueryable<Model.Comprehensive_MajorPlanApprovalItem> q = from x in db.Comprehensive_MajorPlanApprovalItem
where x.MajorPlanApprovalId == majorPlanApprovalId
orderby x.SubmitDate descending
@@ -11,7 +11,7 @@ namespace BLL
/// </summary>
public static class MajorPlanApprovalService
{
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 记录数
@@ -33,6 +33,7 @@ namespace BLL
/// <returns></returns>
public static IEnumerable GetListData(string projectId, string unitId, string cNProfessionalId, string UnitWorkId, int startRowIndex, int maximumRows)
{
Model.CNPCDB db = Funs.DB;
IQueryable<Model.Comprehensive_MajorPlanApproval> q = from x in db.Comprehensive_MajorPlanApproval
where x.ProjectId == projectId
orderby x.ApprovalDate descending
@@ -11,7 +11,7 @@ namespace BLL
/// </summary>
public static class NCRManagementService
{
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 记录数
@@ -30,6 +30,7 @@ namespace BLL
/// <returns></returns>
public static IEnumerable GetListData(string projectId, string sendUnit, string cnProfessionalId, string startDate, string endDate, int startRowIndex, int maximumRows)
{
Model.CNPCDB db = Funs.DB;
IQueryable<Model.Comprehensive_NCRManagement> q = from x in db.Comprehensive_NCRManagement
where x.ProjectId == projectId
orderby x.IssuedDate descending
@@ -11,7 +11,7 @@ namespace BLL
/// </summary>
public static class PressurePipeService
{
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 记录数
@@ -34,6 +34,7 @@ namespace BLL
/// <returns></returns>
public static IEnumerable GetListData(string projectId, string unitId, int startRowIndex, int maximumRows)
{
Model.CNPCDB db = Funs.DB;
IQueryable<Model.Comprehensive_PressurePipe> q = from x in db.Comprehensive_PressurePipe
where x.Projctid == projectId
select x;
@@ -11,7 +11,7 @@ namespace BLL
/// </summary>
public static class QualityAccidentService
{
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 记录数
@@ -34,6 +34,7 @@ namespace BLL
/// <returns></returns>
public static IEnumerable GetListData(string ProjectId, int startRowIndex, int maximumRows)
{
Model.CNPCDB db = Funs.DB;
IQueryable<Model.Comprehensive_QualityAccident> q = from x in db.Comprehensive_QualityAccident
where x.ProjectId == ProjectId
select x;
@@ -11,7 +11,7 @@ namespace BLL
/// </summary>
public static class SiteVisaManagementService
{
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 记录数
@@ -35,6 +35,7 @@ namespace BLL
/// <returns></returns>
public static IEnumerable GetListData(string projectId, string unitId, string cNProfessionalId, string startDate, string endDate, int startRowIndex, int maximumRows)
{
Model.CNPCDB db = Funs.DB;
IQueryable<Model.Comprehensive_SiteVisaManagement> q = from x in db.Comprehensive_SiteVisaManagement
where x.ProjectId == projectId
orderby x.VisaDate descending
@@ -11,7 +11,7 @@ namespace BLL
/// </summary>
public static class SpecialEquipmentServices
{
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 记录数
@@ -34,6 +34,7 @@ namespace BLL
/// <returns></returns>
public static IEnumerable GetListData(string projectId, string unitId, string equipmentId,int startRowIndex, int maximumRows)
{
Model.CNPCDB db = Funs.DB;
IQueryable<Model.View_Comprehensive_SpecialEquipment> q = from x in db.View_Comprehensive_SpecialEquipment
where x.ProjectId == projectId
orderby x.UnitName descending
@@ -10,7 +10,7 @@ namespace BLL
{
public class CQMSConstructionLogApproveService
{
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 获取质量巡检模板列表
/// </summary>
@@ -19,6 +19,7 @@ namespace BLL
/// <returns></returns>
public static DataTable getListData(string ConstructionLogId)
{
Model.CNPCDB db = Funs.DB;
var res = from x in db.CQMS_ConstructionLogApprove
where x.ConstructionLogId == ConstructionLogId && x.ApproveDate != null && x.ApproveType != "S"
orderby x.ApproveDate
@@ -79,6 +80,7 @@ namespace BLL
/// <returns></returns>
public static Model.CQMS_ConstructionLogApprove GetSee(string ConstructionLogId, string userId)
{
Model.CNPCDB db = Funs.DB;
return db.CQMS_ConstructionLogApprove.FirstOrDefault(x => x.ConstructionLogId == ConstructionLogId && x.ApproveType == "S" && x.ApproveMan == userId && x.ApproveDate == null);
}
public static void See(string ConstructionLogId, string userId)
@@ -100,6 +102,7 @@ namespace BLL
/// <returns>一个质量巡检审批实体</returns>
public static Model.CQMS_ConstructionLogApprove GetConstructionLogApproveByConstructionLogId(string ConstructionLogId)
{
Model.CNPCDB db = Funs.DB;
return db.CQMS_ConstructionLogApprove.FirstOrDefault(x => x.ConstructionLogId == ConstructionLogId && x.ApproveType != "S" && x.ApproveDate == null);
}
/// <summary>
@@ -165,11 +168,13 @@ namespace BLL
/// <returns></returns>
public static Model.CQMS_ConstructionLogApprove GetAudit(string ConstructionLogId)
{
Model.CNPCDB db = Funs.DB;
return db.CQMS_ConstructionLogApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.ConstructionLogId == ConstructionLogId && x.ApproveType == BLL.Const.ConstructionLog_Audit);
}
public static Model.CQMS_ConstructionLogApprove GetComplie(string ConstructionLogId)
{
Model.CNPCDB db = Funs.DB;
return db.CQMS_ConstructionLogApprove.FirstOrDefault(x => x.ConstructionLogId == ConstructionLogId && x.ApproveType == BLL.Const.ConstructionLog_Compile);
}
@@ -12,7 +12,7 @@ namespace BLL
/// </summary>
public static class CQMSConstructionLogImageProgressService
{
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 根据主键获取项目级施工日志
@@ -12,7 +12,7 @@ namespace BLL
/// </summary>
public static class CQMSConstructionLogItemService
{
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 根据主键获取项目级施工日志
@@ -12,7 +12,7 @@ namespace BLL
/// </summary>
public static class CQMSConstructionLogService
{
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 根据主键获取项目级施工日志
@@ -9,7 +9,7 @@ namespace BLL
{
public class DataTypeProjectService
{
//public static Model.CNPCDB db = Funs.DB;
//
/// <summary>
/// 记录数
@@ -8,7 +8,7 @@ namespace BLL
{
public class ContactSheetApproveService
{
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 根据设计变更编号获取一个设计变更审批信息
/// </summary>
@@ -16,6 +16,7 @@ namespace BLL
/// <returns>一个设计变更审批实体</returns>
public static Model.CQMS_Information_ContactSheetApprove GetDesignApproveByContactSheetId(string contactSheetId)
{
Model.CNPCDB db = Funs.DB;
return db.CQMS_Information_ContactSheetApprove.FirstOrDefault(x => x.ContactSheetId == contactSheetId && x.AuditDate == null);
}
@@ -26,11 +27,13 @@ namespace BLL
/// <returns>一个设计变更审批实体</returns>
public static Model.CQMS_Information_ContactSheetApprove GetDesignApproveByApproveId(string contactSheetAuditId)
{
Model.CNPCDB db = Funs.DB;
return db.CQMS_Information_ContactSheetApprove.FirstOrDefault(x => x.ContactSheetAuditId == contactSheetAuditId);
}
public static Model.CQMS_Information_ContactSheetApprove GetComplie(string contactSheetAuditId)
{
Model.CNPCDB db = Funs.DB;
return db.CQMS_Information_ContactSheetApprove.FirstOrDefault(x => x.ContactSheetAuditId == contactSheetAuditId && x.HandleStep == BLL.Const.ContactSheet_AuditCompleted );
}
@@ -71,6 +74,7 @@ namespace BLL
}
public static Model.CQMS_Information_ContactSheetApprove GetAuditMan(string ContactSheetId, string state)
{
Model.CNPCDB db = Funs.DB;
return db.CQMS_Information_ContactSheetApprove.OrderByDescending(x => x.AuditDate).FirstOrDefault(x => x.ContactSheetId == ContactSheetId && x.HandleStep == state);
}
@@ -10,7 +10,7 @@ namespace BLL
/// </summary>
public static class ComprehensiveService
{
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 根据主键获取本周(月)报综合信息
@@ -10,7 +10,7 @@ namespace BLL
/// </summary>
public static class ConstructionProblemsService
{
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 根据主键获取施工过程问题
@@ -10,7 +10,7 @@ namespace BLL
/// </summary>
public static class NextQualityControlService
{
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 根据主键获取下周质量控制点
@@ -10,7 +10,7 @@ namespace BLL
/// </summary>
public static class QualityGoalService
{
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 根据主键获取本周(月)报综合信息
@@ -10,7 +10,7 @@ namespace BLL
/// </summary>
public static class RowMaterialProblemService
{
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 根据主键获取原材料问题
@@ -29,6 +29,7 @@ namespace BLL
/// <returns></returns>
public static List<Model.Report_RowMaterialProblem> GetRowMaterialProblemByReportId(string reportId)
{
Model.CNPCDB db = Funs.DB;
return (from x in db.Report_RowMaterialProblem where x.ReportId == reportId select x).ToList();
}
@@ -10,7 +10,7 @@ namespace BLL
/// </summary>
public static class ThisWeekOrMonthContentService
{
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 根据主键获取本周主要工作内容
@@ -8,7 +8,7 @@ namespace BLL
{
public static class WeekAndMonthReportService
{
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 记录数
@@ -29,6 +29,7 @@ namespace BLL
/// <returns></returns>
public static IEnumerable GetListData(string projectId, string reportType, int startRowIndex, int maximumRows)
{
Model.CNPCDB db = Funs.DB;
IQueryable<Model.Report_WeekAndMonthReport> q = from x in db.Report_WeekAndMonthReport
where x.ProjectId == projectId
&& x.ReportType == reportType
@@ -9,7 +9,7 @@ namespace BLL
public static class HotProessManageService
{
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 记录数
@@ -33,6 +33,7 @@ namespace BLL
/// <returns></returns>
public static IEnumerable GetListData(string projectId, string pipelineManageCode,string jointInfoCode, string hotProessReportCode, string hotHardManageCode, int startRowIndex, int maximumRows)
{
Model.CNPCDB db = Funs.DB;
IQueryable<Model.ProcessControl_HotProessManage> q = from x in db.ProcessControl_HotProessManage
where x.ProjectId == projectId
orderby x.HotHardManageCode descending
@@ -9,7 +9,7 @@ namespace BLL
{
public class InspectionManagementDetailService
{
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 获取共检记录明细
@@ -19,6 +19,7 @@ namespace BLL
/// <returns></returns>
public static IEnumerable getListData(string InspectionId)
{
Model.CNPCDB db = Funs.DB;
return from x in db.ProcessControl_InspectionManagementDetail
where x.InspectionId == InspectionId
select new
@@ -12,7 +12,7 @@ namespace BLL
/// </summary>
public static class InspectionManagementService
{
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 记录数
@@ -36,6 +36,7 @@ namespace BLL
/// <returns></returns>
public static IEnumerable GetListData(string projectId, string UnitWorkId, string cNProfessionalId, string startDate, string endDate, int startRowIndex, int maximumRows)
{
Model.CNPCDB db = Funs.DB;
IQueryable<Model.ProcessControl_InspectionManagement> q = from x in db.ProcessControl_InspectionManagement
where x.ProjectId == projectId && x.FileType == null
orderby x.InspectionDate descending
@@ -80,6 +81,7 @@ namespace BLL
}
public static IEnumerable GetListDataForDataType(string controlPointType, string projectId, string UnitWorkId, string cNProfessionalId, string startDate, string endDate, int startRowIndex, int maximumRows)
{
Model.CNPCDB db = Funs.DB;
IQueryable<Model.ProcessControl_InspectionManagement> q = from x in db.ProcessControl_InspectionManagement
where x.ProjectId == projectId && x.FileType == null
orderby x.InspectionDate descending
@@ -11,7 +11,7 @@ namespace BLL
/// </summary>
public static class NondestructiveTestService
{
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 记录数
@@ -11,7 +11,7 @@ namespace BLL
/// </summary>
public static class TestPackageManagementService
{
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 记录数
@@ -33,6 +33,7 @@ namespace BLL
/// <returns></returns>
public static IEnumerable GetListData(string projectId, string UnitWorkId, string completedState, int startRowIndex, int maximumRows)
{
Model.CNPCDB db = Funs.DB;
IQueryable<Model.ProcessControl_TestPackageManagement> q = from x in db.ProcessControl_TestPackageManagement
where x.ProjectId == projectId
orderby x.TestPackageManagementCode descending
@@ -9,7 +9,7 @@ namespace BLL
{
public class WorkContactApproveService
{
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 获取分页列表
@@ -17,6 +17,7 @@ namespace BLL
/// <returns></returns>
public static IEnumerable getListData(string workContactId)
{
Model.CNPCDB db = Funs.DB;
return from x in db.Unqualified_WorkContactApprove
where x.WorkContactId == workContactId && x.ApproveDate != null && x.ApproveType != "S"
orderby x.ApproveDate
@@ -92,6 +93,7 @@ namespace BLL
}
public static Model.Unqualified_WorkContactApprove GetSee(string WorkContactId, string userId)
{
Model.CNPCDB db = Funs.DB;
return 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)
@@ -113,6 +115,7 @@ namespace BLL
/// <returns>一个工作联系单审批实体</returns>
public static Model.Unqualified_WorkContactApprove GetWorkContactApproveByWorkContactId(string noticeId)
{
Model.CNPCDB db = Funs.DB;
return db.Unqualified_WorkContactApprove.FirstOrDefault(x => x.WorkContactId == noticeId && x.ApproveDate == null && x.ApproveType != "S");
}
/// <summary>
@@ -140,6 +143,7 @@ namespace BLL
/// <returns></returns>
public static Model.Unqualified_WorkContactApprove GetAudit1(string workContactId)
{
Model.CNPCDB db = Funs.DB;
return db.Unqualified_WorkContactApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.WorkContactId == workContactId && x.ApproveType == BLL.Const.WorkContact_Audit1);
}
@@ -150,6 +154,7 @@ namespace BLL
/// <returns></returns>
public static Model.Unqualified_WorkContactApprove GetAudit2(string workContactId)
{
Model.CNPCDB db = Funs.DB;
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));
}
@@ -160,6 +165,7 @@ namespace BLL
/// <returns></returns>
public static Model.Unqualified_WorkContactApprove GetAudit3(string workContactId)
{
Model.CNPCDB db = Funs.DB;
return db.Unqualified_WorkContactApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.WorkContactId == workContactId && x.ApproveType == BLL.Const.WorkContact_Audit3);
}
@@ -170,11 +176,13 @@ namespace BLL
/// <returns></returns>
public static Model.Unqualified_WorkContactApprove GetAudit4(string workContactId)
{
Model.CNPCDB db = Funs.DB;
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));
}
public static Model.Unqualified_WorkContactApprove GetComplie(string workContactId)
{
Model.CNPCDB db = Funs.DB;
return db.Unqualified_WorkContactApprove.FirstOrDefault(x => x.WorkContactId == workContactId && x.ApproveType == BLL.Const.WorkContact_Compile);
}
public static Model.Unqualified_WorkContactApprove GetWorkContactApproveById(string WorkContactApproveId)
@@ -9,14 +9,14 @@ namespace BLL
{
public class BreakdownProjectAuditRecordService
{
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 定义变量
/// </summary>
private static IQueryable<Model.WBS_BreakdownProjectAuditRecord> qq = from x in db.WBS_BreakdownProjectAuditRecord orderby x.CreateDate select x;
private static IQueryable<Model.WBS_BreakdownProjectAuditRecord> qq = from x in Funs.DB.WBS_BreakdownProjectAuditRecord orderby x.CreateDate select x;
public static Model.WBS_BreakdownProjectAuditRecord GetBreakdownProjectAuditRecordById(string id)
{
+4 -4
View File
@@ -9,7 +9,7 @@ namespace BLL
{
public class BreakdownProjectService
{
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 记录数
@@ -41,7 +41,7 @@ namespace BLL
/// <summary>
/// 定义变量
/// </summary>
private static IQueryable<Model.WBS_BreakdownProject> qq = from x in db.WBS_BreakdownProject orderby x.SortIndex select x;
private static IQueryable<Model.WBS_BreakdownProject> qq = from x in Funs.DB.WBS_BreakdownProject orderby x.SortIndex select x;
/// <summary>
/// 获取项目列表
@@ -108,7 +108,7 @@ namespace BLL
/// <summary>
/// 定义变量
/// </summary>
private static IQueryable<Model.View_WBS> qq2 = from x in db.View_WBS select x;
private static IQueryable<Model.View_WBS> qq2 = from x in Funs.DB.View_WBS select x;
/// <summary>
/// 获取项目已选择的WBS列表
@@ -164,7 +164,7 @@ namespace BLL
/// <summary>
/// 定义变量
/// </summary>
private static IQueryable<Model.View_WBS_BreakdownProject> qq3 = from x in db.View_WBS_BreakdownProject orderby x.SortIndex select x;
private static IQueryable<Model.View_WBS_BreakdownProject> qq3 = from x in Funs.DB.View_WBS_BreakdownProject orderby x.SortIndex select x;
/// <summary>
/// 获取项目列表
+2 -2
View File
@@ -9,7 +9,7 @@ namespace BLL
{
public class BreakdownService
{
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 记录数
@@ -23,7 +23,7 @@ namespace BLL
/// <summary>
/// 定义变量
/// </summary>
private static IQueryable<Model.WBS_Breakdown> qq = from x in db.WBS_Breakdown orderby x.SortIndex select x;
private static IQueryable<Model.WBS_Breakdown> qq = from x in Funs.DB.WBS_Breakdown orderby x.SortIndex select x;
/// <summary>
/// 获取项目列表
+2 -2
View File
@@ -9,7 +9,7 @@ namespace BLL
{
public class DivisionProjectService
{
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 记录数
@@ -23,7 +23,7 @@ namespace BLL
/// <summary>
/// 定义变量
/// </summary>
private static IQueryable<Model.WBS_DivisionProject> qq = from x in db.WBS_DivisionProject orderby x.SortIndex select x;
private static IQueryable<Model.WBS_DivisionProject> qq = from x in Funs.DB.WBS_DivisionProject orderby x.SortIndex select x;
/// <summary>
/// 获取项目列表
+2 -2
View File
@@ -9,7 +9,7 @@ namespace BLL
{
public class DivisionService
{
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 记录数
@@ -23,7 +23,7 @@ namespace BLL
/// <summary>
/// 定义变量
/// </summary>
private static IQueryable<Model.WBS_Division> qq = from x in db.WBS_Division orderby x.SortIndex select x;
private static IQueryable<Model.WBS_Division> qq = from x in Funs.DB.WBS_Division orderby x.SortIndex select x;
/// <summary>
/// 获取项目列表
+7 -2
View File
@@ -10,7 +10,7 @@ namespace BLL
{
public class ProjectQualityService
{
public static Model.CNPCDB db = Funs.DB;
/// <summary>
@@ -39,6 +39,7 @@ namespace BLL
/// <returns></returns>
public static Model.WBS_ProjectQuality GetProjectQualityModel(string ProjectQualityId)
{
Model.CNPCDB db = Funs.DB;
var model = db.WBS_ProjectQuality.FirstOrDefault(c => c.ProjectQualityId == ProjectQualityId);
return model;
}
@@ -51,6 +52,7 @@ namespace BLL
/// <returns></returns>
public static bool UpdateProjectQuality(Model.WBS_ProjectQuality model)
{
Model.CNPCDB db = Funs.DB;
bool isok = true;
try
{
@@ -91,7 +93,7 @@ namespace BLL
/// <returns></returns>
public static bool DelProjectQuality(string id)
{
Model.CNPCDB db = Funs.DB;
bool isok = true;
try
{
@@ -163,6 +165,7 @@ namespace BLL
/// <returns></returns>
public static List<dynamic> GetGroupProjectQualityDes(string projectName)
{
Model.CNPCDB db = Funs.DB;
var list = db.WBS_ProjectQuality.Where(c => c.ProjectName == projectName).GroupBy(c => c.ProjectQualityDes).Select(c => new
{
QuestionDef = c.Key,
@@ -180,6 +183,7 @@ namespace BLL
/// <returns></returns>
public static List<dynamic> GetGroupProjectQualityDes(List<string> projectNames)
{
Model.CNPCDB db = Funs.DB;
var list = db.WBS_ProjectQuality.Where(c => projectNames.Contains(c.ProjectName)).GroupBy(c => c.ProjectQualityDes).Select(c => new
{
QuestionDef = c.Key,
@@ -194,6 +198,7 @@ namespace BLL
/// <returns></returns>
public static List<dynamic> GetProjectQualityResult(string projectQualityDes)
{
Model.CNPCDB db = Funs.DB;
var list = db.WBS_ProjectQuality.Where(c => c.ProjectQualityDes == projectQualityDes).Select(c => new
{
RectifyOpinion = c.ProjectQualityResult,