作业活动记录
This commit is contained in:
parent
a7176ff65b
commit
4fdf21e31b
@ -140,7 +140,8 @@ namespace APT.MS.Domain.Enums
|
|||||||
签到中 = 1,
|
签到中 = 1,
|
||||||
已归档 = 2,
|
已归档 = 2,
|
||||||
审核中 = 3,
|
审核中 = 3,
|
||||||
已驳回 = 4,
|
已驳回 = 4,
|
||||||
|
完工验收 = 5,
|
||||||
终止 = 6,
|
终止 = 6,
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@ -366,6 +366,10 @@ namespace APT.FO.WebApi.Controllers
|
|||||||
users.ForEach(t => t.DEAL_STATUS = 1);
|
users.ForEach(t => t.DEAL_STATUS = 1);
|
||||||
//触发完工验收
|
//触发完工验收
|
||||||
GetAutoNext(entity, ref notices);
|
GetAutoNext(entity, ref notices);
|
||||||
|
if (notices != null && notices.Any())
|
||||||
|
{
|
||||||
|
entity.FORM_STATUS = (int)FOTeamActivityState.完工验收;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -389,20 +393,32 @@ namespace APT.FO.WebApi.Controllers
|
|||||||
notices = NotificationTaskService.InsertUserNoticeTaskModels("作业活动记录表单(关键和许可作业)", entity.ID, entity.ORG_ID, userIds, UserNames, DateTime.Now,
|
notices = NotificationTaskService.InsertUserNoticeTaskModels("作业活动记录表单(关键和许可作业)", entity.ID, entity.ORG_ID, userIds, UserNames, DateTime.Now,
|
||||||
dtEnd, (int)FMNoticeTypeEnum.消息, "FO021_SHOWPRINT");
|
dtEnd, (int)FMNoticeTypeEnum.消息, "FO021_SHOWPRINT");
|
||||||
//触发完工验收
|
//触发完工验收
|
||||||
GetAutoNext(entity, ref notices);
|
GetAutoNext(entity, ref notices);
|
||||||
|
if (notices != null && notices.Any())
|
||||||
|
{
|
||||||
|
entity.FORM_STATUS = (int)FOTeamActivityState.完工验收;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
entity.FORM_STATUS = (int)FOTeamActivityState.已归档;
|
entity.FORM_STATUS = (int)FOTeamActivityState.已归档;
|
||||||
//触发完工验收
|
//触发完工验收
|
||||||
GetAutoNext(entity, ref notices);
|
GetAutoNext(entity, ref notices);
|
||||||
|
if (notices != null && notices.Any())
|
||||||
|
{
|
||||||
|
entity.FORM_STATUS = (int)FOTeamActivityState.完工验收;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
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;
|
//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));
|
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.已处理;
|
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));
|
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>();
|
//List<T_FM_NOTIFICATION_TASK> notices = new List<T_FM_NOTIFICATION_TASK>();
|
||||||
if (todoCount == 0)
|
if (todoCount == 0)
|
||||||
{
|
{
|
||||||
model = GetEntity<T_FO_JOB_ACTIVITY_RECORD>(entity.ID.ToString());
|
//model = GetEntity<T_FO_JOB_ACTIVITY_RECORD>(entity.ID.ToString());
|
||||||
model.FORM_STATUS = (int)FOTeamActivityState.已归档;
|
//model.FORM_STATUS = (int)FOTeamActivityState.已归档;
|
||||||
//触发完工验收
|
//触发完工验收
|
||||||
//var userIds = new List<Guid>();
|
//var userIds = new List<Guid>();
|
||||||
//var record = this.GetEntity<T_FO_JOB_ACTIVITY_RECORD>(t=>t.ID == entity.ID);
|
//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(() =>
|
this.UnifiedCommit(() =>
|
||||||
{
|
{
|
||||||
if (model != null)
|
//if (model != null)
|
||||||
UpdateEntityNoCommit(model);
|
// UpdateEntityNoCommit(model);
|
||||||
if (task != null)
|
if (task != null)
|
||||||
this.UpdateEntityNoCommit(task);
|
this.UpdateEntityNoCommit(task);
|
||||||
if (user != null)
|
if (user != null)
|
||||||
@ -698,10 +714,18 @@ namespace APT.FO.WebApi.Controllers
|
|||||||
task = NotificationTaskService.GetTaskFinishModel(entity.TaskID);
|
task = NotificationTaskService.GetTaskFinishModel(entity.TaskID);
|
||||||
task.SOURCE_FORMCODE = "FO022_SHOWPRINT";
|
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(() =>
|
this.UnifiedCommit(() =>
|
||||||
{
|
{
|
||||||
if (task != null)
|
if (task != null)
|
||||||
this.UpdateEntityNoCommit(task);
|
this.UpdateEntityNoCommit(task);
|
||||||
|
if (record != null)
|
||||||
|
this.UpdateEntityNoCommit(record);
|
||||||
});
|
});
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user