审批待办未消失
This commit is contained in:
parent
4eb8c4307c
commit
748e6f69b9
@ -9,6 +9,7 @@ using APT.Infrastructure.Core;
|
||||
using APT.MS.Domain.Entities.FO;
|
||||
using APT.MS.Domain.Entities.HM;
|
||||
using APT.MS.Domain.Entities.OG;
|
||||
using APT.MS.Domain.Entities.SK;
|
||||
using APT.MS.Domain.Enums;
|
||||
using APT.Utility;
|
||||
using APT.WebApi.Models;
|
||||
@ -2335,6 +2336,52 @@ namespace APT.PP.WebApi.Controllers.Api.PP
|
||||
throw new Exception("【" + HttpContext.Request.Path + "】错误日志:[Message]" + ex.Message);
|
||||
}
|
||||
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 已归档的工作票,待办未消失
|
||||
/// </summary>
|
||||
/// <param name="pageFilter"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("JobTaskAuto")]
|
||||
public JsonActionResult<bool> JobTaskAuto([FromBody] KeywordFilter filter)
|
||||
{
|
||||
return SafeExecute<bool>(() =>
|
||||
{
|
||||
try
|
||||
{
|
||||
var jobFilter = new BaseFilter(filter.OrgId);
|
||||
jobFilter.IgnoreDataRule = true;
|
||||
jobFilter.SelectField = new string[] { "ID" };
|
||||
List<Guid> dataIds = new List<Guid>();
|
||||
var jobIds = this.GetEntities<T_FO_CRUCIAL_LICENSE_JOB>(t => t.IS_PUBLISH == 5 && t.CREATE_TIME.Value.Date >= DateTime.Now.AddDays(-2).Date && t.CREATE_TIME.Value.Date <= DateTime.Now.Date, jobFilter).Select(m => m.ID).ToList();
|
||||
dataIds.AddRange(jobIds);
|
||||
var fireJobIds = this.GetEntities<T_FO_FIRE_JOB>(t => t.STATUS == BaseData.Domain.Enums.PF.PFStandardStatus.Archived && t.CREATE_TIME.Value.Date >= DateTime.Now.AddDays(-2).Date && t.CREATE_TIME.Value.Date <= DateTime.Now.Date, jobFilter).Select(m => m.ID).ToList();
|
||||
dataIds.AddRange(fireJobIds);
|
||||
var hiddenRecordIds = this.GetEntities<T_SK_HIDDEN_DANGER_RECTIFY_RECORD>(t => t.STATUS == BaseData.Domain.Enums.PF.PFStandardStatus.Archived && t.CREATE_TIME.Value.Date >= DateTime.Now.AddDays(-2).Date && t.CREATE_TIME.Value.Date <= DateTime.Now.Date, jobFilter).Select(m => m.ID).ToList();
|
||||
dataIds.AddRange(hiddenRecordIds);
|
||||
var approveIds = this.GetEntities<T_PF_APPROVE>(t => dataIds.Contains(t.DATA_ID), jobFilter).Select(m => m.ID).ToList();
|
||||
var tasks = this.GetEntities<T_FM_NOTIFICATION_TASK>(t => t.NOTICE_STATUS == 0 && t.SOURCE_DATA_ID != null && approveIds.Contains((Guid)t.SOURCE_DATA_ID), new BaseFilter(filter.OrgId));
|
||||
if (tasks != null && tasks.Any())
|
||||
{
|
||||
tasks.ForEach(t => { t.NOTICE_STATUS = 1; });
|
||||
}
|
||||
UnifiedCommit(() =>
|
||||
{
|
||||
if (tasks != null && tasks.Any())
|
||||
BantchSaveEntityNoCommit(tasks);
|
||||
});
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(ex.StackTrace))
|
||||
throw new Exception("错误日志:[StackTrace]" + ex.StackTrace);
|
||||
else
|
||||
throw new Exception("【" + HttpContext.Request.Path + "】错误日志:[Message]" + ex.Message);
|
||||
}
|
||||
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user