班前会触发一般作业,作业名称为空修复
This commit is contained in:
parent
636c1a0721
commit
16d66f8f9b
@ -11414,7 +11414,7 @@ namespace APT.BaseData.Services.DomainServices
|
||||
{
|
||||
if (user.Nav_CheckNoticeDetailUsers != null && user.Nav_CheckNoticeDetailUsers.Any())
|
||||
{
|
||||
var tempIds = user.Nav_CheckNoticeDetailUsers.Where(t => t.USER_ID == entity.APPLY_USER_ID).Select(t => t.ID).ToList();
|
||||
var tempIds = user.Nav_CheckNoticeDetailUsers.Where(t =>t.USER_ID!=null && t.USER_ID == entity.APPLY_USER_ID).Select(t => t.ID).ToList();
|
||||
if (tempIds != null && tempIds.Any())
|
||||
{
|
||||
applyUserIds.AddRange(tempIds);
|
||||
|
||||
@ -515,7 +515,7 @@ namespace APT.FO.WebApi.Controllers.Api.FO
|
||||
var links = this.GetEntities<T_HM_OPERATION_LINK_POST>(t => postionIds.Contains(t.POST_ID), new BaseFilter(model.ORG_ID), "Nav_OperationLink").ToList();
|
||||
var linkIds = links.Select(m => m.OPERATION_LINK_ID).Distinct().ToList();
|
||||
//作业库中取作业环节(周期为每日作业)
|
||||
var operationTemps = this.GetEntities<T_HM_OPERATION_LINK>(t => linkIds.Contains(t.ID) && t.STATUS == (int)STATUSEnum.启用 && t.CYCLE_TYPE == HMCycleTypeEnum.Day, new BaseFilter(model.ORG_ID), new string[] { "Nav_WorkPermitType", "Nav_OperationStep", "Nav_SafeConfirms", "Nav_SafeMeasures", "Nav_DealMeasures" }).Distinct().ToList();
|
||||
var operationTemps = this.GetEntities<T_HM_OPERATION_LINK>(t =>t.OPERATION_STEP_ID != null && linkIds.Contains(t.ID) && t.STATUS == (int)STATUSEnum.启用 && t.CYCLE_TYPE == HMCycleTypeEnum.Day, new BaseFilter(model.ORG_ID), new string[] { "Nav_WorkPermitType", "Nav_OperationStep", "Nav_SafeConfirms", "Nav_SafeMeasures", "Nav_DealMeasures" }).Distinct().ToList();
|
||||
var operations = operationTemps.Where(x => x.Nav_OperationStep != null).GroupBy(t => new { t.Nav_OperationStep.NAME }).Select(w => w.OrderBy(m => m.CREATE_TIME).FirstOrDefault()).Distinct().ToList();
|
||||
if (operations != null && operations.Any())
|
||||
{
|
||||
|
||||
@ -165,27 +165,27 @@ namespace APT.SK.WebApi.Controllers.Api
|
||||
if (DateTime.Now.AddMinutes(30) > entity.CHECK_TIME)
|
||||
throw new Exception("检查时间不得短于半小时,请修改检查时间");
|
||||
T_FM_NOTIFICATION_TASK finishNotice = null;
|
||||
if (entity.STATUS != PFStandardStatus.Draft)
|
||||
{
|
||||
var taskId = entity.TaskID;
|
||||
if (taskId == Guid.Empty)
|
||||
{
|
||||
var taskTemp = GetEntity<T_FM_NOTIFICATION_TASK>(i => i.SOURCE_DATA_ID == entity.ID && i.USER_ID == userId
|
||||
&& i.NOTICE_STATUS == FMNoticeStatusEnum.未处理.GetInt() && i.SOURCE_FORMCODE == "SK006");
|
||||
if (taskTemp != null)
|
||||
{
|
||||
taskTemp.NOTICE_STATUS = 1;
|
||||
taskTemp.SOURCE_FORMCODE = "SK006_SHOWPRINT";
|
||||
finishNotice = taskTemp;
|
||||
}
|
||||
}
|
||||
if (taskId != Guid.Empty)
|
||||
{
|
||||
finishNotice = NotificationTaskService.FOGetTaskFinishModel(taskId, entity.ID, "SK006_SHOWPRINT");
|
||||
}
|
||||
UpdateEntity(finishNotice);
|
||||
throw new Exception("你已提交,请勿重复提交!");
|
||||
}
|
||||
//if (entity.STATUS != PFStandardStatus.Draft)
|
||||
//{
|
||||
// var taskId = entity.TaskID;
|
||||
// if (taskId == Guid.Empty)
|
||||
// {
|
||||
// var taskTemp = GetEntity<T_FM_NOTIFICATION_TASK>(i => i.SOURCE_DATA_ID == entity.ID && i.USER_ID == userId
|
||||
//&& i.NOTICE_STATUS == FMNoticeStatusEnum.未处理.GetInt() && i.SOURCE_FORMCODE == "SK006");
|
||||
// if (taskTemp != null)
|
||||
// {
|
||||
// taskTemp.NOTICE_STATUS = 1;
|
||||
// taskTemp.SOURCE_FORMCODE = "SK006_SHOWPRINT";
|
||||
// finishNotice = taskTemp;
|
||||
// }
|
||||
// }
|
||||
// if (taskId != Guid.Empty)
|
||||
// {
|
||||
// finishNotice = NotificationTaskService.FOGetTaskFinishModel(taskId, entity.ID, "SK006_SHOWPRINT");
|
||||
// }
|
||||
// UpdateEntity(finishNotice);
|
||||
// throw new Exception("你已提交,请勿重复提交!");
|
||||
//}
|
||||
if (string.IsNullOrEmpty(entity.NOTICE_CODE))
|
||||
{
|
||||
entity.NOTICE_CODE = "JCSD" + DateTime.Now.ToString("yyyyMMddHH") + new Random().Next(1, 9999);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user