Merge branch 'master' of http://121.41.2.71:3000/wyw/mh_jy_safe
This commit is contained in:
commit
7989dbd0f6
@ -218,19 +218,29 @@ namespace APT.PP.WebApi.Controllers.Api.PP
|
|||||||
catch { }
|
catch { }
|
||||||
}
|
}
|
||||||
|
|
||||||
if (currTime.Hour < 15)
|
//金源培训 9 ~ 15 可以触发一次
|
||||||
|
if (currTime.Hour == 8 || currTime.Hour == 9)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var orgId = filter.GetOrgId();
|
||||||
|
var newUsers = GetEntities<T_SE_USER_TEMP>(t => t.IS_SEND == 0, new BaseFilter(orgId));
|
||||||
|
if (!newUsers.Any() || newUsers.Count() < 1)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
//如果今天触发过三级安全教育 直接返回
|
||||||
|
var NewCheck = GetEntity<T_SE_NEW_USERS>(e => !e.IS_DELETED && e.TRAIN_STATUS == SEThreeLevelSafeTrainType.公司级 && e.CREATE_TIME.HasValue && e.CREATE_TIME.Value.Date == currTime.Date);
|
||||||
|
if (NewCheck != null)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
T_SE_NEW_USERS eduCard = null;
|
T_SE_NEW_USERS eduCard = null;
|
||||||
List<T_FM_NOTIFICATION_TASK> sendNotice = new List<T_FM_NOTIFICATION_TASK>();
|
List<T_FM_NOTIFICATION_TASK> sendNotice = new List<T_FM_NOTIFICATION_TASK>();
|
||||||
List<T_SE_NEW_USER_DETAIL> userDetails = new List<T_SE_NEW_USER_DETAIL>();
|
List<T_SE_NEW_USER_DETAIL> userDetails = new List<T_SE_NEW_USER_DETAIL>();
|
||||||
var orgId = filter.GetOrgId();
|
|
||||||
var newUsers = GetEntities<T_SE_USER_TEMP>(t => t.IS_SEND == 0, new BaseFilter(orgId));
|
|
||||||
if (!newUsers.Any())
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
var newUsersId = newUsers.Select(t => t.USER_ID);
|
var newUsersId = newUsers.Select(t => t.USER_ID);
|
||||||
var newAllUsers = GetEntities<T_FM_USER>(t => newUsersId.Contains(t.ID), new BaseFilter(orgId));
|
var newAllUsers = GetEntities<T_FM_USER>(t => newUsersId.Contains(t.ID), new BaseFilter(orgId));
|
||||||
var sendUser = GetEntity<T_FM_USER>(t => t.Nav_ApproveRole != null && t.Nav_ApproveRole.NAME == "安环部安全员" && t.IS_DELETED == false && t.ENABLE_STATUS == 0);
|
var sendUser = GetEntity<T_FM_USER>(t => t.Nav_ApproveRole != null && t.Nav_ApproveRole.NAME == "安环部安全员" && t.IS_DELETED == false && t.ENABLE_STATUS == 0);
|
||||||
@ -241,6 +251,7 @@ namespace APT.PP.WebApi.Controllers.Api.PP
|
|||||||
eduCard.USER_ID = sendUser.ID;
|
eduCard.USER_ID = sendUser.ID;
|
||||||
eduCard.ORG_ID = orgId;
|
eduCard.ORG_ID = orgId;
|
||||||
eduCard.TRAIN_STATUS = SEThreeLevelSafeTrainType.公司级;
|
eduCard.TRAIN_STATUS = SEThreeLevelSafeTrainType.公司级;
|
||||||
|
eduCard.CREATE_TIME = currTime;
|
||||||
if (train_contents != null)
|
if (train_contents != null)
|
||||||
{
|
{
|
||||||
eduCard.CONTENT_ID = train_contents.ID;
|
eduCard.CONTENT_ID = train_contents.ID;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user