diff --git a/APT.MicroApi/APT.PP.WebApi/Controllers/Api/SEController.cs b/APT.MicroApi/APT.PP.WebApi/Controllers/Api/SEController.cs
index f6b3e36..f2c8756 100644
--- a/APT.MicroApi/APT.PP.WebApi/Controllers/Api/SEController.cs
+++ b/APT.MicroApi/APT.PP.WebApi/Controllers/Api/SEController.cs
@@ -1203,10 +1203,13 @@ namespace APT.PP.WebApi.Controllers.Api.PP
BantchAddEntityNoCommit(safeSurveyDeps);
});
}
+ ///
+ /// 安全意识调查 截止日前前3天未完成推送今日提醒给该员工本人
+ ///
+ ///
+ ///
private void CheckSafeSuveyNotAnswered(KeywordFilter filter, DateTime dtNow)
{
- //截止日前前3天未完成推送今日提醒给该员工本人
- //var dt = DateTime.Now;
var lasttime = dtNow.AddDays(3);
var surveys = GetEntities(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
///
/// 更新年度风险评价计划
///
- ///
+ ///
+ ///
///
public JsonActionResult 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 => t.LAUNCH_TIME.Value.Year == dt.Year &&
- t.STATUS == SESafeSurveyStatus.调查中 &&
- t.END_TIME.Value <= dt,
- baseFilter).ToList();
+ var surveys = GetEntities(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;
});
}
+
+ ///
+ /// 安全意识调查汇总
+ /// 安全意识调查 未处理待办 处理
+ ///
+ ///
+ ///
+ ///
private JsonActionResult CheckTrainSuveyFinishByDepartment(KeywordFilter filter, DateTime dt)
{
return SafeExecute(() =>
@@ -1426,6 +1434,15 @@ namespace APT.PP.WebApi.Controllers.Api.PP
});
}
+ //wyw 未处理的安全意识调查 转无需办理
+ var listTaskDeal = GetEntities(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;
});
diff --git a/APT.MicroApi/APT.SC.WebApi/Controllers/Api/LRController/6LawController.cs b/APT.MicroApi/APT.SC.WebApi/Controllers/Api/LRController/6LawController.cs
index 27056ac..19ceda2 100644
--- a/APT.MicroApi/APT.SC.WebApi/Controllers/Api/LRController/6LawController.cs
+++ b/APT.MicroApi/APT.SC.WebApi/Controllers/Api/LRController/6LawController.cs
@@ -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)
diff --git a/APT.MicroApi/APT.SC.WebApi/Controllers/Api/SEController/1SESafeSurveyController.cs b/APT.MicroApi/APT.SC.WebApi/Controllers/Api/SEController/1SESafeSurveyController.cs
index 7a8a6d7..8ba45ba 100644
--- a/APT.MicroApi/APT.SC.WebApi/Controllers/Api/SEController/1SESafeSurveyController.cs
+++ b/APT.MicroApi/APT.SC.WebApi/Controllers/Api/SEController/1SESafeSurveyController.cs
@@ -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 => t.ID == entity.LAUNCH_DEPARTMENT_ID);
//if (currDep != null && (currDep.NAME == "安全环保管理部" || currDep.NAME == "安全环保科" || currDep.NAME == "安全环保部" || currDep.NAME == "安环部"))