作业活动记录

This commit is contained in:
何美荣 2025-12-06 21:22:31 +08:00
parent a7176ff65b
commit 4fdf21e31b
2 changed files with 35 additions and 10 deletions

View File

@ -140,7 +140,8 @@ namespace APT.MS.Domain.Enums
= 1,
= 2,
= 3,
= 4,
= 4,
= 5,
= 6,
}
/// <summary>

View File

@ -366,6 +366,10 @@ namespace APT.FO.WebApi.Controllers
users.ForEach(t => t.DEAL_STATUS = 1);
//触发完工验收
GetAutoNext(entity, ref notices);
if (notices != null && notices.Any())
{
entity.FORM_STATUS = (int)FOTeamActivityState.;
}
}
else
{
@ -389,20 +393,32 @@ namespace APT.FO.WebApi.Controllers
notices = NotificationTaskService.InsertUserNoticeTaskModels("作业活动记录表单(关键和许可作业)", entity.ID, entity.ORG_ID, userIds, UserNames, DateTime.Now,
dtEnd, (int)FMNoticeTypeEnum., "FO021_SHOWPRINT");
//触发完工验收
GetAutoNext(entity, ref notices);
GetAutoNext(entity, ref notices);
if (notices != null && notices.Any())
{
entity.FORM_STATUS = (int)FOTeamActivityState.;
}
}
else
{
entity.FORM_STATUS = (int)FOTeamActivityState.;
//触发完工验收
GetAutoNext(entity, ref notices);
GetAutoNext(entity, ref notices);
if (notices != null && notices.Any())
{
entity.FORM_STATUS = (int)FOTeamActivityState.;
}
}
}
}
else
{
//触发完工验收
GetAutoNext(entity,ref notices);
GetAutoNext(entity,ref notices);
if (notices != null && notices.Any())
{
entity.FORM_STATUS = (int)FOTeamActivityState.;
}
}
//查询消息表
//var userID = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
@ -615,12 +631,12 @@ namespace APT.FO.WebApi.Controllers
var user = this.GetEntity<T_FO_JOB_ACTIVITY_PERSON>(t => t.JOB_ACTIVITY_RECORD_ID == entity.ID && t.USER_ID == userID, new BaseFilter(orgId));
user.DEAL_STATUS = (int)FOUserShiftStatusEnum.;
var todoCount = this.GetCount<T_FO_JOB_ACTIVITY_PERSON>(t => t.JOB_ACTIVITY_RECORD_ID == entity.ID && t.DEAL_STATUS == 0 && t.USER_ID != userID, new BaseFilter(orgId));
T_FO_JOB_ACTIVITY_RECORD model = null;
//T_FO_JOB_ACTIVITY_RECORD model = null;
//List<T_FM_NOTIFICATION_TASK> notices = new List<T_FM_NOTIFICATION_TASK>();
if (todoCount == 0)
{
model = GetEntity<T_FO_JOB_ACTIVITY_RECORD>(entity.ID.ToString());
model.FORM_STATUS = (int)FOTeamActivityState.;
//model = GetEntity<T_FO_JOB_ACTIVITY_RECORD>(entity.ID.ToString());
//model.FORM_STATUS = (int)FOTeamActivityState.已归档;
//触发完工验收
//var userIds = new List<Guid>();
//var record = this.GetEntity<T_FO_JOB_ACTIVITY_RECORD>(t=>t.ID == entity.ID);
@ -663,8 +679,8 @@ namespace APT.FO.WebApi.Controllers
}
this.UnifiedCommit(() =>
{
if (model != null)
UpdateEntityNoCommit(model);
//if (model != null)
// UpdateEntityNoCommit(model);
if (task != null)
this.UpdateEntityNoCommit(task);
if (user != null)
@ -698,10 +714,18 @@ namespace APT.FO.WebApi.Controllers
task = NotificationTaskService.GetTaskFinishModel(entity.TaskID);
task.SOURCE_FORMCODE = "FO022_SHOWPRINT";
}
var record = this.GetEntity<T_FO_JOB_ACTIVITY_RECORD>(t => t.ID == entity.ID);
var taskFinish = GetEntity<T_FM_NOTIFICATION_TASK>(t => t.SOURCE_DATA_ID == entity.ID && t.ID != entity.TaskID && t.NOTICE_STATUS == 0 && t.NOTICE_TITLE.Contains("完工验收"));
if (taskFinish == null)
{
record.FORM_STATUS = (int)FOTeamActivityState.;
}
this.UnifiedCommit(() =>
{
if (task != null)
this.UpdateEntityNoCommit(task);
this.UpdateEntityNoCommit(task);
if (record != null)
this.UpdateEntityNoCommit(record);
});
return true;
});