20241201 承包商及供应商质量事件报告
This commit is contained in:
@@ -0,0 +1,74 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 审批意见
|
||||
/// </summary>
|
||||
public class PunishmentAuditService
|
||||
{
|
||||
/// <summary>
|
||||
/// 添加
|
||||
/// </summary>
|
||||
/// <param name="audit"></param>
|
||||
public static void AddPunishmentAudit(Model.EMC_PunishmentAudit audit)
|
||||
{
|
||||
Model.EMC_PunishmentAudit newAudit = new Model.EMC_PunishmentAudit
|
||||
{
|
||||
AuditId = audit.AuditId,
|
||||
PunishmentId = audit.PunishmentId,
|
||||
AuditMan = audit.AuditMan,
|
||||
AuditDate = audit.AuditDate,
|
||||
IsPass = audit.IsPass,
|
||||
AuditResult = audit.AuditResult
|
||||
};
|
||||
Funs.DB.EMC_PunishmentAudit.InsertOnSubmit(newAudit);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="audit"></param>
|
||||
public static void UpdatePunishmentAudit(Model.EMC_PunishmentAudit audit)
|
||||
{
|
||||
Model.EMC_PunishmentAudit newAudit = Funs.DB.EMC_PunishmentAudit.FirstOrDefault(e => e.AuditId == audit.AuditId);
|
||||
if (newAudit != null)
|
||||
{
|
||||
newAudit.AuditMan = audit.AuditMan;
|
||||
newAudit.AuditDate = audit.AuditDate;
|
||||
newAudit.IsPass = audit.IsPass;
|
||||
newAudit.AuditResult = audit.AuditResult;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="punishmentId"></param>
|
||||
public static void DeletePunishmentAuditByPunishmentId(string punishmentId)
|
||||
{
|
||||
var q = (from x in Funs.DB.EMC_PunishmentAudit where x.PunishmentId == punishmentId select x).ToList();
|
||||
if (q != null)
|
||||
{
|
||||
Funs.DB.EMC_PunishmentAudit.DeleteAllOnSubmit(q);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
public static Model.EMC_PunishmentAudit GetAuditBypunishmentIdAndAuditMan(string punishmentId, string auditMan)
|
||||
{
|
||||
return Funs.DB.EMC_PunishmentAudit.FirstOrDefault(e => e.PunishmentId == punishmentId && e.AuditMan == auditMan);
|
||||
}
|
||||
|
||||
public static Model.EMC_PunishmentAudit GetAuditByAuditMan(string punishmentId, string auditMan)
|
||||
{
|
||||
return Funs.DB.EMC_PunishmentAudit.FirstOrDefault(e => e.PunishmentId == punishmentId && e.AuditMan == auditMan && e.AuditDate == null);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using NPOI.POIFS.Storage;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@@ -65,6 +66,10 @@ namespace BLL
|
||||
newPunishment.Requisitioner=punishment.Requisitioner;
|
||||
newPunishment.AttachUrl = punishment.AttachUrl;
|
||||
newPunishment.States = punishment.States;
|
||||
newPunishment.MIContractor = punishment.MIContractor;
|
||||
newPunishment.SeType = punishment.SeType;
|
||||
newPunishment.PVTRequester = punishment.PVTRequester;
|
||||
newPunishment.IndividualSESReason = punishment.IndividualSESReason;
|
||||
|
||||
Funs.DB.EMC_Punishment.InsertOnSubmit(newPunishment);
|
||||
Funs.DB.SubmitChanges();
|
||||
@@ -107,6 +112,10 @@ namespace BLL
|
||||
newPunishment.ContractAdmin = punishment.ContractAdmin;
|
||||
newPunishment.IndividualPerson = punishment.IndividualPerson;
|
||||
newPunishment.UserDep = punishment.UserDep;
|
||||
newPunishment.MIContractor = punishment.MIContractor;
|
||||
newPunishment.SeType = punishment.SeType;
|
||||
newPunishment.PVTRequester = punishment.PVTRequester;
|
||||
newPunishment.IndividualSESReason = punishment.IndividualSESReason;
|
||||
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user