From 8ca97d0c9a5c9e6004da1c5f6511093a3b7fbc5f Mon Sep 17 00:00:00 2001 From: xiaju <1784803958@qq.com> Date: Thu, 19 Jun 2025 20:29:05 +0800 Subject: [PATCH] 1 --- SGGL/BLL/CQMS/Check/CheckControlService.cs | 52 ++++++++++++---------- 1 file changed, 29 insertions(+), 23 deletions(-) diff --git a/SGGL/BLL/CQMS/Check/CheckControlService.cs b/SGGL/BLL/CQMS/Check/CheckControlService.cs index a0ae87aa..efd386c6 100644 --- a/SGGL/BLL/CQMS/Check/CheckControlService.cs +++ b/SGGL/BLL/CQMS/Check/CheckControlService.cs @@ -195,37 +195,43 @@ namespace BLL else return null; } + /// /// 修改质量检查与控制 /// /// public static void UpdateCheckControl(Model.Check_CheckControl CheckControl) { - Model.SGGLDB db = Funs.DB; - Model.Check_CheckControl newCheckControl = db.Check_CheckControl.First(e => e.CheckControlCode == CheckControl.CheckControlCode); - newCheckControl.DocCode = CheckControl.DocCode; - newCheckControl.ProposeUnitId = CheckControl.ProposeUnitId; - newCheckControl.UnitWorkId = CheckControl.UnitWorkId; - newCheckControl.UnitId = CheckControl.UnitId; - newCheckControl.CheckDate = CheckControl.CheckDate; - newCheckControl.IsSubmit = CheckControl.IsSubmit; - newCheckControl.SubmitMan = CheckControl.SubmitMan; - newCheckControl.IsOK = CheckControl.IsOK; - newCheckControl.CNProfessionalCode = CheckControl.CNProfessionalCode; - newCheckControl.QuestionType = CheckControl.QuestionType; - newCheckControl.CheckSite = CheckControl.CheckSite; - newCheckControl.QuestionDef = CheckControl.QuestionDef; - newCheckControl.LimitDate = CheckControl.LimitDate; - newCheckControl.RectifyOpinion = CheckControl.RectifyOpinion; - newCheckControl.AttachUrl = CheckControl.AttachUrl; - newCheckControl.HandleWay = CheckControl.HandleWay; - newCheckControl.RectifyDate = CheckControl.RectifyDate; - newCheckControl.ReAttachUrl = CheckControl.ReAttachUrl; - newCheckControl.State = CheckControl.State; - newCheckControl.SaveHandleMan = CheckControl.SaveHandleMan; + using (var db = new Model.SGGLDB(Funs.ConnString)) + { + Model.Check_CheckControl newCheckControl = db.Check_CheckControl.First(e => e.CheckControlCode == CheckControl.CheckControlCode); + newCheckControl.DocCode = CheckControl.DocCode; + newCheckControl.ProposeUnitId = CheckControl.ProposeUnitId; + newCheckControl.UnitWorkId = CheckControl.UnitWorkId; + newCheckControl.UnitId = CheckControl.UnitId; + newCheckControl.CheckDate = CheckControl.CheckDate; + newCheckControl.IsSubmit = CheckControl.IsSubmit; + newCheckControl.SubmitMan = CheckControl.SubmitMan; + newCheckControl.IsOK = CheckControl.IsOK; + newCheckControl.CNProfessionalCode = CheckControl.CNProfessionalCode; + newCheckControl.QuestionType = CheckControl.QuestionType; + newCheckControl.CheckSite = CheckControl.CheckSite; + newCheckControl.QuestionDef = CheckControl.QuestionDef; + newCheckControl.LimitDate = CheckControl.LimitDate; + newCheckControl.RectifyOpinion = CheckControl.RectifyOpinion; + newCheckControl.AttachUrl = CheckControl.AttachUrl; + newCheckControl.HandleWay = CheckControl.HandleWay; + newCheckControl.RectifyDate = CheckControl.RectifyDate; + newCheckControl.ReAttachUrl = CheckControl.ReAttachUrl; + newCheckControl.State = CheckControl.State; + newCheckControl.SaveHandleMan = CheckControl.SaveHandleMan; + newCheckControl.IsUpdate = null; - db.SubmitChanges(); + db.SubmitChanges(); + } } + + public static List GetListDataForApi(string state, string name, string projectId, int index, int page) { using (var db = new Model.SGGLDB(Funs.ConnString))