Compare commits

...

2 Commits

Author SHA1 Message Date
何美荣
875d397ab6 Merge branch 'master' of http://121.41.2.71:3000/wyw/mh_jy_safe 2026-05-26 16:09:09 +08:00
何美荣
55d7f7c690 岗位当班班次不能为空 2026-05-26 16:09:06 +08:00

View File

@ -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<T_FO_CURRENT_CLASS_RECORD_USER> 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;