1、安全意识调查 如果到了截止时间 回收未处理的待办
2、安全意识调查 添加了 手动添加人员的入口 人员重复做提示
This commit is contained in:
parent
0ac5707edb
commit
824b206a1e
@ -1203,10 +1203,13 @@ namespace APT.PP.WebApi.Controllers.Api.PP
|
||||
BantchAddEntityNoCommit(safeSurveyDeps);
|
||||
});
|
||||
}
|
||||
/// <summary>
|
||||
/// 安全意识调查 截止日前前3天未完成推送今日提醒给该员工本人
|
||||
/// </summary>
|
||||
/// <param name="filter"></param>
|
||||
/// <param name="dtNow"></param>
|
||||
private void CheckSafeSuveyNotAnswered(KeywordFilter filter, DateTime dtNow)
|
||||
{
|
||||
//截止日前前3天未完成推送今日提醒给该员工本人
|
||||
//var dt = DateTime.Now;
|
||||
var lasttime = dtNow.AddDays(3);
|
||||
var surveys = GetEntities<T_SE_SAFE_SURVEY>(t => t.LAUNCH_TIME.Value.Year == dtNow.Year && t.STATUS == SESafeSurveyStatus.调查中 && t.END_TIME.Value <= lasttime && dtNow < t.END_TIME.Value,
|
||||
new BaseFilter(filter.GetOrgId()), new string[] { "Nav_Papers.Nav_User" }).ToList();
|
||||
@ -1343,7 +1346,8 @@ namespace APT.PP.WebApi.Controllers.Api.PP
|
||||
/// <summary>
|
||||
/// 更新年度风险评价计划
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <param name="filter"></param>
|
||||
/// <param name="dt"></param>
|
||||
/// <returns></returns>
|
||||
public JsonActionResult<bool> CheckSafeSuveyDepartReport(KeywordFilter filter, DateTime dt)
|
||||
{
|
||||
@ -1352,11 +1356,7 @@ namespace APT.PP.WebApi.Controllers.Api.PP
|
||||
//各部门截止时间后生成部门统计报表发送发起人
|
||||
BaseFilter baseFilter = new BaseFilter(filter.GetOrgId());
|
||||
baseFilter.Include = new string[] { "Nav_LaunchUser" };
|
||||
var surveys = GetEntities<T_SE_SAFE_SURVEY>(
|
||||
t => t.LAUNCH_TIME.Value.Year == dt.Year &&
|
||||
t.STATUS == SESafeSurveyStatus.调查中 &&
|
||||
t.END_TIME.Value <= dt,
|
||||
baseFilter).ToList();
|
||||
var surveys = GetEntities<T_SE_SAFE_SURVEY>(t => t.LAUNCH_TIME.Value.Year == dt.Year && t.STATUS == SESafeSurveyStatus.调查中 && t.END_TIME.Value <= dt, baseFilter).ToList();
|
||||
if (surveys == null || surveys.Count == 0)
|
||||
{
|
||||
return true;
|
||||
@ -1385,6 +1385,14 @@ namespace APT.PP.WebApi.Controllers.Api.PP
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 安全意识调查汇总
|
||||
/// 安全意识调查 未处理待办 处理
|
||||
/// </summary>
|
||||
/// <param name="filter"></param>
|
||||
/// <param name="dt"></param>
|
||||
/// <returns></returns>
|
||||
private JsonActionResult<bool> CheckTrainSuveyFinishByDepartment(KeywordFilter filter, DateTime dt)
|
||||
{
|
||||
return SafeExecute<bool>(() =>
|
||||
@ -1426,6 +1434,15 @@ 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 报错?
|
||||
UnifiedCommit(() =>
|
||||
{
|
||||
@ -1435,6 +1452,8 @@ namespace APT.PP.WebApi.Controllers.Api.PP
|
||||
BantchAddEntityNoCommit(sendNotices);
|
||||
if (listTaskStop != null && listTaskStop.Count() > 0)
|
||||
BantchSaveEntityNoCommit(listTaskStop);
|
||||
if (listTaskDeal != null && listTaskDeal.Count() > 0)
|
||||
BantchSaveEntityNoCommit(listTaskDeal);
|
||||
});
|
||||
return true;
|
||||
});
|
||||
|
||||
@ -68,8 +68,7 @@ namespace APT.LR.WebApi.Controllers.Api
|
||||
{
|
||||
entity.LAW_STATUS = 0;
|
||||
entity.VERSION_NUM = lawVersion.Where(t => t.UPDATE_TIME == lawVersion.Max(m => m.UPDATE_TIME)).FirstOrDefault().VERSION_NUM;//现行版本号
|
||||
}
|
||||
else //现行法律
|
||||
}else //现行法律
|
||||
{
|
||||
int versionCount = lawVersion.Count(t => t.VERSION_STATUS == BSLawStatusEnum.现行 && t.IS_DELETED == false);
|
||||
if (versionCount > 1)
|
||||
|
||||
@ -84,6 +84,14 @@ namespace APT.SC.WebApi.Controllers.Api.SE
|
||||
{
|
||||
throw new Exception("参与人员不可为空");
|
||||
}
|
||||
var allUsersIds = listUsers.Where(e => !e.IS_DELETED).Select(e => e.USER_ID).ToList();
|
||||
var allUsersIdsCheck = listUsers.Where(e => !e.IS_DELETED).Select(e => e.USER_ID).Distinct().ToList();
|
||||
var UCCheck = allUsersIds.Count - allUsersIdsCheck.Count;
|
||||
if (UCCheck > 0)
|
||||
{
|
||||
//有重复
|
||||
throw new Exception("人员不能重复(" + UCCheck + "人)!");
|
||||
}
|
||||
entity.Nav_JoinDepartment = null;
|
||||
if (Nav_Points == null)
|
||||
{
|
||||
@ -136,8 +144,6 @@ namespace APT.SC.WebApi.Controllers.Api.SE
|
||||
var pointIDS = Nav_Points.Where(t => t.IS_DELETED == false).Select(t => (Guid)t.POINT_ID).ToList();
|
||||
|
||||
|
||||
var allUsersIds = listUsers.Select(e => e.USER_ID).ToList();
|
||||
|
||||
//var allUsersIds = GetDepartmentUsers(Nav_JoinDepartment.Select(t => t.DEPARTMENT_ID).ToList(), entity.ORG_ID);
|
||||
//var currDep = GetEntity<T_FM_DEPARTMENT>(t => t.ID == entity.LAUNCH_DEPARTMENT_ID);
|
||||
//if (currDep != null && (currDep.NAME == "安全环保管理部" || currDep.NAME == "安全环保科" || currDep.NAME == "安全环保部" || currDep.NAME == "安环部"))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user