From 359e8058fec277da6ffb2abf8955f2687b3d4aa1 Mon Sep 17 00:00:00 2001 From: gaofei1985 <181547018@qq.com> Date: Mon, 24 Jul 2023 19:52:40 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B4=A8=E9=87=8F?= =?UTF-8?q?=E9=AA=8C=E6=94=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProcessControl/InspectionManagementService.cs | 1 + .../CQMS/InspectionManagementController.cs | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/SGGL/BLL/CQMS/ProcessControl/InspectionManagementService.cs b/SGGL/BLL/CQMS/ProcessControl/InspectionManagementService.cs index 775af25c..efaf4e6a 100644 --- a/SGGL/BLL/CQMS/ProcessControl/InspectionManagementService.cs +++ b/SGGL/BLL/CQMS/ProcessControl/InspectionManagementService.cs @@ -385,6 +385,7 @@ namespace BLL { newInspectionManagement.InspectionDate = inspectionManagement.InspectionDate; newInspectionManagement.IsOnceQualified = inspectionManagement.IsOnceQualified; + newInspectionManagement.InspectionCode = inspectionManagement.InspectionCode; db.SubmitChanges(); } } diff --git a/SGGL/WebAPI/Controllers/CQMS/InspectionManagementController.cs b/SGGL/WebAPI/Controllers/CQMS/InspectionManagementController.cs index 632f6eea..22430b26 100644 --- a/SGGL/WebAPI/Controllers/CQMS/InspectionManagementController.cs +++ b/SGGL/WebAPI/Controllers/CQMS/InspectionManagementController.cs @@ -25,6 +25,8 @@ namespace WebAPI.Controllers.CQMS try { InspectionManagementService.UpdateByInspectionManagementId(model); + //上传附件 + SaveAttachFile(model.InspectionId, BLL.Const.InspectionNoticeMenuId, model.AttachUrl); } catch (Exception ex) { @@ -35,5 +37,16 @@ namespace WebAPI.Controllers.CQMS return responeData; } #endregion + + public static void SaveAttachFile(string dataId, string menuId, string url) + { + Model.ToDoItem toDoItem = new Model.ToDoItem + { + MenuId = menuId, + DataId = dataId, + UrlStr = url, + }; + APIUpLoadFileService.SaveAttachUrl(toDoItem); + } } } \ No newline at end of file From f7ad4de2de9b5c0ba248b0d4d9c88e1363089009 Mon Sep 17 00:00:00 2001 From: gaofei1985 <181547018@qq.com> Date: Mon, 24 Jul 2023 20:16:40 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SGGL/WebAPI/Controllers/CQMS/InspectionManagementController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SGGL/WebAPI/Controllers/CQMS/InspectionManagementController.cs b/SGGL/WebAPI/Controllers/CQMS/InspectionManagementController.cs index 22430b26..b4ad158a 100644 --- a/SGGL/WebAPI/Controllers/CQMS/InspectionManagementController.cs +++ b/SGGL/WebAPI/Controllers/CQMS/InspectionManagementController.cs @@ -26,7 +26,7 @@ namespace WebAPI.Controllers.CQMS { InspectionManagementService.UpdateByInspectionManagementId(model); //上传附件 - SaveAttachFile(model.InspectionId, BLL.Const.InspectionNoticeMenuId, model.AttachUrl); + SaveAttachFile(model.InspectionId + "R", BLL.Const.InspectionNoticeMenuId, model.AttachUrl); } catch (Exception ex) { From 9db016519d37adc6a082ea8bb9309e56ccf9a607 Mon Sep 17 00:00:00 2001 From: gaofei1985 <181547018@qq.com> Date: Mon, 24 Jul 2023 20:25:27 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B4=A8=E9=87=8F?= =?UTF-8?q?=E9=AA=8C=E6=94=B6=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../InspectionManagementService.cs | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/SGGL/BLL/CQMS/ProcessControl/InspectionManagementService.cs b/SGGL/BLL/CQMS/ProcessControl/InspectionManagementService.cs index efaf4e6a..e1282f93 100644 --- a/SGGL/BLL/CQMS/ProcessControl/InspectionManagementService.cs +++ b/SGGL/BLL/CQMS/ProcessControl/InspectionManagementService.cs @@ -87,7 +87,7 @@ namespace BLL if (!string.IsNullOrEmpty(controlPointType)) { string[] types = controlPointType.Split(','); - q = q.Where(e=> types.Contains(e.ControlPointType)); + q = q.Where(e => types.Contains(e.ControlPointType)); } if (UnitWorkId != "0") { @@ -155,8 +155,8 @@ namespace BLL /// /// /// - public static int GetListCount(string projectId, string name, string startDate, string endDate) - { + public static int GetListCount(string projectId, string name, string startDate, string endDate) + { return count; } public static DataSet GetListData(string projectId, string name, string startDate, string endDate, int startRowIndex, int maximumRows) @@ -196,13 +196,13 @@ namespace BLL dataTable.Columns.Add(row.ToString()); } data.Tables.Add(dataTable); - for (int i = startRowIndex; i <= (startRowIndex + maximumRows)&&i /// 根据id修改验收日期和是否一次合格 /// - public static void UpdateByInspectionManagementId(Model.ProcessControl_InspectionManagement inspectionManagement) { + public static void UpdateByInspectionManagementId(Model.ProcessControl_InspectionManagement inspectionManagement) + { using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) { Model.ProcessControl_InspectionManagement newInspectionManagement = db.ProcessControl_InspectionManagement.FirstOrDefault(e => e.InspectionId == inspectionManagement.InspectionId); @@ -385,6 +386,10 @@ namespace BLL { newInspectionManagement.InspectionDate = inspectionManagement.InspectionDate; newInspectionManagement.IsOnceQualified = inspectionManagement.IsOnceQualified; + if (newInspectionManagement.IsOnceQualified == false) + { + newInspectionManagement.UnqualifiedReason = inspectionManagement.UnqualifiedReason; + } newInspectionManagement.InspectionCode = inspectionManagement.InspectionCode; db.SubmitChanges(); }