From 55d7f7c690efaffed230b794e3c6f2a8dabd6a21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=95=E7=BE=8E=E8=8D=A3?= <10755671+mei-rong-he@user.noreply.gitee.com> Date: Tue, 26 May 2026 16:09:06 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=B2=97=E4=BD=8D=E5=BD=93=E7=8F=AD?= =?UTF-8?q?=E7=8F=AD=E6=AC=A1=E4=B8=8D=E8=83=BD=E4=B8=BA=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../APT.FO.WebApi/Controllers/CurrentClassRecord.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/APT.MicroApi/APT.FO.WebApi/Controllers/CurrentClassRecord.cs b/APT.MicroApi/APT.FO.WebApi/Controllers/CurrentClassRecord.cs index dfed288..8155587 100644 --- a/APT.MicroApi/APT.FO.WebApi/Controllers/CurrentClassRecord.cs +++ b/APT.MicroApi/APT.FO.WebApi/Controllers/CurrentClassRecord.cs @@ -126,10 +126,10 @@ namespace APT.FO.WebApi.Controllers.Api.FO //throw new Exception("未找到排班班次,请联系管理员排查"); } } - //if (entity.CLASS_ID == null) - //{ - // throw new Exception("班次不能为空,请联系管理员排查"); - //} + if (entity.CLASS_ID == null) + { + throw new Exception("班次不能为空!"); + } entity.EDITOR_ID = userID; var files = entity.Nav_Files; @@ -301,6 +301,7 @@ namespace APT.FO.WebApi.Controllers.Api.FO List currRecordUsers = null; if (entity.CODE.Equals("1")) { + //判断班次 if (entity.CLASS_ID == null || entity.CLASS_ID == Guid.Empty) { currRecord.AUDIT_DATE = DateTime.Now; @@ -309,6 +310,7 @@ namespace APT.FO.WebApi.Controllers.Api.FO currRecord.AUDIT_OPINION = entity.AUDIT_OPINION; var users = currRecord.Nav_Users; var files = currRecord.Nav_Files; + //直接创建交接班 CreateChangeShiftRecord(currRecord, users, files, null); } else @@ -318,7 +320,7 @@ namespace APT.FO.WebApi.Controllers.Api.FO currRecord.AUDIT_DATE = DateTime.Now; currRecord.SHIFT_STATUS = (int)FOShiftStatusEnum.审批归档; currRecord.AUDIT_OPINION = entity.AUDIT_OPINION; - if (currDepartmentConfig.Nav_DepartmentCalendarConfig.IS_HANDOVER == true) + if (currDepartmentConfig!=null && currDepartmentConfig.Nav_DepartmentCalendarConfig.IS_HANDOVER == true) { var users = currRecord.Nav_Users; var files = currRecord.Nav_Files; From f062e236a0a3b550f0a82e79631770ddf779454c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=95=E7=BE=8E=E8=8D=A3?= <10755671+mei-rong-he@user.noreply.gitee.com> Date: Tue, 26 May 2026 16:48:34 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=BD=93=E7=8F=AD=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- APT.MicroApi/APT.FO.WebApi/Controllers/CurrentClassRecord.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/APT.MicroApi/APT.FO.WebApi/Controllers/CurrentClassRecord.cs b/APT.MicroApi/APT.FO.WebApi/Controllers/CurrentClassRecord.cs index 8155587..7746af4 100644 --- a/APT.MicroApi/APT.FO.WebApi/Controllers/CurrentClassRecord.cs +++ b/APT.MicroApi/APT.FO.WebApi/Controllers/CurrentClassRecord.cs @@ -255,6 +255,7 @@ namespace APT.FO.WebApi.Controllers.Api.FO } } entity.Nav_Users = null; + entity.Nav_Class = null; entity.Nav_Files = null; entity.Nav_LabourSupplies = null; UnifiedCommit(() =>