培训教育 状态 完善

培训记录 用户 添加是否非常规 触发待办
培训通知 签到开始时间 非必填  如果没填 以培训开始时间触发培训签到
培训记录 提交 处理 培训通知反馈 培训记录签到 待办 为 超期未处理
签到 如果都完成了 状态变成 签到完成
停止签到 如果有未签到的 就是停止签到  否则 签到完成
添加考试中 待办
This commit is contained in:
wyw 2026-07-14 11:45:14 +08:00
parent 9f65215457
commit a5270c2ebe
7 changed files with 139948 additions and 6 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,24 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace APT.Data.Migrations.Migrations
{
public partial class wyw2026071301 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "IS_RESEND",
table: "T_SE_TRAIN_RECORD_USER",
type: "bit",
nullable: false,
defaultValue: false);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "IS_RESEND",
table: "T_SE_TRAIN_RECORD_USER");
}
}
}

View File

@ -8538,7 +8538,7 @@ namespace APT.Data.Migrations.Migrations
b.Property<string>("REMARK") b.Property<string>("REMARK")
.HasMaxLength(100) .HasMaxLength(100)
.HasColumnType("nvarchar(200)"); .HasColumnType("nvarchar(100)");
b.Property<int>("STATUS") b.Property<int>("STATUS")
.HasColumnType("int"); .HasColumnType("int");
@ -76776,6 +76776,9 @@ namespace APT.Data.Migrations.Migrations
b.Property<bool>("IS_DELETED") b.Property<bool>("IS_DELETED")
.HasColumnType("bit"); .HasColumnType("bit");
b.Property<bool>("IS_RESEND")
.HasColumnType("bit");
b.Property<Guid?>("MODIFIER_ID") b.Property<Guid?>("MODIFIER_ID")
.HasColumnType("uniqueidentifier"); .HasColumnType("uniqueidentifier");

View File

@ -103,5 +103,11 @@ namespace APT.MS.Domain.Entities.SE
/// </summary> /// </summary>
[Description("签到时间")] [Description("签到时间")]
public DateTime? DT_SIGN { get; set; } public DateTime? DT_SIGN { get; set; }
/// <summary>
/// 是否再次签到 已签到也不管
/// </summary>
[Description("是否再次签到")]
public bool IS_RESEND{ get; set; }
} }
} }

View File

@ -134,11 +134,24 @@ namespace APT.MS.Domain.Enums
public enum SETrainRecordStatus public enum SETrainRecordStatus
{ {
[Description("已取消")]
= -1, = -1,
[Description("草稿")]
稿 = 0, 稿 = 0,
[Description("签到中")]
= 1, = 1,
= 2, //审阅中 = 2,
= 3, //归档 = 3,
[Description("停止签到")]
= 10,
[Description("签到完成")]
= 20,
[Description("考试中")]
= 30,
[Description("审阅中")]
= 40,
[Description("归档")]
= 50
} }
public enum SETrainningEffectSurveyStatus public enum SETrainningEffectSurveyStatus

View File

@ -2005,7 +2005,7 @@ namespace APT.PP.WebApi.Controllers.Api.PP
foreach (var notify1 in finishNotifys1) foreach (var notify1 in finishNotifys1)
{ {
notify1.NOTICE_STATUS = 4; notify1.NOTICE_STATUS = 4;//待办 处理
} }
SendNotices = NotificationTaskService.InsertUserNoticeTaskModels(allSendTitles, allSendDataIds, orgId, allSendUserIds, allSendUserNames, DateTime.Now, DateTime.Now.AddDays(10), (int)FMNoticeTypeEnum., "SE018"); SendNotices = NotificationTaskService.InsertUserNoticeTaskModels(allSendTitles, allSendDataIds, orgId, allSendUserIds, allSendUserNames, DateTime.Now, DateTime.Now.AddDays(10), (int)FMNoticeTypeEnum., "SE018");
@ -2043,7 +2043,7 @@ namespace APT.PP.WebApi.Controllers.Api.PP
#region #region
notifys = GetEntities<T_SE_TRAIN_NOTIFY>(t => t.STATUS != SETrainNotifyStatus.稿 && !t.ISSENDSIGN && t.DT_START_SIGN.HasValue && t.DT_START_SIGN.Value < maxTime, baseFilter).ToList(); notifys = GetEntities<T_SE_TRAIN_NOTIFY>(t => t.STATUS != SETrainNotifyStatus.稿 && !t.ISSENDSIGN && ((t.DT_START_SIGN.HasValue && t.DT_START_SIGN.Value < maxTime) || (!t.DT_START_SIGN.HasValue && t.TRAIN_START_TIME.HasValue && t.TRAIN_START_TIME.Value < maxTime)), baseFilter).ToList();
if (notifys != null && notifys.Count() > 0) if (notifys != null && notifys.Count() > 0)
{ {

View File

@ -116,6 +116,10 @@ namespace APT.SC.WebApi.Controllers.Api.SE
{ {
throw new Exception("获取信息失败,请重试或检查表单是否存在!"); throw new Exception("获取信息失败,请重试或检查表单是否存在!");
} }
else if (model.STATUS == SETrainRecordStatus. || model.STATUS == SETrainRecordStatus. || model.STATUS == SETrainRecordStatus.)
{
throw new Exception("该培训记录处于【" + model.STATUS.GetDescription() + "】,停止签到失败!");
}
if (model.ISSTOPSIGN != true) if (model.ISSTOPSIGN != true)
{ {
model.ISSTOPSIGN = true; model.ISSTOPSIGN = true;
@ -130,6 +134,11 @@ namespace APT.SC.WebApi.Controllers.Api.SE
e.STATUS = SETrainRecordUserStatusEnum.; e.STATUS = SETrainRecordUserStatusEnum.;
e.MODIFY_TIME = DateTime.Now; e.MODIFY_TIME = DateTime.Now;
}); });
model.STATUS = SETrainRecordStatus.;
}
else
{
model.STATUS = SETrainRecordStatus.;
} }
UnifiedCommit(() => UnifiedCommit(() =>
@ -527,8 +536,10 @@ namespace APT.SC.WebApi.Controllers.Api.SE
{ {
throw new Exception("未查询到您与此场培训计划相关信息,签到失败!"); throw new Exception("未查询到您与此场培训计划相关信息,签到失败!");
} }
if (recordUser.Nav_Record.ISSTOPSIGN)
if (recordUser.Nav_Record.ISSTOPSIGN && !recordUser.IS_RESEND)
{ {
//如果已经在考试了 ,及时重新发送签到,也没触发考试 也没有页面让重新触发签到
UnifiedCommit(() => UnifiedCommit(() =>
{ {
if (finishNotice != null) if (finishNotice != null)
@ -541,11 +552,23 @@ namespace APT.SC.WebApi.Controllers.Api.SE
recordUser.DT_SIGN = DateTime.Now; recordUser.DT_SIGN = DateTime.Now;
//保存并发送中处理 生成试题 考试 //培训效果评估调查 //给安环发送 审阅中 (处理没签到的为 缺席) //保存并发送中处理 生成试题 考试 //培训效果评估调查 //给安环发送 审阅中 (处理没签到的为 缺席)
T_SE_TRAIN_RECORD modelRecord = null;
if (recordUser.Nav_Record.STATUS == SETrainRecordStatus.)
{
var check = GetEntity<T_SE_TRAIN_RECORD_USER>(e => e.RECORD_ID == RECORD_ID && e.USER_ID != userID && !e.DT_SIGN.HasValue && e.STATUS == SETrainRecordUserStatusEnum.);
if (check == null)
{
modelRecord = recordUser.Nav_Record;
modelRecord.STATUS = SETrainRecordStatus.;
}
}
UnifiedCommit(() => UnifiedCommit(() =>
{ {
UpdateEntityNoCommit(recordUser); UpdateEntityNoCommit(recordUser);
if (finishNotice != null) if (finishNotice != null)
UpdateEntityNoCommit(finishNotice); UpdateEntityNoCommit(finishNotice);
if (modelRecord != null)
UpdateEntityNoCommit(modelRecord);
}); });
#endregion #endregion
@ -804,6 +827,8 @@ namespace APT.SC.WebApi.Controllers.Api.SE
DateTime dtN = DateTime.Now; DateTime dtN = DateTime.Now;
List<T_SE_TRAIN_RECORD_TEXT> listText = null; List<T_SE_TRAIN_RECORD_TEXT> listText = null;
List<T_SE_TRAIN_RECORD_PAPER> Nav_Papers = null; List<T_SE_TRAIN_RECORD_PAPER> Nav_Papers = null;
IEnumerable<T_FM_NOTIFICATION_TASK> IlistFinish = null;//培训通知 签到 待办处理
if (entity.PUBLISH != null && entity.PUBLISH.Equals("SaveAndNotify")) if (entity.PUBLISH != null && entity.PUBLISH.Equals("SaveAndNotify"))
{ {
var checkJoin = Nav_Users.Where(e => e.OK); var checkJoin = Nav_Users.Where(e => e.OK);
@ -1101,6 +1126,8 @@ namespace APT.SC.WebApi.Controllers.Api.SE
sendNotice.AddRange(NotificationTaskService.InsertUserNoticeTaskModels("培训记录在线答题-" + data.Nav_Notify.NAME, ListTextID, entity.ORG_ID, ListUserId, ListUserName, DateTime.Now, 1, "SE018_PAPERPAGE", FMTASKTYPE.Default)); sendNotice.AddRange(NotificationTaskService.InsertUserNoticeTaskModels("培训记录在线答题-" + data.Nav_Notify.NAME, ListTextID, entity.ORG_ID, ListUserId, ListUserName, DateTime.Now, 1, "SE018_PAPERPAGE", FMTASKTYPE.Default));
} }
entity.STATUS = SETrainRecordStatus.;
#endregion #endregion
} }
@ -1219,6 +1246,26 @@ namespace APT.SC.WebApi.Controllers.Api.SE
#endregion #endregion
#region
IlistFinish = GetEntities<T_FM_NOTIFICATION_TASK>(e => e.NOTICE_STATUS == 0 && e.SOURCE_DATA_ID.HasValue && (e.SOURCE_DATA_ID.Value == entity.ID && e.NOTICE_TITLE.StartsWith("培训记录签到") || (e.SOURCE_DATA_ID == entity.NOTIFY_ID && e.NOTICE_TITLE.StartsWith("培训通知"))), new BaseFilter(entity.ORG_ID), null);
if (IlistFinish != null)
{
foreach (var item in IlistFinish)
{
if (item.SOURCE_FORMCODE.EndsWith("_SHOWPRINT"))
{
item.NOTICE_STATUS = 4;
item.TASK_DT = DateTime.Now;
item.MODIFY_TIME = DateTime.Now;
item.MODIFIER_ID = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
}
}
}
#endregion
#endregion #endregion
} }
@ -1268,6 +1315,9 @@ namespace APT.SC.WebApi.Controllers.Api.SE
BantchSaveEntityNoCommit(listText); BantchSaveEntityNoCommit(listText);
if (Nav_Papers != null && Nav_Papers.Any()) if (Nav_Papers != null && Nav_Papers.Any())
BantchSaveEntityNoCommit(Nav_Papers); BantchSaveEntityNoCommit(Nav_Papers);
if (IlistFinish != null && IlistFinish.Any())
BantchSaveEntityNoCommit(IlistFinish);
}); });