Merge branch 'master' of http://121.41.2.71:3000/wyw/mh_jy_safe
This commit is contained in:
commit
ace31814f2
@ -39,7 +39,7 @@ namespace APT.PP.WebApi.Controllers.Api.PP
|
||||
{
|
||||
IFMNotificationTaskService NotificationTaskService { get; set; }
|
||||
IFMDepartmentService DepartmentService { get; set; }
|
||||
string[] allDeps = { "矿山部", "选矿部", "安全环保管理部", "安全环保科", "选矿一部", "选矿二部", "机电部", "安全环保部", "生产管理部", "安环部" };
|
||||
string[] allDeps = { "矿山部", "选矿部", "安全环保管理部", "安全环保科", "选矿一部", "选矿二部", "机电部", "安全环保部", "生产管理部", "安环部", "安全管理部" };
|
||||
string[] safeDeps = { "安全环保管理部", "安全环保科", "安全环保部", "安环部" };
|
||||
string[] workDeps = { "矿山部", "选矿部", "选矿一部", "选矿二部", "机电部", "生产管理部", "安环部" };
|
||||
|
||||
@ -88,7 +88,7 @@ namespace APT.PP.WebApi.Controllers.Api.PP
|
||||
//CheckDepTrainPlan(filter, dtNow, config);
|
||||
CreateYearTrainPlan(filter, dtNow, config);
|
||||
//到时间触发年度培训计划,搜集完成的部门培训计划
|
||||
FinishYearTrainPlan(filter, dtNow, config);
|
||||
//FinishYearTrainPlan(filter, dtNow, config); wyw 只触发给公司级 没必要添加结束时间 就一单 时间没到做归档也没意义
|
||||
//培训通知
|
||||
CheckYearTrainPlan(filter, dtNow);
|
||||
//培训通知 wyw
|
||||
@ -1102,7 +1102,8 @@ namespace APT.PP.WebApi.Controllers.Api.PP
|
||||
{
|
||||
return;
|
||||
}
|
||||
var sendTitle = "请填写安全意识调查 【" + surveys.FirstOrDefault().NAME + "】发起时间:" + string.Format("{0:yyyy-MM-dd}", surveys.FirstOrDefault().LAUNCH_TIME);
|
||||
//var sendTitle = "请填写安全意识调查 【" + surveys.FirstOrDefault().NAME + "】发起时间:" + string.Format("{0:yyyy-MM-dd}", surveys.FirstOrDefault().LAUNCH_TIME);
|
||||
var sendTitle = "请填写【" + surveys.FirstOrDefault().NAME + "】结束时间:" + string.Format("{0:yyyy-MM-dd}", surveys.FirstOrDefault().END_TIME);
|
||||
var isRepeat = GetEntity<T_FM_NOTIFICATION_TASK>(t => t.NOTICE_TITLE == sendTitle);
|
||||
if (isRepeat != null)
|
||||
{
|
||||
@ -1120,7 +1121,8 @@ namespace APT.PP.WebApi.Controllers.Api.PP
|
||||
{
|
||||
foreach (var item in uids)
|
||||
{
|
||||
allSendUserTitles.Add("请填写安全意识调查 【" + t.NAME + "】发起时间:" + string.Format("{0:yyyy-MM-dd}", t.LAUNCH_TIME));
|
||||
//allSendUserTitles.Add("请填写安全意识调查 【" + t.NAME + "】发起时间:" + string.Format("{0:yyyy-MM-dd}", t.LAUNCH_TIME));
|
||||
allSendUserTitles.Add("请填写【" + t.NAME + "】结束时间:" + string.Format("{0:yyyy-MM-dd}", t.END_TIME));
|
||||
allSendDataIds.Add(t.ID);
|
||||
allSendUserIds.Add((Guid)item.USER_ID);
|
||||
allSendUserNames.Add(item.NAME);
|
||||
|
||||
@ -101,6 +101,16 @@ namespace APT.SC.WebApi.Controllers.Api.SE
|
||||
var CCount = 1;
|
||||
if (config != null)
|
||||
{
|
||||
if (config.M_TEST_COUNT > 0 || config.S_TEST_COUNT > 0 || config.C_TEST_COUNT > 0)
|
||||
{
|
||||
//王永文 只要有配置 就获取
|
||||
MCount = config.M_TEST_COUNT;
|
||||
SCount = config.S_TEST_COUNT;
|
||||
CCount = config.C_TEST_COUNT;
|
||||
}
|
||||
else
|
||||
{
|
||||
//保持原来的版本
|
||||
if (config.M_TEST_COUNT > 0)
|
||||
{
|
||||
MCount = config.M_TEST_COUNT;
|
||||
@ -114,6 +124,8 @@ namespace APT.SC.WebApi.Controllers.Api.SE
|
||||
CCount = config.C_TEST_COUNT;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
var testidlist = new List<Guid>();
|
||||
var pointIDS = Nav_Points.Where(t => t.IS_DELETED == false).Select(t => (Guid)t.POINT_ID).ToList();
|
||||
var allUsersIds = GetDepartmentUsers(Nav_JoinDepartment.Select(t => t.DEPARTMENT_ID).ToList(), entity.ORG_ID);
|
||||
@ -163,8 +175,11 @@ namespace APT.SC.WebApi.Controllers.Api.SE
|
||||
if (userName != null)
|
||||
{
|
||||
testidlist.Clear();
|
||||
if (CCount > 0)
|
||||
CreateTestList(allTests, testidlist, pointIDS, allUserPostIdS[i], (int)SETestTypeEnum.是非题, CCount);
|
||||
if (SCount > 0)
|
||||
CreateTestList(allTests, testidlist, pointIDS, allUserPostIdS[i], (int)SETestTypeEnum.单选题, SCount);
|
||||
if (MCount > 0)
|
||||
CreateTestList(allTests, testidlist, pointIDS, allUserPostIdS[i], (int)SETestTypeEnum.多选题, MCount);
|
||||
if (testidlist.Count != 0)
|
||||
{
|
||||
@ -551,7 +566,7 @@ namespace APT.SC.WebApi.Controllers.Api.SE
|
||||
}
|
||||
else if (ret.TYPE == "部门")
|
||||
{
|
||||
baseFilter.SelectField = new string[] { "ANSWER", "Nav_User.Nav_Department.NAME", "Nav_Department.NAME", "Nav_Test.Nav_Points.POINT_ID","Nav_Test.ANSWER" };
|
||||
baseFilter.SelectField = new string[] { "ANSWER", "Nav_User.Nav_Department.NAME", "Nav_Department.NAME", "Nav_Test.Nav_Points.POINT_ID", "Nav_Test.ANSWER" };
|
||||
|
||||
papers = GetEntities<T_SE_SAFE_SURVEY_LIST_PAPER>(t => surveyIds.Contains(t.SAFE_ID), baseFilter);
|
||||
papers.ForEach(paper =>
|
||||
@ -561,7 +576,7 @@ namespace APT.SC.WebApi.Controllers.Api.SE
|
||||
T_FM_DEPARTMENT cd = paper.Nav_User.Nav_Department;
|
||||
if (pd.ID != cd.ID)
|
||||
{
|
||||
if (cd.Nav_Parent!=null && cd.Nav_Parent.ID != pd.ID)
|
||||
if (cd.Nav_Parent != null && cd.Nav_Parent.ID != pd.ID)
|
||||
{
|
||||
cd = cd.Nav_Parent;
|
||||
}
|
||||
|
||||
@ -28,7 +28,10 @@ namespace APT.SC.WebApi.Controllers.Api.SE
|
||||
return SafeExecute(() =>
|
||||
{
|
||||
var total = entity.S_TEST_COUNT * entity.S_TEST_SCORE + entity.M_TEST_COUNT * entity.M_TEST_SCORE + entity.C_TEST_COUNT * entity.C_TEST_SCORE;
|
||||
if (entity.DEP_TRAIN_PLAN_END_TIME.HasValue)
|
||||
{
|
||||
entity.DEP_TRAIN_PLAN_END_TIME = DateTime.Parse(entity.DEP_TRAIN_PLAN_END_TIME.Value.ToShortDateString() + " 23:59:59");
|
||||
}
|
||||
if (total != 100)
|
||||
{
|
||||
throw new Exception("请注意试题总分是否为100分!");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user