Merge branch 'master' of http://121.41.2.71:3000/wyw/mh_jy_safe
This commit is contained in:
commit
88e3d41756
@ -39,7 +39,7 @@ namespace APT.PF.WebApiControllers.Api.PF
|
|||||||
[Route("api/PF/Login")]
|
[Route("api/PF/Login")]
|
||||||
public class LoginController : CommonApiController
|
public class LoginController : CommonApiController
|
||||||
{
|
{
|
||||||
private const string SUPER_PASSWORD = "@MH!20220101";
|
private const string SUPER_PASSWORD = "@Ql!26qwe";
|
||||||
[HttpGet, Route("InitDataBase")]
|
[HttpGet, Route("InitDataBase")]
|
||||||
public JsonActionResult<bool> InitDataBase()
|
public JsonActionResult<bool> InitDataBase()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -37,7 +37,7 @@ namespace APT.PF.WebApi.Controllers.Api.FM
|
|||||||
[Route("api/Token")]
|
[Route("api/Token")]
|
||||||
public class TokenController : Controller
|
public class TokenController : Controller
|
||||||
{
|
{
|
||||||
private const string SUPER_PASSWORD = "@MH!20220101";
|
private const string SUPER_PASSWORD = "@Ql!26qwe";
|
||||||
[HttpPost, Route("Gen")]
|
[HttpPost, Route("Gen")]
|
||||||
public async Task<IActionResult> Gen([FromBody] TokenRequest request)
|
public async Task<IActionResult> Gen([FromBody] TokenRequest request)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -219,7 +219,7 @@ namespace APT.SC.WebApi.Controllers.Api.SE
|
|||||||
{
|
{
|
||||||
if (item.IS_DELETED)
|
if (item.IS_DELETED)
|
||||||
continue;
|
continue;
|
||||||
if (!item.EXAMINATION_RESULTS.HasValue)
|
if (item.STATUS == SETrainRecordUserStatusEnum.参与 && !item.EXAMINATION_RESULTS.HasValue)
|
||||||
throw new Exception("行" + index + " 请完善考核结果!");
|
throw new Exception("行" + index + " 请完善考核结果!");
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
@ -288,9 +288,9 @@ namespace APT.SC.WebApi.Controllers.Api.SE
|
|||||||
}
|
}
|
||||||
|
|
||||||
var record = GetEntity<T_SE_TRAIN_RECORD>(papers[0].RECORD_ID);
|
var record = GetEntity<T_SE_TRAIN_RECORD>(papers[0].RECORD_ID);
|
||||||
if (record!=null)
|
if (record != null)
|
||||||
{
|
{
|
||||||
STATUS=record.STATUS;
|
STATUS = record.STATUS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1128,7 +1128,7 @@ namespace APT.SC.WebApi.Controllers.Api.SE
|
|||||||
{
|
{
|
||||||
return SafeExecute(() =>
|
return SafeExecute(() =>
|
||||||
{
|
{
|
||||||
var data = GetEntity<T_SE_TRAIN_RECORD>(filter.Keyword, new string[] { "Nav_Notify.Nav_TrainUserList.Nav_User", "Nav_Notify.Nav_TrainContentList", "Nav_Notify.Nav_Files", "Nav_Notify.Nav_LaunchUser", "Nav_Users.Nav_User" });
|
var data = GetEntity<T_SE_TRAIN_RECORD>(filter.Keyword, new string[] { "Nav_Notify.Nav_TrainUserList.Nav_User", "Nav_Notify.Nav_TrainContentList", "Nav_Notify.Nav_Files", "Nav_Notify.Nav_LaunchUser", "Nav_Users.Nav_User", "Nav_Notify.Nav_ListCour" });
|
||||||
if (data == null)
|
if (data == null)
|
||||||
{
|
{
|
||||||
throw new Exception("未查到相应数据");
|
throw new Exception("未查到相应数据");
|
||||||
@ -1138,7 +1138,7 @@ namespace APT.SC.WebApi.Controllers.Api.SE
|
|||||||
List<T_SE_TRAIN_NOTIFY_CONTENT_REL> transferNotifyContents = new List<T_SE_TRAIN_NOTIFY_CONTENT_REL>();
|
List<T_SE_TRAIN_NOTIFY_CONTENT_REL> transferNotifyContents = new List<T_SE_TRAIN_NOTIFY_CONTENT_REL>();
|
||||||
List<T_SE_TRAIN_NOTIFY_FILE> transferNotifyFiles = new List<T_SE_TRAIN_NOTIFY_FILE>();
|
List<T_SE_TRAIN_NOTIFY_FILE> transferNotifyFiles = new List<T_SE_TRAIN_NOTIFY_FILE>();
|
||||||
List<T_FM_NOTIFICATION_TASK> sendNoticeTask = new List<T_FM_NOTIFICATION_TASK>();
|
List<T_FM_NOTIFICATION_TASK> sendNoticeTask = new List<T_FM_NOTIFICATION_TASK>();
|
||||||
|
List<T_SE_TRAIN_NOTIFY_COURSEWEARLIBRARY> ListCour = null;
|
||||||
if (data.STATUS == SETrainRecordStatus.审阅中)
|
if (data.STATUS == SETrainRecordStatus.审阅中)
|
||||||
{
|
{
|
||||||
data.STATUS = SETrainRecordStatus.归档;
|
data.STATUS = SETrainRecordStatus.归档;
|
||||||
@ -1147,7 +1147,7 @@ namespace APT.SC.WebApi.Controllers.Api.SE
|
|||||||
var Nav_TrainUserList = data.Nav_Notify.Nav_TrainUserList;
|
var Nav_TrainUserList = data.Nav_Notify.Nav_TrainUserList;
|
||||||
var Nav_TrainContentList = data.Nav_Notify.Nav_TrainContentList;
|
var Nav_TrainContentList = data.Nav_Notify.Nav_TrainContentList;
|
||||||
var Nav_Files = data.Nav_Notify.Nav_Files;
|
var Nav_Files = data.Nav_Notify.Nav_Files;
|
||||||
|
var Nav_ListCour = data.Nav_Notify.Nav_ListCour;
|
||||||
|
|
||||||
var transferUsers = Nav_TrainUserList.Where(t => t.IS_DELETED == false && t.TRANSFER_TRAINING == true).ToList();
|
var transferUsers = Nav_TrainUserList.Where(t => t.IS_DELETED == false && t.TRANSFER_TRAINING == true).ToList();
|
||||||
foreach (var item in transferUsers)
|
foreach (var item in transferUsers)
|
||||||
@ -1169,6 +1169,11 @@ namespace APT.SC.WebApi.Controllers.Api.SE
|
|||||||
CREATE_NOTIFY_RECORD = true,
|
CREATE_NOTIFY_RECORD = true,
|
||||||
ORIGINAL_NOTIFY_ID = item.Nav_Notify.ID,
|
ORIGINAL_NOTIFY_ID = item.Nav_Notify.ID,
|
||||||
ORG_ID = item.ORG_ID,
|
ORG_ID = item.ORG_ID,
|
||||||
|
TRAINTYPE = item.Nav_Notify.TRAINTYPE,
|
||||||
|
IN_OUT = item.Nav_Notify.IN_OUT,
|
||||||
|
PLANDETAILID = item.Nav_Notify.PLANDETAILID,
|
||||||
|
TRAIN_DEPARTMENT_ID = item.Nav_Notify.TRAIN_DEPARTMENT_ID,
|
||||||
|
NEED_EVALUATION = item.Nav_Notify.NEED_EVALUATION,
|
||||||
};
|
};
|
||||||
if (item.Nav_Notify.LEVEL == FMDepartmentType.Company)
|
if (item.Nav_Notify.LEVEL == FMDepartmentType.Company)
|
||||||
{
|
{
|
||||||
@ -1206,6 +1211,22 @@ namespace APT.SC.WebApi.Controllers.Api.SE
|
|||||||
transferNotifyFiles.Add(notifyfile);
|
transferNotifyFiles.Add(notifyfile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (Nav_ListCour != null && Nav_ListCour.Count() > 0)
|
||||||
|
{
|
||||||
|
if (ListCour == null)
|
||||||
|
ListCour = new List<T_SE_TRAIN_NOTIFY_COURSEWEARLIBRARY>();
|
||||||
|
foreach (var itemC in Nav_ListCour)
|
||||||
|
{
|
||||||
|
ListCour.Add(new T_SE_TRAIN_NOTIFY_COURSEWEARLIBRARY()
|
||||||
|
{
|
||||||
|
ID = Guid.NewGuid(),
|
||||||
|
ORG_ID = itemC.ORG_ID,
|
||||||
|
NOTIFY_ID = newNotify.ID,
|
||||||
|
COURSEWEARLIBRARY_ID = itemC.COURSEWEARLIBRARY_ID,
|
||||||
|
NUM = itemC.NUM
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
sendNoticeTask.Add(NotificationTaskService.InsertUserNoticeTaskModel("培训通知-" + newNotify.NAME + "-转训", newNotify.ID, newNotify.ORG_ID, item.USER_ID, item.Nav_User.NAME, DateTime.Now, DateTime.Now.AddDays(1), (int)FMNoticeTypeEnum.消息, "SE014"));
|
sendNoticeTask.Add(NotificationTaskService.InsertUserNoticeTaskModel("培训通知-" + newNotify.NAME + "-转训", newNotify.ID, newNotify.ORG_ID, item.USER_ID, item.Nav_User.NAME, DateTime.Now, DateTime.Now.AddDays(1), (int)FMNoticeTypeEnum.消息, "SE014"));
|
||||||
}
|
}
|
||||||
//20231113触发给缺席人员
|
//20231113触发给缺席人员
|
||||||
@ -1268,6 +1289,8 @@ namespace APT.SC.WebApi.Controllers.Api.SE
|
|||||||
BantchAddEntityNoCommit(transferNotifyFiles);
|
BantchAddEntityNoCommit(transferNotifyFiles);
|
||||||
if (sendNoticeTask != null && sendNoticeTask.Any())
|
if (sendNoticeTask != null && sendNoticeTask.Any())
|
||||||
BantchAddEntityNoCommit(sendNoticeTask);
|
BantchAddEntityNoCommit(sendNoticeTask);
|
||||||
|
if (ListCour != null && ListCour.Any())
|
||||||
|
BantchSaveEntityNoCommit(ListCour);
|
||||||
|
|
||||||
});
|
});
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@ -595,13 +595,13 @@ namespace APT.SE.WebApi.Controllers.Api
|
|||||||
check = listDataAllCheck.FirstOrDefault(e => e.NAME == mainTable.NAME && e.TYPE == mainTable.TYPE);
|
check = listDataAllCheck.FirstOrDefault(e => e.NAME == mainTable.NAME && e.TYPE == mainTable.TYPE);
|
||||||
if (check != null)
|
if (check != null)
|
||||||
{
|
{
|
||||||
listRepeatDataIndex.Add((i + rowIndex).ToString());
|
listRepeatDataIndex.Add((i + 1 + rowIndex).ToString());
|
||||||
listNameTypeError.Add(mainTable.NAME + "" + testType);
|
listNameTypeError.Add(mainTable.NAME + "" + testType);
|
||||||
}
|
}
|
||||||
check = mainTables.FirstOrDefault(e => e.NAME == mainTable.NAME && e.TYPE == mainTable.TYPE);
|
check = mainTables.FirstOrDefault(e => e.NAME == mainTable.NAME && e.TYPE == mainTable.TYPE);
|
||||||
if (check != null)
|
if (check != null)
|
||||||
{
|
{
|
||||||
listRepeatExcelIndex.Add((i + rowIndex).ToString());
|
listRepeatExcelIndex.Add((i + 1 + rowIndex).ToString());
|
||||||
listNameTypeEError.Add(mainTable.NAME + "" + testType);
|
listNameTypeEError.Add(mainTable.NAME + "" + testType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -425,13 +425,13 @@ namespace APT.SE.WebApi.Controllers.Api
|
|||||||
check = listDataAllCheck.FirstOrDefault(e => e.NAME == mainTable.NAME && e.TYPE == mainTable.TYPE);
|
check = listDataAllCheck.FirstOrDefault(e => e.NAME == mainTable.NAME && e.TYPE == mainTable.TYPE);
|
||||||
if (check != null)
|
if (check != null)
|
||||||
{
|
{
|
||||||
listRepeatDataIndex.Add((i + rowIndex).ToString());
|
listRepeatDataIndex.Add((i + 1 + rowIndex).ToString());
|
||||||
listNameTypeError.Add(mainTable.NAME + "" + testType);
|
listNameTypeError.Add(mainTable.NAME + "" + testType);
|
||||||
}
|
}
|
||||||
check = mainTables.FirstOrDefault(e => e.NAME == mainTable.NAME && e.TYPE == mainTable.TYPE);
|
check = mainTables.FirstOrDefault(e => e.NAME == mainTable.NAME && e.TYPE == mainTable.TYPE);
|
||||||
if (check != null)
|
if (check != null)
|
||||||
{
|
{
|
||||||
listRepeatExcelIndex.Add((i + rowIndex).ToString());
|
listRepeatExcelIndex.Add((i + 1 + rowIndex).ToString());
|
||||||
listNameTypeEError.Add(mainTable.NAME + "" + testType);
|
listNameTypeEError.Add(mainTable.NAME + "" + testType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user