培训通知 非线上考试处理

班前会 确认时 判断上一单是否超期
This commit is contained in:
wyw 2026-04-28 08:57:06 +08:00
parent 564cf0dfc6
commit d97b0e22aa
2 changed files with 89 additions and 33 deletions

View File

@ -327,6 +327,60 @@ namespace APT.FO.WebApi.Controllers.Api.FO
users.ForEach(t => t.Nav_User = null);
users.ForEach(t => t.ORG_ID = entity.ORG_ID);
users = users.Where(t => !t.IS_DELETED);
#region
T_FO_PRE_SHIFT_MEETING_RECORD modelLast = null;
if (entity.RATE.Equals("SaveAndNotify"))
{
try
{
if (entity.TEAM_ID.HasValue)
{
//上一个 班前会 是否超时标记
//entity.OVERTIME = FOISOVERTIME.未统计;
//未统计 = 0, //未超时 = 1, //超时 = 2
BasePageFilter basf = new BasePageFilter(1, 1);
basf.Order = DbOrder.DESC;
basf.Sort = "MEETING_TIME";
basf.OrgId = entity.ORG_ID;
DateTime dtMin = entity.START_TIME.AddMonths(-1);//一个月以内的
var lastRecord = GetOrderPageEntities<T_FO_PRE_SHIFT_MEETING_RECORD>(e => e.TEAM_ID.HasValue && e.TEAM_ID.Value == entity.TEAM_ID.Value && e.START_TIME != e.END_TIME && dtMin <= e.START_TIME && e.START_TIME < entity.START_TIME, basf, null);
if (lastRecord.Data != null && lastRecord.Data.Count() > 0)
modelLast = lastRecord.Data.ToList()[0];
if (modelLast != null && modelLast.OVERTIME == FOISOVERTIME.)
{
Expression<Func<T_FM_NOTIFICATION_TASK, bool>> expressionCheck = e => !e.IS_DELETED && !e.ISCANCEL && e.SOURCE_DATA_ID.HasValue && e.SOURCE_DATA_ID == modelLast.ID && (e.SOURCE_FORMCODE == "FO003_SHOWPRINT" || e.SOURCE_FORMCODE == "FO003");
//if (finishNotice != null)
//{
// expressionCheck = expressionCheck.And(e => e.CREATE_TIME.HasValue && e.CREATE_TIME < finishNotice.CREATE_TIME);
//}
var listCheckTask = GetEntities(expressionCheck, null, null);
if (listCheckTask != null)
{
var checkT = listCheckTask.FirstOrDefault(e => e.NOTICE_STATUS == 2 || e.NOTICE_STATUS == 0);
if (checkT != null)
{
modelLast.OVERTIME = FOISOVERTIME.;
modelLast.MODIFY_TIME = DateTime.Now;
}
else
{
checkT = listCheckTask.FirstOrDefault(e => e.NOTICE_STATUS == 1);
if (checkT != null)
{
modelLast.OVERTIME = FOISOVERTIME.;
modelLast.MODIFY_TIME = DateTime.Now;
}
}
}
}
}
}
catch { }
}
#endregion
this.UnifiedCommit(() =>
{
if (entity != null)
@ -353,6 +407,8 @@ namespace APT.FO.WebApi.Controllers.Api.FO
BantchDeleteEntityNoCommit<T_FM_DEPARTMENT_SCHEDULING_DETAIL>(delSchedulings);
if (addSchedulings.Any())
BantchAddEntityNoCommit(addSchedulings);
if (modelLast != null && modelLast.OVERTIME != FOISOVERTIME.)
UpdateEntityNoCommit(modelLast);
});
return true;
});

View File

@ -140,7 +140,7 @@ namespace APT.SC.WebApi.Controllers.Api.SE
#region
if (ListCour == null || ListCour.Count() < 1)
if (entity.CHECKTYPE == PlanCheckType.InOnLine && entity.IN_OUT == TrainInOut.In && (ListCour == null || ListCour.Count() < 1))
{
#region