Compare commits
2 Commits
1dbbb01394
...
74674bd4f1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
74674bd4f1 | ||
|
|
5865049bc9 |
@ -1375,12 +1375,26 @@ namespace APT.PP.WebApi.Controllers.Api.PP
|
|||||||
t.Nav_LaunchUser = null;
|
t.Nav_LaunchUser = null;
|
||||||
});
|
});
|
||||||
var sendNotices = NotificationTaskService.InsertUserNoticeTaskModels(allSendTitles, allSendDataIds, filter.GetOrgId(), allSendUserIds, allSendUserNames, DateTime.Now, DateTime.Now.AddDays(1), (int)FMFormTypeEnum.计划任务通知, "SE005_REPORTEDIT");
|
var sendNotices = NotificationTaskService.InsertUserNoticeTaskModels(allSendTitles, allSendDataIds, filter.GetOrgId(), allSendUserIds, allSendUserNames, DateTime.Now, DateTime.Now.AddDays(1), (int)FMFormTypeEnum.计划任务通知, "SE005_REPORTEDIT");
|
||||||
|
|
||||||
|
//wyw 未处理的安全意识调查 转无需办理
|
||||||
|
var listTaskDeal = GetEntities<T_FM_NOTIFICATION_TASK>(e => e.NOTICE_STATUS == 0 && e.SOURCE_DATA_ID.HasValue && allSendDataIds.Contains(e.SOURCE_DATA_ID.Value), null, null);
|
||||||
|
if (listTaskDeal != null && listTaskDeal.Any())
|
||||||
|
{
|
||||||
|
foreach (var item in listTaskDeal)
|
||||||
|
{
|
||||||
|
item.NOTICE_STATUS = 4;// FMNoticeStatusEnum.超时无需办理;
|
||||||
|
item.TASK_DT = dt;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
UnifiedCommit(() =>
|
UnifiedCommit(() =>
|
||||||
{
|
{
|
||||||
if (surveys.Any())
|
if (surveys.Any())
|
||||||
BantchUpdateEntityNoCommit(surveys);
|
BantchUpdateEntityNoCommit(surveys);
|
||||||
if (sendNotices.Any())
|
if (sendNotices.Any())
|
||||||
BantchAddEntityNoCommit(sendNotices);
|
BantchAddEntityNoCommit(sendNotices);
|
||||||
|
if (listTaskDeal != null && listTaskDeal.Any())
|
||||||
|
BantchSaveEntityNoCommit(listTaskDeal);
|
||||||
});
|
});
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
@ -1426,6 +1440,7 @@ namespace APT.PP.WebApi.Controllers.Api.PP
|
|||||||
IEnumerable<T_FM_NOTIFICATION_TASK> listTaskStop = null;
|
IEnumerable<T_FM_NOTIFICATION_TASK> listTaskStop = null;
|
||||||
if (listDemandID != null && listDemandID.Count() > 0)
|
if (listDemandID != null && listDemandID.Count() > 0)
|
||||||
{
|
{
|
||||||
|
//处理 未操作的待办
|
||||||
listTaskStop = GetEntities<T_FM_NOTIFICATION_TASK>(e => e.NOTICE_STATUS == 0 && e.SOURCE_FORMCODE == "SE007_INPUTPAGE" && e.SOURCE_DATA_ID.HasValue && listDemandID.Contains(e.SOURCE_DATA_ID.Value), null, null);
|
listTaskStop = GetEntities<T_FM_NOTIFICATION_TASK>(e => e.NOTICE_STATUS == 0 && e.SOURCE_FORMCODE == "SE007_INPUTPAGE" && e.SOURCE_DATA_ID.HasValue && listDemandID.Contains(e.SOURCE_DATA_ID.Value), null, null);
|
||||||
listTaskStop.ForEach(e =>
|
listTaskStop.ForEach(e =>
|
||||||
{
|
{
|
||||||
@ -1434,15 +1449,6 @@ namespace APT.PP.WebApi.Controllers.Api.PP
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//wyw 未处理的安全意识调查 转无需办理
|
|
||||||
var listTaskDeal = GetEntities<T_FM_NOTIFICATION_TASK>(e => e.NOTICE_STATUS == 0 && e.SOURCE_DATA_ID.HasValue && allSendDataIds.Contains(e.SOURCE_DATA_ID.Value), null, null);
|
|
||||||
if (listTaskDeal != null && listTaskDeal.Any())
|
|
||||||
{
|
|
||||||
foreach (var item in listTaskDeal)
|
|
||||||
{
|
|
||||||
item.NOTICE_STATUS = 4;// FMNoticeStatusEnum.超时无需办理;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//待测试会不会有bug BantchSaveEntityNoCommit(surveys); 检查 LAUNCH_USER_ID 报错?
|
//待测试会不会有bug BantchSaveEntityNoCommit(surveys); 检查 LAUNCH_USER_ID 报错?
|
||||||
UnifiedCommit(() =>
|
UnifiedCommit(() =>
|
||||||
{
|
{
|
||||||
@ -1452,8 +1458,6 @@ namespace APT.PP.WebApi.Controllers.Api.PP
|
|||||||
BantchAddEntityNoCommit(sendNotices);
|
BantchAddEntityNoCommit(sendNotices);
|
||||||
if (listTaskStop != null && listTaskStop.Count() > 0)
|
if (listTaskStop != null && listTaskStop.Count() > 0)
|
||||||
BantchSaveEntityNoCommit(listTaskStop);
|
BantchSaveEntityNoCommit(listTaskStop);
|
||||||
if (listTaskDeal != null && listTaskDeal.Count() > 0)
|
|
||||||
BantchSaveEntityNoCommit(listTaskDeal);
|
|
||||||
});
|
});
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
|
|||||||
@ -83,11 +83,17 @@ namespace APT.SC.WebApi.Controllers.Api.SE
|
|||||||
List<T_SE_TRAIN_SURVEY_LIST_DEMAND> Nav_Demands = null;
|
List<T_SE_TRAIN_SURVEY_LIST_DEMAND> Nav_Demands = null;
|
||||||
List<T_FM_NOTIFICATION_TASK> noticeTask = null;
|
List<T_FM_NOTIFICATION_TASK> noticeTask = null;
|
||||||
|
|
||||||
|
var listUserID = Demands.Where(e => e.USER_ID.HasValue).Select(e => e.USER_ID.Value);
|
||||||
|
var listUserIDCheck = listUserID.Distinct();
|
||||||
|
var ccCheck = listUserID.Count() - listUserIDCheck.Count();
|
||||||
|
if (ccCheck > 0)
|
||||||
|
{
|
||||||
|
throw new Exception("调查人员不能重复("+ ccCheck + "人)!");
|
||||||
|
}
|
||||||
if (entity.PUBLISH != null && entity.PUBLISH.Equals("SaveAndNotify"))
|
if (entity.PUBLISH != null && entity.PUBLISH.Equals("SaveAndNotify"))
|
||||||
{
|
{
|
||||||
Nav_Demands = new List<T_SE_TRAIN_SURVEY_LIST_DEMAND>();
|
Nav_Demands = new List<T_SE_TRAIN_SURVEY_LIST_DEMAND>();
|
||||||
entity.STATUS = SETrainSurveyStatus.调查中;
|
entity.STATUS = SETrainSurveyStatus.调查中;
|
||||||
var listUserID = Demands.Where(e => e.USER_ID.HasValue).Select(e => e.USER_ID.Value);
|
|
||||||
var listUser = GetEntities<T_FM_USER>(e => listUserID.Contains(e.ID), null, null);
|
var listUser = GetEntities<T_FM_USER>(e => listUserID.Contains(e.ID), null, null);
|
||||||
var allSendUserNames = new List<string>();
|
var allSendUserNames = new List<string>();
|
||||||
var allSendUserIds = new List<Guid>();
|
var allSendUserIds = new List<Guid>();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user